"use strict";varj=(c,t)=>()=>(t||c((t={exports:{}}).exports,t),t.exports);varI=j(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.tracing=O.metrics=void0;varU={hasSubscribers:!1};O.metrics=U;O.tracing=U});varP=j(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.defaultPerf=void0;D.defaultPerf=typeofperformance=="object"&&performance&&typeofperformance.now=="function"?performance:Date});Object.defineProperty(exports,"__esModule",{value:!0});exports.LRUCache=void0;varg=I(),N=P(),x=()=>g.metrics.hasSubscribers||g.tracing.hasSubscribers,k=newSet,G=typeofprocess=="object"&&process?process:{},V=(c,t,e,i)=>{typeofG.emitWarning=="function"?G.emitWarning(c,t,e,i):console.error(`[${e}] ${t}: ${c}`)},B=c=>!k.has(c);varT=c=>!!c&&c===Math.floor(c)&&c>0&&isFinite(c),H=c=>T(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?W:null:null,W=classextendsArray{constructor(t){super(t),this.fill(0)}},C=classc{heap;length;static#o=!1;staticcreate(t){lete=H(t);if(!e)return[];c.#o=!0;leti=newc(t,e);returnc.#o=!1,i}constructor(t,e){if(!c.#o)thrownewTypeError("instantiate Stack using Stack.create(n)");this.heap=newe(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){returnthis.heap[--this.length]}},L=classc{#o;#c;#m;#W;#S;#M;#j;#w;getperf(){returnthis.#w}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#n;#b;#s;#i;#t;#l;#u;#a;#h;#y;#r;#_;#F;#d;#g;#T;#U;#f;#D;staticunsafeExposeInternals(t){return{starts:t.#F,ttls:t.#d,autopurgeTimers:t.#g,sizes:t.#_,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,gethead(){returnt.#a},gettail(){returnt.#h},free:t.#y,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#G(e,i,s,n),moveToTail:e=>t.#L(e),indexes:e=>t.#A(e),rindexes:e=>t.#z(e),isStale:e=>t.#p(e)}}getmax(){returnthis.#o}getmaxSize(){returnthis.#c}getcalculatedSize(){returnthis.#b}getsize(){returnthis.#n}getfetchMethod(){returnthis.#M}getmemoMethod(){returnthis.#j}getdispose(){returnthis.#m}getonInsert(){returnthis.#W}getdisposeAfter(){returnthis.#S}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:r,updateAgeOnHas:h,allowStale:a,dispose:o,onInsert:d,disposeAfter:y,noDisposeOnSet:_,noUpdateTTL:u,maxSize:p=0,maxEntrySize:f=0,sizeCalculation:b,fetchMethod:l,memoMethod:S,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:A,ignoreFetchAbort:z,backgroundFetchSize:M=1,perf:v}=t;if(this.backgroundFetchSize=M,v!==void0&&typeofv?.now!="function")thrownewTypeError("perf option must have a now() method if specified");if(this.#w=v??N.defaultPerf,e!==0&&!T(e))thrownewTypeError("max option must be a nonnegative integer");letE=e?H(e):Array;if(!E)thrownewError("invalid max value: "+e);if(this.#o=e,this.#c=p,this.maxEntrySize=f||this.#c,this.sizeCalculation=b,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)thrownewTypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeofthis.sizeCalculation!="function")thrownewTypeError("sizeCalculation set to non-function")}if(S!==void0&&typeofS!="function")thrownewTypeError("memoMethod must be a function if defined");if(this.#j=S,l!==void0&&typeofl!="function")thrownewTypeError("fetchMethod must be a function if specified");if(this.#M=l,this.#U=!!l,this.#s=newMap,this.#i=Array.from({length:e}).fill(void0),this.#t=Array.from({length:e}).fill(void0),this.#l=newE(e),this.#u=newE(e),this.#a=0,this.#h=0,this.#y=C.create(e),this.#n=0,this.#b=0,typeofo=="function"&&(this.#m=o),typeofd=="function"&&(this.#W=d),typeofy=="function"?(this.#S=y,this.#r=[]):(this.#S=void0,this.#r=void0),this.#T=!!this.#m,this.#D=!!this.#W,this.#f=!!this.#S,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!F,th