UNPKG

@stencil/core

Version:

A Compiler for Web Components and Progressive Web Apps

1 lines • 87 kB
(()=>{var t={24:t=>{"use strict";t.exports=require("fs")},46:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;const i=s(722);e.hasMagic=(t,e={})=>{Array.isArray(t)||(t=[t]);for(const s of t)if(new i.Minimatch(s,e).hasMagic())return!0;return!1}},75:t=>{"use strict";t.exports=require("stream")},96:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;const s="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i=new Set,r="object"==typeof process&&process?process:{},n=(t,e,s,i)=>{"function"==typeof r.emitWarning?r.emitWarning(t,e,s,i):console.error(`[${s}] ${e}: ${t}`)};let o=globalThis.AbortController,h=globalThis.AbortSignal;if(void 0===o){h=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},o=class{constructor(){e()}signal=new h;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==r.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{t&&(t=!1,n("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}Symbol("type");const a=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),l=t=>a(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?c:null:null;class c extends Array{constructor(t){super(t),this.fill(0)}}class d{heap;length;static#t=!1;static create(t){const e=l(t);if(!e)return[];d.#t=!0;const s=new d(t,e);return d.#t=!1,s}constructor(t,e){if(!d.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class p{#e;#s;#i;#r;#n;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#a;#l;#c;#d;#p;#u;#f;#g;#m;#y;#w;#b;#v;#S;#k;#x;static unsafeExposeInternals(t){return{starts:t.#b,ttls:t.#v,sizes:t.#w,keyMap:t.#l,keyList:t.#c,valList:t.#d,next:t.#p,prev:t.#u,get head(){return t.#f},get tail(){return t.#g},free:t.#m,isBackgroundFetch:e=>t.#E(e),backgroundFetch:(e,s,i,r)=>t.#L(e,s,i,r),moveToTail:e=>t.#T(e),indexes:e=>t.#C(e),rindexes:e=>t.#M(e),isStale:e=>t.#A(e)}}get max(){return this.#e}get maxSize(){return this.#s}get calculatedSize(){return this.#a}get size(){return this.#h}get fetchMethod(){return this.#n}get memoMethod(){return this.#o}get dispose(){return this.#i}get disposeAfter(){return this.#r}constructor(t){const{max:e=0,ttl:s,ttlResolution:r=1,ttlAutopurge:o,updateAgeOnGet:h,updateAgeOnHas:c,allowStale:u,dispose:f,disposeAfter:g,noDisposeOnSet:m,noUpdateTTL:y,maxSize:w=0,maxEntrySize:b=0,sizeCalculation:v,fetchMethod:S,memoMethod:k,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:T,ignoreFetchAbort:C}=t;if(0!==e&&!a(e))throw new TypeError("max option must be a nonnegative integer");const M=e?l(e):Array;if(!M)throw new Error("invalid max value: "+e);if(this.#e=e,this.#s=w,this.maxEntrySize=b||this.#s,this.sizeCalculation=v,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==k&&"function"!=typeof k)throw new TypeError("memoMethod must be a function if defined");if(this.#o=k,void 0!==S&&"function"!=typeof S)throw new TypeError("fetchMethod must be a function if specified");if(this.#n=S,this.#k=!!S,this.#l=new Map,this.#c=new Array(e).fill(void 0),this.#d=new Array(e).fill(void 0),this.#p=new M(e),this.#u=new M(e),this.#f=0,this.#g=0,this.#m=d.create(e),this.#h=0,this.#a=0,"function"==typeof f&&(this.#i=f),"function"==typeof g?(this.#r=g,this.#y=[]):(this.#r=void 0,this.#y=void 0),this.#S=!!this.#i,this.#x=!!this.#r,this.noDisposeOnSet=!!m,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!L,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!C,0!==this.maxEntrySize){if(0!==this.#s&&!a(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!a(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#O()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!c,this.ttlResolution=a(r)||0===r?r:1,this.ttlAutopurge=!!o,this.ttl=s||0,this.ttl){if(!a(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(0===this.#e&&0===this.ttl&&0===this.#s)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#s){const t="LRU_CACHE_UNBOUNDED";if((t=>!i.has(t))(t)){i.add(t);n("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,p)}}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#P(){const t=new c(this.#e),e=new c(this.#e);this.#v=t,this.#b=e,this.#R=(i,r,n=s.now())=>{if(e[i]=0!==r?n:0,t[i]=r,0!==r&&this.ttlAutopurge){const t=setTimeout((()=>{this.#A(i)&&this.#F(this.#c[i],"expire")}),r+1);t.unref&&t.unref()}},this.#_=i=>{e[i]=0!==t[i]?s.now():0},this.#z=(s,n)=>{if(t[n]){const o=t[n],h=e[n];if(!o||!h)return;s.ttl=o,s.start=h,s.now=i||r();const a=s.now-h;s.remainingTTL=o-a}};let i=0;const r=()=>{const t=s.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=s=>{const n=this.#l.get(s);if(void 0===n)return 0;const o=t[n],h=e[n];if(!o||!h)return 1/0;return o-((i||r())-h)},this.#A=s=>{const n=e[s],o=t[s];return!!o&&!!n&&(i||r())-n>o}}#_=()=>{};#z=()=>{};#R=()=>{};#A=()=>!1;#O(){const t=new c(this.#e);this.#a=0,this.#w=t,this.#D=e=>{this.#a-=t[e],t[e]=0},this.#j=(t,e,s,i)=>{if(this.#E(e))return 0;if(!a(s)){if(!i)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(s=i(e,t),!a(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return s},this.#B=(e,s,i)=>{if(t[e]=s,this.#s){const s=this.#s-t[e];for(;this.#a>s;)this.#N(!0)}this.#a+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#a)}}#D=t=>{};#B=(t,e,s)=>{};#j=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#C({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#g;this.#W(e)&&(!t&&this.#A(e)||(yield e),e!==this.#f);)e=this.#u[e]}*#M({allowStale:t=this.allowStale}={}){if(this.#h)for(let e=this.#f;this.#W(e)&&(!t&&this.#A(e)||(yield e),e!==this.#g);)e=this.#p[e]}#W(t){return void 0!==t&&this.#l.get(this.#c[t])===t}*entries(){for(const t of this.#C())void 0===this.#d[t]||void 0===this.#c[t]||this.#E(this.#d[t])||(yield[this.#c[t],this.#d[t]])}*rentries(){for(const t of this.#M())void 0===this.#d[t]||void 0===this.#c[t]||this.#E(this.#d[t])||(yield[this.#c[t],this.#d[t]])}*keys(){for(const t of this.#C()){const e=this.#c[t];void 0===e||this.#E(this.#d[t])||(yield e)}}*rkeys(){for(const t of this.#M()){const e=this.#c[t];void 0===e||this.#E(this.#d[t])||(yield e)}}*values(){for(const t of this.#C()){void 0===this.#d[t]||this.#E(this.#d[t])||(yield this.#d[t])}}*rvalues(){for(const t of this.#M()){void 0===this.#d[t]||this.#E(this.#d[t])||(yield this.#d[t])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const s of this.#C()){const i=this.#d[s],r=this.#E(i)?i.__staleWhileFetching:i;if(void 0!==r&&t(r,this.#c[s],this))return this.get(this.#c[s],e)}}forEach(t,e=this){for(const s of this.#C()){const i=this.#d[s],r=this.#E(i)?i.__staleWhileFetching:i;void 0!==r&&t.call(e,r,this.#c[s],this)}}rforEach(t,e=this){for(const s of this.#M()){const i=this.#d[s],r=this.#E(i)?i.__staleWhileFetching:i;void 0!==r&&t.call(e,r,this.#c[s],this)}}purgeStale(){let t=!1;for(const e of this.#M({allowStale:!0}))this.#A(e)&&(this.#F(this.#c[e],"expire"),t=!0);return t}info(t){const e=this.#l.get(t);if(void 0===e)return;const i=this.#d[e],r=this.#E(i)?i.__staleWhileFetching:i;if(void 0===r)return;const n={value:r};if(this.#v&&this.#b){const t=this.#v[e],i=this.#b[e];if(t&&i){const e=t-(s.now()-i);n.ttl=e,n.start=Date.now()}}return this.#w&&(n.size=this.#w[e]),n}dump(){const t=[];for(const e of this.#C({allowStale:!0})){const i=this.#c[e],r=this.#d[e],n=this.#E(r)?r.__staleWhileFetching:r;if(void 0===n||void 0===i)continue;const o={value:n};if(this.#v&&this.#b){o.ttl=this.#v[e];const t=s.now()-this.#b[e];o.start=Math.floor(Date.now()-t)}this.#w&&(o.size=this.#w[e]),t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=s.now()-t}this.set(e,i.value,i)}}set(t,e,s={}){if(void 0===e)return this.delete(t),this;const{ttl:i=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:h}=s;let{noUpdateTTL:a=this.noUpdateTTL}=s;const l=this.#j(t,e,s.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this.#F(t,"set"),this;let c=0===this.#h?void 0:this.#l.get(t);if(void 0===c)c=0===this.#h?this.#g:0!==this.#m.length?this.#m.pop():this.#h===this.#e?this.#N(!1):this.#h,this.#c[c]=t,this.#d[c]=e,this.#l.set(t,c),this.#p[this.#g]=c,this.#u[c]=this.#g,this.#g=c,this.#h++,this.#B(c,l,h),h&&(h.set="add"),a=!1;else{this.#T(c);const s=this.#d[c];if(e!==s){if(this.#k&&this.#E(s)){s.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=s;void 0===e||n||(this.#S&&this.#i?.(e,t,"set"),this.#x&&this.#y?.push([e,t,"set"]))}else n||(this.#S&&this.#i?.(s,t,"set"),this.#x&&this.#y?.push([s,t,"set"]));if(this.#D(c),this.#B(c,l,h),this.#d[c]=e,h){h.set="replace";const t=s&&this.#E(s)?s.__staleWhileFetching:s;void 0!==t&&(h.oldValue=t)}}else h&&(h.set="update")}if(0===i||this.#v||this.#P(),this.#v&&(a||this.#R(c,i,r),h&&this.#z(h,c)),!n&&this.#x&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#r?.(...e)}return this}pop(){try{for(;this.#h;){const t=this.#d[this.#f];if(this.#N(!0),this.#E(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#x&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#r?.(...e)}}}#N(t){const e=this.#f,s=this.#c[e],i=this.#d[e];return this.#k&&this.#E(i)?i.__abortController.abort(new Error("evicted")):(this.#S||this.#x)&&(this.#S&&this.#i?.(i,s,"evict"),this.#x&&this.#y?.push([i,s,"evict"])),this.#D(e),t&&(this.#c[e]=void 0,this.#d[e]=void 0,this.#m.push(e)),1===this.#h?(this.#f=this.#g=0,this.#m.length=0):this.#f=this.#p[e],this.#l.delete(s),this.#h--,e}has(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#l.get(t);if(void 0!==r){const t=this.#d[r];if(this.#E(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#A(r))return s&&this.#_(r),i&&(i.has="hit",this.#z(i,r)),!0;i&&(i.has="stale",this.#z(i,r))}else i&&(i.has="miss");return!1}peek(t,e={}){const{allowStale:s=this.allowStale}=e,i=this.#l.get(t);if(void 0===i||!s&&this.#A(i))return;const r=this.#d[i];return this.#E(r)?r.__staleWhileFetching:r}#L(t,e,s,i){const r=void 0===e?void 0:this.#d[e];if(this.#E(r))return r;const n=new o,{signal:h}=s;h?.addEventListener("abort",(()=>n.abort(h.reason)),{signal:n.signal});const a={signal:n.signal,options:s,context:i},l=(i,r=!1)=>{const{aborted:o}=n.signal,h=s.ignoreFetchAbort&&void 0!==i;if(s.status&&(o&&!r?(s.status.fetchAborted=!0,s.status.fetchError=n.signal.reason,h&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),o&&!h&&!r)return c(n.signal.reason);const l=d;return this.#d[e]===d&&(void 0===i?l.__staleWhileFetching?this.#d[e]=l.__staleWhileFetching:this.#F(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,i,a.options))),i},c=i=>{const{aborted:r}=n.signal,o=r&&s.allowStaleOnFetchAbort,h=o||s.allowStaleOnFetchRejection,a=h||s.noDeleteOnFetchRejection,l=d;if(this.#d[e]===d){!a||void 0===l.__staleWhileFetching?this.#F(t,"fetch"):o||(this.#d[e]=l.__staleWhileFetching)}if(h)return s.status&&void 0!==l.__staleWhileFetching&&(s.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw i};s.status&&(s.status.fetchDispatched=!0);const d=new Promise(((e,i)=>{const o=this.#n?.(t,r,a);o&&o instanceof Promise&&o.then((t=>e(void 0===t?void 0:t)),i),n.signal.addEventListener("abort",(()=>{s.ignoreFetchAbort&&!s.allowStaleOnFetchAbort||(e(void 0),s.allowStaleOnFetchAbort&&(e=t=>l(t,!0)))}))})).then(l,(t=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=t),c(t)))),p=Object.assign(d,{__abortController:n,__staleWhileFetching:r,__returned:void 0});return void 0===e?(this.set(t,p,{...a.options,status:void 0}),e=this.#l.get(t)):this.#d[e]=p,p}#E(t){if(!this.#k)return!1;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof o}async fetch(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:h=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:u=this.allowStaleOnFetchAbort,context:f,forceRefresh:g=!1,status:m,signal:y}=e;if(!this.#k)return m&&(m.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:m});const w={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:h,sizeCalculation:a,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:u,ignoreFetchAbort:p,status:m,signal:y};let b=this.#l.get(t);if(void 0===b){m&&(m.fetch="miss");const e=this.#L(t,b,w,f);return e.__returned=e}{const e=this.#d[b];if(this.#E(e)){const t=s&&void 0!==e.__staleWhileFetching;return m&&(m.fetch="inflight",t&&(m.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}const r=this.#A(b);if(!g&&!r)return m&&(m.fetch="hit"),this.#T(b),i&&this.#_(b),m&&this.#z(m,b),e;const n=this.#L(t,b,w,f),o=void 0!==n.__staleWhileFetching&&s;return m&&(m.fetch=r?"stale":"refresh",o&&r&&(m.returnedStale=!0)),o?n.__staleWhileFetching:n.__returned=n}}async forceFetch(t,e={}){const s=await this.fetch(t,e);if(void 0===s)throw new Error("fetch() returned undefined");return s}memo(t,e={}){const s=this.#o;if(!s)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:r,...n}=e,o=this.get(t,n);if(!r&&void 0!==o)return o;const h=s(t,o,{options:n,context:i});return this.set(t,h,n),h}get(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e,o=this.#l.get(t);if(void 0!==o){const e=this.#d[o],h=this.#E(e);return n&&this.#z(n,o),this.#A(o)?(n&&(n.get="stale"),h?(n&&s&&void 0!==e.__staleWhileFetching&&(n.returnedStale=!0),s?e.__staleWhileFetching:void 0):(r||this.#F(t,"expire"),n&&s&&(n.returnedStale=!0),s?e:void 0)):(n&&(n.get="hit"),h?e.__staleWhileFetching:(this.#T(o),i&&this.#_(o),e))}n&&(n.get="miss")}#I(t,e){this.#u[e]=t,this.#p[t]=e}#T(t){t!==this.#g&&(t===this.#f?this.#f=this.#p[t]:this.#I(this.#u[t],this.#p[t]),this.#I(this.#g,t),this.#g=t)}delete(t){return this.#F(t,"delete")}#F(t,e){let s=!1;if(0!==this.#h){const i=this.#l.get(t);if(void 0!==i)if(s=!0,1===this.#h)this.#G(e);else{this.#D(i);const s=this.#d[i];if(this.#E(s)?s.__abortController.abort(new Error("deleted")):(this.#S||this.#x)&&(this.#S&&this.#i?.(s,t,e),this.#x&&this.#y?.push([s,t,e])),this.#l.delete(t),this.#c[i]=void 0,this.#d[i]=void 0,i===this.#g)this.#g=this.#u[i];else if(i===this.#f)this.#f=this.#p[i];else{const t=this.#u[i];this.#p[t]=this.#p[i];const e=this.#p[i];this.#u[e]=this.#u[i]}this.#h--,this.#m.push(i)}}if(this.#x&&this.#y?.length){const t=this.#y;let e;for(;e=t?.shift();)this.#r?.(...e)}return s}clear(){return this.#G("delete")}#G(t){for(const e of this.#M({allowStale:!0})){const s=this.#d[e];if(this.#E(s))s.__abortController.abort(new Error("deleted"));else{const i=this.#c[e];this.#S&&this.#i?.(s,i,t),this.#x&&this.#y?.push([s,i,t])}}if(this.#l.clear(),this.#d.fill(void 0),this.#c.fill(void 0),this.#v&&this.#b&&(this.#v.fill(0),this.#b.fill(0)),this.#w&&this.#w.fill(0),this.#f=0,this.#g=0,this.#m.length=0,this.#a=0,this.#h=0,this.#x&&this.#y){const t=this.#y;let e;for(;e=t?.shift();)this.#r?.(...e)}}}e.LRUCache=p},116:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0;e.unescape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},136:t=>{"use strict";t.exports=require("url")},193:t=>{"use strict";t.exports=require("string_decoder")},207:(t,e,s)=>{t.exports=s(756)},274:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;e.assertValidPattern=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")}},363:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0;e.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},420:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;const r="object"==typeof process&&process?process:{stdout:null,stderr:null},n=s(474),o=i(s(75)),h=s(193);e.isStream=t=>!!t&&"object"==typeof t&&(t instanceof U||t instanceof o.default||(0,e.isReadable)(t)||(0,e.isWritable)(t));e.isReadable=t=>!!t&&"object"==typeof t&&t instanceof n.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==o.default.Writable.prototype.pipe;e.isWritable=t=>!!t&&"object"==typeof t&&t instanceof n.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end;const a=Symbol("EOF"),l=Symbol("maybeEmitEnd"),c=Symbol("emittedEnd"),d=Symbol("emittingEnd"),p=Symbol("emittedError"),u=Symbol("closed"),f=Symbol("read"),g=Symbol("flush"),m=Symbol("flushChunk"),y=Symbol("encoding"),w=Symbol("decoder"),b=Symbol("flowing"),v=Symbol("paused"),S=Symbol("resume"),k=Symbol("buffer"),x=Symbol("pipes"),E=Symbol("bufferLength"),L=Symbol("bufferPush"),T=Symbol("bufferShift"),C=Symbol("objectMode"),M=Symbol("destroyed"),A=Symbol("error"),O=Symbol("emitData"),P=Symbol("emitEnd"),R=Symbol("emitEnd2"),F=Symbol("async"),_=Symbol("abort"),z=Symbol("aborted"),D=Symbol("signal"),j=Symbol("dataListeners"),B=Symbol("discarded"),N=t=>Promise.resolve().then(t),W=t=>t();class I{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[S](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class G extends I{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class U extends n.EventEmitter{[b]=!1;[v]=!1;[x]=[];[k]=[];[C];[y];[F];[w];[a]=!1;[c]=!1;[d]=!1;[u]=!1;[p]=null;[E]=0;[M]=!1;[D];[z]=!1;[j]=0;[B]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[C]=!0,this[y]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[y]=e.encoding,this[C]=!1):(this[C]=!1,this[y]=null),this[F]=!!e.async,this[w]=this[y]?new h.StringDecoder(this[y]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[k]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[x]});const{signal:s}=e;s&&(this[D]=s,s.aborted?this[_]():s.addEventListener("abort",(()=>this[_]())))}get bufferLength(){return this[E]}get encoding(){return this[y]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[C]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[F]}set async(t){this[F]=this[F]||!!t}[_](){this[z]=!0,this.emit("abort",this[D]?.reason),this.destroy(this[D]?.reason)}get aborted(){return this[z]}set aborted(t){}write(t,e,s){if(this[z])return!1;if(this[a])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(s=e,e="utf8"),e||(e="utf8");const i=this[F]?N:W;if(!this[C]&&!Buffer.isBuffer(t))if(r=t,!Buffer.isBuffer(r)&&ArrayBuffer.isView(r))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var r;return this[C]?(this[b]&&0!==this[E]&&this[g](!0),this[b]?this.emit("data",t):this[L](t),0!==this[E]&&this.emit("readable"),s&&i(s),this[b]):t.length?("string"!=typeof t||e===this[y]&&!this[w]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[y]&&(t=this[w].write(t)),this[b]&&0!==this[E]&&this[g](!0),this[b]?this.emit("data",t):this[L](t),0!==this[E]&&this.emit("readable"),s&&i(s),this[b]):(0!==this[E]&&this.emit("readable"),s&&i(s),this[b])}read(t){if(this[M])return null;if(this[B]=!1,0===this[E]||0===t||t&&t>this[E])return this[l](),null;this[C]&&(t=null),this[k].length>1&&!this[C]&&(this[k]=[this[y]?this[k].join(""):Buffer.concat(this[k],this[E])]);const e=this[f](t||null,this[k][0]);return this[l](),e}[f](t,e){if(this[C])this[T]();else{const s=e;t===s.length||null===t?this[T]():"string"==typeof s?(this[k][0]=s.slice(t),e=s.slice(0,t),this[E]-=t):(this[k][0]=s.subarray(t),e=s.subarray(0,t),this[E]-=t)}return this.emit("data",e),this[k].length||this[a]||this.emit("drain"),e}end(t,e,s){return"function"==typeof t&&(s=t,t=void 0),"function"==typeof e&&(s=e,e="utf8"),void 0!==t&&this.write(t,e),s&&this.once("end",s),this[a]=!0,this.writable=!1,!this[b]&&this[v]||this[l](),this}[S](){this[M]||(this[j]||this[x].length||(this[B]=!0),this[v]=!1,this[b]=!0,this.emit("resume"),this[k].length?this[g]():this[a]?this[l]():this.emit("drain"))}resume(){return this[S]()}pause(){this[b]=!1,this[v]=!0,this[B]=!1}get destroyed(){return this[M]}get flowing(){return this[b]}get paused(){return this[v]}[L](t){this[C]?this[E]+=1:this[E]+=t.length,this[k].push(t)}[T](){return this[C]?this[E]-=1:this[E]-=this[k][0].length,this[k].shift()}[g](t=!1){do{}while(this[m](this[T]())&&this[k].length);t||this[k].length||this[a]||this.emit("drain")}[m](t){return this.emit("data",t),this[b]}pipe(t,e){if(this[M])return t;this[B]=!1;const s=this[c];return e=e||{},t===r.stdout||t===r.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[x].push(e.proxyErrors?new G(this,t,e):new I(this,t,e)),this[F]?N((()=>this[S]())):this[S]()),t}unpipe(t){const e=this[x].find((e=>e.dest===t));e&&(1===this[x].length?(this[b]&&0===this[j]&&(this[b]=!1),this[x]=[]):this[x].splice(this[x].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const s=super.on(t,e);if("data"===t)this[B]=!1,this[j]++,this[x].length||this[b]||this[S]();else if("readable"===t&&0!==this[E])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[c])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[p]){const t=e;this[F]?N((()=>t.call(this,this[p]))):t.call(this,this[p])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){const s=super.off(t,e);return"data"===t&&(this[j]=this.listeners("data").length,0!==this[j]||this[B]||this[x].length||(this[b]=!1)),s}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[j]=0,this[B]||this[x].length||(this[b]=!1)),e}get emittedEnd(){return this[c]}[l](){this[d]||this[c]||this[M]||0!==this[k].length||!this[a]||(this[d]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[u]&&this.emit("close"),this[d]=!1)}emit(t,...e){const s=e[0];if("error"!==t&&"close"!==t&&t!==M&&this[M])return!1;if("data"===t)return!(!this[C]&&!s)&&(this[F]?(N((()=>this[O](s))),!0):this[O](s));if("end"===t)return this[P]();if("close"===t){if(this[u]=!0,!this[c]&&!this[M])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[p]=s,super.emit(A,s);const t=!(this[D]&&!this.listeners("error").length)&&super.emit("error",s);return this[l](),t}if("resume"===t){const t=super.emit("resume");return this[l](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const i=super.emit(t,...e);return this[l](),i}[O](t){for(const e of this[x])!1===e.dest.write(t)&&this.pause();const e=!this[B]&&super.emit("data",t);return this[l](),e}[P](){return!this[c]&&(this[c]=!0,this.readable=!1,this[F]?(N((()=>this[R]())),!0):this[R]())}[R](){if(this[w]){const t=this[w].end();if(t){for(const e of this[x])e.dest.write(t);this[B]||super.emit("data",t)}}for(const t of this[x])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[C]||(t.dataLength=0);const e=this.promise();return this.on("data",(e=>{t.push(e),this[C]||(t.dataLength+=e.length)})),await e,t}async concat(){if(this[C])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[y]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(M,(()=>e(new Error("stream destroyed")))),this.on("error",(t=>e(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[B]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const s=this.read();if(null!==s)return Promise.resolve({done:!1,value:s});if(this[a])return e();let i,r;const n=t=>{this.off("data",o),this.off("end",h),this.off(M,l),e(),r(t)},o=t=>{this.off("error",n),this.off("end",h),this.off(M,l),this.pause(),i({value:t,done:!!this[a]})},h=()=>{this.off("error",n),this.off("data",o),this.off(M,l),e(),i({done:!0,value:void 0})},l=()=>n(new Error("stream destroyed"));return new Promise(((t,e)=>{r=e,i=t,this.once(M,l),this.once("error",n),this.once("end",h),this.once("data",o)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[B]=!1;let t=!1;const e=()=>(this.pause(),this.off(A,e),this.off(M,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(A,e),this.once(M,e),{next:()=>{if(t)return e();const s=this.read();return null===s?e():{done:!1,value:s}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[M])return t?this.emit("error",t):this.emit(M),this;this[M]=!0,this[B]=!0,this[k].length=0,this[E]=0;return"function"!=typeof this.close||this[u]||this.close(),t?this.emit("error",t):this.emit(M),this}static get isStream(){return e.isStream}}e.Minipass=U},455:t=>{"use strict";t.exports=require("fs/promises")},474:t=>{"use strict";t.exports=require("events")},478:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;const i=s(722);class r{#U;#$;#q;length;#H;#V;#Z;#J;#K;#Y;#X=!0;constructor(t,e,s,i){if(!(t.length>=1))throw new TypeError("empty pattern list");if(!(e.length>=1))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#U=t,this.#$=e,this.#q=s,this.#H=i,0===this.#q)if(this.isUNC()){const[t,e,s,i,...r]=this.#U,[n,o,h,a,...l]=this.#$;""===r[0]&&(r.shift(),l.shift());const c=[t,e,s,i,""].join("/"),d=[n,o,h,a,""].join("/");this.#U=[c,...r],this.#$=[d,...l],this.length=this.#U.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#U,[s,...i]=this.#$;""===e[0]&&(e.shift(),i.shift());const r=t+"/",n=s+"/";this.#U=[r,...e],this.#$=[n,...i],this.length=this.#U.length}}pattern(){return this.#U[this.#q]}isString(){return"string"==typeof this.#U[this.#q]}isGlobstar(){return this.#U[this.#q]===i.GLOBSTAR}isRegExp(){return this.#U[this.#q]instanceof RegExp}globString(){return this.#Z=this.#Z||(0===this.#q?this.isAbsolute()?this.#$[0]+this.#$.slice(1).join("/"):this.#$.join("/"):this.#$.slice(this.#q).join("/"))}hasMore(){return this.length>this.#q+1}rest(){return void 0!==this.#V?this.#V:this.hasMore()?(this.#V=new r(this.#U,this.#$,this.#q+1,this.#H),this.#V.#Y=this.#Y,this.#V.#K=this.#K,this.#V.#J=this.#J,this.#V):this.#V=null}isUNC(){const t=this.#U;return void 0!==this.#K?this.#K:this.#K="win32"===this.#H&&0===this.#q&&""===t[0]&&""===t[1]&&"string"==typeof t[2]&&!!t[2]&&"string"==typeof t[3]&&!!t[3]}isDrive(){const t=this.#U;return void 0!==this.#J?this.#J:this.#J="win32"===this.#H&&0===this.#q&&this.length>1&&"string"==typeof t[0]&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#U;return void 0!==this.#Y?this.#Y:this.#Y=""===t[0]&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#U[0];return"string"==typeof t&&this.isAbsolute()&&0===this.#q?t:""}checkFollowGlobstar(){return!(0===this.#q||!this.isGlobstar()||!this.#X)}markFollowGlobstar(){return!(0===this.#q||!this.isGlobstar()||!this.#X)&&(this.#X=!1,!0)}}e.Pattern=r},505:t=>{"use strict";function e(t,e,r){t instanceof RegExp&&(t=s(t,r)),e instanceof RegExp&&(e=s(e,r));var n=i(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function s(t,e){var s=e.match(t);return s?s[0]:null}function i(t,e,s){var i,r,n,o,h,a=s.indexOf(t),l=s.indexOf(e,a+1),c=a;if(a>=0&&l>0){if(t===e)return[a,l];for(i=[],n=s.length;c>=0&&!h;)c==a?(i.push(c),a=s.indexOf(t,c+1)):1==i.length?h=[i.pop(),l]:((r=i.pop())<n&&(n=r,o=l),l=s.indexOf(e,c+1)),c=a<l&&a>=0?a:l;i.length&&(h=[n,o])}return h}t.exports=e,e.range=i},576:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){void 0===i&&(i=s);var r=Object.getOwnPropertyDescriptor(e,s);r&&!("get"in r?!e.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(t,i,r)}:function(t,e,s,i){void 0===i&&(i=s),t[i]=e[s]}),r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)"default"!==s&&Object.prototype.hasOwnProperty.call(t,s)&&i(e,t,s);return r(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;const o=s(96),h=s(760),a=s(136),l=s(896),c=n(s(24)),d=l.realpathSync.native,p=s(455),u=s(420),f={lstatSync:l.lstatSync,readdir:l.readdir,readdirSync:l.readdirSync,readlinkSync:l.readlinkSync,realpathSync:d,promises:{lstat:p.lstat,readdir:p.readdir,readlink:p.readlink,realpath:p.realpath}},g=t=>t&&t!==f&&t!==c?{...f,...t,promises:{...f.promises,...t.promises||{}}}:f,m=/^\\\\\?\\([a-z]:)\\?$/i,y=/[\\\/]/,w=10,b=15,v=-16,S=128,k=256,x=512,E=t=>t.isFile()?8:t.isDirectory()?4:t.isSymbolicLink()?w:t.isCharacterDevice()?2:t.isBlockDevice()?6:t.isSocket()?12:t.isFIFO()?1:0,L=new Map,T=t=>{const e=L.get(t);if(e)return e;const s=t.normalize("NFKD");return L.set(t,s),s},C=new Map,M=t=>{const e=C.get(t);if(e)return e;const s=T(t.toLowerCase());return C.set(t,s),s};class A extends o.LRUCache{constructor(){super({max:256})}}e.ResolveCache=A;class O extends o.LRUCache{constructor(t=16384){super({maxSize:t,sizeCalculation:t=>t.length+1})}}e.ChildrenCache=O;const P=Symbol("PathScurry setAsCwd");class R{name;root;roots;parent;nocase;isCWD=!1;#Q;#tt;get dev(){return this.#tt}#et;get mode(){return this.#et}#st;get nlink(){return this.#st}#it;get uid(){return this.#it}#rt;get gid(){return this.#rt}#nt;get rdev(){return this.#nt}#ot;get blksize(){return this.#ot}#ht;get ino(){return this.#ht}#h;get size(){return this.#h}#at;get blocks(){return this.#at}#lt;get atimeMs(){return this.#lt}#ct;get mtimeMs(){return this.#ct}#dt;get ctimeMs(){return this.#dt}#pt;get birthtimeMs(){return this.#pt}#ut;get atime(){return this.#ut}#ft;get mtime(){return this.#ft}#gt;get ctime(){return this.#gt}#mt;get birthtime(){return this.#mt}#yt;#wt;#bt;#vt;#St;#kt;#xt;#Et;#Lt;#Tt;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=0,s,i,r,n,o){this.name=t,this.#yt=r?M(t):T(t),this.#xt=1023&e,this.nocase=r,this.roots=i,this.root=s||this,this.#Et=n,this.#bt=o.fullpath,this.#St=o.relative,this.#kt=o.relativePosix,this.parent=o.parent,this.parent?this.#Q=this.parent.#Q:this.#Q=g(o.fs)}depth(){return void 0!==this.#wt?this.#wt:this.parent?this.#wt=this.parent.depth()+1:this.#wt=0}childrenCache(){return this.#Et}resolve(t){if(!t)return this;const e=this.getRootString(t),s=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#Ct(s):this.#Ct(s)}#Ct(t){let e=this;for(const s of t)e=e.child(s);return e}children(){const t=this.#Et.get(this);if(t)return t;const e=Object.assign([],{provisional:0});return this.#Et.set(this,e),this.#xt&=-17,e}child(t,e){if(""===t||"."===t)return this;if(".."===t)return this.parent||this;const s=this.children(),i=this.nocase?M(t):T(t);for(const t of s)if(t.#yt===i)return t;const r=this.parent?this.sep:"",n=this.#bt?this.#bt+r+t:void 0,o=this.newChild(t,0,{...e,parent:this,fullpath:n});return this.canReaddir()||(o.#xt|=S),s.push(o),o}relative(){if(this.isCWD)return"";if(void 0!==this.#St)return this.#St;const t=this.name,e=this.parent;if(!e)return this.#St=this.name;const s=e.relative();return s+(s&&e.parent?this.sep:"")+t}relativePosix(){if("/"===this.sep)return this.relative();if(this.isCWD)return"";if(void 0!==this.#kt)return this.#kt;const t=this.name,e=this.parent;if(!e)return this.#kt=this.fullpathPosix();const s=e.relativePosix();return s+(s&&e.parent?"/":"")+t}fullpath(){if(void 0!==this.#bt)return this.#bt;const t=this.name,e=this.parent;if(!e)return this.#bt=this.name;const s=e.fullpath()+(e.parent?this.sep:"")+t;return this.#bt=s}fullpathPosix(){if(void 0!==this.#vt)return this.#vt;if("/"===this.sep)return this.#vt=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(t)?this.#vt=`//?/${t}`:this.#vt=t}const t=this.parent,e=t.fullpathPosix(),s=e+(e&&t.parent?"/":"")+this.name;return this.#vt=s}isUnknown(){return!(this.#xt&b)}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return 8==(this.#xt&b)}isDirectory(){return 4==(this.#xt&b)}isCharacterDevice(){return 2==(this.#xt&b)}isBlockDevice(){return 6==(this.#xt&b)}isFIFO(){return 1==(this.#xt&b)}isSocket(){return 12==(this.#xt&b)}isSymbolicLink(){return(this.#xt&w)===w}lstatCached(){return 32&this.#xt?this:void 0}readlinkCached(){return this.#Lt}realpathCached(){return this.#Tt}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#Lt)return!0;if(!this.parent)return!1;const t=this.#xt&b;return!(0!==t&&t!==w||this.#xt&k||this.#xt&S)}calledReaddir(){return!!(16&this.#xt)}isENOENT(){return!!(this.#xt&S)}isNamed(t){return this.nocase?this.#yt===M(t):this.#yt===T(t)}async readlink(){const t=this.#Lt;if(t)return t;if(this.canReadlink()&&this.parent)try{const t=await this.#Q.promises.readlink(this.fullpath()),e=(await this.parent.realpath())?.resolve(t);if(e)return this.#Lt=e}catch(t){return void this.#Mt(t.code)}}readlinkSync(){const t=this.#Lt;if(t)return t;if(this.canReadlink()&&this.parent)try{const t=this.#Q.readlinkSync(this.fullpath()),e=this.parent.realpathSync()?.resolve(t);if(e)return this.#Lt=e}catch(t){return void this.#Mt(t.code)}}#At(t){this.#xt|=16;for(let e=t.provisional;e<t.length;e++){const s=t[e];s&&s.#Ot()}}#Ot(){this.#xt&S||(this.#xt=(this.#xt|S)&v,this.#Pt())}#Pt(){const t=this.children();t.provisional=0;for(const e of t)e.#Ot()}#Rt(){this.#xt|=x,this.#Ft()}#Ft(){if(64&this.#xt)return;let t=this.#xt;4==(t&b)&&(t&=v),this.#xt=64|t,this.#Pt()}#_t(t=""){"ENOTDIR"===t||"EPERM"===t?this.#Ft():"ENOENT"===t?this.#Ot():this.children().provisional=0}#zt(t=""){if("ENOTDIR"===t){this.parent.#Ft()}else"ENOENT"===t&&this.#Ot()}#Mt(t=""){let e=this.#xt;e|=k,"ENOENT"===t&&(e|=S),"EINVAL"!==t&&"UNKNOWN"!==t||(e&=v),this.#xt=e,"ENOTDIR"===t&&this.parent&&this.parent.#Ft()}#Dt(t,e){return this.#jt(t,e)||this.#Bt(t,e)}#Bt(t,e){const s=E(t),i=this.newChild(t.name,s,{parent:this}),r=i.#xt&b;return 4!==r&&r!==w&&0!==r&&(i.#xt|=64),e.unshift(i),e.provisional++,i}#jt(t,e){for(let s=e.provisional;s<e.length;s++){const i=e[s];if((this.nocase?M(t.name):T(t.name))===i.#yt)return this.#Nt(t,i,s,e)}}#Nt(t,e,s,i){const r=e.name;return e.#xt=e.#xt&v|E(t),r!==t.name&&(e.name=t.name),s!==i.provisional&&(s===i.length-1?i.pop():i.splice(s,1),i.unshift(e)),i.provisional++,e}async lstat(){if(!(this.#xt&S))try{return this.#Wt(await this.#Q.promises.lstat(this.fullpath())),this}catch(t){this.#zt(t.code)}}lstatSync(){if(!(this.#xt&S))try{return this.#Wt(this.#Q.lstatSync(this.fullpath())),this}catch(t){this.#zt(t.code)}}#Wt(t){const{atime:e,atimeMs:s,birthtime:i,birthtimeMs:r,blksize:n,blocks:o,ctime:h,ctimeMs:a,dev:l,gid:c,ino:d,mode:p,mtime:u,mtimeMs:f,nlink:g,rdev:m,size:y,uid:b}=t;this.#ut=e,this.#lt=s,this.#mt=i,this.#pt=r,this.#ot=n,this.#at=o,this.#gt=h,this.#dt=a,this.#tt=l,this.#rt=c,this.#ht=d,this.#et=p,this.#ft=u,this.#ct=f,this.#st=g,this.#nt=m,this.#h=y,this.#it=b;const S=E(t);this.#xt=this.#xt&v|S|32,0!==S&&4!==S&&S!==w&&(this.#xt|=64)}#It=[];#Gt=!1;#Ut(t){this.#Gt=!1;const e=this.#It.slice();this.#It.length=0,e.forEach((e=>e(null,t)))}readdirCB(t,e=!1){if(!this.canReaddir())return void(e?t(null,[]):queueMicrotask((()=>t(null,[]))));const s=this.children();if(this.calledReaddir()){const i=s.slice(0,s.provisional);return void(e?t(null,i):queueMicrotask((()=>t(null,i))))}if(this.#It.push(t),this.#Gt)return;this.#Gt=!0;const i=this.fullpath();this.#Q.readdir(i,{withFileTypes:!0},((t,e)=>{if(t)this.#_t(t.code),s.provisional=0;else{for(const t of e)this.#Dt(t,s);this.#At(s)}this.#Ut(s.slice(0,s.provisional))}))}#$t;async readdir(){if(!this.canReaddir())return[];const t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);const e=this.fullpath();if(this.#$t)await this.#$t;else{let s=()=>{};this.#$t=new Promise((t=>s=t));try{for(const s of await this.#Q.promises.readdir(e,{withFileTypes:!0}))this.#Dt(s,t);this.#At(t)}catch(e){this.#_t(e.code),t.provisional=0}this.#$t=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];const t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);const e=this.fullpath();try{for(const s of this.#Q.readdirSync(e,{withFileTypes:!0}))this.#Dt(s,t);this.#At(t)}catch(e){this.#_t(e.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(704&this.#xt)return!1;const t=b&this.#xt;return 0===t||4===t||t===w}shouldWalk(t,e){return!(4&~this.#xt)&&!(704&this.#xt)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#Tt)return this.#Tt;if(!(896&this.#xt))try{const t=await this.#Q.promises.realpath(this.fullpath());return this.#Tt=this.resolve(t)}catch(t){this.#Rt()}}realpathSync(){if(this.#Tt)return this.#Tt;if(!(896&this.#xt))try{const t=this.#Q.realpathSync(this.fullpath());return this.#Tt=this.resolve(t)}catch(t){this.#Rt()}}[P](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;const e=new Set([]);let s=[],i=this;for(;i&&i.parent;)e.add(i),i.#St=s.join(this.sep),i.#kt=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#St=void 0,i.#kt=void 0,i=i.parent}}e.PathBase=R;class F extends R{sep="\\";splitSep=y;constructor(t,e=0,s,i,r,n,o){super(t,e,s,i,r,n,o)}newChild(t,e=0,s={}){return new F(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return h.win32.parse(t).root}getRoot(t){if((t=(t=>t.replace(/\//g,"\\").replace(m,"$1\\"))(t.toUpperCase()))===this.root.name)return this.root;for(const[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new D(t,this).root}sameRoot(t,e=this.root.name){return(t=t.toUpperCase().replace(/\//g,"\\").replace(m,"$1\\"))===e}}e.PathWin32=F;class _ extends R{splitSep="/";sep="/";constructor(t,e=0,s,i,r,n,o){super(t,e,s,i,r,n,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=0,s={}){return new _(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}}e.PathPosix=_;class z{root;rootPath;roots;cwd;#qt;#Ht;#Et;nocase;#Q;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16384,fs:n=f}={}){this.#Q=g(n),(t instanceof URL||t.startsWith("file://"))&&(t=(0,a.fileURLToPath)(t));const o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#qt=new A,this.#Ht=new A,this.#Et=new O(r);const h=o.substring(this.rootPath.length).split(s);if(1!==h.length||h[0]||h.pop(),void 0===i)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#Q),this.roots[this.rootPath]=this.root;let l=this.root,c=h.length-1;const d=e.sep;let p=this.rootPath,u=!1;for(const t of h){const e=c--;l=l.child(t,{relative:new Array(e).fill("..").join(d),relativePosix:new Array(e).fill("..").join("/"),fullpath:p+=(u?"":d)+t}),u=!0}this.cwd=l}depth(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#Et}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(i&&"."!==i&&(e=e?`${i}/${e}`:i,this.isAbsolute(i)))break}const s=this.#qt.get(e);if(void 0!==s)return s;const i=this.cwd.resolve(e).fullpath();return this.#qt.set(e,i),i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(i&&"."!==i&&(e=e?`${i}/${e}`:i,this.isAbsolute(i)))break}const s=this.#Ht.get(e);if(void 0!==s)return s;const i=this.cwd.resolve(e).fullpathPosix();return this.#Ht.set(e,i),i}relative(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s}=e;if(t.canReaddir()){const e=await t.readdir();return s?e:e.map((t=>t.name))}return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map((t=>t.name)):[]}async lstat(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return"string"==typeof t&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);const s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);const s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);const s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t.withFileTypes,t=this.cwd);const s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e,o=[];r&&!r(t)||o.push(s?t:t.fullpath());const h=new Set,a=(t,e)=>{h.add(t),t.readdirCB(((t,l)=>{if(t)return e(t);let c=l.length;if(!c)return e();const d=()=>{0==--c&&e()};for(const t of l)r&&!r(t)||o.push(s?t:t.fullpath()),i&&t.isSymbolicLink()?t.realpath().then((t=>t?.isUnknown()?t.lstat():t)).then((t=>t?.shouldWalk(h,n)?a(t,d):d())):t.shouldWalk(h,n)?a(t,d):d()}),!0)},l=t;return new Promise(((t,e)=>{a(l,(s=>{if(s)return e(s);t(o)}))}))}walkSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e,o=[];r&&!r(t)||o.push(s?t:t.fullpath());const h=new Set([t]);for(const t of h){const e=t.readdirSync();for(const t of e){r&&!r(t)||o.push(s?t:t.fullpath());let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(h,n)&&h.add(e)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e;r&&!r(t)||(yield s?t:t.fullpath());const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){r&&!r(t)||(yield s?t:t.fullpath());let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(o,n)&&o.add(e)}}}stream(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e,o=new u.Minipass({objectMode:!0});r&&!r(t)||o.write(s?t:t.fullpath());const h=new Set,a=[t];let l=0;const c=()=>{let t=!1;for(;!t;){const e=a.shift();if(!e)return void(0===l&&o.end());l++,h.add(e);const d=(e,u,f=!1)=>{if(e)return o.emit("error",e);if(i&&!f){const t=[];for(const e of u)e.isSymbolicLink()&&t.push(e.realpath().then((t=>t?.isUnknown()?t.lstat():t)));if(t.length)return void Promise.all(t).then((()=>d(null,u,!0)))}for(const e of u)!e||r&&!r(e)||o.write(s?e:e.fullpath())||(t=!0);l--;for(const t of u){const e=t.realpathCached()||t;e.shouldWalk(h,n)&&a.push(e)}t&&!o.flowing?o.once("drain",c):p||c()};let p=!0;e.readdirCB(d,!0),p=!1}};return c(),o}streamSync(t=this.cwd,e={}){"string"==typeof t?t=this.cwd.resolve(t):t instanceof R||(e=t,t=this.cwd);const{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:n}=e,o=new u.Minipass({objectMode:!0}),h=new Set;r&&!r(t)||o.write(s?t:t.fullpath());const a=[t];let l=0;const c=()=>{let t=!1;for(;!t;){const e=a.shift();if(!e)return void(0===l&&o.end());l++,h.add(e);const c=e.readdirSync();for(const e of c)r&&!r(e)||o.write(s?e:e.fullpath())||(t=!0);l--;for(const t of c){let e=t;if(t.isSymbolicLink()){if(!i||!(e=t.realpathSync()))continue;e.isUnknown()&&e.lstatSync()}e.shouldWalk(h,n)&&a.push(e)}}t&&!o.flowing&&o.once("drain",c)};return c(),o}chdir(t=this.cwd){const e=this.cwd;this.cwd="string"==typeof t?this.cwd.resolve(t):t,this.cwd[P](e)}}e.PathScurryBase=z;class D extends z{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:s=!0}=e;super(t,h.win32,"\\",{...e,nocase:s}),this.nocase=s;for(let t=this.cwd;t;t=t.parent)t.nocase=this.nocase}parseRootPath(t){return h.win32.parse(t).root.toUpperCase()}newRoot(t){return new F(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}e.PathScurryWin32=D;class j extends z{sep="/";constructor(t=process.cwd(),e={}){const{nocase:s=!1}=e;super(t,h.posix,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new _(this.rootPath,4,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}e.PathScurryPosix=j;class B extends j{constructor(t=process.cwd(),e={}){const{nocase:s=!0}=e;super(t,{...e,nocase:s})}}e.PathScurryDarwin=B,e.Path="win32"===process.platform?F:_,e.PathScurry="win32"===process.platform?D:"darwin"===process.platform?B:j},674:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;const i=s(843),r=s(116),n=new Set(["!","?","+","*","@"]),o=t=>n.has(t),h="(?!\\.)",a=new Set(["[","."]),l=new Set(["..","."]),c=new Set("().*{}+?[]^$\\!"),d="[^/]",p=d+"*?",u=d+"+?";class f{type;#Vt;#Zt;#Jt=!1;#Kt=[];#Yt;#Xt;#Qt;#te=!1;#ee;#se;#ie=!1;constructor(t,e,s={}){this.type=t,t&&(this.#Zt=!0),this.#Yt=e,this.#Vt=this.#Yt?this.#Yt.#Vt:this,this.#ee=this.#Vt===this?s:this.#Vt.#ee,this.#Qt=this.#Vt===this?[]:this.#Vt.#Qt,"!"!==t||this.#Vt.#te||this.#Qt.push(this),t