@fest-lib/object 0.1.9 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/object.js +841 -1036
- package/package.json +3 -3
- package/dist/index.js +0 -1731
package/dist/object.js
CHANGED
|
@@ -1,265 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
if (typeof e == "function" || e == null) return e;
|
|
3
|
-
const t = function() {
|
|
4
|
-
};
|
|
5
|
-
return t[Ze] = e, t;
|
|
6
|
-
}, Q = /* @__PURE__ */ Symbol.for("@trigger-lock"), ye = (e, t, r = "value") => {
|
|
7
|
-
ke(e, r) && (e[Q] = !0);
|
|
8
|
-
let n;
|
|
9
|
-
try {
|
|
10
|
-
n = t?.();
|
|
11
|
-
} finally {
|
|
12
|
-
ke(e, r) && delete e[Q];
|
|
13
|
-
}
|
|
14
|
-
return n;
|
|
15
|
-
}, ht = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), dt = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), pe = function(e) {
|
|
16
|
-
return (t) => {
|
|
17
|
-
e[Q] = !0;
|
|
18
|
-
let r;
|
|
19
|
-
try {
|
|
20
|
-
r = t?.();
|
|
21
|
-
} finally {
|
|
22
|
-
e[Q] = !1;
|
|
23
|
-
}
|
|
24
|
-
return r;
|
|
25
|
-
};
|
|
26
|
-
}, vt = (e) => {
|
|
27
|
-
switch (typeof e) {
|
|
28
|
-
case "number":
|
|
29
|
-
return 0;
|
|
30
|
-
case "string":
|
|
31
|
-
return "";
|
|
32
|
-
case "boolean":
|
|
33
|
-
return !1;
|
|
34
|
-
case "object":
|
|
35
|
-
return null;
|
|
36
|
-
case "function":
|
|
37
|
-
return null;
|
|
38
|
-
case "symbol":
|
|
39
|
-
return null;
|
|
40
|
-
case "bigint":
|
|
41
|
-
return 0n;
|
|
42
|
-
}
|
|
43
|
-
}, j = (e) => typeof e?.[Symbol.iterator] == "function", z = (e) => [
|
|
44
|
-
"symbol",
|
|
45
|
-
"string",
|
|
46
|
-
"number"
|
|
47
|
-
].indexOf(typeof e) >= 0, bt = (e, t, r = null) => {
|
|
48
|
-
const n = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
|
|
49
|
-
let i = [];
|
|
50
|
-
t instanceof Set || t instanceof Map || Array.isArray(t) || j(t) ? i = (n instanceof Set || n instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || j(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (i = n instanceof Set || n instanceof WeakSet ? Object.values(t) : Object.entries(t));
|
|
51
|
-
let s = [];
|
|
52
|
-
Array.isArray(n) ? s = n.entries() : n instanceof Map || n instanceof WeakMap ? s = n?.entries?.() : n instanceof Set || n instanceof WeakSet ? s = n?.values?.() : (typeof n == "object" || typeof n == "function") && (s = Object.entries(n));
|
|
53
|
-
const u = new Set(Array.from(i).map((o) => o?.[0])), l = new Set(Array.from(s).map((o) => o?.[0])), f = u?.difference?.(l);
|
|
54
|
-
if (Array.isArray(n)) {
|
|
55
|
-
const o = n.filter((y, a) => !f.has(a));
|
|
56
|
-
n.splice(0, n.length), n.push(...o);
|
|
57
|
-
} else if (n instanceof Map || n instanceof Set || n instanceof WeakMap || n instanceof WeakSet) for (const o of f) n.delete(o);
|
|
58
|
-
else if (typeof n == "function" || typeof n == "object") for (const o of f) delete n[o];
|
|
59
|
-
return n;
|
|
60
|
-
}, ie = (e, t, r = null, n = !0, i = "id") => {
|
|
61
|
-
const s = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
|
|
62
|
-
let u = null;
|
|
63
|
-
if (n && bt(s, t), t instanceof Set || t instanceof Map || Array.isArray(t) || j(t) ? u = (s instanceof Set || s instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || j(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (u = s instanceof Set || s instanceof WeakSet ? Object.values(t) : Object.entries(t)), s && u && (typeof u == "object" || typeof u == "function")) {
|
|
64
|
-
if (s instanceof Map || s instanceof WeakMap) {
|
|
65
|
-
for (const l of u) s.set(...l);
|
|
66
|
-
return s;
|
|
67
|
-
}
|
|
68
|
-
if (s instanceof Set || s instanceof WeakSet) {
|
|
69
|
-
for (const l of u) {
|
|
70
|
-
const f = l?.[i] ? Array.from(s?.values?.() || []).find((o) => !x?.(o?.[i], l?.[i])) : null;
|
|
71
|
-
f != null ? ie(f, l, null, n, i) : s.add(l);
|
|
72
|
-
}
|
|
73
|
-
return s;
|
|
74
|
-
}
|
|
75
|
-
if (typeof s == "object" || typeof s == "function") {
|
|
76
|
-
if (Array.isArray(s) || j(s)) {
|
|
77
|
-
let l = 0;
|
|
78
|
-
for (const f of u) l < s.length ? s[l++] = f?.[1] : s?.push?.(f?.[1]);
|
|
79
|
-
return s;
|
|
80
|
-
}
|
|
81
|
-
return Object.assign(s, Object.fromEntries([...u || []].filter((l) => typeof l != "symbol")));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return r != null ? (Reflect.set(e, r, t), e) : typeof t == "object" || typeof t == "function" ? Object.assign(e, t) : t;
|
|
85
|
-
}, St = (e, t) => mt.getOrInsert(e, /* @__PURE__ */ new WeakMap()).getOrInsert(t, t?.bind?.(e)), H = (e, t) => (typeof t == "function" ? St(e, t) : t) ?? t, ae = (e, t, r, n) => {
|
|
86
|
-
if (t == Symbol.iterator) return Ce(e, r, n);
|
|
87
|
-
if (t == null || typeof t == "symbol" || typeof t == "object" || typeof t == "function") return;
|
|
88
|
-
const i = (s, ...u) => {
|
|
89
|
-
if (s != null) return r?.(s, ...u);
|
|
90
|
-
};
|
|
91
|
-
if (e instanceof Map || e instanceof WeakMap) {
|
|
92
|
-
if (e.has(t)) return i?.(e.get(t), t, null, "@set");
|
|
93
|
-
} else if (e instanceof Set || e instanceof WeakSet) {
|
|
94
|
-
if (e.has(t)) return i?.(t, t, null, "@add");
|
|
95
|
-
} else if (Array.isArray(e) && typeof t == "string" && [...t?.matchAll?.(/^\d+$/g)].length == 1 && Number.isInteger(typeof t == "string" ? parseInt(t) : t)) {
|
|
96
|
-
const s = typeof t == "string" ? parseInt(t) : t;
|
|
97
|
-
return i?.(e?.[s], s, null, "@add");
|
|
98
|
-
} else if (typeof e == "function" || typeof e == "object") return i?.(e?.[t], t, null, "@set");
|
|
99
|
-
}, pt = (e, t = {}) => (Object.entries(t)?.forEach?.(([r, n]) => {
|
|
100
|
-
x(n, e[r]) && (e[r] = n);
|
|
101
|
-
}), e), Ce = (e, t, r) => {
|
|
102
|
-
if (e == null) return;
|
|
103
|
-
let n = [];
|
|
104
|
-
if (e instanceof Set || e instanceof Map || typeof e?.keys == "function") return [...e?.keys?.() || n].forEach?.((i) => ae(e, i, t, r));
|
|
105
|
-
if (Array.isArray(e) || j(e)) return [...e].forEach?.((i, s) => ae(e, s, t, r));
|
|
106
|
-
if (typeof e == "object" || typeof e == "function") return [...Object.keys(e) || n].forEach?.((i) => ae(e, i, t, r));
|
|
107
|
-
}, x = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : typeof e == "boolean" && typeof t == "boolean" ? e != t : typeof e == "number" && typeof t == "number" ? !(e == t || Math.abs(e - t) < 1e-9) : typeof e == "string" && typeof t == "string" ? e != "" && t != "" && e != t || e !== t : typeof e != typeof t ? e !== t : e && t && e != t || e !== t, Le = /* @__PURE__ */ Symbol.for("object.boundCtx");
|
|
108
|
-
globalThis[Le] ??= /* @__PURE__ */ new WeakMap();
|
|
109
|
-
var mt = globalThis[Le], le = (e, t) => {
|
|
110
|
-
const r = e == null || e < 0 || typeof e != "number" || e == Symbol.iterator || (t != null ? e >= (t?.length || 0) : !1);
|
|
111
|
-
return t != null ? Array.isArray(t) && r : !1;
|
|
112
|
-
}, $ = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), P = (e, t) => e instanceof Promise || typeof e?.then == "function" ? $?.has?.(e) ? t($?.get?.(e)) : Promise.try?.(async () => {
|
|
113
|
-
const r = await e;
|
|
114
|
-
return $?.set?.(e, r), r;
|
|
115
|
-
})?.then?.(t) : t(e), gt = class {
|
|
116
|
-
#t;
|
|
117
|
-
#e;
|
|
118
|
-
constructor(e, t) {
|
|
119
|
-
this.#t = e, this.#e = t;
|
|
120
|
-
}
|
|
121
|
-
defineProperty(e, t, r) {
|
|
122
|
-
return S(e) instanceof Promise ? Reflect.defineProperty(e, t, r) : P(S(e), (n) => Reflect.defineProperty(n, t, r));
|
|
123
|
-
}
|
|
124
|
-
deleteProperty(e, t) {
|
|
125
|
-
return S(e) instanceof Promise ? Reflect.deleteProperty(e, t) : P(S(e), (r) => Reflect.deleteProperty(r, t));
|
|
126
|
-
}
|
|
127
|
-
getPrototypeOf(e) {
|
|
128
|
-
return S(e) instanceof Promise ? Reflect.getPrototypeOf(e) : P(S(e), (t) => Reflect.getPrototypeOf(t));
|
|
129
|
-
}
|
|
130
|
-
setPrototypeOf(e, t) {
|
|
131
|
-
return S(e) instanceof Promise ? Reflect.setPrototypeOf(e, t) : P(S(e), (r) => Reflect.setPrototypeOf(r, t));
|
|
132
|
-
}
|
|
133
|
-
isExtensible(e) {
|
|
134
|
-
return S(e) instanceof Promise ? Reflect.isExtensible(e) : P(S(e), (t) => Reflect.isExtensible(t));
|
|
135
|
-
}
|
|
136
|
-
preventExtensions(e) {
|
|
137
|
-
return S(e) instanceof Promise ? Reflect.ownKeys(e) : P(S(e), (t) => Reflect.preventExtensions(t));
|
|
138
|
-
}
|
|
139
|
-
ownKeys(e) {
|
|
140
|
-
const t = S(e);
|
|
141
|
-
return t instanceof Promise ? Object.keys(t) : P(t, (r) => (typeof r == "object" || typeof r == "function") && r != null ? Object.keys(r) : []) ?? [];
|
|
142
|
-
}
|
|
143
|
-
getOwnPropertyDescriptor(e, t) {
|
|
144
|
-
return S(e) instanceof Promise ? Reflect.getOwnPropertyDescriptor(e, t) : P(S(e), (r) => Reflect.getOwnPropertyDescriptor(r, t));
|
|
145
|
-
}
|
|
146
|
-
construct(e, t, r) {
|
|
147
|
-
return P(S(e), (n) => Reflect.construct(n, t, r));
|
|
148
|
-
}
|
|
149
|
-
has(e, t) {
|
|
150
|
-
return S(e) instanceof Promise ? Reflect.has(e, t) : P(S(e), (r) => Reflect.has(r, t));
|
|
151
|
-
}
|
|
152
|
-
get(e, t, r) {
|
|
153
|
-
if (e = S(e), t == "promise") return e;
|
|
154
|
-
if (t == "resolve" && this.#t) return (...i) => {
|
|
155
|
-
const s = this.#t?.(...i);
|
|
156
|
-
return this.#t = null, s;
|
|
157
|
-
};
|
|
158
|
-
if (t == "reject" && this.#e) return (...i) => {
|
|
159
|
-
const s = this.#e?.(...i);
|
|
160
|
-
return this.#e = null, s;
|
|
161
|
-
};
|
|
162
|
-
if (t == "then" || t == "catch" || t == "finally") {
|
|
163
|
-
if (e instanceof Promise) return e?.[t]?.bind?.(e);
|
|
164
|
-
{
|
|
165
|
-
const i = Promise.try(() => e);
|
|
166
|
-
return i?.[t]?.bind?.(i);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
let n;
|
|
170
|
-
return $?.has?.(e) && (n = $?.get?.(e))?.[t] != null ? n = $?.get?.(e)?.[t] : n = Ee(P(e, async (i) => {
|
|
171
|
-
if (S(i) instanceof Promise) return Reflect.get(i, t, r);
|
|
172
|
-
if (m(i)) return t == Symbol.toPrimitive || t == Symbol.toStringTag ? i : void 0;
|
|
173
|
-
let s;
|
|
174
|
-
try {
|
|
175
|
-
s = Reflect.get(i, t, r);
|
|
176
|
-
} catch {
|
|
177
|
-
s = e?.[t];
|
|
178
|
-
}
|
|
179
|
-
return typeof s == "function" ? s?.bind?.(i) : s;
|
|
180
|
-
})), t == Symbol.toStringTag ? m(n) ? String(n ?? "") || "" : n?.[Symbol.toStringTag]?.() || String(n ?? "") || "" : t == Symbol.toPrimitive ? (i) => {
|
|
181
|
-
if (m(n)) return E(n, i);
|
|
182
|
-
} : n;
|
|
183
|
-
}
|
|
184
|
-
set(e, t, r) {
|
|
185
|
-
return P(S(e), (n) => Reflect.set(n, t, r));
|
|
186
|
-
}
|
|
187
|
-
apply(e, t, r) {
|
|
188
|
-
if (this.#t) {
|
|
189
|
-
const n = this.#t?.(...r);
|
|
190
|
-
return this.#t = null, n;
|
|
191
|
-
}
|
|
192
|
-
return P(S(e, this.#t), (n) => {
|
|
193
|
-
if (typeof n == "function")
|
|
194
|
-
return S(n) instanceof Promise, Reflect.apply(n, t, r);
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
function Ee(e, t, r) {
|
|
199
|
-
return e instanceof Promise || typeof e?.then == "function" ? $?.has?.(e) ? $?.get?.(e) : (Ke?.has?.(e) || e?.then?.((n) => $?.set?.(e, n)), Ke?.getOrInsertComputed?.(e, () => new Proxy(at(e), new gt(t, r)))) : e;
|
|
200
|
-
}
|
|
1
|
+
import { $avoidTrigger as ie, $getValue as We, $triggerLock as Ve, Promised as ze, bindCtx as B, callByAllProp as Fe, callByProp as nt, defaultByType as lt, hasValue as P, isArrayInvalidKey as j, isKeyType as W, isNotEqual as O, isPrimitive as g, makeTriggerLess as ye, objectAssign as ue, objectAssignNotEqual as it, potentiallyAsync as st, potentiallyAsyncMap as ut, tryParseByHint as E } from "@fest-lib/core";
|
|
201
2
|
Symbol.observable ||= /* @__PURE__ */ Symbol.for("observable");
|
|
202
3
|
Symbol.subscribe ||= /* @__PURE__ */ Symbol.for("subscribe");
|
|
203
4
|
Symbol.unsubscribe ||= /* @__PURE__ */ Symbol.for("unsubscribe");
|
|
204
|
-
var
|
|
205
|
-
const t = typeof e == "object" || typeof e == "function" ? e?.[
|
|
206
|
-
return Array.isArray(t) ? t?.map?.(r) || Array.from(t || [])?.map?.(r) || [] : t instanceof Map || t instanceof WeakMap ? new Map(Array.from(t?.entries?.() || [])?.map?.(([n,
|
|
207
|
-
},
|
|
5
|
+
var h = /* @__PURE__ */ Symbol.for("@value"), S = /* @__PURE__ */ Symbol.for("@extract"), k = /* @__PURE__ */ Symbol.for("@origin"), ee = /* @__PURE__ */ Symbol.for("@registry"), G = /* @__PURE__ */ Symbol.for("@behavior"), ne = /* @__PURE__ */ Symbol.for("@promise"), de = /* @__PURE__ */ Symbol.for("@trigger-less"), d = /* @__PURE__ */ Symbol.for("@trigger-lock"), ft = /* @__PURE__ */ Symbol.for("@trigger-control"), z = /* @__PURE__ */ Symbol.for("@trigger"), te = /* @__PURE__ */ Symbol.for("@subscribe"), ot = /* @__PURE__ */ Symbol.for("@isNotEqual"), fe = /* @__PURE__ */ Symbol.for("@realProp"), Ce = /* @__PURE__ */ new WeakMap(), se = (e) => {
|
|
6
|
+
const t = typeof e == "object" || typeof e == "function" ? e?.[S] ?? e : e, r = (n) => se(n);
|
|
7
|
+
return Array.isArray(t) ? t?.map?.(r) || Array.from(t || [])?.map?.(r) || [] : t instanceof Map || t instanceof WeakMap ? new Map(Array.from(t?.entries?.() || [])?.map?.(([n, l]) => [n, se(l)])) : t instanceof Set || t instanceof WeakSet ? new Set(Array.from(t?.values?.() || [])?.map?.(r)) : t != null && typeof t == "function" || typeof t == "object" ? Object.fromEntries(Array.from(Object.entries(t || {}) || [])?.filter?.(([n]) => n != S && n != k && n != ee)?.map?.(([n, l]) => [n, se(l)])) : t;
|
|
8
|
+
}, ct = (e) => e?.[S] ?? e?.["@target"] ?? e, $ = (e, t = !1) => {
|
|
208
9
|
const r = e;
|
|
209
|
-
if (
|
|
10
|
+
if (g(e) || typeof e == "symbol") return e;
|
|
210
11
|
if (e != null && (e instanceof WeakRef || "deref" in e && typeof e?.deref == "function") && (e = e?.deref?.()), e != null && (typeof e == "object" || typeof e == "function")) {
|
|
211
|
-
e =
|
|
212
|
-
const n = t &&
|
|
213
|
-
if (n != null && (typeof n == "object" || typeof n == "function") && (e = n), r != e) return
|
|
12
|
+
e = ct(e);
|
|
13
|
+
const n = t && P(e) && e?.value;
|
|
14
|
+
if (n != null && (typeof n == "object" || typeof n == "function") && (e = n), r != e) return $(e, t);
|
|
214
15
|
}
|
|
215
16
|
return e;
|
|
216
|
-
},
|
|
17
|
+
}, Oe = (e) => e != null && typeof e.then == "function", at = (e, t) => g(e) || typeof e == "function" ? t?.(e) : Oe(e) ? e.then(t) : e?.promise && Oe(e.promise) ? e.promise.then(t) : t?.(e), Ne = /* @__PURE__ */ new WeakMap(), yt = new FinalizationRegistry((e) => {
|
|
217
18
|
e?.forEach?.((t) => t?.());
|
|
218
19
|
});
|
|
219
|
-
function
|
|
20
|
+
function R(e, t, r) {
|
|
220
21
|
if (!(!r || typeof r != "function" || typeof e != "object" && typeof e != "function"))
|
|
221
22
|
if (t == Symbol.dispose) {
|
|
222
|
-
const n = e?.[
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
return (typeof n == "object" || typeof n == "function") && (
|
|
226
|
-
|
|
227
|
-
})),
|
|
23
|
+
const n = e?.[S] ?? e;
|
|
24
|
+
Ne?.getOrInsertComputed?.(n, () => {
|
|
25
|
+
const l = /* @__PURE__ */ new Set();
|
|
26
|
+
return (typeof n == "object" || typeof n == "function") && (yt.register(n, l), Ne.set(n, l), n[Symbol.dispose] ??= () => l.forEach((u) => {
|
|
27
|
+
u?.();
|
|
28
|
+
})), l;
|
|
228
29
|
})?.add?.(r);
|
|
229
30
|
} else e[t] = function(...n) {
|
|
230
|
-
const
|
|
231
|
-
typeof
|
|
31
|
+
const l = e?.[t];
|
|
32
|
+
typeof l == "function" && l.apply(this, n), r.apply(this, n);
|
|
232
33
|
};
|
|
233
34
|
}
|
|
234
|
-
var
|
|
35
|
+
var Q = (e) => {
|
|
235
36
|
if (typeof e != "string" || e === "") return !1;
|
|
236
37
|
const t = Number(e);
|
|
237
38
|
return Number.isInteger(t) && t >= 0 && String(t) === e;
|
|
238
39
|
};
|
|
239
|
-
function
|
|
40
|
+
function sr(e = [], t = {}) {
|
|
240
41
|
let r = /* @__PURE__ */ new Set();
|
|
241
|
-
const n = (
|
|
42
|
+
const n = (i, f, o) => {
|
|
242
43
|
t.onDuplicate?.({
|
|
243
|
-
value:
|
|
44
|
+
value: i,
|
|
244
45
|
via: f,
|
|
245
46
|
index: o
|
|
246
47
|
});
|
|
247
48
|
};
|
|
248
49
|
if (e instanceof Set) r = e;
|
|
249
|
-
else for (const
|
|
250
|
-
if (r.has(
|
|
251
|
-
n(
|
|
50
|
+
else for (const i of e) {
|
|
51
|
+
if (r.has(i)) {
|
|
52
|
+
n(i, "push");
|
|
252
53
|
continue;
|
|
253
54
|
}
|
|
254
|
-
r.add(
|
|
55
|
+
r.add(i);
|
|
255
56
|
}
|
|
256
|
-
const
|
|
57
|
+
const l = () => Array.from(r), u = (i) => {
|
|
257
58
|
r.clear();
|
|
258
|
-
for (const f of
|
|
259
|
-
},
|
|
260
|
-
push: (...
|
|
59
|
+
for (const f of i) r.add(f);
|
|
60
|
+
}, s = {
|
|
61
|
+
push: (...i) => {
|
|
261
62
|
let f = r.size;
|
|
262
|
-
for (const o of
|
|
63
|
+
for (const o of i) {
|
|
263
64
|
if (r.has(o)) {
|
|
264
65
|
n(o, "push");
|
|
265
66
|
continue;
|
|
@@ -269,130 +70,130 @@ function pr(e = [], t = {}) {
|
|
|
269
70
|
return f;
|
|
270
71
|
},
|
|
271
72
|
pop: () => {
|
|
272
|
-
const
|
|
273
|
-
if (!
|
|
274
|
-
const f =
|
|
73
|
+
const i = l();
|
|
74
|
+
if (!i.length) return;
|
|
75
|
+
const f = i[i.length - 1];
|
|
275
76
|
return r.delete(f), f;
|
|
276
77
|
},
|
|
277
78
|
shift: () => {
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
280
|
-
const f =
|
|
79
|
+
const i = r.values().next();
|
|
80
|
+
if (i.done) return;
|
|
81
|
+
const f = i.value;
|
|
281
82
|
return r.delete(f), f;
|
|
282
83
|
},
|
|
283
|
-
unshift: (...
|
|
284
|
-
if (!
|
|
285
|
-
const f =
|
|
286
|
-
for (const
|
|
287
|
-
if (f.includes(
|
|
288
|
-
n(
|
|
84
|
+
unshift: (...i) => {
|
|
85
|
+
if (!i.length) return r.size;
|
|
86
|
+
const f = l(), o = [];
|
|
87
|
+
for (const y of i) {
|
|
88
|
+
if (f.includes(y) || o.includes(y)) {
|
|
89
|
+
n(y, "unshift", 0);
|
|
289
90
|
continue;
|
|
290
91
|
}
|
|
291
|
-
o.push(
|
|
92
|
+
o.push(y);
|
|
292
93
|
}
|
|
293
94
|
if (!o.length) return f.length;
|
|
294
|
-
const
|
|
295
|
-
return
|
|
95
|
+
const a = [...o, ...f];
|
|
96
|
+
return u(a), a.length;
|
|
296
97
|
},
|
|
297
|
-
splice: (
|
|
298
|
-
const
|
|
299
|
-
let
|
|
300
|
-
for (const
|
|
301
|
-
if (
|
|
302
|
-
n(
|
|
98
|
+
splice: (i, f, ...o) => {
|
|
99
|
+
const a = l(), y = Math.min(Math.max(i, 0), a.length), v = f === void 0 ? a.length - y : Math.max(0, Math.min(f, a.length - y)), m = a.splice(y, v);
|
|
100
|
+
let A = y;
|
|
101
|
+
for (const w of o) {
|
|
102
|
+
if (a.includes(w)) {
|
|
103
|
+
n(w, "splice", A);
|
|
303
104
|
continue;
|
|
304
105
|
}
|
|
305
|
-
|
|
106
|
+
a.splice(A++, 0, w);
|
|
306
107
|
}
|
|
307
|
-
return
|
|
108
|
+
return u(a), m;
|
|
308
109
|
},
|
|
309
|
-
includes: (
|
|
310
|
-
indexOf: (
|
|
110
|
+
includes: (i) => r.has(i),
|
|
111
|
+
indexOf: (i) => l().indexOf(i),
|
|
311
112
|
clear: () => {
|
|
312
113
|
r.clear();
|
|
313
114
|
},
|
|
314
|
-
delete: (
|
|
315
|
-
toArray: () =>
|
|
115
|
+
delete: (i) => r.delete(i),
|
|
116
|
+
toArray: () => l(),
|
|
316
117
|
toSet: () => new Set(r),
|
|
317
118
|
[Symbol.iterator]: () => r[Symbol.iterator]()
|
|
318
119
|
};
|
|
319
|
-
return new Proxy(
|
|
320
|
-
get: (
|
|
120
|
+
return new Proxy(s, {
|
|
121
|
+
get: (i, f) => {
|
|
321
122
|
if (f === "length") return r.size;
|
|
322
|
-
if (
|
|
323
|
-
const o =
|
|
123
|
+
if (Q(f)) return l()[Number(f)];
|
|
124
|
+
const o = s[f];
|
|
324
125
|
return o;
|
|
325
126
|
},
|
|
326
|
-
set: (
|
|
127
|
+
set: (i, f, o) => {
|
|
327
128
|
if (f === "length") {
|
|
328
129
|
if (typeof o != "number" || !Number.isFinite(o) || o < 0) throw new RangeError("length must be a finite non-negative number");
|
|
329
|
-
const
|
|
330
|
-
if (
|
|
331
|
-
const
|
|
332
|
-
return
|
|
130
|
+
const a = Math.floor(o);
|
|
131
|
+
if (a >= r.size) return !0;
|
|
132
|
+
const y = l().slice(0, a);
|
|
133
|
+
return u(y), !0;
|
|
333
134
|
}
|
|
334
|
-
if (
|
|
335
|
-
const
|
|
336
|
-
if (
|
|
135
|
+
if (Q(f)) {
|
|
136
|
+
const a = l(), y = Number(f);
|
|
137
|
+
if (y > a.length) return !0;
|
|
337
138
|
const v = o;
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
if (Object.is(
|
|
341
|
-
if (
|
|
342
|
-
return n(v, "set",
|
|
343
|
-
y
|
|
139
|
+
if (y < a.length) {
|
|
140
|
+
const m = a[y];
|
|
141
|
+
if (Object.is(m, v)) return !0;
|
|
142
|
+
if (a.some((A, w) => w !== y && Object.is(A, v)))
|
|
143
|
+
return n(v, "set", y), !0;
|
|
144
|
+
a[y] = v;
|
|
344
145
|
} else {
|
|
345
|
-
if (
|
|
346
|
-
return n(v, "set",
|
|
347
|
-
|
|
146
|
+
if (a.includes(v))
|
|
147
|
+
return n(v, "set", y), !0;
|
|
148
|
+
a.push(v);
|
|
348
149
|
}
|
|
349
|
-
return
|
|
150
|
+
return u(a), !0;
|
|
350
151
|
}
|
|
351
|
-
return Reflect.set(
|
|
152
|
+
return Reflect.set(s, f, o);
|
|
352
153
|
},
|
|
353
|
-
deleteProperty: (
|
|
154
|
+
deleteProperty: (i, f) => {
|
|
354
155
|
if (f === "length") return !1;
|
|
355
|
-
if (
|
|
356
|
-
const o =
|
|
357
|
-
return
|
|
156
|
+
if (Q(f)) {
|
|
157
|
+
const o = l(), a = Number(f);
|
|
158
|
+
return a >= o.length || (o.splice(a, 1), u(o)), !0;
|
|
358
159
|
}
|
|
359
|
-
return Reflect.deleteProperty(
|
|
160
|
+
return Reflect.deleteProperty(s, f);
|
|
360
161
|
},
|
|
361
162
|
ownKeys: () => {
|
|
362
|
-
const
|
|
163
|
+
const i = [];
|
|
363
164
|
let f = 0;
|
|
364
|
-
for (const o of r)
|
|
365
|
-
return
|
|
165
|
+
for (const o of r) i.push(String(f++));
|
|
166
|
+
return i.push("length"), i;
|
|
366
167
|
},
|
|
367
|
-
getOwnPropertyDescriptor: (
|
|
168
|
+
getOwnPropertyDescriptor: (i, f) => {
|
|
368
169
|
if (f === "length") return {
|
|
369
170
|
configurable: !1,
|
|
370
171
|
enumerable: !1,
|
|
371
172
|
writable: !0,
|
|
372
173
|
value: r.size
|
|
373
174
|
};
|
|
374
|
-
if (
|
|
375
|
-
const o =
|
|
376
|
-
return
|
|
175
|
+
if (Q(f)) {
|
|
176
|
+
const o = l(), a = Number(f);
|
|
177
|
+
return a >= o.length ? void 0 : {
|
|
377
178
|
configurable: !0,
|
|
378
179
|
enumerable: !0,
|
|
379
180
|
writable: !0,
|
|
380
|
-
value: o[
|
|
181
|
+
value: o[a]
|
|
381
182
|
};
|
|
382
183
|
}
|
|
383
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
184
|
+
return Reflect.getOwnPropertyDescriptor(s, f);
|
|
384
185
|
},
|
|
385
|
-
has: (
|
|
186
|
+
has: (i, f) => {
|
|
386
187
|
if (f === "length") return !0;
|
|
387
|
-
if (
|
|
188
|
+
if (Q(f)) {
|
|
388
189
|
const o = Number(f);
|
|
389
190
|
return o >= 0 && o < r.size;
|
|
390
191
|
}
|
|
391
|
-
return f in
|
|
192
|
+
return f in s;
|
|
392
193
|
}
|
|
393
194
|
});
|
|
394
195
|
}
|
|
395
|
-
var
|
|
196
|
+
var dt = class {
|
|
396
197
|
constructor() {
|
|
397
198
|
}
|
|
398
199
|
deleteProperty(e, t) {
|
|
@@ -408,44 +209,44 @@ var Tt = class {
|
|
|
408
209
|
return Reflect.has(e, t);
|
|
409
210
|
}
|
|
410
211
|
set(e, t, r) {
|
|
411
|
-
return
|
|
212
|
+
return ue(e, r, t), !0;
|
|
412
213
|
}
|
|
413
214
|
get(e, t, r) {
|
|
414
215
|
return typeof t == "symbol" ? e?.[t] ?? e : Reflect.get(e, t, r);
|
|
415
216
|
}
|
|
416
|
-
},
|
|
417
|
-
if (e?.[
|
|
418
|
-
const t = new Proxy(e, new
|
|
419
|
-
return
|
|
420
|
-
},
|
|
421
|
-
globalThis[
|
|
422
|
-
var
|
|
217
|
+
}, ur = (e) => {
|
|
218
|
+
if (e?.[k] || Ce.has(e)) return e;
|
|
219
|
+
const t = new Proxy(e, new dt());
|
|
220
|
+
return Ce.set(t, e), t;
|
|
221
|
+
}, qe = /* @__PURE__ */ Symbol.for("object.ts@withUnsub");
|
|
222
|
+
globalThis[qe] ??= /* @__PURE__ */ new WeakMap();
|
|
223
|
+
var ht = globalThis[qe], vt = (e, t, r) => ht.getOrInsert(e, () => {
|
|
423
224
|
const n = t?.deref?.();
|
|
424
225
|
n?.affected?.(r);
|
|
425
|
-
const
|
|
426
|
-
const
|
|
427
|
-
return n?.unaffected?.(r),
|
|
226
|
+
const l = e?.complete?.bind?.(e), u = () => {
|
|
227
|
+
const s = l?.();
|
|
228
|
+
return n?.unaffected?.(r), s;
|
|
428
229
|
};
|
|
429
|
-
return e.complete =
|
|
430
|
-
unaffected:
|
|
431
|
-
[Symbol.dispose]:
|
|
432
|
-
[Symbol.asyncDispose]:
|
|
230
|
+
return e.complete = u, {
|
|
231
|
+
unaffected: u,
|
|
232
|
+
[Symbol.dispose]: u,
|
|
233
|
+
[Symbol.asyncDispose]: u
|
|
433
234
|
};
|
|
434
|
-
}),
|
|
435
|
-
globalThis[
|
|
436
|
-
var p = globalThis[
|
|
437
|
-
globalThis[
|
|
438
|
-
var
|
|
235
|
+
}), Ue = /* @__PURE__ */ Symbol.for("object.ts@subscriptRegistry");
|
|
236
|
+
globalThis[Ue] ??= /* @__PURE__ */ new WeakMap();
|
|
237
|
+
var p = globalThis[Ue] ??= /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ Symbol.for("object.ts@globalEffectListeners");
|
|
238
|
+
globalThis[Le] ??= /* @__PURE__ */ new Map();
|
|
239
|
+
var oe = globalThis[Le], De = (e, t = ["*"]) => {
|
|
439
240
|
if (e == null || typeof e != "function") return;
|
|
440
|
-
const r =
|
|
441
|
-
return
|
|
442
|
-
},
|
|
443
|
-
globalThis[
|
|
444
|
-
var
|
|
445
|
-
const r = e?.[
|
|
241
|
+
const r = je(t);
|
|
242
|
+
return oe.set(e, r.affectTypes), () => oe.delete(e);
|
|
243
|
+
}, Je = /* @__PURE__ */ Symbol.for("object.ts@wrapped");
|
|
244
|
+
globalThis[Je] ??= /* @__PURE__ */ new WeakMap();
|
|
245
|
+
var bt = globalThis[Je], pt = (e, t) => {
|
|
246
|
+
const r = e?.[S] ?? e;
|
|
446
247
|
let n = p.get(r);
|
|
447
|
-
return n ? n.bindSource(r) : (n = new
|
|
448
|
-
},
|
|
248
|
+
return n ? n.bindSource(r) : (n = new mt(r), p.set(r, n)), t;
|
|
249
|
+
}, le = (e, t) => (e = $(e?.[S] ?? e), typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") || e == null ? e : bt.getOrInsertComputed(e, () => new Proxy(e, pt(e, t)))), X = /* @__PURE__ */ Symbol.for("@allProps"), Qe = /* @__PURE__ */ new Set(["*", "all"]), Ie = /* @__PURE__ */ new Map([
|
|
449
250
|
["set", ["setter", "@set"]],
|
|
450
251
|
["add", ["@add"]],
|
|
451
252
|
["delete", ["@delete"]],
|
|
@@ -455,77 +256,77 @@ var It = globalThis[nt], kt = (e, t) => {
|
|
|
455
256
|
["setAll", ["@setAll"]],
|
|
456
257
|
["addAll", ["@addAll"]],
|
|
457
258
|
["deleteAll", ["@deleteAll", "@clear"]]
|
|
458
|
-
]),
|
|
459
|
-
globalThis[
|
|
460
|
-
var
|
|
259
|
+
]), Xe = /* @__PURE__ */ Symbol.for("object.ts@triggerCanonicalNames");
|
|
260
|
+
globalThis[Xe] ??= new Map(Array.from(Ie.entries()).flatMap(([e, t]) => t.map((r) => [r, e])));
|
|
261
|
+
var St = globalThis[Xe], re = (e = "set") => {
|
|
461
262
|
if (e == null) return e;
|
|
462
263
|
const t = String(e || "set");
|
|
463
|
-
return
|
|
464
|
-
},
|
|
465
|
-
const t = e == null ? "all" : String(
|
|
466
|
-
return [t, ...
|
|
467
|
-
},
|
|
264
|
+
return St.get(t) ?? t;
|
|
265
|
+
}, Ye = (e) => {
|
|
266
|
+
const t = e == null ? "all" : String(re(e) ?? "all");
|
|
267
|
+
return [t, ...Ie.get(t) ?? []];
|
|
268
|
+
}, Be = (e = ["*"]) => new Set([...q(e)].flatMap((t) => [t, ...Ie.get(t) ?? []])), q = (e = ["*"]) => {
|
|
468
269
|
const t = typeof e == "string" ? [e] : Array.from(e ?? ["*"]), r = new Set(t.map((n) => {
|
|
469
|
-
const
|
|
470
|
-
return
|
|
270
|
+
const l = String(n || "*");
|
|
271
|
+
return Qe.has(l) ? l : String(re(l) ?? l);
|
|
471
272
|
}));
|
|
472
273
|
return r.size ? r : /* @__PURE__ */ new Set(["*"]);
|
|
473
|
-
},
|
|
474
|
-
const r = e instanceof Set ? e :
|
|
475
|
-
return [...
|
|
476
|
-
},
|
|
477
|
-
if (
|
|
478
|
-
affectTypes:
|
|
274
|
+
}, F = (e, t) => {
|
|
275
|
+
const r = e instanceof Set ? e : q(e);
|
|
276
|
+
return [...Qe].some((n) => r.has(n)) || Ye(t).some((n) => r.has(n));
|
|
277
|
+
}, Ze = (e) => !!e && typeof e == "object" && !Array.isArray(e) && ("affectTypes" in e || "triggers" in e || "triggerImmediately" in e), he = (e = ["*"]) => {
|
|
278
|
+
if (Ze(e)) return {
|
|
279
|
+
affectTypes: q(e.affectTypes ?? e.triggers ?? ["*"]),
|
|
479
280
|
triggerImmediately: e.triggerImmediately !== !1
|
|
480
281
|
};
|
|
481
|
-
const t =
|
|
282
|
+
const t = q(e);
|
|
482
283
|
return {
|
|
483
284
|
affectTypes: t,
|
|
484
|
-
triggerImmediately:
|
|
285
|
+
triggerImmediately: F(t, "initial")
|
|
485
286
|
};
|
|
486
|
-
},
|
|
487
|
-
affectTypes:
|
|
287
|
+
}, je = (e = ["*"]) => Ze(e) ? {
|
|
288
|
+
affectTypes: q(e.affectTypes ?? e.triggers ?? ["*"]),
|
|
488
289
|
triggerImmediately: e.triggerImmediately === !0
|
|
489
290
|
} : {
|
|
490
|
-
affectTypes:
|
|
291
|
+
affectTypes: q(e),
|
|
491
292
|
triggerImmediately: !1
|
|
492
|
-
},
|
|
493
|
-
globalThis[
|
|
293
|
+
}, et = /* @__PURE__ */ Symbol.for("object.ts@Subscript");
|
|
294
|
+
globalThis[et] ??= class {
|
|
494
295
|
compatible;
|
|
495
|
-
#
|
|
296
|
+
#r;
|
|
496
297
|
#e;
|
|
497
|
-
#
|
|
298
|
+
#t = /* @__PURE__ */ new WeakSet();
|
|
498
299
|
#f;
|
|
499
300
|
#o;
|
|
500
|
-
#
|
|
301
|
+
#i = /* @__PURE__ */ new Set();
|
|
501
302
|
#n = /* @__PURE__ */ new Set();
|
|
502
303
|
#c;
|
|
503
|
-
#
|
|
504
|
-
#
|
|
304
|
+
#a = /* @__PURE__ */ new Map();
|
|
305
|
+
#l = /* @__PURE__ */ new Map();
|
|
505
306
|
#s = !1;
|
|
506
307
|
constructor(t) {
|
|
507
|
-
this.#
|
|
508
|
-
enable: (
|
|
509
|
-
disable: (
|
|
510
|
-
set: (
|
|
511
|
-
with: (
|
|
512
|
-
without: (
|
|
513
|
-
isEnabled: (
|
|
514
|
-
}, this.#o = { next: (
|
|
515
|
-
|
|
308
|
+
this.#r = t, this.#e = /* @__PURE__ */ new Map(), this.#t = /* @__PURE__ */ new WeakSet(), this.#c = {
|
|
309
|
+
enable: (l = ["*"], u) => u ? this.withTriggers(l, !0, u) : this.setTriggersEnabled(l, !0),
|
|
310
|
+
disable: (l = ["*"], u) => u ? this.withTriggers(l, !1, u) : this.setTriggersEnabled(l, !1),
|
|
311
|
+
set: (l, u) => this.setTriggersEnabled(l, u),
|
|
312
|
+
with: (l, u) => this.withTriggers(l, !0, u),
|
|
313
|
+
without: (l, u) => this.withTriggers(l, !1, u),
|
|
314
|
+
isEnabled: (l) => this.isTriggerEnabled(l)
|
|
315
|
+
}, this.#o = { next: (l) => {
|
|
316
|
+
l && (Array.isArray(l) ? this.#u(...l) : this.#u(l));
|
|
516
317
|
} };
|
|
517
|
-
const r = new WeakRef(this), n = function(
|
|
518
|
-
const
|
|
519
|
-
return
|
|
318
|
+
const r = new WeakRef(this), n = function(l) {
|
|
319
|
+
const u = l?.next?.bind?.(l);
|
|
320
|
+
return vt(l, r, u);
|
|
520
321
|
};
|
|
521
322
|
this.#f = typeof Observable < "u" ? new Observable(n) : null, this.compatible = () => this.#f;
|
|
522
323
|
}
|
|
523
324
|
bindSource(t) {
|
|
524
|
-
return this.#
|
|
325
|
+
return this.#r ??= t, this;
|
|
525
326
|
}
|
|
526
327
|
$safeExec(t, ...r) {
|
|
527
|
-
if (!(!t || this.#
|
|
528
|
-
this.#
|
|
328
|
+
if (!(!t || this.#t.has(t))) {
|
|
329
|
+
this.#t.add(t);
|
|
529
330
|
try {
|
|
530
331
|
const n = t(...r);
|
|
531
332
|
if (n && typeof n.then == "function") {
|
|
@@ -536,100 +337,100 @@ globalThis[ot] ??= class {
|
|
|
536
337
|
} catch (n) {
|
|
537
338
|
console.warn(n);
|
|
538
339
|
} finally {
|
|
539
|
-
this.#
|
|
340
|
+
this.#t.delete(t);
|
|
540
341
|
}
|
|
541
342
|
}
|
|
542
343
|
}
|
|
543
|
-
#u(t, r = null, n,
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
if (
|
|
547
|
-
for (const [
|
|
548
|
-
if (
|
|
549
|
-
const
|
|
550
|
-
source: this.#
|
|
551
|
-
target: this.#
|
|
344
|
+
#u(t, r = null, n, l = "all", ...u) {
|
|
345
|
+
l = re(l) ?? l;
|
|
346
|
+
const s = this.#e;
|
|
347
|
+
if (s?.size)
|
|
348
|
+
for (const [i, f] of s.entries()) (f.prop === t || f.prop === X || f.prop === null) && F(f.triggers, l) && this.$safeExec(i, r, t, n, l, ...u);
|
|
349
|
+
if (oe.size) {
|
|
350
|
+
const i = {
|
|
351
|
+
source: this.#r,
|
|
352
|
+
target: this.#r,
|
|
552
353
|
value: r,
|
|
553
354
|
prop: t,
|
|
554
355
|
name: t,
|
|
555
356
|
oldValue: n,
|
|
556
|
-
trigger:
|
|
557
|
-
args:
|
|
357
|
+
trigger: l,
|
|
358
|
+
args: u
|
|
558
359
|
};
|
|
559
|
-
for (const [f, o] of
|
|
360
|
+
for (const [f, o] of oe.entries()) F(o, l) && this.$safeExec(f, i);
|
|
560
361
|
}
|
|
561
362
|
}
|
|
562
363
|
wrap(t) {
|
|
563
|
-
return Array.isArray(t) ?
|
|
364
|
+
return Array.isArray(t) ? le(t, this) : t;
|
|
564
365
|
}
|
|
565
366
|
get triggerControl() {
|
|
566
367
|
return this.#c;
|
|
567
368
|
}
|
|
568
369
|
isTriggerEnabled(t) {
|
|
569
|
-
return !
|
|
370
|
+
return !F(this.#n, "all") && !Ye(t).some((r) => this.#n.has(r));
|
|
570
371
|
}
|
|
571
372
|
setTriggersEnabled(t = ["*"], r = !0) {
|
|
572
|
-
const n =
|
|
573
|
-
for (const
|
|
373
|
+
const n = Be(t);
|
|
374
|
+
for (const l of n) r ? this.#n.delete(l) : this.#n.add(l);
|
|
574
375
|
}
|
|
575
376
|
withTriggers(t, r, n) {
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
-
|
|
377
|
+
const l = [...Be(t)], u = new Map(l.map((i) => [i, this.#n.has(i)])), s = () => {
|
|
378
|
+
u.forEach((i, f) => {
|
|
379
|
+
i ? this.#n.add(f) : this.#n.delete(f);
|
|
579
380
|
});
|
|
580
381
|
};
|
|
581
|
-
this.setTriggersEnabled(
|
|
382
|
+
this.setTriggersEnabled(l, r);
|
|
582
383
|
try {
|
|
583
|
-
const
|
|
584
|
-
return
|
|
585
|
-
} catch (
|
|
586
|
-
throw
|
|
384
|
+
const i = n?.();
|
|
385
|
+
return i && typeof i.finally == "function" ? i.finally(s) : (s(), i);
|
|
386
|
+
} catch (i) {
|
|
387
|
+
throw s(), i;
|
|
587
388
|
}
|
|
588
389
|
}
|
|
589
390
|
affected(t, r, n = ["*"]) {
|
|
590
391
|
if (t == null || typeof t != "function") return;
|
|
591
|
-
const
|
|
392
|
+
const l = he(n);
|
|
592
393
|
return this.#e.set(t, {
|
|
593
|
-
prop: r ||
|
|
594
|
-
triggers:
|
|
595
|
-
}), () => this.unaffected(t, r ||
|
|
394
|
+
prop: r || X,
|
|
395
|
+
triggers: l.affectTypes
|
|
396
|
+
}), () => this.unaffected(t, r || X);
|
|
596
397
|
}
|
|
597
398
|
unaffected(t, r) {
|
|
598
399
|
if (t != null && typeof t == "function") {
|
|
599
|
-
const n = this.#e,
|
|
600
|
-
if (
|
|
601
|
-
return n.delete(t), () => this.affected(t, r ||
|
|
400
|
+
const n = this.#e, l = n?.get(t);
|
|
401
|
+
if (l && (l.prop == r || r == null || r == X))
|
|
402
|
+
return n.delete(t), () => this.affected(t, r || X, l.triggers);
|
|
602
403
|
}
|
|
603
404
|
return this.#e.clear();
|
|
604
405
|
}
|
|
605
|
-
trigger(t, r, n,
|
|
606
|
-
if (typeof t == "symbol" || (
|
|
607
|
-
const
|
|
608
|
-
let
|
|
609
|
-
|
|
406
|
+
trigger(t, r, n, l = "set", ...u) {
|
|
407
|
+
if (typeof t == "symbol" || (l === void 0 && (l = "set"), l = re(l) ?? l, !this.isTriggerEnabled(l))) return;
|
|
408
|
+
const s = `${l ?? "all"}`;
|
|
409
|
+
let i = this.#l.get(t);
|
|
410
|
+
i || (i = /* @__PURE__ */ new Map(), this.#l.set(t, i)), i.set(s, [
|
|
610
411
|
t,
|
|
611
412
|
r,
|
|
612
413
|
n,
|
|
613
|
-
|
|
614
|
-
|
|
414
|
+
l,
|
|
415
|
+
u
|
|
615
416
|
]), !this.#s && (this.#s = !0, queueMicrotask(() => {
|
|
616
417
|
this.#s = !1;
|
|
617
|
-
const f = this.#
|
|
618
|
-
this.#
|
|
619
|
-
for (const [o,
|
|
620
|
-
if (!(o != null && this.#
|
|
621
|
-
o != null && this.#
|
|
418
|
+
const f = this.#l;
|
|
419
|
+
this.#l = /* @__PURE__ */ new Map();
|
|
420
|
+
for (const [o, a] of f)
|
|
421
|
+
if (!(o != null && this.#i.has(o))) {
|
|
422
|
+
o != null && this.#i.add(o);
|
|
622
423
|
try {
|
|
623
|
-
for (const [,
|
|
624
|
-
const [v, A, w,
|
|
424
|
+
for (const [, y] of a) {
|
|
425
|
+
const [v, m, A, w, I] = y;
|
|
625
426
|
try {
|
|
626
|
-
this.#u(v, A, w,
|
|
627
|
-
} catch (
|
|
628
|
-
console.warn(
|
|
427
|
+
this.#u(v, m, A, w, ...I ?? []);
|
|
428
|
+
} catch (K) {
|
|
429
|
+
console.warn(K);
|
|
629
430
|
}
|
|
630
431
|
}
|
|
631
432
|
} finally {
|
|
632
|
-
o != null && this.#
|
|
433
|
+
o != null && this.#i.delete(o);
|
|
633
434
|
}
|
|
634
435
|
}
|
|
635
436
|
}));
|
|
@@ -638,7 +439,7 @@ globalThis[ot] ??= class {
|
|
|
638
439
|
return this.#o;
|
|
639
440
|
}
|
|
640
441
|
};
|
|
641
|
-
var
|
|
442
|
+
var mt = globalThis[et], gt = /* @__PURE__ */ Symbol.for("object.ts@__safeGetGuard"), wt = /* @__PURE__ */ new Set([
|
|
642
443
|
Symbol.toStringTag,
|
|
643
444
|
Symbol.iterator,
|
|
644
445
|
Symbol.asyncIterator,
|
|
@@ -653,147 +454,147 @@ var Wt = globalThis[ot], _t = /* @__PURE__ */ Symbol.for("object.ts@__safeGetGua
|
|
|
653
454
|
"catch",
|
|
654
455
|
"finally",
|
|
655
456
|
"next"
|
|
656
|
-
]),
|
|
657
|
-
if (
|
|
457
|
+
]), Y = (e, t) => {
|
|
458
|
+
if (!wt.has(t)) return null;
|
|
658
459
|
const r = c(e, t);
|
|
659
|
-
return typeof r == "function" ?
|
|
660
|
-
},
|
|
661
|
-
function
|
|
460
|
+
return typeof r == "function" ? B(e, r) : r;
|
|
461
|
+
}, T = globalThis[gt] ??= /* @__PURE__ */ new WeakMap();
|
|
462
|
+
function At(e, t) {
|
|
662
463
|
let r = !0;
|
|
663
464
|
try {
|
|
664
|
-
|
|
465
|
+
T?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), T?.get?.(e)?.has?.(t) && (r = !0), r = typeof Reflect.getOwnPropertyDescriptor(e, t)?.get == "function";
|
|
665
466
|
} catch {
|
|
666
467
|
r = !0;
|
|
667
468
|
} finally {
|
|
668
|
-
|
|
469
|
+
T?.get?.(e)?.delete?.(t);
|
|
669
470
|
}
|
|
670
471
|
return r;
|
|
671
472
|
}
|
|
672
|
-
var
|
|
673
|
-
if (
|
|
473
|
+
var D = (e, t) => {
|
|
474
|
+
if (g(e)) return e;
|
|
674
475
|
const r = c(e, t);
|
|
675
476
|
if (r == null && t != "value") {
|
|
676
477
|
const n = c(e, "value");
|
|
677
|
-
return n != null && !
|
|
678
|
-
} else if (t == "value" && r != null && !
|
|
478
|
+
return n != null && !g(n) ? D(n, t) : r;
|
|
479
|
+
} else if (t == "value" && r != null && !g(r) && typeof r != "function") return D(r, t) ?? r ?? e;
|
|
679
480
|
return r ?? e;
|
|
680
|
-
},
|
|
481
|
+
}, Tt = (e, t, r) => {
|
|
681
482
|
if (e == null) return !1;
|
|
682
483
|
let n = __safeSetGuard?.getOrInsert?.(e, /* @__PURE__ */ new Set());
|
|
683
484
|
return n?.has?.(t) ? !1 : (n?.add?.(t), Reflect.set(e, t, r));
|
|
684
485
|
}, c = (e, t, r) => {
|
|
685
486
|
let n;
|
|
686
487
|
if (e == null) return e;
|
|
687
|
-
let
|
|
688
|
-
if (
|
|
689
|
-
if (!
|
|
488
|
+
let l = T?.getOrInsert?.(e, /* @__PURE__ */ new Set());
|
|
489
|
+
if (l?.has?.(t)) return null;
|
|
490
|
+
if (!At(e, t)) n ??= Reflect.get(e, t, r ?? e);
|
|
690
491
|
else {
|
|
691
|
-
|
|
492
|
+
l?.add?.(t);
|
|
692
493
|
try {
|
|
693
494
|
n = Reflect.get(e, t, r ?? e);
|
|
694
495
|
} catch {
|
|
695
496
|
n = void 0;
|
|
696
497
|
} finally {
|
|
697
|
-
|
|
498
|
+
l.delete(t), l?.size === 0 && T?.delete?.(e);
|
|
698
499
|
}
|
|
699
500
|
}
|
|
700
|
-
return typeof n == "function" ?
|
|
701
|
-
},
|
|
702
|
-
const t = c(e,
|
|
703
|
-
return
|
|
704
|
-
},
|
|
705
|
-
const r =
|
|
706
|
-
return r != null && t == r ? c(e, "value") ?? c(e,
|
|
707
|
-
},
|
|
708
|
-
const r = (
|
|
709
|
-
key:
|
|
710
|
-
trigger:
|
|
711
|
-
...
|
|
501
|
+
return typeof n == "function" ? B(e, n) : n;
|
|
502
|
+
}, M = (e, t) => Object.prototype.hasOwnProperty.call(e, t), ge = (e, t = !1) => !!e && typeof e == "object" && !Array.isArray(e) && (M(e, "key") || M(e, "name") || M(e, "oldValue") || M(e, "old") || M(e, "op") || M(e, "trigger") || t && M(e, "value")), V = (e, t, r) => M(e, t) ? e[t] : t == "oldValue" && M(e, "old") ? e.old : r(), ve = (e, t = "manual") => re(e.trigger ?? e.op ?? t), Ot = (e) => typeof e == "string" || typeof e == "number" || typeof e == "symbol", ce = (e) => {
|
|
503
|
+
const t = c(e, fe) ?? c(e, "realProp");
|
|
504
|
+
return Ot(t) ? t : null;
|
|
505
|
+
}, Ge = (e, t) => t == "value" ? ce(e) ?? t : t, xt = (e, t) => {
|
|
506
|
+
const r = ce(e);
|
|
507
|
+
return r != null && t == r ? c(e, "value") ?? c(e, h) ?? c(e, t) : t == null ? void 0 : c(e, t);
|
|
508
|
+
}, be = (e, t) => {
|
|
509
|
+
const r = (l, u, s) => (ge(u) || (s ??= u), t(ge(l) ? l : ge(u, !0) ? {
|
|
510
|
+
key: l,
|
|
511
|
+
trigger: s,
|
|
512
|
+
...u
|
|
712
513
|
} : {
|
|
713
|
-
key:
|
|
714
|
-
trigger:
|
|
514
|
+
key: l,
|
|
515
|
+
trigger: s ?? u
|
|
715
516
|
})), n = e?.triggerControl;
|
|
716
|
-
return n && Object.assign(r, n), r.custom = (
|
|
717
|
-
key:
|
|
718
|
-
trigger:
|
|
719
|
-
value:
|
|
720
|
-
oldValue:
|
|
517
|
+
return n && Object.assign(r, n), r.custom = (l, u, s, i) => r({
|
|
518
|
+
key: u,
|
|
519
|
+
trigger: l,
|
|
520
|
+
value: s,
|
|
521
|
+
oldValue: i
|
|
721
522
|
}), r;
|
|
722
|
-
},
|
|
723
|
-
if (e == null ||
|
|
523
|
+
}, pe = (e, t, r) => {
|
|
524
|
+
if (e == null || g(e)) return e;
|
|
724
525
|
if (([
|
|
725
526
|
"deref",
|
|
726
527
|
"bind",
|
|
727
528
|
"@target",
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
529
|
+
k,
|
|
530
|
+
S,
|
|
531
|
+
ee
|
|
731
532
|
].indexOf(t) < 0 ? c(e, t)?.bind?.(e) : null) != null) return null;
|
|
732
|
-
if ([
|
|
733
|
-
if (t ==
|
|
734
|
-
if (t ==
|
|
735
|
-
if (t ==
|
|
533
|
+
if ([S, k].indexOf(t) >= 0) return c(e, t) ?? e;
|
|
534
|
+
if (t == h) return c(e, t) ?? c(e, "value");
|
|
535
|
+
if (t == ee) return r;
|
|
536
|
+
if (t == ft) return r?.triggerControl;
|
|
736
537
|
if (t == Symbol.observable) return r?.compatible;
|
|
737
|
-
if (t == Symbol.subscribe) return (n,
|
|
538
|
+
if (t == Symbol.subscribe) return (n, l, u) => b(l != null ? [e, l] : e, n, u);
|
|
738
539
|
if (t == Symbol.iterator || t == Symbol.asyncIterator) return c(e, t);
|
|
739
540
|
if (t == Symbol.dispose) return (n) => {
|
|
740
|
-
c(e, Symbol.dispose)?.(n),
|
|
541
|
+
c(e, Symbol.dispose)?.(n), Te(n != null ? [e, n] : e);
|
|
741
542
|
};
|
|
742
543
|
if (t == Symbol.asyncDispose) return (n) => {
|
|
743
|
-
c(e, Symbol.asyncDispose)?.(n),
|
|
544
|
+
c(e, Symbol.asyncDispose)?.(n), Te(n != null ? [e, n] : e);
|
|
744
545
|
};
|
|
745
|
-
if (t == Symbol.unsubscribe) return (n) =>
|
|
546
|
+
if (t == Symbol.unsubscribe) return (n) => Te(n != null ? [e, n] : e);
|
|
746
547
|
if (typeof t == "symbol" && (t in e || c(e, t) != null)) return c(e, t);
|
|
747
|
-
},
|
|
548
|
+
}, Se = (e, t, r) => {
|
|
748
549
|
if (t == "subscribe") return r?.compatible?.[t] ?? ((n) => {
|
|
749
550
|
if (typeof n == "function") return b(e, n);
|
|
750
551
|
if ("next" in n && n?.next != null) {
|
|
751
|
-
const
|
|
752
|
-
return n.complete = (...
|
|
552
|
+
const l = b(e, n?.next), u = n?.complete;
|
|
553
|
+
return n.complete = (...s) => (l?.(), u?.(...s)), n.complete;
|
|
753
554
|
}
|
|
754
555
|
});
|
|
755
|
-
},
|
|
756
|
-
#t;
|
|
757
|
-
#e;
|
|
556
|
+
}, Rt = class {
|
|
758
557
|
#r;
|
|
558
|
+
#e;
|
|
559
|
+
#t;
|
|
759
560
|
constructor(e, t, r) {
|
|
760
|
-
this.#
|
|
561
|
+
this.#r = e, this.#e = t, this.#t = r;
|
|
761
562
|
}
|
|
762
563
|
get(e, t, r) {
|
|
763
|
-
const n =
|
|
564
|
+
const n = Y(e, t);
|
|
764
565
|
return n ?? Reflect.get(e, t, r);
|
|
765
566
|
}
|
|
766
567
|
apply(e, t, r) {
|
|
767
|
-
let n = [],
|
|
568
|
+
let n = [], l = [], u = [], s = [...this.#e], i = -1;
|
|
768
569
|
const f = Reflect.apply(e, t || this.#e, r);
|
|
769
|
-
if (this.#
|
|
770
|
-
return Array.isArray(f) ?
|
|
771
|
-
switch (this.#
|
|
570
|
+
if (this.#t?.[d])
|
|
571
|
+
return Array.isArray(f) ? xe(f) : f;
|
|
572
|
+
switch (this.#r) {
|
|
772
573
|
case "push":
|
|
773
|
-
|
|
574
|
+
i = s?.length, n = r;
|
|
774
575
|
break;
|
|
775
576
|
case "unshift":
|
|
776
|
-
|
|
577
|
+
i = 0, n = r;
|
|
777
578
|
break;
|
|
778
579
|
case "pop":
|
|
779
|
-
|
|
580
|
+
i = s?.length - 1, s.length > 0 && (l = [s[i]]);
|
|
780
581
|
break;
|
|
781
582
|
case "shift":
|
|
782
|
-
|
|
583
|
+
i = 0, s.length > 0 && (l = [s[i]]);
|
|
783
584
|
break;
|
|
784
585
|
case "splice":
|
|
785
|
-
|
|
786
|
-
for (let
|
|
787
|
-
const
|
|
788
|
-
v === void 0 &&
|
|
789
|
-
|
|
586
|
+
i = r[0];
|
|
587
|
+
for (let a = 0; a < Math.max(s.length, this.#e.length); a++) {
|
|
588
|
+
const y = s[a], v = this.#e[a];
|
|
589
|
+
v === void 0 && a >= this.#e.length ? l.push(y) : y === void 0 && a >= s.length ? u.push([
|
|
590
|
+
a,
|
|
790
591
|
v,
|
|
791
592
|
void 0,
|
|
792
593
|
!1
|
|
793
|
-
]) :
|
|
794
|
-
y,
|
|
795
|
-
v,
|
|
594
|
+
]) : O(y, v) && u.push([
|
|
796
595
|
a,
|
|
596
|
+
v,
|
|
597
|
+
y,
|
|
797
598
|
!0
|
|
798
599
|
]);
|
|
799
600
|
}
|
|
@@ -802,65 +603,64 @@ var G = (e, t) => {
|
|
|
802
603
|
case "fill":
|
|
803
604
|
case "reverse":
|
|
804
605
|
case "copyWithin":
|
|
805
|
-
|
|
806
|
-
for (let
|
|
807
|
-
|
|
808
|
-
this.#e[
|
|
809
|
-
|
|
606
|
+
i = 0;
|
|
607
|
+
for (let a = 0; a < s.length; a++) O(s[a], this.#e[a]) && u.push([
|
|
608
|
+
i + a,
|
|
609
|
+
this.#e[a],
|
|
610
|
+
s[a],
|
|
810
611
|
!0
|
|
811
612
|
]);
|
|
812
613
|
break;
|
|
813
614
|
case "set":
|
|
814
|
-
|
|
815
|
-
|
|
615
|
+
i = r[1], u.push([
|
|
616
|
+
i,
|
|
816
617
|
r[0],
|
|
817
|
-
|
|
818
|
-
|
|
618
|
+
s?.[i],
|
|
619
|
+
i in s
|
|
819
620
|
]);
|
|
820
|
-
break;
|
|
821
621
|
}
|
|
822
622
|
const o = p.get(this.#e);
|
|
823
|
-
return n?.length == 1 ? o?.trigger?.(
|
|
824
|
-
}
|
|
825
|
-
},
|
|
826
|
-
const
|
|
827
|
-
if (!e[
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
832
|
-
else if (
|
|
833
|
-
const
|
|
834
|
-
|
|
623
|
+
return n?.length == 1 ? o?.trigger?.(i, n[0], null, "add") : n?.length > 1 && (o?.trigger?.(i, n, null, "addAll"), n.forEach((a, y) => o?.trigger?.(i + y, a, null, "add"))), u?.length == 1 ? o?.trigger?.(u[0]?.[0] ?? i, u[0]?.[1], u[0]?.[2], u[0]?.[3] === !1 ? "add" : "set") : u?.length > 1 && (o?.trigger?.(i, u, s, "setAll"), u.forEach((a, y) => o?.trigger?.(a?.[0] ?? i + y, a?.[1], a?.[2], a?.[3] === !1 ? "add" : "set"))), l?.length == 1 ? o?.trigger?.(i, null, l[0], "delete") : l?.length > 1 && (o?.trigger?.(i, null, l, "deleteAll"), l.forEach((a, y) => o?.trigger?.(i + y, null, a, "delete"))), f == e ? new Proxy(f, this.#t) : Array.isArray(f) ? xe(f) : f;
|
|
624
|
+
}
|
|
625
|
+
}, It = (e, t, r, n) => {
|
|
626
|
+
const l = Number.isInteger(r) && Number.isInteger(n) && n < r ? t.slice(n, r) : [];
|
|
627
|
+
if (!e[d] && r !== n) {
|
|
628
|
+
const u = p.get(t);
|
|
629
|
+
l.length === 1 ? u?.trigger?.(n, null, l[0], "delete") : l.length > 1 && (u?.trigger?.(n, null, l, "deleteAll"), l.forEach((i, f) => u?.trigger?.(n + f, null, i, "delete")));
|
|
630
|
+
const s = Number.isInteger(r) && Number.isInteger(n) && n > r ? n - r : 0;
|
|
631
|
+
if (s === 1) u?.trigger?.(r, void 0, null, "add");
|
|
632
|
+
else if (s > 1) {
|
|
633
|
+
const i = Array(s).fill(void 0);
|
|
634
|
+
u?.trigger?.(r, i, null, "addAll"), i.forEach((f, o) => u?.trigger?.(r + o, void 0, null, "add"));
|
|
835
635
|
}
|
|
836
636
|
}
|
|
837
|
-
},
|
|
838
|
-
[
|
|
637
|
+
}, Pt = class {
|
|
638
|
+
[d];
|
|
839
639
|
constructor() {
|
|
840
640
|
}
|
|
841
641
|
has(e, t) {
|
|
842
642
|
return Reflect.has(e, t);
|
|
843
643
|
}
|
|
844
644
|
get(e, t, r) {
|
|
845
|
-
const n =
|
|
645
|
+
const n = Y(e, t);
|
|
846
646
|
if (n != null) return n;
|
|
847
647
|
if ([
|
|
848
|
-
|
|
849
|
-
|
|
648
|
+
S,
|
|
649
|
+
k,
|
|
850
650
|
"@target",
|
|
851
651
|
"deref"
|
|
852
652
|
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? c(e, t)?.bind?.(e) : c(e, t);
|
|
853
|
-
const
|
|
854
|
-
if (s != null) return s;
|
|
855
|
-
const u = we(e, t, i);
|
|
653
|
+
const l = p?.get?.(e), u = pe(e, t, l);
|
|
856
654
|
if (u != null) return u;
|
|
857
|
-
|
|
858
|
-
if (
|
|
859
|
-
|
|
655
|
+
const s = Se(e, t, l);
|
|
656
|
+
if (s != null) return s;
|
|
657
|
+
if (t == de) return ye.call(this, this);
|
|
658
|
+
if (t == z) return be(l, (f) => {
|
|
659
|
+
const o = f.key ?? f.name ?? 0, a = V(f, "value", () => c(e, o)), y = V(f, "oldValue", () => {
|
|
860
660
|
});
|
|
861
|
-
return
|
|
661
|
+
return l?.trigger?.(o, a, y, ve(f, "manual"));
|
|
862
662
|
});
|
|
863
|
-
if (t == "@target" || t ==
|
|
663
|
+
if (t == "@target" || t == S) return e;
|
|
864
664
|
if (t == "x") return () => e?.x ?? e?.[0];
|
|
865
665
|
if (t == "y") return () => e?.y ?? e?.[1];
|
|
866
666
|
if (t == "z") return () => e?.z ?? e?.[2];
|
|
@@ -869,68 +669,68 @@ var G = (e, t) => {
|
|
|
869
669
|
if (t == "g") return () => e?.g ?? e?.[1];
|
|
870
670
|
if (t == "b") return () => e?.b ?? e?.[2];
|
|
871
671
|
if (t == "a") return () => e?.a ?? e?.[3];
|
|
872
|
-
const
|
|
873
|
-
return typeof
|
|
672
|
+
const i = c(e, t) ?? (t == "value" ? c(e, h) : null);
|
|
673
|
+
return typeof i == "function" ? new Proxy(typeof i == "function" ? i?.bind?.(e) : i, new Rt(t, e, this)) : i;
|
|
874
674
|
}
|
|
875
675
|
set(e, t, r) {
|
|
876
|
-
if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t ==
|
|
877
|
-
return this[
|
|
878
|
-
if (t ==
|
|
879
|
-
return delete this[
|
|
880
|
-
const n = c(e, t),
|
|
676
|
+
if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t == d && r)
|
|
677
|
+
return this[d] = !!r, !0;
|
|
678
|
+
if (t == d && !r)
|
|
679
|
+
return delete this[d], !0;
|
|
680
|
+
const n = c(e, t), l = [
|
|
881
681
|
"x",
|
|
882
682
|
"y",
|
|
883
683
|
"z",
|
|
884
684
|
"w"
|
|
885
|
-
],
|
|
685
|
+
], u = [
|
|
886
686
|
"r",
|
|
887
687
|
"g",
|
|
888
688
|
"b",
|
|
889
689
|
"a"
|
|
890
|
-
],
|
|
690
|
+
], s = l.indexOf(t), i = u.indexOf(t);
|
|
891
691
|
let f = !1;
|
|
892
|
-
return
|
|
692
|
+
return s >= 0 ? f = Reflect.set(e, s, r) : i >= 0 ? f = Reflect.set(e, i, r) : f = Reflect.set(e, t, r), t == "length" && O(n, r) && It(this, e, n, r), !this[d] && typeof t != "symbol" && O(n, r) && p?.get?.(e)?.trigger?.(t, r, n, "set"), f;
|
|
893
693
|
}
|
|
894
694
|
deleteProperty(e, t) {
|
|
895
|
-
if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t ==
|
|
896
|
-
return delete this[
|
|
695
|
+
if (typeof t != "symbol" && Number.isInteger(parseInt(t)) && (t = parseInt(t) ?? t), t == d)
|
|
696
|
+
return delete this[d], !0;
|
|
897
697
|
const r = c(e, t), n = Reflect.deleteProperty(e, t);
|
|
898
|
-
return !this[
|
|
698
|
+
return !this[d] && t != "length" && t != d && typeof t != "symbol" && r != null && p.get(e)?.trigger?.(t, t, r, "delete"), n;
|
|
899
699
|
}
|
|
900
|
-
},
|
|
901
|
-
[
|
|
700
|
+
}, Mt = class {
|
|
701
|
+
[d];
|
|
902
702
|
constructor() {
|
|
903
703
|
}
|
|
904
704
|
get(e, t, r) {
|
|
905
705
|
if ([
|
|
906
|
-
|
|
907
|
-
|
|
706
|
+
S,
|
|
707
|
+
k,
|
|
908
708
|
"@target",
|
|
909
709
|
"deref",
|
|
910
710
|
"then",
|
|
911
711
|
"catch",
|
|
912
712
|
"finally"
|
|
913
|
-
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ?
|
|
914
|
-
const n = p.get(e) ?? p.get(c(e, "value") ?? e),
|
|
915
|
-
if (
|
|
916
|
-
c(e, t) == null && t != "value" &&
|
|
917
|
-
const
|
|
918
|
-
return
|
|
919
|
-
const
|
|
920
|
-
return n?.trigger?.(
|
|
921
|
-
}) : t == Symbol.toPrimitive ? (
|
|
922
|
-
const
|
|
923
|
-
return c(
|
|
713
|
+
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? B(e, c(e, t)) : c(e, t);
|
|
714
|
+
const n = p.get(e) ?? p.get(c(e, "value") ?? e), l = pe(e, t, n);
|
|
715
|
+
if (l != null) return l;
|
|
716
|
+
c(e, t) == null && t != "value" && P(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e);
|
|
717
|
+
const u = Se(e, t, n);
|
|
718
|
+
return u ?? (t == de ? ye.call(this, this) : t == z ? be(n, (s) => {
|
|
719
|
+
const i = Ge(e, s.key ?? s.name ?? ce(e) ?? "value"), f = V(s, "oldValue", () => i == "value" || i == ce(e) ? c(e, h) : void 0), o = V(s, "value", () => xt(e, i));
|
|
720
|
+
return n?.trigger?.(i, o, f, ve(s, "manual"));
|
|
721
|
+
}) : t == Symbol.toPrimitive ? (s) => {
|
|
722
|
+
const i = D(e, t);
|
|
723
|
+
return c(i, t) ? c(i, t)?.(s) : g(i) ? E(i, s) : g(c(i, "value")) ? E(c(i, "value"), s) : E(c(i, "value") ?? i, s);
|
|
924
724
|
} : t == Symbol.toStringTag ? () => {
|
|
925
|
-
const
|
|
926
|
-
return c(
|
|
725
|
+
const s = D(e, t);
|
|
726
|
+
return c(s, t) ? c(s, t)?.() : g(s) ? String(s ?? "") || "" : g(c(s, "value")) ? String(c(s, "value") ?? "") || "" : String(c(s, "value") ?? s ?? "") || "";
|
|
927
727
|
} : t == "toString" ? () => {
|
|
928
|
-
const
|
|
929
|
-
return c(
|
|
728
|
+
const s = D(e, t);
|
|
729
|
+
return c(s, t) ? c(s, t)?.() : c(s, Symbol.toStringTag) ? c(s, Symbol.toStringTag)?.() : g(s) ? String(s ?? "") || "" : g(c(s, "value")) ? String(c(s, "value") ?? "") || "" : String(c(s, "value") ?? s ?? "") || "";
|
|
930
730
|
} : t == "valueOf" ? () => {
|
|
931
|
-
const
|
|
932
|
-
return c(
|
|
933
|
-
} : typeof t == "symbol" && (t in e || c(e, t) != null) ? c(e, t) :
|
|
731
|
+
const s = D(e, t);
|
|
732
|
+
return c(s, t) ? c(s, t)?.() : c(s, Symbol.toPrimitive) ? c(s, Symbol.toPrimitive)?.() : g(s) ? s : g(c(s, "value")) ? c(s, "value") : c(s, "value") ?? s;
|
|
733
|
+
} : typeof t == "symbol" && (t in e || c(e, t) != null) ? c(e, t) : D(e, t));
|
|
934
734
|
}
|
|
935
735
|
apply(e, t, r) {
|
|
936
736
|
return Reflect.apply(e, t, r);
|
|
@@ -947,11 +747,11 @@ var G = (e, t) => {
|
|
|
947
747
|
getOwnPropertyDescriptor(e, t) {
|
|
948
748
|
let r;
|
|
949
749
|
try {
|
|
950
|
-
|
|
750
|
+
T?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), T?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
|
|
951
751
|
} catch {
|
|
952
752
|
r = void 0;
|
|
953
753
|
} finally {
|
|
954
|
-
|
|
754
|
+
T?.get?.(e)?.delete?.(t);
|
|
955
755
|
}
|
|
956
756
|
return r;
|
|
957
757
|
}
|
|
@@ -959,85 +759,85 @@ var G = (e, t) => {
|
|
|
959
759
|
return t in e;
|
|
960
760
|
}
|
|
961
761
|
set(e, t, r) {
|
|
962
|
-
const n =
|
|
963
|
-
return n ??
|
|
964
|
-
const
|
|
965
|
-
if (
|
|
966
|
-
if (t ==
|
|
967
|
-
return this[
|
|
968
|
-
if (t ==
|
|
969
|
-
return delete this[
|
|
970
|
-
const
|
|
971
|
-
if (c(e, t) == null && t != "value" &&
|
|
972
|
-
const
|
|
973
|
-
e[t] =
|
|
974
|
-
const o = c(e, t) ??
|
|
975
|
-
return !this[
|
|
762
|
+
const n = Y(e, t);
|
|
763
|
+
return n ?? st(r, (l) => {
|
|
764
|
+
const u = Y(l, t);
|
|
765
|
+
if (u != null) return u;
|
|
766
|
+
if (t == d && r)
|
|
767
|
+
return this[d] = !!r, !0;
|
|
768
|
+
if (t == d && !r)
|
|
769
|
+
return delete this[d], !0;
|
|
770
|
+
const s = e;
|
|
771
|
+
if (c(e, t) == null && t != "value" && P(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e), typeof t == "symbol" && !(c(e, t) != null && t in e)) return;
|
|
772
|
+
const i = Ge(e, t), f = t == "value" ? c(e, h) ?? c(e, t) : c(e, t);
|
|
773
|
+
e[t] = l;
|
|
774
|
+
const o = c(e, t) ?? l;
|
|
775
|
+
return !this[d] && typeof t != "symbol" && (c(e, ot) ?? O)?.(f, o) && (p.get(e) ?? p.get(s))?.trigger?.(i, l, f), !0;
|
|
976
776
|
});
|
|
977
777
|
}
|
|
978
778
|
defineProperty(e, t, r) {
|
|
979
|
-
const n =
|
|
779
|
+
const n = Y(e, t);
|
|
980
780
|
if (n != null) return n;
|
|
981
|
-
if (t ==
|
|
982
|
-
return this[
|
|
983
|
-
if (t ==
|
|
984
|
-
return delete this[
|
|
985
|
-
if (c(e, t) == null && t != "value" &&
|
|
986
|
-
const
|
|
781
|
+
if (t == d && r.value)
|
|
782
|
+
return this[d] = !!r.value, !0;
|
|
783
|
+
if (t == d && !r.value)
|
|
784
|
+
return delete this[d], !0;
|
|
785
|
+
if (c(e, t) == null && t != "value" && P(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e), r.get == null && r.set == null) return Reflect.defineProperty(e, t, r);
|
|
786
|
+
const l = c(e, t), u = Reflect.defineProperty(e, t, {
|
|
987
787
|
get: r.get,
|
|
988
788
|
set: r.set,
|
|
989
789
|
enumerable: r.enumerable ?? !0,
|
|
990
790
|
configurable: r.configurable ?? !0
|
|
991
791
|
});
|
|
992
|
-
return
|
|
792
|
+
return Tt(e, t, l), u;
|
|
993
793
|
}
|
|
994
794
|
deleteProperty(e, t) {
|
|
995
|
-
if (t ==
|
|
996
|
-
return delete this[
|
|
997
|
-
c(e, t) == null && t != "value" &&
|
|
795
|
+
if (t == d)
|
|
796
|
+
return delete this[d], !0;
|
|
797
|
+
c(e, t) == null && t != "value" && P(e) && c(e, "value") != null && (typeof c(e, "value") == "object" || typeof c(e, "value") == "function") && c(c(e, "value"), t) != null && (e = c(e, "value") ?? e);
|
|
998
798
|
const r = c(e, t), n = Reflect.deleteProperty(e, t);
|
|
999
|
-
return !this[
|
|
799
|
+
return !this[d] && t != d && typeof t != "symbol" && p.get(e)?.trigger?.(t, null, r, "delete"), n;
|
|
1000
800
|
}
|
|
1001
|
-
},
|
|
1002
|
-
[
|
|
801
|
+
}, Et = class {
|
|
802
|
+
[d];
|
|
1003
803
|
constructor() {
|
|
1004
804
|
}
|
|
1005
805
|
get(e, t, r) {
|
|
1006
806
|
if ([
|
|
1007
|
-
|
|
1008
|
-
|
|
807
|
+
S,
|
|
808
|
+
k,
|
|
1009
809
|
"@target",
|
|
1010
810
|
"deref"
|
|
1011
|
-
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ?
|
|
1012
|
-
const n = p.get(e),
|
|
1013
|
-
if (
|
|
1014
|
-
const
|
|
1015
|
-
if (
|
|
1016
|
-
e = c(e,
|
|
1017
|
-
const
|
|
1018
|
-
return typeof t == "symbol" && (t in e || c(e, t) != null) ?
|
|
1019
|
-
const f =
|
|
811
|
+
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? B(e, c(e, t)) : c(e, t);
|
|
812
|
+
const n = p.get(e), l = pe(e, t, n);
|
|
813
|
+
if (l != null) return l;
|
|
814
|
+
const u = Se(e, t, n);
|
|
815
|
+
if (u != null) return u;
|
|
816
|
+
e = c(e, S) ?? c(e, k) ?? e;
|
|
817
|
+
const s = B(e, c(e, t));
|
|
818
|
+
return typeof t == "symbol" && (t in e || c(e, t) != null) ? s : t == de ? ye.call(this, this) : t == z ? be(n, (i) => {
|
|
819
|
+
const f = i.key ?? i.name;
|
|
1020
820
|
if (f == null) return;
|
|
1021
|
-
const o =
|
|
1022
|
-
if (o == null && !
|
|
1023
|
-
const
|
|
821
|
+
const o = V(i, "value", () => e.get(f));
|
|
822
|
+
if (o == null && !M(i, "value")) return;
|
|
823
|
+
const a = V(i, "oldValue", () => {
|
|
1024
824
|
});
|
|
1025
|
-
return n?.trigger?.(f, o,
|
|
825
|
+
return n?.trigger?.(f, o, a, ve(i, "manual"));
|
|
1026
826
|
}) : t == "clear" ? () => {
|
|
1027
|
-
const
|
|
1028
|
-
return
|
|
1029
|
-
this[
|
|
827
|
+
const i = Array.from(e?.entries?.() || []), f = s();
|
|
828
|
+
return i.forEach(([o, a]) => {
|
|
829
|
+
this[d] || p.get(e)?.trigger?.(o, null, a, "delete");
|
|
1030
830
|
}), f;
|
|
1031
|
-
} : t == "delete" ? (
|
|
1032
|
-
const o = e.has(
|
|
1033
|
-
return !this[
|
|
1034
|
-
} : t == "set" ? (
|
|
1035
|
-
const
|
|
1036
|
-
return (!
|
|
1037
|
-
}) :
|
|
831
|
+
} : t == "delete" ? (i, f = null) => {
|
|
832
|
+
const o = e.has(i), a = e.get(i), y = s(i);
|
|
833
|
+
return !this[d] && o && p.get(e)?.trigger?.(i, null, a, "delete"), y;
|
|
834
|
+
} : t == "set" ? (i, f) => ut(f, (o) => {
|
|
835
|
+
const a = e.has(i), y = e.get(i), v = s(i, o);
|
|
836
|
+
return (!a || O(y, o)) && (this[d] || p.get(e)?.trigger?.(i, o, a ? y : null, a ? "set" : "add")), v;
|
|
837
|
+
}) : s;
|
|
1038
838
|
}
|
|
1039
839
|
set(e, t, r) {
|
|
1040
|
-
return t ==
|
|
840
|
+
return t == d ? (this[d] = !!r, !0) : t == d && !r ? (delete this[d], !0) : Reflect.set(e, t, r);
|
|
1041
841
|
}
|
|
1042
842
|
has(e, t) {
|
|
1043
843
|
return Reflect.has(e, t);
|
|
@@ -1057,55 +857,55 @@ var G = (e, t) => {
|
|
|
1057
857
|
getOwnPropertyDescriptor(e, t) {
|
|
1058
858
|
let r;
|
|
1059
859
|
try {
|
|
1060
|
-
|
|
860
|
+
T?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), T?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
|
|
1061
861
|
} catch {
|
|
1062
862
|
r = void 0;
|
|
1063
863
|
} finally {
|
|
1064
|
-
|
|
864
|
+
T?.get?.(e)?.delete?.(t);
|
|
1065
865
|
}
|
|
1066
866
|
return r;
|
|
1067
867
|
}
|
|
1068
868
|
deleteProperty(e, t) {
|
|
1069
|
-
return t ==
|
|
869
|
+
return t == d ? (delete this[d], !0) : Reflect.deleteProperty(e, t);
|
|
1070
870
|
}
|
|
1071
|
-
},
|
|
1072
|
-
[
|
|
871
|
+
}, kt = class {
|
|
872
|
+
[d] = !1;
|
|
1073
873
|
constructor() {
|
|
1074
874
|
}
|
|
1075
875
|
get(e, t, r) {
|
|
1076
876
|
if ([
|
|
1077
|
-
|
|
1078
|
-
|
|
877
|
+
S,
|
|
878
|
+
k,
|
|
1079
879
|
"@target",
|
|
1080
880
|
"deref"
|
|
1081
|
-
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ?
|
|
1082
|
-
const n = p.get(e),
|
|
1083
|
-
if (
|
|
1084
|
-
const
|
|
1085
|
-
if (
|
|
1086
|
-
e = c(e,
|
|
1087
|
-
const
|
|
1088
|
-
return typeof t == "symbol" && (t in e || c(e, t) != null) ?
|
|
1089
|
-
const f =
|
|
881
|
+
].indexOf(t) >= 0 && c(e, t) != null && c(e, t) != e) return typeof c(e, t) == "function" ? B(e, c(e, t)) : c(e, t);
|
|
882
|
+
const n = p.get(e), l = pe(e, t, n);
|
|
883
|
+
if (l != null) return l;
|
|
884
|
+
const u = Se(e, t, n);
|
|
885
|
+
if (u != null) return u;
|
|
886
|
+
e = c(e, S) ?? c(e, k) ?? e;
|
|
887
|
+
const s = B(e, c(e, t));
|
|
888
|
+
return typeof t == "symbol" && (t in e || c(e, t) != null) ? s : t == de ? ye.call(this, this) : t == z ? be(n, (i) => {
|
|
889
|
+
const f = i.key ?? i.name;
|
|
1090
890
|
if (f == null) return;
|
|
1091
|
-
const o =
|
|
891
|
+
const o = V(i, "value", () => e.has(f)), a = V(i, "oldValue", () => {
|
|
1092
892
|
});
|
|
1093
|
-
return n?.trigger?.(f, o,
|
|
893
|
+
return n?.trigger?.(f, o, a, ve(i, "manual"));
|
|
1094
894
|
}) : t == "clear" ? () => {
|
|
1095
|
-
const
|
|
1096
|
-
return
|
|
1097
|
-
this[
|
|
895
|
+
const i = Array.from(e?.values?.() || []), f = s();
|
|
896
|
+
return i.forEach((o) => {
|
|
897
|
+
this[d] || p.get(e)?.trigger?.(null, null, o, "delete");
|
|
1098
898
|
}), f;
|
|
1099
|
-
} : t == "delete" ? (
|
|
1100
|
-
const f = e.has(
|
|
1101
|
-
return !this[
|
|
1102
|
-
} : t == "add" ? (
|
|
1103
|
-
const f = e.has(
|
|
1104
|
-
return f || this[
|
|
1105
|
-
} :
|
|
899
|
+
} : t == "delete" ? (i) => {
|
|
900
|
+
const f = e.has(i), o = f ? i : null, a = s(i);
|
|
901
|
+
return !this[d] && f && p.get(e)?.trigger?.(i, null, o, "delete"), a;
|
|
902
|
+
} : t == "add" ? (i) => {
|
|
903
|
+
const f = e.has(i), o = f ? i : null, a = s(i);
|
|
904
|
+
return f || this[d] || p.get(e)?.trigger?.(i, i, o, "add"), a;
|
|
905
|
+
} : s;
|
|
1106
906
|
}
|
|
1107
907
|
set(e, t, r) {
|
|
1108
|
-
return t ==
|
|
908
|
+
return t == d && r ? (this[d] = !!r, !0) : t == d && !r ? (delete this[d], !0) : Reflect.set(e, t, r);
|
|
1109
909
|
}
|
|
1110
910
|
has(e, t) {
|
|
1111
911
|
return Reflect.has(e, t);
|
|
@@ -1125,100 +925,100 @@ var G = (e, t) => {
|
|
|
1125
925
|
getOwnPropertyDescriptor(e, t) {
|
|
1126
926
|
let r;
|
|
1127
927
|
try {
|
|
1128
|
-
|
|
928
|
+
T?.getOrInsert?.(e, /* @__PURE__ */ new Set())?.add?.(t), T?.get?.(e)?.has?.(t) && (r = void 0), r = Reflect.getOwnPropertyDescriptor(e, t);
|
|
1129
929
|
} catch {
|
|
1130
930
|
r = void 0;
|
|
1131
931
|
} finally {
|
|
1132
|
-
|
|
932
|
+
T?.get?.(e)?.delete?.(t);
|
|
1133
933
|
}
|
|
1134
934
|
return r;
|
|
1135
935
|
}
|
|
1136
936
|
deleteProperty(e, t) {
|
|
1137
|
-
return t ==
|
|
937
|
+
return t == d ? (delete this[d], !0) : Reflect.deleteProperty(e, t);
|
|
1138
938
|
}
|
|
1139
|
-
},
|
|
1140
|
-
const r = e instanceof Promise || typeof e?.then == "function", n =
|
|
1141
|
-
[
|
|
1142
|
-
[
|
|
1143
|
-
[
|
|
939
|
+
}, U = (e) => !!((typeof e == "object" || typeof e == "function") && e != null && (e?.[S] || e?.[te])), xe = (e) => U(e) ? e : le(e, new Pt()), $t = (e) => U(e) ? e : le(e, new Mt()), _t = (e) => U(e) ? e : le(e, new Et()), Wt = (e) => U(e) ? e : le(e, new kt()), Vt = (e, t) => {
|
|
940
|
+
const r = e instanceof Promise || typeof e?.then == "function", n = x({
|
|
941
|
+
[ne]: r ? e : null,
|
|
942
|
+
[h]: r ? 0 : Number($(e) || 0) || 0,
|
|
943
|
+
[G]: t,
|
|
1144
944
|
[Symbol?.toStringTag]() {
|
|
1145
|
-
return String(this?.[
|
|
945
|
+
return String(this?.[h] ?? "") || "";
|
|
1146
946
|
},
|
|
1147
|
-
[Symbol?.toPrimitive](
|
|
1148
|
-
return E((typeof this?.[
|
|
947
|
+
[Symbol?.toPrimitive](l) {
|
|
948
|
+
return E((typeof this?.[h] != "object" ? this?.[h] : this?.[h]?.value || 0) ?? 0, l);
|
|
1149
949
|
},
|
|
1150
|
-
set value(
|
|
1151
|
-
this[
|
|
950
|
+
set value(l) {
|
|
951
|
+
this[h] = (l != null && !Number.isNaN(l) ? Number(l) : this[h]) || 0;
|
|
1152
952
|
},
|
|
1153
953
|
get value() {
|
|
1154
|
-
return Number(this[
|
|
954
|
+
return Number(this[h] || 0) || 0;
|
|
1155
955
|
}
|
|
1156
956
|
});
|
|
1157
|
-
return e?.then?.((
|
|
1158
|
-
},
|
|
1159
|
-
const r = e instanceof Promise || typeof e?.then == "function", n =
|
|
1160
|
-
[
|
|
1161
|
-
[
|
|
1162
|
-
[
|
|
957
|
+
return e?.then?.((l) => n.value = l), n;
|
|
958
|
+
}, zt = (e, t) => {
|
|
959
|
+
const r = e instanceof Promise || typeof e?.then == "function", n = x({
|
|
960
|
+
[ne]: r ? e : null,
|
|
961
|
+
[h]: (r ? "" : String($(typeof e == "number" ? String(e) : e || ""))) ?? "",
|
|
962
|
+
[G]: t,
|
|
1163
963
|
[Symbol?.toStringTag]() {
|
|
1164
|
-
return String(this?.[
|
|
964
|
+
return String(this?.[h] ?? "") ?? "";
|
|
1165
965
|
},
|
|
1166
|
-
[Symbol?.toPrimitive](
|
|
1167
|
-
return E(this?.[
|
|
966
|
+
[Symbol?.toPrimitive](l) {
|
|
967
|
+
return E(this?.[h] ?? "", l);
|
|
1168
968
|
},
|
|
1169
|
-
set value(
|
|
1170
|
-
this[
|
|
969
|
+
set value(l) {
|
|
970
|
+
this[h] = String(typeof l == "number" ? String(l) : l || "") ?? "";
|
|
1171
971
|
},
|
|
1172
972
|
get value() {
|
|
1173
|
-
return String(this[
|
|
973
|
+
return String(this[h] ?? "") ?? "";
|
|
1174
974
|
}
|
|
1175
975
|
});
|
|
1176
|
-
return e?.then?.((
|
|
1177
|
-
},
|
|
1178
|
-
const r = e instanceof Promise || typeof e?.then == "function", n =
|
|
1179
|
-
[
|
|
1180
|
-
[
|
|
1181
|
-
[
|
|
976
|
+
return e?.then?.((l) => n.value = l), n;
|
|
977
|
+
}, Ct = (e, t) => {
|
|
978
|
+
const r = e instanceof Promise || typeof e?.then == "function", n = x({
|
|
979
|
+
[ne]: r ? e : null,
|
|
980
|
+
[h]: (r ? !1 : ($(e) != null ? typeof $(e) == "string" ? !0 : !!$(e) : !1) || !1) || !1,
|
|
981
|
+
[G]: t,
|
|
1182
982
|
[Symbol?.toStringTag]() {
|
|
1183
|
-
return String(this?.[
|
|
983
|
+
return String(this?.[h] ?? "") || "";
|
|
1184
984
|
},
|
|
1185
|
-
[Symbol?.toPrimitive](
|
|
1186
|
-
return E(!!this?.[
|
|
985
|
+
[Symbol?.toPrimitive](l) {
|
|
986
|
+
return E(!!this?.[h] || !1, l);
|
|
1187
987
|
},
|
|
1188
|
-
set value(
|
|
1189
|
-
this[
|
|
988
|
+
set value(l) {
|
|
989
|
+
this[h] = (l != null ? typeof l == "string" ? !0 : !!l : this[h]) || !1;
|
|
1190
990
|
},
|
|
1191
991
|
get value() {
|
|
1192
|
-
return this[
|
|
992
|
+
return this[h] || !1;
|
|
1193
993
|
}
|
|
1194
994
|
});
|
|
1195
|
-
return e?.then?.((
|
|
1196
|
-
},
|
|
1197
|
-
const r = e instanceof Promise || typeof e?.then == "function", n =
|
|
1198
|
-
[
|
|
1199
|
-
[
|
|
995
|
+
return e?.then?.((l) => n.value = l), n;
|
|
996
|
+
}, Ke = (e, t) => {
|
|
997
|
+
const r = e instanceof Promise || typeof e?.then == "function", n = x({
|
|
998
|
+
[ne]: r ? e : null,
|
|
999
|
+
[G]: t,
|
|
1200
1000
|
[Symbol?.toStringTag]() {
|
|
1201
1001
|
return String(this.value ?? "") || "";
|
|
1202
1002
|
},
|
|
1203
|
-
[Symbol?.toPrimitive](
|
|
1204
|
-
return E(this.value,
|
|
1003
|
+
[Symbol?.toPrimitive](l) {
|
|
1004
|
+
return E(this.value, l);
|
|
1205
1005
|
},
|
|
1206
|
-
value: r ? null :
|
|
1006
|
+
value: r ? null : $(e)
|
|
1207
1007
|
});
|
|
1208
|
-
return e?.then?.((
|
|
1209
|
-
n?.[
|
|
1008
|
+
return e?.then?.((l) => n.value = l), b(e, (l) => {
|
|
1009
|
+
n?.[z]?.();
|
|
1210
1010
|
}), n;
|
|
1211
|
-
},
|
|
1011
|
+
}, we = (e, t) => {
|
|
1212
1012
|
if (e == null || typeof e != "object" && typeof e != "function") return e;
|
|
1213
1013
|
try {
|
|
1214
|
-
Object.defineProperty(e,
|
|
1014
|
+
Object.defineProperty(e, fe, {
|
|
1215
1015
|
value: t,
|
|
1216
1016
|
writable: !0,
|
|
1217
1017
|
configurable: !0
|
|
1218
1018
|
});
|
|
1219
1019
|
} catch {
|
|
1220
1020
|
try {
|
|
1221
|
-
e[
|
|
1021
|
+
e[fe] = t;
|
|
1222
1022
|
} catch {
|
|
1223
1023
|
}
|
|
1224
1024
|
}
|
|
@@ -1235,149 +1035,149 @@ var G = (e, t) => {
|
|
|
1235
1035
|
}
|
|
1236
1036
|
}
|
|
1237
1037
|
return e;
|
|
1238
|
-
},
|
|
1239
|
-
if (
|
|
1240
|
-
Array.isArray(e) && e.length == 2 && e[0] != null && (e[0] instanceof Map || e[0] instanceof WeakMap || e[0] instanceof Set || e[0] instanceof WeakSet) ? ((t == null || t === "value") && (t = e[1]), e = e[0]) : Array.isArray(e) && !
|
|
1241
|
-
const
|
|
1242
|
-
if (
|
|
1038
|
+
}, Nt = (e, t = "value", r, n) => {
|
|
1039
|
+
if (g(e) || !e) return e;
|
|
1040
|
+
Array.isArray(e) && e.length == 2 && e[0] != null && (e[0] instanceof Map || e[0] instanceof WeakMap || e[0] instanceof Set || e[0] instanceof WeakSet) ? ((t == null || t === "value") && (t = e[1]), e = e[0]) : Array.isArray(e) && !j(e?.[1], e) && (Array.isArray(e?.[0]) || typeof e?.[0] == "object" || typeof e?.[0] == "function") && (e = e?.[0]);
|
|
1041
|
+
const l = e instanceof Map || e instanceof WeakMap, u = e instanceof Set || e instanceof WeakSet;
|
|
1042
|
+
if (l || u) {
|
|
1243
1043
|
if (t == null) return;
|
|
1244
|
-
} else if ((t ??= Array.isArray(e) ? null : "value") == null ||
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
const f =
|
|
1248
|
-
if (!
|
|
1249
|
-
if (!
|
|
1250
|
-
!
|
|
1251
|
-
const o =
|
|
1252
|
-
[
|
|
1253
|
-
[
|
|
1044
|
+
} else if ((t ??= Array.isArray(e) ? null : "value") == null || j(t, e)) return;
|
|
1045
|
+
const s = () => l ? e.get(t) : u ? e.has(t) : e?.[t], i = (y) => l ? (e.set(t, y), y) : u ? (y ? e.add(t) : e.delete(t), e.has(t)) : e[t] = y;
|
|
1046
|
+
l && r !== void 0 && !e.has(t) ? e.set(t, r) : u && r && !e.has(t) && e.add(t);
|
|
1047
|
+
const f = s();
|
|
1048
|
+
if (!u && t != null && P(f) && _(f)) return we(Gt(f), t);
|
|
1049
|
+
if (!l && !u && t && typeof e?.getProperty == "function" && _(e?.getProperty?.(t))) return we(e?.getProperty?.(t), t);
|
|
1050
|
+
!l && !u && (e[t] ??= r ?? e[t]);
|
|
1051
|
+
const o = x({
|
|
1052
|
+
[h]: u ? !!s() : s() ?? r,
|
|
1053
|
+
[G]: n,
|
|
1254
1054
|
[Symbol?.toStringTag]() {
|
|
1255
|
-
return String(
|
|
1055
|
+
return String(s() ?? this[h] ?? "") || "";
|
|
1256
1056
|
},
|
|
1257
|
-
[Symbol?.toPrimitive](
|
|
1258
|
-
return E(
|
|
1057
|
+
[Symbol?.toPrimitive](y) {
|
|
1058
|
+
return E(s(), y);
|
|
1259
1059
|
},
|
|
1260
|
-
set value(
|
|
1261
|
-
if (o[
|
|
1060
|
+
set value(y) {
|
|
1061
|
+
if (o[Ve] = !0, u) this[h] = i(y);
|
|
1262
1062
|
else {
|
|
1263
|
-
const v =
|
|
1264
|
-
this[
|
|
1063
|
+
const v = y ?? lt(s());
|
|
1064
|
+
this[h] = i(v);
|
|
1265
1065
|
}
|
|
1266
|
-
o[
|
|
1066
|
+
o[Ve] = !1;
|
|
1267
1067
|
},
|
|
1268
1068
|
get value() {
|
|
1269
|
-
const
|
|
1270
|
-
return this[
|
|
1069
|
+
const y = s();
|
|
1070
|
+
return this[h] = u ? !!y : y ?? this[h];
|
|
1271
1071
|
}
|
|
1272
1072
|
});
|
|
1273
|
-
|
|
1274
|
-
const
|
|
1073
|
+
we(o, t);
|
|
1074
|
+
const a = b(e, (y, v, m, A) => {
|
|
1275
1075
|
if (v === t) {
|
|
1276
|
-
const
|
|
1277
|
-
o?.[
|
|
1076
|
+
const w = u ? y != null : y, I = u ? m != null : m;
|
|
1077
|
+
o?.[z]?.({
|
|
1278
1078
|
key: t,
|
|
1279
|
-
value:
|
|
1280
|
-
oldValue:
|
|
1281
|
-
trigger:
|
|
1079
|
+
value: w,
|
|
1080
|
+
oldValue: I,
|
|
1081
|
+
trigger: A
|
|
1282
1082
|
});
|
|
1283
1083
|
}
|
|
1284
1084
|
});
|
|
1285
|
-
return
|
|
1286
|
-
},
|
|
1085
|
+
return R(o, Symbol.dispose, a), o;
|
|
1086
|
+
}, Dt = (e, t) => {
|
|
1287
1087
|
switch (typeof e) {
|
|
1288
1088
|
case "boolean":
|
|
1289
|
-
return
|
|
1089
|
+
return Ct(e, t);
|
|
1290
1090
|
case "number":
|
|
1291
|
-
return
|
|
1091
|
+
return Vt(e, t);
|
|
1292
1092
|
case "string":
|
|
1293
|
-
return
|
|
1093
|
+
return zt(e, t);
|
|
1294
1094
|
case "object":
|
|
1295
|
-
if (e != null) return
|
|
1095
|
+
if (e != null) return Ke(x(e), t);
|
|
1296
1096
|
default:
|
|
1297
|
-
return
|
|
1097
|
+
return Ke(e, t);
|
|
1298
1098
|
}
|
|
1299
|
-
},
|
|
1300
|
-
const n =
|
|
1301
|
-
return t != null ?
|
|
1302
|
-
},
|
|
1099
|
+
}, Bt = (e, t = "value", r) => {
|
|
1100
|
+
const n = _(e) ? e : Dt(e, r);
|
|
1101
|
+
return t != null ? Nt(n, t, r) : n;
|
|
1102
|
+
}, or = (e, t) => Bt(e, t), Pe = (e, t, r = 100) => {
|
|
1303
1103
|
if (e?.value ?? e) return setTimeout(() => {
|
|
1304
1104
|
e.value && t?.();
|
|
1305
1105
|
}, r);
|
|
1306
|
-
},
|
|
1307
|
-
let
|
|
1106
|
+
}, cr = (e = 100) => (t, [r], [n]) => {
|
|
1107
|
+
let l = Pe(r, t, e);
|
|
1308
1108
|
n?.addEventListener?.("abort", () => {
|
|
1309
|
-
|
|
1109
|
+
l && clearTimeout(l);
|
|
1310
1110
|
}, { once: !0 });
|
|
1311
|
-
},
|
|
1312
|
-
let
|
|
1111
|
+
}, ar = (e = 100) => (t, [r], [n]) => {
|
|
1112
|
+
let l = Pe(r, t, e);
|
|
1313
1113
|
n?.addEventListener?.("abort", () => {
|
|
1314
|
-
|
|
1315
|
-
}, { once: !0 }),
|
|
1114
|
+
l && clearTimeout(l);
|
|
1115
|
+
}, { once: !0 }), l || t?.();
|
|
1316
1116
|
};
|
|
1317
|
-
function
|
|
1318
|
-
if (e == null || typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") ||
|
|
1117
|
+
function x(e, t) {
|
|
1118
|
+
if (e == null || typeof e == "symbol" || !(typeof e == "object" || typeof e == "function") || U(e) || (e = $?.(e)) == null || e instanceof Promise || e instanceof WeakRef || U(e)) return e;
|
|
1319
1119
|
const r = e;
|
|
1320
1120
|
if (r == null || typeof r == "symbol" || !(typeof r == "object" || typeof r == "function") || r instanceof Promise || r instanceof WeakRef) return r;
|
|
1321
1121
|
let n = r;
|
|
1322
|
-
return Array.isArray(r) ? (n =
|
|
1122
|
+
return Array.isArray(r) ? (n = xe(r), n) : r instanceof Map ? (n = _t(r), n) : r instanceof Set ? (n = Wt(r), n) : ((typeof r == "function" || typeof r == "object") && (n = $t(r)), n);
|
|
1323
1123
|
}
|
|
1324
|
-
var
|
|
1124
|
+
var _ = (e) => typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ? !0 : !!((typeof e == "object" || typeof e == "function") && e != null && (e?.[S] || e?.[te] || p?.has?.(e))), Gt = (e) => _(e) ? x(e) : null, yr = (e) => {
|
|
1325
1125
|
if (e == null || typeof e != "object" && typeof e != "function" || e?.[Symbol.observable] != null) return e;
|
|
1326
1126
|
try {
|
|
1327
1127
|
e[Symbol.observable] = self?.compatible;
|
|
1328
1128
|
} catch {
|
|
1329
1129
|
console.warn("Unable to assign <[Symbol.observable]>, object will not observable by other frameworks");
|
|
1330
1130
|
}
|
|
1331
|
-
return e[
|
|
1332
|
-
const
|
|
1333
|
-
return
|
|
1131
|
+
return e[te] = (t, r, n) => {
|
|
1132
|
+
const l = e?.[Symbol?.observable];
|
|
1133
|
+
return l?.()?.affected?.(t, r, n), () => l?.()?.unaffected?.(t, r);
|
|
1334
1134
|
}, e;
|
|
1335
|
-
},
|
|
1135
|
+
}, Kt = /* @__PURE__ */ Symbol.for("object.ts@specializedSubscribe"), H = globalThis[Kt] ??= /* @__PURE__ */ new WeakMap(), Me = (e) => {
|
|
1336
1136
|
if (!(typeof e == "symbol" || e == null || !(typeof e == "object" || typeof e == "function")))
|
|
1337
1137
|
return e;
|
|
1338
|
-
},
|
|
1339
|
-
const t = e?.[
|
|
1340
|
-
return
|
|
1341
|
-
},
|
|
1342
|
-
const r =
|
|
1138
|
+
}, ae = "initial", Ee = (e) => {
|
|
1139
|
+
const t = e?.[fe] ?? e?.realProp;
|
|
1140
|
+
return W(t) ? t : null;
|
|
1141
|
+
}, ke = (e, t) => {
|
|
1142
|
+
const r = Ee(e);
|
|
1343
1143
|
return r != null && (t == null || t == "value") ? r : t;
|
|
1344
|
-
},
|
|
1345
|
-
if (t != null && t ==
|
|
1346
|
-
const
|
|
1347
|
-
if (
|
|
1348
|
-
}
|
|
1349
|
-
return
|
|
1350
|
-
},
|
|
1351
|
-
const n =
|
|
1352
|
-
if (r ==
|
|
1144
|
+
}, Ht = (e, t) => t != null && t == Ee(e) ? e?.value : e?.[t], Re = (e, t, r, n) => {
|
|
1145
|
+
if (t != null && t == Ee(e)) {
|
|
1146
|
+
const l = Ht(e, t);
|
|
1147
|
+
if (l != null) return r?.(l, t, null, "set");
|
|
1148
|
+
}
|
|
1149
|
+
return nt(e, t, r, n);
|
|
1150
|
+
}, tt = (e, t, r) => {
|
|
1151
|
+
const n = he(t);
|
|
1152
|
+
if (r == ae) {
|
|
1353
1153
|
if (!n.triggerImmediately) return;
|
|
1354
|
-
} else if (!
|
|
1355
|
-
return (
|
|
1356
|
-
},
|
|
1357
|
-
if (!e || !
|
|
1358
|
-
const
|
|
1359
|
-
let
|
|
1360
|
-
e = e?.[
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1154
|
+
} else if (!F(n.affectTypes, r)) return;
|
|
1155
|
+
return (l, u, s, ...i) => e?.(l, u, s, r, ...i);
|
|
1156
|
+
}, Ft = (e, t, r, n = ["*"]) => {
|
|
1157
|
+
if (!e || !Me(e)) return;
|
|
1158
|
+
const l = t != Symbol.iterator ? ke(e, t) : null;
|
|
1159
|
+
let u = e?.[ee] ?? p.get(e);
|
|
1160
|
+
e = e?.[S] ?? e, queueMicrotask(() => {
|
|
1161
|
+
const i = tt(r, n, ae);
|
|
1162
|
+
i && (l != null && l != Symbol.iterator ? Re(e, l, i, null) : Fe(e, i, null));
|
|
1363
1163
|
});
|
|
1364
|
-
let
|
|
1365
|
-
return e?.[Symbol.dispose] || (
|
|
1366
|
-
},
|
|
1367
|
-
const
|
|
1368
|
-
let
|
|
1369
|
-
const
|
|
1164
|
+
let s = u?.affected?.(r, l, n);
|
|
1165
|
+
return e?.[Symbol.dispose] || (R(s, Symbol.dispose, s), R(s, Symbol.asyncDispose, s), R(e, Symbol.dispose, s), R(e, Symbol.asyncDispose, s)), s;
|
|
1166
|
+
}, qt = (e, t, r, n = ["*"]) => {
|
|
1167
|
+
const l = he(n).affectTypes, u = {};
|
|
1168
|
+
let s = e?.value;
|
|
1169
|
+
const i = (f) => {
|
|
1370
1170
|
const o = f?.target?.value;
|
|
1371
|
-
|
|
1171
|
+
F(l, "set") && r?.(o, "value", s, "set", f), s = o;
|
|
1372
1172
|
};
|
|
1373
|
-
return e?.addEventListener?.("change",
|
|
1374
|
-
},
|
|
1375
|
-
if (
|
|
1173
|
+
return e?.addEventListener?.("change", i, u), () => e?.removeEventListener?.("change", i, u);
|
|
1174
|
+
}, Z = (e) => Array.isArray(e) && e?.length == 2 && Me(e?.[0]) && (W(e?.[1]) || e?.[1] == Symbol.iterator), Ut = (e) => !!e && typeof e == "object" && !Array.isArray(e) && ("affectTypes" in e || "triggers" in e || "triggerImmediately" in e), Lt = (e) => e == null ? [] : Array.isArray(e) && !Z(e) && !_(e) ? e : [e], Jt = (e) => {
|
|
1175
|
+
if (Z(e)) {
|
|
1376
1176
|
const t = e?.[0];
|
|
1377
1177
|
return {
|
|
1378
1178
|
source: e,
|
|
1379
1179
|
target: t,
|
|
1380
|
-
prop:
|
|
1180
|
+
prop: ke(t, e?.[1])
|
|
1381
1181
|
};
|
|
1382
1182
|
}
|
|
1383
1183
|
return {
|
|
@@ -1385,133 +1185,136 @@ var V = (e) => typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ?
|
|
|
1385
1185
|
target: e,
|
|
1386
1186
|
prop: null
|
|
1387
1187
|
};
|
|
1388
|
-
},
|
|
1188
|
+
}, Qt = (e, t, r, n, l, u, s) => ({
|
|
1389
1189
|
source: e,
|
|
1390
1190
|
target: t,
|
|
1391
1191
|
value: r,
|
|
1392
1192
|
prop: n,
|
|
1393
1193
|
name: n,
|
|
1394
|
-
oldValue:
|
|
1395
|
-
trigger:
|
|
1396
|
-
args:
|
|
1397
|
-
}),
|
|
1398
|
-
const
|
|
1399
|
-
return b(e?.[0],
|
|
1400
|
-
},
|
|
1194
|
+
oldValue: l,
|
|
1195
|
+
trigger: u,
|
|
1196
|
+
args: s
|
|
1197
|
+
}), Xt = (e, t, r, n = ["*"]) => {
|
|
1198
|
+
const l = W(e?.[1]) ? e?.[1] : null;
|
|
1199
|
+
return b(e?.[0], l, r, n);
|
|
1200
|
+
}, Yt = (e, t, r, n = ["*"]) => e?.then?.((l) => b?.(l, t, r, n))?.catch?.((l) => (console.warn(l), null)), b = (e, t, r = () => {
|
|
1401
1201
|
}, n) => {
|
|
1402
|
-
if (typeof t == "function" ? (n = r, r = t, t = null) : t =
|
|
1403
|
-
}), (
|
|
1404
|
-
return
|
|
1405
|
-
if (typeof e?.[
|
|
1406
|
-
if (
|
|
1407
|
-
const
|
|
1408
|
-
if (
|
|
1409
|
-
if (
|
|
1202
|
+
if (typeof t == "function" ? (n = r, r = t, t = null) : t = ke(e, t), (typeof r == "object" || Array.isArray(r)) && (n = r, r = () => {
|
|
1203
|
+
}), (g(e) || typeof e == "symbol") && he(n).triggerImmediately)
|
|
1204
|
+
return ze(globalThis?.Promise?.try?.(() => r?.(e, null, null, null, ae)));
|
|
1205
|
+
if (typeof e?.[te] == "function") return e?.[te]?.(r, t, n);
|
|
1206
|
+
if (Me(e)) {
|
|
1207
|
+
const l = e;
|
|
1208
|
+
if (H?.has?.(e = e?.[S] ?? e)) return H?.get?.(e)?.(l, t, r, n);
|
|
1209
|
+
if (_(l) || Z(e) && _(e?.[0]))
|
|
1210
|
+
return Oe(e) ? H?.getOrInsert?.(e, Yt)?.(e, t, r, n) : Z(e) ? H?.getOrInsert?.(e, Xt)?.(e, t, r, n) : typeof HTMLInputElement < "u" && e instanceof HTMLInputElement ? H?.getOrInsert?.(e, qt)?.(e, t, r, n) : H?.getOrInsert?.(e, Ft)?.(l, t, r, n);
|
|
1410
1211
|
{
|
|
1411
|
-
const
|
|
1412
|
-
return
|
|
1212
|
+
const u = tt(r, n, ae);
|
|
1213
|
+
return u ? ze(globalThis?.Promise?.try?.(() => Z(e) ? Re?.(e?.[0], e?.[1], u, null) : t != null && t != Symbol.iterator ? Re?.(e, t, u, null) : Fe?.(e, u, null))) : void 0;
|
|
1413
1214
|
}
|
|
1414
1215
|
}
|
|
1415
1216
|
};
|
|
1416
|
-
function
|
|
1217
|
+
function Zt(e, t, r) {
|
|
1417
1218
|
if (e == null || typeof e != "function") return;
|
|
1418
|
-
if (
|
|
1419
|
-
if (t == null) return
|
|
1420
|
-
const n =
|
|
1219
|
+
if (Ut(t) && r === void 0) return De(e, t);
|
|
1220
|
+
if (t == null) return De(e, r);
|
|
1221
|
+
const n = je(r), l = {
|
|
1421
1222
|
affectTypes: n.affectTypes,
|
|
1422
1223
|
triggerImmediately: n.triggerImmediately
|
|
1423
|
-
},
|
|
1424
|
-
const
|
|
1425
|
-
return b(
|
|
1426
|
-
}).filter((
|
|
1427
|
-
return () =>
|
|
1224
|
+
}, u = Lt(t).map((s) => {
|
|
1225
|
+
const i = Jt(s);
|
|
1226
|
+
return b(i.target, i.prop, (f, o, a, y, ...v) => e(Qt(i.source, i.target, f, o, a, y ?? null, v)), l);
|
|
1227
|
+
}).filter((s) => typeof s == "function");
|
|
1228
|
+
return () => u.forEach((s) => s?.());
|
|
1428
1229
|
}
|
|
1429
|
-
function
|
|
1430
|
-
return
|
|
1230
|
+
function dr(e, t, r) {
|
|
1231
|
+
return Zt(t, e, r);
|
|
1431
1232
|
}
|
|
1432
|
-
var
|
|
1433
|
-
#
|
|
1233
|
+
var hr = (e) => e instanceof Set ? rt(e) : e instanceof Map ? nr(e) : e, jt = class {
|
|
1234
|
+
#r = /* @__PURE__ */ new WeakMap();
|
|
1434
1235
|
#e(e) {
|
|
1435
|
-
|
|
1436
|
-
|
|
1236
|
+
if (e == null || typeof e != "object" && typeof e != "function" && typeof e != "symbol") throw new TypeError("DoubleWeakMap keyL1 must be an object|function|symbol (use pair [keyL1, keyL2])");
|
|
1237
|
+
let t = this.#r.get(e);
|
|
1238
|
+
return t || (t = /* @__PURE__ */ new WeakMap(), this.#r.set(e, t)), t;
|
|
1437
1239
|
}
|
|
1438
|
-
#
|
|
1439
|
-
|
|
1240
|
+
#t(e) {
|
|
1241
|
+
if (!Array.isArray(e) || e.length !== 2) throw new TypeError("DoubleWeakMap key must be a pair: [keyL1, keyL2]");
|
|
1242
|
+
return e;
|
|
1440
1243
|
}
|
|
1441
1244
|
hasL1(e) {
|
|
1442
|
-
return this.#
|
|
1245
|
+
return this.#r.has(e);
|
|
1443
1246
|
}
|
|
1444
1247
|
set(e, t) {
|
|
1445
|
-
const [r, n] = this.#
|
|
1248
|
+
const [r, n] = this.#t(e);
|
|
1446
1249
|
return this.#e(r).set(n, t), this;
|
|
1447
1250
|
}
|
|
1448
1251
|
get(e) {
|
|
1449
|
-
const [t, r] = this.#
|
|
1450
|
-
return this.#
|
|
1252
|
+
const [t, r] = this.#t(e);
|
|
1253
|
+
return this.#r.get(t)?.get(r);
|
|
1451
1254
|
}
|
|
1452
1255
|
has(e) {
|
|
1453
|
-
const [t, r] = this.#
|
|
1454
|
-
return this.#
|
|
1256
|
+
const [t, r] = this.#t(e);
|
|
1257
|
+
return this.#r.get(t)?.has(r) ?? !1;
|
|
1455
1258
|
}
|
|
1456
1259
|
delete(e) {
|
|
1457
|
-
const [t, r] = this.#
|
|
1260
|
+
const [t, r] = this.#t(e), n = this.#r.get(t);
|
|
1458
1261
|
return n ? n.delete(r) : !1;
|
|
1459
1262
|
}
|
|
1460
1263
|
deleteTop(e) {
|
|
1461
|
-
return this.#
|
|
1264
|
+
return this.#r.delete(e);
|
|
1462
1265
|
}
|
|
1463
1266
|
getOrCreate(e, t) {
|
|
1464
|
-
const [r, n] = this.#
|
|
1465
|
-
if (
|
|
1466
|
-
const
|
|
1467
|
-
return
|
|
1267
|
+
const [r, n] = this.#t(e), l = this.#e(r);
|
|
1268
|
+
if (l.has(n)) return l.get(n);
|
|
1269
|
+
const u = t();
|
|
1270
|
+
return l.set(n, u), u;
|
|
1468
1271
|
}
|
|
1469
1272
|
getOrInsert(e, t) {
|
|
1470
|
-
const [r, n] = this.#
|
|
1471
|
-
return
|
|
1273
|
+
const [r, n] = this.#t(e), l = this.#e(r);
|
|
1274
|
+
return l.has(n) ? l.get(n) : (l.set(n, t), t);
|
|
1472
1275
|
}
|
|
1473
1276
|
getOrInsertComputed(e, t) {
|
|
1474
|
-
const [r, n] = this.#
|
|
1475
|
-
if (
|
|
1476
|
-
const
|
|
1477
|
-
return
|
|
1277
|
+
const [r, n] = this.#t(e), l = this.#e(r);
|
|
1278
|
+
if (l.has(n)) return l.get(n);
|
|
1279
|
+
const u = t([r, n]);
|
|
1280
|
+
return l.set(n, u), u;
|
|
1478
1281
|
}
|
|
1479
|
-
},
|
|
1480
|
-
function
|
|
1282
|
+
}, Ae = new jt();
|
|
1283
|
+
function er(e, t, r = ["*"]) {
|
|
1481
1284
|
if (!e) return;
|
|
1482
|
-
if (
|
|
1483
|
-
const n = (
|
|
1484
|
-
if (
|
|
1485
|
-
const f = (
|
|
1486
|
-
if (f) for (const [
|
|
1487
|
-
const v =
|
|
1488
|
-
v == null &&
|
|
1285
|
+
if (Ae.has([e, t])) return Ae.get([e, t]);
|
|
1286
|
+
const n = (l, u, s, i) => {
|
|
1287
|
+
if (u == "value") {
|
|
1288
|
+
const f = (s?.value ?? s)?.entries?.(), o = e?.value ?? l?.value ?? l;
|
|
1289
|
+
if (f) for (const [a, y] of f) {
|
|
1290
|
+
const v = y ?? (s?.value ?? s)?.[a] ?? null, m = o?.[a];
|
|
1291
|
+
v == null && m != null ? t(m, a, null, "add") : v != null && m == null ? t(null, a, v, "delete") : O(v, m) && t(m, a, v, "set");
|
|
1489
1292
|
}
|
|
1490
|
-
return
|
|
1293
|
+
return er(l ?? e?.value, t, r);
|
|
1491
1294
|
}
|
|
1492
|
-
return
|
|
1295
|
+
return u == null ? void 0 : e[u];
|
|
1493
1296
|
};
|
|
1494
|
-
return
|
|
1297
|
+
return Ae.getOrInsertComputed([e, t], () => e instanceof Set ? b([rt(e), Symbol.iterator], t, r) : e instanceof Map ? b(e, t, r) : P(e) ? b(e, n, r) : Array.isArray(e) && !(e?.length == 2 && W(e?.[1]) && _(e?.[0])) ? b([e, Symbol.iterator], t, r) : b(e, t, r));
|
|
1495
1298
|
}
|
|
1496
|
-
function
|
|
1497
|
-
return
|
|
1498
|
-
const n = Array.isArray(r) && r?.length == 2 && ["object", "function"].indexOf(typeof r?.[0]) >= 0 &&
|
|
1499
|
-
r = n &&
|
|
1500
|
-
const
|
|
1501
|
-
(r?.[
|
|
1299
|
+
function Te(e, t) {
|
|
1300
|
+
return at(e, (r) => {
|
|
1301
|
+
const n = Array.isArray(r) && r?.length == 2 && ["object", "function"].indexOf(typeof r?.[0]) >= 0 && W(r?.[1]), l = n ? r?.[1] : null;
|
|
1302
|
+
r = n && l != null ? r?.[0] ?? r : r;
|
|
1303
|
+
const u = typeof r == "object" || typeof r == "function" ? r?.[S] ?? r : r;
|
|
1304
|
+
(r?.[ee] ?? p.get(u))?.unaffected?.(t, l);
|
|
1502
1305
|
});
|
|
1503
1306
|
}
|
|
1504
|
-
var
|
|
1505
|
-
|
|
1307
|
+
var tr = (e, t, r) => (b(t, null, (n, l) => {
|
|
1308
|
+
ue(e, n, l, !0);
|
|
1506
1309
|
}), r?.(() => e, (n) => {
|
|
1507
|
-
for (const
|
|
1508
|
-
}, { deep: !0 }), e),
|
|
1509
|
-
|
|
1510
|
-
}),
|
|
1511
|
-
const t =
|
|
1310
|
+
for (const l in n) ue(t, n[l], l, !0);
|
|
1311
|
+
}, { deep: !0 }), e), vr = (e, t, r) => tr(t(se(e)), e, r), br = (e, t, r = () => "") => b(t, null, (n, l) => {
|
|
1312
|
+
l == r() && ue(e, n, null, !0);
|
|
1313
|
+
}), pr = (e = []) => {
|
|
1314
|
+
const t = x({ value: 0 }), r = (i) => typeof i == "function" ? i() : P(i) ? i.value : i, l = lr([t, "value"], () => e.findIndex((i) => !!r(i)), "value"), u = () => {
|
|
1512
1315
|
t.value++;
|
|
1513
|
-
},
|
|
1514
|
-
|
|
1316
|
+
}, s = [];
|
|
1317
|
+
_(e) && s.push(b(e, u, {
|
|
1515
1318
|
affectTypes: [
|
|
1516
1319
|
"add",
|
|
1517
1320
|
"set",
|
|
@@ -1519,213 +1322,215 @@ var dr = (e, t, r) => (b(t, null, (n, i) => {
|
|
|
1519
1322
|
],
|
|
1520
1323
|
triggerImmediately: !1
|
|
1521
1324
|
}));
|
|
1522
|
-
for (const
|
|
1325
|
+
for (const i of e) P(i) && s.push(b([i, "value"], u, {
|
|
1523
1326
|
affectTypes: ["setter"],
|
|
1524
1327
|
triggerImmediately: !1
|
|
1525
1328
|
}));
|
|
1526
|
-
return
|
|
1527
|
-
},
|
|
1528
|
-
if (
|
|
1529
|
-
const
|
|
1530
|
-
[
|
|
1531
|
-
[
|
|
1329
|
+
return R(l, Symbol.dispose, () => s.forEach((i) => i?.())), l;
|
|
1330
|
+
}, rr = (e, t, r, n) => {
|
|
1331
|
+
if (g(e)) return e ? t : r;
|
|
1332
|
+
const l = () => t, u = () => r, s = (o) => (o != null && (e.value = P(o) ? o?.value : o), (P(e) ? e?.value : e) ? l() : u()), i = x({
|
|
1333
|
+
[h]: s(),
|
|
1334
|
+
[G]: n,
|
|
1532
1335
|
[Symbol?.toStringTag]() {
|
|
1533
|
-
return String(
|
|
1336
|
+
return String(s() ?? this[h] ?? "") || "";
|
|
1534
1337
|
},
|
|
1535
1338
|
[Symbol?.toPrimitive](o) {
|
|
1536
|
-
return E(
|
|
1339
|
+
return E(s() ?? this[h], o);
|
|
1537
1340
|
},
|
|
1538
1341
|
set value(o) {
|
|
1539
|
-
this[
|
|
1342
|
+
this[h] = s(o);
|
|
1540
1343
|
},
|
|
1541
1344
|
get value() {
|
|
1542
|
-
return this[
|
|
1345
|
+
return this[h] = s() ?? this[h];
|
|
1543
1346
|
}
|
|
1544
1347
|
}), f = b([e, "value"], () => {
|
|
1545
|
-
const o =
|
|
1546
|
-
|
|
1348
|
+
const o = i?.[h], a = s();
|
|
1349
|
+
i[h] = a, i?.[z]?.({
|
|
1547
1350
|
key: "value",
|
|
1548
|
-
value:
|
|
1351
|
+
value: a,
|
|
1549
1352
|
oldValue: o,
|
|
1550
1353
|
trigger: "manual"
|
|
1551
1354
|
});
|
|
1552
1355
|
});
|
|
1553
|
-
return
|
|
1554
|
-
},
|
|
1555
|
-
r || (r =
|
|
1556
|
-
const n = b(e, (
|
|
1557
|
-
if (
|
|
1558
|
-
const
|
|
1559
|
-
typeof
|
|
1356
|
+
return R(i, Symbol.dispose, f), i;
|
|
1357
|
+
}, Sr = rr, mr = (e, t, r) => {
|
|
1358
|
+
r || (r = x({}));
|
|
1359
|
+
const n = b(e, (l, u, s) => {
|
|
1360
|
+
if (u == null) return;
|
|
1361
|
+
const i = t?.(l, u, s);
|
|
1362
|
+
typeof i == "object" ? it(r, i) : O(r[u], i) && (r[u] = i);
|
|
1560
1363
|
});
|
|
1561
|
-
return r &&
|
|
1562
|
-
},
|
|
1563
|
-
const t =
|
|
1564
|
-
return e?.forEach?.((r) => b(r, (n,
|
|
1565
|
-
|
|
1364
|
+
return r && R(r, Symbol.dispose, n), r;
|
|
1365
|
+
}, gr = (...e) => {
|
|
1366
|
+
const t = x({});
|
|
1367
|
+
return e?.forEach?.((r) => b(r, (n, l, u) => {
|
|
1368
|
+
l != null && O(t[l], n) && (t[l] = n);
|
|
1566
1369
|
})), t;
|
|
1567
|
-
},
|
|
1568
|
-
const t =
|
|
1569
|
-
return t.push(...Array.from(e?.values?.() || [])),
|
|
1570
|
-
if (
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1370
|
+
}, rt = (e) => {
|
|
1371
|
+
const t = x([]);
|
|
1372
|
+
return t.push(...Array.from(e?.values?.() || [])), R(t, Symbol.dispose, b(e, (r, n, l) => {
|
|
1373
|
+
if (O(r, l))
|
|
1374
|
+
if (l == null && r != null) t.push(r);
|
|
1375
|
+
else if (l != null && r == null) {
|
|
1376
|
+
const u = t.indexOf(l);
|
|
1377
|
+
u >= 0 && t.splice(u, 1);
|
|
1378
|
+
} else {
|
|
1379
|
+
const u = t.indexOf(l);
|
|
1380
|
+
u >= 0 && O(t[u], r) && (t[u] = r);
|
|
1381
|
+
}
|
|
1578
1382
|
})), t;
|
|
1579
|
-
},
|
|
1580
|
-
const t =
|
|
1581
|
-
return t.push(...r),
|
|
1582
|
-
if (
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1383
|
+
}, nr = (e) => {
|
|
1384
|
+
const t = x([]), r = Array.from(e.entries());
|
|
1385
|
+
return t.push(...r), R(t, Symbol.dispose, b(e, (n, l, u) => {
|
|
1386
|
+
if (O(n, u) || u == null && n != null || u != null && n == null)
|
|
1387
|
+
if (u != null && n == null) {
|
|
1388
|
+
let s = t.findIndex(([i, f]) => i == l);
|
|
1389
|
+
s < 0 && (s = t.findLastIndex(([i, f]) => u === f)), s >= 0 && t.splice(s, 1);
|
|
1390
|
+
} else {
|
|
1391
|
+
let s = t.findIndex(([i, f]) => i == l);
|
|
1392
|
+
s >= 0 && s < t.length ? O(t[s]?.[1], n) && (t[s] = [l, n]) : t.push([l, n]);
|
|
1393
|
+
}
|
|
1589
1394
|
})), t;
|
|
1590
|
-
},
|
|
1591
|
-
const n = typeof e?.[1] == "function" && e?.length == 2,
|
|
1592
|
-
let
|
|
1593
|
-
!
|
|
1594
|
-
const f = (
|
|
1595
|
-
let o = f && !
|
|
1596
|
-
if (!f && !
|
|
1395
|
+
}, N = /* @__PURE__ */ new WeakMap(), He = (e, t, r = "value") => {
|
|
1396
|
+
const n = typeof e?.[1] == "function" && e?.length == 2, l = typeof t?.[1] == "function" && t?.length == 2, u = l ? t?.[1] : null, s = (W(e?.[1]) || e?.[1] == Symbol.iterator) && e?.length == 2;
|
|
1397
|
+
let i = s && !n ? e?.[1] : Array.isArray(e) ? null : r;
|
|
1398
|
+
!s && !n && (e = [e, i]), n && (e[1] = i);
|
|
1399
|
+
const f = (W(t?.[1]) || t?.[1] == Symbol.iterator) && t?.length == 2;
|
|
1400
|
+
let o = f && !l ? t?.[1] : Array.isArray(t) ? null : r;
|
|
1401
|
+
if (!f && !l && (t = [t, o]), l && (t[1] = o), i == null || o == null || j(i, e?.[0]) || j(o, t?.[0])) return;
|
|
1597
1402
|
if (!((typeof t?.[0] == "object" || typeof t?.[0] == "function") && t?.[0] != null) && !Array.isArray(e[0]))
|
|
1598
|
-
return
|
|
1599
|
-
e[0][
|
|
1403
|
+
return ie(t, () => {
|
|
1404
|
+
e[0][i] = t?.[0];
|
|
1600
1405
|
}), () => {
|
|
1601
1406
|
};
|
|
1602
|
-
const
|
|
1603
|
-
const
|
|
1604
|
-
if (
|
|
1605
|
-
let
|
|
1606
|
-
const
|
|
1607
|
-
|
|
1608
|
-
typeof
|
|
1407
|
+
const a = (K, L) => {
|
|
1408
|
+
const C = m?.deref?.(), J = v?.deref?.();
|
|
1409
|
+
if (N?.get?.(C)?.get?.(i)?.bound == J) {
|
|
1410
|
+
let me = null;
|
|
1411
|
+
const $e = N?.get?.(C)?.get?.(i)?.cmpfx;
|
|
1412
|
+
ie(J, () => {
|
|
1413
|
+
typeof $e == "function" ? me = $e?.(We(J) ?? K, L, null) : me = J?.[L] ?? K;
|
|
1609
1414
|
});
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1612
|
-
|
|
1415
|
+
const _e = We(me);
|
|
1416
|
+
O(C[i], _e) && ie(J, () => {
|
|
1417
|
+
C[i] = _e;
|
|
1613
1418
|
});
|
|
1614
|
-
} else
|
|
1615
|
-
},
|
|
1616
|
-
const
|
|
1617
|
-
|
|
1618
|
-
}, v = t?.[0] != null && (typeof t?.[0] == "object" || typeof t?.[0] == "function") && !(t?.[0] instanceof WeakRef || typeof t?.[0]?.deref == "function") ? new WeakRef(t?.[0]) : t?.[0],
|
|
1619
|
-
let
|
|
1620
|
-
compute:
|
|
1621
|
-
dispose:
|
|
1622
|
-
cmpfx:
|
|
1419
|
+
} else N?.get?.(C)?.get?.(i)?.dispose?.();
|
|
1420
|
+
}, y = () => {
|
|
1421
|
+
const K = m?.deref?.(), L = N?.get?.(K), C = L?.get?.(i);
|
|
1422
|
+
L?.delete?.(i), C?.unsub?.();
|
|
1423
|
+
}, v = t?.[0] != null && (typeof t?.[0] == "object" || typeof t?.[0] == "function") && !(t?.[0] instanceof WeakRef || typeof t?.[0]?.deref == "function") ? new WeakRef(t?.[0]) : t?.[0], m = e?.[0] != null && (typeof e?.[0] == "object" || typeof e?.[0] == "function") && !(e?.[0] instanceof WeakRef || typeof e?.[0]?.deref == "function") ? new WeakRef(e?.[0]) : e?.[0];
|
|
1424
|
+
let A = {
|
|
1425
|
+
compute: a,
|
|
1426
|
+
dispose: y,
|
|
1427
|
+
cmpfx: u
|
|
1623
1428
|
};
|
|
1624
|
-
const
|
|
1625
|
-
return
|
|
1626
|
-
bound:
|
|
1627
|
-
cmpfx:
|
|
1429
|
+
const w = m?.deref?.(), I = v?.deref?.();
|
|
1430
|
+
return m instanceof WeakRef && (N?.get?.(w)?.get?.(i)?.bound != I && N?.get?.(w)?.delete?.(i), A = N?.getOrInsert?.(w, /* @__PURE__ */ new Map())?.getOrInsertComputed?.(i, () => ({
|
|
1431
|
+
bound: I,
|
|
1432
|
+
cmpfx: u,
|
|
1628
1433
|
unsub: null,
|
|
1629
|
-
compute:
|
|
1630
|
-
dispose:
|
|
1631
|
-
})),
|
|
1632
|
-
|
|
1633
|
-
}),
|
|
1634
|
-
},
|
|
1635
|
-
const n = [
|
|
1636
|
-
return () => n?.map?.((
|
|
1637
|
-
},
|
|
1638
|
-
const
|
|
1639
|
-
let
|
|
1640
|
-
if (!
|
|
1641
|
-
const
|
|
1434
|
+
compute: a,
|
|
1435
|
+
dispose: y
|
|
1436
|
+
})), A.unsub = b(t, a), A.cmpfx = u, R(w, Symbol.dispose, A?.dispose), R(I, Symbol.dispose, A?.dispose)), I && !Array.isArray(I) && ie(w, () => {
|
|
1437
|
+
I[o] ??= w?.[i] ?? I[o];
|
|
1438
|
+
}), A?.dispose;
|
|
1439
|
+
}, wr = (e, t, r = "value") => {
|
|
1440
|
+
const n = [He(e, t, r), He(t, e, r)];
|
|
1441
|
+
return () => n?.map?.((l) => l?.());
|
|
1442
|
+
}, lr = (e, t, r, n = "value") => {
|
|
1443
|
+
const l = typeof e?.[1] == "function" && e?.length == 2, u = (W(e?.[1]) || e?.[1] == Symbol.iterator) && e?.length == 2;
|
|
1444
|
+
let s = u && !l ? e?.[1] : Array.isArray(e) ? null : n;
|
|
1445
|
+
if (!u && !l && (e = [u ? e?.[0] : e, s]), l && (e[1] = s), s == null || j(s, e?.[0])) return;
|
|
1446
|
+
const i = (y) => {
|
|
1642
1447
|
let v;
|
|
1643
|
-
return
|
|
1644
|
-
}, f =
|
|
1645
|
-
[
|
|
1646
|
-
[
|
|
1647
|
-
[
|
|
1448
|
+
return y != null && (v = e[0][s], e[0][s] = y), t?.(e?.[0]?.[s], s, v);
|
|
1449
|
+
}, f = i(), o = x({
|
|
1450
|
+
[ne]: void 0,
|
|
1451
|
+
[h]: f,
|
|
1452
|
+
[G]: r,
|
|
1648
1453
|
[Symbol?.toStringTag]() {
|
|
1649
|
-
return String(
|
|
1454
|
+
return String(i() ?? this[h] ?? "") || "";
|
|
1650
1455
|
},
|
|
1651
|
-
[Symbol?.toPrimitive](
|
|
1652
|
-
return E(
|
|
1456
|
+
[Symbol?.toPrimitive](y) {
|
|
1457
|
+
return E(i() ?? this[h], y);
|
|
1653
1458
|
},
|
|
1654
|
-
set value(
|
|
1655
|
-
this[
|
|
1459
|
+
set value(y) {
|
|
1460
|
+
this[h] = i(y);
|
|
1656
1461
|
},
|
|
1657
1462
|
get value() {
|
|
1658
|
-
return this[
|
|
1463
|
+
return this[h] = i() ?? this[h];
|
|
1659
1464
|
}
|
|
1660
|
-
}),
|
|
1661
|
-
const
|
|
1662
|
-
o[
|
|
1465
|
+
}), a = b([e?.[0] ?? e, s ?? "value"], () => {
|
|
1466
|
+
const y = o?.[h], v = i();
|
|
1467
|
+
o[h] = v, o?.[z]?.({
|
|
1663
1468
|
key: "value",
|
|
1664
1469
|
value: v,
|
|
1665
|
-
oldValue:
|
|
1470
|
+
oldValue: y,
|
|
1666
1471
|
trigger: "manual"
|
|
1667
1472
|
});
|
|
1668
1473
|
});
|
|
1669
|
-
return
|
|
1670
|
-
},
|
|
1474
|
+
return R(o, Symbol.dispose, a), o;
|
|
1475
|
+
}, Ar = (e, t, r = 100) => {
|
|
1671
1476
|
let n;
|
|
1672
|
-
return b(e, "value", (
|
|
1673
|
-
!
|
|
1477
|
+
return b(e, "value", (l) => {
|
|
1478
|
+
!l && n ? (clearTimeout(n), n = null) : l && !n && (n = Pe(e, t, r) ?? n);
|
|
1674
1479
|
});
|
|
1675
1480
|
};
|
|
1676
1481
|
export {
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1482
|
+
te as $affected,
|
|
1483
|
+
Dt as $ref,
|
|
1484
|
+
z as $trigger,
|
|
1485
|
+
ft as $triggerControl,
|
|
1486
|
+
de as $triggerLess,
|
|
1487
|
+
d as $triggerLock,
|
|
1488
|
+
dt as AssignObjectHandler,
|
|
1489
|
+
jt as DoubleWeakMap,
|
|
1490
|
+
R as addToCallChain,
|
|
1686
1491
|
b as affected,
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1492
|
+
He as assign,
|
|
1493
|
+
N as assignMap,
|
|
1494
|
+
tr as bindBy,
|
|
1495
|
+
br as bindByKey,
|
|
1496
|
+
Ct as booleanRef,
|
|
1497
|
+
lr as computed,
|
|
1498
|
+
Sr as conditional,
|
|
1499
|
+
pr as conditionalIndex,
|
|
1500
|
+
rr as conditionalRef,
|
|
1501
|
+
cr as delayedBehavior,
|
|
1502
|
+
ar as delayedOrInstantBehavior,
|
|
1503
|
+
Ar as delayedSubscribe,
|
|
1504
|
+
$ as deref,
|
|
1505
|
+
vr as derivate,
|
|
1506
|
+
Zt as effect,
|
|
1507
|
+
dr as effected,
|
|
1508
|
+
_ as isObservable,
|
|
1509
|
+
er as iterated,
|
|
1510
|
+
wr as link,
|
|
1511
|
+
hr as makeArrayObservable,
|
|
1512
|
+
ur as makeObjectAssignable,
|
|
1513
|
+
Vt as numberRef,
|
|
1514
|
+
nr as observableByMap,
|
|
1515
|
+
rt as observableBySet,
|
|
1516
|
+
x as observe,
|
|
1517
|
+
or as promised,
|
|
1518
|
+
Nt as propRef,
|
|
1519
|
+
Gt as recoverReactive,
|
|
1520
|
+
Bt as ref,
|
|
1521
|
+
mr as remap,
|
|
1522
|
+
se as safe,
|
|
1523
|
+
H as specializedSubscribe,
|
|
1524
|
+
zt as stringRef,
|
|
1525
|
+
Ft as subscribeDirectly,
|
|
1526
|
+
qt as subscribeInput,
|
|
1527
|
+
Xt as subscribePaired,
|
|
1528
|
+
Yt as subscribeThenable,
|
|
1529
|
+
Pe as triggerWithDelay,
|
|
1530
|
+
Te as unaffected,
|
|
1531
|
+
gr as unified,
|
|
1532
|
+
ct as unwrap,
|
|
1533
|
+
yr as useObservable,
|
|
1534
|
+
Ke as wrapRef,
|
|
1535
|
+
sr as wrapSetAsArray
|
|
1731
1536
|
};
|