UNPKG

chromatic

Version:

Automate visual testing across browsers. Gather UI feedback. Versioned documentation.

7 lines (6 loc) • 128 kB
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="df1902c3-d11c-5719-89d7-303f70880040")}catch(e){}}(); const e=require(`./chunk-gGpyby2o.cjs`),t=require(`./meow-Cmqsflq2.cjs`);let n=require(`fs`);n=e.a(n,1);let r=require(`path`);r=e.a(r,1);let i=require(`os`);i=e.a(i,1);let a=require(`tty`);a=e.a(a,1);let o=require(`events`);o=e.a(o,1);let s=require(`child_process`);s=e.a(s,1);let c=require(`node:util`),l=require(`node:child_process`);l=e.a(l,1);let u=require(`node:fs`);u=e.a(u,1);let d=require(`node:os`);d=e.a(d,1);let f=require(`node:path`);f=e.a(f,1);let p=require(`node:process`);p=e.a(p,1);let m=require(`node:fs/promises`);m=e.a(m,1);let h=require(`node:url`);h=e.a(h,1);let g=require(`node:buffer`),_=require(`node:timers/promises`),v=require(`stream`);v=e.a(v,1);let y=require(`fs/promises`);y=e.a(y,1);let ee=require(`readline`);ee=e.a(ee,1);const te=e=>e instanceof URL?(0,h.fileURLToPath)(e):e;async function b(e,{cwd:t=p.default.cwd(),type:n=`file`,stopAt:r}={}){let i=f.default.resolve(te(t)??``),{root:a}=f.default.parse(i);r=f.default.resolve(i,te(r??a));let o=f.default.isAbsolute(e);for(;i;){let t=o?e:f.default.join(i,e);try{let e=await m.default.stat(t);if(n===`file`&&e.isFile()||n===`directory`&&e.isDirectory())return t}catch{}if(i===r||i===a)break;i=f.default.dirname(i)}}var ne=t.f();const re=({oneBased:e,oneBasedLine:t=e,oneBasedColumn:n=e}={})=>[+!!t,+!!n];function ie(e,t,n){let r=t===0?-1:e.lastIndexOf(` `,t-1),[i,a]=re(n);return{line:r===-1?i:e.slice(0,r+1).match(/\n/g).length+i,column:t-r-1+a}}function ae(e,t,n){if(typeof e!=`string`)throw TypeError(`Text parameter should be a string`);if(!Number.isInteger(t))throw TypeError(`Index parameter should be an integer`);if(t<0||t>e.length)throw RangeError(`Index out of bounds`);return ie(e,t,n)}const oe=e=>`\\u{${e.codePointAt(0).toString(16)}}`;var se=class e extends Error{name=`JSONError`;fileName;#e;#t;#n;#r;#i;constructor(t){if(typeof t==`string`)super(),this.#n=t;else{let{jsonParseError:e,fileName:n,input:r}=t;super(void 0,{cause:e}),this.#e=r,this.#t=e,this.fileName=n}Error.captureStackTrace?.(this,e)}get message(){this.#n??=`${le(this.#t.message)}${this.#e===``?` while parsing empty string`:``}`;let{codeFrame:e}=this;return`${this.#n}${this.fileName?` in ${this.fileName}`:``}${e?`\n\n${e}\n`:``}`}set message(e){this.#n=e}#a(e){if(!this.#t)return;let t=this.#e,n=ce(t,this.#t.message);if(n)return(0,ne.codeFrameColumns)(t,{start:n},{highlightCode:e})}get codeFrame(){return this.#r??=this.#a(!0),this.#r}get rawCodeFrame(){return this.#i??=this.#a(!1),this.#i}};const ce=(e,t)=>{let n=t.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/);if(!n)return;let{index:r,line:i,column:a}=n.groups;return i&&a?{line:Number(i),column:Number(a)}:ae(e,Number(r),{oneBased:!0})},le=e=>e.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(e,t,n)=>`"${n}"(${oe(n)})`);function ue(e,t,n){typeof t==`string`&&(n=t,t=void 0);try{return JSON.parse(e,t)}catch(t){throw new se({jsonParseError:t,fileName:n,input:e})}}var de=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0;let t=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,n=new Set,r=typeof process==`object`&&process?process:{},i=(e,t,n,i)=>{typeof r.emitWarning==`function`?r.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)},a=globalThis.AbortController,o=globalThis.AbortSignal;if(a===void 0){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},a=class{constructor(){t()}signal=new o;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=r.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,i("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`,t))}}let s=e=>!n.has(e),c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?u:null:null;var u=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static#e=!1;static create(t){let n=l(t);if(!n)return[];e.#e=!0;let r=new e(t,n);return e.#e=!1,r}constructor(t,n){if(!e.#e)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};e.LRUCache=class e{#e;#t;#n;#r;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#l;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y;#b;#x;#S;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#y,sizes:e.#_,keyMap:e.#c,keyList:e.#l,valList:e.#u,next:e.#d,prev:e.#f,get head(){return e.#p},get tail(){return e.#m},free:e.#h,isBackgroundFetch:t=>e.#L(t),backgroundFetch:(t,n,r,i)=>e.#I(t,n,r,i),moveToTail:t=>e.#z(t),indexes:t=>e.#M(t),rindexes:t=>e.#N(t),isStale:t=>e.#D(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#r}constructor(t){let{max:r=0,ttl:a,ttlResolution:o=1,ttlAutopurge:u,updateAgeOnGet:f,updateAgeOnHas:p,allowStale:m,dispose:h,disposeAfter:g,noDisposeOnSet:_,noUpdateTTL:v,maxSize:y=0,maxEntrySize:ee=0,sizeCalculation:te,fetchMethod:b,memoMethod:ne,noDeleteOnFetchRejection:re,noDeleteOnStaleGet:ie,allowStaleOnFetchRejection:ae,allowStaleOnFetchAbort:oe,ignoreFetchAbort:se}=t;if(r!==0&&!c(r))throw TypeError(`max option must be a nonnegative integer`);let ce=r?l(r):Array;if(!ce)throw Error(`invalid max value: `+r);if(this.#e=r,this.#t=y,this.maxEntrySize=ee||this.#t,this.sizeCalculation=te,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(ne!==void 0&&typeof ne!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#a=ne,b!==void 0&&typeof b!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#i=b,this.#x=!!b,this.#c=new Map,this.#l=Array(r).fill(void 0),this.#u=Array(r).fill(void 0),this.#d=new ce(r),this.#f=new ce(r),this.#p=0,this.#m=0,this.#h=d.create(r),this.#o=0,this.#s=0,typeof h==`function`&&(this.#n=h),typeof g==`function`?(this.#r=g,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#b=!!this.#n,this.#S=!!this.#r,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!re,this.allowStaleOnFetchRejection=!!ae,this.allowStaleOnFetchAbort=!!oe,this.ignoreFetchAbort=!!se,this.maxEntrySize!==0){if(this.#t!==0&&!c(this.#t))throw TypeError(`maxSize must be a positive integer if specified`);if(!c(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#O()}if(this.allowStale=!!m,this.noDeleteOnStaleGet=!!ie,this.updateAgeOnGet=!!f,this.updateAgeOnHas=!!p,this.ttlResolution=c(o)||o===0?o:1,this.ttlAutopurge=!!u,this.ttl=a||0,this.ttl){if(!c(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#C()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#e&&!this.#t){let t=`LRU_CACHE_UNBOUNDED`;s(t)&&(n.add(t),i(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#C(){let e=new u(this.#e),n=new u(this.#e);this.#y=e,this.#v=n,this.#E=(r,i,a=t.now())=>{if(n[r]=i===0?0:a,e[r]=i,i!==0&&this.ttlAutopurge){let e=setTimeout(()=>{this.#D(r)&&this.#B(this.#l[r],`expire`)},i+1);e.unref&&e.unref()}},this.#w=r=>{n[r]=e[r]===0?0:t.now()},this.#T=(t,a)=>{if(e[a]){let o=e[a],s=n[a];if(!o||!s)return;t.ttl=o,t.start=s,t.now=r||i(),t.remainingTTL=o-(t.now-s)}};let r=0,i=()=>{let e=t.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=t=>{let a=this.#c.get(t);if(a===void 0)return 0;let o=e[a],s=n[a];return!o||!s?1/0:o-((r||i())-s)},this.#D=t=>{let a=n[t],o=e[t];return!!o&&!!a&&(r||i())-a>o}}#w=()=>{};#T=()=>{};#E=()=>{};#D=()=>!1;#O(){let e=new u(this.#e);this.#s=0,this.#_=e,this.#k=t=>{this.#s-=e[t],e[t]=0},this.#j=(e,t,n,r)=>{if(this.#L(t))return 0;if(!c(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!c(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#A=(t,n,r)=>{if(e[t]=n,this.#t){let n=this.#t-e[t];for(;this.#s>n;)this.#F(!0)}this.#s+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#s)}}#k=e=>{};#A=(e,t,n)=>{};#j=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#m;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#p));)t=this.#f[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;!(!this.#P(t)||((e||!this.#D(t))&&(yield t),t===this.#m));)t=this.#d[t]}#P(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*rentries(){for(let e of this.#N())this.#u[e]!==void 0&&this.#l[e]!==void 0&&!this.#L(this.#u[e])&&(yield[this.#l[e],this.#u[e]])}*keys(){for(let e of this.#M()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#l[e];t!==void 0&&!this.#L(this.#u[e])&&(yield t)}}*values(){for(let e of this.#M())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}*rvalues(){for(let e of this.#N())this.#u[e]!==void 0&&!this.#L(this.#u[e])&&(yield this.#u[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#l[n],this))return this.get(this.#l[n],t)}}forEach(e,t=this){for(let n of this.#M()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}rforEach(e,t=this){for(let n of this.#N()){let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#l[n],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#D(t)&&(this.#B(this.#l[t],`expire`),e=!0);return e}info(e){let n=this.#c.get(e);if(n===void 0)return;let r=this.#u[n],i=this.#L(r)?r.__staleWhileFetching:r;if(i===void 0)return;let a={value:i};if(this.#y&&this.#v){let e=this.#y[n],r=this.#v[n];e&&r&&(a.ttl=e-(t.now()-r),a.start=Date.now())}return this.#_&&(a.size=this.#_[n]),a}dump(){let e=[];for(let n of this.#M({allowStale:!0})){let r=this.#l[n],i=this.#u[n],a=this.#L(i)?i.__staleWhileFetching:i;if(a===void 0||r===void 0)continue;let o={value:a};if(this.#y&&this.#v){o.ttl=this.#y[n];let e=t.now()-this.#v[n];o.start=Math.floor(Date.now()-e)}this.#_&&(o.size=this.#_[n]),e.unshift([r,o])}return e}load(e){this.clear();for(let[n,r]of e){if(r.start){let e=Date.now()-r.start;r.start=t.now()-e}this.set(n,r.value,r)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#j(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#B(e,`set`),this;let u=this.#o===0?void 0:this.#c.get(e);if(u===void 0)u=this.#o===0?this.#m:this.#h.length===0?this.#o===this.#e?this.#F(!1):this.#o:this.#h.pop(),this.#l[u]=e,this.#u[u]=t,this.#c.set(e,u),this.#d[this.#m]=u,this.#f[u]=this.#m,this.#m=u,this.#o++,this.#A(u,l,s),s&&(s.set=`add`),c=!1;else{this.#z(u);let n=this.#u[u];if(t!==n){if(this.#x&&this.#L(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#b&&this.#n?.(t,e,`set`),this.#S&&this.#g?.push([t,e,`set`]))}else a||(this.#b&&this.#n?.(n,e,`set`),this.#S&&this.#g?.push([n,e,`set`]));if(this.#k(u),this.#A(u,l,s),this.#u[u]=t,s){s.set=`replace`;let e=n&&this.#L(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`)}if(r!==0&&!this.#y&&this.#C(),this.#y&&(c||this.#E(u,r,i),s&&this.#T(s,u)),!a&&this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#o;){let e=this.#u[this.#p];if(this.#F(!0),this.#L(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}#F(e){let t=this.#p,n=this.#l[t],r=this.#u[t];return this.#x&&this.#L(r)?r.__abortController.abort(Error(`evicted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(r,n,`evict`),this.#S&&this.#g?.push([r,n,`evict`])),this.#k(t),e&&(this.#l[t]=void 0,this.#u[t]=void 0,this.#h.push(t)),this.#o===1?(this.#p=this.#m=0,this.#h.length=0):this.#p=this.#d[t],this.#c.delete(n),this.#o--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#c.get(e);if(i!==void 0){let e=this.#u[i];if(this.#L(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#D(i))r&&(r.has=`stale`,this.#T(r,i));else return n&&this.#w(i),r&&(r.has=`hit`,this.#T(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#c.get(e);if(r===void 0||!n&&this.#D(r))return;let i=this.#u[r];return this.#L(i)?i.__staleWhileFetching:i}#I(e,t,n,r){let i=t===void 0?void 0:this.#u[t];if(this.#L(i))return i;let o=new a,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0;if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason);let l=p;return this.#u[t]===p&&(r===void 0?l.__staleWhileFetching?this.#u[t]=l.__staleWhileFetching:this.#B(e,`fetch`):(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e)),d=r=>{let{aborted:i}=o.signal,a=i&&n.allowStaleOnFetchAbort,s=a||n.allowStaleOnFetchRejection,c=s||n.noDeleteOnFetchRejection,l=p;if(this.#u[t]===p&&(!c||l.__staleWhileFetching===void 0?this.#B(e,`fetch`):a||(this.#u[t]=l.__staleWhileFetching)),s)return n.status&&l.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw r},f=(t,r)=>{let a=this.#i?.(e,i,c);a&&a instanceof Promise&&a.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#c.get(e)):this.#u[t]=m,m}#L(e){if(!this.#x)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof a}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:_}=t;if(!this.#x)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:_},y=this.#c.get(e);if(y===void 0){g&&(g.fetch=`miss`);let t=this.#I(e,y,v,m);return t.__returned=t}else{let t=this.#u[y];if(this.#L(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#D(y);if(!h&&!i)return g&&(g.fetch=`hit`),this.#z(y),r&&this.#w(y),g&&this.#T(g,y),t;let a=this.#I(e,y,v,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#a;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(o!==void 0){let t=this.#u[o],s=this.#L(t);return a&&this.#T(a,o),this.#D(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#B(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#z(o),r&&this.#w(o),t))}else a&&(a.get=`miss`)}#R(e,t){this.#f[t]=e,this.#d[e]=t}#z(e){e!==this.#m&&(e===this.#p?this.#p=this.#d[e]:this.#R(this.#f[e],this.#d[e]),this.#R(this.#m,e),this.#m=e)}delete(e){return this.#B(e,`delete`)}#B(e,t){let n=!1;if(this.#o!==0){let r=this.#c.get(e);if(r!==void 0)if(n=!0,this.#o===1)this.#V(t);else{this.#k(r);let n=this.#u[r];if(this.#L(n)?n.__abortController.abort(Error(`deleted`)):(this.#b||this.#S)&&(this.#b&&this.#n?.(n,e,t),this.#S&&this.#g?.push([n,e,t])),this.#c.delete(e),this.#l[r]=void 0,this.#u[r]=void 0,r===this.#m)this.#m=this.#f[r];else if(r===this.#p)this.#p=this.#d[r];else{let e=this.#f[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#f[t]=this.#f[r]}this.#o--,this.#h.push(r)}}if(this.#S&&this.#g?.length){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}return n}clear(){return this.#V(`delete`)}#V(e){for(let t of this.#N({allowStale:!0})){let n=this.#u[t];if(this.#L(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#l[t];this.#b&&this.#n?.(n,r,e),this.#S&&this.#g?.push([n,r,e])}}if(this.#c.clear(),this.#u.fill(void 0),this.#l.fill(void 0),this.#y&&this.#v&&(this.#y.fill(0),this.#v.fill(0)),this.#_&&this.#_.fill(0),this.#p=0,this.#m=0,this.#h.length=0,this.#s=0,this.#o=0,this.#S&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#r?.(...t)}}}})),fe=e.t(((e,t)=>{let n=(...e)=>e.every(e=>e)?e.join(``):``,r=e=>e?encodeURIComponent(e):``,i=e=>e.toLowerCase().replace(/^\W+|\/|\W+$/g,``).replace(/\W+/g,`-`),a={sshtemplate:({domain:e,user:t,project:r,committish:i})=>`git@${e}:${t}/${r}.git${n(`#`,i)}`,sshurltemplate:({domain:e,user:t,project:r,committish:i})=>`git+ssh://git@${e}/${t}/${r}.git${n(`#`,i)}`,edittemplate:({domain:e,user:t,project:i,committish:a,editpath:o,path:s})=>`https://${e}/${t}/${i}${n(`/`,o,`/`,r(a||`HEAD`),`/`,s)}`,browsetemplate:({domain:e,user:t,project:i,committish:a,treepath:o})=>`https://${e}/${t}/${i}${n(`/`,o,`/`,r(a))}`,browsetreetemplate:({domain:e,user:t,project:i,committish:a,treepath:o,path:s,fragment:c,hashformat:l})=>`https://${e}/${t}/${i}/${o}/${r(a||`HEAD`)}/${s}${n(`#`,l(c||``))}`,browseblobtemplate:({domain:e,user:t,project:i,committish:a,blobpath:o,path:s,fragment:c,hashformat:l})=>`https://${e}/${t}/${i}/${o}/${r(a||`HEAD`)}/${s}${n(`#`,l(c||``))}`,docstemplate:({domain:e,user:t,project:i,treepath:a,committish:o})=>`https://${e}/${t}/${i}${n(`/`,a,`/`,r(o))}#readme`,httpstemplate:({auth:e,domain:t,user:r,project:i,committish:a})=>`git+https://${n(e,`@`)}${t}/${r}/${i}.git${n(`#`,a)}`,filetemplate:({domain:e,user:t,project:n,committish:i,path:a})=>`https://${e}/${t}/${n}/raw/${r(i||`HEAD`)}/${a}`,shortcuttemplate:({type:e,user:t,project:r,committish:i})=>`${e}:${t}/${r}${n(`#`,i)}`,pathtemplate:({user:e,project:t,committish:r})=>`${e}/${t}${n(`#`,r)}`,bugstemplate:({domain:e,user:t,project:n})=>`https://${e}/${t}/${n}/issues`,hashformat:i},o={};o.github={protocols:[`git:`,`http:`,`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`github.com`,treepath:`tree`,blobpath:`blob`,editpath:`edit`,filetemplate:({auth:e,user:t,project:i,committish:a,path:o})=>`https://${n(e,`@`)}raw.githubusercontent.com/${t}/${i}/${r(a||`HEAD`)}/${o}`,gittemplate:({auth:e,domain:t,user:r,project:i,committish:a})=>`git://${n(e,`@`)}${t}/${r}/${i}.git${n(`#`,a)}`,tarballtemplate:({domain:e,user:t,project:n,committish:i})=>`https://codeload.${e}/${t}/${n}/tar.gz/${r(i||`HEAD`)}`,extract:e=>{let[,t,n,r,i]=e.pathname.split(`/`,5);if(!(r&&r!==`tree`)&&(r||(i=e.hash.slice(1)),n&&n.endsWith(`.git`)&&(n=n.slice(0,-4)),!(!t||!n)))return{user:t,project:n,committish:i}}},o.bitbucket={protocols:[`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`bitbucket.org`,treepath:`src`,blobpath:`src`,editpath:`?mode=edit`,edittemplate:({domain:e,user:t,project:i,committish:a,treepath:o,path:s,editpath:c})=>`https://${e}/${t}/${i}${n(`/`,o,`/`,r(a||`HEAD`),`/`,s,c)}`,tarballtemplate:({domain:e,user:t,project:n,committish:i})=>`https://${e}/${t}/${n}/get/${r(i||`HEAD`)}.tar.gz`,extract:e=>{let[,t,n,r]=e.pathname.split(`/`,4);if(![`get`].includes(r)&&(n&&n.endsWith(`.git`)&&(n=n.slice(0,-4)),!(!t||!n)))return{user:t,project:n,committish:e.hash.slice(1)}}},o.gitlab={protocols:[`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`gitlab.com`,treepath:`tree`,blobpath:`tree`,editpath:`-/edit`,httpstemplate:({auth:e,domain:t,user:r,project:i,committish:a})=>`git+https://${n(e,`@`)}${t}/${r}/${i}.git${n(`#`,a)}`,tarballtemplate:({domain:e,user:t,project:n,committish:i})=>`https://${e}/${t}/${n}/repository/archive.tar.gz?ref=${r(i||`HEAD`)}`,extract:e=>{let t=e.pathname.slice(1);if(t.includes(`/-/`)||t.includes(`/archive.tar.gz`))return;let n=t.split(`/`),r=n.pop();r.endsWith(`.git`)&&(r=r.slice(0,-4));let i=n.join(`/`);if(!(!i||!r))return{user:i,project:r,committish:e.hash.slice(1)}}},o.gist={protocols:[`git:`,`git+ssh:`,`git+https:`,`ssh:`,`https:`],domain:`gist.github.com`,editpath:`edit`,sshtemplate:({domain:e,project:t,committish:r})=>`git@${e}:${t}.git${n(`#`,r)}`,sshurltemplate:({domain:e,project:t,committish:r})=>`git+ssh://git@${e}/${t}.git${n(`#`,r)}`,edittemplate:({domain:e,user:t,project:i,committish:a,editpath:o})=>`https://${e}/${t}/${i}${n(`/`,r(a))}/${o}`,browsetemplate:({domain:e,project:t,committish:i})=>`https://${e}/${t}${n(`/`,r(i))}`,browsetreetemplate:({domain:e,project:t,committish:i,path:a,hashformat:o})=>`https://${e}/${t}${n(`/`,r(i))}${n(`#`,o(a))}`,browseblobtemplate:({domain:e,project:t,committish:i,path:a,hashformat:o})=>`https://${e}/${t}${n(`/`,r(i))}${n(`#`,o(a))}`,docstemplate:({domain:e,project:t,committish:i})=>`https://${e}/${t}${n(`/`,r(i))}`,httpstemplate:({domain:e,project:t,committish:r})=>`git+https://${e}/${t}.git${n(`#`,r)}`,filetemplate:({user:e,project:t,committish:i,path:a})=>`https://gist.githubusercontent.com/${e}/${t}/raw${n(`/`,r(i))}/${a}`,shortcuttemplate:({type:e,project:t,committish:r})=>`${e}:${t}${n(`#`,r)}`,pathtemplate:({project:e,committish:t})=>`${e}${n(`#`,t)}`,bugstemplate:({domain:e,project:t})=>`https://${e}/${t}`,gittemplate:({domain:e,project:t,committish:r})=>`git://${e}/${t}.git${n(`#`,r)}`,tarballtemplate:({project:e,committish:t})=>`https://codeload.github.com/gist/${e}/tar.gz/${r(t||`HEAD`)}`,extract:e=>{let[,t,n,r]=e.pathname.split(`/`,4);if(r!==`raw`){if(!n){if(!t)return;n=t,t=null}return n.endsWith(`.git`)&&(n=n.slice(0,-4)),{user:t,project:n,committish:e.hash.slice(1)}}},hashformat:function(e){return e&&`file-`+i(e)}},o.sourcehut={protocols:[`git+ssh:`,`https:`],domain:`git.sr.ht`,treepath:`tree`,blobpath:`tree`,filetemplate:({domain:e,user:t,project:n,committish:i,path:a})=>`https://${e}/${t}/${n}/blob/${r(i)||`HEAD`}/${a}`,httpstemplate:({domain:e,user:t,project:r,committish:i})=>`https://${e}/${t}/${r}.git${n(`#`,i)}`,tarballtemplate:({domain:e,user:t,project:n,committish:i})=>`https://${e}/${t}/${n}/archive/${r(i)||`HEAD`}.tar.gz`,bugstemplate:()=>null,extract:e=>{let[,t,n,r]=e.pathname.split(`/`,4);if(![`archive`].includes(r)&&(n&&n.endsWith(`.git`)&&(n=n.slice(0,-4)),!(!t||!n)))return{user:t,project:n,committish:e.hash.slice(1)}}};for(let[e,t]of Object.entries(o))o[e]=Object.assign({},a,t);t.exports=o})),pe=e.t(((e,t)=>{let n=require(`url`),r=(e,t,n)=>{let r=e.indexOf(n);return e.lastIndexOf(t,r>-1?r:1/0)},i=e=>{try{return new n.URL(e)}catch{}},a=(e,t)=>{let n=e.indexOf(`:`),r=e.slice(0,n+1);if(Object.prototype.hasOwnProperty.call(t,r))return e;let i=e.indexOf(`@`);return i>-1?i>n?`git+ssh://${e}`:e:e.indexOf(`//`)===n+1?e:`${e.slice(0,n+1)}//${e.slice(n+1)}`},o=e=>{let t=r(e,`@`,`#`),n=r(e,`:`,`#`);return n>t&&(e=e.slice(0,n)+`/`+e.slice(n+1)),r(e,`:`,`#`)===-1&&e.indexOf(`//`)===-1&&(e=`git+ssh://${e}`),e};t.exports=(e,t)=>{let n=t?a(e,t):e;return i(n)||i(o(n))}})),me=e.t(((e,t)=>{let n=pe(),r=e=>{let t=e.indexOf(`#`),n=e.indexOf(`/`),r=e.indexOf(`/`,n+1),i=e.indexOf(`:`),a=/\s/.exec(e),o=e.indexOf(`@`),s=!a||t>-1&&a.index>t,c=o===-1||t>-1&&o>t,l=i===-1||t>-1&&i>t,u=r===-1||t>-1&&r>t,d=n>0,f=t>-1?e[t-1]!==`/`:!e.endsWith(`/`),p=!e.startsWith(`.`);return s&&d&&f&&p&&c&&l&&u};t.exports=(e,t,{gitHosts:i,protocols:a})=>{if(!e)return;let o=n(r(e)?`github:${e}`:e,a);if(!o)return;let s=i.byShortcut[o.protocol],c=i.byDomain[o.hostname.startsWith(`www.`)?o.hostname.slice(4):o.hostname],l=s||c;if(!l)return;let u=i[s||c],d=null;a[o.protocol]?.auth&&(o.username||o.password)&&(d=`${o.username}${o.password?`:`+o.password:``}`);let f=null,p=null,m=null,h=null;try{if(s){let e=o.pathname.startsWith(`/`)?o.pathname.slice(1):o.pathname,t=e.indexOf(`@`);t>-1&&(e=e.slice(t+1));let n=e.lastIndexOf(`/`);n>-1?(p=decodeURIComponent(e.slice(0,n)),p||=null,m=decodeURIComponent(e.slice(n+1))):m=decodeURIComponent(e),m.endsWith(`.git`)&&(m=m.slice(0,-4)),o.hash&&(f=decodeURIComponent(o.hash.slice(1))),h=`shortcut`}else{if(!u.protocols.includes(o.protocol))return;let e=u.extract(o);if(!e)return;p=e.user&&decodeURIComponent(e.user),m=decodeURIComponent(e.project),f=decodeURIComponent(e.committish),h=a[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(e){if(e instanceof URIError)return;throw e}return[l,p,d,m,f,h,t]}})),he=e.t(((e,t)=>{let{LRUCache:n}=de(),r=fe(),i=me(),a=pe(),o=new n({max:1e3});var s=class e{constructor(t,n,r,i,a,o,s={}){Object.assign(this,e.#e[t],{type:t,user:n,auth:r,project:i,committish:a,default:o,opts:s})}static#e={byShortcut:{},byDomain:{}};static#t={"git+ssh:":{name:`sshurl`},"ssh:":{name:`sshurl`},"git+https:":{name:`https`,auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(t,n){e.#e[t]=n,e.#e.byDomain[n.domain]=t,e.#e.byShortcut[`${t}:`]=t,e.#t[`${t}:`]={name:t}}static fromUrl(t,n){if(typeof t!=`string`)return;let r=t+JSON.stringify(n||{});if(!o.has(r)){let a=i(t,n,{gitHosts:e.#e,protocols:e.#t});o.set(r,a?new e(...a):void 0)}return o.get(r)}static parseUrl(e){return a(e)}#n(e,t){if(typeof e!=`function`)return null;let n={...this,...this.opts,...t};n.path||=``,n.path.startsWith(`/`)&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let r=e(n);return n.noGitPlus&&r.startsWith(`git+`)?r.slice(4):r}hash(){return this.committish?`#${this.committish}`:``}ssh(e){return this.#n(this.sshtemplate,e)}sshurl(e){return this.#n(this.sshurltemplate,e)}browse(e,...t){return typeof e==`string`?typeof t[0]==`string`?this.#n(this.browsetreetemplate,{...t[1],fragment:t[0],path:e}):this.#n(this.browsetreetemplate,{...t[0],path:e}):this.#n(this.browsetemplate,e)}browseFile(e,...t){return typeof t[0]==`string`?this.#n(this.browseblobtemplate,{...t[1],fragment:t[0],path:e}):this.#n(this.browseblobtemplate,{...t[0],path:e})}docs(e){return this.#n(this.docstemplate,e)}bugs(e){return this.#n(this.bugstemplate,e)}https(e){return this.#n(this.httpstemplate,e)}git(e){return this.#n(this.gittemplate,e)}shortcut(e){return this.#n(this.shortcuttemplate,e)}path(e){return this.#n(this.pathtemplate,e)}tarball(e){return this.#n(this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return this.#n(this.filetemplate,{...t,path:e})}edit(e,t){return this.#n(this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]==`function`?this[this.default](e):this.sshurl(e)}};for(let[e,t]of Object.entries(r))s.addHost(e,t);t.exports=s})),ge=e.t(((e,t)=>{t.exports=n;function n(e){if(!e||e===`ERROR: No README data found!`)return;e=e.trim().split(` `);let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;let n=e.length,r=t+1;for(;r<n&&e[r].trim();)r++;return e.slice(t,r).join(` `).trim()}})),_e=e.t(((e,t)=>{t.exports={topLevel:{dependancies:`dependencies`,dependecies:`dependencies`,depdenencies:`dependencies`,devEependencies:`devDependencies`,depends:`dependencies`,"dev-dependencies":`devDependencies`,devDependences:`devDependencies`,devDepenencies:`devDependencies`,devdependencies:`devDependencies`,repostitory:`repository`,repo:`repository`,prefereGlobal:`preferGlobal`,hompage:`homepage`,hampage:`homepage`,autohr:`author`,autor:`author`,contributers:`contributors`,publicationConfig:`publishConfig`,script:`scripts`},bugs:{web:`url`,name:`url`},script:{server:`start`,tests:`test`}}})),ve=e.t(((e,n)=>{var r=require(`semver/functions/valid.js`),i=require(`semver/functions/clean.js`),a=t.d(),o=he(),s=require(`node:module`),c=[`dependencies`,`devDependencies`,`optionalDependencies`],l=ge(),u=require(`url`),d=_e(),f=e=>e.includes(`@`)&&e.indexOf(`@`)<e.lastIndexOf(`.`);n.exports={warn:function(){},fixRepositoryField:function(e){if(e.repositories&&(this.warn(`repositories`),e.repository=e.repositories[0]),!e.repository)return this.warn(`missingRepository`);typeof e.repository==`string`&&(e.repository={type:`git`,url:e.repository});var t=e.repository.url||``;if(t){var n=o.fromUrl(t);n&&(t=e.repository.url=n.getDefaultRepresentation()===`shortcut`?n.https():n.toString())}t.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn(`brokenGitUrl`,t)},fixTypos:function(e){Object.keys(d.topLevel).forEach(function(t){Object.prototype.hasOwnProperty.call(e,t)&&this.warn(`typo`,t,d.topLevel[t])},this)},fixScriptsField:function(e){if(e.scripts){if(typeof e.scripts!=`object`){this.warn(`nonObjectScripts`),delete e.scripts;return}Object.keys(e.scripts).forEach(function(t){typeof e.scripts[t]==`string`?d.script[t]&&!e.scripts[d.script[t]]&&this.warn(`typo`,t,d.script[t],`scripts`):(this.warn(`nonStringScript`),delete e.scripts[t])},this)}},fixFilesField:function(e){var t=e.files;t&&!Array.isArray(t)?(this.warn(`nonArrayFiles`),delete e.files):e.files&&=e.files.filter(function(e){return!e||typeof e!=`string`?(this.warn(`invalidFilename`,e),!1):!0},this)},fixBinField:function(e){if(e.bin&&typeof e.bin==`string`){var t={},n;(n=e.name.match(/^@[^/]+[/](.*)$/))?t[n[1]]=e.bin:t[e.name]=e.bin,e.bin=t}},fixManField:function(e){e.man&&typeof e.man==`string`&&(e.man=[e.man])},fixBundleDependenciesField:function(e){var t=`bundledDependencies`,n=`bundleDependencies`;e[t]&&!e[n]&&(e[n]=e[t],delete e[t]),e[n]&&!Array.isArray(e[n])?(this.warn(`nonArrayBundleDependencies`),delete e[n]):e[n]&&(e[n]=e[n].filter(function(t){return!t||typeof t!=`string`?(this.warn(`nonStringBundleDependency`,t),!1):(e.dependencies||={},Object.prototype.hasOwnProperty.call(e.dependencies,t)||(this.warn(`nonDependencyBundleDependency`,t),e.dependencies[t]=`*`),!0)},this))},fixDependencies:function(e){te(e,this.warn),y(e,this.warn),this.fixBundleDependenciesField(e),[`dependencies`,`devDependencies`].forEach(function(t){if(t in e){if(!e[t]||typeof e[t]!=`object`){this.warn(`nonObjectDependencies`,t),delete e[t];return}Object.keys(e[t]).forEach(function(n){var r=e[t][n];typeof r!=`string`&&(this.warn(`nonStringDependency`,n,JSON.stringify(r)),delete e[t][n]);var i=o.fromUrl(e[t][n]);i&&(e[t][n]=i.toString())},this)}},this)},fixModulesField:function(e){e.modules&&(this.warn(`deprecatedModules`),delete e.modules)},fixKeywordsField:function(e){typeof e.keywords==`string`&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?(delete e.keywords,this.warn(`nonArrayKeywords`)):e.keywords&&=e.keywords.filter(function(e){return typeof e!=`string`||!e?(this.warn(`nonStringKeyword`),!1):!0},this)},fixVersionField:function(e,t){var n=!t;if(!e.version)return e.version=``,!0;if(!r(e.version,n))throw Error(`Invalid version: "`+e.version+`"`);return e.version=i(e.version,n),!0},fixPeople:function(e){g(e,_),g(e,v)},fixNameField:function(e,t){typeof t==`boolean`?t={strict:t}:t===void 0&&(t={});var n=t.strict;if(!e.name&&!n){e.name=``;return}if(typeof e.name!=`string`)throw Error(`name field must be a string.`);n||(e.name=e.name.trim()),h(e.name,n,t.allowLegacyCase),s.builtinModules.includes(e.name)&&this.warn(`conflictingName`,e.name)},fixDescriptionField:function(e){e.description&&typeof e.description!=`string`&&(this.warn(`nonStringDescription`),delete e.description),e.readme&&!e.description&&(e.description=l(e.readme)),e.description===void 0&&delete e.description,e.description||this.warn(`missingDescription`)},fixReadmeField:function(e){e.readme||=(this.warn(`missingReadme`),`ERROR: No README data found!`)},fixBugsField:function(e){if(!e.bugs&&e.repository&&e.repository.url){var t=o.fromUrl(e.repository.url);t&&t.bugs()&&(e.bugs={url:t.bugs()})}else if(e.bugs){if(typeof e.bugs==`string`)f(e.bugs)?e.bugs={email:e.bugs}:u.parse(e.bugs).protocol?e.bugs={url:e.bugs}:this.warn(`nonEmailUrlBugsString`);else{b(e.bugs,this.warn);var n=e.bugs;e.bugs={},n.url&&(typeof n.url==`string`&&u.parse(n.url).protocol?e.bugs.url=n.url:this.warn(`nonUrlBugsUrlField`)),n.email&&(typeof n.email==`string`&&f(n.email)?e.bugs.email=n.email:this.warn(`nonEmailBugsEmailField`))}!e.bugs.email&&!e.bugs.url&&(delete e.bugs,this.warn(`emptyNormalizedBugs`))}},fixHomepageField:function(e){if(!e.homepage&&e.repository&&e.repository.url){var t=o.fromUrl(e.repository.url);t&&t.docs()&&(e.homepage=t.docs())}if(e.homepage){if(typeof e.homepage!=`string`)return this.warn(`nonUrlHomepage`),delete e.homepage;u.parse(e.homepage).protocol||(e.homepage=`http://`+e.homepage)}},fixLicenseField:function(e){let t=e.license||e.licence;if(!t)return this.warn(`missingLicense`);if(typeof t!=`string`||t.length<1||t.trim()===``||!a(t).validForNewPackages)return this.warn(`invalidLicense`)}};function p(e){if(e.charAt(0)!==`@`)return!1;var t=e.slice(1).split(`/`);return t.length===2?t[0]&&t[1]&&t[0]===encodeURIComponent(t[0])&&t[1]===encodeURIComponent(t[1]):!1}function m(e){return!e.match(/[/@\s+%:]/)&&e===encodeURIComponent(e)}function h(e,t,n){if(e.charAt(0)===`.`||!(p(e)||m(e))||t&&!n&&e!==e.toLowerCase()||e.toLowerCase()===`node_modules`||e.toLowerCase()===`favicon.ico`)throw Error(`Invalid name: `+JSON.stringify(e))}function g(e,t){return e.author&&=t(e.author),[`maintainers`,`contributors`].forEach(function(n){Array.isArray(e[n])&&(e[n]=e[n].map(t))}),e}function _(e){if(typeof e==`string`)return e;var t=e.name||``,n=e.url||e.web,r=n?` (`+n+`)`:``,i=e.email||e.mail;return t+(i?` <`+i+`>`:``)+r}function v(e){if(typeof e!=`string`)return e;var t=e.match(/^([^(<]+)/),n=e.match(/\(([^()]+)\)/),r=e.match(/<([^<>]+)>/),i={};return t&&t[0].trim()&&(i.name=t[0].trim()),r&&(i.email=r[1]),n&&(i.url=n[1]),i}function y(e){var t=e.optionalDependencies;if(t){var n=e.dependencies||{};Object.keys(t).forEach(function(e){n[e]=t[e]}),e.dependencies=n}}function ee(e,t,n){if(!e)return{};if(typeof e==`string`&&(e=e.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(e))return e;n(`deprecatedArrayDependencies`,t);var r={};return e.filter(function(e){return typeof e==`string`}).forEach(function(e){e=e.trim().split(/(:?[@\s><=])/);var t=e.shift(),n=e.join(``);n=n.trim(),n=n.replace(/^@/,``),r[t]=n}),r}function te(e,t){c.forEach(function(n){e[n]&&(e[n]=ee(e[n],n,t))})}function b(e,t){e&&Object.keys(e).forEach(function(n){d.bugs[n]&&(t(`typo`,n,d.bugs[n],`bugs`),e[d.bugs[n]]=e[n],delete e[n])})}})),ye=e.t(((e,t)=>{t.exports={repositories:`'repositories' (plural) Not supported. Please pick one as the 'repository' field`,missingRepository:`No repository field.`,brokenGitUrl:`Probably broken git url: %s`,nonObjectScripts:`scripts must be an object`,nonStringScript:`script values must be string commands`,nonArrayFiles:`Invalid 'files' member`,invalidFilename:`Invalid filename in 'files' list: %s`,nonArrayBundleDependencies:`Invalid 'bundleDependencies' list. Must be array of package names`,nonStringBundleDependency:`Invalid bundleDependencies member: %s`,nonDependencyBundleDependency:`Non-dependency in bundleDependencies: %s`,nonObjectDependencies:`%s field must be an object`,nonStringDependency:`Invalid dependency: %s %s`,deprecatedArrayDependencies:`specifying %s as array is deprecated`,deprecatedModules:`modules field is deprecated`,nonArrayKeywords:`keywords should be an array of strings`,nonStringKeyword:`keywords should be an array of strings`,conflictingName:`%s is also the name of a node core module.`,nonStringDescription:`'description' field should be a string`,missingDescription:`No description`,missingReadme:`No README data`,missingLicense:`No license field.`,nonEmailUrlBugsString:`Bug string field must be url, email, or {email,url}`,nonUrlBugsUrlField:`bugs.url field must be a string url. Deleted.`,nonEmailBugsEmailField:`bugs.email field must be a string email. Deleted.`,emptyNormalizedBugs:`Normalized value of bugs field is an empty object. Deleted.`,nonUrlHomepage:`homepage field must be a string url. Deleted.`,invalidLicense:`license should be a valid SPDX license expression`,typo:`%s should probably be %s.`}})),be=e.t(((e,t)=>{var n=require(`util`),r=ye();t.exports=function(){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if(t===`typo`)return i.apply(null,e);var a=r[t]?r[t]:t+`: '%s'`;return e.unshift(a),n.format.apply(null,e)};function i(e,t,i){return i&&(e=i+`['`+e+`']`,t=i+`['`+t+`']`),n.format(r.typo,e,t)}})),xe=e.t(((e,t)=>{t.exports=s;var n=ve();s.fixer=n;var r=be(),i=[`name`,`version`,`description`,`repository`,`modules`,`scripts`,`files`,`bin`,`man`,`bugs`,`keywords`,`readme`,`homepage`,`license`],a=[`dependencies`,`people`,`typos`],o=i.map(function(e){return c(e)+`Field`});o=o.concat(a);function s(e,t,i){t===!0&&(t=null,i=!0),i||=!1,(!t||e.private)&&(t=function(){}),e.scripts&&e.scripts.install===`node-gyp rebuild`&&!e.scripts.preinstall&&(e.gypfile=!0),n.warn=function(){t(r.apply(null,arguments))},o.forEach(function(t){n[`fix`+c(t)](e,i)}),e._id=e.name+`@`+e.version}function c(e){return e.charAt(0).toUpperCase()+e.slice(1)}})),Se=e.a(xe(),1);function Ce(e){return e instanceof URL?(0,h.fileURLToPath)(e):e}const we=e=>f.default.resolve(Ce(e)??`.`,`package.json`),Te=(e,t)=>{let n=typeof e==`string`?ue(e):e;return t&&(0,Se.default)(n),n};async function Ee({cwd:e,normalize:t=!0}={}){return Te(await m.default.readFile(we(e),`utf8`),t)}async function De(e){let t=await b(`package.json`,e);if(t)return{packageJson:await Ee({...e,cwd:f.default.dirname(t)}),path:t}}function Oe(e){return t=>t.length>1?`${e} run ${t[0]} -- ${t.slice(1).join(` `)}`:`${e} run ${t[0]}`}const ke={agent:`yarn {0}`,run:`yarn run {0}`,install:`yarn install {0}`,frozen:`yarn install --frozen-lockfile`,global:`yarn global add {0}`,add:`yarn add {0}`,upgrade:`yarn upgrade {0}`,"upgrade-interactive":`yarn upgrade-interactive {0}`,execute:`npx {0}`,uninstall:`yarn remove {0}`,global_uninstall:`yarn global remove {0}`},Ae={agent:`pnpm {0}`,run:`pnpm run {0}`,install:`pnpm i {0}`,frozen:`pnpm i --frozen-lockfile`,global:`pnpm add -g {0}`,add:`pnpm add {0}`,upgrade:`pnpm update {0}`,"upgrade-interactive":`pnpm update -i {0}`,execute:`pnpm dlx {0}`,uninstall:`pnpm remove {0}`,global_uninstall:`pnpm remove --global {0}`},je={agent:`bun {0}`,run:`bun run {0}`,install:`bun install {0}`,frozen:`bun install --no-save`,global:`bun add -g {0}`,add:`bun add {0}`,upgrade:`bun update {0}`,"upgrade-interactive":`bun update {0}`,execute:`bunx {0}`,uninstall:`bun remove {0}`,global_uninstall:`bun remove -g {0}`},Me={npm:{agent:`npm {0}`,run:Oe(`npm`),install:`npm i {0}`,frozen:`npm ci`,global:`npm i -g {0}`,add:`npm i {0}`,upgrade:`npm update {0}`,"upgrade-interactive":null,execute:`npx {0}`,uninstall:`npm uninstall {0}`,global_uninstall:`npm uninstall -g {0}`},yarn:ke,"yarn@berry":{...ke,frozen:`yarn install --immutable`,upgrade:`yarn up {0}`,"upgrade-interactive":`yarn up -i {0}`,execute:`yarn dlx {0}`,global:`npm i -g {0}`,global_uninstall:`npm uninstall -g {0}`},pnpm:Ae,"pnpm@6":{...Ae,run:Oe(`pnpm`)},bun:je},Ne=Object.keys(Me),Pe={"bun.lockb":`bun`,"pnpm-lock.yaml":`pnpm`,"yarn.lock":`yarn`,"package-lock.json":`npm`,"npm-shrinkwrap.json":`npm`},Fe={bun:`https://bun.sh`,pnpm:`https://pnpm.io/installation`,"pnpm@6":`https://pnpm.io/6.x/installation`,yarn:`https://classic.yarnpkg.com/en/docs/install`,"yarn@berry":`https://yarnpkg.com/getting-started/install`,npm:`https://docs.npmjs.com/cli/v8/configuring-npm/install`};var x=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}const{hasOwnProperty:Ie}=Object.prototype,Le=(e,t={})=>{typeof t==`string`&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<`u`&&process.platform,t.bracketedArray=t.bracketedArray!==!1;let n=t.platform===`win32`?`\r `:` `,r=t.whitespace?` = `:`=`,i=[],a=t.sort?Object.keys(e).sort():Object.keys(e),o=0;t.align&&(o=C(a.filter(t=>e[t]===null||Array.isArray(e[t])||typeof e[t]!=`object`).map(t=>Array.isArray(e[t])?`${t}[]`:t).concat([``]).reduce((e,t)=>C(e).length>=C(t).length?e:t)).length);let s=``,c=t.bracketedArray?`[]`:``;for(let t of a){let a=e[t];if(a&&Array.isArray(a))for(let e of a)s+=C(`${t}${c}`).padEnd(o,` `)+r+C(e)+n;else a&&typeof a==`object`?i.push(t):s+=C(t).padEnd(o,` `)+r+C(a)+n}t.section&&s.length&&(s=`[`+C(t.section)+`]`+(t.newline?n+n:n)+s);for(let r of i){let i=Re(r,`.`).join(`\\.`),a=(t.section?t.section+`.`:``)+i,o=Le(e[r],{...t,section:a});s.length&&o.length&&(s+=n),s+=o}return s};function Re(e,t){var n=0,r=0,i=0,a=[];do if(i=e.indexOf(t,n),i!==-1){if(n=i+t.length,i>0&&e[i-1]===`\\`)continue;a.push(e.slice(r,i)),r=i+t.length}while(i!==-1);return a.push(e.slice(r)),a}const ze=(e,t={})=>{t.bracketedArray=t.bracketedArray!==!1;let n=Object.create(null),r=n,i=null,a=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=e.split(/[\r\n]+/g),s={};for(let e of o){if(!e||e.match(/^\s*[;#]/)||e.match(/^\s*$/))continue;let o=e.match(a);if(!o)continue;if(o[1]!==void 0){if(i=Ve(o[1]),i===`__proto__`){r=Object.create(null);continue}r=n[i]=n[i]||Object.create(null);continue}let c=Ve(o[2]),l;t.bracketedArray?l=c.length>2&&c.slice(-2)===`[]`:(s[c]=(s?.[c]||0)+1,l=s[c]>1);let u=l?c.slice(0,-2):c;if(u===`__proto__`)continue;let d=o[3]?Ve(o[4]):!0,f=d===`true`||d===`false`||d===`null`?JSON.parse(d):d;l&&(Ie.call(r,u)?Array.isArray(r[u])||(r[u]=[r[u]]):r[u]=[]),Array.isArray(r[u])?r[u].push(f):r[u]=f}let c=[];for(let e of Object.keys(n)){if(!Ie.call(n,e)||typeof n[e]!=`object`||Array.isArray(n[e]))continue;let t=Re(e,`.`);r=n;let i=t.pop(),a=i.replace(/\\\./g,`.`);for(let e of t)e!==`__proto__`&&((!Ie.call(r,e)||typeof r[e]!=`object`)&&(r[e]=Object.create(null)),r=r[e]);r===n&&a===i||(r[a]=n[e],c.push(e))}for(let e of c)delete n[e];return n},Be=e=>e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`),C=e=>typeof e!=`string`||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Be(e)||e!==e.trim()?JSON.stringify(e):e.split(`;`).join(`\\;`).split(`#`).join(`\\#`),Ve=(e,t)=>{if(e=(e||``).trim(),Be(e)){e.charAt(0)===`'`&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let t=!1,n=``;for(let r=0,i=e.length;r<i;r++){let i=e.charAt(r);if(t)`\\;#`.indexOf(i)===-1?n+=`\\`+i:n+=i,t=!1;else if(`;#`.indexOf(i)!==-1)break;else i===`\\`?t=!0:n+=i}return t&&(n+=`\\`),n.trim()}return e},He=S({parse:ze,decode:ze,stringify:Le,encode:Le,safe:C,unsafe:Ve});var w={exports:{}},Ue,We;function Ge(){if(We)return Ue;We=1,Ue=i,i.sync=a;var e=n.default;function t(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function r(e,n,r){return!e.isSymbolicLink()&&!e.isFile()?!1:t(n,r)}function i(t,n,i){e.stat(t,function(e,a){i(e,e?!1:r(a,t,n))})}function a(t,n){return r(e.statSync(t),t,n)}return Ue}var Ke,qe;function Je(){if(qe)return Ke;qe=1,Ke=t,t.sync=r;var e=n.default;function t(t,n,r){e.stat(t,function(e,t){r(e,e?!1:i(t,n))})}function r(t,n){return i(e.statSync(t),n)}function i(e,t){return e.isFile()&&a(e,t)}function a(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}return Ke}var Ye=process.platform===`win32`||x.TESTING_WINDOWS?Ge():Je(),Xe=Ze;Ze.sync=Qe;function Ze(e,t,n){if(typeof t==`function`&&(n=t,t={}),!n){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,r){Ze(e,t||{},function(e,t){e?r(e):n(t)})})}Ye(e,t||{},function(e,r){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)})}function Qe(e,t){try{return Ye.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}const T=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,$e=r.default,et=T?`;`:`:`,tt=Xe,nt=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),rt=(e,t)=>{let n=t.colon||et,r=e.match(/\//)||T&&e.match(/\\/)?[``]:[...T?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(n)],i=T?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,a=T?i.split(n):[``];return T&&e.indexOf(`.`)!==-1&&a[0]!==``&&a.unshift(``),{pathEnv:r,pathExt:a,pathExtExe:i}},it=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:r,pathExt:i,pathExtExe:a}=rt(e,t),o=[],s=n=>new Promise((i,a)=>{if(n===r.length)return t.all&&o.length?i(o):a(nt(e));let s=r[n],l=/^".*"$/.test(s)?s.slice(1,-1):s,u=$e.join(l,e);i(c(!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u,n,0))}),c=(e,n,r)=>new Promise((l,u)=>{if(r===i.length)return l(s(n+1));let d=i[r];tt(e+d,{pathExt:a},(i,a)=>{if(!i&&a)if(t.all)o.push(e+d);else return l(e+d);return l(c(e,n,r+1))})});return n?s(0).then(e=>n(null,e),n):s(0)},at=(e,t)=>{t||={};let{pathEnv:n,pathExt:r,pathExtExe:i}=rt(e,t),a=[];for(let o=0;o<n.length;o++){let s=n[o],c=/^".*"$/.test(s)?s.slice(1,-1):s,l=$e.join(c,e),u=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let e=0;e<r.length;e++){let n=u+r[e];try{if(tt.sync(n,{pathExt:i}))if(t.all)a.push(n);else return n}catch{}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw nt(e)};var ot=it;it.sync=at;var st={exports:{}};const ct=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};st.exports=ct,st.exports.default=ct;var lt=st.exports;const ut=r.default,dt=ot,ft=lt;function pt(e,t){let n=e.options.env||process.env,r=process.cwd(),i=e.options.cwd!=null,a=i&&process.chdir!==void 0&&!process.chdir.disabled;if(a)try{process.chdir(e.options.cwd)}catch{}let o;try{o=dt.sync(e.command,{path:n[ft({env:n})],pathExt:t?ut.delimiter:void 0})}catch{}finally{a&&process.chdir(r)}return o&&=ut.resolve(i?e.options.cwd:``,o),o}function mt(e){return pt(e)||pt(e,!0)}var ht=mt,gt={};const _t=/([()\][%!^"`<>&|;, *?])/g;function vt(e){return e=e.replace(_t,`^$1`),e}function yt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,`$1$1\\"`),e=e.replace(/(\\*)$/,`$1$1`),e=`"${e}"`,e=e.replace(_t,`^$1`),t&&(e=e.replace(_t,`^$1`)),e}gt.command=vt,gt.argument=yt;const bt=/^#!(.*)/;var xt=(e=``)=>{let t=e.match(bt);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,``).split(` `),i=n.split(`/`).pop();return i===`env`?r:r?`${i} ${r}`:i};const St=n.default,Ct=xt;function wt(e){let t=Buffer.alloc(150),n;try{n=St.openSync(e,`r`),St.readSync(n,t,0,150,0),St.closeSync(n)}catch{}return Ct(t.toString())}var Tt=wt;const Et=r.default,Dt=ht,Ot=gt,kt=Tt,At=process.platform===`win32`,jt=/\.(?:com|exe)$/i,Mt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Nt(e){e.file=Dt(e);let t=e.file&&kt(e.file);return t?(e.args.unshift(e.file),e.command=t,Dt(e)):e.file}function Pt(e){if(!At)return e;let t=Nt(e),n=!jt.test(t);if(e.options.forceShell||n){let n=Mt.test(t);e.command=Et.normalize(e.command),e.command=Ot.command(e.command),e.args=e.args.map(e=>Ot.argument(e,n)),e.args=[`/d`,`/s`,`/c`,`"${[e.command]