@pie-players/pie-tool-theme 0.3.17 → 0.3.19
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/index-BRKsQ6Im.js +460 -0
- package/dist/{index-DF-Dk87f.js → index-QLtHZ4Yz.js} +102 -50
- package/dist/tool-color-scheme.js +1248 -1162
- package/package.json +5 -5
- package/dist/index-CGqExkh0.js +0 -354
|
@@ -1,148 +1,148 @@
|
|
|
1
1
|
var Rn = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Vi = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var h = (t, e, r) =>
|
|
7
|
-
var u = (t, e, r) => (
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var Pn = (t, e, r) => e in t ? Rn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
+
var h = (t, e, r) => Pn(t, typeof e != "symbol" ? e + "" : e, r), Fr = (t, e, r) => e.has(t) || Vi("Cannot " + r);
|
|
7
|
+
var u = (t, e, r) => (Fr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), k = (t, e, r) => e.has(t) ? Vi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), _ = (t, e, r, i) => (Fr(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r), R = (t, e, r) => (Fr(t, e, "access private method"), r);
|
|
8
|
+
var po;
|
|
9
|
+
typeof window < "u" && ((po = window.__svelte ?? (window.__svelte = {})).v ?? (po.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const Mn = 1, xn = 2, Dn = 16, Nn = 2, ho = "[", pi = "[!", Fi = "[?", hi = "]", Mt = {}, F = /* @__PURE__ */ Symbol(), vo = "http://www.w3.org/1999/xhtml", Ur = !1;
|
|
11
|
+
var mo = Array.isArray, Vn = Array.prototype.indexOf, xt = Array.prototype.includes, wr = Array.from, mr = Object.keys, gr = Object.defineProperty, At = Object.getOwnPropertyDescriptor, Fn = Object.getOwnPropertyDescriptors, qn = Object.prototype, Bn = Array.prototype, go = Object.getPrototypeOf, qi = Object.isExtensible;
|
|
12
|
+
const Hn = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function zn(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function bo() {
|
|
19
19
|
var t, e, r = new Promise((i, o) => {
|
|
20
20
|
t = i, e = o;
|
|
21
21
|
});
|
|
22
22
|
return { promise: r, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const H = 2,
|
|
24
|
+
const H = 2, Ht = 4, Dt = 8, vi = 1 << 24, et = 16, we = 32, tt = 64, Gr = 128, fe = 512, q = 1024, B = 2048, _e = 4096, U = 8192, Oe = 16384, gt = 32768, Nt = 65536, Bi = 1 << 17, jn = 1 << 18, bt = 1 << 19, Un = 1 << 20, qe = 1 << 25, ht = 65536, Wr = 1 << 21, mi = 1 << 22, Qe = 1 << 23, cr = /* @__PURE__ */ Symbol("$state"), Gn = /* @__PURE__ */ Symbol("legacy props"), Wn = /* @__PURE__ */ Symbol(""), it = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
h(this, "name", "StaleReactionError");
|
|
28
28
|
h(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
30
|
+
}(), Kn = (
|
|
31
31
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
32
32
|
!!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
|
|
33
|
-
),
|
|
34
|
-
function
|
|
33
|
+
), kr = 3, ir = 8;
|
|
34
|
+
function Yn(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Qn() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Jn(t, e, r) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Xn(t) {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Zn() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function es(t) {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function ts() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function rs() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function is() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function os() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function ns() {
|
|
65
65
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function ss() {
|
|
68
68
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Tr(t) {
|
|
71
71
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ls() {
|
|
74
74
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
75
75
|
}
|
|
76
76
|
let E = !1;
|
|
77
|
-
function
|
|
77
|
+
function Be(t) {
|
|
78
78
|
E = t;
|
|
79
79
|
}
|
|
80
80
|
let I;
|
|
81
81
|
function Q(t) {
|
|
82
82
|
if (t === null)
|
|
83
|
-
throw
|
|
83
|
+
throw Tr(), Mt;
|
|
84
84
|
return I = t;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return Q(/* @__PURE__ */
|
|
86
|
+
function Ir() {
|
|
87
|
+
return Q(/* @__PURE__ */ Le(I));
|
|
88
88
|
}
|
|
89
89
|
function z(t) {
|
|
90
90
|
if (E) {
|
|
91
|
-
if (/* @__PURE__ */
|
|
92
|
-
throw
|
|
91
|
+
if (/* @__PURE__ */ Le(I) !== null)
|
|
92
|
+
throw Tr(), Mt;
|
|
93
93
|
I = t;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function yo(t = 1) {
|
|
97
97
|
if (E) {
|
|
98
98
|
for (var e = t, r = I; e--; )
|
|
99
99
|
r = /** @type {TemplateNode} */
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ Le(r);
|
|
101
101
|
I = r;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function br(t = !0) {
|
|
105
105
|
for (var e = 0, r = I; ; ) {
|
|
106
|
-
if (r.nodeType ===
|
|
106
|
+
if (r.nodeType === ir) {
|
|
107
107
|
var i = (
|
|
108
108
|
/** @type {Comment} */
|
|
109
109
|
r.data
|
|
110
110
|
);
|
|
111
|
-
if (i ===
|
|
111
|
+
if (i === hi) {
|
|
112
112
|
if (e === 0) return r;
|
|
113
113
|
e -= 1;
|
|
114
|
-
} else (i ===
|
|
114
|
+
} else (i === ho || i === pi || // "[1", "[2", etc. for if blocks
|
|
115
115
|
i[0] === "[" && !isNaN(Number(i.slice(1)))) && (e += 1);
|
|
116
116
|
}
|
|
117
117
|
var o = (
|
|
118
118
|
/** @type {TemplateNode} */
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ Le(r)
|
|
120
120
|
);
|
|
121
121
|
t && r.remove(), r = o;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
125
|
-
if (!t || t.nodeType !==
|
|
126
|
-
throw
|
|
124
|
+
function _o(t) {
|
|
125
|
+
if (!t || t.nodeType !== ir)
|
|
126
|
+
throw Tr(), Mt;
|
|
127
127
|
return (
|
|
128
128
|
/** @type {Comment} */
|
|
129
129
|
t.data
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function wo(t) {
|
|
133
133
|
return t === this.v;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function as(t, e) {
|
|
136
136
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
return !
|
|
138
|
+
function ko(t) {
|
|
139
|
+
return !as(t, this.v);
|
|
140
140
|
}
|
|
141
|
-
let
|
|
142
|
-
function
|
|
141
|
+
let cs = !1, ie = null;
|
|
142
|
+
function Vt(t) {
|
|
143
143
|
ie = t;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function To(t, e = !1, r) {
|
|
146
146
|
ie = {
|
|
147
147
|
p: ie,
|
|
148
148
|
i: !1,
|
|
@@ -153,7 +153,7 @@ function ko(t, e = !1, r) {
|
|
|
153
153
|
l: null
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Io(t) {
|
|
157
157
|
var e = (
|
|
158
158
|
/** @type {ComponentContext} */
|
|
159
159
|
ie
|
|
@@ -161,44 +161,44 @@ function To(t) {
|
|
|
161
161
|
if (r !== null) {
|
|
162
162
|
e.e = null;
|
|
163
163
|
for (var i of r)
|
|
164
|
-
|
|
164
|
+
Ko(i);
|
|
165
165
|
}
|
|
166
166
|
return t !== void 0 && (e.x = t), e.i = !0, ie = e.p, t ?? /** @type {T} */
|
|
167
167
|
{};
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Ao() {
|
|
170
170
|
return !0;
|
|
171
171
|
}
|
|
172
|
-
let
|
|
172
|
+
let ot = [];
|
|
173
173
|
function So() {
|
|
174
|
-
var t =
|
|
175
|
-
|
|
174
|
+
var t = ot;
|
|
175
|
+
ot = [], zn(t);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
if (
|
|
179
|
-
var e =
|
|
177
|
+
function ft(t) {
|
|
178
|
+
if (ot.length === 0 && !Jt) {
|
|
179
|
+
var e = ot;
|
|
180
180
|
queueMicrotask(() => {
|
|
181
|
-
e ===
|
|
181
|
+
e === ot && So();
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
ot.push(t);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
for (;
|
|
186
|
+
function us() {
|
|
187
|
+
for (; ot.length > 0; )
|
|
188
188
|
So();
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
var e =
|
|
190
|
+
function Eo(t) {
|
|
191
|
+
var e = A;
|
|
192
192
|
if (e === null)
|
|
193
|
-
return T.f |=
|
|
194
|
-
if ((e.f &
|
|
193
|
+
return T.f |= Qe, t;
|
|
194
|
+
if ((e.f & gt) === 0 && (e.f & Ht) === 0)
|
|
195
195
|
throw t;
|
|
196
|
-
|
|
196
|
+
Ye(t, e);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function Ye(t, e) {
|
|
199
199
|
for (; e !== null; ) {
|
|
200
|
-
if ((e.f &
|
|
201
|
-
if ((e.f &
|
|
200
|
+
if ((e.f & Gr) !== 0) {
|
|
201
|
+
if ((e.f & gt) === 0)
|
|
202
202
|
throw t;
|
|
203
203
|
try {
|
|
204
204
|
e.b.error(t);
|
|
@@ -211,32 +211,32 @@ function Ke(t, e) {
|
|
|
211
211
|
}
|
|
212
212
|
throw t;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const fs = -7169;
|
|
215
215
|
function M(t, e) {
|
|
216
|
-
t.f = t.f &
|
|
216
|
+
t.f = t.f & fs | e;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
(t.f &
|
|
218
|
+
function gi(t) {
|
|
219
|
+
(t.f & fe) !== 0 || t.deps === null ? M(t, q) : M(t, _e);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function $o(t) {
|
|
222
222
|
if (t !== null)
|
|
223
223
|
for (const e of t)
|
|
224
|
-
(e.f & H) === 0 || (e.f &
|
|
224
|
+
(e.f & H) === 0 || (e.f & ht) === 0 || (e.f ^= ht, $o(
|
|
225
225
|
/** @type {Derived} */
|
|
226
226
|
e.deps
|
|
227
227
|
));
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
(t.f & B) !== 0 ? e.add(t) : (t.f &
|
|
229
|
+
function Oo(t, e, r) {
|
|
230
|
+
(t.f & B) !== 0 ? e.add(t) : (t.f & _e) !== 0 && r.add(t), $o(t.deps), M(t, q);
|
|
231
231
|
}
|
|
232
|
-
const
|
|
233
|
-
let
|
|
234
|
-
var
|
|
235
|
-
const
|
|
232
|
+
const nr = /* @__PURE__ */ new Set();
|
|
233
|
+
let L = null, be = null, K = [], Ar = null, Jt = !1, Ft = null, ds = 1;
|
|
234
|
+
var Ge, St, lt, Et, $t, Ot, We, Ie, Ct, J, Kr, Yr, Qr, Jr;
|
|
235
|
+
const Li = class Li {
|
|
236
236
|
constructor() {
|
|
237
237
|
k(this, J);
|
|
238
238
|
// for debugging. TODO remove once async is stable
|
|
239
|
-
h(this, "id",
|
|
239
|
+
h(this, "id", ds++);
|
|
240
240
|
/**
|
|
241
241
|
* The current values of any sources that are updated in this batch
|
|
242
242
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -254,7 +254,7 @@ const Ci = class Ci {
|
|
|
254
254
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
255
255
|
* @type {Set<(batch: Batch) => void>}
|
|
256
256
|
*/
|
|
257
|
-
k(this,
|
|
257
|
+
k(this, Ge, /* @__PURE__ */ new Set());
|
|
258
258
|
/**
|
|
259
259
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
260
260
|
* @type {Set<(batch: Batch) => void>}
|
|
@@ -263,27 +263,27 @@ const Ci = class Ci {
|
|
|
263
263
|
/**
|
|
264
264
|
* The number of async effects that are currently in flight
|
|
265
265
|
*/
|
|
266
|
-
k(this,
|
|
266
|
+
k(this, lt, 0);
|
|
267
267
|
/**
|
|
268
268
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
269
269
|
*/
|
|
270
|
-
k(this,
|
|
270
|
+
k(this, Et, 0);
|
|
271
271
|
/**
|
|
272
272
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
273
273
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
274
274
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
275
275
|
*/
|
|
276
|
-
k(this,
|
|
276
|
+
k(this, $t, null);
|
|
277
277
|
/**
|
|
278
278
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
279
279
|
* @type {Set<Effect>}
|
|
280
280
|
*/
|
|
281
|
-
k(this,
|
|
281
|
+
k(this, Ot, /* @__PURE__ */ new Set());
|
|
282
282
|
/**
|
|
283
283
|
* Deferred effects that are MAYBE_DIRTY
|
|
284
284
|
* @type {Set<Effect>}
|
|
285
285
|
*/
|
|
286
|
-
k(this,
|
|
286
|
+
k(this, We, /* @__PURE__ */ new Set());
|
|
287
287
|
/**
|
|
288
288
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
289
289
|
* is committed — we skip over these during `process`.
|
|
@@ -291,16 +291,16 @@ const Ci = class Ci {
|
|
|
291
291
|
* so they can be rescheduled if the branch survives.
|
|
292
292
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
293
293
|
*/
|
|
294
|
-
k(this,
|
|
294
|
+
k(this, Ie, /* @__PURE__ */ new Map());
|
|
295
295
|
h(this, "is_fork", !1);
|
|
296
|
-
k(this,
|
|
296
|
+
k(this, Ct, !1);
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
299
299
|
* Add an effect to the #skipped_branches map and reset its children
|
|
300
300
|
* @param {Effect} effect
|
|
301
301
|
*/
|
|
302
302
|
skip_effect(e) {
|
|
303
|
-
u(this,
|
|
303
|
+
u(this, Ie).has(e) || u(this, Ie).set(e, { d: [], m: [] });
|
|
304
304
|
}
|
|
305
305
|
/**
|
|
306
306
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -308,13 +308,13 @@ const Ci = class Ci {
|
|
|
308
308
|
* @param {Effect} effect
|
|
309
309
|
*/
|
|
310
310
|
unskip_effect(e) {
|
|
311
|
-
var r = u(this,
|
|
311
|
+
var r = u(this, Ie).get(e);
|
|
312
312
|
if (r) {
|
|
313
|
-
u(this,
|
|
313
|
+
u(this, Ie).delete(e);
|
|
314
314
|
for (var i of r.d)
|
|
315
|
-
M(i, B),
|
|
315
|
+
M(i, B), $e(i);
|
|
316
316
|
for (i of r.m)
|
|
317
|
-
M(i,
|
|
317
|
+
M(i, _e), $e(i);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
/**
|
|
@@ -323,19 +323,19 @@ const Ci = class Ci {
|
|
|
323
323
|
*/
|
|
324
324
|
process(e) {
|
|
325
325
|
K = [], this.apply();
|
|
326
|
-
var r =
|
|
326
|
+
var r = Ft = [], i = [];
|
|
327
327
|
for (const o of e)
|
|
328
|
-
|
|
329
|
-
if (
|
|
330
|
-
|
|
331
|
-
for (const [o, n] of u(this,
|
|
332
|
-
|
|
328
|
+
R(this, J, Yr).call(this, o, r, i);
|
|
329
|
+
if (Ft = null, R(this, J, Kr).call(this)) {
|
|
330
|
+
R(this, J, Qr).call(this, i), R(this, J, Qr).call(this, r);
|
|
331
|
+
for (const [o, n] of u(this, Ie))
|
|
332
|
+
Po(o, n);
|
|
333
333
|
} else {
|
|
334
|
-
|
|
335
|
-
for (const o of u(this,
|
|
336
|
-
u(this,
|
|
334
|
+
L = null;
|
|
335
|
+
for (const o of u(this, Ge)) o(this);
|
|
336
|
+
u(this, Ge).clear(), u(this, lt) === 0 && R(this, J, Jr).call(this), Hi(i), Hi(r), u(this, Ot).clear(), u(this, We).clear(), u(this, $t)?.resolve();
|
|
337
337
|
}
|
|
338
|
-
|
|
338
|
+
be = null;
|
|
339
339
|
}
|
|
340
340
|
/**
|
|
341
341
|
* Associate a change to a given source with the current
|
|
@@ -344,20 +344,20 @@ const Ci = class Ci {
|
|
|
344
344
|
* @param {any} value
|
|
345
345
|
*/
|
|
346
346
|
capture(e, r) {
|
|
347
|
-
r !== F && !this.previous.has(e) && this.previous.set(e, r), (e.f &
|
|
347
|
+
r !== F && !this.previous.has(e) && this.previous.set(e, r), (e.f & Qe) === 0 && (this.current.set(e, e.v), be?.set(e, e.v));
|
|
348
348
|
}
|
|
349
349
|
activate() {
|
|
350
|
-
|
|
350
|
+
L = this, this.apply();
|
|
351
351
|
}
|
|
352
352
|
deactivate() {
|
|
353
|
-
|
|
353
|
+
L === this && (L = null, be = null);
|
|
354
354
|
}
|
|
355
355
|
flush() {
|
|
356
356
|
if (K.length > 0)
|
|
357
|
-
|
|
358
|
-
else if (u(this,
|
|
359
|
-
for (const e of u(this,
|
|
360
|
-
u(this,
|
|
357
|
+
L = this, Co();
|
|
358
|
+
else if (u(this, lt) === 0 && !this.is_fork) {
|
|
359
|
+
for (const e of u(this, Ge)) e(this);
|
|
360
|
+
u(this, Ge).clear(), R(this, J, Jr).call(this), u(this, $t)?.resolve();
|
|
361
361
|
}
|
|
362
362
|
this.deactivate();
|
|
363
363
|
}
|
|
@@ -370,49 +370,49 @@ const Ci = class Ci {
|
|
|
370
370
|
* @param {boolean} blocking
|
|
371
371
|
*/
|
|
372
372
|
increment(e) {
|
|
373
|
-
_(this,
|
|
373
|
+
_(this, lt, u(this, lt) + 1), e && _(this, Et, u(this, Et) + 1);
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
376
376
|
*
|
|
377
377
|
* @param {boolean} blocking
|
|
378
378
|
*/
|
|
379
379
|
decrement(e) {
|
|
380
|
-
_(this,
|
|
381
|
-
_(this,
|
|
380
|
+
_(this, lt, u(this, lt) - 1), e && _(this, Et, u(this, Et) - 1), !u(this, Ct) && (_(this, Ct, !0), ft(() => {
|
|
381
|
+
_(this, Ct, !1), R(this, J, Kr).call(this) ? K.length > 0 && this.flush() : this.revive();
|
|
382
382
|
}));
|
|
383
383
|
}
|
|
384
384
|
revive() {
|
|
385
|
-
for (const e of u(this,
|
|
386
|
-
u(this,
|
|
387
|
-
for (const e of u(this,
|
|
388
|
-
M(e,
|
|
385
|
+
for (const e of u(this, Ot))
|
|
386
|
+
u(this, We).delete(e), M(e, B), $e(e);
|
|
387
|
+
for (const e of u(this, We))
|
|
388
|
+
M(e, _e), $e(e);
|
|
389
389
|
this.flush();
|
|
390
390
|
}
|
|
391
391
|
/** @param {(batch: Batch) => void} fn */
|
|
392
392
|
oncommit(e) {
|
|
393
|
-
u(this,
|
|
393
|
+
u(this, Ge).add(e);
|
|
394
394
|
}
|
|
395
395
|
/** @param {(batch: Batch) => void} fn */
|
|
396
396
|
ondiscard(e) {
|
|
397
397
|
u(this, St).add(e);
|
|
398
398
|
}
|
|
399
399
|
settled() {
|
|
400
|
-
return (u(this,
|
|
400
|
+
return (u(this, $t) ?? _(this, $t, bo())).promise;
|
|
401
401
|
}
|
|
402
402
|
static ensure() {
|
|
403
|
-
if (
|
|
404
|
-
const e =
|
|
405
|
-
|
|
406
|
-
|
|
403
|
+
if (L === null) {
|
|
404
|
+
const e = L = new Li();
|
|
405
|
+
nr.add(L), Jt || ft(() => {
|
|
406
|
+
L === e && e.flush();
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
|
-
return
|
|
409
|
+
return L;
|
|
410
410
|
}
|
|
411
411
|
apply() {
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
|
-
|
|
415
|
-
return this.is_fork || u(this,
|
|
414
|
+
Ge = new WeakMap(), St = new WeakMap(), lt = new WeakMap(), Et = new WeakMap(), $t = new WeakMap(), Ot = new WeakMap(), We = new WeakMap(), Ie = new WeakMap(), Ct = new WeakMap(), J = new WeakSet(), Kr = function() {
|
|
415
|
+
return this.is_fork || u(this, Et) > 0;
|
|
416
416
|
}, /**
|
|
417
417
|
* Traverse the effect tree, executing effects or stashing
|
|
418
418
|
* them for later execution as appropriate
|
|
@@ -420,12 +420,12 @@ Ue = new WeakMap(), St = new WeakMap(), st = new WeakMap(), At = new WeakMap(),
|
|
|
420
420
|
* @param {Effect[]} effects
|
|
421
421
|
* @param {Effect[]} render_effects
|
|
422
422
|
*/
|
|
423
|
-
|
|
423
|
+
Yr = function(e, r, i) {
|
|
424
424
|
e.f ^= q;
|
|
425
425
|
for (var o = e.first; o !== null; ) {
|
|
426
|
-
var n = o.f, s = (n & (
|
|
426
|
+
var n = o.f, s = (n & (we | tt)) !== 0, l = s && (n & q) !== 0, a = (n & U) !== 0, c = l || u(this, Ie).has(o);
|
|
427
427
|
if (!c && o.fn !== null) {
|
|
428
|
-
s ? a || (o.f ^= q) : (n &
|
|
428
|
+
s ? a || (o.f ^= q) : (n & Ht) !== 0 ? r.push(o) : (n & (Dt | vi)) !== 0 && a ? i.push(o) : or(o) && (Bt(o), (n & et) !== 0 && (u(this, We).add(o), a && M(o, B)));
|
|
429
429
|
var f = o.first;
|
|
430
430
|
if (f !== null) {
|
|
431
431
|
o = f;
|
|
@@ -444,15 +444,15 @@ Kr = function(e, r, i) {
|
|
|
444
444
|
}, /**
|
|
445
445
|
* @param {Effect[]} effects
|
|
446
446
|
*/
|
|
447
|
-
|
|
447
|
+
Qr = function(e) {
|
|
448
448
|
for (var r = 0; r < e.length; r += 1)
|
|
449
|
-
|
|
450
|
-
},
|
|
449
|
+
Oo(e[r], u(this, Ot), u(this, We));
|
|
450
|
+
}, Jr = function() {
|
|
451
451
|
var n;
|
|
452
|
-
if (
|
|
452
|
+
if (nr.size > 1) {
|
|
453
453
|
this.previous.clear();
|
|
454
|
-
var e =
|
|
455
|
-
for (const s of
|
|
454
|
+
var e = L, r = be, i = !0;
|
|
455
|
+
for (const s of nr) {
|
|
456
456
|
if (s === this) {
|
|
457
457
|
i = !1;
|
|
458
458
|
continue;
|
|
@@ -474,93 +474,93 @@ Yr = function(e) {
|
|
|
474
474
|
K = [];
|
|
475
475
|
const c = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
476
476
|
for (const d of l)
|
|
477
|
-
|
|
477
|
+
Lo(d, a, c, f);
|
|
478
478
|
if (K.length > 0) {
|
|
479
|
-
|
|
479
|
+
L = s, s.apply();
|
|
480
480
|
for (const d of K)
|
|
481
|
-
|
|
481
|
+
R(n = s, J, Yr).call(n, d, [], []);
|
|
482
482
|
s.deactivate();
|
|
483
483
|
}
|
|
484
484
|
K = o;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
|
|
487
|
+
L = e, be = r;
|
|
488
488
|
}
|
|
489
|
-
u(this,
|
|
489
|
+
u(this, Ie).clear(), nr.delete(this);
|
|
490
490
|
};
|
|
491
|
-
let
|
|
492
|
-
function
|
|
493
|
-
var e =
|
|
494
|
-
|
|
491
|
+
let He = Li;
|
|
492
|
+
function Kt(t) {
|
|
493
|
+
var e = Jt;
|
|
494
|
+
Jt = !0;
|
|
495
495
|
try {
|
|
496
496
|
for (var r; ; ) {
|
|
497
|
-
if (
|
|
498
|
-
return
|
|
497
|
+
if (us(), K.length === 0 && (L?.flush(), K.length === 0))
|
|
498
|
+
return Ar = null, /** @type {T} */
|
|
499
499
|
r;
|
|
500
|
-
|
|
500
|
+
Co();
|
|
501
501
|
}
|
|
502
502
|
} finally {
|
|
503
|
-
|
|
503
|
+
Jt = e;
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Co() {
|
|
507
507
|
var t = null;
|
|
508
508
|
try {
|
|
509
509
|
for (var e = 0; K.length > 0; ) {
|
|
510
|
-
var r =
|
|
510
|
+
var r = He.ensure();
|
|
511
511
|
if (e++ > 1e3) {
|
|
512
512
|
var i, o;
|
|
513
|
-
|
|
513
|
+
ps();
|
|
514
514
|
}
|
|
515
|
-
r.process(K),
|
|
515
|
+
r.process(K), Je.clear();
|
|
516
516
|
}
|
|
517
517
|
} finally {
|
|
518
|
-
K = [],
|
|
518
|
+
K = [], Ar = null, Ft = null;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function ps() {
|
|
522
522
|
try {
|
|
523
|
-
|
|
523
|
+
ts();
|
|
524
524
|
} catch (t) {
|
|
525
|
-
|
|
525
|
+
Ye(t, Ar);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
let
|
|
529
|
-
function
|
|
528
|
+
let De = null;
|
|
529
|
+
function Hi(t) {
|
|
530
530
|
var e = t.length;
|
|
531
531
|
if (e !== 0) {
|
|
532
532
|
for (var r = 0; r < e; ) {
|
|
533
533
|
var i = t[r++];
|
|
534
|
-
if ((i.f & (
|
|
535
|
-
|
|
536
|
-
for (const o of
|
|
537
|
-
if ((o.f & (
|
|
534
|
+
if ((i.f & (Oe | U)) === 0 && or(i) && (De = /* @__PURE__ */ new Set(), Bt(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && Jo(i), De?.size > 0)) {
|
|
535
|
+
Je.clear();
|
|
536
|
+
for (const o of De) {
|
|
537
|
+
if ((o.f & (Oe | U)) !== 0) continue;
|
|
538
538
|
const n = [o];
|
|
539
539
|
let s = o.parent;
|
|
540
540
|
for (; s !== null; )
|
|
541
|
-
|
|
541
|
+
De.has(s) && (De.delete(s), n.push(s)), s = s.parent;
|
|
542
542
|
for (let l = n.length - 1; l >= 0; l--) {
|
|
543
543
|
const a = n[l];
|
|
544
|
-
(a.f & (
|
|
544
|
+
(a.f & (Oe | U)) === 0 && Bt(a);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
|
|
547
|
+
De.clear();
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
|
|
550
|
+
De = null;
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Lo(t, e, r, i) {
|
|
554
554
|
if (!r.has(t) && (r.add(t), t.reactions !== null))
|
|
555
555
|
for (const o of t.reactions) {
|
|
556
556
|
const n = o.f;
|
|
557
|
-
(n & H) !== 0 ?
|
|
557
|
+
(n & H) !== 0 ? Lo(
|
|
558
558
|
/** @type {Derived} */
|
|
559
559
|
o,
|
|
560
560
|
e,
|
|
561
561
|
r,
|
|
562
562
|
i
|
|
563
|
-
) : (n & (
|
|
563
|
+
) : (n & (mi | et)) !== 0 && (n & B) === 0 && Ro(o, e, i) && (M(o, B), $e(
|
|
564
564
|
/** @type {Effect} */
|
|
565
565
|
o
|
|
566
566
|
));
|
|
@@ -571,7 +571,7 @@ function Ro(t, e, r) {
|
|
|
571
571
|
if (i !== void 0) return i;
|
|
572
572
|
if (t.deps !== null)
|
|
573
573
|
for (const o of t.deps) {
|
|
574
|
-
if (
|
|
574
|
+
if (xt.call(e, o))
|
|
575
575
|
return !0;
|
|
576
576
|
if ((o.f & H) !== 0 && Ro(
|
|
577
577
|
/** @type {Derived} */
|
|
@@ -587,18 +587,18 @@ function Ro(t, e, r) {
|
|
|
587
587
|
}
|
|
588
588
|
return r.set(t, !1), !1;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
591
|
-
var e =
|
|
592
|
-
if (r?.is_pending && (t.f & (
|
|
590
|
+
function $e(t) {
|
|
591
|
+
var e = Ar = t, r = e.b;
|
|
592
|
+
if (r?.is_pending && (t.f & (Ht | Dt | vi)) !== 0 && (t.f & gt) === 0) {
|
|
593
593
|
r.defer_effect(t);
|
|
594
594
|
return;
|
|
595
595
|
}
|
|
596
596
|
for (; e.parent !== null; ) {
|
|
597
597
|
e = e.parent;
|
|
598
598
|
var i = e.f;
|
|
599
|
-
if (
|
|
599
|
+
if (Ft !== null && e === A && (t.f & Dt) === 0)
|
|
600
600
|
return;
|
|
601
|
-
if ((i & (
|
|
601
|
+
if ((i & (tt | we)) !== 0) {
|
|
602
602
|
if ((i & q) === 0)
|
|
603
603
|
return;
|
|
604
604
|
e.f ^= q;
|
|
@@ -606,29 +606,29 @@ function Ee(t) {
|
|
|
606
606
|
}
|
|
607
607
|
K.push(e);
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
if (!((t.f &
|
|
611
|
-
(t.f & B) !== 0 ? e.d.push(t) : (t.f &
|
|
609
|
+
function Po(t, e) {
|
|
610
|
+
if (!((t.f & we) !== 0 && (t.f & q) !== 0)) {
|
|
611
|
+
(t.f & B) !== 0 ? e.d.push(t) : (t.f & _e) !== 0 && e.m.push(t), M(t, q);
|
|
612
612
|
for (var r = t.first; r !== null; )
|
|
613
|
-
|
|
613
|
+
Po(r, e), r = r.next;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
function
|
|
617
|
-
let e = 0, r =
|
|
616
|
+
function hs(t) {
|
|
617
|
+
let e = 0, r = vt(0), i;
|
|
618
618
|
return () => {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
e -= 1, e === 0 && (i?.(), i = void 0,
|
|
619
|
+
wi() && (v(r), ki(() => (e === 0 && (i = Ei(() => t(() => Xt(r)))), e += 1, () => {
|
|
620
|
+
ft(() => {
|
|
621
|
+
e -= 1, e === 0 && (i?.(), i = void 0, Xt(r));
|
|
622
622
|
});
|
|
623
623
|
})));
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
var
|
|
627
|
-
function
|
|
628
|
-
new
|
|
626
|
+
var vs = Nt | bt;
|
|
627
|
+
function ms(t, e, r, i) {
|
|
628
|
+
new gs(t, e, r, i);
|
|
629
629
|
}
|
|
630
|
-
var Z,
|
|
631
|
-
class
|
|
630
|
+
var Z, er, Ae, at, W, Se, ee, me, Ne, ct, Ke, Lt, Rt, Pt, Ve, yr, P, Mo, xo, Do, Xr, ur, fr, Zr;
|
|
631
|
+
class gs {
|
|
632
632
|
/**
|
|
633
633
|
* @param {TemplateNode} node
|
|
634
634
|
* @param {BoundaryProps} props
|
|
@@ -649,11 +649,11 @@ class ms {
|
|
|
649
649
|
/** @type {TemplateNode} */
|
|
650
650
|
k(this, Z);
|
|
651
651
|
/** @type {TemplateNode | null} */
|
|
652
|
-
k(this,
|
|
652
|
+
k(this, er, E ? I : null);
|
|
653
653
|
/** @type {BoundaryProps} */
|
|
654
|
-
k(this,
|
|
654
|
+
k(this, Ae);
|
|
655
655
|
/** @type {((anchor: Node) => void)} */
|
|
656
|
-
k(this,
|
|
656
|
+
k(this, at);
|
|
657
657
|
/** @type {Effect} */
|
|
658
658
|
k(this, W);
|
|
659
659
|
/** @type {Effect | null} */
|
|
@@ -661,16 +661,16 @@ class ms {
|
|
|
661
661
|
/** @type {Effect | null} */
|
|
662
662
|
k(this, ee, null);
|
|
663
663
|
/** @type {Effect | null} */
|
|
664
|
-
k(this,
|
|
664
|
+
k(this, me, null);
|
|
665
665
|
/** @type {DocumentFragment | null} */
|
|
666
666
|
k(this, Ne, null);
|
|
667
|
-
k(this,
|
|
668
|
-
k(this,
|
|
669
|
-
k(this,
|
|
667
|
+
k(this, ct, 0);
|
|
668
|
+
k(this, Ke, 0);
|
|
669
|
+
k(this, Lt, !1);
|
|
670
670
|
/** @type {Set<Effect>} */
|
|
671
671
|
k(this, Rt, /* @__PURE__ */ new Set());
|
|
672
672
|
/** @type {Set<Effect>} */
|
|
673
|
-
k(this,
|
|
673
|
+
k(this, Pt, /* @__PURE__ */ new Set());
|
|
674
674
|
/**
|
|
675
675
|
* A source containing the number of pending async deriveds/expressions.
|
|
676
676
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -678,39 +678,39 @@ class ms {
|
|
|
678
678
|
* calls followed by no-op flushes
|
|
679
679
|
* @type {Source<number> | null}
|
|
680
680
|
*/
|
|
681
|
-
k(this,
|
|
682
|
-
k(this,
|
|
683
|
-
_(this,
|
|
681
|
+
k(this, Ve, null);
|
|
682
|
+
k(this, yr, hs(() => (_(this, Ve, vt(u(this, ct))), () => {
|
|
683
|
+
_(this, Ve, null);
|
|
684
684
|
})));
|
|
685
|
-
_(this, Z, e), _(this,
|
|
685
|
+
_(this, Z, e), _(this, Ae, r), _(this, at, (n) => {
|
|
686
686
|
var s = (
|
|
687
687
|
/** @type {Effect} */
|
|
688
|
-
|
|
688
|
+
A
|
|
689
689
|
);
|
|
690
|
-
s.b = this, s.f |=
|
|
690
|
+
s.b = this, s.f |= Gr, i(n);
|
|
691
691
|
}), this.parent = /** @type {Effect} */
|
|
692
|
-
|
|
692
|
+
A.b, this.transform_error = o ?? this.parent?.transform_error ?? ((n) => n), _(this, W, Ti(() => {
|
|
693
693
|
if (E) {
|
|
694
694
|
const n = (
|
|
695
695
|
/** @type {Comment} */
|
|
696
|
-
u(this,
|
|
696
|
+
u(this, er)
|
|
697
697
|
);
|
|
698
|
-
|
|
699
|
-
const s = n.data ===
|
|
700
|
-
if (n.data.startsWith(
|
|
701
|
-
const a = JSON.parse(n.data.slice(
|
|
702
|
-
|
|
703
|
-
} else s ?
|
|
698
|
+
Ir();
|
|
699
|
+
const s = n.data === pi;
|
|
700
|
+
if (n.data.startsWith(Fi)) {
|
|
701
|
+
const a = JSON.parse(n.data.slice(Fi.length));
|
|
702
|
+
R(this, P, xo).call(this, a);
|
|
703
|
+
} else s ? R(this, P, Do).call(this) : R(this, P, Mo).call(this);
|
|
704
704
|
} else
|
|
705
|
-
|
|
706
|
-
},
|
|
705
|
+
R(this, P, Xr).call(this);
|
|
706
|
+
}, vs)), E && _(this, Z, I);
|
|
707
707
|
}
|
|
708
708
|
/**
|
|
709
709
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
710
710
|
* @param {Effect} effect
|
|
711
711
|
*/
|
|
712
712
|
defer_effect(e) {
|
|
713
|
-
|
|
713
|
+
Oo(e, u(this, Rt), u(this, Pt));
|
|
714
714
|
}
|
|
715
715
|
/**
|
|
716
716
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -720,7 +720,7 @@ class ms {
|
|
|
720
720
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
721
721
|
}
|
|
722
722
|
has_pending_snippet() {
|
|
723
|
-
return !!u(this,
|
|
723
|
+
return !!u(this, Ae).pending;
|
|
724
724
|
}
|
|
725
725
|
/**
|
|
726
726
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -729,59 +729,59 @@ class ms {
|
|
|
729
729
|
* @param {1 | -1} d
|
|
730
730
|
*/
|
|
731
731
|
update_pending_count(e) {
|
|
732
|
-
|
|
733
|
-
_(this,
|
|
732
|
+
R(this, P, Zr).call(this, e), _(this, ct, u(this, ct) + e), !(!u(this, Ve) || u(this, Lt)) && (_(this, Lt, !0), ft(() => {
|
|
733
|
+
_(this, Lt, !1), u(this, Ve) && qt(u(this, Ve), u(this, ct));
|
|
734
734
|
}));
|
|
735
735
|
}
|
|
736
736
|
get_effect_pending() {
|
|
737
|
-
return u(this,
|
|
737
|
+
return u(this, yr).call(this), v(
|
|
738
738
|
/** @type {Source<number>} */
|
|
739
|
-
u(this,
|
|
739
|
+
u(this, Ve)
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
742
|
/** @param {unknown} error */
|
|
743
743
|
error(e) {
|
|
744
|
-
var r = u(this,
|
|
745
|
-
let i = u(this,
|
|
744
|
+
var r = u(this, Ae).onerror;
|
|
745
|
+
let i = u(this, Ae).failed;
|
|
746
746
|
if (!r && !i)
|
|
747
747
|
throw e;
|
|
748
|
-
u(this, Se) && (G(u(this, Se)), _(this, Se, null)), u(this, ee) && (G(u(this, ee)), _(this, ee, null)), u(this,
|
|
748
|
+
u(this, Se) && (G(u(this, Se)), _(this, Se, null)), u(this, ee) && (G(u(this, ee)), _(this, ee, null)), u(this, me) && (G(u(this, me)), _(this, me, null)), E && (Q(
|
|
749
749
|
/** @type {TemplateNode} */
|
|
750
|
-
u(this,
|
|
751
|
-
),
|
|
750
|
+
u(this, er)
|
|
751
|
+
), yo(), Q(br()));
|
|
752
752
|
var o = !1, n = !1;
|
|
753
753
|
const s = () => {
|
|
754
754
|
if (o) {
|
|
755
|
-
|
|
755
|
+
ls();
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
o = !0, n &&
|
|
759
|
-
_(this,
|
|
760
|
-
}),
|
|
761
|
-
|
|
758
|
+
o = !0, n && ss(), u(this, me) !== null && dt(u(this, me), () => {
|
|
759
|
+
_(this, me, null);
|
|
760
|
+
}), R(this, P, fr).call(this, () => {
|
|
761
|
+
He.ensure(), R(this, P, Xr).call(this);
|
|
762
762
|
});
|
|
763
763
|
}, l = (a) => {
|
|
764
764
|
try {
|
|
765
765
|
n = !0, r?.(a, s), n = !1;
|
|
766
766
|
} catch (c) {
|
|
767
|
-
|
|
767
|
+
Ye(c, u(this, W) && u(this, W).parent);
|
|
768
768
|
}
|
|
769
|
-
i && _(this,
|
|
770
|
-
|
|
769
|
+
i && _(this, me, R(this, P, fr).call(this, () => {
|
|
770
|
+
He.ensure();
|
|
771
771
|
try {
|
|
772
|
-
return
|
|
772
|
+
return ue(() => {
|
|
773
773
|
var c = (
|
|
774
774
|
/** @type {Effect} */
|
|
775
|
-
|
|
775
|
+
A
|
|
776
776
|
);
|
|
777
|
-
c.b = this, c.f |=
|
|
777
|
+
c.b = this, c.f |= Gr, i(
|
|
778
778
|
u(this, Z),
|
|
779
779
|
() => a,
|
|
780
780
|
() => s
|
|
781
781
|
);
|
|
782
782
|
});
|
|
783
783
|
} catch (c) {
|
|
784
|
-
return
|
|
784
|
+
return Ye(
|
|
785
785
|
c,
|
|
786
786
|
/** @type {Effect} */
|
|
787
787
|
u(this, W).parent
|
|
@@ -789,35 +789,35 @@ class ms {
|
|
|
789
789
|
}
|
|
790
790
|
}));
|
|
791
791
|
};
|
|
792
|
-
|
|
792
|
+
ft(() => {
|
|
793
793
|
var a;
|
|
794
794
|
try {
|
|
795
795
|
a = this.transform_error(e);
|
|
796
796
|
} catch (c) {
|
|
797
|
-
|
|
797
|
+
Ye(c, u(this, W) && u(this, W).parent);
|
|
798
798
|
return;
|
|
799
799
|
}
|
|
800
800
|
a !== null && typeof a == "object" && typeof /** @type {any} */
|
|
801
801
|
a.then == "function" ? a.then(
|
|
802
802
|
l,
|
|
803
803
|
/** @param {unknown} e */
|
|
804
|
-
(c) =>
|
|
804
|
+
(c) => Ye(c, u(this, W) && u(this, W).parent)
|
|
805
805
|
) : l(a);
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
Z = new WeakMap(),
|
|
809
|
+
Z = new WeakMap(), er = new WeakMap(), Ae = new WeakMap(), at = new WeakMap(), W = new WeakMap(), Se = new WeakMap(), ee = new WeakMap(), me = new WeakMap(), Ne = new WeakMap(), ct = new WeakMap(), Ke = new WeakMap(), Lt = new WeakMap(), Rt = new WeakMap(), Pt = new WeakMap(), Ve = new WeakMap(), yr = new WeakMap(), P = new WeakSet(), Mo = function() {
|
|
810
810
|
try {
|
|
811
|
-
_(this, Se,
|
|
811
|
+
_(this, Se, ue(() => u(this, at).call(this, u(this, Z))));
|
|
812
812
|
} catch (e) {
|
|
813
813
|
this.error(e);
|
|
814
814
|
}
|
|
815
815
|
}, /**
|
|
816
816
|
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
817
817
|
*/
|
|
818
|
-
|
|
819
|
-
const r = u(this,
|
|
820
|
-
r && _(this,
|
|
818
|
+
xo = function(e) {
|
|
819
|
+
const r = u(this, Ae).failed;
|
|
820
|
+
r && _(this, me, ue(() => {
|
|
821
821
|
r(
|
|
822
822
|
u(this, Z),
|
|
823
823
|
() => e,
|
|
@@ -825,72 +825,72 @@ Mo = function(e) {
|
|
|
825
825
|
}
|
|
826
826
|
);
|
|
827
827
|
}));
|
|
828
|
-
},
|
|
829
|
-
const e = u(this,
|
|
830
|
-
e && (this.is_pending = !0, _(this, ee,
|
|
831
|
-
var r = _(this, Ne, document.createDocumentFragment()), i =
|
|
832
|
-
r.append(i), _(this, Se,
|
|
828
|
+
}, Do = function() {
|
|
829
|
+
const e = u(this, Ae).pending;
|
|
830
|
+
e && (this.is_pending = !0, _(this, ee, ue(() => e(u(this, Z)))), ft(() => {
|
|
831
|
+
var r = _(this, Ne, document.createDocumentFragment()), i = de();
|
|
832
|
+
r.append(i), _(this, Se, R(this, P, fr).call(this, () => (He.ensure(), ue(() => u(this, at).call(this, i))))), u(this, Ke) === 0 && (u(this, Z).before(r), _(this, Ne, null), dt(
|
|
833
833
|
/** @type {Effect} */
|
|
834
834
|
u(this, ee),
|
|
835
835
|
() => {
|
|
836
836
|
_(this, ee, null);
|
|
837
837
|
}
|
|
838
|
-
),
|
|
838
|
+
), R(this, P, ur).call(this));
|
|
839
839
|
}));
|
|
840
|
-
},
|
|
840
|
+
}, Xr = function() {
|
|
841
841
|
try {
|
|
842
|
-
if (this.is_pending = this.has_pending_snippet(), _(this,
|
|
843
|
-
u(this,
|
|
844
|
-
})), u(this,
|
|
842
|
+
if (this.is_pending = this.has_pending_snippet(), _(this, Ke, 0), _(this, ct, 0), _(this, Se, ue(() => {
|
|
843
|
+
u(this, at).call(this, u(this, Z));
|
|
844
|
+
})), u(this, Ke) > 0) {
|
|
845
845
|
var e = _(this, Ne, document.createDocumentFragment());
|
|
846
846
|
Si(u(this, Se), e);
|
|
847
847
|
const r = (
|
|
848
848
|
/** @type {(anchor: Node) => void} */
|
|
849
|
-
u(this,
|
|
849
|
+
u(this, Ae).pending
|
|
850
850
|
);
|
|
851
|
-
_(this, ee,
|
|
851
|
+
_(this, ee, ue(() => r(u(this, Z))));
|
|
852
852
|
} else
|
|
853
|
-
|
|
853
|
+
R(this, P, ur).call(this);
|
|
854
854
|
} catch (r) {
|
|
855
855
|
this.error(r);
|
|
856
856
|
}
|
|
857
|
-
},
|
|
857
|
+
}, ur = function() {
|
|
858
858
|
this.is_pending = !1;
|
|
859
859
|
for (const e of u(this, Rt))
|
|
860
|
-
M(e, B),
|
|
861
|
-
for (const e of u(this,
|
|
862
|
-
M(e,
|
|
863
|
-
u(this, Rt).clear(), u(this,
|
|
860
|
+
M(e, B), $e(e);
|
|
861
|
+
for (const e of u(this, Pt))
|
|
862
|
+
M(e, _e), $e(e);
|
|
863
|
+
u(this, Rt).clear(), u(this, Pt).clear();
|
|
864
864
|
}, /**
|
|
865
865
|
* @template T
|
|
866
866
|
* @param {() => T} fn
|
|
867
867
|
*/
|
|
868
|
-
|
|
869
|
-
var r =
|
|
870
|
-
|
|
868
|
+
fr = function(e) {
|
|
869
|
+
var r = A, i = T, o = ie;
|
|
870
|
+
Ce(u(this, W)), he(u(this, W)), Vt(u(this, W).ctx);
|
|
871
871
|
try {
|
|
872
872
|
return e();
|
|
873
873
|
} catch (n) {
|
|
874
|
-
return
|
|
874
|
+
return Eo(n), null;
|
|
875
875
|
} finally {
|
|
876
|
-
|
|
876
|
+
Ce(r), he(i), Vt(o);
|
|
877
877
|
}
|
|
878
878
|
}, /**
|
|
879
879
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
880
880
|
* if any, such that we can replace the snippet with content once work is done
|
|
881
881
|
* @param {1 | -1} d
|
|
882
882
|
*/
|
|
883
|
-
|
|
883
|
+
Zr = function(e) {
|
|
884
884
|
var r;
|
|
885
885
|
if (!this.has_pending_snippet()) {
|
|
886
|
-
this.parent &&
|
|
886
|
+
this.parent && R(r = this.parent, P, Zr).call(r, e);
|
|
887
887
|
return;
|
|
888
888
|
}
|
|
889
|
-
_(this,
|
|
889
|
+
_(this, Ke, u(this, Ke) + e), u(this, Ke) === 0 && (R(this, P, ur).call(this), u(this, ee) && dt(u(this, ee), () => {
|
|
890
890
|
_(this, ee, null);
|
|
891
891
|
}), u(this, Ne) && (u(this, Z).before(u(this, Ne)), _(this, Ne, null)));
|
|
892
892
|
};
|
|
893
|
-
function
|
|
893
|
+
function bs(t, e, r, i) {
|
|
894
894
|
const o = Sr;
|
|
895
895
|
var n = t.filter((d) => !d.settled);
|
|
896
896
|
if (r.length === 0 && n.length === 0) {
|
|
@@ -899,43 +899,43 @@ function gs(t, e, r, i) {
|
|
|
899
899
|
}
|
|
900
900
|
var s = (
|
|
901
901
|
/** @type {Effect} */
|
|
902
|
-
|
|
903
|
-
), l =
|
|
902
|
+
A
|
|
903
|
+
), l = ys(), a = n.length === 1 ? n[0].promise : n.length > 1 ? Promise.all(n.map((d) => d.promise)) : null;
|
|
904
904
|
function c(d) {
|
|
905
905
|
l();
|
|
906
906
|
try {
|
|
907
907
|
i(d);
|
|
908
908
|
} catch (m) {
|
|
909
|
-
(s.f &
|
|
909
|
+
(s.f & Oe) === 0 && Ye(m, s);
|
|
910
910
|
}
|
|
911
|
-
|
|
911
|
+
ei();
|
|
912
912
|
}
|
|
913
913
|
if (r.length === 0) {
|
|
914
914
|
a.then(() => c(e.map(o)));
|
|
915
915
|
return;
|
|
916
916
|
}
|
|
917
917
|
function f() {
|
|
918
|
-
l(), Promise.all(r.map((d) => /* @__PURE__ */
|
|
918
|
+
l(), Promise.all(r.map((d) => /* @__PURE__ */ ws(d))).then((d) => c([...e.map(o), ...d])).catch((d) => Ye(d, s));
|
|
919
919
|
}
|
|
920
920
|
a ? a.then(f) : f();
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
var t =
|
|
922
|
+
function ys() {
|
|
923
|
+
var t = A, e = T, r = ie, i = L;
|
|
924
924
|
return function(n = !0) {
|
|
925
|
-
|
|
925
|
+
Ce(t), he(e), Vt(r), n && i?.activate();
|
|
926
926
|
};
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
|
|
928
|
+
function ei(t = !0) {
|
|
929
|
+
Ce(null), he(null), Vt(null), t && L?.deactivate();
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function _s() {
|
|
932
932
|
var t = (
|
|
933
933
|
/** @type {Boundary} */
|
|
934
934
|
/** @type {Effect} */
|
|
935
|
-
|
|
935
|
+
A.b
|
|
936
936
|
), e = (
|
|
937
937
|
/** @type {Batch} */
|
|
938
|
-
|
|
938
|
+
L
|
|
939
939
|
), r = t.is_rendered();
|
|
940
940
|
return t.update_pending_count(1), e.increment(r), () => {
|
|
941
941
|
t.update_pending_count(-1), e.decrement(r);
|
|
@@ -947,11 +947,11 @@ function Sr(t) {
|
|
|
947
947
|
/** @type {Derived} */
|
|
948
948
|
T
|
|
949
949
|
) : null;
|
|
950
|
-
return
|
|
950
|
+
return A !== null && (A.f |= bt), {
|
|
951
951
|
ctx: ie,
|
|
952
952
|
deps: null,
|
|
953
953
|
effects: null,
|
|
954
|
-
equals:
|
|
954
|
+
equals: wo,
|
|
955
955
|
f: e,
|
|
956
956
|
fn: t,
|
|
957
957
|
reactions: null,
|
|
@@ -961,54 +961,54 @@ function Sr(t) {
|
|
|
961
961
|
F
|
|
962
962
|
),
|
|
963
963
|
wv: 0,
|
|
964
|
-
parent: r ??
|
|
964
|
+
parent: r ?? A,
|
|
965
965
|
ac: null
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
968
|
// @__NO_SIDE_EFFECTS__
|
|
969
|
-
function
|
|
969
|
+
function ws(t, e, r) {
|
|
970
970
|
/** @type {Effect | null} */
|
|
971
|
-
|
|
971
|
+
A === null && Qn();
|
|
972
972
|
var o = (
|
|
973
973
|
/** @type {Promise<V>} */
|
|
974
974
|
/** @type {unknown} */
|
|
975
975
|
void 0
|
|
976
|
-
), n =
|
|
976
|
+
), n = vt(
|
|
977
977
|
/** @type {V} */
|
|
978
978
|
F
|
|
979
979
|
), s = !T, l = /* @__PURE__ */ new Map();
|
|
980
|
-
return
|
|
981
|
-
var a =
|
|
980
|
+
return Ps(() => {
|
|
981
|
+
var a = bo();
|
|
982
982
|
o = a.promise;
|
|
983
983
|
try {
|
|
984
|
-
Promise.resolve(t()).then(a.resolve, a.reject).finally(
|
|
984
|
+
Promise.resolve(t()).then(a.resolve, a.reject).finally(ei);
|
|
985
985
|
} catch (m) {
|
|
986
|
-
a.reject(m),
|
|
986
|
+
a.reject(m), ei();
|
|
987
987
|
}
|
|
988
988
|
var c = (
|
|
989
989
|
/** @type {Batch} */
|
|
990
|
-
|
|
990
|
+
L
|
|
991
991
|
);
|
|
992
992
|
if (s) {
|
|
993
|
-
var f =
|
|
994
|
-
l.get(c)?.reject(
|
|
993
|
+
var f = _s();
|
|
994
|
+
l.get(c)?.reject(it), l.delete(c), l.set(c, a);
|
|
995
995
|
}
|
|
996
996
|
const d = (m, y = void 0) => {
|
|
997
997
|
if (c.activate(), y)
|
|
998
|
-
y !==
|
|
998
|
+
y !== it && (n.f |= Qe, qt(n, y));
|
|
999
999
|
else {
|
|
1000
|
-
(n.f &
|
|
1001
|
-
for (const [p,
|
|
1000
|
+
(n.f & Qe) !== 0 && (n.f ^= Qe), qt(n, m);
|
|
1001
|
+
for (const [p, S] of l) {
|
|
1002
1002
|
if (l.delete(p), p === c) break;
|
|
1003
|
-
|
|
1003
|
+
S.reject(it);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
1006
|
f && f();
|
|
1007
1007
|
};
|
|
1008
1008
|
a.promise.then(d, (m) => d(null, m || "unknown"));
|
|
1009
|
-
}),
|
|
1009
|
+
}), Cs(() => {
|
|
1010
1010
|
for (const a of l.values())
|
|
1011
|
-
a.reject(
|
|
1011
|
+
a.reject(it);
|
|
1012
1012
|
}), new Promise((a) => {
|
|
1013
1013
|
function c(f) {
|
|
1014
1014
|
function d() {
|
|
@@ -1020,16 +1020,16 @@ function _s(t, e, r) {
|
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
1022
|
// @__NO_SIDE_EFFECTS__
|
|
1023
|
-
function
|
|
1023
|
+
function qr(t) {
|
|
1024
1024
|
const e = /* @__PURE__ */ Sr(t);
|
|
1025
|
-
return
|
|
1025
|
+
return en(e), e;
|
|
1026
1026
|
}
|
|
1027
1027
|
// @__NO_SIDE_EFFECTS__
|
|
1028
|
-
function
|
|
1028
|
+
function ks(t) {
|
|
1029
1029
|
const e = /* @__PURE__ */ Sr(t);
|
|
1030
|
-
return e.equals =
|
|
1030
|
+
return e.equals = ko, e;
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function Ts(t) {
|
|
1033
1033
|
var e = t.effects;
|
|
1034
1034
|
if (e !== null) {
|
|
1035
1035
|
t.effects = null;
|
|
@@ -1040,10 +1040,10 @@ function ks(t) {
|
|
|
1040
1040
|
);
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function Is(t) {
|
|
1044
1044
|
for (var e = t.parent; e !== null; ) {
|
|
1045
1045
|
if ((e.f & H) === 0)
|
|
1046
|
-
return (e.f &
|
|
1046
|
+
return (e.f & Oe) === 0 ? (
|
|
1047
1047
|
/** @type {Effect} */
|
|
1048
1048
|
e
|
|
1049
1049
|
) : null;
|
|
@@ -1051,44 +1051,44 @@ function Ts(t) {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
return null;
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1055
|
-
var e, r =
|
|
1056
|
-
|
|
1054
|
+
function bi(t) {
|
|
1055
|
+
var e, r = A;
|
|
1056
|
+
Ce(Is(t));
|
|
1057
1057
|
try {
|
|
1058
|
-
t.f &= ~
|
|
1058
|
+
t.f &= ~ht, Ts(t), e = nn(t);
|
|
1059
1059
|
} finally {
|
|
1060
|
-
|
|
1060
|
+
Ce(r);
|
|
1061
1061
|
}
|
|
1062
1062
|
return e;
|
|
1063
1063
|
}
|
|
1064
1064
|
function No(t) {
|
|
1065
|
-
var e =
|
|
1066
|
-
if (!t.equals(e) && (t.wv =
|
|
1065
|
+
var e = bi(t);
|
|
1066
|
+
if (!t.equals(e) && (t.wv = rn(), (!L?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1067
1067
|
M(t, q);
|
|
1068
1068
|
return;
|
|
1069
1069
|
}
|
|
1070
|
-
|
|
1070
|
+
Ze || (be !== null ? (wi() || L?.is_fork) && be.set(t, e) : gi(t));
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1072
|
+
function As(t) {
|
|
1073
1073
|
if (t.effects !== null)
|
|
1074
1074
|
for (const e of t.effects)
|
|
1075
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(
|
|
1075
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(it), e.teardown = Hn, e.ac = null, Zt(e, 0), Ii(e));
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1077
|
+
function Vo(t) {
|
|
1078
1078
|
if (t.effects !== null)
|
|
1079
1079
|
for (const e of t.effects)
|
|
1080
|
-
e.teardown &&
|
|
1080
|
+
e.teardown && Bt(e);
|
|
1081
1081
|
}
|
|
1082
|
-
let
|
|
1083
|
-
const
|
|
1084
|
-
let
|
|
1085
|
-
function
|
|
1082
|
+
let ti = /* @__PURE__ */ new Set();
|
|
1083
|
+
const Je = /* @__PURE__ */ new Map();
|
|
1084
|
+
let Fo = !1;
|
|
1085
|
+
function vt(t, e) {
|
|
1086
1086
|
var r = {
|
|
1087
1087
|
f: 0,
|
|
1088
1088
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1089
1089
|
v: t,
|
|
1090
1090
|
reactions: null,
|
|
1091
|
-
equals:
|
|
1091
|
+
equals: wo,
|
|
1092
1092
|
rv: 0,
|
|
1093
1093
|
wv: 0
|
|
1094
1094
|
};
|
|
@@ -1096,47 +1096,47 @@ function ht(t, e) {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
// @__NO_SIDE_EFFECTS__
|
|
1098
1098
|
function re(t, e) {
|
|
1099
|
-
const r =
|
|
1100
|
-
return
|
|
1099
|
+
const r = vt(t);
|
|
1100
|
+
return en(r), r;
|
|
1101
1101
|
}
|
|
1102
1102
|
// @__NO_SIDE_EFFECTS__
|
|
1103
|
-
function
|
|
1104
|
-
const i =
|
|
1105
|
-
return e || (i.equals =
|
|
1103
|
+
function qo(t, e = !1, r = !0) {
|
|
1104
|
+
const i = vt(t);
|
|
1105
|
+
return e || (i.equals = ko), i;
|
|
1106
1106
|
}
|
|
1107
1107
|
function V(t, e, r = !1) {
|
|
1108
1108
|
T !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1109
1109
|
// to ensure we error if state is set inside an inspect effect
|
|
1110
|
-
(!
|
|
1111
|
-
let i = r ?
|
|
1112
|
-
return
|
|
1110
|
+
(!ye || (T.f & Bi) !== 0) && Ao() && (T.f & (H | et | mi | Bi)) !== 0 && (pe === null || !xt.call(pe, t)) && ns();
|
|
1111
|
+
let i = r ? Yt(e) : e;
|
|
1112
|
+
return qt(t, i);
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1114
|
+
function qt(t, e) {
|
|
1115
1115
|
if (!t.equals(e)) {
|
|
1116
1116
|
var r = t.v;
|
|
1117
|
-
|
|
1118
|
-
var i =
|
|
1117
|
+
Ze ? Je.set(t, e) : Je.set(t, r), t.v = e;
|
|
1118
|
+
var i = He.ensure();
|
|
1119
1119
|
if (i.capture(t, r), (t.f & H) !== 0) {
|
|
1120
1120
|
const o = (
|
|
1121
1121
|
/** @type {Derived} */
|
|
1122
1122
|
t
|
|
1123
1123
|
);
|
|
1124
|
-
(t.f & B) !== 0 &&
|
|
1124
|
+
(t.f & B) !== 0 && bi(o), gi(o);
|
|
1125
1125
|
}
|
|
1126
|
-
t.wv =
|
|
1126
|
+
t.wv = rn(), Bo(t, B), A !== null && (A.f & q) !== 0 && (A.f & (we | tt)) === 0 && (ae === null ? Ds([t]) : ae.push(t)), !i.is_fork && ti.size > 0 && !Fo && Ss();
|
|
1127
1127
|
}
|
|
1128
1128
|
return e;
|
|
1129
1129
|
}
|
|
1130
1130
|
function Ss() {
|
|
1131
|
-
|
|
1132
|
-
for (const t of
|
|
1133
|
-
(t.f & q) !== 0 && M(t,
|
|
1134
|
-
|
|
1131
|
+
Fo = !1;
|
|
1132
|
+
for (const t of ti)
|
|
1133
|
+
(t.f & q) !== 0 && M(t, _e), or(t) && Bt(t);
|
|
1134
|
+
ti.clear();
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function Xt(t) {
|
|
1137
1137
|
V(t, t.v + 1);
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function Bo(t, e) {
|
|
1140
1140
|
var r = t.reactions;
|
|
1141
1141
|
if (r !== null)
|
|
1142
1142
|
for (var i = r.length, o = 0; o < i; o++) {
|
|
@@ -1146,29 +1146,29 @@ function qo(t, e) {
|
|
|
1146
1146
|
/** @type {Derived} */
|
|
1147
1147
|
n
|
|
1148
1148
|
);
|
|
1149
|
-
|
|
1150
|
-
} else l && ((s &
|
|
1149
|
+
be?.delete(a), (s & ht) === 0 && (s & fe && (n.f |= ht), Bo(a, _e));
|
|
1150
|
+
} else l && ((s & et) !== 0 && De !== null && De.add(
|
|
1151
1151
|
/** @type {Effect} */
|
|
1152
1152
|
n
|
|
1153
|
-
),
|
|
1153
|
+
), $e(
|
|
1154
1154
|
/** @type {Effect} */
|
|
1155
1155
|
n
|
|
1156
1156
|
));
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1160
|
-
if (typeof t != "object" || t === null ||
|
|
1159
|
+
function Yt(t) {
|
|
1160
|
+
if (typeof t != "object" || t === null || cr in t)
|
|
1161
1161
|
return t;
|
|
1162
|
-
const e =
|
|
1163
|
-
if (e !==
|
|
1162
|
+
const e = go(t);
|
|
1163
|
+
if (e !== qn && e !== Bn)
|
|
1164
1164
|
return t;
|
|
1165
|
-
var r = /* @__PURE__ */ new Map(), i =
|
|
1166
|
-
if (
|
|
1165
|
+
var r = /* @__PURE__ */ new Map(), i = mo(t), o = /* @__PURE__ */ re(0), n = pt, s = (l) => {
|
|
1166
|
+
if (pt === n)
|
|
1167
1167
|
return l();
|
|
1168
|
-
var a = T, c =
|
|
1169
|
-
|
|
1168
|
+
var a = T, c = pt;
|
|
1169
|
+
he(null), Gi(n);
|
|
1170
1170
|
var f = l();
|
|
1171
|
-
return
|
|
1171
|
+
return he(a), Gi(c), f;
|
|
1172
1172
|
};
|
|
1173
1173
|
return i && r.set("length", /* @__PURE__ */ re(
|
|
1174
1174
|
/** @type {any[]} */
|
|
@@ -1178,7 +1178,7 @@ function Kt(t) {
|
|
|
1178
1178
|
t,
|
|
1179
1179
|
{
|
|
1180
1180
|
defineProperty(l, a, c) {
|
|
1181
|
-
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) &&
|
|
1181
|
+
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && is();
|
|
1182
1182
|
var f = r.get(a);
|
|
1183
1183
|
return f === void 0 ? s(() => {
|
|
1184
1184
|
var d = /* @__PURE__ */ re(c.value);
|
|
@@ -1190,18 +1190,18 @@ function Kt(t) {
|
|
|
1190
1190
|
if (c === void 0) {
|
|
1191
1191
|
if (a in l) {
|
|
1192
1192
|
const f = s(() => /* @__PURE__ */ re(F));
|
|
1193
|
-
r.set(a, f),
|
|
1193
|
+
r.set(a, f), Xt(o);
|
|
1194
1194
|
}
|
|
1195
1195
|
} else
|
|
1196
|
-
V(c, F),
|
|
1196
|
+
V(c, F), Xt(o);
|
|
1197
1197
|
return !0;
|
|
1198
1198
|
},
|
|
1199
1199
|
get(l, a, c) {
|
|
1200
|
-
if (a ===
|
|
1200
|
+
if (a === cr)
|
|
1201
1201
|
return t;
|
|
1202
1202
|
var f = r.get(a), d = a in l;
|
|
1203
|
-
if (f === void 0 && (!d ||
|
|
1204
|
-
var y =
|
|
1203
|
+
if (f === void 0 && (!d || At(l, a)?.writable) && (f = s(() => {
|
|
1204
|
+
var y = Yt(d ? l[a] : F), p = /* @__PURE__ */ re(y);
|
|
1205
1205
|
return p;
|
|
1206
1206
|
}), r.set(a, f)), f !== void 0) {
|
|
1207
1207
|
var m = v(f);
|
|
@@ -1227,12 +1227,12 @@ function Kt(t) {
|
|
|
1227
1227
|
return c;
|
|
1228
1228
|
},
|
|
1229
1229
|
has(l, a) {
|
|
1230
|
-
if (a ===
|
|
1230
|
+
if (a === cr)
|
|
1231
1231
|
return !0;
|
|
1232
1232
|
var c = r.get(a), f = c !== void 0 && c.v !== F || Reflect.has(l, a);
|
|
1233
|
-
if (c !== void 0 ||
|
|
1233
|
+
if (c !== void 0 || A !== null && (!f || At(l, a)?.writable)) {
|
|
1234
1234
|
c === void 0 && (c = s(() => {
|
|
1235
|
-
var m = f ?
|
|
1235
|
+
var m = f ? Yt(l[a]) : F, y = /* @__PURE__ */ re(m);
|
|
1236
1236
|
return y;
|
|
1237
1237
|
}), r.set(a, c));
|
|
1238
1238
|
var d = v(c);
|
|
@@ -1250,11 +1250,11 @@ function Kt(t) {
|
|
|
1250
1250
|
p !== void 0 ? V(p, F) : y in l && (p = s(() => /* @__PURE__ */ re(F)), r.set(y + "", p));
|
|
1251
1251
|
}
|
|
1252
1252
|
if (d === void 0)
|
|
1253
|
-
(!m ||
|
|
1253
|
+
(!m || At(l, a)?.writable) && (d = s(() => /* @__PURE__ */ re(void 0)), V(d, Yt(c)), r.set(a, d));
|
|
1254
1254
|
else {
|
|
1255
1255
|
m = d.v !== F;
|
|
1256
|
-
var
|
|
1257
|
-
V(d,
|
|
1256
|
+
var S = s(() => Yt(c));
|
|
1257
|
+
V(d, S);
|
|
1258
1258
|
}
|
|
1259
1259
|
var $ = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1260
1260
|
if ($?.set && $.set.call(f, c), !m) {
|
|
@@ -1265,7 +1265,7 @@ function Kt(t) {
|
|
|
1265
1265
|
), w = Number(a);
|
|
1266
1266
|
Number.isInteger(w) && w >= O.v && V(O, w + 1);
|
|
1267
1267
|
}
|
|
1268
|
-
|
|
1268
|
+
Xt(o);
|
|
1269
1269
|
}
|
|
1270
1270
|
return !0;
|
|
1271
1271
|
},
|
|
@@ -1280,134 +1280,134 @@ function Kt(t) {
|
|
|
1280
1280
|
return a;
|
|
1281
1281
|
},
|
|
1282
1282
|
setPrototypeOf() {
|
|
1283
|
-
|
|
1283
|
+
os();
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
1286
|
);
|
|
1287
1287
|
}
|
|
1288
|
-
var
|
|
1289
|
-
function
|
|
1290
|
-
if (
|
|
1291
|
-
|
|
1288
|
+
var zi, Ho, zo, jo;
|
|
1289
|
+
function ri() {
|
|
1290
|
+
if (zi === void 0) {
|
|
1291
|
+
zi = window, Ho = /Firefox/.test(navigator.userAgent);
|
|
1292
1292
|
var t = Element.prototype, e = Node.prototype, r = Text.prototype;
|
|
1293
|
-
|
|
1293
|
+
zo = At(e, "firstChild").get, jo = At(e, "nextSibling").get, qi(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), qi(r) && (r.__t = void 0);
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function de(t = "") {
|
|
1297
1297
|
return document.createTextNode(t);
|
|
1298
1298
|
}
|
|
1299
1299
|
// @__NO_SIDE_EFFECTS__
|
|
1300
|
-
function
|
|
1300
|
+
function Xe(t) {
|
|
1301
1301
|
return (
|
|
1302
1302
|
/** @type {TemplateNode | null} */
|
|
1303
|
-
|
|
1303
|
+
zo.call(t)
|
|
1304
1304
|
);
|
|
1305
1305
|
}
|
|
1306
1306
|
// @__NO_SIDE_EFFECTS__
|
|
1307
|
-
function
|
|
1307
|
+
function Le(t) {
|
|
1308
1308
|
return (
|
|
1309
1309
|
/** @type {TemplateNode | null} */
|
|
1310
|
-
|
|
1310
|
+
jo.call(t)
|
|
1311
1311
|
);
|
|
1312
1312
|
}
|
|
1313
1313
|
function j(t, e) {
|
|
1314
1314
|
if (!E)
|
|
1315
|
-
return /* @__PURE__ */
|
|
1316
|
-
var r = /* @__PURE__ */
|
|
1315
|
+
return /* @__PURE__ */ Xe(t);
|
|
1316
|
+
var r = /* @__PURE__ */ Xe(I);
|
|
1317
1317
|
if (r === null)
|
|
1318
|
-
r = I.appendChild(
|
|
1319
|
-
else if (e && r.nodeType !==
|
|
1320
|
-
var i =
|
|
1318
|
+
r = I.appendChild(de());
|
|
1319
|
+
else if (e && r.nodeType !== kr) {
|
|
1320
|
+
var i = de();
|
|
1321
1321
|
return r?.before(i), Q(i), i;
|
|
1322
1322
|
}
|
|
1323
|
-
return e &&
|
|
1323
|
+
return e && _i(
|
|
1324
1324
|
/** @type {Text} */
|
|
1325
1325
|
r
|
|
1326
1326
|
), Q(r), r;
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function Es(t, e = !1) {
|
|
1329
1329
|
if (!E) {
|
|
1330
|
-
var r = /* @__PURE__ */
|
|
1331
|
-
return r instanceof Comment && r.data === "" ? /* @__PURE__ */
|
|
1330
|
+
var r = /* @__PURE__ */ Xe(t);
|
|
1331
|
+
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Le(r) : r;
|
|
1332
1332
|
}
|
|
1333
1333
|
if (e) {
|
|
1334
|
-
if (I?.nodeType !==
|
|
1335
|
-
var i =
|
|
1334
|
+
if (I?.nodeType !== kr) {
|
|
1335
|
+
var i = de();
|
|
1336
1336
|
return I?.before(i), Q(i), i;
|
|
1337
1337
|
}
|
|
1338
|
-
|
|
1338
|
+
_i(
|
|
1339
1339
|
/** @type {Text} */
|
|
1340
1340
|
I
|
|
1341
1341
|
);
|
|
1342
1342
|
}
|
|
1343
1343
|
return I;
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function Me(t, e = 1, r = !1) {
|
|
1346
1346
|
let i = E ? I : t;
|
|
1347
1347
|
for (var o; e--; )
|
|
1348
1348
|
o = i, i = /** @type {TemplateNode} */
|
|
1349
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ Le(i);
|
|
1350
1350
|
if (!E)
|
|
1351
1351
|
return i;
|
|
1352
1352
|
if (r) {
|
|
1353
|
-
if (i?.nodeType !==
|
|
1354
|
-
var n =
|
|
1353
|
+
if (i?.nodeType !== kr) {
|
|
1354
|
+
var n = de();
|
|
1355
1355
|
return i === null ? o?.after(n) : i.before(n), Q(n), n;
|
|
1356
1356
|
}
|
|
1357
|
-
|
|
1357
|
+
_i(
|
|
1358
1358
|
/** @type {Text} */
|
|
1359
1359
|
i
|
|
1360
1360
|
);
|
|
1361
1361
|
}
|
|
1362
1362
|
return Q(i), i;
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function Uo(t) {
|
|
1365
1365
|
t.textContent = "";
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1367
|
+
function Go() {
|
|
1368
1368
|
return !1;
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function yi(t, e, r) {
|
|
1371
1371
|
return (
|
|
1372
1372
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1373
|
-
document.createElementNS(
|
|
1373
|
+
document.createElementNS(vo, t, void 0)
|
|
1374
1374
|
);
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function _i(t) {
|
|
1377
1377
|
if (
|
|
1378
1378
|
/** @type {string} */
|
|
1379
1379
|
t.nodeValue.length < 65536
|
|
1380
1380
|
)
|
|
1381
1381
|
return;
|
|
1382
1382
|
let e = t.nextSibling;
|
|
1383
|
-
for (; e !== null && e.nodeType ===
|
|
1383
|
+
for (; e !== null && e.nodeType === kr; )
|
|
1384
1384
|
e.remove(), t.nodeValue += /** @type {string} */
|
|
1385
1385
|
e.nodeValue, e = t.nextSibling;
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1388
|
-
var e = T, r =
|
|
1389
|
-
|
|
1387
|
+
function Wo(t) {
|
|
1388
|
+
var e = T, r = A;
|
|
1389
|
+
he(null), Ce(null);
|
|
1390
1390
|
try {
|
|
1391
1391
|
return t();
|
|
1392
1392
|
} finally {
|
|
1393
|
-
|
|
1393
|
+
he(e), Ce(r);
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1396
|
+
function $s(t) {
|
|
1397
|
+
A === null && (T === null && es(), Zn()), Ze && Xn();
|
|
1398
1398
|
}
|
|
1399
|
-
function
|
|
1399
|
+
function Os(t, e) {
|
|
1400
1400
|
var r = e.last;
|
|
1401
1401
|
r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
|
|
1402
1402
|
}
|
|
1403
1403
|
function Re(t, e) {
|
|
1404
|
-
var r =
|
|
1404
|
+
var r = A;
|
|
1405
1405
|
r !== null && (r.f & U) !== 0 && (t |= U);
|
|
1406
1406
|
var i = {
|
|
1407
1407
|
ctx: ie,
|
|
1408
1408
|
deps: null,
|
|
1409
1409
|
nodes: null,
|
|
1410
|
-
f: t | B |
|
|
1410
|
+
f: t | B | fe,
|
|
1411
1411
|
first: null,
|
|
1412
1412
|
fn: e,
|
|
1413
1413
|
last: null,
|
|
@@ -1419,18 +1419,18 @@ function Re(t, e) {
|
|
|
1419
1419
|
wv: 0,
|
|
1420
1420
|
ac: null
|
|
1421
1421
|
}, o = i;
|
|
1422
|
-
if ((t &
|
|
1423
|
-
|
|
1422
|
+
if ((t & Ht) !== 0)
|
|
1423
|
+
Ft !== null ? Ft.push(i) : $e(i);
|
|
1424
1424
|
else if (e !== null) {
|
|
1425
1425
|
try {
|
|
1426
|
-
|
|
1426
|
+
Bt(i);
|
|
1427
1427
|
} catch (s) {
|
|
1428
1428
|
throw G(i), s;
|
|
1429
1429
|
}
|
|
1430
1430
|
o.deps === null && o.teardown === null && o.nodes === null && o.first === o.last && // either `null`, or a singular child
|
|
1431
|
-
(o.f &
|
|
1431
|
+
(o.f & bt) === 0 && (o = o.first, (t & et) !== 0 && (t & Nt) !== 0 && o !== null && (o.f |= Nt));
|
|
1432
1432
|
}
|
|
1433
|
-
if (o !== null && (o.parent = r, r !== null &&
|
|
1433
|
+
if (o !== null && (o.parent = r, r !== null && Os(o, r), T !== null && (T.f & H) !== 0 && (t & tt) === 0)) {
|
|
1434
1434
|
var n = (
|
|
1435
1435
|
/** @type {Derived} */
|
|
1436
1436
|
T
|
|
@@ -1439,19 +1439,19 @@ function Re(t, e) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
return i;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1443
|
-
return T !== null && !
|
|
1442
|
+
function wi() {
|
|
1443
|
+
return T !== null && !ye;
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1446
|
-
const e = Re(
|
|
1445
|
+
function Cs(t) {
|
|
1446
|
+
const e = Re(Dt, null);
|
|
1447
1447
|
return M(e, q), e.teardown = t, e;
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
|
|
1449
|
+
function Tt(t) {
|
|
1450
|
+
$s();
|
|
1451
1451
|
var e = (
|
|
1452
1452
|
/** @type {Effect} */
|
|
1453
|
-
|
|
1454
|
-
), r = !T && (e &
|
|
1453
|
+
A.f
|
|
1454
|
+
), r = !T && (e & we) !== 0 && (e & gt) === 0;
|
|
1455
1455
|
if (r) {
|
|
1456
1456
|
var i = (
|
|
1457
1457
|
/** @type {ComponentContext} */
|
|
@@ -1459,105 +1459,105 @@ function kt(t) {
|
|
|
1459
1459
|
);
|
|
1460
1460
|
(i.e ?? (i.e = [])).push(t);
|
|
1461
1461
|
} else
|
|
1462
|
-
return
|
|
1462
|
+
return Ko(t);
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1465
|
-
return Re(
|
|
1464
|
+
function Ko(t) {
|
|
1465
|
+
return Re(Ht | Un, t);
|
|
1466
1466
|
}
|
|
1467
|
-
function
|
|
1468
|
-
|
|
1469
|
-
const e = Re(
|
|
1467
|
+
function Ls(t) {
|
|
1468
|
+
He.ensure();
|
|
1469
|
+
const e = Re(tt | bt, t);
|
|
1470
1470
|
return () => {
|
|
1471
1471
|
G(e);
|
|
1472
1472
|
};
|
|
1473
1473
|
}
|
|
1474
1474
|
function Rs(t) {
|
|
1475
|
-
|
|
1476
|
-
const e = Re(
|
|
1475
|
+
He.ensure();
|
|
1476
|
+
const e = Re(tt | bt, t);
|
|
1477
1477
|
return (r = {}) => new Promise((i) => {
|
|
1478
|
-
r.outro ?
|
|
1478
|
+
r.outro ? dt(e, () => {
|
|
1479
1479
|
G(e), i(void 0);
|
|
1480
1480
|
}) : (G(e), i(void 0));
|
|
1481
1481
|
});
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return Re(
|
|
1483
|
+
function Yo(t) {
|
|
1484
|
+
return Re(Ht, t);
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1487
|
-
return Re(
|
|
1486
|
+
function Ps(t) {
|
|
1487
|
+
return Re(mi | bt, t);
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1490
|
-
return Re(
|
|
1489
|
+
function ki(t, e = 0) {
|
|
1490
|
+
return Re(Dt | e, t);
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1493
|
-
|
|
1494
|
-
Re(
|
|
1492
|
+
function ji(t, e = [], r = [], i = []) {
|
|
1493
|
+
bs(i, e, r, (o) => {
|
|
1494
|
+
Re(Dt, () => t(...o.map(v)));
|
|
1495
1495
|
});
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1498
|
-
var r = Re(
|
|
1497
|
+
function Ti(t, e = 0) {
|
|
1498
|
+
var r = Re(et | e, t);
|
|
1499
1499
|
return r;
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1502
|
-
return Re(
|
|
1501
|
+
function ue(t) {
|
|
1502
|
+
return Re(we | bt, t);
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1504
|
+
function Qo(t) {
|
|
1505
1505
|
var e = t.teardown;
|
|
1506
1506
|
if (e !== null) {
|
|
1507
|
-
const r =
|
|
1508
|
-
|
|
1507
|
+
const r = Ze, i = T;
|
|
1508
|
+
Ui(!0), he(null);
|
|
1509
1509
|
try {
|
|
1510
1510
|
e.call(null);
|
|
1511
1511
|
} finally {
|
|
1512
|
-
|
|
1512
|
+
Ui(r), he(i);
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function Ii(t, e = !1) {
|
|
1517
1517
|
var r = t.first;
|
|
1518
1518
|
for (t.first = t.last = null; r !== null; ) {
|
|
1519
1519
|
const o = r.ac;
|
|
1520
|
-
o !== null &&
|
|
1521
|
-
o.abort(
|
|
1520
|
+
o !== null && Wo(() => {
|
|
1521
|
+
o.abort(it);
|
|
1522
1522
|
});
|
|
1523
1523
|
var i = r.next;
|
|
1524
|
-
(r.f &
|
|
1524
|
+
(r.f & tt) !== 0 ? r.parent = null : G(r, e), r = i;
|
|
1525
1525
|
}
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function Ms(t) {
|
|
1528
1528
|
for (var e = t.first; e !== null; ) {
|
|
1529
1529
|
var r = e.next;
|
|
1530
|
-
(e.f &
|
|
1530
|
+
(e.f & we) === 0 && G(e), e = r;
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
1533
|
function G(t, e = !0) {
|
|
1534
1534
|
var r = !1;
|
|
1535
|
-
(e || (t.f &
|
|
1535
|
+
(e || (t.f & jn) !== 0) && t.nodes !== null && t.nodes.end !== null && (xs(
|
|
1536
1536
|
t.nodes.start,
|
|
1537
1537
|
/** @type {TemplateNode} */
|
|
1538
1538
|
t.nodes.end
|
|
1539
|
-
), r = !0),
|
|
1539
|
+
), r = !0), Ii(t, e && !r), Zt(t, 0), M(t, Oe);
|
|
1540
1540
|
var i = t.nodes && t.nodes.t;
|
|
1541
1541
|
if (i !== null)
|
|
1542
1542
|
for (const n of i)
|
|
1543
1543
|
n.stop();
|
|
1544
|
-
|
|
1544
|
+
Qo(t);
|
|
1545
1545
|
var o = t.parent;
|
|
1546
|
-
o !== null && o.first !== null &&
|
|
1546
|
+
o !== null && o.first !== null && Jo(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function xs(t, e) {
|
|
1549
1549
|
for (; t !== null; ) {
|
|
1550
|
-
var r = t === e ? null : /* @__PURE__ */
|
|
1550
|
+
var r = t === e ? null : /* @__PURE__ */ Le(t);
|
|
1551
1551
|
t.remove(), t = r;
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
|
-
function
|
|
1554
|
+
function Jo(t) {
|
|
1555
1555
|
var e = t.parent, r = t.prev, i = t.next;
|
|
1556
1556
|
r !== null && (r.next = i), i !== null && (i.prev = r), e !== null && (e.first === t && (e.first = i), e.last === t && (e.last = r));
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function dt(t, e, r = !0) {
|
|
1559
1559
|
var i = [];
|
|
1560
|
-
|
|
1560
|
+
Xo(t, i, !0);
|
|
1561
1561
|
var o = () => {
|
|
1562
1562
|
r && G(t), e && e();
|
|
1563
1563
|
}, n = i.length;
|
|
@@ -1568,7 +1568,7 @@ function ft(t, e, r = !0) {
|
|
|
1568
1568
|
} else
|
|
1569
1569
|
o();
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function Xo(t, e, r) {
|
|
1572
1572
|
if ((t.f & U) === 0) {
|
|
1573
1573
|
t.f ^= U;
|
|
1574
1574
|
var i = t.nodes && t.nodes.t;
|
|
@@ -1579,20 +1579,20 @@ function Jo(t, e, r) {
|
|
|
1579
1579
|
var n = o.next, s = (o.f & Nt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1580
1580
|
// it means the parent block effect was pruned. In that case,
|
|
1581
1581
|
// transparency information was transferred to the branch effect.
|
|
1582
|
-
(o.f &
|
|
1583
|
-
|
|
1582
|
+
(o.f & we) !== 0 && (t.f & et) !== 0;
|
|
1583
|
+
Xo(o, e, s ? r : !1), o = n;
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1588
|
-
|
|
1587
|
+
function Ai(t) {
|
|
1588
|
+
Zo(t, !0);
|
|
1589
1589
|
}
|
|
1590
|
-
function
|
|
1590
|
+
function Zo(t, e) {
|
|
1591
1591
|
if ((t.f & U) !== 0) {
|
|
1592
1592
|
t.f ^= U;
|
|
1593
1593
|
for (var r = t.first; r !== null; ) {
|
|
1594
|
-
var i = r.next, o = (r.f & Nt) !== 0 || (r.f &
|
|
1595
|
-
|
|
1594
|
+
var i = r.next, o = (r.f & Nt) !== 0 || (r.f & we) !== 0;
|
|
1595
|
+
Zo(r, o ? e : !1), r = i;
|
|
1596
1596
|
}
|
|
1597
1597
|
var n = t.nodes && t.nodes.t;
|
|
1598
1598
|
if (n !== null)
|
|
@@ -1603,48 +1603,48 @@ function Xo(t, e) {
|
|
|
1603
1603
|
function Si(t, e) {
|
|
1604
1604
|
if (t.nodes)
|
|
1605
1605
|
for (var r = t.nodes.start, i = t.nodes.end; r !== null; ) {
|
|
1606
|
-
var o = r === i ? null : /* @__PURE__ */
|
|
1606
|
+
var o = r === i ? null : /* @__PURE__ */ Le(r);
|
|
1607
1607
|
e.append(r), r = o;
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
let
|
|
1611
|
-
function
|
|
1612
|
-
|
|
1610
|
+
let dr = !1, Ze = !1;
|
|
1611
|
+
function Ui(t) {
|
|
1612
|
+
Ze = t;
|
|
1613
1613
|
}
|
|
1614
|
-
let T = null,
|
|
1615
|
-
function
|
|
1614
|
+
let T = null, ye = !1;
|
|
1615
|
+
function he(t) {
|
|
1616
1616
|
T = t;
|
|
1617
1617
|
}
|
|
1618
|
-
let
|
|
1619
|
-
function
|
|
1620
|
-
|
|
1618
|
+
let A = null;
|
|
1619
|
+
function Ce(t) {
|
|
1620
|
+
A = t;
|
|
1621
1621
|
}
|
|
1622
|
-
let
|
|
1623
|
-
function
|
|
1624
|
-
T !== null && (
|
|
1622
|
+
let pe = null;
|
|
1623
|
+
function en(t) {
|
|
1624
|
+
T !== null && (pe === null ? pe = [t] : pe.push(t));
|
|
1625
1625
|
}
|
|
1626
|
-
let Y = null, X = 0,
|
|
1627
|
-
function
|
|
1628
|
-
|
|
1626
|
+
let Y = null, X = 0, ae = null;
|
|
1627
|
+
function Ds(t) {
|
|
1628
|
+
ae = t;
|
|
1629
1629
|
}
|
|
1630
|
-
let
|
|
1631
|
-
function
|
|
1632
|
-
|
|
1630
|
+
let tn = 1, nt = 0, pt = nt;
|
|
1631
|
+
function Gi(t) {
|
|
1632
|
+
pt = t;
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1635
|
-
return ++
|
|
1634
|
+
function rn() {
|
|
1635
|
+
return ++tn;
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function or(t) {
|
|
1638
1638
|
var e = t.f;
|
|
1639
1639
|
if ((e & B) !== 0)
|
|
1640
1640
|
return !0;
|
|
1641
|
-
if (e & H && (t.f &= ~
|
|
1641
|
+
if (e & H && (t.f &= ~ht), (e & _e) !== 0) {
|
|
1642
1642
|
for (var r = (
|
|
1643
1643
|
/** @type {Value[]} */
|
|
1644
1644
|
t.deps
|
|
1645
1645
|
), i = r.length, o = 0; o < i; o++) {
|
|
1646
1646
|
var n = r[o];
|
|
1647
|
-
if (
|
|
1647
|
+
if (or(
|
|
1648
1648
|
/** @type {Derived} */
|
|
1649
1649
|
n
|
|
1650
1650
|
) && No(
|
|
@@ -1653,83 +1653,83 @@ function ir(t) {
|
|
|
1653
1653
|
), n.wv > t.wv)
|
|
1654
1654
|
return !0;
|
|
1655
1655
|
}
|
|
1656
|
-
(e &
|
|
1656
|
+
(e & fe) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1657
1657
|
// traversal of the graph in the other batches still happens
|
|
1658
|
-
|
|
1658
|
+
be === null && M(t, q);
|
|
1659
1659
|
}
|
|
1660
1660
|
return !1;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1662
|
+
function on(t, e, r = !0) {
|
|
1663
1663
|
var i = t.reactions;
|
|
1664
|
-
if (i !== null && !(
|
|
1664
|
+
if (i !== null && !(pe !== null && xt.call(pe, t)))
|
|
1665
1665
|
for (var o = 0; o < i.length; o++) {
|
|
1666
1666
|
var n = i[o];
|
|
1667
|
-
(n.f & H) !== 0 ?
|
|
1667
|
+
(n.f & H) !== 0 ? on(
|
|
1668
1668
|
/** @type {Derived} */
|
|
1669
1669
|
n,
|
|
1670
1670
|
e,
|
|
1671
1671
|
!1
|
|
1672
|
-
) : e === n && (r ? M(n, B) : (n.f & q) !== 0 && M(n,
|
|
1672
|
+
) : e === n && (r ? M(n, B) : (n.f & q) !== 0 && M(n, _e), $e(
|
|
1673
1673
|
/** @type {Effect} */
|
|
1674
1674
|
n
|
|
1675
1675
|
));
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1679
|
-
var
|
|
1680
|
-
var e = Y, r = X, i =
|
|
1678
|
+
function nn(t) {
|
|
1679
|
+
var S;
|
|
1680
|
+
var e = Y, r = X, i = ae, o = T, n = pe, s = ie, l = ye, a = pt, c = t.f;
|
|
1681
1681
|
Y = /** @type {null | Value[]} */
|
|
1682
|
-
null, X = 0,
|
|
1683
|
-
t.ac.abort(
|
|
1682
|
+
null, X = 0, ae = null, T = (c & (we | tt)) === 0 ? t : null, pe = null, Vt(t.ctx), ye = !1, pt = ++nt, t.ac !== null && (Wo(() => {
|
|
1683
|
+
t.ac.abort(it);
|
|
1684
1684
|
}), t.ac = null);
|
|
1685
1685
|
try {
|
|
1686
|
-
t.f |=
|
|
1686
|
+
t.f |= Wr;
|
|
1687
1687
|
var f = (
|
|
1688
1688
|
/** @type {Function} */
|
|
1689
1689
|
t.fn
|
|
1690
1690
|
), d = f();
|
|
1691
|
-
t.f |=
|
|
1692
|
-
var m = t.deps, y =
|
|
1691
|
+
t.f |= gt;
|
|
1692
|
+
var m = t.deps, y = L?.is_fork;
|
|
1693
1693
|
if (Y !== null) {
|
|
1694
1694
|
var p;
|
|
1695
|
-
if (y ||
|
|
1695
|
+
if (y || Zt(t, X), m !== null && X > 0)
|
|
1696
1696
|
for (m.length = X + Y.length, p = 0; p < Y.length; p++)
|
|
1697
1697
|
m[X + p] = Y[p];
|
|
1698
1698
|
else
|
|
1699
1699
|
t.deps = m = Y;
|
|
1700
|
-
if (
|
|
1700
|
+
if (wi() && (t.f & fe) !== 0)
|
|
1701
1701
|
for (p = X; p < m.length; p++)
|
|
1702
|
-
((
|
|
1703
|
-
} else !y && m !== null && X < m.length && (
|
|
1704
|
-
if (
|
|
1702
|
+
((S = m[p]).reactions ?? (S.reactions = [])).push(t);
|
|
1703
|
+
} else !y && m !== null && X < m.length && (Zt(t, X), m.length = X);
|
|
1704
|
+
if (Ao() && ae !== null && !ye && m !== null && (t.f & (H | _e | B)) === 0)
|
|
1705
1705
|
for (p = 0; p < /** @type {Source[]} */
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1706
|
+
ae.length; p++)
|
|
1707
|
+
on(
|
|
1708
|
+
ae[p],
|
|
1709
1709
|
/** @type {Effect} */
|
|
1710
1710
|
t
|
|
1711
1711
|
);
|
|
1712
1712
|
if (o !== null && o !== t) {
|
|
1713
|
-
if (
|
|
1713
|
+
if (nt++, o.deps !== null)
|
|
1714
1714
|
for (let $ = 0; $ < r; $ += 1)
|
|
1715
|
-
o.deps[$].rv =
|
|
1715
|
+
o.deps[$].rv = nt;
|
|
1716
1716
|
if (e !== null)
|
|
1717
1717
|
for (const $ of e)
|
|
1718
|
-
$.rv =
|
|
1719
|
-
|
|
1720
|
-
|
|
1718
|
+
$.rv = nt;
|
|
1719
|
+
ae !== null && (i === null ? i = ae : i.push(.../** @type {Source[]} */
|
|
1720
|
+
ae));
|
|
1721
1721
|
}
|
|
1722
|
-
return (t.f &
|
|
1722
|
+
return (t.f & Qe) !== 0 && (t.f ^= Qe), d;
|
|
1723
1723
|
} catch ($) {
|
|
1724
|
-
return
|
|
1724
|
+
return Eo($);
|
|
1725
1725
|
} finally {
|
|
1726
|
-
t.f ^=
|
|
1726
|
+
t.f ^= Wr, Y = e, X = r, ae = i, T = o, pe = n, Vt(s), ye = l, pt = a;
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
1729
|
function Ns(t, e) {
|
|
1730
1730
|
let r = e.reactions;
|
|
1731
1731
|
if (r !== null) {
|
|
1732
|
-
var i =
|
|
1732
|
+
var i = Vn.call(r, t);
|
|
1733
1733
|
if (i !== -1) {
|
|
1734
1734
|
var o = r.length - 1;
|
|
1735
1735
|
o === 0 ? r = e.reactions = null : (r[i] = r[o], r.pop());
|
|
@@ -1738,114 +1738,114 @@ function Ns(t, e) {
|
|
|
1738
1738
|
if (r === null && (e.f & H) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1739
1739
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1740
1740
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1741
|
-
(Y === null || !
|
|
1741
|
+
(Y === null || !xt.call(Y, e))) {
|
|
1742
1742
|
var n = (
|
|
1743
1743
|
/** @type {Derived} */
|
|
1744
1744
|
e
|
|
1745
1745
|
);
|
|
1746
|
-
(n.f &
|
|
1746
|
+
(n.f & fe) !== 0 && (n.f ^= fe, n.f &= ~ht), gi(n), As(n), Zt(n, 0);
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
|
-
function
|
|
1749
|
+
function Zt(t, e) {
|
|
1750
1750
|
var r = t.deps;
|
|
1751
1751
|
if (r !== null)
|
|
1752
1752
|
for (var i = e; i < r.length; i++)
|
|
1753
1753
|
Ns(t, r[i]);
|
|
1754
1754
|
}
|
|
1755
|
-
function
|
|
1755
|
+
function Bt(t) {
|
|
1756
1756
|
var e = t.f;
|
|
1757
|
-
if ((e &
|
|
1757
|
+
if ((e & Oe) === 0) {
|
|
1758
1758
|
M(t, q);
|
|
1759
|
-
var r =
|
|
1760
|
-
|
|
1759
|
+
var r = A, i = dr;
|
|
1760
|
+
A = t, dr = !0;
|
|
1761
1761
|
try {
|
|
1762
|
-
(e & (
|
|
1763
|
-
var o =
|
|
1764
|
-
t.teardown = typeof o == "function" ? o : null, t.wv =
|
|
1762
|
+
(e & (et | vi)) !== 0 ? Ms(t) : Ii(t), Qo(t);
|
|
1763
|
+
var o = nn(t);
|
|
1764
|
+
t.teardown = typeof o == "function" ? o : null, t.wv = tn;
|
|
1765
1765
|
var n;
|
|
1766
|
-
|
|
1766
|
+
Ur && cs && (t.f & B) !== 0 && t.deps;
|
|
1767
1767
|
} finally {
|
|
1768
|
-
|
|
1768
|
+
dr = i, A = r;
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
}
|
|
1772
1772
|
function v(t) {
|
|
1773
1773
|
var e = t.f, r = (e & H) !== 0;
|
|
1774
|
-
if (T !== null && !
|
|
1775
|
-
var i =
|
|
1776
|
-
if (!i && (
|
|
1774
|
+
if (T !== null && !ye) {
|
|
1775
|
+
var i = A !== null && (A.f & Oe) !== 0;
|
|
1776
|
+
if (!i && (pe === null || !xt.call(pe, t))) {
|
|
1777
1777
|
var o = T.deps;
|
|
1778
|
-
if ((T.f &
|
|
1779
|
-
t.rv <
|
|
1778
|
+
if ((T.f & Wr) !== 0)
|
|
1779
|
+
t.rv < nt && (t.rv = nt, Y === null && o !== null && o[X] === t ? X++ : Y === null ? Y = [t] : Y.push(t));
|
|
1780
1780
|
else {
|
|
1781
1781
|
(T.deps ?? (T.deps = [])).push(t);
|
|
1782
1782
|
var n = t.reactions;
|
|
1783
|
-
n === null ? t.reactions = [T] :
|
|
1783
|
+
n === null ? t.reactions = [T] : xt.call(n, T) || n.push(T);
|
|
1784
1784
|
}
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
|
-
if (
|
|
1788
|
-
return
|
|
1787
|
+
if (Ze && Je.has(t))
|
|
1788
|
+
return Je.get(t);
|
|
1789
1789
|
if (r) {
|
|
1790
1790
|
var s = (
|
|
1791
1791
|
/** @type {Derived} */
|
|
1792
1792
|
t
|
|
1793
1793
|
);
|
|
1794
|
-
if (
|
|
1794
|
+
if (Ze) {
|
|
1795
1795
|
var l = s.v;
|
|
1796
|
-
return ((s.f & q) === 0 && s.reactions !== null ||
|
|
1796
|
+
return ((s.f & q) === 0 && s.reactions !== null || ln(s)) && (l = bi(s)), Je.set(s, l), l;
|
|
1797
1797
|
}
|
|
1798
|
-
var a = (s.f &
|
|
1799
|
-
|
|
1798
|
+
var a = (s.f & fe) === 0 && !ye && T !== null && (dr || (T.f & fe) !== 0), c = (s.f & gt) === 0;
|
|
1799
|
+
or(s) && (a && (s.f |= fe), No(s)), a && !c && (Vo(s), sn(s));
|
|
1800
1800
|
}
|
|
1801
|
-
if (
|
|
1802
|
-
return
|
|
1803
|
-
if ((t.f &
|
|
1801
|
+
if (be?.has(t))
|
|
1802
|
+
return be.get(t);
|
|
1803
|
+
if ((t.f & Qe) !== 0)
|
|
1804
1804
|
throw t.v;
|
|
1805
1805
|
return t.v;
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1808
|
-
if (t.f |=
|
|
1807
|
+
function sn(t) {
|
|
1808
|
+
if (t.f |= fe, t.deps !== null)
|
|
1809
1809
|
for (const e of t.deps)
|
|
1810
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f & H) !== 0 && (e.f &
|
|
1810
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & H) !== 0 && (e.f & fe) === 0 && (Vo(
|
|
1811
1811
|
/** @type {Derived} */
|
|
1812
1812
|
e
|
|
1813
|
-
),
|
|
1813
|
+
), sn(
|
|
1814
1814
|
/** @type {Derived} */
|
|
1815
1815
|
e
|
|
1816
1816
|
));
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1818
|
+
function ln(t) {
|
|
1819
1819
|
if (t.v === F) return !0;
|
|
1820
1820
|
if (t.deps === null) return !1;
|
|
1821
1821
|
for (const e of t.deps)
|
|
1822
|
-
if (
|
|
1822
|
+
if (Je.has(e) || (e.f & H) !== 0 && ln(
|
|
1823
1823
|
/** @type {Derived} */
|
|
1824
1824
|
e
|
|
1825
1825
|
))
|
|
1826
1826
|
return !0;
|
|
1827
1827
|
return !1;
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1830
|
-
var e =
|
|
1829
|
+
function Ei(t) {
|
|
1830
|
+
var e = ye;
|
|
1831
1831
|
try {
|
|
1832
|
-
return
|
|
1832
|
+
return ye = !0, t();
|
|
1833
1833
|
} finally {
|
|
1834
|
-
|
|
1834
|
+
ye = e;
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
|
-
const
|
|
1838
|
-
function
|
|
1839
|
-
(e[
|
|
1837
|
+
const st = /* @__PURE__ */ Symbol("events"), an = /* @__PURE__ */ new Set(), ii = /* @__PURE__ */ new Set();
|
|
1838
|
+
function Br(t, e, r) {
|
|
1839
|
+
(e[st] ?? (e[st] = {}))[t] = r;
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Vs(t) {
|
|
1842
1842
|
for (var e = 0; e < t.length; e++)
|
|
1843
|
-
|
|
1844
|
-
for (var r of
|
|
1843
|
+
an.add(t[e]);
|
|
1844
|
+
for (var r of ii)
|
|
1845
1845
|
r(t);
|
|
1846
1846
|
}
|
|
1847
|
-
let
|
|
1848
|
-
function
|
|
1847
|
+
let Wi = null;
|
|
1848
|
+
function Ki(t) {
|
|
1849
1849
|
var e = this, r = (
|
|
1850
1850
|
/** @type {Node} */
|
|
1851
1851
|
e.ownerDocument
|
|
@@ -1853,13 +1853,13 @@ function Wi(t) {
|
|
|
1853
1853
|
/** @type {null | Element} */
|
|
1854
1854
|
o[0] || t.target
|
|
1855
1855
|
);
|
|
1856
|
-
|
|
1857
|
-
var s = 0, l =
|
|
1856
|
+
Wi = t;
|
|
1857
|
+
var s = 0, l = Wi === t && t[st];
|
|
1858
1858
|
if (l) {
|
|
1859
1859
|
var a = o.indexOf(l);
|
|
1860
1860
|
if (a !== -1 && (e === document || e === /** @type {any} */
|
|
1861
1861
|
window)) {
|
|
1862
|
-
t[
|
|
1862
|
+
t[st] = e;
|
|
1863
1863
|
return;
|
|
1864
1864
|
}
|
|
1865
1865
|
var c = o.indexOf(e);
|
|
@@ -1869,24 +1869,24 @@ function Wi(t) {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
if (n = /** @type {Element} */
|
|
1871
1871
|
o[s] || t.target, n !== e) {
|
|
1872
|
-
|
|
1872
|
+
gr(t, "currentTarget", {
|
|
1873
1873
|
configurable: !0,
|
|
1874
1874
|
get() {
|
|
1875
1875
|
return n || r;
|
|
1876
1876
|
}
|
|
1877
1877
|
});
|
|
1878
|
-
var f = T, d =
|
|
1879
|
-
|
|
1878
|
+
var f = T, d = A;
|
|
1879
|
+
he(null), Ce(null);
|
|
1880
1880
|
try {
|
|
1881
1881
|
for (var m, y = []; n !== null; ) {
|
|
1882
1882
|
var p = n.assignedSlot || n.parentNode || /** @type {any} */
|
|
1883
1883
|
n.host || null;
|
|
1884
1884
|
try {
|
|
1885
|
-
var
|
|
1886
|
-
|
|
1885
|
+
var S = n[st]?.[i];
|
|
1886
|
+
S != null && (!/** @type {any} */
|
|
1887
1887
|
n.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1888
1888
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1889
|
-
t.target === n) &&
|
|
1889
|
+
t.target === n) && S.call(n, t);
|
|
1890
1890
|
} catch ($) {
|
|
1891
1891
|
m ? y.push($) : m = $;
|
|
1892
1892
|
}
|
|
@@ -1902,90 +1902,90 @@ function Wi(t) {
|
|
|
1902
1902
|
throw m;
|
|
1903
1903
|
}
|
|
1904
1904
|
} finally {
|
|
1905
|
-
t[
|
|
1905
|
+
t[st] = e, delete t.currentTarget, he(f), Ce(d);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
|
-
const
|
|
1909
|
+
const Fs = (
|
|
1910
1910
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1911
1911
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1912
1912
|
/** @param {string} html */
|
|
1913
1913
|
createHTML: (t) => t
|
|
1914
1914
|
})
|
|
1915
1915
|
);
|
|
1916
|
-
function
|
|
1916
|
+
function qs(t) {
|
|
1917
1917
|
return (
|
|
1918
1918
|
/** @type {string} */
|
|
1919
|
-
|
|
1919
|
+
Fs?.createHTML(t) ?? t
|
|
1920
1920
|
);
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1923
|
-
var e =
|
|
1924
|
-
return e.innerHTML =
|
|
1922
|
+
function cn(t) {
|
|
1923
|
+
var e = yi("template");
|
|
1924
|
+
return e.innerHTML = qs(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function mt(t, e) {
|
|
1927
1927
|
var r = (
|
|
1928
1928
|
/** @type {Effect} */
|
|
1929
|
-
|
|
1929
|
+
A
|
|
1930
1930
|
);
|
|
1931
1931
|
r.nodes === null && (r.nodes = { start: t, end: e, a: null, t: null });
|
|
1932
1932
|
}
|
|
1933
1933
|
// @__NO_SIDE_EFFECTS__
|
|
1934
|
-
function
|
|
1934
|
+
function $i(t, e) {
|
|
1935
1935
|
var r = (e & Nn) !== 0, i, o = !t.startsWith("<!>");
|
|
1936
1936
|
return () => {
|
|
1937
1937
|
if (E)
|
|
1938
|
-
return
|
|
1939
|
-
i === void 0 && (i =
|
|
1940
|
-
/* @__PURE__ */
|
|
1938
|
+
return mt(I, null), I;
|
|
1939
|
+
i === void 0 && (i = cn(o ? t : "<!>" + t), i = /** @type {TemplateNode} */
|
|
1940
|
+
/* @__PURE__ */ Xe(i));
|
|
1941
1941
|
var n = (
|
|
1942
1942
|
/** @type {TemplateNode} */
|
|
1943
|
-
r ||
|
|
1943
|
+
r || Ho ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1944
1944
|
);
|
|
1945
|
-
return
|
|
1945
|
+
return mt(n, n), n;
|
|
1946
1946
|
};
|
|
1947
1947
|
}
|
|
1948
1948
|
// @__NO_SIDE_EFFECTS__
|
|
1949
|
-
function
|
|
1949
|
+
function Bs(t, e, r = "svg") {
|
|
1950
1950
|
var i = !t.startsWith("<!>"), o = `<${r}>${i ? t : "<!>" + t}</${r}>`, n;
|
|
1951
1951
|
return () => {
|
|
1952
1952
|
if (E)
|
|
1953
|
-
return
|
|
1953
|
+
return mt(I, null), I;
|
|
1954
1954
|
if (!n) {
|
|
1955
1955
|
var s = (
|
|
1956
1956
|
/** @type {DocumentFragment} */
|
|
1957
|
-
|
|
1957
|
+
cn(o)
|
|
1958
1958
|
), l = (
|
|
1959
1959
|
/** @type {Element} */
|
|
1960
|
-
/* @__PURE__ */
|
|
1960
|
+
/* @__PURE__ */ Xe(s)
|
|
1961
1961
|
);
|
|
1962
1962
|
n = /** @type {Element} */
|
|
1963
|
-
/* @__PURE__ */
|
|
1963
|
+
/* @__PURE__ */ Xe(l);
|
|
1964
1964
|
}
|
|
1965
1965
|
var a = (
|
|
1966
1966
|
/** @type {TemplateNode} */
|
|
1967
1967
|
n.cloneNode(!0)
|
|
1968
1968
|
);
|
|
1969
|
-
return
|
|
1969
|
+
return mt(a, a), a;
|
|
1970
1970
|
};
|
|
1971
1971
|
}
|
|
1972
1972
|
// @__NO_SIDE_EFFECTS__
|
|
1973
|
-
function
|
|
1974
|
-
return /* @__PURE__ */
|
|
1973
|
+
function Hs(t, e) {
|
|
1974
|
+
return /* @__PURE__ */ Bs(t, e, "svg");
|
|
1975
1975
|
}
|
|
1976
|
-
function
|
|
1976
|
+
function zs() {
|
|
1977
1977
|
if (E)
|
|
1978
|
-
return
|
|
1979
|
-
var t = document.createDocumentFragment(), e = document.createComment(""), r =
|
|
1980
|
-
return t.append(e, r),
|
|
1978
|
+
return mt(I, null), I;
|
|
1979
|
+
var t = document.createDocumentFragment(), e = document.createComment(""), r = de();
|
|
1980
|
+
return t.append(e, r), mt(e, r), t;
|
|
1981
1981
|
}
|
|
1982
|
-
function
|
|
1982
|
+
function It(t, e) {
|
|
1983
1983
|
if (E) {
|
|
1984
1984
|
var r = (
|
|
1985
1985
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1986
|
-
|
|
1986
|
+
A
|
|
1987
1987
|
);
|
|
1988
|
-
((r.f &
|
|
1988
|
+
((r.f & gt) === 0 || r.nodes.end === null) && (r.nodes.end = I), Ir();
|
|
1989
1989
|
return;
|
|
1990
1990
|
}
|
|
1991
1991
|
t !== null && t.before(
|
|
@@ -1993,48 +1993,48 @@ function Tt(t, e) {
|
|
|
1993
1993
|
e
|
|
1994
1994
|
);
|
|
1995
1995
|
}
|
|
1996
|
-
const
|
|
1997
|
-
function
|
|
1998
|
-
return
|
|
1996
|
+
const js = ["touchstart", "touchmove"];
|
|
1997
|
+
function Us(t) {
|
|
1998
|
+
return js.includes(t);
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2000
|
+
function sr(t, e) {
|
|
2001
2001
|
var r = e == null ? "" : typeof e == "object" ? `${e}` : e;
|
|
2002
2002
|
r !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = r, t.nodeValue = `${r}`);
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2005
|
-
return
|
|
2004
|
+
function un(t, e) {
|
|
2005
|
+
return fn(t, e);
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2008
|
-
|
|
2007
|
+
function Gs(t, e) {
|
|
2008
|
+
ri(), e.intro = e.intro ?? !1;
|
|
2009
2009
|
const r = e.target, i = E, o = I;
|
|
2010
2010
|
try {
|
|
2011
|
-
for (var n = /* @__PURE__ */
|
|
2012
|
-
n.data !==
|
|
2013
|
-
n = /* @__PURE__ */
|
|
2011
|
+
for (var n = /* @__PURE__ */ Xe(r); n && (n.nodeType !== ir || /** @type {Comment} */
|
|
2012
|
+
n.data !== ho); )
|
|
2013
|
+
n = /* @__PURE__ */ Le(n);
|
|
2014
2014
|
if (!n)
|
|
2015
|
-
throw
|
|
2016
|
-
|
|
2015
|
+
throw Mt;
|
|
2016
|
+
Be(!0), Q(
|
|
2017
2017
|
/** @type {Comment} */
|
|
2018
2018
|
n
|
|
2019
2019
|
);
|
|
2020
|
-
const s =
|
|
2021
|
-
return
|
|
2020
|
+
const s = fn(t, { ...e, anchor: n });
|
|
2021
|
+
return Be(!1), /** @type {Exports} */
|
|
2022
2022
|
s;
|
|
2023
2023
|
} catch (s) {
|
|
2024
2024
|
if (s instanceof Error && s.message.split(`
|
|
2025
2025
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
2026
2026
|
throw s;
|
|
2027
|
-
return s !==
|
|
2027
|
+
return s !== Mt && console.warn("Failed to hydrate: ", s), e.recover === !1 && rs(), ri(), Uo(r), Be(!1), un(t, e);
|
|
2028
2028
|
} finally {
|
|
2029
|
-
|
|
2029
|
+
Be(i), Q(o);
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
|
-
const
|
|
2033
|
-
function
|
|
2034
|
-
|
|
2032
|
+
const lr = /* @__PURE__ */ new Map();
|
|
2033
|
+
function fn(t, { target: e, anchor: r, props: i = {}, events: o, context: n, intro: s = !0, transformError: l }) {
|
|
2034
|
+
ri();
|
|
2035
2035
|
var a = void 0, c = Rs(() => {
|
|
2036
|
-
var f = r ?? e.appendChild(
|
|
2037
|
-
|
|
2036
|
+
var f = r ?? e.appendChild(de());
|
|
2037
|
+
ms(
|
|
2038
2038
|
/** @type {TemplateNode} */
|
|
2039
2039
|
f,
|
|
2040
2040
|
{
|
|
@@ -2042,61 +2042,61 @@ function un(t, { target: e, anchor: r, props: i = {}, events: o, context: n, int
|
|
|
2042
2042
|
}
|
|
2043
2043
|
},
|
|
2044
2044
|
(y) => {
|
|
2045
|
-
|
|
2045
|
+
To({});
|
|
2046
2046
|
var p = (
|
|
2047
2047
|
/** @type {ComponentContext} */
|
|
2048
2048
|
ie
|
|
2049
2049
|
);
|
|
2050
|
-
if (n && (p.c = n), o && (i.$$events = o), E &&
|
|
2050
|
+
if (n && (p.c = n), o && (i.$$events = o), E && mt(
|
|
2051
2051
|
/** @type {TemplateNode} */
|
|
2052
2052
|
y,
|
|
2053
2053
|
null
|
|
2054
|
-
), a = t(y, i) || {}, E && (
|
|
2055
|
-
I.data !==
|
|
2056
|
-
throw
|
|
2057
|
-
|
|
2054
|
+
), a = t(y, i) || {}, E && (A.nodes.end = I, I === null || I.nodeType !== ir || /** @type {Comment} */
|
|
2055
|
+
I.data !== hi))
|
|
2056
|
+
throw Tr(), Mt;
|
|
2057
|
+
Io();
|
|
2058
2058
|
},
|
|
2059
2059
|
l
|
|
2060
2060
|
);
|
|
2061
2061
|
var d = /* @__PURE__ */ new Set(), m = (y) => {
|
|
2062
2062
|
for (var p = 0; p < y.length; p++) {
|
|
2063
|
-
var
|
|
2064
|
-
if (!d.has(
|
|
2065
|
-
d.add(
|
|
2066
|
-
var $ =
|
|
2063
|
+
var S = y[p];
|
|
2064
|
+
if (!d.has(S)) {
|
|
2065
|
+
d.add(S);
|
|
2066
|
+
var $ = Us(S);
|
|
2067
2067
|
for (const x of [e, document]) {
|
|
2068
|
-
var O =
|
|
2069
|
-
O === void 0 && (O = /* @__PURE__ */ new Map(),
|
|
2070
|
-
var w = O.get(
|
|
2071
|
-
w === void 0 ? (x.addEventListener(
|
|
2068
|
+
var O = lr.get(x);
|
|
2069
|
+
O === void 0 && (O = /* @__PURE__ */ new Map(), lr.set(x, O));
|
|
2070
|
+
var w = O.get(S);
|
|
2071
|
+
w === void 0 ? (x.addEventListener(S, Ki, { passive: $ }), O.set(S, 1)) : O.set(S, w + 1);
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
2075
|
};
|
|
2076
|
-
return m(
|
|
2076
|
+
return m(wr(an)), ii.add(m), () => {
|
|
2077
2077
|
for (var y of d)
|
|
2078
2078
|
for (const $ of [e, document]) {
|
|
2079
2079
|
var p = (
|
|
2080
2080
|
/** @type {Map<string, number>} */
|
|
2081
|
-
|
|
2082
|
-
),
|
|
2081
|
+
lr.get($)
|
|
2082
|
+
), S = (
|
|
2083
2083
|
/** @type {number} */
|
|
2084
2084
|
p.get(y)
|
|
2085
2085
|
);
|
|
2086
|
-
--
|
|
2086
|
+
--S == 0 ? ($.removeEventListener(y, Ki), p.delete(y), p.size === 0 && lr.delete($)) : p.set(y, S);
|
|
2087
2087
|
}
|
|
2088
|
-
|
|
2088
|
+
ii.delete(m), f !== r && f.parentNode?.removeChild(f);
|
|
2089
2089
|
};
|
|
2090
2090
|
});
|
|
2091
|
-
return
|
|
2091
|
+
return oi.set(a, c), a;
|
|
2092
2092
|
}
|
|
2093
|
-
let
|
|
2094
|
-
function
|
|
2095
|
-
const r =
|
|
2096
|
-
return r ? (
|
|
2093
|
+
let oi = /* @__PURE__ */ new WeakMap();
|
|
2094
|
+
function Ws(t, e) {
|
|
2095
|
+
const r = oi.get(t);
|
|
2096
|
+
return r ? (oi.delete(t), r(e)) : Promise.resolve();
|
|
2097
2097
|
}
|
|
2098
|
-
var
|
|
2099
|
-
class
|
|
2098
|
+
var ge, Ee, te, ut, tr, rr, _r;
|
|
2099
|
+
class Ks {
|
|
2100
2100
|
/**
|
|
2101
2101
|
* @param {TemplateNode} anchor
|
|
2102
2102
|
* @param {boolean} transition
|
|
@@ -2105,7 +2105,7 @@ class Ws {
|
|
|
2105
2105
|
/** @type {TemplateNode} */
|
|
2106
2106
|
h(this, "anchor");
|
|
2107
2107
|
/** @type {Map<Batch, Key>} */
|
|
2108
|
-
k(this,
|
|
2108
|
+
k(this, ge, /* @__PURE__ */ new Map());
|
|
2109
2109
|
/**
|
|
2110
2110
|
* Map of keys to effects that are currently rendered in the DOM.
|
|
2111
2111
|
* These effects are visible and actively part of the document tree.
|
|
@@ -2120,7 +2120,7 @@ class Ws {
|
|
|
2120
2120
|
* Can result in the entries `true->Effect` and `false->Effect`
|
|
2121
2121
|
* @type {Map<Key, Effect>}
|
|
2122
2122
|
*/
|
|
2123
|
-
k(this,
|
|
2123
|
+
k(this, Ee, /* @__PURE__ */ new Map());
|
|
2124
2124
|
/**
|
|
2125
2125
|
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
2126
2126
|
* in the DOM, because their insertion is deferred.
|
|
@@ -2131,57 +2131,57 @@ class Ws {
|
|
|
2131
2131
|
* Keys of effects that are currently outroing
|
|
2132
2132
|
* @type {Set<Key>}
|
|
2133
2133
|
*/
|
|
2134
|
-
k(this,
|
|
2134
|
+
k(this, ut, /* @__PURE__ */ new Set());
|
|
2135
2135
|
/**
|
|
2136
2136
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2137
2137
|
* This is necessary for `<svelte:element>`
|
|
2138
2138
|
*/
|
|
2139
|
-
k(this,
|
|
2139
|
+
k(this, tr, !0);
|
|
2140
2140
|
/**
|
|
2141
2141
|
* @param {Batch} batch
|
|
2142
2142
|
*/
|
|
2143
|
-
k(this,
|
|
2144
|
-
if (u(this,
|
|
2143
|
+
k(this, rr, (e) => {
|
|
2144
|
+
if (u(this, ge).has(e)) {
|
|
2145
2145
|
var r = (
|
|
2146
2146
|
/** @type {Key} */
|
|
2147
|
-
u(this,
|
|
2148
|
-
), i = u(this,
|
|
2147
|
+
u(this, ge).get(e)
|
|
2148
|
+
), i = u(this, Ee).get(r);
|
|
2149
2149
|
if (i)
|
|
2150
|
-
|
|
2150
|
+
Ai(i), u(this, ut).delete(r);
|
|
2151
2151
|
else {
|
|
2152
2152
|
var o = u(this, te).get(r);
|
|
2153
|
-
o && (o.effect.f & U) === 0 && (u(this,
|
|
2153
|
+
o && (o.effect.f & U) === 0 && (u(this, Ee).set(r, o.effect), u(this, te).delete(r), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), i = o.effect);
|
|
2154
2154
|
}
|
|
2155
|
-
for (const [n, s] of u(this,
|
|
2156
|
-
if (u(this,
|
|
2155
|
+
for (const [n, s] of u(this, ge)) {
|
|
2156
|
+
if (u(this, ge).delete(n), n === e)
|
|
2157
2157
|
break;
|
|
2158
2158
|
const l = u(this, te).get(s);
|
|
2159
2159
|
l && (G(l.effect), u(this, te).delete(s));
|
|
2160
2160
|
}
|
|
2161
|
-
for (const [n, s] of u(this,
|
|
2162
|
-
if (n === r || u(this,
|
|
2161
|
+
for (const [n, s] of u(this, Ee)) {
|
|
2162
|
+
if (n === r || u(this, ut).has(n) || (s.f & U) !== 0) continue;
|
|
2163
2163
|
const l = () => {
|
|
2164
|
-
if (Array.from(u(this,
|
|
2164
|
+
if (Array.from(u(this, ge).values()).includes(n)) {
|
|
2165
2165
|
var c = document.createDocumentFragment();
|
|
2166
|
-
Si(s, c), c.append(
|
|
2166
|
+
Si(s, c), c.append(de()), u(this, te).set(n, { effect: s, fragment: c });
|
|
2167
2167
|
} else
|
|
2168
2168
|
G(s);
|
|
2169
|
-
u(this,
|
|
2169
|
+
u(this, ut).delete(n), u(this, Ee).delete(n);
|
|
2170
2170
|
};
|
|
2171
|
-
u(this,
|
|
2171
|
+
u(this, tr) || !i ? (u(this, ut).add(n), dt(s, l, !1)) : l();
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
2174
|
});
|
|
2175
2175
|
/**
|
|
2176
2176
|
* @param {Batch} batch
|
|
2177
2177
|
*/
|
|
2178
|
-
k(this,
|
|
2179
|
-
u(this,
|
|
2180
|
-
const r = Array.from(u(this,
|
|
2178
|
+
k(this, _r, (e) => {
|
|
2179
|
+
u(this, ge).delete(e);
|
|
2180
|
+
const r = Array.from(u(this, ge).values());
|
|
2181
2181
|
for (const [i, o] of u(this, te))
|
|
2182
2182
|
r.includes(i) || (G(o.effect), u(this, te).delete(i));
|
|
2183
2183
|
});
|
|
2184
|
-
this.anchor = e, _(this,
|
|
2184
|
+
this.anchor = e, _(this, tr, r);
|
|
2185
2185
|
}
|
|
2186
2186
|
/**
|
|
2187
2187
|
*
|
|
@@ -2191,69 +2191,69 @@ class Ws {
|
|
|
2191
2191
|
ensure(e, r) {
|
|
2192
2192
|
var i = (
|
|
2193
2193
|
/** @type {Batch} */
|
|
2194
|
-
|
|
2195
|
-
), o =
|
|
2196
|
-
if (r && !u(this,
|
|
2194
|
+
L
|
|
2195
|
+
), o = Go();
|
|
2196
|
+
if (r && !u(this, Ee).has(e) && !u(this, te).has(e))
|
|
2197
2197
|
if (o) {
|
|
2198
|
-
var n = document.createDocumentFragment(), s =
|
|
2198
|
+
var n = document.createDocumentFragment(), s = de();
|
|
2199
2199
|
n.append(s), u(this, te).set(e, {
|
|
2200
|
-
effect:
|
|
2200
|
+
effect: ue(() => r(s)),
|
|
2201
2201
|
fragment: n
|
|
2202
2202
|
});
|
|
2203
2203
|
} else
|
|
2204
|
-
u(this,
|
|
2204
|
+
u(this, Ee).set(
|
|
2205
2205
|
e,
|
|
2206
|
-
|
|
2206
|
+
ue(() => r(this.anchor))
|
|
2207
2207
|
);
|
|
2208
|
-
if (u(this,
|
|
2209
|
-
for (const [l, a] of u(this,
|
|
2208
|
+
if (u(this, ge).set(i, e), o) {
|
|
2209
|
+
for (const [l, a] of u(this, Ee))
|
|
2210
2210
|
l === e ? i.unskip_effect(a) : i.skip_effect(a);
|
|
2211
2211
|
for (const [l, a] of u(this, te))
|
|
2212
2212
|
l === e ? i.unskip_effect(a.effect) : i.skip_effect(a.effect);
|
|
2213
|
-
i.oncommit(u(this,
|
|
2213
|
+
i.oncommit(u(this, rr)), i.ondiscard(u(this, _r));
|
|
2214
2214
|
} else
|
|
2215
|
-
E && (this.anchor = I), u(this,
|
|
2215
|
+
E && (this.anchor = I), u(this, rr).call(this, i);
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
|
-
|
|
2219
|
-
function
|
|
2220
|
-
ie === null &&
|
|
2221
|
-
const e =
|
|
2218
|
+
ge = new WeakMap(), Ee = new WeakMap(), te = new WeakMap(), ut = new WeakMap(), tr = new WeakMap(), rr = new WeakMap(), _r = new WeakMap();
|
|
2219
|
+
function Ys(t) {
|
|
2220
|
+
ie === null && Yn(), Tt(() => {
|
|
2221
|
+
const e = Ei(t);
|
|
2222
2222
|
if (typeof e == "function") return (
|
|
2223
2223
|
/** @type {() => void} */
|
|
2224
2224
|
e
|
|
2225
2225
|
);
|
|
2226
2226
|
});
|
|
2227
2227
|
}
|
|
2228
|
-
function
|
|
2228
|
+
function Hr(t, e, r = !1) {
|
|
2229
2229
|
var i;
|
|
2230
|
-
E && (i = I,
|
|
2231
|
-
var o = new
|
|
2230
|
+
E && (i = I, Ir());
|
|
2231
|
+
var o = new Ks(t), n = r ? Nt : 0;
|
|
2232
2232
|
function s(l, a) {
|
|
2233
2233
|
if (E) {
|
|
2234
|
-
var c =
|
|
2234
|
+
var c = _o(
|
|
2235
2235
|
/** @type {TemplateNode} */
|
|
2236
2236
|
i
|
|
2237
2237
|
);
|
|
2238
2238
|
if (l !== parseInt(c.substring(1))) {
|
|
2239
|
-
var f =
|
|
2240
|
-
Q(f), o.anchor = f,
|
|
2239
|
+
var f = br();
|
|
2240
|
+
Q(f), o.anchor = f, Be(!1), o.ensure(l, a), Be(!0);
|
|
2241
2241
|
return;
|
|
2242
2242
|
}
|
|
2243
2243
|
}
|
|
2244
2244
|
o.ensure(l, a);
|
|
2245
2245
|
}
|
|
2246
|
-
|
|
2246
|
+
Ti(() => {
|
|
2247
2247
|
var l = !1;
|
|
2248
2248
|
e((a, c = 0) => {
|
|
2249
2249
|
l = !0, s(c, a);
|
|
2250
2250
|
}), l || s(-1, null);
|
|
2251
2251
|
}, n);
|
|
2252
2252
|
}
|
|
2253
|
-
function
|
|
2253
|
+
function Qs(t, e, r) {
|
|
2254
2254
|
for (var i = [], o = e.length, n, s = e.length, l = 0; l < o; l++) {
|
|
2255
2255
|
let d = e[l];
|
|
2256
|
-
|
|
2256
|
+
dt(
|
|
2257
2257
|
d,
|
|
2258
2258
|
() => {
|
|
2259
2259
|
if (n) {
|
|
@@ -2262,7 +2262,7 @@ function Ys(t, e, r) {
|
|
|
2262
2262
|
/** @type {Set<EachOutroGroup>} */
|
|
2263
2263
|
t.outrogroups
|
|
2264
2264
|
);
|
|
2265
|
-
|
|
2265
|
+
ni(t, wr(n.done)), m.delete(n), m.size === 0 && (t.outrogroups = null);
|
|
2266
2266
|
}
|
|
2267
2267
|
} else
|
|
2268
2268
|
s -= 1;
|
|
@@ -2280,16 +2280,16 @@ function Ys(t, e, r) {
|
|
|
2280
2280
|
/** @type {Element} */
|
|
2281
2281
|
c.parentNode
|
|
2282
2282
|
);
|
|
2283
|
-
|
|
2283
|
+
Uo(f), f.append(c), t.items.clear();
|
|
2284
2284
|
}
|
|
2285
|
-
|
|
2285
|
+
ni(t, e, !a);
|
|
2286
2286
|
} else
|
|
2287
2287
|
n = {
|
|
2288
2288
|
pending: new Set(e),
|
|
2289
2289
|
done: /* @__PURE__ */ new Set()
|
|
2290
2290
|
}, (t.outrogroups ?? (t.outrogroups = /* @__PURE__ */ new Set())).add(n);
|
|
2291
2291
|
}
|
|
2292
|
-
function
|
|
2292
|
+
function ni(t, e, r = !0) {
|
|
2293
2293
|
var i;
|
|
2294
2294
|
if (t.pending.size > 0) {
|
|
2295
2295
|
i = /* @__PURE__ */ new Set();
|
|
@@ -2303,120 +2303,120 @@ function oi(t, e, r = !0) {
|
|
|
2303
2303
|
for (var o = 0; o < e.length; o++) {
|
|
2304
2304
|
var n = e[o];
|
|
2305
2305
|
if (i?.has(n)) {
|
|
2306
|
-
n.f |=
|
|
2306
|
+
n.f |= qe;
|
|
2307
2307
|
const s = document.createDocumentFragment();
|
|
2308
2308
|
Si(n, s);
|
|
2309
2309
|
} else
|
|
2310
2310
|
G(e[o], r);
|
|
2311
2311
|
}
|
|
2312
2312
|
}
|
|
2313
|
-
var
|
|
2314
|
-
function
|
|
2313
|
+
var Yi;
|
|
2314
|
+
function Js(t, e, r, i, o, n = null) {
|
|
2315
2315
|
var s = t, l = /* @__PURE__ */ new Map();
|
|
2316
2316
|
{
|
|
2317
2317
|
var a = (
|
|
2318
2318
|
/** @type {Element} */
|
|
2319
2319
|
t
|
|
2320
2320
|
);
|
|
2321
|
-
s = E ? Q(/* @__PURE__ */
|
|
2321
|
+
s = E ? Q(/* @__PURE__ */ Xe(a)) : a.appendChild(de());
|
|
2322
2322
|
}
|
|
2323
|
-
E &&
|
|
2324
|
-
var c = null, f = /* @__PURE__ */
|
|
2323
|
+
E && Ir();
|
|
2324
|
+
var c = null, f = /* @__PURE__ */ ks(() => {
|
|
2325
2325
|
var w = r();
|
|
2326
|
-
return
|
|
2326
|
+
return mo(w) ? w : w == null ? [] : wr(w);
|
|
2327
2327
|
}), d, m = /* @__PURE__ */ new Map(), y = !0;
|
|
2328
2328
|
function p(w) {
|
|
2329
|
-
(O.effect.f &
|
|
2329
|
+
(O.effect.f & Oe) === 0 && (O.pending.delete(w), O.fallback = c, Xs(O, d, s, e, i), c !== null && (d.length === 0 ? (c.f & qe) === 0 ? Ai(c) : (c.f ^= qe, Qt(c, null, s)) : dt(c, () => {
|
|
2330
2330
|
c = null;
|
|
2331
2331
|
})));
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2333
|
+
function S(w) {
|
|
2334
2334
|
O.pending.delete(w);
|
|
2335
2335
|
}
|
|
2336
|
-
var $ =
|
|
2336
|
+
var $ = Ti(() => {
|
|
2337
2337
|
d = /** @type {V[]} */
|
|
2338
2338
|
v(f);
|
|
2339
2339
|
var w = d.length;
|
|
2340
2340
|
let x = !1;
|
|
2341
2341
|
if (E) {
|
|
2342
|
-
var
|
|
2343
|
-
|
|
2342
|
+
var ve = _o(s) === pi;
|
|
2343
|
+
ve !== (w === 0) && (s = br(), Q(s), Be(!1), x = !0);
|
|
2344
2344
|
}
|
|
2345
|
-
for (var oe = /* @__PURE__ */ new Set(),
|
|
2345
|
+
for (var oe = /* @__PURE__ */ new Set(), ke = (
|
|
2346
2346
|
/** @type {Batch} */
|
|
2347
|
-
|
|
2348
|
-
),
|
|
2349
|
-
E && I.nodeType ===
|
|
2350
|
-
I.data ===
|
|
2351
|
-
I, x = !0,
|
|
2352
|
-
var
|
|
2353
|
-
ne ? (ne.v &&
|
|
2347
|
+
L
|
|
2348
|
+
), yt = Go(), D = 0; D < w; D += 1) {
|
|
2349
|
+
E && I.nodeType === ir && /** @type {Comment} */
|
|
2350
|
+
I.data === hi && (s = /** @type {Comment} */
|
|
2351
|
+
I, x = !0, Be(!1));
|
|
2352
|
+
var zt = d[D], _t = i(zt, D), ne = y ? null : l.get(_t);
|
|
2353
|
+
ne ? (ne.v && qt(ne.v, zt), ne.i && qt(ne.i, D), yt && ke.unskip_effect(ne.e)) : (ne = Zs(
|
|
2354
2354
|
l,
|
|
2355
|
-
y ? s :
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2355
|
+
y ? s : Yi ?? (Yi = de()),
|
|
2356
|
+
zt,
|
|
2357
|
+
_t,
|
|
2358
|
+
D,
|
|
2359
2359
|
o,
|
|
2360
2360
|
e,
|
|
2361
2361
|
r
|
|
2362
|
-
), y || (ne.e.f |=
|
|
2362
|
+
), y || (ne.e.f |= qe), l.set(_t, ne)), oe.add(_t);
|
|
2363
2363
|
}
|
|
2364
|
-
if (w === 0 && n && !c && (y ? c =
|
|
2365
|
-
if (m.set(
|
|
2366
|
-
for (const [
|
|
2367
|
-
oe.has(
|
|
2368
|
-
|
|
2364
|
+
if (w === 0 && n && !c && (y ? c = ue(() => n(s)) : (c = ue(() => n(Yi ?? (Yi = de()))), c.f |= qe)), w > oe.size && Jn(), E && w > 0 && Q(br()), !y)
|
|
2365
|
+
if (m.set(ke, oe), yt) {
|
|
2366
|
+
for (const [Or, Cr] of l)
|
|
2367
|
+
oe.has(Or) || ke.skip_effect(Cr.e);
|
|
2368
|
+
ke.oncommit(p), ke.ondiscard(S);
|
|
2369
2369
|
} else
|
|
2370
|
-
p(
|
|
2371
|
-
x &&
|
|
2370
|
+
p(ke);
|
|
2371
|
+
x && Be(!0), v(f);
|
|
2372
2372
|
}), O = { effect: $, items: l, pending: m, outrogroups: null, fallback: c };
|
|
2373
2373
|
y = !1, E && (s = I);
|
|
2374
2374
|
}
|
|
2375
|
-
function
|
|
2376
|
-
for (; t !== null && (t.f &
|
|
2375
|
+
function Gt(t) {
|
|
2376
|
+
for (; t !== null && (t.f & we) === 0; )
|
|
2377
2377
|
t = t.next;
|
|
2378
2378
|
return t;
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2381
|
-
var n = e.length, s = t.items, l =
|
|
2382
|
-
for (
|
|
2383
|
-
if (m = e[
|
|
2380
|
+
function Xs(t, e, r, i, o) {
|
|
2381
|
+
var n = e.length, s = t.items, l = Gt(t.effect.first), a, c = null, f = [], d = [], m, y, p, S;
|
|
2382
|
+
for (S = 0; S < n; S += 1) {
|
|
2383
|
+
if (m = e[S], y = o(m, S), p = /** @type {EachItem} */
|
|
2384
2384
|
s.get(y).e, t.outrogroups !== null)
|
|
2385
|
-
for (const
|
|
2386
|
-
|
|
2387
|
-
if ((p.f &
|
|
2388
|
-
if (p.f ^=
|
|
2389
|
-
|
|
2385
|
+
for (const D of t.outrogroups)
|
|
2386
|
+
D.pending.delete(p), D.done.delete(p);
|
|
2387
|
+
if ((p.f & qe) !== 0)
|
|
2388
|
+
if (p.f ^= qe, p === l)
|
|
2389
|
+
Qt(p, null, r);
|
|
2390
2390
|
else {
|
|
2391
2391
|
var $ = c ? c.next : l;
|
|
2392
|
-
p === t.effect.last && (t.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev),
|
|
2392
|
+
p === t.effect.last && (t.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev), Ue(t, c, p), Ue(t, p, $), Qt(p, $, r), c = p, f = [], d = [], l = Gt(c.next);
|
|
2393
2393
|
continue;
|
|
2394
2394
|
}
|
|
2395
|
-
if ((p.f & U) !== 0 &&
|
|
2395
|
+
if ((p.f & U) !== 0 && Ai(p), p !== l) {
|
|
2396
2396
|
if (a !== void 0 && a.has(p)) {
|
|
2397
2397
|
if (f.length < d.length) {
|
|
2398
2398
|
var O = d[0], w;
|
|
2399
2399
|
c = O.prev;
|
|
2400
|
-
var x = f[0],
|
|
2400
|
+
var x = f[0], ve = f[f.length - 1];
|
|
2401
2401
|
for (w = 0; w < f.length; w += 1)
|
|
2402
|
-
|
|
2402
|
+
Qt(f[w], O, r);
|
|
2403
2403
|
for (w = 0; w < d.length; w += 1)
|
|
2404
2404
|
a.delete(d[w]);
|
|
2405
|
-
|
|
2405
|
+
Ue(t, x.prev, ve.next), Ue(t, c, x), Ue(t, ve, O), l = O, c = ve, S -= 1, f = [], d = [];
|
|
2406
2406
|
} else
|
|
2407
|
-
a.delete(p),
|
|
2407
|
+
a.delete(p), Qt(p, l, r), Ue(t, p.prev, p.next), Ue(t, p, c === null ? t.effect.first : c.next), Ue(t, c, p), c = p;
|
|
2408
2408
|
continue;
|
|
2409
2409
|
}
|
|
2410
2410
|
for (f = [], d = []; l !== null && l !== p; )
|
|
2411
|
-
(a ?? (a = /* @__PURE__ */ new Set())).add(l), d.push(l), l =
|
|
2411
|
+
(a ?? (a = /* @__PURE__ */ new Set())).add(l), d.push(l), l = Gt(l.next);
|
|
2412
2412
|
if (l === null)
|
|
2413
2413
|
continue;
|
|
2414
2414
|
}
|
|
2415
|
-
(p.f &
|
|
2415
|
+
(p.f & qe) === 0 && f.push(p), c = p, l = Gt(p.next);
|
|
2416
2416
|
}
|
|
2417
2417
|
if (t.outrogroups !== null) {
|
|
2418
|
-
for (const
|
|
2419
|
-
|
|
2418
|
+
for (const D of t.outrogroups)
|
|
2419
|
+
D.pending.size === 0 && (ni(t, wr(D.done)), t.outrogroups?.delete(D));
|
|
2420
2420
|
t.outrogroups.size === 0 && (t.outrogroups = null);
|
|
2421
2421
|
}
|
|
2422
2422
|
if (l !== null || a !== void 0) {
|
|
@@ -2425,44 +2425,44 @@ function Js(t, e, r, i, o) {
|
|
|
2425
2425
|
for (p of a)
|
|
2426
2426
|
(p.f & U) === 0 && oe.push(p);
|
|
2427
2427
|
for (; l !== null; )
|
|
2428
|
-
(l.f & U) === 0 && l !== t.fallback && oe.push(l), l =
|
|
2429
|
-
var
|
|
2430
|
-
if (
|
|
2431
|
-
var
|
|
2432
|
-
|
|
2428
|
+
(l.f & U) === 0 && l !== t.fallback && oe.push(l), l = Gt(l.next);
|
|
2429
|
+
var ke = oe.length;
|
|
2430
|
+
if (ke > 0) {
|
|
2431
|
+
var yt = n === 0 ? r : null;
|
|
2432
|
+
Qs(t, oe, yt);
|
|
2433
2433
|
}
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
2436
|
-
function
|
|
2437
|
-
var a = (s &
|
|
2436
|
+
function Zs(t, e, r, i, o, n, s, l) {
|
|
2437
|
+
var a = (s & Mn) !== 0 ? (s & Dn) === 0 ? /* @__PURE__ */ qo(r, !1, !1) : vt(r) : null, c = (s & xn) !== 0 ? vt(o) : null;
|
|
2438
2438
|
return {
|
|
2439
2439
|
v: a,
|
|
2440
2440
|
i: c,
|
|
2441
|
-
e:
|
|
2441
|
+
e: ue(() => (n(e, a ?? r, c ?? o, l), () => {
|
|
2442
2442
|
t.delete(i);
|
|
2443
2443
|
}))
|
|
2444
2444
|
};
|
|
2445
2445
|
}
|
|
2446
|
-
function
|
|
2446
|
+
function Qt(t, e, r) {
|
|
2447
2447
|
if (t.nodes)
|
|
2448
|
-
for (var i = t.nodes.start, o = t.nodes.end, n = e && (e.f &
|
|
2448
|
+
for (var i = t.nodes.start, o = t.nodes.end, n = e && (e.f & qe) === 0 ? (
|
|
2449
2449
|
/** @type {EffectNodes} */
|
|
2450
2450
|
e.nodes.start
|
|
2451
2451
|
) : r; i !== null; ) {
|
|
2452
2452
|
var s = (
|
|
2453
2453
|
/** @type {TemplateNode} */
|
|
2454
|
-
/* @__PURE__ */
|
|
2454
|
+
/* @__PURE__ */ Le(i)
|
|
2455
2455
|
);
|
|
2456
2456
|
if (n.before(i), i === o)
|
|
2457
2457
|
return;
|
|
2458
2458
|
i = s;
|
|
2459
2459
|
}
|
|
2460
2460
|
}
|
|
2461
|
-
function
|
|
2461
|
+
function Ue(t, e, r) {
|
|
2462
2462
|
e === null ? t.effect.first = r : e.next = r, r === null ? t.effect.last = e : r.prev = e;
|
|
2463
2463
|
}
|
|
2464
|
-
function
|
|
2465
|
-
|
|
2464
|
+
function el(t, e) {
|
|
2465
|
+
Yo(() => {
|
|
2466
2466
|
var r = t.getRootNode(), i = (
|
|
2467
2467
|
/** @type {ShadowRoot} */
|
|
2468
2468
|
r.host ? (
|
|
@@ -2475,14 +2475,14 @@ function Zs(t, e) {
|
|
|
2475
2475
|
)
|
|
2476
2476
|
);
|
|
2477
2477
|
if (!i.querySelector("#" + e.hash)) {
|
|
2478
|
-
const o =
|
|
2478
|
+
const o = yi("style");
|
|
2479
2479
|
o.id = e.hash, o.textContent = e.code, i.appendChild(o);
|
|
2480
2480
|
}
|
|
2481
2481
|
});
|
|
2482
2482
|
}
|
|
2483
|
-
const
|
|
2483
|
+
const Qi = [...`
|
|
2484
2484
|
\r\f \v\uFEFF`];
|
|
2485
|
-
function
|
|
2485
|
+
function tl(t, e, r) {
|
|
2486
2486
|
var i = "" + t;
|
|
2487
2487
|
if (r) {
|
|
2488
2488
|
for (var o of Object.keys(r))
|
|
@@ -2491,18 +2491,18 @@ function el(t, e, r) {
|
|
|
2491
2491
|
else if (i.length)
|
|
2492
2492
|
for (var n = o.length, s = 0; (s = i.indexOf(o, s)) >= 0; ) {
|
|
2493
2493
|
var l = s + n;
|
|
2494
|
-
(s === 0 ||
|
|
2494
|
+
(s === 0 || Qi.includes(i[s - 1])) && (l === i.length || Qi.includes(i[l])) ? i = (s === 0 ? "" : i.substring(0, s)) + i.substring(l + 1) : s = l;
|
|
2495
2495
|
}
|
|
2496
2496
|
}
|
|
2497
2497
|
return i === "" ? null : i;
|
|
2498
2498
|
}
|
|
2499
|
-
function
|
|
2499
|
+
function rl(t, e) {
|
|
2500
2500
|
return t == null ? null : String(t);
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function il(t, e, r, i, o, n) {
|
|
2503
2503
|
var s = t.__className;
|
|
2504
2504
|
if (E || s !== r || s === void 0) {
|
|
2505
|
-
var l =
|
|
2505
|
+
var l = tl(r, i, n);
|
|
2506
2506
|
(!E || l !== t.getAttribute("class")) && (l == null ? t.removeAttribute("class") : t.className = l), t.__className = r;
|
|
2507
2507
|
} else if (n && o !== n)
|
|
2508
2508
|
for (var a in n) {
|
|
@@ -2511,60 +2511,60 @@ function rl(t, e, r, i, o, n) {
|
|
|
2511
2511
|
}
|
|
2512
2512
|
return n;
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2514
|
+
function kt(t, e, r, i) {
|
|
2515
2515
|
var o = t.__style;
|
|
2516
2516
|
if (E || o !== e) {
|
|
2517
|
-
var n =
|
|
2517
|
+
var n = rl(e);
|
|
2518
2518
|
(!E || n !== t.getAttribute("style")) && (n == null ? t.removeAttribute("style") : t.style.cssText = n), t.__style = e;
|
|
2519
2519
|
}
|
|
2520
2520
|
return i;
|
|
2521
2521
|
}
|
|
2522
|
-
const
|
|
2523
|
-
function
|
|
2524
|
-
var o =
|
|
2525
|
-
E && (o[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName ===
|
|
2522
|
+
const ol = /* @__PURE__ */ Symbol("is custom element"), nl = /* @__PURE__ */ Symbol("is html"), sl = Kn ? "link" : "LINK";
|
|
2523
|
+
function zr(t, e, r, i) {
|
|
2524
|
+
var o = ll(t);
|
|
2525
|
+
E && (o[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === sl) || o[e] !== (o[e] = r) && (e === "loading" && (t[Wn] = r), r == null ? t.removeAttribute(e) : typeof r != "string" && al(t).includes(e) ? t[e] = r : t.setAttribute(e, r));
|
|
2526
2526
|
}
|
|
2527
|
-
function
|
|
2527
|
+
function ll(t) {
|
|
2528
2528
|
return (
|
|
2529
2529
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2530
2530
|
// @ts-expect-error
|
|
2531
2531
|
t.__attributes ?? (t.__attributes = {
|
|
2532
|
-
[
|
|
2533
|
-
[
|
|
2532
|
+
[ol]: t.nodeName.includes("-"),
|
|
2533
|
+
[nl]: t.namespaceURI === vo
|
|
2534
2534
|
})
|
|
2535
2535
|
);
|
|
2536
2536
|
}
|
|
2537
|
-
var
|
|
2538
|
-
function
|
|
2539
|
-
var e = t.getAttribute("is") || t.nodeName, r =
|
|
2537
|
+
var Ji = /* @__PURE__ */ new Map();
|
|
2538
|
+
function al(t) {
|
|
2539
|
+
var e = t.getAttribute("is") || t.nodeName, r = Ji.get(e);
|
|
2540
2540
|
if (r) return r;
|
|
2541
|
-
|
|
2541
|
+
Ji.set(e, r = []);
|
|
2542
2542
|
for (var i, o = t, n = Element.prototype; n !== o; ) {
|
|
2543
|
-
i =
|
|
2543
|
+
i = Fn(o);
|
|
2544
2544
|
for (var s in i)
|
|
2545
2545
|
i[s].set && r.push(s);
|
|
2546
|
-
o =
|
|
2546
|
+
o = go(o);
|
|
2547
2547
|
}
|
|
2548
2548
|
return r;
|
|
2549
2549
|
}
|
|
2550
|
-
function
|
|
2551
|
-
return t === e || t?.[
|
|
2550
|
+
function Xi(t, e) {
|
|
2551
|
+
return t === e || t?.[cr] === e;
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2554
|
-
return
|
|
2553
|
+
function cl(t = {}, e, r, i) {
|
|
2554
|
+
return Yo(() => {
|
|
2555
2555
|
var o, n;
|
|
2556
|
-
return
|
|
2557
|
-
o = n, n = [],
|
|
2558
|
-
t !== r(...n) && (e(t, ...n), o &&
|
|
2556
|
+
return ki(() => {
|
|
2557
|
+
o = n, n = [], Ei(() => {
|
|
2558
|
+
t !== r(...n) && (e(t, ...n), o && Xi(r(...o), t) && e(null, ...o));
|
|
2559
2559
|
});
|
|
2560
2560
|
}), () => {
|
|
2561
|
-
|
|
2562
|
-
n &&
|
|
2561
|
+
ft(() => {
|
|
2562
|
+
n && Xi(r(...n), t) && e(null, ...n);
|
|
2563
2563
|
});
|
|
2564
2564
|
};
|
|
2565
2565
|
}), t;
|
|
2566
2566
|
}
|
|
2567
|
-
function
|
|
2567
|
+
function ar(t, e, r, i) {
|
|
2568
2568
|
var o = (
|
|
2569
2569
|
/** @type {V} */
|
|
2570
2570
|
i
|
|
@@ -2582,7 +2582,7 @@ function lr(t, e, r, i) {
|
|
|
2582
2582
|
};
|
|
2583
2583
|
var c = !1, f = /* @__PURE__ */ Sr(() => (c = !1, a())), d = (
|
|
2584
2584
|
/** @type {Effect} */
|
|
2585
|
-
|
|
2585
|
+
A
|
|
2586
2586
|
);
|
|
2587
2587
|
return (
|
|
2588
2588
|
/** @type {() => V} */
|
|
@@ -2591,15 +2591,15 @@ function lr(t, e, r, i) {
|
|
|
2591
2591
|
const p = y ? v(f) : m;
|
|
2592
2592
|
return V(f, p), c = !0, o !== void 0 && (o = p), m;
|
|
2593
2593
|
}
|
|
2594
|
-
return
|
|
2594
|
+
return Ze && c || (d.f & Oe) !== 0 ? f.v : v(f);
|
|
2595
2595
|
})
|
|
2596
2596
|
);
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2599
|
-
return new
|
|
2598
|
+
function ul(t) {
|
|
2599
|
+
return new fl(t);
|
|
2600
2600
|
}
|
|
2601
|
-
var
|
|
2602
|
-
class
|
|
2601
|
+
var Fe, ce;
|
|
2602
|
+
class fl {
|
|
2603
2603
|
/**
|
|
2604
2604
|
* @param {ComponentConstructorOptions & {
|
|
2605
2605
|
* component: any;
|
|
@@ -2607,11 +2607,11 @@ class ul {
|
|
|
2607
2607
|
*/
|
|
2608
2608
|
constructor(e) {
|
|
2609
2609
|
/** @type {any} */
|
|
2610
|
-
k(this,
|
|
2610
|
+
k(this, Fe);
|
|
2611
2611
|
/** @type {Record<string, any>} */
|
|
2612
|
-
k(this,
|
|
2612
|
+
k(this, ce);
|
|
2613
2613
|
var r = /* @__PURE__ */ new Map(), i = (n, s) => {
|
|
2614
|
-
var l = /* @__PURE__ */
|
|
2614
|
+
var l = /* @__PURE__ */ qo(s, !1, !1);
|
|
2615
2615
|
return r.set(n, l), l;
|
|
2616
2616
|
};
|
|
2617
2617
|
const o = new Proxy(
|
|
@@ -2621,14 +2621,14 @@ class ul {
|
|
|
2621
2621
|
return v(r.get(s) ?? i(s, Reflect.get(n, s)));
|
|
2622
2622
|
},
|
|
2623
2623
|
has(n, s) {
|
|
2624
|
-
return s ===
|
|
2624
|
+
return s === Gn ? !0 : (v(r.get(s) ?? i(s, Reflect.get(n, s))), Reflect.has(n, s));
|
|
2625
2625
|
},
|
|
2626
2626
|
set(n, s, l) {
|
|
2627
2627
|
return V(r.get(s) ?? i(s, l), l), Reflect.set(n, s, l);
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
2630
|
);
|
|
2631
|
-
_(this,
|
|
2631
|
+
_(this, ce, (e.hydrate ? Gs : un)(e.component, {
|
|
2632
2632
|
target: e.target,
|
|
2633
2633
|
anchor: e.anchor,
|
|
2634
2634
|
props: o,
|
|
@@ -2636,28 +2636,28 @@ class ul {
|
|
|
2636
2636
|
intro: e.intro ?? !1,
|
|
2637
2637
|
recover: e.recover,
|
|
2638
2638
|
transformError: e.transformError
|
|
2639
|
-
})), (!e?.props?.$$host || e.sync === !1) &&
|
|
2640
|
-
for (const n of Object.keys(u(this,
|
|
2641
|
-
n === "$set" || n === "$destroy" || n === "$on" ||
|
|
2639
|
+
})), (!e?.props?.$$host || e.sync === !1) && Kt(), _(this, Fe, o.$$events);
|
|
2640
|
+
for (const n of Object.keys(u(this, ce)))
|
|
2641
|
+
n === "$set" || n === "$destroy" || n === "$on" || gr(this, n, {
|
|
2642
2642
|
get() {
|
|
2643
|
-
return u(this,
|
|
2643
|
+
return u(this, ce)[n];
|
|
2644
2644
|
},
|
|
2645
2645
|
/** @param {any} value */
|
|
2646
2646
|
set(s) {
|
|
2647
|
-
u(this,
|
|
2647
|
+
u(this, ce)[n] = s;
|
|
2648
2648
|
},
|
|
2649
2649
|
enumerable: !0
|
|
2650
2650
|
});
|
|
2651
|
-
u(this,
|
|
2651
|
+
u(this, ce).$set = /** @param {Record<string, any>} next */
|
|
2652
2652
|
(n) => {
|
|
2653
2653
|
Object.assign(o, n);
|
|
2654
|
-
}, u(this,
|
|
2655
|
-
|
|
2654
|
+
}, u(this, ce).$destroy = () => {
|
|
2655
|
+
Ws(u(this, ce));
|
|
2656
2656
|
};
|
|
2657
2657
|
}
|
|
2658
2658
|
/** @param {Record<string, any>} props */
|
|
2659
2659
|
$set(e) {
|
|
2660
|
-
u(this,
|
|
2660
|
+
u(this, ce).$set(e);
|
|
2661
2661
|
}
|
|
2662
2662
|
/**
|
|
2663
2663
|
* @param {string} event
|
|
@@ -2665,22 +2665,22 @@ class ul {
|
|
|
2665
2665
|
* @returns {any}
|
|
2666
2666
|
*/
|
|
2667
2667
|
$on(e, r) {
|
|
2668
|
-
u(this,
|
|
2668
|
+
u(this, Fe)[e] = u(this, Fe)[e] || [];
|
|
2669
2669
|
const i = (...o) => r.call(this, ...o);
|
|
2670
|
-
return u(this,
|
|
2671
|
-
u(this,
|
|
2670
|
+
return u(this, Fe)[e].push(i), () => {
|
|
2671
|
+
u(this, Fe)[e] = u(this, Fe)[e].filter(
|
|
2672
2672
|
/** @param {any} fn */
|
|
2673
2673
|
(o) => o !== i
|
|
2674
2674
|
);
|
|
2675
2675
|
};
|
|
2676
2676
|
}
|
|
2677
2677
|
$destroy() {
|
|
2678
|
-
u(this,
|
|
2678
|
+
u(this, ce).$destroy();
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
|
-
|
|
2682
|
-
let
|
|
2683
|
-
typeof HTMLElement == "function" && (
|
|
2681
|
+
Fe = new WeakMap(), ce = new WeakMap();
|
|
2682
|
+
let dn;
|
|
2683
|
+
typeof HTMLElement == "function" && (dn = class extends HTMLElement {
|
|
2684
2684
|
/**
|
|
2685
2685
|
* @param {*} $$componentCtor
|
|
2686
2686
|
* @param {*} $$slots
|
|
@@ -2739,22 +2739,22 @@ typeof HTMLElement == "function" && (fn = class extends HTMLElement {
|
|
|
2739
2739
|
if (this.$$cn = !0, !this.$$c) {
|
|
2740
2740
|
let e = function(o) {
|
|
2741
2741
|
return (n) => {
|
|
2742
|
-
const s =
|
|
2743
|
-
o !== "default" && (s.name = o),
|
|
2742
|
+
const s = yi("slot");
|
|
2743
|
+
o !== "default" && (s.name = o), It(n, s);
|
|
2744
2744
|
};
|
|
2745
2745
|
};
|
|
2746
2746
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2747
2747
|
return;
|
|
2748
|
-
const r = {}, i =
|
|
2748
|
+
const r = {}, i = dl(this);
|
|
2749
2749
|
for (const o of this.$$s)
|
|
2750
2750
|
o in i && (o === "default" && !this.$$d.children ? (this.$$d.children = e(o), r.default = !0) : r[o] = e(o));
|
|
2751
2751
|
for (const o of this.attributes) {
|
|
2752
2752
|
const n = this.$$g_p(o.name);
|
|
2753
|
-
n in this.$$d || (this.$$d[n] =
|
|
2753
|
+
n in this.$$d || (this.$$d[n] = pr(n, o.value, this.$$p_d, "toProp"));
|
|
2754
2754
|
}
|
|
2755
2755
|
for (const o in this.$$p_d)
|
|
2756
2756
|
!(o in this.$$d) && this[o] !== void 0 && (this.$$d[o] = this[o], delete this[o]);
|
|
2757
|
-
this.$$c =
|
|
2757
|
+
this.$$c = ul({
|
|
2758
2758
|
component: this.$$ctor,
|
|
2759
2759
|
target: this.$$shadowRoot || this,
|
|
2760
2760
|
props: {
|
|
@@ -2762,13 +2762,13 @@ typeof HTMLElement == "function" && (fn = class extends HTMLElement {
|
|
|
2762
2762
|
$$slots: r,
|
|
2763
2763
|
$$host: this
|
|
2764
2764
|
}
|
|
2765
|
-
}), this.$$me =
|
|
2766
|
-
|
|
2765
|
+
}), this.$$me = Ls(() => {
|
|
2766
|
+
ki(() => {
|
|
2767
2767
|
this.$$r = !0;
|
|
2768
|
-
for (const o of
|
|
2768
|
+
for (const o of mr(this.$$c)) {
|
|
2769
2769
|
if (!this.$$p_d[o]?.reflect) continue;
|
|
2770
2770
|
this.$$d[o] = this.$$c[o];
|
|
2771
|
-
const n =
|
|
2771
|
+
const n = pr(
|
|
2772
2772
|
o,
|
|
2773
2773
|
this.$$d[o],
|
|
2774
2774
|
this.$$p_d,
|
|
@@ -2795,7 +2795,7 @@ typeof HTMLElement == "function" && (fn = class extends HTMLElement {
|
|
|
2795
2795
|
* @param {string} newValue
|
|
2796
2796
|
*/
|
|
2797
2797
|
attributeChangedCallback(e, r, i) {
|
|
2798
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
2798
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = pr(e, i, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2799
2799
|
}
|
|
2800
2800
|
disconnectedCallback() {
|
|
2801
2801
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2806,12 +2806,12 @@ typeof HTMLElement == "function" && (fn = class extends HTMLElement {
|
|
|
2806
2806
|
* @param {string} attribute_name
|
|
2807
2807
|
*/
|
|
2808
2808
|
$$g_p(e) {
|
|
2809
|
-
return
|
|
2809
|
+
return mr(this.$$p_d).find(
|
|
2810
2810
|
(r) => this.$$p_d[r].attribute === e || !this.$$p_d[r].attribute && r.toLowerCase() === e
|
|
2811
2811
|
) || e;
|
|
2812
2812
|
}
|
|
2813
2813
|
});
|
|
2814
|
-
function
|
|
2814
|
+
function pr(t, e, r, i) {
|
|
2815
2815
|
const o = r[t]?.type;
|
|
2816
2816
|
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !r[t])
|
|
2817
2817
|
return e;
|
|
@@ -2841,7 +2841,7 @@ function dr(t, e, r, i) {
|
|
|
2841
2841
|
return e;
|
|
2842
2842
|
}
|
|
2843
2843
|
}
|
|
2844
|
-
function
|
|
2844
|
+
function dl(t) {
|
|
2845
2845
|
const e = {};
|
|
2846
2846
|
return t.childNodes.forEach((r) => {
|
|
2847
2847
|
e[
|
|
@@ -2850,33 +2850,33 @@ function fl(t) {
|
|
|
2850
2850
|
] = !0;
|
|
2851
2851
|
}), e;
|
|
2852
2852
|
}
|
|
2853
|
-
function
|
|
2854
|
-
let s = class extends
|
|
2853
|
+
function pl(t, e, r, i, o, n) {
|
|
2854
|
+
let s = class extends dn {
|
|
2855
2855
|
constructor() {
|
|
2856
2856
|
super(t, r, o), this.$$p_d = e;
|
|
2857
2857
|
}
|
|
2858
2858
|
static get observedAttributes() {
|
|
2859
|
-
return
|
|
2859
|
+
return mr(e).map(
|
|
2860
2860
|
(l) => (e[l].attribute || l).toLowerCase()
|
|
2861
2861
|
);
|
|
2862
2862
|
}
|
|
2863
2863
|
};
|
|
2864
|
-
return
|
|
2865
|
-
|
|
2864
|
+
return mr(e).forEach((l) => {
|
|
2865
|
+
gr(s.prototype, l, {
|
|
2866
2866
|
get() {
|
|
2867
2867
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2868
2868
|
},
|
|
2869
2869
|
set(a) {
|
|
2870
|
-
a =
|
|
2870
|
+
a = pr(l, a, e), this.$$d[l] = a;
|
|
2871
2871
|
var c = this.$$c;
|
|
2872
2872
|
if (c) {
|
|
2873
|
-
var f =
|
|
2873
|
+
var f = At(c, l)?.get;
|
|
2874
2874
|
f ? c[l] = a : c.$set({ [l]: a });
|
|
2875
2875
|
}
|
|
2876
2876
|
}
|
|
2877
2877
|
});
|
|
2878
2878
|
}), i.forEach((l) => {
|
|
2879
|
-
|
|
2879
|
+
gr(s.prototype, l, {
|
|
2880
2880
|
get() {
|
|
2881
2881
|
return this.$$c?.[l];
|
|
2882
2882
|
}
|
|
@@ -2884,7 +2884,7 @@ function dl(t, e, r, i, o, n) {
|
|
|
2884
2884
|
}), t.element = /** @type {any} */
|
|
2885
2885
|
s, s;
|
|
2886
2886
|
}
|
|
2887
|
-
class
|
|
2887
|
+
class hl extends Event {
|
|
2888
2888
|
constructor(r, i, o, n) {
|
|
2889
2889
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2890
2890
|
h(this, "context");
|
|
@@ -2894,7 +2894,7 @@ class pl extends Event {
|
|
|
2894
2894
|
this.context = r, this.contextTarget = i, this.callback = o, this.subscribe = n ?? !1;
|
|
2895
2895
|
}
|
|
2896
2896
|
}
|
|
2897
|
-
class
|
|
2897
|
+
class vl {
|
|
2898
2898
|
constructor(e, r) {
|
|
2899
2899
|
h(this, "host");
|
|
2900
2900
|
h(this, "context");
|
|
@@ -2918,13 +2918,13 @@ class hl {
|
|
|
2918
2918
|
return this.currentValue;
|
|
2919
2919
|
}
|
|
2920
2920
|
requestValue() {
|
|
2921
|
-
this.host.dispatchEvent(new
|
|
2921
|
+
this.host.dispatchEvent(new hl(this.context, this.host, this.handleValue, this.subscribe));
|
|
2922
2922
|
}
|
|
2923
2923
|
}
|
|
2924
|
-
const
|
|
2925
|
-
function
|
|
2924
|
+
const ml = (t) => t, gl = ml(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext"));
|
|
2925
|
+
function bl(t, e, r) {
|
|
2926
2926
|
let i = !1;
|
|
2927
|
-
const o = new
|
|
2927
|
+
const o = new vl(t, {
|
|
2928
2928
|
context: e,
|
|
2929
2929
|
subscribe: !0,
|
|
2930
2930
|
onValue: (c) => {
|
|
@@ -2948,27 +2948,23 @@ function gl(t, e, r) {
|
|
|
2948
2948
|
globalThis.clearInterval(a), t.removeEventListener("context-provider", n), o.disconnect();
|
|
2949
2949
|
};
|
|
2950
2950
|
}
|
|
2951
|
-
function bl(t, e) {
|
|
2952
|
-
return gl(t, ml, e);
|
|
2953
|
-
}
|
|
2954
2951
|
function yl(t, e) {
|
|
2955
|
-
return bl(t, e);
|
|
2952
|
+
return bl(t, gl, e);
|
|
2953
|
+
}
|
|
2954
|
+
function _l(t, e) {
|
|
2955
|
+
return yl(t, e);
|
|
2956
2956
|
}
|
|
2957
|
-
var
|
|
2957
|
+
var Zi;
|
|
2958
2958
|
(function(t) {
|
|
2959
2959
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2960
|
-
})(
|
|
2961
|
-
var
|
|
2960
|
+
})(Zi || (Zi = {}));
|
|
2961
|
+
var eo;
|
|
2962
2962
|
(function(t) {
|
|
2963
2963
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2964
|
-
})(
|
|
2965
|
-
const _l = {
|
|
2966
|
-
tts: "textToSpeech",
|
|
2967
|
-
colorScheme: "theme"
|
|
2968
|
-
};
|
|
2964
|
+
})(eo || (eo = {}));
|
|
2969
2965
|
function wl(t) {
|
|
2970
2966
|
const e = t.trim();
|
|
2971
|
-
return e
|
|
2967
|
+
return e || "";
|
|
2972
2968
|
}
|
|
2973
2969
|
const kl = [
|
|
2974
2970
|
"assessment",
|
|
@@ -2978,12 +2974,12 @@ const kl = [
|
|
|
2978
2974
|
"rubric",
|
|
2979
2975
|
"element"
|
|
2980
2976
|
];
|
|
2981
|
-
function
|
|
2977
|
+
function hr(t, e) {
|
|
2982
2978
|
if (typeof t != "string" || t.trim().length === 0)
|
|
2983
2979
|
throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
|
|
2984
2980
|
}
|
|
2985
|
-
function
|
|
2986
|
-
if (
|
|
2981
|
+
function to(t) {
|
|
2982
|
+
if (hr(t.toolId, "toolId"), hr(t.name, "name"), hr(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function")
|
|
2987
2983
|
throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
|
|
2988
2984
|
if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0)
|
|
2989
2985
|
throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
@@ -3032,7 +3028,7 @@ class Tl {
|
|
|
3032
3028
|
* @throws Error if toolId is already registered
|
|
3033
3029
|
*/
|
|
3034
3030
|
register(e) {
|
|
3035
|
-
if (
|
|
3031
|
+
if (to(e), this.tools.has(e.toolId))
|
|
3036
3032
|
throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
3037
3033
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds)
|
|
3038
3034
|
for (const r of e.pnpSupportIds)
|
|
@@ -3044,7 +3040,7 @@ class Tl {
|
|
|
3044
3040
|
* @param registration - New tool registration (must have existing toolId)
|
|
3045
3041
|
*/
|
|
3046
3042
|
override(e) {
|
|
3047
|
-
if (
|
|
3043
|
+
if (to(e), !this.tools.has(e.toolId))
|
|
3048
3044
|
throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
3049
3045
|
const r = this.tools.get(e.toolId);
|
|
3050
3046
|
if (r.pnpSupportIds)
|
|
@@ -3218,7 +3214,7 @@ class Tl {
|
|
|
3218
3214
|
setToolModuleLoaders(e) {
|
|
3219
3215
|
for (const [r, i] of Object.entries(e))
|
|
3220
3216
|
if (i) {
|
|
3221
|
-
if (
|
|
3217
|
+
if (hr(r, "tool module loader id"), typeof i != "function")
|
|
3222
3218
|
throw new Error(`Invalid tool module loader for "${r}": expected a function.`);
|
|
3223
3219
|
this.moduleLoaders.set(r, i);
|
|
3224
3220
|
}
|
|
@@ -3277,20 +3273,20 @@ class Tl {
|
|
|
3277
3273
|
return o.renderToolbar(r, n);
|
|
3278
3274
|
}
|
|
3279
3275
|
}
|
|
3280
|
-
function
|
|
3276
|
+
function pn(t) {
|
|
3281
3277
|
return t.level === "item";
|
|
3282
3278
|
}
|
|
3283
3279
|
function Il(t) {
|
|
3284
3280
|
return t.level === "passage";
|
|
3285
3281
|
}
|
|
3286
|
-
function
|
|
3282
|
+
function Al(t) {
|
|
3287
3283
|
return t.level === "rubric";
|
|
3288
3284
|
}
|
|
3289
|
-
function
|
|
3285
|
+
function hn(t) {
|
|
3290
3286
|
return t.level === "element";
|
|
3291
3287
|
}
|
|
3292
|
-
function
|
|
3293
|
-
if (
|
|
3288
|
+
function Oi(t) {
|
|
3289
|
+
if (hn(t)) {
|
|
3294
3290
|
const e = t.item.config;
|
|
3295
3291
|
if (!e)
|
|
3296
3292
|
return "";
|
|
@@ -3308,7 +3304,7 @@ function $i(t) {
|
|
|
3308
3304
|
}
|
|
3309
3305
|
return r.filter(Boolean).join(" ").trim();
|
|
3310
3306
|
}
|
|
3311
|
-
if (
|
|
3307
|
+
if (pn(t)) {
|
|
3312
3308
|
const e = t.item;
|
|
3313
3309
|
if (!e?.config)
|
|
3314
3310
|
return "";
|
|
@@ -3354,14 +3350,14 @@ function $i(t) {
|
|
|
3354
3350
|
}
|
|
3355
3351
|
return i.filter(Boolean).join(" ").trim();
|
|
3356
3352
|
}
|
|
3357
|
-
if (
|
|
3353
|
+
if (Al(t)) {
|
|
3358
3354
|
const e = t.rubricBlock;
|
|
3359
3355
|
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
3360
3356
|
}
|
|
3361
3357
|
return "";
|
|
3362
3358
|
}
|
|
3363
|
-
function
|
|
3364
|
-
const e =
|
|
3359
|
+
function Er(t) {
|
|
3360
|
+
const e = Oi(t);
|
|
3365
3361
|
return [
|
|
3366
3362
|
/<math[>\s]/i,
|
|
3367
3363
|
// MathML
|
|
@@ -3377,7 +3373,7 @@ function Ar(t) {
|
|
|
3377
3373
|
// Simple arithmetic
|
|
3378
3374
|
].some((i) => i.test(e));
|
|
3379
3375
|
}
|
|
3380
|
-
function
|
|
3376
|
+
function Sl(t) {
|
|
3381
3377
|
const e = [
|
|
3382
3378
|
"pie-multiple-choice",
|
|
3383
3379
|
"pie-inline-choice",
|
|
@@ -3386,7 +3382,7 @@ function Al(t) {
|
|
|
3386
3382
|
"inline-choice",
|
|
3387
3383
|
"select-text"
|
|
3388
3384
|
];
|
|
3389
|
-
if (
|
|
3385
|
+
if (hn(t)) {
|
|
3390
3386
|
const r = t.item.config;
|
|
3391
3387
|
if (!r?.models)
|
|
3392
3388
|
return !1;
|
|
@@ -3396,7 +3392,7 @@ function Al(t) {
|
|
|
3396
3392
|
const n = o.element || "";
|
|
3397
3393
|
return e.includes(n);
|
|
3398
3394
|
}
|
|
3399
|
-
if (
|
|
3395
|
+
if (pn(t)) {
|
|
3400
3396
|
const r = t.item.config?.models;
|
|
3401
3397
|
return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((o) => {
|
|
3402
3398
|
if (!o || typeof o != "object")
|
|
@@ -3407,11 +3403,11 @@ function Al(t) {
|
|
|
3407
3403
|
}
|
|
3408
3404
|
return !1;
|
|
3409
3405
|
}
|
|
3410
|
-
function
|
|
3411
|
-
return
|
|
3406
|
+
function $r(t) {
|
|
3407
|
+
return Oi(t).trim().length >= 10;
|
|
3412
3408
|
}
|
|
3413
3409
|
function El(t) {
|
|
3414
|
-
const e =
|
|
3410
|
+
const e = Oi(t);
|
|
3415
3411
|
return [
|
|
3416
3412
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
3417
3413
|
/periodic\s+table/i,
|
|
@@ -3433,7 +3429,7 @@ const $l = [
|
|
|
3433
3429
|
function Cl(t) {
|
|
3434
3430
|
return Ol.has(t);
|
|
3435
3431
|
}
|
|
3436
|
-
function
|
|
3432
|
+
function Ci(t, e, r) {
|
|
3437
3433
|
const i = t.trim(), o = r.trim();
|
|
3438
3434
|
if (!i || !o)
|
|
3439
3435
|
throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
@@ -3441,7 +3437,7 @@ function Oi(t, e, r) {
|
|
|
3441
3437
|
throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
3442
3438
|
return `${i}:${e}:${o}`;
|
|
3443
3439
|
}
|
|
3444
|
-
class
|
|
3440
|
+
class Ll {
|
|
3445
3441
|
constructor() {
|
|
3446
3442
|
h(this, "providerId", "desmos-calculator");
|
|
3447
3443
|
h(this, "providerName", "Desmos Calculator");
|
|
@@ -3451,6 +3447,13 @@ class Rl {
|
|
|
3451
3447
|
h(this, "desmosProvider", null);
|
|
3452
3448
|
h(this, "config", null);
|
|
3453
3449
|
}
|
|
3450
|
+
async emitTelemetry(e, r) {
|
|
3451
|
+
try {
|
|
3452
|
+
await this.config?.onTelemetry?.(e, r);
|
|
3453
|
+
} catch (i) {
|
|
3454
|
+
console.warn("[DesmosToolProvider] telemetry callback failed:", i);
|
|
3455
|
+
}
|
|
3456
|
+
}
|
|
3454
3457
|
/**
|
|
3455
3458
|
* Initialize Desmos calculator provider
|
|
3456
3459
|
*
|
|
@@ -3465,15 +3468,41 @@ class Rl {
|
|
|
3465
3468
|
return;
|
|
3466
3469
|
}
|
|
3467
3470
|
this.config = e;
|
|
3468
|
-
const r =
|
|
3469
|
-
this.
|
|
3471
|
+
const r = Date.now();
|
|
3472
|
+
await this.emitTelemetry("pie-tool-library-load-start", {
|
|
3473
|
+
toolId: "calculator",
|
|
3474
|
+
operation: "desmos-provider-module-import",
|
|
3475
|
+
backend: "desmos"
|
|
3476
|
+
});
|
|
3477
|
+
const i = await (async () => {
|
|
3478
|
+
try {
|
|
3479
|
+
const o = await import("./index-QLtHZ4Yz.js");
|
|
3480
|
+
return await this.emitTelemetry("pie-tool-library-load-success", {
|
|
3481
|
+
toolId: "calculator",
|
|
3482
|
+
operation: "desmos-provider-module-import",
|
|
3483
|
+
backend: "desmos",
|
|
3484
|
+
duration: Date.now() - r
|
|
3485
|
+
}), o;
|
|
3486
|
+
} catch (o) {
|
|
3487
|
+
throw await this.emitTelemetry("pie-tool-library-load-error", {
|
|
3488
|
+
toolId: "calculator",
|
|
3489
|
+
operation: "desmos-provider-module-import",
|
|
3490
|
+
backend: "desmos",
|
|
3491
|
+
duration: Date.now() - r,
|
|
3492
|
+
errorType: "ToolLibraryLoadError",
|
|
3493
|
+
message: o instanceof Error ? o.message : String(o)
|
|
3494
|
+
}), o;
|
|
3495
|
+
}
|
|
3496
|
+
})();
|
|
3497
|
+
this.desmosProvider = new i.DesmosCalculatorProvider();
|
|
3470
3498
|
try {
|
|
3471
3499
|
await this.desmosProvider.initialize({
|
|
3472
3500
|
apiKey: e.apiKey,
|
|
3473
|
-
proxyEndpoint: e.proxyEndpoint
|
|
3501
|
+
proxyEndpoint: e.proxyEndpoint,
|
|
3502
|
+
onTelemetry: e.onTelemetry
|
|
3474
3503
|
}), console.log(`[DesmosToolProvider] Initialized successfully ${e.proxyEndpoint ? "(using proxy)" : e.apiKey ? "(direct API key)" : "(no auth)"}`);
|
|
3475
|
-
} catch (
|
|
3476
|
-
throw console.error("[DesmosToolProvider] Initialization failed:",
|
|
3504
|
+
} catch (o) {
|
|
3505
|
+
throw console.error("[DesmosToolProvider] Initialization failed:", o), new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
|
|
3477
3506
|
}
|
|
3478
3507
|
}
|
|
3479
3508
|
/**
|
|
@@ -3527,7 +3556,7 @@ class Rl {
|
|
|
3527
3556
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
3528
3557
|
}
|
|
3529
3558
|
}
|
|
3530
|
-
const
|
|
3559
|
+
const Rl = (t, e) => {
|
|
3531
3560
|
const r = e?.useSentenceSegmenter !== !1;
|
|
3532
3561
|
try {
|
|
3533
3562
|
if (!r)
|
|
@@ -3653,7 +3682,7 @@ class Ml {
|
|
|
3653
3682
|
}
|
|
3654
3683
|
segmentSentences(e) {
|
|
3655
3684
|
const r = this.getSegmentationPolicy();
|
|
3656
|
-
return
|
|
3685
|
+
return Rl(e, {
|
|
3657
3686
|
locale: r.locale,
|
|
3658
3687
|
useSentenceSegmenter: r.useSentenceSegmenter
|
|
3659
3688
|
});
|
|
@@ -3744,6 +3773,13 @@ class xl {
|
|
|
3744
3773
|
h(this, "config", null);
|
|
3745
3774
|
this.requiresAuth = e !== "browser";
|
|
3746
3775
|
}
|
|
3776
|
+
async emitTelemetry(e, r) {
|
|
3777
|
+
try {
|
|
3778
|
+
await this.config?.onTelemetry?.(e, r);
|
|
3779
|
+
} catch (i) {
|
|
3780
|
+
console.warn("[TTSToolProvider] telemetry callback failed:", i);
|
|
3781
|
+
}
|
|
3782
|
+
}
|
|
3747
3783
|
/**
|
|
3748
3784
|
* Initialize TTS provider
|
|
3749
3785
|
*
|
|
@@ -3785,8 +3821,33 @@ class xl {
|
|
|
3785
3821
|
async _initializeServerTTS(e) {
|
|
3786
3822
|
if (!e.apiEndpoint)
|
|
3787
3823
|
throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
|
|
3788
|
-
const r =
|
|
3789
|
-
this.
|
|
3824
|
+
const r = Date.now();
|
|
3825
|
+
await this.emitTelemetry("pie-tool-library-load-start", {
|
|
3826
|
+
toolId: "tts",
|
|
3827
|
+
operation: "server-provider-module-import",
|
|
3828
|
+
backend: e.serverProvider || e.backend
|
|
3829
|
+
});
|
|
3830
|
+
const i = await (async () => {
|
|
3831
|
+
try {
|
|
3832
|
+
const o = await import("./index-BRKsQ6Im.js");
|
|
3833
|
+
return await this.emitTelemetry("pie-tool-library-load-success", {
|
|
3834
|
+
toolId: "tts",
|
|
3835
|
+
operation: "server-provider-module-import",
|
|
3836
|
+
backend: e.serverProvider || e.backend,
|
|
3837
|
+
duration: Date.now() - r
|
|
3838
|
+
}), o;
|
|
3839
|
+
} catch (o) {
|
|
3840
|
+
throw await this.emitTelemetry("pie-tool-library-load-error", {
|
|
3841
|
+
toolId: "tts",
|
|
3842
|
+
operation: "server-provider-module-import",
|
|
3843
|
+
backend: e.serverProvider || e.backend,
|
|
3844
|
+
duration: Date.now() - r,
|
|
3845
|
+
errorType: "ToolLibraryLoadError",
|
|
3846
|
+
message: o instanceof Error ? o.message : String(o)
|
|
3847
|
+
}), o;
|
|
3848
|
+
}
|
|
3849
|
+
})();
|
|
3850
|
+
this.ttsProvider = new i.ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${e.serverProvider || e.backend})`);
|
|
3790
3851
|
}
|
|
3791
3852
|
/**
|
|
3792
3853
|
* Create a TTS provider instance
|
|
@@ -3843,7 +3904,7 @@ class xl {
|
|
|
3843
3904
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3844
3905
|
}
|
|
3845
3906
|
}
|
|
3846
|
-
const
|
|
3907
|
+
const Dl = /* @__PURE__ */ new Set([
|
|
3847
3908
|
"annotation-xml",
|
|
3848
3909
|
"color-profile",
|
|
3849
3910
|
"font-face",
|
|
@@ -3852,7 +3913,7 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
3852
3913
|
"font-face-format",
|
|
3853
3914
|
"font-face-name",
|
|
3854
3915
|
"missing-glyph"
|
|
3855
|
-
]),
|
|
3916
|
+
]), Nl = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Vl = (t, e = "custom element tag") => {
|
|
3856
3917
|
if (!t || typeof t != "string")
|
|
3857
3918
|
throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
3858
3919
|
const r = t.trim();
|
|
@@ -3862,12 +3923,12 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
3862
3923
|
throw new Error(`Invalid ${e} "${r}": custom element names must be lowercase`);
|
|
3863
3924
|
if (!r.includes("-"))
|
|
3864
3925
|
throw new Error(`Invalid ${e} "${r}": custom element names must include a hyphen`);
|
|
3865
|
-
if (
|
|
3926
|
+
if (Dl.has(r))
|
|
3866
3927
|
throw new Error(`Invalid ${e} "${r}": this name is reserved by the HTML spec`);
|
|
3867
|
-
if (!
|
|
3928
|
+
if (!Nl.test(r))
|
|
3868
3929
|
throw new Error(`Invalid ${e} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3869
3930
|
return r;
|
|
3870
|
-
},
|
|
3931
|
+
}, vn = {
|
|
3871
3932
|
calculator: "pie-tool-calculator",
|
|
3872
3933
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3873
3934
|
ruler: "pie-tool-ruler",
|
|
@@ -3881,9 +3942,9 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
3881
3942
|
graph: "pie-tool-graph",
|
|
3882
3943
|
periodicTable: "pie-tool-periodic-table"
|
|
3883
3944
|
}, Fl = (t, e) => {
|
|
3884
|
-
const r = e?.toolTagMap?.[t] ??
|
|
3945
|
+
const r = e?.toolTagMap?.[t] ?? vn[t] ?? t;
|
|
3885
3946
|
return Vl(r, `tool component tag for "${t}"`);
|
|
3886
|
-
}, ql = (t) => document.createElement(t),
|
|
3947
|
+
}, ql = (t) => document.createElement(t), Pe = (t, e, r, i) => {
|
|
3887
3948
|
const o = Fl(t, i), s = i?.toolComponentFactories?.[t] ?? i?.toolComponentFactory;
|
|
3888
3949
|
return s ? s({ toolId: t, tagName: o, context: e, toolbarContext: r }) : ql(o);
|
|
3889
3950
|
}, Bl = {
|
|
@@ -3893,7 +3954,7 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
3893
3954
|
icon: "calculator",
|
|
3894
3955
|
provider: {
|
|
3895
3956
|
getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
|
|
3896
|
-
createProvider: () => new
|
|
3957
|
+
createProvider: () => new Ll(),
|
|
3897
3958
|
getInitConfig: (t) => t?.provider?.init ?? {},
|
|
3898
3959
|
getAuthFetcher: (t) => {
|
|
3899
3960
|
const e = t?.provider?.runtime?.authFetcher;
|
|
@@ -3930,10 +3991,10 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
3930
3991
|
* (MathML, LaTeX, arithmetic markers).
|
|
3931
3992
|
*/
|
|
3932
3993
|
isVisibleInContext(t) {
|
|
3933
|
-
return
|
|
3994
|
+
return Er(t);
|
|
3934
3995
|
},
|
|
3935
3996
|
renderToolbar(t, e) {
|
|
3936
|
-
const r =
|
|
3997
|
+
const r = Ci(this.toolId, e.scope.level, e.scope.scopeId), i = e.componentOverrides, o = Pe(this.toolId, t, e, i);
|
|
3937
3998
|
o.setAttribute("tool-id", r), o.toolkitCoordinator = e.toolkitCoordinator;
|
|
3938
3999
|
const n = {
|
|
3939
4000
|
toolId: this.toolId,
|
|
@@ -3975,11 +4036,38 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
3975
4036
|
}
|
|
3976
4037
|
};
|
|
3977
4038
|
}
|
|
3978
|
-
},
|
|
3979
|
-
const e =
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
const
|
|
4039
|
+
}, ro = (t) => t && typeof t == "object" ? t : {}, Hl = (t) => t === "polly" || t === "google" || t === "server", le = (t, e) => t === void 0 ? e : t, zl = (t) => {
|
|
4040
|
+
const e = t.backend || "browser";
|
|
4041
|
+
if (!Hl(e))
|
|
4042
|
+
return t;
|
|
4043
|
+
const r = {
|
|
4044
|
+
...t,
|
|
4045
|
+
apiEndpoint: le(t.apiEndpoint, "/api/tts"),
|
|
4046
|
+
transportMode: le(t.transportMode, "pie"),
|
|
4047
|
+
endpointValidationMode: le(t.endpointValidationMode, "voices"),
|
|
4048
|
+
validateEndpoint: le(t.validateEndpoint, !0),
|
|
4049
|
+
includeAuthOnAssetFetch: le(t.includeAuthOnAssetFetch, !1),
|
|
4050
|
+
rate: le(t.rate, 1),
|
|
4051
|
+
language: le(t.language, "en-US")
|
|
4052
|
+
};
|
|
4053
|
+
return e === "polly" ? {
|
|
4054
|
+
...r,
|
|
4055
|
+
defaultVoice: le(r.defaultVoice, "Joanna"),
|
|
4056
|
+
engine: le(r.engine, "neural"),
|
|
4057
|
+
format: le(r.format, "mp3"),
|
|
4058
|
+
speechMarksMode: le(r.speechMarksMode, "word+sentence")
|
|
4059
|
+
} : e === "google" ? {
|
|
4060
|
+
...r,
|
|
4061
|
+
defaultVoice: le(r.defaultVoice, "en-US-Wavenet-A")
|
|
4062
|
+
} : r;
|
|
4063
|
+
}, jr = (t) => {
|
|
4064
|
+
const e = ro(t), r = ro(t?.settings);
|
|
4065
|
+
return zl({
|
|
4066
|
+
...e,
|
|
4067
|
+
...r
|
|
4068
|
+
});
|
|
4069
|
+
}, si = (t) => t.backend || "browser", mn = (t, e) => t.serverProvider || t.provider || (e === "polly" || e === "google" ? e : void 0), gn = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), jl = (t) => {
|
|
4070
|
+
const e = si(t), r = mn(t, e), i = gn(t, r);
|
|
3983
4071
|
return {
|
|
3984
4072
|
voice: t.defaultVoice,
|
|
3985
4073
|
rate: t.rate,
|
|
@@ -4005,9 +4093,9 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
4005
4093
|
includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
|
|
4006
4094
|
validateEndpoint: t.validateEndpoint
|
|
4007
4095
|
};
|
|
4008
|
-
},
|
|
4096
|
+
}, Wt = /* @__PURE__ */ new Map(), Ul = "__pieToolElementUnmount", io = Object.freeze([1.5, 2]), Gl = (t) => {
|
|
4009
4097
|
if (!Array.isArray(t))
|
|
4010
|
-
return [...
|
|
4098
|
+
return [...io];
|
|
4011
4099
|
const e = /* @__PURE__ */ new Set();
|
|
4012
4100
|
for (const r of t) {
|
|
4013
4101
|
if (typeof r != "number" || !Number.isFinite(r) || r <= 0)
|
|
@@ -4015,8 +4103,8 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
4015
4103
|
const i = Math.round(r * 100) / 100;
|
|
4016
4104
|
i !== 1 && e.add(i);
|
|
4017
4105
|
}
|
|
4018
|
-
return e.size ? Array.from(e) : [...
|
|
4019
|
-
},
|
|
4106
|
+
return e.size ? Array.from(e) : [...io];
|
|
4107
|
+
}, Wl = {
|
|
4020
4108
|
toolId: "textToSpeech",
|
|
4021
4109
|
name: "Text to Speech",
|
|
4022
4110
|
description: "Read content aloud",
|
|
@@ -4024,16 +4112,16 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
4024
4112
|
provider: {
|
|
4025
4113
|
getProviderId: () => "tts",
|
|
4026
4114
|
createProvider: (t) => {
|
|
4027
|
-
const e =
|
|
4028
|
-
return new xl(
|
|
4115
|
+
const e = jr(t);
|
|
4116
|
+
return new xl(si(e));
|
|
4029
4117
|
},
|
|
4030
4118
|
getInitConfig: (t) => {
|
|
4031
|
-
const e =
|
|
4119
|
+
const e = jr(t), r = si(e), i = mn(e, r), o = gn(e, i);
|
|
4032
4120
|
return {
|
|
4033
4121
|
backend: r,
|
|
4034
4122
|
serverProvider: i,
|
|
4035
4123
|
transportMode: o,
|
|
4036
|
-
...
|
|
4124
|
+
...jl(e)
|
|
4037
4125
|
};
|
|
4038
4126
|
},
|
|
4039
4127
|
getAuthFetcher: (t) => {
|
|
@@ -4063,20 +4151,20 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
4063
4151
|
* - Context contains readable text (at least 10 characters)
|
|
4064
4152
|
*/
|
|
4065
4153
|
isVisibleInContext(t) {
|
|
4066
|
-
return
|
|
4154
|
+
return $r(t);
|
|
4067
4155
|
},
|
|
4068
4156
|
renderToolbar(t, e) {
|
|
4069
4157
|
const r = () => {
|
|
4070
|
-
const s =
|
|
4071
|
-
return
|
|
4072
|
-
}, i =
|
|
4158
|
+
const s = jr(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0);
|
|
4159
|
+
return Gl(s.speedOptions);
|
|
4160
|
+
}, i = Ci(this.toolId, e.scope.level, e.scope.scopeId), o = () => {
|
|
4073
4161
|
const s = e.ui?.size;
|
|
4074
4162
|
return s === "sm" || s === "lg" ? s : "md";
|
|
4075
4163
|
}, n = () => {
|
|
4076
|
-
let s =
|
|
4077
|
-
return s && typeof s.isConnected == "boolean" && !s.isConnected && (
|
|
4078
|
-
|
|
4079
|
-
},
|
|
4164
|
+
let s = Wt.get(i);
|
|
4165
|
+
return s && typeof s.isConnected == "boolean" && !s.isConnected && (Wt.delete(i), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[Ul] = () => {
|
|
4166
|
+
Wt.get(i) === s && Wt.delete(i);
|
|
4167
|
+
}, Wt.set(i, s)), s.setAttribute("tool-id", i), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", o()), s.speedOptions = r(), s;
|
|
4080
4168
|
};
|
|
4081
4169
|
return {
|
|
4082
4170
|
toolId: this.toolId,
|
|
@@ -4089,15 +4177,13 @@ const Nl = /* @__PURE__ */ new Set([
|
|
|
4089
4177
|
],
|
|
4090
4178
|
sync: () => {
|
|
4091
4179
|
const s = n();
|
|
4092
|
-
s.setAttribute("tool-id", i), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", o()), s.speedOptions = r()
|
|
4093
|
-
console.error("[ttsToolRegistration] Failed to initialize TTS service:", l);
|
|
4094
|
-
});
|
|
4180
|
+
s.setAttribute("tool-id", i), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", o()), s.speedOptions = r();
|
|
4095
4181
|
}
|
|
4096
4182
|
};
|
|
4097
4183
|
}
|
|
4098
4184
|
};
|
|
4099
|
-
function
|
|
4100
|
-
const r =
|
|
4185
|
+
function ze(t, e) {
|
|
4186
|
+
const r = Ci(t, e.scope.level, e.scope.scopeId);
|
|
4101
4187
|
return {
|
|
4102
4188
|
fullToolId: r,
|
|
4103
4189
|
isActive: () => e.isToolVisible(r),
|
|
@@ -4107,11 +4193,11 @@ function He(t, e) {
|
|
|
4107
4193
|
}
|
|
4108
4194
|
};
|
|
4109
4195
|
}
|
|
4110
|
-
function
|
|
4196
|
+
function je(t) {
|
|
4111
4197
|
const e = t.isActive();
|
|
4112
4198
|
t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
|
|
4113
4199
|
}
|
|
4114
|
-
const
|
|
4200
|
+
const Kl = {
|
|
4115
4201
|
toolId: "ruler",
|
|
4116
4202
|
name: "Ruler",
|
|
4117
4203
|
description: "On-screen ruler for measurements",
|
|
@@ -4130,10 +4216,10 @@ const Gl = {
|
|
|
4130
4216
|
* Pass 2: Ruler is relevant when math content is present
|
|
4131
4217
|
*/
|
|
4132
4218
|
isVisibleInContext(t) {
|
|
4133
|
-
return
|
|
4219
|
+
return Er(t);
|
|
4134
4220
|
},
|
|
4135
4221
|
renderToolbar(t, e) {
|
|
4136
|
-
const r =
|
|
4222
|
+
const r = ze(this.toolId, e), i = {
|
|
4137
4223
|
toolId: this.toolId,
|
|
4138
4224
|
label: this.name,
|
|
4139
4225
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4142,13 +4228,13 @@ const Gl = {
|
|
|
4142
4228
|
tooltip: "Ruler",
|
|
4143
4229
|
onClick: () => e.toggleTool(this.toolId),
|
|
4144
4230
|
active: r.isActive()
|
|
4145
|
-
}, o = e.componentOverrides ?? {}, n =
|
|
4231
|
+
}, o = e.componentOverrides ?? {}, n = Pe(this.toolId, t, e, o);
|
|
4146
4232
|
return n.setAttribute("tool-id", r.fullToolId), {
|
|
4147
4233
|
toolId: this.toolId,
|
|
4148
4234
|
button: i,
|
|
4149
4235
|
elements: [{ element: n, mount: "after-buttons" }],
|
|
4150
4236
|
sync: () => {
|
|
4151
|
-
|
|
4237
|
+
je({
|
|
4152
4238
|
button: i,
|
|
4153
4239
|
overlay: n,
|
|
4154
4240
|
isActive: r.isActive
|
|
@@ -4157,7 +4243,7 @@ const Gl = {
|
|
|
4157
4243
|
subscribeActive: r.subscribeActive
|
|
4158
4244
|
};
|
|
4159
4245
|
}
|
|
4160
|
-
},
|
|
4246
|
+
}, Yl = {
|
|
4161
4247
|
toolId: "protractor",
|
|
4162
4248
|
name: "Protractor",
|
|
4163
4249
|
description: "On-screen protractor for angle measurements",
|
|
@@ -4176,10 +4262,10 @@ const Gl = {
|
|
|
4176
4262
|
* Pass 2: Protractor is relevant when math content is present
|
|
4177
4263
|
*/
|
|
4178
4264
|
isVisibleInContext(t) {
|
|
4179
|
-
return
|
|
4265
|
+
return Er(t);
|
|
4180
4266
|
},
|
|
4181
4267
|
renderToolbar(t, e) {
|
|
4182
|
-
const r =
|
|
4268
|
+
const r = ze(this.toolId, e), i = {
|
|
4183
4269
|
toolId: this.toolId,
|
|
4184
4270
|
label: this.name,
|
|
4185
4271
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4188,13 +4274,13 @@ const Gl = {
|
|
|
4188
4274
|
tooltip: "Protractor",
|
|
4189
4275
|
onClick: () => e.toggleTool(this.toolId),
|
|
4190
4276
|
active: r.isActive()
|
|
4191
|
-
}, o = e.componentOverrides ?? {}, n =
|
|
4277
|
+
}, o = e.componentOverrides ?? {}, n = Pe(this.toolId, t, e, o);
|
|
4192
4278
|
return n.setAttribute("tool-id", r.fullToolId), {
|
|
4193
4279
|
toolId: this.toolId,
|
|
4194
4280
|
button: i,
|
|
4195
4281
|
elements: [{ element: n, mount: "after-buttons" }],
|
|
4196
4282
|
sync: () => {
|
|
4197
|
-
|
|
4283
|
+
je({
|
|
4198
4284
|
button: i,
|
|
4199
4285
|
overlay: n,
|
|
4200
4286
|
isActive: r.isActive
|
|
@@ -4203,7 +4289,7 @@ const Gl = {
|
|
|
4203
4289
|
subscribeActive: r.subscribeActive
|
|
4204
4290
|
};
|
|
4205
4291
|
}
|
|
4206
|
-
},
|
|
4292
|
+
}, Ql = {
|
|
4207
4293
|
toolId: "answerEliminator",
|
|
4208
4294
|
name: "Answer Eliminator",
|
|
4209
4295
|
description: "Strike through answer choices",
|
|
@@ -4226,10 +4312,10 @@ const Gl = {
|
|
|
4226
4312
|
* Pass 2: Answer eliminator is relevant only for choice-based questions
|
|
4227
4313
|
*/
|
|
4228
4314
|
isVisibleInContext(t) {
|
|
4229
|
-
return
|
|
4315
|
+
return Sl(t);
|
|
4230
4316
|
},
|
|
4231
4317
|
renderToolbar(t, e) {
|
|
4232
|
-
const r =
|
|
4318
|
+
const r = ze(this.toolId, e), i = e.componentOverrides ?? {}, o = Pe(this.toolId, t, e, i);
|
|
4233
4319
|
o.setAttribute("tool-id", r.fullToolId), o.setAttribute("strategy", "strikethrough"), o.setAttribute("button-alignment", "inline");
|
|
4234
4320
|
const n = {
|
|
4235
4321
|
toolId: this.toolId,
|
|
@@ -4246,7 +4332,7 @@ const Gl = {
|
|
|
4246
4332
|
button: n,
|
|
4247
4333
|
elements: [{ element: o, mount: "after-buttons" }],
|
|
4248
4334
|
sync: () => {
|
|
4249
|
-
|
|
4335
|
+
je({
|
|
4250
4336
|
button: n,
|
|
4251
4337
|
overlay: o,
|
|
4252
4338
|
isActive: r.isActive
|
|
@@ -4257,7 +4343,7 @@ const Gl = {
|
|
|
4257
4343
|
subscribeActive: r.subscribeActive
|
|
4258
4344
|
};
|
|
4259
4345
|
}
|
|
4260
|
-
},
|
|
4346
|
+
}, Jl = {
|
|
4261
4347
|
toolId: "highlighter",
|
|
4262
4348
|
name: "Highlighter",
|
|
4263
4349
|
description: "Highlight text",
|
|
@@ -4271,10 +4357,10 @@ const Gl = {
|
|
|
4271
4357
|
* Pass 2: Highlighter is relevant when readable text is available
|
|
4272
4358
|
*/
|
|
4273
4359
|
isVisibleInContext(t) {
|
|
4274
|
-
return
|
|
4360
|
+
return $r(t);
|
|
4275
4361
|
},
|
|
4276
4362
|
renderToolbar(t, e) {
|
|
4277
|
-
const r =
|
|
4363
|
+
const r = ze(this.toolId, e), i = {
|
|
4278
4364
|
toolId: this.toolId,
|
|
4279
4365
|
label: this.name,
|
|
4280
4366
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4283,13 +4369,13 @@ const Gl = {
|
|
|
4283
4369
|
tooltip: "Highlight",
|
|
4284
4370
|
onClick: () => e.toggleTool(this.toolId),
|
|
4285
4371
|
active: r.isActive()
|
|
4286
|
-
}, o = e.componentOverrides ?? {}, n =
|
|
4372
|
+
}, o = e.componentOverrides ?? {}, n = Pe(this.toolId, t, e, o);
|
|
4287
4373
|
return n.setAttribute("tool-id", r.fullToolId), {
|
|
4288
4374
|
toolId: this.toolId,
|
|
4289
4375
|
button: i,
|
|
4290
4376
|
elements: [{ element: n, mount: "after-buttons" }],
|
|
4291
4377
|
sync: () => {
|
|
4292
|
-
|
|
4378
|
+
je({
|
|
4293
4379
|
button: i,
|
|
4294
4380
|
overlay: n,
|
|
4295
4381
|
isActive: r.isActive,
|
|
@@ -4301,7 +4387,7 @@ const Gl = {
|
|
|
4301
4387
|
subscribeActive: r.subscribeActive
|
|
4302
4388
|
};
|
|
4303
4389
|
}
|
|
4304
|
-
},
|
|
4390
|
+
}, Xl = {
|
|
4305
4391
|
toolId: "lineReader",
|
|
4306
4392
|
name: "Line Reader",
|
|
4307
4393
|
description: "Reading guide overlay",
|
|
@@ -4326,10 +4412,10 @@ const Gl = {
|
|
|
4326
4412
|
* Pass 2: Line reader is relevant when readable text is present
|
|
4327
4413
|
*/
|
|
4328
4414
|
isVisibleInContext(t) {
|
|
4329
|
-
return
|
|
4415
|
+
return $r(t);
|
|
4330
4416
|
},
|
|
4331
4417
|
renderToolbar(t, e) {
|
|
4332
|
-
const r =
|
|
4418
|
+
const r = ze(this.toolId, e), i = {
|
|
4333
4419
|
toolId: this.toolId,
|
|
4334
4420
|
label: this.name,
|
|
4335
4421
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4338,13 +4424,13 @@ const Gl = {
|
|
|
4338
4424
|
tooltip: "Line Reader",
|
|
4339
4425
|
onClick: () => e.toggleTool(this.toolId),
|
|
4340
4426
|
active: r.isActive()
|
|
4341
|
-
}, o = e.componentOverrides ?? {}, n =
|
|
4427
|
+
}, o = e.componentOverrides ?? {}, n = Pe(this.toolId, t, e, o);
|
|
4342
4428
|
return n.setAttribute("tool-id", r.fullToolId), {
|
|
4343
4429
|
toolId: this.toolId,
|
|
4344
4430
|
button: i,
|
|
4345
4431
|
elements: [{ element: n, mount: "after-buttons" }],
|
|
4346
4432
|
sync: () => {
|
|
4347
|
-
|
|
4433
|
+
je({
|
|
4348
4434
|
button: i,
|
|
4349
4435
|
overlay: n,
|
|
4350
4436
|
isActive: r.isActive
|
|
@@ -4353,7 +4439,7 @@ const Gl = {
|
|
|
4353
4439
|
subscribeActive: r.subscribeActive
|
|
4354
4440
|
};
|
|
4355
4441
|
}
|
|
4356
|
-
},
|
|
4442
|
+
}, Zl = {
|
|
4357
4443
|
toolId: "theme",
|
|
4358
4444
|
name: "Theme",
|
|
4359
4445
|
description: "Accessible themes and contrast",
|
|
@@ -4385,7 +4471,7 @@ const Gl = {
|
|
|
4385
4471
|
return !0;
|
|
4386
4472
|
},
|
|
4387
4473
|
renderToolbar(t, e) {
|
|
4388
|
-
const r =
|
|
4474
|
+
const r = ze(this.toolId, e), i = {
|
|
4389
4475
|
toolId: this.toolId,
|
|
4390
4476
|
label: this.name,
|
|
4391
4477
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4394,7 +4480,7 @@ const Gl = {
|
|
|
4394
4480
|
tooltip: "Theme",
|
|
4395
4481
|
onClick: () => e.toggleTool(this.toolId),
|
|
4396
4482
|
active: r.isActive()
|
|
4397
|
-
}, o = e.componentOverrides ?? {}, n =
|
|
4483
|
+
}, o = e.componentOverrides ?? {}, n = Pe(this.toolId, t, e, o);
|
|
4398
4484
|
return n.setAttribute("tool-id", r.fullToolId), {
|
|
4399
4485
|
toolId: this.toolId,
|
|
4400
4486
|
button: i,
|
|
@@ -4415,7 +4501,7 @@ const Gl = {
|
|
|
4415
4501
|
}
|
|
4416
4502
|
],
|
|
4417
4503
|
sync: () => {
|
|
4418
|
-
|
|
4504
|
+
je({
|
|
4419
4505
|
button: i,
|
|
4420
4506
|
overlay: n,
|
|
4421
4507
|
isActive: r.isActive
|
|
@@ -4424,7 +4510,7 @@ const Gl = {
|
|
|
4424
4510
|
subscribeActive: r.subscribeActive
|
|
4425
4511
|
};
|
|
4426
4512
|
}
|
|
4427
|
-
},
|
|
4513
|
+
}, ea = {
|
|
4428
4514
|
toolId: "annotationToolbar",
|
|
4429
4515
|
name: "Highlighter",
|
|
4430
4516
|
description: "Highlight and annotate text",
|
|
@@ -4451,10 +4537,10 @@ const Gl = {
|
|
|
4451
4537
|
* Pass 2: Annotation is relevant when readable text is present
|
|
4452
4538
|
*/
|
|
4453
4539
|
isVisibleInContext(t) {
|
|
4454
|
-
return
|
|
4540
|
+
return $r(t);
|
|
4455
4541
|
},
|
|
4456
4542
|
renderToolbar(t, e) {
|
|
4457
|
-
const r =
|
|
4543
|
+
const r = ze(this.toolId, e), i = {
|
|
4458
4544
|
toolId: this.toolId,
|
|
4459
4545
|
label: this.name,
|
|
4460
4546
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4463,13 +4549,13 @@ const Gl = {
|
|
|
4463
4549
|
tooltip: "Highlight",
|
|
4464
4550
|
onClick: () => e.toggleTool(this.toolId),
|
|
4465
4551
|
active: r.isActive()
|
|
4466
|
-
}, o = e.componentOverrides ?? {}, n =
|
|
4552
|
+
}, o = e.componentOverrides ?? {}, n = Pe(this.toolId, t, e, o);
|
|
4467
4553
|
return n.setAttribute("tool-id", r.fullToolId), {
|
|
4468
4554
|
toolId: this.toolId,
|
|
4469
4555
|
button: i,
|
|
4470
4556
|
elements: [{ element: n, mount: "after-buttons" }],
|
|
4471
4557
|
sync: () => {
|
|
4472
|
-
|
|
4558
|
+
je({
|
|
4473
4559
|
button: i,
|
|
4474
4560
|
overlay: n,
|
|
4475
4561
|
isActive: r.isActive
|
|
@@ -4478,7 +4564,7 @@ const Gl = {
|
|
|
4478
4564
|
subscribeActive: r.subscribeActive
|
|
4479
4565
|
};
|
|
4480
4566
|
}
|
|
4481
|
-
},
|
|
4567
|
+
}, ta = {
|
|
4482
4568
|
toolId: "graph",
|
|
4483
4569
|
name: "Graph",
|
|
4484
4570
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -4501,10 +4587,10 @@ const Gl = {
|
|
|
4501
4587
|
* Pass 2: Graph is relevant when math content is present
|
|
4502
4588
|
*/
|
|
4503
4589
|
isVisibleInContext(t) {
|
|
4504
|
-
return
|
|
4590
|
+
return Er(t);
|
|
4505
4591
|
},
|
|
4506
4592
|
renderToolbar(t, e) {
|
|
4507
|
-
const r =
|
|
4593
|
+
const r = ze(this.toolId, e), i = {
|
|
4508
4594
|
toolId: this.toolId,
|
|
4509
4595
|
label: this.name,
|
|
4510
4596
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4513,7 +4599,7 @@ const Gl = {
|
|
|
4513
4599
|
tooltip: "Graph",
|
|
4514
4600
|
onClick: () => e.toggleTool(this.toolId),
|
|
4515
4601
|
active: r.isActive()
|
|
4516
|
-
}, o = e.componentOverrides ?? {}, n =
|
|
4602
|
+
}, o = e.componentOverrides ?? {}, n = Pe(this.toolId, t, e, o);
|
|
4517
4603
|
return n.setAttribute("tool-id", r.fullToolId), {
|
|
4518
4604
|
toolId: this.toolId,
|
|
4519
4605
|
button: i,
|
|
@@ -4534,7 +4620,7 @@ const Gl = {
|
|
|
4534
4620
|
}
|
|
4535
4621
|
],
|
|
4536
4622
|
sync: () => {
|
|
4537
|
-
|
|
4623
|
+
je({
|
|
4538
4624
|
button: i,
|
|
4539
4625
|
overlay: n,
|
|
4540
4626
|
isActive: r.isActive
|
|
@@ -4543,7 +4629,7 @@ const Gl = {
|
|
|
4543
4629
|
subscribeActive: r.subscribeActive
|
|
4544
4630
|
};
|
|
4545
4631
|
}
|
|
4546
|
-
},
|
|
4632
|
+
}, ra = {
|
|
4547
4633
|
toolId: "periodicTable",
|
|
4548
4634
|
name: "Periodic Table",
|
|
4549
4635
|
description: "Chemistry periodic table reference",
|
|
@@ -4567,7 +4653,7 @@ const Gl = {
|
|
|
4567
4653
|
return El(t);
|
|
4568
4654
|
},
|
|
4569
4655
|
renderToolbar(t, e) {
|
|
4570
|
-
const r =
|
|
4656
|
+
const r = ze(this.toolId, e), i = {
|
|
4571
4657
|
toolId: this.toolId,
|
|
4572
4658
|
label: this.name,
|
|
4573
4659
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -4576,7 +4662,7 @@ const Gl = {
|
|
|
4576
4662
|
tooltip: "Periodic Table",
|
|
4577
4663
|
onClick: () => e.toggleTool(this.toolId),
|
|
4578
4664
|
active: r.isActive()
|
|
4579
|
-
}, o = e.componentOverrides ?? {}, n =
|
|
4665
|
+
}, o = e.componentOverrides ?? {}, n = Pe(this.toolId, t, e, o);
|
|
4580
4666
|
return n.setAttribute("tool-id", r.fullToolId), {
|
|
4581
4667
|
toolId: this.toolId,
|
|
4582
4668
|
button: i,
|
|
@@ -4597,7 +4683,7 @@ const Gl = {
|
|
|
4597
4683
|
}
|
|
4598
4684
|
],
|
|
4599
4685
|
sync: () => {
|
|
4600
|
-
|
|
4686
|
+
je({
|
|
4601
4687
|
button: i,
|
|
4602
4688
|
overlay: n,
|
|
4603
4689
|
isActive: r.isActive
|
|
@@ -4606,53 +4692,53 @@ const Gl = {
|
|
|
4606
4692
|
subscribeActive: r.subscribeActive
|
|
4607
4693
|
};
|
|
4608
4694
|
}
|
|
4609
|
-
},
|
|
4695
|
+
}, ia = [
|
|
4610
4696
|
Bl,
|
|
4611
|
-
Ul,
|
|
4612
|
-
Gl,
|
|
4613
4697
|
Wl,
|
|
4614
4698
|
Kl,
|
|
4615
4699
|
Yl,
|
|
4616
4700
|
Ql,
|
|
4701
|
+
Jl,
|
|
4617
4702
|
Xl,
|
|
4618
4703
|
Zl,
|
|
4619
4704
|
ea,
|
|
4620
|
-
ta
|
|
4705
|
+
ta,
|
|
4706
|
+
ra
|
|
4621
4707
|
];
|
|
4622
|
-
function
|
|
4708
|
+
function oa(t = {}) {
|
|
4623
4709
|
const e = new Tl(), r = {
|
|
4624
4710
|
toolTagMap: {
|
|
4625
|
-
...
|
|
4711
|
+
...vn,
|
|
4626
4712
|
...t.toolTagMap || {}
|
|
4627
4713
|
},
|
|
4628
4714
|
toolComponentFactory: t.toolComponentFactory,
|
|
4629
4715
|
toolComponentFactories: t.toolComponentFactories
|
|
4630
4716
|
}, i = (o) => t.overrides?.[o.toolId] || o;
|
|
4631
|
-
return t.includePackagedTools &&
|
|
4717
|
+
return t.includePackagedTools && na(e, {
|
|
4632
4718
|
toolIds: t.toolIds,
|
|
4633
4719
|
applyOverrides: i
|
|
4634
4720
|
}), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(r), e;
|
|
4635
4721
|
}
|
|
4636
|
-
function
|
|
4722
|
+
function na(t, e = {}) {
|
|
4637
4723
|
const r = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, i = e.applyOverrides || ((o) => o);
|
|
4638
|
-
for (const o of
|
|
4724
|
+
for (const o of ia)
|
|
4639
4725
|
r && !r.has(o.toolId) || t.register(i(o));
|
|
4640
4726
|
}
|
|
4641
|
-
function
|
|
4642
|
-
return
|
|
4727
|
+
function sa(t = {}) {
|
|
4728
|
+
return oa({
|
|
4643
4729
|
...t,
|
|
4644
4730
|
includePackagedTools: !0
|
|
4645
4731
|
});
|
|
4646
4732
|
}
|
|
4647
|
-
function
|
|
4648
|
-
const t =
|
|
4733
|
+
function la() {
|
|
4734
|
+
const t = sa(), e = /* @__PURE__ */ new Set();
|
|
4649
4735
|
for (const r of t.getAllTools())
|
|
4650
4736
|
for (const i of r.pnpSupportIds || [])
|
|
4651
4737
|
e.add(i);
|
|
4652
4738
|
return [...e].sort();
|
|
4653
4739
|
}
|
|
4654
|
-
|
|
4655
|
-
const
|
|
4740
|
+
la();
|
|
4741
|
+
const aa = {
|
|
4656
4742
|
/**
|
|
4657
4743
|
* Visual accessibility features
|
|
4658
4744
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -4823,22 +4909,22 @@ const la = {
|
|
|
4823
4909
|
tutorialAvailable: "tutorialAvailable"
|
|
4824
4910
|
}
|
|
4825
4911
|
};
|
|
4826
|
-
Object.values(
|
|
4827
|
-
var
|
|
4912
|
+
Object.values(aa).flatMap((t) => Object.values(t));
|
|
4913
|
+
var li;
|
|
4828
4914
|
(function(t) {
|
|
4829
4915
|
t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
4830
|
-
})(
|
|
4831
|
-
var
|
|
4916
|
+
})(li || (li = {}));
|
|
4917
|
+
var oo;
|
|
4832
4918
|
(function(t) {
|
|
4833
4919
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
4834
|
-
})(
|
|
4835
|
-
function
|
|
4920
|
+
})(oo || (oo = {}));
|
|
4921
|
+
function ca(t) {
|
|
4836
4922
|
return t === "light" || t === "dark" || t === "auto";
|
|
4837
4923
|
}
|
|
4838
|
-
function
|
|
4924
|
+
function ua(t) {
|
|
4839
4925
|
return t === "self" || t === "document";
|
|
4840
4926
|
}
|
|
4841
|
-
function
|
|
4927
|
+
function ai(t) {
|
|
4842
4928
|
if (!t || typeof t != "object")
|
|
4843
4929
|
return {};
|
|
4844
4930
|
const e = {};
|
|
@@ -4850,7 +4936,7 @@ function li(t) {
|
|
|
4850
4936
|
} else typeof i == "number" && (e[r] = String(i));
|
|
4851
4937
|
return e;
|
|
4852
4938
|
}
|
|
4853
|
-
const
|
|
4939
|
+
const fa = [
|
|
4854
4940
|
{
|
|
4855
4941
|
id: "default",
|
|
4856
4942
|
name: "Default",
|
|
@@ -5044,17 +5130,17 @@ const ua = [
|
|
|
5044
5130
|
},
|
|
5045
5131
|
preview: { bg: "#333333", text: "#e0e0e0", primary: "#aaaaaa" }
|
|
5046
5132
|
}
|
|
5047
|
-
],
|
|
5048
|
-
function
|
|
5049
|
-
return [...
|
|
5050
|
-
}
|
|
5051
|
-
function da(t) {
|
|
5052
|
-
return t ? gn.get(t) ?? ai.get(t) : ai.get("default");
|
|
5133
|
+
], ci = new Map(fa.map((t) => [t.id, t])), bn = /* @__PURE__ */ new Map();
|
|
5134
|
+
function da() {
|
|
5135
|
+
return [...ci.values(), ...bn.values()];
|
|
5053
5136
|
}
|
|
5054
5137
|
function pa(t) {
|
|
5055
|
-
return
|
|
5138
|
+
return t ? bn.get(t) ?? ci.get(t) : ci.get("default");
|
|
5139
|
+
}
|
|
5140
|
+
function ha(t) {
|
|
5141
|
+
return pa(t)?.variables ?? {};
|
|
5056
5142
|
}
|
|
5057
|
-
const
|
|
5143
|
+
const va = {
|
|
5058
5144
|
"--pie-text": "black",
|
|
5059
5145
|
"--pie-disabled": "grey",
|
|
5060
5146
|
"--pie-disabled-secondary": "#ababab",
|
|
@@ -5103,7 +5189,7 @@ const ha = {
|
|
|
5103
5189
|
"--pie-button-hover-color": "#111827",
|
|
5104
5190
|
"--pie-button-active-bg": "#f3f4f6",
|
|
5105
5191
|
"--pie-button-focus-outline": "#3b82f6"
|
|
5106
|
-
},
|
|
5192
|
+
}, ma = {
|
|
5107
5193
|
"--pie-text": "#ffffff",
|
|
5108
5194
|
"--pie-disabled": "#999999",
|
|
5109
5195
|
"--pie-disabled-secondary": "#777777",
|
|
@@ -5152,52 +5238,52 @@ const ha = {
|
|
|
5152
5238
|
"--pie-button-hover-color": "#ffffff",
|
|
5153
5239
|
"--pie-button-active-bg": "#4b5563",
|
|
5154
5240
|
"--pie-button-focus-outline": "#93c5fd"
|
|
5155
|
-
},
|
|
5156
|
-
function
|
|
5241
|
+
}, ui = /* @__PURE__ */ new Map();
|
|
5242
|
+
function vr(t) {
|
|
5157
5243
|
const e = t.trim();
|
|
5158
5244
|
return e || void 0;
|
|
5159
5245
|
}
|
|
5160
|
-
function
|
|
5246
|
+
function xe(t) {
|
|
5161
5247
|
if (!(!t.left || !t.right))
|
|
5162
5248
|
return `color-mix(in srgb, ${t.left} ${t.leftWeight}, ${t.right})`;
|
|
5163
5249
|
}
|
|
5164
|
-
function
|
|
5165
|
-
const e = (r) =>
|
|
5166
|
-
return
|
|
5250
|
+
function ga(t) {
|
|
5251
|
+
const e = (r) => vr(t.getPropertyValue(r));
|
|
5252
|
+
return ai({
|
|
5167
5253
|
"--pie-background": e("--color-base-100"),
|
|
5168
5254
|
"--pie-background-dark": e("--color-base-200"),
|
|
5169
5255
|
"--pie-secondary-background": e("--color-base-200"),
|
|
5170
5256
|
"--pie-dropdown-background": e("--color-base-300"),
|
|
5171
5257
|
"--pie-text": e("--color-base-content"),
|
|
5172
5258
|
"--pie-primary": e("--color-primary"),
|
|
5173
|
-
"--pie-primary-light":
|
|
5259
|
+
"--pie-primary-light": xe({
|
|
5174
5260
|
left: e("--color-primary"),
|
|
5175
5261
|
right: e("--color-base-100"),
|
|
5176
5262
|
leftWeight: "60%"
|
|
5177
5263
|
}),
|
|
5178
|
-
"--pie-primary-dark":
|
|
5264
|
+
"--pie-primary-dark": xe({
|
|
5179
5265
|
left: e("--color-primary"),
|
|
5180
5266
|
right: e("--color-base-content"),
|
|
5181
5267
|
leftWeight: "75%"
|
|
5182
5268
|
}),
|
|
5183
|
-
"--pie-faded-primary":
|
|
5269
|
+
"--pie-faded-primary": xe({
|
|
5184
5270
|
left: e("--color-primary"),
|
|
5185
5271
|
right: e("--color-base-100"),
|
|
5186
5272
|
leftWeight: "20%"
|
|
5187
5273
|
}),
|
|
5188
5274
|
"--pie-secondary": e("--color-secondary"),
|
|
5189
|
-
"--pie-secondary-light":
|
|
5275
|
+
"--pie-secondary-light": xe({
|
|
5190
5276
|
left: e("--color-secondary"),
|
|
5191
5277
|
right: e("--color-base-100"),
|
|
5192
5278
|
leftWeight: "60%"
|
|
5193
5279
|
}),
|
|
5194
|
-
"--pie-secondary-dark":
|
|
5280
|
+
"--pie-secondary-dark": xe({
|
|
5195
5281
|
left: e("--color-secondary"),
|
|
5196
5282
|
right: e("--color-base-content"),
|
|
5197
5283
|
leftWeight: "75%"
|
|
5198
5284
|
}),
|
|
5199
5285
|
"--pie-tertiary": e("--color-accent"),
|
|
5200
|
-
"--pie-tertiary-light":
|
|
5286
|
+
"--pie-tertiary-light": xe({
|
|
5201
5287
|
left: e("--color-accent"),
|
|
5202
5288
|
right: e("--color-base-100"),
|
|
5203
5289
|
leftWeight: "60%"
|
|
@@ -5207,7 +5293,7 @@ function ma(t) {
|
|
|
5207
5293
|
"--pie-border-dark": e("--color-neutral"),
|
|
5208
5294
|
"--pie-border-gray": e("--color-base-300"),
|
|
5209
5295
|
"--pie-correct": e("--color-success"),
|
|
5210
|
-
"--pie-correct-secondary":
|
|
5296
|
+
"--pie-correct-secondary": xe({
|
|
5211
5297
|
left: e("--color-success"),
|
|
5212
5298
|
right: e("--color-base-100"),
|
|
5213
5299
|
leftWeight: "20%"
|
|
@@ -5215,7 +5301,7 @@ function ma(t) {
|
|
|
5215
5301
|
"--pie-correct-tertiary": e("--color-success"),
|
|
5216
5302
|
"--pie-correct-icon": e("--color-success"),
|
|
5217
5303
|
"--pie-incorrect": e("--color-error"),
|
|
5218
|
-
"--pie-incorrect-secondary":
|
|
5304
|
+
"--pie-incorrect-secondary": xe({
|
|
5219
5305
|
left: e("--color-error"),
|
|
5220
5306
|
right: e("--color-base-100"),
|
|
5221
5307
|
leftWeight: "20%"
|
|
@@ -5225,7 +5311,7 @@ function ma(t) {
|
|
|
5225
5311
|
"--pie-missing-icon": e("--color-error"),
|
|
5226
5312
|
"--pie-disabled": e("--color-base-300"),
|
|
5227
5313
|
"--pie-disabled-secondary": e("--color-base-200"),
|
|
5228
|
-
"--pie-focus-checked":
|
|
5314
|
+
"--pie-focus-checked": xe({
|
|
5229
5315
|
left: e("--color-primary"),
|
|
5230
5316
|
right: e("--color-base-100"),
|
|
5231
5317
|
leftWeight: "20%"
|
|
@@ -5249,38 +5335,38 @@ function ma(t) {
|
|
|
5249
5335
|
"--pie-button-focus-outline": e("--color-primary")
|
|
5250
5336
|
});
|
|
5251
5337
|
}
|
|
5252
|
-
const
|
|
5338
|
+
const no = {
|
|
5253
5339
|
id: "daisyui",
|
|
5254
5340
|
canRead(t) {
|
|
5255
5341
|
const e = getComputedStyle(t);
|
|
5256
|
-
return !!(
|
|
5342
|
+
return !!(vr(e.getPropertyValue("--color-base-100")) || vr(e.getPropertyValue("--color-base-content")) || vr(e.getPropertyValue("--color-primary")));
|
|
5257
5343
|
},
|
|
5258
5344
|
read(t) {
|
|
5259
|
-
return
|
|
5345
|
+
return ga(getComputedStyle(t));
|
|
5260
5346
|
}
|
|
5261
5347
|
};
|
|
5262
|
-
|
|
5263
|
-
function
|
|
5348
|
+
ui.set(no.id, no);
|
|
5349
|
+
function ba(t) {
|
|
5264
5350
|
const e = t.provider?.trim() || "auto", r = (o) => {
|
|
5265
5351
|
if (e !== "auto") {
|
|
5266
|
-
const n =
|
|
5267
|
-
return !n || !n.canRead(o) ? {} :
|
|
5352
|
+
const n = ui.get(e);
|
|
5353
|
+
return !n || !n.canRead(o) ? {} : ai(n.read(o));
|
|
5268
5354
|
}
|
|
5269
|
-
for (const n of
|
|
5355
|
+
for (const n of ui.values())
|
|
5270
5356
|
if (n.canRead(o))
|
|
5271
|
-
return
|
|
5357
|
+
return ai(n.read(o));
|
|
5272
5358
|
return {};
|
|
5273
5359
|
}, i = r(t.target);
|
|
5274
5360
|
return Object.keys(i).length > 0 ? i : typeof document < "u" && t.target !== document.documentElement ? r(document.documentElement) : {};
|
|
5275
5361
|
}
|
|
5276
|
-
const
|
|
5362
|
+
const ya = typeof HTMLElement > "u" ? class {
|
|
5277
5363
|
} : HTMLElement;
|
|
5278
|
-
function
|
|
5364
|
+
function fi(t) {
|
|
5279
5365
|
if (!t)
|
|
5280
5366
|
return {};
|
|
5281
5367
|
if (typeof t == "string")
|
|
5282
5368
|
try {
|
|
5283
|
-
return
|
|
5369
|
+
return fi(JSON.parse(t));
|
|
5284
5370
|
} catch {
|
|
5285
5371
|
return {};
|
|
5286
5372
|
}
|
|
@@ -5291,7 +5377,7 @@ function ui(t) {
|
|
|
5291
5377
|
r.startsWith("--") && (typeof i == "string" ? e[r] = i : typeof i == "number" && (e[r] = String(i)));
|
|
5292
5378
|
return e;
|
|
5293
5379
|
}
|
|
5294
|
-
class
|
|
5380
|
+
class _a extends ya {
|
|
5295
5381
|
constructor() {
|
|
5296
5382
|
super(...arguments);
|
|
5297
5383
|
h(this, "mediaQuery", null);
|
|
@@ -5304,14 +5390,14 @@ class ya extends ba {
|
|
|
5304
5390
|
}
|
|
5305
5391
|
get theme() {
|
|
5306
5392
|
const r = this.getAttribute("theme");
|
|
5307
|
-
return
|
|
5393
|
+
return ca(r) ? r : "light";
|
|
5308
5394
|
}
|
|
5309
5395
|
set theme(r) {
|
|
5310
5396
|
this.setAttribute("theme", r);
|
|
5311
5397
|
}
|
|
5312
5398
|
get scope() {
|
|
5313
5399
|
const r = this.getAttribute("scope");
|
|
5314
|
-
return
|
|
5400
|
+
return ua(r) ? r : "self";
|
|
5315
5401
|
}
|
|
5316
5402
|
set scope(r) {
|
|
5317
5403
|
this.setAttribute("scope", r);
|
|
@@ -5320,7 +5406,7 @@ class ya extends ba {
|
|
|
5320
5406
|
return { ...this.variablesOverride };
|
|
5321
5407
|
}
|
|
5322
5408
|
set variables(r) {
|
|
5323
|
-
this.variablesOverride =
|
|
5409
|
+
this.variablesOverride = fi(r), this.setAttribute("variables", JSON.stringify(this.variablesOverride)), this.applyTheme();
|
|
5324
5410
|
}
|
|
5325
5411
|
get provider() {
|
|
5326
5412
|
return this.getAttribute("provider")?.trim() || "auto";
|
|
@@ -5341,7 +5427,7 @@ class ya extends ba {
|
|
|
5341
5427
|
this.mediaQuery && this.mediaQuery.removeEventListener("change", this.onMediaChange), this.mediaQuery = null, this.scope === "self" && (this.clearPreviousKeys(this), this.removeAttribute("data-theme"), this.removeAttribute("data-color-scheme"));
|
|
5342
5428
|
}
|
|
5343
5429
|
attributeChangedCallback(r, i, o) {
|
|
5344
|
-
i !== o && (r === "variables" && (this.variablesOverride =
|
|
5430
|
+
i !== o && (r === "variables" && (this.variablesOverride = fi(o)), r === "theme" && this.setupAutoThemeListener(), this.applyTheme());
|
|
5345
5431
|
}
|
|
5346
5432
|
getTarget() {
|
|
5347
5433
|
return this.scope === "document" ? document.documentElement : this;
|
|
@@ -5351,10 +5437,10 @@ class ya extends ba {
|
|
|
5351
5437
|
return;
|
|
5352
5438
|
const { effectiveTheme: r, dataTheme: i } = this.resolveThemeState(), o = this.getTarget();
|
|
5353
5439
|
o.setAttribute("data-theme", i), this.scheme && this.scheme !== "default" ? o.setAttribute("data-color-scheme", this.scheme) : o.removeAttribute("data-color-scheme");
|
|
5354
|
-
const n = r === "dark" ?
|
|
5440
|
+
const n = r === "dark" ? ma : va, s = ba({
|
|
5355
5441
|
target: o,
|
|
5356
5442
|
provider: this.provider
|
|
5357
|
-
}), l =
|
|
5443
|
+
}), l = ha(this.scheme), a = {
|
|
5358
5444
|
...n,
|
|
5359
5445
|
...s,
|
|
5360
5446
|
...l,
|
|
@@ -5381,55 +5467,55 @@ class ya extends ba {
|
|
|
5381
5467
|
typeof window > "u" || (this.mediaQuery && (this.mediaQuery.removeEventListener("change", this.onMediaChange), this.mediaQuery = null), this.getAttribute("theme")?.trim() === "auto" && (this.mediaQuery = window.matchMedia("(prefers-color-scheme: dark)"), this.mediaQuery.addEventListener("change", this.onMediaChange)));
|
|
5382
5468
|
}
|
|
5383
5469
|
}
|
|
5384
|
-
function
|
|
5385
|
-
typeof customElements > "u" || customElements.get(t) || customElements.define(t,
|
|
5470
|
+
function wa(t = "pie-theme") {
|
|
5471
|
+
typeof customElements > "u" || customElements.get(t) || customElements.define(t, _a);
|
|
5386
5472
|
}
|
|
5387
|
-
|
|
5388
|
-
const
|
|
5389
|
-
function
|
|
5473
|
+
wa();
|
|
5474
|
+
const ka = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, yn = "https://proxy.pie-api.com", Ta = `${yn}/bundles/`;
|
|
5475
|
+
function _n(t) {
|
|
5390
5476
|
try {
|
|
5391
|
-
const e =
|
|
5477
|
+
const e = ka?.[t];
|
|
5392
5478
|
if (typeof e == "string" && e.length > 0)
|
|
5393
5479
|
return e;
|
|
5394
5480
|
} catch {
|
|
5395
5481
|
}
|
|
5396
5482
|
}
|
|
5397
|
-
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL ||
|
|
5398
|
-
typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL ||
|
|
5399
|
-
var
|
|
5483
|
+
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || _n("PUBLIC_BUILDER_ORIGIN_URL");
|
|
5484
|
+
typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || _n("PUBLIC_BUILDER_BUNDLE_URL");
|
|
5485
|
+
var di;
|
|
5400
5486
|
(function(t) {
|
|
5401
5487
|
t.player = "player.js", t.clientPlayer = "client-player.js", t.editor = "editor.js";
|
|
5402
|
-
})(
|
|
5403
|
-
var
|
|
5488
|
+
})(di || (di = {}));
|
|
5489
|
+
var so;
|
|
5404
5490
|
(function(t) {
|
|
5405
5491
|
t.loading = "loading", t.loaded = "loaded";
|
|
5406
|
-
})(
|
|
5492
|
+
})(so || (so = {}));
|
|
5407
5493
|
typeof window < "u" && !window.pieHelpers && (window.pieHelpers = {
|
|
5408
5494
|
loadingScripts: {},
|
|
5409
5495
|
loadingPromises: {}
|
|
5410
5496
|
});
|
|
5411
|
-
var so;
|
|
5412
|
-
(function(t) {
|
|
5413
|
-
t.SAVE = "save", t.MODEL = "model", t.SCORE = "score", t.MANUAL_SCORE = "manual-score";
|
|
5414
|
-
})(so || (so = {}));
|
|
5415
5497
|
var lo;
|
|
5416
5498
|
(function(t) {
|
|
5417
|
-
t.
|
|
5499
|
+
t.SAVE = "save", t.MODEL = "model", t.SCORE = "score", t.MANUAL_SCORE = "manual-score";
|
|
5418
5500
|
})(lo || (lo = {}));
|
|
5419
5501
|
var ao;
|
|
5420
5502
|
(function(t) {
|
|
5421
|
-
t.
|
|
5503
|
+
t.AUTO = "auto", t.MANUAL = "manual";
|
|
5422
5504
|
})(ao || (ao = {}));
|
|
5423
5505
|
var co;
|
|
5424
5506
|
(function(t) {
|
|
5425
|
-
t.
|
|
5507
|
+
t.GATHER = "gather", t.VIEW = "view", t.EVALUATE = "evaluate";
|
|
5426
5508
|
})(co || (co = {}));
|
|
5427
5509
|
var uo;
|
|
5428
5510
|
(function(t) {
|
|
5429
|
-
t
|
|
5511
|
+
t.PENDING = "pending", t.IN_PROGRESS = "in_progress", t.COMPLETED = "completed", t.FAILED = "failed";
|
|
5430
5512
|
})(uo || (uo = {}));
|
|
5431
|
-
|
|
5432
|
-
function
|
|
5513
|
+
var fo;
|
|
5514
|
+
(function(t) {
|
|
5515
|
+
t[t.ROOT = 0] = "ROOT", t[t.SUBJECT = 1] = "SUBJECT", t[t.LEVEL = 2] = "LEVEL", t[t.STANDARD = 3] = "STANDARD";
|
|
5516
|
+
})(fo || (fo = {}));
|
|
5517
|
+
di.player;
|
|
5518
|
+
function Ia(t) {
|
|
5433
5519
|
const e = typeof document < "u" ? document.activeElement : null;
|
|
5434
5520
|
return queueMicrotask(() => {
|
|
5435
5521
|
try {
|
|
@@ -5443,7 +5529,7 @@ function Ta(t) {
|
|
|
5443
5529
|
}
|
|
5444
5530
|
};
|
|
5445
5531
|
}
|
|
5446
|
-
function
|
|
5532
|
+
function Aa(t) {
|
|
5447
5533
|
try {
|
|
5448
5534
|
return typeof localStorage > "u" ? null : localStorage.getItem(t);
|
|
5449
5535
|
} catch {
|
|
@@ -5458,8 +5544,8 @@ function Sa(t, e) {
|
|
|
5458
5544
|
} catch {
|
|
5459
5545
|
}
|
|
5460
5546
|
}
|
|
5461
|
-
var
|
|
5462
|
-
const
|
|
5547
|
+
var Ea = /* @__PURE__ */ Hs('<svg xmlns="http://www.w3.org/2000/svg" class="pie-tool-color-scheme__check svelte-17qy4wk" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"></polyline></svg>'), $a = /* @__PURE__ */ $i('<button type="button" role="menuitem"><div class="pie-tool-color-scheme__preview svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-bg svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-text svelte-17qy4wk">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-17qy4wk"></div></div></div> <div class="pie-tool-color-scheme__info svelte-17qy4wk"><div class="pie-tool-color-scheme__name svelte-17qy4wk"> </div> <div class="pie-tool-color-scheme__description svelte-17qy4wk"> </div></div> <!></button>'), Oa = /* @__PURE__ */ $i('<div class="pie-tool-color-scheme__dropdown svelte-17qy4wk" role="menu"></div>'), Ca = /* @__PURE__ */ $i('<div class="pie-tool-color-scheme svelte-17qy4wk" role="dialog" tabindex="-1" aria-label="Theme selector"><div class="pie-tool-color-scheme__content svelte-17qy4wk"><p class="pie-tool-color-scheme__description svelte-17qy4wk">Select a theme to improve readability and reduce eye strain.</p> <button type="button" class="pie-tool-color-scheme__dropdown-trigger svelte-17qy4wk" aria-label="Select theme"><div class="pie-tool-color-scheme__current svelte-17qy4wk"><div class="pie-tool-color-scheme__preview svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-bg svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-text svelte-17qy4wk">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-17qy4wk"></div></div></div> <div class="pie-tool-color-scheme__current-info svelte-17qy4wk"><div class="pie-tool-color-scheme__current-name svelte-17qy4wk"> </div> <div class="pie-tool-color-scheme__current-description svelte-17qy4wk"> </div></div> <svg class="pie-tool-color-scheme__dropdown-arrow svelte-17qy4wk" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M7,10L12,15L17,10H7Z"></path></svg></div></button> <!></div></div>');
|
|
5548
|
+
const La = {
|
|
5463
5549
|
hash: "svelte-17qy4wk",
|
|
5464
5550
|
code: `.pie-tool-color-scheme.svelte-17qy4wk {position:relative;width:100%;height:100%;min-height:0;background-color:var(--pie-background, white);display:flex;flex-direction:column;}.pie-tool-color-scheme__content.svelte-17qy4wk {padding:1rem;position:relative;display:flex;flex-direction:column;gap:1rem;min-height:0;overflow:auto;}.pie-tool-color-scheme__description.svelte-17qy4wk {margin:0 0 1rem 0;color:var(--pie-text, black);opacity:0.7;font-size:0.875rem;}.pie-tool-color-scheme__dropdown-trigger.svelte-17qy4wk {width:100%;padding:0.75rem;border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;background-color:var(--pie-background, white);color:var(--pie-text, black);cursor:pointer;transition:all 0.15s ease;}.pie-tool-color-scheme__dropdown-trigger.svelte-17qy4wk:hover {background-color:var(--pie-secondary-background, #f0f0f0);}.pie-tool-color-scheme__current.svelte-17qy4wk {display:flex;align-items:center;gap:0.75rem;}.pie-tool-color-scheme__current-info.svelte-17qy4wk {flex:1;text-align:left;}.pie-tool-color-scheme__current-name.svelte-17qy4wk {font-size:0.875rem;font-weight:600;color:var(--pie-text, black);}.pie-tool-color-scheme__current-description.svelte-17qy4wk {font-size:0.75rem;color:var(--pie-text, black);opacity:0.6;}.pie-tool-color-scheme__dropdown-arrow.svelte-17qy4wk {width:1.5rem;height:1.5rem;flex-shrink:0;}.pie-tool-color-scheme__dropdown.svelte-17qy4wk {position:relative;width:100%;max-height:24rem;background-color:var(--pie-background, white);border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow-y:auto;overflow-x:hidden;margin-top:0.5rem;}.pie-tool-color-scheme__option.svelte-17qy4wk {display:flex;align-items:center;gap:0.75rem;width:100%;padding:0.75rem 1rem;border:none;background-color:transparent;color:var(--pie-text, black);cursor:pointer;text-align:left;transition:background-color 0.15s ease;}.pie-tool-color-scheme__option.svelte-17qy4wk:hover {background-color:var(--pie-secondary-background, rgba(0, 0, 0, 0.05));}.pie-tool-color-scheme__option--active.svelte-17qy4wk {background-color:var(--pie-primary-light, rgba(63, 81, 181, 0.1));}.pie-tool-color-scheme__preview.svelte-17qy4wk {flex-shrink:0;width:2.5rem;height:2.5rem;border:2px solid var(--pie-border, #ccc);border-radius:0.25rem;overflow:hidden;}.pie-tool-color-scheme__preview-bg.svelte-17qy4wk {width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;}.pie-tool-color-scheme__preview-text.svelte-17qy4wk {font-weight:700;font-size:1.25rem;}.pie-tool-color-scheme__preview-primary.svelte-17qy4wk {position:absolute;bottom:0;right:0;width:0.75rem;height:0.75rem;border-radius:50%;}.pie-tool-color-scheme__info.svelte-17qy4wk {flex:1;}.pie-tool-color-scheme__name.svelte-17qy4wk {font-size:0.875rem;font-weight:600;color:var(--pie-text, black);line-height:1.25;}.pie-tool-color-scheme__description.svelte-17qy4wk {font-size:0.75rem;color:var(--pie-text, black);opacity:0.6;}.pie-tool-color-scheme__check.svelte-17qy4wk {flex-shrink:0;width:1rem;height:1rem;color:var(--pie-primary, #3f51b5);}
|
|
5465
5551
|
|
|
@@ -5467,14 +5553,14 @@ const Ca = {
|
|
|
5467
5553
|
.pie-tool-color-scheme__option.svelte-17qy4wk:focus-visible {outline:2px solid var(--pie-primary, #3f51b5);outline-offset:2px;}`
|
|
5468
5554
|
};
|
|
5469
5555
|
function Ra(t, e) {
|
|
5470
|
-
|
|
5556
|
+
To(e, !0), el(t, La);
|
|
5471
5557
|
const r = typeof window < "u";
|
|
5472
|
-
let i =
|
|
5473
|
-
const c = /* @__PURE__ */
|
|
5558
|
+
let i = ar(e, "visible", 7, !1), o = ar(e, "toolId", 7, "theme"), n = ar(e, "schemes", 7, ""), s = ar(e, "schemeCatalog", 7, null), l = /* @__PURE__ */ re(void 0), a = /* @__PURE__ */ re(null);
|
|
5559
|
+
const c = /* @__PURE__ */ qr(() => v(a)?.toolCoordinator);
|
|
5474
5560
|
let f = /* @__PURE__ */ re(!1);
|
|
5475
|
-
|
|
5561
|
+
Tt(() => {
|
|
5476
5562
|
if (v(l))
|
|
5477
|
-
return
|
|
5563
|
+
return _l(v(l), (g) => {
|
|
5478
5564
|
V(a, g, !0);
|
|
5479
5565
|
});
|
|
5480
5566
|
});
|
|
@@ -5490,12 +5576,12 @@ function Ra(t, e) {
|
|
|
5490
5576
|
if (!g || typeof g != "object") return null;
|
|
5491
5577
|
const b = g, C = typeof b.id == "string" ? b.id.trim() : "";
|
|
5492
5578
|
if (!C) return null;
|
|
5493
|
-
const
|
|
5579
|
+
const N = typeof b.name == "string" && b.name.trim() ? b.name.trim() : C, wt = typeof b.description == "string" ? b.description : "", se = b.preview, jt = se && typeof se == "object" && typeof se.bg == "string" && typeof se.text == "string" && typeof se.primary == "string" ? {
|
|
5494
5580
|
bg: se.bg,
|
|
5495
5581
|
text: se.text,
|
|
5496
5582
|
primary: se.primary
|
|
5497
5583
|
} : m(typeof b.variables == "object" && b.variables ? b.variables : void 0, d);
|
|
5498
|
-
return { id: C, name:
|
|
5584
|
+
return { id: C, name: N, description: wt, preview: jt };
|
|
5499
5585
|
}
|
|
5500
5586
|
function p(g) {
|
|
5501
5587
|
if (!g?.trim()) return [];
|
|
@@ -5506,23 +5592,23 @@ function Ra(t, e) {
|
|
|
5506
5592
|
return [];
|
|
5507
5593
|
}
|
|
5508
5594
|
}
|
|
5509
|
-
function
|
|
5595
|
+
function S() {
|
|
5510
5596
|
const g = v(l)?.closest("pie-theme");
|
|
5511
5597
|
if (g) return g;
|
|
5512
5598
|
const b = document.querySelector('pie-theme[scope="document"]');
|
|
5513
5599
|
return b || document.querySelector("pie-theme");
|
|
5514
5600
|
}
|
|
5515
5601
|
function $() {
|
|
5516
|
-
return
|
|
5602
|
+
return da().map((b) => ({
|
|
5517
5603
|
id: b.id,
|
|
5518
5604
|
name: b.name || b.id,
|
|
5519
5605
|
description: b.description || "",
|
|
5520
5606
|
preview: b.preview || m(b.variables, d)
|
|
5521
5607
|
}));
|
|
5522
5608
|
}
|
|
5523
|
-
const O = /* @__PURE__ */
|
|
5609
|
+
const O = /* @__PURE__ */ qr(() => {
|
|
5524
5610
|
if (Array.isArray(s()) && s().length > 0) {
|
|
5525
|
-
const C = s().map((
|
|
5611
|
+
const C = s().map((N) => y(N)).filter((N) => !!N);
|
|
5526
5612
|
if (C.length > 0) return C;
|
|
5527
5613
|
}
|
|
5528
5614
|
const g = p(n());
|
|
@@ -5537,10 +5623,10 @@ function Ra(t, e) {
|
|
|
5537
5623
|
}
|
|
5538
5624
|
];
|
|
5539
5625
|
});
|
|
5540
|
-
let w = /* @__PURE__ */ re("default"), x = /* @__PURE__ */ re(!1),
|
|
5626
|
+
let w = /* @__PURE__ */ re("default"), x = /* @__PURE__ */ re(!1), ve = null;
|
|
5541
5627
|
function oe(g) {
|
|
5542
5628
|
if (!r) return;
|
|
5543
|
-
const b =
|
|
5629
|
+
const b = S();
|
|
5544
5630
|
if (b)
|
|
5545
5631
|
b.setAttribute("scheme", g || "default");
|
|
5546
5632
|
else {
|
|
@@ -5549,44 +5635,44 @@ function Ra(t, e) {
|
|
|
5549
5635
|
}
|
|
5550
5636
|
Sa("pie-color-scheme", g);
|
|
5551
5637
|
}
|
|
5552
|
-
function
|
|
5638
|
+
function ke(g) {
|
|
5553
5639
|
V(w, g, !0), oe(g), v(c)?.hideTool(o());
|
|
5554
5640
|
}
|
|
5555
|
-
function
|
|
5641
|
+
function yt() {
|
|
5556
5642
|
V(x, !v(x));
|
|
5557
5643
|
}
|
|
5558
|
-
let
|
|
5644
|
+
let D = /* @__PURE__ */ qr(() => v(O).find((g) => g.id === v(w)) || v(O)[0] || {
|
|
5559
5645
|
id: "default",
|
|
5560
5646
|
name: "Default",
|
|
5561
5647
|
description: "",
|
|
5562
5648
|
preview: d
|
|
5563
5649
|
});
|
|
5564
|
-
|
|
5650
|
+
Tt(() => {
|
|
5565
5651
|
v(O).find((g) => g.id === v(w)) || V(w, v(O)[0]?.id || "default", !0);
|
|
5566
5652
|
});
|
|
5567
|
-
function
|
|
5653
|
+
function zt(g) {
|
|
5568
5654
|
if (g.key === "Escape")
|
|
5569
5655
|
v(x) && V(x, !1);
|
|
5570
5656
|
else if (v(x) && (g.key === "ArrowDown" || g.key === "ArrowUp")) {
|
|
5571
5657
|
g.preventDefault();
|
|
5572
5658
|
const b = v(l)?.querySelectorAll(".pie-tool-color-scheme__option:not([disabled])");
|
|
5573
5659
|
if (!b || b.length === 0) return;
|
|
5574
|
-
const C = Array.from(b).findIndex((
|
|
5575
|
-
let
|
|
5576
|
-
g.key === "ArrowDown" ?
|
|
5660
|
+
const C = Array.from(b).findIndex((wt) => wt === document.activeElement);
|
|
5661
|
+
let N;
|
|
5662
|
+
g.key === "ArrowDown" ? N = C === -1 ? 0 : (C + 1) % b.length : N = C === -1 ? b.length - 1 : (C - 1 + b.length) % b.length, b[N]?.focus();
|
|
5577
5663
|
}
|
|
5578
5664
|
}
|
|
5579
|
-
|
|
5580
|
-
v(c) && o() && !v(f) && (v(c).registerTool(o(), "Theme", void 0,
|
|
5581
|
-
}),
|
|
5665
|
+
Tt(() => {
|
|
5666
|
+
v(c) && o() && !v(f) && (v(c).registerTool(o(), "Theme", void 0, li.MODAL), V(f, !0));
|
|
5667
|
+
}), Tt(() => {
|
|
5582
5668
|
v(c) && v(l) && o() && v(c).updateToolElement(o(), v(l));
|
|
5583
|
-
}),
|
|
5584
|
-
!i() &&
|
|
5585
|
-
}),
|
|
5669
|
+
}), Tt(() => {
|
|
5670
|
+
!i() && ve ? (ve(), ve = null) : i() && v(l) && !ve && (ve = Ia(v(l)));
|
|
5671
|
+
}), Ys(() => {
|
|
5586
5672
|
if (r) {
|
|
5587
|
-
const C =
|
|
5588
|
-
V(w,
|
|
5589
|
-
oe(
|
|
5673
|
+
const C = S()?.getAttribute("scheme"), N = Aa("pie-color-scheme") ?? C ?? "default";
|
|
5674
|
+
V(w, N, !0), N && requestAnimationFrame(() => {
|
|
5675
|
+
oe(N);
|
|
5590
5676
|
});
|
|
5591
5677
|
}
|
|
5592
5678
|
function g(b) {
|
|
@@ -5598,86 +5684,86 @@ function Ra(t, e) {
|
|
|
5598
5684
|
document.removeEventListener("click", g), v(c) && o() && v(c).unregisterTool(o());
|
|
5599
5685
|
};
|
|
5600
5686
|
});
|
|
5601
|
-
var
|
|
5687
|
+
var _t = {
|
|
5602
5688
|
get visible() {
|
|
5603
5689
|
return i();
|
|
5604
5690
|
},
|
|
5605
5691
|
set visible(g = !1) {
|
|
5606
|
-
i(g),
|
|
5692
|
+
i(g), Kt();
|
|
5607
5693
|
},
|
|
5608
5694
|
get toolId() {
|
|
5609
5695
|
return o();
|
|
5610
5696
|
},
|
|
5611
5697
|
set toolId(g = "theme") {
|
|
5612
|
-
o(g),
|
|
5698
|
+
o(g), Kt();
|
|
5613
5699
|
},
|
|
5614
5700
|
get schemes() {
|
|
5615
5701
|
return n();
|
|
5616
5702
|
},
|
|
5617
5703
|
set schemes(g = "") {
|
|
5618
|
-
n(g),
|
|
5704
|
+
n(g), Kt();
|
|
5619
5705
|
},
|
|
5620
5706
|
get schemeCatalog() {
|
|
5621
5707
|
return s();
|
|
5622
5708
|
},
|
|
5623
5709
|
set schemeCatalog(g = null) {
|
|
5624
|
-
s(g),
|
|
5710
|
+
s(g), Kt();
|
|
5625
5711
|
}
|
|
5626
|
-
}, ne =
|
|
5712
|
+
}, ne = zs(), Or = Es(ne);
|
|
5627
5713
|
{
|
|
5628
|
-
var
|
|
5629
|
-
var b =
|
|
5630
|
-
z(
|
|
5631
|
-
var
|
|
5632
|
-
z(
|
|
5633
|
-
var
|
|
5634
|
-
z(
|
|
5635
|
-
var
|
|
5714
|
+
var Cr = (g) => {
|
|
5715
|
+
var b = Ca(), C = j(b), N = Me(j(C), 2), wt = j(N), se = j(wt), jt = j(se), Ri = j(jt), wn = Me(Ri, 2);
|
|
5716
|
+
z(jt), z(se);
|
|
5717
|
+
var Pi = Me(se, 2), Lr = j(Pi), kn = j(Lr, !0);
|
|
5718
|
+
z(Lr);
|
|
5719
|
+
var Mi = Me(Lr, 2), Tn = j(Mi, !0);
|
|
5720
|
+
z(Mi), z(Pi), yo(2), z(wt), z(N);
|
|
5721
|
+
var In = Me(N, 2);
|
|
5636
5722
|
{
|
|
5637
|
-
var
|
|
5638
|
-
var Rr =
|
|
5639
|
-
|
|
5640
|
-
var
|
|
5641
|
-
let
|
|
5642
|
-
var
|
|
5643
|
-
z(
|
|
5644
|
-
var
|
|
5723
|
+
var An = (Ut) => {
|
|
5724
|
+
var Rr = Oa();
|
|
5725
|
+
Js(Rr, 21, () => v(O), (Pr) => Pr.id, (Pr, Te) => {
|
|
5726
|
+
var rt = $a();
|
|
5727
|
+
let xi;
|
|
5728
|
+
var Mr = j(rt), xr = j(Mr), Di = j(xr), Sn = Me(Di, 2);
|
|
5729
|
+
z(xr), z(Mr);
|
|
5730
|
+
var Dr = Me(Mr, 2), Nr = j(Dr), En = j(Nr, !0);
|
|
5645
5731
|
z(Nr);
|
|
5646
|
-
var Ni =
|
|
5647
|
-
z(Ni), z(
|
|
5648
|
-
var
|
|
5732
|
+
var Ni = Me(Nr, 2), $n = j(Ni, !0);
|
|
5733
|
+
z(Ni), z(Dr);
|
|
5734
|
+
var On = Me(Dr, 2);
|
|
5649
5735
|
{
|
|
5650
|
-
var
|
|
5651
|
-
var
|
|
5652
|
-
|
|
5736
|
+
var Cn = (Vr) => {
|
|
5737
|
+
var Ln = Ea();
|
|
5738
|
+
It(Vr, Ln);
|
|
5653
5739
|
};
|
|
5654
|
-
|
|
5655
|
-
v(w) === v(
|
|
5740
|
+
Hr(On, (Vr) => {
|
|
5741
|
+
v(w) === v(Te).id && Vr(Cn);
|
|
5656
5742
|
});
|
|
5657
5743
|
}
|
|
5658
|
-
z(
|
|
5659
|
-
|
|
5660
|
-
"pie-tool-color-scheme__option--active": v(w) === v(
|
|
5661
|
-
}),
|
|
5662
|
-
}),
|
|
5663
|
-
}), z(Rr),
|
|
5744
|
+
z(rt), ji(() => {
|
|
5745
|
+
xi = il(rt, 1, "pie-tool-color-scheme__option svelte-17qy4wk", null, xi, {
|
|
5746
|
+
"pie-tool-color-scheme__option--active": v(w) === v(Te).id
|
|
5747
|
+
}), zr(rt, "aria-label", v(Te).name), zr(rt, "aria-current", v(w) === v(Te).id), kt(xr, `background-color: ${v(Te).preview.bg ?? ""}`), kt(Di, `color: ${v(Te).preview.text ?? ""}`), kt(Sn, `background-color: ${v(Te).preview.primary ?? ""}`), sr(En, v(Te).name), sr($n, v(Te).description);
|
|
5748
|
+
}), Br("click", rt, () => ke(v(Te).id)), It(Pr, rt);
|
|
5749
|
+
}), z(Rr), It(Ut, Rr);
|
|
5664
5750
|
};
|
|
5665
|
-
|
|
5666
|
-
v(x) &&
|
|
5751
|
+
Hr(In, (Ut) => {
|
|
5752
|
+
v(x) && Ut(An);
|
|
5667
5753
|
});
|
|
5668
5754
|
}
|
|
5669
|
-
z(C), z(b),
|
|
5670
|
-
|
|
5671
|
-
}),
|
|
5755
|
+
z(C), z(b), cl(b, (Ut) => V(l, Ut), () => v(l)), ji(() => {
|
|
5756
|
+
zr(N, "aria-expanded", v(x)), kt(jt, `background-color: ${v(D).preview.bg ?? ""}`), kt(Ri, `color: ${v(D).preview.text ?? ""}`), kt(wn, `background-color: ${v(D).preview.primary ?? ""}`), sr(kn, v(D).name), sr(Tn, v(D).description);
|
|
5757
|
+
}), Br("keydown", b, zt), Br("click", N, yt), It(g, b);
|
|
5672
5758
|
};
|
|
5673
|
-
|
|
5674
|
-
i() && g(
|
|
5759
|
+
Hr(Or, (g) => {
|
|
5760
|
+
i() && g(Cr);
|
|
5675
5761
|
});
|
|
5676
5762
|
}
|
|
5677
|
-
return
|
|
5763
|
+
return It(t, ne), Io(_t);
|
|
5678
5764
|
}
|
|
5679
|
-
|
|
5680
|
-
customElements.define("pie-tool-theme",
|
|
5765
|
+
Vs(["keydown", "click"]);
|
|
5766
|
+
customElements.define("pie-tool-theme", pl(
|
|
5681
5767
|
Ra,
|
|
5682
5768
|
{
|
|
5683
5769
|
visible: { attribute: "visible", type: "Boolean" },
|