@holistics/cli-core 0.6.16 → 0.6.17
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/dist/commands.js +13 -12
- package/package.json +1 -1
package/dist/commands.js
CHANGED
|
@@ -83,7 +83,7 @@ __p += '`;if(L1)G0+=`' +
|
|
|
83
83
|
function print() { __p += __j.call(arguments, '') }
|
|
84
84
|
`:`;
|
|
85
85
|
`)+G0+`return __p
|
|
86
|
-
}`;var V1=yN(function(){return A1(m,f0+"return "+G0).apply(x,T)});if(V1.source=G0,Jz(V1))throw V1;return V1}function fo(K){return u1(K).toLowerCase()}function ko(K){return u1(K).toUpperCase()}function co(K,V,B){if(K=u1(K),K&&(B||V===x))return nM(K);if(!K||!(V=D4(V)))return K;var N=G8(K),P=G8(V),m=aM(N,P),T=rM(N,P)+1;return z5(N,m,T).join("")}function bo(K,V,B){if(K=u1(K),K&&(B||V===x))return K.slice(0,eM(K)+1);if(!K||!(V=D4(V)))return K;var N=G8(K),P=rM(N,G8(V))+1;return z5(N,0,P).join("")}function po(K,V,B){if(K=u1(K),K&&(B||V===x))return K.replace(H9,"");if(!K||!(V=D4(V)))return K;var N=G8(K),P=aM(N,G8(V));return z5(N,P).join("")}function yo(K,V){var B=C,N=I;if(H2(V)){var P="separator"in V?V.separator:P;B="length"in V?K1(V.length):B,N="omission"in V?D4(V.omission):N}K=u1(K);var m=K.length;if(M9(K)){var T=G8(K);m=T.length}if(B>=m)return K;var c=B-D9(N);if(c<1)return N;var n=T?z5(T,0,c).join(""):K.slice(0,c);if(P===x)return n+N;if(T)c+=n.length-c;if(Qz(P)){if(K.slice(c).search(P)){var Y0,K0=n;if(!P.global)P=FK(P.source,u1(DM.exec(P))+"g");P.lastIndex=0;while(Y0=P.exec(K0))var G0=Y0.index;n=n.slice(0,G0===x?c:G0)}}else if(K.indexOf(D4(P),c)!=c){var R0=n.lastIndexOf(P);if(R0>-1)n=n.slice(0,R0)}return n+N}function uo(K){return K=u1(K),K&&J7.test(K)?K.replace(fQ,Mh):K}var ho=L9(function(K,V,B){return K+(B?" ":"")+V.toUpperCase()}),$z=uD("toUpperCase");function pN(K,V,B){if(K=u1(K),V=B?x:V,V===x)return Vh(K)?Fh(K):Jh(K);return K.match(V)||[]}var yN=H1(function(K,V){try{return B4(K,x,V)}catch(B){return Jz(B)?B:new Q1(B)}}),go=_6(function(K,V){return k4(V,function(B){B=u8(B),w6(K,B,xz(K[B],K))}),K});function io(K){var V=K==null?0:K.length,B=d0();return K=!V?[]:W2(K,function(N){if(typeof N[1]!="function")throw new c4(X);return[B(N[0]),N[1]]}),H1(function(N){var P=-1;while(++P<V){var m=K[P];if(B4(m[0],this,N))return B4(m[1],this,N)}})}function lo(K){return Mg(p4(K,W))}function Yz(K){return function(){return K}}function oo(K,V){return K==null||K!==K?V:K}var so=gD(),no=gD(!0);function a3(K){return K}function Kz(K){return FD(typeof K=="function"?K:p4(K,W))}function ao(K){return PD(p4(K,W))}function ro(K,V){return _D(K,p4(V,W))}var to=H1(function(K,V){return function(B){return zZ(B,K,V)}}),eo=H1(function(K,V){return function(B){return zZ(K,B,V)}});function zz(K,V,B){var N=r2(V),P=HX(V,N);if(B==null&&!(H2(V)&&(P.length||!N.length)))B=V,V=K,K=this,P=HX(V,r2(V));var m=!(H2(B)&&("chain"in B))||!!B.chain,T=j6(K);return k4(P,function(c){var n=V[c];if(K[c]=n,T)K.prototype[c]=function(){var Y0=this.__chain__;if(m||Y0){var K0=K(this.__wrapped__),G0=K0.__actions__=o3(this.__actions__);return G0.push({func:n,args:arguments,thisArg:K}),K0.__chain__=Y0,K0}return n.apply(K,J5([this.value()],arguments))}}),K}function xs(){if(a2._===this)a2._=Ch;return this}function Wz(){}function Zs(K){return K=K1(K),H1(function(V){return LD(V,K)})}var Js=uK(W2),Qs=uK(iM),Xs=uK(GK);function uN(K){return sK(K)?HK(u8(K)):Ag(K)}function qs(K){return function(V){return K==null?x:K7(K,V)}}var $s=dD(),Ys=dD(!0);function Vz(){return[]}function Gz(){return!1}function Ks(){return{}}function zs(){return""}function Ws(){return!0}function Vs(K,V){if(K=K1(K),K<1||K>o)return[];var B=i0,N=P3(K,i0);V=d0(V),K-=i0;var P=MK(N,V);while(++B<K)V(B);return P}function Gs(K){if(X1(K))return W2(K,u8);return N4(K)?[K]:o3(YN(u1(K)))}function Hs(K){var V=++Lh;return u1(K)+V}var Us=FX(function(K,V){return K+V},0),Bs=hK("ceil"),Ms=FX(function(K,V){return K/V},1),Ds=hK("floor");function Ns(K){return K&&K.length?GX(K,a3,OK):x}function Fs(K,V){return K&&K.length?GX(K,d0(V,2),OK):x}function ws(K){return oM(K,a3)}function Ps(K,V){return oM(K,d0(V,2))}function _s(K){return K&&K.length?GX(K,a3,TK):x}function Ls(K,V){return K&&K.length?GX(K,d0(V,2),TK):x}var js=FX(function(K,V){return K*V},1),Cs=hK("round"),ms=FX(function(K,V){return K-V},0);function Os(K){return K&&K.length?BK(K,a3):0}function Ss(K,V){return K&&K.length?BK(K,d0(V,2)):0}if(j.after=nd,j.ary=NN,j.assign=kl,j.assignIn=vN,j.assignInWith=vX,j.assignWith=cl,j.at=bl,j.before=FN,j.bind=xz,j.bindAll=go,j.bindKey=wN,j.castArray=Yl,j.chain=BN,j.chunk=Mi,j.compact=Di,j.concat=Ni,j.cond=io,j.conforms=lo,j.constant=Yz,j.countBy=md,j.create=pl,j.curry=PN,j.curryRight=_N,j.debounce=LN,j.defaults=yl,j.defaultsDeep=ul,j.defer=ad,j.delay=rd,j.difference=Fi,j.differenceBy=wi,j.differenceWith=Pi,j.drop=_i,j.dropRight=Li,j.dropRightWhile=ji,j.dropWhile=Ci,j.fill=mi,j.filter=Sd,j.flatMap=Td,j.flatMapDeep=vd,j.flatMapDepth=Ad,j.flatten=VN,j.flattenDeep=Oi,j.flattenDepth=Si,j.flip=td,j.flow=so,j.flowRight=no,j.fromPairs=Ri,j.functions=sl,j.functionsIn=nl,j.groupBy=Ed,j.initial=Ti,j.intersection=vi,j.intersectionBy=Ai,j.intersectionWith=Ei,j.invert=rl,j.invertBy=tl,j.invokeMap=kd,j.iteratee=Kz,j.keyBy=cd,j.keys=r2,j.keysIn=n3,j.map=mX,j.mapKeys=xo,j.mapValues=Zo,j.matches=ao,j.matchesProperty=ro,j.memoize=SX,j.merge=Jo,j.mergeWith=AN,j.method=to,j.methodOf=eo,j.mixin=zz,j.negate=RX,j.nthArg=Zs,j.omit=Qo,j.omitBy=Xo,j.once=ed,j.orderBy=bd,j.over=Js,j.overArgs=xl,j.overEvery=Qs,j.overSome=Xs,j.partial=Zz,j.partialRight=jN,j.partition=pd,j.pick=qo,j.pickBy=EN,j.property=uN,j.propertyOf=qs,j.pull=bi,j.pullAll=HN,j.pullAllBy=pi,j.pullAllWith=yi,j.pullAt=ui,j.range=$s,j.rangeRight=Ys,j.rearg=Zl,j.reject=hd,j.remove=hi,j.rest=Jl,j.reverse=tK,j.sampleSize=id,j.set=Yo,j.setWith=Ko,j.shuffle=dd,j.slice=gi,j.sortBy=sd,j.sortedUniq=ai,j.sortedUniqBy=ri,j.split=To,j.spread=Ql,j.tail=ti,j.take=ei,j.takeRight=xd,j.takeRightWhile=Zd,j.takeWhile=Jd,j.tap=Dd,j.throttle=Xl,j.thru=CX,j.toArray=RN,j.toPairs=fN,j.toPairsIn=kN,j.toPath=Gs,j.toPlainObject=TN,j.transform=zo,j.unary=ql,j.union=Qd,j.unionBy=Xd,j.unionWith=qd,j.uniq=$d,j.uniqBy=Yd,j.uniqWith=Kd,j.unset=Wo,j.unzip=eK,j.unzipWith=UN,j.update=Vo,j.updateWith=Go,j.values=m9,j.valuesIn=Ho,j.without=zd,j.words=pN,j.wrap=$l,j.xor=Wd,j.xorBy=Vd,j.xorWith=Gd,j.zip=Hd,j.zipObject=Ud,j.zipObjectDeep=Bd,j.zipWith=Md,j.entries=fN,j.entriesIn=kN,j.extend=vN,j.extendWith=vX,zz(j,j),j.add=Us,j.attempt=yN,j.camelCase=Do,j.capitalize=cN,j.ceil=Bs,j.clamp=Uo,j.clone=Kl,j.cloneDeep=Wl,j.cloneDeepWith=Vl,j.cloneWith=zl,j.conformsTo=Gl,j.deburr=bN,j.defaultTo=oo,j.divide=Ms,j.endsWith=No,j.eq=U8,j.escape=Fo,j.escapeRegExp=wo,j.every=Od,j.find=Rd,j.findIndex=zN,j.findKey=hl,j.findLast=Id,j.findLastIndex=WN,j.findLastKey=gl,j.floor=Ds,j.forEach=MN,j.forEachRight=DN,j.forIn=il,j.forInRight=dl,j.forOwn=ll,j.forOwnRight=ol,j.get=Xz,j.gt=Hl,j.gte=Ul,j.has=al,j.hasIn=qz,j.head=GN,j.identity=a3,j.includes=fd,j.indexOf=Ii,j.inRange=Bo,j.invoke=el,j.isArguments=V7,j.isArray=X1,j.isArrayBuffer=Bl,j.isArrayLike=s3,j.isArrayLikeObject=j2,j.isBoolean=Ml,j.isBuffer=W5,j.isDate=Dl,j.isElement=Nl,j.isEmpty=Fl,j.isEqual=wl,j.isEqualWith=Pl,j.isError=Jz,j.isFinite=_l,j.isFunction=j6,j.isInteger=CN,j.isLength=IX,j.isMap=mN,j.isMatch=Ll,j.isMatchWith=jl,j.isNaN=Cl,j.isNative=ml,j.isNil=Sl,j.isNull=Ol,j.isNumber=ON,j.isObject=H2,j.isObjectLike=F2,j.isPlainObject=BZ,j.isRegExp=Qz,j.isSafeInteger=Rl,j.isSet=SN,j.isString=TX,j.isSymbol=N4,j.isTypedArray=C9,j.isUndefined=Il,j.isWeakMap=Tl,j.isWeakSet=vl,j.join=fi,j.kebabCase=Po,j.last=u4,j.lastIndexOf=ki,j.lowerCase=_o,j.lowerFirst=Lo,j.lt=Al,j.lte=El,j.max=Ns,j.maxBy=Fs,j.mean=ws,j.meanBy=Ps,j.min=_s,j.minBy=Ls,j.stubArray=Vz,j.stubFalse=Gz,j.stubObject=Ks,j.stubString=zs,j.stubTrue=Ws,j.multiply=js,j.nth=ci,j.noConflict=xs,j.noop=Wz,j.now=OX,j.pad=jo,j.padEnd=Co,j.padStart=mo,j.parseInt=Oo,j.random=Mo,j.reduce=yd,j.reduceRight=ud,j.repeat=So,j.replace=Ro,j.result=$o,j.round=Cs,j.runInContext=i,j.sample=gd,j.size=ld,j.snakeCase=Io,j.some=od,j.sortedIndex=ii,j.sortedIndexBy=di,j.sortedIndexOf=li,j.sortedLastIndex=oi,j.sortedLastIndexBy=si,j.sortedLastIndexOf=ni,j.startCase=vo,j.startsWith=Ao,j.subtract=ms,j.sum=Os,j.sumBy=Ss,j.template=Eo,j.times=Vs,j.toFinite=C6,j.toInteger=K1,j.toLength=IN,j.toLower=fo,j.toNumber=h4,j.toSafeInteger=fl,j.toString=u1,j.toUpper=ko,j.trim=co,j.trimEnd=bo,j.trimStart=po,j.truncate=yo,j.unescape=uo,j.uniqueId=Hs,j.upperCase=ho,j.upperFirst=$z,j.each=MN,j.eachRight=DN,j.first=GN,zz(j,function(){var K={};return p8(j,function(V,B){if(!y1.call(j.prototype,B))K[B]=V}),K}(),{chain:!1}),j.VERSION=Z,k4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(K){j[K].placeholder=j}),k4(["drop","take"],function(K,V){F1.prototype[K]=function(B){B=B===x?1:g2(K1(B),0);var N=this.__filtered__&&!V?new F1(this):this.clone();if(N.__filtered__)N.__takeCount__=P3(B,N.__takeCount__);else N.__views__.push({size:P3(B,i0),type:K+(N.__dir__<0?"Right":"")});return N},F1.prototype[K+"Right"]=function(B){return this.reverse()[K](B).reverse()}}),k4(["filter","map","takeWhile"],function(K,V){var B=V+1,N=B==V0||B==s;F1.prototype[K]=function(P){var m=this.clone();return m.__iteratees__.push({iteratee:d0(P,3),type:B}),m.__filtered__=m.__filtered__||N,m}}),k4(["head","last"],function(K,V){var B="take"+(V?"Right":"");F1.prototype[K]=function(){return this[B](1).value()[0]}}),k4(["initial","tail"],function(K,V){var B="drop"+(V?"":"Right");F1.prototype[K]=function(){return this.__filtered__?new F1(this):this[B](1)}}),F1.prototype.compact=function(){return this.filter(a3)},F1.prototype.find=function(K){return this.filter(K).head()},F1.prototype.findLast=function(K){return this.reverse().find(K)},F1.prototype.invokeMap=H1(function(K,V){if(typeof K=="function")return new F1(this);return this.map(function(B){return zZ(B,K,V)})}),F1.prototype.reject=function(K){return this.filter(RX(d0(K)))},F1.prototype.slice=function(K,V){K=K1(K);var B=this;if(B.__filtered__&&(K>0||V<0))return new F1(B);if(K<0)B=B.takeRight(-K);else if(K)B=B.drop(K);if(V!==x)V=K1(V),B=V<0?B.dropRight(-V):B.take(V-K);return B},F1.prototype.takeRightWhile=function(K){return this.reverse().takeWhile(K).reverse()},F1.prototype.toArray=function(){return this.take(i0)},p8(F1.prototype,function(K,V){var B=/^(?:filter|find|map|reject)|While$/.test(V),N=/^(?:head|last)$/.test(V),P=j[N?"take"+(V=="last"?"Right":""):V],m=N||/^find/.test(V);if(!P)return;j.prototype[V]=function(){var T=this.__wrapped__,c=N?[1]:arguments,n=T instanceof F1,Y0=c[0],K0=n||X1(T),G0=function(D1){var L1=P.apply(j,J5([D1],c));return N&&R0?L1[0]:L1};if(K0&&B&&typeof Y0=="function"&&Y0.length!=1)n=K0=!1;var R0=this.__chain__,f0=!!this.__actions__.length,l0=m&&!R0,V1=n&&!f0;if(!m&&K0){T=V1?T:new F1(this);var o0=K.apply(T,c);return o0.__actions__.push({func:CX,args:[G0],thisArg:x}),new b4(o0,R0)}if(l0&&V1)return K.apply(this,c);return o0=this.thru(G0),l0?N?o0.value()[0]:o0.value():o0}}),k4(["pop","push","shift","sort","splice","unshift"],function(K){var V=rQ[K],B=/^(?:push|sort|unshift)$/.test(K)?"tap":"thru",N=/^(?:pop|shift)$/.test(K);j.prototype[K]=function(){var P=arguments;if(N&&!this.__chain__){var m=this.value();return V.apply(X1(m)?m:[],P)}return this[B](function(T){return V.apply(X1(T)?T:[],P)})}}),p8(F1.prototype,function(K,V){var B=j[V];if(B){var N=B.name+"";if(!y1.call(w9,N))w9[N]=[];w9[N].push({name:V,func:B})}}),w9[NX(x,F).name]=[{name:"wrapper",func:x}],F1.prototype.clone=uh,F1.prototype.reverse=hh,F1.prototype.value=gh,j.prototype.at=Nd,j.prototype.chain=Fd,j.prototype.commit=wd,j.prototype.next=Pd,j.prototype.plant=Ld,j.prototype.reverse=jd,j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=Cd,j.prototype.first=j.prototype.head,JZ)j.prototype[JZ]=_d;return j},X5=wh();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)a2._=X5,define(function(){return X5});else if(Q7)(Q7.exports=X5)._=X5,KK._=X5;else a2._=X5}).call($Q)});var iN="0.6.16";var zF=G7(KF(),1),{program:HT0,createCommand:UT0,createArgument:BT0,createOption:MT0,CommanderError:DT0,InvalidArgumentError:NT0,InvalidOptionArgumentError:FT0,Command:g4,Argument:wT0,Option:PT0,Help:_T0}=zF.default;import H40 from"fs";var _z=(x,Z,J)=>{let Q=x instanceof RegExp?WF(x,J):x,X=Z instanceof RegExp?WF(Z,J):Z,q=Q!==null&&X!=null&&Cn(Q,X,J);return q&&{start:q[0],end:q[1],pre:J.slice(0,q[0]),body:J.slice(q[0]+Q.length,q[1]),post:J.slice(q[1]+X.length)}},WF=(x,Z)=>{let J=Z.match(x);return J?J[0]:null},Cn=(x,Z,J)=>{let Q,X,q,$=void 0,Y,z=J.indexOf(x),W=J.indexOf(Z,z+1),G=z;if(z>=0&&W>0){if(x===Z)return[z,W];Q=[],q=J.length;while(G>=0&&!Y){if(G===z)Q.push(G),z=J.indexOf(x,G+1);else if(Q.length===1){let H=Q.pop();if(H!==void 0)Y=[H,W]}else{if(X=Q.pop(),X!==void 0&&X<q)q=X,$=W;W=J.indexOf(Z,G+1)}G=z<W&&z>=0?z:W}if(Q.length&&$!==void 0)Y=[q,$]}return Y};var VF="\x00SLASH"+Math.random()+"\x00",GF="\x00OPEN"+Math.random()+"\x00",jz="\x00CLOSE"+Math.random()+"\x00",HF="\x00COMMA"+Math.random()+"\x00",UF="\x00PERIOD"+Math.random()+"\x00",mn=new RegExp(VF,"g"),On=new RegExp(GF,"g"),Sn=new RegExp(jz,"g"),Rn=new RegExp(HF,"g"),In=new RegExp(UF,"g"),Tn=/\\\\/g,vn=/\\{/g,An=/\\}/g,En=/\\,/g,fn=/\\./g;function Lz(x){return!isNaN(x)?parseInt(x,10):x.charCodeAt(0)}function kn(x){return x.replace(Tn,VF).replace(vn,GF).replace(An,jz).replace(En,HF).replace(fn,UF)}function cn(x){return x.replace(mn,"\\").replace(On,"{").replace(Sn,"}").replace(Rn,",").replace(In,".")}function BF(x){if(!x)return[""];let Z=[],J=_z("{","}",x);if(!J)return x.split(",");let{pre:Q,body:X,post:q}=J,$=Q.split(",");$[$.length-1]+="{"+X+"}";let Y=BF(q);if(q.length)$[$.length-1]+=Y.shift(),$.push.apply($,Y);return Z.push.apply(Z,$),Z}function MF(x){if(!x)return[];if(x.slice(0,2)==="{}")x="\\{\\}"+x.slice(2);return DZ(kn(x),!0).map(cn)}function bn(x){return"{"+x+"}"}function pn(x){return/^-?0\d/.test(x)}function yn(x,Z){return x<=Z}function un(x,Z){return x>=Z}function DZ(x,Z){let J=[],Q=_z("{","}",x);if(!Q)return[x];let X=Q.pre,q=Q.post.length?DZ(Q.post,!1):[""];if(/\$$/.test(Q.pre))for(let $=0;$<q.length;$++){let Y=X+"{"+Q.body+"}"+q[$];J.push(Y)}else{let $=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(Q.body),Y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(Q.body),z=$||Y,W=Q.body.indexOf(",")>=0;if(!z&&!W){if(Q.post.match(/,(?!,).*\}/))return x=Q.pre+"{"+Q.body+jz+Q.post,DZ(x);return[x]}let G;if(z)G=Q.body.split(/\.\./);else if(G=BF(Q.body),G.length===1&&G[0]!==void 0){if(G=DZ(G[0],!1).map(bn),G.length===1)return q.map((U)=>Q.pre+G[0]+U)}let H;if(z&&G[0]!==void 0&&G[1]!==void 0){let U=Lz(G[0]),M=Lz(G[1]),D=Math.max(G[0].length,G[1].length),F=G.length===3&&G[2]!==void 0?Math.abs(Lz(G[2])):1,_=yn;if(M<U)F*=-1,_=un;let O=G.some(pn);H=[];for(let v=U;_(v,M);v+=F){let u;if(Y){if(u=String.fromCharCode(v),u==="\\")u=""}else if(u=String(v),O){let h=D-u.length;if(h>0){let r=new Array(h+1).join("0");if(v<0)u="-"+r+u.slice(1);else u=r+u}}H.push(u)}}else{H=[];for(let U=0;U<G.length;U++)H.push.apply(H,DZ(G[U],!1))}for(let U=0;U<H.length;U++)for(let M=0;M<q.length;M++){let D=X+H[U]+q[M];if(!Z||z||D)J.push(D)}}return J}var NZ=(x)=>{if(typeof x!=="string")throw new TypeError("invalid pattern");if(x.length>65536)throw new TypeError("pattern is too long")};var hn={"[: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]},FZ=(x)=>x.replace(/[[\]\\-]/g,"\\$&"),gn=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),DF=(x)=>x.join(""),NF=(x,Z)=>{let J=Z;if(x.charAt(J)!=="[")throw new Error("not in a brace expression");let Q=[],X=[],q=J+1,$=!1,Y=!1,z=!1,W=!1,G=J,H="";x:while(q<x.length){let F=x.charAt(q);if((F==="!"||F==="^")&&q===J+1){W=!0,q++;continue}if(F==="]"&&$&&!z){G=q+1;break}if($=!0,F==="\\"){if(!z){z=!0,q++;continue}}if(F==="["&&!z){for(let[_,[L,O,v]]of Object.entries(hn))if(x.startsWith(_,q)){if(H)return["$.",!1,x.length-J,!0];if(q+=_.length,v)X.push(L);else Q.push(L);Y=Y||O;continue x}}if(z=!1,H){if(F>H)Q.push(FZ(H)+"-"+FZ(F));else if(F===H)Q.push(FZ(F));H="",q++;continue}if(x.startsWith("-]",q+1)){Q.push(FZ(F+"-")),q+=2;continue}if(x.startsWith("-",q+1)){H=F,q+=2;continue}Q.push(FZ(F)),q++}if(G<q)return["",!1,0,!1];if(!Q.length&&!X.length)return["$.",!1,x.length-J,!0];if(X.length===0&&Q.length===1&&/^\\?.$/.test(Q[0])&&!W){let F=Q[0].length===2?Q[0].slice(-1):Q[0];return[gn(F),!1,G-J,!1]}let U="["+(W?"^":"")+DF(Q)+"]",M="["+(W?"":"^")+DF(X)+"]";return[Q.length&&X.length?"("+U+"|"+M+")":Q.length?U:M,Y,G-J,!0]};var D8=(x,{windowsPathsNoEscape:Z=!1,magicalBraces:J=!0}={})=>{if(J)return Z?x.replace(/\[([^\/\\])\]/g,"$1"):x.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");return Z?x.replace(/\[([^\/\\{}])\]/g,"$1"):x.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1")};var dn=new Set(["!","?","+","*","@"]),FF=(x)=>dn.has(x),ln="(?!(?:^|/)\\.\\.?(?:$|/))",fX="(?!\\.)",on=new Set(["[","."]),sn=new Set(["..","."]),nn=new Set("().*{}+?[]^$\\!"),an=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Cz="[^/]",wF=Cz+"*?",PF=Cz+"+?";class z3{type;#x;#J;#q=!1;#X=[];#$;#w;#D;#W=!1;#Y;#G;#V=!1;constructor(x,Z,J={}){if(this.type=x,x)this.#J=!0;if(this.#$=Z,this.#x=this.#$?this.#$.#x:this,this.#Y=this.#x===this?J:this.#x.#Y,this.#D=this.#x===this?[]:this.#x.#D,x==="!"&&!this.#x.#W)this.#D.push(this);this.#w=this.#$?this.#$.#X.length:0}get hasMagic(){if(this.#J!==void 0)return this.#J;for(let x of this.#X){if(typeof x==="string")continue;if(x.type||x.hasMagic)return this.#J=!0}return this.#J}toString(){if(this.#G!==void 0)return this.#G;if(!this.type)return this.#G=this.#X.map((x)=>String(x)).join("");else return this.#G=this.type+"("+this.#X.map((x)=>String(x)).join("|")+")"}#K(){if(this!==this.#x)throw new Error("should only call on root");if(this.#W)return this;this.toString(),this.#W=!0;let x;while(x=this.#D.pop()){if(x.type!=="!")continue;let Z=x,J=Z.#$;while(J){for(let Q=Z.#w+1;!J.type&&Q<J.#X.length;Q++)for(let X of x.#X){if(typeof X==="string")throw new Error("string part in extglob AST??");X.copyIn(J.#X[Q])}Z=J,J=Z.#$}}return this}push(...x){for(let Z of x){if(Z==="")continue;if(typeof Z!=="string"&&!(Z instanceof z3&&Z.#$===this))throw new Error("invalid part: "+Z);this.#X.push(Z)}}toJSON(){let x=this.type===null?this.#X.slice().map((Z)=>typeof Z==="string"?Z:Z.toJSON()):[this.type,...this.#X.map((Z)=>Z.toJSON())];if(this.isStart()&&!this.type)x.unshift([]);if(this.isEnd()&&(this===this.#x||this.#x.#W&&this.#$?.type==="!"))x.push({});return x}isStart(){if(this.#x===this)return!0;if(!this.#$?.isStart())return!1;if(this.#w===0)return!0;let x=this.#$;for(let Z=0;Z<this.#w;Z++){let J=x.#X[Z];if(!(J instanceof z3&&J.type==="!"))return!1}return!0}isEnd(){if(this.#x===this)return!0;if(this.#$?.type==="!")return!0;if(!this.#$?.isEnd())return!1;if(!this.type)return this.#$?.isEnd();let x=this.#$?this.#$.#X.length:0;return this.#w===x-1}copyIn(x){if(typeof x==="string")this.push(x);else this.push(x.clone(this))}clone(x){let Z=new z3(this.type,x);for(let J of this.#X)Z.copyIn(J);return Z}static#Q(x,Z,J,Q){let X=!1,q=!1,$=-1,Y=!1;if(Z.type===null){let U=J,M="";while(U<x.length){let D=x.charAt(U++);if(X||D==="\\"){X=!X,M+=D;continue}if(q){if(U===$+1){if(D==="^"||D==="!")Y=!0}else if(D==="]"&&!(U===$+2&&Y))q=!1;M+=D;continue}else if(D==="["){q=!0,$=U,Y=!1,M+=D;continue}if(!Q.noext&&FF(D)&&x.charAt(U)==="("){Z.push(M),M="";let F=new z3(D,Z);U=z3.#Q(x,F,U,Q),Z.push(F);continue}M+=D}return Z.push(M),U}let z=J+1,W=new z3(null,Z),G=[],H="";while(z<x.length){let U=x.charAt(z++);if(X||U==="\\"){X=!X,H+=U;continue}if(q){if(z===$+1){if(U==="^"||U==="!")Y=!0}else if(U==="]"&&!(z===$+2&&Y))q=!1;H+=U;continue}else if(U==="["){q=!0,$=z,Y=!1,H+=U;continue}if(FF(U)&&x.charAt(z)==="("){W.push(H),H="";let M=new z3(U,W);W.push(M),z=z3.#Q(x,M,z,Q);continue}if(U==="|"){W.push(H),H="",G.push(W),W=new z3(null,Z);continue}if(U===")"){if(H===""&&Z.#X.length===0)Z.#V=!0;return W.push(H),H="",Z.push(...G,W),z}H+=U}return Z.type=null,Z.#J=void 0,Z.#X=[x.substring(J-1)],z}static fromGlob(x,Z={}){let J=new z3(null,void 0,Z);return z3.#Q(x,J,0,Z),J}toMMPattern(){if(this!==this.#x)return this.#x.toMMPattern();let x=this.toString(),[Z,J,Q,X]=this.toRegExpSource();if(!(Q||this.#J||this.#Y.nocase&&!this.#Y.nocaseMagicOnly&&x.toUpperCase()!==x.toLowerCase()))return J;let $=(this.#Y.nocase?"i":"")+(X?"u":"");return Object.assign(new RegExp(`^${Z}$`,$),{_src:Z,_glob:x})}get options(){return this.#Y}toRegExpSource(x){let Z=x??!!this.#Y.dot;if(this.#x===this)this.#K();if(!this.type){let Y=this.isStart()&&this.isEnd()&&!this.#X.some((U)=>typeof U!=="string"),z=this.#X.map((U)=>{let[M,D,F,_]=typeof U==="string"?z3.#P(U,this.#J,Y):U.toRegExpSource(x);return this.#J=this.#J||F,this.#q=this.#q||_,M}).join(""),W="";if(this.isStart()){if(typeof this.#X[0]==="string"){if(!(this.#X.length===1&&sn.has(this.#X[0]))){let M=on,D=Z&&M.has(z.charAt(0))||z.startsWith("\\.")&&M.has(z.charAt(2))||z.startsWith("\\.\\.")&&M.has(z.charAt(4)),F=!Z&&!x&&M.has(z.charAt(0));W=D?ln:F?fX:""}}}let G="";if(this.isEnd()&&this.#x.#W&&this.#$?.type==="!")G="(?:$|\\/)";return[W+z+G,D8(z),this.#J=!!this.#J,this.#q]}let J=this.type==="*"||this.type==="+",Q=this.type==="!"?"(?:(?!(?:":"(?:",X=this.#H(Z);if(this.isStart()&&this.isEnd()&&!X&&this.type!=="!"){let Y=this.toString();return this.#X=[Y],this.type=null,this.#J=void 0,[Y,D8(this.toString()),!1,!1]}let q=!J||x||Z||!fX?"":this.#H(!0);if(q===X)q="";if(q)X=`(?:${X})(?:${q})*?`;let $="";if(this.type==="!"&&this.#V)$=(this.isStart()&&!Z?fX:"")+PF;else{let Y=this.type==="!"?"))"+(this.isStart()&&!Z&&!x?fX:"")+wF+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;$=Q+X+Y}return[$,D8(X),this.#J=!!this.#J,this.#q]}#H(x){return this.#X.map((Z)=>{if(typeof Z==="string")throw new Error("string type in extglob ast??");let[J,Q,X,q]=Z.toRegExpSource(x);return this.#q=this.#q||q,J}).filter((Z)=>!(this.isStart()&&this.isEnd())||!!Z).join("|")}static#P(x,Z,J=!1){let Q=!1,X="",q=!1;for(let $=0;$<x.length;$++){let Y=x.charAt($);if(Q){Q=!1,X+=(nn.has(Y)?"\\":"")+Y;continue}if(Y==="\\"){if($===x.length-1)X+="\\\\";else Q=!0;continue}if(Y==="["){let[z,W,G,H]=NF(x,$);if(G){X+=z,q=q||W,$+=G-1,Z=Z||H;continue}}if(Y==="*"){X+=J&&x==="*"?PF:wF,Z=!0;continue}if(Y==="?"){X+=Cz,Z=!0;continue}X+=an(Y)}return[X,D8(x),!!Z,q]}}var O9=(x,{windowsPathsNoEscape:Z=!1,magicalBraces:J=!1}={})=>{if(J)return Z?x.replace(/[?*()[\]{}]/g,"[$&]"):x.replace(/[?*()[\]\\{}]/g,"\\$&");return Z?x.replace(/[?*()[\]]/g,"[$&]"):x.replace(/[?*()[\]\\]/g,"\\$&")};var c3=(x,Z,J={})=>{if(NZ(Z),!J.nocomment&&Z.charAt(0)==="#")return!1;return new d4(Z,J).match(x)},rn=/^\*+([^+@!?\*\[\(]*)$/,tn=(x)=>(Z)=>!Z.startsWith(".")&&Z.endsWith(x),en=(x)=>(Z)=>Z.endsWith(x),xa=(x)=>{return x=x.toLowerCase(),(Z)=>!Z.startsWith(".")&&Z.toLowerCase().endsWith(x)},Za=(x)=>{return x=x.toLowerCase(),(Z)=>Z.toLowerCase().endsWith(x)},Ja=/^\*+\.\*+$/,Qa=(x)=>!x.startsWith(".")&&x.includes("."),Xa=(x)=>x!=="."&&x!==".."&&x.includes("."),qa=/^\.\*+$/,$a=(x)=>x!=="."&&x!==".."&&x.startsWith("."),Ya=/^\*+$/,Ka=(x)=>x.length!==0&&!x.startsWith("."),za=(x)=>x.length!==0&&x!=="."&&x!=="..",Wa=/^\?+([^+@!?\*\[\(]*)?$/,Va=([x,Z=""])=>{let J=jF([x]);if(!Z)return J;return Z=Z.toLowerCase(),(Q)=>J(Q)&&Q.toLowerCase().endsWith(Z)},Ga=([x,Z=""])=>{let J=CF([x]);if(!Z)return J;return Z=Z.toLowerCase(),(Q)=>J(Q)&&Q.toLowerCase().endsWith(Z)},Ha=([x,Z=""])=>{let J=CF([x]);return!Z?J:(Q)=>J(Q)&&Q.endsWith(Z)},Ua=([x,Z=""])=>{let J=jF([x]);return!Z?J:(Q)=>J(Q)&&Q.endsWith(Z)},jF=([x])=>{let Z=x.length;return(J)=>J.length===Z&&!J.startsWith(".")},CF=([x])=>{let Z=x.length;return(J)=>J.length===Z&&J!=="."&&J!==".."},mF=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_F={win32:{sep:"\\"},posix:{sep:"/"}},Ba=mF==="win32"?_F.win32.sep:_F.posix.sep;c3.sep=Ba;var W3=Symbol("globstar **");c3.GLOBSTAR=W3;var Ma="[^/]",Da=Ma+"*?",Na="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Fa="(?:(?!(?:\\/|^)\\.).)*?",wa=(x,Z={})=>(J)=>c3(J,x,Z);c3.filter=wa;var i4=(x,Z={})=>Object.assign({},x,Z),Pa=(x)=>{if(!x||typeof x!=="object"||!Object.keys(x).length)return c3;let Z=c3;return Object.assign((Q,X,q={})=>Z(Q,X,i4(x,q)),{Minimatch:class Q extends Z.Minimatch{constructor(X,q={}){super(X,i4(x,q))}static defaults(X){return Z.defaults(i4(x,X)).Minimatch}},AST:class Q extends Z.AST{constructor(X,q,$={}){super(X,q,i4(x,$))}static fromGlob(X,q={}){return Z.AST.fromGlob(X,i4(x,q))}},unescape:(Q,X={})=>Z.unescape(Q,i4(x,X)),escape:(Q,X={})=>Z.escape(Q,i4(x,X)),filter:(Q,X={})=>Z.filter(Q,i4(x,X)),defaults:(Q)=>Z.defaults(i4(x,Q)),makeRe:(Q,X={})=>Z.makeRe(Q,i4(x,X)),braceExpand:(Q,X={})=>Z.braceExpand(Q,i4(x,X)),match:(Q,X,q={})=>Z.match(Q,X,i4(x,q)),sep:Z.sep,GLOBSTAR:W3})};c3.defaults=Pa;var OF=(x,Z={})=>{if(NZ(x),Z.nobrace||!/\{(?:(?!\{).)*\}/.test(x))return[x];return MF(x)};c3.braceExpand=OF;var _a=(x,Z={})=>new d4(x,Z).makeRe();c3.makeRe=_a;var La=(x,Z,J={})=>{let Q=new d4(Z,J);if(x=x.filter((X)=>Q.match(X)),Q.options.nonull&&!x.length)x.push(Z);return x};c3.match=La;var LF=/[?*]|[+@!]\(.*?\)|\[|\]/,ja=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class d4{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(x,Z={}){if(NZ(x),Z=Z||{},this.options=Z,this.pattern=x,this.platform=Z.platform||mF,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!Z.windowsPathsNoEscape||Z.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!Z.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!Z.nonegate,this.comment=!1,this.empty=!1,this.partial=!!Z.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=Z.windowsNoMagicRoot!==void 0?Z.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 x of this.set)for(let Z of x)if(typeof Z!=="string")return!0;return!1}debug(...x){}make(){let x=this.pattern,Z=this.options;if(!Z.nocomment&&x.charAt(0)==="#"){this.comment=!0;return}if(!x){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],Z.debug)this.debug=(...X)=>console.error(...X);this.debug(this.pattern,this.globSet);let J=this.globSet.map((X)=>this.slashSplit(X));this.globParts=this.preprocess(J),this.debug(this.pattern,this.globParts);let Q=this.globParts.map((X,q,$)=>{if(this.isWindows&&this.windowsNoMagicRoot){let Y=X[0]===""&&X[1]===""&&(X[2]==="?"||!LF.test(X[2]))&&!LF.test(X[3]),z=/^[a-z]:/i.test(X[0]);if(Y)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((Y)=>this.parse(Y))});if(this.debug(this.pattern,Q),this.set=Q.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(x){if(this.options.noglobstar){for(let J=0;J<x.length;J++)for(let Q=0;Q<x[J].length;Q++)if(x[J][Q]==="**")x[J][Q]="*"}let{optimizationLevel:Z=1}=this.options;if(Z>=2)x=this.firstPhasePreProcess(x),x=this.secondPhasePreProcess(x);else if(Z>=1)x=this.levelOneOptimize(x);else x=this.adjascentGlobstarOptimize(x);return x}adjascentGlobstarOptimize(x){return x.map((Z)=>{let J=-1;while((J=Z.indexOf("**",J+1))!==-1){let Q=J;while(Z[Q+1]==="**")Q++;if(Q!==J)Z.splice(J,Q-J)}return Z})}levelOneOptimize(x){return x.map((Z)=>{return Z=Z.reduce((J,Q)=>{let X=J[J.length-1];if(Q==="**"&&X==="**")return J;if(Q===".."){if(X&&X!==".."&&X!=="."&&X!=="**")return J.pop(),J}return J.push(Q),J},[]),Z.length===0?[""]:Z})}levelTwoFileOptimize(x){if(!Array.isArray(x))x=this.slashSplit(x);let Z=!1;do{if(Z=!1,!this.preserveMultipleSlashes){for(let Q=1;Q<x.length-1;Q++){let X=x[Q];if(Q===1&&X===""&&x[0]==="")continue;if(X==="."||X==="")Z=!0,x.splice(Q,1),Q--}if(x[0]==="."&&x.length===2&&(x[1]==="."||x[1]===""))Z=!0,x.pop()}let J=0;while((J=x.indexOf("..",J+1))!==-1){let Q=x[J-1];if(Q&&Q!=="."&&Q!==".."&&Q!=="**")Z=!0,x.splice(J-1,2),J-=2}}while(Z);return x.length===0?[""]:x}firstPhasePreProcess(x){let Z=!1;do{Z=!1;for(let J of x){let Q=-1;while((Q=J.indexOf("**",Q+1))!==-1){let q=Q;while(J[q+1]==="**")q++;if(q>Q)J.splice(Q+1,q-Q);let $=J[Q+1],Y=J[Q+2],z=J[Q+3];if($!=="..")continue;if(!Y||Y==="."||Y===".."||!z||z==="."||z==="..")continue;Z=!0,J.splice(Q,1);let W=J.slice(0);W[Q]="**",x.push(W),Q--}if(!this.preserveMultipleSlashes){for(let q=1;q<J.length-1;q++){let $=J[q];if(q===1&&$===""&&J[0]==="")continue;if($==="."||$==="")Z=!0,J.splice(q,1),q--}if(J[0]==="."&&J.length===2&&(J[1]==="."||J[1]===""))Z=!0,J.pop()}let X=0;while((X=J.indexOf("..",X+1))!==-1){let q=J[X-1];if(q&&q!=="."&&q!==".."&&q!=="**"){Z=!0;let Y=X===1&&J[X+1]==="**"?["."]:[];if(J.splice(X-1,2,...Y),J.length===0)J.push("");X-=2}}}}while(Z);return x}secondPhasePreProcess(x){for(let Z=0;Z<x.length-1;Z++)for(let J=Z+1;J<x.length;J++){let Q=this.partsMatch(x[Z],x[J],!this.preserveMultipleSlashes);if(Q){x[Z]=[],x[J]=Q;break}}return x.filter((Z)=>Z.length)}partsMatch(x,Z,J=!1){let Q=0,X=0,q=[],$="";while(Q<x.length&&X<Z.length)if(x[Q]===Z[X])q.push($==="b"?Z[X]:x[Q]),Q++,X++;else if(J&&x[Q]==="**"&&Z[X]===x[Q+1])q.push(x[Q]),Q++;else if(J&&Z[X]==="**"&&x[Q]===Z[X+1])q.push(Z[X]),X++;else if(x[Q]==="*"&&Z[X]&&(this.options.dot||!Z[X].startsWith("."))&&Z[X]!=="**"){if($==="b")return!1;$="a",q.push(x[Q]),Q++,X++}else if(Z[X]==="*"&&x[Q]&&(this.options.dot||!x[Q].startsWith("."))&&x[Q]!=="**"){if($==="a")return!1;$="b",q.push(Z[X]),Q++,X++}else return!1;return x.length===Z.length&&q}parseNegate(){if(this.nonegate)return;let x=this.pattern,Z=!1,J=0;for(let Q=0;Q<x.length&&x.charAt(Q)==="!";Q++)Z=!Z,J++;if(J)this.pattern=x.slice(J);this.negate=Z}matchOne(x,Z,J=!1){let Q=this.options;if(this.isWindows){let D=typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0]),F=!D&&x[0]===""&&x[1]===""&&x[2]==="?"&&/^[a-z]:$/i.test(x[3]),_=typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0]),L=!_&&Z[0]===""&&Z[1]===""&&Z[2]==="?"&&typeof Z[3]==="string"&&/^[a-z]:$/i.test(Z[3]),O=F?3:D?0:void 0,v=L?3:_?0:void 0;if(typeof O==="number"&&typeof v==="number"){let[u,h]=[x[O],Z[v]];if(u.toLowerCase()===h.toLowerCase()){if(Z[v]=u,v>O)Z=Z.slice(v);else if(O>v)x=x.slice(O)}}}let{optimizationLevel:X=1}=this.options;if(X>=2)x=this.levelTwoFileOptimize(x);this.debug("matchOne",this,{file:x,pattern:Z}),this.debug("matchOne",x.length,Z.length);for(var q=0,$=0,Y=x.length,z=Z.length;q<Y&&$<z;q++,$++){this.debug("matchOne loop");var W=Z[$],G=x[q];if(this.debug(Z,W,G),W===!1)return!1;if(W===W3){this.debug("GLOBSTAR",[Z,W,G]);var H=q,U=$+1;if(U===z){this.debug("** at the end");for(;q<Y;q++)if(x[q]==="."||x[q]===".."||!Q.dot&&x[q].charAt(0)===".")return!1;return!0}while(H<Y){var M=x[H];if(this.debug(`
|
|
86
|
+
}`;var V1=yN(function(){return A1(m,f0+"return "+G0).apply(x,T)});if(V1.source=G0,Jz(V1))throw V1;return V1}function fo(K){return u1(K).toLowerCase()}function ko(K){return u1(K).toUpperCase()}function co(K,V,B){if(K=u1(K),K&&(B||V===x))return nM(K);if(!K||!(V=D4(V)))return K;var N=G8(K),P=G8(V),m=aM(N,P),T=rM(N,P)+1;return z5(N,m,T).join("")}function bo(K,V,B){if(K=u1(K),K&&(B||V===x))return K.slice(0,eM(K)+1);if(!K||!(V=D4(V)))return K;var N=G8(K),P=rM(N,G8(V))+1;return z5(N,0,P).join("")}function po(K,V,B){if(K=u1(K),K&&(B||V===x))return K.replace(H9,"");if(!K||!(V=D4(V)))return K;var N=G8(K),P=aM(N,G8(V));return z5(N,P).join("")}function yo(K,V){var B=C,N=I;if(H2(V)){var P="separator"in V?V.separator:P;B="length"in V?K1(V.length):B,N="omission"in V?D4(V.omission):N}K=u1(K);var m=K.length;if(M9(K)){var T=G8(K);m=T.length}if(B>=m)return K;var c=B-D9(N);if(c<1)return N;var n=T?z5(T,0,c).join(""):K.slice(0,c);if(P===x)return n+N;if(T)c+=n.length-c;if(Qz(P)){if(K.slice(c).search(P)){var Y0,K0=n;if(!P.global)P=FK(P.source,u1(DM.exec(P))+"g");P.lastIndex=0;while(Y0=P.exec(K0))var G0=Y0.index;n=n.slice(0,G0===x?c:G0)}}else if(K.indexOf(D4(P),c)!=c){var R0=n.lastIndexOf(P);if(R0>-1)n=n.slice(0,R0)}return n+N}function uo(K){return K=u1(K),K&&J7.test(K)?K.replace(fQ,Mh):K}var ho=L9(function(K,V,B){return K+(B?" ":"")+V.toUpperCase()}),$z=uD("toUpperCase");function pN(K,V,B){if(K=u1(K),V=B?x:V,V===x)return Vh(K)?Fh(K):Jh(K);return K.match(V)||[]}var yN=H1(function(K,V){try{return B4(K,x,V)}catch(B){return Jz(B)?B:new Q1(B)}}),go=_6(function(K,V){return k4(V,function(B){B=u8(B),w6(K,B,xz(K[B],K))}),K});function io(K){var V=K==null?0:K.length,B=d0();return K=!V?[]:W2(K,function(N){if(typeof N[1]!="function")throw new c4(X);return[B(N[0]),N[1]]}),H1(function(N){var P=-1;while(++P<V){var m=K[P];if(B4(m[0],this,N))return B4(m[1],this,N)}})}function lo(K){return Mg(p4(K,W))}function Yz(K){return function(){return K}}function oo(K,V){return K==null||K!==K?V:K}var so=gD(),no=gD(!0);function a3(K){return K}function Kz(K){return FD(typeof K=="function"?K:p4(K,W))}function ao(K){return PD(p4(K,W))}function ro(K,V){return _D(K,p4(V,W))}var to=H1(function(K,V){return function(B){return zZ(B,K,V)}}),eo=H1(function(K,V){return function(B){return zZ(K,B,V)}});function zz(K,V,B){var N=r2(V),P=HX(V,N);if(B==null&&!(H2(V)&&(P.length||!N.length)))B=V,V=K,K=this,P=HX(V,r2(V));var m=!(H2(B)&&("chain"in B))||!!B.chain,T=j6(K);return k4(P,function(c){var n=V[c];if(K[c]=n,T)K.prototype[c]=function(){var Y0=this.__chain__;if(m||Y0){var K0=K(this.__wrapped__),G0=K0.__actions__=o3(this.__actions__);return G0.push({func:n,args:arguments,thisArg:K}),K0.__chain__=Y0,K0}return n.apply(K,J5([this.value()],arguments))}}),K}function xs(){if(a2._===this)a2._=Ch;return this}function Wz(){}function Zs(K){return K=K1(K),H1(function(V){return LD(V,K)})}var Js=uK(W2),Qs=uK(iM),Xs=uK(GK);function uN(K){return sK(K)?HK(u8(K)):Ag(K)}function qs(K){return function(V){return K==null?x:K7(K,V)}}var $s=dD(),Ys=dD(!0);function Vz(){return[]}function Gz(){return!1}function Ks(){return{}}function zs(){return""}function Ws(){return!0}function Vs(K,V){if(K=K1(K),K<1||K>o)return[];var B=i0,N=P3(K,i0);V=d0(V),K-=i0;var P=MK(N,V);while(++B<K)V(B);return P}function Gs(K){if(X1(K))return W2(K,u8);return N4(K)?[K]:o3(YN(u1(K)))}function Hs(K){var V=++Lh;return u1(K)+V}var Us=FX(function(K,V){return K+V},0),Bs=hK("ceil"),Ms=FX(function(K,V){return K/V},1),Ds=hK("floor");function Ns(K){return K&&K.length?GX(K,a3,OK):x}function Fs(K,V){return K&&K.length?GX(K,d0(V,2),OK):x}function ws(K){return oM(K,a3)}function Ps(K,V){return oM(K,d0(V,2))}function _s(K){return K&&K.length?GX(K,a3,TK):x}function Ls(K,V){return K&&K.length?GX(K,d0(V,2),TK):x}var js=FX(function(K,V){return K*V},1),Cs=hK("round"),ms=FX(function(K,V){return K-V},0);function Os(K){return K&&K.length?BK(K,a3):0}function Ss(K,V){return K&&K.length?BK(K,d0(V,2)):0}if(j.after=nd,j.ary=NN,j.assign=kl,j.assignIn=vN,j.assignInWith=vX,j.assignWith=cl,j.at=bl,j.before=FN,j.bind=xz,j.bindAll=go,j.bindKey=wN,j.castArray=Yl,j.chain=BN,j.chunk=Mi,j.compact=Di,j.concat=Ni,j.cond=io,j.conforms=lo,j.constant=Yz,j.countBy=md,j.create=pl,j.curry=PN,j.curryRight=_N,j.debounce=LN,j.defaults=yl,j.defaultsDeep=ul,j.defer=ad,j.delay=rd,j.difference=Fi,j.differenceBy=wi,j.differenceWith=Pi,j.drop=_i,j.dropRight=Li,j.dropRightWhile=ji,j.dropWhile=Ci,j.fill=mi,j.filter=Sd,j.flatMap=Td,j.flatMapDeep=vd,j.flatMapDepth=Ad,j.flatten=VN,j.flattenDeep=Oi,j.flattenDepth=Si,j.flip=td,j.flow=so,j.flowRight=no,j.fromPairs=Ri,j.functions=sl,j.functionsIn=nl,j.groupBy=Ed,j.initial=Ti,j.intersection=vi,j.intersectionBy=Ai,j.intersectionWith=Ei,j.invert=rl,j.invertBy=tl,j.invokeMap=kd,j.iteratee=Kz,j.keyBy=cd,j.keys=r2,j.keysIn=n3,j.map=mX,j.mapKeys=xo,j.mapValues=Zo,j.matches=ao,j.matchesProperty=ro,j.memoize=SX,j.merge=Jo,j.mergeWith=AN,j.method=to,j.methodOf=eo,j.mixin=zz,j.negate=RX,j.nthArg=Zs,j.omit=Qo,j.omitBy=Xo,j.once=ed,j.orderBy=bd,j.over=Js,j.overArgs=xl,j.overEvery=Qs,j.overSome=Xs,j.partial=Zz,j.partialRight=jN,j.partition=pd,j.pick=qo,j.pickBy=EN,j.property=uN,j.propertyOf=qs,j.pull=bi,j.pullAll=HN,j.pullAllBy=pi,j.pullAllWith=yi,j.pullAt=ui,j.range=$s,j.rangeRight=Ys,j.rearg=Zl,j.reject=hd,j.remove=hi,j.rest=Jl,j.reverse=tK,j.sampleSize=id,j.set=Yo,j.setWith=Ko,j.shuffle=dd,j.slice=gi,j.sortBy=sd,j.sortedUniq=ai,j.sortedUniqBy=ri,j.split=To,j.spread=Ql,j.tail=ti,j.take=ei,j.takeRight=xd,j.takeRightWhile=Zd,j.takeWhile=Jd,j.tap=Dd,j.throttle=Xl,j.thru=CX,j.toArray=RN,j.toPairs=fN,j.toPairsIn=kN,j.toPath=Gs,j.toPlainObject=TN,j.transform=zo,j.unary=ql,j.union=Qd,j.unionBy=Xd,j.unionWith=qd,j.uniq=$d,j.uniqBy=Yd,j.uniqWith=Kd,j.unset=Wo,j.unzip=eK,j.unzipWith=UN,j.update=Vo,j.updateWith=Go,j.values=m9,j.valuesIn=Ho,j.without=zd,j.words=pN,j.wrap=$l,j.xor=Wd,j.xorBy=Vd,j.xorWith=Gd,j.zip=Hd,j.zipObject=Ud,j.zipObjectDeep=Bd,j.zipWith=Md,j.entries=fN,j.entriesIn=kN,j.extend=vN,j.extendWith=vX,zz(j,j),j.add=Us,j.attempt=yN,j.camelCase=Do,j.capitalize=cN,j.ceil=Bs,j.clamp=Uo,j.clone=Kl,j.cloneDeep=Wl,j.cloneDeepWith=Vl,j.cloneWith=zl,j.conformsTo=Gl,j.deburr=bN,j.defaultTo=oo,j.divide=Ms,j.endsWith=No,j.eq=U8,j.escape=Fo,j.escapeRegExp=wo,j.every=Od,j.find=Rd,j.findIndex=zN,j.findKey=hl,j.findLast=Id,j.findLastIndex=WN,j.findLastKey=gl,j.floor=Ds,j.forEach=MN,j.forEachRight=DN,j.forIn=il,j.forInRight=dl,j.forOwn=ll,j.forOwnRight=ol,j.get=Xz,j.gt=Hl,j.gte=Ul,j.has=al,j.hasIn=qz,j.head=GN,j.identity=a3,j.includes=fd,j.indexOf=Ii,j.inRange=Bo,j.invoke=el,j.isArguments=V7,j.isArray=X1,j.isArrayBuffer=Bl,j.isArrayLike=s3,j.isArrayLikeObject=j2,j.isBoolean=Ml,j.isBuffer=W5,j.isDate=Dl,j.isElement=Nl,j.isEmpty=Fl,j.isEqual=wl,j.isEqualWith=Pl,j.isError=Jz,j.isFinite=_l,j.isFunction=j6,j.isInteger=CN,j.isLength=IX,j.isMap=mN,j.isMatch=Ll,j.isMatchWith=jl,j.isNaN=Cl,j.isNative=ml,j.isNil=Sl,j.isNull=Ol,j.isNumber=ON,j.isObject=H2,j.isObjectLike=F2,j.isPlainObject=BZ,j.isRegExp=Qz,j.isSafeInteger=Rl,j.isSet=SN,j.isString=TX,j.isSymbol=N4,j.isTypedArray=C9,j.isUndefined=Il,j.isWeakMap=Tl,j.isWeakSet=vl,j.join=fi,j.kebabCase=Po,j.last=u4,j.lastIndexOf=ki,j.lowerCase=_o,j.lowerFirst=Lo,j.lt=Al,j.lte=El,j.max=Ns,j.maxBy=Fs,j.mean=ws,j.meanBy=Ps,j.min=_s,j.minBy=Ls,j.stubArray=Vz,j.stubFalse=Gz,j.stubObject=Ks,j.stubString=zs,j.stubTrue=Ws,j.multiply=js,j.nth=ci,j.noConflict=xs,j.noop=Wz,j.now=OX,j.pad=jo,j.padEnd=Co,j.padStart=mo,j.parseInt=Oo,j.random=Mo,j.reduce=yd,j.reduceRight=ud,j.repeat=So,j.replace=Ro,j.result=$o,j.round=Cs,j.runInContext=i,j.sample=gd,j.size=ld,j.snakeCase=Io,j.some=od,j.sortedIndex=ii,j.sortedIndexBy=di,j.sortedIndexOf=li,j.sortedLastIndex=oi,j.sortedLastIndexBy=si,j.sortedLastIndexOf=ni,j.startCase=vo,j.startsWith=Ao,j.subtract=ms,j.sum=Os,j.sumBy=Ss,j.template=Eo,j.times=Vs,j.toFinite=C6,j.toInteger=K1,j.toLength=IN,j.toLower=fo,j.toNumber=h4,j.toSafeInteger=fl,j.toString=u1,j.toUpper=ko,j.trim=co,j.trimEnd=bo,j.trimStart=po,j.truncate=yo,j.unescape=uo,j.uniqueId=Hs,j.upperCase=ho,j.upperFirst=$z,j.each=MN,j.eachRight=DN,j.first=GN,zz(j,function(){var K={};return p8(j,function(V,B){if(!y1.call(j.prototype,B))K[B]=V}),K}(),{chain:!1}),j.VERSION=Z,k4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(K){j[K].placeholder=j}),k4(["drop","take"],function(K,V){F1.prototype[K]=function(B){B=B===x?1:g2(K1(B),0);var N=this.__filtered__&&!V?new F1(this):this.clone();if(N.__filtered__)N.__takeCount__=P3(B,N.__takeCount__);else N.__views__.push({size:P3(B,i0),type:K+(N.__dir__<0?"Right":"")});return N},F1.prototype[K+"Right"]=function(B){return this.reverse()[K](B).reverse()}}),k4(["filter","map","takeWhile"],function(K,V){var B=V+1,N=B==V0||B==s;F1.prototype[K]=function(P){var m=this.clone();return m.__iteratees__.push({iteratee:d0(P,3),type:B}),m.__filtered__=m.__filtered__||N,m}}),k4(["head","last"],function(K,V){var B="take"+(V?"Right":"");F1.prototype[K]=function(){return this[B](1).value()[0]}}),k4(["initial","tail"],function(K,V){var B="drop"+(V?"":"Right");F1.prototype[K]=function(){return this.__filtered__?new F1(this):this[B](1)}}),F1.prototype.compact=function(){return this.filter(a3)},F1.prototype.find=function(K){return this.filter(K).head()},F1.prototype.findLast=function(K){return this.reverse().find(K)},F1.prototype.invokeMap=H1(function(K,V){if(typeof K=="function")return new F1(this);return this.map(function(B){return zZ(B,K,V)})}),F1.prototype.reject=function(K){return this.filter(RX(d0(K)))},F1.prototype.slice=function(K,V){K=K1(K);var B=this;if(B.__filtered__&&(K>0||V<0))return new F1(B);if(K<0)B=B.takeRight(-K);else if(K)B=B.drop(K);if(V!==x)V=K1(V),B=V<0?B.dropRight(-V):B.take(V-K);return B},F1.prototype.takeRightWhile=function(K){return this.reverse().takeWhile(K).reverse()},F1.prototype.toArray=function(){return this.take(i0)},p8(F1.prototype,function(K,V){var B=/^(?:filter|find|map|reject)|While$/.test(V),N=/^(?:head|last)$/.test(V),P=j[N?"take"+(V=="last"?"Right":""):V],m=N||/^find/.test(V);if(!P)return;j.prototype[V]=function(){var T=this.__wrapped__,c=N?[1]:arguments,n=T instanceof F1,Y0=c[0],K0=n||X1(T),G0=function(D1){var L1=P.apply(j,J5([D1],c));return N&&R0?L1[0]:L1};if(K0&&B&&typeof Y0=="function"&&Y0.length!=1)n=K0=!1;var R0=this.__chain__,f0=!!this.__actions__.length,l0=m&&!R0,V1=n&&!f0;if(!m&&K0){T=V1?T:new F1(this);var o0=K.apply(T,c);return o0.__actions__.push({func:CX,args:[G0],thisArg:x}),new b4(o0,R0)}if(l0&&V1)return K.apply(this,c);return o0=this.thru(G0),l0?N?o0.value()[0]:o0.value():o0}}),k4(["pop","push","shift","sort","splice","unshift"],function(K){var V=rQ[K],B=/^(?:push|sort|unshift)$/.test(K)?"tap":"thru",N=/^(?:pop|shift)$/.test(K);j.prototype[K]=function(){var P=arguments;if(N&&!this.__chain__){var m=this.value();return V.apply(X1(m)?m:[],P)}return this[B](function(T){return V.apply(X1(T)?T:[],P)})}}),p8(F1.prototype,function(K,V){var B=j[V];if(B){var N=B.name+"";if(!y1.call(w9,N))w9[N]=[];w9[N].push({name:V,func:B})}}),w9[NX(x,F).name]=[{name:"wrapper",func:x}],F1.prototype.clone=uh,F1.prototype.reverse=hh,F1.prototype.value=gh,j.prototype.at=Nd,j.prototype.chain=Fd,j.prototype.commit=wd,j.prototype.next=Pd,j.prototype.plant=Ld,j.prototype.reverse=jd,j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=Cd,j.prototype.first=j.prototype.head,JZ)j.prototype[JZ]=_d;return j},X5=wh();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)a2._=X5,define(function(){return X5});else if(Q7)(Q7.exports=X5)._=X5,KK._=X5;else a2._=X5}).call($Q)});var iN="0.6.17";var zF=G7(KF(),1),{program:HT0,createCommand:UT0,createArgument:BT0,createOption:MT0,CommanderError:DT0,InvalidArgumentError:NT0,InvalidOptionArgumentError:FT0,Command:g4,Argument:wT0,Option:PT0,Help:_T0}=zF.default;import H40 from"fs";var _z=(x,Z,J)=>{let Q=x instanceof RegExp?WF(x,J):x,X=Z instanceof RegExp?WF(Z,J):Z,q=Q!==null&&X!=null&&Cn(Q,X,J);return q&&{start:q[0],end:q[1],pre:J.slice(0,q[0]),body:J.slice(q[0]+Q.length,q[1]),post:J.slice(q[1]+X.length)}},WF=(x,Z)=>{let J=Z.match(x);return J?J[0]:null},Cn=(x,Z,J)=>{let Q,X,q,$=void 0,Y,z=J.indexOf(x),W=J.indexOf(Z,z+1),G=z;if(z>=0&&W>0){if(x===Z)return[z,W];Q=[],q=J.length;while(G>=0&&!Y){if(G===z)Q.push(G),z=J.indexOf(x,G+1);else if(Q.length===1){let H=Q.pop();if(H!==void 0)Y=[H,W]}else{if(X=Q.pop(),X!==void 0&&X<q)q=X,$=W;W=J.indexOf(Z,G+1)}G=z<W&&z>=0?z:W}if(Q.length&&$!==void 0)Y=[q,$]}return Y};var VF="\x00SLASH"+Math.random()+"\x00",GF="\x00OPEN"+Math.random()+"\x00",jz="\x00CLOSE"+Math.random()+"\x00",HF="\x00COMMA"+Math.random()+"\x00",UF="\x00PERIOD"+Math.random()+"\x00",mn=new RegExp(VF,"g"),On=new RegExp(GF,"g"),Sn=new RegExp(jz,"g"),Rn=new RegExp(HF,"g"),In=new RegExp(UF,"g"),Tn=/\\\\/g,vn=/\\{/g,An=/\\}/g,En=/\\,/g,fn=/\\./g;function Lz(x){return!isNaN(x)?parseInt(x,10):x.charCodeAt(0)}function kn(x){return x.replace(Tn,VF).replace(vn,GF).replace(An,jz).replace(En,HF).replace(fn,UF)}function cn(x){return x.replace(mn,"\\").replace(On,"{").replace(Sn,"}").replace(Rn,",").replace(In,".")}function BF(x){if(!x)return[""];let Z=[],J=_z("{","}",x);if(!J)return x.split(",");let{pre:Q,body:X,post:q}=J,$=Q.split(",");$[$.length-1]+="{"+X+"}";let Y=BF(q);if(q.length)$[$.length-1]+=Y.shift(),$.push.apply($,Y);return Z.push.apply(Z,$),Z}function MF(x){if(!x)return[];if(x.slice(0,2)==="{}")x="\\{\\}"+x.slice(2);return DZ(kn(x),!0).map(cn)}function bn(x){return"{"+x+"}"}function pn(x){return/^-?0\d/.test(x)}function yn(x,Z){return x<=Z}function un(x,Z){return x>=Z}function DZ(x,Z){let J=[],Q=_z("{","}",x);if(!Q)return[x];let X=Q.pre,q=Q.post.length?DZ(Q.post,!1):[""];if(/\$$/.test(Q.pre))for(let $=0;$<q.length;$++){let Y=X+"{"+Q.body+"}"+q[$];J.push(Y)}else{let $=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(Q.body),Y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(Q.body),z=$||Y,W=Q.body.indexOf(",")>=0;if(!z&&!W){if(Q.post.match(/,(?!,).*\}/))return x=Q.pre+"{"+Q.body+jz+Q.post,DZ(x);return[x]}let G;if(z)G=Q.body.split(/\.\./);else if(G=BF(Q.body),G.length===1&&G[0]!==void 0){if(G=DZ(G[0],!1).map(bn),G.length===1)return q.map((U)=>Q.pre+G[0]+U)}let H;if(z&&G[0]!==void 0&&G[1]!==void 0){let U=Lz(G[0]),M=Lz(G[1]),D=Math.max(G[0].length,G[1].length),F=G.length===3&&G[2]!==void 0?Math.abs(Lz(G[2])):1,_=yn;if(M<U)F*=-1,_=un;let O=G.some(pn);H=[];for(let v=U;_(v,M);v+=F){let u;if(Y){if(u=String.fromCharCode(v),u==="\\")u=""}else if(u=String(v),O){let h=D-u.length;if(h>0){let r=new Array(h+1).join("0");if(v<0)u="-"+r+u.slice(1);else u=r+u}}H.push(u)}}else{H=[];for(let U=0;U<G.length;U++)H.push.apply(H,DZ(G[U],!1))}for(let U=0;U<H.length;U++)for(let M=0;M<q.length;M++){let D=X+H[U]+q[M];if(!Z||z||D)J.push(D)}}return J}var NZ=(x)=>{if(typeof x!=="string")throw new TypeError("invalid pattern");if(x.length>65536)throw new TypeError("pattern is too long")};var hn={"[: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]},FZ=(x)=>x.replace(/[[\]\\-]/g,"\\$&"),gn=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),DF=(x)=>x.join(""),NF=(x,Z)=>{let J=Z;if(x.charAt(J)!=="[")throw new Error("not in a brace expression");let Q=[],X=[],q=J+1,$=!1,Y=!1,z=!1,W=!1,G=J,H="";x:while(q<x.length){let F=x.charAt(q);if((F==="!"||F==="^")&&q===J+1){W=!0,q++;continue}if(F==="]"&&$&&!z){G=q+1;break}if($=!0,F==="\\"){if(!z){z=!0,q++;continue}}if(F==="["&&!z){for(let[_,[L,O,v]]of Object.entries(hn))if(x.startsWith(_,q)){if(H)return["$.",!1,x.length-J,!0];if(q+=_.length,v)X.push(L);else Q.push(L);Y=Y||O;continue x}}if(z=!1,H){if(F>H)Q.push(FZ(H)+"-"+FZ(F));else if(F===H)Q.push(FZ(F));H="",q++;continue}if(x.startsWith("-]",q+1)){Q.push(FZ(F+"-")),q+=2;continue}if(x.startsWith("-",q+1)){H=F,q+=2;continue}Q.push(FZ(F)),q++}if(G<q)return["",!1,0,!1];if(!Q.length&&!X.length)return["$.",!1,x.length-J,!0];if(X.length===0&&Q.length===1&&/^\\?.$/.test(Q[0])&&!W){let F=Q[0].length===2?Q[0].slice(-1):Q[0];return[gn(F),!1,G-J,!1]}let U="["+(W?"^":"")+DF(Q)+"]",M="["+(W?"":"^")+DF(X)+"]";return[Q.length&&X.length?"("+U+"|"+M+")":Q.length?U:M,Y,G-J,!0]};var D8=(x,{windowsPathsNoEscape:Z=!1,magicalBraces:J=!0}={})=>{if(J)return Z?x.replace(/\[([^\/\\])\]/g,"$1"):x.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");return Z?x.replace(/\[([^\/\\{}])\]/g,"$1"):x.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1")};var dn=new Set(["!","?","+","*","@"]),FF=(x)=>dn.has(x),ln="(?!(?:^|/)\\.\\.?(?:$|/))",fX="(?!\\.)",on=new Set(["[","."]),sn=new Set(["..","."]),nn=new Set("().*{}+?[]^$\\!"),an=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Cz="[^/]",wF=Cz+"*?",PF=Cz+"+?";class z3{type;#x;#J;#q=!1;#X=[];#$;#w;#D;#W=!1;#Y;#G;#V=!1;constructor(x,Z,J={}){if(this.type=x,x)this.#J=!0;if(this.#$=Z,this.#x=this.#$?this.#$.#x:this,this.#Y=this.#x===this?J:this.#x.#Y,this.#D=this.#x===this?[]:this.#x.#D,x==="!"&&!this.#x.#W)this.#D.push(this);this.#w=this.#$?this.#$.#X.length:0}get hasMagic(){if(this.#J!==void 0)return this.#J;for(let x of this.#X){if(typeof x==="string")continue;if(x.type||x.hasMagic)return this.#J=!0}return this.#J}toString(){if(this.#G!==void 0)return this.#G;if(!this.type)return this.#G=this.#X.map((x)=>String(x)).join("");else return this.#G=this.type+"("+this.#X.map((x)=>String(x)).join("|")+")"}#K(){if(this!==this.#x)throw new Error("should only call on root");if(this.#W)return this;this.toString(),this.#W=!0;let x;while(x=this.#D.pop()){if(x.type!=="!")continue;let Z=x,J=Z.#$;while(J){for(let Q=Z.#w+1;!J.type&&Q<J.#X.length;Q++)for(let X of x.#X){if(typeof X==="string")throw new Error("string part in extglob AST??");X.copyIn(J.#X[Q])}Z=J,J=Z.#$}}return this}push(...x){for(let Z of x){if(Z==="")continue;if(typeof Z!=="string"&&!(Z instanceof z3&&Z.#$===this))throw new Error("invalid part: "+Z);this.#X.push(Z)}}toJSON(){let x=this.type===null?this.#X.slice().map((Z)=>typeof Z==="string"?Z:Z.toJSON()):[this.type,...this.#X.map((Z)=>Z.toJSON())];if(this.isStart()&&!this.type)x.unshift([]);if(this.isEnd()&&(this===this.#x||this.#x.#W&&this.#$?.type==="!"))x.push({});return x}isStart(){if(this.#x===this)return!0;if(!this.#$?.isStart())return!1;if(this.#w===0)return!0;let x=this.#$;for(let Z=0;Z<this.#w;Z++){let J=x.#X[Z];if(!(J instanceof z3&&J.type==="!"))return!1}return!0}isEnd(){if(this.#x===this)return!0;if(this.#$?.type==="!")return!0;if(!this.#$?.isEnd())return!1;if(!this.type)return this.#$?.isEnd();let x=this.#$?this.#$.#X.length:0;return this.#w===x-1}copyIn(x){if(typeof x==="string")this.push(x);else this.push(x.clone(this))}clone(x){let Z=new z3(this.type,x);for(let J of this.#X)Z.copyIn(J);return Z}static#Q(x,Z,J,Q){let X=!1,q=!1,$=-1,Y=!1;if(Z.type===null){let U=J,M="";while(U<x.length){let D=x.charAt(U++);if(X||D==="\\"){X=!X,M+=D;continue}if(q){if(U===$+1){if(D==="^"||D==="!")Y=!0}else if(D==="]"&&!(U===$+2&&Y))q=!1;M+=D;continue}else if(D==="["){q=!0,$=U,Y=!1,M+=D;continue}if(!Q.noext&&FF(D)&&x.charAt(U)==="("){Z.push(M),M="";let F=new z3(D,Z);U=z3.#Q(x,F,U,Q),Z.push(F);continue}M+=D}return Z.push(M),U}let z=J+1,W=new z3(null,Z),G=[],H="";while(z<x.length){let U=x.charAt(z++);if(X||U==="\\"){X=!X,H+=U;continue}if(q){if(z===$+1){if(U==="^"||U==="!")Y=!0}else if(U==="]"&&!(z===$+2&&Y))q=!1;H+=U;continue}else if(U==="["){q=!0,$=z,Y=!1,H+=U;continue}if(FF(U)&&x.charAt(z)==="("){W.push(H),H="";let M=new z3(U,W);W.push(M),z=z3.#Q(x,M,z,Q);continue}if(U==="|"){W.push(H),H="",G.push(W),W=new z3(null,Z);continue}if(U===")"){if(H===""&&Z.#X.length===0)Z.#V=!0;return W.push(H),H="",Z.push(...G,W),z}H+=U}return Z.type=null,Z.#J=void 0,Z.#X=[x.substring(J-1)],z}static fromGlob(x,Z={}){let J=new z3(null,void 0,Z);return z3.#Q(x,J,0,Z),J}toMMPattern(){if(this!==this.#x)return this.#x.toMMPattern();let x=this.toString(),[Z,J,Q,X]=this.toRegExpSource();if(!(Q||this.#J||this.#Y.nocase&&!this.#Y.nocaseMagicOnly&&x.toUpperCase()!==x.toLowerCase()))return J;let $=(this.#Y.nocase?"i":"")+(X?"u":"");return Object.assign(new RegExp(`^${Z}$`,$),{_src:Z,_glob:x})}get options(){return this.#Y}toRegExpSource(x){let Z=x??!!this.#Y.dot;if(this.#x===this)this.#K();if(!this.type){let Y=this.isStart()&&this.isEnd()&&!this.#X.some((U)=>typeof U!=="string"),z=this.#X.map((U)=>{let[M,D,F,_]=typeof U==="string"?z3.#P(U,this.#J,Y):U.toRegExpSource(x);return this.#J=this.#J||F,this.#q=this.#q||_,M}).join(""),W="";if(this.isStart()){if(typeof this.#X[0]==="string"){if(!(this.#X.length===1&&sn.has(this.#X[0]))){let M=on,D=Z&&M.has(z.charAt(0))||z.startsWith("\\.")&&M.has(z.charAt(2))||z.startsWith("\\.\\.")&&M.has(z.charAt(4)),F=!Z&&!x&&M.has(z.charAt(0));W=D?ln:F?fX:""}}}let G="";if(this.isEnd()&&this.#x.#W&&this.#$?.type==="!")G="(?:$|\\/)";return[W+z+G,D8(z),this.#J=!!this.#J,this.#q]}let J=this.type==="*"||this.type==="+",Q=this.type==="!"?"(?:(?!(?:":"(?:",X=this.#H(Z);if(this.isStart()&&this.isEnd()&&!X&&this.type!=="!"){let Y=this.toString();return this.#X=[Y],this.type=null,this.#J=void 0,[Y,D8(this.toString()),!1,!1]}let q=!J||x||Z||!fX?"":this.#H(!0);if(q===X)q="";if(q)X=`(?:${X})(?:${q})*?`;let $="";if(this.type==="!"&&this.#V)$=(this.isStart()&&!Z?fX:"")+PF;else{let Y=this.type==="!"?"))"+(this.isStart()&&!Z&&!x?fX:"")+wF+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&q?")":this.type==="*"&&q?")?":`)${this.type}`;$=Q+X+Y}return[$,D8(X),this.#J=!!this.#J,this.#q]}#H(x){return this.#X.map((Z)=>{if(typeof Z==="string")throw new Error("string type in extglob ast??");let[J,Q,X,q]=Z.toRegExpSource(x);return this.#q=this.#q||q,J}).filter((Z)=>!(this.isStart()&&this.isEnd())||!!Z).join("|")}static#P(x,Z,J=!1){let Q=!1,X="",q=!1;for(let $=0;$<x.length;$++){let Y=x.charAt($);if(Q){Q=!1,X+=(nn.has(Y)?"\\":"")+Y;continue}if(Y==="\\"){if($===x.length-1)X+="\\\\";else Q=!0;continue}if(Y==="["){let[z,W,G,H]=NF(x,$);if(G){X+=z,q=q||W,$+=G-1,Z=Z||H;continue}}if(Y==="*"){X+=J&&x==="*"?PF:wF,Z=!0;continue}if(Y==="?"){X+=Cz,Z=!0;continue}X+=an(Y)}return[X,D8(x),!!Z,q]}}var O9=(x,{windowsPathsNoEscape:Z=!1,magicalBraces:J=!1}={})=>{if(J)return Z?x.replace(/[?*()[\]{}]/g,"[$&]"):x.replace(/[?*()[\]\\{}]/g,"\\$&");return Z?x.replace(/[?*()[\]]/g,"[$&]"):x.replace(/[?*()[\]\\]/g,"\\$&")};var c3=(x,Z,J={})=>{if(NZ(Z),!J.nocomment&&Z.charAt(0)==="#")return!1;return new d4(Z,J).match(x)},rn=/^\*+([^+@!?\*\[\(]*)$/,tn=(x)=>(Z)=>!Z.startsWith(".")&&Z.endsWith(x),en=(x)=>(Z)=>Z.endsWith(x),xa=(x)=>{return x=x.toLowerCase(),(Z)=>!Z.startsWith(".")&&Z.toLowerCase().endsWith(x)},Za=(x)=>{return x=x.toLowerCase(),(Z)=>Z.toLowerCase().endsWith(x)},Ja=/^\*+\.\*+$/,Qa=(x)=>!x.startsWith(".")&&x.includes("."),Xa=(x)=>x!=="."&&x!==".."&&x.includes("."),qa=/^\.\*+$/,$a=(x)=>x!=="."&&x!==".."&&x.startsWith("."),Ya=/^\*+$/,Ka=(x)=>x.length!==0&&!x.startsWith("."),za=(x)=>x.length!==0&&x!=="."&&x!=="..",Wa=/^\?+([^+@!?\*\[\(]*)?$/,Va=([x,Z=""])=>{let J=jF([x]);if(!Z)return J;return Z=Z.toLowerCase(),(Q)=>J(Q)&&Q.toLowerCase().endsWith(Z)},Ga=([x,Z=""])=>{let J=CF([x]);if(!Z)return J;return Z=Z.toLowerCase(),(Q)=>J(Q)&&Q.toLowerCase().endsWith(Z)},Ha=([x,Z=""])=>{let J=CF([x]);return!Z?J:(Q)=>J(Q)&&Q.endsWith(Z)},Ua=([x,Z=""])=>{let J=jF([x]);return!Z?J:(Q)=>J(Q)&&Q.endsWith(Z)},jF=([x])=>{let Z=x.length;return(J)=>J.length===Z&&!J.startsWith(".")},CF=([x])=>{let Z=x.length;return(J)=>J.length===Z&&J!=="."&&J!==".."},mF=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_F={win32:{sep:"\\"},posix:{sep:"/"}},Ba=mF==="win32"?_F.win32.sep:_F.posix.sep;c3.sep=Ba;var W3=Symbol("globstar **");c3.GLOBSTAR=W3;var Ma="[^/]",Da=Ma+"*?",Na="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Fa="(?:(?!(?:\\/|^)\\.).)*?",wa=(x,Z={})=>(J)=>c3(J,x,Z);c3.filter=wa;var i4=(x,Z={})=>Object.assign({},x,Z),Pa=(x)=>{if(!x||typeof x!=="object"||!Object.keys(x).length)return c3;let Z=c3;return Object.assign((Q,X,q={})=>Z(Q,X,i4(x,q)),{Minimatch:class Q extends Z.Minimatch{constructor(X,q={}){super(X,i4(x,q))}static defaults(X){return Z.defaults(i4(x,X)).Minimatch}},AST:class Q extends Z.AST{constructor(X,q,$={}){super(X,q,i4(x,$))}static fromGlob(X,q={}){return Z.AST.fromGlob(X,i4(x,q))}},unescape:(Q,X={})=>Z.unescape(Q,i4(x,X)),escape:(Q,X={})=>Z.escape(Q,i4(x,X)),filter:(Q,X={})=>Z.filter(Q,i4(x,X)),defaults:(Q)=>Z.defaults(i4(x,Q)),makeRe:(Q,X={})=>Z.makeRe(Q,i4(x,X)),braceExpand:(Q,X={})=>Z.braceExpand(Q,i4(x,X)),match:(Q,X,q={})=>Z.match(Q,X,i4(x,q)),sep:Z.sep,GLOBSTAR:W3})};c3.defaults=Pa;var OF=(x,Z={})=>{if(NZ(x),Z.nobrace||!/\{(?:(?!\{).)*\}/.test(x))return[x];return MF(x)};c3.braceExpand=OF;var _a=(x,Z={})=>new d4(x,Z).makeRe();c3.makeRe=_a;var La=(x,Z,J={})=>{let Q=new d4(Z,J);if(x=x.filter((X)=>Q.match(X)),Q.options.nonull&&!x.length)x.push(Z);return x};c3.match=La;var LF=/[?*]|[+@!]\(.*?\)|\[|\]/,ja=(x)=>x.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class d4{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(x,Z={}){if(NZ(x),Z=Z||{},this.options=Z,this.pattern=x,this.platform=Z.platform||mF,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!Z.windowsPathsNoEscape||Z.allowWindowsEscape===!1,this.windowsPathsNoEscape)this.pattern=this.pattern.replace(/\\/g,"/");this.preserveMultipleSlashes=!!Z.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!Z.nonegate,this.comment=!1,this.empty=!1,this.partial=!!Z.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=Z.windowsNoMagicRoot!==void 0?Z.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 x of this.set)for(let Z of x)if(typeof Z!=="string")return!0;return!1}debug(...x){}make(){let x=this.pattern,Z=this.options;if(!Z.nocomment&&x.charAt(0)==="#"){this.comment=!0;return}if(!x){this.empty=!0;return}if(this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],Z.debug)this.debug=(...X)=>console.error(...X);this.debug(this.pattern,this.globSet);let J=this.globSet.map((X)=>this.slashSplit(X));this.globParts=this.preprocess(J),this.debug(this.pattern,this.globParts);let Q=this.globParts.map((X,q,$)=>{if(this.isWindows&&this.windowsNoMagicRoot){let Y=X[0]===""&&X[1]===""&&(X[2]==="?"||!LF.test(X[2]))&&!LF.test(X[3]),z=/^[a-z]:/i.test(X[0]);if(Y)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((Y)=>this.parse(Y))});if(this.debug(this.pattern,Q),this.set=Q.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(x){if(this.options.noglobstar){for(let J=0;J<x.length;J++)for(let Q=0;Q<x[J].length;Q++)if(x[J][Q]==="**")x[J][Q]="*"}let{optimizationLevel:Z=1}=this.options;if(Z>=2)x=this.firstPhasePreProcess(x),x=this.secondPhasePreProcess(x);else if(Z>=1)x=this.levelOneOptimize(x);else x=this.adjascentGlobstarOptimize(x);return x}adjascentGlobstarOptimize(x){return x.map((Z)=>{let J=-1;while((J=Z.indexOf("**",J+1))!==-1){let Q=J;while(Z[Q+1]==="**")Q++;if(Q!==J)Z.splice(J,Q-J)}return Z})}levelOneOptimize(x){return x.map((Z)=>{return Z=Z.reduce((J,Q)=>{let X=J[J.length-1];if(Q==="**"&&X==="**")return J;if(Q===".."){if(X&&X!==".."&&X!=="."&&X!=="**")return J.pop(),J}return J.push(Q),J},[]),Z.length===0?[""]:Z})}levelTwoFileOptimize(x){if(!Array.isArray(x))x=this.slashSplit(x);let Z=!1;do{if(Z=!1,!this.preserveMultipleSlashes){for(let Q=1;Q<x.length-1;Q++){let X=x[Q];if(Q===1&&X===""&&x[0]==="")continue;if(X==="."||X==="")Z=!0,x.splice(Q,1),Q--}if(x[0]==="."&&x.length===2&&(x[1]==="."||x[1]===""))Z=!0,x.pop()}let J=0;while((J=x.indexOf("..",J+1))!==-1){let Q=x[J-1];if(Q&&Q!=="."&&Q!==".."&&Q!=="**")Z=!0,x.splice(J-1,2),J-=2}}while(Z);return x.length===0?[""]:x}firstPhasePreProcess(x){let Z=!1;do{Z=!1;for(let J of x){let Q=-1;while((Q=J.indexOf("**",Q+1))!==-1){let q=Q;while(J[q+1]==="**")q++;if(q>Q)J.splice(Q+1,q-Q);let $=J[Q+1],Y=J[Q+2],z=J[Q+3];if($!=="..")continue;if(!Y||Y==="."||Y===".."||!z||z==="."||z==="..")continue;Z=!0,J.splice(Q,1);let W=J.slice(0);W[Q]="**",x.push(W),Q--}if(!this.preserveMultipleSlashes){for(let q=1;q<J.length-1;q++){let $=J[q];if(q===1&&$===""&&J[0]==="")continue;if($==="."||$==="")Z=!0,J.splice(q,1),q--}if(J[0]==="."&&J.length===2&&(J[1]==="."||J[1]===""))Z=!0,J.pop()}let X=0;while((X=J.indexOf("..",X+1))!==-1){let q=J[X-1];if(q&&q!=="."&&q!==".."&&q!=="**"){Z=!0;let Y=X===1&&J[X+1]==="**"?["."]:[];if(J.splice(X-1,2,...Y),J.length===0)J.push("");X-=2}}}}while(Z);return x}secondPhasePreProcess(x){for(let Z=0;Z<x.length-1;Z++)for(let J=Z+1;J<x.length;J++){let Q=this.partsMatch(x[Z],x[J],!this.preserveMultipleSlashes);if(Q){x[Z]=[],x[J]=Q;break}}return x.filter((Z)=>Z.length)}partsMatch(x,Z,J=!1){let Q=0,X=0,q=[],$="";while(Q<x.length&&X<Z.length)if(x[Q]===Z[X])q.push($==="b"?Z[X]:x[Q]),Q++,X++;else if(J&&x[Q]==="**"&&Z[X]===x[Q+1])q.push(x[Q]),Q++;else if(J&&Z[X]==="**"&&x[Q]===Z[X+1])q.push(Z[X]),X++;else if(x[Q]==="*"&&Z[X]&&(this.options.dot||!Z[X].startsWith("."))&&Z[X]!=="**"){if($==="b")return!1;$="a",q.push(x[Q]),Q++,X++}else if(Z[X]==="*"&&x[Q]&&(this.options.dot||!x[Q].startsWith("."))&&x[Q]!=="**"){if($==="a")return!1;$="b",q.push(Z[X]),Q++,X++}else return!1;return x.length===Z.length&&q}parseNegate(){if(this.nonegate)return;let x=this.pattern,Z=!1,J=0;for(let Q=0;Q<x.length&&x.charAt(Q)==="!";Q++)Z=!Z,J++;if(J)this.pattern=x.slice(J);this.negate=Z}matchOne(x,Z,J=!1){let Q=this.options;if(this.isWindows){let D=typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0]),F=!D&&x[0]===""&&x[1]===""&&x[2]==="?"&&/^[a-z]:$/i.test(x[3]),_=typeof Z[0]==="string"&&/^[a-z]:$/i.test(Z[0]),L=!_&&Z[0]===""&&Z[1]===""&&Z[2]==="?"&&typeof Z[3]==="string"&&/^[a-z]:$/i.test(Z[3]),O=F?3:D?0:void 0,v=L?3:_?0:void 0;if(typeof O==="number"&&typeof v==="number"){let[u,h]=[x[O],Z[v]];if(u.toLowerCase()===h.toLowerCase()){if(Z[v]=u,v>O)Z=Z.slice(v);else if(O>v)x=x.slice(O)}}}let{optimizationLevel:X=1}=this.options;if(X>=2)x=this.levelTwoFileOptimize(x);this.debug("matchOne",this,{file:x,pattern:Z}),this.debug("matchOne",x.length,Z.length);for(var q=0,$=0,Y=x.length,z=Z.length;q<Y&&$<z;q++,$++){this.debug("matchOne loop");var W=Z[$],G=x[q];if(this.debug(Z,W,G),W===!1)return!1;if(W===W3){this.debug("GLOBSTAR",[Z,W,G]);var H=q,U=$+1;if(U===z){this.debug("** at the end");for(;q<Y;q++)if(x[q]==="."||x[q]===".."||!Q.dot&&x[q].charAt(0)===".")return!1;return!0}while(H<Y){var M=x[H];if(this.debug(`
|
|
87
87
|
globstar while`,x,H,Z,U,M),this.matchOne(x.slice(H),Z.slice(U),J))return this.debug("globstar found match!",H,Y,M),!0;else{if(M==="."||M===".."||!Q.dot&&M.charAt(0)==="."){this.debug("dot detected!",x,H,Z,U);break}this.debug("globstar swallow a segment, and continue"),H++}}if(J){if(this.debug(`
|
|
88
88
|
>>> no match, partial?`,x,H,Z,U),H===Y)return!0}return!1}let D;if(typeof W==="string")D=G===W,this.debug("string match",W,G,D);else D=W.test(G),this.debug("pattern match",W,G,D);if(!D)return!1}if(q===Y&&$===z)return!0;else if(q===Y)return J;else if($===z)return q===Y-1&&x[q]==="";else throw new Error("wtf?")}braceExpand(){return OF(this.pattern,this.options)}parse(x){NZ(x);let Z=this.options;if(x==="**")return W3;if(x==="")return"";let J,Q=null;if(J=x.match(Ya))Q=Z.dot?za:Ka;else if(J=x.match(rn))Q=(Z.nocase?Z.dot?Za:xa:Z.dot?en:tn)(J[1]);else if(J=x.match(Wa))Q=(Z.nocase?Z.dot?Ga:Va:Z.dot?Ha:Ua)(J);else if(J=x.match(Ja))Q=Z.dot?Xa:Qa;else if(J=x.match(qa))Q=$a;let X=z3.fromGlob(x,this.options).toMMPattern();if(Q&&typeof X==="object")Reflect.defineProperty(X,"test",{value:Q});return X}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let x=this.set;if(!x.length)return this.regexp=!1,this.regexp;let Z=this.options,J=Z.noglobstar?Da:Z.dot?Na:Fa,Q=new Set(Z.nocase?["i"]:[]),X=x.map((Y)=>{let z=Y.map((G)=>{if(G instanceof RegExp)for(let H of G.flags.split(""))Q.add(H);return typeof G==="string"?ja(G):G===W3?W3:G._src});z.forEach((G,H)=>{let U=z[H+1],M=z[H-1];if(G!==W3||M===W3)return;if(M===void 0)if(U!==void 0&&U!==W3)z[H+1]="(?:\\/|"+J+"\\/)?"+U;else z[H]=J;else if(U===void 0)z[H-1]=M+"(?:\\/|\\/"+J+")?";else if(U!==W3)z[H-1]=M+"(?:\\/|\\/"+J+"\\/)"+U,z[H+1]=W3});let W=z.filter((G)=>G!==W3);if(this.partial&&W.length>=1){let G=[];for(let H=1;H<=W.length;H++)G.push(W.slice(0,H).join("/"));return"(?:"+G.join("|")+")"}return W.join("/")}).join("|"),[q,$]=x.length>1?["(?:",")"]:["",""];if(X="^"+q+X+$+"$",this.partial)X="^(?:\\/|"+q+X.slice(1,-1)+$+")$";if(this.negate)X="^(?!"+X+").+$";try{this.regexp=new RegExp(X,[...Q].join(""))}catch(Y){this.regexp=!1}return this.regexp}slashSplit(x){if(this.preserveMultipleSlashes)return x.split("/");else if(this.isWindows&&/^\/\/[^\/]+/.test(x))return["",...x.split(/\/+/)];else return x.split(/\/+/)}match(x,Z=this.partial){if(this.debug("match",x,this.pattern),this.comment)return!1;if(this.empty)return x==="";if(x==="/"&&Z)return!0;let J=this.options;if(this.isWindows)x=x.split("\\").join("/");let Q=this.slashSplit(x);this.debug(this.pattern,"split",Q);let X=this.set;this.debug(this.pattern,"set",X);let q=Q[Q.length-1];if(!q)for(let $=Q.length-2;!q&&$>=0;$--)q=Q[$];for(let $=0;$<X.length;$++){let Y=X[$],z=Q;if(J.matchBase&&Y.length===1)z=[q];if(this.matchOne(z,Y,Z)){if(J.flipNegate)return!0;return!this.negate}}if(J.flipNegate)return!1;return this.negate}static defaults(x){return c3.defaults(x).Minimatch}}c3.AST=z3;c3.Minimatch=d4;c3.escape=O9;c3.unescape=D8;import{fileURLToPath as Qr}from"node:url";var Ca=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date,RF=new Set,mz=typeof process==="object"&&!!process?process:{},IF=(x,Z,J,Q)=>{typeof mz.emitWarning==="function"?mz.emitWarning(x,Z,J,Q):console.error(`[${J}] ${Z}: ${x}`)},kX=globalThis.AbortController,SF=globalThis.AbortSignal;if(typeof kX==="undefined"){SF=class J{onabort;_onabort=[];reason;aborted=!1;addEventListener(Q,X){this._onabort.push(X)}},kX=class J{constructor(){Z()}signal=new SF;abort(Q){if(this.signal.aborted)return;this.signal.reason=Q,this.signal.aborted=!0;for(let X of this.signal._onabort)X(Q);this.signal.onabort?.(Q)}};let x=mz.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",Z=()=>{if(!x)return;x=!1,IF("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",Z)}}var ma=(x)=>!RF.has(x),gT0=Symbol("type"),V5=(x)=>x&&x===Math.floor(x)&&x>0&&isFinite(x),TF=(x)=>!V5(x)?null:x<=Math.pow(2,8)?Uint8Array:x<=Math.pow(2,16)?Uint16Array:x<=Math.pow(2,32)?Uint32Array:x<=Number.MAX_SAFE_INTEGER?wZ:null;class wZ extends Array{constructor(x){super(x);this.fill(0)}}class S9{heap;length;static#x=!1;static create(x){let Z=TF(x);if(!Z)return[];S9.#x=!0;let J=new S9(x,Z);return S9.#x=!1,J}constructor(x,Z){if(!S9.#x)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new Z(x),this.length=0}push(x){this.heap[this.length++]=x}pop(){return this.heap[--this.length]}}class H7{#x;#J;#q;#X;#$;#w;#D;#W;get perf(){return this.#W}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#Y;#G;#V;#K;#Q;#H;#P;#F;#U;#S;#B;#j;#C;#M;#N;#_;#m;#Z;#E;static unsafeExposeInternals(x){return{starts:x.#C,ttls:x.#M,autopurgeTimers:x.#N,sizes:x.#j,keyMap:x.#V,keyList:x.#K,valList:x.#Q,next:x.#H,prev:x.#P,get head(){return x.#F},get tail(){return x.#U},free:x.#S,isBackgroundFetch:(Z)=>x.#z(Z),backgroundFetch:(Z,J,Q,X)=>x.#h(Z,J,Q,X),moveToTail:(Z)=>x.#k(Z),indexes:(Z)=>x.#I(Z),rindexes:(Z)=>x.#T(Z),isStale:(Z)=>x.#L(Z)}}get max(){return this.#x}get maxSize(){return this.#J}get calculatedSize(){return this.#G}get size(){return this.#Y}get fetchMethod(){return this.#w}get memoMethod(){return this.#D}get dispose(){return this.#q}get onInsert(){return this.#X}get disposeAfter(){return this.#$}constructor(x){let{max:Z=0,ttl:J,ttlResolution:Q=1,ttlAutopurge:X,updateAgeOnGet:q,updateAgeOnHas:$,allowStale:Y,dispose:z,onInsert:W,disposeAfter:G,noDisposeOnSet:H,noUpdateTTL:U,maxSize:M=0,maxEntrySize:D=0,sizeCalculation:F,fetchMethod:_,memoMethod:L,noDeleteOnFetchRejection:O,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:h,ignoreFetchAbort:r,perf:e}=x;if(e!==void 0){if(typeof e?.now!=="function")throw new TypeError("perf option must have a now() method if specified")}if(this.#W=e??Ca,Z!==0&&!V5(Z))throw new TypeError("max option must be a nonnegative integer");let C=Z?TF(Z):Array;if(!C)throw new Error("invalid max value: "+Z);if(this.#x=Z,this.#J=M,this.maxEntrySize=D||this.#J,this.sizeCalculation=F,this.sizeCalculation){if(!this.#J&&!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(L!==void 0&&typeof L!=="function")throw new TypeError("memoMethod must be a function if defined");if(this.#D=L,_!==void 0&&typeof _!=="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#w=_,this.#m=!!_,this.#V=new Map,this.#K=new Array(Z).fill(void 0),this.#Q=new Array(Z).fill(void 0),this.#H=new C(Z),this.#P=new C(Z),this.#F=0,this.#U=0,this.#S=S9.create(Z),this.#Y=0,this.#G=0,typeof z==="function")this.#q=z;if(typeof W==="function")this.#X=W;if(typeof G==="function")this.#$=G,this.#B=[];else this.#$=void 0,this.#B=void 0;if(this.#_=!!this.#q,this.#E=!!this.#X,this.#Z=!!this.#$,this.noDisposeOnSet=!!H,this.noUpdateTTL=!!U,this.noDeleteOnFetchRejection=!!O,this.allowStaleOnFetchRejection=!!u,this.allowStaleOnFetchAbort=!!h,this.ignoreFetchAbort=!!r,this.maxEntrySize!==0){if(this.#J!==0){if(!V5(this.#J))throw new TypeError("maxSize must be a positive integer if specified")}if(!V5(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#i()}if(this.allowStale=!!Y,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!q,this.updateAgeOnHas=!!$,this.ttlResolution=V5(Q)||Q===0?Q:1,this.ttlAutopurge=!!X,this.ttl=J||0,this.ttl){if(!V5(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#v()}if(this.#x===0&&this.ttl===0&&this.#J===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#x&&!this.#J){if(ma("LRU_CACHE_UNBOUNDED"))RF.add("LRU_CACHE_UNBOUNDED"),IF("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning","LRU_CACHE_UNBOUNDED",H7)}}getRemainingTTL(x){return this.#V.has(x)?1/0:0}#v(){let x=new wZ(this.#x),Z=new wZ(this.#x);this.#M=x,this.#C=Z;let J=this.ttlAutopurge?new Array(this.#x):void 0;this.#N=J,this.#b=(q,$,Y=this.#W.now())=>{if(Z[q]=$!==0?Y:0,x[q]=$,J?.[q])clearTimeout(J[q]),J[q]=void 0;if($!==0&&J){let z=setTimeout(()=>{if(this.#L(q))this.#R(this.#K[q],"expire")},$+1);if(z.unref)z.unref();J[q]=z}},this.#O=(q)=>{Z[q]=x[q]!==0?this.#W.now():0},this.#A=(q,$)=>{if(x[$]){let Y=x[$],z=Z[$];if(!Y||!z)return;q.ttl=Y,q.start=z,q.now=Q||X();let W=q.now-z;q.remainingTTL=Y-W}};let Q=0,X=()=>{let q=this.#W.now();if(this.ttlResolution>0){Q=q;let $=setTimeout(()=>Q=0,this.ttlResolution);if($.unref)$.unref()}return q};this.getRemainingTTL=(q)=>{let $=this.#V.get(q);if($===void 0)return 0;let Y=x[$],z=Z[$];if(!Y||!z)return 1/0;let W=(Q||X())-z;return Y-W},this.#L=(q)=>{let $=Z[q],Y=x[q];return!!Y&&!!$&&(Q||X())-$>Y}}#O=()=>{};#A=()=>{};#b=()=>{};#L=()=>!1;#i(){let x=new wZ(this.#x);this.#G=0,this.#j=x,this.#c=(Z)=>{this.#G-=x[Z],x[Z]=0},this.#p=(Z,J,Q,X)=>{if(this.#z(J))return 0;if(!V5(Q))if(X){if(typeof X!=="function")throw new TypeError("sizeCalculation must be a function");if(Q=X(J,Z),!V5(Q))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 Q},this.#f=(Z,J,Q)=>{if(x[Z]=J,this.#J){let X=this.#J-x[Z];while(this.#G>X)this.#u(!0)}if(this.#G+=x[Z],Q)Q.entrySize=J,Q.totalCalculatedSize=this.#G}}#c=(x)=>{};#f=(x,Z,J)=>{};#p=(x,Z,J,Q)=>{if(J||Q)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#I({allowStale:x=this.allowStale}={}){if(this.#Y)for(let Z=this.#U;;){if(!this.#y(Z))break;if(x||!this.#L(Z))yield Z;if(Z===this.#F)break;else Z=this.#P[Z]}}*#T({allowStale:x=this.allowStale}={}){if(this.#Y)for(let Z=this.#F;;){if(!this.#y(Z))break;if(x||!this.#L(Z))yield Z;if(Z===this.#U)break;else Z=this.#H[Z]}}#y(x){return x!==void 0&&this.#V.get(this.#K[x])===x}*entries(){for(let x of this.#I())if(this.#Q[x]!==void 0&&this.#K[x]!==void 0&&!this.#z(this.#Q[x]))yield[this.#K[x],this.#Q[x]]}*rentries(){for(let x of this.#T())if(this.#Q[x]!==void 0&&this.#K[x]!==void 0&&!this.#z(this.#Q[x]))yield[this.#K[x],this.#Q[x]]}*keys(){for(let x of this.#I()){let Z=this.#K[x];if(Z!==void 0&&!this.#z(this.#Q[x]))yield Z}}*rkeys(){for(let x of this.#T()){let Z=this.#K[x];if(Z!==void 0&&!this.#z(this.#Q[x]))yield Z}}*values(){for(let x of this.#I())if(this.#Q[x]!==void 0&&!this.#z(this.#Q[x]))yield this.#Q[x]}*rvalues(){for(let x of this.#T())if(this.#Q[x]!==void 0&&!this.#z(this.#Q[x]))yield this.#Q[x]}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(x,Z={}){for(let J of this.#I()){let Q=this.#Q[J],X=this.#z(Q)?Q.__staleWhileFetching:Q;if(X===void 0)continue;if(x(X,this.#K[J],this))return this.get(this.#K[J],Z)}}forEach(x,Z=this){for(let J of this.#I()){let Q=this.#Q[J],X=this.#z(Q)?Q.__staleWhileFetching:Q;if(X===void 0)continue;x.call(Z,X,this.#K[J],this)}}rforEach(x,Z=this){for(let J of this.#T()){let Q=this.#Q[J],X=this.#z(Q)?Q.__staleWhileFetching:Q;if(X===void 0)continue;x.call(Z,X,this.#K[J],this)}}purgeStale(){let x=!1;for(let Z of this.#T({allowStale:!0}))if(this.#L(Z))this.#R(this.#K[Z],"expire"),x=!0;return x}info(x){let Z=this.#V.get(x);if(Z===void 0)return;let J=this.#Q[Z],Q=this.#z(J)?J.__staleWhileFetching:J;if(Q===void 0)return;let X={value:Q};if(this.#M&&this.#C){let q=this.#M[Z],$=this.#C[Z];if(q&&$){let Y=q-(this.#W.now()-$);X.ttl=Y,X.start=Date.now()}}if(this.#j)X.size=this.#j[Z];return X}dump(){let x=[];for(let Z of this.#I({allowStale:!0})){let J=this.#K[Z],Q=this.#Q[Z],X=this.#z(Q)?Q.__staleWhileFetching:Q;if(X===void 0||J===void 0)continue;let q={value:X};if(this.#M&&this.#C){q.ttl=this.#M[Z];let $=this.#W.now()-this.#C[Z];q.start=Math.floor(Date.now()-$)}if(this.#j)q.size=this.#j[Z];x.unshift([J,q])}return x}load(x){this.clear();for(let[Z,J]of x){if(J.start){let Q=Date.now()-J.start;J.start=this.#W.now()-Q}this.set(Z,J.value,J)}}set(x,Z,J={}){if(Z===void 0)return this.delete(x),this;let{ttl:Q=this.ttl,start:X,noDisposeOnSet:q=this.noDisposeOnSet,sizeCalculation:$=this.sizeCalculation,status:Y}=J,{noUpdateTTL:z=this.noUpdateTTL}=J,W=this.#p(x,Z,J.size||0,$);if(this.maxEntrySize&&W>this.maxEntrySize){if(Y)Y.set="miss",Y.maxEntrySizeExceeded=!0;return this.#R(x,"set"),this}let G=this.#Y===0?void 0:this.#V.get(x);if(G===void 0){if(G=this.#Y===0?this.#U:this.#S.length!==0?this.#S.pop():this.#Y===this.#x?this.#u(!1):this.#Y,this.#K[G]=x,this.#Q[G]=Z,this.#V.set(x,G),this.#H[this.#U]=G,this.#P[G]=this.#U,this.#U=G,this.#Y++,this.#f(G,W,Y),Y)Y.set="add";if(z=!1,this.#E)this.#X?.(Z,x,"add")}else{this.#k(G);let H=this.#Q[G];if(Z!==H){if(this.#m&&this.#z(H)){H.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:U}=H;if(U!==void 0&&!q){if(this.#_)this.#q?.(U,x,"set");if(this.#Z)this.#B?.push([U,x,"set"])}}else if(!q){if(this.#_)this.#q?.(H,x,"set");if(this.#Z)this.#B?.push([H,x,"set"])}if(this.#c(G),this.#f(G,W,Y),this.#Q[G]=Z,Y){Y.set="replace";let U=H&&this.#z(H)?H.__staleWhileFetching:H;if(U!==void 0)Y.oldValue=U}}else if(Y)Y.set="update";if(this.#E)this.onInsert?.(Z,x,Z===H?"update":"replace")}if(Q!==0&&!this.#M)this.#v();if(this.#M){if(!z)this.#b(G,Q,X);if(Y)this.#A(Y,G)}if(!q&&this.#Z&&this.#B){let H=this.#B,U;while(U=H?.shift())this.#$?.(...U)}return this}pop(){try{while(this.#Y){let x=this.#Q[this.#F];if(this.#u(!0),this.#z(x)){if(x.__staleWhileFetching)return x.__staleWhileFetching}else if(x!==void 0)return x}}finally{if(this.#Z&&this.#B){let x=this.#B,Z;while(Z=x?.shift())this.#$?.(...Z)}}}#u(x){let Z=this.#F,J=this.#K[Z],Q=this.#Q[Z];if(this.#m&&this.#z(Q))Q.__abortController.abort(new Error("evicted"));else if(this.#_||this.#Z){if(this.#_)this.#q?.(Q,J,"evict");if(this.#Z)this.#B?.push([Q,J,"evict"])}if(this.#c(Z),this.#N?.[Z])clearTimeout(this.#N[Z]),this.#N[Z]=void 0;if(x)this.#K[Z]=void 0,this.#Q[Z]=void 0,this.#S.push(Z);if(this.#Y===1)this.#F=this.#U=0,this.#S.length=0;else this.#F=this.#H[Z];return this.#V.delete(J),this.#Y--,Z}has(x,Z={}){let{updateAgeOnHas:J=this.updateAgeOnHas,status:Q}=Z,X=this.#V.get(x);if(X!==void 0){let q=this.#Q[X];if(this.#z(q)&&q.__staleWhileFetching===void 0)return!1;if(!this.#L(X)){if(J)this.#O(X);if(Q)Q.has="hit",this.#A(Q,X);return!0}else if(Q)Q.has="stale",this.#A(Q,X)}else if(Q)Q.has="miss";return!1}peek(x,Z={}){let{allowStale:J=this.allowStale}=Z,Q=this.#V.get(x);if(Q===void 0||!J&&this.#L(Q))return;let X=this.#Q[Q];return this.#z(X)?X.__staleWhileFetching:X}#h(x,Z,J,Q){let X=Z===void 0?void 0:this.#Q[Z];if(this.#z(X))return X;let q=new kX,{signal:$}=J;$?.addEventListener("abort",()=>q.abort($.reason),{signal:q.signal});let Y={signal:q.signal,options:J,context:Q},z=(D,F=!1)=>{let{aborted:_}=q.signal,L=J.ignoreFetchAbort&&D!==void 0;if(J.status)if(_&&!F){if(J.status.fetchAborted=!0,J.status.fetchError=q.signal.reason,L)J.status.fetchAbortIgnored=!0}else J.status.fetchResolved=!0;if(_&&!L&&!F)return G(q.signal.reason);let O=U,v=this.#Q[Z];if(v===U||L&&F&&v===void 0)if(D===void 0)if(O.__staleWhileFetching!==void 0)this.#Q[Z]=O.__staleWhileFetching;else this.#R(x,"fetch");else{if(J.status)J.status.fetchUpdated=!0;this.set(x,D,Y.options)}return D},W=(D)=>{if(J.status)J.status.fetchRejected=!0,J.status.fetchError=D;return G(D)},G=(D)=>{let{aborted:F}=q.signal,_=F&&J.allowStaleOnFetchAbort,L=_||J.allowStaleOnFetchRejection,O=L||J.noDeleteOnFetchRejection,v=U;if(this.#Q[Z]===U){if(!O||v.__staleWhileFetching===void 0)this.#R(x,"fetch");else if(!_)this.#Q[Z]=v.__staleWhileFetching}if(L){if(J.status&&v.__staleWhileFetching!==void 0)J.status.returnedStale=!0;return v.__staleWhileFetching}else if(v.__returned===v)throw D},H=(D,F)=>{let _=this.#w?.(x,X,Y);if(_&&_ instanceof Promise)_.then((L)=>D(L===void 0?void 0:L),F);q.signal.addEventListener("abort",()=>{if(!J.ignoreFetchAbort||J.allowStaleOnFetchAbort){if(D(void 0),J.allowStaleOnFetchAbort)D=(L)=>z(L,!0)}})};if(J.status)J.status.fetchDispatched=!0;let U=new Promise(H).then(z,W),M=Object.assign(U,{__abortController:q,__staleWhileFetching:X,__returned:void 0});if(Z===void 0)this.set(x,M,{...Y.options,status:void 0}),Z=this.#V.get(x);else this.#Q[Z]=M;return M}#z(x){if(!this.#m)return!1;let Z=x;return!!Z&&Z instanceof Promise&&Z.hasOwnProperty("__staleWhileFetching")&&Z.__abortController instanceof kX}async fetch(x,Z={}){let{allowStale:J=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,ttl:q=this.ttl,noDisposeOnSet:$=this.noDisposeOnSet,size:Y=0,sizeCalculation:z=this.sizeCalculation,noUpdateTTL:W=this.noUpdateTTL,noDeleteOnFetchRejection:G=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:H=this.allowStaleOnFetchRejection,ignoreFetchAbort:U=this.ignoreFetchAbort,allowStaleOnFetchAbort:M=this.allowStaleOnFetchAbort,context:D,forceRefresh:F=!1,status:_,signal:L}=Z;if(!this.#m){if(_)_.fetch="get";return this.get(x,{allowStale:J,updateAgeOnGet:Q,noDeleteOnStaleGet:X,status:_})}let O={allowStale:J,updateAgeOnGet:Q,noDeleteOnStaleGet:X,ttl:q,noDisposeOnSet:$,size:Y,sizeCalculation:z,noUpdateTTL:W,noDeleteOnFetchRejection:G,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:M,ignoreFetchAbort:U,status:_,signal:L},v=this.#V.get(x);if(v===void 0){if(_)_.fetch="miss";let u=this.#h(x,v,O,D);return u.__returned=u}else{let u=this.#Q[v];if(this.#z(u)){let I=J&&u.__staleWhileFetching!==void 0;if(_){if(_.fetch="inflight",I)_.returnedStale=!0}return I?u.__staleWhileFetching:u.__returned=u}let h=this.#L(v);if(!F&&!h){if(_)_.fetch="hit";if(this.#k(v),Q)this.#O(v);if(_)this.#A(_,v);return u}let r=this.#h(x,v,O,D),C=r.__staleWhileFetching!==void 0&&J;if(_){if(_.fetch=h?"stale":"refresh",C&&h)_.returnedStale=!0}return C?r.__staleWhileFetching:r.__returned=r}}async forceFetch(x,Z={}){let J=await this.fetch(x,Z);if(J===void 0)throw new Error("fetch() returned undefined");return J}memo(x,Z={}){let J=this.#D;if(!J)throw new Error("no memoMethod provided to constructor");let{context:Q,forceRefresh:X,...q}=Z,$=this.get(x,q);if(!X&&$!==void 0)return $;let Y=J(x,$,{options:q,context:Q});return this.set(x,Y,q),Y}get(x,Z={}){let{allowStale:J=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:X=this.noDeleteOnStaleGet,status:q}=Z,$=this.#V.get(x);if($!==void 0){let Y=this.#Q[$],z=this.#z(Y);if(q)this.#A(q,$);if(this.#L($)){if(q)q.get="stale";if(!z){if(!X)this.#R(x,"expire");if(q&&J)q.returnedStale=!0;return J?Y:void 0}else{if(q&&J&&Y.__staleWhileFetching!==void 0)q.returnedStale=!0;return J?Y.__staleWhileFetching:void 0}}else{if(q)q.get="hit";if(z)return Y.__staleWhileFetching;if(this.#k($),Q)this.#O($);return Y}}else if(q)q.get="miss"}#g(x,Z){this.#P[Z]=x,this.#H[x]=Z}#k(x){if(x!==this.#U){if(x===this.#F)this.#F=this.#H[x];else this.#g(this.#P[x],this.#H[x]);this.#g(this.#U,x),this.#U=x}}delete(x){return this.#R(x,"delete")}#R(x,Z){let J=!1;if(this.#Y!==0){let Q=this.#V.get(x);if(Q!==void 0){if(this.#N?.[Q])clearTimeout(this.#N?.[Q]),this.#N[Q]=void 0;if(J=!0,this.#Y===1)this.#d(Z);else{this.#c(Q);let X=this.#Q[Q];if(this.#z(X))X.__abortController.abort(new Error("deleted"));else if(this.#_||this.#Z){if(this.#_)this.#q?.(X,x,Z);if(this.#Z)this.#B?.push([X,x,Z])}if(this.#V.delete(x),this.#K[Q]=void 0,this.#Q[Q]=void 0,Q===this.#U)this.#U=this.#P[Q];else if(Q===this.#F)this.#F=this.#H[Q];else{let q=this.#P[Q];this.#H[q]=this.#H[Q];let $=this.#H[Q];this.#P[$]=this.#P[Q]}this.#Y--,this.#S.push(Q)}}}if(this.#Z&&this.#B?.length){let Q=this.#B,X;while(X=Q?.shift())this.#$?.(...X)}return J}clear(){return this.#d("delete")}#d(x){for(let Z of this.#T({allowStale:!0})){let J=this.#Q[Z];if(this.#z(J))J.__abortController.abort(new Error("deleted"));else{let Q=this.#K[Z];if(this.#_)this.#q?.(J,Q,x);if(this.#Z)this.#B?.push([J,Q,x])}}if(this.#V.clear(),this.#Q.fill(void 0),this.#K.fill(void 0),this.#M&&this.#C){this.#M.fill(0),this.#C.fill(0);for(let Z of this.#N??[])if(Z!==void 0)clearTimeout(Z);this.#N?.fill(void 0)}if(this.#j)this.#j.fill(0);if(this.#F=0,this.#U=0,this.#S.length=0,this.#G=0,this.#Y=0,this.#Z&&this.#B){let Z=this.#B,J;while(J=Z?.shift())this.#$?.(...J)}}}import{posix as ca,win32 as kz}from"node:path";import{fileURLToPath as ba}from"node:url";import{lstatSync as pa,readdir as ya,readdirSync as ua,readlinkSync as ha,realpathSync as ga}from"fs";import*as ia from"node:fs";import{lstat as la,readdir as oa,readlink as sa,realpath as na}from"node:fs/promises";import{EventEmitter as vz}from"node:events";import kF from"node:stream";import{StringDecoder as Oa}from"node:string_decoder";var vF=typeof process==="object"&&process?process:{stdout:null,stderr:null},Sa=(x)=>!!x&&typeof x==="object"&&(x instanceof B7||x instanceof kF||Ra(x)||Ia(x)),Ra=(x)=>!!x&&typeof x==="object"&&x instanceof vz&&typeof x.pipe==="function"&&x.pipe!==kF.Writable.prototype.pipe,Ia=(x)=>!!x&&typeof x==="object"&&x instanceof vz&&typeof x.write==="function"&&typeof x.end==="function",S6=Symbol("EOF"),R6=Symbol("maybeEmitEnd"),G5=Symbol("emittedEnd"),cX=Symbol("emittingEnd"),PZ=Symbol("emittedError"),bX=Symbol("closed"),AF=Symbol("read"),pX=Symbol("flush"),EF=Symbol("flushChunk"),N8=Symbol("encoding"),R9=Symbol("decoder"),t2=Symbol("flowing"),_Z=Symbol("paused"),I9=Symbol("resume"),e2=Symbol("buffer"),b3=Symbol("pipes"),x3=Symbol("bufferLength"),Oz=Symbol("bufferPush"),yX=Symbol("bufferShift"),L3=Symbol("objectMode"),m2=Symbol("destroyed"),Sz=Symbol("error"),Rz=Symbol("emitData"),fF=Symbol("emitEnd"),Iz=Symbol("emitEnd2"),h8=Symbol("async"),Tz=Symbol("abort"),uX=Symbol("aborted"),LZ=Symbol("signal"),U7=Symbol("dataListeners"),_4=Symbol("discarded"),jZ=(x)=>Promise.resolve().then(x),Ta=(x)=>x(),va=(x)=>x==="end"||x==="finish"||x==="prefinish",Aa=(x)=>x instanceof ArrayBuffer||!!x&&typeof x==="object"&&x.constructor&&x.constructor.name==="ArrayBuffer"&&x.byteLength>=0,Ea=(x)=>!Buffer.isBuffer(x)&&ArrayBuffer.isView(x);class Az{src;dest;opts;ondrain;constructor(x,Z,J){this.src=x,this.dest=Z,this.opts=J,this.ondrain=()=>x[I9](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(x){}end(){if(this.unpipe(),this.opts.end)this.dest.end()}}class cF extends Az{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(x,Z,J){super(x,Z,J);this.proxyErrors=(Q)=>Z.emit("error",Q),x.on("error",this.proxyErrors)}}var fa=(x)=>!!x.objectMode,ka=(x)=>!x.objectMode&&!!x.encoding&&x.encoding!=="buffer";class B7 extends vz{[t2]=!1;[_Z]=!1;[b3]=[];[e2]=[];[L3];[N8];[h8];[R9];[S6]=!1;[G5]=!1;[cX]=!1;[bX]=!1;[PZ]=null;[x3]=0;[m2]=!1;[LZ];[uX]=!1;[U7]=0;[_4]=!1;writable=!0;readable=!0;constructor(...x){let Z=x[0]||{};super();if(Z.objectMode&&typeof Z.encoding==="string")throw new TypeError("Encoding and objectMode may not be used together");if(fa(Z))this[L3]=!0,this[N8]=null;else if(ka(Z))this[N8]=Z.encoding,this[L3]=!1;else this[L3]=!1,this[N8]=null;if(this[h8]=!!Z.async,this[R9]=this[N8]?new Oa(this[N8]):null,Z&&Z.debugExposeBuffer===!0)Object.defineProperty(this,"buffer",{get:()=>this[e2]});if(Z&&Z.debugExposePipes===!0)Object.defineProperty(this,"pipes",{get:()=>this[b3]});let{signal:J}=Z;if(J)if(this[LZ]=J,J.aborted)this[Tz]();else J.addEventListener("abort",()=>this[Tz]())}get bufferLength(){return this[x3]}get encoding(){return this[N8]}set encoding(x){throw new Error("Encoding must be set at instantiation time")}setEncoding(x){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[L3]}set objectMode(x){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[h8]}set["async"](x){this[h8]=this[h8]||!!x}[Tz](){this[uX]=!0,this.emit("abort",this[LZ]?.reason),this.destroy(this[LZ]?.reason)}get aborted(){return this[uX]}set aborted(x){}write(x,Z,J){if(this[uX])return!1;if(this[S6])throw new Error("write after end");if(this[m2])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;if(typeof Z==="function")J=Z,Z="utf8";if(!Z)Z="utf8";let Q=this[h8]?jZ:Ta;if(!this[L3]&&!Buffer.isBuffer(x)){if(Ea(x))x=Buffer.from(x.buffer,x.byteOffset,x.byteLength);else if(Aa(x))x=Buffer.from(x);else if(typeof x!=="string")throw new Error("Non-contiguous data written to non-objectMode stream")}if(this[L3]){if(this[t2]&&this[x3]!==0)this[pX](!0);if(this[t2])this.emit("data",x);else this[Oz](x);if(this[x3]!==0)this.emit("readable");if(J)Q(J);return this[t2]}if(!x.length){if(this[x3]!==0)this.emit("readable");if(J)Q(J);return this[t2]}if(typeof x==="string"&&!(Z===this[N8]&&!this[R9]?.lastNeed))x=Buffer.from(x,Z);if(Buffer.isBuffer(x)&&this[N8])x=this[R9].write(x);if(this[t2]&&this[x3]!==0)this[pX](!0);if(this[t2])this.emit("data",x);else this[Oz](x);if(this[x3]!==0)this.emit("readable");if(J)Q(J);return this[t2]}read(x){if(this[m2])return null;if(this[_4]=!1,this[x3]===0||x===0||x&&x>this[x3])return this[R6](),null;if(this[L3])x=null;if(this[e2].length>1&&!this[L3])this[e2]=[this[N8]?this[e2].join(""):Buffer.concat(this[e2],this[x3])];let Z=this[AF](x||null,this[e2][0]);return this[R6](),Z}[AF](x,Z){if(this[L3])this[yX]();else{let J=Z;if(x===J.length||x===null)this[yX]();else if(typeof J==="string")this[e2][0]=J.slice(x),Z=J.slice(0,x),this[x3]-=x;else this[e2][0]=J.subarray(x),Z=J.subarray(0,x),this[x3]-=x}if(this.emit("data",Z),!this[e2].length&&!this[S6])this.emit("drain");return Z}end(x,Z,J){if(typeof x==="function")J=x,x=void 0;if(typeof Z==="function")J=Z,Z="utf8";if(x!==void 0)this.write(x,Z);if(J)this.once("end",J);if(this[S6]=!0,this.writable=!1,this[t2]||!this[_Z])this[R6]();return this}[I9](){if(this[m2])return;if(!this[U7]&&!this[b3].length)this[_4]=!0;if(this[_Z]=!1,this[t2]=!0,this.emit("resume"),this[e2].length)this[pX]();else if(this[S6])this[R6]();else this.emit("drain")}resume(){return this[I9]()}pause(){this[t2]=!1,this[_Z]=!0,this[_4]=!1}get destroyed(){return this[m2]}get flowing(){return this[t2]}get paused(){return this[_Z]}[Oz](x){if(this[L3])this[x3]+=1;else this[x3]+=x.length;this[e2].push(x)}[yX](){if(this[L3])this[x3]-=1;else this[x3]-=this[e2][0].length;return this[e2].shift()}[pX](x=!1){do;while(this[EF](this[yX]())&&this[e2].length);if(!x&&!this[e2].length&&!this[S6])this.emit("drain")}[EF](x){return this.emit("data",x),this[t2]}pipe(x,Z){if(this[m2])return x;this[_4]=!1;let J=this[G5];if(Z=Z||{},x===vF.stdout||x===vF.stderr)Z.end=!1;else Z.end=Z.end!==!1;if(Z.proxyErrors=!!Z.proxyErrors,J){if(Z.end)x.end()}else if(this[b3].push(!Z.proxyErrors?new Az(this,x,Z):new cF(this,x,Z)),this[h8])jZ(()=>this[I9]());else this[I9]();return x}unpipe(x){let Z=this[b3].find((J)=>J.dest===x);if(Z){if(this[b3].length===1){if(this[t2]&&this[U7]===0)this[t2]=!1;this[b3]=[]}else this[b3].splice(this[b3].indexOf(Z),1);Z.unpipe()}}addListener(x,Z){return this.on(x,Z)}on(x,Z){let J=super.on(x,Z);if(x==="data"){if(this[_4]=!1,this[U7]++,!this[b3].length&&!this[t2])this[I9]()}else if(x==="readable"&&this[x3]!==0)super.emit("readable");else if(va(x)&&this[G5])super.emit(x),this.removeAllListeners(x);else if(x==="error"&&this[PZ]){let Q=Z;if(this[h8])jZ(()=>Q.call(this,this[PZ]));else Q.call(this,this[PZ])}return J}removeListener(x,Z){return this.off(x,Z)}off(x,Z){let J=super.off(x,Z);if(x==="data"){if(this[U7]=this.listeners("data").length,this[U7]===0&&!this[_4]&&!this[b3].length)this[t2]=!1}return J}removeAllListeners(x){let Z=super.removeAllListeners(x);if(x==="data"||x===void 0){if(this[U7]=0,!this[_4]&&!this[b3].length)this[t2]=!1}return Z}get emittedEnd(){return this[G5]}[R6](){if(!this[cX]&&!this[G5]&&!this[m2]&&this[e2].length===0&&this[S6]){if(this[cX]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[bX])this.emit("close");this[cX]=!1}}emit(x,...Z){let J=Z[0];if(x!=="error"&&x!=="close"&&x!==m2&&this[m2])return!1;else if(x==="data")return!this[L3]&&!J?!1:this[h8]?(jZ(()=>this[Rz](J)),!0):this[Rz](J);else if(x==="end")return this[fF]();else if(x==="close"){if(this[bX]=!0,!this[G5]&&!this[m2])return!1;let X=super.emit("close");return this.removeAllListeners("close"),X}else if(x==="error"){this[PZ]=J,super.emit(Sz,J);let X=!this[LZ]||this.listeners("error").length?super.emit("error",J):!1;return this[R6](),X}else if(x==="resume"){let X=super.emit("resume");return this[R6](),X}else if(x==="finish"||x==="prefinish"){let X=super.emit(x);return this.removeAllListeners(x),X}let Q=super.emit(x,...Z);return this[R6](),Q}[Rz](x){for(let J of this[b3])if(J.dest.write(x)===!1)this.pause();let Z=this[_4]?!1:super.emit("data",x);return this[R6](),Z}[fF](){if(this[G5])return!1;return this[G5]=!0,this.readable=!1,this[h8]?(jZ(()=>this[Iz]()),!0):this[Iz]()}[Iz](){if(this[R9]){let Z=this[R9].end();if(Z){for(let J of this[b3])J.dest.write(Z);if(!this[_4])super.emit("data",Z)}}for(let Z of this[b3])Z.end();let x=super.emit("end");return this.removeAllListeners("end"),x}async collect(){let x=Object.assign([],{dataLength:0});if(!this[L3])x.dataLength=0;let Z=this.promise();return this.on("data",(J)=>{if(x.push(J),!this[L3])x.dataLength+=J.length}),await Z,x}async concat(){if(this[L3])throw new Error("cannot concat in objectMode");let x=await this.collect();return this[N8]?x.join(""):Buffer.concat(x,x.dataLength)}async promise(){return new Promise((x,Z)=>{this.on(m2,()=>Z(new Error("stream destroyed"))),this.on("error",(J)=>Z(J)),this.on("end",()=>x())})}[Symbol.asyncIterator](){this[_4]=!1;let x=!1,Z=async()=>{return this.pause(),x=!0,{value:void 0,done:!0}};return{next:()=>{if(x)return Z();let Q=this.read();if(Q!==null)return Promise.resolve({done:!1,value:Q});if(this[S6])return Z();let X,q,$=(G)=>{this.off("data",Y),this.off("end",z),this.off(m2,W),Z(),q(G)},Y=(G)=>{this.off("error",$),this.off("end",z),this.off(m2,W),this.pause(),X({value:G,done:!!this[S6]})},z=()=>{this.off("error",$),this.off("data",Y),this.off(m2,W),Z(),X({done:!0,value:void 0})},W=()=>$(new Error("stream destroyed"));return new Promise((G,H)=>{q=H,X=G,this.once(m2,W),this.once("error",$),this.once("end",z),this.once("data",Y)})},throw:Z,return:Z,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[_4]=!1;let x=!1,Z=()=>{return this.pause(),this.off(Sz,Z),this.off(m2,Z),this.off("end",Z),x=!0,{done:!0,value:void 0}},J=()=>{if(x)return Z();let Q=this.read();return Q===null?Z():{done:!1,value:Q}};return this.once("end",Z),this.once(Sz,Z),this.once(m2,Z),{next:J,throw:Z,return:Z,[Symbol.iterator](){return this}}}destroy(x){if(this[m2]){if(x)this.emit("error",x);else this.emit(m2);return this}this[m2]=!0,this[_4]=!0,this[e2].length=0,this[x3]=0;let Z=this;if(typeof Z.close==="function"&&!this[bX])Z.close();if(x)this.emit("error",x);else this.emit(m2);return this}static get isStream(){return Sa}}var da=ga.native,mZ={lstatSync:pa,readdir:ya,readdirSync:ua,readlinkSync:ha,realpathSync:da,promises:{lstat:la,readdir:oa,readlink:sa,realpath:na}},hF=(x)=>!x||x===mZ||x===ia?mZ:{...mZ,...x,promises:{...mZ.promises,...x.promises||{}}},gF=/^\\\\\?\\([a-z]:)\\?$/i,aa=(x)=>x.replace(/\//g,"\\").replace(gF,"$1\\"),ra=/[\\\/]/,o4=0,iF=1,dF=2,g8=4,lF=6,oF=8,M7=10,sF=12,l4=15,CZ=~l4,Ez=16,bF=32,OZ=64,F8=128,hX=256,iX=512,pF=OZ|F8|iX,ta=1023,fz=(x)=>x.isFile()?oF:x.isDirectory()?g8:x.isSymbolicLink()?M7:x.isCharacterDevice()?dF:x.isBlockDevice()?lF:x.isSocket()?sF:x.isFIFO()?iF:o4,yF=new H7({max:4096}),SZ=(x)=>{let Z=yF.get(x);if(Z)return Z;let J=x.normalize("NFKD");return yF.set(x,J),J},uF=new H7({max:4096}),gX=(x)=>{let Z=uF.get(x);if(Z)return Z;let J=SZ(x.toLowerCase());return uF.set(x,J),J};class cz extends H7{constructor(){super({max:256})}}class nF extends H7{constructor(x=16384){super({maxSize:x,sizeCalculation:(Z)=>Z.length+1})}}var aF=Symbol("PathScurry setAsCwd");class p3{name;root;roots;parent;nocase;isCWD=!1;#x;#J;get dev(){return this.#J}#q;get mode(){return this.#q}#X;get nlink(){return this.#X}#$;get uid(){return this.#$}#w;get gid(){return this.#w}#D;get rdev(){return this.#D}#W;get blksize(){return this.#W}#Y;get ino(){return this.#Y}#G;get size(){return this.#G}#V;get blocks(){return this.#V}#K;get atimeMs(){return this.#K}#Q;get mtimeMs(){return this.#Q}#H;get ctimeMs(){return this.#H}#P;get birthtimeMs(){return this.#P}#F;get atime(){return this.#F}#U;get mtime(){return this.#U}#S;get ctime(){return this.#S}#B;get birthtime(){return this.#B}#j;#C;#M;#N;#_;#m;#Z;#E;#v;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(x,Z=o4,J,Q,X,q,$){if(this.name=x,this.#j=X?gX(x):SZ(x),this.#Z=Z&ta,this.nocase=X,this.roots=Q,this.root=J||this,this.#E=q,this.#M=$.fullpath,this.#_=$.relative,this.#m=$.relativePosix,this.parent=$.parent,this.parent)this.#x=this.parent.#x;else this.#x=hF($.fs)}depth(){if(this.#C!==void 0)return this.#C;if(!this.parent)return this.#C=0;return this.#C=this.parent.depth()+1}childrenCache(){return this.#E}resolve(x){if(!x)return this;let Z=this.getRootString(x),Q=x.substring(Z.length).split(this.splitSep);return Z?this.getRoot(Z).#A(Q):this.#A(Q)}#A(x){let Z=this;for(let J of x)Z=Z.child(J);return Z}children(){let x=this.#E.get(this);if(x)return x;let Z=Object.assign([],{provisional:0});return this.#E.set(this,Z),this.#Z&=~Ez,Z}child(x,Z){if(x===""||x===".")return this;if(x==="..")return this.parent||this;let J=this.children(),Q=this.nocase?gX(x):SZ(x);for(let Y of J)if(Y.#j===Q)return Y;let X=this.parent?this.sep:"",q=this.#M?this.#M+X+x:void 0,$=this.newChild(x,o4,{...Z,parent:this,fullpath:q});if(!this.canReaddir())$.#Z|=F8;return J.push($),$}relative(){if(this.isCWD)return"";if(this.#_!==void 0)return this.#_;let x=this.name,Z=this.parent;if(!Z)return this.#_=this.name;let J=Z.relative();return J+(!J||!Z.parent?"":this.sep)+x}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#m!==void 0)return this.#m;let x=this.name,Z=this.parent;if(!Z)return this.#m=this.fullpathPosix();let J=Z.relativePosix();return J+(!J||!Z.parent?"":"/")+x}fullpath(){if(this.#M!==void 0)return this.#M;let x=this.name,Z=this.parent;if(!Z)return this.#M=this.name;let Q=Z.fullpath()+(!Z.parent?"":this.sep)+x;return this.#M=Q}fullpathPosix(){if(this.#N!==void 0)return this.#N;if(this.sep==="/")return this.#N=this.fullpath();if(!this.parent){let Q=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(Q))return this.#N=`//?/${Q}`;else return this.#N=Q}let x=this.parent,Z=x.fullpathPosix(),J=Z+(!Z||!x.parent?"":"/")+this.name;return this.#N=J}isUnknown(){return(this.#Z&l4)===o4}isType(x){return this[`is${x}`]()}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.#Z&l4)===oF}isDirectory(){return(this.#Z&l4)===g8}isCharacterDevice(){return(this.#Z&l4)===dF}isBlockDevice(){return(this.#Z&l4)===lF}isFIFO(){return(this.#Z&l4)===iF}isSocket(){return(this.#Z&l4)===sF}isSymbolicLink(){return(this.#Z&M7)===M7}lstatCached(){return this.#Z&bF?this:void 0}readlinkCached(){return this.#v}realpathCached(){return this.#O}readdirCached(){let x=this.children();return x.slice(0,x.provisional)}canReadlink(){if(this.#v)return!0;if(!this.parent)return!1;let x=this.#Z&l4;return!(x!==o4&&x!==M7||this.#Z&hX||this.#Z&F8)}calledReaddir(){return!!(this.#Z&Ez)}isENOENT(){return!!(this.#Z&F8)}isNamed(x){return!this.nocase?this.#j===SZ(x):this.#j===gX(x)}async readlink(){let x=this.#v;if(x)return x;if(!this.canReadlink())return;if(!this.parent)return;try{let Z=await this.#x.promises.readlink(this.fullpath()),J=(await this.parent.realpath())?.resolve(Z);if(J)return this.#v=J}catch(Z){this.#T(Z.code);return}}readlinkSync(){let x=this.#v;if(x)return x;if(!this.canReadlink())return;if(!this.parent)return;try{let Z=this.#x.readlinkSync(this.fullpath()),J=this.parent.realpathSync()?.resolve(Z);if(J)return this.#v=J}catch(Z){this.#T(Z.code);return}}#b(x){this.#Z|=Ez;for(let Z=x.provisional;Z<x.length;Z++){let J=x[Z];if(J)J.#L()}}#L(){if(this.#Z&F8)return;this.#Z=(this.#Z|F8)&CZ,this.#i()}#i(){let x=this.children();x.provisional=0;for(let Z of x)Z.#L()}#c(){this.#Z|=iX,this.#f()}#f(){if(this.#Z&OZ)return;let x=this.#Z;if((x&l4)===g8)x&=CZ;this.#Z=x|OZ,this.#i()}#p(x=""){if(x==="ENOTDIR"||x==="EPERM")this.#f();else if(x==="ENOENT")this.#L();else this.children().provisional=0}#I(x=""){if(x==="ENOTDIR")this.parent.#f();else if(x==="ENOENT")this.#L()}#T(x=""){let Z=this.#Z;if(Z|=hX,x==="ENOENT")Z|=F8;if(x==="EINVAL"||x==="UNKNOWN")Z&=CZ;if(this.#Z=Z,x==="ENOTDIR"&&this.parent)this.parent.#f()}#y(x,Z){return this.#h(x,Z)||this.#u(x,Z)}#u(x,Z){let J=fz(x),Q=this.newChild(x.name,J,{parent:this}),X=Q.#Z&l4;if(X!==g8&&X!==M7&&X!==o4)Q.#Z|=OZ;return Z.unshift(Q),Z.provisional++,Q}#h(x,Z){for(let J=Z.provisional;J<Z.length;J++){let Q=Z[J];if((this.nocase?gX(x.name):SZ(x.name))!==Q.#j)continue;return this.#z(x,Q,J,Z)}}#z(x,Z,J,Q){let X=Z.name;if(Z.#Z=Z.#Z&CZ|fz(x),X!==x.name)Z.name=x.name;if(J!==Q.provisional){if(J===Q.length-1)Q.pop();else Q.splice(J,1);Q.unshift(Z)}return Q.provisional++,Z}async lstat(){if((this.#Z&F8)===0)try{return this.#g(await this.#x.promises.lstat(this.fullpath())),this}catch(x){this.#I(x.code)}}lstatSync(){if((this.#Z&F8)===0)try{return this.#g(this.#x.lstatSync(this.fullpath())),this}catch(x){this.#I(x.code)}}#g(x){let{atime:Z,atimeMs:J,birthtime:Q,birthtimeMs:X,blksize:q,blocks:$,ctime:Y,ctimeMs:z,dev:W,gid:G,ino:H,mode:U,mtime:M,mtimeMs:D,nlink:F,rdev:_,size:L,uid:O}=x;this.#F=Z,this.#K=J,this.#B=Q,this.#P=X,this.#W=q,this.#V=$,this.#S=Y,this.#H=z,this.#J=W,this.#w=G,this.#Y=H,this.#q=U,this.#U=M,this.#Q=D,this.#X=F,this.#D=_,this.#G=L,this.#$=O;let v=fz(x);if(this.#Z=this.#Z&CZ|v|bF,v!==o4&&v!==g8&&v!==M7)this.#Z|=OZ}#k=[];#R=!1;#d(x){this.#R=!1;let Z=this.#k.slice();this.#k.length=0,Z.forEach((J)=>J(null,x))}readdirCB(x,Z=!1){if(!this.canReaddir()){if(Z)x(null,[]);else queueMicrotask(()=>x(null,[]));return}let J=this.children();if(this.calledReaddir()){let X=J.slice(0,J.provisional);if(Z)x(null,X);else queueMicrotask(()=>x(null,X));return}if(this.#k.push(x),this.#R)return;this.#R=!0;let Q=this.fullpath();this.#x.readdir(Q,{withFileTypes:!0},(X,q)=>{if(X)this.#p(X.code),J.provisional=0;else{for(let $ of q)this.#y($,J);this.#b(J)}this.#d(J.slice(0,J.provisional));return})}#l;async readdir(){if(!this.canReaddir())return[];let x=this.children();if(this.calledReaddir())return x.slice(0,x.provisional);let Z=this.fullpath();if(this.#l)await this.#l;else{let J=()=>{};this.#l=new Promise((Q)=>J=Q);try{for(let Q of await this.#x.promises.readdir(Z,{withFileTypes:!0}))this.#y(Q,x);this.#b(x)}catch(Q){this.#p(Q.code),x.provisional=0}this.#l=void 0,J()}return x.slice(0,x.provisional)}readdirSync(){if(!this.canReaddir())return[];let x=this.children();if(this.calledReaddir())return x.slice(0,x.provisional);let Z=this.fullpath();try{for(let J of this.#x.readdirSync(Z,{withFileTypes:!0}))this.#y(J,x);this.#b(x)}catch(J){this.#p(J.code),x.provisional=0}return x.slice(0,x.provisional)}canReaddir(){if(this.#Z&pF)return!1;let x=l4&this.#Z;if(!(x===o4||x===g8||x===M7))return!1;return!0}shouldWalk(x,Z){return(this.#Z&g8)===g8&&!(this.#Z&pF)&&!x.has(this)&&(!Z||Z(this))}async realpath(){if(this.#O)return this.#O;if((iX|hX|F8)&this.#Z)return;try{let x=await this.#x.promises.realpath(this.fullpath());return this.#O=this.resolve(x)}catch(x){this.#c()}}realpathSync(){if(this.#O)return this.#O;if((iX|hX|F8)&this.#Z)return;try{let x=this.#x.realpathSync(this.fullpath());return this.#O=this.resolve(x)}catch(x){this.#c()}}[aF](x){if(x===this)return;x.isCWD=!1,this.isCWD=!0;let Z=new Set([]),J=[],Q=this;while(Q&&Q.parent)Z.add(Q),Q.#_=J.join(this.sep),Q.#m=J.join("/"),Q=Q.parent,J.push("..");Q=x;while(Q&&Q.parent&&!Z.has(Q))Q.#_=void 0,Q.#m=void 0,Q=Q.parent}}class dX extends p3{sep="\\";splitSep=ra;constructor(x,Z=o4,J,Q,X,q,$){super(x,Z,J,Q,X,q,$)}newChild(x,Z=o4,J={}){return new dX(x,Z,this.root,this.roots,this.nocase,this.childrenCache(),J)}getRootString(x){return kz.parse(x).root}getRoot(x){if(x=aa(x.toUpperCase()),x===this.root.name)return this.root;for(let[Z,J]of Object.entries(this.roots))if(this.sameRoot(x,Z))return this.roots[x]=J;return this.roots[x]=new RZ(x,this).root}sameRoot(x,Z=this.root.name){return x=x.toUpperCase().replace(/\//g,"\\").replace(gF,"$1\\"),x===Z}}class lX extends p3{splitSep="/";sep="/";constructor(x,Z=o4,J,Q,X,q,$){super(x,Z,J,Q,X,q,$)}getRootString(x){return x.startsWith("/")?"/":""}getRoot(x){return this.root}newChild(x,Z=o4,J={}){return new lX(x,Z,this.root,this.roots,this.nocase,this.childrenCache(),J)}}class bz{root;rootPath;roots;cwd;#x;#J;#q;nocase;#X;constructor(x=process.cwd(),Z,J,{nocase:Q,childrenCacheSize:X=16384,fs:q=mZ}={}){if(this.#X=hF(q),x instanceof URL||x.startsWith("file://"))x=ba(x);let $=Z.resolve(x);this.roots=Object.create(null),this.rootPath=this.parseRootPath($),this.#x=new cz,this.#J=new cz,this.#q=new nF(X);let Y=$.substring(this.rootPath.length).split(J);if(Y.length===1&&!Y[0])Y.pop();if(Q===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=Q,this.root=this.newRoot(this.#X),this.roots[this.rootPath]=this.root;let z=this.root,W=Y.length-1,G=Z.sep,H=this.rootPath,U=!1;for(let M of Y){let D=W--;z=z.child(M,{relative:new Array(D).fill("..").join(G),relativePosix:new Array(D).fill("..").join("/"),fullpath:H+=(U?"":G)+M}),U=!0}this.cwd=z}depth(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.depth()}childrenCache(){return this.#q}resolve(...x){let Z="";for(let X=x.length-1;X>=0;X--){let q=x[X];if(!q||q===".")continue;if(Z=Z?`${q}/${Z}`:q,this.isAbsolute(q))break}let J=this.#x.get(Z);if(J!==void 0)return J;let Q=this.cwd.resolve(Z).fullpath();return this.#x.set(Z,Q),Q}resolvePosix(...x){let Z="";for(let X=x.length-1;X>=0;X--){let q=x[X];if(!q||q===".")continue;if(Z=Z?`${q}/${Z}`:q,this.isAbsolute(q))break}let J=this.#J.get(Z);if(J!==void 0)return J;let Q=this.cwd.resolve(Z).fullpathPosix();return this.#J.set(Z,Q),Q}relative(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.relative()}relativePosix(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.relativePosix()}basename(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.name}dirname(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return(x.parent||x).fullpath()}async readdir(x=this.cwd,Z={withFileTypes:!0}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x,x=this.cwd;let{withFileTypes:J}=Z;if(!x.canReaddir())return[];else{let Q=await x.readdir();return J?Q:Q.map((X)=>X.name)}}readdirSync(x=this.cwd,Z={withFileTypes:!0}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x,x=this.cwd;let{withFileTypes:J=!0}=Z;if(!x.canReaddir())return[];else if(J)return x.readdirSync();else return x.readdirSync().map((Q)=>Q.name)}async lstat(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.lstat()}lstatSync(x=this.cwd){if(typeof x==="string")x=this.cwd.resolve(x);return x.lstatSync()}async readlink(x=this.cwd,{withFileTypes:Z}={withFileTypes:!1}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x.withFileTypes,x=this.cwd;let J=await x.readlink();return Z?J:J?.fullpath()}readlinkSync(x=this.cwd,{withFileTypes:Z}={withFileTypes:!1}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x.withFileTypes,x=this.cwd;let J=x.readlinkSync();return Z?J:J?.fullpath()}async realpath(x=this.cwd,{withFileTypes:Z}={withFileTypes:!1}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x.withFileTypes,x=this.cwd;let J=await x.realpath();return Z?J:J?.fullpath()}realpathSync(x=this.cwd,{withFileTypes:Z}={withFileTypes:!1}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x.withFileTypes,x=this.cwd;let J=x.realpathSync();return Z?J:J?.fullpath()}async walk(x=this.cwd,Z={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x,x=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=Z,$=[];if(!X||X(x))$.push(J?x:x.fullpath());let Y=new Set,z=(G,H)=>{Y.add(G),G.readdirCB((U,M)=>{if(U)return H(U);let D=M.length;if(!D)return H();let F=()=>{if(--D===0)H()};for(let _ of M){if(!X||X(_))$.push(J?_:_.fullpath());if(Q&&_.isSymbolicLink())_.realpath().then((L)=>L?.isUnknown()?L.lstat():L).then((L)=>L?.shouldWalk(Y,q)?z(L,F):F());else if(_.shouldWalk(Y,q))z(_,F);else F()}},!0)},W=x;return new Promise((G,H)=>{z(W,(U)=>{if(U)return H(U);G($)})})}walkSync(x=this.cwd,Z={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x,x=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=Z,$=[];if(!X||X(x))$.push(J?x:x.fullpath());let Y=new Set([x]);for(let z of Y){let W=z.readdirSync();for(let G of W){if(!X||X(G))$.push(J?G:G.fullpath());let H=G;if(G.isSymbolicLink()){if(!(Q&&(H=G.realpathSync())))continue;if(H.isUnknown())H.lstatSync()}if(H.shouldWalk(Y,q))Y.add(H)}}return $}[Symbol.asyncIterator](){return this.iterate()}iterate(x=this.cwd,Z={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x,x=this.cwd;return this.stream(x,Z)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(x=this.cwd,Z={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x,x=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=Z;if(!X||X(x))yield J?x:x.fullpath();let $=new Set([x]);for(let Y of $){let z=Y.readdirSync();for(let W of z){if(!X||X(W))yield J?W:W.fullpath();let G=W;if(W.isSymbolicLink()){if(!(Q&&(G=W.realpathSync())))continue;if(G.isUnknown())G.lstatSync()}if(G.shouldWalk($,q))$.add(G)}}}stream(x=this.cwd,Z={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x,x=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=Z,$=new B7({objectMode:!0});if(!X||X(x))$.write(J?x:x.fullpath());let Y=new Set,z=[x],W=0,G=()=>{let H=!1;while(!H){let U=z.shift();if(!U){if(W===0)$.end();return}W++,Y.add(U);let M=(F,_,L=!1)=>{if(F)return $.emit("error",F);if(Q&&!L){let O=[];for(let v of _)if(v.isSymbolicLink())O.push(v.realpath().then((u)=>u?.isUnknown()?u.lstat():u));if(O.length){Promise.all(O).then(()=>M(null,_,!0));return}}for(let O of _)if(O&&(!X||X(O))){if(!$.write(J?O:O.fullpath()))H=!0}W--;for(let O of _){let v=O.realpathCached()||O;if(v.shouldWalk(Y,q))z.push(v)}if(H&&!$.flowing)$.once("drain",G);else if(!D)G()},D=!0;U.readdirCB(M,!0),D=!1}};return G(),$}streamSync(x=this.cwd,Z={}){if(typeof x==="string")x=this.cwd.resolve(x);else if(!(x instanceof p3))Z=x,x=this.cwd;let{withFileTypes:J=!0,follow:Q=!1,filter:X,walkFilter:q}=Z,$=new B7({objectMode:!0}),Y=new Set;if(!X||X(x))$.write(J?x:x.fullpath());let z=[x],W=0,G=()=>{let H=!1;while(!H){let U=z.shift();if(!U){if(W===0)$.end();return}W++,Y.add(U);let M=U.readdirSync();for(let D of M)if(!X||X(D)){if(!$.write(J?D:D.fullpath()))H=!0}W--;for(let D of M){let F=D;if(D.isSymbolicLink()){if(!(Q&&(F=D.realpathSync())))continue;if(F.isUnknown())F.lstatSync()}if(F.shouldWalk(Y,q))z.push(F)}}if(H&&!$.flowing)$.once("drain",G)};return G(),$}chdir(x=this.cwd){let Z=this.cwd;this.cwd=typeof x==="string"?this.cwd.resolve(x):x,this.cwd[aF](Z)}}class RZ extends bz{sep="\\";constructor(x=process.cwd(),Z={}){let{nocase:J=!0}=Z;super(x,kz,"\\",{...Z,nocase:J});this.nocase=J;for(let Q=this.cwd;Q;Q=Q.parent)Q.nocase=this.nocase}parseRootPath(x){return kz.parse(x).root.toUpperCase()}newRoot(x){return new dX(this.rootPath,g8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:x})}isAbsolute(x){return x.startsWith("/")||x.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(x)}}class IZ extends bz{sep="/";constructor(x=process.cwd(),Z={}){let{nocase:J=!1}=Z;super(x,ca,"/",{...Z,nocase:J});this.nocase=J}parseRootPath(x){return"/"}newRoot(x){return new lX(this.rootPath,g8,void 0,this.roots,this.nocase,this.childrenCache(),{fs:x})}isAbsolute(x){return x.startsWith("/")}}class oX extends IZ{constructor(x=process.cwd(),Z={}){let{nocase:J=!0}=Z;super(x,{...Z,nocase:J})}}var Zv0=process.platform==="win32"?dX:lX,rF=process.platform==="win32"?RZ:process.platform==="darwin"?oX:IZ;var ea=(x)=>x.length>=1,xr=(x)=>x.length>=1;class T9{#x;#J;#q;length;#X;#$;#w;#D;#W;#Y;#G=!0;constructor(x,Z,J,Q){if(!ea(x))throw new TypeError("empty pattern list");if(!xr(Z))throw new TypeError("empty glob list");if(Z.length!==x.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=x.length,J<0||J>=this.length)throw new TypeError("index out of range");if(this.#x=x,this.#J=Z,this.#q=J,this.#X=Q,this.#q===0){if(this.isUNC()){let[X,q,$,Y,...z]=this.#x,[W,G,H,U,...M]=this.#J;if(z[0]==="")z.shift(),M.shift();let D=[X,q,$,Y,""].join("/"),F=[W,G,H,U,""].join("/");this.#x=[D,...z],this.#J=[F,...M],this.length=this.#x.length}else if(this.isDrive()||this.isAbsolute()){let[X,...q]=this.#x,[$,...Y]=this.#J;if(q[0]==="")q.shift(),Y.shift();let z=X+"/",W=$+"/";this.#x=[z,...q],this.#J=[W,...Y],this.length=this.#x.length}}}pattern(){return this.#x[this.#q]}isString(){return typeof this.#x[this.#q]==="string"}isGlobstar(){return this.#x[this.#q]===W3}isRegExp(){return this.#x[this.#q]instanceof RegExp}globString(){return this.#w=this.#w||(this.#q===0?this.isAbsolute()?this.#J[0]+this.#J.slice(1).join("/"):this.#J.join("/"):this.#J.slice(this.#q).join("/"))}hasMore(){return this.length>this.#q+1}rest(){if(this.#$!==void 0)return this.#$;if(!this.hasMore())return this.#$=null;return this.#$=new T9(this.#x,this.#J,this.#q+1,this.#X),this.#$.#Y=this.#Y,this.#$.#W=this.#W,this.#$.#D=this.#D,this.#$}isUNC(){let x=this.#x;return this.#W!==void 0?this.#W:this.#W=this.#X==="win32"&&this.#q===0&&x[0]===""&&x[1]===""&&typeof x[2]==="string"&&!!x[2]&&typeof x[3]==="string"&&!!x[3]}isDrive(){let x=this.#x;return this.#D!==void 0?this.#D:this.#D=this.#X==="win32"&&this.#q===0&&this.length>1&&typeof x[0]==="string"&&/^[a-z]:$/i.test(x[0])}isAbsolute(){let x=this.#x;return this.#Y!==void 0?this.#Y:this.#Y=x[0]===""&&x.length>1||this.isDrive()||this.isUNC()}root(){let x=this.#x[0];return typeof x==="string"&&this.isAbsolute()&&this.#q===0?x:""}checkFollowGlobstar(){return!(this.#q===0||!this.isGlobstar()||!this.#G)}markFollowGlobstar(){if(this.#q===0||!this.isGlobstar()||!this.#G)return!1;return this.#G=!1,!0}}var Zr=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class TZ{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(x,{nobrace:Z,nocase:J,noext:Q,noglobstar:X,platform:q=Zr}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=q,this.mmopts={dot:!0,nobrace:Z,nocase:J,noext:Q,noglobstar:X,optimizationLevel:2,platform:q,nocomment:!0,nonegate:!0};for(let $ of x)this.add($)}add(x){let Z=new d4(x,this.mmopts);for(let J=0;J<Z.set.length;J++){let Q=Z.set[J],X=Z.globParts[J];if(!Q||!X)throw new Error("invalid pattern object");while(Q[0]==="."&&X[0]===".")Q.shift(),X.shift();let q=new T9(Q,X,0,this.platform),$=new d4(q.globString(),this.mmopts),Y=X[X.length-1]==="**",z=q.isAbsolute();if(z)this.absolute.push($);else this.relative.push($);if(Y)if(z)this.absoluteChildren.push($);else this.relativeChildren.push($)}}ignored(x){let Z=x.fullpath(),J=`${Z}/`,Q=x.relative()||".",X=`${Q}/`;for(let q of this.relative)if(q.match(Q)||q.match(X))return!0;for(let q of this.absolute)if(q.match(Z)||q.match(J))return!0;return!1}childrenIgnored(x){let Z=x.fullpath()+"/",J=(x.relative()||".")+"/";for(let Q of this.relativeChildren)if(Q.match(J))return!0;for(let Q of this.absoluteChildren)if(Q.match(Z))return!0;return!1}}class pz{store;constructor(x=new Map){this.store=x}copy(){return new pz(new Map(this.store))}hasWalked(x,Z){return this.store.get(x.fullpath())?.has(Z.globString())}storeWalked(x,Z){let J=x.fullpath(),Q=this.store.get(J);if(Q)Q.add(Z.globString());else this.store.set(J,new Set([Z.globString()]))}}class tF{store=new Map;add(x,Z,J){let Q=(Z?2:0)|(J?1:0),X=this.store.get(x);this.store.set(x,X===void 0?Q:Q&X)}entries(){return[...this.store.entries()].map(([x,Z])=>[x,!!(Z&2),!!(Z&1)])}}class eF{store=new Map;add(x,Z){if(!x.canReaddir())return;let J=this.store.get(x);if(J){if(!J.find((Q)=>Q.globString()===Z.globString()))J.push(Z)}else this.store.set(x,[Z])}get(x){let Z=this.store.get(x);if(!Z)throw new Error("attempting to walk unknown path");return Z}entries(){return this.keys().map((x)=>[x,this.store.get(x)])}keys(){return[...this.store.keys()].filter((x)=>x.canReaddir())}}class vZ{hasWalkedCache;matches=new tF;subwalks=new eF;patterns;follow;dot;opts;constructor(x,Z){this.opts=x,this.follow=!!x.follow,this.dot=!!x.dot,this.hasWalkedCache=Z?Z.copy():new pz}processPatterns(x,Z){this.patterns=Z;let J=Z.map((Q)=>[x,Q]);for(let[Q,X]of J){this.hasWalkedCache.storeWalked(Q,X);let q=X.root(),$=X.isAbsolute()&&this.opts.absolute!==!1;if(q){Q=Q.resolve(q==="/"&&this.opts.root!==void 0?this.opts.root:q);let G=X.rest();if(!G){this.matches.add(Q,!0,!1);continue}else X=G}if(Q.isENOENT())continue;let Y,z,W=!1;while(typeof(Y=X.pattern())==="string"&&(z=X.rest()))Q=Q.resolve(Y),X=z,W=!0;if(Y=X.pattern(),z=X.rest(),W){if(this.hasWalkedCache.hasWalked(Q,X))continue;this.hasWalkedCache.storeWalked(Q,X)}if(typeof Y==="string"){let G=Y===".."||Y===""||Y===".";this.matches.add(Q.resolve(Y),$,G);continue}else if(Y===W3){if(!Q.isSymbolicLink()||this.follow||X.checkFollowGlobstar())this.subwalks.add(Q,X);let G=z?.pattern(),H=z?.rest();if(!z||(G===""||G===".")&&!H)this.matches.add(Q,$,G===""||G===".");else if(G===".."){let U=Q.parent||Q;if(!H)this.matches.add(U,$,!0);else if(!this.hasWalkedCache.hasWalked(U,H))this.subwalks.add(U,H)}}else if(Y instanceof RegExp)this.subwalks.add(Q,X)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new vZ(this.opts,this.hasWalkedCache)}filterEntries(x,Z){let J=this.subwalks.get(x),Q=this.child();for(let X of Z)for(let q of J){let $=q.isAbsolute(),Y=q.pattern(),z=q.rest();if(Y===W3)Q.testGlobstar(X,q,z,$);else if(Y instanceof RegExp)Q.testRegExp(X,Y,z,$);else Q.testString(X,Y,z,$)}return Q}testGlobstar(x,Z,J,Q){if(this.dot||!x.name.startsWith(".")){if(!Z.hasMore())this.matches.add(x,Q,!1);if(x.canReaddir()){if(this.follow||!x.isSymbolicLink())this.subwalks.add(x,Z);else if(x.isSymbolicLink()){if(J&&Z.checkFollowGlobstar())this.subwalks.add(x,J);else if(Z.markFollowGlobstar())this.subwalks.add(x,Z)}}}if(J){let X=J.pattern();if(typeof X==="string"&&X!==".."&&X!==""&&X!==".")this.testString(x,X,J.rest(),Q);else if(X===".."){let q=x.parent||x;this.subwalks.add(q,J)}else if(X instanceof RegExp)this.testRegExp(x,X,J.rest(),Q)}}testRegExp(x,Z,J,Q){if(!Z.test(x.name))return;if(!J)this.matches.add(x,Q,!1);else this.subwalks.add(x,J)}testString(x,Z,J,Q){if(!x.isNamed(Z))return;if(!J)this.matches.add(x,Q,!1);else this.subwalks.add(x,J)}}var Jr=(x,Z)=>typeof x==="string"?new TZ([x],Z):Array.isArray(x)?new TZ(x,Z):x;class yz{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#x=[];#J;#q;signal;maxDepth;includeChildMatches;constructor(x,Z,J){if(this.patterns=x,this.path=Z,this.opts=J,this.#q=!J.posix&&J.platform==="win32"?"\\":"/",this.includeChildMatches=J.includeChildMatches!==!1,J.ignore||!this.includeChildMatches){if(this.#J=Jr(J.ignore??[],J),!this.includeChildMatches&&typeof this.#J.add!=="function")throw new Error("cannot ignore child matches, ignore lacks add() method.")}if(this.maxDepth=J.maxDepth||1/0,J.signal)this.signal=J.signal,this.signal.addEventListener("abort",()=>{this.#x.length=0})}#X(x){return this.seen.has(x)||!!this.#J?.ignored?.(x)}#$(x){return!!this.#J?.childrenIgnored?.(x)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let x=void 0;while(!this.paused&&(x=this.#x.shift()))x()}onResume(x){if(this.signal?.aborted)return;if(!this.paused)x();else this.#x.push(x)}async matchCheck(x,Z){if(Z&&this.opts.nodir)return;let J;if(this.opts.realpath){if(J=x.realpathCached()||await x.realpath(),!J)return;x=J}let X=x.isUnknown()||this.opts.stat?await x.lstat():x;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,Z)}matchCheckTest(x,Z){return x&&(this.maxDepth===1/0||x.depth()<=this.maxDepth)&&(!Z||x.canReaddir())&&(!this.opts.nodir||!x.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!x.isSymbolicLink()||!x.realpathCached()?.isDirectory())&&!this.#X(x)?x:void 0}matchCheckSync(x,Z){if(Z&&this.opts.nodir)return;let J;if(this.opts.realpath){if(J=x.realpathCached()||x.realpathSync(),!J)return;x=J}let X=x.isUnknown()||this.opts.stat?x.lstatSync():x;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,Z)}matchFinish(x,Z){if(this.#X(x))return;if(!this.includeChildMatches&&this.#J?.add){let X=`${x.relativePosix()}/**`;this.#J.add(X)}let J=this.opts.absolute===void 0?Z:this.opts.absolute;this.seen.add(x);let Q=this.opts.mark&&x.isDirectory()?this.#q:"";if(this.opts.withFileTypes)this.matchEmit(x);else if(J){let X=this.opts.posix?x.fullpathPosix():x.fullpath();this.matchEmit(X+Q)}else{let X=this.opts.posix?x.relativePosix():x.relative(),q=this.opts.dotRelative&&!X.startsWith(".."+this.#q)?"."+this.#q:"";this.matchEmit(!X?"."+Q:q+X+Q)}}async match(x,Z,J){let Q=await this.matchCheck(x,J);if(Q)this.matchFinish(Q,Z)}matchSync(x,Z,J){let Q=this.matchCheckSync(x,J);if(Q)this.matchFinish(Q,Z)}walkCB(x,Z,J){if(this.signal?.aborted)J();this.walkCB2(x,Z,new vZ(this.opts),J)}walkCB2(x,Z,J,Q){if(this.#$(x))return Q();if(this.signal?.aborted)Q();if(this.paused){this.onResume(()=>this.walkCB2(x,Z,J,Q));return}J.processPatterns(x,Z);let X=1,q=()=>{if(--X===0)Q()};for(let[$,Y,z]of J.matches.entries()){if(this.#X($))continue;X++,this.match($,Y,z).then(()=>q())}for(let $ of J.subwalkTargets()){if(this.maxDepth!==1/0&&$.depth()>=this.maxDepth)continue;X++;let Y=$.readdirCached();if($.calledReaddir())this.walkCB3($,Y,J,q);else $.readdirCB((z,W)=>this.walkCB3($,W,J,q),!0)}q()}walkCB3(x,Z,J,Q){J=J.filterEntries(x,Z);let X=1,q=()=>{if(--X===0)Q()};for(let[$,Y,z]of J.matches.entries()){if(this.#X($))continue;X++,this.match($,Y,z).then(()=>q())}for(let[$,Y]of J.subwalks.entries())X++,this.walkCB2($,Y,J.child(),q);q()}walkCBSync(x,Z,J){if(this.signal?.aborted)J();this.walkCB2Sync(x,Z,new vZ(this.opts),J)}walkCB2Sync(x,Z,J,Q){if(this.#$(x))return Q();if(this.signal?.aborted)Q();if(this.paused){this.onResume(()=>this.walkCB2Sync(x,Z,J,Q));return}J.processPatterns(x,Z);let X=1,q=()=>{if(--X===0)Q()};for(let[$,Y,z]of J.matches.entries()){if(this.#X($))continue;this.matchSync($,Y,z)}for(let $ of J.subwalkTargets()){if(this.maxDepth!==1/0&&$.depth()>=this.maxDepth)continue;X++;let Y=$.readdirSync();this.walkCB3Sync($,Y,J,q)}q()}walkCB3Sync(x,Z,J,Q){J=J.filterEntries(x,Z);let X=1,q=()=>{if(--X===0)Q()};for(let[$,Y,z]of J.matches.entries()){if(this.#X($))continue;this.matchSync($,Y,z)}for(let[$,Y]of J.subwalks.entries())X++,this.walkCB2Sync($,Y,J.child(),q);q()}}class sX extends yz{matches=new Set;constructor(x,Z,J){super(x,Z,J)}matchEmit(x){this.matches.add(x)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown())await this.path.lstat();return await new Promise((x,Z)=>{this.walkCB(this.path,this.patterns,()=>{if(this.signal?.aborted)Z(this.signal.reason);else x(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 nX extends yz{results;constructor(x,Z,J){super(x,Z,J);this.results=new B7({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(x){if(this.results.write(x),!this.results.flowing)this.pause()}stream(){let x=this.path;if(x.isUnknown())x.lstat().then(()=>{this.walkCB(x,this.patterns,()=>this.results.end())});else this.walkCB(x,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 Xr=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class i8{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(x,Z){if(!Z)throw new TypeError("glob options required");if(this.withFileTypes=!!Z.withFileTypes,this.signal=Z.signal,this.follow=!!Z.follow,this.dot=!!Z.dot,this.dotRelative=!!Z.dotRelative,this.nodir=!!Z.nodir,this.mark=!!Z.mark,!Z.cwd)this.cwd="";else if(Z.cwd instanceof URL||Z.cwd.startsWith("file://"))Z.cwd=Qr(Z.cwd);if(this.cwd=Z.cwd||"",this.root=Z.root,this.magicalBraces=!!Z.magicalBraces,this.nobrace=!!Z.nobrace,this.noext=!!Z.noext,this.realpath=!!Z.realpath,this.absolute=Z.absolute,this.includeChildMatches=Z.includeChildMatches!==!1,this.noglobstar=!!Z.noglobstar,this.matchBase=!!Z.matchBase,this.maxDepth=typeof Z.maxDepth==="number"?Z.maxDepth:1/0,this.stat=!!Z.stat,this.ignore=Z.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof x==="string")x=[x];if(this.windowsPathsNoEscape=!!Z.windowsPathsNoEscape||Z.allowWindowsEscape===!1,this.windowsPathsNoEscape)x=x.map((Y)=>Y.replace(/\\/g,"/"));if(this.matchBase){if(Z.noglobstar)throw new TypeError("base matching requires globstar");x=x.map((Y)=>Y.includes("/")?Y:`./**/${Y}`)}if(this.pattern=x,this.platform=Z.platform||Xr,this.opts={...Z,platform:this.platform},Z.scurry){if(this.scurry=Z.scurry,Z.nocase!==void 0&&Z.nocase!==Z.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let Y=Z.platform==="win32"?RZ:Z.platform==="darwin"?oX:Z.platform?IZ:rF;this.scurry=new Y(this.cwd,{nocase:Z.nocase,fs:Z.fs})}this.nocase=this.scurry.nocase;let J=this.platform==="darwin"||this.platform==="win32",Q={...Z,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:J,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},X=this.pattern.map((Y)=>new d4(Y,Q)),[q,$]=X.reduce((Y,z)=>{return Y[0].push(...z.set),Y[1].push(...z.globParts),Y},[[],[]]);this.patterns=q.map((Y,z)=>{let W=$[z];if(!W)throw new Error("invalid pattern object");return new T9(Y,W,0,this.platform)})}async walk(){return[...await new sX(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 sX(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 nX(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 nX(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 uz=(x,Z={})=>{if(!Array.isArray(x))x=[x];for(let J of x)if(new d4(J,Z).hasMagic())return!0;return!1};function rX(x,Z={}){return new i8(x,Z).streamSync()}function Zw(x,Z={}){return new i8(x,Z).stream()}function Jw(x,Z={}){return new i8(x,Z).walkSync()}async function xw(x,Z={}){return new i8(x,Z).walk()}function tX(x,Z={}){return new i8(x,Z).iterateSync()}function Qw(x,Z={}){return new i8(x,Z).iterate()}var qr=rX,$r=Object.assign(Zw,{sync:rX}),Yr=tX,Kr=Object.assign(Qw,{sync:tX}),zr=Object.assign(Jw,{stream:rX,iterate:tX}),aX=Object.assign(xw,{glob:xw,globSync:Jw,sync:zr,globStream:Zw,stream:$r,globStreamSync:rX,streamSync:qr,globIterate:Qw,iterate:Kr,globIterateSync:tX,iterateSync:Yr,Glob:i8,hasMagic:uz,escape:O9,unescape:D8});aX.glob=aX;var pj=G7(WW(),1);import z40 from"fs";import W40 from"path";function cZ(x,Z){return function J(){return x.apply(Z,arguments)}}var{toString:tt}=Object.prototype,{getPrototypeOf:GW}=Object,{iterator:Wq,toStringTag:K_}=Symbol,Vq=((x)=>(Z)=>{let J=tt.call(Z);return x[J]||(x[J]=J.slice(8,-1).toLowerCase())})(Object.create(null)),P8=(x)=>{return x=x.toLowerCase(),(Z)=>Vq(Z)===x},Gq=(x)=>(Z)=>typeof Z===x,{isArray:c9}=Array,k9=Gq("undefined");function bZ(x){return x!==null&&!k9(x)&&x.constructor!==null&&!k9(x.constructor)&&r3(x.constructor.isBuffer)&&x.constructor.isBuffer(x)}var z_=P8("ArrayBuffer");function et(x){let Z;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView)Z=ArrayBuffer.isView(x);else Z=x&&x.buffer&&z_(x.buffer);return Z}var xe=Gq("string"),r3=Gq("function"),W_=Gq("number"),pZ=(x)=>x!==null&&typeof x==="object",Ze=(x)=>x===!0||x===!1,zq=(x)=>{if(Vq(x)!=="object")return!1;let Z=GW(x);return(Z===null||Z===Object.prototype||Object.getPrototypeOf(Z)===null)&&!(K_ in x)&&!(Wq in x)},Je=(x)=>{if(!pZ(x)||bZ(x))return!1;try{return Object.keys(x).length===0&&Object.getPrototypeOf(x)===Object.prototype}catch(Z){return!1}},Qe=P8("Date"),Xe=P8("File"),qe=P8("Blob"),$e=P8("FileList"),Ye=(x)=>pZ(x)&&r3(x.pipe),Ke=(x)=>{let Z;return x&&(typeof FormData==="function"&&x instanceof FormData||r3(x.append)&&((Z=Vq(x))==="formdata"||Z==="object"&&r3(x.toString)&&x.toString()==="[object FormData]"))},ze=P8("URLSearchParams"),[We,Ve,Ge,He]=["ReadableStream","Request","Response","Headers"].map(P8),Ue=(x)=>x.trim?x.trim():x.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function yZ(x,Z,{allOwnKeys:J=!1}={}){if(x===null||typeof x==="undefined")return;let Q,X;if(typeof x!=="object")x=[x];if(c9(x))for(Q=0,X=x.length;Q<X;Q++)Z.call(null,x[Q],Q,x);else{if(bZ(x))return;let q=J?Object.getOwnPropertyNames(x):Object.keys(x),$=q.length,Y;for(Q=0;Q<$;Q++)Y=q[Q],Z.call(null,x[Y],Y,x)}}function V_(x,Z){if(bZ(x))return null;Z=Z.toLowerCase();let J=Object.keys(x),Q=J.length,X;while(Q-- >0)if(X=J[Q],Z===X.toLowerCase())return X;return null}var N7=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})(),G_=(x)=>!k9(x)&&x!==N7;function VW(){let{caseless:x,skipUndefined:Z}=G_(this)&&this||{},J={},Q=(X,q)=>{if(q==="__proto__"||q==="constructor"||q==="prototype")return;let $=x&&V_(J,q)||q;if(zq(J[$])&&zq(X))J[$]=VW(J[$],X);else if(zq(X))J[$]=VW({},X);else if(c9(X))J[$]=X.slice();else if(!Z||!k9(X))J[$]=X};for(let X=0,q=arguments.length;X<q;X++)arguments[X]&&yZ(arguments[X],Q);return J}var Be=(x,Z,J,{allOwnKeys:Q}={})=>{return yZ(Z,(X,q)=>{if(J&&r3(X))Object.defineProperty(x,q,{value:cZ(X,J),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(x,q,{value:X,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:Q}),x},Me=(x)=>{if(x.charCodeAt(0)===65279)x=x.slice(1);return x},De=(x,Z,J,Q)=>{x.prototype=Object.create(Z.prototype,Q),Object.defineProperty(x.prototype,"constructor",{value:x,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(x,"super",{value:Z.prototype}),J&&Object.assign(x.prototype,J)},Ne=(x,Z,J,Q)=>{let X,q,$,Y={};if(Z=Z||{},x==null)return Z;do{X=Object.getOwnPropertyNames(x),q=X.length;while(q-- >0)if($=X[q],(!Q||Q($,x,Z))&&!Y[$])Z[$]=x[$],Y[$]=!0;x=J!==!1&&GW(x)}while(x&&(!J||J(x,Z))&&x!==Object.prototype);return Z},Fe=(x,Z,J)=>{if(x=String(x),J===void 0||J>x.length)J=x.length;J-=Z.length;let Q=x.indexOf(Z,J);return Q!==-1&&Q===J},we=(x)=>{if(!x)return null;if(c9(x))return x;let Z=x.length;if(!W_(Z))return null;let J=new Array(Z);while(Z-- >0)J[Z]=x[Z];return J},Pe=((x)=>{return(Z)=>{return x&&Z instanceof x}})(typeof Uint8Array!=="undefined"&&GW(Uint8Array)),_e=(x,Z)=>{let Q=(x&&x[Wq]).call(x),X;while((X=Q.next())&&!X.done){let q=X.value;Z.call(x,q[0],q[1])}},Le=(x,Z)=>{let J,Q=[];while((J=x.exec(Z))!==null)Q.push(J);return Q},je=P8("HTMLFormElement"),Ce=(x)=>{return x.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function Z(J,Q,X){return Q.toUpperCase()+X})},Y_=(({hasOwnProperty:x})=>(Z,J)=>x.call(Z,J))(Object.prototype),me=P8("RegExp"),H_=(x,Z)=>{let J=Object.getOwnPropertyDescriptors(x),Q={};yZ(J,(X,q)=>{let $;if(($=Z(X,q,x))!==!1)Q[q]=$||X}),Object.defineProperties(x,Q)},Oe=(x)=>{H_(x,(Z,J)=>{if(r3(x)&&["arguments","caller","callee"].indexOf(J)!==-1)return!1;let Q=x[J];if(!r3(Q))return;if(Z.enumerable=!1,"writable"in Z){Z.writable=!1;return}if(!Z.set)Z.set=()=>{throw Error("Can not rewrite read-only method '"+J+"'")}})},Se=(x,Z)=>{let J={},Q=(X)=>{X.forEach((q)=>{J[q]=!0})};return c9(x)?Q(x):Q(String(x).split(Z)),J},Re=()=>{},Ie=(x,Z)=>{return x!=null&&Number.isFinite(x=+x)?x:Z};function Te(x){return!!(x&&r3(x.append)&&x[K_]==="FormData"&&x[Wq])}var ve=(x)=>{let Z=new Array(10),J=(Q,X)=>{if(pZ(Q)){if(Z.indexOf(Q)>=0)return;if(bZ(Q))return Q;if(!("toJSON"in Q)){Z[X]=Q;let q=c9(Q)?[]:{};return yZ(Q,($,Y)=>{let z=J($,X+1);!k9(z)&&(q[Y]=z)}),Z[X]=void 0,q}}return Q};return J(x,0)},Ae=P8("AsyncFunction"),Ee=(x)=>x&&(pZ(x)||r3(x))&&r3(x.then)&&r3(x.catch),U_=((x,Z)=>{if(x)return setImmediate;return Z?((J,Q)=>{return N7.addEventListener("message",({source:X,data:q})=>{if(X===N7&&q===J)Q.length&&Q.shift()()},!1),(X)=>{Q.push(X),N7.postMessage(J,"*")}})(`axios@${Math.random()}`,[]):(J)=>setTimeout(J)})(typeof setImmediate==="function",r3(N7.postMessage)),fe=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(N7):typeof process!=="undefined"&&process.nextTick||U_,ke=(x)=>x!=null&&r3(x[Wq]),y={isArray:c9,isArrayBuffer:z_,isBuffer:bZ,isFormData:Ke,isArrayBufferView:et,isString:xe,isNumber:W_,isBoolean:Ze,isObject:pZ,isPlainObject:zq,isEmptyObject:Je,isReadableStream:We,isRequest:Ve,isResponse:Ge,isHeaders:He,isUndefined:k9,isDate:Qe,isFile:Xe,isBlob:qe,isRegExp:me,isFunction:r3,isStream:Ye,isURLSearchParams:ze,isTypedArray:Pe,isFileList:$e,forEach:yZ,merge:VW,extend:Be,trim:Ue,stripBOM:Me,inherits:De,toFlatObject:Ne,kindOf:Vq,kindOfTest:P8,endsWith:Fe,toArray:we,forEachEntry:_e,matchAll:Le,isHTMLForm:je,hasOwnProperty:Y_,hasOwnProp:Y_,reduceDescriptors:H_,freezeMethods:Oe,toObjectSet:Se,toCamelCase:Ce,noop:Re,toFiniteNumber:Ie,findKey:V_,global:N7,isContextDefined:G_,isSpecCompliantForm:Te,toJSONObject:ve,isAsyncFn:Ae,isThenable:Ee,setImmediate:U_,asap:fe,isIterable:ke};class y3 extends Error{static from(x,Z,J,Q,X,q){let $=new y3(x.message,Z||x.code,J,Q,X);return $.cause=x,$.name=x.name,q&&Object.assign($,q),$}constructor(x,Z,J,Q,X){super(x);if(this.name="AxiosError",this.isAxiosError=!0,Z&&(this.code=Z),J&&(this.config=J),Q&&(this.request=Q),X)this.response=X,this.status=X.status}toJSON(){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:y.toJSONObject(this.config),code:this.code,status:this.status}}}y3.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y3.ERR_BAD_OPTION="ERR_BAD_OPTION";y3.ECONNABORTED="ECONNABORTED";y3.ETIMEDOUT="ETIMEDOUT";y3.ERR_NETWORK="ERR_NETWORK";y3.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y3.ERR_DEPRECATED="ERR_DEPRECATED";y3.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y3.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y3.ERR_CANCELED="ERR_CANCELED";y3.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y3.ERR_INVALID_URL="ERR_INVALID_URL";var O0=y3;var B_=G7(WW(),1),Hq=B_.default;function HW(x){return y.isPlainObject(x)||y.isArray(x)}function D_(x){return y.endsWith(x,"[]")?x.slice(0,-2):x}function M_(x,Z,J){if(!x)return Z;return x.concat(Z).map(function Q(X,q){return X=D_(X),!J&&q?"["+X+"]":X}).join(J?".":"")}function ce(x){return y.isArray(x)&&!x.some(HW)}var be=y.toFlatObject(y,{},null,function x(Z){return/^is[A-Z]/.test(Z)});function pe(x,Z,J){if(!y.isObject(x))throw new TypeError("target must be an object");Z=Z||new(Hq||FormData),J=y.toFlatObject(J,{metaTokens:!0,dots:!1,indexes:!1},!1,function D(F,_){return!y.isUndefined(_[F])});let Q=J.metaTokens,X=J.visitor||G,q=J.dots,$=J.indexes,z=(J.Blob||typeof Blob!=="undefined"&&Blob)&&y.isSpecCompliantForm(Z);if(!y.isFunction(X))throw new TypeError("visitor must be a function");function W(D){if(D===null)return"";if(y.isDate(D))return D.toISOString();if(y.isBoolean(D))return D.toString();if(!z&&y.isBlob(D))throw new O0("Blob is not supported. Use a Buffer instead.");if(y.isArrayBuffer(D)||y.isTypedArray(D))return z&&typeof Blob==="function"?new Blob([D]):Buffer.from(D);return D}function G(D,F,_){let L=D;if(D&&!_&&typeof D==="object"){if(y.endsWith(F,"{}"))F=Q?F:F.slice(0,-2),D=JSON.stringify(D);else if(y.isArray(D)&&ce(D)||(y.isFileList(D)||y.endsWith(F,"[]"))&&(L=y.toArray(D)))return F=D_(F),L.forEach(function O(v,u){!(y.isUndefined(v)||v===null)&&Z.append($===!0?M_([F],u,q):$===null?F:F+"[]",W(v))}),!1}if(HW(D))return!0;return Z.append(M_(_,F,q),W(D)),!1}let H=[],U=Object.assign(be,{defaultVisitor:G,convertValue:W,isVisitable:HW});function M(D,F){if(y.isUndefined(D))return;if(H.indexOf(D)!==-1)throw Error("Circular reference detected in "+F.join("."));H.push(D),y.forEach(D,function _(L,O){if((!(y.isUndefined(L)||L===null)&&X.call(Z,L,y.isString(O)?O.trim():O,F,U))===!0)M(L,F?F.concat(O):[O])}),H.pop()}if(!y.isObject(x))throw new TypeError("data must be an object");return M(x),Z}var U5=pe;function N_(x){let Z={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent(x).replace(/[!'()~]|%20|%00/g,function J(Q){return Z[Q]})}function F_(x,Z){this._pairs=[],x&&U5(x,this,Z)}var w_=F_.prototype;w_.append=function x(Z,J){this._pairs.push([Z,J])};w_.toString=function x(Z){let J=Z?function(Q){return Z.call(this,Q,N_)}:N_;return this._pairs.map(function Q(X){return J(X[0])+"="+J(X[1])},"").join("&")};var P_=F_;function ye(x){return encodeURIComponent(x).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function F7(x,Z,J){if(!Z)return x;let Q=J&&J.encode||ye,X=y.isFunction(J)?{serialize:J}:J,q=X&&X.serialize,$;if(q)$=q(Z,X);else $=y.isURLSearchParams(Z)?Z.toString():new P_(Z,X).toString(Q);if($){let Y=x.indexOf("#");if(Y!==-1)x=x.slice(0,Y);x+=(x.indexOf("?")===-1?"?":"&")+$}return x}class __{constructor(){this.handlers=[]}use(x,Z,J){return this.handlers.push({fulfilled:x,rejected:Z,synchronous:J?J.synchronous:!1,runWhen:J?J.runWhen:null}),this.handlers.length-1}eject(x){if(this.handlers[x])this.handlers[x]=null}clear(){if(this.handlers)this.handlers=[]}forEach(x){y.forEach(this.handlers,function Z(J){if(J!==null)x(J)})}}var UW=__;var B5={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};import he from"crypto";import ue from"url";var L_=ue.URLSearchParams;var BW="abcdefghijklmnopqrstuvwxyz",j_="0123456789",C_={DIGIT:j_,ALPHA:BW,ALPHA_DIGIT:BW+BW.toUpperCase()+j_},ge=(x=16,Z=C_.ALPHA_DIGIT)=>{let J="",{length:Q}=Z,X=new Uint32Array(x);he.randomFillSync(X);for(let q=0;q<x;q++)J+=Z[X[q]%Q];return J},m_={isNode:!0,classes:{URLSearchParams:L_,FormData:Hq,Blob:typeof Blob!=="undefined"&&Blob||null},ALPHABET:C_,generateString:ge,protocols:["http","https","file","data"]};var NW={};gN(NW,{origin:()=>le,navigator:()=>MW,hasStandardBrowserWebWorkerEnv:()=>de,hasStandardBrowserEnv:()=>ie,hasBrowserEnv:()=>DW});var DW=typeof window!=="undefined"&&typeof document!=="undefined",MW=typeof navigator==="object"&&navigator||void 0,ie=DW&&(!MW||["ReactNative","NativeScript","NS"].indexOf(MW.product)<0),de=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),le=DW&&window.location.href||"http://localhost";var T1={...NW,...m_};function FW(x,Z){return U5(x,new T1.classes.URLSearchParams,{visitor:function(J,Q,X,q){if(T1.isNode&&y.isBuffer(J))return this.append(Q,J.toString("base64")),!1;return q.defaultVisitor.apply(this,arguments)},...Z})}function oe(x){return y.matchAll(/\w+|\[(\w*)]/g,x).map((Z)=>{return Z[0]==="[]"?"":Z[1]||Z[0]})}function se(x){let Z={},J=Object.keys(x),Q,X=J.length,q;for(Q=0;Q<X;Q++)q=J[Q],Z[q]=x[q];return Z}function ne(x){function Z(J,Q,X,q){let $=J[q++];if($==="__proto__")return!0;let Y=Number.isFinite(+$),z=q>=J.length;if($=!$&&y.isArray(X)?X.length:$,z){if(y.hasOwnProp(X,$))X[$]=[X[$],Q];else X[$]=Q;return!Y}if(!X[$]||!y.isObject(X[$]))X[$]=[];if(Z(J,Q,X[$],q)&&y.isArray(X[$]))X[$]=se(X[$]);return!Y}if(y.isFormData(x)&&y.isFunction(x.entries)){let J={};return y.forEachEntry(x,(Q,X)=>{Z(oe(Q),X,J,0)}),J}return null}var Uq=ne;function ae(x,Z,J){if(y.isString(x))try{return(Z||JSON.parse)(x),y.trim(x)}catch(Q){if(Q.name!=="SyntaxError")throw Q}return(J||JSON.stringify)(x)}var wW={transitional:B5,adapter:["xhr","http","fetch"],transformRequest:[function x(Z,J){let Q=J.getContentType()||"",X=Q.indexOf("application/json")>-1,q=y.isObject(Z);if(q&&y.isHTMLForm(Z))Z=new FormData(Z);if(y.isFormData(Z))return X?JSON.stringify(Uq(Z)):Z;if(y.isArrayBuffer(Z)||y.isBuffer(Z)||y.isStream(Z)||y.isFile(Z)||y.isBlob(Z)||y.isReadableStream(Z))return Z;if(y.isArrayBufferView(Z))return Z.buffer;if(y.isURLSearchParams(Z))return J.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Z.toString();let Y;if(q){if(Q.indexOf("application/x-www-form-urlencoded")>-1)return FW(Z,this.formSerializer).toString();if((Y=y.isFileList(Z))||Q.indexOf("multipart/form-data")>-1){let z=this.env&&this.env.FormData;return U5(Y?{"files[]":Z}:Z,z&&new z,this.formSerializer)}}if(q||X)return J.setContentType("application/json",!1),ae(Z);return Z}],transformResponse:[function x(Z){let J=this.transitional||wW.transitional,Q=J&&J.forcedJSONParsing,X=this.responseType==="json";if(y.isResponse(Z)||y.isReadableStream(Z))return Z;if(Z&&y.isString(Z)&&(Q&&!this.responseType||X)){let $=!(J&&J.silentJSONParsing)&&X;try{return JSON.parse(Z,this.parseReviver)}catch(Y){if($){if(Y.name==="SyntaxError")throw O0.from(Y,O0.ERR_BAD_RESPONSE,this,null,this.response);throw Y}}}return Z}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T1.classes.FormData,Blob:T1.classes.Blob},validateStatus:function x(Z){return Z>=200&&Z<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],(x)=>{wW.headers[x]={}});var b9=wW;var re=y.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"]),O_=(x)=>{let Z={},J,Q,X;return x&&x.split(`
|
|
89
89
|
`).forEach(function q($){if(X=$.indexOf(":"),J=$.substring(0,X).trim().toLowerCase(),Q=$.substring(X+1).trim(),!J||Z[J]&&re[J])return;if(J==="set-cookie")if(Z[J])Z[J].push(Q);else Z[J]=[Q];else Z[J]=Z[J]?Z[J]+", "+Q:Q}),Z};var S_=Symbol("internals");function uZ(x){return x&&String(x).trim().toLowerCase()}function Bq(x){if(x===!1||x==null)return x;return y.isArray(x)?x.map(Bq):String(x)}function te(x){let Z=Object.create(null),J=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,Q;while(Q=J.exec(x))Z[Q[1]]=Q[2];return Z}var ee=(x)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(x.trim());function PW(x,Z,J,Q,X){if(y.isFunction(Q))return Q.call(this,Z,J);if(X)Z=J;if(!y.isString(Z))return;if(y.isString(Q))return Z.indexOf(Q)!==-1;if(y.isRegExp(Q))return Q.test(Z)}function x00(x){return x.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Z,J,Q)=>{return J.toUpperCase()+Q})}function Z00(x,Z){let J=y.toCamelCase(" "+Z);["get","set","has"].forEach((Q)=>{Object.defineProperty(x,Q+J,{value:function(X,q,$){return this[Q].call(this,Z,X,q,$)},configurable:!0})})}class hZ{constructor(x){x&&this.set(x)}set(x,Z,J){let Q=this;function X($,Y,z){let W=uZ(Y);if(!W)throw new Error("header name must be a non-empty string");let G=y.findKey(Q,W);if(!G||Q[G]===void 0||z===!0||z===void 0&&Q[G]!==!1)Q[G||Y]=Bq($)}let q=($,Y)=>y.forEach($,(z,W)=>X(z,W,Y));if(y.isPlainObject(x)||x instanceof this.constructor)q(x,Z);else if(y.isString(x)&&(x=x.trim())&&!ee(x))q(O_(x),Z);else if(y.isObject(x)&&y.isIterable(x)){let $={},Y,z;for(let W of x){if(!y.isArray(W))throw TypeError("Object iterator must return a key-value pair");$[z=W[0]]=(Y=$[z])?y.isArray(Y)?[...Y,W[1]]:[Y,W[1]]:W[1]}q($,Z)}else x!=null&&X(Z,x,J);return this}get(x,Z){if(x=uZ(x),x){let J=y.findKey(this,x);if(J){let Q=this[J];if(!Z)return Q;if(Z===!0)return te(Q);if(y.isFunction(Z))return Z.call(this,Q,J);if(y.isRegExp(Z))return Z.exec(Q);throw new TypeError("parser must be boolean|regexp|function")}}}has(x,Z){if(x=uZ(x),x){let J=y.findKey(this,x);return!!(J&&this[J]!==void 0&&(!Z||PW(this,this[J],J,Z)))}return!1}delete(x,Z){let J=this,Q=!1;function X(q){if(q=uZ(q),q){let $=y.findKey(J,q);if($&&(!Z||PW(J,J[$],$,Z)))delete J[$],Q=!0}}if(y.isArray(x))x.forEach(X);else X(x);return Q}clear(x){let Z=Object.keys(this),J=Z.length,Q=!1;while(J--){let X=Z[J];if(!x||PW(this,this[X],X,x,!0))delete this[X],Q=!0}return Q}normalize(x){let Z=this,J={};return y.forEach(this,(Q,X)=>{let q=y.findKey(J,X);if(q){Z[q]=Bq(Q),delete Z[X];return}let $=x?x00(X):String(X).trim();if($!==X)delete Z[X];Z[$]=Bq(Q),J[$]=!0}),this}concat(...x){return this.constructor.concat(this,...x)}toJSON(x){let Z=Object.create(null);return y.forEach(this,(J,Q)=>{J!=null&&J!==!1&&(Z[Q]=x&&y.isArray(J)?J.join(", "):J)}),Z}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([x,Z])=>x+": "+Z).join(`
|
|
@@ -1722,7 +1722,7 @@ Type TemplateParamMetadata = GeneralParamMetadata | StringParamMetadata | Number
|
|
|
1722
1722
|
Type TemplateFuncMetadata {
|
|
1723
1723
|
param (elem_name_as: 'uname', body_as: 'def', multiple: true, unique_elem_name: true): TemplateParamMetadata
|
|
1724
1724
|
}
|
|
1725
|
-
`,"skill.aml":`Type
|
|
1725
|
+
`,"skill.aml":`Type SkillInvocation = 'auto' | 'manual'
|
|
1726
1726
|
|
|
1727
1727
|
@doc
|
|
1728
1728
|
Use skills to extend, customize, or optimize Holistics AI agent capabilities by providing contextual knowledge and instructions.
|
|
@@ -1736,20 +1736,21 @@ Type Skill (elem_name_as: 'name') {
|
|
|
1736
1736
|
;;
|
|
1737
1737
|
description: String | Heredoc[Any] | Slot[String] | Slot[Heredoc[Any]]
|
|
1738
1738
|
@doc
|
|
1739
|
-
|
|
1740
|
-
* \`'auto'\` (default): AI agent decides when to activate this skill depending on its current task and situation.
|
|
1741
|
-
* \`'always'\`: AI agent always uses this skill in all tasks and situations.
|
|
1742
|
-
* \`'never'\`: AI agent never uses this skill.
|
|
1739
|
+
Whether to disable this skill and prevent it from being used entirely
|
|
1743
1740
|
;;
|
|
1744
|
-
|
|
1741
|
+
disabled (default: false): Boolean | Slot[Boolean]
|
|
1745
1742
|
@doc
|
|
1746
|
-
|
|
1747
|
-
* \`
|
|
1748
|
-
* \`
|
|
1743
|
+
Configure the invocation mode for this skill
|
|
1744
|
+
* \`'auto'\` (default): AI agent automatically decides when to invoke this skill. End-users can still invoke manually on demand.
|
|
1745
|
+
* \`'manual'\`: AI agent won't invoke this skill on its own. End-users must manually invoke this skill.
|
|
1749
1746
|
;;
|
|
1750
|
-
|
|
1747
|
+
invocation (default: 'auto'): SkillInvocation | Slot[String]
|
|
1751
1748
|
@doc
|
|
1752
|
-
|
|
1749
|
+
Whether end-users can switch the invocation mode for this skill
|
|
1750
|
+
;;
|
|
1751
|
+
allow_switching_invocation (default: false): Boolean | Slot[Boolean]
|
|
1752
|
+
@doc
|
|
1753
|
+
Knowledge and instructions provided by this skill for the AI agent to learn and use
|
|
1753
1754
|
;;
|
|
1754
1755
|
content: Heredoc[Any] | Slot[Heredoc[Any]]
|
|
1755
1756
|
}
|