@drincs/pixi-vn 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas/CanvasManager.cjs +1 -1
- package/dist/canvas/CanvasManager.js +1 -1
- package/dist/canvas/CanvasManagerStatic.cjs +1 -1
- package/dist/canvas/CanvasManagerStatic.js +1 -1
- package/dist/canvas/components/Container.cjs +1 -1
- package/dist/canvas/components/Container.js +1 -1
- package/dist/canvas/components/ImageContainer.cjs +1 -1
- package/dist/canvas/components/ImageContainer.js +1 -1
- package/dist/canvas/components/ImageSprite.cjs +2 -2
- package/dist/canvas/components/ImageSprite.js +2 -2
- package/dist/canvas/components/Sprite.cjs +1 -1
- package/dist/canvas/components/Sprite.js +1 -1
- package/dist/canvas/components/Text.cjs +1 -1
- package/dist/canvas/components/Text.js +1 -1
- package/dist/canvas/components/VideoSprite.cjs +2 -2
- package/dist/canvas/components/VideoSprite.js +2 -2
- package/dist/canvas/decorators/canvas-element-decorator.cjs +1 -1
- package/dist/canvas/decorators/canvas-element-decorator.js +1 -1
- package/dist/canvas/decorators/event-decorator.cjs +1 -1
- package/dist/canvas/decorators/event-decorator.js +1 -1
- package/dist/canvas/functions/canvas-effect.cjs +1 -1
- package/dist/canvas/functions/canvas-effect.js +1 -1
- package/dist/canvas/functions/canvas-import-utility.cjs +1 -1
- package/dist/canvas/functions/canvas-import-utility.js +1 -1
- package/dist/canvas/functions/canvas-transition.cjs +1 -1
- package/dist/canvas/functions/canvas-transition.js +1 -1
- package/dist/canvas/functions/image-container-utility.cjs +1 -1
- package/dist/canvas/functions/image-container-utility.js +1 -1
- package/dist/canvas/functions/image-utility.cjs +1 -1
- package/dist/canvas/functions/image-utility.js +1 -1
- package/dist/canvas/functions/video-utility.cjs +1 -1
- package/dist/canvas/functions/video-utility.js +1 -1
- package/dist/canvas/index.cjs +1 -1
- package/dist/canvas/index.js +1 -1
- package/dist/canvas/tickers/classes/TickerBase.cjs +1 -1
- package/dist/canvas/tickers/classes/TickerBase.js +1 -1
- package/dist/canvas/tickers/components/FadeAlphaTicker.cjs +1 -1
- package/dist/canvas/tickers/components/FadeAlphaTicker.js +1 -1
- package/dist/canvas/tickers/components/MoveTicker.cjs +1 -1
- package/dist/canvas/tickers/components/MoveTicker.js +1 -1
- package/dist/canvas/tickers/components/RotateTicker.cjs +1 -1
- package/dist/canvas/tickers/components/RotateTicker.js +1 -1
- package/dist/canvas/tickers/components/ZoomTicker.cjs +1 -1
- package/dist/canvas/tickers/components/ZoomTicker.js +1 -1
- package/dist/canvas/tickers/decorators/ticker-decorator.cjs +1 -1
- package/dist/canvas/tickers/decorators/ticker-decorator.js +1 -1
- package/dist/canvas/tickers/functions/ticker-texture-utility.cjs +1 -1
- package/dist/canvas/tickers/functions/ticker-texture-utility.js +1 -1
- package/dist/canvas/tickers/index.cjs +1 -1
- package/dist/canvas/tickers/index.js +1 -1
- package/dist/character/classes/CharacterBaseModel.cjs +17 -17
- package/dist/character/classes/CharacterBaseModel.js +17 -17
- package/dist/character/classes/CharacterStoredClass.cjs +16 -16
- package/dist/character/classes/CharacterStoredClass.js +16 -16
- package/dist/character/decorators/character-decorator.cjs +1 -1
- package/dist/character/decorators/character-decorator.js +1 -1
- package/dist/character/index.cjs +16 -16
- package/dist/character/index.js +16 -16
- package/dist/classes/CachedMap.cjs +1 -1
- package/dist/classes/CachedMap.d.cts +1 -1
- package/dist/classes/CachedMap.d.ts +1 -1
- package/dist/classes/CachedMap.js +1 -1
- package/dist/classes/index.cjs +1 -1
- package/dist/classes/index.js +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.d.cts +5 -1
- package/dist/constants.d.ts +5 -1
- package/dist/constants.js +1 -1
- package/dist/history/HistoryManager.cjs +2 -2
- package/dist/history/HistoryManager.d.cts +24 -13
- package/dist/history/HistoryManager.d.ts +24 -13
- package/dist/history/HistoryManager.js +2 -2
- package/dist/history/HistoryManagerStatic.cjs +1 -1
- package/dist/history/HistoryManagerStatic.d.cts +9 -8
- package/dist/history/HistoryManagerStatic.d.ts +9 -8
- package/dist/history/HistoryManagerStatic.js +1 -1
- package/dist/history/index.cjs +2 -2
- package/dist/history/index.d.cts +4 -2
- package/dist/history/index.d.ts +4 -2
- package/dist/history/index.js +2 -2
- package/dist/history/interfaces/HistoryManagerInterface.d.cts +54 -11
- package/dist/history/interfaces/HistoryManagerInterface.d.ts +54 -11
- package/dist/{index-CWhYJ7yq.d.ts → index-CvpVN1rC.d.ts} +3 -3
- package/dist/{index-CVn6zVij.d.cts → index-DCnX_VPi.d.cts} +3 -3
- package/dist/index.cjs +73 -73
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +73 -73
- package/dist/narration/NarrationManager.cjs +16 -16
- package/dist/narration/NarrationManager.d.cts +1 -1
- package/dist/narration/NarrationManager.d.ts +1 -1
- package/dist/narration/NarrationManager.js +16 -16
- package/dist/narration/NarrationManagerStatic.cjs +1 -1
- package/dist/narration/NarrationManagerStatic.js +1 -1
- package/dist/narration/classes/ChoiceMenuOption.cjs +1 -1
- package/dist/narration/classes/ChoiceMenuOption.js +1 -1
- package/dist/narration/decorators/RegisteredLabels.cjs +1 -1
- package/dist/narration/decorators/RegisteredLabels.js +1 -1
- package/dist/narration/decorators/newLabel.cjs +1 -1
- package/dist/narration/decorators/newLabel.js +1 -1
- package/dist/narration/index.cjs +17 -17
- package/dist/narration/index.d.cts +2 -2
- package/dist/narration/index.d.ts +2 -2
- package/dist/narration/index.js +17 -17
- package/dist/narration/interfaces/HistoryStep.d.cts +5 -5
- package/dist/narration/interfaces/HistoryStep.d.ts +5 -5
- package/dist/narration/interfaces/{NarrativeHistory.d.cts → NarrationHistory.d.cts} +2 -2
- package/dist/narration/interfaces/{NarrativeHistory.d.ts → NarrationHistory.d.ts} +2 -2
- package/dist/narration/interfaces/NarrationManagerInterface.d.cts +1 -1
- package/dist/narration/interfaces/NarrationManagerInterface.d.ts +1 -1
- package/dist/pixi-devtools/additionalPositionsProperties.cjs +1 -1
- package/dist/pixi-devtools/additionalPositionsProperties.js +1 -1
- package/dist/pixi-vn.d.d.cts +44 -1
- package/dist/pixi-vn.d.d.ts +44 -1
- package/dist/storage/StorageManager.cjs +1 -1
- package/dist/storage/StorageManager.js +1 -1
- package/dist/storage/StorageManagerStatic.cjs +1 -1
- package/dist/storage/StorageManagerStatic.js +1 -1
- package/dist/storage/classes/StoredClassModel.cjs +1 -1
- package/dist/storage/classes/StoredClassModel.js +1 -1
- package/dist/storage/index.cjs +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/utils/diff-utility.d.cts +2 -2
- package/dist/utils/diff-utility.d.ts +2 -2
- package/package.json +3 -3
- /package/dist/narration/interfaces/{NarrativeHistory.cjs → NarrationHistory.cjs} +0 -0
- /package/dist/narration/interfaces/{NarrativeHistory.js → NarrationHistory.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var nt=Object.create;var k=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var U=(h=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});var $=(h,t)=>()=>(t||h((t={exports:{}}).exports,t),t.exports);var lt=(h,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ot(t))!ht.call(h,s)&&s!==e&&k(h,s,{get:()=>t[s],enumerable:!(i=rt(t,s))||i.enumerable});return h};var ft=(h,t,e)=>(e=h!=null?nt(at(h)):{},lt(k(e,"default",{value:h,enumerable:true}),h));var tt=$((P,Z)=>{(function(h,t){typeof P=="object"?Z.exports=P=t():typeof define=="function"&&define.amd?define([],t):h.CryptoJS=t();})(P,function(){var h=h||function(t,e){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof U=="function")try{i=U("crypto");}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function n(){}return function(a){var d;return n.prototype=a,d=new n,n.prototype=null,d}}(),o={},f=o.lib={},l=f.Base=function(){return {extend:function(n){var a=r(this);return n&&a.mixIn(n),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var a in n)n.hasOwnProperty(a)&&(this[a]=n[a]);n.hasOwnProperty("toString")&&(this.toString=n.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),b=f.WordArray=l.extend({init:function(n,a){n=this.words=n||[],a!=e?this.sigBytes=a:this.sigBytes=n.length*4;},toString:function(n){return (n||u).stringify(this)},concat:function(n){var a=this.words,d=n.words,c=this.sigBytes,m=n.sigBytes;if(this.clamp(),c%4)for(var v=0;v<m;v++){var A=d[v>>>2]>>>24-v%4*8&255;a[c+v>>>2]|=A<<24-(c+v)%4*8;}else for(var T=0;T<m;T+=4)a[c+T>>>2]=d[T>>>2];return this.sigBytes+=m,this},clamp:function(){var n=this.words,a=this.sigBytes;n[a>>>2]&=4294967295<<32-a%4*8,n.length=t.ceil(a/4);},clone:function(){var n=l.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){for(var a=[],d=0;d<n;d+=4)a.push(s());return new b.init(a,n)}}),p=o.enc={},u=p.Hex={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],m=0;m<d;m++){var v=a[m>>>2]>>>24-m%4*8&255;c.push((v>>>4).toString(16)),c.push((v&15).toString(16));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c+=2)d[c>>>3]|=parseInt(n.substr(c,2),16)<<24-c%8*4;return new b.init(d,a/2)}},g=p.Latin1={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],m=0;m<d;m++){var v=a[m>>>2]>>>24-m%4*8&255;c.push(String.fromCharCode(v));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c++)d[c>>>2]|=(n.charCodeAt(c)&255)<<24-c%4*8;return new b.init(d,a)}},y=p.Utf8={stringify:function(n){try{return decodeURIComponent(escape(g.stringify(n)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(n){return g.parse(unescape(encodeURIComponent(n)))}},_=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new b.init,this._nDataBytes=0;},_append:function(n){typeof n=="string"&&(n=y.parse(n)),this._data.concat(n),this._nDataBytes+=n.sigBytes;},_process:function(n){var a,d=this._data,c=d.words,m=d.sigBytes,v=this.blockSize,A=v*4,T=m/A;n?T=t.ceil(T):T=t.max((T|0)-this._minBufferSize,0);var L=T*v,O=t.min(L*4,m);if(L){for(var M=0;M<L;M+=v)this._doProcessBlock(c,M);a=c.splice(0,L),d.sigBytes-=O;}return new b.init(a,O)},clone:function(){var n=l.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0});f.Hasher=_.extend({cfg:l.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset();},reset:function(){_.reset.call(this),this._doReset();},update:function(n){return this._append(n),this._process(),this},finalize:function(n){n&&this._append(n);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(n){return function(a,d){return new n.init(d).finalize(a)}},_createHmacHelper:function(n){return function(a,d){return new S.HMAC.init(n,d).finalize(a)}}});var S=o.algo={};return o}(Math);return h});});var it=$((H,et)=>{(function(h,t){typeof H=="object"?et.exports=H=t(tt()):typeof define=="function"&&define.amd?define(["./core"],t):t(h.CryptoJS);})(H,function(h){return function(){var t=h,e=t.lib,i=e.WordArray,s=e.Hasher,r=t.algo,o=[],f=r.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(l,b){for(var p=this._hash.words,u=p[0],g=p[1],y=p[2],_=p[3],w=p[4],S=0;S<80;S++){if(S<16)o[S]=l[b+S]|0;else {var n=o[S-3]^o[S-8]^o[S-14]^o[S-16];o[S]=n<<1|n>>>31;}var a=(u<<5|u>>>27)+w+o[S];S<20?a+=(g&y|~g&_)+1518500249:S<40?a+=(g^y^_)+1859775393:S<60?a+=(g&y|g&_|y&_)-1894007588:a+=(g^y^_)-899497514,w=_,_=y,y=g<<30|g>>>2,g=u,u=a;}p[0]=p[0]+u|0,p[1]=p[1]+g|0,p[2]=p[2]+y|0,p[3]=p[3]+_|0,p[4]=p[4]+w|0;},_doFinalize:function(){var l=this._data,b=l.words,p=this._nDataBytes*8,u=l.sigBytes*8;return b[u>>>5]|=128<<24-u%32,b[(u+64>>>9<<4)+14]=Math.floor(p/4294967296),b[(u+64>>>9<<4)+15]=p,l.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});t.SHA1=s._createHelper(f),t.HmacSHA1=s._createHmacHelper(f);}(),h.SHA1});});var x;(s=>(s.log=(r,...o)=>console.log(`[Pixi\u2019VN] ${r}`,...o),s.warn=(r,...o)=>console.warn(`[Pixi\u2019VN] ${r}`,...o),s.error=(r,...o)=>console.error(`[Pixi\u2019VN] ${r}`,...o),s.info=(r,...o)=>console.info(`[Pixi\u2019VN] ${r}`,...o)))(x||={});var E=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,q=new Set,G=typeof process=="object"&&process?process:{},J=(h,t,e,i)=>{typeof G.emitWarning=="function"?G.emitWarning(h,t,e,i):console.error(`[${e}] ${t}: ${h}`);},B=globalThis.AbortController,K=globalThis.AbortSignal;if(typeof B>"u"){K=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},B=class{constructor(){t();}signal=new K;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let h=G.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{h&&(h=false,J("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));};}var ct=h=>!q.has(h),C=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),Y=h=>C(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?I:null:null,I=class extends Array{constructor(t){super(t),this.fill(0);}},j=class h{heap;length;static#h=false;static create(t){let e=Y(t);if(!e)return [];h.#h=true;let i=new h(t,e);return h.#h=false,i}constructor(t,e){if(!h.#h)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]}},D=class h{#h;#c;#g;#C;#b;#z;#R;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#y;#s;#i;#t;#l;#u;#a;#r;#m;#o;#S;#w;#d;#v;#x;#f;#F;static unsafeExposeInternals(t){return {starts:t.#w,ttls:t.#d,sizes:t.#S,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#r},free:t.#m,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#D(e,i,s,r),moveToTail:e=>t.#I(e),indexes:e=>t.#_(e),rindexes:e=>t.#T(e),isStale:e=>t.#p(e)}}get max(){return this.#h}get maxSize(){return this.#c}get calculatedSize(){return this.#y}get size(){return this.#n}get fetchMethod(){return this.#z}get memoMethod(){return this.#R}get dispose(){return this.#g}get onInsert(){return this.#C}get disposeAfter(){return this.#b}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:f,allowStale:l,dispose:b,onInsert:p,disposeAfter:u,noDisposeOnSet:g,noUpdateTTL:y,maxSize:_=0,maxEntrySize:w=0,sizeCalculation:S,fetchMethod:n,memoMethod:a,noDeleteOnFetchRejection:d,noDeleteOnStaleGet:c,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:v,ignoreFetchAbort:A}=t;if(e!==0&&!C(e))throw new TypeError("max option must be a nonnegative integer");let T=e?Y(e):Array;if(!T)throw new Error("invalid max value: "+e);if(this.#h=e,this.#c=_,this.maxEntrySize=w||this.#c,this.sizeCalculation=S,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=a,n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#z=n,this.#x=!!n,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new T(e),this.#u=new T(e),this.#a=0,this.#r=0,this.#m=j.create(e),this.#n=0,this.#y=0,typeof b=="function"&&(this.#g=b),typeof p=="function"&&(this.#C=p),typeof u=="function"?(this.#b=u,this.#o=[]):(this.#b=void 0,this.#o=void 0),this.#v=!!this.#g,this.#F=!!this.#C,this.#f=!!this.#b,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!d,this.allowStaleOnFetchRejection=!!m,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#c!==0&&!C(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!C(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#N();}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!c,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!f,this.ttlResolution=C(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!C(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P();}if(this.#h===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#c){let L="LRU_CACHE_UNBOUNDED";ct(L)&&(q.add(L),J("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,h));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#P(){let t=new I(this.#h),e=new I(this.#h);this.#d=t,this.#w=e,this.#H=(r,o,f=E.now())=>{if(e[r]=o!==0?f:0,t[r]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#p(r)&&this.#L(this.#i[r],"expire");},o+1);l.unref&&l.unref();}},this.#O=r=>{e[r]=t[r]!==0?E.now():0;},this.#A=(r,o)=>{if(t[o]){let f=t[o],l=e[o];if(!f||!l)return;r.ttl=f,r.start=l,r.now=i||s();let b=r.now-l;r.remainingTTL=f-b;}};let i=0,s=()=>{let r=E.now();if(this.ttlResolution>0){i=r;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref();}return r};this.getRemainingTTL=r=>{let o=this.#s.get(r);if(o===void 0)return 0;let f=t[o],l=e[o];if(!f||!l)return 1/0;let b=(i||s())-l;return f-b},this.#p=r=>{let o=e[r],f=t[r];return !!f&&!!o&&(i||s())-o>f};}#O=()=>{};#A=()=>{};#H=()=>{};#p=()=>false;#N(){let t=new I(this.#h);this.#y=0,this.#S=t,this.#E=e=>{this.#y-=t[e],t[e]=0;},this.#M=(e,i,s,r)=>{if(this.#e(i))return 0;if(!C(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!C(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#W=(e,i,s)=>{if(t[e]=i,this.#c){let r=this.#c-t[e];for(;this.#y>r;)this.#B(true);}this.#y+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#y);};}#E=t=>{};#W=(t,e,i)=>{};#M=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#r;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#a));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#r));)e=this.#l[e];}#U(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#_())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#_()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#_())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#p(e)&&(this.#L(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#w){let o=this.#d[e],f=this.#w[e];if(o&&f){let l=o-(E.now()-f);r.ttl=l,r.start=Date.now();}}return this.#S&&(r.size=this.#S[e]),r}dump(){let t=[];for(let e of this.#_({allowStale:true})){let i=this.#i[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#d&&this.#w){o.ttl=this.#d[e];let f=E.now()-this.#w[e];o.start=Math.floor(Date.now()-f);}this.#S&&(o.size=this.#S[e]),t.unshift([i,o]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=E.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:f=this.sizeCalculation,status:l}=i,{noUpdateTTL:b=this.noUpdateTTL}=i,p=this.#M(t,e,i.size||0,f);if(this.maxEntrySize&&p>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=true),this.#L(t,"set"),this;let u=this.#n===0?void 0:this.#s.get(t);if(u===void 0)u=this.#n===0?this.#r:this.#m.length!==0?this.#m.pop():this.#n===this.#h?this.#B(false):this.#n,this.#i[u]=t,this.#t[u]=e,this.#s.set(t,u),this.#l[this.#r]=u,this.#u[u]=this.#r,this.#r=u,this.#n++,this.#W(u,p,l),l&&(l.set="add"),b=false,this.#F&&this.#C?.(e,t,"add");else {this.#I(u);let g=this.#t[u];if(e!==g){if(this.#x&&this.#e(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=g;y!==void 0&&!o&&(this.#v&&this.#g?.(y,t,"set"),this.#f&&this.#o?.push([y,t,"set"]));}else o||(this.#v&&this.#g?.(g,t,"set"),this.#f&&this.#o?.push([g,t,"set"]));if(this.#E(u),this.#W(u,p,l),this.#t[u]=e,l){l.set="replace";let y=g&&this.#e(g)?g.__staleWhileFetching:g;y!==void 0&&(l.oldValue=y);}}else l&&(l.set="update");this.#F&&this.onInsert?.(e,t,e===g?"update":"replace");}if(s!==0&&!this.#d&&this.#P(),this.#d&&(b||this.#H(u,s,r),l&&this.#A(l,u)),!o&&this.#f&&this.#o){let g=this.#o,y;for(;y=g?.shift();)this.#b?.(...y);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#a];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#o){let t=this.#o,e;for(;e=t?.shift();)this.#b?.(...e);}}}#B(t){let e=this.#a,i=this.#i[e],s=this.#t[e];return this.#x&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(s,i,"evict"),this.#f&&this.#o?.push([s,i,"evict"])),this.#E(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#m.push(e)),this.#n===1?(this.#a=this.#r=0,this.#m.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#s.get(t);if(r!==void 0){let o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return false;if(this.#p(r))s&&(s.has="stale",this.#A(s,r));else return i&&this.#O(r),s&&(s.has="hit",this.#A(s,r)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#p(s))return;let r=this.#t[s];return this.#e(r)?r.__staleWhileFetching:r}#D(t,e,i,s){let r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;let o=new B,{signal:f}=i;f?.addEventListener("abort",()=>o.abort(f.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:s},b=(w,S=false)=>{let{aborted:n}=o.signal,a=i.ignoreFetchAbort&&w!==void 0;if(i.status&&(n&&!S?(i.status.fetchAborted=true,i.status.fetchError=o.signal.reason,a&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),n&&!a&&!S)return u(o.signal.reason);let d=y;return this.#t[e]===y&&(w===void 0?d.__staleWhileFetching?this.#t[e]=d.__staleWhileFetching:this.#L(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,w,l.options))),w},p=w=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=w),u(w)),u=w=>{let{aborted:S}=o.signal,n=S&&i.allowStaleOnFetchAbort,a=n||i.allowStaleOnFetchRejection,d=a||i.noDeleteOnFetchRejection,c=y;if(this.#t[e]===y&&(!d||c.__staleWhileFetching===void 0?this.#L(t,"fetch"):n||(this.#t[e]=c.__staleWhileFetching)),a)return i.status&&c.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),c.__staleWhileFetching;if(c.__returned===c)throw w},g=(w,S)=>{let n=this.#z?.(t,r,l);n&&n instanceof Promise&&n.then(a=>w(a===void 0?void 0:a),S),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(w(void 0),i.allowStaleOnFetchAbort&&(w=a=>b(a,true)));});};i.status&&(i.status.fetchDispatched=true);let y=new Promise(g).then(b,p),_=Object.assign(y,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,_,{...l.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=_,_}#e(t){if(!this.#x)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof B}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:l=0,sizeCalculation:b=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:w,forceRefresh:S=false,status:n,signal:a}=e;if(!this.#x)return n&&(n.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:n});let d={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:f,size:l,sizeCalculation:b,noUpdateTTL:p,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:_,ignoreFetchAbort:y,status:n,signal:a},c=this.#s.get(t);if(c===void 0){n&&(n.fetch="miss");let m=this.#D(t,c,d,w);return m.__returned=m}else {let m=this.#t[c];if(this.#e(m)){let O=i&&m.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",O&&(n.returnedStale=true)),O?m.__staleWhileFetching:m.__returned=m}let v=this.#p(c);if(!S&&!v)return n&&(n.fetch="hit"),this.#I(c),s&&this.#O(c),n&&this.#A(n,c),m;let A=this.#D(t,c,d,w),L=A.__staleWhileFetching!==void 0&&i;return n&&(n.fetch=v?"stale":"refresh",L&&v&&(n.returnedStale=true)),L?A.__staleWhileFetching:A.__returned=A}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...o}=e,f=this.get(t,o);if(!r&&f!==void 0)return f;let l=i(t,f,{options:o,context:s});return this.set(t,l,o),l}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,f=this.#s.get(t);if(f!==void 0){let l=this.#t[f],b=this.#e(l);return o&&this.#A(o,f),this.#p(f)?(o&&(o.get="stale"),b?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=true),i?l.__staleWhileFetching:void 0):(r||this.#L(t,"expire"),o&&i&&(o.returnedStale=true),i?l:void 0)):(o&&(o.get="hit"),b?l.__staleWhileFetching:(this.#I(f),s&&this.#O(f),l))}else o&&(o.get="miss");}#G(t,e){this.#u[e]=t,this.#l[t]=e;}#I(t){t!==this.#r&&(t===this.#a?this.#a=this.#l[t]:this.#G(this.#u[t],this.#l[t]),this.#G(this.#r,t),this.#r=t);}delete(t){return this.#L(t,"delete")}#L(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#j(e);else {this.#E(s);let r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(r,t,e),this.#f&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else {let o=this.#u[s];this.#l[o]=this.#l[s];let f=this.#l[s];this.#u[f]=this.#u[s];}this.#n--,this.#m.push(s);}}if(this.#f&&this.#o?.length){let s=this.#o,r;for(;r=s?.shift();)this.#b?.(...r);}return i}clear(){return this.#j("delete")}#j(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#v&&this.#g?.(i,s,t),this.#f&&this.#o?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#S&&this.#S.fill(0),this.#a=0,this.#r=0,this.#m.length=0,this.#y=0,this.#n=0,this.#f&&this.#o){let e=this.#o,i;for(;i=e?.shift();)this.#b?.(...i);}}};var z=class{cache;map=new Map;constructor(t){this.cache=new D({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}get keys(){return this.map.keys}get values(){return this.map.values}};var R=new z({cacheSize:10}),X;(s=>{function h(r){let o=R.get(r);if(!o){x.error(`Label "${r}" not found`);return}return o}s.get=h;function t(r){if(Array.isArray(r)){r.forEach(o=>t(o));return}R.has(r.id)&&x.info(`Label "${r.id}" already exists, it will be overwritten`),R.set(r.id,r);}s.add=t;function e(){return Array.from(R.values())}s.values=e;function i(r){return R.has(r)}s.has=i;})(X||={});var Q=X;var st=ft(it());var F=class{constructor(t,e){this._id=t,this._onStepStart=e?.onStepStart,this._onLoadingLabel=e?.onLoadingLabel,this._onStepEnd=e?.onStepEnd;}_id;get id(){return this._id}_onStepStart;get onStepStart(){return async(t,e)=>{if(this._onLoadingLabel&&t===0&&await this._onLoadingLabel(t,e),this._onStepStart)return await this._onStepStart(t,e)}}_onLoadingLabel;get onLoadingLabel(){return this._onLoadingLabel}_onStepEnd;get onStepEnd(){return this._onStepEnd}};var W=class extends F{get stepCount(){return this.steps.length}getStepById(t){return this.steps[t]}constructor(t,e,i){super(t,i),this._steps=e;}_steps;get steps(){return typeof this._steps=="function"?this._steps():this._steps}getStepSha(t){if(t<0||t>=this.steps.length)return x.warn("stepSha not found, setting to ERROR"),"error";try{let e=this.steps[t];return (0,st.default)(e.toString().toLocaleLowerCase()).toString()}catch(e){return x.warn("stepSha not found, setting to ERROR",e),"error"}}};var ut="__close-label-id__";function N(){return new W(ut,[],{})}var V=class{text;_label;get label(){let t=this._label;if(typeof t=="string"){let e=Q.get(t);e?t=e:(x.error(`Label ${t} not found, so it will be closed`),t=N());}return t}type;oneTime;onlyHaveNoChoice;autoSelect;props={};devProps={};constructor(t,e,i,s){let{type:r="call",oneTime:o=false,onlyHaveNoChoice:f=false,autoSelect:l=false,...b}=s||{};this.text=t,this._label=e,this.type=r,this.oneTime=o,this.onlyHaveNoChoice=f,this.autoSelect=l,this.devProps=b,this.props=i;}};function Mt(h,t,e,i){let s=typeof t=="string"?t:t.id;return {...i,label:s,props:e,text:h,type:i?.type||"call"}}export{V as default,Mt as newChoiceOption};
|
|
1
|
+
var nt=Object.create;var k=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var at=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var U=(h=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});var $=(h,t)=>()=>(t||h((t={exports:{}}).exports,t),t.exports);var lt=(h,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ot(t))!ht.call(h,s)&&s!==e&&k(h,s,{get:()=>t[s],enumerable:!(i=rt(t,s))||i.enumerable});return h};var ft=(h,t,e)=>(e=h!=null?nt(at(h)):{},lt(k(e,"default",{value:h,enumerable:true}),h));var tt=$((P,Z)=>{(function(h,t){typeof P=="object"?Z.exports=P=t():typeof define=="function"&&define.amd?define([],t):h.CryptoJS=t();})(P,function(){var h=h||function(t,e){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof U=="function")try{i=U("crypto");}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function n(){}return function(a){var d;return n.prototype=a,d=new n,n.prototype=null,d}}(),o={},f=o.lib={},l=f.Base=function(){return {extend:function(n){var a=r(this);return n&&a.mixIn(n),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var a in n)n.hasOwnProperty(a)&&(this[a]=n[a]);n.hasOwnProperty("toString")&&(this.toString=n.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),b=f.WordArray=l.extend({init:function(n,a){n=this.words=n||[],a!=e?this.sigBytes=a:this.sigBytes=n.length*4;},toString:function(n){return (n||u).stringify(this)},concat:function(n){var a=this.words,d=n.words,c=this.sigBytes,m=n.sigBytes;if(this.clamp(),c%4)for(var v=0;v<m;v++){var A=d[v>>>2]>>>24-v%4*8&255;a[c+v>>>2]|=A<<24-(c+v)%4*8;}else for(var T=0;T<m;T+=4)a[c+T>>>2]=d[T>>>2];return this.sigBytes+=m,this},clamp:function(){var n=this.words,a=this.sigBytes;n[a>>>2]&=4294967295<<32-a%4*8,n.length=t.ceil(a/4);},clone:function(){var n=l.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){for(var a=[],d=0;d<n;d+=4)a.push(s());return new b.init(a,n)}}),p=o.enc={},u=p.Hex={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],m=0;m<d;m++){var v=a[m>>>2]>>>24-m%4*8&255;c.push((v>>>4).toString(16)),c.push((v&15).toString(16));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c+=2)d[c>>>3]|=parseInt(n.substr(c,2),16)<<24-c%8*4;return new b.init(d,a/2)}},g=p.Latin1={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],m=0;m<d;m++){var v=a[m>>>2]>>>24-m%4*8&255;c.push(String.fromCharCode(v));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c++)d[c>>>2]|=(n.charCodeAt(c)&255)<<24-c%4*8;return new b.init(d,a)}},y=p.Utf8={stringify:function(n){try{return decodeURIComponent(escape(g.stringify(n)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(n){return g.parse(unescape(encodeURIComponent(n)))}},_=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new b.init,this._nDataBytes=0;},_append:function(n){typeof n=="string"&&(n=y.parse(n)),this._data.concat(n),this._nDataBytes+=n.sigBytes;},_process:function(n){var a,d=this._data,c=d.words,m=d.sigBytes,v=this.blockSize,A=v*4,T=m/A;n?T=t.ceil(T):T=t.max((T|0)-this._minBufferSize,0);var L=T*v,O=t.min(L*4,m);if(L){for(var M=0;M<L;M+=v)this._doProcessBlock(c,M);a=c.splice(0,L),d.sigBytes-=O;}return new b.init(a,O)},clone:function(){var n=l.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0});f.Hasher=_.extend({cfg:l.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset();},reset:function(){_.reset.call(this),this._doReset();},update:function(n){return this._append(n),this._process(),this},finalize:function(n){n&&this._append(n);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(n){return function(a,d){return new n.init(d).finalize(a)}},_createHmacHelper:function(n){return function(a,d){return new S.HMAC.init(n,d).finalize(a)}}});var S=o.algo={};return o}(Math);return h});});var it=$((H,et)=>{(function(h,t){typeof H=="object"?et.exports=H=t(tt()):typeof define=="function"&&define.amd?define(["./core"],t):t(h.CryptoJS);})(H,function(h){return function(){var t=h,e=t.lib,i=e.WordArray,s=e.Hasher,r=t.algo,o=[],f=r.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(l,b){for(var p=this._hash.words,u=p[0],g=p[1],y=p[2],_=p[3],w=p[4],S=0;S<80;S++){if(S<16)o[S]=l[b+S]|0;else {var n=o[S-3]^o[S-8]^o[S-14]^o[S-16];o[S]=n<<1|n>>>31;}var a=(u<<5|u>>>27)+w+o[S];S<20?a+=(g&y|~g&_)+1518500249:S<40?a+=(g^y^_)+1859775393:S<60?a+=(g&y|g&_|y&_)-1894007588:a+=(g^y^_)-899497514,w=_,_=y,y=g<<30|g>>>2,g=u,u=a;}p[0]=p[0]+u|0,p[1]=p[1]+g|0,p[2]=p[2]+y|0,p[3]=p[3]+_|0,p[4]=p[4]+w|0;},_doFinalize:function(){var l=this._data,b=l.words,p=this._nDataBytes*8,u=l.sigBytes*8;return b[u>>>5]|=128<<24-u%32,b[(u+64>>>9<<4)+14]=Math.floor(p/4294967296),b[(u+64>>>9<<4)+15]=p,l.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});t.SHA1=s._createHelper(f),t.HmacSHA1=s._createHmacHelper(f);}(),h.SHA1});});var x;(s=>(s.log=(r,...o)=>console.log(`[Pixi\u2019VN] ${r}`,...o),s.warn=(r,...o)=>console.warn(`[Pixi\u2019VN] ${r}`,...o),s.error=(r,...o)=>console.error(`[Pixi\u2019VN] ${r}`,...o),s.info=(r,...o)=>console.info(`[Pixi\u2019VN] ${r}`,...o)))(x||={});var E=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,q=new Set,G=typeof process=="object"&&process?process:{},J=(h,t,e,i)=>{typeof G.emitWarning=="function"?G.emitWarning(h,t,e,i):console.error(`[${e}] ${t}: ${h}`);},B=globalThis.AbortController,K=globalThis.AbortSignal;if(typeof B>"u"){K=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},B=class{constructor(){t();}signal=new K;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let h=G.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{h&&(h=false,J("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));};}var ct=h=>!q.has(h),C=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),Y=h=>C(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?I:null:null,I=class extends Array{constructor(t){super(t),this.fill(0);}},j=class h{heap;length;static#h=false;static create(t){let e=Y(t);if(!e)return [];h.#h=true;let i=new h(t,e);return h.#h=false,i}constructor(t,e){if(!h.#h)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]}},D=class h{#h;#c;#g;#C;#b;#z;#R;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#y;#s;#i;#t;#l;#u;#a;#r;#m;#o;#S;#w;#d;#v;#x;#f;#F;static unsafeExposeInternals(t){return {starts:t.#w,ttls:t.#d,sizes:t.#S,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#r},free:t.#m,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#D(e,i,s,r),moveToTail:e=>t.#I(e),indexes:e=>t.#_(e),rindexes:e=>t.#T(e),isStale:e=>t.#p(e)}}get max(){return this.#h}get maxSize(){return this.#c}get calculatedSize(){return this.#y}get size(){return this.#n}get fetchMethod(){return this.#z}get memoMethod(){return this.#R}get dispose(){return this.#g}get onInsert(){return this.#C}get disposeAfter(){return this.#b}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:f,allowStale:l,dispose:b,onInsert:p,disposeAfter:u,noDisposeOnSet:g,noUpdateTTL:y,maxSize:_=0,maxEntrySize:w=0,sizeCalculation:S,fetchMethod:n,memoMethod:a,noDeleteOnFetchRejection:d,noDeleteOnStaleGet:c,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:v,ignoreFetchAbort:A}=t;if(e!==0&&!C(e))throw new TypeError("max option must be a nonnegative integer");let T=e?Y(e):Array;if(!T)throw new Error("invalid max value: "+e);if(this.#h=e,this.#c=_,this.maxEntrySize=w||this.#c,this.sizeCalculation=S,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=a,n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#z=n,this.#x=!!n,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new T(e),this.#u=new T(e),this.#a=0,this.#r=0,this.#m=j.create(e),this.#n=0,this.#y=0,typeof b=="function"&&(this.#g=b),typeof p=="function"&&(this.#C=p),typeof u=="function"?(this.#b=u,this.#o=[]):(this.#b=void 0,this.#o=void 0),this.#v=!!this.#g,this.#F=!!this.#C,this.#f=!!this.#b,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!d,this.allowStaleOnFetchRejection=!!m,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#c!==0&&!C(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!C(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#N();}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!c,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!f,this.ttlResolution=C(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!C(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P();}if(this.#h===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#c){let L="LRU_CACHE_UNBOUNDED";ct(L)&&(q.add(L),J("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,h));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#P(){let t=new I(this.#h),e=new I(this.#h);this.#d=t,this.#w=e,this.#H=(r,o,f=E.now())=>{if(e[r]=o!==0?f:0,t[r]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#p(r)&&this.#L(this.#i[r],"expire");},o+1);l.unref&&l.unref();}},this.#O=r=>{e[r]=t[r]!==0?E.now():0;},this.#A=(r,o)=>{if(t[o]){let f=t[o],l=e[o];if(!f||!l)return;r.ttl=f,r.start=l,r.now=i||s();let b=r.now-l;r.remainingTTL=f-b;}};let i=0,s=()=>{let r=E.now();if(this.ttlResolution>0){i=r;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref();}return r};this.getRemainingTTL=r=>{let o=this.#s.get(r);if(o===void 0)return 0;let f=t[o],l=e[o];if(!f||!l)return 1/0;let b=(i||s())-l;return f-b},this.#p=r=>{let o=e[r],f=t[r];return !!f&&!!o&&(i||s())-o>f};}#O=()=>{};#A=()=>{};#H=()=>{};#p=()=>false;#N(){let t=new I(this.#h);this.#y=0,this.#S=t,this.#E=e=>{this.#y-=t[e],t[e]=0;},this.#M=(e,i,s,r)=>{if(this.#e(i))return 0;if(!C(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!C(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#W=(e,i,s)=>{if(t[e]=i,this.#c){let r=this.#c-t[e];for(;this.#y>r;)this.#B(true);}this.#y+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#y);};}#E=t=>{};#W=(t,e,i)=>{};#M=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#r;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#a));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#r));)e=this.#l[e];}#U(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#_())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#_()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#_())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#p(e)&&(this.#L(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#w){let o=this.#d[e],f=this.#w[e];if(o&&f){let l=o-(E.now()-f);r.ttl=l,r.start=Date.now();}}return this.#S&&(r.size=this.#S[e]),r}dump(){let t=[];for(let e of this.#_({allowStale:true})){let i=this.#i[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#d&&this.#w){o.ttl=this.#d[e];let f=E.now()-this.#w[e];o.start=Math.floor(Date.now()-f);}this.#S&&(o.size=this.#S[e]),t.unshift([i,o]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=E.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:f=this.sizeCalculation,status:l}=i,{noUpdateTTL:b=this.noUpdateTTL}=i,p=this.#M(t,e,i.size||0,f);if(this.maxEntrySize&&p>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=true),this.#L(t,"set"),this;let u=this.#n===0?void 0:this.#s.get(t);if(u===void 0)u=this.#n===0?this.#r:this.#m.length!==0?this.#m.pop():this.#n===this.#h?this.#B(false):this.#n,this.#i[u]=t,this.#t[u]=e,this.#s.set(t,u),this.#l[this.#r]=u,this.#u[u]=this.#r,this.#r=u,this.#n++,this.#W(u,p,l),l&&(l.set="add"),b=false,this.#F&&this.#C?.(e,t,"add");else {this.#I(u);let g=this.#t[u];if(e!==g){if(this.#x&&this.#e(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=g;y!==void 0&&!o&&(this.#v&&this.#g?.(y,t,"set"),this.#f&&this.#o?.push([y,t,"set"]));}else o||(this.#v&&this.#g?.(g,t,"set"),this.#f&&this.#o?.push([g,t,"set"]));if(this.#E(u),this.#W(u,p,l),this.#t[u]=e,l){l.set="replace";let y=g&&this.#e(g)?g.__staleWhileFetching:g;y!==void 0&&(l.oldValue=y);}}else l&&(l.set="update");this.#F&&this.onInsert?.(e,t,e===g?"update":"replace");}if(s!==0&&!this.#d&&this.#P(),this.#d&&(b||this.#H(u,s,r),l&&this.#A(l,u)),!o&&this.#f&&this.#o){let g=this.#o,y;for(;y=g?.shift();)this.#b?.(...y);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#a];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#o){let t=this.#o,e;for(;e=t?.shift();)this.#b?.(...e);}}}#B(t){let e=this.#a,i=this.#i[e],s=this.#t[e];return this.#x&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(s,i,"evict"),this.#f&&this.#o?.push([s,i,"evict"])),this.#E(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#m.push(e)),this.#n===1?(this.#a=this.#r=0,this.#m.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#s.get(t);if(r!==void 0){let o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return false;if(this.#p(r))s&&(s.has="stale",this.#A(s,r));else return i&&this.#O(r),s&&(s.has="hit",this.#A(s,r)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#p(s))return;let r=this.#t[s];return this.#e(r)?r.__staleWhileFetching:r}#D(t,e,i,s){let r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;let o=new B,{signal:f}=i;f?.addEventListener("abort",()=>o.abort(f.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:s},b=(w,S=false)=>{let{aborted:n}=o.signal,a=i.ignoreFetchAbort&&w!==void 0;if(i.status&&(n&&!S?(i.status.fetchAborted=true,i.status.fetchError=o.signal.reason,a&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),n&&!a&&!S)return u(o.signal.reason);let d=y;return this.#t[e]===y&&(w===void 0?d.__staleWhileFetching?this.#t[e]=d.__staleWhileFetching:this.#L(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,w,l.options))),w},p=w=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=w),u(w)),u=w=>{let{aborted:S}=o.signal,n=S&&i.allowStaleOnFetchAbort,a=n||i.allowStaleOnFetchRejection,d=a||i.noDeleteOnFetchRejection,c=y;if(this.#t[e]===y&&(!d||c.__staleWhileFetching===void 0?this.#L(t,"fetch"):n||(this.#t[e]=c.__staleWhileFetching)),a)return i.status&&c.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),c.__staleWhileFetching;if(c.__returned===c)throw w},g=(w,S)=>{let n=this.#z?.(t,r,l);n&&n instanceof Promise&&n.then(a=>w(a===void 0?void 0:a),S),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(w(void 0),i.allowStaleOnFetchAbort&&(w=a=>b(a,true)));});};i.status&&(i.status.fetchDispatched=true);let y=new Promise(g).then(b,p),_=Object.assign(y,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,_,{...l.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=_,_}#e(t){if(!this.#x)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof B}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:l=0,sizeCalculation:b=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:w,forceRefresh:S=false,status:n,signal:a}=e;if(!this.#x)return n&&(n.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:n});let d={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:f,size:l,sizeCalculation:b,noUpdateTTL:p,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:_,ignoreFetchAbort:y,status:n,signal:a},c=this.#s.get(t);if(c===void 0){n&&(n.fetch="miss");let m=this.#D(t,c,d,w);return m.__returned=m}else {let m=this.#t[c];if(this.#e(m)){let O=i&&m.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",O&&(n.returnedStale=true)),O?m.__staleWhileFetching:m.__returned=m}let v=this.#p(c);if(!S&&!v)return n&&(n.fetch="hit"),this.#I(c),s&&this.#O(c),n&&this.#A(n,c),m;let A=this.#D(t,c,d,w),L=A.__staleWhileFetching!==void 0&&i;return n&&(n.fetch=v?"stale":"refresh",L&&v&&(n.returnedStale=true)),L?A.__staleWhileFetching:A.__returned=A}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...o}=e,f=this.get(t,o);if(!r&&f!==void 0)return f;let l=i(t,f,{options:o,context:s});return this.set(t,l,o),l}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,f=this.#s.get(t);if(f!==void 0){let l=this.#t[f],b=this.#e(l);return o&&this.#A(o,f),this.#p(f)?(o&&(o.get="stale"),b?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=true),i?l.__staleWhileFetching:void 0):(r||this.#L(t,"expire"),o&&i&&(o.returnedStale=true),i?l:void 0)):(o&&(o.get="hit"),b?l.__staleWhileFetching:(this.#I(f),s&&this.#O(f),l))}else o&&(o.get="miss");}#G(t,e){this.#u[e]=t,this.#l[t]=e;}#I(t){t!==this.#r&&(t===this.#a?this.#a=this.#l[t]:this.#G(this.#u[t],this.#l[t]),this.#G(this.#r,t),this.#r=t);}delete(t){return this.#L(t,"delete")}#L(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#j(e);else {this.#E(s);let r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(r,t,e),this.#f&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else {let o=this.#u[s];this.#l[o]=this.#l[s];let f=this.#l[s];this.#u[f]=this.#u[s];}this.#n--,this.#m.push(s);}}if(this.#f&&this.#o?.length){let s=this.#o,r;for(;r=s?.shift();)this.#b?.(...r);}return i}clear(){return this.#j("delete")}#j(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#v&&this.#g?.(i,s,t),this.#f&&this.#o?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#S&&this.#S.fill(0),this.#a=0,this.#r=0,this.#m.length=0,this.#y=0,this.#n=0,this.#f&&this.#o){let e=this.#o,i;for(;i=e?.shift();)this.#b?.(...i);}}};var z=class{cache;map=new Map;constructor(t){this.cache=new D({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}keys(){return this.map.keys()}get values(){return this.map.values}};var R=new z({cacheSize:10}),X;(s=>{function h(r){let o=R.get(r);if(!o){x.error(`Label "${r}" not found`);return}return o}s.get=h;function t(r){if(Array.isArray(r)){r.forEach(o=>t(o));return}R.has(r.id)&&x.info(`Label "${r.id}" already exists, it will be overwritten`),R.set(r.id,r);}s.add=t;function e(){return Array.from(R.values())}s.values=e;function i(r){return R.has(r)}s.has=i;})(X||={});var Q=X;var st=ft(it());var F=class{constructor(t,e){this._id=t,this._onStepStart=e?.onStepStart,this._onLoadingLabel=e?.onLoadingLabel,this._onStepEnd=e?.onStepEnd;}_id;get id(){return this._id}_onStepStart;get onStepStart(){return async(t,e)=>{if(this._onLoadingLabel&&t===0&&await this._onLoadingLabel(t,e),this._onStepStart)return await this._onStepStart(t,e)}}_onLoadingLabel;get onLoadingLabel(){return this._onLoadingLabel}_onStepEnd;get onStepEnd(){return this._onStepEnd}};var W=class extends F{get stepCount(){return this.steps.length}getStepById(t){return this.steps[t]}constructor(t,e,i){super(t,i),this._steps=e;}_steps;get steps(){return typeof this._steps=="function"?this._steps():this._steps}getStepSha(t){if(t<0||t>=this.steps.length)return x.warn("stepSha not found, setting to ERROR"),"error";try{let e=this.steps[t];return (0,st.default)(e.toString().toLocaleLowerCase()).toString()}catch(e){return x.warn("stepSha not found, setting to ERROR",e),"error"}}};var ut="__close-label-id__";function N(){return new W(ut,[],{})}var V=class{text;_label;get label(){let t=this._label;if(typeof t=="string"){let e=Q.get(t);e?t=e:(x.error(`Label ${t} not found, so it will be closed`),t=N());}return t}type;oneTime;onlyHaveNoChoice;autoSelect;props={};devProps={};constructor(t,e,i,s){let{type:r="call",oneTime:o=false,onlyHaveNoChoice:f=false,autoSelect:l=false,...b}=s||{};this.text=t,this._label=e,this.type=r,this.oneTime=o,this.onlyHaveNoChoice=f,this.autoSelect=l,this.devProps=b,this.props=i;}};function Mt(h,t,e,i){let s=typeof t=="string"?t:t.id;return {...i,label:s,props:e,text:h,type:i?.type||"call"}}export{V as default,Mt as newChoiceOption};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var z=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,G=new Set,I=typeof process=="object"&&process?process:{},N=(l,t,e,i)=>{typeof I.emitWarning=="function"?I.emitWarning(l,t,e,i):console.error(`[${e}] ${t}: ${l}`);},C=globalThis.AbortController,U=globalThis.AbortSignal;if(typeof C>"u"){U=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},C=class{constructor(){t();}signal=new U;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let l=I.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=false,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",t));};}var P=l=>!G.has(l),_=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),V=l=>_(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?E:null:null,E=class extends Array{constructor(t){super(t),this.fill(0);}},M=class l{heap;length;static#a=false;static create(t){let e=V(t);if(!e)return [];l.#a=true;let i=new l(t,e);return l.#a=false,i}constructor(t,e){if(!l.#a)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]}},R=class l{#a;#c;#p;#O;#m;#C;#R;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#w;#s;#i;#t;#l;#u;#o;#h;#b;#r;#y;#S;#d;#_;#E;#f;#W;static unsafeExposeInternals(t){return {starts:t.#S,ttls:t.#d,sizes:t.#y,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#o},get tail(){return t.#h},free:t.#b,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#M(e,i,s,n),moveToTail:e=>t.#L(e),indexes:e=>t.#A(e),rindexes:e=>t.#T(e),isStale:e=>t.#g(e)}}get max(){return this.#a}get maxSize(){return this.#c}get calculatedSize(){return this.#w}get size(){return this.#n}get fetchMethod(){return this.#C}get memoMethod(){return this.#R}get dispose(){return this.#p}get onInsert(){return this.#O}get disposeAfter(){return this.#m}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,onInsert:b,disposeAfter:f,noDisposeOnSet:c,noUpdateTTL:u,maxSize:A=0,maxEntrySize:d=0,sizeCalculation:y,fetchMethod:a,memoMethod:m,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:p,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:v,ignoreFetchAbort:T}=t;if(e!==0&&!_(e))throw new TypeError("max option must be a nonnegative integer");let L=e?V(e):Array;if(!L)throw new Error("invalid max value: "+e);if(this.#a=e,this.#c=A,this.maxEntrySize=d||this.#c,this.sizeCalculation=y,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(m!==void 0&&typeof m!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=m,a!==void 0&&typeof a!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=a,this.#E=!!a,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new L(e),this.#u=new L(e),this.#o=0,this.#h=0,this.#b=M.create(e),this.#n=0,this.#w=0,typeof g=="function"&&(this.#p=g),typeof b=="function"&&(this.#O=b),typeof f=="function"?(this.#m=f,this.#r=[]):(this.#m=void 0,this.#r=void 0),this.#_=!!this.#p,this.#W=!!this.#O,this.#f=!!this.#m,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#c!==0&&!_(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!_(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H();}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!p,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=_(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!_(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U();}if(this.#a===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#c){let F="LRU_CACHE_UNBOUNDED";P(F)&&(G.add(F),N("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,l));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#U(){let t=new E(this.#a),e=new E(this.#a);this.#d=t,this.#S=e,this.#G=(n,h,o=z.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#g(n)&&this.#F(this.#i[n],"expire");},h+1);r.unref&&r.unref();}},this.#v=n=>{e[n]=t[n]!==0?z.now():0;},this.#z=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g;}};let i=0,s=()=>{let n=z.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref();}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#g=n=>{let h=e[n],o=t[n];return !!o&&!!h&&(i||s())-h>o};}#v=()=>{};#z=()=>{};#G=()=>{};#g=()=>false;#H(){let t=new E(this.#a);this.#w=0,this.#y=t,this.#x=e=>{this.#w-=t[e],t[e]=0;},this.#N=(e,i,s,n)=>{if(this.#e(i))return 0;if(!_(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!_(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#D=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#w>n;)this.#I(true);}this.#w+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#w);};}#x=t=>{};#D=(t,e,i)=>{};#N=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#V(e)||((t||!this.#g(e))&&(yield e),e===this.#o));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#V(e)||((t||!this.#g(e))&&(yield e),e===this.#h));)e=this.#l[e];}#V(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#g(e)&&(this.#F(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#S){let h=this.#d[e],o=this.#S[e];if(h&&o){let r=h-(z.now()-o);n.ttl=r,n.start=Date.now();}}return this.#y&&(n.size=this.#y[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:true})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#d&&this.#S){h.ttl=this.#d[e];let o=z.now()-this.#S[e];h.start=Math.floor(Date.now()-o);}this.#y&&(h.size=this.#y[e]),t.unshift([i,h]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=z.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,b=this.#N(t,e,i.size||0,o);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=true),this.#F(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#b.length!==0?this.#b.pop():this.#n===this.#a?this.#I(false):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#u[f]=this.#h,this.#h=f,this.#n++,this.#D(f,b,r),r&&(r.set="add"),g=false,this.#W&&this.#O?.(e,t,"add");else {this.#L(f);let c=this.#t[f];if(e!==c){if(this.#E&&this.#e(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=c;u!==void 0&&!h&&(this.#_&&this.#p?.(u,t,"set"),this.#f&&this.#r?.push([u,t,"set"]));}else h||(this.#_&&this.#p?.(c,t,"set"),this.#f&&this.#r?.push([c,t,"set"]));if(this.#x(f),this.#D(f,b,r),this.#t[f]=e,r){r.set="replace";let u=c&&this.#e(c)?c.__staleWhileFetching:c;u!==void 0&&(r.oldValue=u);}}else r&&(r.set="update");this.#W&&this.onInsert?.(e,t,e===c?"update":"replace");}if(s!==0&&!this.#d&&this.#U(),this.#d&&(g||this.#G(f,s,n),r&&this.#z(r,f)),!h&&this.#f&&this.#r){let c=this.#r,u;for(;u=c?.shift();)this.#m?.(...u);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#I(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#m?.(...e);}}}#I(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#E&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#_||this.#f)&&(this.#_&&this.#p?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#x(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#b.push(e)),this.#n===1?(this.#o=this.#h=0,this.#b.length=0):this.#o=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return false;if(this.#g(n))s&&(s.has="stale",this.#z(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#z(s,n)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#g(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#M(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new C,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,y=false)=>{let{aborted:a}=h.signal,m=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(a&&!y?(i.status.fetchAborted=true,i.status.fetchError=h.signal.reason,m&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),a&&!m&&!y)return f(h.signal.reason);let S=u;return this.#t[e]===u&&(d===void 0?S.__staleWhileFetching?this.#t[e]=S.__staleWhileFetching:this.#F(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,d,r.options))),d},b=d=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=d),f(d)),f=d=>{let{aborted:y}=h.signal,a=y&&i.allowStaleOnFetchAbort,m=a||i.allowStaleOnFetchRejection,S=m||i.noDeleteOnFetchRejection,p=u;if(this.#t[e]===u&&(!S||p.__staleWhileFetching===void 0?this.#F(t,"fetch"):a||(this.#t[e]=p.__staleWhileFetching)),m)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),p.__staleWhileFetching;if(p.__returned===p)throw d},c=(d,y)=>{let a=this.#C?.(t,n,r);a&&a instanceof Promise&&a.then(m=>d(m===void 0?void 0:m),y),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=m=>g(m,true)));});};i.status&&(i.status.fetchDispatched=true);let u=new Promise(c).then(g,b),A=Object.assign(u,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,A,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=A,A}#e(t){if(!this.#E)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof C}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:d,forceRefresh:y=false,status:a,signal:m}=e;if(!this.#E)return a&&(a.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let S={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:A,ignoreFetchAbort:u,status:a,signal:m},p=this.#s.get(t);if(p===void 0){a&&(a.fetch="miss");let w=this.#M(t,p,S,d);return w.__returned=w}else {let w=this.#t[p];if(this.#e(w)){let D=i&&w.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",D&&(a.returnedStale=true)),D?w.__staleWhileFetching:w.__returned=w}let v=this.#g(p);if(!y&&!v)return a&&(a.fetch="hit"),this.#L(p),s&&this.#v(p),a&&this.#z(a,p),w;let T=this.#M(t,p,S,d),F=T.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=v?"stale":"refresh",F&&v&&(a.returnedStale=true)),F?T.__staleWhileFetching:T.__returned=T}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#z(h,o),this.#g(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=true),i?r.__staleWhileFetching:void 0):(n||this.#F(t,"expire"),h&&i&&(h.returnedStale=true),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#L(o),s&&this.#v(o),r))}else h&&(h.get="miss");}#j(t,e){this.#u[e]=t,this.#l[t]=e;}#L(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#j(this.#u[t],this.#l[t]),this.#j(this.#h,t),this.#h=t);}delete(t){return this.#F(t,"delete")}#F(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#P(e);else {this.#x(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#o)this.#o=this.#l[s];else {let h=this.#u[s];this.#l[h]=this.#l[s];let o=this.#l[s];this.#u[o]=this.#u[s];}this.#n--,this.#b.push(s);}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#m?.(...n);}return i}clear(){return this.#P("delete")}#P(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#_&&this.#p?.(i,s,t),this.#f&&this.#r?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#S&&(this.#d.fill(0),this.#S.fill(0)),this.#y&&this.#y.fill(0),this.#o=0,this.#h=0,this.#b.length=0,this.#w=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#m?.(...i);}}};var O=class{cache;map=new Map;constructor(t){this.cache=new R({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}get keys(){return this.map.keys}get values(){return this.map.values}};var W;(s=>(s.log=(n,...h)=>console.log(`[Pixi\u2019VN] ${n}`,...h),s.warn=(n,...h)=>console.warn(`[Pixi\u2019VN] ${n}`,...h),s.error=(n,...h)=>console.error(`[Pixi\u2019VN] ${n}`,...h),s.info=(n,...h)=>console.info(`[Pixi\u2019VN] ${n}`,...h)))(W||={});var x=new O({cacheSize:10}),j;(s=>{function l(n){let h=x.get(n);if(!h){W.error(`Label "${n}" not found`);return}return h}s.get=l;function t(n){if(Array.isArray(n)){n.forEach(h=>t(h));return}x.has(n.id)&&W.info(`Label "${n.id}" already exists, it will be overwritten`),x.set(n.id,n);}s.add=t;function e(){return Array.from(x.values())}s.values=e;function i(n){return x.has(n)}s.has=i;})(j||={});var tt=j;module.exports=tt;
|
|
1
|
+
'use strict';var z=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,G=new Set,I=typeof process=="object"&&process?process:{},N=(l,t,e,i)=>{typeof I.emitWarning=="function"?I.emitWarning(l,t,e,i):console.error(`[${e}] ${t}: ${l}`);},C=globalThis.AbortController,U=globalThis.AbortSignal;if(typeof C>"u"){U=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},C=class{constructor(){t();}signal=new U;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let l=I.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=false,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",t));};}var P=l=>!G.has(l),_=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),V=l=>_(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?E:null:null,E=class extends Array{constructor(t){super(t),this.fill(0);}},M=class l{heap;length;static#a=false;static create(t){let e=V(t);if(!e)return [];l.#a=true;let i=new l(t,e);return l.#a=false,i}constructor(t,e){if(!l.#a)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]}},R=class l{#a;#c;#p;#O;#m;#C;#R;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#w;#s;#i;#t;#l;#u;#o;#h;#b;#r;#y;#S;#d;#_;#E;#f;#W;static unsafeExposeInternals(t){return {starts:t.#S,ttls:t.#d,sizes:t.#y,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#o},get tail(){return t.#h},free:t.#b,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#M(e,i,s,n),moveToTail:e=>t.#L(e),indexes:e=>t.#A(e),rindexes:e=>t.#T(e),isStale:e=>t.#g(e)}}get max(){return this.#a}get maxSize(){return this.#c}get calculatedSize(){return this.#w}get size(){return this.#n}get fetchMethod(){return this.#C}get memoMethod(){return this.#R}get dispose(){return this.#p}get onInsert(){return this.#O}get disposeAfter(){return this.#m}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,onInsert:b,disposeAfter:f,noDisposeOnSet:c,noUpdateTTL:u,maxSize:A=0,maxEntrySize:d=0,sizeCalculation:y,fetchMethod:a,memoMethod:m,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:p,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:v,ignoreFetchAbort:T}=t;if(e!==0&&!_(e))throw new TypeError("max option must be a nonnegative integer");let L=e?V(e):Array;if(!L)throw new Error("invalid max value: "+e);if(this.#a=e,this.#c=A,this.maxEntrySize=d||this.#c,this.sizeCalculation=y,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(m!==void 0&&typeof m!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=m,a!==void 0&&typeof a!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=a,this.#E=!!a,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new L(e),this.#u=new L(e),this.#o=0,this.#h=0,this.#b=M.create(e),this.#n=0,this.#w=0,typeof g=="function"&&(this.#p=g),typeof b=="function"&&(this.#O=b),typeof f=="function"?(this.#m=f,this.#r=[]):(this.#m=void 0,this.#r=void 0),this.#_=!!this.#p,this.#W=!!this.#O,this.#f=!!this.#m,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#c!==0&&!_(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!_(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H();}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!p,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=_(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!_(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U();}if(this.#a===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#c){let F="LRU_CACHE_UNBOUNDED";P(F)&&(G.add(F),N("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,l));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#U(){let t=new E(this.#a),e=new E(this.#a);this.#d=t,this.#S=e,this.#G=(n,h,o=z.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#g(n)&&this.#F(this.#i[n],"expire");},h+1);r.unref&&r.unref();}},this.#v=n=>{e[n]=t[n]!==0?z.now():0;},this.#z=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g;}};let i=0,s=()=>{let n=z.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref();}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#g=n=>{let h=e[n],o=t[n];return !!o&&!!h&&(i||s())-h>o};}#v=()=>{};#z=()=>{};#G=()=>{};#g=()=>false;#H(){let t=new E(this.#a);this.#w=0,this.#y=t,this.#x=e=>{this.#w-=t[e],t[e]=0;},this.#N=(e,i,s,n)=>{if(this.#e(i))return 0;if(!_(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!_(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#D=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#w>n;)this.#I(true);}this.#w+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#w);};}#x=t=>{};#D=(t,e,i)=>{};#N=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#V(e)||((t||!this.#g(e))&&(yield e),e===this.#o));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#V(e)||((t||!this.#g(e))&&(yield e),e===this.#h));)e=this.#l[e];}#V(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#g(e)&&(this.#F(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#S){let h=this.#d[e],o=this.#S[e];if(h&&o){let r=h-(z.now()-o);n.ttl=r,n.start=Date.now();}}return this.#y&&(n.size=this.#y[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:true})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#d&&this.#S){h.ttl=this.#d[e];let o=z.now()-this.#S[e];h.start=Math.floor(Date.now()-o);}this.#y&&(h.size=this.#y[e]),t.unshift([i,h]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=z.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,b=this.#N(t,e,i.size||0,o);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=true),this.#F(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#b.length!==0?this.#b.pop():this.#n===this.#a?this.#I(false):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#u[f]=this.#h,this.#h=f,this.#n++,this.#D(f,b,r),r&&(r.set="add"),g=false,this.#W&&this.#O?.(e,t,"add");else {this.#L(f);let c=this.#t[f];if(e!==c){if(this.#E&&this.#e(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=c;u!==void 0&&!h&&(this.#_&&this.#p?.(u,t,"set"),this.#f&&this.#r?.push([u,t,"set"]));}else h||(this.#_&&this.#p?.(c,t,"set"),this.#f&&this.#r?.push([c,t,"set"]));if(this.#x(f),this.#D(f,b,r),this.#t[f]=e,r){r.set="replace";let u=c&&this.#e(c)?c.__staleWhileFetching:c;u!==void 0&&(r.oldValue=u);}}else r&&(r.set="update");this.#W&&this.onInsert?.(e,t,e===c?"update":"replace");}if(s!==0&&!this.#d&&this.#U(),this.#d&&(g||this.#G(f,s,n),r&&this.#z(r,f)),!h&&this.#f&&this.#r){let c=this.#r,u;for(;u=c?.shift();)this.#m?.(...u);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#I(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#m?.(...e);}}}#I(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#E&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#_||this.#f)&&(this.#_&&this.#p?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#x(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#b.push(e)),this.#n===1?(this.#o=this.#h=0,this.#b.length=0):this.#o=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return false;if(this.#g(n))s&&(s.has="stale",this.#z(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#z(s,n)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#g(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#M(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new C,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,y=false)=>{let{aborted:a}=h.signal,m=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(a&&!y?(i.status.fetchAborted=true,i.status.fetchError=h.signal.reason,m&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),a&&!m&&!y)return f(h.signal.reason);let S=u;return this.#t[e]===u&&(d===void 0?S.__staleWhileFetching?this.#t[e]=S.__staleWhileFetching:this.#F(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,d,r.options))),d},b=d=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=d),f(d)),f=d=>{let{aborted:y}=h.signal,a=y&&i.allowStaleOnFetchAbort,m=a||i.allowStaleOnFetchRejection,S=m||i.noDeleteOnFetchRejection,p=u;if(this.#t[e]===u&&(!S||p.__staleWhileFetching===void 0?this.#F(t,"fetch"):a||(this.#t[e]=p.__staleWhileFetching)),m)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),p.__staleWhileFetching;if(p.__returned===p)throw d},c=(d,y)=>{let a=this.#C?.(t,n,r);a&&a instanceof Promise&&a.then(m=>d(m===void 0?void 0:m),y),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=m=>g(m,true)));});};i.status&&(i.status.fetchDispatched=true);let u=new Promise(c).then(g,b),A=Object.assign(u,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,A,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=A,A}#e(t){if(!this.#E)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof C}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:d,forceRefresh:y=false,status:a,signal:m}=e;if(!this.#E)return a&&(a.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let S={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:A,ignoreFetchAbort:u,status:a,signal:m},p=this.#s.get(t);if(p===void 0){a&&(a.fetch="miss");let w=this.#M(t,p,S,d);return w.__returned=w}else {let w=this.#t[p];if(this.#e(w)){let D=i&&w.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",D&&(a.returnedStale=true)),D?w.__staleWhileFetching:w.__returned=w}let v=this.#g(p);if(!y&&!v)return a&&(a.fetch="hit"),this.#L(p),s&&this.#v(p),a&&this.#z(a,p),w;let T=this.#M(t,p,S,d),F=T.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=v?"stale":"refresh",F&&v&&(a.returnedStale=true)),F?T.__staleWhileFetching:T.__returned=T}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#z(h,o),this.#g(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=true),i?r.__staleWhileFetching:void 0):(n||this.#F(t,"expire"),h&&i&&(h.returnedStale=true),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#L(o),s&&this.#v(o),r))}else h&&(h.get="miss");}#j(t,e){this.#u[e]=t,this.#l[t]=e;}#L(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#j(this.#u[t],this.#l[t]),this.#j(this.#h,t),this.#h=t);}delete(t){return this.#F(t,"delete")}#F(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#P(e);else {this.#x(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#o)this.#o=this.#l[s];else {let h=this.#u[s];this.#l[h]=this.#l[s];let o=this.#l[s];this.#u[o]=this.#u[s];}this.#n--,this.#b.push(s);}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#m?.(...n);}return i}clear(){return this.#P("delete")}#P(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#_&&this.#p?.(i,s,t),this.#f&&this.#r?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#S&&(this.#d.fill(0),this.#S.fill(0)),this.#y&&this.#y.fill(0),this.#o=0,this.#h=0,this.#b.length=0,this.#w=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#m?.(...i);}}};var O=class{cache;map=new Map;constructor(t){this.cache=new R({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}keys(){return this.map.keys()}get values(){return this.map.values}};var W;(s=>(s.log=(n,...h)=>console.log(`[Pixi\u2019VN] ${n}`,...h),s.warn=(n,...h)=>console.warn(`[Pixi\u2019VN] ${n}`,...h),s.error=(n,...h)=>console.error(`[Pixi\u2019VN] ${n}`,...h),s.info=(n,...h)=>console.info(`[Pixi\u2019VN] ${n}`,...h)))(W||={});var x=new O({cacheSize:10}),j;(s=>{function l(n){let h=x.get(n);if(!h){W.error(`Label "${n}" not found`);return}return h}s.get=l;function t(n){if(Array.isArray(n)){n.forEach(h=>t(h));return}x.has(n.id)&&W.info(`Label "${n.id}" already exists, it will be overwritten`),x.set(n.id,n);}s.add=t;function e(){return Array.from(x.values())}s.values=e;function i(n){return x.has(n)}s.has=i;})(j||={});var tt=j;module.exports=tt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var z=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,G=new Set,I=typeof process=="object"&&process?process:{},N=(l,t,e,i)=>{typeof I.emitWarning=="function"?I.emitWarning(l,t,e,i):console.error(`[${e}] ${t}: ${l}`);},C=globalThis.AbortController,U=globalThis.AbortSignal;if(typeof C>"u"){U=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},C=class{constructor(){t();}signal=new U;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let l=I.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=false,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",t));};}var P=l=>!G.has(l),_=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),V=l=>_(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?E:null:null,E=class extends Array{constructor(t){super(t),this.fill(0);}},M=class l{heap;length;static#a=false;static create(t){let e=V(t);if(!e)return [];l.#a=true;let i=new l(t,e);return l.#a=false,i}constructor(t,e){if(!l.#a)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]}},R=class l{#a;#c;#p;#O;#m;#C;#R;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#w;#s;#i;#t;#l;#u;#o;#h;#b;#r;#y;#S;#d;#_;#E;#f;#W;static unsafeExposeInternals(t){return {starts:t.#S,ttls:t.#d,sizes:t.#y,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#o},get tail(){return t.#h},free:t.#b,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#M(e,i,s,n),moveToTail:e=>t.#L(e),indexes:e=>t.#A(e),rindexes:e=>t.#T(e),isStale:e=>t.#g(e)}}get max(){return this.#a}get maxSize(){return this.#c}get calculatedSize(){return this.#w}get size(){return this.#n}get fetchMethod(){return this.#C}get memoMethod(){return this.#R}get dispose(){return this.#p}get onInsert(){return this.#O}get disposeAfter(){return this.#m}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,onInsert:b,disposeAfter:f,noDisposeOnSet:c,noUpdateTTL:u,maxSize:A=0,maxEntrySize:d=0,sizeCalculation:y,fetchMethod:a,memoMethod:m,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:p,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:v,ignoreFetchAbort:T}=t;if(e!==0&&!_(e))throw new TypeError("max option must be a nonnegative integer");let L=e?V(e):Array;if(!L)throw new Error("invalid max value: "+e);if(this.#a=e,this.#c=A,this.maxEntrySize=d||this.#c,this.sizeCalculation=y,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(m!==void 0&&typeof m!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=m,a!==void 0&&typeof a!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=a,this.#E=!!a,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new L(e),this.#u=new L(e),this.#o=0,this.#h=0,this.#b=M.create(e),this.#n=0,this.#w=0,typeof g=="function"&&(this.#p=g),typeof b=="function"&&(this.#O=b),typeof f=="function"?(this.#m=f,this.#r=[]):(this.#m=void 0,this.#r=void 0),this.#_=!!this.#p,this.#W=!!this.#O,this.#f=!!this.#m,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#c!==0&&!_(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!_(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H();}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!p,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=_(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!_(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U();}if(this.#a===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#c){let F="LRU_CACHE_UNBOUNDED";P(F)&&(G.add(F),N("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,l));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#U(){let t=new E(this.#a),e=new E(this.#a);this.#d=t,this.#S=e,this.#G=(n,h,o=z.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#g(n)&&this.#F(this.#i[n],"expire");},h+1);r.unref&&r.unref();}},this.#v=n=>{e[n]=t[n]!==0?z.now():0;},this.#z=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g;}};let i=0,s=()=>{let n=z.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref();}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#g=n=>{let h=e[n],o=t[n];return !!o&&!!h&&(i||s())-h>o};}#v=()=>{};#z=()=>{};#G=()=>{};#g=()=>false;#H(){let t=new E(this.#a);this.#w=0,this.#y=t,this.#x=e=>{this.#w-=t[e],t[e]=0;},this.#N=(e,i,s,n)=>{if(this.#e(i))return 0;if(!_(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!_(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#D=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#w>n;)this.#I(true);}this.#w+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#w);};}#x=t=>{};#D=(t,e,i)=>{};#N=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#V(e)||((t||!this.#g(e))&&(yield e),e===this.#o));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#V(e)||((t||!this.#g(e))&&(yield e),e===this.#h));)e=this.#l[e];}#V(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#g(e)&&(this.#F(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#S){let h=this.#d[e],o=this.#S[e];if(h&&o){let r=h-(z.now()-o);n.ttl=r,n.start=Date.now();}}return this.#y&&(n.size=this.#y[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:true})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#d&&this.#S){h.ttl=this.#d[e];let o=z.now()-this.#S[e];h.start=Math.floor(Date.now()-o);}this.#y&&(h.size=this.#y[e]),t.unshift([i,h]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=z.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,b=this.#N(t,e,i.size||0,o);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=true),this.#F(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#b.length!==0?this.#b.pop():this.#n===this.#a?this.#I(false):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#u[f]=this.#h,this.#h=f,this.#n++,this.#D(f,b,r),r&&(r.set="add"),g=false,this.#W&&this.#O?.(e,t,"add");else {this.#L(f);let c=this.#t[f];if(e!==c){if(this.#E&&this.#e(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=c;u!==void 0&&!h&&(this.#_&&this.#p?.(u,t,"set"),this.#f&&this.#r?.push([u,t,"set"]));}else h||(this.#_&&this.#p?.(c,t,"set"),this.#f&&this.#r?.push([c,t,"set"]));if(this.#x(f),this.#D(f,b,r),this.#t[f]=e,r){r.set="replace";let u=c&&this.#e(c)?c.__staleWhileFetching:c;u!==void 0&&(r.oldValue=u);}}else r&&(r.set="update");this.#W&&this.onInsert?.(e,t,e===c?"update":"replace");}if(s!==0&&!this.#d&&this.#U(),this.#d&&(g||this.#G(f,s,n),r&&this.#z(r,f)),!h&&this.#f&&this.#r){let c=this.#r,u;for(;u=c?.shift();)this.#m?.(...u);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#I(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#m?.(...e);}}}#I(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#E&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#_||this.#f)&&(this.#_&&this.#p?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#x(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#b.push(e)),this.#n===1?(this.#o=this.#h=0,this.#b.length=0):this.#o=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return false;if(this.#g(n))s&&(s.has="stale",this.#z(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#z(s,n)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#g(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#M(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new C,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,y=false)=>{let{aborted:a}=h.signal,m=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(a&&!y?(i.status.fetchAborted=true,i.status.fetchError=h.signal.reason,m&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),a&&!m&&!y)return f(h.signal.reason);let S=u;return this.#t[e]===u&&(d===void 0?S.__staleWhileFetching?this.#t[e]=S.__staleWhileFetching:this.#F(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,d,r.options))),d},b=d=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=d),f(d)),f=d=>{let{aborted:y}=h.signal,a=y&&i.allowStaleOnFetchAbort,m=a||i.allowStaleOnFetchRejection,S=m||i.noDeleteOnFetchRejection,p=u;if(this.#t[e]===u&&(!S||p.__staleWhileFetching===void 0?this.#F(t,"fetch"):a||(this.#t[e]=p.__staleWhileFetching)),m)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),p.__staleWhileFetching;if(p.__returned===p)throw d},c=(d,y)=>{let a=this.#C?.(t,n,r);a&&a instanceof Promise&&a.then(m=>d(m===void 0?void 0:m),y),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=m=>g(m,true)));});};i.status&&(i.status.fetchDispatched=true);let u=new Promise(c).then(g,b),A=Object.assign(u,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,A,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=A,A}#e(t){if(!this.#E)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof C}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:d,forceRefresh:y=false,status:a,signal:m}=e;if(!this.#E)return a&&(a.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let S={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:A,ignoreFetchAbort:u,status:a,signal:m},p=this.#s.get(t);if(p===void 0){a&&(a.fetch="miss");let w=this.#M(t,p,S,d);return w.__returned=w}else {let w=this.#t[p];if(this.#e(w)){let D=i&&w.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",D&&(a.returnedStale=true)),D?w.__staleWhileFetching:w.__returned=w}let v=this.#g(p);if(!y&&!v)return a&&(a.fetch="hit"),this.#L(p),s&&this.#v(p),a&&this.#z(a,p),w;let T=this.#M(t,p,S,d),F=T.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=v?"stale":"refresh",F&&v&&(a.returnedStale=true)),F?T.__staleWhileFetching:T.__returned=T}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#z(h,o),this.#g(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=true),i?r.__staleWhileFetching:void 0):(n||this.#F(t,"expire"),h&&i&&(h.returnedStale=true),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#L(o),s&&this.#v(o),r))}else h&&(h.get="miss");}#j(t,e){this.#u[e]=t,this.#l[t]=e;}#L(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#j(this.#u[t],this.#l[t]),this.#j(this.#h,t),this.#h=t);}delete(t){return this.#F(t,"delete")}#F(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#P(e);else {this.#x(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#o)this.#o=this.#l[s];else {let h=this.#u[s];this.#l[h]=this.#l[s];let o=this.#l[s];this.#u[o]=this.#u[s];}this.#n--,this.#b.push(s);}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#m?.(...n);}return i}clear(){return this.#P("delete")}#P(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#_&&this.#p?.(i,s,t),this.#f&&this.#r?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#S&&(this.#d.fill(0),this.#S.fill(0)),this.#y&&this.#y.fill(0),this.#o=0,this.#h=0,this.#b.length=0,this.#w=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#m?.(...i);}}};var O=class{cache;map=new Map;constructor(t){this.cache=new R({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}get keys(){return this.map.keys}get values(){return this.map.values}};var W;(s=>(s.log=(n,...h)=>console.log(`[Pixi\u2019VN] ${n}`,...h),s.warn=(n,...h)=>console.warn(`[Pixi\u2019VN] ${n}`,...h),s.error=(n,...h)=>console.error(`[Pixi\u2019VN] ${n}`,...h),s.info=(n,...h)=>console.info(`[Pixi\u2019VN] ${n}`,...h)))(W||={});var x=new O({cacheSize:10}),j;(s=>{function l(n){let h=x.get(n);if(!h){W.error(`Label "${n}" not found`);return}return h}s.get=l;function t(n){if(Array.isArray(n)){n.forEach(h=>t(h));return}x.has(n.id)&&W.info(`Label "${n.id}" already exists, it will be overwritten`),x.set(n.id,n);}s.add=t;function e(){return Array.from(x.values())}s.values=e;function i(n){return x.has(n)}s.has=i;})(j||={});var tt=j;export{tt as default};
|
|
1
|
+
var z=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,G=new Set,I=typeof process=="object"&&process?process:{},N=(l,t,e,i)=>{typeof I.emitWarning=="function"?I.emitWarning(l,t,e,i):console.error(`[${e}] ${t}: ${l}`);},C=globalThis.AbortController,U=globalThis.AbortSignal;if(typeof C>"u"){U=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},C=class{constructor(){t();}signal=new U;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let l=I.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=false,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",t));};}var P=l=>!G.has(l),_=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),V=l=>_(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?E:null:null,E=class extends Array{constructor(t){super(t),this.fill(0);}},M=class l{heap;length;static#a=false;static create(t){let e=V(t);if(!e)return [];l.#a=true;let i=new l(t,e);return l.#a=false,i}constructor(t,e){if(!l.#a)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]}},R=class l{#a;#c;#p;#O;#m;#C;#R;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#w;#s;#i;#t;#l;#u;#o;#h;#b;#r;#y;#S;#d;#_;#E;#f;#W;static unsafeExposeInternals(t){return {starts:t.#S,ttls:t.#d,sizes:t.#y,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#o},get tail(){return t.#h},free:t.#b,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#M(e,i,s,n),moveToTail:e=>t.#L(e),indexes:e=>t.#A(e),rindexes:e=>t.#T(e),isStale:e=>t.#g(e)}}get max(){return this.#a}get maxSize(){return this.#c}get calculatedSize(){return this.#w}get size(){return this.#n}get fetchMethod(){return this.#C}get memoMethod(){return this.#R}get dispose(){return this.#p}get onInsert(){return this.#O}get disposeAfter(){return this.#m}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,onInsert:b,disposeAfter:f,noDisposeOnSet:c,noUpdateTTL:u,maxSize:A=0,maxEntrySize:d=0,sizeCalculation:y,fetchMethod:a,memoMethod:m,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:p,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:v,ignoreFetchAbort:T}=t;if(e!==0&&!_(e))throw new TypeError("max option must be a nonnegative integer");let L=e?V(e):Array;if(!L)throw new Error("invalid max value: "+e);if(this.#a=e,this.#c=A,this.maxEntrySize=d||this.#c,this.sizeCalculation=y,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(m!==void 0&&typeof m!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=m,a!==void 0&&typeof a!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=a,this.#E=!!a,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new L(e),this.#u=new L(e),this.#o=0,this.#h=0,this.#b=M.create(e),this.#n=0,this.#w=0,typeof g=="function"&&(this.#p=g),typeof b=="function"&&(this.#O=b),typeof f=="function"?(this.#m=f,this.#r=[]):(this.#m=void 0,this.#r=void 0),this.#_=!!this.#p,this.#W=!!this.#O,this.#f=!!this.#m,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#c!==0&&!_(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!_(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H();}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!p,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=_(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!_(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U();}if(this.#a===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#a&&!this.#c){let F="LRU_CACHE_UNBOUNDED";P(F)&&(G.add(F),N("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,l));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#U(){let t=new E(this.#a),e=new E(this.#a);this.#d=t,this.#S=e,this.#G=(n,h,o=z.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#g(n)&&this.#F(this.#i[n],"expire");},h+1);r.unref&&r.unref();}},this.#v=n=>{e[n]=t[n]!==0?z.now():0;},this.#z=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g;}};let i=0,s=()=>{let n=z.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref();}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#g=n=>{let h=e[n],o=t[n];return !!o&&!!h&&(i||s())-h>o};}#v=()=>{};#z=()=>{};#G=()=>{};#g=()=>false;#H(){let t=new E(this.#a);this.#w=0,this.#y=t,this.#x=e=>{this.#w-=t[e],t[e]=0;},this.#N=(e,i,s,n)=>{if(this.#e(i))return 0;if(!_(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!_(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#D=(e,i,s)=>{if(t[e]=i,this.#c){let n=this.#c-t[e];for(;this.#w>n;)this.#I(true);}this.#w+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#w);};}#x=t=>{};#D=(t,e,i)=>{};#N=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#V(e)||((t||!this.#g(e))&&(yield e),e===this.#o));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#V(e)||((t||!this.#g(e))&&(yield e),e===this.#h));)e=this.#l[e];}#V(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#g(e)&&(this.#F(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#S){let h=this.#d[e],o=this.#S[e];if(h&&o){let r=h-(z.now()-o);n.ttl=r,n.start=Date.now();}}return this.#y&&(n.size=this.#y[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:true})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#d&&this.#S){h.ttl=this.#d[e];let o=z.now()-this.#S[e];h.start=Math.floor(Date.now()-o);}this.#y&&(h.size=this.#y[e]),t.unshift([i,h]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=z.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,b=this.#N(t,e,i.size||0,o);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=true),this.#F(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#b.length!==0?this.#b.pop():this.#n===this.#a?this.#I(false):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#u[f]=this.#h,this.#h=f,this.#n++,this.#D(f,b,r),r&&(r.set="add"),g=false,this.#W&&this.#O?.(e,t,"add");else {this.#L(f);let c=this.#t[f];if(e!==c){if(this.#E&&this.#e(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=c;u!==void 0&&!h&&(this.#_&&this.#p?.(u,t,"set"),this.#f&&this.#r?.push([u,t,"set"]));}else h||(this.#_&&this.#p?.(c,t,"set"),this.#f&&this.#r?.push([c,t,"set"]));if(this.#x(f),this.#D(f,b,r),this.#t[f]=e,r){r.set="replace";let u=c&&this.#e(c)?c.__staleWhileFetching:c;u!==void 0&&(r.oldValue=u);}}else r&&(r.set="update");this.#W&&this.onInsert?.(e,t,e===c?"update":"replace");}if(s!==0&&!this.#d&&this.#U(),this.#d&&(g||this.#G(f,s,n),r&&this.#z(r,f)),!h&&this.#f&&this.#r){let c=this.#r,u;for(;u=c?.shift();)this.#m?.(...u);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#I(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#m?.(...e);}}}#I(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#E&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#_||this.#f)&&(this.#_&&this.#p?.(s,i,"evict"),this.#f&&this.#r?.push([s,i,"evict"])),this.#x(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#b.push(e)),this.#n===1?(this.#o=this.#h=0,this.#b.length=0):this.#o=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return false;if(this.#g(n))s&&(s.has="stale",this.#z(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#z(s,n)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#g(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#M(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new C,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,y=false)=>{let{aborted:a}=h.signal,m=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(a&&!y?(i.status.fetchAborted=true,i.status.fetchError=h.signal.reason,m&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),a&&!m&&!y)return f(h.signal.reason);let S=u;return this.#t[e]===u&&(d===void 0?S.__staleWhileFetching?this.#t[e]=S.__staleWhileFetching:this.#F(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,d,r.options))),d},b=d=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=d),f(d)),f=d=>{let{aborted:y}=h.signal,a=y&&i.allowStaleOnFetchAbort,m=a||i.allowStaleOnFetchRejection,S=m||i.noDeleteOnFetchRejection,p=u;if(this.#t[e]===u&&(!S||p.__staleWhileFetching===void 0?this.#F(t,"fetch"):a||(this.#t[e]=p.__staleWhileFetching)),m)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),p.__staleWhileFetching;if(p.__returned===p)throw d},c=(d,y)=>{let a=this.#C?.(t,n,r);a&&a instanceof Promise&&a.then(m=>d(m===void 0?void 0:m),y),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=m=>g(m,true)));});};i.status&&(i.status.fetchDispatched=true);let u=new Promise(c).then(g,b),A=Object.assign(u,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,A,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=A,A}#e(t){if(!this.#E)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof C}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:d,forceRefresh:y=false,status:a,signal:m}=e;if(!this.#E)return a&&(a.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let S={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:A,ignoreFetchAbort:u,status:a,signal:m},p=this.#s.get(t);if(p===void 0){a&&(a.fetch="miss");let w=this.#M(t,p,S,d);return w.__returned=w}else {let w=this.#t[p];if(this.#e(w)){let D=i&&w.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",D&&(a.returnedStale=true)),D?w.__staleWhileFetching:w.__returned=w}let v=this.#g(p);if(!y&&!v)return a&&(a.fetch="hit"),this.#L(p),s&&this.#v(p),a&&this.#z(a,p),w;let T=this.#M(t,p,S,d),F=T.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=v?"stale":"refresh",F&&v&&(a.returnedStale=true)),F?T.__staleWhileFetching:T.__returned=T}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#z(h,o),this.#g(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=true),i?r.__staleWhileFetching:void 0):(n||this.#F(t,"expire"),h&&i&&(h.returnedStale=true),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#L(o),s&&this.#v(o),r))}else h&&(h.get="miss");}#j(t,e){this.#u[e]=t,this.#l[t]=e;}#L(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#j(this.#u[t],this.#l[t]),this.#j(this.#h,t),this.#h=t);}delete(t){return this.#F(t,"delete")}#F(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#P(e);else {this.#x(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#_||this.#f)&&(this.#_&&this.#p?.(n,t,e),this.#f&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#o)this.#o=this.#l[s];else {let h=this.#u[s];this.#l[h]=this.#l[s];let o=this.#l[s];this.#u[o]=this.#u[s];}this.#n--,this.#b.push(s);}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#m?.(...n);}return i}clear(){return this.#P("delete")}#P(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#_&&this.#p?.(i,s,t),this.#f&&this.#r?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#S&&(this.#d.fill(0),this.#S.fill(0)),this.#y&&this.#y.fill(0),this.#o=0,this.#h=0,this.#b.length=0,this.#w=0,this.#n=0,this.#f&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#m?.(...i);}}};var O=class{cache;map=new Map;constructor(t){this.cache=new R({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}keys(){return this.map.keys()}get values(){return this.map.values}};var W;(s=>(s.log=(n,...h)=>console.log(`[Pixi\u2019VN] ${n}`,...h),s.warn=(n,...h)=>console.warn(`[Pixi\u2019VN] ${n}`,...h),s.error=(n,...h)=>console.error(`[Pixi\u2019VN] ${n}`,...h),s.info=(n,...h)=>console.info(`[Pixi\u2019VN] ${n}`,...h)))(W||={});var x=new O({cacheSize:10}),j;(s=>{function l(n){let h=x.get(n);if(!h){W.error(`Label "${n}" not found`);return}return h}s.get=l;function t(n){if(Array.isArray(n)){n.forEach(h=>t(h));return}x.has(n.id)&&W.info(`Label "${n.id}" already exists, it will be overwritten`),x.set(n.id,n);}s.add=t;function e(){return Array.from(x.values())}s.values=e;function i(n){return x.has(n)}s.has=i;})(j||={});var tt=j;export{tt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var it=Object.create;var j=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var U=(h=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});var N=(h,t)=>()=>(t||h((t={exports:{}}).exports,t),t.exports);var at=(h,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of nt(t))!ot.call(h,s)&&s!==e&&j(h,s,{get:()=>t[s],enumerable:!(i=st(t,s))||i.enumerable});return h};var ht=(h,t,e)=>(e=h!=null?it(rt(h)):{},at(j(e,"default",{value:h,enumerable:true}),h));var $=N((B,k)=>{(function(h,t){typeof B=="object"?k.exports=B=t():typeof define=="function"&&define.amd?define([],t):h.CryptoJS=t();})(B,function(){var h=h||function(t,e){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof U=="function")try{i=U("crypto");}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function n(){}return function(a){var d;return n.prototype=a,d=new n,n.prototype=null,d}}(),o={},f=o.lib={},l=f.Base=function(){return {extend:function(n){var a=r(this);return n&&a.mixIn(n),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var a in n)n.hasOwnProperty(a)&&(this[a]=n[a]);n.hasOwnProperty("toString")&&(this.toString=n.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),b=f.WordArray=l.extend({init:function(n,a){n=this.words=n||[],a!=e?this.sigBytes=a:this.sigBytes=n.length*4;},toString:function(n){return (n||u).stringify(this)},concat:function(n){var a=this.words,d=n.words,c=this.sigBytes,y=n.sigBytes;if(this.clamp(),c%4)for(var v=0;v<y;v++){var A=d[v>>>2]>>>24-v%4*8&255;a[c+v>>>2]|=A<<24-(c+v)%4*8;}else for(var T=0;T<y;T+=4)a[c+T>>>2]=d[T>>>2];return this.sigBytes+=y,this},clamp:function(){var n=this.words,a=this.sigBytes;n[a>>>2]&=4294967295<<32-a%4*8,n.length=t.ceil(a/4);},clone:function(){var n=l.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){for(var a=[],d=0;d<n;d+=4)a.push(s());return new b.init(a,n)}}),p=o.enc={},u=p.Hex={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],y=0;y<d;y++){var v=a[y>>>2]>>>24-y%4*8&255;c.push((v>>>4).toString(16)),c.push((v&15).toString(16));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c+=2)d[c>>>3]|=parseInt(n.substr(c,2),16)<<24-c%8*4;return new b.init(d,a/2)}},g=p.Latin1={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],y=0;y<d;y++){var v=a[y>>>2]>>>24-y%4*8&255;c.push(String.fromCharCode(v));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c++)d[c>>>2]|=(n.charCodeAt(c)&255)<<24-c%4*8;return new b.init(d,a)}},m=p.Utf8={stringify:function(n){try{return decodeURIComponent(escape(g.stringify(n)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(n){return g.parse(unescape(encodeURIComponent(n)))}},_=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new b.init,this._nDataBytes=0;},_append:function(n){typeof n=="string"&&(n=m.parse(n)),this._data.concat(n),this._nDataBytes+=n.sigBytes;},_process:function(n){var a,d=this._data,c=d.words,y=d.sigBytes,v=this.blockSize,A=v*4,T=y/A;n?T=t.ceil(T):T=t.max((T|0)-this._minBufferSize,0);var L=T*v,z=t.min(L*4,y);if(L){for(var M=0;M<L;M+=v)this._doProcessBlock(c,M);a=c.splice(0,L),d.sigBytes-=z;}return new b.init(a,z)},clone:function(){var n=l.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0});f.Hasher=_.extend({cfg:l.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset();},reset:function(){_.reset.call(this),this._doReset();},update:function(n){return this._append(n),this._process(),this},finalize:function(n){n&&this._append(n);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(n){return function(a,d){return new n.init(d).finalize(a)}},_createHmacHelper:function(n){return function(a,d){return new S.HMAC.init(n,d).finalize(a)}}});var S=o.algo={};return o}(Math);return h});});var q=N((D,K)=>{(function(h,t){typeof D=="object"?K.exports=D=t($()):typeof define=="function"&&define.amd?define(["./core"],t):t(h.CryptoJS);})(D,function(h){return function(){var t=h,e=t.lib,i=e.WordArray,s=e.Hasher,r=t.algo,o=[],f=r.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(l,b){for(var p=this._hash.words,u=p[0],g=p[1],m=p[2],_=p[3],w=p[4],S=0;S<80;S++){if(S<16)o[S]=l[b+S]|0;else {var n=o[S-3]^o[S-8]^o[S-14]^o[S-16];o[S]=n<<1|n>>>31;}var a=(u<<5|u>>>27)+w+o[S];S<20?a+=(g&m|~g&_)+1518500249:S<40?a+=(g^m^_)+1859775393:S<60?a+=(g&m|g&_|m&_)-1894007588:a+=(g^m^_)-899497514,w=_,_=m,m=g<<30|g>>>2,g=u,u=a;}p[0]=p[0]+u|0,p[1]=p[1]+g|0,p[2]=p[2]+m|0,p[3]=p[3]+_|0,p[4]=p[4]+w|0;},_doFinalize:function(){var l=this._data,b=l.words,p=this._nDataBytes*8,u=l.sigBytes*8;return b[u>>>5]|=128<<24-u%32,b[(u+64>>>9<<4)+14]=Math.floor(p/4294967296),b[(u+64>>>9<<4)+15]=p,l.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});t.SHA1=s._createHelper(f),t.HmacSHA1=s._createHmacHelper(f);}(),h.SHA1});});var J=ht(q());var E;(s=>(s.log=(r,...o)=>console.log(`[Pixi\u2019VN] ${r}`,...o),s.warn=(r,...o)=>console.warn(`[Pixi\u2019VN] ${r}`,...o),s.error=(r,...o)=>console.error(`[Pixi\u2019VN] ${r}`,...o),s.info=(r,...o)=>console.info(`[Pixi\u2019VN] ${r}`,...o)))(E||={});var I=class{constructor(t,e){this._id=t,this._onStepStart=e?.onStepStart,this._onLoadingLabel=e?.onLoadingLabel,this._onStepEnd=e?.onStepEnd;}_id;get id(){return this._id}_onStepStart;get onStepStart(){return async(t,e)=>{if(this._onLoadingLabel&&t===0&&await this._onLoadingLabel(t,e),this._onStepStart)return await this._onStepStart(t,e)}}_onLoadingLabel;get onLoadingLabel(){return this._onLoadingLabel}_onStepEnd;get onStepEnd(){return this._onStepEnd}};var R=class extends I{get stepCount(){return this.steps.length}getStepById(t){return this.steps[t]}constructor(t,e,i){super(t,i),this._steps=e;}_steps;get steps(){return typeof this._steps=="function"?this._steps():this._steps}getStepSha(t){if(t<0||t>=this.steps.length)return E.warn("stepSha not found, setting to ERROR"),"error";try{let e=this.steps[t];return (0,J.default)(e.toString().toLocaleLowerCase()).toString()}catch(e){return E.warn("stepSha not found, setting to ERROR",e),"error"}}};var C=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,X=new Set,G=typeof process=="object"&&process?process:{},Q=(h,t,e,i)=>{typeof G.emitWarning=="function"?G.emitWarning(h,t,e,i):console.error(`[${e}] ${t}: ${h}`);},P=globalThis.AbortController,Y=globalThis.AbortSignal;if(typeof P>"u"){Y=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},P=class{constructor(){t();}signal=new Y;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let h=G.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{h&&(h=false,Q("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));};}var lt=h=>!X.has(h),x=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),Z=h=>x(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(t){super(t),this.fill(0);}},V=class h{heap;length;static#h=false;static create(t){let e=Z(t);if(!e)return [];h.#h=true;let i=new h(t,e);return h.#h=false,i}constructor(t,e){if(!h.#h)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]}},H=class h{#h;#c;#g;#E;#b;#F;#I;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#m;#s;#i;#t;#l;#u;#a;#r;#y;#o;#S;#w;#d;#v;#x;#f;#R;static unsafeExposeInternals(t){return {starts:t.#w,ttls:t.#d,sizes:t.#S,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#r},free:t.#y,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#D(e,i,s,r),moveToTail:e=>t.#O(e),indexes:e=>t.#_(e),rindexes:e=>t.#T(e),isStale:e=>t.#p(e)}}get max(){return this.#h}get maxSize(){return this.#c}get calculatedSize(){return this.#m}get size(){return this.#n}get fetchMethod(){return this.#F}get memoMethod(){return this.#I}get dispose(){return this.#g}get onInsert(){return this.#E}get disposeAfter(){return this.#b}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:f,allowStale:l,dispose:b,onInsert:p,disposeAfter:u,noDisposeOnSet:g,noUpdateTTL:m,maxSize:_=0,maxEntrySize:w=0,sizeCalculation:S,fetchMethod:n,memoMethod:a,noDeleteOnFetchRejection:d,noDeleteOnStaleGet:c,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:v,ignoreFetchAbort:A}=t;if(e!==0&&!x(e))throw new TypeError("max option must be a nonnegative integer");let T=e?Z(e):Array;if(!T)throw new Error("invalid max value: "+e);if(this.#h=e,this.#c=_,this.maxEntrySize=w||this.#c,this.sizeCalculation=S,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=a,n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#F=n,this.#x=!!n,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new T(e),this.#u=new T(e),this.#a=0,this.#r=0,this.#y=V.create(e),this.#n=0,this.#m=0,typeof b=="function"&&(this.#g=b),typeof p=="function"&&(this.#E=p),typeof u=="function"?(this.#b=u,this.#o=[]):(this.#b=void 0,this.#o=void 0),this.#v=!!this.#g,this.#R=!!this.#E,this.#f=!!this.#b,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!d,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#c!==0&&!x(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!x(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#j();}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!c,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!f,this.ttlResolution=x(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!x(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P();}if(this.#h===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#c){let L="LRU_CACHE_UNBOUNDED";lt(L)&&(X.add(L),Q("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,h));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#P(){let t=new O(this.#h),e=new O(this.#h);this.#d=t,this.#w=e,this.#H=(r,o,f=C.now())=>{if(e[r]=o!==0?f:0,t[r]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#p(r)&&this.#L(this.#i[r],"expire");},o+1);l.unref&&l.unref();}},this.#z=r=>{e[r]=t[r]!==0?C.now():0;},this.#A=(r,o)=>{if(t[o]){let f=t[o],l=e[o];if(!f||!l)return;r.ttl=f,r.start=l,r.now=i||s();let b=r.now-l;r.remainingTTL=f-b;}};let i=0,s=()=>{let r=C.now();if(this.ttlResolution>0){i=r;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref();}return r};this.getRemainingTTL=r=>{let o=this.#s.get(r);if(o===void 0)return 0;let f=t[o],l=e[o];if(!f||!l)return 1/0;let b=(i||s())-l;return f-b},this.#p=r=>{let o=e[r],f=t[r];return !!f&&!!o&&(i||s())-o>f};}#z=()=>{};#A=()=>{};#H=()=>{};#p=()=>false;#j(){let t=new O(this.#h);this.#m=0,this.#S=t,this.#C=e=>{this.#m-=t[e],t[e]=0;},this.#M=(e,i,s,r)=>{if(this.#e(i))return 0;if(!x(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!x(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#W=(e,i,s)=>{if(t[e]=i,this.#c){let r=this.#c-t[e];for(;this.#m>r;)this.#B(true);}this.#m+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#m);};}#C=t=>{};#W=(t,e,i)=>{};#M=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#r;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#a));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#r));)e=this.#l[e];}#U(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#_())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#_()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#_())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#p(e)&&(this.#L(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#w){let o=this.#d[e],f=this.#w[e];if(o&&f){let l=o-(C.now()-f);r.ttl=l,r.start=Date.now();}}return this.#S&&(r.size=this.#S[e]),r}dump(){let t=[];for(let e of this.#_({allowStale:true})){let i=this.#i[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#d&&this.#w){o.ttl=this.#d[e];let f=C.now()-this.#w[e];o.start=Math.floor(Date.now()-f);}this.#S&&(o.size=this.#S[e]),t.unshift([i,o]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=C.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:f=this.sizeCalculation,status:l}=i,{noUpdateTTL:b=this.noUpdateTTL}=i,p=this.#M(t,e,i.size||0,f);if(this.maxEntrySize&&p>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=true),this.#L(t,"set"),this;let u=this.#n===0?void 0:this.#s.get(t);if(u===void 0)u=this.#n===0?this.#r:this.#y.length!==0?this.#y.pop():this.#n===this.#h?this.#B(false):this.#n,this.#i[u]=t,this.#t[u]=e,this.#s.set(t,u),this.#l[this.#r]=u,this.#u[u]=this.#r,this.#r=u,this.#n++,this.#W(u,p,l),l&&(l.set="add"),b=false,this.#R&&this.#E?.(e,t,"add");else {this.#O(u);let g=this.#t[u];if(e!==g){if(this.#x&&this.#e(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=g;m!==void 0&&!o&&(this.#v&&this.#g?.(m,t,"set"),this.#f&&this.#o?.push([m,t,"set"]));}else o||(this.#v&&this.#g?.(g,t,"set"),this.#f&&this.#o?.push([g,t,"set"]));if(this.#C(u),this.#W(u,p,l),this.#t[u]=e,l){l.set="replace";let m=g&&this.#e(g)?g.__staleWhileFetching:g;m!==void 0&&(l.oldValue=m);}}else l&&(l.set="update");this.#R&&this.onInsert?.(e,t,e===g?"update":"replace");}if(s!==0&&!this.#d&&this.#P(),this.#d&&(b||this.#H(u,s,r),l&&this.#A(l,u)),!o&&this.#f&&this.#o){let g=this.#o,m;for(;m=g?.shift();)this.#b?.(...m);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#a];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#o){let t=this.#o,e;for(;e=t?.shift();)this.#b?.(...e);}}}#B(t){let e=this.#a,i=this.#i[e],s=this.#t[e];return this.#x&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(s,i,"evict"),this.#f&&this.#o?.push([s,i,"evict"])),this.#C(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#y.push(e)),this.#n===1?(this.#a=this.#r=0,this.#y.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#s.get(t);if(r!==void 0){let o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return false;if(this.#p(r))s&&(s.has="stale",this.#A(s,r));else return i&&this.#z(r),s&&(s.has="hit",this.#A(s,r)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#p(s))return;let r=this.#t[s];return this.#e(r)?r.__staleWhileFetching:r}#D(t,e,i,s){let r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;let o=new P,{signal:f}=i;f?.addEventListener("abort",()=>o.abort(f.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:s},b=(w,S=false)=>{let{aborted:n}=o.signal,a=i.ignoreFetchAbort&&w!==void 0;if(i.status&&(n&&!S?(i.status.fetchAborted=true,i.status.fetchError=o.signal.reason,a&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),n&&!a&&!S)return u(o.signal.reason);let d=m;return this.#t[e]===m&&(w===void 0?d.__staleWhileFetching?this.#t[e]=d.__staleWhileFetching:this.#L(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,w,l.options))),w},p=w=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=w),u(w)),u=w=>{let{aborted:S}=o.signal,n=S&&i.allowStaleOnFetchAbort,a=n||i.allowStaleOnFetchRejection,d=a||i.noDeleteOnFetchRejection,c=m;if(this.#t[e]===m&&(!d||c.__staleWhileFetching===void 0?this.#L(t,"fetch"):n||(this.#t[e]=c.__staleWhileFetching)),a)return i.status&&c.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),c.__staleWhileFetching;if(c.__returned===c)throw w},g=(w,S)=>{let n=this.#F?.(t,r,l);n&&n instanceof Promise&&n.then(a=>w(a===void 0?void 0:a),S),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(w(void 0),i.allowStaleOnFetchAbort&&(w=a=>b(a,true)));});};i.status&&(i.status.fetchDispatched=true);let m=new Promise(g).then(b,p),_=Object.assign(m,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,_,{...l.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=_,_}#e(t){if(!this.#x)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof P}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:l=0,sizeCalculation:b=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:w,forceRefresh:S=false,status:n,signal:a}=e;if(!this.#x)return n&&(n.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:n});let d={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:f,size:l,sizeCalculation:b,noUpdateTTL:p,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:_,ignoreFetchAbort:m,status:n,signal:a},c=this.#s.get(t);if(c===void 0){n&&(n.fetch="miss");let y=this.#D(t,c,d,w);return y.__returned=y}else {let y=this.#t[c];if(this.#e(y)){let z=i&&y.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",z&&(n.returnedStale=true)),z?y.__staleWhileFetching:y.__returned=y}let v=this.#p(c);if(!S&&!v)return n&&(n.fetch="hit"),this.#O(c),s&&this.#z(c),n&&this.#A(n,c),y;let A=this.#D(t,c,d,w),L=A.__staleWhileFetching!==void 0&&i;return n&&(n.fetch=v?"stale":"refresh",L&&v&&(n.returnedStale=true)),L?A.__staleWhileFetching:A.__returned=A}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#I;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...o}=e,f=this.get(t,o);if(!r&&f!==void 0)return f;let l=i(t,f,{options:o,context:s});return this.set(t,l,o),l}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,f=this.#s.get(t);if(f!==void 0){let l=this.#t[f],b=this.#e(l);return o&&this.#A(o,f),this.#p(f)?(o&&(o.get="stale"),b?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=true),i?l.__staleWhileFetching:void 0):(r||this.#L(t,"expire"),o&&i&&(o.returnedStale=true),i?l:void 0)):(o&&(o.get="hit"),b?l.__staleWhileFetching:(this.#O(f),s&&this.#z(f),l))}else o&&(o.get="miss");}#G(t,e){this.#u[e]=t,this.#l[t]=e;}#O(t){t!==this.#r&&(t===this.#a?this.#a=this.#l[t]:this.#G(this.#u[t],this.#l[t]),this.#G(this.#r,t),this.#r=t);}delete(t){return this.#L(t,"delete")}#L(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#V(e);else {this.#C(s);let r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(r,t,e),this.#f&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else {let o=this.#u[s];this.#l[o]=this.#l[s];let f=this.#l[s];this.#u[f]=this.#u[s];}this.#n--,this.#y.push(s);}}if(this.#f&&this.#o?.length){let s=this.#o,r;for(;r=s?.shift();)this.#b?.(...r);}return i}clear(){return this.#V("delete")}#V(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#v&&this.#g?.(i,s,t),this.#f&&this.#o?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#S&&this.#S.fill(0),this.#a=0,this.#r=0,this.#y.length=0,this.#m=0,this.#n=0,this.#f&&this.#o){let e=this.#o,i;for(;i=e?.shift();)this.#b?.(...i);}}};var F=class{cache;map=new Map;constructor(t){this.cache=new H({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}get keys(){return this.map.keys}get values(){return this.map.values}};var W=new F({cacheSize:10}),tt;(s=>{function h(r){let o=W.get(r);if(!o){E.error(`Label "${r}" not found`);return}return o}s.get=h;function t(r){if(Array.isArray(r)){r.forEach(o=>t(o));return}W.has(r.id)&&E.info(`Label "${r.id}" already exists, it will be overwritten`),W.set(r.id,r);}s.add=t;function e(){return Array.from(W.values())}s.values=e;function i(r){return W.has(r)}s.has=i;})(tt||={});var et=tt;function ft(h,t,e){let i=new R(h,t,e);return et.add(i),i}module.exports=ft;
|
|
1
|
+
'use strict';var it=Object.create;var j=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var U=(h=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});var N=(h,t)=>()=>(t||h((t={exports:{}}).exports,t),t.exports);var at=(h,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of nt(t))!ot.call(h,s)&&s!==e&&j(h,s,{get:()=>t[s],enumerable:!(i=st(t,s))||i.enumerable});return h};var ht=(h,t,e)=>(e=h!=null?it(rt(h)):{},at(j(e,"default",{value:h,enumerable:true}),h));var $=N((B,k)=>{(function(h,t){typeof B=="object"?k.exports=B=t():typeof define=="function"&&define.amd?define([],t):h.CryptoJS=t();})(B,function(){var h=h||function(t,e){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof U=="function")try{i=U("crypto");}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function n(){}return function(a){var d;return n.prototype=a,d=new n,n.prototype=null,d}}(),o={},f=o.lib={},l=f.Base=function(){return {extend:function(n){var a=r(this);return n&&a.mixIn(n),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var a in n)n.hasOwnProperty(a)&&(this[a]=n[a]);n.hasOwnProperty("toString")&&(this.toString=n.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),b=f.WordArray=l.extend({init:function(n,a){n=this.words=n||[],a!=e?this.sigBytes=a:this.sigBytes=n.length*4;},toString:function(n){return (n||u).stringify(this)},concat:function(n){var a=this.words,d=n.words,c=this.sigBytes,y=n.sigBytes;if(this.clamp(),c%4)for(var v=0;v<y;v++){var A=d[v>>>2]>>>24-v%4*8&255;a[c+v>>>2]|=A<<24-(c+v)%4*8;}else for(var T=0;T<y;T+=4)a[c+T>>>2]=d[T>>>2];return this.sigBytes+=y,this},clamp:function(){var n=this.words,a=this.sigBytes;n[a>>>2]&=4294967295<<32-a%4*8,n.length=t.ceil(a/4);},clone:function(){var n=l.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){for(var a=[],d=0;d<n;d+=4)a.push(s());return new b.init(a,n)}}),p=o.enc={},u=p.Hex={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],y=0;y<d;y++){var v=a[y>>>2]>>>24-y%4*8&255;c.push((v>>>4).toString(16)),c.push((v&15).toString(16));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c+=2)d[c>>>3]|=parseInt(n.substr(c,2),16)<<24-c%8*4;return new b.init(d,a/2)}},g=p.Latin1={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],y=0;y<d;y++){var v=a[y>>>2]>>>24-y%4*8&255;c.push(String.fromCharCode(v));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c++)d[c>>>2]|=(n.charCodeAt(c)&255)<<24-c%4*8;return new b.init(d,a)}},m=p.Utf8={stringify:function(n){try{return decodeURIComponent(escape(g.stringify(n)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(n){return g.parse(unescape(encodeURIComponent(n)))}},_=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new b.init,this._nDataBytes=0;},_append:function(n){typeof n=="string"&&(n=m.parse(n)),this._data.concat(n),this._nDataBytes+=n.sigBytes;},_process:function(n){var a,d=this._data,c=d.words,y=d.sigBytes,v=this.blockSize,A=v*4,T=y/A;n?T=t.ceil(T):T=t.max((T|0)-this._minBufferSize,0);var L=T*v,z=t.min(L*4,y);if(L){for(var M=0;M<L;M+=v)this._doProcessBlock(c,M);a=c.splice(0,L),d.sigBytes-=z;}return new b.init(a,z)},clone:function(){var n=l.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0});f.Hasher=_.extend({cfg:l.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset();},reset:function(){_.reset.call(this),this._doReset();},update:function(n){return this._append(n),this._process(),this},finalize:function(n){n&&this._append(n);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(n){return function(a,d){return new n.init(d).finalize(a)}},_createHmacHelper:function(n){return function(a,d){return new S.HMAC.init(n,d).finalize(a)}}});var S=o.algo={};return o}(Math);return h});});var q=N((D,K)=>{(function(h,t){typeof D=="object"?K.exports=D=t($()):typeof define=="function"&&define.amd?define(["./core"],t):t(h.CryptoJS);})(D,function(h){return function(){var t=h,e=t.lib,i=e.WordArray,s=e.Hasher,r=t.algo,o=[],f=r.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(l,b){for(var p=this._hash.words,u=p[0],g=p[1],m=p[2],_=p[3],w=p[4],S=0;S<80;S++){if(S<16)o[S]=l[b+S]|0;else {var n=o[S-3]^o[S-8]^o[S-14]^o[S-16];o[S]=n<<1|n>>>31;}var a=(u<<5|u>>>27)+w+o[S];S<20?a+=(g&m|~g&_)+1518500249:S<40?a+=(g^m^_)+1859775393:S<60?a+=(g&m|g&_|m&_)-1894007588:a+=(g^m^_)-899497514,w=_,_=m,m=g<<30|g>>>2,g=u,u=a;}p[0]=p[0]+u|0,p[1]=p[1]+g|0,p[2]=p[2]+m|0,p[3]=p[3]+_|0,p[4]=p[4]+w|0;},_doFinalize:function(){var l=this._data,b=l.words,p=this._nDataBytes*8,u=l.sigBytes*8;return b[u>>>5]|=128<<24-u%32,b[(u+64>>>9<<4)+14]=Math.floor(p/4294967296),b[(u+64>>>9<<4)+15]=p,l.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});t.SHA1=s._createHelper(f),t.HmacSHA1=s._createHmacHelper(f);}(),h.SHA1});});var J=ht(q());var E;(s=>(s.log=(r,...o)=>console.log(`[Pixi\u2019VN] ${r}`,...o),s.warn=(r,...o)=>console.warn(`[Pixi\u2019VN] ${r}`,...o),s.error=(r,...o)=>console.error(`[Pixi\u2019VN] ${r}`,...o),s.info=(r,...o)=>console.info(`[Pixi\u2019VN] ${r}`,...o)))(E||={});var I=class{constructor(t,e){this._id=t,this._onStepStart=e?.onStepStart,this._onLoadingLabel=e?.onLoadingLabel,this._onStepEnd=e?.onStepEnd;}_id;get id(){return this._id}_onStepStart;get onStepStart(){return async(t,e)=>{if(this._onLoadingLabel&&t===0&&await this._onLoadingLabel(t,e),this._onStepStart)return await this._onStepStart(t,e)}}_onLoadingLabel;get onLoadingLabel(){return this._onLoadingLabel}_onStepEnd;get onStepEnd(){return this._onStepEnd}};var R=class extends I{get stepCount(){return this.steps.length}getStepById(t){return this.steps[t]}constructor(t,e,i){super(t,i),this._steps=e;}_steps;get steps(){return typeof this._steps=="function"?this._steps():this._steps}getStepSha(t){if(t<0||t>=this.steps.length)return E.warn("stepSha not found, setting to ERROR"),"error";try{let e=this.steps[t];return (0,J.default)(e.toString().toLocaleLowerCase()).toString()}catch(e){return E.warn("stepSha not found, setting to ERROR",e),"error"}}};var C=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,X=new Set,G=typeof process=="object"&&process?process:{},Q=(h,t,e,i)=>{typeof G.emitWarning=="function"?G.emitWarning(h,t,e,i):console.error(`[${e}] ${t}: ${h}`);},P=globalThis.AbortController,Y=globalThis.AbortSignal;if(typeof P>"u"){Y=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},P=class{constructor(){t();}signal=new Y;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let h=G.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{h&&(h=false,Q("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));};}var lt=h=>!X.has(h),x=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),Z=h=>x(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(t){super(t),this.fill(0);}},V=class h{heap;length;static#h=false;static create(t){let e=Z(t);if(!e)return [];h.#h=true;let i=new h(t,e);return h.#h=false,i}constructor(t,e){if(!h.#h)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]}},H=class h{#h;#c;#g;#E;#b;#F;#I;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#m;#s;#i;#t;#l;#u;#a;#r;#y;#o;#S;#w;#d;#v;#x;#f;#R;static unsafeExposeInternals(t){return {starts:t.#w,ttls:t.#d,sizes:t.#S,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#r},free:t.#y,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#D(e,i,s,r),moveToTail:e=>t.#O(e),indexes:e=>t.#_(e),rindexes:e=>t.#T(e),isStale:e=>t.#p(e)}}get max(){return this.#h}get maxSize(){return this.#c}get calculatedSize(){return this.#m}get size(){return this.#n}get fetchMethod(){return this.#F}get memoMethod(){return this.#I}get dispose(){return this.#g}get onInsert(){return this.#E}get disposeAfter(){return this.#b}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:f,allowStale:l,dispose:b,onInsert:p,disposeAfter:u,noDisposeOnSet:g,noUpdateTTL:m,maxSize:_=0,maxEntrySize:w=0,sizeCalculation:S,fetchMethod:n,memoMethod:a,noDeleteOnFetchRejection:d,noDeleteOnStaleGet:c,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:v,ignoreFetchAbort:A}=t;if(e!==0&&!x(e))throw new TypeError("max option must be a nonnegative integer");let T=e?Z(e):Array;if(!T)throw new Error("invalid max value: "+e);if(this.#h=e,this.#c=_,this.maxEntrySize=w||this.#c,this.sizeCalculation=S,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=a,n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#F=n,this.#x=!!n,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new T(e),this.#u=new T(e),this.#a=0,this.#r=0,this.#y=V.create(e),this.#n=0,this.#m=0,typeof b=="function"&&(this.#g=b),typeof p=="function"&&(this.#E=p),typeof u=="function"?(this.#b=u,this.#o=[]):(this.#b=void 0,this.#o=void 0),this.#v=!!this.#g,this.#R=!!this.#E,this.#f=!!this.#b,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!d,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#c!==0&&!x(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!x(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#j();}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!c,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!f,this.ttlResolution=x(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!x(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P();}if(this.#h===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#c){let L="LRU_CACHE_UNBOUNDED";lt(L)&&(X.add(L),Q("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,h));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#P(){let t=new O(this.#h),e=new O(this.#h);this.#d=t,this.#w=e,this.#H=(r,o,f=C.now())=>{if(e[r]=o!==0?f:0,t[r]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#p(r)&&this.#L(this.#i[r],"expire");},o+1);l.unref&&l.unref();}},this.#z=r=>{e[r]=t[r]!==0?C.now():0;},this.#A=(r,o)=>{if(t[o]){let f=t[o],l=e[o];if(!f||!l)return;r.ttl=f,r.start=l,r.now=i||s();let b=r.now-l;r.remainingTTL=f-b;}};let i=0,s=()=>{let r=C.now();if(this.ttlResolution>0){i=r;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref();}return r};this.getRemainingTTL=r=>{let o=this.#s.get(r);if(o===void 0)return 0;let f=t[o],l=e[o];if(!f||!l)return 1/0;let b=(i||s())-l;return f-b},this.#p=r=>{let o=e[r],f=t[r];return !!f&&!!o&&(i||s())-o>f};}#z=()=>{};#A=()=>{};#H=()=>{};#p=()=>false;#j(){let t=new O(this.#h);this.#m=0,this.#S=t,this.#C=e=>{this.#m-=t[e],t[e]=0;},this.#M=(e,i,s,r)=>{if(this.#e(i))return 0;if(!x(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!x(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#W=(e,i,s)=>{if(t[e]=i,this.#c){let r=this.#c-t[e];for(;this.#m>r;)this.#B(true);}this.#m+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#m);};}#C=t=>{};#W=(t,e,i)=>{};#M=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#r;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#a));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#r));)e=this.#l[e];}#U(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#_())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#_()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#_())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#p(e)&&(this.#L(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#w){let o=this.#d[e],f=this.#w[e];if(o&&f){let l=o-(C.now()-f);r.ttl=l,r.start=Date.now();}}return this.#S&&(r.size=this.#S[e]),r}dump(){let t=[];for(let e of this.#_({allowStale:true})){let i=this.#i[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#d&&this.#w){o.ttl=this.#d[e];let f=C.now()-this.#w[e];o.start=Math.floor(Date.now()-f);}this.#S&&(o.size=this.#S[e]),t.unshift([i,o]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=C.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:f=this.sizeCalculation,status:l}=i,{noUpdateTTL:b=this.noUpdateTTL}=i,p=this.#M(t,e,i.size||0,f);if(this.maxEntrySize&&p>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=true),this.#L(t,"set"),this;let u=this.#n===0?void 0:this.#s.get(t);if(u===void 0)u=this.#n===0?this.#r:this.#y.length!==0?this.#y.pop():this.#n===this.#h?this.#B(false):this.#n,this.#i[u]=t,this.#t[u]=e,this.#s.set(t,u),this.#l[this.#r]=u,this.#u[u]=this.#r,this.#r=u,this.#n++,this.#W(u,p,l),l&&(l.set="add"),b=false,this.#R&&this.#E?.(e,t,"add");else {this.#O(u);let g=this.#t[u];if(e!==g){if(this.#x&&this.#e(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=g;m!==void 0&&!o&&(this.#v&&this.#g?.(m,t,"set"),this.#f&&this.#o?.push([m,t,"set"]));}else o||(this.#v&&this.#g?.(g,t,"set"),this.#f&&this.#o?.push([g,t,"set"]));if(this.#C(u),this.#W(u,p,l),this.#t[u]=e,l){l.set="replace";let m=g&&this.#e(g)?g.__staleWhileFetching:g;m!==void 0&&(l.oldValue=m);}}else l&&(l.set="update");this.#R&&this.onInsert?.(e,t,e===g?"update":"replace");}if(s!==0&&!this.#d&&this.#P(),this.#d&&(b||this.#H(u,s,r),l&&this.#A(l,u)),!o&&this.#f&&this.#o){let g=this.#o,m;for(;m=g?.shift();)this.#b?.(...m);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#a];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#o){let t=this.#o,e;for(;e=t?.shift();)this.#b?.(...e);}}}#B(t){let e=this.#a,i=this.#i[e],s=this.#t[e];return this.#x&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(s,i,"evict"),this.#f&&this.#o?.push([s,i,"evict"])),this.#C(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#y.push(e)),this.#n===1?(this.#a=this.#r=0,this.#y.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#s.get(t);if(r!==void 0){let o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return false;if(this.#p(r))s&&(s.has="stale",this.#A(s,r));else return i&&this.#z(r),s&&(s.has="hit",this.#A(s,r)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#p(s))return;let r=this.#t[s];return this.#e(r)?r.__staleWhileFetching:r}#D(t,e,i,s){let r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;let o=new P,{signal:f}=i;f?.addEventListener("abort",()=>o.abort(f.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:s},b=(w,S=false)=>{let{aborted:n}=o.signal,a=i.ignoreFetchAbort&&w!==void 0;if(i.status&&(n&&!S?(i.status.fetchAborted=true,i.status.fetchError=o.signal.reason,a&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),n&&!a&&!S)return u(o.signal.reason);let d=m;return this.#t[e]===m&&(w===void 0?d.__staleWhileFetching?this.#t[e]=d.__staleWhileFetching:this.#L(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,w,l.options))),w},p=w=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=w),u(w)),u=w=>{let{aborted:S}=o.signal,n=S&&i.allowStaleOnFetchAbort,a=n||i.allowStaleOnFetchRejection,d=a||i.noDeleteOnFetchRejection,c=m;if(this.#t[e]===m&&(!d||c.__staleWhileFetching===void 0?this.#L(t,"fetch"):n||(this.#t[e]=c.__staleWhileFetching)),a)return i.status&&c.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),c.__staleWhileFetching;if(c.__returned===c)throw w},g=(w,S)=>{let n=this.#F?.(t,r,l);n&&n instanceof Promise&&n.then(a=>w(a===void 0?void 0:a),S),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(w(void 0),i.allowStaleOnFetchAbort&&(w=a=>b(a,true)));});};i.status&&(i.status.fetchDispatched=true);let m=new Promise(g).then(b,p),_=Object.assign(m,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,_,{...l.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=_,_}#e(t){if(!this.#x)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof P}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:l=0,sizeCalculation:b=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:w,forceRefresh:S=false,status:n,signal:a}=e;if(!this.#x)return n&&(n.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:n});let d={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:f,size:l,sizeCalculation:b,noUpdateTTL:p,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:_,ignoreFetchAbort:m,status:n,signal:a},c=this.#s.get(t);if(c===void 0){n&&(n.fetch="miss");let y=this.#D(t,c,d,w);return y.__returned=y}else {let y=this.#t[c];if(this.#e(y)){let z=i&&y.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",z&&(n.returnedStale=true)),z?y.__staleWhileFetching:y.__returned=y}let v=this.#p(c);if(!S&&!v)return n&&(n.fetch="hit"),this.#O(c),s&&this.#z(c),n&&this.#A(n,c),y;let A=this.#D(t,c,d,w),L=A.__staleWhileFetching!==void 0&&i;return n&&(n.fetch=v?"stale":"refresh",L&&v&&(n.returnedStale=true)),L?A.__staleWhileFetching:A.__returned=A}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#I;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...o}=e,f=this.get(t,o);if(!r&&f!==void 0)return f;let l=i(t,f,{options:o,context:s});return this.set(t,l,o),l}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,f=this.#s.get(t);if(f!==void 0){let l=this.#t[f],b=this.#e(l);return o&&this.#A(o,f),this.#p(f)?(o&&(o.get="stale"),b?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=true),i?l.__staleWhileFetching:void 0):(r||this.#L(t,"expire"),o&&i&&(o.returnedStale=true),i?l:void 0)):(o&&(o.get="hit"),b?l.__staleWhileFetching:(this.#O(f),s&&this.#z(f),l))}else o&&(o.get="miss");}#G(t,e){this.#u[e]=t,this.#l[t]=e;}#O(t){t!==this.#r&&(t===this.#a?this.#a=this.#l[t]:this.#G(this.#u[t],this.#l[t]),this.#G(this.#r,t),this.#r=t);}delete(t){return this.#L(t,"delete")}#L(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#V(e);else {this.#C(s);let r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(r,t,e),this.#f&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else {let o=this.#u[s];this.#l[o]=this.#l[s];let f=this.#l[s];this.#u[f]=this.#u[s];}this.#n--,this.#y.push(s);}}if(this.#f&&this.#o?.length){let s=this.#o,r;for(;r=s?.shift();)this.#b?.(...r);}return i}clear(){return this.#V("delete")}#V(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#v&&this.#g?.(i,s,t),this.#f&&this.#o?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#S&&this.#S.fill(0),this.#a=0,this.#r=0,this.#y.length=0,this.#m=0,this.#n=0,this.#f&&this.#o){let e=this.#o,i;for(;i=e?.shift();)this.#b?.(...i);}}};var F=class{cache;map=new Map;constructor(t){this.cache=new H({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}keys(){return this.map.keys()}get values(){return this.map.values}};var W=new F({cacheSize:10}),tt;(s=>{function h(r){let o=W.get(r);if(!o){E.error(`Label "${r}" not found`);return}return o}s.get=h;function t(r){if(Array.isArray(r)){r.forEach(o=>t(o));return}W.has(r.id)&&E.info(`Label "${r.id}" already exists, it will be overwritten`),W.set(r.id,r);}s.add=t;function e(){return Array.from(W.values())}s.values=e;function i(r){return W.has(r)}s.has=i;})(tt||={});var et=tt;function ft(h,t,e){let i=new R(h,t,e);return et.add(i),i}module.exports=ft;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var it=Object.create;var j=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var U=(h=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});var N=(h,t)=>()=>(t||h((t={exports:{}}).exports,t),t.exports);var at=(h,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of nt(t))!ot.call(h,s)&&s!==e&&j(h,s,{get:()=>t[s],enumerable:!(i=st(t,s))||i.enumerable});return h};var ht=(h,t,e)=>(e=h!=null?it(rt(h)):{},at(j(e,"default",{value:h,enumerable:true}),h));var $=N((B,k)=>{(function(h,t){typeof B=="object"?k.exports=B=t():typeof define=="function"&&define.amd?define([],t):h.CryptoJS=t();})(B,function(){var h=h||function(t,e){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof U=="function")try{i=U("crypto");}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function n(){}return function(a){var d;return n.prototype=a,d=new n,n.prototype=null,d}}(),o={},f=o.lib={},l=f.Base=function(){return {extend:function(n){var a=r(this);return n&&a.mixIn(n),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var a in n)n.hasOwnProperty(a)&&(this[a]=n[a]);n.hasOwnProperty("toString")&&(this.toString=n.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),b=f.WordArray=l.extend({init:function(n,a){n=this.words=n||[],a!=e?this.sigBytes=a:this.sigBytes=n.length*4;},toString:function(n){return (n||u).stringify(this)},concat:function(n){var a=this.words,d=n.words,c=this.sigBytes,y=n.sigBytes;if(this.clamp(),c%4)for(var v=0;v<y;v++){var A=d[v>>>2]>>>24-v%4*8&255;a[c+v>>>2]|=A<<24-(c+v)%4*8;}else for(var T=0;T<y;T+=4)a[c+T>>>2]=d[T>>>2];return this.sigBytes+=y,this},clamp:function(){var n=this.words,a=this.sigBytes;n[a>>>2]&=4294967295<<32-a%4*8,n.length=t.ceil(a/4);},clone:function(){var n=l.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){for(var a=[],d=0;d<n;d+=4)a.push(s());return new b.init(a,n)}}),p=o.enc={},u=p.Hex={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],y=0;y<d;y++){var v=a[y>>>2]>>>24-y%4*8&255;c.push((v>>>4).toString(16)),c.push((v&15).toString(16));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c+=2)d[c>>>3]|=parseInt(n.substr(c,2),16)<<24-c%8*4;return new b.init(d,a/2)}},g=p.Latin1={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],y=0;y<d;y++){var v=a[y>>>2]>>>24-y%4*8&255;c.push(String.fromCharCode(v));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c++)d[c>>>2]|=(n.charCodeAt(c)&255)<<24-c%4*8;return new b.init(d,a)}},m=p.Utf8={stringify:function(n){try{return decodeURIComponent(escape(g.stringify(n)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(n){return g.parse(unescape(encodeURIComponent(n)))}},_=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new b.init,this._nDataBytes=0;},_append:function(n){typeof n=="string"&&(n=m.parse(n)),this._data.concat(n),this._nDataBytes+=n.sigBytes;},_process:function(n){var a,d=this._data,c=d.words,y=d.sigBytes,v=this.blockSize,A=v*4,T=y/A;n?T=t.ceil(T):T=t.max((T|0)-this._minBufferSize,0);var L=T*v,z=t.min(L*4,y);if(L){for(var M=0;M<L;M+=v)this._doProcessBlock(c,M);a=c.splice(0,L),d.sigBytes-=z;}return new b.init(a,z)},clone:function(){var n=l.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0});f.Hasher=_.extend({cfg:l.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset();},reset:function(){_.reset.call(this),this._doReset();},update:function(n){return this._append(n),this._process(),this},finalize:function(n){n&&this._append(n);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(n){return function(a,d){return new n.init(d).finalize(a)}},_createHmacHelper:function(n){return function(a,d){return new S.HMAC.init(n,d).finalize(a)}}});var S=o.algo={};return o}(Math);return h});});var q=N((D,K)=>{(function(h,t){typeof D=="object"?K.exports=D=t($()):typeof define=="function"&&define.amd?define(["./core"],t):t(h.CryptoJS);})(D,function(h){return function(){var t=h,e=t.lib,i=e.WordArray,s=e.Hasher,r=t.algo,o=[],f=r.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(l,b){for(var p=this._hash.words,u=p[0],g=p[1],m=p[2],_=p[3],w=p[4],S=0;S<80;S++){if(S<16)o[S]=l[b+S]|0;else {var n=o[S-3]^o[S-8]^o[S-14]^o[S-16];o[S]=n<<1|n>>>31;}var a=(u<<5|u>>>27)+w+o[S];S<20?a+=(g&m|~g&_)+1518500249:S<40?a+=(g^m^_)+1859775393:S<60?a+=(g&m|g&_|m&_)-1894007588:a+=(g^m^_)-899497514,w=_,_=m,m=g<<30|g>>>2,g=u,u=a;}p[0]=p[0]+u|0,p[1]=p[1]+g|0,p[2]=p[2]+m|0,p[3]=p[3]+_|0,p[4]=p[4]+w|0;},_doFinalize:function(){var l=this._data,b=l.words,p=this._nDataBytes*8,u=l.sigBytes*8;return b[u>>>5]|=128<<24-u%32,b[(u+64>>>9<<4)+14]=Math.floor(p/4294967296),b[(u+64>>>9<<4)+15]=p,l.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});t.SHA1=s._createHelper(f),t.HmacSHA1=s._createHmacHelper(f);}(),h.SHA1});});var J=ht(q());var E;(s=>(s.log=(r,...o)=>console.log(`[Pixi\u2019VN] ${r}`,...o),s.warn=(r,...o)=>console.warn(`[Pixi\u2019VN] ${r}`,...o),s.error=(r,...o)=>console.error(`[Pixi\u2019VN] ${r}`,...o),s.info=(r,...o)=>console.info(`[Pixi\u2019VN] ${r}`,...o)))(E||={});var I=class{constructor(t,e){this._id=t,this._onStepStart=e?.onStepStart,this._onLoadingLabel=e?.onLoadingLabel,this._onStepEnd=e?.onStepEnd;}_id;get id(){return this._id}_onStepStart;get onStepStart(){return async(t,e)=>{if(this._onLoadingLabel&&t===0&&await this._onLoadingLabel(t,e),this._onStepStart)return await this._onStepStart(t,e)}}_onLoadingLabel;get onLoadingLabel(){return this._onLoadingLabel}_onStepEnd;get onStepEnd(){return this._onStepEnd}};var R=class extends I{get stepCount(){return this.steps.length}getStepById(t){return this.steps[t]}constructor(t,e,i){super(t,i),this._steps=e;}_steps;get steps(){return typeof this._steps=="function"?this._steps():this._steps}getStepSha(t){if(t<0||t>=this.steps.length)return E.warn("stepSha not found, setting to ERROR"),"error";try{let e=this.steps[t];return (0,J.default)(e.toString().toLocaleLowerCase()).toString()}catch(e){return E.warn("stepSha not found, setting to ERROR",e),"error"}}};var C=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,X=new Set,G=typeof process=="object"&&process?process:{},Q=(h,t,e,i)=>{typeof G.emitWarning=="function"?G.emitWarning(h,t,e,i):console.error(`[${e}] ${t}: ${h}`);},P=globalThis.AbortController,Y=globalThis.AbortSignal;if(typeof P>"u"){Y=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},P=class{constructor(){t();}signal=new Y;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let h=G.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{h&&(h=false,Q("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));};}var lt=h=>!X.has(h),x=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),Z=h=>x(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(t){super(t),this.fill(0);}},V=class h{heap;length;static#h=false;static create(t){let e=Z(t);if(!e)return [];h.#h=true;let i=new h(t,e);return h.#h=false,i}constructor(t,e){if(!h.#h)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]}},H=class h{#h;#c;#g;#E;#b;#F;#I;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#m;#s;#i;#t;#l;#u;#a;#r;#y;#o;#S;#w;#d;#v;#x;#f;#R;static unsafeExposeInternals(t){return {starts:t.#w,ttls:t.#d,sizes:t.#S,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#r},free:t.#y,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#D(e,i,s,r),moveToTail:e=>t.#O(e),indexes:e=>t.#_(e),rindexes:e=>t.#T(e),isStale:e=>t.#p(e)}}get max(){return this.#h}get maxSize(){return this.#c}get calculatedSize(){return this.#m}get size(){return this.#n}get fetchMethod(){return this.#F}get memoMethod(){return this.#I}get dispose(){return this.#g}get onInsert(){return this.#E}get disposeAfter(){return this.#b}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:f,allowStale:l,dispose:b,onInsert:p,disposeAfter:u,noDisposeOnSet:g,noUpdateTTL:m,maxSize:_=0,maxEntrySize:w=0,sizeCalculation:S,fetchMethod:n,memoMethod:a,noDeleteOnFetchRejection:d,noDeleteOnStaleGet:c,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:v,ignoreFetchAbort:A}=t;if(e!==0&&!x(e))throw new TypeError("max option must be a nonnegative integer");let T=e?Z(e):Array;if(!T)throw new Error("invalid max value: "+e);if(this.#h=e,this.#c=_,this.maxEntrySize=w||this.#c,this.sizeCalculation=S,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=a,n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#F=n,this.#x=!!n,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new T(e),this.#u=new T(e),this.#a=0,this.#r=0,this.#y=V.create(e),this.#n=0,this.#m=0,typeof b=="function"&&(this.#g=b),typeof p=="function"&&(this.#E=p),typeof u=="function"?(this.#b=u,this.#o=[]):(this.#b=void 0,this.#o=void 0),this.#v=!!this.#g,this.#R=!!this.#E,this.#f=!!this.#b,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!d,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#c!==0&&!x(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!x(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#j();}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!c,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!f,this.ttlResolution=x(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!x(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P();}if(this.#h===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#c){let L="LRU_CACHE_UNBOUNDED";lt(L)&&(X.add(L),Q("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,h));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#P(){let t=new O(this.#h),e=new O(this.#h);this.#d=t,this.#w=e,this.#H=(r,o,f=C.now())=>{if(e[r]=o!==0?f:0,t[r]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#p(r)&&this.#L(this.#i[r],"expire");},o+1);l.unref&&l.unref();}},this.#z=r=>{e[r]=t[r]!==0?C.now():0;},this.#A=(r,o)=>{if(t[o]){let f=t[o],l=e[o];if(!f||!l)return;r.ttl=f,r.start=l,r.now=i||s();let b=r.now-l;r.remainingTTL=f-b;}};let i=0,s=()=>{let r=C.now();if(this.ttlResolution>0){i=r;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref();}return r};this.getRemainingTTL=r=>{let o=this.#s.get(r);if(o===void 0)return 0;let f=t[o],l=e[o];if(!f||!l)return 1/0;let b=(i||s())-l;return f-b},this.#p=r=>{let o=e[r],f=t[r];return !!f&&!!o&&(i||s())-o>f};}#z=()=>{};#A=()=>{};#H=()=>{};#p=()=>false;#j(){let t=new O(this.#h);this.#m=0,this.#S=t,this.#C=e=>{this.#m-=t[e],t[e]=0;},this.#M=(e,i,s,r)=>{if(this.#e(i))return 0;if(!x(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!x(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#W=(e,i,s)=>{if(t[e]=i,this.#c){let r=this.#c-t[e];for(;this.#m>r;)this.#B(true);}this.#m+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#m);};}#C=t=>{};#W=(t,e,i)=>{};#M=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#r;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#a));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#r));)e=this.#l[e];}#U(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#_())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#_()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#_())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#p(e)&&(this.#L(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#w){let o=this.#d[e],f=this.#w[e];if(o&&f){let l=o-(C.now()-f);r.ttl=l,r.start=Date.now();}}return this.#S&&(r.size=this.#S[e]),r}dump(){let t=[];for(let e of this.#_({allowStale:true})){let i=this.#i[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#d&&this.#w){o.ttl=this.#d[e];let f=C.now()-this.#w[e];o.start=Math.floor(Date.now()-f);}this.#S&&(o.size=this.#S[e]),t.unshift([i,o]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=C.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:f=this.sizeCalculation,status:l}=i,{noUpdateTTL:b=this.noUpdateTTL}=i,p=this.#M(t,e,i.size||0,f);if(this.maxEntrySize&&p>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=true),this.#L(t,"set"),this;let u=this.#n===0?void 0:this.#s.get(t);if(u===void 0)u=this.#n===0?this.#r:this.#y.length!==0?this.#y.pop():this.#n===this.#h?this.#B(false):this.#n,this.#i[u]=t,this.#t[u]=e,this.#s.set(t,u),this.#l[this.#r]=u,this.#u[u]=this.#r,this.#r=u,this.#n++,this.#W(u,p,l),l&&(l.set="add"),b=false,this.#R&&this.#E?.(e,t,"add");else {this.#O(u);let g=this.#t[u];if(e!==g){if(this.#x&&this.#e(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=g;m!==void 0&&!o&&(this.#v&&this.#g?.(m,t,"set"),this.#f&&this.#o?.push([m,t,"set"]));}else o||(this.#v&&this.#g?.(g,t,"set"),this.#f&&this.#o?.push([g,t,"set"]));if(this.#C(u),this.#W(u,p,l),this.#t[u]=e,l){l.set="replace";let m=g&&this.#e(g)?g.__staleWhileFetching:g;m!==void 0&&(l.oldValue=m);}}else l&&(l.set="update");this.#R&&this.onInsert?.(e,t,e===g?"update":"replace");}if(s!==0&&!this.#d&&this.#P(),this.#d&&(b||this.#H(u,s,r),l&&this.#A(l,u)),!o&&this.#f&&this.#o){let g=this.#o,m;for(;m=g?.shift();)this.#b?.(...m);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#a];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#o){let t=this.#o,e;for(;e=t?.shift();)this.#b?.(...e);}}}#B(t){let e=this.#a,i=this.#i[e],s=this.#t[e];return this.#x&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(s,i,"evict"),this.#f&&this.#o?.push([s,i,"evict"])),this.#C(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#y.push(e)),this.#n===1?(this.#a=this.#r=0,this.#y.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#s.get(t);if(r!==void 0){let o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return false;if(this.#p(r))s&&(s.has="stale",this.#A(s,r));else return i&&this.#z(r),s&&(s.has="hit",this.#A(s,r)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#p(s))return;let r=this.#t[s];return this.#e(r)?r.__staleWhileFetching:r}#D(t,e,i,s){let r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;let o=new P,{signal:f}=i;f?.addEventListener("abort",()=>o.abort(f.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:s},b=(w,S=false)=>{let{aborted:n}=o.signal,a=i.ignoreFetchAbort&&w!==void 0;if(i.status&&(n&&!S?(i.status.fetchAborted=true,i.status.fetchError=o.signal.reason,a&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),n&&!a&&!S)return u(o.signal.reason);let d=m;return this.#t[e]===m&&(w===void 0?d.__staleWhileFetching?this.#t[e]=d.__staleWhileFetching:this.#L(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,w,l.options))),w},p=w=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=w),u(w)),u=w=>{let{aborted:S}=o.signal,n=S&&i.allowStaleOnFetchAbort,a=n||i.allowStaleOnFetchRejection,d=a||i.noDeleteOnFetchRejection,c=m;if(this.#t[e]===m&&(!d||c.__staleWhileFetching===void 0?this.#L(t,"fetch"):n||(this.#t[e]=c.__staleWhileFetching)),a)return i.status&&c.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),c.__staleWhileFetching;if(c.__returned===c)throw w},g=(w,S)=>{let n=this.#F?.(t,r,l);n&&n instanceof Promise&&n.then(a=>w(a===void 0?void 0:a),S),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(w(void 0),i.allowStaleOnFetchAbort&&(w=a=>b(a,true)));});};i.status&&(i.status.fetchDispatched=true);let m=new Promise(g).then(b,p),_=Object.assign(m,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,_,{...l.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=_,_}#e(t){if(!this.#x)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof P}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:l=0,sizeCalculation:b=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:w,forceRefresh:S=false,status:n,signal:a}=e;if(!this.#x)return n&&(n.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:n});let d={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:f,size:l,sizeCalculation:b,noUpdateTTL:p,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:_,ignoreFetchAbort:m,status:n,signal:a},c=this.#s.get(t);if(c===void 0){n&&(n.fetch="miss");let y=this.#D(t,c,d,w);return y.__returned=y}else {let y=this.#t[c];if(this.#e(y)){let z=i&&y.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",z&&(n.returnedStale=true)),z?y.__staleWhileFetching:y.__returned=y}let v=this.#p(c);if(!S&&!v)return n&&(n.fetch="hit"),this.#O(c),s&&this.#z(c),n&&this.#A(n,c),y;let A=this.#D(t,c,d,w),L=A.__staleWhileFetching!==void 0&&i;return n&&(n.fetch=v?"stale":"refresh",L&&v&&(n.returnedStale=true)),L?A.__staleWhileFetching:A.__returned=A}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#I;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...o}=e,f=this.get(t,o);if(!r&&f!==void 0)return f;let l=i(t,f,{options:o,context:s});return this.set(t,l,o),l}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,f=this.#s.get(t);if(f!==void 0){let l=this.#t[f],b=this.#e(l);return o&&this.#A(o,f),this.#p(f)?(o&&(o.get="stale"),b?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=true),i?l.__staleWhileFetching:void 0):(r||this.#L(t,"expire"),o&&i&&(o.returnedStale=true),i?l:void 0)):(o&&(o.get="hit"),b?l.__staleWhileFetching:(this.#O(f),s&&this.#z(f),l))}else o&&(o.get="miss");}#G(t,e){this.#u[e]=t,this.#l[t]=e;}#O(t){t!==this.#r&&(t===this.#a?this.#a=this.#l[t]:this.#G(this.#u[t],this.#l[t]),this.#G(this.#r,t),this.#r=t);}delete(t){return this.#L(t,"delete")}#L(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#V(e);else {this.#C(s);let r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(r,t,e),this.#f&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else {let o=this.#u[s];this.#l[o]=this.#l[s];let f=this.#l[s];this.#u[f]=this.#u[s];}this.#n--,this.#y.push(s);}}if(this.#f&&this.#o?.length){let s=this.#o,r;for(;r=s?.shift();)this.#b?.(...r);}return i}clear(){return this.#V("delete")}#V(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#v&&this.#g?.(i,s,t),this.#f&&this.#o?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#S&&this.#S.fill(0),this.#a=0,this.#r=0,this.#y.length=0,this.#m=0,this.#n=0,this.#f&&this.#o){let e=this.#o,i;for(;i=e?.shift();)this.#b?.(...i);}}};var F=class{cache;map=new Map;constructor(t){this.cache=new H({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}get keys(){return this.map.keys}get values(){return this.map.values}};var W=new F({cacheSize:10}),tt;(s=>{function h(r){let o=W.get(r);if(!o){E.error(`Label "${r}" not found`);return}return o}s.get=h;function t(r){if(Array.isArray(r)){r.forEach(o=>t(o));return}W.has(r.id)&&E.info(`Label "${r.id}" already exists, it will be overwritten`),W.set(r.id,r);}s.add=t;function e(){return Array.from(W.values())}s.values=e;function i(r){return W.has(r)}s.has=i;})(tt||={});var et=tt;function ft(h,t,e){let i=new R(h,t,e);return et.add(i),i}export{ft as default};
|
|
1
|
+
var it=Object.create;var j=Object.defineProperty;var st=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var U=(h=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});var N=(h,t)=>()=>(t||h((t={exports:{}}).exports,t),t.exports);var at=(h,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of nt(t))!ot.call(h,s)&&s!==e&&j(h,s,{get:()=>t[s],enumerable:!(i=st(t,s))||i.enumerable});return h};var ht=(h,t,e)=>(e=h!=null?it(rt(h)):{},at(j(e,"default",{value:h,enumerable:true}),h));var $=N((B,k)=>{(function(h,t){typeof B=="object"?k.exports=B=t():typeof define=="function"&&define.amd?define([],t):h.CryptoJS=t();})(B,function(){var h=h||function(t,e){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof U=="function")try{i=U("crypto");}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function n(){}return function(a){var d;return n.prototype=a,d=new n,n.prototype=null,d}}(),o={},f=o.lib={},l=f.Base=function(){return {extend:function(n){var a=r(this);return n&&a.mixIn(n),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var n=this.extend();return n.init.apply(n,arguments),n},init:function(){},mixIn:function(n){for(var a in n)n.hasOwnProperty(a)&&(this[a]=n[a]);n.hasOwnProperty("toString")&&(this.toString=n.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),b=f.WordArray=l.extend({init:function(n,a){n=this.words=n||[],a!=e?this.sigBytes=a:this.sigBytes=n.length*4;},toString:function(n){return (n||u).stringify(this)},concat:function(n){var a=this.words,d=n.words,c=this.sigBytes,y=n.sigBytes;if(this.clamp(),c%4)for(var v=0;v<y;v++){var A=d[v>>>2]>>>24-v%4*8&255;a[c+v>>>2]|=A<<24-(c+v)%4*8;}else for(var T=0;T<y;T+=4)a[c+T>>>2]=d[T>>>2];return this.sigBytes+=y,this},clamp:function(){var n=this.words,a=this.sigBytes;n[a>>>2]&=4294967295<<32-a%4*8,n.length=t.ceil(a/4);},clone:function(){var n=l.clone.call(this);return n.words=this.words.slice(0),n},random:function(n){for(var a=[],d=0;d<n;d+=4)a.push(s());return new b.init(a,n)}}),p=o.enc={},u=p.Hex={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],y=0;y<d;y++){var v=a[y>>>2]>>>24-y%4*8&255;c.push((v>>>4).toString(16)),c.push((v&15).toString(16));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c+=2)d[c>>>3]|=parseInt(n.substr(c,2),16)<<24-c%8*4;return new b.init(d,a/2)}},g=p.Latin1={stringify:function(n){for(var a=n.words,d=n.sigBytes,c=[],y=0;y<d;y++){var v=a[y>>>2]>>>24-y%4*8&255;c.push(String.fromCharCode(v));}return c.join("")},parse:function(n){for(var a=n.length,d=[],c=0;c<a;c++)d[c>>>2]|=(n.charCodeAt(c)&255)<<24-c%4*8;return new b.init(d,a)}},m=p.Utf8={stringify:function(n){try{return decodeURIComponent(escape(g.stringify(n)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(n){return g.parse(unescape(encodeURIComponent(n)))}},_=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new b.init,this._nDataBytes=0;},_append:function(n){typeof n=="string"&&(n=m.parse(n)),this._data.concat(n),this._nDataBytes+=n.sigBytes;},_process:function(n){var a,d=this._data,c=d.words,y=d.sigBytes,v=this.blockSize,A=v*4,T=y/A;n?T=t.ceil(T):T=t.max((T|0)-this._minBufferSize,0);var L=T*v,z=t.min(L*4,y);if(L){for(var M=0;M<L;M+=v)this._doProcessBlock(c,M);a=c.splice(0,L),d.sigBytes-=z;}return new b.init(a,z)},clone:function(){var n=l.clone.call(this);return n._data=this._data.clone(),n},_minBufferSize:0});f.Hasher=_.extend({cfg:l.extend(),init:function(n){this.cfg=this.cfg.extend(n),this.reset();},reset:function(){_.reset.call(this),this._doReset();},update:function(n){return this._append(n),this._process(),this},finalize:function(n){n&&this._append(n);var a=this._doFinalize();return a},blockSize:512/32,_createHelper:function(n){return function(a,d){return new n.init(d).finalize(a)}},_createHmacHelper:function(n){return function(a,d){return new S.HMAC.init(n,d).finalize(a)}}});var S=o.algo={};return o}(Math);return h});});var q=N((D,K)=>{(function(h,t){typeof D=="object"?K.exports=D=t($()):typeof define=="function"&&define.amd?define(["./core"],t):t(h.CryptoJS);})(D,function(h){return function(){var t=h,e=t.lib,i=e.WordArray,s=e.Hasher,r=t.algo,o=[],f=r.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(l,b){for(var p=this._hash.words,u=p[0],g=p[1],m=p[2],_=p[3],w=p[4],S=0;S<80;S++){if(S<16)o[S]=l[b+S]|0;else {var n=o[S-3]^o[S-8]^o[S-14]^o[S-16];o[S]=n<<1|n>>>31;}var a=(u<<5|u>>>27)+w+o[S];S<20?a+=(g&m|~g&_)+1518500249:S<40?a+=(g^m^_)+1859775393:S<60?a+=(g&m|g&_|m&_)-1894007588:a+=(g^m^_)-899497514,w=_,_=m,m=g<<30|g>>>2,g=u,u=a;}p[0]=p[0]+u|0,p[1]=p[1]+g|0,p[2]=p[2]+m|0,p[3]=p[3]+_|0,p[4]=p[4]+w|0;},_doFinalize:function(){var l=this._data,b=l.words,p=this._nDataBytes*8,u=l.sigBytes*8;return b[u>>>5]|=128<<24-u%32,b[(u+64>>>9<<4)+14]=Math.floor(p/4294967296),b[(u+64>>>9<<4)+15]=p,l.sigBytes=b.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});t.SHA1=s._createHelper(f),t.HmacSHA1=s._createHmacHelper(f);}(),h.SHA1});});var J=ht(q());var E;(s=>(s.log=(r,...o)=>console.log(`[Pixi\u2019VN] ${r}`,...o),s.warn=(r,...o)=>console.warn(`[Pixi\u2019VN] ${r}`,...o),s.error=(r,...o)=>console.error(`[Pixi\u2019VN] ${r}`,...o),s.info=(r,...o)=>console.info(`[Pixi\u2019VN] ${r}`,...o)))(E||={});var I=class{constructor(t,e){this._id=t,this._onStepStart=e?.onStepStart,this._onLoadingLabel=e?.onLoadingLabel,this._onStepEnd=e?.onStepEnd;}_id;get id(){return this._id}_onStepStart;get onStepStart(){return async(t,e)=>{if(this._onLoadingLabel&&t===0&&await this._onLoadingLabel(t,e),this._onStepStart)return await this._onStepStart(t,e)}}_onLoadingLabel;get onLoadingLabel(){return this._onLoadingLabel}_onStepEnd;get onStepEnd(){return this._onStepEnd}};var R=class extends I{get stepCount(){return this.steps.length}getStepById(t){return this.steps[t]}constructor(t,e,i){super(t,i),this._steps=e;}_steps;get steps(){return typeof this._steps=="function"?this._steps():this._steps}getStepSha(t){if(t<0||t>=this.steps.length)return E.warn("stepSha not found, setting to ERROR"),"error";try{let e=this.steps[t];return (0,J.default)(e.toString().toLocaleLowerCase()).toString()}catch(e){return E.warn("stepSha not found, setting to ERROR",e),"error"}}};var C=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,X=new Set,G=typeof process=="object"&&process?process:{},Q=(h,t,e,i)=>{typeof G.emitWarning=="function"?G.emitWarning(h,t,e,i):console.error(`[${e}] ${t}: ${h}`);},P=globalThis.AbortController,Y=globalThis.AbortSignal;if(typeof P>"u"){Y=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},P=class{constructor(){t();}signal=new Y;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let h=G.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{h&&(h=false,Q("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));};}var lt=h=>!X.has(h),x=h=>h&&h===Math.floor(h)&&h>0&&isFinite(h),Z=h=>x(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(t){super(t),this.fill(0);}},V=class h{heap;length;static#h=false;static create(t){let e=Z(t);if(!e)return [];h.#h=true;let i=new h(t,e);return h.#h=false,i}constructor(t,e){if(!h.#h)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]}},H=class h{#h;#c;#g;#E;#b;#F;#I;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#m;#s;#i;#t;#l;#u;#a;#r;#y;#o;#S;#w;#d;#v;#x;#f;#R;static unsafeExposeInternals(t){return {starts:t.#w,ttls:t.#d,sizes:t.#S,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#u,get head(){return t.#a},get tail(){return t.#r},free:t.#y,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,r)=>t.#D(e,i,s,r),moveToTail:e=>t.#O(e),indexes:e=>t.#_(e),rindexes:e=>t.#T(e),isStale:e=>t.#p(e)}}get max(){return this.#h}get maxSize(){return this.#c}get calculatedSize(){return this.#m}get size(){return this.#n}get fetchMethod(){return this.#F}get memoMethod(){return this.#I}get dispose(){return this.#g}get onInsert(){return this.#E}get disposeAfter(){return this.#b}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:f,allowStale:l,dispose:b,onInsert:p,disposeAfter:u,noDisposeOnSet:g,noUpdateTTL:m,maxSize:_=0,maxEntrySize:w=0,sizeCalculation:S,fetchMethod:n,memoMethod:a,noDeleteOnFetchRejection:d,noDeleteOnStaleGet:c,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:v,ignoreFetchAbort:A}=t;if(e!==0&&!x(e))throw new TypeError("max option must be a nonnegative integer");let T=e?Z(e):Array;if(!T)throw new Error("invalid max value: "+e);if(this.#h=e,this.#c=_,this.maxEntrySize=w||this.#c,this.sizeCalculation=S,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=a,n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#F=n,this.#x=!!n,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new T(e),this.#u=new T(e),this.#a=0,this.#r=0,this.#y=V.create(e),this.#n=0,this.#m=0,typeof b=="function"&&(this.#g=b),typeof p=="function"&&(this.#E=p),typeof u=="function"?(this.#b=u,this.#o=[]):(this.#b=void 0,this.#o=void 0),this.#v=!!this.#g,this.#R=!!this.#E,this.#f=!!this.#b,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!d,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!v,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#c!==0&&!x(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!x(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#j();}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!c,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!f,this.ttlResolution=x(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!x(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P();}if(this.#h===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#c){let L="LRU_CACHE_UNBOUNDED";lt(L)&&(X.add(L),Q("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",L,h));}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#P(){let t=new O(this.#h),e=new O(this.#h);this.#d=t,this.#w=e,this.#H=(r,o,f=C.now())=>{if(e[r]=o!==0?f:0,t[r]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#p(r)&&this.#L(this.#i[r],"expire");},o+1);l.unref&&l.unref();}},this.#z=r=>{e[r]=t[r]!==0?C.now():0;},this.#A=(r,o)=>{if(t[o]){let f=t[o],l=e[o];if(!f||!l)return;r.ttl=f,r.start=l,r.now=i||s();let b=r.now-l;r.remainingTTL=f-b;}};let i=0,s=()=>{let r=C.now();if(this.ttlResolution>0){i=r;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref();}return r};this.getRemainingTTL=r=>{let o=this.#s.get(r);if(o===void 0)return 0;let f=t[o],l=e[o];if(!f||!l)return 1/0;let b=(i||s())-l;return f-b},this.#p=r=>{let o=e[r],f=t[r];return !!f&&!!o&&(i||s())-o>f};}#z=()=>{};#A=()=>{};#H=()=>{};#p=()=>false;#j(){let t=new O(this.#h);this.#m=0,this.#S=t,this.#C=e=>{this.#m-=t[e],t[e]=0;},this.#M=(e,i,s,r)=>{if(this.#e(i))return 0;if(!x(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,e),!x(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#W=(e,i,s)=>{if(t[e]=i,this.#c){let r=this.#c-t[e];for(;this.#m>r;)this.#B(true);}this.#m+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#m);};}#C=t=>{};#W=(t,e,i)=>{};#M=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#r;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#a));)e=this.#u[e];}*#T({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#a;!(!this.#U(e)||((t||!this.#p(e))&&(yield e),e===this.#r));)e=this.#l[e];}#U(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#_())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*rentries(){for(let t of this.#T())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield [this.#i[t],this.#t[t]]);}*keys(){for(let t of this.#_()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*rkeys(){for(let t of this.#T()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e);}}*values(){for(let t of this.#_())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}*rvalues(){for(let t of this.#T())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;if(r!==void 0&&t(r,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#_()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}rforEach(t,e=this){for(let i of this.#T()){let s=this.#t[i],r=this.#e(s)?s.__staleWhileFetching:s;r!==void 0&&t.call(e,r,this.#i[i],this);}}purgeStale(){let t=false;for(let e of this.#T({allowStale:true}))this.#p(e)&&(this.#L(this.#i[e],"expire"),t=true);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#w){let o=this.#d[e],f=this.#w[e];if(o&&f){let l=o-(C.now()-f);r.ttl=l,r.start=Date.now();}}return this.#S&&(r.size=this.#S[e]),r}dump(){let t=[];for(let e of this.#_({allowStale:true})){let i=this.#i[e],s=this.#t[e],r=this.#e(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let o={value:r};if(this.#d&&this.#w){o.ttl=this.#d[e];let f=C.now()-this.#w[e];o.start=Math.floor(Date.now()-f);}this.#S&&(o.size=this.#S[e]),t.unshift([i,o]);}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=C.now()-s;}this.set(e,i.value,i);}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:f=this.sizeCalculation,status:l}=i,{noUpdateTTL:b=this.noUpdateTTL}=i,p=this.#M(t,e,i.size||0,f);if(this.maxEntrySize&&p>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=true),this.#L(t,"set"),this;let u=this.#n===0?void 0:this.#s.get(t);if(u===void 0)u=this.#n===0?this.#r:this.#y.length!==0?this.#y.pop():this.#n===this.#h?this.#B(false):this.#n,this.#i[u]=t,this.#t[u]=e,this.#s.set(t,u),this.#l[this.#r]=u,this.#u[u]=this.#r,this.#r=u,this.#n++,this.#W(u,p,l),l&&(l.set="add"),b=false,this.#R&&this.#E?.(e,t,"add");else {this.#O(u);let g=this.#t[u];if(e!==g){if(this.#x&&this.#e(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=g;m!==void 0&&!o&&(this.#v&&this.#g?.(m,t,"set"),this.#f&&this.#o?.push([m,t,"set"]));}else o||(this.#v&&this.#g?.(g,t,"set"),this.#f&&this.#o?.push([g,t,"set"]));if(this.#C(u),this.#W(u,p,l),this.#t[u]=e,l){l.set="replace";let m=g&&this.#e(g)?g.__staleWhileFetching:g;m!==void 0&&(l.oldValue=m);}}else l&&(l.set="update");this.#R&&this.onInsert?.(e,t,e===g?"update":"replace");}if(s!==0&&!this.#d&&this.#P(),this.#d&&(b||this.#H(u,s,r),l&&this.#A(l,u)),!o&&this.#f&&this.#o){let g=this.#o,m;for(;m=g?.shift();)this.#b?.(...m);}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#a];if(this.#B(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#f&&this.#o){let t=this.#o,e;for(;e=t?.shift();)this.#b?.(...e);}}}#B(t){let e=this.#a,i=this.#i[e],s=this.#t[e];return this.#x&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(s,i,"evict"),this.#f&&this.#o?.push([s,i,"evict"])),this.#C(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#y.push(e)),this.#n===1?(this.#a=this.#r=0,this.#y.length=0):this.#a=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#s.get(t);if(r!==void 0){let o=this.#t[r];if(this.#e(o)&&o.__staleWhileFetching===void 0)return false;if(this.#p(r))s&&(s.has="stale",this.#A(s,r));else return i&&this.#z(r),s&&(s.has="hit",this.#A(s,r)),true}else s&&(s.has="miss");return false}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#p(s))return;let r=this.#t[s];return this.#e(r)?r.__staleWhileFetching:r}#D(t,e,i,s){let r=e===void 0?void 0:this.#t[e];if(this.#e(r))return r;let o=new P,{signal:f}=i;f?.addEventListener("abort",()=>o.abort(f.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:s},b=(w,S=false)=>{let{aborted:n}=o.signal,a=i.ignoreFetchAbort&&w!==void 0;if(i.status&&(n&&!S?(i.status.fetchAborted=true,i.status.fetchError=o.signal.reason,a&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),n&&!a&&!S)return u(o.signal.reason);let d=m;return this.#t[e]===m&&(w===void 0?d.__staleWhileFetching?this.#t[e]=d.__staleWhileFetching:this.#L(t,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(t,w,l.options))),w},p=w=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=w),u(w)),u=w=>{let{aborted:S}=o.signal,n=S&&i.allowStaleOnFetchAbort,a=n||i.allowStaleOnFetchRejection,d=a||i.noDeleteOnFetchRejection,c=m;if(this.#t[e]===m&&(!d||c.__staleWhileFetching===void 0?this.#L(t,"fetch"):n||(this.#t[e]=c.__staleWhileFetching)),a)return i.status&&c.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),c.__staleWhileFetching;if(c.__returned===c)throw w},g=(w,S)=>{let n=this.#F?.(t,r,l);n&&n instanceof Promise&&n.then(a=>w(a===void 0?void 0:a),S),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(w(void 0),i.allowStaleOnFetchAbort&&(w=a=>b(a,true)));});};i.status&&(i.status.fetchDispatched=true);let m=new Promise(g).then(b,p),_=Object.assign(m,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,_,{...l.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=_,_}#e(t){if(!this.#x)return false;let e=t;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof P}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:f=this.noDisposeOnSet,size:l=0,sizeCalculation:b=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:w,forceRefresh:S=false,status:n,signal:a}=e;if(!this.#x)return n&&(n.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:n});let d={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:f,size:l,sizeCalculation:b,noUpdateTTL:p,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:_,ignoreFetchAbort:m,status:n,signal:a},c=this.#s.get(t);if(c===void 0){n&&(n.fetch="miss");let y=this.#D(t,c,d,w);return y.__returned=y}else {let y=this.#t[c];if(this.#e(y)){let z=i&&y.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",z&&(n.returnedStale=true)),z?y.__staleWhileFetching:y.__returned=y}let v=this.#p(c);if(!S&&!v)return n&&(n.fetch="hit"),this.#O(c),s&&this.#z(c),n&&this.#A(n,c),y;let A=this.#D(t,c,d,w),L=A.__staleWhileFetching!==void 0&&i;return n&&(n.fetch=v?"stale":"refresh",L&&v&&(n.returnedStale=true)),L?A.__staleWhileFetching:A.__returned=A}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#I;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...o}=e,f=this.get(t,o);if(!r&&f!==void 0)return f;let l=i(t,f,{options:o,context:s});return this.set(t,l,o),l}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,f=this.#s.get(t);if(f!==void 0){let l=this.#t[f],b=this.#e(l);return o&&this.#A(o,f),this.#p(f)?(o&&(o.get="stale"),b?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=true),i?l.__staleWhileFetching:void 0):(r||this.#L(t,"expire"),o&&i&&(o.returnedStale=true),i?l:void 0)):(o&&(o.get="hit"),b?l.__staleWhileFetching:(this.#O(f),s&&this.#z(f),l))}else o&&(o.get="miss");}#G(t,e){this.#u[e]=t,this.#l[t]=e;}#O(t){t!==this.#r&&(t===this.#a?this.#a=this.#l[t]:this.#G(this.#u[t],this.#l[t]),this.#G(this.#r,t),this.#r=t);}delete(t){return this.#L(t,"delete")}#L(t,e){let i=false;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=true,this.#n===1)this.#V(e);else {this.#C(s);let r=this.#t[s];if(this.#e(r)?r.__abortController.abort(new Error("deleted")):(this.#v||this.#f)&&(this.#v&&this.#g?.(r,t,e),this.#f&&this.#o?.push([r,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#r)this.#r=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else {let o=this.#u[s];this.#l[o]=this.#l[s];let f=this.#l[s];this.#u[f]=this.#u[s];}this.#n--,this.#y.push(s);}}if(this.#f&&this.#o?.length){let s=this.#o,r;for(;r=s?.shift();)this.#b?.(...r);}return i}clear(){return this.#V("delete")}#V(t){for(let e of this.#T({allowStale:true})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[e];this.#v&&this.#g?.(i,s,t),this.#f&&this.#o?.push([i,s,t]);}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#S&&this.#S.fill(0),this.#a=0,this.#r=0,this.#y.length=0,this.#m=0,this.#n=0,this.#f&&this.#o){let e=this.#o,i;for(;i=e?.shift();)this.#b?.(...i);}}};var F=class{cache;map=new Map;constructor(t){this.cache=new H({max:t.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(t){let e=this.map.delete(t);return e&&this.cache.delete(t),e}get forEach(){return this.map.forEach}get(t){let e=this.cache.get(t);return e||this.map.get(t)}has(t){return this.map.has(t)}set(t,e){return this.map.set(t,e),this.cache.set(t,e),this}get size(){return this.map.size}get entries(){return this.map.entries}keys(){return this.map.keys()}get values(){return this.map.values}};var W=new F({cacheSize:10}),tt;(s=>{function h(r){let o=W.get(r);if(!o){E.error(`Label "${r}" not found`);return}return o}s.get=h;function t(r){if(Array.isArray(r)){r.forEach(o=>t(o));return}W.has(r.id)&&E.info(`Label "${r.id}" already exists, it will be overwritten`),W.set(r.id,r);}s.add=t;function e(){return Array.from(W.values())}s.values=e;function i(r){return W.has(r)}s.has=i;})(tt||={});var et=tt;function ft(h,t,e){let i=new R(h,t,e);return et.add(i),i}export{ft as default};
|