@vtex/faststore 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/dist/catalog.json +161 -20
- package/dist/cli/UnreachableCaseError-Crd168Vu.js +10 -0
- package/dist/cli/UnreachableCaseError-Crd168Vu.js.map +1 -0
- package/dist/cli/cacheControl-CEojH_TM.js +158 -0
- package/dist/cli/cacheControl-CEojH_TM.js.map +1 -0
- package/dist/cli/cachePolicy-m2vASMRW.js +26 -0
- package/dist/cli/cachePolicy-m2vASMRW.js.map +1 -0
- package/dist/cli/computeCoreSchemaHash-DPJZj-qJ.js +10 -0
- package/dist/cli/computeCoreSchemaHash-DPJZj-qJ.js.map +1 -0
- package/dist/cli/default-BCQHcwbL.js +253 -0
- package/dist/cli/default-BCQHcwbL.js.map +1 -0
- package/dist/cli/disableSuggestions-yO9UqiWn.js +21 -0
- package/dist/cli/disableSuggestions-yO9UqiWn.js.map +1 -0
- package/dist/cli/dist-C1JhdHfo.js +2001 -0
- package/dist/cli/dist-C1JhdHfo.js.map +1 -0
- package/dist/cli/graphql-DG9thCDG.js +14589 -0
- package/dist/cli/graphql-DG9thCDG.js.map +1 -0
- package/dist/cli/index.d.ts +350 -0
- package/dist/cli/index.js +35047 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.min-BsIHDfFK.js +613 -0
- package/dist/cli/index.min-BsIHDfFK.js.map +1 -0
- package/dist/cli/inlineTrace-uLgOJ3TH.js +52 -0
- package/dist/cli/inlineTrace-uLgOJ3TH.js.map +1 -0
- package/dist/cli/internalPlugin-DnuwN4_4.js +11 -0
- package/dist/cli/internalPlugin-DnuwN4_4.js.map +1 -0
- package/dist/cli/packageVersion-DQAnIEil.js +6 -0
- package/dist/cli/packageVersion-DQAnIEil.js.map +1 -0
- package/dist/cli/rolldown-runtime-BMI-E3GI.js +44 -0
- package/dist/cli/schemaIsSubgraph-DoGh3OYj.js +17 -0
- package/dist/cli/schemaIsSubgraph-DoGh3OYj.js.map +1 -0
- package/dist/cli/schemaReporting-K-me-3-v.js +199 -0
- package/dist/cli/schemaReporting-K-me-3-v.js.map +1 -0
- package/dist/cli/server-runtime.js +49859 -0
- package/dist/cli/server-runtime.js.map +1 -0
- package/dist/cli/traceTreeBuilder-BIcV2U7b.js +9118 -0
- package/dist/cli/traceTreeBuilder-BIcV2U7b.js.map +1 -0
- package/dist/cli/usageReporting-Bpl8vSZX.js +10201 -0
- package/dist/cli/usageReporting-Bpl8vSZX.js.map +1 -0
- package/dist/cli/v4-CBhFvC49.js +42 -0
- package/dist/cli/v4-CBhFvC49.js.map +1 -0
- package/dist/components.d.ts +5 -3
- package/dist/components.js +5 -3
- package/dist/content-types.json +93 -0
- package/dist/core/dist/define-component.d.ts +37 -0
- package/dist/core/dist/index.d.ts +2 -2
- package/dist/docs/account-entry-point.md +1 -1
- package/dist/docs/account-menu-identity.md +160 -0
- package/dist/docs/account-menu.md +106 -23
- package/dist/docs/avatar.md +103 -0
- package/dist/docs/my-account-profile.md +1 -1
- package/dist/docs/product-shelf.md +20 -13
- package/dist/index.d.ts +2 -2
- package/dist/internal/client.js +1 -1
- package/dist/internal/content.d.ts +2 -2
- package/dist/internal/server.d.ts +4 -1
- package/dist/internal/server.js +4 -1
- package/dist/matter/account-access-gate/account-access-gate.js.map +1 -1
- package/dist/matter/account-entry-point/account-entry-point.js +1 -1
- package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
- package/dist/matter/account-menu/account-menu.d.ts +70 -0
- package/dist/matter/account-menu/account-menu.js +201 -9
- package/dist/matter/account-menu/account-menu.js.map +1 -1
- package/dist/matter/account-menu/sign-out-failure.js +50 -0
- package/dist/matter/account-menu/sign-out-failure.js.map +1 -0
- package/dist/matter/account-menu-identity/account-menu-identity.d.ts +21 -0
- package/dist/matter/account-menu-identity/account-menu-identity.js +88 -0
- package/dist/matter/account-menu-identity/account-menu-identity.js.map +1 -0
- package/dist/matter/card-entry/card-entry.js +1 -0
- package/dist/matter/card-entry/card-entry.js.map +1 -1
- package/dist/matter/cart/cart.js +1 -1
- package/dist/matter/client-preferences/client-preferences-fieldset.js +2 -2
- package/dist/matter/client-profile-form/client-profile-fieldset.js +2 -2
- package/dist/matter/identity-summary/identity-summary.js +2 -1
- package/dist/matter/identity-summary/identity-summary.js.map +1 -1
- package/dist/matter/my-account-profile/my-account-profile.d.ts +3 -0
- package/dist/matter/my-account-profile/my-account-profile.js +2 -1
- package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
- package/dist/matter/payment/payment-controller.js +1 -0
- package/dist/matter/payment/payment-controller.js.map +1 -1
- package/dist/matter/payment/payment.js +1 -0
- package/dist/matter/payment/payment.js.map +1 -1
- package/dist/matter/product-shelf/product-shelf.d.ts +61 -31
- package/dist/matter/product-shelf/product-shelf.js +157 -57
- package/dist/matter/product-shelf/product-shelf.js.map +1 -1
- package/dist/matter/saved-cards/saved-cards.js +1 -0
- package/dist/matter/saved-cards/saved-cards.js.map +1 -1
- package/dist/matter/shipping-address/shipping-address.js +2 -2
- package/dist/particles/avatar/avatar.d.ts +17 -0
- package/dist/particles/avatar/avatar.js +65 -0
- package/dist/particles/avatar/avatar.js.map +1 -0
- package/dist/schema.graphql +65 -26
- package/dist/sdk/analytics/use-analytics-actions.js +2 -1
- package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
- package/dist/sdk/cart/use-cart-actions.js +9 -8
- package/dist/sdk/cart/use-cart-actions.js.map +1 -1
- package/dist/sdk/cart/use-cart-validate-on-open.js +2 -1
- package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -1
- package/dist/sdk/content/create-content-runtime.d.ts +22 -1
- package/dist/sdk/content/create-content-runtime.js +89 -1
- package/dist/sdk/content/create-content-runtime.js.map +1 -1
- package/dist/sdk/data/empty-content-value.js +16 -0
- package/dist/sdk/data/empty-content-value.js.map +1 -0
- package/dist/sdk/data/hot-data-provider.js +2 -1
- package/dist/sdk/data/hot-data-provider.js.map +1 -1
- package/dist/sdk/data/index.js +2 -2
- package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
- package/dist/sdk/data/variables-from-content.d.ts +43 -0
- package/dist/sdk/data/variables-from-content.js +57 -0
- package/dist/sdk/data/variables-from-content.js.map +1 -0
- package/dist/sdk/generated/gql.js +2 -1
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.js +85 -1
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/identity/use-identity-actions.js +5 -4
- package/dist/sdk/identity/use-identity-actions.js.map +1 -1
- package/dist/sdk/payment/use-payment-actions.js +1 -1
- package/dist/sdk/payment/use-place-order.js +1 -1
- package/dist/sdk/region/use-region-actions.js +2 -1
- package/dist/sdk/region/use-region-actions.js.map +1 -1
- package/dist/sdk/session/read-server-session.d.ts +21 -0
- package/dist/sdk/session/read-server-session.js +61 -0
- package/dist/sdk/session/read-server-session.js.map +1 -0
- package/dist/sdk/session/use-session-actions.js +5 -4
- package/dist/sdk/session/use-session-actions.js.map +1 -1
- package/dist/sdk/session/use-session-revalidation.js +2 -1
- package/dist/sdk/session/use-session-revalidation.js.map +1 -1
- package/dist/sdk/shipping/use-shipping-actions.js +3 -2
- package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
- package/dist/utils/safe-href.d.ts +11 -0
- package/package.json +13 -2
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/lru-cache@11.2.7/node_modules/lru-cache/dist/esm/index.min.js
|
|
2
|
+
var x = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
3
|
+
var I = /* @__PURE__ */ new Set();
|
|
4
|
+
var R = typeof process == "object" && process ? process : {};
|
|
5
|
+
var U = (c, t, e, i) => {
|
|
6
|
+
typeof R.emitWarning == "function" ? R.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
|
|
7
|
+
};
|
|
8
|
+
var C = globalThis.AbortController;
|
|
9
|
+
var D = globalThis.AbortSignal;
|
|
10
|
+
if (typeof C > "u") {
|
|
11
|
+
D = class {
|
|
12
|
+
onabort;
|
|
13
|
+
_onabort = [];
|
|
14
|
+
reason;
|
|
15
|
+
aborted = !1;
|
|
16
|
+
addEventListener(i, s) {
|
|
17
|
+
this._onabort.push(s);
|
|
18
|
+
}
|
|
19
|
+
}, C = class {
|
|
20
|
+
constructor() {
|
|
21
|
+
t();
|
|
22
|
+
}
|
|
23
|
+
signal = new D();
|
|
24
|
+
abort(i) {
|
|
25
|
+
if (!this.signal.aborted) {
|
|
26
|
+
this.signal.reason = i, this.signal.aborted = !0;
|
|
27
|
+
for (let s of this.signal._onabort) s(i);
|
|
28
|
+
this.signal.onabort?.(i);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
let c = R.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
|
|
33
|
+
c && (c = !1, U("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));
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
var G = (c) => !I.has(c);
|
|
37
|
+
var y = (c) => c && c === Math.floor(c) && c > 0 && isFinite(c);
|
|
38
|
+
var M = (c) => y(c) ? c <= Math.pow(2, 8) ? Uint8Array : c <= Math.pow(2, 16) ? Uint16Array : c <= Math.pow(2, 32) ? Uint32Array : c <= Number.MAX_SAFE_INTEGER ? z : null : null;
|
|
39
|
+
var z = class extends Array {
|
|
40
|
+
constructor(t) {
|
|
41
|
+
super(t), this.fill(0);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var W = class c {
|
|
45
|
+
heap;
|
|
46
|
+
length;
|
|
47
|
+
static #o = !1;
|
|
48
|
+
static create(t) {
|
|
49
|
+
let e = M(t);
|
|
50
|
+
if (!e) return [];
|
|
51
|
+
c.#o = !0;
|
|
52
|
+
let i = new c(t, e);
|
|
53
|
+
return c.#o = !1, i;
|
|
54
|
+
}
|
|
55
|
+
constructor(t, e) {
|
|
56
|
+
if (!c.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
|
|
57
|
+
this.heap = new e(t), this.length = 0;
|
|
58
|
+
}
|
|
59
|
+
push(t) {
|
|
60
|
+
this.heap[this.length++] = t;
|
|
61
|
+
}
|
|
62
|
+
pop() {
|
|
63
|
+
return this.heap[--this.length];
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var L = class c {
|
|
67
|
+
#o;
|
|
68
|
+
#c;
|
|
69
|
+
#w;
|
|
70
|
+
#C;
|
|
71
|
+
#S;
|
|
72
|
+
#L;
|
|
73
|
+
#I;
|
|
74
|
+
#m;
|
|
75
|
+
get perf() {
|
|
76
|
+
return this.#m;
|
|
77
|
+
}
|
|
78
|
+
ttl;
|
|
79
|
+
ttlResolution;
|
|
80
|
+
ttlAutopurge;
|
|
81
|
+
updateAgeOnGet;
|
|
82
|
+
updateAgeOnHas;
|
|
83
|
+
allowStale;
|
|
84
|
+
noDisposeOnSet;
|
|
85
|
+
noUpdateTTL;
|
|
86
|
+
maxEntrySize;
|
|
87
|
+
sizeCalculation;
|
|
88
|
+
noDeleteOnFetchRejection;
|
|
89
|
+
noDeleteOnStaleGet;
|
|
90
|
+
allowStaleOnFetchAbort;
|
|
91
|
+
allowStaleOnFetchRejection;
|
|
92
|
+
ignoreFetchAbort;
|
|
93
|
+
#n;
|
|
94
|
+
#_;
|
|
95
|
+
#s;
|
|
96
|
+
#i;
|
|
97
|
+
#t;
|
|
98
|
+
#a;
|
|
99
|
+
#u;
|
|
100
|
+
#l;
|
|
101
|
+
#h;
|
|
102
|
+
#b;
|
|
103
|
+
#r;
|
|
104
|
+
#y;
|
|
105
|
+
#A;
|
|
106
|
+
#d;
|
|
107
|
+
#g;
|
|
108
|
+
#T;
|
|
109
|
+
#v;
|
|
110
|
+
#f;
|
|
111
|
+
#U;
|
|
112
|
+
static unsafeExposeInternals(t) {
|
|
113
|
+
return {
|
|
114
|
+
starts: t.#A,
|
|
115
|
+
ttls: t.#d,
|
|
116
|
+
autopurgeTimers: t.#g,
|
|
117
|
+
sizes: t.#y,
|
|
118
|
+
keyMap: t.#s,
|
|
119
|
+
keyList: t.#i,
|
|
120
|
+
valList: t.#t,
|
|
121
|
+
next: t.#a,
|
|
122
|
+
prev: t.#u,
|
|
123
|
+
get head() {
|
|
124
|
+
return t.#l;
|
|
125
|
+
},
|
|
126
|
+
get tail() {
|
|
127
|
+
return t.#h;
|
|
128
|
+
},
|
|
129
|
+
free: t.#b,
|
|
130
|
+
isBackgroundFetch: (e) => t.#e(e),
|
|
131
|
+
backgroundFetch: (e, i, s, n) => t.#G(e, i, s, n),
|
|
132
|
+
moveToTail: (e) => t.#D(e),
|
|
133
|
+
indexes: (e) => t.#F(e),
|
|
134
|
+
rindexes: (e) => t.#O(e),
|
|
135
|
+
isStale: (e) => t.#p(e)
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
get max() {
|
|
139
|
+
return this.#o;
|
|
140
|
+
}
|
|
141
|
+
get maxSize() {
|
|
142
|
+
return this.#c;
|
|
143
|
+
}
|
|
144
|
+
get calculatedSize() {
|
|
145
|
+
return this.#_;
|
|
146
|
+
}
|
|
147
|
+
get size() {
|
|
148
|
+
return this.#n;
|
|
149
|
+
}
|
|
150
|
+
get fetchMethod() {
|
|
151
|
+
return this.#L;
|
|
152
|
+
}
|
|
153
|
+
get memoMethod() {
|
|
154
|
+
return this.#I;
|
|
155
|
+
}
|
|
156
|
+
get dispose() {
|
|
157
|
+
return this.#w;
|
|
158
|
+
}
|
|
159
|
+
get onInsert() {
|
|
160
|
+
return this.#C;
|
|
161
|
+
}
|
|
162
|
+
get disposeAfter() {
|
|
163
|
+
return this.#S;
|
|
164
|
+
}
|
|
165
|
+
constructor(t) {
|
|
166
|
+
let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: r, dispose: a, onInsert: w, disposeAfter: f, noDisposeOnSet: d, noUpdateTTL: g, maxSize: A = 0, maxEntrySize: p = 0, sizeCalculation: _, fetchMethod: l, memoMethod: S, noDeleteOnFetchRejection: b, noDeleteOnStaleGet: m, allowStaleOnFetchRejection: u, allowStaleOnFetchAbort: T, ignoreFetchAbort: F, perf: v } = t;
|
|
167
|
+
if (v !== void 0 && typeof v?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
168
|
+
if (this.#m = v ?? x, e !== 0 && !y(e)) throw new TypeError("max option must be a nonnegative integer");
|
|
169
|
+
let O = e ? M(e) : Array;
|
|
170
|
+
if (!O) throw new Error("invalid max value: " + e);
|
|
171
|
+
if (this.#o = e, this.#c = A, this.maxEntrySize = p || this.#c, this.sizeCalculation = _, this.sizeCalculation) {
|
|
172
|
+
if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
173
|
+
if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
|
|
174
|
+
}
|
|
175
|
+
if (S !== void 0 && typeof S != "function") throw new TypeError("memoMethod must be a function if defined");
|
|
176
|
+
if (this.#I = S, l !== void 0 && typeof l != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
177
|
+
if (this.#L = l, this.#v = !!l, this.#s = /* @__PURE__ */ new Map(), this.#i = new Array(e).fill(void 0), this.#t = new Array(e).fill(void 0), this.#a = new O(e), this.#u = new O(e), this.#l = 0, this.#h = 0, this.#b = W.create(e), this.#n = 0, this.#_ = 0, typeof a == "function" && (this.#w = a), typeof w == "function" && (this.#C = w), typeof f == "function" ? (this.#S = f, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#w, this.#U = !!this.#C, this.#f = !!this.#S, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!g, this.noDeleteOnFetchRejection = !!b, this.allowStaleOnFetchRejection = !!u, this.allowStaleOnFetchAbort = !!T, this.ignoreFetchAbort = !!F, this.maxEntrySize !== 0) {
|
|
178
|
+
if (this.#c !== 0 && !y(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
179
|
+
if (!y(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
180
|
+
this.#B();
|
|
181
|
+
}
|
|
182
|
+
if (this.allowStale = !!r, this.noDeleteOnStaleGet = !!m, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!h, this.ttlResolution = y(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
|
|
183
|
+
if (!y(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
184
|
+
this.#j();
|
|
185
|
+
}
|
|
186
|
+
if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
187
|
+
if (!this.ttlAutopurge && !this.#o && !this.#c) {
|
|
188
|
+
let E = "LRU_CACHE_UNBOUNDED";
|
|
189
|
+
G(E) && (I.add(E), U("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, c));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
getRemainingTTL(t) {
|
|
193
|
+
return this.#s.has(t) ? 1 / 0 : 0;
|
|
194
|
+
}
|
|
195
|
+
#j() {
|
|
196
|
+
let t = new z(this.#o), e = new z(this.#o);
|
|
197
|
+
this.#d = t, this.#A = e;
|
|
198
|
+
let i = this.ttlAutopurge ? new Array(this.#o) : void 0;
|
|
199
|
+
this.#g = i, this.#N = (h, r, a = this.#m.now()) => {
|
|
200
|
+
e[h] = r !== 0 ? a : 0, t[h] = r, s(h, r);
|
|
201
|
+
}, this.#R = (h) => {
|
|
202
|
+
e[h] = t[h] !== 0 ? this.#m.now() : 0, s(h, t[h]);
|
|
203
|
+
};
|
|
204
|
+
let s = this.ttlAutopurge ? (h, r) => {
|
|
205
|
+
if (i?.[h] && (clearTimeout(i[h]), i[h] = void 0), r && r !== 0 && i) {
|
|
206
|
+
let a = setTimeout(() => {
|
|
207
|
+
this.#p(h) && this.#E(this.#i[h], "expire");
|
|
208
|
+
}, r + 1);
|
|
209
|
+
a.unref && a.unref(), i[h] = a;
|
|
210
|
+
}
|
|
211
|
+
} : () => {};
|
|
212
|
+
this.#z = (h, r) => {
|
|
213
|
+
if (t[r]) {
|
|
214
|
+
let a = t[r], w = e[r];
|
|
215
|
+
if (!a || !w) return;
|
|
216
|
+
h.ttl = a, h.start = w, h.now = n || o();
|
|
217
|
+
h.remainingTTL = a - (h.now - w);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
let n = 0, o = () => {
|
|
221
|
+
let h = this.#m.now();
|
|
222
|
+
if (this.ttlResolution > 0) {
|
|
223
|
+
n = h;
|
|
224
|
+
let r = setTimeout(() => n = 0, this.ttlResolution);
|
|
225
|
+
r.unref && r.unref();
|
|
226
|
+
}
|
|
227
|
+
return h;
|
|
228
|
+
};
|
|
229
|
+
this.getRemainingTTL = (h) => {
|
|
230
|
+
let r = this.#s.get(h);
|
|
231
|
+
if (r === void 0) return 0;
|
|
232
|
+
let a = t[r], w = e[r];
|
|
233
|
+
if (!a || !w) return 1 / 0;
|
|
234
|
+
return a - ((n || o()) - w);
|
|
235
|
+
}, this.#p = (h) => {
|
|
236
|
+
let r = e[h], a = t[h];
|
|
237
|
+
return !!a && !!r && (n || o()) - r > a;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
#R = () => {};
|
|
241
|
+
#z = () => {};
|
|
242
|
+
#N = () => {};
|
|
243
|
+
#p = () => !1;
|
|
244
|
+
#B() {
|
|
245
|
+
let t = new z(this.#o);
|
|
246
|
+
this.#_ = 0, this.#y = t, this.#W = (e) => {
|
|
247
|
+
this.#_ -= t[e], t[e] = 0;
|
|
248
|
+
}, this.#P = (e, i, s, n) => {
|
|
249
|
+
if (this.#e(i)) return 0;
|
|
250
|
+
if (!y(s)) if (n) {
|
|
251
|
+
if (typeof n != "function") throw new TypeError("sizeCalculation must be a function");
|
|
252
|
+
if (s = n(i, e), !y(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
253
|
+
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
254
|
+
return s;
|
|
255
|
+
}, this.#M = (e, i, s) => {
|
|
256
|
+
if (t[e] = i, this.#c) {
|
|
257
|
+
let n = this.#c - t[e];
|
|
258
|
+
for (; this.#_ > n;) this.#x(!0);
|
|
259
|
+
}
|
|
260
|
+
this.#_ += t[e], s && (s.entrySize = i, s.totalCalculatedSize = this.#_);
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
#W = (t) => {};
|
|
264
|
+
#M = (t, e, i) => {};
|
|
265
|
+
#P = (t, e, i, s) => {
|
|
266
|
+
if (i || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
267
|
+
return 0;
|
|
268
|
+
};
|
|
269
|
+
*#F({ allowStale: t = this.allowStale } = {}) {
|
|
270
|
+
if (this.#n) for (let e = this.#h; !(!this.#H(e) || ((t || !this.#p(e)) && (yield e), e === this.#l));) e = this.#u[e];
|
|
271
|
+
}
|
|
272
|
+
*#O({ allowStale: t = this.allowStale } = {}) {
|
|
273
|
+
if (this.#n) for (let e = this.#l; !(!this.#H(e) || ((t || !this.#p(e)) && (yield e), e === this.#h));) e = this.#a[e];
|
|
274
|
+
}
|
|
275
|
+
#H(t) {
|
|
276
|
+
return t !== void 0 && this.#s.get(this.#i[t]) === t;
|
|
277
|
+
}
|
|
278
|
+
*entries() {
|
|
279
|
+
for (let t of this.#F()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
|
|
280
|
+
}
|
|
281
|
+
*rentries() {
|
|
282
|
+
for (let t of this.#O()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
|
|
283
|
+
}
|
|
284
|
+
*keys() {
|
|
285
|
+
for (let t of this.#F()) {
|
|
286
|
+
let e = this.#i[t];
|
|
287
|
+
e !== void 0 && !this.#e(this.#t[t]) && (yield e);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
*rkeys() {
|
|
291
|
+
for (let t of this.#O()) {
|
|
292
|
+
let e = this.#i[t];
|
|
293
|
+
e !== void 0 && !this.#e(this.#t[t]) && (yield e);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
*values() {
|
|
297
|
+
for (let t of this.#F()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
|
|
298
|
+
}
|
|
299
|
+
*rvalues() {
|
|
300
|
+
for (let t of this.#O()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
|
|
301
|
+
}
|
|
302
|
+
[Symbol.iterator]() {
|
|
303
|
+
return this.entries();
|
|
304
|
+
}
|
|
305
|
+
[Symbol.toStringTag] = "LRUCache";
|
|
306
|
+
find(t, e = {}) {
|
|
307
|
+
for (let i of this.#F()) {
|
|
308
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
309
|
+
if (n !== void 0 && t(n, this.#i[i], this)) return this.get(this.#i[i], e);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
forEach(t, e = this) {
|
|
313
|
+
for (let i of this.#F()) {
|
|
314
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
315
|
+
n !== void 0 && t.call(e, n, this.#i[i], this);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
rforEach(t, e = this) {
|
|
319
|
+
for (let i of this.#O()) {
|
|
320
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
321
|
+
n !== void 0 && t.call(e, n, this.#i[i], this);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
purgeStale() {
|
|
325
|
+
let t = !1;
|
|
326
|
+
for (let e of this.#O({ allowStale: !0 })) this.#p(e) && (this.#E(this.#i[e], "expire"), t = !0);
|
|
327
|
+
return t;
|
|
328
|
+
}
|
|
329
|
+
info(t) {
|
|
330
|
+
let e = this.#s.get(t);
|
|
331
|
+
if (e === void 0) return;
|
|
332
|
+
let i = this.#t[e], s = this.#e(i) ? i.__staleWhileFetching : i;
|
|
333
|
+
if (s === void 0) return;
|
|
334
|
+
let n = { value: s };
|
|
335
|
+
if (this.#d && this.#A) {
|
|
336
|
+
let o = this.#d[e], h = this.#A[e];
|
|
337
|
+
if (o && h) n.ttl = o - (this.#m.now() - h), n.start = Date.now();
|
|
338
|
+
}
|
|
339
|
+
return this.#y && (n.size = this.#y[e]), n;
|
|
340
|
+
}
|
|
341
|
+
dump() {
|
|
342
|
+
let t = [];
|
|
343
|
+
for (let e of this.#F({ allowStale: !0 })) {
|
|
344
|
+
let i = this.#i[e], s = this.#t[e], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
345
|
+
if (n === void 0 || i === void 0) continue;
|
|
346
|
+
let o = { value: n };
|
|
347
|
+
if (this.#d && this.#A) {
|
|
348
|
+
o.ttl = this.#d[e];
|
|
349
|
+
let h = this.#m.now() - this.#A[e];
|
|
350
|
+
o.start = Math.floor(Date.now() - h);
|
|
351
|
+
}
|
|
352
|
+
this.#y && (o.size = this.#y[e]), t.unshift([i, o]);
|
|
353
|
+
}
|
|
354
|
+
return t;
|
|
355
|
+
}
|
|
356
|
+
load(t) {
|
|
357
|
+
this.clear();
|
|
358
|
+
for (let [e, i] of t) {
|
|
359
|
+
if (i.start) {
|
|
360
|
+
let s = Date.now() - i.start;
|
|
361
|
+
i.start = this.#m.now() - s;
|
|
362
|
+
}
|
|
363
|
+
this.set(e, i.value, i);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
set(t, e, i = {}) {
|
|
367
|
+
if (e === void 0) return this.delete(t), this;
|
|
368
|
+
let { ttl: s = this.ttl, start: n, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: r } = i, { noUpdateTTL: a = this.noUpdateTTL } = i, w = this.#P(t, e, i.size || 0, h);
|
|
369
|
+
if (this.maxEntrySize && w > this.maxEntrySize) return r && (r.set = "miss", r.maxEntrySizeExceeded = !0), this.#E(t, "set"), this;
|
|
370
|
+
let f = this.#n === 0 ? void 0 : this.#s.get(t);
|
|
371
|
+
if (f === void 0) f = this.#n === 0 ? this.#h : this.#b.length !== 0 ? this.#b.pop() : this.#n === this.#o ? this.#x(!1) : this.#n, this.#i[f] = t, this.#t[f] = e, this.#s.set(t, f), this.#a[this.#h] = f, this.#u[f] = this.#h, this.#h = f, this.#n++, this.#M(f, w, r), r && (r.set = "add"), a = !1, this.#U && this.#C?.(e, t, "add");
|
|
372
|
+
else {
|
|
373
|
+
this.#D(f);
|
|
374
|
+
let d = this.#t[f];
|
|
375
|
+
if (e !== d) {
|
|
376
|
+
if (this.#v && this.#e(d)) {
|
|
377
|
+
d.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
378
|
+
let { __staleWhileFetching: g } = d;
|
|
379
|
+
g !== void 0 && !o && (this.#T && this.#w?.(g, t, "set"), this.#f && this.#r?.push([
|
|
380
|
+
g,
|
|
381
|
+
t,
|
|
382
|
+
"set"
|
|
383
|
+
]));
|
|
384
|
+
} else o || (this.#T && this.#w?.(d, t, "set"), this.#f && this.#r?.push([
|
|
385
|
+
d,
|
|
386
|
+
t,
|
|
387
|
+
"set"
|
|
388
|
+
]));
|
|
389
|
+
if (this.#W(f), this.#M(f, w, r), this.#t[f] = e, r) {
|
|
390
|
+
r.set = "replace";
|
|
391
|
+
let g = d && this.#e(d) ? d.__staleWhileFetching : d;
|
|
392
|
+
g !== void 0 && (r.oldValue = g);
|
|
393
|
+
}
|
|
394
|
+
} else r && (r.set = "update");
|
|
395
|
+
this.#U && this.onInsert?.(e, t, e === d ? "update" : "replace");
|
|
396
|
+
}
|
|
397
|
+
if (s !== 0 && !this.#d && this.#j(), this.#d && (a || this.#N(f, s, n), r && this.#z(r, f)), !o && this.#f && this.#r) {
|
|
398
|
+
let d = this.#r, g;
|
|
399
|
+
for (; g = d?.shift();) this.#S?.(...g);
|
|
400
|
+
}
|
|
401
|
+
return this;
|
|
402
|
+
}
|
|
403
|
+
pop() {
|
|
404
|
+
try {
|
|
405
|
+
for (; this.#n;) {
|
|
406
|
+
let t = this.#t[this.#l];
|
|
407
|
+
if (this.#x(!0), this.#e(t)) {
|
|
408
|
+
if (t.__staleWhileFetching) return t.__staleWhileFetching;
|
|
409
|
+
} else if (t !== void 0) return t;
|
|
410
|
+
}
|
|
411
|
+
} finally {
|
|
412
|
+
if (this.#f && this.#r) {
|
|
413
|
+
let t = this.#r, e;
|
|
414
|
+
for (; e = t?.shift();) this.#S?.(...e);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
#x(t) {
|
|
419
|
+
let e = this.#l, i = this.#i[e], s = this.#t[e];
|
|
420
|
+
return this.#v && this.#e(s) ? s.__abortController.abort(/* @__PURE__ */ new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#w?.(s, i, "evict"), this.#f && this.#r?.push([
|
|
421
|
+
s,
|
|
422
|
+
i,
|
|
423
|
+
"evict"
|
|
424
|
+
])), this.#W(e), this.#g?.[e] && (clearTimeout(this.#g[e]), this.#g[e] = void 0), t && (this.#i[e] = void 0, this.#t[e] = void 0, this.#b.push(e)), this.#n === 1 ? (this.#l = this.#h = 0, this.#b.length = 0) : this.#l = this.#a[e], this.#s.delete(i), this.#n--, e;
|
|
425
|
+
}
|
|
426
|
+
has(t, e = {}) {
|
|
427
|
+
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e, n = this.#s.get(t);
|
|
428
|
+
if (n !== void 0) {
|
|
429
|
+
let o = this.#t[n];
|
|
430
|
+
if (this.#e(o) && o.__staleWhileFetching === void 0) return !1;
|
|
431
|
+
if (this.#p(n)) s && (s.has = "stale", this.#z(s, n));
|
|
432
|
+
else return i && this.#R(n), s && (s.has = "hit", this.#z(s, n)), !0;
|
|
433
|
+
} else s && (s.has = "miss");
|
|
434
|
+
return !1;
|
|
435
|
+
}
|
|
436
|
+
peek(t, e = {}) {
|
|
437
|
+
let { allowStale: i = this.allowStale } = e, s = this.#s.get(t);
|
|
438
|
+
if (s === void 0 || !i && this.#p(s)) return;
|
|
439
|
+
let n = this.#t[s];
|
|
440
|
+
return this.#e(n) ? n.__staleWhileFetching : n;
|
|
441
|
+
}
|
|
442
|
+
#G(t, e, i, s) {
|
|
443
|
+
let n = e === void 0 ? void 0 : this.#t[e];
|
|
444
|
+
if (this.#e(n)) return n;
|
|
445
|
+
let o = new C(), { signal: h } = i;
|
|
446
|
+
h?.addEventListener("abort", () => o.abort(h.reason), { signal: o.signal });
|
|
447
|
+
let r = {
|
|
448
|
+
signal: o.signal,
|
|
449
|
+
options: i,
|
|
450
|
+
context: s
|
|
451
|
+
}, a = (p, _ = !1) => {
|
|
452
|
+
let { aborted: l } = o.signal, S = i.ignoreFetchAbort && p !== void 0, b = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && p !== void 0);
|
|
453
|
+
if (i.status && (l && !_ ? (i.status.fetchAborted = !0, i.status.fetchError = o.signal.reason, S && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), l && !S && !_) return f(o.signal.reason, b);
|
|
454
|
+
let m = g, u = this.#t[e];
|
|
455
|
+
return (u === g || S && _ && u === void 0) && (p === void 0 ? m.__staleWhileFetching !== void 0 ? this.#t[e] = m.__staleWhileFetching : this.#E(t, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.set(t, p, r.options))), p;
|
|
456
|
+
}, w = (p) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = p), f(p, !1)), f = (p, _) => {
|
|
457
|
+
let { aborted: l } = o.signal, S = l && i.allowStaleOnFetchAbort, b = S || i.allowStaleOnFetchRejection, m = b || i.noDeleteOnFetchRejection, u = g;
|
|
458
|
+
if (this.#t[e] === g && (!m || !_ && u.__staleWhileFetching === void 0 ? this.#E(t, "fetch") : S || (this.#t[e] = u.__staleWhileFetching)), b) return i.status && u.__staleWhileFetching !== void 0 && (i.status.returnedStale = !0), u.__staleWhileFetching;
|
|
459
|
+
if (u.__returned === u) throw p;
|
|
460
|
+
}, d = (p, _) => {
|
|
461
|
+
let l = this.#L?.(t, n, r);
|
|
462
|
+
l && l instanceof Promise && l.then((S) => p(S === void 0 ? void 0 : S), _), o.signal.addEventListener("abort", () => {
|
|
463
|
+
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (p(void 0), i.allowStaleOnFetchAbort && (p = (S) => a(S, !0)));
|
|
464
|
+
});
|
|
465
|
+
};
|
|
466
|
+
i.status && (i.status.fetchDispatched = !0);
|
|
467
|
+
let g = new Promise(d).then(a, w), A = Object.assign(g, {
|
|
468
|
+
__abortController: o,
|
|
469
|
+
__staleWhileFetching: n,
|
|
470
|
+
__returned: void 0
|
|
471
|
+
});
|
|
472
|
+
return e === void 0 ? (this.set(t, A, {
|
|
473
|
+
...r.options,
|
|
474
|
+
status: void 0
|
|
475
|
+
}), e = this.#s.get(t)) : this.#t[e] = A, A;
|
|
476
|
+
}
|
|
477
|
+
#e(t) {
|
|
478
|
+
if (!this.#v) return !1;
|
|
479
|
+
let e = t;
|
|
480
|
+
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof C;
|
|
481
|
+
}
|
|
482
|
+
async fetch(t, e = {}) {
|
|
483
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: r = 0, sizeCalculation: a = this.sizeCalculation, noUpdateTTL: w = this.noUpdateTTL, noDeleteOnFetchRejection: f = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: g = this.ignoreFetchAbort, allowStaleOnFetchAbort: A = this.allowStaleOnFetchAbort, context: p, forceRefresh: _ = !1, status: l, signal: S } = e;
|
|
484
|
+
if (!this.#v) return l && (l.fetch = "get"), this.get(t, {
|
|
485
|
+
allowStale: i,
|
|
486
|
+
updateAgeOnGet: s,
|
|
487
|
+
noDeleteOnStaleGet: n,
|
|
488
|
+
status: l
|
|
489
|
+
});
|
|
490
|
+
let b = {
|
|
491
|
+
allowStale: i,
|
|
492
|
+
updateAgeOnGet: s,
|
|
493
|
+
noDeleteOnStaleGet: n,
|
|
494
|
+
ttl: o,
|
|
495
|
+
noDisposeOnSet: h,
|
|
496
|
+
size: r,
|
|
497
|
+
sizeCalculation: a,
|
|
498
|
+
noUpdateTTL: w,
|
|
499
|
+
noDeleteOnFetchRejection: f,
|
|
500
|
+
allowStaleOnFetchRejection: d,
|
|
501
|
+
allowStaleOnFetchAbort: A,
|
|
502
|
+
ignoreFetchAbort: g,
|
|
503
|
+
status: l,
|
|
504
|
+
signal: S
|
|
505
|
+
}, m = this.#s.get(t);
|
|
506
|
+
if (m === void 0) {
|
|
507
|
+
l && (l.fetch = "miss");
|
|
508
|
+
let u = this.#G(t, m, b, p);
|
|
509
|
+
return u.__returned = u;
|
|
510
|
+
} else {
|
|
511
|
+
let u = this.#t[m];
|
|
512
|
+
if (this.#e(u)) {
|
|
513
|
+
let E = i && u.__staleWhileFetching !== void 0;
|
|
514
|
+
return l && (l.fetch = "inflight", E && (l.returnedStale = !0)), E ? u.__staleWhileFetching : u.__returned = u;
|
|
515
|
+
}
|
|
516
|
+
let T = this.#p(m);
|
|
517
|
+
if (!_ && !T) return l && (l.fetch = "hit"), this.#D(m), s && this.#R(m), l && this.#z(l, m), u;
|
|
518
|
+
let F = this.#G(t, m, b, p), O = F.__staleWhileFetching !== void 0 && i;
|
|
519
|
+
return l && (l.fetch = T ? "stale" : "refresh", O && T && (l.returnedStale = !0)), O ? F.__staleWhileFetching : F.__returned = F;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
async forceFetch(t, e = {}) {
|
|
523
|
+
let i = await this.fetch(t, e);
|
|
524
|
+
if (i === void 0) throw new Error("fetch() returned undefined");
|
|
525
|
+
return i;
|
|
526
|
+
}
|
|
527
|
+
memo(t, e = {}) {
|
|
528
|
+
let i = this.#I;
|
|
529
|
+
if (!i) throw new Error("no memoMethod provided to constructor");
|
|
530
|
+
let { context: s, forceRefresh: n, ...o } = e, h = this.get(t, o);
|
|
531
|
+
if (!n && h !== void 0) return h;
|
|
532
|
+
let r = i(t, h, {
|
|
533
|
+
options: o,
|
|
534
|
+
context: s
|
|
535
|
+
});
|
|
536
|
+
return this.set(t, r, o), r;
|
|
537
|
+
}
|
|
538
|
+
get(t, e = {}) {
|
|
539
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: o } = e, h = this.#s.get(t);
|
|
540
|
+
if (h !== void 0) {
|
|
541
|
+
let r = this.#t[h], a = this.#e(r);
|
|
542
|
+
return o && this.#z(o, h), this.#p(h) ? (o && (o.get = "stale"), a ? (o && i && r.__staleWhileFetching !== void 0 && (o.returnedStale = !0), i ? r.__staleWhileFetching : void 0) : (n || this.#E(t, "expire"), o && i && (o.returnedStale = !0), i ? r : void 0)) : (o && (o.get = "hit"), a ? r.__staleWhileFetching : (this.#D(h), s && this.#R(h), r));
|
|
543
|
+
} else o && (o.get = "miss");
|
|
544
|
+
}
|
|
545
|
+
#k(t, e) {
|
|
546
|
+
this.#u[e] = t, this.#a[t] = e;
|
|
547
|
+
}
|
|
548
|
+
#D(t) {
|
|
549
|
+
t !== this.#h && (t === this.#l ? this.#l = this.#a[t] : this.#k(this.#u[t], this.#a[t]), this.#k(this.#h, t), this.#h = t);
|
|
550
|
+
}
|
|
551
|
+
delete(t) {
|
|
552
|
+
return this.#E(t, "delete");
|
|
553
|
+
}
|
|
554
|
+
#E(t, e) {
|
|
555
|
+
let i = !1;
|
|
556
|
+
if (this.#n !== 0) {
|
|
557
|
+
let s = this.#s.get(t);
|
|
558
|
+
if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i = !0, this.#n === 1) this.#V(e);
|
|
559
|
+
else {
|
|
560
|
+
this.#W(s);
|
|
561
|
+
let n = this.#t[s];
|
|
562
|
+
if (this.#e(n) ? n.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(n, t, e), this.#f && this.#r?.push([
|
|
563
|
+
n,
|
|
564
|
+
t,
|
|
565
|
+
e
|
|
566
|
+
])), this.#s.delete(t), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#u[s];
|
|
567
|
+
else if (s === this.#l) this.#l = this.#a[s];
|
|
568
|
+
else {
|
|
569
|
+
let o = this.#u[s];
|
|
570
|
+
this.#a[o] = this.#a[s];
|
|
571
|
+
let h = this.#a[s];
|
|
572
|
+
this.#u[h] = this.#u[s];
|
|
573
|
+
}
|
|
574
|
+
this.#n--, this.#b.push(s);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (this.#f && this.#r?.length) {
|
|
578
|
+
let s = this.#r, n;
|
|
579
|
+
for (; n = s?.shift();) this.#S?.(...n);
|
|
580
|
+
}
|
|
581
|
+
return i;
|
|
582
|
+
}
|
|
583
|
+
clear() {
|
|
584
|
+
return this.#V("delete");
|
|
585
|
+
}
|
|
586
|
+
#V(t) {
|
|
587
|
+
for (let e of this.#O({ allowStale: !0 })) {
|
|
588
|
+
let i = this.#t[e];
|
|
589
|
+
if (this.#e(i)) i.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
590
|
+
else {
|
|
591
|
+
let s = this.#i[e];
|
|
592
|
+
this.#T && this.#w?.(i, s, t), this.#f && this.#r?.push([
|
|
593
|
+
i,
|
|
594
|
+
s,
|
|
595
|
+
t
|
|
596
|
+
]);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#A) {
|
|
600
|
+
this.#d.fill(0), this.#A.fill(0);
|
|
601
|
+
for (let e of this.#g ?? []) e !== void 0 && clearTimeout(e);
|
|
602
|
+
this.#g?.fill(void 0);
|
|
603
|
+
}
|
|
604
|
+
if (this.#y && this.#y.fill(0), this.#l = 0, this.#h = 0, this.#b.length = 0, this.#_ = 0, this.#n = 0, this.#f && this.#r) {
|
|
605
|
+
let e = this.#r, i;
|
|
606
|
+
for (; i = e?.shift();) this.#S?.(...i);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
//#endregion
|
|
611
|
+
export { L as t };
|
|
612
|
+
|
|
613
|
+
//# sourceMappingURL=index.min-BsIHDfFK.js.map
|