@mherod/get-cookie 4.0.2 → 4.0.3

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/cli.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var jp=Object.create;var ro=Object.defineProperty;var Wp=Object.getOwnPropertyDescriptor;var $p=Object.getOwnPropertyNames;var Up=Object.getPrototypeOf,Gp=Object.prototype.hasOwnProperty;var Es=r=>{throw TypeError(r)};var qp=(r,t,e)=>t in r?ro(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var p=(r,t)=>()=>(r&&(t=r(r=0)),t);var ks=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),zp=(r,t)=>{for(var e in t)ro(r,e,{get:t[e],enumerable:!0})},Hp=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $p(t))!Gp.call(r,i)&&i!==e&&ro(r,i,{get:()=>t[i],enumerable:!(o=Wp(t,i))||o.enumerable});return r};var ir=(r,t,e)=>(e=r!=null?jp(Up(r)):{},Hp(t||!r||!r.__esModule?ro(e,"default",{value:r,enumerable:!0}):e,r));var c=(r,t,e)=>qp(r,typeof t!="symbol"?t+"":t,e),wi=(r,t,e)=>t.has(r)||Es("Cannot "+e);var a=(r,t,e)=>(wi(r,t,"read from private field"),e?e.call(r):t.get(r)),w=(r,t,e)=>t.has(r)?Es("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),g=(r,t,e,o)=>(wi(r,t,"write to private field"),o?o.call(r,e):t.set(r,e),e),S=(r,t,e)=>(wi(r,t,"access private method"),e);var As,Kp,O,ae=p(()=>{"use strict";As=require("consola"),Kp=(0,As.createConsola)({fancy:!0,formatOptions:{showLogLevel:!1,colors:!0,date:!1,compact:!0,columns:typeof process.stdout.columns=="number"?process.stdout.columns:80},level:typeof process.env.LOG_LEVEL=="string"&&process.env.LOG_LEVEL==="debug"?5:2}),O=Kp});var Qp,io,bi=p(()=>{"use strict";Qp=typeof global=="object"&&global&&global.Object===Object&&global,io=Qp});var Jp,Vp,I,ht=p(()=>{"use strict";bi();Jp=typeof self=="object"&&self&&self.Object===Object&&self,Vp=io||Jp||Function("return this")(),I=Vp});var Yp,nt,sr=p(()=>{"use strict";ht();Yp=I.Symbol,nt=Yp});function th(r){var t=Zp.call(r,nr),e=r[nr];try{r[nr]=void 0;var o=!0}catch(s){}var i=Xp.call(r);return o&&(t?r[nr]=e:delete r[nr]),i}var Ps,Zp,Xp,nr,Rs,_s=p(()=>{"use strict";sr();Ps=Object.prototype,Zp=Ps.hasOwnProperty,Xp=Ps.toString,nr=nt?nt.toStringTag:void 0;Rs=th});function oh(r){return rh.call(r)}var eh,rh,Ds,Ms=p(()=>{"use strict";eh=Object.prototype,rh=eh.toString;Ds=oh});function nh(r){return r==null?r===void 0?sh:ih:Is&&Is in Object(r)?Rs(r):Ds(r)}var ih,sh,Is,et,fe=p(()=>{"use strict";sr();_s();Ms();ih="[object Null]",sh="[object Undefined]",Is=nt?nt.toStringTag:void 0;et=nh});function ah(r){return r!=null&&typeof r=="object"}var J,jt=p(()=>{"use strict";J=ah});function lh(r){return typeof r=="symbol"||J(r)&&et(r)==fh}var fh,ke,so=p(()=>{"use strict";fe();jt();fh="[object Symbol]";ke=lh});function uh(r,t){for(var e=-1,o=r==null?0:r.length,i=Array(o);++e<o;)i[e]=t(r[e],e,r);return i}var Ls,Ns=p(()=>{"use strict";Ls=uh});var ph,D,ct=p(()=>{"use strict";ph=Array.isArray,D=ph});function js(r){if(typeof r=="string")return r;if(D(r))return Ls(r,js)+"";if(ke(r))return Bs?Bs.call(r):"";var t=r+"";return t=="0"&&1/r==-hh?"-0":t}var hh,Fs,Bs,Ws,$s=p(()=>{"use strict";sr();Ns();ct();so();hh=1/0,Fs=nt?nt.prototype:void 0,Bs=Fs?Fs.toString:void 0;Ws=js});function ch(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var H,At=p(()=>{"use strict";H=ch});function mh(r){return r}var Oe,no=p(()=>{"use strict";Oe=mh});function wh(r){if(!H(r))return!1;var t=et(r);return t==gh||t==yh||t==dh||t==xh}var dh,gh,yh,xh,Te,ao=p(()=>{"use strict";fe();At();dh="[object AsyncFunction]",gh="[object Function]",yh="[object GeneratorFunction]",xh="[object Proxy]";Te=wh});var bh,fo,Us=p(()=>{"use strict";ht();bh=I["__core-js_shared__"],fo=bh});function Sh(r){return!!Gs&&Gs in r}var Gs,qs,zs=p(()=>{"use strict";Us();Gs=function(){var r=/[^.]+$/.exec(fo&&fo.keys&&fo.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();qs=Sh});function Eh(r){if(r!=null){try{return Ch.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var vh,Ch,Pt,Si=p(()=>{"use strict";vh=Function.prototype,Ch=vh.toString;Pt=Eh});function Dh(r){if(!H(r)||qs(r))return!1;var t=Te(r)?_h:Oh;return t.test(Pt(r))}var kh,Oh,Th,Ah,Ph,Rh,_h,Hs,Ks=p(()=>{"use strict";ao();zs();At();Si();kh=/[\\^$.*+?()[\]{}|]/g,Oh=/^\[object .+?Constructor\]$/,Th=Function.prototype,Ah=Object.prototype,Ph=Th.toString,Rh=Ah.hasOwnProperty,_h=RegExp("^"+Ph.call(Rh).replace(kh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Hs=Dh});function Mh(r,t){return r==null?void 0:r[t]}var Qs,Js=p(()=>{"use strict";Qs=Mh});function Ih(r,t){var e=Qs(r,t);return Hs(e)?e:void 0}var tt,Wt=p(()=>{"use strict";Ks();Js();tt=Ih});var Lh,lo,Vs=p(()=>{"use strict";Wt();ht();Lh=tt(I,"WeakMap"),lo=Lh});var Ys,Nh,Zs,Xs=p(()=>{"use strict";At();Ys=Object.create,Nh=function(){function r(){}return function(t){if(!H(t))return{};if(Ys)return Ys(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),Zs=Nh});function Fh(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var tn,en=p(()=>{"use strict";tn=Fh});function Bh(r,t){var e=-1,o=r.length;for(t||(t=Array(o));++e<o;)t[e]=r[e];return t}var rn,on=p(()=>{"use strict";rn=Bh});function Uh(r){var t=0,e=0;return function(){var o=$h(),i=Wh-(o-e);if(e=o,i>0){if(++t>=jh)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var jh,Wh,$h,sn,nn=p(()=>{"use strict";jh=800,Wh=16,$h=Date.now;sn=Uh});function Gh(r){return function(){return r}}var an,fn=p(()=>{"use strict";an=Gh});var qh,Ae,vi=p(()=>{"use strict";Wt();qh=function(){try{var r=tt(Object,"defineProperty");return r({},"",{}),r}catch(t){}}(),Ae=qh});var zh,ln,un=p(()=>{"use strict";fn();vi();no();zh=Ae?function(r,t){return Ae(r,"toString",{configurable:!0,enumerable:!1,value:an(t),writable:!0})}:Oe,ln=zh});var Hh,pn,hn=p(()=>{"use strict";un();nn();Hh=sn(ln),pn=Hh});function Jh(r,t){var e=typeof r;return t=t==null?Kh:t,!!t&&(e=="number"||e!="symbol"&&Qh.test(r))&&r>-1&&r%1==0&&r<t}var Kh,Qh,Pe,uo=p(()=>{"use strict";Kh=9007199254740991,Qh=/^(?:0|[1-9]\d*)$/;Pe=Jh});function Vh(r,t,e){t=="__proto__"&&Ae?Ae(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var $t,ar=p(()=>{"use strict";vi();$t=Vh});function Yh(r,t){return r===t||r!==r&&t!==t}var wt,Re=p(()=>{"use strict";wt=Yh});function tc(r,t,e){var o=r[t];(!(Xh.call(r,t)&&wt(o,e))||e===void 0&&!(t in r))&&$t(r,t,e)}var Zh,Xh,cn,mn=p(()=>{"use strict";ar();Re();Zh=Object.prototype,Xh=Zh.hasOwnProperty;cn=tc});function ec(r,t,e,o){var i=!e;e||(e={});for(var s=-1,n=t.length;++s<n;){var f=t[s],l=o?o(e[f],r[f],f,e,r):void 0;l===void 0&&(l=r[f]),i?$t(e,f,l):cn(e,f,l)}return e}var dn,gn=p(()=>{"use strict";mn();ar();dn=ec});function rc(r,t,e){return t=yn(t===void 0?r.length-1:t,0),function(){for(var o=arguments,i=-1,s=yn(o.length-t,0),n=Array(s);++i<s;)n[i]=o[t+i];i=-1;for(var f=Array(t+1);++i<t;)f[i]=o[i];return f[t]=e(n),tn(r,this,f)}}var yn,xn,wn=p(()=>{"use strict";en();yn=Math.max;xn=rc});function oc(r,t){return pn(xn(r,t,Oe),r+"")}var bn,Sn=p(()=>{"use strict";no();wn();hn();bn=oc});function sc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ic}var ic,_e,po=p(()=>{"use strict";ic=9007199254740991;_e=sc});function nc(r){return r!=null&&_e(r.length)&&!Te(r)}var bt,De=p(()=>{"use strict";ao();po();bt=nc});function ac(r,t,e){if(!H(e))return!1;var o=typeof t;return(o=="number"?bt(e)&&Pe(t,e.length):o=="string"&&t in e)?wt(e[t],r):!1}var vn,Cn=p(()=>{"use strict";Re();De();uo();At();vn=ac});function fc(r){return bn(function(t,e){var o=-1,i=e.length,s=i>1?e[i-1]:void 0,n=i>2?e[2]:void 0;for(s=r.length>3&&typeof s=="function"?(i--,s):void 0,n&&vn(e[0],e[1],n)&&(s=i<3?void 0:s,i=1),t=Object(t);++o<i;){var f=e[o];f&&r(t,f,o,s)}return t})}var En,kn=p(()=>{"use strict";Sn();Cn();En=fc});function uc(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||lc;return r===e}var lc,Me,ho=p(()=>{"use strict";lc=Object.prototype;Me=uc});function pc(r,t){for(var e=-1,o=Array(r);++e<r;)o[e]=t(e);return o}var On,Tn=p(()=>{"use strict";On=pc});function cc(r){return J(r)&&et(r)==hc}var hc,Ci,An=p(()=>{"use strict";fe();jt();hc="[object Arguments]";Ci=cc});var Pn,mc,dc,gc,le,co=p(()=>{"use strict";An();jt();Pn=Object.prototype,mc=Pn.hasOwnProperty,dc=Pn.propertyIsEnumerable,gc=Ci(function(){return arguments}())?Ci:function(r){return J(r)&&mc.call(r,"callee")&&!dc.call(r,"callee")},le=gc});function yc(){return!1}var Rn,_n=p(()=>{"use strict";Rn=yc});var In,Dn,xc,Mn,wc,bc,ue,mo=p(()=>{"use strict";ht();_n();In=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dn=In&&typeof module=="object"&&module&&!module.nodeType&&module,xc=Dn&&Dn.exports===In,Mn=xc?I.Buffer:void 0,wc=Mn?Mn.isBuffer:void 0,bc=wc||Rn,ue=bc});function zc(r){return J(r)&&_e(r.length)&&!!P[et(r)]}var Sc,vc,Cc,Ec,kc,Oc,Tc,Ac,Pc,Rc,_c,Dc,Mc,Ic,Lc,Nc,Fc,Bc,jc,Wc,$c,Uc,Gc,qc,P,Ln,Nn=p(()=>{"use strict";fe();po();jt();Sc="[object Arguments]",vc="[object Array]",Cc="[object Boolean]",Ec="[object Date]",kc="[object Error]",Oc="[object Function]",Tc="[object Map]",Ac="[object Number]",Pc="[object Object]",Rc="[object RegExp]",_c="[object Set]",Dc="[object String]",Mc="[object WeakMap]",Ic="[object ArrayBuffer]",Lc="[object DataView]",Nc="[object Float32Array]",Fc="[object Float64Array]",Bc="[object Int8Array]",jc="[object Int16Array]",Wc="[object Int32Array]",$c="[object Uint8Array]",Uc="[object Uint8ClampedArray]",Gc="[object Uint16Array]",qc="[object Uint32Array]",P={};P[Nc]=P[Fc]=P[Bc]=P[jc]=P[Wc]=P[$c]=P[Uc]=P[Gc]=P[qc]=!0;P[Sc]=P[vc]=P[Ic]=P[Cc]=P[Lc]=P[Ec]=P[kc]=P[Oc]=P[Tc]=P[Ac]=P[Pc]=P[Rc]=P[_c]=P[Dc]=P[Mc]=!1;Ln=zc});function Hc(r){return function(t){return r(t)}}var Fn,Bn=p(()=>{"use strict";Fn=Hc});var jn,fr,Kc,Ei,Qc,ki,Wn=p(()=>{"use strict";bi();jn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fr=jn&&typeof module=="object"&&module&&!module.nodeType&&module,Kc=fr&&fr.exports===jn,Ei=Kc&&io.process,Qc=function(){try{var r=fr&&fr.require&&fr.require("util").types;return r||Ei&&Ei.binding&&Ei.binding("util")}catch(t){}}(),ki=Qc});var $n,Jc,Ie,go=p(()=>{"use strict";Nn();Bn();Wn();$n=ki&&ki.isTypedArray,Jc=$n?Fn($n):Ln,Ie=Jc});function Zc(r,t){var e=D(r),o=!e&&le(r),i=!e&&!o&&ue(r),s=!e&&!o&&!i&&Ie(r),n=e||o||i||s,f=n?On(r.length,String):[],l=f.length;for(var u in r)(t||Yc.call(r,u))&&!(n&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Pe(u,l)))&&f.push(u);return f}var Vc,Yc,yo,Oi=p(()=>{"use strict";Tn();co();ct();mo();uo();go();Vc=Object.prototype,Yc=Vc.hasOwnProperty;yo=Zc});function Xc(r,t){return function(e){return r(t(e))}}var xo,Ti=p(()=>{"use strict";xo=Xc});var tm,Un,Gn=p(()=>{"use strict";Ti();tm=xo(Object.keys,Object),Un=tm});function om(r){if(!Me(r))return Un(r);var t=[];for(var e in Object(r))rm.call(r,e)&&e!="constructor"&&t.push(e);return t}var em,rm,qn,zn=p(()=>{"use strict";ho();Gn();em=Object.prototype,rm=em.hasOwnProperty;qn=om});function im(r){return bt(r)?yo(r):qn(r)}var Le,wo=p(()=>{"use strict";Oi();zn();De();Le=im});function sm(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var Hn,Kn=p(()=>{"use strict";Hn=sm});function fm(r){if(!H(r))return Hn(r);var t=Me(r),e=[];for(var o in r)o=="constructor"&&(t||!am.call(r,o))||e.push(o);return e}var nm,am,Qn,Jn=p(()=>{"use strict";At();ho();Kn();nm=Object.prototype,am=nm.hasOwnProperty;Qn=fm});function lm(r){return bt(r)?yo(r,!0):Qn(r)}var bo,Ai=p(()=>{"use strict";Oi();Jn();De();bo=lm});function hm(r,t){if(D(r))return!1;var e=typeof r;return e=="number"||e=="symbol"||e=="boolean"||r==null||ke(r)?!0:pm.test(r)||!um.test(r)||t!=null&&r in Object(t)}var um,pm,Ne,So=p(()=>{"use strict";ct();so();um=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pm=/^\w*$/;Ne=hm});var cm,Rt,lr=p(()=>{"use strict";Wt();cm=tt(Object,"create"),Rt=cm});function mm(){this.__data__=Rt?Rt(null):{},this.size=0}var Vn,Yn=p(()=>{"use strict";lr();Vn=mm});function dm(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Zn,Xn=p(()=>{"use strict";Zn=dm});function wm(r){var t=this.__data__;if(Rt){var e=t[r];return e===gm?void 0:e}return xm.call(t,r)?t[r]:void 0}var gm,ym,xm,ta,ea=p(()=>{"use strict";lr();gm="__lodash_hash_undefined__",ym=Object.prototype,xm=ym.hasOwnProperty;ta=wm});function vm(r){var t=this.__data__;return Rt?t[r]!==void 0:Sm.call(t,r)}var bm,Sm,ra,oa=p(()=>{"use strict";lr();bm=Object.prototype,Sm=bm.hasOwnProperty;ra=vm});function Em(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Rt&&t===void 0?Cm:t,this}var Cm,ia,sa=p(()=>{"use strict";lr();Cm="__lodash_hash_undefined__";ia=Em});function Fe(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var Pi,na=p(()=>{"use strict";Yn();Xn();ea();oa();sa();Fe.prototype.clear=Vn;Fe.prototype.delete=Zn;Fe.prototype.get=ta;Fe.prototype.has=ra;Fe.prototype.set=ia;Pi=Fe});function km(){this.__data__=[],this.size=0}var aa,fa=p(()=>{"use strict";aa=km});function Om(r,t){for(var e=r.length;e--;)if(wt(r[e][0],t))return e;return-1}var Ut,ur=p(()=>{"use strict";Re();Ut=Om});function Pm(r){var t=this.__data__,e=Ut(t,r);if(e<0)return!1;var o=t.length-1;return e==o?t.pop():Am.call(t,e,1),--this.size,!0}var Tm,Am,la,ua=p(()=>{"use strict";ur();Tm=Array.prototype,Am=Tm.splice;la=Pm});function Rm(r){var t=this.__data__,e=Ut(t,r);return e<0?void 0:t[e][1]}var pa,ha=p(()=>{"use strict";ur();pa=Rm});function _m(r){return Ut(this.__data__,r)>-1}var ca,ma=p(()=>{"use strict";ur();ca=_m});function Dm(r,t){var e=this.__data__,o=Ut(e,r);return o<0?(++this.size,e.push([r,t])):e[o][1]=t,this}var da,ga=p(()=>{"use strict";ur();da=Dm});function Be(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var Gt,pr=p(()=>{"use strict";fa();ua();ha();ma();ga();Be.prototype.clear=aa;Be.prototype.delete=la;Be.prototype.get=pa;Be.prototype.has=ca;Be.prototype.set=da;Gt=Be});var Mm,qt,vo=p(()=>{"use strict";Wt();ht();Mm=tt(I,"Map"),qt=Mm});function Im(){this.size=0,this.__data__={hash:new Pi,map:new(qt||Gt),string:new Pi}}var ya,xa=p(()=>{"use strict";na();pr();vo();ya=Im});function Lm(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var wa,ba=p(()=>{"use strict";wa=Lm});function Nm(r,t){var e=r.__data__;return wa(t)?e[typeof t=="string"?"string":"hash"]:e.map}var zt,hr=p(()=>{"use strict";ba();zt=Nm});function Fm(r){var t=zt(this,r).delete(r);return this.size-=t?1:0,t}var Sa,va=p(()=>{"use strict";hr();Sa=Fm});function Bm(r){return zt(this,r).get(r)}var Ca,Ea=p(()=>{"use strict";hr();Ca=Bm});function jm(r){return zt(this,r).has(r)}var ka,Oa=p(()=>{"use strict";hr();ka=jm});function Wm(r,t){var e=zt(this,r),o=e.size;return e.set(r,t),this.size+=e.size==o?0:1,this}var Ta,Aa=p(()=>{"use strict";hr();Ta=Wm});function je(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var pe,Co=p(()=>{"use strict";xa();va();Ea();Oa();Aa();je.prototype.clear=ya;je.prototype.delete=Sa;je.prototype.get=Ca;je.prototype.has=ka;je.prototype.set=Ta;pe=je});function Ri(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError($m);var e=function(){var o=arguments,i=t?t.apply(this,o):o[0],s=e.cache;if(s.has(i))return s.get(i);var n=r.apply(this,o);return e.cache=s.set(i,n)||s,n};return e.cache=new(Ri.Cache||pe),e}var $m,at,_i=p(()=>{"use strict";Co();$m="Expected a function";Ri.Cache=pe;at=Ri});function Gm(r){var t=at(r,function(o){return e.size===Um&&e.clear(),o}),e=t.cache;return t}var Um,Pa,Ra=p(()=>{"use strict";_i();Um=500;Pa=Gm});var qm,zm,Hm,_a,Da=p(()=>{"use strict";Ra();qm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zm=/\\(\\)?/g,Hm=Pa(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(qm,function(e,o,i,s){t.push(i?s.replace(zm,"$1"):o||e)}),t}),_a=Hm});function Km(r){return r==null?"":Ws(r)}var Ma,Ia=p(()=>{"use strict";$s();Ma=Km});function Qm(r,t){return D(r)?r:Ne(r,t)?[r]:_a(Ma(r))}var Eo,Di=p(()=>{"use strict";ct();So();Da();Ia();Eo=Qm});function Vm(r){if(typeof r=="string"||ke(r))return r;var t=r+"";return t=="0"&&1/r==-Jm?"-0":t}var Jm,Ht,cr=p(()=>{"use strict";so();Jm=1/0;Ht=Vm});function Ym(r,t){t=Eo(t,r);for(var e=0,o=t.length;r!=null&&e<o;)r=r[Ht(t[e++])];return e&&e==o?r:void 0}var ko,Mi=p(()=>{"use strict";Di();cr();ko=Ym});function Zm(r,t,e){var o=r==null?void 0:ko(r,t);return o===void 0?e:o}var La,Na=p(()=>{"use strict";Mi();La=Zm});function Xm(r,t){for(var e=-1,o=t.length,i=r.length;++e<o;)r[i+e]=t[e];return r}var Fa,Ba=p(()=>{"use strict";Fa=Xm});var td,Oo,Ii=p(()=>{"use strict";Ti();td=xo(Object.getPrototypeOf,Object),Oo=td});function nd(r){if(!J(r)||et(r)!=ed)return!1;var t=Oo(r);if(t===null)return!0;var e=id.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&ja.call(e)==sd}var ed,rd,od,ja,id,sd,Wa,$a=p(()=>{"use strict";fe();Ii();jt();ed="[object Object]",rd=Function.prototype,od=Object.prototype,ja=rd.toString,id=od.hasOwnProperty,sd=ja.call(Object);Wa=nd});function ad(){this.__data__=new Gt,this.size=0}var Ua,Ga=p(()=>{"use strict";pr();Ua=ad});function fd(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var qa,za=p(()=>{"use strict";qa=fd});function ld(r){return this.__data__.get(r)}var Ha,Ka=p(()=>{"use strict";Ha=ld});function ud(r){return this.__data__.has(r)}var Qa,Ja=p(()=>{"use strict";Qa=ud});function hd(r,t){var e=this.__data__;if(e instanceof Gt){var o=e.__data__;if(!qt||o.length<pd-1)return o.push([r,t]),this.size=++e.size,this;e=this.__data__=new pe(o)}return e.set(r,t),this.size=e.size,this}var pd,Va,Ya=p(()=>{"use strict";pr();vo();Co();pd=200;Va=hd});function We(r){var t=this.__data__=new Gt(r);this.size=t.size}var Kt,To=p(()=>{"use strict";pr();Ga();za();Ka();Ja();Ya();We.prototype.clear=Ua;We.prototype.delete=qa;We.prototype.get=Ha;We.prototype.has=Qa;We.prototype.set=Va;Kt=We});function md(r,t){if(t)return r.slice();var e=r.length,o=tf?tf(e):new r.constructor(e);return r.copy(o),o}var ef,Za,cd,Xa,tf,rf,of=p(()=>{"use strict";ht();ef=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Za=ef&&typeof module=="object"&&module&&!module.nodeType&&module,cd=Za&&Za.exports===ef,Xa=cd?I.Buffer:void 0,tf=Xa?Xa.allocUnsafe:void 0;rf=md});function dd(r,t){for(var e=-1,o=r==null?0:r.length,i=0,s=[];++e<o;){var n=r[e];t(n,e,r)&&(s[i++]=n)}return s}var sf,nf=p(()=>{"use strict";sf=dd});function gd(){return[]}var af,ff=p(()=>{"use strict";af=gd});var yd,xd,lf,wd,uf,pf=p(()=>{"use strict";nf();ff();yd=Object.prototype,xd=yd.propertyIsEnumerable,lf=Object.getOwnPropertySymbols,wd=lf?function(r){return r==null?[]:(r=Object(r),sf(lf(r),function(t){return xd.call(r,t)}))}:af,uf=wd});function bd(r,t,e){var o=t(r);return D(r)?o:Fa(o,e(r))}var hf,cf=p(()=>{"use strict";Ba();ct();hf=bd});function Sd(r){return hf(r,Le,uf)}var Li,mf=p(()=>{"use strict";cf();pf();wo();Li=Sd});var vd,Ao,df=p(()=>{"use strict";Wt();ht();vd=tt(I,"DataView"),Ao=vd});var Cd,Po,gf=p(()=>{"use strict";Wt();ht();Cd=tt(I,"Promise"),Po=Cd});var Ed,Ro,yf=p(()=>{"use strict";Wt();ht();Ed=tt(I,"Set"),Ro=Ed});var xf,kd,wf,bf,Sf,vf,Od,Td,Ad,Pd,Rd,he,Ni,Cf=p(()=>{"use strict";df();vo();gf();yf();Vs();fe();Si();xf="[object Map]",kd="[object Object]",wf="[object Promise]",bf="[object Set]",Sf="[object WeakMap]",vf="[object DataView]",Od=Pt(Ao),Td=Pt(qt),Ad=Pt(Po),Pd=Pt(Ro),Rd=Pt(lo),he=et;(Ao&&he(new Ao(new ArrayBuffer(1)))!=vf||qt&&he(new qt)!=xf||Po&&he(Po.resolve())!=wf||Ro&&he(new Ro)!=bf||lo&&he(new lo)!=Sf)&&(he=function(r){var t=et(r),e=t==kd?r.constructor:void 0,o=e?Pt(e):"";if(o)switch(o){case Od:return vf;case Td:return xf;case Ad:return wf;case Pd:return bf;case Rd:return Sf}return t});Ni=he});var _d,$e,Fi=p(()=>{"use strict";ht();_d=I.Uint8Array,$e=_d});function Dd(r){var t=new r.constructor(r.byteLength);return new $e(t).set(new $e(r)),t}var Ef,kf=p(()=>{"use strict";Fi();Ef=Dd});function Md(r,t){var e=t?Ef(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var Of,Tf=p(()=>{"use strict";kf();Of=Md});function Id(r){return typeof r.constructor=="function"&&!Me(r)?Zs(Oo(r)):{}}var Af,Pf=p(()=>{"use strict";Xs();Ii();ho();Af=Id});function Nd(r){return this.__data__.set(r,Ld),this}var Ld,Rf,_f=p(()=>{"use strict";Ld="__lodash_hash_undefined__";Rf=Nd});function Fd(r){return this.__data__.has(r)}var Df,Mf=p(()=>{"use strict";Df=Fd});function _o(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new pe;++t<e;)this.add(r[t])}var If,Lf=p(()=>{"use strict";Co();_f();Mf();_o.prototype.add=_o.prototype.push=Rf;_o.prototype.has=Df;If=_o});function Bd(r,t){for(var e=-1,o=r==null?0:r.length;++e<o;)if(t(r[e],e,r))return!0;return!1}var Nf,Ff=p(()=>{"use strict";Nf=Bd});function jd(r,t){return r.has(t)}var Bf,jf=p(()=>{"use strict";Bf=jd});function Ud(r,t,e,o,i,s){var n=e&Wd,f=r.length,l=t.length;if(f!=l&&!(n&&l>f))return!1;var u=s.get(r),h=s.get(t);if(u&&h)return u==t&&h==r;var d=-1,m=!0,x=e&$d?new If:void 0;for(s.set(r,t),s.set(t,r);++d<f;){var b=r[d],y=t[d];if(o)var C=n?o(y,b,d,t,r,s):o(b,y,d,r,t,s);if(C!==void 0){if(C)continue;m=!1;break}if(x){if(!Nf(t,function(E,T){if(!Bf(x,T)&&(b===E||i(b,E,e,o,s)))return x.push(T)})){m=!1;break}}else if(!(b===y||i(b,y,e,o,s))){m=!1;break}}return s.delete(r),s.delete(t),m}var Wd,$d,Do,Bi=p(()=>{"use strict";Lf();Ff();jf();Wd=1,$d=2;Do=Ud});function Gd(r){var t=-1,e=Array(r.size);return r.forEach(function(o,i){e[++t]=[i,o]}),e}var Wf,$f=p(()=>{"use strict";Wf=Gd});function qd(r){var t=-1,e=Array(r.size);return r.forEach(function(o){e[++t]=o}),e}var Uf,Gf=p(()=>{"use strict";Uf=qd});function ig(r,t,e,o,i,s,n){switch(e){case og:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case rg:return!(r.byteLength!=t.byteLength||!s(new $e(r),new $e(t)));case Kd:case Qd:case Yd:return wt(+r,+t);case Jd:return r.name==t.name&&r.message==t.message;case Zd:case tg:return r==t+"";case Vd:var f=Wf;case Xd:var l=o&zd;if(f||(f=Uf),r.size!=t.size&&!l)return!1;var u=n.get(r);if(u)return u==t;o|=Hd,n.set(r,t);var h=Do(f(r),f(t),o,i,s,n);return n.delete(r),h;case eg:if(ji)return ji.call(r)==ji.call(t)}return!1}var zd,Hd,Kd,Qd,Jd,Vd,Yd,Zd,Xd,tg,eg,rg,og,qf,ji,zf,Hf=p(()=>{"use strict";sr();Fi();Re();Bi();$f();Gf();zd=1,Hd=2,Kd="[object Boolean]",Qd="[object Date]",Jd="[object Error]",Vd="[object Map]",Yd="[object Number]",Zd="[object RegExp]",Xd="[object Set]",tg="[object String]",eg="[object Symbol]",rg="[object ArrayBuffer]",og="[object DataView]",qf=nt?nt.prototype:void 0,ji=qf?qf.valueOf:void 0;zf=ig});function fg(r,t,e,o,i,s){var n=e&sg,f=Li(r),l=f.length,u=Li(t),h=u.length;if(l!=h&&!n)return!1;for(var d=l;d--;){var m=f[d];if(!(n?m in t:ag.call(t,m)))return!1}var x=s.get(r),b=s.get(t);if(x&&b)return x==t&&b==r;var y=!0;s.set(r,t),s.set(t,r);for(var C=n;++d<l;){m=f[d];var E=r[m],T=t[m];if(o)var A=n?o(T,E,m,t,r,s):o(E,T,m,r,t,s);if(!(A===void 0?E===T||i(E,T,e,o,s):A)){y=!1;break}C||(C=m=="constructor")}if(y&&!C){var R=r.constructor,N=t.constructor;R!=N&&"constructor"in r&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof N=="function"&&N instanceof N)&&(y=!1)}return s.delete(r),s.delete(t),y}var sg,ng,ag,Kf,Qf=p(()=>{"use strict";mf();sg=1,ng=Object.prototype,ag=ng.hasOwnProperty;Kf=fg});function pg(r,t,e,o,i,s){var n=D(r),f=D(t),l=n?Vf:Ni(r),u=f?Vf:Ni(t);l=l==Jf?Mo:l,u=u==Jf?Mo:u;var h=l==Mo,d=u==Mo,m=l==u;if(m&&ue(r)){if(!ue(t))return!1;n=!0,h=!1}if(m&&!h)return s||(s=new Kt),n||Ie(r)?Do(r,t,e,o,i,s):zf(r,t,l,e,o,i,s);if(!(e&lg)){var x=h&&Yf.call(r,"__wrapped__"),b=d&&Yf.call(t,"__wrapped__");if(x||b){var y=x?r.value():r,C=b?t.value():t;return s||(s=new Kt),i(y,C,e,o,s)}}return m?(s||(s=new Kt),Kf(r,t,e,o,i,s)):!1}var lg,Jf,Vf,Mo,ug,Yf,Zf,Xf=p(()=>{"use strict";To();Bi();Hf();Qf();Cf();ct();mo();go();lg=1,Jf="[object Arguments]",Vf="[object Array]",Mo="[object Object]",ug=Object.prototype,Yf=ug.hasOwnProperty;Zf=pg});function tl(r,t,e,o,i){return r===t?!0:r==null||t==null||!J(r)&&!J(t)?r!==r&&t!==t:Zf(r,t,e,o,tl,i)}var Io,Wi=p(()=>{"use strict";Xf();jt();Io=tl});function mg(r,t,e,o){var i=e.length,s=i,n=!o;if(r==null)return!s;for(r=Object(r);i--;){var f=e[i];if(n&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<s;){f=e[i];var l=f[0],u=r[l],h=f[1];if(n&&f[2]){if(u===void 0&&!(l in r))return!1}else{var d=new Kt;if(o)var m=o(u,h,l,r,t,d);if(!(m===void 0?Io(h,u,hg|cg,o,d):m))return!1}}return!0}var hg,cg,el,rl=p(()=>{"use strict";To();Wi();hg=1,cg=2;el=mg});function dg(r){return r===r&&!H(r)}var Lo,$i=p(()=>{"use strict";At();Lo=dg});function gg(r){for(var t=Le(r),e=t.length;e--;){var o=t[e],i=r[o];t[e]=[o,i,Lo(i)]}return t}var ol,il=p(()=>{"use strict";$i();wo();ol=gg});function yg(r,t){return function(e){return e==null?!1:e[r]===t&&(t!==void 0||r in Object(e))}}var No,Ui=p(()=>{"use strict";No=yg});function xg(r){var t=ol(r);return t.length==1&&t[0][2]?No(t[0][0],t[0][1]):function(e){return e===r||el(e,r,t)}}var sl,nl=p(()=>{"use strict";rl();il();Ui();sl=xg});function wg(r,t){return r!=null&&t in Object(r)}var al,fl=p(()=>{"use strict";al=wg});function bg(r,t,e){t=Eo(t,r);for(var o=-1,i=t.length,s=!1;++o<i;){var n=Ht(t[o]);if(!(s=r!=null&&e(r,n)))break;r=r[n]}return s||++o!=i?s:(i=r==null?0:r.length,!!i&&_e(i)&&Pe(n,i)&&(D(r)||le(r)))}var ll,ul=p(()=>{"use strict";Di();co();ct();uo();po();cr();ll=bg});function Sg(r,t){return r!=null&&ll(r,t,al)}var pl,hl=p(()=>{"use strict";fl();ul();pl=Sg});function Eg(r,t){return Ne(r)&&Lo(t)?No(Ht(r),t):function(e){var o=La(e,r);return o===void 0&&o===t?pl(e,r):Io(t,o,vg|Cg)}}var vg,Cg,cl,ml=p(()=>{"use strict";Wi();Na();hl();So();$i();Ui();cr();vg=1,Cg=2;cl=Eg});function kg(r){return function(t){return t==null?void 0:t[r]}}var dl,gl=p(()=>{"use strict";dl=kg});function Og(r){return function(t){return ko(t,r)}}var yl,xl=p(()=>{"use strict";Mi();yl=Og});function Tg(r){return Ne(r)?dl(Ht(r)):yl(r)}var wl,bl=p(()=>{"use strict";gl();xl();So();cr();wl=Tg});function Ag(r){return typeof r=="function"?r:r==null?Oe:typeof r=="object"?D(r)?cl(r[0],r[1]):sl(r):wl(r)}var Sl,vl=p(()=>{"use strict";nl();ml();no();ct();bl();Sl=Ag});function Pg(r,t,e,o){for(var i=-1,s=r==null?0:r.length;++i<s;){var n=r[i];t(o,n,e(n),r)}return o}var Cl,El=p(()=>{"use strict";Cl=Pg});function Rg(r){return function(t,e,o){for(var i=-1,s=Object(t),n=o(t),f=n.length;f--;){var l=n[r?f:++i];if(e(s[l],l,s)===!1)break}return t}}var kl,Ol=p(()=>{"use strict";kl=Rg});var _g,Fo,Gi=p(()=>{"use strict";Ol();_g=kl(),Fo=_g});function Dg(r,t){return r&&Fo(r,t,Le)}var Tl,Al=p(()=>{"use strict";Gi();wo();Tl=Dg});function Mg(r,t){return function(e,o){if(e==null)return e;if(!bt(e))return r(e,o);for(var i=e.length,s=t?i:-1,n=Object(e);(t?s--:++s<i)&&o(n[s],s,n)!==!1;);return e}}var Pl,Rl=p(()=>{"use strict";De();Pl=Mg});var Ig,_l,Dl=p(()=>{"use strict";Al();Rl();Ig=Pl(Tl),_l=Ig});function Lg(r,t,e,o){return _l(r,function(i,s,n){t(o,i,e(i),n)}),o}var Ml,Il=p(()=>{"use strict";Dl();Ml=Lg});function Ng(r,t){return function(e,o){var i=D(e)?Cl:Ml,s=t?t():{};return i(e,r,Sl(o,2),s)}}var Ll,Nl=p(()=>{"use strict";El();Il();vl();ct();Ll=Ng});function Fg(r,t,e){(e!==void 0&&!wt(r[t],e)||e===void 0&&!(t in r))&&$t(r,t,e)}var mr,qi=p(()=>{"use strict";ar();Re();mr=Fg});function Bg(r){return J(r)&&bt(r)}var Fl,Bl=p(()=>{"use strict";De();jt();Fl=Bg});function jg(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var dr,zi=p(()=>{"use strict";dr=jg});function Wg(r){return dn(r,bo(r))}var jl,Wl=p(()=>{"use strict";gn();Ai();jl=Wg});function $g(r,t,e,o,i,s,n){var f=dr(r,e),l=dr(t,e),u=n.get(l);if(u){mr(r,e,u);return}var h=s?s(f,l,e+"",r,t,n):void 0,d=h===void 0;if(d){var m=D(l),x=!m&&ue(l),b=!m&&!x&&Ie(l);h=l,m||x||b?D(f)?h=f:Fl(f)?h=rn(f):x?(d=!1,h=rf(l,!0)):b?(d=!1,h=Of(l,!0)):h=[]:Wa(l)||le(l)?(h=f,le(f)?h=jl(f):(!H(f)||Te(f))&&(h=Af(l))):d=!1}d&&(n.set(l,h),i(h,l,o,s,n),n.delete(l)),mr(r,e,h)}var $l,Ul=p(()=>{"use strict";qi();of();Tf();on();Pf();co();ct();Bl();mo();ao();At();$a();go();zi();Wl();$l=$g});function Gl(r,t,e,o,i){r!==t&&Fo(t,function(s,n){if(i||(i=new Kt),H(s))$l(r,t,n,e,Gl,o,i);else{var f=o?o(dr(r,n),s,n+"",r,t,i):void 0;f===void 0&&(f=s),mr(r,n,f)}},bo)}var ql,zl=p(()=>{"use strict";To();qi();Gi();Ul();At();Ai();zi();ql=Gl});var Ug,Gg,qg,Bo,Hl=p(()=>{"use strict";ar();Nl();Ug=Object.prototype,Gg=Ug.hasOwnProperty,qg=Ll(function(r,t,e){Gg.call(r,e)?r[e].push(t):$t(r,e,[t])}),Bo=qg});var zg,Hi,Kl=p(()=>{"use strict";zl();kn();zg=En(function(r,t,e){ql(r,t,e)}),Hi=zg});var ce=p(()=>{"use strict";Hl();_i();Kl();});function Wo(r,t,e){let i=`${t?"\u2705":"\u274C"} ${r} ${t?"succeeded":"failed"}`;t?O.success(i,e):O.error(i,e)}function F(r,t,e){let o={...e!=null?e:{},error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t};O.error(r,o)}function St(r,t,e){O.withTag(r).debug(t,e)}function Ql(r){return O.withTag(r)}function $o(r,t,e){O.withTag(r).warn(t,e)}var Qt=p(()=>{"use strict";ae();ae()});var nu=ks((tO,su)=>{"use strict";su.exports=ou;function ou(r,t,e){r instanceof RegExp&&(r=ru(r,e)),t instanceof RegExp&&(t=ru(t,e));var o=iu(r,t,e);return o&&{start:o[0],end:o[1],pre:e.slice(0,o[0]),body:e.slice(o[0]+r.length,o[1]),post:e.slice(o[1]+t.length)}}function ru(r,t){var e=t.match(r);return e?e[0]:null}ou.range=iu;function iu(r,t,e){var o,i,s,n,f,l=e.indexOf(r),u=e.indexOf(t,l+1),h=l;if(l>=0&&u>0){if(r===t)return[l,u];for(o=[],s=e.length;h>=0&&!f;)h==l?(o.push(h),l=e.indexOf(r,h+1)):o.length==1?f=[o.pop(),u]:(i=o.pop(),i<s&&(s=i,n=u),u=e.indexOf(t,h+1)),h=l<u&&l>=0?l:u;o.length&&(f=[s,n])}return f}});var mu=ks((eO,cu)=>{"use strict";var au=nu();cu.exports=ty;var fu="\0SLASH"+Math.random()+"\0",lu="\0OPEN"+Math.random()+"\0",Qi="\0CLOSE"+Math.random()+"\0",uu="\0COMMA"+Math.random()+"\0",pu="\0PERIOD"+Math.random()+"\0";function Ki(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function Zg(r){return r.split("\\\\").join(fu).split("\\{").join(lu).split("\\}").join(Qi).split("\\,").join(uu).split("\\.").join(pu)}function Xg(r){return r.split(fu).join("\\").split(lu).join("{").split(Qi).join("}").split(uu).join(",").split(pu).join(".")}function hu(r){if(!r)return[""];var t=[],e=au("{","}",r);if(!e)return r.split(",");var o=e.pre,i=e.body,s=e.post,n=o.split(",");n[n.length-1]+="{"+i+"}";var f=hu(s);return s.length&&(n[n.length-1]+=f.shift(),n.push.apply(n,f)),t.push.apply(t,n),t}function ty(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),gr(Zg(r),!0).map(Xg)):[]}function ey(r){return"{"+r+"}"}function ry(r){return/^-?0\d/.test(r)}function oy(r,t){return r<=t}function iy(r,t){return r>=t}function gr(r,t){var e=[],o=au("{","}",r);if(!o)return[r];var i=o.pre,s=o.post.length?gr(o.post,!1):[""];if(/\$$/.test(o.pre))for(var n=0;n<s.length;n++){var f=i+"{"+o.body+"}"+s[n];e.push(f)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),h=l||u,d=o.body.indexOf(",")>=0;if(!h&&!d)return o.post.match(/,.*\}/)?(r=o.pre+"{"+o.body+Qi+o.post,gr(r)):[r];var m;if(h)m=o.body.split(/\.\./);else if(m=hu(o.body),m.length===1&&(m=gr(m[0],!1).map(ey),m.length===1))return s.map(function(Bp){return o.pre+m[0]+Bp});var x;if(h){var b=Ki(m[0]),y=Ki(m[1]),C=Math.max(m[0].length,m[1].length),E=m.length==3?Math.abs(Ki(m[2])):1,T=oy,A=y<b;A&&(E*=-1,T=iy);var R=m.some(ry);x=[];for(var N=b;T(N,y);N+=E){var st;if(u)st=String.fromCharCode(N),st==="\\"&&(st="");else if(st=String(N),R){var vs=C-st.length;if(vs>0){var Cs=new Array(vs+1).join("0");N<0?st="-"+Cs+st.slice(1):st=Cs+st}}x.push(st)}}else{x=[];for(var ne=0;ne<m.length;ne++)x.push.apply(x,gr(m[ne],!1))}for(var ne=0;ne<x.length;ne++)for(var n=0;n<s.length;n++){var f=i+x[ne]+s[n];(!t||h||f)&&e.push(f)}}return e}});function dx(r,t){if(r instanceof se)throw F("Command execution failed",r,{command:r.command,originalError:r.originalError}),r;if(r instanceof Error){let o=new se(r.message,t,r);throw F("Failed to execute command",r,{command:t,stack:r.stack}),o}let e=new se("Unknown error occurred during command execution",t);throw F("Failed to execute command",null,{error:r,command:t}),e}async function Tp(r,t={}){if(!r||typeof r!="string")throw new se("Command must be a non-empty string",r);let e={encoding:"utf8",maxBuffer:5*1024*1024,timeout:3e4};try{let{stdout:o,stderr:i}=await mx(r,{...e,...t}),s=o.trim();if(!s)throw i?new se(`Command failed with stderr: ${i}`,r):new se("Command returned empty result",r);return s}catch(o){dx(o,r)}}var kp,Op,mx,se,Ap=p(()=>{"use strict";kp=require("child_process"),Op=require("util");Qt();mx=(0,Op.promisify)(kp.exec),se=class extends Error{constructor(e,o,i){super(e);this.command=o;this.originalError=i;this.name="CommandExecutionError"}}});var Pp={};zp(Pp,{getChromePassword:()=>yx});var gx,yx,Rp=p(()=>{"use strict";ce();Ap();gx=async()=>Tp('security find-generic-password -w -s "Chrome Safe Storage"'),yx=at(gx)});function Os(r){if(!r)return[];try{let t=[],o=new URL(r).hostname,i=o.split(".");t.push({name:"%",domain:o});for(let s=1;s<i.length-1;s++)t.push({name:"%",domain:`%.${i.slice(s).join(".")}`}),t.push({name:"%",domain:i.slice(s).join(".")});return t}catch(t){throw t instanceof TypeError?new Error("Invalid URL"):t}}var Ts=require("util");function oo(r){let{values:t,positionals:e}=(0,Ts.parseArgs)({args:r,options:{browser:{type:"string",short:"b"},profile:{type:"string",short:"p"},url:{type:"string",short:"u"},domain:{type:"string",short:"d"},name:{type:"string",short:"n"},help:{type:"boolean",short:"h"},version:{type:"boolean",short:"v"},verbose:{type:"boolean"}},allowPositionals:!0});return{values:t,positionals:e}}ae();ce();async function jo(r,t,e=[]){return r.length===0?e:(await Promise.all(r.map(async i=>{try{return await t(i)}catch(s){return e}}))).flat()}ae();Qt();var Xl=require("fs"),qo=require("path"),tu=ir(require("fast-glob"),1);Qt();var Yl=require("path");ce();var Jl={};Hi(Jl,process.env);var Uo=Jl.HOME;if(typeof Uo!="string"||Uo.length===0)throw new Error("HOME environment variable is not set or empty");var Vl,Ue=(0,Yl.join)((Vl=Uo)!=null?Vl:"","Library","Application Support","Google","Chrome");var Zl=ir(require("better-sqlite3"),1);ce();Qt();var Hg=at(r=>{try{return Promise.resolve(new Zl.default(r,{readonly:!0}))}catch(t){throw F("Database open failed",t,{file:r}),t}});function Kg(r){try{return r.close(),Promise.resolve()}catch(t){return F("Database close failed",t),Promise.reject(t instanceof Error?t:new Error("Failed to close database: Unknown error"))}}async function Go({file:r,sql:t,params:e,rowFilter:o,rowTransform:i}){let s;try{s=await Hg(r);let f=s.prepare(t).all(e),l=o?f.filter(o):f;return i?l.map(i):l}catch(n){throw F("Database query failed",n,{file:r,sql:t}),n}finally{s&&await Kg(s)}}function Qg(r){if(typeof r!="string")return!1;let t=r.trim();return t.length===0?!1:(0,Xl.existsSync)(t)}async function Jg(){let r=[(0,qo.join)(Ue,"Default/Cookies"),(0,qo.join)(Ue,"Profile */Cookies"),(0,qo.join)(Ue,"Profile Default/Cookies")],t=[];for(let e of r){let o=await(0,tu.default)(e);t.push(...o)}return St("ChromeCookies","Found cookie files",{count:t.length,files:t}),t}function Vg(r,t){let e=r==="%",o=e?"SELECT name, encrypted_value, host_key, expires_utc FROM cookies WHERE host_key LIKE ?":"SELECT name, encrypted_value, host_key, expires_utc FROM cookies WHERE name = ? AND host_key LIKE ?",i=e?[`%${t}%`]:[r,`%${t}%`];return{sql:o,params:i}}async function Yg(r,t,e){try{let{sql:o,params:i}=Vg(t,e);St("ChromeCookies","Executing query",{sql:o,params:i});let s=await Go({file:r,sql:o,params:i,rowTransform:n=>({name:n.name,domain:n.host_key,value:n.encrypted_value,expiry:n.expires_utc})});return Wo("QueryCookies",!0,{file:r,count:s.length}),s}catch(o){return F("Failed to read cookie file",o,{file:r}),[]}}async function eu({name:r,domain:t,file:e}){let o=typeof e=="string"&&e.length>0?[e]:await Jg();if(o.length===0)return St("ChromeCookies","No cookie files found"),[];let i=[];for(let s of o){if(!Qg(s)){St("ChromeCookies","Cookie file missing or invalid",{file:s});continue}let n=await Yg(s,r,t);i.push(...n)}return St("ChromeCookies","Query complete",{totalCookies:i.length}),i}var Eu=ir(mu(),1);var yr=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")};var sy={"[: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]},xr=r=>r.replace(/[[\]\\-]/g,"\\$&"),ny=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),du=r=>r.join(""),gu=(r,t)=>{let e=t;if(r.charAt(e)!=="[")throw new Error("not in a brace expression");let o=[],i=[],s=e+1,n=!1,f=!1,l=!1,u=!1,h=e,d="";t:for(;s<r.length;){let y=r.charAt(s);if((y==="!"||y==="^")&&s===e+1){u=!0,s++;continue}if(y==="]"&&n&&!l){h=s+1;break}if(n=!0,y==="\\"&&!l){l=!0,s++;continue}if(y==="["&&!l){for(let[C,[E,T,A]]of Object.entries(sy))if(r.startsWith(C,s)){if(d)return["$.",!1,r.length-e,!0];s+=C.length,A?i.push(E):o.push(E),f=f||T;continue t}}if(l=!1,d){y>d?o.push(xr(d)+"-"+xr(y)):y===d&&o.push(xr(y)),d="",s++;continue}if(r.startsWith("-]",s+1)){o.push(xr(y+"-")),s+=2;continue}if(r.startsWith("-",s+1)){d=y,s+=2;continue}o.push(xr(y)),s++}if(h<s)return["",!1,0,!1];if(!o.length&&!i.length)return["$.",!1,r.length-e,!0];if(i.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!u){let y=o[0].length===2?o[0].slice(-1):o[0];return[ny(y),!1,h-e,!1]}let m="["+(u?"^":"")+du(o)+"]",x="["+(u?"":"^")+du(i)+"]";return[o.length&&i.length?"("+m+"|"+x+")":o.length?m:x,f,h-e,!0]};var mt=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var ay=new Set(["!","?","+","*","@"]),yu=r=>ay.has(r),fy="(?!(?:^|/)\\.\\.?(?:$|/))",zo="(?!\\.)",ly=new Set(["[","."]),uy=new Set(["..","."]),py=new Set("().*{}+?[]^$\\!"),hy=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Vi="[^/]",xu=Vi+"*?",wu=Vi+"+?",B,W,_t,_,L,Jt,me,Vt,vt,de,wr,ge,bu,Yt,Ho,Ji,Su,V=class V{constructor(t,e,o={}){w(this,ge);c(this,"type");w(this,B);w(this,W);w(this,_t,!1);w(this,_,[]);w(this,L);w(this,Jt);w(this,me);w(this,Vt,!1);w(this,vt);w(this,de);w(this,wr,!1);this.type=t,t&&g(this,W,!0),g(this,L,e),g(this,B,a(this,L)?a(a(this,L),B):this),g(this,vt,a(this,B)===this?o:a(a(this,B),vt)),g(this,me,a(this,B)===this?[]:a(a(this,B),me)),t==="!"&&!a(a(this,B),Vt)&&a(this,me).push(this),g(this,Jt,a(this,L)?a(a(this,L),_).length:0)}get hasMagic(){if(a(this,W)!==void 0)return a(this,W);for(let t of a(this,_))if(typeof t!="string"&&(t.type||t.hasMagic))return g(this,W,!0);return a(this,W)}toString(){return a(this,de)!==void 0?a(this,de):this.type?g(this,de,this.type+"("+a(this,_).map(t=>String(t)).join("|")+")"):g(this,de,a(this,_).map(t=>String(t)).join(""))}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof V&&a(e,L)===this))throw new Error("invalid part: "+e);a(this,_).push(e)}}toJSON(){var e;let t=this.type===null?a(this,_).slice().map(o=>typeof o=="string"?o:o.toJSON()):[this.type,...a(this,_).map(o=>o.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===a(this,B)||a(a(this,B),Vt)&&((e=a(this,L))==null?void 0:e.type)==="!")&&t.push({}),t}isStart(){var e;if(a(this,B)===this)return!0;if(!((e=a(this,L))!=null&&e.isStart()))return!1;if(a(this,Jt)===0)return!0;let t=a(this,L);for(let o=0;o<a(this,Jt);o++){let i=a(t,_)[o];if(!(i instanceof V&&i.type==="!"))return!1}return!0}isEnd(){var e,o,i;if(a(this,B)===this||((e=a(this,L))==null?void 0:e.type)==="!")return!0;if(!((o=a(this,L))!=null&&o.isEnd()))return!1;if(!this.type)return(i=a(this,L))==null?void 0:i.isEnd();let t=a(this,L)?a(a(this,L),_).length:0;return a(this,Jt)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new V(this.type,t);for(let o of a(this,_))e.copyIn(o);return e}static fromGlob(t,e={}){var i;let o=new V(null,void 0,e);return S(i=V,Yt,Ho).call(i,t,o,0,e),o}toMMPattern(){if(this!==a(this,B))return a(this,B).toMMPattern();let t=this.toString(),[e,o,i,s]=this.toRegExpSource();if(!(i||a(this,W)||a(this,vt).nocase&&!a(this,vt).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;let f=(a(this,vt).nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${e}$`,f),{_src:e,_glob:t})}get options(){return a(this,vt)}toRegExpSource(t){var l;let e=t!=null?t:!!a(this,vt).dot;if(a(this,B)===this&&S(this,ge,bu).call(this),!this.type){let u=this.isStart()&&this.isEnd(),h=a(this,_).map(b=>{var A;let[y,C,E,T]=typeof b=="string"?S(A=V,Yt,Su).call(A,b,a(this,W),u):b.toRegExpSource(t);return g(this,W,a(this,W)||E),g(this,_t,a(this,_t)||T),y}).join(""),d="";if(this.isStart()&&typeof a(this,_)[0]=="string"&&!(a(this,_).length===1&&uy.has(a(this,_)[0]))){let y=ly,C=e&&y.has(h.charAt(0))||h.startsWith("\\.")&&y.has(h.charAt(2))||h.startsWith("\\.\\.")&&y.has(h.charAt(4)),E=!e&&!t&&y.has(h.charAt(0));d=C?fy:E?zo:""}let m="";return this.isEnd()&&a(a(this,B),Vt)&&((l=a(this,L))==null?void 0:l.type)==="!"&&(m="(?:$|\\/)"),[d+h+m,mt(h),g(this,W,!!a(this,W)),a(this,_t)]}let o=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=S(this,ge,Ji).call(this,e);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString();return g(this,_,[u]),this.type=null,g(this,W,void 0),[u,mt(this.toString()),!1,!1]}let n=!o||t||e||!zo?"":S(this,ge,Ji).call(this,!0);n===s&&(n=""),n&&(s=`(?:${s})(?:${n})*?`);let f="";if(this.type==="!"&&a(this,wr))f=(this.isStart()&&!e?zo:"")+wu;else{let u=this.type==="!"?"))"+(this.isStart()&&!e&&!t?zo:"")+xu+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&n?")":this.type==="*"&&n?")?":`)${this.type}`;f=i+s+u}return[f,mt(s),g(this,W,!!a(this,W)),a(this,_t)]}};B=new WeakMap,W=new WeakMap,_t=new WeakMap,_=new WeakMap,L=new WeakMap,Jt=new WeakMap,me=new WeakMap,Vt=new WeakMap,vt=new WeakMap,de=new WeakMap,wr=new WeakMap,ge=new WeakSet,bu=function(){if(this!==a(this,B))throw new Error("should only call on root");if(a(this,Vt))return this;this.toString(),g(this,Vt,!0);let t;for(;t=a(this,me).pop();){if(t.type!=="!")continue;let e=t,o=a(e,L);for(;o;){for(let i=a(e,Jt)+1;!o.type&&i<a(o,_).length;i++)for(let s of a(t,_)){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(a(o,_)[i])}e=o,o=a(e,L)}}return this},Yt=new WeakSet,Ho=function(t,e,o,i){var x,b;let s=!1,n=!1,f=-1,l=!1;if(e.type===null){let y=o,C="";for(;y<t.length;){let E=t.charAt(y++);if(s||E==="\\"){s=!s,C+=E;continue}if(n){y===f+1?(E==="^"||E==="!")&&(l=!0):E==="]"&&!(y===f+2&&l)&&(n=!1),C+=E;continue}else if(E==="["){n=!0,f=y,l=!1,C+=E;continue}if(!i.noext&&yu(E)&&t.charAt(y)==="("){e.push(C),C="";let T=new V(E,e);y=S(x=V,Yt,Ho).call(x,t,T,y,i),e.push(T);continue}C+=E}return e.push(C),y}let u=o+1,h=new V(null,e),d=[],m="";for(;u<t.length;){let y=t.charAt(u++);if(s||y==="\\"){s=!s,m+=y;continue}if(n){u===f+1?(y==="^"||y==="!")&&(l=!0):y==="]"&&!(u===f+2&&l)&&(n=!1),m+=y;continue}else if(y==="["){n=!0,f=u,l=!1,m+=y;continue}if(yu(y)&&t.charAt(u)==="("){h.push(m),m="";let C=new V(y,h);h.push(C),u=S(b=V,Yt,Ho).call(b,t,C,u,i);continue}if(y==="|"){h.push(m),m="",d.push(h),h=new V(null,e);continue}if(y===")")return m===""&&a(e,_).length===0&&g(e,wr,!0),h.push(m),m="",e.push(...d,h),u;m+=y}return e.type=null,g(e,W,void 0),g(e,_,[t.substring(o-1)]),u},Ji=function(t){return a(this,_).map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[o,i,s,n]=e.toRegExpSource(t);return g(this,_t,a(this,_t)||n),o}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")},Su=function(t,e,o=!1){let i=!1,s="",n=!1;for(let f=0;f<t.length;f++){let l=t.charAt(f);if(i){i=!1,s+=(py.has(l)?"\\":"")+l;continue}if(l==="\\"){f===t.length-1?s+="\\\\":i=!0;continue}if(l==="["){let[u,h,d,m]=gu(t,f);if(d){s+=u,n=n||h,f+=d-1,e=e||m;continue}}if(l==="*"){o&&t==="*"?s+=wu:s+=xu,e=!0;continue}if(l==="?"){s+=Vi,e=!0;continue}s+=hy(l)}return[s,mt(t),!!e,n]},w(V,Yt);var Ge=V;var qe=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");var Y=(r,t,e={})=>(yr(t),!e.nocomment&&t.charAt(0)==="#"?!1:new rt(t,e).match(r)),cy=/^\*+([^+@!?\*\[\(]*)$/,my=r=>t=>!t.startsWith(".")&&t.endsWith(r),dy=r=>t=>t.endsWith(r),gy=r=>(r=r.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(r)),yy=r=>(r=r.toLowerCase(),t=>t.toLowerCase().endsWith(r)),xy=/^\*+\.\*+$/,wy=r=>!r.startsWith(".")&&r.includes("."),by=r=>r!=="."&&r!==".."&&r.includes("."),Sy=/^\.\*+$/,vy=r=>r!=="."&&r!==".."&&r.startsWith("."),Cy=/^\*+$/,Ey=r=>r.length!==0&&!r.startsWith("."),ky=r=>r.length!==0&&r!=="."&&r!=="..",Oy=/^\?+([^+@!?\*\[\(]*)?$/,Ty=([r,t=""])=>{let e=ku([r]);return t?(t=t.toLowerCase(),o=>e(o)&&o.toLowerCase().endsWith(t)):e},Ay=([r,t=""])=>{let e=Ou([r]);return t?(t=t.toLowerCase(),o=>e(o)&&o.toLowerCase().endsWith(t)):e},Py=([r,t=""])=>{let e=Ou([r]);return t?o=>e(o)&&o.endsWith(t):e},Ry=([r,t=""])=>{let e=ku([r]);return t?o=>e(o)&&o.endsWith(t):e},ku=([r])=>{let t=r.length;return e=>e.length===t&&!e.startsWith(".")},Ou=([r])=>{let t=r.length;return e=>e.length===t&&e!=="."&&e!==".."},Tu=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",vu={win32:{sep:"\\"},posix:{sep:"/"}},_y=Tu==="win32"?vu.win32.sep:vu.posix.sep;Y.sep=_y;var z=Symbol("globstar **");Y.GLOBSTAR=z;var Dy="[^/]",My=Dy+"*?",Iy="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ly="(?:(?!(?:\\/|^)\\.).)*?",Ny=(r,t={})=>e=>Y(e,r,t);Y.filter=Ny;var ft=(r,t={})=>Object.assign({},r,t),Fy=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return Y;let t=Y;return Object.assign((o,i,s={})=>t(o,i,ft(r,s)),{Minimatch:class extends t.Minimatch{constructor(i,s={}){super(i,ft(r,s))}static defaults(i){return t.defaults(ft(r,i)).Minimatch}},AST:class extends t.AST{constructor(i,s,n={}){super(i,s,ft(r,n))}static fromGlob(i,s={}){return t.AST.fromGlob(i,ft(r,s))}},unescape:(o,i={})=>t.unescape(o,ft(r,i)),escape:(o,i={})=>t.escape(o,ft(r,i)),filter:(o,i={})=>t.filter(o,ft(r,i)),defaults:o=>t.defaults(ft(r,o)),makeRe:(o,i={})=>t.makeRe(o,ft(r,i)),braceExpand:(o,i={})=>t.braceExpand(o,ft(r,i)),match:(o,i,s={})=>t.match(o,i,ft(r,s)),sep:t.sep,GLOBSTAR:z})};Y.defaults=Fy;var Au=(r,t={})=>(yr(r),t.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:(0,Eu.default)(r));Y.braceExpand=Au;var By=(r,t={})=>new rt(r,t).makeRe();Y.makeRe=By;var jy=(r,t,e={})=>{let o=new rt(t,e);return r=r.filter(i=>o.match(i)),o.options.nonull&&!r.length&&r.push(t),r};Y.match=jy;var Cu=/[?*]|[+@!]\(.*?\)|\[|\]/,Wy=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),rt=class{constructor(t,e={}){c(this,"options");c(this,"set");c(this,"pattern");c(this,"windowsPathsNoEscape");c(this,"nonegate");c(this,"negate");c(this,"comment");c(this,"empty");c(this,"preserveMultipleSlashes");c(this,"partial");c(this,"globSet");c(this,"globParts");c(this,"nocase");c(this,"isWindows");c(this,"platform");c(this,"windowsNoMagicRoot");c(this,"regexp");yr(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Tu,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let o=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,n,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Cu.test(s[2]))&&!Cu.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let n=this.set[s];n[0]===""&&n[1]===""&&this.globParts[s][2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])&&(n[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let o=0;o<t.length;o++)for(let i=0;i<t[o].length;i++)t[o][i]==="**"&&(t[o][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let o=-1;for(;(o=e.indexOf("**",o+1))!==-1;){let i=o;for(;e[i+1]==="**";)i++;i!==o&&e.splice(o,i-o)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((o,i)=>{let s=o[o.length-1];return i==="**"&&s==="**"?o:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(o.pop(),o):(o.push(i),o)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let o=0;for(;(o=t.indexOf("..",o+1))!==-1;){let i=t[o-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(o-1,2),o-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let o of t){let i=-1;for(;(i=o.indexOf("**",i+1))!==-1;){let n=i;for(;o[n+1]==="**";)n++;n>i&&o.splice(i+1,n-i);let f=o[i+1],l=o[i+2],u=o[i+3];if(f!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;e=!0,o.splice(i,1);let h=o.slice(0);h[i]="**",t.push(h),i--}if(!this.preserveMultipleSlashes){for(let n=1;n<o.length-1;n++){let f=o[n];n===1&&f===""&&o[0]===""||(f==="."||f==="")&&(e=!0,o.splice(n,1),n--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(e=!0,o.pop())}let s=0;for(;(s=o.indexOf("..",s+1))!==-1;){let n=o[s-1];if(n&&n!=="."&&n!==".."&&n!=="**"){e=!0;let l=s===1&&o[s+1]==="**"?["."]:[];o.splice(s-1,2,...l),o.length===0&&o.push(""),s-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let o=e+1;o<t.length;o++){let i=this.partsMatch(t[e],t[o],!this.preserveMultipleSlashes);if(i){t[e]=[],t[o]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,o=!1){let i=0,s=0,n=[],f="";for(;i<t.length&&s<e.length;)if(t[i]===e[s])n.push(f==="b"?e[s]:t[i]),i++,s++;else if(o&&t[i]==="**"&&e[s]===t[i+1])n.push(t[i]),i++;else if(o&&e[s]==="**"&&t[i]===e[s+1])n.push(e[s]),s++;else if(t[i]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(f==="b")return!1;f="a",n.push(t[i]),i++,s++}else if(e[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(f==="a")return!1;f="b",n.push(e[s]),i++,s++}else return!1;return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,o=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,o++;o&&(this.pattern=t.slice(o)),this.negate=e}matchOne(t,e,o=!1){let i=this.options;if(this.isWindows){let y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),C=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),T=!E&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),A=C?3:y?0:void 0,R=T?3:E?0:void 0;if(typeof A=="number"&&typeof R=="number"){let[N,st]=[t[A],e[R]];N.toLowerCase()===st.toLowerCase()&&(e[R]=N,R>A?e=e.slice(R):A>R&&(t=t.slice(A)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,f=0,l=t.length,u=e.length;n<l&&f<u;n++,f++){this.debug("matchOne loop");var h=e[f],d=t[n];if(this.debug(e,h,d),h===!1)return!1;if(h===z){this.debug("GLOBSTAR",[e,h,d]);var m=n,x=f+1;if(x===u){for(this.debug("** at the end");n<l;n++)if(t[n]==="."||t[n]===".."||!i.dot&&t[n].charAt(0)===".")return!1;return!0}for(;m<l;){var b=t[m];if(this.debug(`
3
- globstar while`,t,m,e,x,b),this.matchOne(t.slice(m),e.slice(x),o))return this.debug("globstar found match!",m,l,b),!0;if(b==="."||b===".."||!i.dot&&b.charAt(0)==="."){this.debug("dot detected!",t,m,e,x);break}this.debug("globstar swallow a segment, and continue"),m++}return!!(o&&(this.debug(`
4
- >>> no match, partial?`,t,m,e,x),m===l))}let y;if(typeof h=="string"?(y=d===h,this.debug("string match",h,d,y)):(y=h.test(d),this.debug("pattern match",h,d,y)),!y)return!1}if(n===l&&f===u)return!0;if(n===l)return o;if(f===u)return n===l-1&&t[n]==="";throw new Error("wtf?")}braceExpand(){return Au(this.pattern,this.options)}parse(t){yr(t);let e=this.options;if(t==="**")return z;if(t==="")return"";let o,i=null;(o=t.match(Cy))?i=e.dot?ky:Ey:(o=t.match(cy))?i=(e.nocase?e.dot?yy:gy:e.dot?dy:my)(o[1]):(o=t.match(Oy))?i=(e.nocase?e.dot?Ay:Ty:e.dot?Py:Ry)(o):(o=t.match(xy))?i=e.dot?by:wy:(o=t.match(Sy))&&(i=vy);let s=Ge.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,o=e.noglobstar?My:e.dot?Iy:Ly,i=new Set(e.nocase?["i"]:[]),s=t.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let d of h.flags.split(""))i.add(d);return typeof h=="string"?Wy(h):h===z?z:h._src});return u.forEach((h,d)=>{let m=u[d+1],x=u[d-1];h!==z||x===z||(x===void 0?m!==void 0&&m!==z?u[d+1]="(?:\\/|"+o+"\\/)?"+m:u[d]=o:m===void 0?u[d-1]=x+"(?:\\/|"+o+")?":m!==z&&(u[d-1]=x+"(?:\\/|\\/"+o+"\\/)"+m,u[d+1]=z))}),u.filter(h=>h!==z).join("/")}).join("|"),[n,f]=t.length>1?["(?:",")"]:["",""];s="^"+n+s+f+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch(l){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let o=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let n=i[i.length-1];if(!n)for(let f=i.length-2;!n&&f>=0;f--)n=i[f];for(let f=0;f<s.length;f++){let l=s[f],u=i;if(o.matchBase&&l.length===1&&(u=[n]),this.matchOne(u,l,e))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(t){return Y.defaults(t).Minimatch}};Y.AST=Ge;Y.Minimatch=rt;Y.escape=qe;Y.unescape=mt;var yp=require("url");var cs=require("lru-cache"),Ye=require("path"),op=require("url"),Tt=require("fs"),Vy=ir(require("fs"),1),ee=require("fs/promises");var Xo=require("events"),os=ir(require("stream"),1),Zu=require("string_decoder");var Pu=typeof process=="object"&&process?process:{stdout:null,stderr:null},$y=r=>!!r&&typeof r=="object"&&(r instanceof Xt||r instanceof os.default||Uy(r)||Gy(r)),Uy=r=>!!r&&typeof r=="object"&&r instanceof Xo.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==os.default.Writable.prototype.pipe,Gy=r=>!!r&&typeof r=="object"&&r instanceof Xo.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",Dt=Symbol("EOF"),Mt=Symbol("maybeEmitEnd"),Zt=Symbol("emittedEnd"),Ko=Symbol("emittingEnd"),br=Symbol("emittedError"),Qo=Symbol("closed"),Ru=Symbol("read"),Jo=Symbol("flush"),_u=Symbol("flushChunk"),dt=Symbol("encoding"),ze=Symbol("decoder"),$=Symbol("flowing"),Sr=Symbol("paused"),He=Symbol("resume"),U=Symbol("buffer"),Z=Symbol("pipes"),G=Symbol("bufferLength"),Yi=Symbol("bufferPush"),Vo=Symbol("bufferShift"),K=Symbol("objectMode"),M=Symbol("destroyed"),Zi=Symbol("error"),Xi=Symbol("emitData"),Du=Symbol("emitEnd"),ts=Symbol("emitEnd2"),Ct=Symbol("async"),es=Symbol("abort"),Yo=Symbol("aborted"),vr=Symbol("signal"),ye=Symbol("dataListeners"),ot=Symbol("discarded"),Cr=r=>Promise.resolve().then(r),qy=r=>r(),zy=r=>r==="end"||r==="finish"||r==="prefinish",Hy=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,Ky=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),Zo=class{constructor(t,e,o){c(this,"src");c(this,"dest");c(this,"opts");c(this,"ondrain");this.src=t,this.dest=e,this.opts=o,this.ondrain=()=>t[He](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},rs=class extends Zo{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,o){super(t,e,o),this.proxyErrors=i=>e.emit("error",i),t.on("error",this.proxyErrors)}},Qy=r=>!!r.objectMode,Jy=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",Mu,Iu,Lu,Nu,Fu,Bu,ju,Wu,$u,Uu,Gu,qu,zu,Hu,Ku,Qu,Ju,Vu,Yu,Xt=class extends Xo.EventEmitter{constructor(...e){let o=e[0]||{};super();c(this,Yu,!1);c(this,Vu,!1);c(this,Ju,[]);c(this,Qu,[]);c(this,Ku);c(this,Hu);c(this,zu);c(this,qu);c(this,Gu,!1);c(this,Uu,!1);c(this,$u,!1);c(this,Wu,!1);c(this,ju,null);c(this,Bu,0);c(this,Fu,!1);c(this,Nu);c(this,Lu,!1);c(this,Iu,0);c(this,Mu,!1);c(this,"writable",!0);c(this,"readable",!0);if(o.objectMode&&typeof o.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Qy(o)?(this[K]=!0,this[dt]=null):Jy(o)?(this[dt]=o.encoding,this[K]=!1):(this[K]=!1,this[dt]=null),this[Ct]=!!o.async,this[ze]=this[dt]?new Zu.StringDecoder(this[dt]):null,o&&o.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[U]}),o&&o.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Z]});let{signal:i}=o;i&&(this[vr]=i,i.aborted?this[es]():i.addEventListener("abort",()=>this[es]()))}get bufferLength(){return this[G]}get encoding(){return this[dt]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[K]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Ct]}set async(e){this[Ct]=this[Ct]||!!e}[(Yu=$,Vu=Sr,Ju=Z,Qu=U,Ku=K,Hu=dt,zu=Ct,qu=ze,Gu=Dt,Uu=Zt,$u=Ko,Wu=Qo,ju=br,Bu=G,Fu=M,Nu=vr,Lu=Yo,Iu=ye,Mu=ot,es)](){var e,o;this[Yo]=!0,this.emit("abort",(e=this[vr])==null?void 0:e.reason),this.destroy((o=this[vr])==null?void 0:o.reason)}get aborted(){return this[Yo]}set aborted(e){}write(e,o,i){var n;if(this[Yo])return!1;if(this[Dt])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof o=="function"&&(i=o,o="utf8"),o||(o="utf8");let s=this[Ct]?Cr:qy;if(!this[K]&&!Buffer.isBuffer(e)){if(Ky(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Hy(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[K]?(this[$]&&this[G]!==0&&this[Jo](!0),this[$]?this.emit("data",e):this[Yi](e),this[G]!==0&&this.emit("readable"),i&&s(i),this[$]):e.length?(typeof e=="string"&&!(o===this[dt]&&!((n=this[ze])!=null&&n.lastNeed))&&(e=Buffer.from(e,o)),Buffer.isBuffer(e)&&this[dt]&&(e=this[ze].write(e)),this[$]&&this[G]!==0&&this[Jo](!0),this[$]?this.emit("data",e):this[Yi](e),this[G]!==0&&this.emit("readable"),i&&s(i),this[$]):(this[G]!==0&&this.emit("readable"),i&&s(i),this[$])}read(e){if(this[M])return null;if(this[ot]=!1,this[G]===0||e===0||e&&e>this[G])return this[Mt](),null;this[K]&&(e=null),this[U].length>1&&!this[K]&&(this[U]=[this[dt]?this[U].join(""):Buffer.concat(this[U],this[G])]);let o=this[Ru](e||null,this[U][0]);return this[Mt](),o}[Ru](e,o){if(this[K])this[Vo]();else{let i=o;e===i.length||e===null?this[Vo]():typeof i=="string"?(this[U][0]=i.slice(e),o=i.slice(0,e),this[G]-=e):(this[U][0]=i.subarray(e),o=i.subarray(0,e),this[G]-=e)}return this.emit("data",o),!this[U].length&&!this[Dt]&&this.emit("drain"),o}end(e,o,i){return typeof e=="function"&&(i=e,e=void 0),typeof o=="function"&&(i=o,o="utf8"),e!==void 0&&this.write(e,o),i&&this.once("end",i),this[Dt]=!0,this.writable=!1,(this[$]||!this[Sr])&&this[Mt](),this}[He](){this[M]||(!this[ye]&&!this[Z].length&&(this[ot]=!0),this[Sr]=!1,this[$]=!0,this.emit("resume"),this[U].length?this[Jo]():this[Dt]?this[Mt]():this.emit("drain"))}resume(){return this[He]()}pause(){this[$]=!1,this[Sr]=!0,this[ot]=!1}get destroyed(){return this[M]}get flowing(){return this[$]}get paused(){return this[Sr]}[Yi](e){this[K]?this[G]+=1:this[G]+=e.length,this[U].push(e)}[Vo](){return this[K]?this[G]-=1:this[G]-=this[U][0].length,this[U].shift()}[Jo](e=!1){do;while(this[_u](this[Vo]())&&this[U].length);!e&&!this[U].length&&!this[Dt]&&this.emit("drain")}[_u](e){return this.emit("data",e),this[$]}pipe(e,o){if(this[M])return e;this[ot]=!1;let i=this[Zt];return o=o||{},e===Pu.stdout||e===Pu.stderr?o.end=!1:o.end=o.end!==!1,o.proxyErrors=!!o.proxyErrors,i?o.end&&e.end():(this[Z].push(o.proxyErrors?new rs(this,e,o):new Zo(this,e,o)),this[Ct]?Cr(()=>this[He]()):this[He]()),e}unpipe(e){let o=this[Z].find(i=>i.dest===e);o&&(this[Z].length===1?(this[$]&&this[ye]===0&&(this[$]=!1),this[Z]=[]):this[Z].splice(this[Z].indexOf(o),1),o.unpipe())}addListener(e,o){return this.on(e,o)}on(e,o){let i=super.on(e,o);if(e==="data")this[ot]=!1,this[ye]++,!this[Z].length&&!this[$]&&this[He]();else if(e==="readable"&&this[G]!==0)super.emit("readable");else if(zy(e)&&this[Zt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[br]){let s=o;this[Ct]?Cr(()=>s.call(this,this[br])):s.call(this,this[br])}return i}removeListener(e,o){return this.off(e,o)}off(e,o){let i=super.off(e,o);return e==="data"&&(this[ye]=this.listeners("data").length,this[ye]===0&&!this[ot]&&!this[Z].length&&(this[$]=!1)),i}removeAllListeners(e){let o=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[ye]=0,!this[ot]&&!this[Z].length&&(this[$]=!1)),o}get emittedEnd(){return this[Zt]}[Mt](){!this[Ko]&&!this[Zt]&&!this[M]&&this[U].length===0&&this[Dt]&&(this[Ko]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Qo]&&this.emit("close"),this[Ko]=!1)}emit(e,...o){let i=o[0];if(e!=="error"&&e!=="close"&&e!==M&&this[M])return!1;if(e==="data")return!this[K]&&!i?!1:this[Ct]?(Cr(()=>this[Xi](i)),!0):this[Xi](i);if(e==="end")return this[Du]();if(e==="close"){if(this[Qo]=!0,!this[Zt]&&!this[M])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[br]=i,super.emit(Zi,i);let n=!this[vr]||this.listeners("error").length?super.emit("error",i):!1;return this[Mt](),n}else if(e==="resume"){let n=super.emit("resume");return this[Mt](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let s=super.emit(e,...o);return this[Mt](),s}[Xi](e){for(let i of this[Z])i.dest.write(e)===!1&&this.pause();let o=this[ot]?!1:super.emit("data",e);return this[Mt](),o}[Du](){return this[Zt]?!1:(this[Zt]=!0,this.readable=!1,this[Ct]?(Cr(()=>this[ts]()),!0):this[ts]())}[ts](){if(this[ze]){let o=this[ze].end();if(o){for(let i of this[Z])i.dest.write(o);this[ot]||super.emit("data",o)}}for(let o of this[Z])o.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[K]||(e.dataLength=0);let o=this.promise();return this.on("data",i=>{e.push(i),this[K]||(e.dataLength+=i.length)}),await o,e}async concat(){if(this[K])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[dt]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,o)=>{this.on(M,()=>o(new Error("stream destroyed"))),this.on("error",i=>o(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ot]=!1;let e=!1,o=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return o();let s=this.read();if(s!==null)return Promise.resolve({done:!1,value:s});if(this[Dt])return o();let n,f,l=m=>{this.off("data",u),this.off("end",h),this.off(M,d),o(),f(m)},u=m=>{this.off("error",l),this.off("end",h),this.off(M,d),this.pause(),n({value:m,done:!!this[Dt]})},h=()=>{this.off("error",l),this.off("data",u),this.off(M,d),o(),n({done:!0,value:void 0})},d=()=>l(new Error("stream destroyed"));return new Promise((m,x)=>{f=x,n=m,this.once(M,d),this.once("error",l),this.once("end",h),this.once("data",u)})},throw:o,return:o,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ot]=!1;let e=!1,o=()=>(this.pause(),this.off(Zi,o),this.off(M,o),this.off("end",o),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return o();let s=this.read();return s===null?o():{done:!1,value:s}};return this.once("end",o),this.once(Zi,o),this.once(M,o),{next:i,throw:o,return:o,[Symbol.iterator](){return this}}}destroy(e){if(this[M])return e?this.emit("error",e):this.emit(M),this;this[M]=!0,this[ot]=!0,this[U].length=0,this[G]=0;let o=this;return typeof o.close=="function"&&!this[Qo]&&o.close(),e?this.emit("error",e):this.emit(M),this}static get isStream(){return $y}};var Yy=Tt.realpathSync.native,kr={lstatSync:Tt.lstatSync,readdir:Tt.readdir,readdirSync:Tt.readdirSync,readlinkSync:Tt.readlinkSync,realpathSync:Yy,promises:{lstat:ee.lstat,readdir:ee.readdir,readlink:ee.readlink,realpath:ee.realpath}},ip=r=>!r||r===kr||r===Vy?kr:{...kr,...r,promises:{...kr.promises,...r.promises||{}}},sp=/^\\\\\?\\([a-z]:)\\?$/i,Zy=r=>r.replace(/\//g,"\\").replace(sp,"$1\\"),Xy=/[\\\/]/,ut=0,np=1,ap=2,Et=4,fp=6,lp=8,xe=10,up=12,lt=15,Er=~lt,is=16,Xu=32,Or=64,gt=128,ti=256,ri=512,tp=Or|gt|ri,tx=1023,ss=r=>r.isFile()?lp:r.isDirectory()?Et:r.isSymbolicLink()?xe:r.isCharacterDevice()?ap:r.isBlockDevice()?fp:r.isSocket()?up:r.isFIFO()?np:ut,ep=new Map,Tr=r=>{let t=ep.get(r);if(t)return t;let e=r.normalize("NFKD");return ep.set(r,e),e},rp=new Map,ei=r=>{let t=rp.get(r);if(t)return t;let e=Tr(r.toLowerCase());return rp.set(r,e),e},ni=class extends cs.LRUCache{constructor(){super({max:256})}},ns=class extends cs.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},pp=Symbol("PathScurry setAsCwd"),X,_r,Dr,Mr,Ir,Lr,Nr,Fr,Br,jr,Wr,$r,Ur,Gr,qr,zr,Hr,Kr,Qr,te,we,kt,It,Lt,Nt,k,be,Ft,Ot,v,as,oi,Ar,fs,ls,Pr,ii,us,ps,si,hp,cp,mp,hs,Ke,Qe,dp,Se,Q=class{constructor(t,e=ut,o,i,s,n,f){w(this,v);c(this,"name");c(this,"root");c(this,"roots");c(this,"parent");c(this,"nocase");c(this,"isCWD",!1);w(this,X);w(this,_r);w(this,Dr);w(this,Mr);w(this,Ir);w(this,Lr);w(this,Nr);w(this,Fr);w(this,Br);w(this,jr);w(this,Wr);w(this,$r);w(this,Ur);w(this,Gr);w(this,qr);w(this,zr);w(this,Hr);w(this,Kr);w(this,Qr);w(this,te);w(this,we);w(this,kt);w(this,It);w(this,Lt);w(this,Nt);w(this,k);w(this,be);w(this,Ft);w(this,Ot);w(this,Ke,[]);w(this,Qe,!1);w(this,Se);this.name=t,g(this,te,s?ei(t):Tr(t)),g(this,k,e&tx),this.nocase=s,this.roots=i,this.root=o||this,g(this,be,n),g(this,kt,f.fullpath),g(this,Lt,f.relative),g(this,Nt,f.relativePosix),this.parent=f.parent,this.parent?g(this,X,a(this.parent,X)):g(this,X,ip(f.fs))}get dev(){return a(this,_r)}get mode(){return a(this,Dr)}get nlink(){return a(this,Mr)}get uid(){return a(this,Ir)}get gid(){return a(this,Lr)}get rdev(){return a(this,Nr)}get blksize(){return a(this,Fr)}get ino(){return a(this,Br)}get size(){return a(this,jr)}get blocks(){return a(this,Wr)}get atimeMs(){return a(this,$r)}get mtimeMs(){return a(this,Ur)}get ctimeMs(){return a(this,Gr)}get birthtimeMs(){return a(this,qr)}get atime(){return a(this,zr)}get mtime(){return a(this,Hr)}get ctime(){return a(this,Kr)}get birthtime(){return a(this,Qr)}get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}depth(){return a(this,we)!==void 0?a(this,we):this.parent?g(this,we,this.parent.depth()+1):g(this,we,0)}childrenCache(){return a(this,be)}resolve(t){var n;if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?S(n=this.getRoot(e),v,as).call(n,i):S(this,v,as).call(this,i)}children(){let t=a(this,be).get(this);if(t)return t;let e=Object.assign([],{provisional:0});return a(this,be).set(this,e),g(this,k,a(this,k)&~is),e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let o=this.children(),i=this.nocase?ei(t):Tr(t);for(let l of o)if(a(l,te)===i)return l;let s=this.parent?this.sep:"",n=a(this,kt)?a(this,kt)+s+t:void 0,f=this.newChild(t,ut,{...e,parent:this,fullpath:n});return this.canReaddir()||g(f,k,a(f,k)|gt),o.push(f),f}relative(){if(this.isCWD)return"";if(a(this,Lt)!==void 0)return a(this,Lt);let t=this.name,e=this.parent;if(!e)return g(this,Lt,this.name);let o=e.relative();return o+(!o||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(a(this,Nt)!==void 0)return a(this,Nt);let t=this.name,e=this.parent;if(!e)return g(this,Nt,this.fullpathPosix());let o=e.relativePosix();return o+(!o||!e.parent?"":"/")+t}fullpath(){if(a(this,kt)!==void 0)return a(this,kt);let t=this.name,e=this.parent;if(!e)return g(this,kt,this.name);let i=e.fullpath()+(e.parent?this.sep:"")+t;return g(this,kt,i)}fullpathPosix(){if(a(this,It)!==void 0)return a(this,It);if(this.sep==="/")return g(this,It,this.fullpath());if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?g(this,It,`//?/${i}`):g(this,It,i)}let t=this.parent,e=t.fullpathPosix(),o=e+(!e||!t.parent?"":"/")+this.name;return g(this,It,o)}isUnknown(){return(a(this,k)&lt)===ut}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(a(this,k)&lt)===lp}isDirectory(){return(a(this,k)&lt)===Et}isCharacterDevice(){return(a(this,k)&lt)===ap}isBlockDevice(){return(a(this,k)&lt)===fp}isFIFO(){return(a(this,k)&lt)===np}isSocket(){return(a(this,k)&lt)===up}isSymbolicLink(){return(a(this,k)&xe)===xe}lstatCached(){return a(this,k)&Xu?this:void 0}readlinkCached(){return a(this,Ft)}realpathCached(){return a(this,Ot)}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(a(this,Ft))return!0;if(!this.parent)return!1;let t=a(this,k)&lt;return!(t!==ut&&t!==xe||a(this,k)&ti||a(this,k)&gt)}calledReaddir(){return!!(a(this,k)&is)}isENOENT(){return!!(a(this,k)&gt)}isNamed(t){return this.nocase?a(this,te)===ei(t):a(this,te)===Tr(t)}async readlink(){var e;let t=a(this,Ft);if(t)return t;if(this.canReadlink()&&this.parent)try{let o=await a(this,X).promises.readlink(this.fullpath()),i=(e=await this.parent.realpath())==null?void 0:e.resolve(o);if(i)return g(this,Ft,i)}catch(o){S(this,v,ps).call(this,o.code);return}}readlinkSync(){var e;let t=a(this,Ft);if(t)return t;if(this.canReadlink()&&this.parent)try{let o=a(this,X).readlinkSync(this.fullpath()),i=(e=this.parent.realpathSync())==null?void 0:e.resolve(o);if(i)return g(this,Ft,i)}catch(o){S(this,v,ps).call(this,o.code);return}}async lstat(){if(!(a(this,k)&gt))try{return S(this,v,hs).call(this,await a(this,X).promises.lstat(this.fullpath())),this}catch(t){S(this,v,us).call(this,t.code)}}lstatSync(){if(!(a(this,k)&gt))try{return S(this,v,hs).call(this,a(this,X).lstatSync(this.fullpath())),this}catch(t){S(this,v,us).call(this,t.code)}}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let o=this.children();if(this.calledReaddir()){let s=o.slice(0,o.provisional);e?t(null,s):queueMicrotask(()=>t(null,s));return}if(a(this,Ke).push(t),a(this,Qe))return;g(this,Qe,!0);let i=this.fullpath();a(this,X).readdir(i,{withFileTypes:!0},(s,n)=>{if(s)S(this,v,ii).call(this,s.code),o.provisional=0;else{for(let f of n)S(this,v,si).call(this,f,o);S(this,v,oi).call(this,o)}S(this,v,dp).call(this,o.slice(0,o.provisional))})}async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(a(this,Se))await a(this,Se);else{let o=()=>{};g(this,Se,new Promise(i=>o=i));try{for(let i of await a(this,X).promises.readdir(e,{withFileTypes:!0}))S(this,v,si).call(this,i,t);S(this,v,oi).call(this,t)}catch(i){S(this,v,ii).call(this,i.code),t.provisional=0}g(this,Se,void 0),o()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let o of a(this,X).readdirSync(e,{withFileTypes:!0}))S(this,v,si).call(this,o,t);S(this,v,oi).call(this,t)}catch(o){S(this,v,ii).call(this,o.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(a(this,k)&tp)return!1;let t=lt&a(this,k);return t===ut||t===Et||t===xe}shouldWalk(t,e){return(a(this,k)&Et)===Et&&!(a(this,k)&tp)&&!t.has(this)&&(!e||e(this))}async realpath(){if(a(this,Ot))return a(this,Ot);if(!((ri|ti|gt)&a(this,k)))try{let t=await a(this,X).promises.realpath(this.fullpath());return g(this,Ot,this.resolve(t))}catch(t){S(this,v,ls).call(this)}}realpathSync(){if(a(this,Ot))return a(this,Ot);if(!((ri|ti|gt)&a(this,k)))try{let t=a(this,X).realpathSync(this.fullpath());return g(this,Ot,this.resolve(t))}catch(t){S(this,v,ls).call(this)}}[pp](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),o=[],i=this;for(;i&&i.parent;)e.add(i),g(i,Lt,o.join(this.sep)),g(i,Nt,o.join("/")),i=i.parent,o.push("..");for(i=t;i&&i.parent&&!e.has(i);)g(i,Lt,void 0),g(i,Nt,void 0),i=i.parent}};X=new WeakMap,_r=new WeakMap,Dr=new WeakMap,Mr=new WeakMap,Ir=new WeakMap,Lr=new WeakMap,Nr=new WeakMap,Fr=new WeakMap,Br=new WeakMap,jr=new WeakMap,Wr=new WeakMap,$r=new WeakMap,Ur=new WeakMap,Gr=new WeakMap,qr=new WeakMap,zr=new WeakMap,Hr=new WeakMap,Kr=new WeakMap,Qr=new WeakMap,te=new WeakMap,we=new WeakMap,kt=new WeakMap,It=new WeakMap,Lt=new WeakMap,Nt=new WeakMap,k=new WeakMap,be=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,v=new WeakSet,as=function(t){let e=this;for(let o of t)e=e.child(o);return e},oi=function(t){var e;g(this,k,a(this,k)|is);for(let o=t.provisional;o<t.length;o++){let i=t[o];i&&S(e=i,v,Ar).call(e)}},Ar=function(){a(this,k)&gt||(g(this,k,(a(this,k)|gt)&Er),S(this,v,fs).call(this))},fs=function(){var e;let t=this.children();t.provisional=0;for(let o of t)S(e=o,v,Ar).call(e)},ls=function(){g(this,k,a(this,k)|ri),S(this,v,Pr).call(this)},Pr=function(){if(a(this,k)&Or)return;let t=a(this,k);(t&lt)===Et&&(t&=Er),g(this,k,t|Or),S(this,v,fs).call(this)},ii=function(t=""){t==="ENOTDIR"||t==="EPERM"?S(this,v,Pr).call(this):t==="ENOENT"?S(this,v,Ar).call(this):this.children().provisional=0},us=function(t=""){var e;if(t==="ENOTDIR"){let o=this.parent;S(e=o,v,Pr).call(e)}else t==="ENOENT"&&S(this,v,Ar).call(this)},ps=function(t=""){var o;let e=a(this,k);e|=ti,t==="ENOENT"&&(e|=gt),(t==="EINVAL"||t==="UNKNOWN")&&(e&=Er),g(this,k,e),t==="ENOTDIR"&&this.parent&&S(o=this.parent,v,Pr).call(o)},si=function(t,e){return S(this,v,cp).call(this,t,e)||S(this,v,hp).call(this,t,e)},hp=function(t,e){let o=ss(t),i=this.newChild(t.name,o,{parent:this}),s=a(i,k)&lt;return s!==Et&&s!==xe&&s!==ut&&g(i,k,a(i,k)|Or),e.unshift(i),e.provisional++,i},cp=function(t,e){for(let o=e.provisional;o<e.length;o++){let i=e[o];if((this.nocase?ei(t.name):Tr(t.name))===a(i,te))return S(this,v,mp).call(this,t,i,o,e)}},mp=function(t,e,o,i){let s=e.name;return g(e,k,a(e,k)&Er|ss(t)),s!==t.name&&(e.name=t.name),o!==i.provisional&&(o===i.length-1?i.pop():i.splice(o,1),i.unshift(e)),i.provisional++,e},hs=function(t){let{atime:e,atimeMs:o,birthtime:i,birthtimeMs:s,blksize:n,blocks:f,ctime:l,ctimeMs:u,dev:h,gid:d,ino:m,mode:x,mtime:b,mtimeMs:y,nlink:C,rdev:E,size:T,uid:A}=t;g(this,zr,e),g(this,$r,o),g(this,Qr,i),g(this,qr,s),g(this,Fr,n),g(this,Wr,f),g(this,Kr,l),g(this,Gr,u),g(this,_r,h),g(this,Lr,d),g(this,Br,m),g(this,Dr,x),g(this,Hr,b),g(this,Ur,y),g(this,Mr,C),g(this,Nr,E),g(this,jr,T),g(this,Ir,A);let R=ss(t);g(this,k,a(this,k)&Er|R|Xu),R!==ut&&R!==Et&&R!==xe&&g(this,k,a(this,k)|Or)},Ke=new WeakMap,Qe=new WeakMap,dp=function(t){g(this,Qe,!1);let e=a(this,Ke).slice();a(this,Ke).length=0,e.forEach(o=>o(null,t))},Se=new WeakMap;var ai=class r extends Q{constructor(e,o=ut,i,s,n,f,l){super(e,o,i,s,n,f,l);c(this,"sep","\\");c(this,"splitSep",Xy)}newChild(e,o=ut,i={}){return new r(e,o,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Ye.win32.parse(e).root}getRoot(e){if(e=Zy(e.toUpperCase()),e===this.root.name)return this.root;for(let[o,i]of Object.entries(this.roots))if(this.sameRoot(e,o))return this.roots[e]=i;return this.roots[e]=new Ze(e,this).root}sameRoot(e,o=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(sp,"$1\\"),e===o}},fi=class r extends Q{constructor(e,o=ut,i,s,n,f,l){super(e,o,i,s,n,f,l);c(this,"splitSep","/");c(this,"sep","/")}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,o=ut,i={}){return new r(e,o,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Je,Ve,Jr,Vr,li=class{constructor(t=process.cwd(),e,o,{nocase:i,childrenCacheSize:s=16*1024,fs:n=kr}={}){c(this,"root");c(this,"rootPath");c(this,"roots");c(this,"cwd");w(this,Je);w(this,Ve);w(this,Jr);c(this,"nocase");w(this,Vr);g(this,Vr,ip(n)),(t instanceof URL||t.startsWith("file://"))&&(t=(0,op.fileURLToPath)(t));let f=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(f),g(this,Je,new ni),g(this,Ve,new ni),g(this,Jr,new ns(s));let l=f.substring(this.rootPath.length).split(o);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(a(this,Vr)),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,d=e.sep,m=this.rootPath,x=!1;for(let b of l){let y=h--;u=u.child(b,{relative:new Array(y).fill("..").join(d),relativePosix:new Array(y).fill("..").join("/"),fullpath:m+=(x?"":d)+b}),x=!0}this.cwd=u}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return a(this,Jr)}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){let n=t[s];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let o=a(this,Je).get(e);if(o!==void 0)return o;let i=this.cwd.resolve(e).fullpath();return a(this,Je).set(e,i),i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){let n=t[s];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let o=a(this,Ve).get(e);if(o!==void 0)return o;let i=this.cwd.resolve(e).fullpathPosix();return a(this,Ve).set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o}=e;if(t.canReaddir()){let i=await t.readdir();return o?i:i.map(s=>s.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0}=e;return t.canReaddir()?o?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=await t.readlink();return e?o:o==null?void 0:o.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=t.readlinkSync();return e?o:o==null?void 0:o.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=await t.realpath();return e?o:o==null?void 0:o.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=t.realpathSync();return e?o:o==null?void 0:o.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=[];(!s||s(t))&&f.push(o?t:t.fullpath());let l=new Set,u=(d,m)=>{l.add(d),d.readdirCB((x,b)=>{if(x)return m(x);let y=b.length;if(!y)return m();let C=()=>{--y===0&&m()};for(let E of b)(!s||s(E))&&f.push(o?E:E.fullpath()),i&&E.isSymbolicLink()?E.realpath().then(T=>T!=null&&T.isUnknown()?T.lstat():T).then(T=>T!=null&&T.shouldWalk(l,n)?u(T,C):C()):E.shouldWalk(l,n)?u(E,C):C()},!0)},h=t;return new Promise((d,m)=>{u(h,x=>{if(x)return m(x);d(f)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=[];(!s||s(t))&&f.push(o?t:t.fullpath());let l=new Set([t]);for(let u of l){let h=u.readdirSync();for(let d of h){(!s||s(d))&&f.push(o?d:d.fullpath());let m=d;if(d.isSymbolicLink()){if(!(i&&(m=d.realpathSync())))continue;m.isUnknown()&&m.lstatSync()}m.shouldWalk(l,n)&&l.add(m)}}return f}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e;(!s||s(t))&&(yield o?t:t.fullpath());let f=new Set([t]);for(let l of f){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield o?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(i&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(f,n)&&f.add(d)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=new Xt({objectMode:!0});(!s||s(t))&&f.write(o?t:t.fullpath());let l=new Set,u=[t],h=0,d=()=>{let m=!1;for(;!m;){let x=u.shift();if(!x){h===0&&f.end();return}h++,l.add(x);let b=(C,E,T=!1)=>{if(C)return f.emit("error",C);if(i&&!T){let A=[];for(let R of E)R.isSymbolicLink()&&A.push(R.realpath().then(N=>N!=null&&N.isUnknown()?N.lstat():N));if(A.length){Promise.all(A).then(()=>b(null,E,!0));return}}for(let A of E)A&&(!s||s(A))&&(f.write(o?A:A.fullpath())||(m=!0));h--;for(let A of E){let R=A.realpathCached()||A;R.shouldWalk(l,n)&&u.push(R)}m&&!f.flowing?f.once("drain",d):y||d()},y=!0;x.readdirCB(b,!0),y=!1}};return d(),f}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=new Xt({objectMode:!0}),l=new Set;(!s||s(t))&&f.write(o?t:t.fullpath());let u=[t],h=0,d=()=>{let m=!1;for(;!m;){let x=u.shift();if(!x){h===0&&f.end();return}h++,l.add(x);let b=x.readdirSync();for(let y of b)(!s||s(y))&&(f.write(o?y:y.fullpath())||(m=!0));h--;for(let y of b){let C=y;if(y.isSymbolicLink()){if(!(i&&(C=y.realpathSync())))continue;C.isUnknown()&&C.lstatSync()}C.shouldWalk(l,n)&&u.push(C)}}m&&!f.flowing&&f.once("drain",d)};return d(),f}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[pp](e)}};Je=new WeakMap,Ve=new WeakMap,Jr=new WeakMap,Vr=new WeakMap;var Ze=class extends li{constructor(e=process.cwd(),o={}){let{nocase:i=!0}=o;super(e,Ye.win32,"\\",{...o,nocase:i});c(this,"sep","\\");this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return Ye.win32.parse(e).root.toUpperCase()}newRoot(e){return new ai(this.rootPath,Et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Xe=class extends li{constructor(e=process.cwd(),o={}){let{nocase:i=!1}=o;super(e,Ye.posix,"/",{...o,nocase:i});c(this,"sep","/");this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new fi(this.rootPath,Et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Rr=class extends Xe{constructor(t=process.cwd(),e={}){let{nocase:o=!0}=e;super(t,{...e,nocase:o})}},EO=process.platform==="win32"?ai:fi,gp=process.platform==="win32"?Ze:process.platform==="darwin"?Rr:Xe;var ex=r=>r.length>=1,rx=r=>r.length>=1,j,it,q,ve,yt,Yr,re,oe,ie,tr,ms=class ms{constructor(t,e,o,i){w(this,j);w(this,it);w(this,q);c(this,"length");w(this,ve);w(this,yt);w(this,Yr);w(this,re);w(this,oe);w(this,ie);w(this,tr,!0);if(!ex(t))throw new TypeError("empty pattern list");if(!rx(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,o<0||o>=this.length)throw new TypeError("index out of range");if(g(this,j,t),g(this,it,e),g(this,q,o),g(this,ve,i),a(this,q)===0){if(this.isUNC()){let[s,n,f,l,...u]=a(this,j),[h,d,m,x,...b]=a(this,it);u[0]===""&&(u.shift(),b.shift());let y=[s,n,f,l,""].join("/"),C=[h,d,m,x,""].join("/");g(this,j,[y,...u]),g(this,it,[C,...b]),this.length=a(this,j).length}else if(this.isDrive()||this.isAbsolute()){let[s,...n]=a(this,j),[f,...l]=a(this,it);n[0]===""&&(n.shift(),l.shift());let u=s+"/",h=f+"/";g(this,j,[u,...n]),g(this,it,[h,...l]),this.length=a(this,j).length}}}pattern(){return a(this,j)[a(this,q)]}isString(){return typeof a(this,j)[a(this,q)]=="string"}isGlobstar(){return a(this,j)[a(this,q)]===z}isRegExp(){return a(this,j)[a(this,q)]instanceof RegExp}globString(){return g(this,Yr,a(this,Yr)||(a(this,q)===0?this.isAbsolute()?a(this,it)[0]+a(this,it).slice(1).join("/"):a(this,it).join("/"):a(this,it).slice(a(this,q)).join("/")))}hasMore(){return this.length>a(this,q)+1}rest(){return a(this,yt)!==void 0?a(this,yt):this.hasMore()?(g(this,yt,new ms(a(this,j),a(this,it),a(this,q)+1,a(this,ve))),g(a(this,yt),ie,a(this,ie)),g(a(this,yt),oe,a(this,oe)),g(a(this,yt),re,a(this,re)),a(this,yt)):g(this,yt,null)}isUNC(){let t=a(this,j);return a(this,oe)!==void 0?a(this,oe):g(this,oe,a(this,ve)==="win32"&&a(this,q)===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3])}isDrive(){let t=a(this,j);return a(this,re)!==void 0?a(this,re):g(this,re,a(this,ve)==="win32"&&a(this,q)===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]))}isAbsolute(){let t=a(this,j);return a(this,ie)!==void 0?a(this,ie):g(this,ie,t[0]===""&&t.length>1||this.isDrive()||this.isUNC())}root(){let t=a(this,j)[0];return typeof t=="string"&&this.isAbsolute()&&a(this,q)===0?t:""}checkFollowGlobstar(){return!(a(this,q)===0||!this.isGlobstar()||!a(this,tr))}markFollowGlobstar(){return a(this,q)===0||!this.isGlobstar()||!a(this,tr)?!1:(g(this,tr,!1),!0)}};j=new WeakMap,it=new WeakMap,q=new WeakMap,ve=new WeakMap,yt=new WeakMap,Yr=new WeakMap,re=new WeakMap,oe=new WeakMap,ie=new WeakMap,tr=new WeakMap;var er=ms;var ox=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",rr=class{constructor(t,{nobrace:e,nocase:o,noext:i,noglobstar:s,platform:n=ox}){c(this,"relative");c(this,"relativeChildren");c(this,"absolute");c(this,"absoluteChildren");c(this,"platform");c(this,"mmopts");this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=n,this.mmopts={dot:!0,nobrace:e,nocase:o,noext:i,noglobstar:s,optimizationLevel:2,platform:n,nocomment:!0,nonegate:!0};for(let f of t)this.add(f)}add(t){let e=new rt(t,this.mmopts);for(let o=0;o<e.set.length;o++){let i=e.set[o],s=e.globParts[o];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let n=new er(i,s,0,this.platform),f=new rt(n.globString(),this.mmopts),l=s[s.length-1]==="**",u=n.isAbsolute();u?this.absolute.push(f):this.relative.push(f),l&&(u?this.absoluteChildren.push(f):this.relativeChildren.push(f))}}ignored(t){let e=t.fullpath(),o=`${e}/`,i=t.relative()||".",s=`${i}/`;for(let n of this.relative)if(n.match(i)||n.match(s))return!0;for(let n of this.absolute)if(n.match(e)||n.match(o))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",o=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(o))return!0;for(let i of this.absoluteChildren)if(i.match(e))return!0;return!1}};var ds=class r{constructor(t=new Map){c(this,"store");this.store=t}copy(){return new r(new Map(this.store))}hasWalked(t,e){var o;return(o=this.store.get(t.fullpath()))==null?void 0:o.has(e.globString())}storeWalked(t,e){let o=t.fullpath(),i=this.store.get(o);i?i.add(e.globString()):this.store.set(o,new Set([e.globString()]))}},gs=class{constructor(){c(this,"store",new Map)}add(t,e,o){let i=(e?2:0)|(o?1:0),s=this.store.get(t);this.store.set(t,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},ys=class{constructor(){c(this,"store",new Map)}add(t,e){if(!t.canReaddir())return;let o=this.store.get(t);o?o.find(i=>i.globString()===e.globString())||o.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Zr=class r{constructor(t,e){c(this,"hasWalkedCache");c(this,"matches",new gs);c(this,"subwalks",new ys);c(this,"patterns");c(this,"follow");c(this,"dot");c(this,"opts");this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new ds}processPatterns(t,e){this.patterns=e;let o=e.map(i=>[t,i]);for(let[i,s]of o){this.hasWalkedCache.storeWalked(i,s);let n=s.root(),f=s.isAbsolute()&&this.opts.absolute!==!1;if(n){i=i.resolve(n==="/"&&this.opts.root!==void 0?this.opts.root:n);let d=s.rest();if(d)s=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),f,d);continue}else if(l===z){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let d=u==null?void 0:u.pattern(),m=u==null?void 0:u.rest();if(!u||(d===""||d===".")&&!m)this.matches.add(i,f,d===""||d===".");else if(d===".."){let x=i.parent||i;m?this.hasWalkedCache.hasWalked(x,m)||this.subwalks.add(x,m):this.matches.add(x,f,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(t,e){let o=this.subwalks.get(t),i=this.child();for(let s of e)for(let n of o){let f=n.isAbsolute(),l=n.pattern(),u=n.rest();l===z?i.testGlobstar(s,n,u,f):l instanceof RegExp?i.testRegExp(s,l,u,f):i.testString(s,l,u,f)}return i}testGlobstar(t,e,o,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(o&&e.checkFollowGlobstar()?this.subwalks.add(t,o):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),o){let s=o.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(t,s,o.rest(),i);else if(s===".."){let n=t.parent||t;this.subwalks.add(n,o)}else s instanceof RegExp&&this.testRegExp(t,s,o.rest(),i)}}testRegExp(t,e,o,i){e.test(t.name)&&(o?this.subwalks.add(t,o):this.matches.add(t,i,!1))}testString(t,e,o,i){t.isNamed(e)&&(o?this.subwalks.add(t,o):this.matches.add(t,i,!1))}};var ix=(r,t)=>typeof r=="string"?new rr([r],t):Array.isArray(r)?new rr(r,t):r,or,Bt,Ee,pt,Ce,xs,ui=class{constructor(t,e,o){w(this,pt);c(this,"path");c(this,"patterns");c(this,"opts");c(this,"seen",new Set);c(this,"paused",!1);c(this,"aborted",!1);w(this,or,[]);w(this,Bt);w(this,Ee);c(this,"signal");c(this,"maxDepth");c(this,"includeChildMatches");var i;if(this.patterns=t,this.path=e,this.opts=o,g(this,Ee,!o.posix&&o.platform==="win32"?"\\":"/"),this.includeChildMatches=o.includeChildMatches!==!1,(o.ignore||!this.includeChildMatches)&&(g(this,Bt,ix((i=o.ignore)!=null?i:[],o)),!this.includeChildMatches&&typeof a(this,Bt).add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=o.maxDepth||1/0,o.signal&&(this.signal=o.signal,this.signal.addEventListener("abort",()=>{a(this,or).length=0}))}pause(){this.paused=!0}resume(){var e;if((e=this.signal)!=null&&e.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=a(this,or).shift());)t()}onResume(t){var e;(e=this.signal)!=null&&e.aborted||(this.paused?a(this,or).push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let o;if(this.opts.realpath){if(o=t.realpathCached()||await t.realpath(),!o)return;t=o}let s=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let n=await s.realpath();n&&(n.isUnknown()||this.opts.stat)&&await n.lstat()}return this.matchCheckTest(s,e)}matchCheckTest(t,e){var o;return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!((o=t.realpathCached())!=null&&o.isDirectory()))&&!S(this,pt,Ce).call(this,t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let o;if(this.opts.realpath){if(o=t.realpathCached()||t.realpathSync(),!o)return;t=o}let s=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let n=s.realpathSync();n&&(n!=null&&n.isUnknown()||this.opts.stat)&&n.lstatSync()}return this.matchCheckTest(s,e)}matchFinish(t,e){var s;if(S(this,pt,Ce).call(this,t))return;if(!this.includeChildMatches&&((s=a(this,Bt))!=null&&s.add)){let n=`${t.relativePosix()}/**`;a(this,Bt).add(n)}let o=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?a(this,Ee):"";if(this.opts.withFileTypes)this.matchEmit(t);else if(o){let n=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(n+i)}else{let n=this.opts.posix?t.relativePosix():t.relative(),f=this.opts.dotRelative&&!n.startsWith(".."+a(this,Ee))?"."+a(this,Ee):"";this.matchEmit(n?f+n+i:"."+i)}}async match(t,e,o){let i=await this.matchCheck(t,o);i&&this.matchFinish(i,e)}matchSync(t,e,o){let i=this.matchCheckSync(t,o);i&&this.matchFinish(i,e)}walkCB(t,e,o){var i;(i=this.signal)!=null&&i.aborted&&o(),this.walkCB2(t,e,new Zr(this.opts),o)}walkCB2(t,e,o,i){var f;if(S(this,pt,xs).call(this,t))return i();if((f=this.signal)!=null&&f.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,o,i));return}o.processPatterns(t,e);let s=1,n=()=>{--s===0&&i()};for(let[l,u,h]of o.matches.entries())S(this,pt,Ce).call(this,l)||(s++,this.match(l,u,h).then(()=>n()));for(let l of o.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirCached();l.calledReaddir()?this.walkCB3(l,u,o,n):l.readdirCB((h,d)=>this.walkCB3(l,d,o,n),!0)}n()}walkCB3(t,e,o,i){o=o.filterEntries(t,e);let s=1,n=()=>{--s===0&&i()};for(let[f,l,u]of o.matches.entries())S(this,pt,Ce).call(this,f)||(s++,this.match(f,l,u).then(()=>n()));for(let[f,l]of o.subwalks.entries())s++,this.walkCB2(f,l,o.child(),n);n()}walkCBSync(t,e,o){var i;(i=this.signal)!=null&&i.aborted&&o(),this.walkCB2Sync(t,e,new Zr(this.opts),o)}walkCB2Sync(t,e,o,i){var f;if(S(this,pt,xs).call(this,t))return i();if((f=this.signal)!=null&&f.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,o,i));return}o.processPatterns(t,e);let s=1,n=()=>{--s===0&&i()};for(let[l,u,h]of o.matches.entries())S(this,pt,Ce).call(this,l)||this.matchSync(l,u,h);for(let l of o.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirSync();this.walkCB3Sync(l,u,o,n)}n()}walkCB3Sync(t,e,o,i){o=o.filterEntries(t,e);let s=1,n=()=>{--s===0&&i()};for(let[f,l,u]of o.matches.entries())S(this,pt,Ce).call(this,f)||this.matchSync(f,l,u);for(let[f,l]of o.subwalks.entries())s++,this.walkCB2Sync(f,l,o.child(),n);n()}};or=new WeakMap,Bt=new WeakMap,Ee=new WeakMap,pt=new WeakSet,Ce=function(t){var e,o;return this.seen.has(t)||!!((o=(e=a(this,Bt))==null?void 0:e.ignored)!=null&&o.call(e,t))},xs=function(t){var e,o;return!!((o=(e=a(this,Bt))==null?void 0:e.childrenIgnored)!=null&&o.call(e,t))};var Xr=class extends ui{constructor(e,o,i){super(e,o,i);c(this,"matches",new Set)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((o,i)=>{this.walkCB(this.path,this.patterns,()=>{var s;(s=this.signal)!=null&&s.aborted?i(this.signal.reason):o(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var o;if((o=this.signal)!=null&&o.aborted)throw this.signal.reason}),this.matches}},to=class extends ui{constructor(e,o,i){super(e,o,i);c(this,"results");this.results=new Xt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var sx=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",xt=class{constructor(t,e){c(this,"absolute");c(this,"cwd");c(this,"root");c(this,"dot");c(this,"dotRelative");c(this,"follow");c(this,"ignore");c(this,"magicalBraces");c(this,"mark");c(this,"matchBase");c(this,"maxDepth");c(this,"nobrace");c(this,"nocase");c(this,"nodir");c(this,"noext");c(this,"noglobstar");c(this,"pattern");c(this,"platform");c(this,"realpath");c(this,"scurry");c(this,"stat");c(this,"signal");c(this,"windowsPathsNoEscape");c(this,"withFileTypes");c(this,"includeChildMatches");c(this,"opts");c(this,"patterns");if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,yp.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=t,this.platform=e.platform||sx,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=e.platform==="win32"?Ze:e.platform==="darwin"?Rr:e.platform?Xe:gp;this.scurry=new l(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let o=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:o,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new rt(l,i)),[n,f]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=n.map((l,u)=>{let h=f[u];if(!h)throw new Error("invalid pattern object");return new er(l,h,0,this.platform)})}async walk(){return[...await new Xr(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 Xr(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 to(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 to(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 ws=(r,t={})=>{Array.isArray(r)||(r=[r]);for(let e of r)if(new rt(e,t).hasMagic())return!0;return!1};function pi(r,t={}){return new xt(r,t).streamSync()}function bp(r,t={}){return new xt(r,t).stream()}function Sp(r,t={}){return new xt(r,t).walkSync()}async function xp(r,t={}){return new xt(r,t).walk()}function hi(r,t={}){return new xt(r,t).iterateSync()}function vp(r,t={}){return new xt(r,t).iterate()}var nx=pi,ax=Object.assign(bp,{sync:pi}),fx=hi,lx=Object.assign(vp,{sync:hi}),eo=Object.assign(Sp,{stream:pi,iterate:hi}),wp=Object.assign(xp,{glob:xp,globSync:Sp,sync:eo,globStream:bp,stream:ax,globStreamSync:pi,streamSync:nx,globIterate:vp,iterate:lx,globIterateSync:hi,iterateSync:fx,Glob:xt,hasMagic:ws,escape:qe,unescape:mt});wp.glob=wp;ae();var ux=O.withTag("listChromeProfiles");function Cp(){let r=eo("./**/Cookies",{cwd:Ue,absolute:!0});return ux.debug("Found cookie files:",r),r}var ci=require("crypto");ce();var px=at(r=>r.length>=3&&r[0]===118&&r[1]===49&&r[2]===48?r.slice(3):r,r=>r.toString("hex")),hx=at(r=>{let t=r[r.length-1];return t&&t<=16?r.slice(0,-t):r},r=>r.toString("hex"));function cx(r){var e;let t=[/.*?0t(.+)$/,/.*?1e`(.+)$/,/.*?[`'](.+)$/,/[^\x20-\x7E]*([\x20-\x7E].+)$/];for(let o of t){let i=r.match(o),s=(e=i==null?void 0:i[1])!=null?e:"";if(s.length>0)return s}return r}async function Ep(r,t){if(typeof t!="string")throw new Error("password must be a string");if(!Buffer.isBuffer(r))throw new Error("encryptedData must be a Buffer");return new Promise((e,o)=>{(0,ci.pbkdf2)(t,"saltysalt",1003,16,"sha1",(i,s)=>{try{if(i){o(new Error("Failed to derive key: "+i.message));return}let n=px(r);if(n.length%16!==0){o(new Error("Encrypted data length is not a multiple of 16"));return}let f=Buffer.alloc(16," "),l=(0,ci.createDecipheriv)("aes-128-cbc",s,f);l.setAutoPadding(!1);let u=l.update(n);try{l.final()}catch(d){o(new Error("Failed to finalize decryption: "+d.message));return}u=hx(u);let h=u.toString("utf8");e(cx(h))}catch(n){o(new Error("Decryption failed: "+n.message))}})})}ce();Qt();var _p=at(async()=>{if(process.platform!=="darwin")throw F("Chrome password retrieval failed",new Error("This only works on macOS"),{platform:process.platform}),new Error("This only works on macOS");try{let{getChromePassword:r}=await Promise.resolve().then(()=>(Rp(),Pp)),t=await r();return St("ChromePassword","Retrieved password successfully",{platform:"macOS"}),t}catch(r){throw F("Chrome password retrieval failed",r,{platform:"macOS"}),r}});function xx(r){return typeof r!="number"||r<=0?"Infinity":new Date(r)}function Dp(r,t,e,o,i,s){return{domain:r,name:t,value:e,expiry:xx(o),meta:{file:i,browser:"Chrome",decrypted:s}}}var mi=class{constructor(){this.logger=Ql("ChromeCookieQueryStrategy");this.browserName="Chrome"}async queryCookies(t,e){try{if(this.logger.info("Querying cookies",{name:t,domain:e}),process.platform!=="darwin")return this.logger.warn("Platform not supported",{platform:process.platform}),[];let i=Cp().map(f=>f),s=await _p(),n=await jo(i,f=>this.processFile(f,t,e,s),[]);return Wo("Cookie query",!0,{count:n.length}),n}catch(o){return F("Failed to query cookies",o,{name:t,domain:e}),[]}}async processFile(t,e,o,i){try{let s=await eu({name:e,domain:o,file:t}),n={file:t,password:i};return(await Promise.allSettled(s.map(l=>this.processCookie(l,n)))).map(l=>l.status==="fulfilled"?l.value:null).filter(l=>l!==null)}catch(s){return this.logger.error("Failed to process cookie file",{error:s,file:t}),[]}}async processCookie(t,e){try{let o=Buffer.isBuffer(t.value)?t.value:Buffer.from(String(t.value)),i=await Ep(o,e.password);return Dp(t.domain,t.name,i,t.expiry,e.file,!0)}catch(o){return this.logger.warn("Failed to decrypt cookie",{error:o}),Dp(t.domain,t.name,t.value.toString("utf-8"),t.expiry,e.file,!1)}}};var bs=require("path");Qt();function wx(){let r=[],t=process.env.HOME;if(typeof t!="string"||t.length===0)return $o("FirefoxCookieQuery","HOME environment variable not set"),r;let e=[(0,bs.join)(t,"Library/Application Support/Firefox/Profiles/*/cookies.sqlite"),(0,bs.join)(t,".mozilla/firefox/*/cookies.sqlite")];for(let o of e){let i=eo(o);r.push(...i)}return St("FirefoxCookieQuery","Found Firefox cookie files",{files:r}),r}var di=class{constructor(){this.browserName="Firefox"}async queryCookies(t,e){let o=wx(),i=[];for(let s of o)try{let n=await Go({file:s,sql:"SELECT name, value, host as domain, expiry FROM moz_cookies WHERE name = ? AND host LIKE ?",params:[t,`%${e}%`],rowTransform:f=>({name:f.name,value:f.value,domain:f.domain,expiry:f.expiry>0?new Date(f.expiry*1e3):"Infinity",meta:{file:s,browser:"Firefox",decrypted:!1}})});i.push(...n)}catch(n){n instanceof Error?$o("FirefoxCookieQuery",`Error reading Firefox cookie file ${s}`,{error:n.message}):$o("FirefoxCookieQuery",`Error reading Firefox cookie file ${s}`)}return i}};var Lp=require("path");Qt();var Mp=require("fs");var bx=1706047360;function gi(r,t){let e=t;for(;e<r.length&&r[e]!==0;)e++;return[r.toString("utf8",t,e),e+1]}function Sx(r,t){let e=r.readUInt32LE(t),o=t+43,s=r.readUInt32LE(o)-bx,n=t+56,[f,l]=gi(r,n);n=l;let[u,h]=gi(r,n);n=h;let[d,m]=gi(r,n);n=m;let[x,b]=gi(r,n);return[{name:u,value:x,domain:f.startsWith(".")?f.slice(1):f,path:d||"/",expiry:s,creation:s},e]}function vx(r,t,e){let o=t+5,i=r.readUInt32BE(o),s=t+i,n=[],f=t+e;for(;s<f-8;)try{let[l,u]=Sx(r,s);n.push(l),s+=u}catch(l){console.warn(`Error decoding cookie at offset ${s}:`,l);break}return n}function Ip(r){let t=(0,Mp.readFileSync)(r),e=t.readUInt32BE(4),o=[];for(let n=0;n<e;n++)o.push(t.readUInt32BE(8+n*4));let i=8+e*4,s=[];for(let n=0;n<e;n++)try{let f=vx(t,i,o[n]);s.push(...f),i+=o[n]}catch(f){console.warn(`Error decoding page ${n}:`,f),i+=o[n]}return s}var yi=class{constructor(){this.browserName="Safari"}getHomeDir(){let t=process.env.HOME;return typeof t!="string"||t.trim()===""?(F("SafariCookieQueryStrategy","HOME environment variable is not set"),null):t}getCookieDbPath(t){return(0,Lp.join)(t,"Library","Containers","com.apple.Safari","Data","Library","Cookies","Cookies.binarycookies")}decodeCookies(t,e,o){try{return Ip(t).filter(s=>s.name===e&&s.domain.includes(o)).map(s=>({domain:s.domain,name:s.name,value:s.value.toString(),expiry:typeof s.expiry=="number"&&s.expiry>0?new Date(s.expiry*1e3):"Infinity",meta:{file:t,browser:"Safari",decrypted:!1}}))}catch(i){return i instanceof Error?F("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:i,name:e,domain:o}):F("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:"Unknown error",name:e,domain:o}),[]}}async queryCookies(t,e){let o=this.getHomeDir();if(typeof o!="string"||o.length===0)return Promise.resolve([]);let i=this.getCookieDbPath(o);return Promise.resolve(this.decodeCookies(i,t,e))}};var xi=class{constructor(){this.browserName="all";this.strategies=[mi,di,yi]}async queryCookies(t,e){return O.info(`Querying cookies for name: ${t}, domain: ${e}`),jo(this.strategies,async o=>{try{return await new o().queryCookies(t,e)}catch(i){return i instanceof Error?O.error(`Error querying ${o.name}: ${i.message}`):O.error(`Error querying ${o.name}: Unknown error`),[]}})}};function Cx(r){return r.expiry==="Infinity"?{...r,expiry:"Infinity"}:typeof r.expiry=="number"?{...r,expiry:new Date(r.expiry*1e3)}:r}async function Np(r,t={}){var n;let e=(n=t.strategy)!=null?n:new xi,o=async f=>(await e.queryCookies(f.name,f.domain)).map(Cx),i=Array.isArray(r)?await Promise.all(r.map(o)):await o(r),s=Array.isArray(i)?i.flat():i;if(t.removeExpired===!0){let f=Date.now();s=s.filter(l=>l.expiry==="Infinity"||l.expiry instanceof Date&&l.expiry.getTime()>f)}return typeof t.limit=="number"&&t.limit>0&&(s=s.slice(0,t.limit)),s}function Ss(r,t=!1){if(r.length===0)return"No cookies found.";let e=[];e.push(`Found ${r.length} cookie${r.length===1?"":"s"}:`);for(let o of r)if(e.push(`- ${o.name}=${o.value}`),t){if(e.push(` Domain: ${o.domain}`),o.expiry!==void 0){let i=typeof o.expiry=="number"||o.expiry==="Infinity"?o.expiry:o.expiry.toISOString();e.push(` Expires: ${i}`)}o.meta&&e.push(` Metadata: ${JSON.stringify(o.meta,null,2)}`)}return e.join(`
5
- `)}ae();function Ex(r){O.log(r)}function kx(r){let t=Bo(r,e=>{var o,i;return(i=(o=e.meta)==null?void 0:o.file)!=null?i:"unknown"});O.log(JSON.stringify(t,null,2))}function Ox(r){O.log(Ss(r))}function Tx(r){let t=Bo(r,e=>{var o,i;return(i=(o=e.meta)==null?void 0:o.file)!=null?i:"unknown"});for(let[e,o]of Object.entries(t))O.log(`${e}: ${Ss(o)}`)}function Ax(r){O.log(JSON.stringify(r,null,2))}function Px(r){let t=new Set(r.map(e=>e.value));for(let e of t)O.log(e)}function Rx(r){return r.dump===!0||r.d===!0}function _x(r){return r["dump-grouped"]===!0||r.D===!0}function Dx(r){return r.render===!0||r["render-merged"]===!0||r.r===!0}function Mx(r){return r["render-grouped"]===!0||r.R===!0}function Ix(r,t){if(Rx(t)){Ex(r);return}if(_x(t)){kx(r);return}if(Dx(t)){Ox(r);return}if(Mx(t)){Tx(r);return}if(t.output==="json"){Ax(r);return}Px(r)}async function Fp(r,t,e,o,i){try{let s=await Np(r,{limit:o,removeExpired:i});if(s.length===0){O.error("No results");return}let{values:n}=oo(process.argv.slice(2));Ix(s,n)}catch(s){s instanceof Error?O.error(s.message):O.error("An unknown error occurred")}}function Lx(){O.log("Usage: get-cookie [name] [domain] [options]"),O.log("Options:"),O.log(" -h, --help: Show this help message"),O.log(" -v, --verbose: Enable verbose output"),O.log(" -d, --dump: Dump all results"),O.log(" -D, --dump-grouped: Dump all results, grouped by profile"),O.log(" -r, --render: Render all results"),O.log(" -u, --url: URL to extract cookie specs from"),O.log(" -n, --name: Cookie name pattern"),O.log(" -d, --domain: Cookie domain pattern")}function Nx(r,t){return{name:r||"%",domain:t||"%"}}function Fx(r,t){let e=r.url;if(typeof e=="string")return Os(e);let o=r.name||t[0]||"%",i=r.domain||t[1]||"%";return[Nx(o,i)]}async function Bx(r,t){let e=Fx(r,t);r.verbose===!0&&O.log("cookieSpecs",e);try{await Fp(e,["chrome","firefox","safari"],["default"])}catch(o){o instanceof Error?O.error("Error querying cookies:",o.message):O.error("An unknown error occurred while querying cookies")}}async function jx(){let r=process.argv.slice(2),{values:t,positionals:e}=oo(r);if(t.help===!0){Lx();return}await Bx(t,e)}jx().catch(r=>{r instanceof Error?O.error("Fatal error:",r.message):O.error("An unknown fatal error occurred"),process.exit(1)});
2
+ "use strict";var jp=Object.create;var ro=Object.defineProperty;var Wp=Object.getOwnPropertyDescriptor;var $p=Object.getOwnPropertyNames;var Up=Object.getPrototypeOf,Gp=Object.prototype.hasOwnProperty;var Cs=r=>{throw TypeError(r)};var qp=(r,t,e)=>t in r?ro(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var p=(r,t)=>()=>(r&&(t=r(r=0)),t);var Es=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),zp=(r,t)=>{for(var e in t)ro(r,e,{get:t[e],enumerable:!0})},Hp=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $p(t))!Gp.call(r,i)&&i!==e&&ro(r,i,{get:()=>t[i],enumerable:!(o=Wp(t,i))||o.enumerable});return r};var ke=(r,t,e)=>(e=r!=null?jp(Up(r)):{},Hp(t||!r||!r.__esModule?ro(e,"default",{value:r,enumerable:!0}):e,r));var c=(r,t,e)=>qp(r,typeof t!="symbol"?t+"":t,e),yi=(r,t,e)=>t.has(r)||Cs("Cannot "+e);var a=(r,t,e)=>(yi(r,t,"read from private field"),e?e.call(r):t.get(r)),w=(r,t,e)=>t.has(r)?Cs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),g=(r,t,e,o)=>(yi(r,t,"write to private field"),o?o.call(r,e):t.set(r,e),e),S=(r,t,e)=>(yi(r,t,"access private method"),e);var As,Kp,O,ae=p(()=>{"use strict";As=require("consola"),Kp=(0,As.createConsola)({fancy:!0,formatOptions:{showLogLevel:!1,colors:!0,date:!1,compact:!0,columns:typeof process.stdout.columns=="number"?process.stdout.columns:80},level:typeof process.env.LOG_LEVEL=="string"&&process.env.LOG_LEVEL==="debug"?5:2}),O=Kp});var Qp,oo,wi=p(()=>{"use strict";Qp=typeof global=="object"&&global&&global.Object===Object&&global,oo=Qp});var Jp,Vp,I,ht=p(()=>{"use strict";wi();Jp=typeof self=="object"&&self&&self.Object===Object&&self,Vp=oo||Jp||Function("return this")(),I=Vp});var Yp,nt,sr=p(()=>{"use strict";ht();Yp=I.Symbol,nt=Yp});function th(r){var t=Zp.call(r,nr),e=r[nr];try{r[nr]=void 0;var o=!0}catch(s){}var i=Xp.call(r);return o&&(t?r[nr]=e:delete r[nr]),i}var Ps,Zp,Xp,nr,Rs,_s=p(()=>{"use strict";sr();Ps=Object.prototype,Zp=Ps.hasOwnProperty,Xp=Ps.toString,nr=nt?nt.toStringTag:void 0;Rs=th});function oh(r){return rh.call(r)}var eh,rh,Ds,Ms=p(()=>{"use strict";eh=Object.prototype,rh=eh.toString;Ds=oh});function nh(r){return r==null?r===void 0?sh:ih:Is&&Is in Object(r)?Rs(r):Ds(r)}var ih,sh,Is,et,fe=p(()=>{"use strict";sr();_s();Ms();ih="[object Null]",sh="[object Undefined]",Is=nt?nt.toStringTag:void 0;et=nh});function ah(r){return r!=null&&typeof r=="object"}var J,jt=p(()=>{"use strict";J=ah});function lh(r){return typeof r=="symbol"||J(r)&&et(r)==fh}var fh,Oe,io=p(()=>{"use strict";fe();jt();fh="[object Symbol]";Oe=lh});function uh(r,t){for(var e=-1,o=r==null?0:r.length,i=Array(o);++e<o;)i[e]=t(r[e],e,r);return i}var Ls,Ns=p(()=>{"use strict";Ls=uh});var ph,D,ct=p(()=>{"use strict";ph=Array.isArray,D=ph});function js(r){if(typeof r=="string")return r;if(D(r))return Ls(r,js)+"";if(Oe(r))return Bs?Bs.call(r):"";var t=r+"";return t=="0"&&1/r==-hh?"-0":t}var hh,Fs,Bs,Ws,$s=p(()=>{"use strict";sr();Ns();ct();io();hh=1/0,Fs=nt?nt.prototype:void 0,Bs=Fs?Fs.toString:void 0;Ws=js});function ch(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var H,At=p(()=>{"use strict";H=ch});function mh(r){return r}var Te,so=p(()=>{"use strict";Te=mh});function wh(r){if(!H(r))return!1;var t=et(r);return t==gh||t==xh||t==dh||t==yh}var dh,gh,xh,yh,Ae,no=p(()=>{"use strict";fe();At();dh="[object AsyncFunction]",gh="[object Function]",xh="[object GeneratorFunction]",yh="[object Proxy]";Ae=wh});var bh,ao,Us=p(()=>{"use strict";ht();bh=I["__core-js_shared__"],ao=bh});function Sh(r){return!!Gs&&Gs in r}var Gs,qs,zs=p(()=>{"use strict";Us();Gs=function(){var r=/[^.]+$/.exec(ao&&ao.keys&&ao.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();qs=Sh});function Eh(r){if(r!=null){try{return Ch.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var vh,Ch,Pt,bi=p(()=>{"use strict";vh=Function.prototype,Ch=vh.toString;Pt=Eh});function Dh(r){if(!H(r)||qs(r))return!1;var t=Ae(r)?_h:Oh;return t.test(Pt(r))}var kh,Oh,Th,Ah,Ph,Rh,_h,Hs,Ks=p(()=>{"use strict";no();zs();At();bi();kh=/[\\^$.*+?()[\]{}|]/g,Oh=/^\[object .+?Constructor\]$/,Th=Function.prototype,Ah=Object.prototype,Ph=Th.toString,Rh=Ah.hasOwnProperty,_h=RegExp("^"+Ph.call(Rh).replace(kh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Hs=Dh});function Mh(r,t){return r==null?void 0:r[t]}var Qs,Js=p(()=>{"use strict";Qs=Mh});function Ih(r,t){var e=Qs(r,t);return Hs(e)?e:void 0}var tt,Wt=p(()=>{"use strict";Ks();Js();tt=Ih});var Lh,fo,Vs=p(()=>{"use strict";Wt();ht();Lh=tt(I,"WeakMap"),fo=Lh});var Ys,Nh,Zs,Xs=p(()=>{"use strict";At();Ys=Object.create,Nh=function(){function r(){}return function(t){if(!H(t))return{};if(Ys)return Ys(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),Zs=Nh});function Fh(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var tn,en=p(()=>{"use strict";tn=Fh});function Bh(r,t){var e=-1,o=r.length;for(t||(t=Array(o));++e<o;)t[e]=r[e];return t}var rn,on=p(()=>{"use strict";rn=Bh});function Uh(r){var t=0,e=0;return function(){var o=$h(),i=Wh-(o-e);if(e=o,i>0){if(++t>=jh)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var jh,Wh,$h,sn,nn=p(()=>{"use strict";jh=800,Wh=16,$h=Date.now;sn=Uh});function Gh(r){return function(){return r}}var an,fn=p(()=>{"use strict";an=Gh});var qh,Pe,Si=p(()=>{"use strict";Wt();qh=function(){try{var r=tt(Object,"defineProperty");return r({},"",{}),r}catch(t){}}(),Pe=qh});var zh,ln,un=p(()=>{"use strict";fn();Si();so();zh=Pe?function(r,t){return Pe(r,"toString",{configurable:!0,enumerable:!1,value:an(t),writable:!0})}:Te,ln=zh});var Hh,pn,hn=p(()=>{"use strict";un();nn();Hh=sn(ln),pn=Hh});function Jh(r,t){var e=typeof r;return t=t==null?Kh:t,!!t&&(e=="number"||e!="symbol"&&Qh.test(r))&&r>-1&&r%1==0&&r<t}var Kh,Qh,Re,lo=p(()=>{"use strict";Kh=9007199254740991,Qh=/^(?:0|[1-9]\d*)$/;Re=Jh});function Vh(r,t,e){t=="__proto__"&&Pe?Pe(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var $t,ar=p(()=>{"use strict";Si();$t=Vh});function Yh(r,t){return r===t||r!==r&&t!==t}var wt,_e=p(()=>{"use strict";wt=Yh});function tc(r,t,e){var o=r[t];(!(Xh.call(r,t)&&wt(o,e))||e===void 0&&!(t in r))&&$t(r,t,e)}var Zh,Xh,cn,mn=p(()=>{"use strict";ar();_e();Zh=Object.prototype,Xh=Zh.hasOwnProperty;cn=tc});function ec(r,t,e,o){var i=!e;e||(e={});for(var s=-1,n=t.length;++s<n;){var f=t[s],l=o?o(e[f],r[f],f,e,r):void 0;l===void 0&&(l=r[f]),i?$t(e,f,l):cn(e,f,l)}return e}var dn,gn=p(()=>{"use strict";mn();ar();dn=ec});function rc(r,t,e){return t=xn(t===void 0?r.length-1:t,0),function(){for(var o=arguments,i=-1,s=xn(o.length-t,0),n=Array(s);++i<s;)n[i]=o[t+i];i=-1;for(var f=Array(t+1);++i<t;)f[i]=o[i];return f[t]=e(n),tn(r,this,f)}}var xn,yn,wn=p(()=>{"use strict";en();xn=Math.max;yn=rc});function oc(r,t){return pn(yn(r,t,Te),r+"")}var bn,Sn=p(()=>{"use strict";so();wn();hn();bn=oc});function sc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ic}var ic,De,uo=p(()=>{"use strict";ic=9007199254740991;De=sc});function nc(r){return r!=null&&De(r.length)&&!Ae(r)}var bt,Me=p(()=>{"use strict";no();uo();bt=nc});function ac(r,t,e){if(!H(e))return!1;var o=typeof t;return(o=="number"?bt(e)&&Re(t,e.length):o=="string"&&t in e)?wt(e[t],r):!1}var vn,Cn=p(()=>{"use strict";_e();Me();lo();At();vn=ac});function fc(r){return bn(function(t,e){var o=-1,i=e.length,s=i>1?e[i-1]:void 0,n=i>2?e[2]:void 0;for(s=r.length>3&&typeof s=="function"?(i--,s):void 0,n&&vn(e[0],e[1],n)&&(s=i<3?void 0:s,i=1),t=Object(t);++o<i;){var f=e[o];f&&r(t,f,o,s)}return t})}var En,kn=p(()=>{"use strict";Sn();Cn();En=fc});function uc(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||lc;return r===e}var lc,Ie,po=p(()=>{"use strict";lc=Object.prototype;Ie=uc});function pc(r,t){for(var e=-1,o=Array(r);++e<r;)o[e]=t(e);return o}var On,Tn=p(()=>{"use strict";On=pc});function cc(r){return J(r)&&et(r)==hc}var hc,vi,An=p(()=>{"use strict";fe();jt();hc="[object Arguments]";vi=cc});var Pn,mc,dc,gc,le,ho=p(()=>{"use strict";An();jt();Pn=Object.prototype,mc=Pn.hasOwnProperty,dc=Pn.propertyIsEnumerable,gc=vi(function(){return arguments}())?vi:function(r){return J(r)&&mc.call(r,"callee")&&!dc.call(r,"callee")},le=gc});function xc(){return!1}var Rn,_n=p(()=>{"use strict";Rn=xc});var In,Dn,yc,Mn,wc,bc,ue,co=p(()=>{"use strict";ht();_n();In=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dn=In&&typeof module=="object"&&module&&!module.nodeType&&module,yc=Dn&&Dn.exports===In,Mn=yc?I.Buffer:void 0,wc=Mn?Mn.isBuffer:void 0,bc=wc||Rn,ue=bc});function zc(r){return J(r)&&De(r.length)&&!!P[et(r)]}var Sc,vc,Cc,Ec,kc,Oc,Tc,Ac,Pc,Rc,_c,Dc,Mc,Ic,Lc,Nc,Fc,Bc,jc,Wc,$c,Uc,Gc,qc,P,Ln,Nn=p(()=>{"use strict";fe();uo();jt();Sc="[object Arguments]",vc="[object Array]",Cc="[object Boolean]",Ec="[object Date]",kc="[object Error]",Oc="[object Function]",Tc="[object Map]",Ac="[object Number]",Pc="[object Object]",Rc="[object RegExp]",_c="[object Set]",Dc="[object String]",Mc="[object WeakMap]",Ic="[object ArrayBuffer]",Lc="[object DataView]",Nc="[object Float32Array]",Fc="[object Float64Array]",Bc="[object Int8Array]",jc="[object Int16Array]",Wc="[object Int32Array]",$c="[object Uint8Array]",Uc="[object Uint8ClampedArray]",Gc="[object Uint16Array]",qc="[object Uint32Array]",P={};P[Nc]=P[Fc]=P[Bc]=P[jc]=P[Wc]=P[$c]=P[Uc]=P[Gc]=P[qc]=!0;P[Sc]=P[vc]=P[Ic]=P[Cc]=P[Lc]=P[Ec]=P[kc]=P[Oc]=P[Tc]=P[Ac]=P[Pc]=P[Rc]=P[_c]=P[Dc]=P[Mc]=!1;Ln=zc});function Hc(r){return function(t){return r(t)}}var Fn,Bn=p(()=>{"use strict";Fn=Hc});var jn,fr,Kc,Ci,Qc,Ei,Wn=p(()=>{"use strict";wi();jn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fr=jn&&typeof module=="object"&&module&&!module.nodeType&&module,Kc=fr&&fr.exports===jn,Ci=Kc&&oo.process,Qc=function(){try{var r=fr&&fr.require&&fr.require("util").types;return r||Ci&&Ci.binding&&Ci.binding("util")}catch(t){}}(),Ei=Qc});var $n,Jc,Le,mo=p(()=>{"use strict";Nn();Bn();Wn();$n=Ei&&Ei.isTypedArray,Jc=$n?Fn($n):Ln,Le=Jc});function Zc(r,t){var e=D(r),o=!e&&le(r),i=!e&&!o&&ue(r),s=!e&&!o&&!i&&Le(r),n=e||o||i||s,f=n?On(r.length,String):[],l=f.length;for(var u in r)(t||Yc.call(r,u))&&!(n&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Re(u,l)))&&f.push(u);return f}var Vc,Yc,go,ki=p(()=>{"use strict";Tn();ho();ct();co();lo();mo();Vc=Object.prototype,Yc=Vc.hasOwnProperty;go=Zc});function Xc(r,t){return function(e){return r(t(e))}}var xo,Oi=p(()=>{"use strict";xo=Xc});var tm,Un,Gn=p(()=>{"use strict";Oi();tm=xo(Object.keys,Object),Un=tm});function om(r){if(!Ie(r))return Un(r);var t=[];for(var e in Object(r))rm.call(r,e)&&e!="constructor"&&t.push(e);return t}var em,rm,qn,zn=p(()=>{"use strict";po();Gn();em=Object.prototype,rm=em.hasOwnProperty;qn=om});function im(r){return bt(r)?go(r):qn(r)}var Ne,yo=p(()=>{"use strict";ki();zn();Me();Ne=im});function sm(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var Hn,Kn=p(()=>{"use strict";Hn=sm});function fm(r){if(!H(r))return Hn(r);var t=Ie(r),e=[];for(var o in r)o=="constructor"&&(t||!am.call(r,o))||e.push(o);return e}var nm,am,Qn,Jn=p(()=>{"use strict";At();po();Kn();nm=Object.prototype,am=nm.hasOwnProperty;Qn=fm});function lm(r){return bt(r)?go(r,!0):Qn(r)}var wo,Ti=p(()=>{"use strict";ki();Jn();Me();wo=lm});function hm(r,t){if(D(r))return!1;var e=typeof r;return e=="number"||e=="symbol"||e=="boolean"||r==null||Oe(r)?!0:pm.test(r)||!um.test(r)||t!=null&&r in Object(t)}var um,pm,Fe,bo=p(()=>{"use strict";ct();io();um=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pm=/^\w*$/;Fe=hm});var cm,Rt,lr=p(()=>{"use strict";Wt();cm=tt(Object,"create"),Rt=cm});function mm(){this.__data__=Rt?Rt(null):{},this.size=0}var Vn,Yn=p(()=>{"use strict";lr();Vn=mm});function dm(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Zn,Xn=p(()=>{"use strict";Zn=dm});function wm(r){var t=this.__data__;if(Rt){var e=t[r];return e===gm?void 0:e}return ym.call(t,r)?t[r]:void 0}var gm,xm,ym,ta,ea=p(()=>{"use strict";lr();gm="__lodash_hash_undefined__",xm=Object.prototype,ym=xm.hasOwnProperty;ta=wm});function vm(r){var t=this.__data__;return Rt?t[r]!==void 0:Sm.call(t,r)}var bm,Sm,ra,oa=p(()=>{"use strict";lr();bm=Object.prototype,Sm=bm.hasOwnProperty;ra=vm});function Em(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Rt&&t===void 0?Cm:t,this}var Cm,ia,sa=p(()=>{"use strict";lr();Cm="__lodash_hash_undefined__";ia=Em});function Be(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var Ai,na=p(()=>{"use strict";Yn();Xn();ea();oa();sa();Be.prototype.clear=Vn;Be.prototype.delete=Zn;Be.prototype.get=ta;Be.prototype.has=ra;Be.prototype.set=ia;Ai=Be});function km(){this.__data__=[],this.size=0}var aa,fa=p(()=>{"use strict";aa=km});function Om(r,t){for(var e=r.length;e--;)if(wt(r[e][0],t))return e;return-1}var Ut,ur=p(()=>{"use strict";_e();Ut=Om});function Pm(r){var t=this.__data__,e=Ut(t,r);if(e<0)return!1;var o=t.length-1;return e==o?t.pop():Am.call(t,e,1),--this.size,!0}var Tm,Am,la,ua=p(()=>{"use strict";ur();Tm=Array.prototype,Am=Tm.splice;la=Pm});function Rm(r){var t=this.__data__,e=Ut(t,r);return e<0?void 0:t[e][1]}var pa,ha=p(()=>{"use strict";ur();pa=Rm});function _m(r){return Ut(this.__data__,r)>-1}var ca,ma=p(()=>{"use strict";ur();ca=_m});function Dm(r,t){var e=this.__data__,o=Ut(e,r);return o<0?(++this.size,e.push([r,t])):e[o][1]=t,this}var da,ga=p(()=>{"use strict";ur();da=Dm});function je(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var Gt,pr=p(()=>{"use strict";fa();ua();ha();ma();ga();je.prototype.clear=aa;je.prototype.delete=la;je.prototype.get=pa;je.prototype.has=ca;je.prototype.set=da;Gt=je});var Mm,qt,So=p(()=>{"use strict";Wt();ht();Mm=tt(I,"Map"),qt=Mm});function Im(){this.size=0,this.__data__={hash:new Ai,map:new(qt||Gt),string:new Ai}}var xa,ya=p(()=>{"use strict";na();pr();So();xa=Im});function Lm(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var wa,ba=p(()=>{"use strict";wa=Lm});function Nm(r,t){var e=r.__data__;return wa(t)?e[typeof t=="string"?"string":"hash"]:e.map}var zt,hr=p(()=>{"use strict";ba();zt=Nm});function Fm(r){var t=zt(this,r).delete(r);return this.size-=t?1:0,t}var Sa,va=p(()=>{"use strict";hr();Sa=Fm});function Bm(r){return zt(this,r).get(r)}var Ca,Ea=p(()=>{"use strict";hr();Ca=Bm});function jm(r){return zt(this,r).has(r)}var ka,Oa=p(()=>{"use strict";hr();ka=jm});function Wm(r,t){var e=zt(this,r),o=e.size;return e.set(r,t),this.size+=e.size==o?0:1,this}var Ta,Aa=p(()=>{"use strict";hr();Ta=Wm});function We(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var pe,vo=p(()=>{"use strict";ya();va();Ea();Oa();Aa();We.prototype.clear=xa;We.prototype.delete=Sa;We.prototype.get=Ca;We.prototype.has=ka;We.prototype.set=Ta;pe=We});function Pi(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError($m);var e=function(){var o=arguments,i=t?t.apply(this,o):o[0],s=e.cache;if(s.has(i))return s.get(i);var n=r.apply(this,o);return e.cache=s.set(i,n)||s,n};return e.cache=new(Pi.Cache||pe),e}var $m,at,Ri=p(()=>{"use strict";vo();$m="Expected a function";Pi.Cache=pe;at=Pi});function Gm(r){var t=at(r,function(o){return e.size===Um&&e.clear(),o}),e=t.cache;return t}var Um,Pa,Ra=p(()=>{"use strict";Ri();Um=500;Pa=Gm});var qm,zm,Hm,_a,Da=p(()=>{"use strict";Ra();qm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zm=/\\(\\)?/g,Hm=Pa(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(qm,function(e,o,i,s){t.push(i?s.replace(zm,"$1"):o||e)}),t}),_a=Hm});function Km(r){return r==null?"":Ws(r)}var Ma,Ia=p(()=>{"use strict";$s();Ma=Km});function Qm(r,t){return D(r)?r:Fe(r,t)?[r]:_a(Ma(r))}var Co,_i=p(()=>{"use strict";ct();bo();Da();Ia();Co=Qm});function Vm(r){if(typeof r=="string"||Oe(r))return r;var t=r+"";return t=="0"&&1/r==-Jm?"-0":t}var Jm,Ht,cr=p(()=>{"use strict";io();Jm=1/0;Ht=Vm});function Ym(r,t){t=Co(t,r);for(var e=0,o=t.length;r!=null&&e<o;)r=r[Ht(t[e++])];return e&&e==o?r:void 0}var Eo,Di=p(()=>{"use strict";_i();cr();Eo=Ym});function Zm(r,t,e){var o=r==null?void 0:Eo(r,t);return o===void 0?e:o}var La,Na=p(()=>{"use strict";Di();La=Zm});function Xm(r,t){for(var e=-1,o=t.length,i=r.length;++e<o;)r[i+e]=t[e];return r}var Fa,Ba=p(()=>{"use strict";Fa=Xm});var td,ko,Mi=p(()=>{"use strict";Oi();td=xo(Object.getPrototypeOf,Object),ko=td});function nd(r){if(!J(r)||et(r)!=ed)return!1;var t=ko(r);if(t===null)return!0;var e=id.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&ja.call(e)==sd}var ed,rd,od,ja,id,sd,Wa,$a=p(()=>{"use strict";fe();Mi();jt();ed="[object Object]",rd=Function.prototype,od=Object.prototype,ja=rd.toString,id=od.hasOwnProperty,sd=ja.call(Object);Wa=nd});function ad(){this.__data__=new Gt,this.size=0}var Ua,Ga=p(()=>{"use strict";pr();Ua=ad});function fd(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var qa,za=p(()=>{"use strict";qa=fd});function ld(r){return this.__data__.get(r)}var Ha,Ka=p(()=>{"use strict";Ha=ld});function ud(r){return this.__data__.has(r)}var Qa,Ja=p(()=>{"use strict";Qa=ud});function hd(r,t){var e=this.__data__;if(e instanceof Gt){var o=e.__data__;if(!qt||o.length<pd-1)return o.push([r,t]),this.size=++e.size,this;e=this.__data__=new pe(o)}return e.set(r,t),this.size=e.size,this}var pd,Va,Ya=p(()=>{"use strict";pr();So();vo();pd=200;Va=hd});function $e(r){var t=this.__data__=new Gt(r);this.size=t.size}var Kt,Oo=p(()=>{"use strict";pr();Ga();za();Ka();Ja();Ya();$e.prototype.clear=Ua;$e.prototype.delete=qa;$e.prototype.get=Ha;$e.prototype.has=Qa;$e.prototype.set=Va;Kt=$e});function md(r,t){if(t)return r.slice();var e=r.length,o=tf?tf(e):new r.constructor(e);return r.copy(o),o}var ef,Za,cd,Xa,tf,rf,of=p(()=>{"use strict";ht();ef=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Za=ef&&typeof module=="object"&&module&&!module.nodeType&&module,cd=Za&&Za.exports===ef,Xa=cd?I.Buffer:void 0,tf=Xa?Xa.allocUnsafe:void 0;rf=md});function dd(r,t){for(var e=-1,o=r==null?0:r.length,i=0,s=[];++e<o;){var n=r[e];t(n,e,r)&&(s[i++]=n)}return s}var sf,nf=p(()=>{"use strict";sf=dd});function gd(){return[]}var af,ff=p(()=>{"use strict";af=gd});var xd,yd,lf,wd,uf,pf=p(()=>{"use strict";nf();ff();xd=Object.prototype,yd=xd.propertyIsEnumerable,lf=Object.getOwnPropertySymbols,wd=lf?function(r){return r==null?[]:(r=Object(r),sf(lf(r),function(t){return yd.call(r,t)}))}:af,uf=wd});function bd(r,t,e){var o=t(r);return D(r)?o:Fa(o,e(r))}var hf,cf=p(()=>{"use strict";Ba();ct();hf=bd});function Sd(r){return hf(r,Ne,uf)}var Ii,mf=p(()=>{"use strict";cf();pf();yo();Ii=Sd});var vd,To,df=p(()=>{"use strict";Wt();ht();vd=tt(I,"DataView"),To=vd});var Cd,Ao,gf=p(()=>{"use strict";Wt();ht();Cd=tt(I,"Promise"),Ao=Cd});var Ed,Po,xf=p(()=>{"use strict";Wt();ht();Ed=tt(I,"Set"),Po=Ed});var yf,kd,wf,bf,Sf,vf,Od,Td,Ad,Pd,Rd,he,Li,Cf=p(()=>{"use strict";df();So();gf();xf();Vs();fe();bi();yf="[object Map]",kd="[object Object]",wf="[object Promise]",bf="[object Set]",Sf="[object WeakMap]",vf="[object DataView]",Od=Pt(To),Td=Pt(qt),Ad=Pt(Ao),Pd=Pt(Po),Rd=Pt(fo),he=et;(To&&he(new To(new ArrayBuffer(1)))!=vf||qt&&he(new qt)!=yf||Ao&&he(Ao.resolve())!=wf||Po&&he(new Po)!=bf||fo&&he(new fo)!=Sf)&&(he=function(r){var t=et(r),e=t==kd?r.constructor:void 0,o=e?Pt(e):"";if(o)switch(o){case Od:return vf;case Td:return yf;case Ad:return wf;case Pd:return bf;case Rd:return Sf}return t});Li=he});var _d,Ue,Ni=p(()=>{"use strict";ht();_d=I.Uint8Array,Ue=_d});function Dd(r){var t=new r.constructor(r.byteLength);return new Ue(t).set(new Ue(r)),t}var Ef,kf=p(()=>{"use strict";Ni();Ef=Dd});function Md(r,t){var e=t?Ef(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var Of,Tf=p(()=>{"use strict";kf();Of=Md});function Id(r){return typeof r.constructor=="function"&&!Ie(r)?Zs(ko(r)):{}}var Af,Pf=p(()=>{"use strict";Xs();Mi();po();Af=Id});function Nd(r){return this.__data__.set(r,Ld),this}var Ld,Rf,_f=p(()=>{"use strict";Ld="__lodash_hash_undefined__";Rf=Nd});function Fd(r){return this.__data__.has(r)}var Df,Mf=p(()=>{"use strict";Df=Fd});function Ro(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new pe;++t<e;)this.add(r[t])}var If,Lf=p(()=>{"use strict";vo();_f();Mf();Ro.prototype.add=Ro.prototype.push=Rf;Ro.prototype.has=Df;If=Ro});function Bd(r,t){for(var e=-1,o=r==null?0:r.length;++e<o;)if(t(r[e],e,r))return!0;return!1}var Nf,Ff=p(()=>{"use strict";Nf=Bd});function jd(r,t){return r.has(t)}var Bf,jf=p(()=>{"use strict";Bf=jd});function Ud(r,t,e,o,i,s){var n=e&Wd,f=r.length,l=t.length;if(f!=l&&!(n&&l>f))return!1;var u=s.get(r),h=s.get(t);if(u&&h)return u==t&&h==r;var d=-1,m=!0,y=e&$d?new If:void 0;for(s.set(r,t),s.set(t,r);++d<f;){var b=r[d],x=t[d];if(o)var C=n?o(x,b,d,t,r,s):o(b,x,d,r,t,s);if(C!==void 0){if(C)continue;m=!1;break}if(y){if(!Nf(t,function(E,T){if(!Bf(y,T)&&(b===E||i(b,E,e,o,s)))return y.push(T)})){m=!1;break}}else if(!(b===x||i(b,x,e,o,s))){m=!1;break}}return s.delete(r),s.delete(t),m}var Wd,$d,_o,Fi=p(()=>{"use strict";Lf();Ff();jf();Wd=1,$d=2;_o=Ud});function Gd(r){var t=-1,e=Array(r.size);return r.forEach(function(o,i){e[++t]=[i,o]}),e}var Wf,$f=p(()=>{"use strict";Wf=Gd});function qd(r){var t=-1,e=Array(r.size);return r.forEach(function(o){e[++t]=o}),e}var Uf,Gf=p(()=>{"use strict";Uf=qd});function ig(r,t,e,o,i,s,n){switch(e){case og:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case rg:return!(r.byteLength!=t.byteLength||!s(new Ue(r),new Ue(t)));case Kd:case Qd:case Yd:return wt(+r,+t);case Jd:return r.name==t.name&&r.message==t.message;case Zd:case tg:return r==t+"";case Vd:var f=Wf;case Xd:var l=o&zd;if(f||(f=Uf),r.size!=t.size&&!l)return!1;var u=n.get(r);if(u)return u==t;o|=Hd,n.set(r,t);var h=_o(f(r),f(t),o,i,s,n);return n.delete(r),h;case eg:if(Bi)return Bi.call(r)==Bi.call(t)}return!1}var zd,Hd,Kd,Qd,Jd,Vd,Yd,Zd,Xd,tg,eg,rg,og,qf,Bi,zf,Hf=p(()=>{"use strict";sr();Ni();_e();Fi();$f();Gf();zd=1,Hd=2,Kd="[object Boolean]",Qd="[object Date]",Jd="[object Error]",Vd="[object Map]",Yd="[object Number]",Zd="[object RegExp]",Xd="[object Set]",tg="[object String]",eg="[object Symbol]",rg="[object ArrayBuffer]",og="[object DataView]",qf=nt?nt.prototype:void 0,Bi=qf?qf.valueOf:void 0;zf=ig});function fg(r,t,e,o,i,s){var n=e&sg,f=Ii(r),l=f.length,u=Ii(t),h=u.length;if(l!=h&&!n)return!1;for(var d=l;d--;){var m=f[d];if(!(n?m in t:ag.call(t,m)))return!1}var y=s.get(r),b=s.get(t);if(y&&b)return y==t&&b==r;var x=!0;s.set(r,t),s.set(t,r);for(var C=n;++d<l;){m=f[d];var E=r[m],T=t[m];if(o)var A=n?o(T,E,m,t,r,s):o(E,T,m,r,t,s);if(!(A===void 0?E===T||i(E,T,e,o,s):A)){x=!1;break}C||(C=m=="constructor")}if(x&&!C){var R=r.constructor,N=t.constructor;R!=N&&"constructor"in r&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof N=="function"&&N instanceof N)&&(x=!1)}return s.delete(r),s.delete(t),x}var sg,ng,ag,Kf,Qf=p(()=>{"use strict";mf();sg=1,ng=Object.prototype,ag=ng.hasOwnProperty;Kf=fg});function pg(r,t,e,o,i,s){var n=D(r),f=D(t),l=n?Vf:Li(r),u=f?Vf:Li(t);l=l==Jf?Do:l,u=u==Jf?Do:u;var h=l==Do,d=u==Do,m=l==u;if(m&&ue(r)){if(!ue(t))return!1;n=!0,h=!1}if(m&&!h)return s||(s=new Kt),n||Le(r)?_o(r,t,e,o,i,s):zf(r,t,l,e,o,i,s);if(!(e&lg)){var y=h&&Yf.call(r,"__wrapped__"),b=d&&Yf.call(t,"__wrapped__");if(y||b){var x=y?r.value():r,C=b?t.value():t;return s||(s=new Kt),i(x,C,e,o,s)}}return m?(s||(s=new Kt),Kf(r,t,e,o,i,s)):!1}var lg,Jf,Vf,Do,ug,Yf,Zf,Xf=p(()=>{"use strict";Oo();Fi();Hf();Qf();Cf();ct();co();mo();lg=1,Jf="[object Arguments]",Vf="[object Array]",Do="[object Object]",ug=Object.prototype,Yf=ug.hasOwnProperty;Zf=pg});function tl(r,t,e,o,i){return r===t?!0:r==null||t==null||!J(r)&&!J(t)?r!==r&&t!==t:Zf(r,t,e,o,tl,i)}var Mo,ji=p(()=>{"use strict";Xf();jt();Mo=tl});function mg(r,t,e,o){var i=e.length,s=i,n=!o;if(r==null)return!s;for(r=Object(r);i--;){var f=e[i];if(n&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<s;){f=e[i];var l=f[0],u=r[l],h=f[1];if(n&&f[2]){if(u===void 0&&!(l in r))return!1}else{var d=new Kt;if(o)var m=o(u,h,l,r,t,d);if(!(m===void 0?Mo(h,u,hg|cg,o,d):m))return!1}}return!0}var hg,cg,el,rl=p(()=>{"use strict";Oo();ji();hg=1,cg=2;el=mg});function dg(r){return r===r&&!H(r)}var Io,Wi=p(()=>{"use strict";At();Io=dg});function gg(r){for(var t=Ne(r),e=t.length;e--;){var o=t[e],i=r[o];t[e]=[o,i,Io(i)]}return t}var ol,il=p(()=>{"use strict";Wi();yo();ol=gg});function xg(r,t){return function(e){return e==null?!1:e[r]===t&&(t!==void 0||r in Object(e))}}var Lo,$i=p(()=>{"use strict";Lo=xg});function yg(r){var t=ol(r);return t.length==1&&t[0][2]?Lo(t[0][0],t[0][1]):function(e){return e===r||el(e,r,t)}}var sl,nl=p(()=>{"use strict";rl();il();$i();sl=yg});function wg(r,t){return r!=null&&t in Object(r)}var al,fl=p(()=>{"use strict";al=wg});function bg(r,t,e){t=Co(t,r);for(var o=-1,i=t.length,s=!1;++o<i;){var n=Ht(t[o]);if(!(s=r!=null&&e(r,n)))break;r=r[n]}return s||++o!=i?s:(i=r==null?0:r.length,!!i&&De(i)&&Re(n,i)&&(D(r)||le(r)))}var ll,ul=p(()=>{"use strict";_i();ho();ct();lo();uo();cr();ll=bg});function Sg(r,t){return r!=null&&ll(r,t,al)}var pl,hl=p(()=>{"use strict";fl();ul();pl=Sg});function Eg(r,t){return Fe(r)&&Io(t)?Lo(Ht(r),t):function(e){var o=La(e,r);return o===void 0&&o===t?pl(e,r):Mo(t,o,vg|Cg)}}var vg,Cg,cl,ml=p(()=>{"use strict";ji();Na();hl();bo();Wi();$i();cr();vg=1,Cg=2;cl=Eg});function kg(r){return function(t){return t==null?void 0:t[r]}}var dl,gl=p(()=>{"use strict";dl=kg});function Og(r){return function(t){return Eo(t,r)}}var xl,yl=p(()=>{"use strict";Di();xl=Og});function Tg(r){return Fe(r)?dl(Ht(r)):xl(r)}var wl,bl=p(()=>{"use strict";gl();yl();bo();cr();wl=Tg});function Ag(r){return typeof r=="function"?r:r==null?Te:typeof r=="object"?D(r)?cl(r[0],r[1]):sl(r):wl(r)}var Sl,vl=p(()=>{"use strict";nl();ml();so();ct();bl();Sl=Ag});function Pg(r,t,e,o){for(var i=-1,s=r==null?0:r.length;++i<s;){var n=r[i];t(o,n,e(n),r)}return o}var Cl,El=p(()=>{"use strict";Cl=Pg});function Rg(r){return function(t,e,o){for(var i=-1,s=Object(t),n=o(t),f=n.length;f--;){var l=n[r?f:++i];if(e(s[l],l,s)===!1)break}return t}}var kl,Ol=p(()=>{"use strict";kl=Rg});var _g,No,Ui=p(()=>{"use strict";Ol();_g=kl(),No=_g});function Dg(r,t){return r&&No(r,t,Ne)}var Tl,Al=p(()=>{"use strict";Ui();yo();Tl=Dg});function Mg(r,t){return function(e,o){if(e==null)return e;if(!bt(e))return r(e,o);for(var i=e.length,s=t?i:-1,n=Object(e);(t?s--:++s<i)&&o(n[s],s,n)!==!1;);return e}}var Pl,Rl=p(()=>{"use strict";Me();Pl=Mg});var Ig,_l,Dl=p(()=>{"use strict";Al();Rl();Ig=Pl(Tl),_l=Ig});function Lg(r,t,e,o){return _l(r,function(i,s,n){t(o,i,e(i),n)}),o}var Ml,Il=p(()=>{"use strict";Dl();Ml=Lg});function Ng(r,t){return function(e,o){var i=D(e)?Cl:Ml,s=t?t():{};return i(e,r,Sl(o,2),s)}}var Ll,Nl=p(()=>{"use strict";El();Il();vl();ct();Ll=Ng});function Fg(r,t,e){(e!==void 0&&!wt(r[t],e)||e===void 0&&!(t in r))&&$t(r,t,e)}var mr,Gi=p(()=>{"use strict";ar();_e();mr=Fg});function Bg(r){return J(r)&&bt(r)}var Fl,Bl=p(()=>{"use strict";Me();jt();Fl=Bg});function jg(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var dr,qi=p(()=>{"use strict";dr=jg});function Wg(r){return dn(r,wo(r))}var jl,Wl=p(()=>{"use strict";gn();Ti();jl=Wg});function $g(r,t,e,o,i,s,n){var f=dr(r,e),l=dr(t,e),u=n.get(l);if(u){mr(r,e,u);return}var h=s?s(f,l,e+"",r,t,n):void 0,d=h===void 0;if(d){var m=D(l),y=!m&&ue(l),b=!m&&!y&&Le(l);h=l,m||y||b?D(f)?h=f:Fl(f)?h=rn(f):y?(d=!1,h=rf(l,!0)):b?(d=!1,h=Of(l,!0)):h=[]:Wa(l)||le(l)?(h=f,le(f)?h=jl(f):(!H(f)||Ae(f))&&(h=Af(l))):d=!1}d&&(n.set(l,h),i(h,l,o,s,n),n.delete(l)),mr(r,e,h)}var $l,Ul=p(()=>{"use strict";Gi();of();Tf();on();Pf();ho();ct();Bl();co();no();At();$a();mo();qi();Wl();$l=$g});function Gl(r,t,e,o,i){r!==t&&No(t,function(s,n){if(i||(i=new Kt),H(s))$l(r,t,n,e,Gl,o,i);else{var f=o?o(dr(r,n),s,n+"",r,t,i):void 0;f===void 0&&(f=s),mr(r,n,f)}},wo)}var ql,zl=p(()=>{"use strict";Oo();Gi();Ui();Ul();At();Ti();qi();ql=Gl});var Ug,Gg,qg,Fo,Hl=p(()=>{"use strict";ar();Nl();Ug=Object.prototype,Gg=Ug.hasOwnProperty,qg=Ll(function(r,t,e){Gg.call(r,e)?r[e].push(t):$t(r,e,[t])}),Fo=qg});var zg,zi,Kl=p(()=>{"use strict";zl();kn();zg=En(function(r,t,e){ql(r,t,e)}),zi=zg});var ce=p(()=>{"use strict";Hl();Ri();Kl();});function jo(r,t,e){let i=`${t?"\u2705":"\u274C"} ${r} ${t?"succeeded":"failed"}`;t?O.success(i,e):O.error(i,e)}function F(r,t,e){let o={...e!=null?e:{},error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t};O.error(r,o)}function St(r,t,e){O.withTag(r).debug(t,e)}function Ql(r){return O.withTag(r)}function Wo(r,t,e){O.withTag(r).warn(t,e)}var Qt=p(()=>{"use strict";ae();ae()});var nu=Es((tO,su)=>{"use strict";su.exports=ou;function ou(r,t,e){r instanceof RegExp&&(r=ru(r,e)),t instanceof RegExp&&(t=ru(t,e));var o=iu(r,t,e);return o&&{start:o[0],end:o[1],pre:e.slice(0,o[0]),body:e.slice(o[0]+r.length,o[1]),post:e.slice(o[1]+t.length)}}function ru(r,t){var e=t.match(r);return e?e[0]:null}ou.range=iu;function iu(r,t,e){var o,i,s,n,f,l=e.indexOf(r),u=e.indexOf(t,l+1),h=l;if(l>=0&&u>0){if(r===t)return[l,u];for(o=[],s=e.length;h>=0&&!f;)h==l?(o.push(h),l=e.indexOf(r,h+1)):o.length==1?f=[o.pop(),u]:(i=o.pop(),i<s&&(s=i,n=u),u=e.indexOf(t,h+1)),h=l<u&&l>=0?l:u;o.length&&(f=[s,n])}return f}});var mu=Es((eO,cu)=>{"use strict";var au=nu();cu.exports=tx;var fu="\0SLASH"+Math.random()+"\0",lu="\0OPEN"+Math.random()+"\0",Ki="\0CLOSE"+Math.random()+"\0",uu="\0COMMA"+Math.random()+"\0",pu="\0PERIOD"+Math.random()+"\0";function Hi(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function Zg(r){return r.split("\\\\").join(fu).split("\\{").join(lu).split("\\}").join(Ki).split("\\,").join(uu).split("\\.").join(pu)}function Xg(r){return r.split(fu).join("\\").split(lu).join("{").split(Ki).join("}").split(uu).join(",").split(pu).join(".")}function hu(r){if(!r)return[""];var t=[],e=au("{","}",r);if(!e)return r.split(",");var o=e.pre,i=e.body,s=e.post,n=o.split(",");n[n.length-1]+="{"+i+"}";var f=hu(s);return s.length&&(n[n.length-1]+=f.shift(),n.push.apply(n,f)),t.push.apply(t,n),t}function tx(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),gr(Zg(r),!0).map(Xg)):[]}function ex(r){return"{"+r+"}"}function rx(r){return/^-?0\d/.test(r)}function ox(r,t){return r<=t}function ix(r,t){return r>=t}function gr(r,t){var e=[],o=au("{","}",r);if(!o)return[r];var i=o.pre,s=o.post.length?gr(o.post,!1):[""];if(/\$$/.test(o.pre))for(var n=0;n<s.length;n++){var f=i+"{"+o.body+"}"+s[n];e.push(f)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),h=l||u,d=o.body.indexOf(",")>=0;if(!h&&!d)return o.post.match(/,.*\}/)?(r=o.pre+"{"+o.body+Ki+o.post,gr(r)):[r];var m;if(h)m=o.body.split(/\.\./);else if(m=hu(o.body),m.length===1&&(m=gr(m[0],!1).map(ex),m.length===1))return s.map(function(Bp){return o.pre+m[0]+Bp});var y;if(h){var b=Hi(m[0]),x=Hi(m[1]),C=Math.max(m[0].length,m[1].length),E=m.length==3?Math.abs(Hi(m[2])):1,T=ox,A=x<b;A&&(E*=-1,T=ix);var R=m.some(rx);y=[];for(var N=b;T(N,x);N+=E){var st;if(u)st=String.fromCharCode(N),st==="\\"&&(st="");else if(st=String(N),R){var Ss=C-st.length;if(Ss>0){var vs=new Array(Ss+1).join("0");N<0?st="-"+vs+st.slice(1):st=vs+st}}y.push(st)}}else{y=[];for(var ne=0;ne<m.length;ne++)y.push.apply(y,gr(m[ne],!1))}for(var ne=0;ne<y.length;ne++)for(var n=0;n<s.length;n++){var f=i+y[ne]+s[n];(!t||h||f)&&e.push(f)}}return e}});function dy(r,t){if(r instanceof se)throw F("Command execution failed",r,{command:r.command,originalError:r.originalError}),r;if(r instanceof Error){let o=new se(r.message,t,r);throw F("Failed to execute command",r,{command:t,stack:r.stack}),o}let e=new se("Unknown error occurred during command execution",t);throw F("Failed to execute command",null,{error:r,command:t}),e}async function Tp(r,t={}){if(!r||typeof r!="string")throw new se("Command must be a non-empty string",r);let e={encoding:"utf8",maxBuffer:5*1024*1024,timeout:3e4};try{let{stdout:o,stderr:i}=await my(r,{...e,...t}),s=o.trim();if(!s)throw i?new se(`Command failed with stderr: ${i}`,r):new se("Command returned empty result",r);return s}catch(o){dy(o,r)}}var kp,Op,my,se,Ap=p(()=>{"use strict";kp=require("child_process"),Op=require("util");Qt();my=(0,Op.promisify)(kp.exec),se=class extends Error{constructor(e,o,i){super(e);this.command=o;this.originalError=i;this.name="CommandExecutionError"}}});var Pp={};zp(Pp,{getChromePassword:()=>xy});var gy,xy,Rp=p(()=>{"use strict";ce();Ap();gy=async()=>Tp('security find-generic-password -w -s "Chrome Safe Storage"'),xy=at(gy)});function ks(r){if(!r)return[];try{let t=[],o=new URL(r).hostname,i=o.split(".");t.push({name:"%",domain:o});for(let s=1;s<i.length-1;s++)t.push({name:"%",domain:`%.${i.slice(s).join(".")}`}),t.push({name:"%",domain:i.slice(s).join(".")});return t}catch(t){throw t instanceof TypeError?new Error("Invalid URL"):t}}var Os=ke(require("minimist"),1);function Ts(r){let t=(0,Os.default)(r,{string:["browser","profile","url","domain","name","output"],boolean:["help","version","verbose","dump","dump-grouped","render","render-grouped"],alias:{b:"browser",p:"profile",u:"url",d:"domain",n:"name",h:"help",v:"version",D:"dump-grouped",r:"render",R:"render-grouped"}}),{_:e,...o}=t;return{values:o,positionals:e}}ae();ce();async function Bo(r,t,e=[]){return r.length===0?e:(await Promise.all(r.map(async i=>{try{return await t(i)}catch(s){return e}}))).flat()}ae();Qt();var Xl=require("fs"),Go=require("path"),tu=ke(require("fast-glob"),1);Qt();var Yl=require("path");ce();var Jl={};zi(Jl,process.env);var $o=Jl.HOME;if(typeof $o!="string"||$o.length===0)throw new Error("HOME environment variable is not set or empty");var Vl,Ge=(0,Yl.join)((Vl=$o)!=null?Vl:"","Library","Application Support","Google","Chrome");var Zl=ke(require("better-sqlite3"),1);ce();Qt();var Hg=at(r=>{try{return Promise.resolve(new Zl.default(r,{readonly:!0}))}catch(t){throw F("Database open failed",t,{file:r}),t}});function Kg(r){try{return r.close(),Promise.resolve()}catch(t){return F("Database close failed",t),Promise.reject(t instanceof Error?t:new Error("Failed to close database: Unknown error"))}}async function Uo({file:r,sql:t,params:e,rowFilter:o,rowTransform:i}){let s;try{s=await Hg(r);let f=s.prepare(t).all(e),l=o?f.filter(o):f;return i?l.map(i):l}catch(n){throw F("Database query failed",n,{file:r,sql:t}),n}finally{s&&await Kg(s)}}function Qg(r){if(typeof r!="string")return!1;let t=r.trim();return t.length===0?!1:(0,Xl.existsSync)(t)}async function Jg(){let r=[(0,Go.join)(Ge,"Default/Cookies"),(0,Go.join)(Ge,"Profile */Cookies"),(0,Go.join)(Ge,"Profile Default/Cookies")],t=[];for(let e of r){let o=await(0,tu.default)(e);t.push(...o)}return St("ChromeCookies","Found cookie files",{count:t.length,files:t}),t}function Vg(r,t){let e=r==="%",o=e?"SELECT name, encrypted_value, host_key, expires_utc FROM cookies WHERE host_key LIKE ?":"SELECT name, encrypted_value, host_key, expires_utc FROM cookies WHERE name = ? AND host_key LIKE ?",i=e?[`%${t}%`]:[r,`%${t}%`];return{sql:o,params:i}}async function Yg(r,t,e){try{let{sql:o,params:i}=Vg(t,e);St("ChromeCookies","Executing query",{sql:o,params:i});let s=await Uo({file:r,sql:o,params:i,rowTransform:n=>({name:n.name,domain:n.host_key,value:n.encrypted_value,expiry:n.expires_utc})});return jo("QueryCookies",!0,{file:r,count:s.length}),s}catch(o){return F("Failed to read cookie file",o,{file:r}),[]}}async function eu({name:r,domain:t,file:e}){let o=typeof e=="string"&&e.length>0?[e]:await Jg();if(o.length===0)return St("ChromeCookies","No cookie files found"),[];let i=[];for(let s of o){if(!Qg(s)){St("ChromeCookies","Cookie file missing or invalid",{file:s});continue}let n=await Yg(s,r,t);i.push(...n)}return St("ChromeCookies","Query complete",{totalCookies:i.length}),i}var Eu=ke(mu(),1);var xr=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")};var sx={"[: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]},yr=r=>r.replace(/[[\]\\-]/g,"\\$&"),nx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),du=r=>r.join(""),gu=(r,t)=>{let e=t;if(r.charAt(e)!=="[")throw new Error("not in a brace expression");let o=[],i=[],s=e+1,n=!1,f=!1,l=!1,u=!1,h=e,d="";t:for(;s<r.length;){let x=r.charAt(s);if((x==="!"||x==="^")&&s===e+1){u=!0,s++;continue}if(x==="]"&&n&&!l){h=s+1;break}if(n=!0,x==="\\"&&!l){l=!0,s++;continue}if(x==="["&&!l){for(let[C,[E,T,A]]of Object.entries(sx))if(r.startsWith(C,s)){if(d)return["$.",!1,r.length-e,!0];s+=C.length,A?i.push(E):o.push(E),f=f||T;continue t}}if(l=!1,d){x>d?o.push(yr(d)+"-"+yr(x)):x===d&&o.push(yr(x)),d="",s++;continue}if(r.startsWith("-]",s+1)){o.push(yr(x+"-")),s+=2;continue}if(r.startsWith("-",s+1)){d=x,s+=2;continue}o.push(yr(x)),s++}if(h<s)return["",!1,0,!1];if(!o.length&&!i.length)return["$.",!1,r.length-e,!0];if(i.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!u){let x=o[0].length===2?o[0].slice(-1):o[0];return[nx(x),!1,h-e,!1]}let m="["+(u?"^":"")+du(o)+"]",y="["+(u?"":"^")+du(i)+"]";return[o.length&&i.length?"("+m+"|"+y+")":o.length?m:y,f,h-e,!0]};var mt=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var ax=new Set(["!","?","+","*","@"]),xu=r=>ax.has(r),fx="(?!(?:^|/)\\.\\.?(?:$|/))",qo="(?!\\.)",lx=new Set(["[","."]),ux=new Set(["..","."]),px=new Set("().*{}+?[]^$\\!"),hx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ji="[^/]",yu=Ji+"*?",wu=Ji+"+?",B,W,_t,_,L,Jt,me,Vt,vt,de,wr,ge,bu,Yt,zo,Qi,Su,V=class V{constructor(t,e,o={}){w(this,ge);c(this,"type");w(this,B);w(this,W);w(this,_t,!1);w(this,_,[]);w(this,L);w(this,Jt);w(this,me);w(this,Vt,!1);w(this,vt);w(this,de);w(this,wr,!1);this.type=t,t&&g(this,W,!0),g(this,L,e),g(this,B,a(this,L)?a(a(this,L),B):this),g(this,vt,a(this,B)===this?o:a(a(this,B),vt)),g(this,me,a(this,B)===this?[]:a(a(this,B),me)),t==="!"&&!a(a(this,B),Vt)&&a(this,me).push(this),g(this,Jt,a(this,L)?a(a(this,L),_).length:0)}get hasMagic(){if(a(this,W)!==void 0)return a(this,W);for(let t of a(this,_))if(typeof t!="string"&&(t.type||t.hasMagic))return g(this,W,!0);return a(this,W)}toString(){return a(this,de)!==void 0?a(this,de):this.type?g(this,de,this.type+"("+a(this,_).map(t=>String(t)).join("|")+")"):g(this,de,a(this,_).map(t=>String(t)).join(""))}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof V&&a(e,L)===this))throw new Error("invalid part: "+e);a(this,_).push(e)}}toJSON(){var e;let t=this.type===null?a(this,_).slice().map(o=>typeof o=="string"?o:o.toJSON()):[this.type,...a(this,_).map(o=>o.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===a(this,B)||a(a(this,B),Vt)&&((e=a(this,L))==null?void 0:e.type)==="!")&&t.push({}),t}isStart(){var e;if(a(this,B)===this)return!0;if(!((e=a(this,L))!=null&&e.isStart()))return!1;if(a(this,Jt)===0)return!0;let t=a(this,L);for(let o=0;o<a(this,Jt);o++){let i=a(t,_)[o];if(!(i instanceof V&&i.type==="!"))return!1}return!0}isEnd(){var e,o,i;if(a(this,B)===this||((e=a(this,L))==null?void 0:e.type)==="!")return!0;if(!((o=a(this,L))!=null&&o.isEnd()))return!1;if(!this.type)return(i=a(this,L))==null?void 0:i.isEnd();let t=a(this,L)?a(a(this,L),_).length:0;return a(this,Jt)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new V(this.type,t);for(let o of a(this,_))e.copyIn(o);return e}static fromGlob(t,e={}){var i;let o=new V(null,void 0,e);return S(i=V,Yt,zo).call(i,t,o,0,e),o}toMMPattern(){if(this!==a(this,B))return a(this,B).toMMPattern();let t=this.toString(),[e,o,i,s]=this.toRegExpSource();if(!(i||a(this,W)||a(this,vt).nocase&&!a(this,vt).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;let f=(a(this,vt).nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${e}$`,f),{_src:e,_glob:t})}get options(){return a(this,vt)}toRegExpSource(t){var l;let e=t!=null?t:!!a(this,vt).dot;if(a(this,B)===this&&S(this,ge,bu).call(this),!this.type){let u=this.isStart()&&this.isEnd(),h=a(this,_).map(b=>{var A;let[x,C,E,T]=typeof b=="string"?S(A=V,Yt,Su).call(A,b,a(this,W),u):b.toRegExpSource(t);return g(this,W,a(this,W)||E),g(this,_t,a(this,_t)||T),x}).join(""),d="";if(this.isStart()&&typeof a(this,_)[0]=="string"&&!(a(this,_).length===1&&ux.has(a(this,_)[0]))){let x=lx,C=e&&x.has(h.charAt(0))||h.startsWith("\\.")&&x.has(h.charAt(2))||h.startsWith("\\.\\.")&&x.has(h.charAt(4)),E=!e&&!t&&x.has(h.charAt(0));d=C?fx:E?qo:""}let m="";return this.isEnd()&&a(a(this,B),Vt)&&((l=a(this,L))==null?void 0:l.type)==="!"&&(m="(?:$|\\/)"),[d+h+m,mt(h),g(this,W,!!a(this,W)),a(this,_t)]}let o=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=S(this,ge,Qi).call(this,e);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString();return g(this,_,[u]),this.type=null,g(this,W,void 0),[u,mt(this.toString()),!1,!1]}let n=!o||t||e||!qo?"":S(this,ge,Qi).call(this,!0);n===s&&(n=""),n&&(s=`(?:${s})(?:${n})*?`);let f="";if(this.type==="!"&&a(this,wr))f=(this.isStart()&&!e?qo:"")+wu;else{let u=this.type==="!"?"))"+(this.isStart()&&!e&&!t?qo:"")+yu+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&n?")":this.type==="*"&&n?")?":`)${this.type}`;f=i+s+u}return[f,mt(s),g(this,W,!!a(this,W)),a(this,_t)]}};B=new WeakMap,W=new WeakMap,_t=new WeakMap,_=new WeakMap,L=new WeakMap,Jt=new WeakMap,me=new WeakMap,Vt=new WeakMap,vt=new WeakMap,de=new WeakMap,wr=new WeakMap,ge=new WeakSet,bu=function(){if(this!==a(this,B))throw new Error("should only call on root");if(a(this,Vt))return this;this.toString(),g(this,Vt,!0);let t;for(;t=a(this,me).pop();){if(t.type!=="!")continue;let e=t,o=a(e,L);for(;o;){for(let i=a(e,Jt)+1;!o.type&&i<a(o,_).length;i++)for(let s of a(t,_)){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(a(o,_)[i])}e=o,o=a(e,L)}}return this},Yt=new WeakSet,zo=function(t,e,o,i){var y,b;let s=!1,n=!1,f=-1,l=!1;if(e.type===null){let x=o,C="";for(;x<t.length;){let E=t.charAt(x++);if(s||E==="\\"){s=!s,C+=E;continue}if(n){x===f+1?(E==="^"||E==="!")&&(l=!0):E==="]"&&!(x===f+2&&l)&&(n=!1),C+=E;continue}else if(E==="["){n=!0,f=x,l=!1,C+=E;continue}if(!i.noext&&xu(E)&&t.charAt(x)==="("){e.push(C),C="";let T=new V(E,e);x=S(y=V,Yt,zo).call(y,t,T,x,i),e.push(T);continue}C+=E}return e.push(C),x}let u=o+1,h=new V(null,e),d=[],m="";for(;u<t.length;){let x=t.charAt(u++);if(s||x==="\\"){s=!s,m+=x;continue}if(n){u===f+1?(x==="^"||x==="!")&&(l=!0):x==="]"&&!(u===f+2&&l)&&(n=!1),m+=x;continue}else if(x==="["){n=!0,f=u,l=!1,m+=x;continue}if(xu(x)&&t.charAt(u)==="("){h.push(m),m="";let C=new V(x,h);h.push(C),u=S(b=V,Yt,zo).call(b,t,C,u,i);continue}if(x==="|"){h.push(m),m="",d.push(h),h=new V(null,e);continue}if(x===")")return m===""&&a(e,_).length===0&&g(e,wr,!0),h.push(m),m="",e.push(...d,h),u;m+=x}return e.type=null,g(e,W,void 0),g(e,_,[t.substring(o-1)]),u},Qi=function(t){return a(this,_).map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[o,i,s,n]=e.toRegExpSource(t);return g(this,_t,a(this,_t)||n),o}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")},Su=function(t,e,o=!1){let i=!1,s="",n=!1;for(let f=0;f<t.length;f++){let l=t.charAt(f);if(i){i=!1,s+=(px.has(l)?"\\":"")+l;continue}if(l==="\\"){f===t.length-1?s+="\\\\":i=!0;continue}if(l==="["){let[u,h,d,m]=gu(t,f);if(d){s+=u,n=n||h,f+=d-1,e=e||m;continue}}if(l==="*"){o&&t==="*"?s+=wu:s+=yu,e=!0;continue}if(l==="?"){s+=Ji,e=!0;continue}s+=hx(l)}return[s,mt(t),!!e,n]},w(V,Yt);var qe=V;var ze=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");var Y=(r,t,e={})=>(xr(t),!e.nocomment&&t.charAt(0)==="#"?!1:new rt(t,e).match(r)),cx=/^\*+([^+@!?\*\[\(]*)$/,mx=r=>t=>!t.startsWith(".")&&t.endsWith(r),dx=r=>t=>t.endsWith(r),gx=r=>(r=r.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(r)),xx=r=>(r=r.toLowerCase(),t=>t.toLowerCase().endsWith(r)),yx=/^\*+\.\*+$/,wx=r=>!r.startsWith(".")&&r.includes("."),bx=r=>r!=="."&&r!==".."&&r.includes("."),Sx=/^\.\*+$/,vx=r=>r!=="."&&r!==".."&&r.startsWith("."),Cx=/^\*+$/,Ex=r=>r.length!==0&&!r.startsWith("."),kx=r=>r.length!==0&&r!=="."&&r!=="..",Ox=/^\?+([^+@!?\*\[\(]*)?$/,Tx=([r,t=""])=>{let e=ku([r]);return t?(t=t.toLowerCase(),o=>e(o)&&o.toLowerCase().endsWith(t)):e},Ax=([r,t=""])=>{let e=Ou([r]);return t?(t=t.toLowerCase(),o=>e(o)&&o.toLowerCase().endsWith(t)):e},Px=([r,t=""])=>{let e=Ou([r]);return t?o=>e(o)&&o.endsWith(t):e},Rx=([r,t=""])=>{let e=ku([r]);return t?o=>e(o)&&o.endsWith(t):e},ku=([r])=>{let t=r.length;return e=>e.length===t&&!e.startsWith(".")},Ou=([r])=>{let t=r.length;return e=>e.length===t&&e!=="."&&e!==".."},Tu=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",vu={win32:{sep:"\\"},posix:{sep:"/"}},_x=Tu==="win32"?vu.win32.sep:vu.posix.sep;Y.sep=_x;var z=Symbol("globstar **");Y.GLOBSTAR=z;var Dx="[^/]",Mx=Dx+"*?",Ix="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Lx="(?:(?!(?:\\/|^)\\.).)*?",Nx=(r,t={})=>e=>Y(e,r,t);Y.filter=Nx;var ft=(r,t={})=>Object.assign({},r,t),Fx=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return Y;let t=Y;return Object.assign((o,i,s={})=>t(o,i,ft(r,s)),{Minimatch:class extends t.Minimatch{constructor(i,s={}){super(i,ft(r,s))}static defaults(i){return t.defaults(ft(r,i)).Minimatch}},AST:class extends t.AST{constructor(i,s,n={}){super(i,s,ft(r,n))}static fromGlob(i,s={}){return t.AST.fromGlob(i,ft(r,s))}},unescape:(o,i={})=>t.unescape(o,ft(r,i)),escape:(o,i={})=>t.escape(o,ft(r,i)),filter:(o,i={})=>t.filter(o,ft(r,i)),defaults:o=>t.defaults(ft(r,o)),makeRe:(o,i={})=>t.makeRe(o,ft(r,i)),braceExpand:(o,i={})=>t.braceExpand(o,ft(r,i)),match:(o,i,s={})=>t.match(o,i,ft(r,s)),sep:t.sep,GLOBSTAR:z})};Y.defaults=Fx;var Au=(r,t={})=>(xr(r),t.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:(0,Eu.default)(r));Y.braceExpand=Au;var Bx=(r,t={})=>new rt(r,t).makeRe();Y.makeRe=Bx;var jx=(r,t,e={})=>{let o=new rt(t,e);return r=r.filter(i=>o.match(i)),o.options.nonull&&!r.length&&r.push(t),r};Y.match=jx;var Cu=/[?*]|[+@!]\(.*?\)|\[|\]/,Wx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),rt=class{constructor(t,e={}){c(this,"options");c(this,"set");c(this,"pattern");c(this,"windowsPathsNoEscape");c(this,"nonegate");c(this,"negate");c(this,"comment");c(this,"empty");c(this,"preserveMultipleSlashes");c(this,"partial");c(this,"globSet");c(this,"globParts");c(this,"nocase");c(this,"isWindows");c(this,"platform");c(this,"windowsNoMagicRoot");c(this,"regexp");xr(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Tu,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let o=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,n,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Cu.test(s[2]))&&!Cu.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let n=this.set[s];n[0]===""&&n[1]===""&&this.globParts[s][2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])&&(n[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let o=0;o<t.length;o++)for(let i=0;i<t[o].length;i++)t[o][i]==="**"&&(t[o][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let o=-1;for(;(o=e.indexOf("**",o+1))!==-1;){let i=o;for(;e[i+1]==="**";)i++;i!==o&&e.splice(o,i-o)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((o,i)=>{let s=o[o.length-1];return i==="**"&&s==="**"?o:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(o.pop(),o):(o.push(i),o)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let o=0;for(;(o=t.indexOf("..",o+1))!==-1;){let i=t[o-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(o-1,2),o-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let o of t){let i=-1;for(;(i=o.indexOf("**",i+1))!==-1;){let n=i;for(;o[n+1]==="**";)n++;n>i&&o.splice(i+1,n-i);let f=o[i+1],l=o[i+2],u=o[i+3];if(f!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;e=!0,o.splice(i,1);let h=o.slice(0);h[i]="**",t.push(h),i--}if(!this.preserveMultipleSlashes){for(let n=1;n<o.length-1;n++){let f=o[n];n===1&&f===""&&o[0]===""||(f==="."||f==="")&&(e=!0,o.splice(n,1),n--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(e=!0,o.pop())}let s=0;for(;(s=o.indexOf("..",s+1))!==-1;){let n=o[s-1];if(n&&n!=="."&&n!==".."&&n!=="**"){e=!0;let l=s===1&&o[s+1]==="**"?["."]:[];o.splice(s-1,2,...l),o.length===0&&o.push(""),s-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let o=e+1;o<t.length;o++){let i=this.partsMatch(t[e],t[o],!this.preserveMultipleSlashes);if(i){t[e]=[],t[o]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,o=!1){let i=0,s=0,n=[],f="";for(;i<t.length&&s<e.length;)if(t[i]===e[s])n.push(f==="b"?e[s]:t[i]),i++,s++;else if(o&&t[i]==="**"&&e[s]===t[i+1])n.push(t[i]),i++;else if(o&&e[s]==="**"&&t[i]===e[s+1])n.push(e[s]),s++;else if(t[i]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(f==="b")return!1;f="a",n.push(t[i]),i++,s++}else if(e[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(f==="a")return!1;f="b",n.push(e[s]),i++,s++}else return!1;return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,o=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,o++;o&&(this.pattern=t.slice(o)),this.negate=e}matchOne(t,e,o=!1){let i=this.options;if(this.isWindows){let x=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),C=!x&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),T=!E&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),A=C?3:x?0:void 0,R=T?3:E?0:void 0;if(typeof A=="number"&&typeof R=="number"){let[N,st]=[t[A],e[R]];N.toLowerCase()===st.toLowerCase()&&(e[R]=N,R>A?e=e.slice(R):A>R&&(t=t.slice(A)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,f=0,l=t.length,u=e.length;n<l&&f<u;n++,f++){this.debug("matchOne loop");var h=e[f],d=t[n];if(this.debug(e,h,d),h===!1)return!1;if(h===z){this.debug("GLOBSTAR",[e,h,d]);var m=n,y=f+1;if(y===u){for(this.debug("** at the end");n<l;n++)if(t[n]==="."||t[n]===".."||!i.dot&&t[n].charAt(0)===".")return!1;return!0}for(;m<l;){var b=t[m];if(this.debug(`
3
+ globstar while`,t,m,e,y,b),this.matchOne(t.slice(m),e.slice(y),o))return this.debug("globstar found match!",m,l,b),!0;if(b==="."||b===".."||!i.dot&&b.charAt(0)==="."){this.debug("dot detected!",t,m,e,y);break}this.debug("globstar swallow a segment, and continue"),m++}return!!(o&&(this.debug(`
4
+ >>> no match, partial?`,t,m,e,y),m===l))}let x;if(typeof h=="string"?(x=d===h,this.debug("string match",h,d,x)):(x=h.test(d),this.debug("pattern match",h,d,x)),!x)return!1}if(n===l&&f===u)return!0;if(n===l)return o;if(f===u)return n===l-1&&t[n]==="";throw new Error("wtf?")}braceExpand(){return Au(this.pattern,this.options)}parse(t){xr(t);let e=this.options;if(t==="**")return z;if(t==="")return"";let o,i=null;(o=t.match(Cx))?i=e.dot?kx:Ex:(o=t.match(cx))?i=(e.nocase?e.dot?xx:gx:e.dot?dx:mx)(o[1]):(o=t.match(Ox))?i=(e.nocase?e.dot?Ax:Tx:e.dot?Px:Rx)(o):(o=t.match(yx))?i=e.dot?bx:wx:(o=t.match(Sx))&&(i=vx);let s=qe.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,o=e.noglobstar?Mx:e.dot?Ix:Lx,i=new Set(e.nocase?["i"]:[]),s=t.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let d of h.flags.split(""))i.add(d);return typeof h=="string"?Wx(h):h===z?z:h._src});return u.forEach((h,d)=>{let m=u[d+1],y=u[d-1];h!==z||y===z||(y===void 0?m!==void 0&&m!==z?u[d+1]="(?:\\/|"+o+"\\/)?"+m:u[d]=o:m===void 0?u[d-1]=y+"(?:\\/|"+o+")?":m!==z&&(u[d-1]=y+"(?:\\/|\\/"+o+"\\/)"+m,u[d+1]=z))}),u.filter(h=>h!==z).join("/")}).join("|"),[n,f]=t.length>1?["(?:",")"]:["",""];s="^"+n+s+f+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch(l){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let o=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let n=i[i.length-1];if(!n)for(let f=i.length-2;!n&&f>=0;f--)n=i[f];for(let f=0;f<s.length;f++){let l=s[f],u=i;if(o.matchBase&&l.length===1&&(u=[n]),this.matchOne(u,l,e))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(t){return Y.defaults(t).Minimatch}};Y.AST=qe;Y.Minimatch=rt;Y.escape=ze;Y.unescape=mt;var xp=require("url");var hs=require("lru-cache"),Ze=require("path"),op=require("url"),Tt=require("fs"),Vx=ke(require("fs"),1),ee=require("fs/promises");var Zo=require("events"),rs=ke(require("stream"),1),Zu=require("string_decoder");var Pu=typeof process=="object"&&process?process:{stdout:null,stderr:null},$x=r=>!!r&&typeof r=="object"&&(r instanceof Xt||r instanceof rs.default||Ux(r)||Gx(r)),Ux=r=>!!r&&typeof r=="object"&&r instanceof Zo.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==rs.default.Writable.prototype.pipe,Gx=r=>!!r&&typeof r=="object"&&r instanceof Zo.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",Dt=Symbol("EOF"),Mt=Symbol("maybeEmitEnd"),Zt=Symbol("emittedEnd"),Ho=Symbol("emittingEnd"),br=Symbol("emittedError"),Ko=Symbol("closed"),Ru=Symbol("read"),Qo=Symbol("flush"),_u=Symbol("flushChunk"),dt=Symbol("encoding"),He=Symbol("decoder"),$=Symbol("flowing"),Sr=Symbol("paused"),Ke=Symbol("resume"),U=Symbol("buffer"),Z=Symbol("pipes"),G=Symbol("bufferLength"),Vi=Symbol("bufferPush"),Jo=Symbol("bufferShift"),K=Symbol("objectMode"),M=Symbol("destroyed"),Yi=Symbol("error"),Zi=Symbol("emitData"),Du=Symbol("emitEnd"),Xi=Symbol("emitEnd2"),Ct=Symbol("async"),ts=Symbol("abort"),Vo=Symbol("aborted"),vr=Symbol("signal"),xe=Symbol("dataListeners"),ot=Symbol("discarded"),Cr=r=>Promise.resolve().then(r),qx=r=>r(),zx=r=>r==="end"||r==="finish"||r==="prefinish",Hx=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,Kx=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),Yo=class{constructor(t,e,o){c(this,"src");c(this,"dest");c(this,"opts");c(this,"ondrain");this.src=t,this.dest=e,this.opts=o,this.ondrain=()=>t[Ke](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},es=class extends Yo{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,o){super(t,e,o),this.proxyErrors=i=>e.emit("error",i),t.on("error",this.proxyErrors)}},Qx=r=>!!r.objectMode,Jx=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",Mu,Iu,Lu,Nu,Fu,Bu,ju,Wu,$u,Uu,Gu,qu,zu,Hu,Ku,Qu,Ju,Vu,Yu,Xt=class extends Zo.EventEmitter{constructor(...e){let o=e[0]||{};super();c(this,Yu,!1);c(this,Vu,!1);c(this,Ju,[]);c(this,Qu,[]);c(this,Ku);c(this,Hu);c(this,zu);c(this,qu);c(this,Gu,!1);c(this,Uu,!1);c(this,$u,!1);c(this,Wu,!1);c(this,ju,null);c(this,Bu,0);c(this,Fu,!1);c(this,Nu);c(this,Lu,!1);c(this,Iu,0);c(this,Mu,!1);c(this,"writable",!0);c(this,"readable",!0);if(o.objectMode&&typeof o.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Qx(o)?(this[K]=!0,this[dt]=null):Jx(o)?(this[dt]=o.encoding,this[K]=!1):(this[K]=!1,this[dt]=null),this[Ct]=!!o.async,this[He]=this[dt]?new Zu.StringDecoder(this[dt]):null,o&&o.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[U]}),o&&o.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Z]});let{signal:i}=o;i&&(this[vr]=i,i.aborted?this[ts]():i.addEventListener("abort",()=>this[ts]()))}get bufferLength(){return this[G]}get encoding(){return this[dt]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[K]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Ct]}set async(e){this[Ct]=this[Ct]||!!e}[(Yu=$,Vu=Sr,Ju=Z,Qu=U,Ku=K,Hu=dt,zu=Ct,qu=He,Gu=Dt,Uu=Zt,$u=Ho,Wu=Ko,ju=br,Bu=G,Fu=M,Nu=vr,Lu=Vo,Iu=xe,Mu=ot,ts)](){var e,o;this[Vo]=!0,this.emit("abort",(e=this[vr])==null?void 0:e.reason),this.destroy((o=this[vr])==null?void 0:o.reason)}get aborted(){return this[Vo]}set aborted(e){}write(e,o,i){var n;if(this[Vo])return!1;if(this[Dt])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof o=="function"&&(i=o,o="utf8"),o||(o="utf8");let s=this[Ct]?Cr:qx;if(!this[K]&&!Buffer.isBuffer(e)){if(Kx(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Hx(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[K]?(this[$]&&this[G]!==0&&this[Qo](!0),this[$]?this.emit("data",e):this[Vi](e),this[G]!==0&&this.emit("readable"),i&&s(i),this[$]):e.length?(typeof e=="string"&&!(o===this[dt]&&!((n=this[He])!=null&&n.lastNeed))&&(e=Buffer.from(e,o)),Buffer.isBuffer(e)&&this[dt]&&(e=this[He].write(e)),this[$]&&this[G]!==0&&this[Qo](!0),this[$]?this.emit("data",e):this[Vi](e),this[G]!==0&&this.emit("readable"),i&&s(i),this[$]):(this[G]!==0&&this.emit("readable"),i&&s(i),this[$])}read(e){if(this[M])return null;if(this[ot]=!1,this[G]===0||e===0||e&&e>this[G])return this[Mt](),null;this[K]&&(e=null),this[U].length>1&&!this[K]&&(this[U]=[this[dt]?this[U].join(""):Buffer.concat(this[U],this[G])]);let o=this[Ru](e||null,this[U][0]);return this[Mt](),o}[Ru](e,o){if(this[K])this[Jo]();else{let i=o;e===i.length||e===null?this[Jo]():typeof i=="string"?(this[U][0]=i.slice(e),o=i.slice(0,e),this[G]-=e):(this[U][0]=i.subarray(e),o=i.subarray(0,e),this[G]-=e)}return this.emit("data",o),!this[U].length&&!this[Dt]&&this.emit("drain"),o}end(e,o,i){return typeof e=="function"&&(i=e,e=void 0),typeof o=="function"&&(i=o,o="utf8"),e!==void 0&&this.write(e,o),i&&this.once("end",i),this[Dt]=!0,this.writable=!1,(this[$]||!this[Sr])&&this[Mt](),this}[Ke](){this[M]||(!this[xe]&&!this[Z].length&&(this[ot]=!0),this[Sr]=!1,this[$]=!0,this.emit("resume"),this[U].length?this[Qo]():this[Dt]?this[Mt]():this.emit("drain"))}resume(){return this[Ke]()}pause(){this[$]=!1,this[Sr]=!0,this[ot]=!1}get destroyed(){return this[M]}get flowing(){return this[$]}get paused(){return this[Sr]}[Vi](e){this[K]?this[G]+=1:this[G]+=e.length,this[U].push(e)}[Jo](){return this[K]?this[G]-=1:this[G]-=this[U][0].length,this[U].shift()}[Qo](e=!1){do;while(this[_u](this[Jo]())&&this[U].length);!e&&!this[U].length&&!this[Dt]&&this.emit("drain")}[_u](e){return this.emit("data",e),this[$]}pipe(e,o){if(this[M])return e;this[ot]=!1;let i=this[Zt];return o=o||{},e===Pu.stdout||e===Pu.stderr?o.end=!1:o.end=o.end!==!1,o.proxyErrors=!!o.proxyErrors,i?o.end&&e.end():(this[Z].push(o.proxyErrors?new es(this,e,o):new Yo(this,e,o)),this[Ct]?Cr(()=>this[Ke]()):this[Ke]()),e}unpipe(e){let o=this[Z].find(i=>i.dest===e);o&&(this[Z].length===1?(this[$]&&this[xe]===0&&(this[$]=!1),this[Z]=[]):this[Z].splice(this[Z].indexOf(o),1),o.unpipe())}addListener(e,o){return this.on(e,o)}on(e,o){let i=super.on(e,o);if(e==="data")this[ot]=!1,this[xe]++,!this[Z].length&&!this[$]&&this[Ke]();else if(e==="readable"&&this[G]!==0)super.emit("readable");else if(zx(e)&&this[Zt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[br]){let s=o;this[Ct]?Cr(()=>s.call(this,this[br])):s.call(this,this[br])}return i}removeListener(e,o){return this.off(e,o)}off(e,o){let i=super.off(e,o);return e==="data"&&(this[xe]=this.listeners("data").length,this[xe]===0&&!this[ot]&&!this[Z].length&&(this[$]=!1)),i}removeAllListeners(e){let o=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[xe]=0,!this[ot]&&!this[Z].length&&(this[$]=!1)),o}get emittedEnd(){return this[Zt]}[Mt](){!this[Ho]&&!this[Zt]&&!this[M]&&this[U].length===0&&this[Dt]&&(this[Ho]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ko]&&this.emit("close"),this[Ho]=!1)}emit(e,...o){let i=o[0];if(e!=="error"&&e!=="close"&&e!==M&&this[M])return!1;if(e==="data")return!this[K]&&!i?!1:this[Ct]?(Cr(()=>this[Zi](i)),!0):this[Zi](i);if(e==="end")return this[Du]();if(e==="close"){if(this[Ko]=!0,!this[Zt]&&!this[M])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[br]=i,super.emit(Yi,i);let n=!this[vr]||this.listeners("error").length?super.emit("error",i):!1;return this[Mt](),n}else if(e==="resume"){let n=super.emit("resume");return this[Mt](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let s=super.emit(e,...o);return this[Mt](),s}[Zi](e){for(let i of this[Z])i.dest.write(e)===!1&&this.pause();let o=this[ot]?!1:super.emit("data",e);return this[Mt](),o}[Du](){return this[Zt]?!1:(this[Zt]=!0,this.readable=!1,this[Ct]?(Cr(()=>this[Xi]()),!0):this[Xi]())}[Xi](){if(this[He]){let o=this[He].end();if(o){for(let i of this[Z])i.dest.write(o);this[ot]||super.emit("data",o)}}for(let o of this[Z])o.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[K]||(e.dataLength=0);let o=this.promise();return this.on("data",i=>{e.push(i),this[K]||(e.dataLength+=i.length)}),await o,e}async concat(){if(this[K])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[dt]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,o)=>{this.on(M,()=>o(new Error("stream destroyed"))),this.on("error",i=>o(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ot]=!1;let e=!1,o=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return o();let s=this.read();if(s!==null)return Promise.resolve({done:!1,value:s});if(this[Dt])return o();let n,f,l=m=>{this.off("data",u),this.off("end",h),this.off(M,d),o(),f(m)},u=m=>{this.off("error",l),this.off("end",h),this.off(M,d),this.pause(),n({value:m,done:!!this[Dt]})},h=()=>{this.off("error",l),this.off("data",u),this.off(M,d),o(),n({done:!0,value:void 0})},d=()=>l(new Error("stream destroyed"));return new Promise((m,y)=>{f=y,n=m,this.once(M,d),this.once("error",l),this.once("end",h),this.once("data",u)})},throw:o,return:o,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ot]=!1;let e=!1,o=()=>(this.pause(),this.off(Yi,o),this.off(M,o),this.off("end",o),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return o();let s=this.read();return s===null?o():{done:!1,value:s}};return this.once("end",o),this.once(Yi,o),this.once(M,o),{next:i,throw:o,return:o,[Symbol.iterator](){return this}}}destroy(e){if(this[M])return e?this.emit("error",e):this.emit(M),this;this[M]=!0,this[ot]=!0,this[U].length=0,this[G]=0;let o=this;return typeof o.close=="function"&&!this[Ko]&&o.close(),e?this.emit("error",e):this.emit(M),this}static get isStream(){return $x}};var Yx=Tt.realpathSync.native,kr={lstatSync:Tt.lstatSync,readdir:Tt.readdir,readdirSync:Tt.readdirSync,readlinkSync:Tt.readlinkSync,realpathSync:Yx,promises:{lstat:ee.lstat,readdir:ee.readdir,readlink:ee.readlink,realpath:ee.realpath}},ip=r=>!r||r===kr||r===Vx?kr:{...kr,...r,promises:{...kr.promises,...r.promises||{}}},sp=/^\\\\\?\\([a-z]:)\\?$/i,Zx=r=>r.replace(/\//g,"\\").replace(sp,"$1\\"),Xx=/[\\\/]/,ut=0,np=1,ap=2,Et=4,fp=6,lp=8,ye=10,up=12,lt=15,Er=~lt,os=16,Xu=32,Or=64,gt=128,Xo=256,ei=512,tp=Or|gt|ei,ty=1023,is=r=>r.isFile()?lp:r.isDirectory()?Et:r.isSymbolicLink()?ye:r.isCharacterDevice()?ap:r.isBlockDevice()?fp:r.isSocket()?up:r.isFIFO()?np:ut,ep=new Map,Tr=r=>{let t=ep.get(r);if(t)return t;let e=r.normalize("NFKD");return ep.set(r,e),e},rp=new Map,ti=r=>{let t=rp.get(r);if(t)return t;let e=Tr(r.toLowerCase());return rp.set(r,e),e},si=class extends hs.LRUCache{constructor(){super({max:256})}},ss=class extends hs.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},pp=Symbol("PathScurry setAsCwd"),X,_r,Dr,Mr,Ir,Lr,Nr,Fr,Br,jr,Wr,$r,Ur,Gr,qr,zr,Hr,Kr,Qr,te,we,kt,It,Lt,Nt,k,be,Ft,Ot,v,ns,ri,Ar,as,fs,Pr,oi,ls,us,ii,hp,cp,mp,ps,Qe,Je,dp,Se,Q=class{constructor(t,e=ut,o,i,s,n,f){w(this,v);c(this,"name");c(this,"root");c(this,"roots");c(this,"parent");c(this,"nocase");c(this,"isCWD",!1);w(this,X);w(this,_r);w(this,Dr);w(this,Mr);w(this,Ir);w(this,Lr);w(this,Nr);w(this,Fr);w(this,Br);w(this,jr);w(this,Wr);w(this,$r);w(this,Ur);w(this,Gr);w(this,qr);w(this,zr);w(this,Hr);w(this,Kr);w(this,Qr);w(this,te);w(this,we);w(this,kt);w(this,It);w(this,Lt);w(this,Nt);w(this,k);w(this,be);w(this,Ft);w(this,Ot);w(this,Qe,[]);w(this,Je,!1);w(this,Se);this.name=t,g(this,te,s?ti(t):Tr(t)),g(this,k,e&ty),this.nocase=s,this.roots=i,this.root=o||this,g(this,be,n),g(this,kt,f.fullpath),g(this,Lt,f.relative),g(this,Nt,f.relativePosix),this.parent=f.parent,this.parent?g(this,X,a(this.parent,X)):g(this,X,ip(f.fs))}get dev(){return a(this,_r)}get mode(){return a(this,Dr)}get nlink(){return a(this,Mr)}get uid(){return a(this,Ir)}get gid(){return a(this,Lr)}get rdev(){return a(this,Nr)}get blksize(){return a(this,Fr)}get ino(){return a(this,Br)}get size(){return a(this,jr)}get blocks(){return a(this,Wr)}get atimeMs(){return a(this,$r)}get mtimeMs(){return a(this,Ur)}get ctimeMs(){return a(this,Gr)}get birthtimeMs(){return a(this,qr)}get atime(){return a(this,zr)}get mtime(){return a(this,Hr)}get ctime(){return a(this,Kr)}get birthtime(){return a(this,Qr)}get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}depth(){return a(this,we)!==void 0?a(this,we):this.parent?g(this,we,this.parent.depth()+1):g(this,we,0)}childrenCache(){return a(this,be)}resolve(t){var n;if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?S(n=this.getRoot(e),v,ns).call(n,i):S(this,v,ns).call(this,i)}children(){let t=a(this,be).get(this);if(t)return t;let e=Object.assign([],{provisional:0});return a(this,be).set(this,e),g(this,k,a(this,k)&~os),e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let o=this.children(),i=this.nocase?ti(t):Tr(t);for(let l of o)if(a(l,te)===i)return l;let s=this.parent?this.sep:"",n=a(this,kt)?a(this,kt)+s+t:void 0,f=this.newChild(t,ut,{...e,parent:this,fullpath:n});return this.canReaddir()||g(f,k,a(f,k)|gt),o.push(f),f}relative(){if(this.isCWD)return"";if(a(this,Lt)!==void 0)return a(this,Lt);let t=this.name,e=this.parent;if(!e)return g(this,Lt,this.name);let o=e.relative();return o+(!o||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(a(this,Nt)!==void 0)return a(this,Nt);let t=this.name,e=this.parent;if(!e)return g(this,Nt,this.fullpathPosix());let o=e.relativePosix();return o+(!o||!e.parent?"":"/")+t}fullpath(){if(a(this,kt)!==void 0)return a(this,kt);let t=this.name,e=this.parent;if(!e)return g(this,kt,this.name);let i=e.fullpath()+(e.parent?this.sep:"")+t;return g(this,kt,i)}fullpathPosix(){if(a(this,It)!==void 0)return a(this,It);if(this.sep==="/")return g(this,It,this.fullpath());if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?g(this,It,`//?/${i}`):g(this,It,i)}let t=this.parent,e=t.fullpathPosix(),o=e+(!e||!t.parent?"":"/")+this.name;return g(this,It,o)}isUnknown(){return(a(this,k)&lt)===ut}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(a(this,k)&lt)===lp}isDirectory(){return(a(this,k)&lt)===Et}isCharacterDevice(){return(a(this,k)&lt)===ap}isBlockDevice(){return(a(this,k)&lt)===fp}isFIFO(){return(a(this,k)&lt)===np}isSocket(){return(a(this,k)&lt)===up}isSymbolicLink(){return(a(this,k)&ye)===ye}lstatCached(){return a(this,k)&Xu?this:void 0}readlinkCached(){return a(this,Ft)}realpathCached(){return a(this,Ot)}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(a(this,Ft))return!0;if(!this.parent)return!1;let t=a(this,k)&lt;return!(t!==ut&&t!==ye||a(this,k)&Xo||a(this,k)&gt)}calledReaddir(){return!!(a(this,k)&os)}isENOENT(){return!!(a(this,k)&gt)}isNamed(t){return this.nocase?a(this,te)===ti(t):a(this,te)===Tr(t)}async readlink(){var e;let t=a(this,Ft);if(t)return t;if(this.canReadlink()&&this.parent)try{let o=await a(this,X).promises.readlink(this.fullpath()),i=(e=await this.parent.realpath())==null?void 0:e.resolve(o);if(i)return g(this,Ft,i)}catch(o){S(this,v,us).call(this,o.code);return}}readlinkSync(){var e;let t=a(this,Ft);if(t)return t;if(this.canReadlink()&&this.parent)try{let o=a(this,X).readlinkSync(this.fullpath()),i=(e=this.parent.realpathSync())==null?void 0:e.resolve(o);if(i)return g(this,Ft,i)}catch(o){S(this,v,us).call(this,o.code);return}}async lstat(){if(!(a(this,k)&gt))try{return S(this,v,ps).call(this,await a(this,X).promises.lstat(this.fullpath())),this}catch(t){S(this,v,ls).call(this,t.code)}}lstatSync(){if(!(a(this,k)&gt))try{return S(this,v,ps).call(this,a(this,X).lstatSync(this.fullpath())),this}catch(t){S(this,v,ls).call(this,t.code)}}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let o=this.children();if(this.calledReaddir()){let s=o.slice(0,o.provisional);e?t(null,s):queueMicrotask(()=>t(null,s));return}if(a(this,Qe).push(t),a(this,Je))return;g(this,Je,!0);let i=this.fullpath();a(this,X).readdir(i,{withFileTypes:!0},(s,n)=>{if(s)S(this,v,oi).call(this,s.code),o.provisional=0;else{for(let f of n)S(this,v,ii).call(this,f,o);S(this,v,ri).call(this,o)}S(this,v,dp).call(this,o.slice(0,o.provisional))})}async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(a(this,Se))await a(this,Se);else{let o=()=>{};g(this,Se,new Promise(i=>o=i));try{for(let i of await a(this,X).promises.readdir(e,{withFileTypes:!0}))S(this,v,ii).call(this,i,t);S(this,v,ri).call(this,t)}catch(i){S(this,v,oi).call(this,i.code),t.provisional=0}g(this,Se,void 0),o()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let o of a(this,X).readdirSync(e,{withFileTypes:!0}))S(this,v,ii).call(this,o,t);S(this,v,ri).call(this,t)}catch(o){S(this,v,oi).call(this,o.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(a(this,k)&tp)return!1;let t=lt&a(this,k);return t===ut||t===Et||t===ye}shouldWalk(t,e){return(a(this,k)&Et)===Et&&!(a(this,k)&tp)&&!t.has(this)&&(!e||e(this))}async realpath(){if(a(this,Ot))return a(this,Ot);if(!((ei|Xo|gt)&a(this,k)))try{let t=await a(this,X).promises.realpath(this.fullpath());return g(this,Ot,this.resolve(t))}catch(t){S(this,v,fs).call(this)}}realpathSync(){if(a(this,Ot))return a(this,Ot);if(!((ei|Xo|gt)&a(this,k)))try{let t=a(this,X).realpathSync(this.fullpath());return g(this,Ot,this.resolve(t))}catch(t){S(this,v,fs).call(this)}}[pp](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),o=[],i=this;for(;i&&i.parent;)e.add(i),g(i,Lt,o.join(this.sep)),g(i,Nt,o.join("/")),i=i.parent,o.push("..");for(i=t;i&&i.parent&&!e.has(i);)g(i,Lt,void 0),g(i,Nt,void 0),i=i.parent}};X=new WeakMap,_r=new WeakMap,Dr=new WeakMap,Mr=new WeakMap,Ir=new WeakMap,Lr=new WeakMap,Nr=new WeakMap,Fr=new WeakMap,Br=new WeakMap,jr=new WeakMap,Wr=new WeakMap,$r=new WeakMap,Ur=new WeakMap,Gr=new WeakMap,qr=new WeakMap,zr=new WeakMap,Hr=new WeakMap,Kr=new WeakMap,Qr=new WeakMap,te=new WeakMap,we=new WeakMap,kt=new WeakMap,It=new WeakMap,Lt=new WeakMap,Nt=new WeakMap,k=new WeakMap,be=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,v=new WeakSet,ns=function(t){let e=this;for(let o of t)e=e.child(o);return e},ri=function(t){var e;g(this,k,a(this,k)|os);for(let o=t.provisional;o<t.length;o++){let i=t[o];i&&S(e=i,v,Ar).call(e)}},Ar=function(){a(this,k)&gt||(g(this,k,(a(this,k)|gt)&Er),S(this,v,as).call(this))},as=function(){var e;let t=this.children();t.provisional=0;for(let o of t)S(e=o,v,Ar).call(e)},fs=function(){g(this,k,a(this,k)|ei),S(this,v,Pr).call(this)},Pr=function(){if(a(this,k)&Or)return;let t=a(this,k);(t&lt)===Et&&(t&=Er),g(this,k,t|Or),S(this,v,as).call(this)},oi=function(t=""){t==="ENOTDIR"||t==="EPERM"?S(this,v,Pr).call(this):t==="ENOENT"?S(this,v,Ar).call(this):this.children().provisional=0},ls=function(t=""){var e;if(t==="ENOTDIR"){let o=this.parent;S(e=o,v,Pr).call(e)}else t==="ENOENT"&&S(this,v,Ar).call(this)},us=function(t=""){var o;let e=a(this,k);e|=Xo,t==="ENOENT"&&(e|=gt),(t==="EINVAL"||t==="UNKNOWN")&&(e&=Er),g(this,k,e),t==="ENOTDIR"&&this.parent&&S(o=this.parent,v,Pr).call(o)},ii=function(t,e){return S(this,v,cp).call(this,t,e)||S(this,v,hp).call(this,t,e)},hp=function(t,e){let o=is(t),i=this.newChild(t.name,o,{parent:this}),s=a(i,k)&lt;return s!==Et&&s!==ye&&s!==ut&&g(i,k,a(i,k)|Or),e.unshift(i),e.provisional++,i},cp=function(t,e){for(let o=e.provisional;o<e.length;o++){let i=e[o];if((this.nocase?ti(t.name):Tr(t.name))===a(i,te))return S(this,v,mp).call(this,t,i,o,e)}},mp=function(t,e,o,i){let s=e.name;return g(e,k,a(e,k)&Er|is(t)),s!==t.name&&(e.name=t.name),o!==i.provisional&&(o===i.length-1?i.pop():i.splice(o,1),i.unshift(e)),i.provisional++,e},ps=function(t){let{atime:e,atimeMs:o,birthtime:i,birthtimeMs:s,blksize:n,blocks:f,ctime:l,ctimeMs:u,dev:h,gid:d,ino:m,mode:y,mtime:b,mtimeMs:x,nlink:C,rdev:E,size:T,uid:A}=t;g(this,zr,e),g(this,$r,o),g(this,Qr,i),g(this,qr,s),g(this,Fr,n),g(this,Wr,f),g(this,Kr,l),g(this,Gr,u),g(this,_r,h),g(this,Lr,d),g(this,Br,m),g(this,Dr,y),g(this,Hr,b),g(this,Ur,x),g(this,Mr,C),g(this,Nr,E),g(this,jr,T),g(this,Ir,A);let R=is(t);g(this,k,a(this,k)&Er|R|Xu),R!==ut&&R!==Et&&R!==ye&&g(this,k,a(this,k)|Or)},Qe=new WeakMap,Je=new WeakMap,dp=function(t){g(this,Je,!1);let e=a(this,Qe).slice();a(this,Qe).length=0,e.forEach(o=>o(null,t))},Se=new WeakMap;var ni=class r extends Q{constructor(e,o=ut,i,s,n,f,l){super(e,o,i,s,n,f,l);c(this,"sep","\\");c(this,"splitSep",Xx)}newChild(e,o=ut,i={}){return new r(e,o,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Ze.win32.parse(e).root}getRoot(e){if(e=Zx(e.toUpperCase()),e===this.root.name)return this.root;for(let[o,i]of Object.entries(this.roots))if(this.sameRoot(e,o))return this.roots[e]=i;return this.roots[e]=new Xe(e,this).root}sameRoot(e,o=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(sp,"$1\\"),e===o}},ai=class r extends Q{constructor(e,o=ut,i,s,n,f,l){super(e,o,i,s,n,f,l);c(this,"splitSep","/");c(this,"sep","/")}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,o=ut,i={}){return new r(e,o,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Ve,Ye,Jr,Vr,fi=class{constructor(t=process.cwd(),e,o,{nocase:i,childrenCacheSize:s=16*1024,fs:n=kr}={}){c(this,"root");c(this,"rootPath");c(this,"roots");c(this,"cwd");w(this,Ve);w(this,Ye);w(this,Jr);c(this,"nocase");w(this,Vr);g(this,Vr,ip(n)),(t instanceof URL||t.startsWith("file://"))&&(t=(0,op.fileURLToPath)(t));let f=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(f),g(this,Ve,new si),g(this,Ye,new si),g(this,Jr,new ss(s));let l=f.substring(this.rootPath.length).split(o);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(a(this,Vr)),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,d=e.sep,m=this.rootPath,y=!1;for(let b of l){let x=h--;u=u.child(b,{relative:new Array(x).fill("..").join(d),relativePosix:new Array(x).fill("..").join("/"),fullpath:m+=(y?"":d)+b}),y=!0}this.cwd=u}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return a(this,Jr)}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){let n=t[s];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let o=a(this,Ve).get(e);if(o!==void 0)return o;let i=this.cwd.resolve(e).fullpath();return a(this,Ve).set(e,i),i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){let n=t[s];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let o=a(this,Ye).get(e);if(o!==void 0)return o;let i=this.cwd.resolve(e).fullpathPosix();return a(this,Ye).set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o}=e;if(t.canReaddir()){let i=await t.readdir();return o?i:i.map(s=>s.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0}=e;return t.canReaddir()?o?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=await t.readlink();return e?o:o==null?void 0:o.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=t.readlinkSync();return e?o:o==null?void 0:o.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=await t.realpath();return e?o:o==null?void 0:o.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=t.realpathSync();return e?o:o==null?void 0:o.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=[];(!s||s(t))&&f.push(o?t:t.fullpath());let l=new Set,u=(d,m)=>{l.add(d),d.readdirCB((y,b)=>{if(y)return m(y);let x=b.length;if(!x)return m();let C=()=>{--x===0&&m()};for(let E of b)(!s||s(E))&&f.push(o?E:E.fullpath()),i&&E.isSymbolicLink()?E.realpath().then(T=>T!=null&&T.isUnknown()?T.lstat():T).then(T=>T!=null&&T.shouldWalk(l,n)?u(T,C):C()):E.shouldWalk(l,n)?u(E,C):C()},!0)},h=t;return new Promise((d,m)=>{u(h,y=>{if(y)return m(y);d(f)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=[];(!s||s(t))&&f.push(o?t:t.fullpath());let l=new Set([t]);for(let u of l){let h=u.readdirSync();for(let d of h){(!s||s(d))&&f.push(o?d:d.fullpath());let m=d;if(d.isSymbolicLink()){if(!(i&&(m=d.realpathSync())))continue;m.isUnknown()&&m.lstatSync()}m.shouldWalk(l,n)&&l.add(m)}}return f}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e;(!s||s(t))&&(yield o?t:t.fullpath());let f=new Set([t]);for(let l of f){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield o?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(i&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(f,n)&&f.add(d)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=new Xt({objectMode:!0});(!s||s(t))&&f.write(o?t:t.fullpath());let l=new Set,u=[t],h=0,d=()=>{let m=!1;for(;!m;){let y=u.shift();if(!y){h===0&&f.end();return}h++,l.add(y);let b=(C,E,T=!1)=>{if(C)return f.emit("error",C);if(i&&!T){let A=[];for(let R of E)R.isSymbolicLink()&&A.push(R.realpath().then(N=>N!=null&&N.isUnknown()?N.lstat():N));if(A.length){Promise.all(A).then(()=>b(null,E,!0));return}}for(let A of E)A&&(!s||s(A))&&(f.write(o?A:A.fullpath())||(m=!0));h--;for(let A of E){let R=A.realpathCached()||A;R.shouldWalk(l,n)&&u.push(R)}m&&!f.flowing?f.once("drain",d):x||d()},x=!0;y.readdirCB(b,!0),x=!1}};return d(),f}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=new Xt({objectMode:!0}),l=new Set;(!s||s(t))&&f.write(o?t:t.fullpath());let u=[t],h=0,d=()=>{let m=!1;for(;!m;){let y=u.shift();if(!y){h===0&&f.end();return}h++,l.add(y);let b=y.readdirSync();for(let x of b)(!s||s(x))&&(f.write(o?x:x.fullpath())||(m=!0));h--;for(let x of b){let C=x;if(x.isSymbolicLink()){if(!(i&&(C=x.realpathSync())))continue;C.isUnknown()&&C.lstatSync()}C.shouldWalk(l,n)&&u.push(C)}}m&&!f.flowing&&f.once("drain",d)};return d(),f}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[pp](e)}};Ve=new WeakMap,Ye=new WeakMap,Jr=new WeakMap,Vr=new WeakMap;var Xe=class extends fi{constructor(e=process.cwd(),o={}){let{nocase:i=!0}=o;super(e,Ze.win32,"\\",{...o,nocase:i});c(this,"sep","\\");this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return Ze.win32.parse(e).root.toUpperCase()}newRoot(e){return new ni(this.rootPath,Et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},tr=class extends fi{constructor(e=process.cwd(),o={}){let{nocase:i=!1}=o;super(e,Ze.posix,"/",{...o,nocase:i});c(this,"sep","/");this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new ai(this.rootPath,Et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Rr=class extends tr{constructor(t=process.cwd(),e={}){let{nocase:o=!0}=e;super(t,{...e,nocase:o})}},EO=process.platform==="win32"?ni:ai,gp=process.platform==="win32"?Xe:process.platform==="darwin"?Rr:tr;var ey=r=>r.length>=1,ry=r=>r.length>=1,j,it,q,ve,xt,Yr,re,oe,ie,er,cs=class cs{constructor(t,e,o,i){w(this,j);w(this,it);w(this,q);c(this,"length");w(this,ve);w(this,xt);w(this,Yr);w(this,re);w(this,oe);w(this,ie);w(this,er,!0);if(!ey(t))throw new TypeError("empty pattern list");if(!ry(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,o<0||o>=this.length)throw new TypeError("index out of range");if(g(this,j,t),g(this,it,e),g(this,q,o),g(this,ve,i),a(this,q)===0){if(this.isUNC()){let[s,n,f,l,...u]=a(this,j),[h,d,m,y,...b]=a(this,it);u[0]===""&&(u.shift(),b.shift());let x=[s,n,f,l,""].join("/"),C=[h,d,m,y,""].join("/");g(this,j,[x,...u]),g(this,it,[C,...b]),this.length=a(this,j).length}else if(this.isDrive()||this.isAbsolute()){let[s,...n]=a(this,j),[f,...l]=a(this,it);n[0]===""&&(n.shift(),l.shift());let u=s+"/",h=f+"/";g(this,j,[u,...n]),g(this,it,[h,...l]),this.length=a(this,j).length}}}pattern(){return a(this,j)[a(this,q)]}isString(){return typeof a(this,j)[a(this,q)]=="string"}isGlobstar(){return a(this,j)[a(this,q)]===z}isRegExp(){return a(this,j)[a(this,q)]instanceof RegExp}globString(){return g(this,Yr,a(this,Yr)||(a(this,q)===0?this.isAbsolute()?a(this,it)[0]+a(this,it).slice(1).join("/"):a(this,it).join("/"):a(this,it).slice(a(this,q)).join("/")))}hasMore(){return this.length>a(this,q)+1}rest(){return a(this,xt)!==void 0?a(this,xt):this.hasMore()?(g(this,xt,new cs(a(this,j),a(this,it),a(this,q)+1,a(this,ve))),g(a(this,xt),ie,a(this,ie)),g(a(this,xt),oe,a(this,oe)),g(a(this,xt),re,a(this,re)),a(this,xt)):g(this,xt,null)}isUNC(){let t=a(this,j);return a(this,oe)!==void 0?a(this,oe):g(this,oe,a(this,ve)==="win32"&&a(this,q)===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3])}isDrive(){let t=a(this,j);return a(this,re)!==void 0?a(this,re):g(this,re,a(this,ve)==="win32"&&a(this,q)===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]))}isAbsolute(){let t=a(this,j);return a(this,ie)!==void 0?a(this,ie):g(this,ie,t[0]===""&&t.length>1||this.isDrive()||this.isUNC())}root(){let t=a(this,j)[0];return typeof t=="string"&&this.isAbsolute()&&a(this,q)===0?t:""}checkFollowGlobstar(){return!(a(this,q)===0||!this.isGlobstar()||!a(this,er))}markFollowGlobstar(){return a(this,q)===0||!this.isGlobstar()||!a(this,er)?!1:(g(this,er,!1),!0)}};j=new WeakMap,it=new WeakMap,q=new WeakMap,ve=new WeakMap,xt=new WeakMap,Yr=new WeakMap,re=new WeakMap,oe=new WeakMap,ie=new WeakMap,er=new WeakMap;var rr=cs;var oy=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",or=class{constructor(t,{nobrace:e,nocase:o,noext:i,noglobstar:s,platform:n=oy}){c(this,"relative");c(this,"relativeChildren");c(this,"absolute");c(this,"absoluteChildren");c(this,"platform");c(this,"mmopts");this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=n,this.mmopts={dot:!0,nobrace:e,nocase:o,noext:i,noglobstar:s,optimizationLevel:2,platform:n,nocomment:!0,nonegate:!0};for(let f of t)this.add(f)}add(t){let e=new rt(t,this.mmopts);for(let o=0;o<e.set.length;o++){let i=e.set[o],s=e.globParts[o];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let n=new rr(i,s,0,this.platform),f=new rt(n.globString(),this.mmopts),l=s[s.length-1]==="**",u=n.isAbsolute();u?this.absolute.push(f):this.relative.push(f),l&&(u?this.absoluteChildren.push(f):this.relativeChildren.push(f))}}ignored(t){let e=t.fullpath(),o=`${e}/`,i=t.relative()||".",s=`${i}/`;for(let n of this.relative)if(n.match(i)||n.match(s))return!0;for(let n of this.absolute)if(n.match(e)||n.match(o))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",o=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(o))return!0;for(let i of this.absoluteChildren)if(i.match(e))return!0;return!1}};var ms=class r{constructor(t=new Map){c(this,"store");this.store=t}copy(){return new r(new Map(this.store))}hasWalked(t,e){var o;return(o=this.store.get(t.fullpath()))==null?void 0:o.has(e.globString())}storeWalked(t,e){let o=t.fullpath(),i=this.store.get(o);i?i.add(e.globString()):this.store.set(o,new Set([e.globString()]))}},ds=class{constructor(){c(this,"store",new Map)}add(t,e,o){let i=(e?2:0)|(o?1:0),s=this.store.get(t);this.store.set(t,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},gs=class{constructor(){c(this,"store",new Map)}add(t,e){if(!t.canReaddir())return;let o=this.store.get(t);o?o.find(i=>i.globString()===e.globString())||o.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Zr=class r{constructor(t,e){c(this,"hasWalkedCache");c(this,"matches",new ds);c(this,"subwalks",new gs);c(this,"patterns");c(this,"follow");c(this,"dot");c(this,"opts");this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new ms}processPatterns(t,e){this.patterns=e;let o=e.map(i=>[t,i]);for(let[i,s]of o){this.hasWalkedCache.storeWalked(i,s);let n=s.root(),f=s.isAbsolute()&&this.opts.absolute!==!1;if(n){i=i.resolve(n==="/"&&this.opts.root!==void 0?this.opts.root:n);let d=s.rest();if(d)s=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),f,d);continue}else if(l===z){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let d=u==null?void 0:u.pattern(),m=u==null?void 0:u.rest();if(!u||(d===""||d===".")&&!m)this.matches.add(i,f,d===""||d===".");else if(d===".."){let y=i.parent||i;m?this.hasWalkedCache.hasWalked(y,m)||this.subwalks.add(y,m):this.matches.add(y,f,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(t,e){let o=this.subwalks.get(t),i=this.child();for(let s of e)for(let n of o){let f=n.isAbsolute(),l=n.pattern(),u=n.rest();l===z?i.testGlobstar(s,n,u,f):l instanceof RegExp?i.testRegExp(s,l,u,f):i.testString(s,l,u,f)}return i}testGlobstar(t,e,o,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(o&&e.checkFollowGlobstar()?this.subwalks.add(t,o):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),o){let s=o.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(t,s,o.rest(),i);else if(s===".."){let n=t.parent||t;this.subwalks.add(n,o)}else s instanceof RegExp&&this.testRegExp(t,s,o.rest(),i)}}testRegExp(t,e,o,i){e.test(t.name)&&(o?this.subwalks.add(t,o):this.matches.add(t,i,!1))}testString(t,e,o,i){t.isNamed(e)&&(o?this.subwalks.add(t,o):this.matches.add(t,i,!1))}};var iy=(r,t)=>typeof r=="string"?new or([r],t):Array.isArray(r)?new or(r,t):r,ir,Bt,Ee,pt,Ce,xs,li=class{constructor(t,e,o){w(this,pt);c(this,"path");c(this,"patterns");c(this,"opts");c(this,"seen",new Set);c(this,"paused",!1);c(this,"aborted",!1);w(this,ir,[]);w(this,Bt);w(this,Ee);c(this,"signal");c(this,"maxDepth");c(this,"includeChildMatches");var i;if(this.patterns=t,this.path=e,this.opts=o,g(this,Ee,!o.posix&&o.platform==="win32"?"\\":"/"),this.includeChildMatches=o.includeChildMatches!==!1,(o.ignore||!this.includeChildMatches)&&(g(this,Bt,iy((i=o.ignore)!=null?i:[],o)),!this.includeChildMatches&&typeof a(this,Bt).add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=o.maxDepth||1/0,o.signal&&(this.signal=o.signal,this.signal.addEventListener("abort",()=>{a(this,ir).length=0}))}pause(){this.paused=!0}resume(){var e;if((e=this.signal)!=null&&e.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=a(this,ir).shift());)t()}onResume(t){var e;(e=this.signal)!=null&&e.aborted||(this.paused?a(this,ir).push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let o;if(this.opts.realpath){if(o=t.realpathCached()||await t.realpath(),!o)return;t=o}let s=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let n=await s.realpath();n&&(n.isUnknown()||this.opts.stat)&&await n.lstat()}return this.matchCheckTest(s,e)}matchCheckTest(t,e){var o;return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!((o=t.realpathCached())!=null&&o.isDirectory()))&&!S(this,pt,Ce).call(this,t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let o;if(this.opts.realpath){if(o=t.realpathCached()||t.realpathSync(),!o)return;t=o}let s=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let n=s.realpathSync();n&&(n!=null&&n.isUnknown()||this.opts.stat)&&n.lstatSync()}return this.matchCheckTest(s,e)}matchFinish(t,e){var s;if(S(this,pt,Ce).call(this,t))return;if(!this.includeChildMatches&&((s=a(this,Bt))!=null&&s.add)){let n=`${t.relativePosix()}/**`;a(this,Bt).add(n)}let o=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?a(this,Ee):"";if(this.opts.withFileTypes)this.matchEmit(t);else if(o){let n=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(n+i)}else{let n=this.opts.posix?t.relativePosix():t.relative(),f=this.opts.dotRelative&&!n.startsWith(".."+a(this,Ee))?"."+a(this,Ee):"";this.matchEmit(n?f+n+i:"."+i)}}async match(t,e,o){let i=await this.matchCheck(t,o);i&&this.matchFinish(i,e)}matchSync(t,e,o){let i=this.matchCheckSync(t,o);i&&this.matchFinish(i,e)}walkCB(t,e,o){var i;(i=this.signal)!=null&&i.aborted&&o(),this.walkCB2(t,e,new Zr(this.opts),o)}walkCB2(t,e,o,i){var f;if(S(this,pt,xs).call(this,t))return i();if((f=this.signal)!=null&&f.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,o,i));return}o.processPatterns(t,e);let s=1,n=()=>{--s===0&&i()};for(let[l,u,h]of o.matches.entries())S(this,pt,Ce).call(this,l)||(s++,this.match(l,u,h).then(()=>n()));for(let l of o.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirCached();l.calledReaddir()?this.walkCB3(l,u,o,n):l.readdirCB((h,d)=>this.walkCB3(l,d,o,n),!0)}n()}walkCB3(t,e,o,i){o=o.filterEntries(t,e);let s=1,n=()=>{--s===0&&i()};for(let[f,l,u]of o.matches.entries())S(this,pt,Ce).call(this,f)||(s++,this.match(f,l,u).then(()=>n()));for(let[f,l]of o.subwalks.entries())s++,this.walkCB2(f,l,o.child(),n);n()}walkCBSync(t,e,o){var i;(i=this.signal)!=null&&i.aborted&&o(),this.walkCB2Sync(t,e,new Zr(this.opts),o)}walkCB2Sync(t,e,o,i){var f;if(S(this,pt,xs).call(this,t))return i();if((f=this.signal)!=null&&f.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,o,i));return}o.processPatterns(t,e);let s=1,n=()=>{--s===0&&i()};for(let[l,u,h]of o.matches.entries())S(this,pt,Ce).call(this,l)||this.matchSync(l,u,h);for(let l of o.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirSync();this.walkCB3Sync(l,u,o,n)}n()}walkCB3Sync(t,e,o,i){o=o.filterEntries(t,e);let s=1,n=()=>{--s===0&&i()};for(let[f,l,u]of o.matches.entries())S(this,pt,Ce).call(this,f)||this.matchSync(f,l,u);for(let[f,l]of o.subwalks.entries())s++,this.walkCB2Sync(f,l,o.child(),n);n()}};ir=new WeakMap,Bt=new WeakMap,Ee=new WeakMap,pt=new WeakSet,Ce=function(t){var e,o;return this.seen.has(t)||!!((o=(e=a(this,Bt))==null?void 0:e.ignored)!=null&&o.call(e,t))},xs=function(t){var e,o;return!!((o=(e=a(this,Bt))==null?void 0:e.childrenIgnored)!=null&&o.call(e,t))};var Xr=class extends li{constructor(e,o,i){super(e,o,i);c(this,"matches",new Set)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((o,i)=>{this.walkCB(this.path,this.patterns,()=>{var s;(s=this.signal)!=null&&s.aborted?i(this.signal.reason):o(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var o;if((o=this.signal)!=null&&o.aborted)throw this.signal.reason}),this.matches}},to=class extends li{constructor(e,o,i){super(e,o,i);c(this,"results");this.results=new Xt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var sy=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",yt=class{constructor(t,e){c(this,"absolute");c(this,"cwd");c(this,"root");c(this,"dot");c(this,"dotRelative");c(this,"follow");c(this,"ignore");c(this,"magicalBraces");c(this,"mark");c(this,"matchBase");c(this,"maxDepth");c(this,"nobrace");c(this,"nocase");c(this,"nodir");c(this,"noext");c(this,"noglobstar");c(this,"pattern");c(this,"platform");c(this,"realpath");c(this,"scurry");c(this,"stat");c(this,"signal");c(this,"windowsPathsNoEscape");c(this,"withFileTypes");c(this,"includeChildMatches");c(this,"opts");c(this,"patterns");if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,xp.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=t,this.platform=e.platform||sy,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=e.platform==="win32"?Xe:e.platform==="darwin"?Rr:e.platform?tr:gp;this.scurry=new l(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let o=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:o,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new rt(l,i)),[n,f]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=n.map((l,u)=>{let h=f[u];if(!h)throw new Error("invalid pattern object");return new rr(l,h,0,this.platform)})}async walk(){return[...await new Xr(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 Xr(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 to(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 to(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 ys=(r,t={})=>{Array.isArray(r)||(r=[r]);for(let e of r)if(new rt(e,t).hasMagic())return!0;return!1};function ui(r,t={}){return new yt(r,t).streamSync()}function bp(r,t={}){return new yt(r,t).stream()}function Sp(r,t={}){return new yt(r,t).walkSync()}async function yp(r,t={}){return new yt(r,t).walk()}function pi(r,t={}){return new yt(r,t).iterateSync()}function vp(r,t={}){return new yt(r,t).iterate()}var ny=ui,ay=Object.assign(bp,{sync:ui}),fy=pi,ly=Object.assign(vp,{sync:pi}),eo=Object.assign(Sp,{stream:ui,iterate:pi}),wp=Object.assign(yp,{glob:yp,globSync:Sp,sync:eo,globStream:bp,stream:ay,globStreamSync:ui,streamSync:ny,globIterate:vp,iterate:ly,globIterateSync:pi,iterateSync:fy,Glob:yt,hasMagic:ys,escape:ze,unescape:mt});wp.glob=wp;ae();var uy=O.withTag("listChromeProfiles");function Cp(){let r=eo("./**/Cookies",{cwd:Ge,absolute:!0});return uy.debug("Found cookie files:",r),r}var hi=require("crypto");ce();var py=at(r=>r.length>=3&&r[0]===118&&r[1]===49&&r[2]===48?r.slice(3):r,r=>r.toString("hex")),hy=at(r=>{let t=r[r.length-1];return t&&t<=16?r.slice(0,-t):r},r=>r.toString("hex"));function cy(r){var e;let t=[/.*?0t(.+)$/,/.*?1e`(.+)$/,/.*?[`'](.+)$/,/[^\x20-\x7E]*([\x20-\x7E].+)$/];for(let o of t){let i=r.match(o),s=(e=i==null?void 0:i[1])!=null?e:"";if(s.length>0)return s}return r}async function Ep(r,t){if(typeof t!="string")throw new Error("password must be a string");if(!Buffer.isBuffer(r))throw new Error("encryptedData must be a Buffer");return new Promise((e,o)=>{(0,hi.pbkdf2)(t,"saltysalt",1003,16,"sha1",(i,s)=>{try{if(i){o(new Error("Failed to derive key: "+i.message));return}let n=py(r);if(n.length%16!==0){o(new Error("Encrypted data length is not a multiple of 16"));return}let f=Buffer.alloc(16," "),l=(0,hi.createDecipheriv)("aes-128-cbc",s,f);l.setAutoPadding(!1);let u=l.update(n);try{l.final()}catch(d){o(new Error("Failed to finalize decryption: "+d.message));return}u=hy(u);let h=u.toString("utf8");e(cy(h))}catch(n){o(new Error("Decryption failed: "+n.message))}})})}ce();Qt();var _p=at(async()=>{if(process.platform!=="darwin")throw F("Chrome password retrieval failed",new Error("This only works on macOS"),{platform:process.platform}),new Error("This only works on macOS");try{let{getChromePassword:r}=await Promise.resolve().then(()=>(Rp(),Pp)),t=await r();return St("ChromePassword","Retrieved password successfully",{platform:"macOS"}),t}catch(r){throw F("Chrome password retrieval failed",r,{platform:"macOS"}),r}});function yy(r){return typeof r!="number"||r<=0?"Infinity":new Date(r)}function Dp(r,t,e,o,i,s){return{domain:r,name:t,value:e,expiry:yy(o),meta:{file:i,browser:"Chrome",decrypted:s}}}var ci=class{constructor(){this.logger=Ql("ChromeCookieQueryStrategy");this.browserName="Chrome"}async queryCookies(t,e){try{if(this.logger.info("Querying cookies",{name:t,domain:e}),process.platform!=="darwin")return this.logger.warn("Platform not supported",{platform:process.platform}),[];let i=Cp().map(f=>f),s=await _p(),n=await Bo(i,f=>this.processFile(f,t,e,s),[]);return jo("Cookie query",!0,{count:n.length}),n}catch(o){return F("Failed to query cookies",o,{name:t,domain:e}),[]}}async processFile(t,e,o,i){try{let s=await eu({name:e,domain:o,file:t}),n={file:t,password:i};return(await Promise.allSettled(s.map(l=>this.processCookie(l,n)))).map(l=>l.status==="fulfilled"?l.value:null).filter(l=>l!==null)}catch(s){return this.logger.error("Failed to process cookie file",{error:s,file:t}),[]}}async processCookie(t,e){try{let o=Buffer.isBuffer(t.value)?t.value:Buffer.from(String(t.value)),i=await Ep(o,e.password);return Dp(t.domain,t.name,i,t.expiry,e.file,!0)}catch(o){return this.logger.warn("Failed to decrypt cookie",{error:o}),Dp(t.domain,t.name,t.value.toString("utf-8"),t.expiry,e.file,!1)}}};var ws=require("path");Qt();function wy(){let r=[],t=process.env.HOME;if(typeof t!="string"||t.length===0)return Wo("FirefoxCookieQuery","HOME environment variable not set"),r;let e=[(0,ws.join)(t,"Library/Application Support/Firefox/Profiles/*/cookies.sqlite"),(0,ws.join)(t,".mozilla/firefox/*/cookies.sqlite")];for(let o of e){let i=eo(o);r.push(...i)}return St("FirefoxCookieQuery","Found Firefox cookie files",{files:r}),r}var mi=class{constructor(){this.browserName="Firefox"}async queryCookies(t,e){let o=wy(),i=[];for(let s of o)try{let n=await Uo({file:s,sql:"SELECT name, value, host as domain, expiry FROM moz_cookies WHERE name = ? AND host LIKE ?",params:[t,`%${e}%`],rowTransform:f=>({name:f.name,value:f.value,domain:f.domain,expiry:f.expiry>0?new Date(f.expiry*1e3):"Infinity",meta:{file:s,browser:"Firefox",decrypted:!1}})});i.push(...n)}catch(n){n instanceof Error?Wo("FirefoxCookieQuery",`Error reading Firefox cookie file ${s}`,{error:n.message}):Wo("FirefoxCookieQuery",`Error reading Firefox cookie file ${s}`)}return i}};var Lp=require("path");Qt();var Mp=require("fs");var by=1706047360;function di(r,t){let e=t;for(;e<r.length&&r[e]!==0;)e++;return[r.toString("utf8",t,e),e+1]}function Sy(r,t){let e=r.readUInt32LE(t),o=t+43,s=r.readUInt32LE(o)-by,n=t+56,[f,l]=di(r,n);n=l;let[u,h]=di(r,n);n=h;let[d,m]=di(r,n);n=m;let[y,b]=di(r,n);return[{name:u,value:y,domain:f.startsWith(".")?f.slice(1):f,path:d||"/",expiry:s,creation:s},e]}function vy(r,t,e){let o=t+5,i=r.readUInt32BE(o),s=t+i,n=[],f=t+e;for(;s<f-8;)try{let[l,u]=Sy(r,s);n.push(l),s+=u}catch(l){console.warn(`Error decoding cookie at offset ${s}:`,l);break}return n}function Ip(r){let t=(0,Mp.readFileSync)(r),e=t.readUInt32BE(4),o=[];for(let n=0;n<e;n++)o.push(t.readUInt32BE(8+n*4));let i=8+e*4,s=[];for(let n=0;n<e;n++)try{let f=vy(t,i,o[n]);s.push(...f),i+=o[n]}catch(f){console.warn(`Error decoding page ${n}:`,f),i+=o[n]}return s}var gi=class{constructor(){this.browserName="Safari"}getHomeDir(){let t=process.env.HOME;return typeof t!="string"||t.trim()===""?(F("SafariCookieQueryStrategy","HOME environment variable is not set"),null):t}getCookieDbPath(t){return(0,Lp.join)(t,"Library","Containers","com.apple.Safari","Data","Library","Cookies","Cookies.binarycookies")}decodeCookies(t,e,o){try{return Ip(t).filter(s=>s.name===e&&s.domain.includes(o)).map(s=>({domain:s.domain,name:s.name,value:s.value.toString(),expiry:typeof s.expiry=="number"&&s.expiry>0?new Date(s.expiry*1e3):"Infinity",meta:{file:t,browser:"Safari",decrypted:!1}}))}catch(i){return i instanceof Error?F("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:i,name:e,domain:o}):F("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:"Unknown error",name:e,domain:o}),[]}}async queryCookies(t,e){let o=this.getHomeDir();if(typeof o!="string"||o.length===0)return Promise.resolve([]);let i=this.getCookieDbPath(o);return Promise.resolve(this.decodeCookies(i,t,e))}};var xi=class{constructor(){this.browserName="all";this.strategies=[ci,mi,gi]}async queryCookies(t,e){return O.info(`Querying cookies for name: ${t}, domain: ${e}`),Bo(this.strategies,async o=>{try{return await new o().queryCookies(t,e)}catch(i){return i instanceof Error?O.error(`Error querying ${o.name}: ${i.message}`):O.error(`Error querying ${o.name}: Unknown error`),[]}})}};function Cy(r){return r.expiry==="Infinity"?{...r,expiry:"Infinity"}:typeof r.expiry=="number"?{...r,expiry:new Date(r.expiry*1e3)}:r}async function Np(r,t={}){var n;let e=(n=t.strategy)!=null?n:new xi,o=async f=>(await e.queryCookies(f.name,f.domain)).map(Cy),i=Array.isArray(r)?await Promise.all(r.map(o)):await o(r),s=Array.isArray(i)?i.flat():i;if(t.removeExpired===!0){let f=Date.now();s=s.filter(l=>l.expiry==="Infinity"||l.expiry instanceof Date&&l.expiry.getTime()>f)}return typeof t.limit=="number"&&t.limit>0&&(s=s.slice(0,t.limit)),s}function bs(r,t=!1){if(r.length===0)return"No cookies found.";let e=[];e.push(`Found ${r.length} cookie${r.length===1?"":"s"}:`);for(let o of r)if(e.push(`- ${o.name}=${o.value}`),t){if(e.push(` Domain: ${o.domain}`),o.expiry!==void 0){let i=typeof o.expiry=="number"||o.expiry==="Infinity"?o.expiry:o.expiry.toISOString();e.push(` Expires: ${i}`)}o.meta&&e.push(` Metadata: ${JSON.stringify(o.meta,null,2)}`)}return e.join(`
5
+ `)}ae();function Ey(r){O.log(r)}function ky(r){let t=Fo(r,e=>{var o,i;return(i=(o=e.meta)==null?void 0:o.file)!=null?i:"unknown"});O.log(JSON.stringify(t,null,2))}function Oy(r){O.log(bs(r))}function Ty(r){let t=Fo(r,e=>{var o,i;return(i=(o=e.meta)==null?void 0:o.file)!=null?i:"unknown"});for(let[e,o]of Object.entries(t))O.log(`${e}: ${bs(o)}`)}function Ay(r){O.log(JSON.stringify(r,null,2))}function Py(r){let t=new Set(r.map(e=>e.value));for(let e of t)O.log(e)}function Ry(r){return r.dump===!0||r.d===!0}function _y(r){return r["dump-grouped"]===!0||r.D===!0}function Dy(r){return r.render===!0||r["render-merged"]===!0||r.r===!0}function My(r){return r["render-grouped"]===!0||r.R===!0}function Iy(r,t){if(Ry(t)){Ey(r);return}if(_y(t)){ky(r);return}if(Dy(t)){Oy(r);return}if(My(t)){Ty(r);return}if(t.output==="json"){Ay(r);return}Py(r)}async function Fp(r,t,e,o,i,s){try{let n=await Np(r,{limit:i,removeExpired:s});if(n.length===0){O.error("No results");return}Iy(n,o)}catch(n){n instanceof Error?O.error(n.message):O.error("An unknown error occurred")}}function Ly(){O.log("Usage: get-cookie [name] [domain] [options]"),O.log("Options:"),O.log(" -h, --help: Show this help message"),O.log(" -v, --verbose: Enable verbose output"),O.log(" -d, --dump: Dump all results"),O.log(" -D, --dump-grouped: Dump all results, grouped by profile"),O.log(" -r, --render: Render all results"),O.log(" -u, --url: URL to extract cookie specs from"),O.log(" -n, --name: Cookie name pattern"),O.log(" -d, --domain: Cookie domain pattern"),O.log(" --output: Output format (e.g., json)")}function Ny(r,t){return{name:r||"%",domain:t||"%"}}function Fy(r,t){let e=r.url;if(typeof e=="string")return ks(e);let o=r.name||t[0]||"%",i=r.domain||t[1]||"%";return[Ny(o,i)]}async function By(r,t){let e=Fy(r,t);r.verbose===!0&&O.log("cookieSpecs",e);try{await Fp(e,["chrome","firefox","safari"],["default"],{...r})}catch(o){o instanceof Error?O.error("Error querying cookies:",o.message):O.error("An unknown error occurred while querying cookies")}}async function jy(){let r=process.argv.slice(2),{values:t,positionals:e}=Ts(r);if(t.help===!0){Ly();return}await By(t,e)}jy().catch(r=>{r instanceof Error?O.error("Fatal error:",r.message):O.error("An unknown fatal error occurred"),process.exit(1)});
6
6
  /*! Bundled license information:
7
7
 
8
8
  lodash-es/lodash.js: