@drincs/pixi-vn 1.2.13 → 1.2.15

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.
@@ -1 +1 @@
1
- 'use strict';var u;(s=>(s.log=(r,...a)=>console.log(`[Pixi\u2019VN] ${r}`,...a),s.warn=(r,...a)=>console.warn(`[Pixi\u2019VN] ${r}`,...a),s.error=(r,...a)=>console.error(`[Pixi\u2019VN] ${r}`,...a),s.info=(r,...a)=>console.info(`[Pixi\u2019VN] ${r}`,...a)))(u||={});var x=class n{static init(e){n._getStepCounter=e.getStepCounter,n._setStepCounter=e.setStepCounter,n._getCurrentGameStepState=e.getCurrentGameStepState,n._restoreGameStepState=e.restoreGameStepState,n._getOpenedLabels=e.getOpenedLabels,e.onGoNextEnd&&(n._onGoNextEnd=e.onGoNextEnd),n._getVariable=e.getVariable,n._setVariable=e.setVariable,n._removeVariable=e.removeVariable,n._getFlag=e.getFlag,n._setFlag=e.setFlag,e.onLabelClosing&&(n._onLabelClosing=e.onLabelClosing),n._addHistoryItem=e.addHistoryItem,n._getCurrentStepsRunningNumber=e.getCurrentStepsRunningNumber,n._getCharacter=e.getCharacter;}static _getStepCounter=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static _setStepCounter=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get stepCounter(){return n._getStepCounter()}static set stepCounter(e){n._setStepCounter(e);}static _getCurrentGameStepState=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get currentGameStepState(){return n._getCurrentGameStepState()}static _restoreGameStepState=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get restoreGameStepState(){return n._restoreGameStepState}static _getOpenedLabels=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get openedLabels(){return n._getOpenedLabels()}static _onGoNextEnd=async()=>{};static get onGoNextEnd(){return n._onGoNextEnd}static _getVariable=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get getVariable(){return n._getVariable}static _setVariable=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get setVariable(){return n._setVariable}static _removeVariable=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get removeVariable(){return n._removeVariable}static _getFlag=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get getFlag(){return n._getFlag}static _setFlag=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get setFlag(){return n._setFlag}static _onLabelClosing=()=>{};static get onLabelClosing(){return n._onLabelClosing}static _addHistoryItem=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get addHistoryItem(){return n._addHistoryItem}static _getCurrentStepsRunningNumber=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get currentStepsRunningNumber(){return n._getCurrentStepsRunningNumber()}static _getCharacter=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented.")};static get getCharacter(){return n._getCharacter}static onEnd;static onError};function V(n){try{if(typeof n>"u")return n;let e=JSON.stringify(n);return JSON.parse(e)}catch(e){throw u.error("Error creating exportable element",n,e),new Error("[Pixi\u2019VN] Error creating exportable element")}}var C=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,U=new Set,W=typeof process=="object"&&process?process:{},H=(n,e,t,i)=>{typeof W.emitWarning=="function"?W.emitWarning(n,e,t,i):console.error(`[${t}] ${e}: ${n}`);},L=globalThis.AbortController,j=globalThis.AbortSignal;if(typeof L>"u"){j=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},L=class{constructor(){e();}signal=new j;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 n=W.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{n&&(n=false,H("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e));};}var $=n=>!U.has(n),v=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),K=n=>v(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?F:null:null,F=class extends Array{constructor(e){super(e),this.fill(0);}},P=class n{heap;length;static#h=false;static create(e){let t=K(e);if(!t)return [];n.#h=true;let i=new n(e,t);return n.#h=false,i}constructor(e,t){if(!n.#h)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},R=class n{#h;#f;#m;#C;#p;#x;#M;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#r;#S;#s;#i;#e;#l;#u;#o;#n;#b;#a;#y;#w;#d;#_;#z;#c;#I;static unsafeExposeInternals(e){return {starts:e.#w,ttls:e.#d,sizes:e.#y,keyMap:e.#s,keyList:e.#i,valList:e.#e,next:e.#l,prev:e.#u,get head(){return e.#o},get tail(){return e.#n},free:e.#b,isBackgroundFetch:t=>e.#t(t),backgroundFetch:(t,i,s,r)=>e.#R(t,i,s,r),moveToTail:t=>e.#O(t),indexes:t=>e.#E(t),rindexes:t=>e.#v(t),isStale:t=>e.#g(t)}}get max(){return this.#h}get maxSize(){return this.#f}get calculatedSize(){return this.#S}get size(){return this.#r}get fetchMethod(){return this.#x}get memoMethod(){return this.#M}get dispose(){return this.#m}get onInsert(){return this.#C}get disposeAfter(){return this.#p}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:h,dispose:p,onInsert:w,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:g,maxSize:G=0,maxEntrySize:m=0,sizeCalculation:_,fetchMethod:c,memoMethod:b,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:O,ignoreFetchAbort:T}=e;if(t!==0&&!v(t))throw new TypeError("max option must be a nonnegative integer");let I=t?K(t):Array;if(!I)throw new Error("invalid max value: "+t);if(this.#h=t,this.#f=G,this.maxEntrySize=m||this.#f,this.sizeCalculation=_,this.sizeCalculation){if(!this.#f&&!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(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#M=b,c!==void 0&&typeof c!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#x=c,this.#z=!!c,this.#s=new Map,this.#i=new Array(t).fill(void 0),this.#e=new Array(t).fill(void 0),this.#l=new I(t),this.#u=new I(t),this.#o=0,this.#n=0,this.#b=P.create(t),this.#r=0,this.#S=0,typeof p=="function"&&(this.#m=p),typeof w=="function"&&(this.#C=w),typeof f=="function"?(this.#p=f,this.#a=[]):(this.#p=void 0,this.#a=void 0),this.#_=!!this.#m,this.#I=!!this.#C,this.#c=!!this.#p,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#f!==0&&!v(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!v(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H();}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=v(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!v(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D();}if(this.#h===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#f){let z="LRU_CACHE_UNBOUNDED";$(z)&&(U.add(z),H("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",z,n));}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#D(){let e=new F(this.#h),t=new F(this.#h);this.#d=e,this.#w=t,this.#N=(r,a,l=C.now())=>{if(t[r]=a!==0?l:0,e[r]=a,a!==0&&this.ttlAutopurge){let h=setTimeout(()=>{this.#g(r)&&this.#G(this.#i[r],"expire");},a+1);h.unref&&h.unref();}},this.#F=r=>{t[r]=e[r]!==0?C.now():0;},this.#T=(r,a)=>{if(e[a]){let l=e[a],h=t[a];if(!l||!h)return;r.ttl=l,r.start=h,r.now=i||s();let p=r.now-h;r.remainingTTL=l-p;}};let i=0,s=()=>{let r=C.now();if(this.ttlResolution>0){i=r;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref();}return r};this.getRemainingTTL=r=>{let a=this.#s.get(r);if(a===void 0)return 0;let l=e[a],h=t[a];if(!l||!h)return 1/0;let p=(i||s())-h;return l-p},this.#g=r=>{let a=t[r],l=e[r];return !!l&&!!a&&(i||s())-a>l};}#F=()=>{};#T=()=>{};#N=()=>{};#g=()=>false;#H(){let e=new F(this.#h);this.#S=0,this.#y=e,this.#A=t=>{this.#S-=e[t],e[t]=0;},this.#W=(t,i,s,r)=>{if(this.#t(i))return 0;if(!v(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,t),!v(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.#V=(t,i,s)=>{if(e[t]=i,this.#f){let r=this.#f-e[t];for(;this.#S>r;)this.#L(true);}this.#S+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#S);};}#A=e=>{};#V=(e,t,i)=>{};#W=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#E({allowStale:e=this.allowStale}={}){if(this.#r)for(let t=this.#n;!(!this.#P(t)||((e||!this.#g(t))&&(yield t),t===this.#o));)t=this.#u[t];}*#v({allowStale:e=this.allowStale}={}){if(this.#r)for(let t=this.#o;!(!this.#P(t)||((e||!this.#g(t))&&(yield t),t===this.#n));)t=this.#l[t];}#P(e){return e!==void 0&&this.#s.get(this.#i[e])===e}*entries(){for(let e of this.#E())this.#e[e]!==void 0&&this.#i[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#i[e],this.#e[e]]);}*rentries(){for(let e of this.#v())this.#e[e]!==void 0&&this.#i[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#i[e],this.#e[e]]);}*keys(){for(let e of this.#E()){let t=this.#i[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*rkeys(){for(let e of this.#v()){let t=this.#i[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*values(){for(let e of this.#E())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#v())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#E()){let s=this.#e[i],r=this.#t(s)?s.__staleWhileFetching:s;if(r!==void 0&&e(r,this.#i[i],this))return this.get(this.#i[i],t)}}forEach(e,t=this){for(let i of this.#E()){let s=this.#e[i],r=this.#t(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#i[i],this);}}rforEach(e,t=this){for(let i of this.#v()){let s=this.#e[i],r=this.#t(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#i[i],this);}}purgeStale(){let e=false;for(let t of this.#v({allowStale:true}))this.#g(t)&&(this.#G(this.#i[t],"expire"),e=true);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let i=this.#e[t],s=this.#t(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#w){let a=this.#d[t],l=this.#w[t];if(a&&l){let h=a-(C.now()-l);r.ttl=h,r.start=Date.now();}}return this.#y&&(r.size=this.#y[t]),r}dump(){let e=[];for(let t of this.#E({allowStale:true})){let i=this.#i[t],s=this.#e[t],r=this.#t(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let a={value:r};if(this.#d&&this.#w){a.ttl=this.#d[t];let l=C.now()-this.#w[t];a.start=Math.floor(Date.now()-l);}this.#y&&(a.size=this.#y[t]),e.unshift([i,a]);}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=C.now()-s;}this.set(t,i.value,i);}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:h}=i,{noUpdateTTL:p=this.noUpdateTTL}=i,w=this.#W(e,t,i.size||0,l);if(this.maxEntrySize&&w>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=true),this.#G(e,"set"),this;let f=this.#r===0?void 0:this.#s.get(e);if(f===void 0)f=this.#r===0?this.#n:this.#b.length!==0?this.#b.pop():this.#r===this.#h?this.#L(false):this.#r,this.#i[f]=e,this.#e[f]=t,this.#s.set(e,f),this.#l[this.#n]=f,this.#u[f]=this.#n,this.#n=f,this.#r++,this.#V(f,w,h),h&&(h.set="add"),p=false,this.#I&&this.#C?.(t,e,"add");else {this.#O(f);let d=this.#e[f];if(t!==d){if(this.#z&&this.#t(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=d;g!==void 0&&!a&&(this.#_&&this.#m?.(g,e,"set"),this.#c&&this.#a?.push([g,e,"set"]));}else a||(this.#_&&this.#m?.(d,e,"set"),this.#c&&this.#a?.push([d,e,"set"]));if(this.#A(f),this.#V(f,w,h),this.#e[f]=t,h){h.set="replace";let g=d&&this.#t(d)?d.__staleWhileFetching:d;g!==void 0&&(h.oldValue=g);}}else h&&(h.set="update");this.#I&&this.onInsert?.(t,e,t===d?"update":"replace");}if(s!==0&&!this.#d&&this.#D(),this.#d&&(p||this.#N(f,s,r),h&&this.#T(h,f)),!a&&this.#c&&this.#a){let d=this.#a,g;for(;g=d?.shift();)this.#p?.(...g);}return this}pop(){try{for(;this.#r;){let e=this.#e[this.#o];if(this.#L(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#c&&this.#a){let e=this.#a,t;for(;t=e?.shift();)this.#p?.(...t);}}}#L(e){let t=this.#o,i=this.#i[t],s=this.#e[t];return this.#z&&this.#t(s)?s.__abortController.abort(new Error("evicted")):(this.#_||this.#c)&&(this.#_&&this.#m?.(s,i,"evict"),this.#c&&this.#a?.push([s,i,"evict"])),this.#A(t),e&&(this.#i[t]=void 0,this.#e[t]=void 0,this.#b.push(t)),this.#r===1?(this.#o=this.#n=0,this.#b.length=0):this.#o=this.#l[t],this.#s.delete(i),this.#r--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,r=this.#s.get(e);if(r!==void 0){let a=this.#e[r];if(this.#t(a)&&a.__staleWhileFetching===void 0)return false;if(this.#g(r))s&&(s.has="stale",this.#T(s,r));else return i&&this.#F(r),s&&(s.has="hit",this.#T(s,r)),true}else s&&(s.has="miss");return false}peek(e,t={}){let{allowStale:i=this.allowStale}=t,s=this.#s.get(e);if(s===void 0||!i&&this.#g(s))return;let r=this.#e[s];return this.#t(r)?r.__staleWhileFetching:r}#R(e,t,i,s){let r=t===void 0?void 0:this.#e[t];if(this.#t(r))return r;let a=new L,{signal:l}=i;l?.addEventListener("abort",()=>a.abort(l.reason),{signal:a.signal});let h={signal:a.signal,options:i,context:s},p=(m,_=false)=>{let{aborted:c}=a.signal,b=i.ignoreFetchAbort&&m!==void 0;if(i.status&&(c&&!_?(i.status.fetchAborted=true,i.status.fetchError=a.signal.reason,b&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),c&&!b&&!_)return f(a.signal.reason);let E=g;return this.#e[t]===g&&(m===void 0?E.__staleWhileFetching?this.#e[t]=E.__staleWhileFetching:this.#G(e,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(e,m,h.options))),m},w=m=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=m),f(m)),f=m=>{let{aborted:_}=a.signal,c=_&&i.allowStaleOnFetchAbort,b=c||i.allowStaleOnFetchRejection,E=b||i.noDeleteOnFetchRejection,S=g;if(this.#e[t]===g&&(!E||S.__staleWhileFetching===void 0?this.#G(e,"fetch"):c||(this.#e[t]=S.__staleWhileFetching)),b)return i.status&&S.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),S.__staleWhileFetching;if(S.__returned===S)throw m},d=(m,_)=>{let c=this.#x?.(e,r,h);c&&c instanceof Promise&&c.then(b=>m(b===void 0?void 0:b),_),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=b=>p(b,true)));});};i.status&&(i.status.fetchDispatched=true);let g=new Promise(d).then(p,w),G=Object.assign(g,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return t===void 0?(this.set(e,G,{...h.options,status:void 0}),t=this.#s.get(e)):this.#e[t]=G,G}#t(e){if(!this.#z)return false;let t=e;return !!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof L}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:h=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:w=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:G=this.allowStaleOnFetchAbort,context:m,forceRefresh:_=false,status:c,signal:b}=t;if(!this.#z)return c&&(c.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:c});let E={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:l,size:h,sizeCalculation:p,noUpdateTTL:w,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:G,ignoreFetchAbort:g,status:c,signal:b},S=this.#s.get(e);if(S===void 0){c&&(c.fetch="miss");let y=this.#R(e,S,E,m);return y.__returned=y}else {let y=this.#e[S];if(this.#t(y)){let N=i&&y.__staleWhileFetching!==void 0;return c&&(c.fetch="inflight",N&&(c.returnedStale=true)),N?y.__staleWhileFetching:y.__returned=y}let O=this.#g(S);if(!_&&!O)return c&&(c.fetch="hit"),this.#O(S),s&&this.#F(S),c&&this.#T(c,S),y;let T=this.#R(e,S,E,m),z=T.__staleWhileFetching!==void 0&&i;return c&&(c.fetch=O?"stale":"refresh",z&&O&&(c.returnedStale=true)),z?T.__staleWhileFetching:T.__returned=T}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#M;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...a}=t,l=this.get(e,a);if(!r&&l!==void 0)return l;let h=i(e,l,{options:a,context:s});return this.set(e,h,a),h}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=t,l=this.#s.get(e);if(l!==void 0){let h=this.#e[l],p=this.#t(h);return a&&this.#T(a,l),this.#g(l)?(a&&(a.get="stale"),p?(a&&i&&h.__staleWhileFetching!==void 0&&(a.returnedStale=true),i?h.__staleWhileFetching:void 0):(r||this.#G(e,"expire"),a&&i&&(a.returnedStale=true),i?h:void 0)):(a&&(a.get="hit"),p?h.__staleWhileFetching:(this.#O(l),s&&this.#F(l),h))}else a&&(a.get="miss");}#j(e,t){this.#u[t]=e,this.#l[e]=t;}#O(e){e!==this.#n&&(e===this.#o?this.#o=this.#l[e]:this.#j(this.#u[e],this.#l[e]),this.#j(this.#n,e),this.#n=e);}delete(e){return this.#G(e,"delete")}#G(e,t){let i=false;if(this.#r!==0){let s=this.#s.get(e);if(s!==void 0)if(i=true,this.#r===1)this.#U(t);else {this.#A(s);let r=this.#e[s];if(this.#t(r)?r.__abortController.abort(new Error("deleted")):(this.#_||this.#c)&&(this.#_&&this.#m?.(r,e,t),this.#c&&this.#a?.push([r,e,t])),this.#s.delete(e),this.#i[s]=void 0,this.#e[s]=void 0,s===this.#n)this.#n=this.#u[s];else if(s===this.#o)this.#o=this.#l[s];else {let a=this.#u[s];this.#l[a]=this.#l[s];let l=this.#l[s];this.#u[l]=this.#u[s];}this.#r--,this.#b.push(s);}}if(this.#c&&this.#a?.length){let s=this.#a,r;for(;r=s?.shift();)this.#p?.(...r);}return i}clear(){return this.#U("delete")}#U(e){for(let t of this.#v({allowStale:true})){let i=this.#e[t];if(this.#t(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[t];this.#_&&this.#m?.(i,s,e),this.#c&&this.#a?.push([i,s,e]);}}if(this.#s.clear(),this.#e.fill(void 0),this.#i.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#y&&this.#y.fill(0),this.#o=0,this.#n=0,this.#b.length=0,this.#S=0,this.#r=0,this.#c&&this.#a){let t=this.#a,i;for(;i=t?.shift();)this.#p?.(...i);}}};var A=class{cache;map=new Map;constructor(e){this.cache=new R({max:e.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(e){let t=this.map.delete(e);return t&&this.cache.delete(e),t}get forEach(){return this.map.forEach}get(e){let t=this.cache.get(e);return t||this.map.get(e)}has(e){return this.map.has(e)}set(e,t){return this.map.set(e,t),this.cache.set(e,t),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 o=class n{static storage=new A({cacheSize:20});static startingStorage=[];static flags=Array();static tempStorage=new Map;static tempStorageDeadlines=new Map;constructor(){}static clearOldTempVariables(e){n.tempStorageDeadlines.forEach((t,i)=>{t>e&&(n.tempStorage.delete(i),n.tempStorageDeadlines.delete(i),n.storage.cache.delete(i));});}static setVariable(e,t){let i=n.tempStorage.has(e);t==null?(n.storage.map.delete(e),!i&&n.storage.cache.delete(e)):(n.storage.map.set(e,t),!i&&n.storage.cache.set(e,t));}static getVariable(e){let t=n.storage.cache.get(e);return t===void 0&&(t=n.tempStorage.get(e)),t===void 0&&(t=n.storage.map.get(e)),V(t)}static removeVariable(e){n.storage.delete(e);}static setFlag(e,t){if(t)this.flags.includes(e)||this.flags.push(e);else {let i=this.flags.indexOf(e);i>-1&&this.flags.splice(i,1);}}static getFlag(e){return this.flags.includes(e)}};var M=class{get storage(){return o.storage.map}get cache(){return o.storage.cache}get flags(){return o.flags}get tempStorage(){return o.tempStorage}get tempStorageDeadlines(){return o.tempStorageDeadlines}set startingStorage(e){let t=[];Object.entries(e).forEach(([i,s])=>{t.push({key:i,value:s});}),o.startingStorage=t;}setVariable(e,t){return o.setVariable(e,t)}getVariable(e){return o.getVariable(e)}removeVariable(e){return o.removeVariable(e)}setTempVariable(e,t){if(t==null){this.removeTempVariable(e);return}else o.tempStorage.set(e,t),o.storage.cache.set(e,t),o.tempStorageDeadlines.has(e)||o.tempStorageDeadlines.set(e,x.openedLabels);}removeTempVariable(e){o.tempStorage.has(e)&&(o.tempStorage.delete(e),o.tempStorageDeadlines.delete(e),o.storage.cache.delete(e));}setFlag(e,t){return o.setFlag(e,t)}getFlag(e){return o.getFlag(e)}clear(){this.storage.clear(),this.cache.clear(),o.flags=[],o.tempStorage.clear(),o.tempStorageDeadlines.clear(),o.startingStorage.forEach(({key:e,value:t})=>{this.storage.set(e,t);});}export(){let e=[];[...this.storage.keys()].forEach(s=>{e.push({key:s,value:this.storage.get(s)});});let t=[];[...o.tempStorage.keys()].forEach(s=>{t.push({key:s,value:o.tempStorage.get(s)});});let i=[];return [...o.tempStorageDeadlines.keys()].forEach(s=>{i.push({key:s,value:o.tempStorageDeadlines.get(s)});}),V({base:e,temp:t,tempDeadlines:i,flags:o.flags})}restore(e){this.clear();try{e?(Array.isArray(e)&&e.forEach(t=>{if(t.key==="___temp_storage___"){let i=t.value;Object.entries(i).forEach(([s,r])=>{o.tempStorage.set(s,r);});}else if(t.key==="___temp_storage_deadlines___"){let i=t.value;Object.entries(i).forEach(([s,r])=>{o.tempStorageDeadlines.set(s,r);});}else t.key==="___flags___"?t.value.forEach(s=>{o.flags.push(s);}):this.storage.set(t.key,t.value);}),"base"in e&&"temp"in e&&"tempDeadlines"in e?(e.base?.forEach(t=>{this.storage.set(t.key,t.value);}),e.temp?.forEach(t=>{o.tempStorage.set(t.key,t.value);}),e.tempDeadlines?.forEach(t=>{o.tempStorageDeadlines.set(t.key,t.value);})):Object.entries(e).forEach(([t,i])=>{t==="___temp_storage___"?Object.entries(i).forEach(([s,r])=>{o.tempStorage.set(s,r);}):t==="___temp_storage_deadlines___"?Object.entries(i).forEach(([s,r])=>{o.tempStorageDeadlines.set(s,r);}):t==="___flags___"?i.forEach(s=>{o.flags.push(s);}):this.storage.set(t,i);})):u.warn("No storage data found");}catch(t){u.error("Error importing data",t);}}};var D=class{constructor(e,t){this.categoryId=e,this._id=t;}_id;get id(){return this._id}categoryId;setStorageProperty(e,t){let i=o.getVariable(this.categoryId);i||(i={}),i.hasOwnProperty(this.id)||(i[this.id]={}),t==null?i[this.id].hasOwnProperty(e)&&delete i[this.id][e]:i[this.id]={...i[this.id],[e]:t},Object.keys(i[this.id]).length===0&&delete i[this.id],o.setVariable(this.categoryId,i);}getStorageProperty(e,t=this.id){let i=o.getVariable(this.categoryId);if(i&&i.hasOwnProperty(t)&&i[t].hasOwnProperty(e))return i[t][e]}};var pe=new M;exports.StorageManagerStatic=o;exports.StoredClassModel=D;exports.storage=pe;
1
+ 'use strict';var Qt=Object.defineProperty;var Kt=l=>{throw TypeError(l)};var Zt=(l,t,i)=>t in l?Qt(l,t,{enumerable:true,configurable:true,writable:true,value:i}):l[t]=i;var c=(l,t,i)=>Zt(l,typeof t!="symbol"?t+"":t,i),Lt=(l,t,i)=>t.has(l)||Kt("Cannot "+i);var e=(l,t,i)=>(Lt(l,t,"read from private field"),i?i.call(l):t.get(l)),b=(l,t,i)=>t.has(l)?Kt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(l):t.set(l,i),u=(l,t,i,s)=>(Lt(l,t,"write to private field"),t.set(l,i),i),h=(l,t,i)=>(Lt(l,t,"access private method"),i);var Ct=(l,t,i,s)=>({set _(r){u(l,t,r);},get _(){return e(l,t,s)}});var T;(r=>(r.log=(n,...a)=>console.log(`[Pixi\u2019VN] ${n}`,...a),r.warn=(n,...a)=>console.warn(`[Pixi\u2019VN] ${n}`,...a),r.error=(n,...a)=>console.error(`[Pixi\u2019VN] ${n}`,...a),r.info=(n,...a)=>console.info(`[Pixi\u2019VN] ${n}`,...a)))(T||(T={}));var f=class f{static init(t){f._getStepCounter=t.getStepCounter,f._setStepCounter=t.setStepCounter,f._getCurrentGameStepState=t.getCurrentGameStepState,f._restoreGameStepState=t.restoreGameStepState,f._getOpenedLabels=t.getOpenedLabels,t.onGoNextEnd&&(f._onGoNextEnd=t.onGoNextEnd),f._getVariable=t.getVariable,f._setVariable=t.setVariable,f._removeVariable=t.removeVariable,f._getFlag=t.getFlag,f._setFlag=t.setFlag,t.onLabelClosing&&(f._onLabelClosing=t.onLabelClosing),f._addHistoryItem=t.addHistoryItem,f._getCurrentStepsRunningNumber=t.getCurrentStepsRunningNumber,f._getCharacter=t.getCharacter;}static get stepCounter(){return f._getStepCounter()}static set stepCounter(t){f._setStepCounter(t);}static get currentGameStepState(){return f._getCurrentGameStepState()}static get restoreGameStepState(){return f._restoreGameStepState}static get openedLabels(){return f._getOpenedLabels()}static get onGoNextEnd(){return f._onGoNextEnd}static get getVariable(){return f._getVariable}static get setVariable(){return f._setVariable}static get removeVariable(){return f._removeVariable}static get getFlag(){return f._getFlag}static get setFlag(){return f._setFlag}static get onLabelClosing(){return f._onLabelClosing}static get addHistoryItem(){return f._addHistoryItem}static get currentStepsRunningNumber(){return f._getCurrentStepsRunningNumber()}static get getCharacter(){return f._getCharacter}};c(f,"_getStepCounter",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_setStepCounter",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getCurrentGameStepState",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_restoreGameStepState",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getOpenedLabels",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_onGoNextEnd",async()=>{}),c(f,"_getVariable",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_setVariable",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_removeVariable",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getFlag",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_setFlag",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_onLabelClosing",()=>{}),c(f,"_addHistoryItem",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getCurrentStepsRunningNumber",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getCharacter",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented.")}),c(f,"onEnd"),c(f,"onError");var Et=f;function Ft(l){try{if(typeof l>"u")return l;let t=JSON.stringify(l);return JSON.parse(t)}catch(t){throw T.error("Error creating exportable element",l,t),new Error("[Pixi\u2019VN] Error creating exportable element")}}var ft=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,qt=new Set,Rt=typeof process=="object"&&process?process:{},Jt=(l,t,i,s)=>{typeof Rt.emitWarning=="function"?Rt.emitWarning(l,t,i,s):console.error(`[${i}] ${t}: ${l}`);},xt=globalThis.AbortController,$t=globalThis.AbortSignal;if(typeof xt>"u"){$t=class{constructor(){c(this,"onabort");c(this,"_onabort",[]);c(this,"reason");c(this,"aborted",false);}addEventListener(s,r){this._onabort.push(r);}},xt=class{constructor(){c(this,"signal",new $t);t();}abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=true;for(let r of this.signal._onabort)r(s);this.signal.onabort?.(s);}}};let l=Rt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=false,Jt("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 kt=l=>!qt.has(l),et=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),Yt=l=>et(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?dt:null:null,dt=class extends Array{constructor(t){super(t),this.fill(0);}},gt,at=class at{constructor(t,i){c(this,"heap");c(this,"length");if(!e(at,gt))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(t),this.length=0;}static create(t){let i=Yt(t);if(!i)return [];u(at,gt,true);let s=new at(t,i);return u(at,gt,false),s}push(t){this.heap[this.length++]=t;}pop(){return this.heap[--this.length]}};gt=new WeakMap,b(at,gt,false);var Dt=at,Bt,Ut,K,D,$,ot,B,mt,pt,F,U,G,w,p,M,N,I,A,q,O,J,Y,W,X,nt,V,St,o,Nt,ht,k,vt,P,Xt,lt,bt,Tt,it,st,Wt,At,Ot,y,Pt,_t,rt,jt,Ht=class Ht{constructor(t){b(this,o);b(this,K);b(this,D);b(this,$);b(this,ot);b(this,B);b(this,mt);b(this,pt);c(this,"ttl");c(this,"ttlResolution");c(this,"ttlAutopurge");c(this,"updateAgeOnGet");c(this,"updateAgeOnHas");c(this,"allowStale");c(this,"noDisposeOnSet");c(this,"noUpdateTTL");c(this,"maxEntrySize");c(this,"sizeCalculation");c(this,"noDeleteOnFetchRejection");c(this,"noDeleteOnStaleGet");c(this,"allowStaleOnFetchAbort");c(this,"allowStaleOnFetchRejection");c(this,"ignoreFetchAbort");b(this,F);b(this,U);b(this,G);b(this,w);b(this,p);b(this,M);b(this,N);b(this,I);b(this,A);b(this,q);b(this,O);b(this,J);b(this,Y);b(this,W);b(this,X);b(this,nt);b(this,V);b(this,St);b(this,ht,()=>{});b(this,k,()=>{});b(this,vt,()=>{});b(this,P,()=>false);b(this,lt,t=>{});b(this,bt,(t,i,s)=>{});b(this,Tt,(t,i,s,r)=>{if(s||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});c(this,Bt,"LRUCache");let{max:i=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:m,allowStale:d,dispose:C,onInsert:Q,disposeAfter:E,noDisposeOnSet:tt,noUpdateTTL:j,maxSize:Z=0,maxEntrySize:v=0,sizeCalculation:_,fetchMethod:S,memoMethod:L,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:wt,ignoreFetchAbort:ct}=t;if(i!==0&&!et(i))throw new TypeError("max option must be a nonnegative integer");let zt=i?Yt(i):Array;if(!zt)throw new Error("invalid max value: "+i);if(u(this,K,i),u(this,D,Z),this.maxEntrySize=v||e(this,D),this.sizeCalculation=_,this.sizeCalculation){if(!e(this,D)&&!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(L!==void 0&&typeof L!="function")throw new TypeError("memoMethod must be a function if defined");if(u(this,pt,L),S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(u(this,mt,S),u(this,nt,!!S),u(this,G,new Map),u(this,w,new Array(i).fill(void 0)),u(this,p,new Array(i).fill(void 0)),u(this,M,new zt(i)),u(this,N,new zt(i)),u(this,I,0),u(this,A,0),u(this,q,Dt.create(i)),u(this,F,0),u(this,U,0),typeof C=="function"&&u(this,$,C),typeof Q=="function"&&u(this,ot,Q),typeof E=="function"?(u(this,B,E),u(this,O,[])):(u(this,B,void 0),u(this,O,void 0)),u(this,X,!!e(this,$)),u(this,St,!!e(this,ot)),u(this,V,!!e(this,B)),this.noDisposeOnSet=!!tt,this.noUpdateTTL=!!j,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!H,this.allowStaleOnFetchAbort=!!wt,this.ignoreFetchAbort=!!ct,this.maxEntrySize!==0){if(e(this,D)!==0&&!et(e(this,D)))throw new TypeError("maxSize must be a positive integer if specified");if(!et(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");h(this,o,Xt).call(this);}if(this.allowStale=!!d,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!m,this.ttlResolution=et(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!et(this.ttl))throw new TypeError("ttl must be a positive integer if specified");h(this,o,Nt).call(this);}if(e(this,K)===0&&this.ttl===0&&e(this,D)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!e(this,K)&&!e(this,D)){let ut="LRU_CACHE_UNBOUNDED";kt(ut)&&(qt.add(ut),Jt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ut,Ht));}}static unsafeExposeInternals(t){return {starts:e(t,Y),ttls:e(t,W),sizes:e(t,J),keyMap:e(t,G),keyList:e(t,w),valList:e(t,p),next:e(t,M),prev:e(t,N),get head(){return e(t,I)},get tail(){return e(t,A)},free:e(t,q),isBackgroundFetch:i=>{var s;return h(s=t,o,y).call(s,i)},backgroundFetch:(i,s,r,n)=>{var a;return h(a=t,o,Ot).call(a,i,s,r,n)},moveToTail:i=>{var s;return h(s=t,o,_t).call(s,i)},indexes:i=>{var s;return h(s=t,o,it).call(s,i)},rindexes:i=>{var s;return h(s=t,o,st).call(s,i)},isStale:i=>{var s;return e(s=t,P).call(s,i)}}}get max(){return e(this,K)}get maxSize(){return e(this,D)}get calculatedSize(){return e(this,U)}get size(){return e(this,F)}get fetchMethod(){return e(this,mt)}get memoMethod(){return e(this,pt)}get dispose(){return e(this,$)}get onInsert(){return e(this,ot)}get disposeAfter(){return e(this,B)}getRemainingTTL(t){return e(this,G).has(t)?1/0:0}*entries(){for(let t of h(this,o,it).call(this))e(this,p)[t]!==void 0&&e(this,w)[t]!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield [e(this,w)[t],e(this,p)[t]]);}*rentries(){for(let t of h(this,o,st).call(this))e(this,p)[t]!==void 0&&e(this,w)[t]!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield [e(this,w)[t],e(this,p)[t]]);}*keys(){for(let t of h(this,o,it).call(this)){let i=e(this,w)[t];i!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield i);}}*rkeys(){for(let t of h(this,o,st).call(this)){let i=e(this,w)[t];i!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield i);}}*values(){for(let t of h(this,o,it).call(this))e(this,p)[t]!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield e(this,p)[t]);}*rvalues(){for(let t of h(this,o,st).call(this))e(this,p)[t]!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield e(this,p)[t]);}[(Ut=Symbol.iterator,Bt=Symbol.toStringTag,Ut)](){return this.entries()}find(t,i={}){for(let s of h(this,o,it).call(this)){let r=e(this,p)[s],n=h(this,o,y).call(this,r)?r.__staleWhileFetching:r;if(n!==void 0&&t(n,e(this,w)[s],this))return this.get(e(this,w)[s],i)}}forEach(t,i=this){for(let s of h(this,o,it).call(this)){let r=e(this,p)[s],n=h(this,o,y).call(this,r)?r.__staleWhileFetching:r;n!==void 0&&t.call(i,n,e(this,w)[s],this);}}rforEach(t,i=this){for(let s of h(this,o,st).call(this)){let r=e(this,p)[s],n=h(this,o,y).call(this,r)?r.__staleWhileFetching:r;n!==void 0&&t.call(i,n,e(this,w)[s],this);}}purgeStale(){let t=false;for(let i of h(this,o,st).call(this,{allowStale:true}))e(this,P).call(this,i)&&(h(this,o,rt).call(this,e(this,w)[i],"expire"),t=true);return t}info(t){let i=e(this,G).get(t);if(i===void 0)return;let s=e(this,p)[i],r=h(this,o,y).call(this,s)?s.__staleWhileFetching:s;if(r===void 0)return;let n={value:r};if(e(this,W)&&e(this,Y)){let a=e(this,W)[i],m=e(this,Y)[i];if(a&&m){let d=a-(ft.now()-m);n.ttl=d,n.start=Date.now();}}return e(this,J)&&(n.size=e(this,J)[i]),n}dump(){let t=[];for(let i of h(this,o,it).call(this,{allowStale:true})){let s=e(this,w)[i],r=e(this,p)[i],n=h(this,o,y).call(this,r)?r.__staleWhileFetching:r;if(n===void 0||s===void 0)continue;let a={value:n};if(e(this,W)&&e(this,Y)){a.ttl=e(this,W)[i];let m=ft.now()-e(this,Y)[i];a.start=Math.floor(Date.now()-m);}e(this,J)&&(a.size=e(this,J)[i]),t.unshift([s,a]);}return t}load(t){this.clear();for(let[i,s]of t){if(s.start){let r=Date.now()-s.start;s.start=ft.now()-r;}this.set(i,s.value,s);}}set(t,i,s={}){var tt,j,Z,v;if(i===void 0)return this.delete(t),this;let{ttl:r=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:m=this.sizeCalculation,status:d}=s,{noUpdateTTL:C=this.noUpdateTTL}=s,Q=e(this,Tt).call(this,t,i,s.size||0,m);if(this.maxEntrySize&&Q>this.maxEntrySize)return d&&(d.set="miss",d.maxEntrySizeExceeded=true),h(this,o,rt).call(this,t,"set"),this;let E=e(this,F)===0?void 0:e(this,G).get(t);if(E===void 0)E=e(this,F)===0?e(this,A):e(this,q).length!==0?e(this,q).pop():e(this,F)===e(this,K)?h(this,o,At).call(this,false):e(this,F),e(this,w)[E]=t,e(this,p)[E]=i,e(this,G).set(t,E),e(this,M)[e(this,A)]=E,e(this,N)[E]=e(this,A),u(this,A,E),Ct(this,F)._++,e(this,bt).call(this,E,Q,d),d&&(d.set="add"),C=false,e(this,St)&&((tt=e(this,ot))==null||tt.call(this,i,t,"add"));else {h(this,o,_t).call(this,E);let _=e(this,p)[E];if(i!==_){if(e(this,nt)&&h(this,o,y).call(this,_)){_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:S}=_;S!==void 0&&!a&&(e(this,X)&&((j=e(this,$))==null||j.call(this,S,t,"set")),e(this,V)&&e(this,O)?.push([S,t,"set"]));}else a||(e(this,X)&&((Z=e(this,$))==null||Z.call(this,_,t,"set")),e(this,V)&&e(this,O)?.push([_,t,"set"]));if(e(this,lt).call(this,E),e(this,bt).call(this,E,Q,d),e(this,p)[E]=i,d){d.set="replace";let S=_&&h(this,o,y).call(this,_)?_.__staleWhileFetching:_;S!==void 0&&(d.oldValue=S);}}else d&&(d.set="update");e(this,St)&&this.onInsert?.(i,t,i===_?"update":"replace");}if(r!==0&&!e(this,W)&&h(this,o,Nt).call(this),e(this,W)&&(C||e(this,vt).call(this,E,r,n),d&&e(this,k).call(this,d,E)),!a&&e(this,V)&&e(this,O)){let _=e(this,O),S;for(;S=_?.shift();)(v=e(this,B))==null||v.call(this,...S);}return this}pop(){var t;try{for(;e(this,F);){let i=e(this,p)[e(this,I)];if(h(this,o,At).call(this,!0),h(this,o,y).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(e(this,V)&&e(this,O)){let i=e(this,O),s;for(;s=i?.shift();)(t=e(this,B))==null||t.call(this,...s);}}}has(t,i={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:r}=i,n=e(this,G).get(t);if(n!==void 0){let a=e(this,p)[n];if(h(this,o,y).call(this,a)&&a.__staleWhileFetching===void 0)return false;if(e(this,P).call(this,n))r&&(r.has="stale",e(this,k).call(this,r,n));else return s&&e(this,ht).call(this,n),r&&(r.has="hit",e(this,k).call(this,r,n)),true}else r&&(r.has="miss");return false}peek(t,i={}){let{allowStale:s=this.allowStale}=i,r=e(this,G).get(t);if(r===void 0||!s&&e(this,P).call(this,r))return;let n=e(this,p)[r];return h(this,o,y).call(this,n)?n.__staleWhileFetching:n}async fetch(t,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:m=this.noDisposeOnSet,size:d=0,sizeCalculation:C=this.sizeCalculation,noUpdateTTL:Q=this.noUpdateTTL,noDeleteOnFetchRejection:E=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:tt=this.allowStaleOnFetchRejection,ignoreFetchAbort:j=this.ignoreFetchAbort,allowStaleOnFetchAbort:Z=this.allowStaleOnFetchAbort,context:v,forceRefresh:_=false,status:S,signal:L}=i;if(!e(this,nt))return S&&(S.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:S});let R={allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:m,size:d,sizeCalculation:C,noUpdateTTL:Q,noDeleteOnFetchRejection:E,allowStaleOnFetchRejection:tt,allowStaleOnFetchAbort:Z,ignoreFetchAbort:j,status:S,signal:L},x=e(this,G).get(t);if(x===void 0){S&&(S.fetch="miss");let H=h(this,o,Ot).call(this,t,x,R,v);return H.__returned=H}else {let H=e(this,p)[x];if(h(this,o,y).call(this,H)){let Vt=s&&H.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",Vt&&(S.returnedStale=true)),Vt?H.__staleWhileFetching:H.__returned=H}let wt=e(this,P).call(this,x);if(!_&&!wt)return S&&(S.fetch="hit"),h(this,o,_t).call(this,x),r&&e(this,ht).call(this,x),S&&e(this,k).call(this,S,x),H;let ct=h(this,o,Ot).call(this,t,x,R,v),ut=ct.__staleWhileFetching!==void 0&&s;return S&&(S.fetch=wt?"stale":"refresh",ut&&wt&&(S.returnedStale=true)),ut?ct.__staleWhileFetching:ct.__returned=ct}}async forceFetch(t,i={}){let s=await this.fetch(t,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,i={}){let s=e(this,pt);if(!s)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...a}=i,m=this.get(t,a);if(!n&&m!==void 0)return m;let d=s(t,m,{options:a,context:r});return this.set(t,d,a),d}get(t,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=i,m=e(this,G).get(t);if(m!==void 0){let d=e(this,p)[m],C=h(this,o,y).call(this,d);return a&&e(this,k).call(this,a,m),e(this,P).call(this,m)?(a&&(a.get="stale"),C?(a&&s&&d.__staleWhileFetching!==void 0&&(a.returnedStale=true),s?d.__staleWhileFetching:void 0):(n||h(this,o,rt).call(this,t,"expire"),a&&s&&(a.returnedStale=true),s?d:void 0)):(a&&(a.get="hit"),C?d.__staleWhileFetching:(h(this,o,_t).call(this,m),r&&e(this,ht).call(this,m),d))}else a&&(a.get="miss");}delete(t){return h(this,o,rt).call(this,t,"delete")}clear(){return h(this,o,jt).call(this,"delete")}};K=new WeakMap,D=new WeakMap,$=new WeakMap,ot=new WeakMap,B=new WeakMap,mt=new WeakMap,pt=new WeakMap,F=new WeakMap,U=new WeakMap,G=new WeakMap,w=new WeakMap,p=new WeakMap,M=new WeakMap,N=new WeakMap,I=new WeakMap,A=new WeakMap,q=new WeakMap,O=new WeakMap,J=new WeakMap,Y=new WeakMap,W=new WeakMap,X=new WeakMap,nt=new WeakMap,V=new WeakMap,St=new WeakMap,o=new WeakSet,Nt=function(){let t=new dt(e(this,K)),i=new dt(e(this,K));u(this,W,t),u(this,Y,i),u(this,vt,(n,a,m=ft.now())=>{if(i[n]=a!==0?m:0,t[n]=a,a!==0&&this.ttlAutopurge){let d=setTimeout(()=>{e(this,P).call(this,n)&&h(this,o,rt).call(this,e(this,w)[n],"expire");},a+1);d.unref&&d.unref();}}),u(this,ht,n=>{i[n]=t[n]!==0?ft.now():0;}),u(this,k,(n,a)=>{if(t[a]){let m=t[a],d=i[a];if(!m||!d)return;n.ttl=m,n.start=d,n.now=s||r();let C=n.now-d;n.remainingTTL=m-C;}});let s=0,r=()=>{let n=ft.now();if(this.ttlResolution>0){s=n;let a=setTimeout(()=>s=0,this.ttlResolution);a.unref&&a.unref();}return n};this.getRemainingTTL=n=>{let a=e(this,G).get(n);if(a===void 0)return 0;let m=t[a],d=i[a];if(!m||!d)return 1/0;let C=(s||r())-d;return m-C},u(this,P,n=>{let a=i[n],m=t[n];return !!m&&!!a&&(s||r())-a>m});},ht=new WeakMap,k=new WeakMap,vt=new WeakMap,P=new WeakMap,Xt=function(){let t=new dt(e(this,K));u(this,U,0),u(this,J,t),u(this,lt,i=>{u(this,U,e(this,U)-t[i]),t[i]=0;}),u(this,Tt,(i,s,r,n)=>{if(h(this,o,y).call(this,s))return 0;if(!et(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(s,i),!et(r))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 r}),u(this,bt,(i,s,r)=>{if(t[i]=s,e(this,D)){let n=e(this,D)-t[i];for(;e(this,U)>n;)h(this,o,At).call(this,true);}u(this,U,e(this,U)+t[i]),r&&(r.entrySize=s,r.totalCalculatedSize=e(this,U));});},lt=new WeakMap,bt=new WeakMap,Tt=new WeakMap,it=function*({allowStale:t=this.allowStale}={}){if(e(this,F))for(let i=e(this,A);!(!h(this,o,Wt).call(this,i)||((t||!e(this,P).call(this,i))&&(yield i),i===e(this,I)));)i=e(this,N)[i];},st=function*({allowStale:t=this.allowStale}={}){if(e(this,F))for(let i=e(this,I);!(!h(this,o,Wt).call(this,i)||((t||!e(this,P).call(this,i))&&(yield i),i===e(this,A)));)i=e(this,M)[i];},Wt=function(t){return t!==void 0&&e(this,G).get(e(this,w)[t])===t},At=function(t){var n;let i=e(this,I),s=e(this,w)[i],r=e(this,p)[i];return e(this,nt)&&h(this,o,y).call(this,r)?r.__abortController.abort(new Error("evicted")):(e(this,X)||e(this,V))&&(e(this,X)&&((n=e(this,$))==null||n.call(this,r,s,"evict")),e(this,V)&&e(this,O)?.push([r,s,"evict"])),e(this,lt).call(this,i),t&&(e(this,w)[i]=void 0,e(this,p)[i]=void 0,e(this,q).push(i)),e(this,F)===1?(u(this,I,u(this,A,0)),e(this,q).length=0):u(this,I,e(this,M)[i]),e(this,G).delete(s),Ct(this,F)._--,i},Ot=function(t,i,s,r){let n=i===void 0?void 0:e(this,p)[i];if(h(this,o,y).call(this,n))return n;let a=new xt,{signal:m}=s;m?.addEventListener("abort",()=>a.abort(m.reason),{signal:a.signal});let d={signal:a.signal,options:s,context:r},C=(v,_=false)=>{let{aborted:S}=a.signal,L=s.ignoreFetchAbort&&v!==void 0;if(s.status&&(S&&!_?(s.status.fetchAborted=true,s.status.fetchError=a.signal.reason,L&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),S&&!L&&!_)return E(a.signal.reason);let R=j;return e(this,p)[i]===j&&(v===void 0?R.__staleWhileFetching?e(this,p)[i]=R.__staleWhileFetching:h(this,o,rt).call(this,t,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(t,v,d.options))),v},Q=v=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=v),E(v)),E=v=>{let{aborted:_}=a.signal,S=_&&s.allowStaleOnFetchAbort,L=S||s.allowStaleOnFetchRejection,R=L||s.noDeleteOnFetchRejection,x=j;if(e(this,p)[i]===j&&(!R||x.__staleWhileFetching===void 0?h(this,o,rt).call(this,t,"fetch"):S||(e(this,p)[i]=x.__staleWhileFetching)),L)return s.status&&x.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),x.__staleWhileFetching;if(x.__returned===x)throw v},tt=(v,_)=>{var L;let S=(L=e(this,mt))==null?void 0:L.call(this,t,n,d);S&&S instanceof Promise&&S.then(R=>v(R===void 0?void 0:R),_),a.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(v(void 0),s.allowStaleOnFetchAbort&&(v=R=>C(R,true)));});};s.status&&(s.status.fetchDispatched=true);let j=new Promise(tt).then(C,Q),Z=Object.assign(j,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return i===void 0?(this.set(t,Z,{...d.options,status:void 0}),i=e(this,G).get(t)):e(this,p)[i]=Z,Z},y=function(t){if(!e(this,nt))return false;let i=t;return !!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof xt},Pt=function(t,i){e(this,N)[i]=t,e(this,M)[t]=i;},_t=function(t){t!==e(this,A)&&(t===e(this,I)?u(this,I,e(this,M)[t]):h(this,o,Pt).call(this,e(this,N)[t],e(this,M)[t]),h(this,o,Pt).call(this,e(this,A),t),u(this,A,t));},rt=function(t,i){var r,n;let s=false;if(e(this,F)!==0){let a=e(this,G).get(t);if(a!==void 0)if(s=true,e(this,F)===1)h(this,o,jt).call(this,i);else {e(this,lt).call(this,a);let m=e(this,p)[a];if(h(this,o,y).call(this,m)?m.__abortController.abort(new Error("deleted")):(e(this,X)||e(this,V))&&(e(this,X)&&((r=e(this,$))==null||r.call(this,m,t,i)),e(this,V)&&e(this,O)?.push([m,t,i])),e(this,G).delete(t),e(this,w)[a]=void 0,e(this,p)[a]=void 0,a===e(this,A))u(this,A,e(this,N)[a]);else if(a===e(this,I))u(this,I,e(this,M)[a]);else {let d=e(this,N)[a];e(this,M)[d]=e(this,M)[a];let C=e(this,M)[a];e(this,N)[C]=e(this,N)[a];}Ct(this,F)._--,e(this,q).push(a);}}if(e(this,V)&&e(this,O)?.length){let a=e(this,O),m;for(;m=a?.shift();)(n=e(this,B))==null||n.call(this,...m);}return s},jt=function(t){var i,s;for(let r of h(this,o,st).call(this,{allowStale:true})){let n=e(this,p)[r];if(h(this,o,y).call(this,n))n.__abortController.abort(new Error("deleted"));else {let a=e(this,w)[r];e(this,X)&&((i=e(this,$))==null||i.call(this,n,a,t)),e(this,V)&&e(this,O)?.push([n,a,t]);}}if(e(this,G).clear(),e(this,p).fill(void 0),e(this,w).fill(void 0),e(this,W)&&e(this,Y)&&(e(this,W).fill(0),e(this,Y).fill(0)),e(this,J)&&e(this,J).fill(0),u(this,I,0),u(this,A,0),e(this,q).length=0,u(this,U,0),u(this,F,0),e(this,V)&&e(this,O)){let r=e(this,O),n;for(;n=r?.shift();)(s=e(this,B))==null||s.call(this,...n);}};var It=Ht;var yt=class{constructor(t){c(this,"cache");c(this,"map",new Map);this.cache=new It({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 i=this.map.delete(t);return i&&this.cache.delete(t),i}get forEach(){return this.map.forEach}get(t){let i=this.cache.get(t);return i||this.map.get(t)}has(t){return this.map.has(t)}set(t,i){return this.map.set(t,i),this.cache.set(t,i),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var z=class z{constructor(){}static clearOldTempVariables(t){z.tempStorageDeadlines.forEach((i,s)=>{i>t&&(z.tempStorage.delete(s),z.tempStorageDeadlines.delete(s),z.storage.cache.delete(s));});}static setVariable(t,i){let s=z.tempStorage.has(t);i==null?(z.storage.map.delete(t),!s&&z.storage.cache.delete(t)):(z.storage.map.set(t,i),!s&&z.storage.cache.set(t,i));}static getVariable(t){let i=z.storage.cache.get(t);return i===void 0&&(i=z.tempStorage.get(t)),i===void 0&&(i=z.storage.map.get(t)),Ft(i)}static removeVariable(t){z.storage.delete(t);}static setFlag(t,i){if(i)this.flags.includes(t)||this.flags.push(t);else {let s=this.flags.indexOf(t);s>-1&&this.flags.splice(s,1);}}static getFlag(t){return this.flags.includes(t)}};c(z,"storage",new yt({cacheSize:20})),c(z,"startingStorage",[]),c(z,"flags",Array()),c(z,"tempStorage",new Map),c(z,"tempStorageDeadlines",new Map);var g=z;var Gt=class{get storage(){return g.storage.map}get cache(){return g.storage.cache}get flags(){return g.flags}get tempStorage(){return g.tempStorage}get tempStorageDeadlines(){return g.tempStorageDeadlines}set startingStorage(t){let i=[];Object.entries(t).forEach(([s,r])=>{i.push({key:s,value:r});}),g.startingStorage=i;}setVariable(t,i){return g.setVariable(t,i)}getVariable(t){return g.getVariable(t)}removeVariable(t){return g.removeVariable(t)}setTempVariable(t,i){if(i==null){this.removeTempVariable(t);return}else g.tempStorage.set(t,i),g.storage.cache.set(t,i),g.tempStorageDeadlines.has(t)||g.tempStorageDeadlines.set(t,Et.openedLabels);}removeTempVariable(t){g.tempStorage.has(t)&&(g.tempStorage.delete(t),g.tempStorageDeadlines.delete(t),g.storage.cache.delete(t));}setFlag(t,i){return g.setFlag(t,i)}getFlag(t){return g.getFlag(t)}clear(){this.storage.clear(),this.cache.clear(),g.flags=[],g.tempStorage.clear(),g.tempStorageDeadlines.clear(),g.startingStorage.forEach(({key:t,value:i})=>{this.storage.set(t,i);});}export(){let t=[];[...this.storage.keys()].forEach(r=>{t.push({key:r,value:this.storage.get(r)});});let i=[];[...g.tempStorage.keys()].forEach(r=>{i.push({key:r,value:g.tempStorage.get(r)});});let s=[];return [...g.tempStorageDeadlines.keys()].forEach(r=>{s.push({key:r,value:g.tempStorageDeadlines.get(r)});}),Ft({base:t,temp:i,tempDeadlines:s,flags:g.flags})}restore(t){this.clear();try{t?(Array.isArray(t)&&t.forEach(i=>{if(i.key==="___temp_storage___"){let s=i.value;Object.entries(s).forEach(([r,n])=>{g.tempStorage.set(r,n);});}else if(i.key==="___temp_storage_deadlines___"){let s=i.value;Object.entries(s).forEach(([r,n])=>{g.tempStorageDeadlines.set(r,n);});}else i.key==="___flags___"?i.value.forEach(r=>{g.flags.push(r);}):this.storage.set(i.key,i.value);}),"base"in t&&"temp"in t&&"tempDeadlines"in t?(t.base?.forEach(i=>{this.storage.set(i.key,i.value);}),t.temp?.forEach(i=>{g.tempStorage.set(i.key,i.value);}),t.tempDeadlines?.forEach(i=>{g.tempStorageDeadlines.set(i.key,i.value);})):Object.entries(t).forEach(([i,s])=>{i==="___temp_storage___"?Object.entries(s).forEach(([r,n])=>{g.tempStorage.set(r,n);}):i==="___temp_storage_deadlines___"?Object.entries(s).forEach(([r,n])=>{g.tempStorageDeadlines.set(r,n);}):i==="___flags___"?s.forEach(r=>{g.flags.push(r);}):this.storage.set(i,s);})):T.warn("No storage data found");}catch(i){T.error("Error importing data",i);}}};var Mt=class{constructor(t,i){c(this,"_id");c(this,"categoryId");this.categoryId=t,this._id=i;}get id(){return this._id}setStorageProperty(t,i){let s=g.getVariable(this.categoryId);s||(s={}),s.hasOwnProperty(this.id)||(s[this.id]={}),i==null?s[this.id].hasOwnProperty(t)&&delete s[this.id][t]:s[this.id]={...s[this.id],[t]:i},Object.keys(s[this.id]).length===0&&delete s[this.id],g.setVariable(this.categoryId,s);}getStorageProperty(t,i=this.id){let s=g.getVariable(this.categoryId);if(s&&s.hasOwnProperty(i)&&s[i].hasOwnProperty(t))return s[i][t]}};var Oe=new Gt;exports.StorageManagerStatic=g;exports.StoredClassModel=Mt;exports.storage=Oe;
@@ -1 +1 @@
1
- var u;(s=>(s.log=(r,...a)=>console.log(`[Pixi\u2019VN] ${r}`,...a),s.warn=(r,...a)=>console.warn(`[Pixi\u2019VN] ${r}`,...a),s.error=(r,...a)=>console.error(`[Pixi\u2019VN] ${r}`,...a),s.info=(r,...a)=>console.info(`[Pixi\u2019VN] ${r}`,...a)))(u||={});var x=class n{static init(e){n._getStepCounter=e.getStepCounter,n._setStepCounter=e.setStepCounter,n._getCurrentGameStepState=e.getCurrentGameStepState,n._restoreGameStepState=e.restoreGameStepState,n._getOpenedLabels=e.getOpenedLabels,e.onGoNextEnd&&(n._onGoNextEnd=e.onGoNextEnd),n._getVariable=e.getVariable,n._setVariable=e.setVariable,n._removeVariable=e.removeVariable,n._getFlag=e.getFlag,n._setFlag=e.setFlag,e.onLabelClosing&&(n._onLabelClosing=e.onLabelClosing),n._addHistoryItem=e.addHistoryItem,n._getCurrentStepsRunningNumber=e.getCurrentStepsRunningNumber,n._getCharacter=e.getCharacter;}static _getStepCounter=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static _setStepCounter=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get stepCounter(){return n._getStepCounter()}static set stepCounter(e){n._setStepCounter(e);}static _getCurrentGameStepState=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get currentGameStepState(){return n._getCurrentGameStepState()}static _restoreGameStepState=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get restoreGameStepState(){return n._restoreGameStepState}static _getOpenedLabels=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get openedLabels(){return n._getOpenedLabels()}static _onGoNextEnd=async()=>{};static get onGoNextEnd(){return n._onGoNextEnd}static _getVariable=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get getVariable(){return n._getVariable}static _setVariable=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get setVariable(){return n._setVariable}static _removeVariable=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get removeVariable(){return n._removeVariable}static _getFlag=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get getFlag(){return n._getFlag}static _setFlag=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get setFlag(){return n._setFlag}static _onLabelClosing=()=>{};static get onLabelClosing(){return n._onLabelClosing}static _addHistoryItem=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get addHistoryItem(){return n._addHistoryItem}static _getCurrentStepsRunningNumber=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")};static get currentStepsRunningNumber(){return n._getCurrentStepsRunningNumber()}static _getCharacter=()=>{throw u.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented.")};static get getCharacter(){return n._getCharacter}static onEnd;static onError};function V(n){try{if(typeof n>"u")return n;let e=JSON.stringify(n);return JSON.parse(e)}catch(e){throw u.error("Error creating exportable element",n,e),new Error("[Pixi\u2019VN] Error creating exportable element")}}var C=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,U=new Set,W=typeof process=="object"&&process?process:{},H=(n,e,t,i)=>{typeof W.emitWarning=="function"?W.emitWarning(n,e,t,i):console.error(`[${t}] ${e}: ${n}`);},L=globalThis.AbortController,j=globalThis.AbortSignal;if(typeof L>"u"){j=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},L=class{constructor(){e();}signal=new j;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 n=W.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{n&&(n=false,H("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e));};}var $=n=>!U.has(n),v=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),K=n=>v(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?F:null:null,F=class extends Array{constructor(e){super(e),this.fill(0);}},P=class n{heap;length;static#h=false;static create(e){let t=K(e);if(!t)return [];n.#h=true;let i=new n(e,t);return n.#h=false,i}constructor(e,t){if(!n.#h)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},R=class n{#h;#f;#m;#C;#p;#x;#M;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#r;#S;#s;#i;#e;#l;#u;#o;#n;#b;#a;#y;#w;#d;#_;#z;#c;#I;static unsafeExposeInternals(e){return {starts:e.#w,ttls:e.#d,sizes:e.#y,keyMap:e.#s,keyList:e.#i,valList:e.#e,next:e.#l,prev:e.#u,get head(){return e.#o},get tail(){return e.#n},free:e.#b,isBackgroundFetch:t=>e.#t(t),backgroundFetch:(t,i,s,r)=>e.#R(t,i,s,r),moveToTail:t=>e.#O(t),indexes:t=>e.#E(t),rindexes:t=>e.#v(t),isStale:t=>e.#g(t)}}get max(){return this.#h}get maxSize(){return this.#f}get calculatedSize(){return this.#S}get size(){return this.#r}get fetchMethod(){return this.#x}get memoMethod(){return this.#M}get dispose(){return this.#m}get onInsert(){return this.#C}get disposeAfter(){return this.#p}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:h,dispose:p,onInsert:w,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:g,maxSize:G=0,maxEntrySize:m=0,sizeCalculation:_,fetchMethod:c,memoMethod:b,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:O,ignoreFetchAbort:T}=e;if(t!==0&&!v(t))throw new TypeError("max option must be a nonnegative integer");let I=t?K(t):Array;if(!I)throw new Error("invalid max value: "+t);if(this.#h=t,this.#f=G,this.maxEntrySize=m||this.#f,this.sizeCalculation=_,this.sizeCalculation){if(!this.#f&&!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(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#M=b,c!==void 0&&typeof c!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#x=c,this.#z=!!c,this.#s=new Map,this.#i=new Array(t).fill(void 0),this.#e=new Array(t).fill(void 0),this.#l=new I(t),this.#u=new I(t),this.#o=0,this.#n=0,this.#b=P.create(t),this.#r=0,this.#S=0,typeof p=="function"&&(this.#m=p),typeof w=="function"&&(this.#C=w),typeof f=="function"?(this.#p=f,this.#a=[]):(this.#p=void 0,this.#a=void 0),this.#_=!!this.#m,this.#I=!!this.#C,this.#c=!!this.#p,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#f!==0&&!v(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!v(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H();}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=v(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!v(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D();}if(this.#h===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#h&&!this.#f){let z="LRU_CACHE_UNBOUNDED";$(z)&&(U.add(z),H("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",z,n));}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#D(){let e=new F(this.#h),t=new F(this.#h);this.#d=e,this.#w=t,this.#N=(r,a,l=C.now())=>{if(t[r]=a!==0?l:0,e[r]=a,a!==0&&this.ttlAutopurge){let h=setTimeout(()=>{this.#g(r)&&this.#G(this.#i[r],"expire");},a+1);h.unref&&h.unref();}},this.#F=r=>{t[r]=e[r]!==0?C.now():0;},this.#T=(r,a)=>{if(e[a]){let l=e[a],h=t[a];if(!l||!h)return;r.ttl=l,r.start=h,r.now=i||s();let p=r.now-h;r.remainingTTL=l-p;}};let i=0,s=()=>{let r=C.now();if(this.ttlResolution>0){i=r;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref();}return r};this.getRemainingTTL=r=>{let a=this.#s.get(r);if(a===void 0)return 0;let l=e[a],h=t[a];if(!l||!h)return 1/0;let p=(i||s())-h;return l-p},this.#g=r=>{let a=t[r],l=e[r];return !!l&&!!a&&(i||s())-a>l};}#F=()=>{};#T=()=>{};#N=()=>{};#g=()=>false;#H(){let e=new F(this.#h);this.#S=0,this.#y=e,this.#A=t=>{this.#S-=e[t],e[t]=0;},this.#W=(t,i,s,r)=>{if(this.#t(i))return 0;if(!v(s))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(i,t),!v(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.#V=(t,i,s)=>{if(e[t]=i,this.#f){let r=this.#f-e[t];for(;this.#S>r;)this.#L(true);}this.#S+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#S);};}#A=e=>{};#V=(e,t,i)=>{};#W=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#E({allowStale:e=this.allowStale}={}){if(this.#r)for(let t=this.#n;!(!this.#P(t)||((e||!this.#g(t))&&(yield t),t===this.#o));)t=this.#u[t];}*#v({allowStale:e=this.allowStale}={}){if(this.#r)for(let t=this.#o;!(!this.#P(t)||((e||!this.#g(t))&&(yield t),t===this.#n));)t=this.#l[t];}#P(e){return e!==void 0&&this.#s.get(this.#i[e])===e}*entries(){for(let e of this.#E())this.#e[e]!==void 0&&this.#i[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#i[e],this.#e[e]]);}*rentries(){for(let e of this.#v())this.#e[e]!==void 0&&this.#i[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#i[e],this.#e[e]]);}*keys(){for(let e of this.#E()){let t=this.#i[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*rkeys(){for(let e of this.#v()){let t=this.#i[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*values(){for(let e of this.#E())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#v())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#E()){let s=this.#e[i],r=this.#t(s)?s.__staleWhileFetching:s;if(r!==void 0&&e(r,this.#i[i],this))return this.get(this.#i[i],t)}}forEach(e,t=this){for(let i of this.#E()){let s=this.#e[i],r=this.#t(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#i[i],this);}}rforEach(e,t=this){for(let i of this.#v()){let s=this.#e[i],r=this.#t(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#i[i],this);}}purgeStale(){let e=false;for(let t of this.#v({allowStale:true}))this.#g(t)&&(this.#G(this.#i[t],"expire"),e=true);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let i=this.#e[t],s=this.#t(i)?i.__staleWhileFetching:i;if(s===void 0)return;let r={value:s};if(this.#d&&this.#w){let a=this.#d[t],l=this.#w[t];if(a&&l){let h=a-(C.now()-l);r.ttl=h,r.start=Date.now();}}return this.#y&&(r.size=this.#y[t]),r}dump(){let e=[];for(let t of this.#E({allowStale:true})){let i=this.#i[t],s=this.#e[t],r=this.#t(s)?s.__staleWhileFetching:s;if(r===void 0||i===void 0)continue;let a={value:r};if(this.#d&&this.#w){a.ttl=this.#d[t];let l=C.now()-this.#w[t];a.start=Math.floor(Date.now()-l);}this.#y&&(a.size=this.#y[t]),e.unshift([i,a]);}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=C.now()-s;}this.set(t,i.value,i);}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:h}=i,{noUpdateTTL:p=this.noUpdateTTL}=i,w=this.#W(e,t,i.size||0,l);if(this.maxEntrySize&&w>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=true),this.#G(e,"set"),this;let f=this.#r===0?void 0:this.#s.get(e);if(f===void 0)f=this.#r===0?this.#n:this.#b.length!==0?this.#b.pop():this.#r===this.#h?this.#L(false):this.#r,this.#i[f]=e,this.#e[f]=t,this.#s.set(e,f),this.#l[this.#n]=f,this.#u[f]=this.#n,this.#n=f,this.#r++,this.#V(f,w,h),h&&(h.set="add"),p=false,this.#I&&this.#C?.(t,e,"add");else {this.#O(f);let d=this.#e[f];if(t!==d){if(this.#z&&this.#t(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=d;g!==void 0&&!a&&(this.#_&&this.#m?.(g,e,"set"),this.#c&&this.#a?.push([g,e,"set"]));}else a||(this.#_&&this.#m?.(d,e,"set"),this.#c&&this.#a?.push([d,e,"set"]));if(this.#A(f),this.#V(f,w,h),this.#e[f]=t,h){h.set="replace";let g=d&&this.#t(d)?d.__staleWhileFetching:d;g!==void 0&&(h.oldValue=g);}}else h&&(h.set="update");this.#I&&this.onInsert?.(t,e,t===d?"update":"replace");}if(s!==0&&!this.#d&&this.#D(),this.#d&&(p||this.#N(f,s,r),h&&this.#T(h,f)),!a&&this.#c&&this.#a){let d=this.#a,g;for(;g=d?.shift();)this.#p?.(...g);}return this}pop(){try{for(;this.#r;){let e=this.#e[this.#o];if(this.#L(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#c&&this.#a){let e=this.#a,t;for(;t=e?.shift();)this.#p?.(...t);}}}#L(e){let t=this.#o,i=this.#i[t],s=this.#e[t];return this.#z&&this.#t(s)?s.__abortController.abort(new Error("evicted")):(this.#_||this.#c)&&(this.#_&&this.#m?.(s,i,"evict"),this.#c&&this.#a?.push([s,i,"evict"])),this.#A(t),e&&(this.#i[t]=void 0,this.#e[t]=void 0,this.#b.push(t)),this.#r===1?(this.#o=this.#n=0,this.#b.length=0):this.#o=this.#l[t],this.#s.delete(i),this.#r--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,r=this.#s.get(e);if(r!==void 0){let a=this.#e[r];if(this.#t(a)&&a.__staleWhileFetching===void 0)return false;if(this.#g(r))s&&(s.has="stale",this.#T(s,r));else return i&&this.#F(r),s&&(s.has="hit",this.#T(s,r)),true}else s&&(s.has="miss");return false}peek(e,t={}){let{allowStale:i=this.allowStale}=t,s=this.#s.get(e);if(s===void 0||!i&&this.#g(s))return;let r=this.#e[s];return this.#t(r)?r.__staleWhileFetching:r}#R(e,t,i,s){let r=t===void 0?void 0:this.#e[t];if(this.#t(r))return r;let a=new L,{signal:l}=i;l?.addEventListener("abort",()=>a.abort(l.reason),{signal:a.signal});let h={signal:a.signal,options:i,context:s},p=(m,_=false)=>{let{aborted:c}=a.signal,b=i.ignoreFetchAbort&&m!==void 0;if(i.status&&(c&&!_?(i.status.fetchAborted=true,i.status.fetchError=a.signal.reason,b&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),c&&!b&&!_)return f(a.signal.reason);let E=g;return this.#e[t]===g&&(m===void 0?E.__staleWhileFetching?this.#e[t]=E.__staleWhileFetching:this.#G(e,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(e,m,h.options))),m},w=m=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=m),f(m)),f=m=>{let{aborted:_}=a.signal,c=_&&i.allowStaleOnFetchAbort,b=c||i.allowStaleOnFetchRejection,E=b||i.noDeleteOnFetchRejection,S=g;if(this.#e[t]===g&&(!E||S.__staleWhileFetching===void 0?this.#G(e,"fetch"):c||(this.#e[t]=S.__staleWhileFetching)),b)return i.status&&S.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),S.__staleWhileFetching;if(S.__returned===S)throw m},d=(m,_)=>{let c=this.#x?.(e,r,h);c&&c instanceof Promise&&c.then(b=>m(b===void 0?void 0:b),_),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=b=>p(b,true)));});};i.status&&(i.status.fetchDispatched=true);let g=new Promise(d).then(p,w),G=Object.assign(g,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return t===void 0?(this.set(e,G,{...h.options,status:void 0}),t=this.#s.get(e)):this.#e[t]=G,G}#t(e){if(!this.#z)return false;let t=e;return !!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof L}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:h=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:w=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:G=this.allowStaleOnFetchAbort,context:m,forceRefresh:_=false,status:c,signal:b}=t;if(!this.#z)return c&&(c.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:c});let E={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:l,size:h,sizeCalculation:p,noUpdateTTL:w,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:G,ignoreFetchAbort:g,status:c,signal:b},S=this.#s.get(e);if(S===void 0){c&&(c.fetch="miss");let y=this.#R(e,S,E,m);return y.__returned=y}else {let y=this.#e[S];if(this.#t(y)){let N=i&&y.__staleWhileFetching!==void 0;return c&&(c.fetch="inflight",N&&(c.returnedStale=true)),N?y.__staleWhileFetching:y.__returned=y}let O=this.#g(S);if(!_&&!O)return c&&(c.fetch="hit"),this.#O(S),s&&this.#F(S),c&&this.#T(c,S),y;let T=this.#R(e,S,E,m),z=T.__staleWhileFetching!==void 0&&i;return c&&(c.fetch=O?"stale":"refresh",z&&O&&(c.returnedStale=true)),z?T.__staleWhileFetching:T.__returned=T}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#M;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:r,...a}=t,l=this.get(e,a);if(!r&&l!==void 0)return l;let h=i(e,l,{options:a,context:s});return this.set(e,h,a),h}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=t,l=this.#s.get(e);if(l!==void 0){let h=this.#e[l],p=this.#t(h);return a&&this.#T(a,l),this.#g(l)?(a&&(a.get="stale"),p?(a&&i&&h.__staleWhileFetching!==void 0&&(a.returnedStale=true),i?h.__staleWhileFetching:void 0):(r||this.#G(e,"expire"),a&&i&&(a.returnedStale=true),i?h:void 0)):(a&&(a.get="hit"),p?h.__staleWhileFetching:(this.#O(l),s&&this.#F(l),h))}else a&&(a.get="miss");}#j(e,t){this.#u[t]=e,this.#l[e]=t;}#O(e){e!==this.#n&&(e===this.#o?this.#o=this.#l[e]:this.#j(this.#u[e],this.#l[e]),this.#j(this.#n,e),this.#n=e);}delete(e){return this.#G(e,"delete")}#G(e,t){let i=false;if(this.#r!==0){let s=this.#s.get(e);if(s!==void 0)if(i=true,this.#r===1)this.#U(t);else {this.#A(s);let r=this.#e[s];if(this.#t(r)?r.__abortController.abort(new Error("deleted")):(this.#_||this.#c)&&(this.#_&&this.#m?.(r,e,t),this.#c&&this.#a?.push([r,e,t])),this.#s.delete(e),this.#i[s]=void 0,this.#e[s]=void 0,s===this.#n)this.#n=this.#u[s];else if(s===this.#o)this.#o=this.#l[s];else {let a=this.#u[s];this.#l[a]=this.#l[s];let l=this.#l[s];this.#u[l]=this.#u[s];}this.#r--,this.#b.push(s);}}if(this.#c&&this.#a?.length){let s=this.#a,r;for(;r=s?.shift();)this.#p?.(...r);}return i}clear(){return this.#U("delete")}#U(e){for(let t of this.#v({allowStale:true})){let i=this.#e[t];if(this.#t(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#i[t];this.#_&&this.#m?.(i,s,e),this.#c&&this.#a?.push([i,s,e]);}}if(this.#s.clear(),this.#e.fill(void 0),this.#i.fill(void 0),this.#d&&this.#w&&(this.#d.fill(0),this.#w.fill(0)),this.#y&&this.#y.fill(0),this.#o=0,this.#n=0,this.#b.length=0,this.#S=0,this.#r=0,this.#c&&this.#a){let t=this.#a,i;for(;i=t?.shift();)this.#p?.(...i);}}};var A=class{cache;map=new Map;constructor(e){this.cache=new R({max:e.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(e){let t=this.map.delete(e);return t&&this.cache.delete(e),t}get forEach(){return this.map.forEach}get(e){let t=this.cache.get(e);return t||this.map.get(e)}has(e){return this.map.has(e)}set(e,t){return this.map.set(e,t),this.cache.set(e,t),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 o=class n{static storage=new A({cacheSize:20});static startingStorage=[];static flags=Array();static tempStorage=new Map;static tempStorageDeadlines=new Map;constructor(){}static clearOldTempVariables(e){n.tempStorageDeadlines.forEach((t,i)=>{t>e&&(n.tempStorage.delete(i),n.tempStorageDeadlines.delete(i),n.storage.cache.delete(i));});}static setVariable(e,t){let i=n.tempStorage.has(e);t==null?(n.storage.map.delete(e),!i&&n.storage.cache.delete(e)):(n.storage.map.set(e,t),!i&&n.storage.cache.set(e,t));}static getVariable(e){let t=n.storage.cache.get(e);return t===void 0&&(t=n.tempStorage.get(e)),t===void 0&&(t=n.storage.map.get(e)),V(t)}static removeVariable(e){n.storage.delete(e);}static setFlag(e,t){if(t)this.flags.includes(e)||this.flags.push(e);else {let i=this.flags.indexOf(e);i>-1&&this.flags.splice(i,1);}}static getFlag(e){return this.flags.includes(e)}};var M=class{get storage(){return o.storage.map}get cache(){return o.storage.cache}get flags(){return o.flags}get tempStorage(){return o.tempStorage}get tempStorageDeadlines(){return o.tempStorageDeadlines}set startingStorage(e){let t=[];Object.entries(e).forEach(([i,s])=>{t.push({key:i,value:s});}),o.startingStorage=t;}setVariable(e,t){return o.setVariable(e,t)}getVariable(e){return o.getVariable(e)}removeVariable(e){return o.removeVariable(e)}setTempVariable(e,t){if(t==null){this.removeTempVariable(e);return}else o.tempStorage.set(e,t),o.storage.cache.set(e,t),o.tempStorageDeadlines.has(e)||o.tempStorageDeadlines.set(e,x.openedLabels);}removeTempVariable(e){o.tempStorage.has(e)&&(o.tempStorage.delete(e),o.tempStorageDeadlines.delete(e),o.storage.cache.delete(e));}setFlag(e,t){return o.setFlag(e,t)}getFlag(e){return o.getFlag(e)}clear(){this.storage.clear(),this.cache.clear(),o.flags=[],o.tempStorage.clear(),o.tempStorageDeadlines.clear(),o.startingStorage.forEach(({key:e,value:t})=>{this.storage.set(e,t);});}export(){let e=[];[...this.storage.keys()].forEach(s=>{e.push({key:s,value:this.storage.get(s)});});let t=[];[...o.tempStorage.keys()].forEach(s=>{t.push({key:s,value:o.tempStorage.get(s)});});let i=[];return [...o.tempStorageDeadlines.keys()].forEach(s=>{i.push({key:s,value:o.tempStorageDeadlines.get(s)});}),V({base:e,temp:t,tempDeadlines:i,flags:o.flags})}restore(e){this.clear();try{e?(Array.isArray(e)&&e.forEach(t=>{if(t.key==="___temp_storage___"){let i=t.value;Object.entries(i).forEach(([s,r])=>{o.tempStorage.set(s,r);});}else if(t.key==="___temp_storage_deadlines___"){let i=t.value;Object.entries(i).forEach(([s,r])=>{o.tempStorageDeadlines.set(s,r);});}else t.key==="___flags___"?t.value.forEach(s=>{o.flags.push(s);}):this.storage.set(t.key,t.value);}),"base"in e&&"temp"in e&&"tempDeadlines"in e?(e.base?.forEach(t=>{this.storage.set(t.key,t.value);}),e.temp?.forEach(t=>{o.tempStorage.set(t.key,t.value);}),e.tempDeadlines?.forEach(t=>{o.tempStorageDeadlines.set(t.key,t.value);})):Object.entries(e).forEach(([t,i])=>{t==="___temp_storage___"?Object.entries(i).forEach(([s,r])=>{o.tempStorage.set(s,r);}):t==="___temp_storage_deadlines___"?Object.entries(i).forEach(([s,r])=>{o.tempStorageDeadlines.set(s,r);}):t==="___flags___"?i.forEach(s=>{o.flags.push(s);}):this.storage.set(t,i);})):u.warn("No storage data found");}catch(t){u.error("Error importing data",t);}}};var D=class{constructor(e,t){this.categoryId=e,this._id=t;}_id;get id(){return this._id}categoryId;setStorageProperty(e,t){let i=o.getVariable(this.categoryId);i||(i={}),i.hasOwnProperty(this.id)||(i[this.id]={}),t==null?i[this.id].hasOwnProperty(e)&&delete i[this.id][e]:i[this.id]={...i[this.id],[e]:t},Object.keys(i[this.id]).length===0&&delete i[this.id],o.setVariable(this.categoryId,i);}getStorageProperty(e,t=this.id){let i=o.getVariable(this.categoryId);if(i&&i.hasOwnProperty(t)&&i[t].hasOwnProperty(e))return i[t][e]}};var pe=new M;export{o as StorageManagerStatic,D as StoredClassModel,pe as storage};
1
+ var Qt=Object.defineProperty;var Kt=l=>{throw TypeError(l)};var Zt=(l,t,i)=>t in l?Qt(l,t,{enumerable:true,configurable:true,writable:true,value:i}):l[t]=i;var c=(l,t,i)=>Zt(l,typeof t!="symbol"?t+"":t,i),Lt=(l,t,i)=>t.has(l)||Kt("Cannot "+i);var e=(l,t,i)=>(Lt(l,t,"read from private field"),i?i.call(l):t.get(l)),b=(l,t,i)=>t.has(l)?Kt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(l):t.set(l,i),u=(l,t,i,s)=>(Lt(l,t,"write to private field"),t.set(l,i),i),h=(l,t,i)=>(Lt(l,t,"access private method"),i);var Ct=(l,t,i,s)=>({set _(r){u(l,t,r);},get _(){return e(l,t,s)}});var T;(r=>(r.log=(n,...a)=>console.log(`[Pixi\u2019VN] ${n}`,...a),r.warn=(n,...a)=>console.warn(`[Pixi\u2019VN] ${n}`,...a),r.error=(n,...a)=>console.error(`[Pixi\u2019VN] ${n}`,...a),r.info=(n,...a)=>console.info(`[Pixi\u2019VN] ${n}`,...a)))(T||(T={}));var f=class f{static init(t){f._getStepCounter=t.getStepCounter,f._setStepCounter=t.setStepCounter,f._getCurrentGameStepState=t.getCurrentGameStepState,f._restoreGameStepState=t.restoreGameStepState,f._getOpenedLabels=t.getOpenedLabels,t.onGoNextEnd&&(f._onGoNextEnd=t.onGoNextEnd),f._getVariable=t.getVariable,f._setVariable=t.setVariable,f._removeVariable=t.removeVariable,f._getFlag=t.getFlag,f._setFlag=t.setFlag,t.onLabelClosing&&(f._onLabelClosing=t.onLabelClosing),f._addHistoryItem=t.addHistoryItem,f._getCurrentStepsRunningNumber=t.getCurrentStepsRunningNumber,f._getCharacter=t.getCharacter;}static get stepCounter(){return f._getStepCounter()}static set stepCounter(t){f._setStepCounter(t);}static get currentGameStepState(){return f._getCurrentGameStepState()}static get restoreGameStepState(){return f._restoreGameStepState}static get openedLabels(){return f._getOpenedLabels()}static get onGoNextEnd(){return f._onGoNextEnd}static get getVariable(){return f._getVariable}static get setVariable(){return f._setVariable}static get removeVariable(){return f._removeVariable}static get getFlag(){return f._getFlag}static get setFlag(){return f._setFlag}static get onLabelClosing(){return f._onLabelClosing}static get addHistoryItem(){return f._addHistoryItem}static get currentStepsRunningNumber(){return f._getCurrentStepsRunningNumber()}static get getCharacter(){return f._getCharacter}};c(f,"_getStepCounter",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_setStepCounter",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getCurrentGameStepState",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_restoreGameStepState",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getOpenedLabels",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_onGoNextEnd",async()=>{}),c(f,"_getVariable",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_setVariable",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_removeVariable",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getFlag",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_setFlag",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_onLabelClosing",()=>{}),c(f,"_addHistoryItem",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getCurrentStepsRunningNumber",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented, you should initialize the Game: Game.init()")}),c(f,"_getCharacter",()=>{throw T.error("Method not implemented, you should initialize the Game: Game.init()"),new Error("Method not implemented.")}),c(f,"onEnd"),c(f,"onError");var Et=f;function Ft(l){try{if(typeof l>"u")return l;let t=JSON.stringify(l);return JSON.parse(t)}catch(t){throw T.error("Error creating exportable element",l,t),new Error("[Pixi\u2019VN] Error creating exportable element")}}var ft=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,qt=new Set,Rt=typeof process=="object"&&process?process:{},Jt=(l,t,i,s)=>{typeof Rt.emitWarning=="function"?Rt.emitWarning(l,t,i,s):console.error(`[${i}] ${t}: ${l}`);},xt=globalThis.AbortController,$t=globalThis.AbortSignal;if(typeof xt>"u"){$t=class{constructor(){c(this,"onabort");c(this,"_onabort",[]);c(this,"reason");c(this,"aborted",false);}addEventListener(s,r){this._onabort.push(r);}},xt=class{constructor(){c(this,"signal",new $t);t();}abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=true;for(let r of this.signal._onabort)r(s);this.signal.onabort?.(s);}}};let l=Rt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=false,Jt("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 kt=l=>!qt.has(l),et=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),Yt=l=>et(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?dt:null:null,dt=class extends Array{constructor(t){super(t),this.fill(0);}},gt,at=class at{constructor(t,i){c(this,"heap");c(this,"length");if(!e(at,gt))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(t),this.length=0;}static create(t){let i=Yt(t);if(!i)return [];u(at,gt,true);let s=new at(t,i);return u(at,gt,false),s}push(t){this.heap[this.length++]=t;}pop(){return this.heap[--this.length]}};gt=new WeakMap,b(at,gt,false);var Dt=at,Bt,Ut,K,D,$,ot,B,mt,pt,F,U,G,w,p,M,N,I,A,q,O,J,Y,W,X,nt,V,St,o,Nt,ht,k,vt,P,Xt,lt,bt,Tt,it,st,Wt,At,Ot,y,Pt,_t,rt,jt,Ht=class Ht{constructor(t){b(this,o);b(this,K);b(this,D);b(this,$);b(this,ot);b(this,B);b(this,mt);b(this,pt);c(this,"ttl");c(this,"ttlResolution");c(this,"ttlAutopurge");c(this,"updateAgeOnGet");c(this,"updateAgeOnHas");c(this,"allowStale");c(this,"noDisposeOnSet");c(this,"noUpdateTTL");c(this,"maxEntrySize");c(this,"sizeCalculation");c(this,"noDeleteOnFetchRejection");c(this,"noDeleteOnStaleGet");c(this,"allowStaleOnFetchAbort");c(this,"allowStaleOnFetchRejection");c(this,"ignoreFetchAbort");b(this,F);b(this,U);b(this,G);b(this,w);b(this,p);b(this,M);b(this,N);b(this,I);b(this,A);b(this,q);b(this,O);b(this,J);b(this,Y);b(this,W);b(this,X);b(this,nt);b(this,V);b(this,St);b(this,ht,()=>{});b(this,k,()=>{});b(this,vt,()=>{});b(this,P,()=>false);b(this,lt,t=>{});b(this,bt,(t,i,s)=>{});b(this,Tt,(t,i,s,r)=>{if(s||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});c(this,Bt,"LRUCache");let{max:i=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:m,allowStale:d,dispose:C,onInsert:Q,disposeAfter:E,noDisposeOnSet:tt,noUpdateTTL:j,maxSize:Z=0,maxEntrySize:v=0,sizeCalculation:_,fetchMethod:S,memoMethod:L,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:wt,ignoreFetchAbort:ct}=t;if(i!==0&&!et(i))throw new TypeError("max option must be a nonnegative integer");let zt=i?Yt(i):Array;if(!zt)throw new Error("invalid max value: "+i);if(u(this,K,i),u(this,D,Z),this.maxEntrySize=v||e(this,D),this.sizeCalculation=_,this.sizeCalculation){if(!e(this,D)&&!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(L!==void 0&&typeof L!="function")throw new TypeError("memoMethod must be a function if defined");if(u(this,pt,L),S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(u(this,mt,S),u(this,nt,!!S),u(this,G,new Map),u(this,w,new Array(i).fill(void 0)),u(this,p,new Array(i).fill(void 0)),u(this,M,new zt(i)),u(this,N,new zt(i)),u(this,I,0),u(this,A,0),u(this,q,Dt.create(i)),u(this,F,0),u(this,U,0),typeof C=="function"&&u(this,$,C),typeof Q=="function"&&u(this,ot,Q),typeof E=="function"?(u(this,B,E),u(this,O,[])):(u(this,B,void 0),u(this,O,void 0)),u(this,X,!!e(this,$)),u(this,St,!!e(this,ot)),u(this,V,!!e(this,B)),this.noDisposeOnSet=!!tt,this.noUpdateTTL=!!j,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!H,this.allowStaleOnFetchAbort=!!wt,this.ignoreFetchAbort=!!ct,this.maxEntrySize!==0){if(e(this,D)!==0&&!et(e(this,D)))throw new TypeError("maxSize must be a positive integer if specified");if(!et(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");h(this,o,Xt).call(this);}if(this.allowStale=!!d,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!m,this.ttlResolution=et(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!et(this.ttl))throw new TypeError("ttl must be a positive integer if specified");h(this,o,Nt).call(this);}if(e(this,K)===0&&this.ttl===0&&e(this,D)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!e(this,K)&&!e(this,D)){let ut="LRU_CACHE_UNBOUNDED";kt(ut)&&(qt.add(ut),Jt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ut,Ht));}}static unsafeExposeInternals(t){return {starts:e(t,Y),ttls:e(t,W),sizes:e(t,J),keyMap:e(t,G),keyList:e(t,w),valList:e(t,p),next:e(t,M),prev:e(t,N),get head(){return e(t,I)},get tail(){return e(t,A)},free:e(t,q),isBackgroundFetch:i=>{var s;return h(s=t,o,y).call(s,i)},backgroundFetch:(i,s,r,n)=>{var a;return h(a=t,o,Ot).call(a,i,s,r,n)},moveToTail:i=>{var s;return h(s=t,o,_t).call(s,i)},indexes:i=>{var s;return h(s=t,o,it).call(s,i)},rindexes:i=>{var s;return h(s=t,o,st).call(s,i)},isStale:i=>{var s;return e(s=t,P).call(s,i)}}}get max(){return e(this,K)}get maxSize(){return e(this,D)}get calculatedSize(){return e(this,U)}get size(){return e(this,F)}get fetchMethod(){return e(this,mt)}get memoMethod(){return e(this,pt)}get dispose(){return e(this,$)}get onInsert(){return e(this,ot)}get disposeAfter(){return e(this,B)}getRemainingTTL(t){return e(this,G).has(t)?1/0:0}*entries(){for(let t of h(this,o,it).call(this))e(this,p)[t]!==void 0&&e(this,w)[t]!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield [e(this,w)[t],e(this,p)[t]]);}*rentries(){for(let t of h(this,o,st).call(this))e(this,p)[t]!==void 0&&e(this,w)[t]!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield [e(this,w)[t],e(this,p)[t]]);}*keys(){for(let t of h(this,o,it).call(this)){let i=e(this,w)[t];i!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield i);}}*rkeys(){for(let t of h(this,o,st).call(this)){let i=e(this,w)[t];i!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield i);}}*values(){for(let t of h(this,o,it).call(this))e(this,p)[t]!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield e(this,p)[t]);}*rvalues(){for(let t of h(this,o,st).call(this))e(this,p)[t]!==void 0&&!h(this,o,y).call(this,e(this,p)[t])&&(yield e(this,p)[t]);}[(Ut=Symbol.iterator,Bt=Symbol.toStringTag,Ut)](){return this.entries()}find(t,i={}){for(let s of h(this,o,it).call(this)){let r=e(this,p)[s],n=h(this,o,y).call(this,r)?r.__staleWhileFetching:r;if(n!==void 0&&t(n,e(this,w)[s],this))return this.get(e(this,w)[s],i)}}forEach(t,i=this){for(let s of h(this,o,it).call(this)){let r=e(this,p)[s],n=h(this,o,y).call(this,r)?r.__staleWhileFetching:r;n!==void 0&&t.call(i,n,e(this,w)[s],this);}}rforEach(t,i=this){for(let s of h(this,o,st).call(this)){let r=e(this,p)[s],n=h(this,o,y).call(this,r)?r.__staleWhileFetching:r;n!==void 0&&t.call(i,n,e(this,w)[s],this);}}purgeStale(){let t=false;for(let i of h(this,o,st).call(this,{allowStale:true}))e(this,P).call(this,i)&&(h(this,o,rt).call(this,e(this,w)[i],"expire"),t=true);return t}info(t){let i=e(this,G).get(t);if(i===void 0)return;let s=e(this,p)[i],r=h(this,o,y).call(this,s)?s.__staleWhileFetching:s;if(r===void 0)return;let n={value:r};if(e(this,W)&&e(this,Y)){let a=e(this,W)[i],m=e(this,Y)[i];if(a&&m){let d=a-(ft.now()-m);n.ttl=d,n.start=Date.now();}}return e(this,J)&&(n.size=e(this,J)[i]),n}dump(){let t=[];for(let i of h(this,o,it).call(this,{allowStale:true})){let s=e(this,w)[i],r=e(this,p)[i],n=h(this,o,y).call(this,r)?r.__staleWhileFetching:r;if(n===void 0||s===void 0)continue;let a={value:n};if(e(this,W)&&e(this,Y)){a.ttl=e(this,W)[i];let m=ft.now()-e(this,Y)[i];a.start=Math.floor(Date.now()-m);}e(this,J)&&(a.size=e(this,J)[i]),t.unshift([s,a]);}return t}load(t){this.clear();for(let[i,s]of t){if(s.start){let r=Date.now()-s.start;s.start=ft.now()-r;}this.set(i,s.value,s);}}set(t,i,s={}){var tt,j,Z,v;if(i===void 0)return this.delete(t),this;let{ttl:r=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:m=this.sizeCalculation,status:d}=s,{noUpdateTTL:C=this.noUpdateTTL}=s,Q=e(this,Tt).call(this,t,i,s.size||0,m);if(this.maxEntrySize&&Q>this.maxEntrySize)return d&&(d.set="miss",d.maxEntrySizeExceeded=true),h(this,o,rt).call(this,t,"set"),this;let E=e(this,F)===0?void 0:e(this,G).get(t);if(E===void 0)E=e(this,F)===0?e(this,A):e(this,q).length!==0?e(this,q).pop():e(this,F)===e(this,K)?h(this,o,At).call(this,false):e(this,F),e(this,w)[E]=t,e(this,p)[E]=i,e(this,G).set(t,E),e(this,M)[e(this,A)]=E,e(this,N)[E]=e(this,A),u(this,A,E),Ct(this,F)._++,e(this,bt).call(this,E,Q,d),d&&(d.set="add"),C=false,e(this,St)&&((tt=e(this,ot))==null||tt.call(this,i,t,"add"));else {h(this,o,_t).call(this,E);let _=e(this,p)[E];if(i!==_){if(e(this,nt)&&h(this,o,y).call(this,_)){_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:S}=_;S!==void 0&&!a&&(e(this,X)&&((j=e(this,$))==null||j.call(this,S,t,"set")),e(this,V)&&e(this,O)?.push([S,t,"set"]));}else a||(e(this,X)&&((Z=e(this,$))==null||Z.call(this,_,t,"set")),e(this,V)&&e(this,O)?.push([_,t,"set"]));if(e(this,lt).call(this,E),e(this,bt).call(this,E,Q,d),e(this,p)[E]=i,d){d.set="replace";let S=_&&h(this,o,y).call(this,_)?_.__staleWhileFetching:_;S!==void 0&&(d.oldValue=S);}}else d&&(d.set="update");e(this,St)&&this.onInsert?.(i,t,i===_?"update":"replace");}if(r!==0&&!e(this,W)&&h(this,o,Nt).call(this),e(this,W)&&(C||e(this,vt).call(this,E,r,n),d&&e(this,k).call(this,d,E)),!a&&e(this,V)&&e(this,O)){let _=e(this,O),S;for(;S=_?.shift();)(v=e(this,B))==null||v.call(this,...S);}return this}pop(){var t;try{for(;e(this,F);){let i=e(this,p)[e(this,I)];if(h(this,o,At).call(this,!0),h(this,o,y).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(e(this,V)&&e(this,O)){let i=e(this,O),s;for(;s=i?.shift();)(t=e(this,B))==null||t.call(this,...s);}}}has(t,i={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:r}=i,n=e(this,G).get(t);if(n!==void 0){let a=e(this,p)[n];if(h(this,o,y).call(this,a)&&a.__staleWhileFetching===void 0)return false;if(e(this,P).call(this,n))r&&(r.has="stale",e(this,k).call(this,r,n));else return s&&e(this,ht).call(this,n),r&&(r.has="hit",e(this,k).call(this,r,n)),true}else r&&(r.has="miss");return false}peek(t,i={}){let{allowStale:s=this.allowStale}=i,r=e(this,G).get(t);if(r===void 0||!s&&e(this,P).call(this,r))return;let n=e(this,p)[r];return h(this,o,y).call(this,n)?n.__staleWhileFetching:n}async fetch(t,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:m=this.noDisposeOnSet,size:d=0,sizeCalculation:C=this.sizeCalculation,noUpdateTTL:Q=this.noUpdateTTL,noDeleteOnFetchRejection:E=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:tt=this.allowStaleOnFetchRejection,ignoreFetchAbort:j=this.ignoreFetchAbort,allowStaleOnFetchAbort:Z=this.allowStaleOnFetchAbort,context:v,forceRefresh:_=false,status:S,signal:L}=i;if(!e(this,nt))return S&&(S.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:S});let R={allowStale:s,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:m,size:d,sizeCalculation:C,noUpdateTTL:Q,noDeleteOnFetchRejection:E,allowStaleOnFetchRejection:tt,allowStaleOnFetchAbort:Z,ignoreFetchAbort:j,status:S,signal:L},x=e(this,G).get(t);if(x===void 0){S&&(S.fetch="miss");let H=h(this,o,Ot).call(this,t,x,R,v);return H.__returned=H}else {let H=e(this,p)[x];if(h(this,o,y).call(this,H)){let Vt=s&&H.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",Vt&&(S.returnedStale=true)),Vt?H.__staleWhileFetching:H.__returned=H}let wt=e(this,P).call(this,x);if(!_&&!wt)return S&&(S.fetch="hit"),h(this,o,_t).call(this,x),r&&e(this,ht).call(this,x),S&&e(this,k).call(this,S,x),H;let ct=h(this,o,Ot).call(this,t,x,R,v),ut=ct.__staleWhileFetching!==void 0&&s;return S&&(S.fetch=wt?"stale":"refresh",ut&&wt&&(S.returnedStale=true)),ut?ct.__staleWhileFetching:ct.__returned=ct}}async forceFetch(t,i={}){let s=await this.fetch(t,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,i={}){let s=e(this,pt);if(!s)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...a}=i,m=this.get(t,a);if(!n&&m!==void 0)return m;let d=s(t,m,{options:a,context:r});return this.set(t,d,a),d}get(t,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=i,m=e(this,G).get(t);if(m!==void 0){let d=e(this,p)[m],C=h(this,o,y).call(this,d);return a&&e(this,k).call(this,a,m),e(this,P).call(this,m)?(a&&(a.get="stale"),C?(a&&s&&d.__staleWhileFetching!==void 0&&(a.returnedStale=true),s?d.__staleWhileFetching:void 0):(n||h(this,o,rt).call(this,t,"expire"),a&&s&&(a.returnedStale=true),s?d:void 0)):(a&&(a.get="hit"),C?d.__staleWhileFetching:(h(this,o,_t).call(this,m),r&&e(this,ht).call(this,m),d))}else a&&(a.get="miss");}delete(t){return h(this,o,rt).call(this,t,"delete")}clear(){return h(this,o,jt).call(this,"delete")}};K=new WeakMap,D=new WeakMap,$=new WeakMap,ot=new WeakMap,B=new WeakMap,mt=new WeakMap,pt=new WeakMap,F=new WeakMap,U=new WeakMap,G=new WeakMap,w=new WeakMap,p=new WeakMap,M=new WeakMap,N=new WeakMap,I=new WeakMap,A=new WeakMap,q=new WeakMap,O=new WeakMap,J=new WeakMap,Y=new WeakMap,W=new WeakMap,X=new WeakMap,nt=new WeakMap,V=new WeakMap,St=new WeakMap,o=new WeakSet,Nt=function(){let t=new dt(e(this,K)),i=new dt(e(this,K));u(this,W,t),u(this,Y,i),u(this,vt,(n,a,m=ft.now())=>{if(i[n]=a!==0?m:0,t[n]=a,a!==0&&this.ttlAutopurge){let d=setTimeout(()=>{e(this,P).call(this,n)&&h(this,o,rt).call(this,e(this,w)[n],"expire");},a+1);d.unref&&d.unref();}}),u(this,ht,n=>{i[n]=t[n]!==0?ft.now():0;}),u(this,k,(n,a)=>{if(t[a]){let m=t[a],d=i[a];if(!m||!d)return;n.ttl=m,n.start=d,n.now=s||r();let C=n.now-d;n.remainingTTL=m-C;}});let s=0,r=()=>{let n=ft.now();if(this.ttlResolution>0){s=n;let a=setTimeout(()=>s=0,this.ttlResolution);a.unref&&a.unref();}return n};this.getRemainingTTL=n=>{let a=e(this,G).get(n);if(a===void 0)return 0;let m=t[a],d=i[a];if(!m||!d)return 1/0;let C=(s||r())-d;return m-C},u(this,P,n=>{let a=i[n],m=t[n];return !!m&&!!a&&(s||r())-a>m});},ht=new WeakMap,k=new WeakMap,vt=new WeakMap,P=new WeakMap,Xt=function(){let t=new dt(e(this,K));u(this,U,0),u(this,J,t),u(this,lt,i=>{u(this,U,e(this,U)-t[i]),t[i]=0;}),u(this,Tt,(i,s,r,n)=>{if(h(this,o,y).call(this,s))return 0;if(!et(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(s,i),!et(r))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 r}),u(this,bt,(i,s,r)=>{if(t[i]=s,e(this,D)){let n=e(this,D)-t[i];for(;e(this,U)>n;)h(this,o,At).call(this,true);}u(this,U,e(this,U)+t[i]),r&&(r.entrySize=s,r.totalCalculatedSize=e(this,U));});},lt=new WeakMap,bt=new WeakMap,Tt=new WeakMap,it=function*({allowStale:t=this.allowStale}={}){if(e(this,F))for(let i=e(this,A);!(!h(this,o,Wt).call(this,i)||((t||!e(this,P).call(this,i))&&(yield i),i===e(this,I)));)i=e(this,N)[i];},st=function*({allowStale:t=this.allowStale}={}){if(e(this,F))for(let i=e(this,I);!(!h(this,o,Wt).call(this,i)||((t||!e(this,P).call(this,i))&&(yield i),i===e(this,A)));)i=e(this,M)[i];},Wt=function(t){return t!==void 0&&e(this,G).get(e(this,w)[t])===t},At=function(t){var n;let i=e(this,I),s=e(this,w)[i],r=e(this,p)[i];return e(this,nt)&&h(this,o,y).call(this,r)?r.__abortController.abort(new Error("evicted")):(e(this,X)||e(this,V))&&(e(this,X)&&((n=e(this,$))==null||n.call(this,r,s,"evict")),e(this,V)&&e(this,O)?.push([r,s,"evict"])),e(this,lt).call(this,i),t&&(e(this,w)[i]=void 0,e(this,p)[i]=void 0,e(this,q).push(i)),e(this,F)===1?(u(this,I,u(this,A,0)),e(this,q).length=0):u(this,I,e(this,M)[i]),e(this,G).delete(s),Ct(this,F)._--,i},Ot=function(t,i,s,r){let n=i===void 0?void 0:e(this,p)[i];if(h(this,o,y).call(this,n))return n;let a=new xt,{signal:m}=s;m?.addEventListener("abort",()=>a.abort(m.reason),{signal:a.signal});let d={signal:a.signal,options:s,context:r},C=(v,_=false)=>{let{aborted:S}=a.signal,L=s.ignoreFetchAbort&&v!==void 0;if(s.status&&(S&&!_?(s.status.fetchAborted=true,s.status.fetchError=a.signal.reason,L&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),S&&!L&&!_)return E(a.signal.reason);let R=j;return e(this,p)[i]===j&&(v===void 0?R.__staleWhileFetching?e(this,p)[i]=R.__staleWhileFetching:h(this,o,rt).call(this,t,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(t,v,d.options))),v},Q=v=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=v),E(v)),E=v=>{let{aborted:_}=a.signal,S=_&&s.allowStaleOnFetchAbort,L=S||s.allowStaleOnFetchRejection,R=L||s.noDeleteOnFetchRejection,x=j;if(e(this,p)[i]===j&&(!R||x.__staleWhileFetching===void 0?h(this,o,rt).call(this,t,"fetch"):S||(e(this,p)[i]=x.__staleWhileFetching)),L)return s.status&&x.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),x.__staleWhileFetching;if(x.__returned===x)throw v},tt=(v,_)=>{var L;let S=(L=e(this,mt))==null?void 0:L.call(this,t,n,d);S&&S instanceof Promise&&S.then(R=>v(R===void 0?void 0:R),_),a.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(v(void 0),s.allowStaleOnFetchAbort&&(v=R=>C(R,true)));});};s.status&&(s.status.fetchDispatched=true);let j=new Promise(tt).then(C,Q),Z=Object.assign(j,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return i===void 0?(this.set(t,Z,{...d.options,status:void 0}),i=e(this,G).get(t)):e(this,p)[i]=Z,Z},y=function(t){if(!e(this,nt))return false;let i=t;return !!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof xt},Pt=function(t,i){e(this,N)[i]=t,e(this,M)[t]=i;},_t=function(t){t!==e(this,A)&&(t===e(this,I)?u(this,I,e(this,M)[t]):h(this,o,Pt).call(this,e(this,N)[t],e(this,M)[t]),h(this,o,Pt).call(this,e(this,A),t),u(this,A,t));},rt=function(t,i){var r,n;let s=false;if(e(this,F)!==0){let a=e(this,G).get(t);if(a!==void 0)if(s=true,e(this,F)===1)h(this,o,jt).call(this,i);else {e(this,lt).call(this,a);let m=e(this,p)[a];if(h(this,o,y).call(this,m)?m.__abortController.abort(new Error("deleted")):(e(this,X)||e(this,V))&&(e(this,X)&&((r=e(this,$))==null||r.call(this,m,t,i)),e(this,V)&&e(this,O)?.push([m,t,i])),e(this,G).delete(t),e(this,w)[a]=void 0,e(this,p)[a]=void 0,a===e(this,A))u(this,A,e(this,N)[a]);else if(a===e(this,I))u(this,I,e(this,M)[a]);else {let d=e(this,N)[a];e(this,M)[d]=e(this,M)[a];let C=e(this,M)[a];e(this,N)[C]=e(this,N)[a];}Ct(this,F)._--,e(this,q).push(a);}}if(e(this,V)&&e(this,O)?.length){let a=e(this,O),m;for(;m=a?.shift();)(n=e(this,B))==null||n.call(this,...m);}return s},jt=function(t){var i,s;for(let r of h(this,o,st).call(this,{allowStale:true})){let n=e(this,p)[r];if(h(this,o,y).call(this,n))n.__abortController.abort(new Error("deleted"));else {let a=e(this,w)[r];e(this,X)&&((i=e(this,$))==null||i.call(this,n,a,t)),e(this,V)&&e(this,O)?.push([n,a,t]);}}if(e(this,G).clear(),e(this,p).fill(void 0),e(this,w).fill(void 0),e(this,W)&&e(this,Y)&&(e(this,W).fill(0),e(this,Y).fill(0)),e(this,J)&&e(this,J).fill(0),u(this,I,0),u(this,A,0),e(this,q).length=0,u(this,U,0),u(this,F,0),e(this,V)&&e(this,O)){let r=e(this,O),n;for(;n=r?.shift();)(s=e(this,B))==null||s.call(this,...n);}};var It=Ht;var yt=class{constructor(t){c(this,"cache");c(this,"map",new Map);this.cache=new It({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 i=this.map.delete(t);return i&&this.cache.delete(t),i}get forEach(){return this.map.forEach}get(t){let i=this.cache.get(t);return i||this.map.get(t)}has(t){return this.map.has(t)}set(t,i){return this.map.set(t,i),this.cache.set(t,i),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var z=class z{constructor(){}static clearOldTempVariables(t){z.tempStorageDeadlines.forEach((i,s)=>{i>t&&(z.tempStorage.delete(s),z.tempStorageDeadlines.delete(s),z.storage.cache.delete(s));});}static setVariable(t,i){let s=z.tempStorage.has(t);i==null?(z.storage.map.delete(t),!s&&z.storage.cache.delete(t)):(z.storage.map.set(t,i),!s&&z.storage.cache.set(t,i));}static getVariable(t){let i=z.storage.cache.get(t);return i===void 0&&(i=z.tempStorage.get(t)),i===void 0&&(i=z.storage.map.get(t)),Ft(i)}static removeVariable(t){z.storage.delete(t);}static setFlag(t,i){if(i)this.flags.includes(t)||this.flags.push(t);else {let s=this.flags.indexOf(t);s>-1&&this.flags.splice(s,1);}}static getFlag(t){return this.flags.includes(t)}};c(z,"storage",new yt({cacheSize:20})),c(z,"startingStorage",[]),c(z,"flags",Array()),c(z,"tempStorage",new Map),c(z,"tempStorageDeadlines",new Map);var g=z;var Gt=class{get storage(){return g.storage.map}get cache(){return g.storage.cache}get flags(){return g.flags}get tempStorage(){return g.tempStorage}get tempStorageDeadlines(){return g.tempStorageDeadlines}set startingStorage(t){let i=[];Object.entries(t).forEach(([s,r])=>{i.push({key:s,value:r});}),g.startingStorage=i;}setVariable(t,i){return g.setVariable(t,i)}getVariable(t){return g.getVariable(t)}removeVariable(t){return g.removeVariable(t)}setTempVariable(t,i){if(i==null){this.removeTempVariable(t);return}else g.tempStorage.set(t,i),g.storage.cache.set(t,i),g.tempStorageDeadlines.has(t)||g.tempStorageDeadlines.set(t,Et.openedLabels);}removeTempVariable(t){g.tempStorage.has(t)&&(g.tempStorage.delete(t),g.tempStorageDeadlines.delete(t),g.storage.cache.delete(t));}setFlag(t,i){return g.setFlag(t,i)}getFlag(t){return g.getFlag(t)}clear(){this.storage.clear(),this.cache.clear(),g.flags=[],g.tempStorage.clear(),g.tempStorageDeadlines.clear(),g.startingStorage.forEach(({key:t,value:i})=>{this.storage.set(t,i);});}export(){let t=[];[...this.storage.keys()].forEach(r=>{t.push({key:r,value:this.storage.get(r)});});let i=[];[...g.tempStorage.keys()].forEach(r=>{i.push({key:r,value:g.tempStorage.get(r)});});let s=[];return [...g.tempStorageDeadlines.keys()].forEach(r=>{s.push({key:r,value:g.tempStorageDeadlines.get(r)});}),Ft({base:t,temp:i,tempDeadlines:s,flags:g.flags})}restore(t){this.clear();try{t?(Array.isArray(t)&&t.forEach(i=>{if(i.key==="___temp_storage___"){let s=i.value;Object.entries(s).forEach(([r,n])=>{g.tempStorage.set(r,n);});}else if(i.key==="___temp_storage_deadlines___"){let s=i.value;Object.entries(s).forEach(([r,n])=>{g.tempStorageDeadlines.set(r,n);});}else i.key==="___flags___"?i.value.forEach(r=>{g.flags.push(r);}):this.storage.set(i.key,i.value);}),"base"in t&&"temp"in t&&"tempDeadlines"in t?(t.base?.forEach(i=>{this.storage.set(i.key,i.value);}),t.temp?.forEach(i=>{g.tempStorage.set(i.key,i.value);}),t.tempDeadlines?.forEach(i=>{g.tempStorageDeadlines.set(i.key,i.value);})):Object.entries(t).forEach(([i,s])=>{i==="___temp_storage___"?Object.entries(s).forEach(([r,n])=>{g.tempStorage.set(r,n);}):i==="___temp_storage_deadlines___"?Object.entries(s).forEach(([r,n])=>{g.tempStorageDeadlines.set(r,n);}):i==="___flags___"?s.forEach(r=>{g.flags.push(r);}):this.storage.set(i,s);})):T.warn("No storage data found");}catch(i){T.error("Error importing data",i);}}};var Mt=class{constructor(t,i){c(this,"_id");c(this,"categoryId");this.categoryId=t,this._id=i;}get id(){return this._id}setStorageProperty(t,i){let s=g.getVariable(this.categoryId);s||(s={}),s.hasOwnProperty(this.id)||(s[this.id]={}),i==null?s[this.id].hasOwnProperty(t)&&delete s[this.id][t]:s[this.id]={...s[this.id],[t]:i},Object.keys(s[this.id]).length===0&&delete s[this.id],g.setVariable(this.categoryId,s);}getStorageProperty(t,i=this.id){let s=g.getVariable(this.categoryId);if(s&&s.hasOwnProperty(i)&&s[i].hasOwnProperty(t))return s[i][t]}};var Oe=new Gt;export{g as StorageManagerStatic,Mt as StoredClassModel,Oe as storage};
@@ -1 +1 @@
1
- 'use strict';var a;(t=>(t.log=(r,...e)=>console.log(`[Pixi\u2019VN] ${r}`,...e),t.warn=(r,...e)=>console.warn(`[Pixi\u2019VN] ${r}`,...e),t.error=(r,...e)=>console.error(`[Pixi\u2019VN] ${r}`,...e),t.info=(r,...e)=>console.info(`[Pixi\u2019VN] ${r}`,...e)))(a||={});function i(o){try{if(typeof o>"u")return o;let n=JSON.stringify(o);return JSON.parse(n)}catch(n){throw a.error("Error creating exportable element",o,n),new Error("[Pixi\u2019VN] Error creating exportable element")}}exports.createExportableElement=i;
1
+ 'use strict';var a;(t=>(t.log=(r,...e)=>console.log(`[Pixi\u2019VN] ${r}`,...e),t.warn=(r,...e)=>console.warn(`[Pixi\u2019VN] ${r}`,...e),t.error=(r,...e)=>console.error(`[Pixi\u2019VN] ${r}`,...e),t.info=(r,...e)=>console.info(`[Pixi\u2019VN] ${r}`,...e)))(a||(a={}));function i(o){try{if(typeof o>"u")return o;let n=JSON.stringify(o);return JSON.parse(n)}catch(n){throw a.error("Error creating exportable element",o,n),new Error("[Pixi\u2019VN] Error creating exportable element")}}exports.createExportableElement=i;
@@ -1 +1 @@
1
- var a;(t=>(t.log=(r,...e)=>console.log(`[Pixi\u2019VN] ${r}`,...e),t.warn=(r,...e)=>console.warn(`[Pixi\u2019VN] ${r}`,...e),t.error=(r,...e)=>console.error(`[Pixi\u2019VN] ${r}`,...e),t.info=(r,...e)=>console.info(`[Pixi\u2019VN] ${r}`,...e)))(a||={});function i(o){try{if(typeof o>"u")return o;let n=JSON.stringify(o);return JSON.parse(n)}catch(n){throw a.error("Error creating exportable element",o,n),new Error("[Pixi\u2019VN] Error creating exportable element")}}export{i as createExportableElement};
1
+ var a;(t=>(t.log=(r,...e)=>console.log(`[Pixi\u2019VN] ${r}`,...e),t.warn=(r,...e)=>console.warn(`[Pixi\u2019VN] ${r}`,...e),t.error=(r,...e)=>console.error(`[Pixi\u2019VN] ${r}`,...e),t.info=(r,...e)=>console.info(`[Pixi\u2019VN] ${r}`,...e)))(a||(a={}));function i(o){try{if(typeof o>"u")return o;let n=JSON.stringify(o);return JSON.parse(n)}catch(n){throw a.error("Error creating exportable element",o,n),new Error("[Pixi\u2019VN] Error creating exportable element")}}export{i as createExportableElement};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drincs/pixi-vn",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "type": "module",
5
5
  "description": "Pixi'VN is a npm package that provides various features for creating visual novels.",
6
6
  "main": "./dist/index.cjs",