@platforma-sdk/ui-vue 1.29.31 → 1.29.32
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 +6 -0
- package/dist/lib.js +123 -126
- package/dist/lib.js.map +1 -1
- package/dist/lib.umd.cjs +3 -3
- package/dist/lib.umd.cjs.map +1 -1
- package/dist/src/plugins/Monetization/useInfo.d.ts +0 -3
- package/dist/src/plugins/Monetization/useInfo.d.ts.map +1 -1
- package/dist/src/plugins/Monetization/validation.d.ts +0 -50
- package/dist/src/plugins/Monetization/validation.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/plugins/Monetization/validation.ts +0 -3
package/CHANGELOG.md
CHANGED
package/dist/lib.js
CHANGED
|
@@ -4,7 +4,7 @@ var lv = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var KS = (t, e, n) => e in t ? GS(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
6
|
var ut = (t, e, n) => KS(t, typeof e != "symbol" ? e + "" : e, n), yd = (t, e, n) => e.has(t) || lv("Cannot " + n);
|
|
7
|
-
var N = (t, e, n) => (yd(t, e, "read from private field"), n ? n.call(t) : e.get(t)), nt = (t, e, n) => e.has(t) ? lv("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), $e = (t, e, n, r) => (yd(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n),
|
|
7
|
+
var N = (t, e, n) => (yd(t, e, "read from private field"), n ? n.call(t) : e.get(t)), nt = (t, e, n) => e.has(t) ? lv("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), $e = (t, e, n, r) => (yd(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), Ce = (t, e, n) => (yd(t, e, "access private method"), n);
|
|
8
8
|
var Al = (t, e, n, r) => ({
|
|
9
9
|
set _(i) {
|
|
10
10
|
$e(t, e, i, n);
|
|
@@ -2856,7 +2856,7 @@ const DE = (t, e = {
|
|
|
2856
2856
|
bigint: (t) => bi.create({ ...t, coerce: !0 }),
|
|
2857
2857
|
date: (t) => Xi.create({ ...t, coerce: !0 })
|
|
2858
2858
|
}, y2 = Ve;
|
|
2859
|
-
var
|
|
2859
|
+
var Se = /* @__PURE__ */ Object.freeze({
|
|
2860
2860
|
__proto__: null,
|
|
2861
2861
|
defaultErrorMap: Bs,
|
|
2862
2862
|
setErrorMap: yE,
|
|
@@ -3025,15 +3025,15 @@ function or(t) {
|
|
|
3025
3025
|
const { type: e, name: n, domain: r } = t;
|
|
3026
3026
|
return { type: e, name: n, ...r && { domain: r } };
|
|
3027
3027
|
}
|
|
3028
|
-
|
|
3029
|
-
__isRef:
|
|
3030
|
-
blockId:
|
|
3031
|
-
name:
|
|
3028
|
+
Se.object({
|
|
3029
|
+
__isRef: Se.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),
|
|
3030
|
+
blockId: Se.string().describe("Upstream block id"),
|
|
3031
|
+
name: Se.string().describe("Name of the output provided to the upstream block's output context")
|
|
3032
3032
|
}).describe(
|
|
3033
3033
|
"Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
|
|
3034
3034
|
).strict().readonly();
|
|
3035
3035
|
const E2 = 24;
|
|
3036
|
-
|
|
3036
|
+
Se.string().length(E2).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
|
|
3037
3037
|
function qd(t) {
|
|
3038
3038
|
return Ti(t);
|
|
3039
3039
|
}
|
|
@@ -3057,25 +3057,25 @@ var Gd = { exports: {} };
|
|
|
3057
3057
|
}
|
|
3058
3058
|
})(Gd, Gd.exports);
|
|
3059
3059
|
var A2 = Gd.exports;
|
|
3060
|
-
const T2 = /* @__PURE__ */ If(A2), O2 =
|
|
3061
|
-
type:
|
|
3062
|
-
name:
|
|
3063
|
-
message:
|
|
3060
|
+
const T2 = /* @__PURE__ */ If(A2), O2 = Se.object({
|
|
3061
|
+
type: Se.literal("PlError"),
|
|
3062
|
+
name: Se.string(),
|
|
3063
|
+
message: Se.string(),
|
|
3064
3064
|
/** The message with all details needed for SDK developers. */
|
|
3065
|
-
fullMessage:
|
|
3066
|
-
stack:
|
|
3065
|
+
fullMessage: Se.string().optional(),
|
|
3066
|
+
stack: Se.string().optional()
|
|
3067
3067
|
}), $2 = O2.extend({
|
|
3068
|
-
cause:
|
|
3069
|
-
errors:
|
|
3070
|
-
}), R2 =
|
|
3071
|
-
type:
|
|
3072
|
-
name:
|
|
3073
|
-
message:
|
|
3074
|
-
stack:
|
|
3068
|
+
cause: Se.lazy(() => tu).optional(),
|
|
3069
|
+
errors: Se.lazy(() => tu.array()).optional()
|
|
3070
|
+
}), R2 = Se.object({
|
|
3071
|
+
type: Se.literal("StandardError"),
|
|
3072
|
+
name: Se.string(),
|
|
3073
|
+
message: Se.string(),
|
|
3074
|
+
stack: Se.string().optional()
|
|
3075
3075
|
}), I2 = R2.extend({
|
|
3076
|
-
cause:
|
|
3077
|
-
errors:
|
|
3078
|
-
}), tu =
|
|
3076
|
+
cause: Se.lazy(() => tu).optional(),
|
|
3077
|
+
errors: Se.lazy(() => tu.array()).optional()
|
|
3078
|
+
}), tu = Se.union([I2, $2]);
|
|
3079
3079
|
function Da(t) {
|
|
3080
3080
|
const e = Kd.safeParse(t);
|
|
3081
3081
|
if (e.success) {
|
|
@@ -3107,14 +3107,14 @@ function Da(t) {
|
|
|
3107
3107
|
message: T2(t)
|
|
3108
3108
|
};
|
|
3109
3109
|
}
|
|
3110
|
-
const P2 =
|
|
3111
|
-
name:
|
|
3112
|
-
message:
|
|
3113
|
-
fullMessage:
|
|
3114
|
-
stack:
|
|
3110
|
+
const P2 = Se.object({
|
|
3111
|
+
name: Se.string(),
|
|
3112
|
+
message: Se.string(),
|
|
3113
|
+
fullMessage: Se.string().optional(),
|
|
3114
|
+
stack: Se.string().optional()
|
|
3115
3115
|
}), Kd = P2.extend({
|
|
3116
|
-
cause:
|
|
3117
|
-
errors:
|
|
3116
|
+
cause: Se.lazy(() => Kd).optional(),
|
|
3117
|
+
errors: Se.lazy(() => Kd.array()).optional()
|
|
3118
3118
|
});
|
|
3119
3119
|
function N2(t) {
|
|
3120
3120
|
if (t && typeof globalThis.getPlatforma == "function")
|
|
@@ -3122,13 +3122,13 @@ function N2(t) {
|
|
|
3122
3122
|
if (typeof globalThis.platforma < "u") return globalThis.platforma;
|
|
3123
3123
|
throw new Error("Can't get platforma instance.");
|
|
3124
3124
|
}
|
|
3125
|
-
const L2 =
|
|
3126
|
-
type:
|
|
3127
|
-
importance:
|
|
3128
|
-
id:
|
|
3129
|
-
label:
|
|
3125
|
+
const L2 = Se.object({
|
|
3126
|
+
type: Se.string(),
|
|
3127
|
+
importance: Se.number().optional(),
|
|
3128
|
+
id: Se.string().optional(),
|
|
3129
|
+
label: Se.string()
|
|
3130
3130
|
});
|
|
3131
|
-
|
|
3131
|
+
Se.array(L2);
|
|
3132
3132
|
const M2 = "1.29.22";
|
|
3133
3133
|
function D2(t) {
|
|
3134
3134
|
const e = t.type;
|
|
@@ -17690,46 +17690,43 @@ function _6(t) {
|
|
|
17690
17690
|
};
|
|
17691
17691
|
return bt(r), Af(r), e;
|
|
17692
17692
|
}
|
|
17693
|
-
const b6 =
|
|
17693
|
+
const b6 = Se.literal("trial"), w6 = Se.literal("free"), x6 = Se.literal("single_payment"), k6 = Se.literal("subscription"), C6 = Se.union([
|
|
17694
17694
|
b6,
|
|
17695
17695
|
w6,
|
|
17696
17696
|
x6,
|
|
17697
17697
|
k6,
|
|
17698
|
-
|
|
17698
|
+
Se.literal("base")
|
|
17699
17699
|
// outdated
|
|
17700
|
-
]), S6 =
|
|
17701
|
-
type:
|
|
17702
|
-
|
|
17703
|
-
|
|
17700
|
+
]), S6 = Se.object({
|
|
17701
|
+
type: Se.union([
|
|
17702
|
+
Se.literal("unique_launches"),
|
|
17703
|
+
Se.literal("volume_limit")
|
|
17704
17704
|
]),
|
|
17705
|
-
used:
|
|
17706
|
-
toSpend:
|
|
17707
|
-
available:
|
|
17705
|
+
used: Se.number(),
|
|
17706
|
+
toSpend: Se.number(),
|
|
17707
|
+
available: Se.number().nullable()
|
|
17708
17708
|
// null if unlimited
|
|
17709
|
-
}), E6 =
|
|
17710
|
-
productKey:
|
|
17711
|
-
productName:
|
|
17712
|
-
customerEmail:
|
|
17713
|
-
canRun:
|
|
17714
|
-
status:
|
|
17715
|
-
|
|
17716
|
-
|
|
17717
|
-
|
|
17718
|
-
|
|
17709
|
+
}), E6 = Se.object({
|
|
17710
|
+
productKey: Se.string(),
|
|
17711
|
+
productName: Se.string().default("Unknown product"),
|
|
17712
|
+
customerEmail: Se.string().optional(),
|
|
17713
|
+
canRun: Se.boolean(),
|
|
17714
|
+
status: Se.union([
|
|
17715
|
+
Se.literal("select-tariff"),
|
|
17716
|
+
Se.literal("active"),
|
|
17717
|
+
Se.literal("payment_required"),
|
|
17718
|
+
Se.literal("limits_exceeded")
|
|
17719
17719
|
]),
|
|
17720
|
-
mnz:
|
|
17720
|
+
mnz: Se.object({
|
|
17721
17721
|
type: C6.optional(),
|
|
17722
|
-
|
|
17723
|
-
|
|
17724
|
-
}),
|
|
17725
|
-
endOfBillingPeriod: Ce.string().nullable().optional(),
|
|
17726
|
-
limits: Ce.array(S6).optional()
|
|
17722
|
+
endOfBillingPeriod: Se.string().nullable().optional(),
|
|
17723
|
+
limits: Se.array(S6).optional()
|
|
17727
17724
|
})
|
|
17728
|
-
}, { message: "Invalid DryRunResult" }), A6 =
|
|
17729
|
-
httpError:
|
|
17730
|
-
response:
|
|
17725
|
+
}, { message: "Invalid DryRunResult" }), A6 = Se.object({
|
|
17726
|
+
httpError: Se.string().optional(),
|
|
17727
|
+
response: Se.object({
|
|
17731
17728
|
result: E6.optional(),
|
|
17732
|
-
error:
|
|
17729
|
+
error: Se.unknown().optional()
|
|
17733
17730
|
}).optional()
|
|
17734
17731
|
}).optional();
|
|
17735
17732
|
function T6() {
|
|
@@ -25552,12 +25549,12 @@ const $p = class $p {
|
|
|
25552
25549
|
throw new TypeError("maxSize must be a positive integer if specified");
|
|
25553
25550
|
if (!di(this.maxEntrySize))
|
|
25554
25551
|
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
25555
|
-
|
|
25552
|
+
Ce(this, ve, l_).call(this);
|
|
25556
25553
|
}
|
|
25557
25554
|
if (this.allowStale = !!c, this.noDeleteOnStaleGet = !!X, this.updateAgeOnGet = !!l, this.updateAgeOnHas = !!u, this.ttlResolution = di(i) || i === 0 ? i : 1, this.ttlAutopurge = !!a, this.ttl = r || 0, this.ttl) {
|
|
25558
25555
|
if (!di(this.ttl))
|
|
25559
25556
|
throw new TypeError("ttl must be a positive integer if specified");
|
|
25560
|
-
|
|
25557
|
+
Ce(this, ve, _f).call(this);
|
|
25561
25558
|
}
|
|
25562
25559
|
if (N(this, Xn) === 0 && this.ttl === 0 && N(this, An) === 0)
|
|
25563
25560
|
throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
@@ -25596,23 +25593,23 @@ const $p = class $p {
|
|
|
25596
25593
|
// methods
|
|
25597
25594
|
isBackgroundFetch: (n) => {
|
|
25598
25595
|
var r;
|
|
25599
|
-
return
|
|
25596
|
+
return Ce(r = e, ve, yt).call(r, n);
|
|
25600
25597
|
},
|
|
25601
25598
|
backgroundFetch: (n, r, i, a) => {
|
|
25602
25599
|
var l;
|
|
25603
|
-
return
|
|
25600
|
+
return Ce(l = e, ve, Wl).call(l, n, r, i, a);
|
|
25604
25601
|
},
|
|
25605
25602
|
moveToTail: (n) => {
|
|
25606
25603
|
var r;
|
|
25607
|
-
return
|
|
25604
|
+
return Ce(r = e, ve, Za).call(r, n);
|
|
25608
25605
|
},
|
|
25609
25606
|
indexes: (n) => {
|
|
25610
25607
|
var r;
|
|
25611
|
-
return
|
|
25608
|
+
return Ce(r = e, ve, fi).call(r, n);
|
|
25612
25609
|
},
|
|
25613
25610
|
rindexes: (n) => {
|
|
25614
25611
|
var r;
|
|
25615
|
-
return
|
|
25612
|
+
return Ce(r = e, ve, pi).call(r, n);
|
|
25616
25613
|
},
|
|
25617
25614
|
isStale: (n) => {
|
|
25618
25615
|
var r;
|
|
@@ -25684,8 +25681,8 @@ const $p = class $p {
|
|
|
25684
25681
|
* in order from most recently used to least recently used.
|
|
25685
25682
|
*/
|
|
25686
25683
|
*entries() {
|
|
25687
|
-
for (const e of
|
|
25688
|
-
N(this, Ze)[e] !== void 0 && N(this, _t)[e] !== void 0 && !
|
|
25684
|
+
for (const e of Ce(this, ve, fi).call(this))
|
|
25685
|
+
N(this, Ze)[e] !== void 0 && N(this, _t)[e] !== void 0 && !Ce(this, ve, yt).call(this, N(this, Ze)[e]) && (yield [N(this, _t)[e], N(this, Ze)[e]]);
|
|
25689
25686
|
}
|
|
25690
25687
|
/**
|
|
25691
25688
|
* Inverse order version of {@link LRUCache.entries}
|
|
@@ -25694,17 +25691,17 @@ const $p = class $p {
|
|
|
25694
25691
|
* in order from least recently used to most recently used.
|
|
25695
25692
|
*/
|
|
25696
25693
|
*rentries() {
|
|
25697
|
-
for (const e of
|
|
25698
|
-
N(this, Ze)[e] !== void 0 && N(this, _t)[e] !== void 0 && !
|
|
25694
|
+
for (const e of Ce(this, ve, pi).call(this))
|
|
25695
|
+
N(this, Ze)[e] !== void 0 && N(this, _t)[e] !== void 0 && !Ce(this, ve, yt).call(this, N(this, Ze)[e]) && (yield [N(this, _t)[e], N(this, Ze)[e]]);
|
|
25699
25696
|
}
|
|
25700
25697
|
/**
|
|
25701
25698
|
* Return a generator yielding the keys in the cache,
|
|
25702
25699
|
* in order from most recently used to least recently used.
|
|
25703
25700
|
*/
|
|
25704
25701
|
*keys() {
|
|
25705
|
-
for (const e of
|
|
25702
|
+
for (const e of Ce(this, ve, fi).call(this)) {
|
|
25706
25703
|
const n = N(this, _t)[e];
|
|
25707
|
-
n !== void 0 && !
|
|
25704
|
+
n !== void 0 && !Ce(this, ve, yt).call(this, N(this, Ze)[e]) && (yield n);
|
|
25708
25705
|
}
|
|
25709
25706
|
}
|
|
25710
25707
|
/**
|
|
@@ -25714,9 +25711,9 @@ const $p = class $p {
|
|
|
25714
25711
|
* in order from least recently used to most recently used.
|
|
25715
25712
|
*/
|
|
25716
25713
|
*rkeys() {
|
|
25717
|
-
for (const e of
|
|
25714
|
+
for (const e of Ce(this, ve, pi).call(this)) {
|
|
25718
25715
|
const n = N(this, _t)[e];
|
|
25719
|
-
n !== void 0 && !
|
|
25716
|
+
n !== void 0 && !Ce(this, ve, yt).call(this, N(this, Ze)[e]) && (yield n);
|
|
25720
25717
|
}
|
|
25721
25718
|
}
|
|
25722
25719
|
/**
|
|
@@ -25724,8 +25721,8 @@ const $p = class $p {
|
|
|
25724
25721
|
* in order from most recently used to least recently used.
|
|
25725
25722
|
*/
|
|
25726
25723
|
*values() {
|
|
25727
|
-
for (const e of
|
|
25728
|
-
N(this, Ze)[e] !== void 0 && !
|
|
25724
|
+
for (const e of Ce(this, ve, fi).call(this))
|
|
25725
|
+
N(this, Ze)[e] !== void 0 && !Ce(this, ve, yt).call(this, N(this, Ze)[e]) && (yield N(this, Ze)[e]);
|
|
25729
25726
|
}
|
|
25730
25727
|
/**
|
|
25731
25728
|
* Inverse order version of {@link LRUCache.values}
|
|
@@ -25734,8 +25731,8 @@ const $p = class $p {
|
|
|
25734
25731
|
* in order from least recently used to most recently used.
|
|
25735
25732
|
*/
|
|
25736
25733
|
*rvalues() {
|
|
25737
|
-
for (const e of
|
|
25738
|
-
N(this, Ze)[e] !== void 0 && !
|
|
25734
|
+
for (const e of Ce(this, ve, pi).call(this))
|
|
25735
|
+
N(this, Ze)[e] !== void 0 && !Ce(this, ve, yt).call(this, N(this, Ze)[e]) && (yield N(this, Ze)[e]);
|
|
25739
25736
|
}
|
|
25740
25737
|
/**
|
|
25741
25738
|
* Iterating over the cache itself yields the same results as
|
|
@@ -25749,8 +25746,8 @@ const $p = class $p {
|
|
|
25749
25746
|
* similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
|
|
25750
25747
|
*/
|
|
25751
25748
|
find(e, n = {}) {
|
|
25752
|
-
for (const r of
|
|
25753
|
-
const i = N(this, Ze)[r], a =
|
|
25749
|
+
for (const r of Ce(this, ve, fi).call(this)) {
|
|
25750
|
+
const i = N(this, Ze)[r], a = Ce(this, ve, yt).call(this, i) ? i.__staleWhileFetching : i;
|
|
25754
25751
|
if (a !== void 0 && e(a, N(this, _t)[r], this))
|
|
25755
25752
|
return this.get(N(this, _t)[r], n);
|
|
25756
25753
|
}
|
|
@@ -25767,8 +25764,8 @@ const $p = class $p {
|
|
|
25767
25764
|
* Does not update age or recenty of use, or iterate over stale values.
|
|
25768
25765
|
*/
|
|
25769
25766
|
forEach(e, n = this) {
|
|
25770
|
-
for (const r of
|
|
25771
|
-
const i = N(this, Ze)[r], a =
|
|
25767
|
+
for (const r of Ce(this, ve, fi).call(this)) {
|
|
25768
|
+
const i = N(this, Ze)[r], a = Ce(this, ve, yt).call(this, i) ? i.__staleWhileFetching : i;
|
|
25772
25769
|
a !== void 0 && e.call(n, a, N(this, _t)[r], this);
|
|
25773
25770
|
}
|
|
25774
25771
|
}
|
|
@@ -25777,8 +25774,8 @@ const $p = class $p {
|
|
|
25777
25774
|
* reverse order. (ie, less recently used items are iterated over first.)
|
|
25778
25775
|
*/
|
|
25779
25776
|
rforEach(e, n = this) {
|
|
25780
|
-
for (const r of
|
|
25781
|
-
const i = N(this, Ze)[r], a =
|
|
25777
|
+
for (const r of Ce(this, ve, pi).call(this)) {
|
|
25778
|
+
const i = N(this, Ze)[r], a = Ce(this, ve, yt).call(this, i) ? i.__staleWhileFetching : i;
|
|
25782
25779
|
a !== void 0 && e.call(n, a, N(this, _t)[r], this);
|
|
25783
25780
|
}
|
|
25784
25781
|
}
|
|
@@ -25788,8 +25785,8 @@ const $p = class $p {
|
|
|
25788
25785
|
*/
|
|
25789
25786
|
purgeStale() {
|
|
25790
25787
|
let e = !1;
|
|
25791
|
-
for (const n of
|
|
25792
|
-
N(this, $n).call(this, n) && (
|
|
25788
|
+
for (const n of Ce(this, ve, pi).call(this, { allowStale: !0 }))
|
|
25789
|
+
N(this, $n).call(this, n) && (Ce(this, ve, hi).call(this, N(this, _t)[n], "expire"), e = !0);
|
|
25793
25790
|
return e;
|
|
25794
25791
|
}
|
|
25795
25792
|
/**
|
|
@@ -25808,7 +25805,7 @@ const $p = class $p {
|
|
|
25808
25805
|
const n = N(this, Nt).get(e);
|
|
25809
25806
|
if (n === void 0)
|
|
25810
25807
|
return;
|
|
25811
|
-
const r = N(this, Ze)[n], i =
|
|
25808
|
+
const r = N(this, Ze)[n], i = Ce(this, ve, yt).call(this, r) ? r.__staleWhileFetching : r;
|
|
25812
25809
|
if (i === void 0)
|
|
25813
25810
|
return;
|
|
25814
25811
|
const a = { value: i };
|
|
@@ -25836,8 +25833,8 @@ const $p = class $p {
|
|
|
25836
25833
|
*/
|
|
25837
25834
|
dump() {
|
|
25838
25835
|
const e = [];
|
|
25839
|
-
for (const n of
|
|
25840
|
-
const r = N(this, _t)[n], i = N(this, Ze)[n], a =
|
|
25836
|
+
for (const n of Ce(this, ve, fi).call(this, { allowStale: !0 })) {
|
|
25837
|
+
const r = N(this, _t)[n], i = N(this, Ze)[n], a = Ce(this, ve, yt).call(this, i) ? i.__staleWhileFetching : i;
|
|
25841
25838
|
if (a === void 0 || r === void 0)
|
|
25842
25839
|
continue;
|
|
25843
25840
|
const l = { value: a };
|
|
@@ -25907,28 +25904,28 @@ const $p = class $p {
|
|
|
25907
25904
|
let { noUpdateTTL: f = this.noUpdateTTL } = r;
|
|
25908
25905
|
const p = N(this, To).call(this, e, n, r.size || 0, u);
|
|
25909
25906
|
if (this.maxEntrySize && p > this.maxEntrySize)
|
|
25910
|
-
return c && (c.set = "miss", c.maxEntrySizeExceeded = !0),
|
|
25907
|
+
return c && (c.set = "miss", c.maxEntrySizeExceeded = !0), Ce(this, ve, hi).call(this, e, "set"), this;
|
|
25911
25908
|
let m = N(this, Vt) === 0 ? void 0 : N(this, Nt).get(e);
|
|
25912
25909
|
if (m === void 0)
|
|
25913
|
-
m = N(this, Vt) === 0 ? N(this, jt) : N(this, er).length !== 0 ? N(this, er).pop() : N(this, Vt) === N(this, Xn) ?
|
|
25910
|
+
m = N(this, Vt) === 0 ? N(this, jt) : N(this, er).length !== 0 ? N(this, er).pop() : N(this, Vt) === N(this, Xn) ? Ce(this, ve, Zl).call(this, !1) : N(this, Vt), N(this, _t)[m] = e, N(this, Ze)[m] = n, N(this, Nt).set(e, m), N(this, on)[N(this, jt)] = m, N(this, Tn)[m] = N(this, jt), $e(this, jt, m), Al(this, Vt)._++, N(this, Ms).call(this, m, p, c), c && (c.set = "add"), f = !1, N(this, Ls) && ((g = N(this, Ui)) == null || g.call(this, n, e, "add"));
|
|
25914
25911
|
else {
|
|
25915
|
-
|
|
25912
|
+
Ce(this, ve, Za).call(this, m);
|
|
25916
25913
|
const M = N(this, Ze)[m];
|
|
25917
25914
|
if (n !== M) {
|
|
25918
|
-
if (N(this, gi) &&
|
|
25915
|
+
if (N(this, gi) && Ce(this, ve, yt).call(this, M)) {
|
|
25919
25916
|
M.__abortController.abort(new Error("replaced"));
|
|
25920
25917
|
const { __staleWhileFetching: X } = M;
|
|
25921
25918
|
X !== void 0 && !l && (N(this, rr) && ((_ = N(this, Yn)) == null || _.call(this, X, e, "set")), N(this, ln) && ((E = N(this, Zt)) == null || E.push([X, e, "set"])));
|
|
25922
25919
|
} else l || (N(this, rr) && ((O = N(this, Yn)) == null || O.call(this, M, e, "set")), N(this, ln) && ((R = N(this, Zt)) == null || R.push([M, e, "set"])));
|
|
25923
25920
|
if (N(this, Zi).call(this, m), N(this, Ms).call(this, m, p, c), N(this, Ze)[m] = n, c) {
|
|
25924
25921
|
c.set = "replace";
|
|
25925
|
-
const X = M &&
|
|
25922
|
+
const X = M && Ce(this, ve, yt).call(this, M) ? M.__staleWhileFetching : M;
|
|
25926
25923
|
X !== void 0 && (c.oldValue = X);
|
|
25927
25924
|
}
|
|
25928
25925
|
} else c && (c.set = "update");
|
|
25929
25926
|
N(this, Ls) && ((j = this.onInsert) == null || j.call(this, n, e, n === M ? "update" : "replace"));
|
|
25930
25927
|
}
|
|
25931
|
-
if (i !== 0 && !N(this, On) &&
|
|
25928
|
+
if (i !== 0 && !N(this, On) && Ce(this, ve, _f).call(this), N(this, On) && (f || N(this, Ao).call(this, m, i, a), c && N(this, Hr).call(this, c, m)), !l && N(this, ln) && N(this, Zt)) {
|
|
25932
25929
|
const M = N(this, Zt);
|
|
25933
25930
|
let X;
|
|
25934
25931
|
for (; X = M == null ? void 0 : M.shift(); )
|
|
@@ -25945,7 +25942,7 @@ const $p = class $p {
|
|
|
25945
25942
|
try {
|
|
25946
25943
|
for (; N(this, Vt); ) {
|
|
25947
25944
|
const n = N(this, Ze)[N(this, Qt)];
|
|
25948
|
-
if (
|
|
25945
|
+
if (Ce(this, ve, Zl).call(this, !0), Ce(this, ve, yt).call(this, n)) {
|
|
25949
25946
|
if (n.__staleWhileFetching)
|
|
25950
25947
|
return n.__staleWhileFetching;
|
|
25951
25948
|
} else if (n !== void 0)
|
|
@@ -25980,7 +25977,7 @@ const $p = class $p {
|
|
|
25980
25977
|
const { updateAgeOnHas: r = this.updateAgeOnHas, status: i } = n, a = N(this, Nt).get(e);
|
|
25981
25978
|
if (a !== void 0) {
|
|
25982
25979
|
const l = N(this, Ze)[a];
|
|
25983
|
-
if (
|
|
25980
|
+
if (Ce(this, ve, yt).call(this, l) && l.__staleWhileFetching === void 0)
|
|
25984
25981
|
return !1;
|
|
25985
25982
|
if (N(this, $n).call(this, a))
|
|
25986
25983
|
i && (i.has = "stale", N(this, Hr).call(this, i, a));
|
|
@@ -26000,7 +25997,7 @@ const $p = class $p {
|
|
|
26000
25997
|
if (i === void 0 || !r && N(this, $n).call(this, i))
|
|
26001
25998
|
return;
|
|
26002
25999
|
const a = N(this, Ze)[i];
|
|
26003
|
-
return
|
|
26000
|
+
return Ce(this, ve, yt).call(this, a) ? a.__staleWhileFetching : a;
|
|
26004
26001
|
}
|
|
26005
26002
|
async fetch(e, n = {}) {
|
|
26006
26003
|
const {
|
|
@@ -26050,18 +26047,18 @@ const $p = class $p {
|
|
|
26050
26047
|
let X = N(this, Nt).get(e);
|
|
26051
26048
|
if (X === void 0) {
|
|
26052
26049
|
j && (j.fetch = "miss");
|
|
26053
|
-
const B =
|
|
26050
|
+
const B = Ce(this, ve, Wl).call(this, e, X, M, O);
|
|
26054
26051
|
return B.__returned = B;
|
|
26055
26052
|
} else {
|
|
26056
26053
|
const B = N(this, Ze)[X];
|
|
26057
|
-
if (
|
|
26054
|
+
if (Ce(this, ve, yt).call(this, B)) {
|
|
26058
26055
|
const I = r && B.__staleWhileFetching !== void 0;
|
|
26059
26056
|
return j && (j.fetch = "inflight", I && (j.returnedStale = !0)), I ? B.__staleWhileFetching : B.__returned = B;
|
|
26060
26057
|
}
|
|
26061
26058
|
const L = N(this, $n).call(this, X);
|
|
26062
26059
|
if (!R && !L)
|
|
26063
|
-
return j && (j.fetch = "hit"),
|
|
26064
|
-
const V =
|
|
26060
|
+
return j && (j.fetch = "hit"), Ce(this, ve, Za).call(this, X), i && N(this, ji).call(this, X), j && N(this, Hr).call(this, j, X), B;
|
|
26061
|
+
const V = Ce(this, ve, Wl).call(this, e, X, M, O), T = V.__staleWhileFetching !== void 0 && r;
|
|
26065
26062
|
return j && (j.fetch = L ? "stale" : "refresh", T && L && (j.returnedStale = !0)), T ? V.__staleWhileFetching : V.__returned = V;
|
|
26066
26063
|
}
|
|
26067
26064
|
}
|
|
@@ -26093,8 +26090,8 @@ const $p = class $p {
|
|
|
26093
26090
|
get(e, n = {}) {
|
|
26094
26091
|
const { allowStale: r = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: a = this.noDeleteOnStaleGet, status: l } = n, u = N(this, Nt).get(e);
|
|
26095
26092
|
if (u !== void 0) {
|
|
26096
|
-
const c = N(this, Ze)[u], f =
|
|
26097
|
-
return l && N(this, Hr).call(this, l, u), N(this, $n).call(this, u) ? (l && (l.get = "stale"), f ? (l && r && c.__staleWhileFetching !== void 0 && (l.returnedStale = !0), r ? c.__staleWhileFetching : void 0) : (a ||
|
|
26093
|
+
const c = N(this, Ze)[u], f = Ce(this, ve, yt).call(this, c);
|
|
26094
|
+
return l && N(this, Hr).call(this, l, u), N(this, $n).call(this, u) ? (l && (l.get = "stale"), f ? (l && r && c.__staleWhileFetching !== void 0 && (l.returnedStale = !0), r ? c.__staleWhileFetching : void 0) : (a || Ce(this, ve, hi).call(this, e, "expire"), l && r && (l.returnedStale = !0), r ? c : void 0)) : (l && (l.get = "hit"), f ? c.__staleWhileFetching : (Ce(this, ve, Za).call(this, u), i && N(this, ji).call(this, u), c));
|
|
26098
26095
|
} else l && (l.get = "miss");
|
|
26099
26096
|
}
|
|
26100
26097
|
/**
|
|
@@ -26103,13 +26100,13 @@ const $p = class $p {
|
|
|
26103
26100
|
* Returns true if the key was deleted, false otherwise.
|
|
26104
26101
|
*/
|
|
26105
26102
|
delete(e) {
|
|
26106
|
-
return
|
|
26103
|
+
return Ce(this, ve, hi).call(this, e, "delete");
|
|
26107
26104
|
}
|
|
26108
26105
|
/**
|
|
26109
26106
|
* Clear the cache entirely, throwing away all values.
|
|
26110
26107
|
*/
|
|
26111
26108
|
clear() {
|
|
26112
|
-
return
|
|
26109
|
+
return Ce(this, ve, xf).call(this, "delete");
|
|
26113
26110
|
}
|
|
26114
26111
|
};
|
|
26115
26112
|
Xn = new WeakMap(), An = new WeakMap(), Yn = new WeakMap(), Ui = new WeakMap(), Jn = new WeakMap(), Ps = new WeakMap(), Ns = new WeakMap(), Vt = new WeakMap(), Qn = new WeakMap(), Nt = new WeakMap(), _t = new WeakMap(), Ze = new WeakMap(), on = new WeakMap(), Tn = new WeakMap(), Qt = new WeakMap(), jt = new WeakMap(), er = new WeakMap(), Zt = new WeakMap(), tr = new WeakMap(), nr = new WeakMap(), On = new WeakMap(), rr = new WeakMap(), gi = new WeakMap(), ln = new WeakMap(), Ls = new WeakMap(), ve = new WeakSet(), _f = function() {
|
|
@@ -26117,7 +26114,7 @@ Xn = new WeakMap(), An = new WeakMap(), Yn = new WeakMap(), Ui = new WeakMap(),
|
|
|
26117
26114
|
$e(this, On, e), $e(this, nr, n), $e(this, Ao, (a, l, u = Cs.now()) => {
|
|
26118
26115
|
if (n[a] = l !== 0 ? u : 0, e[a] = l, l !== 0 && this.ttlAutopurge) {
|
|
26119
26116
|
const c = setTimeout(() => {
|
|
26120
|
-
N(this, $n).call(this, a) &&
|
|
26117
|
+
N(this, $n).call(this, a) && Ce(this, ve, hi).call(this, N(this, _t)[a], "expire");
|
|
26121
26118
|
}, l + 1);
|
|
26122
26119
|
c.unref && c.unref();
|
|
26123
26120
|
}
|
|
@@ -26161,7 +26158,7 @@ Xn = new WeakMap(), An = new WeakMap(), Yn = new WeakMap(), Ui = new WeakMap(),
|
|
|
26161
26158
|
$e(this, Qn, 0), $e(this, tr, e), $e(this, Zi, (n) => {
|
|
26162
26159
|
$e(this, Qn, N(this, Qn) - e[n]), e[n] = 0;
|
|
26163
26160
|
}), $e(this, To, (n, r, i, a) => {
|
|
26164
|
-
if (
|
|
26161
|
+
if (Ce(this, ve, yt).call(this, r))
|
|
26165
26162
|
return 0;
|
|
26166
26163
|
if (!di(i))
|
|
26167
26164
|
if (a) {
|
|
@@ -26176,27 +26173,27 @@ Xn = new WeakMap(), An = new WeakMap(), Yn = new WeakMap(), Ui = new WeakMap(),
|
|
|
26176
26173
|
if (e[n] = r, N(this, An)) {
|
|
26177
26174
|
const a = N(this, An) - e[n];
|
|
26178
26175
|
for (; N(this, Qn) > a; )
|
|
26179
|
-
|
|
26176
|
+
Ce(this, ve, Zl).call(this, !0);
|
|
26180
26177
|
}
|
|
26181
26178
|
$e(this, Qn, N(this, Qn) + e[n]), i && (i.entrySize = r, i.totalCalculatedSize = N(this, Qn));
|
|
26182
26179
|
});
|
|
26183
26180
|
}, Zi = new WeakMap(), Ms = new WeakMap(), To = new WeakMap(), fi = function* ({ allowStale: e = this.allowStale } = {}) {
|
|
26184
26181
|
if (N(this, Vt))
|
|
26185
|
-
for (let n = N(this, jt); !(!
|
|
26182
|
+
for (let n = N(this, jt); !(!Ce(this, ve, bf).call(this, n) || ((e || !N(this, $n).call(this, n)) && (yield n), n === N(this, Qt))); )
|
|
26186
26183
|
n = N(this, Tn)[n];
|
|
26187
26184
|
}, pi = function* ({ allowStale: e = this.allowStale } = {}) {
|
|
26188
26185
|
if (N(this, Vt))
|
|
26189
|
-
for (let n = N(this, Qt); !(!
|
|
26186
|
+
for (let n = N(this, Qt); !(!Ce(this, ve, bf).call(this, n) || ((e || !N(this, $n).call(this, n)) && (yield n), n === N(this, jt))); )
|
|
26190
26187
|
n = N(this, on)[n];
|
|
26191
26188
|
}, bf = function(e) {
|
|
26192
26189
|
return e !== void 0 && N(this, Nt).get(N(this, _t)[e]) === e;
|
|
26193
26190
|
}, Zl = function(e) {
|
|
26194
26191
|
var a, l;
|
|
26195
26192
|
const n = N(this, Qt), r = N(this, _t)[n], i = N(this, Ze)[n];
|
|
26196
|
-
return N(this, gi) &&
|
|
26193
|
+
return N(this, gi) && Ce(this, ve, yt).call(this, i) ? i.__abortController.abort(new Error("evicted")) : (N(this, rr) || N(this, ln)) && (N(this, rr) && ((a = N(this, Yn)) == null || a.call(this, i, r, "evict")), N(this, ln) && ((l = N(this, Zt)) == null || l.push([i, r, "evict"]))), N(this, Zi).call(this, n), e && (N(this, _t)[n] = void 0, N(this, Ze)[n] = void 0, N(this, er).push(n)), N(this, Vt) === 1 ? ($e(this, Qt, $e(this, jt, 0)), N(this, er).length = 0) : $e(this, Qt, N(this, on)[n]), N(this, Nt).delete(r), Al(this, Vt)._--, n;
|
|
26197
26194
|
}, Wl = function(e, n, r, i) {
|
|
26198
26195
|
const a = n === void 0 ? void 0 : N(this, Ze)[n];
|
|
26199
|
-
if (
|
|
26196
|
+
if (Ce(this, ve, yt).call(this, a))
|
|
26200
26197
|
return a;
|
|
26201
26198
|
const l = new Tu(), { signal: u } = r;
|
|
26202
26199
|
u == null || u.addEventListener("abort", () => l.abort(u.reason), {
|
|
@@ -26211,10 +26208,10 @@ Xn = new WeakMap(), An = new WeakMap(), Yn = new WeakMap(), Ui = new WeakMap(),
|
|
|
26211
26208
|
if (r.status && (j && !R ? (r.status.fetchAborted = !0, r.status.fetchError = l.signal.reason, W && (r.status.fetchAbortIgnored = !0)) : r.status.fetchResolved = !0), j && !W && !R)
|
|
26212
26209
|
return m(l.signal.reason);
|
|
26213
26210
|
const M = _;
|
|
26214
|
-
return N(this, Ze)[n] === _ && (O === void 0 ? M.__staleWhileFetching ? N(this, Ze)[n] = M.__staleWhileFetching :
|
|
26211
|
+
return N(this, Ze)[n] === _ && (O === void 0 ? M.__staleWhileFetching ? N(this, Ze)[n] = M.__staleWhileFetching : Ce(this, ve, hi).call(this, e, "fetch") : (r.status && (r.status.fetchUpdated = !0), this.set(e, O, c.options))), O;
|
|
26215
26212
|
}, p = (O) => (r.status && (r.status.fetchRejected = !0, r.status.fetchError = O), m(O)), m = (O) => {
|
|
26216
26213
|
const { aborted: R } = l.signal, j = R && r.allowStaleOnFetchAbort, W = j || r.allowStaleOnFetchRejection, M = W || r.noDeleteOnFetchRejection, X = _;
|
|
26217
|
-
if (N(this, Ze)[n] === _ && (!M || X.__staleWhileFetching === void 0 ?
|
|
26214
|
+
if (N(this, Ze)[n] === _ && (!M || X.__staleWhileFetching === void 0 ? Ce(this, ve, hi).call(this, e, "fetch") : j || (N(this, Ze)[n] = X.__staleWhileFetching)), W)
|
|
26218
26215
|
return r.status && X.__staleWhileFetching !== void 0 && (r.status.returnedStale = !0), X.__staleWhileFetching;
|
|
26219
26216
|
if (X.__returned === X)
|
|
26220
26217
|
throw O;
|
|
@@ -26240,7 +26237,7 @@ Xn = new WeakMap(), An = new WeakMap(), Yn = new WeakMap(), Ui = new WeakMap(),
|
|
|
26240
26237
|
}, wf = function(e, n) {
|
|
26241
26238
|
N(this, Tn)[n] = e, N(this, on)[e] = n;
|
|
26242
26239
|
}, Za = function(e) {
|
|
26243
|
-
e !== N(this, jt) && (e === N(this, Qt) ? $e(this, Qt, N(this, on)[e]) :
|
|
26240
|
+
e !== N(this, jt) && (e === N(this, Qt) ? $e(this, Qt, N(this, on)[e]) : Ce(this, ve, wf).call(this, N(this, Tn)[e], N(this, on)[e]), Ce(this, ve, wf).call(this, N(this, jt), e), $e(this, jt, e));
|
|
26244
26241
|
}, hi = function(e, n) {
|
|
26245
26242
|
var i, a, l, u;
|
|
26246
26243
|
let r = !1;
|
|
@@ -26248,11 +26245,11 @@ Xn = new WeakMap(), An = new WeakMap(), Yn = new WeakMap(), Ui = new WeakMap(),
|
|
|
26248
26245
|
const c = N(this, Nt).get(e);
|
|
26249
26246
|
if (c !== void 0)
|
|
26250
26247
|
if (r = !0, N(this, Vt) === 1)
|
|
26251
|
-
|
|
26248
|
+
Ce(this, ve, xf).call(this, n);
|
|
26252
26249
|
else {
|
|
26253
26250
|
N(this, Zi).call(this, c);
|
|
26254
26251
|
const f = N(this, Ze)[c];
|
|
26255
|
-
if (
|
|
26252
|
+
if (Ce(this, ve, yt).call(this, f) ? f.__abortController.abort(new Error("deleted")) : (N(this, rr) || N(this, ln)) && (N(this, rr) && ((i = N(this, Yn)) == null || i.call(this, f, e, n)), N(this, ln) && ((a = N(this, Zt)) == null || a.push([f, e, n]))), N(this, Nt).delete(e), N(this, _t)[c] = void 0, N(this, Ze)[c] = void 0, c === N(this, jt))
|
|
26256
26253
|
$e(this, jt, N(this, Tn)[c]);
|
|
26257
26254
|
else if (c === N(this, Qt))
|
|
26258
26255
|
$e(this, Qt, N(this, on)[c]);
|
|
@@ -26274,9 +26271,9 @@ Xn = new WeakMap(), An = new WeakMap(), Yn = new WeakMap(), Ui = new WeakMap(),
|
|
|
26274
26271
|
return r;
|
|
26275
26272
|
}, xf = function(e) {
|
|
26276
26273
|
var n, r, i;
|
|
26277
|
-
for (const a of
|
|
26274
|
+
for (const a of Ce(this, ve, pi).call(this, { allowStale: !0 })) {
|
|
26278
26275
|
const l = N(this, Ze)[a];
|
|
26279
|
-
if (
|
|
26276
|
+
if (Ce(this, ve, yt).call(this, l))
|
|
26280
26277
|
l.__abortController.abort(new Error("deleted"));
|
|
26281
26278
|
else {
|
|
26282
26279
|
const u = N(this, _t)[a];
|