@pie-players/pie-tool-annotation-toolbar 0.1.4 → 0.1.5
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/tool-annotation-toolbar.js +1882 -1231
- package/dist/tool-annotation-toolbar.js.map +1 -1
- package/package.json +7 -6
- package/tool-annotation-toolbar.svelte +593 -68
|
@@ -1,141 +1,144 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Pi = Object.defineProperty;
|
|
2
|
+
var or = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
|
|
5
|
+
var Hi = (e, t, n) => t in e ? Pi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var O = (e, t, n) => Hi(e, typeof t != "symbol" ? t + "" : t, n), xn = (e, t, n) => t.has(e) || or("Cannot " + n);
|
|
7
|
+
var a = (e, t, n) => (xn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), w = (e, t, n) => t.has(e) ? or("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), b = (e, t, n, r) => (xn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), P = (e, t, n) => (xn(e, t, "access private method"), n);
|
|
8
|
+
var Tr;
|
|
9
|
+
typeof window < "u" && ((Tr = window.__svelte ?? (window.__svelte = {})).v ?? (Tr.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const Vi = 1, Fi = 2, Bi = 16, Gi = 1, ji = 2, Bn = "[", gn = "[!", Gn = "]", kt = {}, V = /* @__PURE__ */ Symbol(), Ar = "http://www.w3.org/1999/xhtml", kn = !1;
|
|
11
|
+
var xr = Array.isArray, zi = Array.prototype.indexOf, Rt = Array.prototype.includes, pn = Array.from, cn = Object.keys, hn = Object.defineProperty, wt = Object.getOwnPropertyDescriptor, Ui = Object.getOwnPropertyDescriptors, Yi = Object.prototype, Ki = Array.prototype, Cr = Object.getPrototypeOf, lr = Object.isExtensible;
|
|
12
|
+
const Wi = () => {
|
|
13
|
+
};
|
|
14
|
+
function Xi(e) {
|
|
13
15
|
for (var t = 0; t < e.length; t++)
|
|
14
16
|
e[t]();
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function Sr() {
|
|
17
19
|
var e, t, n = new Promise((r, i) => {
|
|
18
20
|
e = r, t = i;
|
|
19
21
|
});
|
|
20
22
|
return { promise: n, resolve: e, reject: t };
|
|
21
23
|
}
|
|
22
|
-
const
|
|
24
|
+
const F = 2, Gt = 4, mn = 8, kr = 1 << 24, He = 16, we = 32, Je = 64, Rr = 128, ae = 512, H = 1024, B = 2048, me = 4096, ne = 8192, Ie = 16384, qt = 32768, Lt = 65536, ar = 1 << 17, jn = 1 << 18, _t = 1 << 19, Ji = 1 << 20, Ye = 1 << 25, ht = 65536, Rn = 1 << 21, zn = 1 << 22, Ke = 1 << 23, Cn = /* @__PURE__ */ Symbol("$state"), Qi = /* @__PURE__ */ Symbol("legacy props"), Zi = /* @__PURE__ */ Symbol(""), tt = new class extends Error {
|
|
23
25
|
constructor() {
|
|
24
26
|
super(...arguments);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
O(this, "name", "StaleReactionError");
|
|
28
|
+
O(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
27
29
|
}
|
|
28
|
-
}(),
|
|
29
|
-
function
|
|
30
|
-
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
31
|
-
}
|
|
32
|
-
function Yr() {
|
|
30
|
+
}(), es = /* @__PURE__ */ globalThis.document?.contentType.includes("xml") ?? !1, bn = 3, gt = 8;
|
|
31
|
+
function ts() {
|
|
33
32
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
34
33
|
}
|
|
35
|
-
function
|
|
34
|
+
function ns(e, t, n) {
|
|
35
|
+
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
36
|
+
}
|
|
37
|
+
function rs(e) {
|
|
36
38
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
37
39
|
}
|
|
38
|
-
function
|
|
40
|
+
function is() {
|
|
39
41
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
40
42
|
}
|
|
41
|
-
function
|
|
43
|
+
function ss(e) {
|
|
42
44
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
43
45
|
}
|
|
44
|
-
function
|
|
46
|
+
function os() {
|
|
45
47
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
46
48
|
}
|
|
47
|
-
function
|
|
49
|
+
function ls() {
|
|
48
50
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
49
51
|
}
|
|
50
|
-
function
|
|
52
|
+
function as() {
|
|
51
53
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
52
54
|
}
|
|
53
|
-
function
|
|
55
|
+
function us() {
|
|
54
56
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
55
57
|
}
|
|
56
|
-
function
|
|
58
|
+
function fs() {
|
|
57
59
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
58
60
|
}
|
|
59
|
-
function
|
|
61
|
+
function cs() {
|
|
60
62
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
61
63
|
}
|
|
62
|
-
function
|
|
64
|
+
function wn(e) {
|
|
63
65
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
64
66
|
}
|
|
65
|
-
function
|
|
67
|
+
function hs() {
|
|
66
68
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
67
69
|
}
|
|
68
|
-
let
|
|
69
|
-
function
|
|
70
|
-
|
|
70
|
+
let A = !1;
|
|
71
|
+
function _e(e) {
|
|
72
|
+
A = e;
|
|
71
73
|
}
|
|
72
|
-
let
|
|
73
|
-
function
|
|
74
|
+
let x;
|
|
75
|
+
function z(e) {
|
|
74
76
|
if (e === null)
|
|
75
|
-
throw
|
|
76
|
-
return
|
|
77
|
+
throw wn(), kt;
|
|
78
|
+
return x = e;
|
|
77
79
|
}
|
|
78
|
-
function
|
|
79
|
-
return
|
|
80
|
+
function yn() {
|
|
81
|
+
return z(/* @__PURE__ */ ce(x));
|
|
80
82
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
if (/* @__PURE__ */
|
|
84
|
-
throw
|
|
85
|
-
|
|
83
|
+
function en(e) {
|
|
84
|
+
if (A) {
|
|
85
|
+
if (/* @__PURE__ */ ce(x) !== null)
|
|
86
|
+
throw wn(), kt;
|
|
87
|
+
x = e;
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
|
-
function
|
|
89
|
-
if (
|
|
90
|
-
for (var t = e, n =
|
|
90
|
+
function ds(e = 1) {
|
|
91
|
+
if (A) {
|
|
92
|
+
for (var t = e, n = x; t--; )
|
|
91
93
|
n = /** @type {TemplateNode} */
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
|
|
94
|
+
/* @__PURE__ */ ce(n);
|
|
95
|
+
x = n;
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
|
-
function
|
|
97
|
-
for (var t = 0, n =
|
|
98
|
-
if (n.nodeType ===
|
|
98
|
+
function dn(e = !0) {
|
|
99
|
+
for (var t = 0, n = x; ; ) {
|
|
100
|
+
if (n.nodeType === gt) {
|
|
99
101
|
var r = (
|
|
100
102
|
/** @type {Comment} */
|
|
101
103
|
n.data
|
|
102
104
|
);
|
|
103
|
-
if (r ===
|
|
105
|
+
if (r === Gn) {
|
|
104
106
|
if (t === 0) return n;
|
|
105
107
|
t -= 1;
|
|
106
|
-
} else (r ===
|
|
108
|
+
} else (r === Bn || r === gn || // "[1", "[2", etc. for if blocks
|
|
109
|
+
r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
|
|
107
110
|
}
|
|
108
111
|
var i = (
|
|
109
112
|
/** @type {TemplateNode} */
|
|
110
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ ce(n)
|
|
111
114
|
);
|
|
112
115
|
e && n.remove(), n = i;
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
|
-
function
|
|
116
|
-
if (!e || e.nodeType !==
|
|
117
|
-
throw
|
|
118
|
+
function Lr(e) {
|
|
119
|
+
if (!e || e.nodeType !== gt)
|
|
120
|
+
throw wn(), kt;
|
|
118
121
|
return (
|
|
119
122
|
/** @type {Comment} */
|
|
120
123
|
e.data
|
|
121
124
|
);
|
|
122
125
|
}
|
|
123
|
-
function
|
|
126
|
+
function Nr(e) {
|
|
124
127
|
return e === this.v;
|
|
125
128
|
}
|
|
126
|
-
function
|
|
129
|
+
function vs(e, t) {
|
|
127
130
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
128
131
|
}
|
|
129
|
-
function
|
|
130
|
-
return !
|
|
132
|
+
function Or(e) {
|
|
133
|
+
return !vs(e, this.v);
|
|
131
134
|
}
|
|
132
|
-
let
|
|
133
|
-
function
|
|
134
|
-
|
|
135
|
+
let _s = !1, fe = null;
|
|
136
|
+
function Nt(e) {
|
|
137
|
+
fe = e;
|
|
135
138
|
}
|
|
136
|
-
function
|
|
137
|
-
|
|
138
|
-
p:
|
|
139
|
+
function Dr(e, t = !1, n) {
|
|
140
|
+
fe = {
|
|
141
|
+
p: fe,
|
|
139
142
|
i: !1,
|
|
140
143
|
c: null,
|
|
141
144
|
e: null,
|
|
@@ -144,166 +147,190 @@ function Fn(e, t = !1, n) {
|
|
|
144
147
|
l: null
|
|
145
148
|
};
|
|
146
149
|
}
|
|
147
|
-
function
|
|
150
|
+
function Mr(e) {
|
|
148
151
|
var t = (
|
|
149
152
|
/** @type {ComponentContext} */
|
|
150
|
-
|
|
153
|
+
fe
|
|
151
154
|
), n = t.e;
|
|
152
155
|
if (n !== null) {
|
|
153
156
|
t.e = null;
|
|
154
157
|
for (var r of n)
|
|
155
|
-
|
|
158
|
+
si(r);
|
|
156
159
|
}
|
|
157
|
-
return e !== void 0 && (t.x = e), t.i = !0,
|
|
160
|
+
return e !== void 0 && (t.x = e), t.i = !0, fe = t.p, e ?? /** @type {T} */
|
|
158
161
|
{};
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function qr() {
|
|
161
164
|
return !0;
|
|
162
165
|
}
|
|
163
|
-
let
|
|
164
|
-
function
|
|
165
|
-
var e =
|
|
166
|
-
|
|
166
|
+
let nt = [];
|
|
167
|
+
function Ir() {
|
|
168
|
+
var e = nt;
|
|
169
|
+
nt = [], Xi(e);
|
|
167
170
|
}
|
|
168
|
-
function
|
|
169
|
-
if (
|
|
170
|
-
var t =
|
|
171
|
+
function yt(e) {
|
|
172
|
+
if (nt.length === 0 && !Ft) {
|
|
173
|
+
var t = nt;
|
|
171
174
|
queueMicrotask(() => {
|
|
172
|
-
t ===
|
|
175
|
+
t === nt && Ir();
|
|
173
176
|
});
|
|
174
177
|
}
|
|
175
|
-
|
|
178
|
+
nt.push(e);
|
|
176
179
|
}
|
|
177
|
-
function
|
|
178
|
-
for (;
|
|
179
|
-
|
|
180
|
+
function gs() {
|
|
181
|
+
for (; nt.length > 0; )
|
|
182
|
+
Ir();
|
|
180
183
|
}
|
|
181
|
-
function
|
|
182
|
-
var t =
|
|
184
|
+
function Pr(e) {
|
|
185
|
+
var t = T;
|
|
183
186
|
if (t === null)
|
|
184
|
-
return
|
|
185
|
-
if ((t.f &
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
t.b.error(e);
|
|
189
|
-
} else
|
|
190
|
-
ut(e, t);
|
|
187
|
+
return y.f |= Ke, e;
|
|
188
|
+
if ((t.f & qt) === 0 && (t.f & Gt) === 0)
|
|
189
|
+
throw e;
|
|
190
|
+
Ot(e, t);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ot(e, t) {
|
|
193
193
|
for (; t !== null; ) {
|
|
194
|
-
if ((t.f &
|
|
194
|
+
if ((t.f & Rr) !== 0) {
|
|
195
|
+
if ((t.f & qt) === 0)
|
|
196
|
+
throw e;
|
|
195
197
|
try {
|
|
196
198
|
t.b.error(e);
|
|
197
199
|
return;
|
|
198
200
|
} catch (n) {
|
|
199
201
|
e = n;
|
|
200
202
|
}
|
|
203
|
+
}
|
|
201
204
|
t = t.parent;
|
|
202
205
|
}
|
|
203
206
|
throw e;
|
|
204
207
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
207
|
-
e.f = e.f &
|
|
208
|
+
const ps = -7169;
|
|
209
|
+
function D(e, t) {
|
|
210
|
+
e.f = e.f & ps | t;
|
|
208
211
|
}
|
|
209
|
-
function
|
|
210
|
-
(e.f &
|
|
212
|
+
function Un(e) {
|
|
213
|
+
(e.f & ae) !== 0 || e.deps === null ? D(e, H) : D(e, me);
|
|
211
214
|
}
|
|
212
|
-
function
|
|
215
|
+
function Hr(e) {
|
|
213
216
|
if (e !== null)
|
|
214
217
|
for (const t of e)
|
|
215
|
-
(t.f &
|
|
218
|
+
(t.f & F) === 0 || (t.f & ht) === 0 || (t.f ^= ht, Hr(
|
|
216
219
|
/** @type {Derived} */
|
|
217
220
|
t.deps
|
|
218
221
|
));
|
|
219
222
|
}
|
|
220
|
-
function
|
|
221
|
-
(e.f &
|
|
223
|
+
function Vr(e, t, n) {
|
|
224
|
+
(e.f & B) !== 0 ? t.add(e) : (e.f & me) !== 0 && n.add(e), Hr(e.deps), D(e, H);
|
|
222
225
|
}
|
|
223
|
-
const
|
|
224
|
-
let
|
|
225
|
-
var
|
|
226
|
-
const
|
|
226
|
+
const tn = /* @__PURE__ */ new Set();
|
|
227
|
+
let S = null, ve = null, K = [], $n = null, Ln = !1, Ft = !1;
|
|
228
|
+
var $t, Et, it, Tt, zt, Ut, st, Ne, At, ke, Nn, On, Fr;
|
|
229
|
+
const Zn = class Zn {
|
|
227
230
|
constructor() {
|
|
228
|
-
|
|
229
|
-
|
|
231
|
+
w(this, ke);
|
|
232
|
+
O(this, "committed", !1);
|
|
230
233
|
/**
|
|
231
234
|
* The current values of any sources that are updated in this batch
|
|
232
235
|
* They keys of this map are identical to `this.#previous`
|
|
233
236
|
* @type {Map<Source, any>}
|
|
234
237
|
*/
|
|
235
|
-
|
|
238
|
+
O(this, "current", /* @__PURE__ */ new Map());
|
|
236
239
|
/**
|
|
237
240
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
238
241
|
* They keys of this map are identical to `this.#current`
|
|
239
242
|
* @type {Map<Source, any>}
|
|
240
243
|
*/
|
|
241
|
-
|
|
244
|
+
O(this, "previous", /* @__PURE__ */ new Map());
|
|
242
245
|
/**
|
|
243
246
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
244
247
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
245
248
|
* @type {Set<() => void>}
|
|
246
249
|
*/
|
|
247
|
-
|
|
250
|
+
w(this, $t, /* @__PURE__ */ new Set());
|
|
248
251
|
/**
|
|
249
252
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
250
253
|
* @type {Set<(batch: Batch) => void>}
|
|
251
254
|
*/
|
|
252
|
-
|
|
255
|
+
w(this, Et, /* @__PURE__ */ new Set());
|
|
253
256
|
/**
|
|
254
257
|
* The number of async effects that are currently in flight
|
|
255
258
|
*/
|
|
256
|
-
|
|
259
|
+
w(this, it, 0);
|
|
257
260
|
/**
|
|
258
261
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
259
262
|
*/
|
|
260
|
-
|
|
263
|
+
w(this, Tt, 0);
|
|
261
264
|
/**
|
|
262
265
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
263
266
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
264
267
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
265
268
|
*/
|
|
266
|
-
|
|
269
|
+
w(this, zt, null);
|
|
267
270
|
/**
|
|
268
271
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
269
272
|
* @type {Set<Effect>}
|
|
270
273
|
*/
|
|
271
|
-
|
|
274
|
+
w(this, Ut, /* @__PURE__ */ new Set());
|
|
272
275
|
/**
|
|
273
276
|
* Deferred effects that are MAYBE_DIRTY
|
|
274
277
|
* @type {Set<Effect>}
|
|
275
278
|
*/
|
|
276
|
-
|
|
279
|
+
w(this, st, /* @__PURE__ */ new Set());
|
|
277
280
|
/**
|
|
278
|
-
* A
|
|
279
|
-
* is committed — we skip over these during `process
|
|
280
|
-
*
|
|
281
|
+
* A map of branches that still exist, but will be destroyed when this batch
|
|
282
|
+
* is committed — we skip over these during `process`.
|
|
283
|
+
* The value contains child effects that were dirty/maybe_dirty before being reset,
|
|
284
|
+
* so they can be rescheduled if the branch survives.
|
|
285
|
+
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
281
286
|
*/
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
287
|
+
w(this, Ne, /* @__PURE__ */ new Map());
|
|
288
|
+
O(this, "is_fork", !1);
|
|
289
|
+
w(this, At, !1);
|
|
285
290
|
}
|
|
286
291
|
is_deferred() {
|
|
287
|
-
return this.is_fork ||
|
|
292
|
+
return this.is_fork || a(this, Tt) > 0;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Add an effect to the #skipped_branches map and reset its children
|
|
296
|
+
* @param {Effect} effect
|
|
297
|
+
*/
|
|
298
|
+
skip_effect(t) {
|
|
299
|
+
a(this, Ne).has(t) || a(this, Ne).set(t, { d: [], m: [] });
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Remove an effect from the #skipped_branches map and reschedule
|
|
303
|
+
* any tracked dirty/maybe_dirty child effects
|
|
304
|
+
* @param {Effect} effect
|
|
305
|
+
*/
|
|
306
|
+
unskip_effect(t) {
|
|
307
|
+
var n = a(this, Ne).get(t);
|
|
308
|
+
if (n) {
|
|
309
|
+
a(this, Ne).delete(t);
|
|
310
|
+
for (var r of n.d)
|
|
311
|
+
D(r, B), ge(r);
|
|
312
|
+
for (r of n.m)
|
|
313
|
+
D(r, me), ge(r);
|
|
314
|
+
}
|
|
288
315
|
}
|
|
289
316
|
/**
|
|
290
317
|
*
|
|
291
318
|
* @param {Effect[]} root_effects
|
|
292
319
|
*/
|
|
293
320
|
process(t) {
|
|
294
|
-
|
|
321
|
+
K = [], this.apply();
|
|
295
322
|
var n = [], r = [];
|
|
296
323
|
for (const i of t)
|
|
297
|
-
|
|
324
|
+
P(this, ke, Nn).call(this, i, n, r);
|
|
298
325
|
if (this.is_deferred()) {
|
|
299
|
-
|
|
300
|
-
for (const i of this
|
|
301
|
-
|
|
326
|
+
P(this, ke, On).call(this, r), P(this, ke, On).call(this, n);
|
|
327
|
+
for (const [i, s] of a(this, Ne))
|
|
328
|
+
zr(i, s);
|
|
302
329
|
} else {
|
|
303
|
-
for (const i of
|
|
304
|
-
|
|
330
|
+
for (const i of a(this, $t)) i();
|
|
331
|
+
a(this, $t).clear(), a(this, it) === 0 && P(this, ke, Fr).call(this), S = null, ur(r), ur(n), a(this, zt)?.resolve();
|
|
305
332
|
}
|
|
306
|
-
|
|
333
|
+
ve = null;
|
|
307
334
|
}
|
|
308
335
|
/**
|
|
309
336
|
* Associate a change to a given source with the current
|
|
@@ -312,228 +339,228 @@ const dn = class dn {
|
|
|
312
339
|
* @param {any} value
|
|
313
340
|
*/
|
|
314
341
|
capture(t, n) {
|
|
315
|
-
n !==
|
|
342
|
+
n !== V && !this.previous.has(t) && this.previous.set(t, n), (t.f & Ke) === 0 && (this.current.set(t, t.v), ve?.set(t, t.v));
|
|
316
343
|
}
|
|
317
344
|
activate() {
|
|
318
|
-
|
|
345
|
+
S = this, this.apply();
|
|
319
346
|
}
|
|
320
347
|
deactivate() {
|
|
321
|
-
|
|
348
|
+
S === this && (S = null, ve = null);
|
|
322
349
|
}
|
|
323
350
|
flush() {
|
|
324
|
-
if (this.activate(),
|
|
325
|
-
if (
|
|
351
|
+
if (this.activate(), K.length > 0) {
|
|
352
|
+
if (Br(), S !== null && S !== this)
|
|
326
353
|
return;
|
|
327
|
-
} else
|
|
354
|
+
} else a(this, it) === 0 && this.process([]);
|
|
328
355
|
this.deactivate();
|
|
329
356
|
}
|
|
330
357
|
discard() {
|
|
331
|
-
for (const t of
|
|
332
|
-
|
|
358
|
+
for (const t of a(this, Et)) t(this);
|
|
359
|
+
a(this, Et).clear();
|
|
333
360
|
}
|
|
334
361
|
/**
|
|
335
362
|
*
|
|
336
363
|
* @param {boolean} blocking
|
|
337
364
|
*/
|
|
338
365
|
increment(t) {
|
|
339
|
-
|
|
366
|
+
b(this, it, a(this, it) + 1), t && b(this, Tt, a(this, Tt) + 1);
|
|
340
367
|
}
|
|
341
368
|
/**
|
|
342
369
|
*
|
|
343
370
|
* @param {boolean} blocking
|
|
344
371
|
*/
|
|
345
372
|
decrement(t) {
|
|
346
|
-
|
|
347
|
-
|
|
373
|
+
b(this, it, a(this, it) - 1), t && b(this, Tt, a(this, Tt) - 1), !a(this, At) && (b(this, At, !0), yt(() => {
|
|
374
|
+
b(this, At, !1), this.is_deferred() ? K.length > 0 && this.flush() : this.revive();
|
|
348
375
|
}));
|
|
349
376
|
}
|
|
350
377
|
revive() {
|
|
351
|
-
for (const t of
|
|
352
|
-
|
|
353
|
-
for (const t of
|
|
354
|
-
|
|
378
|
+
for (const t of a(this, Ut))
|
|
379
|
+
a(this, st).delete(t), D(t, B), ge(t);
|
|
380
|
+
for (const t of a(this, st))
|
|
381
|
+
D(t, me), ge(t);
|
|
355
382
|
this.flush();
|
|
356
383
|
}
|
|
357
384
|
/** @param {() => void} fn */
|
|
358
385
|
oncommit(t) {
|
|
359
|
-
|
|
386
|
+
a(this, $t).add(t);
|
|
360
387
|
}
|
|
361
388
|
/** @param {(batch: Batch) => void} fn */
|
|
362
389
|
ondiscard(t) {
|
|
363
|
-
|
|
390
|
+
a(this, Et).add(t);
|
|
364
391
|
}
|
|
365
392
|
settled() {
|
|
366
|
-
return (
|
|
393
|
+
return (a(this, zt) ?? b(this, zt, Sr())).promise;
|
|
367
394
|
}
|
|
368
395
|
static ensure() {
|
|
369
|
-
if (
|
|
370
|
-
const t =
|
|
371
|
-
|
|
372
|
-
|
|
396
|
+
if (S === null) {
|
|
397
|
+
const t = S = new Zn();
|
|
398
|
+
tn.add(S), Ft || yt(() => {
|
|
399
|
+
S === t && t.flush();
|
|
373
400
|
});
|
|
374
401
|
}
|
|
375
|
-
return
|
|
402
|
+
return S;
|
|
376
403
|
}
|
|
377
404
|
apply() {
|
|
378
405
|
}
|
|
379
406
|
};
|
|
380
|
-
|
|
407
|
+
$t = new WeakMap(), Et = new WeakMap(), it = new WeakMap(), Tt = new WeakMap(), zt = new WeakMap(), Ut = new WeakMap(), st = new WeakMap(), Ne = new WeakMap(), At = new WeakMap(), ke = new WeakSet(), /**
|
|
381
408
|
* Traverse the effect tree, executing effects or stashing
|
|
382
409
|
* them for later execution as appropriate
|
|
383
410
|
* @param {Effect} root
|
|
384
411
|
* @param {Effect[]} effects
|
|
385
412
|
* @param {Effect[]} render_effects
|
|
386
413
|
*/
|
|
387
|
-
|
|
388
|
-
t.f ^=
|
|
414
|
+
Nn = function(t, n, r) {
|
|
415
|
+
t.f ^= H;
|
|
389
416
|
for (var i = t.first, s = null; i !== null; ) {
|
|
390
|
-
var o = i.f,
|
|
417
|
+
var o = i.f, l = (o & (we | Je)) !== 0, u = l && (o & H) !== 0, f = u || (o & ne) !== 0 || a(this, Ne).has(i);
|
|
391
418
|
if (!f && i.fn !== null) {
|
|
392
|
-
|
|
419
|
+
l ? i.f ^= H : s !== null && (o & (Gt | mn | kr)) !== 0 ? s.b.defer_effect(i) : (o & Gt) !== 0 ? n.push(i) : Xt(i) && ((o & He) !== 0 && a(this, st).add(i), Mt(i));
|
|
393
420
|
var h = i.first;
|
|
394
421
|
if (h !== null) {
|
|
395
422
|
i = h;
|
|
396
423
|
continue;
|
|
397
424
|
}
|
|
398
425
|
}
|
|
399
|
-
var
|
|
400
|
-
for (i = i.next; i === null &&
|
|
401
|
-
|
|
426
|
+
var v = i.parent;
|
|
427
|
+
for (i = i.next; i === null && v !== null; )
|
|
428
|
+
v === s && (s = null), i = v.next, v = v.parent;
|
|
402
429
|
}
|
|
403
430
|
}, /**
|
|
404
431
|
* @param {Effect[]} effects
|
|
405
432
|
*/
|
|
406
|
-
|
|
433
|
+
On = function(t) {
|
|
407
434
|
for (var n = 0; n < t.length; n += 1)
|
|
408
|
-
|
|
409
|
-
},
|
|
435
|
+
Vr(t[n], a(this, Ut), a(this, st));
|
|
436
|
+
}, Fr = function() {
|
|
410
437
|
var i;
|
|
411
|
-
if (
|
|
438
|
+
if (tn.size > 1) {
|
|
412
439
|
this.previous.clear();
|
|
413
|
-
var t =
|
|
414
|
-
for (const s of
|
|
440
|
+
var t = ve, n = !0;
|
|
441
|
+
for (const s of tn) {
|
|
415
442
|
if (s === this) {
|
|
416
443
|
n = !1;
|
|
417
444
|
continue;
|
|
418
445
|
}
|
|
419
446
|
const o = [];
|
|
420
|
-
for (const [
|
|
421
|
-
if (s.current.has(
|
|
422
|
-
if (n && f !== s.current.get(
|
|
423
|
-
s.current.set(
|
|
447
|
+
for (const [u, f] of this.current) {
|
|
448
|
+
if (s.current.has(u))
|
|
449
|
+
if (n && f !== s.current.get(u))
|
|
450
|
+
s.current.set(u, f);
|
|
424
451
|
else
|
|
425
452
|
continue;
|
|
426
|
-
o.push(
|
|
453
|
+
o.push(u);
|
|
427
454
|
}
|
|
428
455
|
if (o.length === 0)
|
|
429
456
|
continue;
|
|
430
|
-
const
|
|
431
|
-
if (
|
|
432
|
-
var r =
|
|
433
|
-
|
|
434
|
-
const
|
|
457
|
+
const l = [...s.current.keys()].filter((u) => !this.current.has(u));
|
|
458
|
+
if (l.length > 0) {
|
|
459
|
+
var r = K;
|
|
460
|
+
K = [];
|
|
461
|
+
const u = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
435
462
|
for (const h of o)
|
|
436
|
-
|
|
437
|
-
if (
|
|
438
|
-
|
|
439
|
-
for (const h of
|
|
440
|
-
|
|
463
|
+
Gr(h, l, u, f);
|
|
464
|
+
if (K.length > 0) {
|
|
465
|
+
S = s, s.apply();
|
|
466
|
+
for (const h of K)
|
|
467
|
+
P(i = s, ke, Nn).call(i, h, [], []);
|
|
441
468
|
s.deactivate();
|
|
442
469
|
}
|
|
443
|
-
|
|
470
|
+
K = r;
|
|
444
471
|
}
|
|
445
472
|
}
|
|
446
|
-
|
|
473
|
+
S = null, ve = t;
|
|
447
474
|
}
|
|
448
|
-
this.committed = !0,
|
|
475
|
+
this.committed = !0, tn.delete(this);
|
|
449
476
|
};
|
|
450
|
-
let
|
|
451
|
-
function
|
|
452
|
-
var t =
|
|
453
|
-
|
|
477
|
+
let Pe = Zn;
|
|
478
|
+
function et(e) {
|
|
479
|
+
var t = Ft;
|
|
480
|
+
Ft = !0;
|
|
454
481
|
try {
|
|
455
482
|
for (var n; ; ) {
|
|
456
|
-
if (
|
|
457
|
-
return
|
|
483
|
+
if (gs(), K.length === 0 && (S?.flush(), K.length === 0))
|
|
484
|
+
return $n = null, /** @type {T} */
|
|
458
485
|
n;
|
|
459
|
-
|
|
486
|
+
Br();
|
|
460
487
|
}
|
|
461
488
|
} finally {
|
|
462
|
-
|
|
489
|
+
Ft = t;
|
|
463
490
|
}
|
|
464
491
|
}
|
|
465
|
-
function
|
|
466
|
-
|
|
492
|
+
function Br() {
|
|
493
|
+
Ln = !0;
|
|
467
494
|
var e = null;
|
|
468
495
|
try {
|
|
469
|
-
for (var t = 0;
|
|
470
|
-
var n =
|
|
496
|
+
for (var t = 0; K.length > 0; ) {
|
|
497
|
+
var n = Pe.ensure();
|
|
471
498
|
if (t++ > 1e3) {
|
|
472
499
|
var r, i;
|
|
473
|
-
|
|
500
|
+
ms();
|
|
474
501
|
}
|
|
475
|
-
n.process(
|
|
502
|
+
n.process(K), We.clear();
|
|
476
503
|
}
|
|
477
504
|
} finally {
|
|
478
|
-
|
|
505
|
+
K = [], Ln = !1, $n = null;
|
|
479
506
|
}
|
|
480
507
|
}
|
|
481
|
-
function
|
|
508
|
+
function ms() {
|
|
482
509
|
try {
|
|
483
|
-
|
|
510
|
+
os();
|
|
484
511
|
} catch (e) {
|
|
485
|
-
|
|
512
|
+
Ot(e, $n);
|
|
486
513
|
}
|
|
487
514
|
}
|
|
488
|
-
let
|
|
489
|
-
function
|
|
515
|
+
let Le = null;
|
|
516
|
+
function ur(e) {
|
|
490
517
|
var t = e.length;
|
|
491
518
|
if (t !== 0) {
|
|
492
519
|
for (var n = 0; n < t; ) {
|
|
493
520
|
var r = e[n++];
|
|
494
|
-
if ((r.f & (
|
|
495
|
-
|
|
496
|
-
for (const i of
|
|
497
|
-
if ((i.f & (
|
|
521
|
+
if ((r.f & (Ie | ne)) === 0 && Xt(r) && (Le = /* @__PURE__ */ new Set(), Mt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && ai(r), Le?.size > 0)) {
|
|
522
|
+
We.clear();
|
|
523
|
+
for (const i of Le) {
|
|
524
|
+
if ((i.f & (Ie | ne)) !== 0) continue;
|
|
498
525
|
const s = [i];
|
|
499
526
|
let o = i.parent;
|
|
500
527
|
for (; o !== null; )
|
|
501
|
-
|
|
502
|
-
for (let
|
|
503
|
-
const
|
|
504
|
-
(
|
|
528
|
+
Le.has(o) && (Le.delete(o), s.push(o)), o = o.parent;
|
|
529
|
+
for (let l = s.length - 1; l >= 0; l--) {
|
|
530
|
+
const u = s[l];
|
|
531
|
+
(u.f & (Ie | ne)) === 0 && Mt(u);
|
|
505
532
|
}
|
|
506
533
|
}
|
|
507
|
-
|
|
534
|
+
Le.clear();
|
|
508
535
|
}
|
|
509
536
|
}
|
|
510
|
-
|
|
537
|
+
Le = null;
|
|
511
538
|
}
|
|
512
539
|
}
|
|
513
|
-
function
|
|
540
|
+
function Gr(e, t, n, r) {
|
|
514
541
|
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
515
542
|
for (const i of e.reactions) {
|
|
516
543
|
const s = i.f;
|
|
517
|
-
(s &
|
|
544
|
+
(s & F) !== 0 ? Gr(
|
|
518
545
|
/** @type {Derived} */
|
|
519
546
|
i,
|
|
520
547
|
t,
|
|
521
548
|
n,
|
|
522
549
|
r
|
|
523
|
-
) : (s & (
|
|
550
|
+
) : (s & (zn | He)) !== 0 && (s & B) === 0 && jr(i, t, r) && (D(i, B), ge(
|
|
524
551
|
/** @type {Effect} */
|
|
525
552
|
i
|
|
526
553
|
));
|
|
527
554
|
}
|
|
528
555
|
}
|
|
529
|
-
function
|
|
556
|
+
function jr(e, t, n) {
|
|
530
557
|
const r = n.get(e);
|
|
531
558
|
if (r !== void 0) return r;
|
|
532
559
|
if (e.deps !== null)
|
|
533
560
|
for (const i of e.deps) {
|
|
534
|
-
if (
|
|
561
|
+
if (Rt.call(t, i))
|
|
535
562
|
return !0;
|
|
536
|
-
if ((i.f &
|
|
563
|
+
if ((i.f & F) !== 0 && jr(
|
|
537
564
|
/** @type {Derived} */
|
|
538
565
|
i,
|
|
539
566
|
t,
|
|
@@ -547,80 +574,80 @@ function Kn(e, t, n) {
|
|
|
547
574
|
}
|
|
548
575
|
return n.set(e, !1), !1;
|
|
549
576
|
}
|
|
550
|
-
function
|
|
551
|
-
for (var t =
|
|
577
|
+
function ge(e) {
|
|
578
|
+
for (var t = $n = e; t.parent !== null; ) {
|
|
552
579
|
t = t.parent;
|
|
553
580
|
var n = t.f;
|
|
554
|
-
if (
|
|
581
|
+
if (Ln && t === T && (n & He) !== 0 && (n & jn) === 0)
|
|
555
582
|
return;
|
|
556
|
-
if ((n & (
|
|
557
|
-
if ((n &
|
|
558
|
-
t.f ^=
|
|
583
|
+
if ((n & (Je | we)) !== 0) {
|
|
584
|
+
if ((n & H) === 0) return;
|
|
585
|
+
t.f ^= H;
|
|
559
586
|
}
|
|
560
587
|
}
|
|
561
|
-
|
|
588
|
+
K.push(t);
|
|
562
589
|
}
|
|
563
|
-
function
|
|
564
|
-
if (!((e.f &
|
|
565
|
-
|
|
566
|
-
for (var
|
|
567
|
-
|
|
590
|
+
function zr(e, t) {
|
|
591
|
+
if (!((e.f & we) !== 0 && (e.f & H) !== 0)) {
|
|
592
|
+
(e.f & B) !== 0 ? t.d.push(e) : (e.f & me) !== 0 && t.m.push(e), D(e, H);
|
|
593
|
+
for (var n = e.first; n !== null; )
|
|
594
|
+
zr(n, t), n = n.next;
|
|
568
595
|
}
|
|
569
596
|
}
|
|
570
|
-
function
|
|
571
|
-
let t = 0, n =
|
|
597
|
+
function bs(e) {
|
|
598
|
+
let t = 0, n = dt(0), r;
|
|
572
599
|
return () => {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
t -= 1, t === 0 && (r?.(), r = void 0,
|
|
600
|
+
Xn() && (g(n), oi(() => (t === 0 && (r = Gs(() => e(() => Bt(n)))), t += 1, () => {
|
|
601
|
+
yt(() => {
|
|
602
|
+
t -= 1, t === 0 && (r?.(), r = void 0, Bt(n));
|
|
576
603
|
});
|
|
577
604
|
})));
|
|
578
605
|
};
|
|
579
606
|
}
|
|
580
|
-
var
|
|
581
|
-
function
|
|
582
|
-
new
|
|
607
|
+
var ws = Lt | _t | Rr;
|
|
608
|
+
function ys(e, t, n) {
|
|
609
|
+
new $s(e, t, n);
|
|
583
610
|
}
|
|
584
|
-
var
|
|
585
|
-
class
|
|
611
|
+
var ee, Yt, Te, ot, Ae, se, Y, xe, Oe, Ue, lt, De, xt, at, Ct, St, Me, vn, q, Ur, Yr, Dn, on, ln, Mn;
|
|
612
|
+
class $s {
|
|
586
613
|
/**
|
|
587
614
|
* @param {TemplateNode} node
|
|
588
615
|
* @param {BoundaryProps} props
|
|
589
616
|
* @param {((anchor: Node) => void)} children
|
|
590
617
|
*/
|
|
591
618
|
constructor(t, n, r) {
|
|
592
|
-
|
|
619
|
+
w(this, q);
|
|
593
620
|
/** @type {Boundary | null} */
|
|
594
|
-
|
|
595
|
-
|
|
621
|
+
O(this, "parent");
|
|
622
|
+
O(this, "is_pending", !1);
|
|
596
623
|
/** @type {TemplateNode} */
|
|
597
|
-
|
|
624
|
+
w(this, ee);
|
|
598
625
|
/** @type {TemplateNode | null} */
|
|
599
|
-
|
|
626
|
+
w(this, Yt, A ? x : null);
|
|
600
627
|
/** @type {BoundaryProps} */
|
|
601
|
-
|
|
628
|
+
w(this, Te);
|
|
602
629
|
/** @type {((anchor: Node) => void)} */
|
|
603
|
-
|
|
630
|
+
w(this, ot);
|
|
604
631
|
/** @type {Effect} */
|
|
605
|
-
|
|
632
|
+
w(this, Ae);
|
|
606
633
|
/** @type {Effect | null} */
|
|
607
|
-
|
|
634
|
+
w(this, se, null);
|
|
608
635
|
/** @type {Effect | null} */
|
|
609
|
-
|
|
636
|
+
w(this, Y, null);
|
|
610
637
|
/** @type {Effect | null} */
|
|
611
|
-
|
|
638
|
+
w(this, xe, null);
|
|
612
639
|
/** @type {DocumentFragment | null} */
|
|
613
|
-
|
|
640
|
+
w(this, Oe, null);
|
|
614
641
|
/** @type {TemplateNode | null} */
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
642
|
+
w(this, Ue, null);
|
|
643
|
+
w(this, lt, 0);
|
|
644
|
+
w(this, De, 0);
|
|
645
|
+
w(this, xt, !1);
|
|
646
|
+
w(this, at, !1);
|
|
620
647
|
/** @type {Set<Effect>} */
|
|
621
|
-
|
|
648
|
+
w(this, Ct, /* @__PURE__ */ new Set());
|
|
622
649
|
/** @type {Set<Effect>} */
|
|
623
|
-
|
|
650
|
+
w(this, St, /* @__PURE__ */ new Set());
|
|
624
651
|
/**
|
|
625
652
|
* A source containing the number of pending async deriveds/expressions.
|
|
626
653
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -628,37 +655,37 @@ class ci {
|
|
|
628
655
|
* calls followed by no-op flushes
|
|
629
656
|
* @type {Source<number> | null}
|
|
630
657
|
*/
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
658
|
+
w(this, Me, null);
|
|
659
|
+
w(this, vn, bs(() => (b(this, Me, dt(a(this, lt))), () => {
|
|
660
|
+
b(this, Me, null);
|
|
634
661
|
})));
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
if (
|
|
638
|
-
const s =
|
|
639
|
-
|
|
640
|
-
s.nodeType ===
|
|
641
|
-
s.data ===
|
|
662
|
+
b(this, ee, t), b(this, Te, n), b(this, ot, r), this.parent = /** @type {Effect} */
|
|
663
|
+
T.b, this.is_pending = !!a(this, Te).pending, b(this, Ae, Tn(() => {
|
|
664
|
+
if (T.b = this, A) {
|
|
665
|
+
const s = a(this, Yt);
|
|
666
|
+
yn(), /** @type {Comment} */
|
|
667
|
+
s.nodeType === gt && /** @type {Comment} */
|
|
668
|
+
s.data === gn ? P(this, q, Yr).call(this) : (P(this, q, Ur).call(this), a(this, De) === 0 && (this.is_pending = !1));
|
|
642
669
|
} else {
|
|
643
|
-
var i =
|
|
670
|
+
var i = P(this, q, Dn).call(this);
|
|
644
671
|
try {
|
|
645
|
-
|
|
672
|
+
b(this, se, le(() => r(i)));
|
|
646
673
|
} catch (s) {
|
|
647
674
|
this.error(s);
|
|
648
675
|
}
|
|
649
|
-
|
|
676
|
+
a(this, De) > 0 ? P(this, q, ln).call(this) : this.is_pending = !1;
|
|
650
677
|
}
|
|
651
678
|
return () => {
|
|
652
|
-
|
|
679
|
+
a(this, Ue)?.remove();
|
|
653
680
|
};
|
|
654
|
-
},
|
|
681
|
+
}, ws)), A && b(this, ee, x);
|
|
655
682
|
}
|
|
656
683
|
/**
|
|
657
684
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
658
685
|
* @param {Effect} effect
|
|
659
686
|
*/
|
|
660
687
|
defer_effect(t) {
|
|
661
|
-
|
|
688
|
+
Vr(t, a(this, Ct), a(this, St));
|
|
662
689
|
}
|
|
663
690
|
/**
|
|
664
691
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -668,7 +695,7 @@ class ci {
|
|
|
668
695
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
669
696
|
}
|
|
670
697
|
has_pending_snippet() {
|
|
671
|
-
return !!
|
|
698
|
+
return !!a(this, Te).pending;
|
|
672
699
|
}
|
|
673
700
|
/**
|
|
674
701
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -677,199 +704,199 @@ class ci {
|
|
|
677
704
|
* @param {1 | -1} d
|
|
678
705
|
*/
|
|
679
706
|
update_pending_count(t) {
|
|
680
|
-
|
|
681
|
-
|
|
707
|
+
P(this, q, Mn).call(this, t), b(this, lt, a(this, lt) + t), !(!a(this, Me) || a(this, xt)) && (b(this, xt, !0), yt(() => {
|
|
708
|
+
b(this, xt, !1), a(this, Me) && Dt(a(this, Me), a(this, lt));
|
|
682
709
|
}));
|
|
683
710
|
}
|
|
684
711
|
get_effect_pending() {
|
|
685
|
-
return
|
|
712
|
+
return a(this, vn).call(this), g(
|
|
686
713
|
/** @type {Source<number>} */
|
|
687
|
-
|
|
714
|
+
a(this, Me)
|
|
688
715
|
);
|
|
689
716
|
}
|
|
690
717
|
/** @param {unknown} error */
|
|
691
718
|
error(t) {
|
|
692
|
-
var n =
|
|
693
|
-
let r =
|
|
694
|
-
if (
|
|
719
|
+
var n = a(this, Te).onerror;
|
|
720
|
+
let r = a(this, Te).failed;
|
|
721
|
+
if (a(this, at) || !n && !r)
|
|
695
722
|
throw t;
|
|
696
|
-
|
|
723
|
+
a(this, se) && (j(a(this, se)), b(this, se, null)), a(this, Y) && (j(a(this, Y)), b(this, Y, null)), a(this, xe) && (j(a(this, xe)), b(this, xe, null)), A && (z(
|
|
697
724
|
/** @type {TemplateNode} */
|
|
698
|
-
|
|
699
|
-
),
|
|
725
|
+
a(this, Yt)
|
|
726
|
+
), ds(), z(dn()));
|
|
700
727
|
var i = !1, s = !1;
|
|
701
728
|
const o = () => {
|
|
702
729
|
if (i) {
|
|
703
|
-
|
|
730
|
+
hs();
|
|
704
731
|
return;
|
|
705
732
|
}
|
|
706
|
-
i = !0, s &&
|
|
707
|
-
|
|
708
|
-
}), this.is_pending = this.has_pending_snippet(),
|
|
733
|
+
i = !0, s && cs(), Pe.ensure(), b(this, lt, 0), a(this, xe) !== null && ft(a(this, xe), () => {
|
|
734
|
+
b(this, xe, null);
|
|
735
|
+
}), this.is_pending = this.has_pending_snippet(), b(this, se, P(this, q, on).call(this, () => (b(this, at, !1), le(() => a(this, ot).call(this, a(this, ee)))))), a(this, De) > 0 ? P(this, q, ln).call(this) : this.is_pending = !1;
|
|
709
736
|
};
|
|
710
|
-
|
|
737
|
+
yt(() => {
|
|
711
738
|
try {
|
|
712
739
|
s = !0, n?.(t, o), s = !1;
|
|
713
|
-
} catch (
|
|
714
|
-
|
|
740
|
+
} catch (l) {
|
|
741
|
+
Ot(l, a(this, Ae) && a(this, Ae).parent);
|
|
715
742
|
}
|
|
716
|
-
r &&
|
|
717
|
-
|
|
743
|
+
r && b(this, xe, P(this, q, on).call(this, () => {
|
|
744
|
+
Pe.ensure(), b(this, at, !0);
|
|
718
745
|
try {
|
|
719
|
-
return
|
|
746
|
+
return le(() => {
|
|
720
747
|
r(
|
|
721
|
-
|
|
748
|
+
a(this, ee),
|
|
722
749
|
() => t,
|
|
723
750
|
() => o
|
|
724
751
|
);
|
|
725
752
|
});
|
|
726
|
-
} catch (
|
|
727
|
-
return
|
|
728
|
-
|
|
753
|
+
} catch (l) {
|
|
754
|
+
return Ot(
|
|
755
|
+
l,
|
|
729
756
|
/** @type {Effect} */
|
|
730
|
-
|
|
757
|
+
a(this, Ae).parent
|
|
731
758
|
), null;
|
|
732
759
|
} finally {
|
|
733
|
-
|
|
760
|
+
b(this, at, !1);
|
|
734
761
|
}
|
|
735
762
|
}));
|
|
736
763
|
});
|
|
737
764
|
}
|
|
738
765
|
}
|
|
739
|
-
|
|
766
|
+
ee = new WeakMap(), Yt = new WeakMap(), Te = new WeakMap(), ot = new WeakMap(), Ae = new WeakMap(), se = new WeakMap(), Y = new WeakMap(), xe = new WeakMap(), Oe = new WeakMap(), Ue = new WeakMap(), lt = new WeakMap(), De = new WeakMap(), xt = new WeakMap(), at = new WeakMap(), Ct = new WeakMap(), St = new WeakMap(), Me = new WeakMap(), vn = new WeakMap(), q = new WeakSet(), Ur = function() {
|
|
740
767
|
try {
|
|
741
|
-
|
|
768
|
+
b(this, se, le(() => a(this, ot).call(this, a(this, ee))));
|
|
742
769
|
} catch (t) {
|
|
743
770
|
this.error(t);
|
|
744
771
|
}
|
|
745
|
-
},
|
|
746
|
-
const t =
|
|
747
|
-
t && (
|
|
748
|
-
var n =
|
|
749
|
-
|
|
772
|
+
}, Yr = function() {
|
|
773
|
+
const t = a(this, Te).pending;
|
|
774
|
+
t && (b(this, Y, le(() => t(a(this, ee)))), yt(() => {
|
|
775
|
+
var n = P(this, q, Dn).call(this);
|
|
776
|
+
b(this, se, P(this, q, on).call(this, () => (Pe.ensure(), le(() => a(this, ot).call(this, n))))), a(this, De) > 0 ? P(this, q, ln).call(this) : (ft(
|
|
750
777
|
/** @type {Effect} */
|
|
751
|
-
|
|
778
|
+
a(this, Y),
|
|
752
779
|
() => {
|
|
753
|
-
|
|
780
|
+
b(this, Y, null);
|
|
754
781
|
}
|
|
755
782
|
), this.is_pending = !1);
|
|
756
783
|
}));
|
|
757
|
-
},
|
|
758
|
-
var t =
|
|
759
|
-
return this.is_pending && (
|
|
784
|
+
}, Dn = function() {
|
|
785
|
+
var t = a(this, ee);
|
|
786
|
+
return this.is_pending && (b(this, Ue, be()), a(this, ee).before(a(this, Ue)), t = a(this, Ue)), t;
|
|
760
787
|
}, /**
|
|
761
788
|
* @param {() => Effect | null} fn
|
|
762
789
|
*/
|
|
763
|
-
|
|
764
|
-
var n =
|
|
765
|
-
|
|
790
|
+
on = function(t) {
|
|
791
|
+
var n = T, r = y, i = fe;
|
|
792
|
+
Se(a(this, Ae)), he(a(this, Ae)), Nt(a(this, Ae).ctx);
|
|
766
793
|
try {
|
|
767
794
|
return t();
|
|
768
795
|
} catch (s) {
|
|
769
|
-
return
|
|
796
|
+
return Pr(s), null;
|
|
770
797
|
} finally {
|
|
771
|
-
|
|
798
|
+
Se(n), he(r), Nt(i);
|
|
772
799
|
}
|
|
773
|
-
},
|
|
800
|
+
}, ln = function() {
|
|
774
801
|
const t = (
|
|
775
802
|
/** @type {(anchor: Node) => void} */
|
|
776
|
-
|
|
803
|
+
a(this, Te).pending
|
|
777
804
|
);
|
|
778
|
-
|
|
805
|
+
a(this, se) !== null && (b(this, Oe, document.createDocumentFragment()), a(this, Oe).append(
|
|
779
806
|
/** @type {TemplateNode} */
|
|
780
|
-
|
|
781
|
-
),
|
|
807
|
+
a(this, Ue)
|
|
808
|
+
), ci(a(this, se), a(this, Oe))), a(this, Y) === null && b(this, Y, le(() => t(a(this, ee))));
|
|
782
809
|
}, /**
|
|
783
810
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
784
811
|
* if any, such that we can replace the snippet with content once work is done
|
|
785
812
|
* @param {1 | -1} d
|
|
786
813
|
*/
|
|
787
|
-
|
|
814
|
+
Mn = function(t) {
|
|
788
815
|
var n;
|
|
789
816
|
if (!this.has_pending_snippet()) {
|
|
790
|
-
this.parent &&
|
|
817
|
+
this.parent && P(n = this.parent, q, Mn).call(n, t);
|
|
791
818
|
return;
|
|
792
819
|
}
|
|
793
|
-
if (
|
|
820
|
+
if (b(this, De, a(this, De) + t), a(this, De) === 0) {
|
|
794
821
|
this.is_pending = !1;
|
|
795
|
-
for (const r of
|
|
796
|
-
|
|
797
|
-
for (const r of
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
}),
|
|
822
|
+
for (const r of a(this, Ct))
|
|
823
|
+
D(r, B), ge(r);
|
|
824
|
+
for (const r of a(this, St))
|
|
825
|
+
D(r, me), ge(r);
|
|
826
|
+
a(this, Ct).clear(), a(this, St).clear(), a(this, Y) && ft(a(this, Y), () => {
|
|
827
|
+
b(this, Y, null);
|
|
828
|
+
}), a(this, Oe) && (a(this, ee).before(a(this, Oe)), b(this, Oe, null));
|
|
802
829
|
}
|
|
803
830
|
};
|
|
804
|
-
function
|
|
805
|
-
const i =
|
|
831
|
+
function Es(e, t, n, r) {
|
|
832
|
+
const i = En;
|
|
806
833
|
var s = e.filter((c) => !c.settled);
|
|
807
834
|
if (n.length === 0 && s.length === 0) {
|
|
808
835
|
r(t.map(i));
|
|
809
836
|
return;
|
|
810
837
|
}
|
|
811
|
-
var o =
|
|
838
|
+
var o = S, l = (
|
|
812
839
|
/** @type {Effect} */
|
|
813
|
-
|
|
814
|
-
),
|
|
840
|
+
T
|
|
841
|
+
), u = Ts(), f = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((c) => c.promise)) : null;
|
|
815
842
|
function h(c) {
|
|
816
|
-
|
|
843
|
+
u();
|
|
817
844
|
try {
|
|
818
845
|
r(c);
|
|
819
|
-
} catch (
|
|
820
|
-
(
|
|
846
|
+
} catch (p) {
|
|
847
|
+
(l.f & Ie) === 0 && Ot(p, l);
|
|
821
848
|
}
|
|
822
|
-
o?.deactivate(),
|
|
849
|
+
o?.deactivate(), qn();
|
|
823
850
|
}
|
|
824
851
|
if (n.length === 0) {
|
|
825
852
|
f.then(() => h(t.map(i)));
|
|
826
853
|
return;
|
|
827
854
|
}
|
|
828
|
-
function
|
|
829
|
-
|
|
855
|
+
function v() {
|
|
856
|
+
u(), Promise.all(n.map((c) => /* @__PURE__ */ As(c))).then((c) => h([...t.map(i), ...c])).catch((c) => Ot(c, l));
|
|
830
857
|
}
|
|
831
|
-
f ? f.then(
|
|
858
|
+
f ? f.then(v) : v();
|
|
832
859
|
}
|
|
833
|
-
function
|
|
834
|
-
var e =
|
|
860
|
+
function Ts() {
|
|
861
|
+
var e = T, t = y, n = fe, r = S;
|
|
835
862
|
return function(s = !0) {
|
|
836
|
-
|
|
863
|
+
Se(e), he(t), Nt(n), s && r?.activate();
|
|
837
864
|
};
|
|
838
865
|
}
|
|
839
|
-
function
|
|
840
|
-
|
|
866
|
+
function qn() {
|
|
867
|
+
Se(null), he(null), Nt(null);
|
|
841
868
|
}
|
|
842
869
|
// @__NO_SIDE_EFFECTS__
|
|
843
|
-
function
|
|
844
|
-
var t =
|
|
870
|
+
function En(e) {
|
|
871
|
+
var t = F | B, n = y !== null && (y.f & F) !== 0 ? (
|
|
845
872
|
/** @type {Derived} */
|
|
846
|
-
|
|
873
|
+
y
|
|
847
874
|
) : null;
|
|
848
|
-
return
|
|
849
|
-
ctx:
|
|
875
|
+
return T !== null && (T.f |= _t), {
|
|
876
|
+
ctx: fe,
|
|
850
877
|
deps: null,
|
|
851
878
|
effects: null,
|
|
852
|
-
equals:
|
|
879
|
+
equals: Nr,
|
|
853
880
|
f: t,
|
|
854
881
|
fn: e,
|
|
855
882
|
reactions: null,
|
|
856
883
|
rv: 0,
|
|
857
884
|
v: (
|
|
858
885
|
/** @type {V} */
|
|
859
|
-
|
|
886
|
+
V
|
|
860
887
|
),
|
|
861
888
|
wv: 0,
|
|
862
|
-
parent: n ??
|
|
889
|
+
parent: n ?? T,
|
|
863
890
|
ac: null
|
|
864
891
|
};
|
|
865
892
|
}
|
|
866
893
|
// @__NO_SIDE_EFFECTS__
|
|
867
|
-
function
|
|
894
|
+
function As(e, t, n) {
|
|
868
895
|
let r = (
|
|
869
896
|
/** @type {Effect | null} */
|
|
870
|
-
|
|
897
|
+
T
|
|
871
898
|
);
|
|
872
|
-
r === null &&
|
|
899
|
+
r === null && ts();
|
|
873
900
|
var i = (
|
|
874
901
|
/** @type {Boundary} */
|
|
875
902
|
r.b
|
|
@@ -877,69 +904,79 @@ function _i(e, t, n) {
|
|
|
877
904
|
/** @type {Promise<V>} */
|
|
878
905
|
/** @type {unknown} */
|
|
879
906
|
void 0
|
|
880
|
-
), o =
|
|
907
|
+
), o = dt(
|
|
881
908
|
/** @type {V} */
|
|
882
|
-
|
|
883
|
-
),
|
|
884
|
-
return
|
|
885
|
-
var f =
|
|
909
|
+
V
|
|
910
|
+
), l = !y, u = /* @__PURE__ */ new Map();
|
|
911
|
+
return Ps(() => {
|
|
912
|
+
var f = Sr();
|
|
886
913
|
s = f.promise;
|
|
887
914
|
try {
|
|
888
915
|
Promise.resolve(e()).then(f.resolve, f.reject).then(() => {
|
|
889
|
-
h ===
|
|
916
|
+
h === S && h.committed && h.deactivate(), qn();
|
|
890
917
|
});
|
|
891
|
-
} catch (
|
|
892
|
-
f.reject(
|
|
918
|
+
} catch (p) {
|
|
919
|
+
f.reject(p), qn();
|
|
893
920
|
}
|
|
894
921
|
var h = (
|
|
895
922
|
/** @type {Batch} */
|
|
896
|
-
|
|
923
|
+
S
|
|
897
924
|
);
|
|
898
|
-
if (
|
|
899
|
-
var
|
|
900
|
-
i.update_pending_count(1), h.increment(
|
|
925
|
+
if (l) {
|
|
926
|
+
var v = i.is_rendered();
|
|
927
|
+
i.update_pending_count(1), h.increment(v), u.get(h)?.reject(tt), u.delete(h), u.set(h, f);
|
|
901
928
|
}
|
|
902
|
-
const c = (
|
|
903
|
-
if (h.activate(),
|
|
904
|
-
|
|
929
|
+
const c = (p, d = void 0) => {
|
|
930
|
+
if (h.activate(), d)
|
|
931
|
+
d !== tt && (o.f |= Ke, Dt(o, d));
|
|
905
932
|
else {
|
|
906
|
-
(o.f &
|
|
907
|
-
for (const [
|
|
908
|
-
if (
|
|
909
|
-
|
|
933
|
+
(o.f & Ke) !== 0 && (o.f ^= Ke), Dt(o, p);
|
|
934
|
+
for (const [m, $] of u) {
|
|
935
|
+
if (u.delete(m), m === h) break;
|
|
936
|
+
$.reject(tt);
|
|
910
937
|
}
|
|
911
938
|
}
|
|
912
|
-
|
|
939
|
+
l && (i.update_pending_count(-1), h.decrement(v));
|
|
913
940
|
};
|
|
914
|
-
f.promise.then(c, (
|
|
915
|
-
}),
|
|
916
|
-
for (const f of
|
|
917
|
-
f.reject(
|
|
941
|
+
f.promise.then(c, (p) => c(null, p || "unknown"));
|
|
942
|
+
}), Os(() => {
|
|
943
|
+
for (const f of u.values())
|
|
944
|
+
f.reject(tt);
|
|
918
945
|
}), new Promise((f) => {
|
|
919
|
-
function h(
|
|
946
|
+
function h(v) {
|
|
920
947
|
function c() {
|
|
921
|
-
|
|
948
|
+
v === s ? f(o) : h(s);
|
|
922
949
|
}
|
|
923
|
-
|
|
950
|
+
v.then(c, c);
|
|
924
951
|
}
|
|
925
952
|
h(s);
|
|
926
953
|
});
|
|
927
954
|
}
|
|
928
|
-
|
|
955
|
+
// @__NO_SIDE_EFFECTS__
|
|
956
|
+
function fr(e) {
|
|
957
|
+
const t = /* @__PURE__ */ En(e);
|
|
958
|
+
return hi(t), t;
|
|
959
|
+
}
|
|
960
|
+
// @__NO_SIDE_EFFECTS__
|
|
961
|
+
function xs(e) {
|
|
962
|
+
const t = /* @__PURE__ */ En(e);
|
|
963
|
+
return t.equals = Or, t;
|
|
964
|
+
}
|
|
965
|
+
function Cs(e) {
|
|
929
966
|
var t = e.effects;
|
|
930
967
|
if (t !== null) {
|
|
931
968
|
e.effects = null;
|
|
932
969
|
for (var n = 0; n < t.length; n += 1)
|
|
933
|
-
|
|
970
|
+
j(
|
|
934
971
|
/** @type {Effect} */
|
|
935
972
|
t[n]
|
|
936
973
|
);
|
|
937
974
|
}
|
|
938
975
|
}
|
|
939
|
-
function
|
|
976
|
+
function Ss(e) {
|
|
940
977
|
for (var t = e.parent; t !== null; ) {
|
|
941
|
-
if ((t.f &
|
|
942
|
-
return (t.f &
|
|
978
|
+
if ((t.f & F) === 0)
|
|
979
|
+
return (t.f & Ie) === 0 ? (
|
|
943
980
|
/** @type {Effect} */
|
|
944
981
|
t
|
|
945
982
|
) : null;
|
|
@@ -947,162 +984,172 @@ function vi(e) {
|
|
|
947
984
|
}
|
|
948
985
|
return null;
|
|
949
986
|
}
|
|
950
|
-
function
|
|
951
|
-
var t, n =
|
|
952
|
-
|
|
987
|
+
function Yn(e) {
|
|
988
|
+
var t, n = T;
|
|
989
|
+
Se(Ss(e));
|
|
953
990
|
try {
|
|
954
|
-
e.f &= ~
|
|
991
|
+
e.f &= ~ht, Cs(e), t = gi(e);
|
|
955
992
|
} finally {
|
|
956
|
-
|
|
993
|
+
Se(n);
|
|
957
994
|
}
|
|
958
995
|
return t;
|
|
959
996
|
}
|
|
960
|
-
function
|
|
961
|
-
var t =
|
|
962
|
-
if (!e.equals(t) && (e.wv =
|
|
963
|
-
|
|
997
|
+
function Kr(e) {
|
|
998
|
+
var t = Yn(e);
|
|
999
|
+
if (!e.equals(t) && (e.wv = vi(), (!S?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
|
|
1000
|
+
D(e, H);
|
|
964
1001
|
return;
|
|
965
1002
|
}
|
|
966
|
-
|
|
1003
|
+
Xe || (ve !== null ? (Xn() || S?.is_fork) && ve.set(e, t) : Un(e));
|
|
1004
|
+
}
|
|
1005
|
+
function ks(e) {
|
|
1006
|
+
if (e.effects !== null)
|
|
1007
|
+
for (const t of e.effects)
|
|
1008
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(tt), t.teardown = Wi, t.ac = null, jt(t, 0), Jn(t));
|
|
967
1009
|
}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1010
|
+
function Wr(e) {
|
|
1011
|
+
if (e.effects !== null)
|
|
1012
|
+
for (const t of e.effects)
|
|
1013
|
+
t.teardown && Mt(t);
|
|
1014
|
+
}
|
|
1015
|
+
let In = /* @__PURE__ */ new Set();
|
|
1016
|
+
const We = /* @__PURE__ */ new Map();
|
|
1017
|
+
let Xr = !1;
|
|
1018
|
+
function dt(e, t) {
|
|
972
1019
|
var n = {
|
|
973
1020
|
f: 0,
|
|
974
1021
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
975
1022
|
v: e,
|
|
976
1023
|
reactions: null,
|
|
977
|
-
equals:
|
|
1024
|
+
equals: Nr,
|
|
978
1025
|
rv: 0,
|
|
979
1026
|
wv: 0
|
|
980
1027
|
};
|
|
981
1028
|
return n;
|
|
982
1029
|
}
|
|
983
1030
|
// @__NO_SIDE_EFFECTS__
|
|
984
|
-
function
|
|
985
|
-
const n =
|
|
986
|
-
return
|
|
1031
|
+
function W(e, t) {
|
|
1032
|
+
const n = dt(e);
|
|
1033
|
+
return hi(n), n;
|
|
987
1034
|
}
|
|
988
1035
|
// @__NO_SIDE_EFFECTS__
|
|
989
|
-
function
|
|
990
|
-
const r =
|
|
991
|
-
return t || (r.equals =
|
|
1036
|
+
function Jr(e, t = !1, n = !0) {
|
|
1037
|
+
const r = dt(e);
|
|
1038
|
+
return t || (r.equals = Or), r;
|
|
992
1039
|
}
|
|
993
|
-
function
|
|
994
|
-
|
|
1040
|
+
function C(e, t, n = !1) {
|
|
1041
|
+
y !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
995
1042
|
// to ensure we error if state is set inside an inspect effect
|
|
996
|
-
(!
|
|
997
|
-
let r = n ?
|
|
998
|
-
return
|
|
1043
|
+
(!pe || (y.f & ar) !== 0) && qr() && (y.f & (F | He | zn | ar)) !== 0 && (ue === null || !Rt.call(ue, e)) && fs();
|
|
1044
|
+
let r = n ? bt(t) : t;
|
|
1045
|
+
return Dt(e, r);
|
|
999
1046
|
}
|
|
1000
|
-
function
|
|
1047
|
+
function Dt(e, t) {
|
|
1001
1048
|
if (!e.equals(t)) {
|
|
1002
1049
|
var n = e.v;
|
|
1003
|
-
|
|
1004
|
-
var r =
|
|
1005
|
-
if (r.capture(e, n), (e.f &
|
|
1050
|
+
Xe ? We.set(e, t) : We.set(e, n), e.v = t;
|
|
1051
|
+
var r = Pe.ensure();
|
|
1052
|
+
if (r.capture(e, n), (e.f & F) !== 0) {
|
|
1006
1053
|
const i = (
|
|
1007
1054
|
/** @type {Derived} */
|
|
1008
1055
|
e
|
|
1009
1056
|
);
|
|
1010
|
-
(e.f &
|
|
1057
|
+
(e.f & B) !== 0 && Yn(i), Un(i);
|
|
1011
1058
|
}
|
|
1012
|
-
e.wv =
|
|
1059
|
+
e.wv = vi(), Qr(e, B), T !== null && (T.f & H) !== 0 && (T.f & (we | Je)) === 0 && (ie === null ? Fs([e]) : ie.push(e)), !r.is_fork && In.size > 0 && !Xr && Rs();
|
|
1013
1060
|
}
|
|
1014
1061
|
return t;
|
|
1015
1062
|
}
|
|
1016
|
-
function
|
|
1017
|
-
|
|
1018
|
-
for (const e of
|
|
1019
|
-
(e.f &
|
|
1020
|
-
|
|
1063
|
+
function Rs() {
|
|
1064
|
+
Xr = !1;
|
|
1065
|
+
for (const e of In)
|
|
1066
|
+
(e.f & H) !== 0 && D(e, me), Xt(e) && Mt(e);
|
|
1067
|
+
In.clear();
|
|
1021
1068
|
}
|
|
1022
|
-
function
|
|
1023
|
-
|
|
1069
|
+
function Bt(e) {
|
|
1070
|
+
C(e, e.v + 1);
|
|
1024
1071
|
}
|
|
1025
|
-
function
|
|
1072
|
+
function Qr(e, t) {
|
|
1026
1073
|
var n = e.reactions;
|
|
1027
1074
|
if (n !== null)
|
|
1028
1075
|
for (var r = n.length, i = 0; i < r; i++) {
|
|
1029
|
-
var s = n[i], o = s.f,
|
|
1030
|
-
if (
|
|
1031
|
-
var
|
|
1076
|
+
var s = n[i], o = s.f, l = (o & B) === 0;
|
|
1077
|
+
if (l && D(s, t), (o & F) !== 0) {
|
|
1078
|
+
var u = (
|
|
1032
1079
|
/** @type {Derived} */
|
|
1033
1080
|
s
|
|
1034
1081
|
);
|
|
1035
|
-
|
|
1036
|
-
} else
|
|
1082
|
+
ve?.delete(u), (o & ht) === 0 && (o & ae && (s.f |= ht), Qr(u, me));
|
|
1083
|
+
} else l && ((o & He) !== 0 && Le !== null && Le.add(
|
|
1037
1084
|
/** @type {Effect} */
|
|
1038
1085
|
s
|
|
1039
|
-
),
|
|
1086
|
+
), ge(
|
|
1040
1087
|
/** @type {Effect} */
|
|
1041
1088
|
s
|
|
1042
1089
|
));
|
|
1043
1090
|
}
|
|
1044
1091
|
}
|
|
1045
|
-
function
|
|
1046
|
-
if (typeof e != "object" || e === null ||
|
|
1092
|
+
function bt(e) {
|
|
1093
|
+
if (typeof e != "object" || e === null || Cn in e)
|
|
1047
1094
|
return e;
|
|
1048
|
-
const t =
|
|
1049
|
-
if (t !==
|
|
1095
|
+
const t = Cr(e);
|
|
1096
|
+
if (t !== Yi && t !== Ki)
|
|
1050
1097
|
return e;
|
|
1051
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
1052
|
-
if (
|
|
1053
|
-
return
|
|
1054
|
-
var
|
|
1055
|
-
|
|
1056
|
-
var h =
|
|
1057
|
-
return
|
|
1098
|
+
var n = /* @__PURE__ */ new Map(), r = xr(e), i = /* @__PURE__ */ W(0), s = ct, o = (l) => {
|
|
1099
|
+
if (ct === s)
|
|
1100
|
+
return l();
|
|
1101
|
+
var u = y, f = ct;
|
|
1102
|
+
he(null), dr(s);
|
|
1103
|
+
var h = l();
|
|
1104
|
+
return he(u), dr(f), h;
|
|
1058
1105
|
};
|
|
1059
|
-
return r && n.set("length", /* @__PURE__ */
|
|
1106
|
+
return r && n.set("length", /* @__PURE__ */ W(
|
|
1060
1107
|
/** @type {any[]} */
|
|
1061
1108
|
e.length
|
|
1062
1109
|
)), new Proxy(
|
|
1063
1110
|
/** @type {any} */
|
|
1064
1111
|
e,
|
|
1065
1112
|
{
|
|
1066
|
-
defineProperty(
|
|
1067
|
-
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) &&
|
|
1068
|
-
var h = n.get(
|
|
1069
|
-
return h === void 0 ?
|
|
1070
|
-
var
|
|
1071
|
-
return n.set(
|
|
1072
|
-
}) :
|
|
1113
|
+
defineProperty(l, u, f) {
|
|
1114
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && as();
|
|
1115
|
+
var h = n.get(u);
|
|
1116
|
+
return h === void 0 ? o(() => {
|
|
1117
|
+
var v = /* @__PURE__ */ W(f.value);
|
|
1118
|
+
return n.set(u, v), v;
|
|
1119
|
+
}) : C(h, f.value, !0), !0;
|
|
1073
1120
|
},
|
|
1074
|
-
deleteProperty(
|
|
1075
|
-
var f = n.get(
|
|
1121
|
+
deleteProperty(l, u) {
|
|
1122
|
+
var f = n.get(u);
|
|
1076
1123
|
if (f === void 0) {
|
|
1077
|
-
if (
|
|
1078
|
-
const h = o(() => /* @__PURE__ */
|
|
1079
|
-
n.set(
|
|
1124
|
+
if (u in l) {
|
|
1125
|
+
const h = o(() => /* @__PURE__ */ W(V));
|
|
1126
|
+
n.set(u, h), Bt(i);
|
|
1080
1127
|
}
|
|
1081
1128
|
} else
|
|
1082
|
-
|
|
1129
|
+
C(f, V), Bt(i);
|
|
1083
1130
|
return !0;
|
|
1084
1131
|
},
|
|
1085
|
-
get(
|
|
1086
|
-
if (
|
|
1132
|
+
get(l, u, f) {
|
|
1133
|
+
if (u === Cn)
|
|
1087
1134
|
return e;
|
|
1088
|
-
var h = n.get(
|
|
1089
|
-
if (h === void 0 && (!
|
|
1090
|
-
var
|
|
1091
|
-
return
|
|
1092
|
-
}), n.set(
|
|
1093
|
-
var c =
|
|
1094
|
-
return c ===
|
|
1135
|
+
var h = n.get(u), v = u in l;
|
|
1136
|
+
if (h === void 0 && (!v || wt(l, u)?.writable) && (h = o(() => {
|
|
1137
|
+
var p = bt(v ? l[u] : V), d = /* @__PURE__ */ W(p);
|
|
1138
|
+
return d;
|
|
1139
|
+
}), n.set(u, h)), h !== void 0) {
|
|
1140
|
+
var c = g(h);
|
|
1141
|
+
return c === V ? void 0 : c;
|
|
1095
1142
|
}
|
|
1096
|
-
return Reflect.get(
|
|
1143
|
+
return Reflect.get(l, u, f);
|
|
1097
1144
|
},
|
|
1098
|
-
getOwnPropertyDescriptor(
|
|
1099
|
-
var f = Reflect.getOwnPropertyDescriptor(
|
|
1145
|
+
getOwnPropertyDescriptor(l, u) {
|
|
1146
|
+
var f = Reflect.getOwnPropertyDescriptor(l, u);
|
|
1100
1147
|
if (f && "value" in f) {
|
|
1101
|
-
var h = n.get(
|
|
1102
|
-
h && (f.value =
|
|
1148
|
+
var h = n.get(u);
|
|
1149
|
+
h && (f.value = g(h));
|
|
1103
1150
|
} else if (f === void 0) {
|
|
1104
|
-
var
|
|
1105
|
-
if (
|
|
1151
|
+
var v = n.get(u), c = v?.v;
|
|
1152
|
+
if (v !== void 0 && c !== V)
|
|
1106
1153
|
return {
|
|
1107
1154
|
enumerable: !0,
|
|
1108
1155
|
configurable: !0,
|
|
@@ -1112,173 +1159,188 @@ function We(e) {
|
|
|
1112
1159
|
}
|
|
1113
1160
|
return f;
|
|
1114
1161
|
},
|
|
1115
|
-
has(
|
|
1116
|
-
if (
|
|
1162
|
+
has(l, u) {
|
|
1163
|
+
if (u === Cn)
|
|
1117
1164
|
return !0;
|
|
1118
|
-
var f = n.get(
|
|
1119
|
-
if (f !== void 0 ||
|
|
1165
|
+
var f = n.get(u), h = f !== void 0 && f.v !== V || Reflect.has(l, u);
|
|
1166
|
+
if (f !== void 0 || T !== null && (!h || wt(l, u)?.writable)) {
|
|
1120
1167
|
f === void 0 && (f = o(() => {
|
|
1121
|
-
var c = h ?
|
|
1122
|
-
return
|
|
1123
|
-
}), n.set(
|
|
1124
|
-
var
|
|
1125
|
-
if (
|
|
1168
|
+
var c = h ? bt(l[u]) : V, p = /* @__PURE__ */ W(c);
|
|
1169
|
+
return p;
|
|
1170
|
+
}), n.set(u, f));
|
|
1171
|
+
var v = g(f);
|
|
1172
|
+
if (v === V)
|
|
1126
1173
|
return !1;
|
|
1127
1174
|
}
|
|
1128
1175
|
return h;
|
|
1129
1176
|
},
|
|
1130
|
-
set(
|
|
1131
|
-
var
|
|
1132
|
-
if (r &&
|
|
1133
|
-
for (var
|
|
1134
|
-
|
|
1135
|
-
var
|
|
1136
|
-
|
|
1177
|
+
set(l, u, f, h) {
|
|
1178
|
+
var v = n.get(u), c = u in l;
|
|
1179
|
+
if (r && u === "length")
|
|
1180
|
+
for (var p = f; p < /** @type {Source<number>} */
|
|
1181
|
+
v.v; p += 1) {
|
|
1182
|
+
var d = n.get(p + "");
|
|
1183
|
+
d !== void 0 ? C(d, V) : p in l && (d = o(() => /* @__PURE__ */ W(V)), n.set(p + "", d));
|
|
1137
1184
|
}
|
|
1138
|
-
if (
|
|
1139
|
-
(!c ||
|
|
1185
|
+
if (v === void 0)
|
|
1186
|
+
(!c || wt(l, u)?.writable) && (v = o(() => /* @__PURE__ */ W(void 0)), C(v, bt(f)), n.set(u, v));
|
|
1140
1187
|
else {
|
|
1141
|
-
c =
|
|
1142
|
-
var
|
|
1143
|
-
|
|
1188
|
+
c = v.v !== V;
|
|
1189
|
+
var m = o(() => bt(f));
|
|
1190
|
+
C(v, m);
|
|
1144
1191
|
}
|
|
1145
|
-
var
|
|
1146
|
-
if (
|
|
1147
|
-
if (r && typeof
|
|
1148
|
-
var
|
|
1192
|
+
var $ = Reflect.getOwnPropertyDescriptor(l, u);
|
|
1193
|
+
if ($?.set && $.set.call(h, f), !c) {
|
|
1194
|
+
if (r && typeof u == "string") {
|
|
1195
|
+
var R = (
|
|
1149
1196
|
/** @type {Source<number>} */
|
|
1150
1197
|
n.get("length")
|
|
1151
|
-
),
|
|
1152
|
-
Number.isInteger(
|
|
1198
|
+
), I = Number(u);
|
|
1199
|
+
Number.isInteger(I) && I >= R.v && C(R, I + 1);
|
|
1153
1200
|
}
|
|
1154
|
-
|
|
1201
|
+
Bt(i);
|
|
1155
1202
|
}
|
|
1156
1203
|
return !0;
|
|
1157
1204
|
},
|
|
1158
|
-
ownKeys(
|
|
1159
|
-
|
|
1160
|
-
var
|
|
1161
|
-
var c = n.get(
|
|
1162
|
-
return c === void 0 || c.v !==
|
|
1205
|
+
ownKeys(l) {
|
|
1206
|
+
g(i);
|
|
1207
|
+
var u = Reflect.ownKeys(l).filter((v) => {
|
|
1208
|
+
var c = n.get(v);
|
|
1209
|
+
return c === void 0 || c.v !== V;
|
|
1163
1210
|
});
|
|
1164
1211
|
for (var [f, h] of n)
|
|
1165
|
-
h.v !==
|
|
1166
|
-
return
|
|
1212
|
+
h.v !== V && !(f in l) && u.push(f);
|
|
1213
|
+
return u;
|
|
1167
1214
|
},
|
|
1168
1215
|
setPrototypeOf() {
|
|
1169
|
-
|
|
1216
|
+
us();
|
|
1170
1217
|
}
|
|
1171
1218
|
}
|
|
1172
1219
|
);
|
|
1173
1220
|
}
|
|
1174
|
-
var
|
|
1175
|
-
function
|
|
1176
|
-
if (
|
|
1177
|
-
|
|
1221
|
+
var cr, Zr, ei, ti;
|
|
1222
|
+
function Pn() {
|
|
1223
|
+
if (cr === void 0) {
|
|
1224
|
+
cr = window, Zr = /Firefox/.test(navigator.userAgent);
|
|
1178
1225
|
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
1179
|
-
|
|
1226
|
+
ei = wt(t, "firstChild").get, ti = wt(t, "nextSibling").get, lr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), lr(n) && (n.__t = void 0);
|
|
1180
1227
|
}
|
|
1181
1228
|
}
|
|
1182
|
-
function
|
|
1229
|
+
function be(e = "") {
|
|
1183
1230
|
return document.createTextNode(e);
|
|
1184
1231
|
}
|
|
1185
1232
|
// @__NO_SIDE_EFFECTS__
|
|
1186
|
-
function
|
|
1233
|
+
function vt(e) {
|
|
1187
1234
|
return (
|
|
1188
1235
|
/** @type {TemplateNode | null} */
|
|
1189
|
-
|
|
1236
|
+
ei.call(e)
|
|
1190
1237
|
);
|
|
1191
1238
|
}
|
|
1192
1239
|
// @__NO_SIDE_EFFECTS__
|
|
1193
|
-
function
|
|
1240
|
+
function ce(e) {
|
|
1194
1241
|
return (
|
|
1195
1242
|
/** @type {TemplateNode | null} */
|
|
1196
|
-
|
|
1243
|
+
ti.call(e)
|
|
1197
1244
|
);
|
|
1198
1245
|
}
|
|
1199
|
-
function
|
|
1200
|
-
if (!
|
|
1201
|
-
return /* @__PURE__ */
|
|
1202
|
-
var n = /* @__PURE__ */
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1246
|
+
function nn(e, t) {
|
|
1247
|
+
if (!A)
|
|
1248
|
+
return /* @__PURE__ */ vt(e);
|
|
1249
|
+
var n = /* @__PURE__ */ vt(x);
|
|
1250
|
+
if (n === null)
|
|
1251
|
+
n = x.appendChild(be());
|
|
1252
|
+
else if (t && n.nodeType !== bn) {
|
|
1253
|
+
var r = be();
|
|
1254
|
+
return n?.before(r), z(r), r;
|
|
1255
|
+
}
|
|
1256
|
+
return t && Wn(
|
|
1257
|
+
/** @type {Text} */
|
|
1258
|
+
n
|
|
1259
|
+
), z(n), n;
|
|
1260
|
+
}
|
|
1261
|
+
function Sn(e, t = !1) {
|
|
1262
|
+
if (!A) {
|
|
1263
|
+
var n = /* @__PURE__ */ vt(e);
|
|
1264
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ ce(n) : n;
|
|
1209
1265
|
}
|
|
1210
1266
|
if (t) {
|
|
1211
|
-
if (
|
|
1212
|
-
var r =
|
|
1213
|
-
return
|
|
1267
|
+
if (x?.nodeType !== bn) {
|
|
1268
|
+
var r = be();
|
|
1269
|
+
return x?.before(r), z(r), r;
|
|
1214
1270
|
}
|
|
1215
|
-
|
|
1271
|
+
Wn(
|
|
1216
1272
|
/** @type {Text} */
|
|
1217
|
-
|
|
1273
|
+
x
|
|
1218
1274
|
);
|
|
1219
1275
|
}
|
|
1220
|
-
return
|
|
1276
|
+
return x;
|
|
1221
1277
|
}
|
|
1222
|
-
function
|
|
1223
|
-
let r =
|
|
1278
|
+
function Ee(e, t = 1, n = !1) {
|
|
1279
|
+
let r = A ? x : e;
|
|
1224
1280
|
for (var i; t--; )
|
|
1225
1281
|
i = r, r = /** @type {TemplateNode} */
|
|
1226
|
-
/* @__PURE__ */
|
|
1227
|
-
if (!
|
|
1282
|
+
/* @__PURE__ */ ce(r);
|
|
1283
|
+
if (!A)
|
|
1228
1284
|
return r;
|
|
1229
1285
|
if (n) {
|
|
1230
|
-
if (r?.nodeType !==
|
|
1231
|
-
var s =
|
|
1232
|
-
return r === null ? i?.after(s) : r.before(s),
|
|
1286
|
+
if (r?.nodeType !== bn) {
|
|
1287
|
+
var s = be();
|
|
1288
|
+
return r === null ? i?.after(s) : r.before(s), z(s), s;
|
|
1233
1289
|
}
|
|
1234
|
-
|
|
1290
|
+
Wn(
|
|
1235
1291
|
/** @type {Text} */
|
|
1236
1292
|
r
|
|
1237
1293
|
);
|
|
1238
1294
|
}
|
|
1239
|
-
return
|
|
1295
|
+
return z(r), r;
|
|
1240
1296
|
}
|
|
1241
|
-
function
|
|
1297
|
+
function ni(e) {
|
|
1242
1298
|
e.textContent = "";
|
|
1243
1299
|
}
|
|
1244
|
-
function
|
|
1300
|
+
function ri() {
|
|
1245
1301
|
return !1;
|
|
1246
1302
|
}
|
|
1247
|
-
function
|
|
1303
|
+
function Kn(e, t, n) {
|
|
1304
|
+
return (
|
|
1305
|
+
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1306
|
+
document.createElementNS(Ar, e, void 0)
|
|
1307
|
+
);
|
|
1308
|
+
}
|
|
1309
|
+
function Wn(e) {
|
|
1248
1310
|
if (
|
|
1249
1311
|
/** @type {string} */
|
|
1250
1312
|
e.nodeValue.length < 65536
|
|
1251
1313
|
)
|
|
1252
1314
|
return;
|
|
1253
1315
|
let t = e.nextSibling;
|
|
1254
|
-
for (; t !== null && t.nodeType ===
|
|
1316
|
+
for (; t !== null && t.nodeType === bn; )
|
|
1255
1317
|
t.remove(), e.nodeValue += /** @type {string} */
|
|
1256
1318
|
t.nodeValue, t = e.nextSibling;
|
|
1257
1319
|
}
|
|
1258
|
-
function
|
|
1259
|
-
var t =
|
|
1260
|
-
|
|
1320
|
+
function ii(e) {
|
|
1321
|
+
var t = y, n = T;
|
|
1322
|
+
he(null), Se(null);
|
|
1261
1323
|
try {
|
|
1262
1324
|
return e();
|
|
1263
1325
|
} finally {
|
|
1264
|
-
|
|
1326
|
+
he(t), Se(n);
|
|
1265
1327
|
}
|
|
1266
1328
|
}
|
|
1267
|
-
function
|
|
1268
|
-
|
|
1329
|
+
function Ls(e) {
|
|
1330
|
+
T === null && (y === null && ss(), is()), Xe && rs();
|
|
1269
1331
|
}
|
|
1270
|
-
function
|
|
1332
|
+
function Ns(e, t) {
|
|
1271
1333
|
var n = t.last;
|
|
1272
1334
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
1273
1335
|
}
|
|
1274
|
-
function
|
|
1275
|
-
var r =
|
|
1276
|
-
r !== null && (r.f &
|
|
1336
|
+
function Re(e, t, n) {
|
|
1337
|
+
var r = T;
|
|
1338
|
+
r !== null && (r.f & ne) !== 0 && (e |= ne);
|
|
1277
1339
|
var i = {
|
|
1278
|
-
ctx:
|
|
1340
|
+
ctx: fe,
|
|
1279
1341
|
deps: null,
|
|
1280
1342
|
nodes: null,
|
|
1281
|
-
f: e |
|
|
1343
|
+
f: e | B | ae,
|
|
1282
1344
|
first: null,
|
|
1283
1345
|
fn: t,
|
|
1284
1346
|
last: null,
|
|
@@ -1292,173 +1354,176 @@ function $e(e, t, n) {
|
|
|
1292
1354
|
};
|
|
1293
1355
|
if (n)
|
|
1294
1356
|
try {
|
|
1295
|
-
|
|
1296
|
-
} catch (
|
|
1297
|
-
throw
|
|
1357
|
+
Mt(i);
|
|
1358
|
+
} catch (l) {
|
|
1359
|
+
throw j(i), l;
|
|
1298
1360
|
}
|
|
1299
|
-
else t !== null &&
|
|
1361
|
+
else t !== null && ge(i);
|
|
1300
1362
|
var s = i;
|
|
1301
1363
|
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1302
|
-
(s.f &
|
|
1364
|
+
(s.f & _t) === 0 && (s = s.first, (e & He) !== 0 && (e & Lt) !== 0 && s !== null && (s.f |= Lt)), s !== null && (s.parent = r, r !== null && Ns(s, r), y !== null && (y.f & F) !== 0 && (e & Je) === 0)) {
|
|
1303
1365
|
var o = (
|
|
1304
1366
|
/** @type {Derived} */
|
|
1305
|
-
|
|
1367
|
+
y
|
|
1306
1368
|
);
|
|
1307
1369
|
(o.effects ?? (o.effects = [])).push(s);
|
|
1308
1370
|
}
|
|
1309
1371
|
return i;
|
|
1310
1372
|
}
|
|
1311
|
-
function
|
|
1312
|
-
return
|
|
1373
|
+
function Xn() {
|
|
1374
|
+
return y !== null && !pe;
|
|
1313
1375
|
}
|
|
1314
|
-
function
|
|
1315
|
-
const t =
|
|
1316
|
-
return
|
|
1376
|
+
function Os(e) {
|
|
1377
|
+
const t = Re(mn, null, !1);
|
|
1378
|
+
return D(t, H), t.teardown = e, t;
|
|
1317
1379
|
}
|
|
1318
|
-
function
|
|
1319
|
-
|
|
1380
|
+
function Ds(e) {
|
|
1381
|
+
Ls();
|
|
1320
1382
|
var t = (
|
|
1321
1383
|
/** @type {Effect} */
|
|
1322
|
-
|
|
1323
|
-
), n = !
|
|
1384
|
+
T.f
|
|
1385
|
+
), n = !y && (t & we) !== 0 && (t & qt) === 0;
|
|
1324
1386
|
if (n) {
|
|
1325
1387
|
var r = (
|
|
1326
1388
|
/** @type {ComponentContext} */
|
|
1327
|
-
|
|
1389
|
+
fe
|
|
1328
1390
|
);
|
|
1329
1391
|
(r.e ?? (r.e = [])).push(e);
|
|
1330
1392
|
} else
|
|
1331
|
-
return
|
|
1393
|
+
return si(e);
|
|
1332
1394
|
}
|
|
1333
|
-
function
|
|
1334
|
-
return
|
|
1395
|
+
function si(e) {
|
|
1396
|
+
return Re(Gt | Ji, e, !1);
|
|
1335
1397
|
}
|
|
1336
|
-
function
|
|
1337
|
-
|
|
1338
|
-
const t =
|
|
1398
|
+
function Ms(e) {
|
|
1399
|
+
Pe.ensure();
|
|
1400
|
+
const t = Re(Je | _t, e, !0);
|
|
1339
1401
|
return () => {
|
|
1340
|
-
|
|
1402
|
+
j(t);
|
|
1341
1403
|
};
|
|
1342
1404
|
}
|
|
1343
|
-
function
|
|
1344
|
-
|
|
1345
|
-
const t =
|
|
1405
|
+
function qs(e) {
|
|
1406
|
+
Pe.ensure();
|
|
1407
|
+
const t = Re(Je | _t, e, !0);
|
|
1346
1408
|
return (n = {}) => new Promise((r) => {
|
|
1347
|
-
n.outro ?
|
|
1348
|
-
|
|
1349
|
-
}) : (
|
|
1409
|
+
n.outro ? ft(t, () => {
|
|
1410
|
+
j(t), r(void 0);
|
|
1411
|
+
}) : (j(t), r(void 0));
|
|
1350
1412
|
});
|
|
1351
1413
|
}
|
|
1352
|
-
function
|
|
1353
|
-
return
|
|
1414
|
+
function Is(e) {
|
|
1415
|
+
return Re(Gt, e, !1);
|
|
1354
1416
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return
|
|
1417
|
+
function Ps(e) {
|
|
1418
|
+
return Re(zn | _t, e, !0);
|
|
1357
1419
|
}
|
|
1358
|
-
function
|
|
1359
|
-
|
|
1360
|
-
|
|
1420
|
+
function oi(e, t = 0) {
|
|
1421
|
+
return Re(mn | t, e, !0);
|
|
1422
|
+
}
|
|
1423
|
+
function rn(e, t = [], n = [], r = []) {
|
|
1424
|
+
Es(r, t, n, (i) => {
|
|
1425
|
+
Re(mn, () => e(...i.map(g)), !0);
|
|
1361
1426
|
});
|
|
1362
1427
|
}
|
|
1363
|
-
function
|
|
1364
|
-
var n =
|
|
1428
|
+
function Tn(e, t = 0) {
|
|
1429
|
+
var n = Re(He | t, e, !0);
|
|
1365
1430
|
return n;
|
|
1366
1431
|
}
|
|
1367
|
-
function
|
|
1368
|
-
return
|
|
1432
|
+
function le(e) {
|
|
1433
|
+
return Re(we | _t, e, !0);
|
|
1369
1434
|
}
|
|
1370
|
-
function
|
|
1435
|
+
function li(e) {
|
|
1371
1436
|
var t = e.teardown;
|
|
1372
1437
|
if (t !== null) {
|
|
1373
|
-
const n =
|
|
1374
|
-
|
|
1438
|
+
const n = Xe, r = y;
|
|
1439
|
+
hr(!0), he(null);
|
|
1375
1440
|
try {
|
|
1376
1441
|
t.call(null);
|
|
1377
1442
|
} finally {
|
|
1378
|
-
|
|
1443
|
+
hr(n), he(r);
|
|
1379
1444
|
}
|
|
1380
1445
|
}
|
|
1381
1446
|
}
|
|
1382
|
-
function
|
|
1447
|
+
function Jn(e, t = !1) {
|
|
1383
1448
|
var n = e.first;
|
|
1384
1449
|
for (e.first = e.last = null; n !== null; ) {
|
|
1385
1450
|
const i = n.ac;
|
|
1386
|
-
i !== null &&
|
|
1387
|
-
i.abort(
|
|
1451
|
+
i !== null && ii(() => {
|
|
1452
|
+
i.abort(tt);
|
|
1388
1453
|
});
|
|
1389
1454
|
var r = n.next;
|
|
1390
|
-
(n.f &
|
|
1455
|
+
(n.f & Je) !== 0 ? n.parent = null : j(n, t), n = r;
|
|
1391
1456
|
}
|
|
1392
1457
|
}
|
|
1393
|
-
function
|
|
1458
|
+
function Hs(e) {
|
|
1394
1459
|
for (var t = e.first; t !== null; ) {
|
|
1395
1460
|
var n = t.next;
|
|
1396
|
-
(t.f &
|
|
1461
|
+
(t.f & we) === 0 && j(t), t = n;
|
|
1397
1462
|
}
|
|
1398
1463
|
}
|
|
1399
|
-
function
|
|
1464
|
+
function j(e, t = !0) {
|
|
1400
1465
|
var n = !1;
|
|
1401
|
-
(t || (e.f &
|
|
1466
|
+
(t || (e.f & jn) !== 0) && e.nodes !== null && e.nodes.end !== null && (Vs(
|
|
1402
1467
|
e.nodes.start,
|
|
1403
1468
|
/** @type {TemplateNode} */
|
|
1404
1469
|
e.nodes.end
|
|
1405
|
-
), n = !0),
|
|
1470
|
+
), n = !0), Jn(e, t && !n), jt(e, 0), D(e, Ie);
|
|
1406
1471
|
var r = e.nodes && e.nodes.t;
|
|
1407
1472
|
if (r !== null)
|
|
1408
1473
|
for (const s of r)
|
|
1409
1474
|
s.stop();
|
|
1410
|
-
|
|
1475
|
+
li(e);
|
|
1411
1476
|
var i = e.parent;
|
|
1412
|
-
i !== null && i.first !== null &&
|
|
1477
|
+
i !== null && i.first !== null && ai(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1413
1478
|
}
|
|
1414
|
-
function
|
|
1479
|
+
function Vs(e, t) {
|
|
1415
1480
|
for (; e !== null; ) {
|
|
1416
|
-
var n = e === t ? null : /* @__PURE__ */
|
|
1481
|
+
var n = e === t ? null : /* @__PURE__ */ ce(e);
|
|
1417
1482
|
e.remove(), e = n;
|
|
1418
1483
|
}
|
|
1419
1484
|
}
|
|
1420
|
-
function
|
|
1485
|
+
function ai(e) {
|
|
1421
1486
|
var t = e.parent, n = e.prev, r = e.next;
|
|
1422
1487
|
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1423
1488
|
}
|
|
1424
|
-
function
|
|
1489
|
+
function ft(e, t, n = !0) {
|
|
1425
1490
|
var r = [];
|
|
1426
|
-
|
|
1491
|
+
ui(e, r, !0);
|
|
1427
1492
|
var i = () => {
|
|
1428
|
-
n &&
|
|
1493
|
+
n && j(e), t && t();
|
|
1429
1494
|
}, s = r.length;
|
|
1430
1495
|
if (s > 0) {
|
|
1431
1496
|
var o = () => --s || i();
|
|
1432
|
-
for (var
|
|
1433
|
-
|
|
1497
|
+
for (var l of r)
|
|
1498
|
+
l.out(o);
|
|
1434
1499
|
} else
|
|
1435
1500
|
i();
|
|
1436
1501
|
}
|
|
1437
|
-
function
|
|
1438
|
-
if ((e.f &
|
|
1439
|
-
e.f ^=
|
|
1502
|
+
function ui(e, t, n) {
|
|
1503
|
+
if ((e.f & ne) === 0) {
|
|
1504
|
+
e.f ^= ne;
|
|
1440
1505
|
var r = e.nodes && e.nodes.t;
|
|
1441
1506
|
if (r !== null)
|
|
1442
|
-
for (const
|
|
1443
|
-
(
|
|
1507
|
+
for (const l of r)
|
|
1508
|
+
(l.is_global || n) && t.push(l);
|
|
1444
1509
|
for (var i = e.first; i !== null; ) {
|
|
1445
|
-
var s = i.next, o = (i.f &
|
|
1510
|
+
var s = i.next, o = (i.f & Lt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1446
1511
|
// it means the parent block effect was pruned. In that case,
|
|
1447
1512
|
// transparency information was transferred to the branch effect.
|
|
1448
|
-
(i.f &
|
|
1449
|
-
|
|
1513
|
+
(i.f & we) !== 0 && (e.f & He) !== 0;
|
|
1514
|
+
ui(i, t, o ? n : !1), i = s;
|
|
1450
1515
|
}
|
|
1451
1516
|
}
|
|
1452
1517
|
}
|
|
1453
|
-
function
|
|
1454
|
-
|
|
1518
|
+
function Qn(e) {
|
|
1519
|
+
fi(e, !0);
|
|
1455
1520
|
}
|
|
1456
|
-
function
|
|
1457
|
-
if ((e.f &
|
|
1458
|
-
e.f ^=
|
|
1521
|
+
function fi(e, t) {
|
|
1522
|
+
if ((e.f & ne) !== 0) {
|
|
1523
|
+
e.f ^= ne, (e.f & H) === 0 && (D(e, B), ge(e));
|
|
1459
1524
|
for (var n = e.first; n !== null; ) {
|
|
1460
|
-
var r = n.next, i = (n.f &
|
|
1461
|
-
|
|
1525
|
+
var r = n.next, i = (n.f & Lt) !== 0 || (n.f & we) !== 0;
|
|
1526
|
+
fi(n, i ? t : !1), n = r;
|
|
1462
1527
|
}
|
|
1463
1528
|
var s = e.nodes && e.nodes.t;
|
|
1464
1529
|
if (s !== null)
|
|
@@ -1466,246 +1531,249 @@ function vr(e, t) {
|
|
|
1466
1531
|
(o.is_global || t) && o.in();
|
|
1467
1532
|
}
|
|
1468
1533
|
}
|
|
1469
|
-
function
|
|
1534
|
+
function ci(e, t) {
|
|
1470
1535
|
if (e.nodes)
|
|
1471
1536
|
for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
|
|
1472
|
-
var i = n === r ? null : /* @__PURE__ */
|
|
1537
|
+
var i = n === r ? null : /* @__PURE__ */ ce(n);
|
|
1473
1538
|
t.append(n), n = i;
|
|
1474
1539
|
}
|
|
1475
1540
|
}
|
|
1476
|
-
let
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1541
|
+
let an = !1, Xe = !1;
|
|
1542
|
+
function hr(e) {
|
|
1543
|
+
Xe = e;
|
|
1479
1544
|
}
|
|
1480
|
-
let
|
|
1481
|
-
function
|
|
1482
|
-
|
|
1545
|
+
let y = null, pe = !1;
|
|
1546
|
+
function he(e) {
|
|
1547
|
+
y = e;
|
|
1483
1548
|
}
|
|
1484
|
-
let
|
|
1485
|
-
function
|
|
1486
|
-
|
|
1549
|
+
let T = null;
|
|
1550
|
+
function Se(e) {
|
|
1551
|
+
T = e;
|
|
1487
1552
|
}
|
|
1488
|
-
let
|
|
1489
|
-
function
|
|
1490
|
-
|
|
1553
|
+
let ue = null;
|
|
1554
|
+
function hi(e) {
|
|
1555
|
+
y !== null && (ue === null ? ue = [e] : ue.push(e));
|
|
1491
1556
|
}
|
|
1492
|
-
let
|
|
1493
|
-
function
|
|
1494
|
-
|
|
1557
|
+
let X = null, Z = 0, ie = null;
|
|
1558
|
+
function Fs(e) {
|
|
1559
|
+
ie = e;
|
|
1495
1560
|
}
|
|
1496
|
-
let
|
|
1497
|
-
function
|
|
1498
|
-
|
|
1561
|
+
let di = 1, rt = 0, ct = rt;
|
|
1562
|
+
function dr(e) {
|
|
1563
|
+
ct = e;
|
|
1499
1564
|
}
|
|
1500
|
-
function
|
|
1501
|
-
return ++
|
|
1565
|
+
function vi() {
|
|
1566
|
+
return ++di;
|
|
1502
1567
|
}
|
|
1503
|
-
function
|
|
1568
|
+
function Xt(e) {
|
|
1504
1569
|
var t = e.f;
|
|
1505
|
-
if ((t &
|
|
1570
|
+
if ((t & B) !== 0)
|
|
1506
1571
|
return !0;
|
|
1507
|
-
if (t &
|
|
1572
|
+
if (t & F && (e.f &= ~ht), (t & me) !== 0) {
|
|
1508
1573
|
for (var n = (
|
|
1509
1574
|
/** @type {Value[]} */
|
|
1510
1575
|
e.deps
|
|
1511
1576
|
), r = n.length, i = 0; i < r; i++) {
|
|
1512
1577
|
var s = n[i];
|
|
1513
|
-
if (
|
|
1578
|
+
if (Xt(
|
|
1514
1579
|
/** @type {Derived} */
|
|
1515
1580
|
s
|
|
1516
|
-
) &&
|
|
1581
|
+
) && Kr(
|
|
1517
1582
|
/** @type {Derived} */
|
|
1518
1583
|
s
|
|
1519
1584
|
), s.wv > e.wv)
|
|
1520
1585
|
return !0;
|
|
1521
1586
|
}
|
|
1522
|
-
(t &
|
|
1587
|
+
(t & ae) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1523
1588
|
// traversal of the graph in the other batches still happens
|
|
1524
|
-
|
|
1589
|
+
ve === null && D(e, H);
|
|
1525
1590
|
}
|
|
1526
1591
|
return !1;
|
|
1527
1592
|
}
|
|
1528
|
-
function
|
|
1593
|
+
function _i(e, t, n = !0) {
|
|
1529
1594
|
var r = e.reactions;
|
|
1530
|
-
if (r !== null && !(
|
|
1595
|
+
if (r !== null && !(ue !== null && Rt.call(ue, e)))
|
|
1531
1596
|
for (var i = 0; i < r.length; i++) {
|
|
1532
1597
|
var s = r[i];
|
|
1533
|
-
(s.f &
|
|
1598
|
+
(s.f & F) !== 0 ? _i(
|
|
1534
1599
|
/** @type {Derived} */
|
|
1535
1600
|
s,
|
|
1536
1601
|
t,
|
|
1537
1602
|
!1
|
|
1538
|
-
) : t === s && (n ?
|
|
1603
|
+
) : t === s && (n ? D(s, B) : (s.f & H) !== 0 && D(s, me), ge(
|
|
1539
1604
|
/** @type {Effect} */
|
|
1540
1605
|
s
|
|
1541
1606
|
));
|
|
1542
1607
|
}
|
|
1543
1608
|
}
|
|
1544
|
-
function
|
|
1545
|
-
var
|
|
1546
|
-
var t =
|
|
1547
|
-
|
|
1548
|
-
null,
|
|
1549
|
-
e.ac.abort(
|
|
1609
|
+
function gi(e) {
|
|
1610
|
+
var m;
|
|
1611
|
+
var t = X, n = Z, r = ie, i = y, s = ue, o = fe, l = pe, u = ct, f = e.f;
|
|
1612
|
+
X = /** @type {null | Value[]} */
|
|
1613
|
+
null, Z = 0, ie = null, y = (f & (we | Je)) === 0 ? e : null, ue = null, Nt(e.ctx), pe = !1, ct = ++rt, e.ac !== null && (ii(() => {
|
|
1614
|
+
e.ac.abort(tt);
|
|
1550
1615
|
}), e.ac = null);
|
|
1551
1616
|
try {
|
|
1552
|
-
e.f |=
|
|
1617
|
+
e.f |= Rn;
|
|
1553
1618
|
var h = (
|
|
1554
1619
|
/** @type {Function} */
|
|
1555
1620
|
e.fn
|
|
1556
|
-
),
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1621
|
+
), v = h();
|
|
1622
|
+
e.f |= qt;
|
|
1623
|
+
var c = e.deps, p = S?.is_fork;
|
|
1624
|
+
if (X !== null) {
|
|
1625
|
+
var d;
|
|
1626
|
+
if (p || jt(e, Z), c !== null && Z > 0)
|
|
1627
|
+
for (c.length = Z + X.length, d = 0; d < X.length; d++)
|
|
1628
|
+
c[Z + d] = X[d];
|
|
1562
1629
|
else
|
|
1563
|
-
e.deps = c =
|
|
1564
|
-
if (
|
|
1565
|
-
for (
|
|
1566
|
-
((
|
|
1567
|
-
} else !
|
|
1568
|
-
if (
|
|
1569
|
-
for (
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1630
|
+
e.deps = c = X;
|
|
1631
|
+
if (Xn() && (e.f & ae) !== 0)
|
|
1632
|
+
for (d = Z; d < c.length; d++)
|
|
1633
|
+
((m = c[d]).reactions ?? (m.reactions = [])).push(e);
|
|
1634
|
+
} else !p && c !== null && Z < c.length && (jt(e, Z), c.length = Z);
|
|
1635
|
+
if (qr() && ie !== null && !pe && c !== null && (e.f & (F | me | B)) === 0)
|
|
1636
|
+
for (d = 0; d < /** @type {Source[]} */
|
|
1637
|
+
ie.length; d++)
|
|
1638
|
+
_i(
|
|
1639
|
+
ie[d],
|
|
1573
1640
|
/** @type {Effect} */
|
|
1574
1641
|
e
|
|
1575
1642
|
);
|
|
1576
1643
|
if (i !== null && i !== e) {
|
|
1577
|
-
if (
|
|
1578
|
-
for (let
|
|
1579
|
-
i.deps[
|
|
1644
|
+
if (rt++, i.deps !== null)
|
|
1645
|
+
for (let $ = 0; $ < n; $ += 1)
|
|
1646
|
+
i.deps[$].rv = rt;
|
|
1580
1647
|
if (t !== null)
|
|
1581
|
-
for (const
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1648
|
+
for (const $ of t)
|
|
1649
|
+
$.rv = rt;
|
|
1650
|
+
ie !== null && (r === null ? r = ie : r.push(.../** @type {Source[]} */
|
|
1651
|
+
ie));
|
|
1585
1652
|
}
|
|
1586
|
-
return (e.f &
|
|
1587
|
-
} catch (
|
|
1588
|
-
return
|
|
1653
|
+
return (e.f & Ke) !== 0 && (e.f ^= Ke), v;
|
|
1654
|
+
} catch ($) {
|
|
1655
|
+
return Pr($);
|
|
1589
1656
|
} finally {
|
|
1590
|
-
e.f ^=
|
|
1657
|
+
e.f ^= Rn, X = t, Z = n, ie = r, y = i, ue = s, Nt(o), pe = l, ct = u;
|
|
1591
1658
|
}
|
|
1592
1659
|
}
|
|
1593
|
-
function
|
|
1660
|
+
function Bs(e, t) {
|
|
1594
1661
|
let n = t.reactions;
|
|
1595
1662
|
if (n !== null) {
|
|
1596
|
-
var r =
|
|
1663
|
+
var r = zi.call(n, e);
|
|
1597
1664
|
if (r !== -1) {
|
|
1598
1665
|
var i = n.length - 1;
|
|
1599
1666
|
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
1600
1667
|
}
|
|
1601
1668
|
}
|
|
1602
|
-
if (n === null && (t.f &
|
|
1669
|
+
if (n === null && (t.f & F) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1603
1670
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1604
1671
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1605
|
-
(
|
|
1672
|
+
(X === null || !Rt.call(X, t))) {
|
|
1606
1673
|
var s = (
|
|
1607
1674
|
/** @type {Derived} */
|
|
1608
1675
|
t
|
|
1609
1676
|
);
|
|
1610
|
-
(s.f &
|
|
1677
|
+
(s.f & ae) !== 0 && (s.f ^= ae, s.f &= ~ht), Un(s), ks(s), jt(s, 0);
|
|
1611
1678
|
}
|
|
1612
1679
|
}
|
|
1613
|
-
function
|
|
1680
|
+
function jt(e, t) {
|
|
1614
1681
|
var n = e.deps;
|
|
1615
1682
|
if (n !== null)
|
|
1616
1683
|
for (var r = t; r < n.length; r++)
|
|
1617
|
-
|
|
1684
|
+
Bs(e, n[r]);
|
|
1618
1685
|
}
|
|
1619
|
-
function
|
|
1686
|
+
function Mt(e) {
|
|
1620
1687
|
var t = e.f;
|
|
1621
|
-
if ((t &
|
|
1622
|
-
|
|
1623
|
-
var n =
|
|
1624
|
-
|
|
1688
|
+
if ((t & Ie) === 0) {
|
|
1689
|
+
D(e, H);
|
|
1690
|
+
var n = T, r = an;
|
|
1691
|
+
T = e, an = !0;
|
|
1625
1692
|
try {
|
|
1626
|
-
(t & (
|
|
1627
|
-
var i =
|
|
1628
|
-
e.teardown = typeof i == "function" ? i : null, e.wv =
|
|
1693
|
+
(t & (He | kr)) !== 0 ? Hs(e) : Jn(e), li(e);
|
|
1694
|
+
var i = gi(e);
|
|
1695
|
+
e.teardown = typeof i == "function" ? i : null, e.wv = di;
|
|
1629
1696
|
var s;
|
|
1630
|
-
|
|
1697
|
+
kn && _s && (e.f & B) !== 0 && e.deps;
|
|
1631
1698
|
} finally {
|
|
1632
|
-
|
|
1699
|
+
an = r, T = n;
|
|
1633
1700
|
}
|
|
1634
1701
|
}
|
|
1635
1702
|
}
|
|
1636
|
-
function
|
|
1637
|
-
var t = e.f, n = (t &
|
|
1638
|
-
if (
|
|
1639
|
-
var r =
|
|
1640
|
-
if (!r && (
|
|
1641
|
-
var i =
|
|
1642
|
-
if ((
|
|
1643
|
-
e.rv <
|
|
1703
|
+
function g(e) {
|
|
1704
|
+
var t = e.f, n = (t & F) !== 0;
|
|
1705
|
+
if (y !== null && !pe) {
|
|
1706
|
+
var r = T !== null && (T.f & Ie) !== 0;
|
|
1707
|
+
if (!r && (ue === null || !Rt.call(ue, e))) {
|
|
1708
|
+
var i = y.deps;
|
|
1709
|
+
if ((y.f & Rn) !== 0)
|
|
1710
|
+
e.rv < rt && (e.rv = rt, X === null && i !== null && i[Z] === e ? Z++ : X === null ? X = [e] : X.push(e));
|
|
1644
1711
|
else {
|
|
1645
|
-
(
|
|
1712
|
+
(y.deps ?? (y.deps = [])).push(e);
|
|
1646
1713
|
var s = e.reactions;
|
|
1647
|
-
s === null ? e.reactions = [
|
|
1714
|
+
s === null ? e.reactions = [y] : Rt.call(s, y) || s.push(y);
|
|
1648
1715
|
}
|
|
1649
1716
|
}
|
|
1650
1717
|
}
|
|
1651
|
-
if (
|
|
1652
|
-
return
|
|
1718
|
+
if (Xe && We.has(e))
|
|
1719
|
+
return We.get(e);
|
|
1653
1720
|
if (n) {
|
|
1654
1721
|
var o = (
|
|
1655
1722
|
/** @type {Derived} */
|
|
1656
1723
|
e
|
|
1657
1724
|
);
|
|
1658
|
-
if (
|
|
1659
|
-
var
|
|
1660
|
-
return ((o.f &
|
|
1725
|
+
if (Xe) {
|
|
1726
|
+
var l = o.v;
|
|
1727
|
+
return ((o.f & H) === 0 && o.reactions !== null || mi(o)) && (l = Yn(o)), We.set(o, l), l;
|
|
1661
1728
|
}
|
|
1662
|
-
var
|
|
1663
|
-
|
|
1729
|
+
var u = (o.f & ae) === 0 && !pe && y !== null && (an || (y.f & ae) !== 0), f = (o.f & qt) === 0;
|
|
1730
|
+
Xt(o) && (u && (o.f |= ae), Kr(o)), u && !f && (Wr(o), pi(o));
|
|
1664
1731
|
}
|
|
1665
|
-
if (
|
|
1666
|
-
return
|
|
1667
|
-
if ((e.f &
|
|
1732
|
+
if (ve?.has(e))
|
|
1733
|
+
return ve.get(e);
|
|
1734
|
+
if ((e.f & Ke) !== 0)
|
|
1668
1735
|
throw e.v;
|
|
1669
1736
|
return e.v;
|
|
1670
1737
|
}
|
|
1671
|
-
function
|
|
1672
|
-
if (e.deps !== null)
|
|
1673
|
-
e.f |= H;
|
|
1738
|
+
function pi(e) {
|
|
1739
|
+
if (e.f |= ae, e.deps !== null)
|
|
1674
1740
|
for (const t of e.deps)
|
|
1675
|
-
(t.reactions ?? (t.reactions = [])).push(e), (t.f &
|
|
1741
|
+
(t.reactions ?? (t.reactions = [])).push(e), (t.f & F) !== 0 && (t.f & ae) === 0 && (Wr(
|
|
1676
1742
|
/** @type {Derived} */
|
|
1677
1743
|
t
|
|
1678
|
-
)
|
|
1679
|
-
|
|
1744
|
+
), pi(
|
|
1745
|
+
/** @type {Derived} */
|
|
1746
|
+
t
|
|
1747
|
+
));
|
|
1680
1748
|
}
|
|
1681
|
-
function
|
|
1682
|
-
if (e.v ===
|
|
1749
|
+
function mi(e) {
|
|
1750
|
+
if (e.v === V) return !0;
|
|
1683
1751
|
if (e.deps === null) return !1;
|
|
1684
1752
|
for (const t of e.deps)
|
|
1685
|
-
if (
|
|
1753
|
+
if (We.has(t) || (t.f & F) !== 0 && mi(
|
|
1686
1754
|
/** @type {Derived} */
|
|
1687
1755
|
t
|
|
1688
1756
|
))
|
|
1689
1757
|
return !0;
|
|
1690
1758
|
return !1;
|
|
1691
1759
|
}
|
|
1692
|
-
function
|
|
1693
|
-
var t =
|
|
1760
|
+
function Gs(e) {
|
|
1761
|
+
var t = pe;
|
|
1694
1762
|
try {
|
|
1695
|
-
return
|
|
1763
|
+
return pe = !0, e();
|
|
1696
1764
|
} finally {
|
|
1697
|
-
|
|
1765
|
+
pe = t;
|
|
1698
1766
|
}
|
|
1699
1767
|
}
|
|
1700
|
-
const
|
|
1701
|
-
function
|
|
1768
|
+
const bi = /* @__PURE__ */ new Set(), Hn = /* @__PURE__ */ new Set();
|
|
1769
|
+
function js(e) {
|
|
1702
1770
|
for (var t = 0; t < e.length; t++)
|
|
1703
|
-
|
|
1704
|
-
for (var n of
|
|
1771
|
+
bi.add(e[t]);
|
|
1772
|
+
for (var n of Hn)
|
|
1705
1773
|
n(e);
|
|
1706
1774
|
}
|
|
1707
|
-
let
|
|
1708
|
-
function
|
|
1775
|
+
let vr = null;
|
|
1776
|
+
function _r(e) {
|
|
1709
1777
|
var t = this, n = (
|
|
1710
1778
|
/** @type {Node} */
|
|
1711
1779
|
t.ownerDocument
|
|
@@ -1713,11 +1781,11 @@ function kt(e) {
|
|
|
1713
1781
|
/** @type {null | Element} */
|
|
1714
1782
|
i[0] || e.target
|
|
1715
1783
|
);
|
|
1716
|
-
|
|
1717
|
-
var o = 0,
|
|
1718
|
-
if (
|
|
1719
|
-
var
|
|
1720
|
-
if (
|
|
1784
|
+
vr = e;
|
|
1785
|
+
var o = 0, l = vr === e && e.__root;
|
|
1786
|
+
if (l) {
|
|
1787
|
+
var u = i.indexOf(l);
|
|
1788
|
+
if (u !== -1 && (t === document || t === /** @type {any} */
|
|
1721
1789
|
window)) {
|
|
1722
1790
|
e.__root = t;
|
|
1723
1791
|
return;
|
|
@@ -1725,86 +1793,104 @@ function kt(e) {
|
|
|
1725
1793
|
var f = i.indexOf(t);
|
|
1726
1794
|
if (f === -1)
|
|
1727
1795
|
return;
|
|
1728
|
-
|
|
1796
|
+
u <= f && (o = u);
|
|
1729
1797
|
}
|
|
1730
1798
|
if (s = /** @type {Element} */
|
|
1731
1799
|
i[o] || e.target, s !== t) {
|
|
1732
|
-
|
|
1800
|
+
hn(e, "currentTarget", {
|
|
1733
1801
|
configurable: !0,
|
|
1734
1802
|
get() {
|
|
1735
1803
|
return s || n;
|
|
1736
1804
|
}
|
|
1737
1805
|
});
|
|
1738
|
-
var h =
|
|
1739
|
-
|
|
1806
|
+
var h = y, v = T;
|
|
1807
|
+
he(null), Se(null);
|
|
1740
1808
|
try {
|
|
1741
|
-
for (var c,
|
|
1742
|
-
var
|
|
1809
|
+
for (var c, p = []; s !== null; ) {
|
|
1810
|
+
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1743
1811
|
s.host || null;
|
|
1744
1812
|
try {
|
|
1745
|
-
var
|
|
1746
|
-
|
|
1813
|
+
var m = s["__" + r];
|
|
1814
|
+
m != null && (!/** @type {any} */
|
|
1747
1815
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1748
1816
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1749
|
-
e.target === s) &&
|
|
1750
|
-
} catch (
|
|
1751
|
-
c ?
|
|
1817
|
+
e.target === s) && m.call(s, e);
|
|
1818
|
+
} catch ($) {
|
|
1819
|
+
c ? p.push($) : c = $;
|
|
1752
1820
|
}
|
|
1753
|
-
if (e.cancelBubble ||
|
|
1821
|
+
if (e.cancelBubble || d === t || d === null)
|
|
1754
1822
|
break;
|
|
1755
|
-
s =
|
|
1823
|
+
s = d;
|
|
1756
1824
|
}
|
|
1757
1825
|
if (c) {
|
|
1758
|
-
for (let
|
|
1826
|
+
for (let $ of p)
|
|
1759
1827
|
queueMicrotask(() => {
|
|
1760
|
-
throw
|
|
1828
|
+
throw $;
|
|
1761
1829
|
});
|
|
1762
1830
|
throw c;
|
|
1763
1831
|
}
|
|
1764
1832
|
} finally {
|
|
1765
|
-
e.__root = t, delete e.currentTarget,
|
|
1833
|
+
e.__root = t, delete e.currentTarget, he(h), Se(v);
|
|
1766
1834
|
}
|
|
1767
1835
|
}
|
|
1768
1836
|
}
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1837
|
+
const zs = /* @__PURE__ */ globalThis?.window?.trustedTypes?.createPolicy(
|
|
1838
|
+
"svelte-trusted-html",
|
|
1839
|
+
{
|
|
1840
|
+
/** @param {string} html */
|
|
1841
|
+
createHTML: (e) => e
|
|
1842
|
+
}
|
|
1843
|
+
);
|
|
1844
|
+
function Us(e) {
|
|
1845
|
+
return (
|
|
1846
|
+
/** @type {string} */
|
|
1847
|
+
zs?.createHTML(e) ?? e
|
|
1848
|
+
);
|
|
1849
|
+
}
|
|
1850
|
+
function Ys(e, t = !1) {
|
|
1851
|
+
var n = Kn("template");
|
|
1852
|
+
return e = e.replaceAll("<!>", "<!---->"), n.innerHTML = t ? Us(e) : e, n.content;
|
|
1772
1853
|
}
|
|
1773
|
-
function
|
|
1854
|
+
function un(e, t) {
|
|
1774
1855
|
var n = (
|
|
1775
1856
|
/** @type {Effect} */
|
|
1776
|
-
|
|
1857
|
+
T
|
|
1777
1858
|
);
|
|
1778
1859
|
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1779
1860
|
}
|
|
1780
1861
|
// @__NO_SIDE_EFFECTS__
|
|
1781
|
-
function
|
|
1782
|
-
var n = (t &
|
|
1862
|
+
function ye(e, t) {
|
|
1863
|
+
var n = (t & Gi) !== 0, r = (t & ji) !== 0, i, s = !e.startsWith("<!>");
|
|
1783
1864
|
return () => {
|
|
1784
|
-
if (
|
|
1785
|
-
return
|
|
1786
|
-
|
|
1787
|
-
/* @__PURE__ */
|
|
1788
|
-
var
|
|
1865
|
+
if (A)
|
|
1866
|
+
return un(x, null), x;
|
|
1867
|
+
i === void 0 && (i = Ys(s ? e : "<!>" + e, !0), n || (i = /** @type {TemplateNode} */
|
|
1868
|
+
/* @__PURE__ */ vt(i)));
|
|
1869
|
+
var o = (
|
|
1789
1870
|
/** @type {TemplateNode} */
|
|
1790
|
-
|
|
1871
|
+
r || Zr ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1791
1872
|
);
|
|
1792
|
-
|
|
1873
|
+
if (n) {
|
|
1874
|
+
var l = (
|
|
1875
|
+
/** @type {TemplateNode} */
|
|
1876
|
+
/* @__PURE__ */ vt(o)
|
|
1877
|
+
), u = (
|
|
1878
|
+
/** @type {TemplateNode} */
|
|
1879
|
+
o.lastChild
|
|
1880
|
+
);
|
|
1881
|
+
un(l, u);
|
|
1882
|
+
} else
|
|
1883
|
+
un(o, o);
|
|
1884
|
+
return o;
|
|
1793
1885
|
};
|
|
1794
1886
|
}
|
|
1795
|
-
function
|
|
1796
|
-
if (
|
|
1797
|
-
return pt($, null), $;
|
|
1798
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), n = ke();
|
|
1799
|
-
return e.append(t, n), pt(t, n), e;
|
|
1800
|
-
}
|
|
1801
|
-
function nn(e, t) {
|
|
1802
|
-
if (S) {
|
|
1887
|
+
function re(e, t) {
|
|
1888
|
+
if (A) {
|
|
1803
1889
|
var n = (
|
|
1804
1890
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1805
|
-
|
|
1891
|
+
T
|
|
1806
1892
|
);
|
|
1807
|
-
((n.f &
|
|
1893
|
+
((n.f & qt) === 0 || n.nodes.end === null) && (n.nodes.end = x), yn();
|
|
1808
1894
|
return;
|
|
1809
1895
|
}
|
|
1810
1896
|
e !== null && e.before(
|
|
@@ -1812,111 +1898,118 @@ function nn(e, t) {
|
|
|
1812
1898
|
t
|
|
1813
1899
|
);
|
|
1814
1900
|
}
|
|
1815
|
-
const
|
|
1816
|
-
function
|
|
1817
|
-
return
|
|
1901
|
+
const Ks = ["touchstart", "touchmove"];
|
|
1902
|
+
function Ws(e) {
|
|
1903
|
+
return Ks.includes(e);
|
|
1818
1904
|
}
|
|
1819
|
-
function
|
|
1820
|
-
|
|
1905
|
+
function gr(e, t) {
|
|
1906
|
+
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1907
|
+
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
|
|
1821
1908
|
}
|
|
1822
|
-
function
|
|
1823
|
-
|
|
1824
|
-
|
|
1909
|
+
function wi(e, t) {
|
|
1910
|
+
return yi(e, t);
|
|
1911
|
+
}
|
|
1912
|
+
function Xs(e, t) {
|
|
1913
|
+
Pn(), t.intro = t.intro ?? !1;
|
|
1914
|
+
const n = t.target, r = A, i = x;
|
|
1825
1915
|
try {
|
|
1826
|
-
for (var s = /* @__PURE__ */
|
|
1827
|
-
s.data !==
|
|
1828
|
-
s = /* @__PURE__ */
|
|
1916
|
+
for (var s = /* @__PURE__ */ vt(n); s && (s.nodeType !== gt || /** @type {Comment} */
|
|
1917
|
+
s.data !== Bn); )
|
|
1918
|
+
s = /* @__PURE__ */ ce(s);
|
|
1829
1919
|
if (!s)
|
|
1830
|
-
throw
|
|
1831
|
-
|
|
1920
|
+
throw kt;
|
|
1921
|
+
_e(!0), z(
|
|
1832
1922
|
/** @type {Comment} */
|
|
1833
1923
|
s
|
|
1834
1924
|
);
|
|
1835
|
-
const o =
|
|
1836
|
-
return
|
|
1925
|
+
const o = yi(e, { ...t, anchor: s });
|
|
1926
|
+
return _e(!1), /** @type {Exports} */
|
|
1837
1927
|
o;
|
|
1838
1928
|
} catch (o) {
|
|
1839
1929
|
if (o instanceof Error && o.message.split(`
|
|
1840
|
-
`).some((
|
|
1930
|
+
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1841
1931
|
throw o;
|
|
1842
|
-
return o !==
|
|
1932
|
+
return o !== kt && console.warn("Failed to hydrate: ", o), t.recover === !1 && ls(), Pn(), ni(n), _e(!1), wi(e, t);
|
|
1843
1933
|
} finally {
|
|
1844
|
-
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
const
|
|
1848
|
-
function
|
|
1849
|
-
|
|
1850
|
-
var
|
|
1851
|
-
for (var c = 0; c <
|
|
1852
|
-
var
|
|
1853
|
-
if (!
|
|
1854
|
-
|
|
1855
|
-
var
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1934
|
+
_e(r), z(i);
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
const sn = /* @__PURE__ */ new Map();
|
|
1938
|
+
function yi(e, { target: t, anchor: n, props: r = {}, events: i, context: s, intro: o = !0 }) {
|
|
1939
|
+
Pn();
|
|
1940
|
+
var l = /* @__PURE__ */ new Set(), u = (v) => {
|
|
1941
|
+
for (var c = 0; c < v.length; c++) {
|
|
1942
|
+
var p = v[c];
|
|
1943
|
+
if (!l.has(p)) {
|
|
1944
|
+
l.add(p);
|
|
1945
|
+
var d = Ws(p);
|
|
1946
|
+
for (const R of [t, document]) {
|
|
1947
|
+
var m = sn.get(R);
|
|
1948
|
+
m === void 0 && (m = /* @__PURE__ */ new Map(), sn.set(R, m));
|
|
1949
|
+
var $ = m.get(p);
|
|
1950
|
+
$ === void 0 ? (R.addEventListener(p, _r, { passive: d }), m.set(p, 1)) : m.set(p, $ + 1);
|
|
1951
|
+
}
|
|
1859
1952
|
}
|
|
1860
1953
|
}
|
|
1861
1954
|
};
|
|
1862
|
-
|
|
1863
|
-
var f = void 0, h =
|
|
1864
|
-
var
|
|
1865
|
-
return
|
|
1955
|
+
u(pn(bi)), Hn.add(u);
|
|
1956
|
+
var f = void 0, h = qs(() => {
|
|
1957
|
+
var v = n ?? t.appendChild(be());
|
|
1958
|
+
return ys(
|
|
1866
1959
|
/** @type {TemplateNode} */
|
|
1867
|
-
|
|
1960
|
+
v,
|
|
1868
1961
|
{
|
|
1869
1962
|
pending: () => {
|
|
1870
1963
|
}
|
|
1871
1964
|
},
|
|
1872
1965
|
(c) => {
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
v.c = s;
|
|
1880
|
-
}
|
|
1881
|
-
if (i && (r.$$events = i), S && pt(
|
|
1966
|
+
Dr({});
|
|
1967
|
+
var p = (
|
|
1968
|
+
/** @type {ComponentContext} */
|
|
1969
|
+
fe
|
|
1970
|
+
);
|
|
1971
|
+
if (s && (p.c = s), i && (r.$$events = i), A && un(
|
|
1882
1972
|
/** @type {TemplateNode} */
|
|
1883
1973
|
c,
|
|
1884
1974
|
null
|
|
1885
|
-
), f = e(c, r) || {},
|
|
1886
|
-
|
|
1887
|
-
throw
|
|
1888
|
-
|
|
1975
|
+
), f = e(c, r) || {}, A && (T.nodes.end = x, x === null || x.nodeType !== gt || /** @type {Comment} */
|
|
1976
|
+
x.data !== Gn))
|
|
1977
|
+
throw wn(), kt;
|
|
1978
|
+
Mr();
|
|
1889
1979
|
}
|
|
1890
1980
|
), () => {
|
|
1891
|
-
for (var c of
|
|
1892
|
-
t
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1981
|
+
for (var c of l)
|
|
1982
|
+
for (const m of [t, document]) {
|
|
1983
|
+
var p = (
|
|
1984
|
+
/** @type {Map<string, number>} */
|
|
1985
|
+
sn.get(m)
|
|
1986
|
+
), d = (
|
|
1987
|
+
/** @type {number} */
|
|
1988
|
+
p.get(c)
|
|
1989
|
+
);
|
|
1990
|
+
--d == 0 ? (m.removeEventListener(c, _r), p.delete(c), p.size === 0 && sn.delete(m)) : p.set(c, d);
|
|
1991
|
+
}
|
|
1992
|
+
Hn.delete(u), v !== n && v.parentNode?.removeChild(v);
|
|
1900
1993
|
};
|
|
1901
1994
|
});
|
|
1902
|
-
return
|
|
1995
|
+
return Vn.set(f, h), f;
|
|
1903
1996
|
}
|
|
1904
|
-
let
|
|
1905
|
-
function
|
|
1906
|
-
const n =
|
|
1907
|
-
return n ? (
|
|
1997
|
+
let Vn = /* @__PURE__ */ new WeakMap();
|
|
1998
|
+
function Js(e, t) {
|
|
1999
|
+
const n = Vn.get(e);
|
|
2000
|
+
return n ? (Vn.delete(e), n(t)) : Promise.resolve();
|
|
1908
2001
|
}
|
|
1909
|
-
var
|
|
1910
|
-
class
|
|
2002
|
+
var de, Ce, te, ut, Kt, Wt, _n;
|
|
2003
|
+
class Qs {
|
|
1911
2004
|
/**
|
|
1912
2005
|
* @param {TemplateNode} anchor
|
|
1913
2006
|
* @param {boolean} transition
|
|
1914
2007
|
*/
|
|
1915
2008
|
constructor(t, n = !0) {
|
|
1916
2009
|
/** @type {TemplateNode} */
|
|
1917
|
-
|
|
2010
|
+
O(this, "anchor");
|
|
1918
2011
|
/** @type {Map<Batch, Key>} */
|
|
1919
|
-
|
|
2012
|
+
w(this, de, /* @__PURE__ */ new Map());
|
|
1920
2013
|
/**
|
|
1921
2014
|
* Map of keys to effects that are currently rendered in the DOM.
|
|
1922
2015
|
* These effects are visible and actively part of the document tree.
|
|
@@ -1931,69 +2024,69 @@ class Ui {
|
|
|
1931
2024
|
* Can result in the entries `true->Effect` and `false->Effect`
|
|
1932
2025
|
* @type {Map<Key, Effect>}
|
|
1933
2026
|
*/
|
|
1934
|
-
|
|
2027
|
+
w(this, Ce, /* @__PURE__ */ new Map());
|
|
1935
2028
|
/**
|
|
1936
2029
|
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
1937
2030
|
* in the DOM, because their insertion is deferred.
|
|
1938
2031
|
* @type {Map<Key, Branch>}
|
|
1939
2032
|
*/
|
|
1940
|
-
|
|
2033
|
+
w(this, te, /* @__PURE__ */ new Map());
|
|
1941
2034
|
/**
|
|
1942
2035
|
* Keys of effects that are currently outroing
|
|
1943
2036
|
* @type {Set<Key>}
|
|
1944
2037
|
*/
|
|
1945
|
-
|
|
2038
|
+
w(this, ut, /* @__PURE__ */ new Set());
|
|
1946
2039
|
/**
|
|
1947
2040
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
1948
2041
|
* This is necessary for `<svelte:element>`
|
|
1949
2042
|
*/
|
|
1950
|
-
|
|
1951
|
-
|
|
2043
|
+
w(this, Kt, !0);
|
|
2044
|
+
w(this, Wt, () => {
|
|
1952
2045
|
var t = (
|
|
1953
2046
|
/** @type {Batch} */
|
|
1954
|
-
|
|
2047
|
+
S
|
|
1955
2048
|
);
|
|
1956
|
-
if (
|
|
2049
|
+
if (a(this, de).has(t)) {
|
|
1957
2050
|
var n = (
|
|
1958
2051
|
/** @type {Key} */
|
|
1959
|
-
|
|
1960
|
-
), r =
|
|
2052
|
+
a(this, de).get(t)
|
|
2053
|
+
), r = a(this, Ce).get(n);
|
|
1961
2054
|
if (r)
|
|
1962
|
-
|
|
2055
|
+
Qn(r), a(this, ut).delete(n);
|
|
1963
2056
|
else {
|
|
1964
|
-
var i =
|
|
1965
|
-
i && (
|
|
2057
|
+
var i = a(this, te).get(n);
|
|
2058
|
+
i && (a(this, Ce).set(n, i.effect), a(this, te).delete(n), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
|
|
1966
2059
|
}
|
|
1967
|
-
for (const [s, o] of
|
|
1968
|
-
if (
|
|
2060
|
+
for (const [s, o] of a(this, de)) {
|
|
2061
|
+
if (a(this, de).delete(s), s === t)
|
|
1969
2062
|
break;
|
|
1970
|
-
const
|
|
1971
|
-
|
|
2063
|
+
const l = a(this, te).get(o);
|
|
2064
|
+
l && (j(l.effect), a(this, te).delete(o));
|
|
1972
2065
|
}
|
|
1973
|
-
for (const [s, o] of
|
|
1974
|
-
if (s === n ||
|
|
1975
|
-
const
|
|
1976
|
-
if (Array.from(
|
|
2066
|
+
for (const [s, o] of a(this, Ce)) {
|
|
2067
|
+
if (s === n || a(this, ut).has(s)) continue;
|
|
2068
|
+
const l = () => {
|
|
2069
|
+
if (Array.from(a(this, de).values()).includes(s)) {
|
|
1977
2070
|
var f = document.createDocumentFragment();
|
|
1978
|
-
|
|
2071
|
+
ci(o, f), f.append(be()), a(this, te).set(s, { effect: o, fragment: f });
|
|
1979
2072
|
} else
|
|
1980
|
-
|
|
1981
|
-
|
|
2073
|
+
j(o);
|
|
2074
|
+
a(this, ut).delete(s), a(this, Ce).delete(s);
|
|
1982
2075
|
};
|
|
1983
|
-
|
|
2076
|
+
a(this, Kt) || !r ? (a(this, ut).add(s), ft(o, l, !1)) : l();
|
|
1984
2077
|
}
|
|
1985
2078
|
}
|
|
1986
2079
|
});
|
|
1987
2080
|
/**
|
|
1988
2081
|
* @param {Batch} batch
|
|
1989
2082
|
*/
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
const n = Array.from(
|
|
1993
|
-
for (const [r, i] of
|
|
1994
|
-
n.includes(r) || (
|
|
2083
|
+
w(this, _n, (t) => {
|
|
2084
|
+
a(this, de).delete(t);
|
|
2085
|
+
const n = Array.from(a(this, de).values());
|
|
2086
|
+
for (const [r, i] of a(this, te))
|
|
2087
|
+
n.includes(r) || (j(i.effect), a(this, te).delete(r));
|
|
1995
2088
|
});
|
|
1996
|
-
this.anchor = t,
|
|
2089
|
+
this.anchor = t, b(this, Kt, n);
|
|
1997
2090
|
}
|
|
1998
2091
|
/**
|
|
1999
2092
|
*
|
|
@@ -2003,108 +2096,363 @@ class Ui {
|
|
|
2003
2096
|
ensure(t, n) {
|
|
2004
2097
|
var r = (
|
|
2005
2098
|
/** @type {Batch} */
|
|
2006
|
-
|
|
2007
|
-
), i =
|
|
2008
|
-
if (n && !
|
|
2099
|
+
S
|
|
2100
|
+
), i = ri();
|
|
2101
|
+
if (n && !a(this, Ce).has(t) && !a(this, te).has(t))
|
|
2009
2102
|
if (i) {
|
|
2010
|
-
var s = document.createDocumentFragment(), o =
|
|
2011
|
-
s.append(o),
|
|
2012
|
-
effect:
|
|
2103
|
+
var s = document.createDocumentFragment(), o = be();
|
|
2104
|
+
s.append(o), a(this, te).set(t, {
|
|
2105
|
+
effect: le(() => n(o)),
|
|
2013
2106
|
fragment: s
|
|
2014
2107
|
});
|
|
2015
2108
|
} else
|
|
2016
|
-
|
|
2109
|
+
a(this, Ce).set(
|
|
2017
2110
|
t,
|
|
2018
|
-
|
|
2111
|
+
le(() => n(this.anchor))
|
|
2019
2112
|
);
|
|
2020
|
-
if (
|
|
2021
|
-
for (const [
|
|
2022
|
-
|
|
2023
|
-
for (const [
|
|
2024
|
-
|
|
2025
|
-
r.oncommit(
|
|
2113
|
+
if (a(this, de).set(r, t), i) {
|
|
2114
|
+
for (const [l, u] of a(this, Ce))
|
|
2115
|
+
l === t ? r.unskip_effect(u) : r.skip_effect(u);
|
|
2116
|
+
for (const [l, u] of a(this, te))
|
|
2117
|
+
l === t ? r.unskip_effect(u.effect) : r.skip_effect(u.effect);
|
|
2118
|
+
r.oncommit(a(this, Wt)), r.ondiscard(a(this, _n));
|
|
2026
2119
|
} else
|
|
2027
|
-
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
S && an();
|
|
2042
|
-
var r = new Ui(e), i = n ? ot : 0;
|
|
2043
|
-
function s(o, u) {
|
|
2044
|
-
if (S) {
|
|
2045
|
-
const f = ti(e) === sn;
|
|
2046
|
-
if (o === f) {
|
|
2047
|
-
var a = In();
|
|
2048
|
-
ie(a), r.anchor = a, He(!1), r.ensure(o, u), He(!0);
|
|
2120
|
+
A && (this.anchor = x), a(this, Wt).call(this);
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
de = new WeakMap(), Ce = new WeakMap(), te = new WeakMap(), ut = new WeakMap(), Kt = new WeakMap(), Wt = new WeakMap(), _n = new WeakMap();
|
|
2124
|
+
function Ge(e, t, n = !1) {
|
|
2125
|
+
A && yn();
|
|
2126
|
+
var r = new Qs(e), i = n ? Lt : 0;
|
|
2127
|
+
function s(o, l) {
|
|
2128
|
+
if (A) {
|
|
2129
|
+
const h = Lr(e);
|
|
2130
|
+
var u;
|
|
2131
|
+
if (h === Bn ? u = 0 : h === gn ? u = !1 : u = parseInt(h.substring(1)), o !== u) {
|
|
2132
|
+
var f = dn();
|
|
2133
|
+
z(f), r.anchor = f, _e(!1), r.ensure(o, l), _e(!0);
|
|
2049
2134
|
return;
|
|
2050
2135
|
}
|
|
2051
2136
|
}
|
|
2052
|
-
r.ensure(o,
|
|
2137
|
+
r.ensure(o, l);
|
|
2053
2138
|
}
|
|
2054
|
-
|
|
2139
|
+
Tn(() => {
|
|
2055
2140
|
var o = !1;
|
|
2056
|
-
t((
|
|
2057
|
-
o = !0, s(
|
|
2141
|
+
t((l, u = 0) => {
|
|
2142
|
+
o = !0, s(u, l);
|
|
2058
2143
|
}), o || s(!1, null);
|
|
2059
2144
|
}, i);
|
|
2060
2145
|
}
|
|
2061
|
-
function
|
|
2146
|
+
function Zs(e, t) {
|
|
2147
|
+
return t;
|
|
2148
|
+
}
|
|
2149
|
+
function eo(e, t, n) {
|
|
2150
|
+
for (var r = [], i = t.length, s, o = t.length, l = 0; l < i; l++) {
|
|
2151
|
+
let v = t[l];
|
|
2152
|
+
ft(
|
|
2153
|
+
v,
|
|
2154
|
+
() => {
|
|
2155
|
+
if (s) {
|
|
2156
|
+
if (s.pending.delete(v), s.done.add(v), s.pending.size === 0) {
|
|
2157
|
+
var c = (
|
|
2158
|
+
/** @type {Set<EachOutroGroup>} */
|
|
2159
|
+
e.outrogroups
|
|
2160
|
+
);
|
|
2161
|
+
Fn(pn(s.done)), c.delete(s), c.size === 0 && (e.outrogroups = null);
|
|
2162
|
+
}
|
|
2163
|
+
} else
|
|
2164
|
+
o -= 1;
|
|
2165
|
+
},
|
|
2166
|
+
!1
|
|
2167
|
+
);
|
|
2168
|
+
}
|
|
2169
|
+
if (o === 0) {
|
|
2170
|
+
var u = r.length === 0 && n !== null;
|
|
2171
|
+
if (u) {
|
|
2172
|
+
var f = (
|
|
2173
|
+
/** @type {Element} */
|
|
2174
|
+
n
|
|
2175
|
+
), h = (
|
|
2176
|
+
/** @type {Element} */
|
|
2177
|
+
f.parentNode
|
|
2178
|
+
);
|
|
2179
|
+
ni(h), h.append(f), e.items.clear();
|
|
2180
|
+
}
|
|
2181
|
+
Fn(t, !u);
|
|
2182
|
+
} else
|
|
2183
|
+
s = {
|
|
2184
|
+
pending: new Set(t),
|
|
2185
|
+
done: /* @__PURE__ */ new Set()
|
|
2186
|
+
}, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(s);
|
|
2187
|
+
}
|
|
2188
|
+
function Fn(e, t = !0) {
|
|
2189
|
+
for (var n = 0; n < e.length; n++)
|
|
2190
|
+
j(e[n], t);
|
|
2191
|
+
}
|
|
2192
|
+
var pr;
|
|
2193
|
+
function to(e, t, n, r, i, s = null) {
|
|
2194
|
+
var o = e, l = /* @__PURE__ */ new Map();
|
|
2195
|
+
A && yn();
|
|
2196
|
+
var u = null, f = /* @__PURE__ */ xs(() => {
|
|
2197
|
+
var m = n();
|
|
2198
|
+
return xr(m) ? m : m == null ? [] : pn(m);
|
|
2199
|
+
}), h, v = !0;
|
|
2200
|
+
function c() {
|
|
2201
|
+
d.fallback = u, no(d, h, o, t, r), u !== null && (h.length === 0 ? (u.f & Ye) === 0 ? Qn(u) : (u.f ^= Ye, Vt(u, null, o)) : ft(u, () => {
|
|
2202
|
+
u = null;
|
|
2203
|
+
}));
|
|
2204
|
+
}
|
|
2205
|
+
var p = Tn(() => {
|
|
2206
|
+
h = /** @type {V[]} */
|
|
2207
|
+
g(f);
|
|
2208
|
+
var m = h.length;
|
|
2209
|
+
let $ = !1;
|
|
2210
|
+
if (A) {
|
|
2211
|
+
var R = Lr(o) === gn;
|
|
2212
|
+
R !== (m === 0) && (o = dn(), z(o), _e(!1), $ = !0);
|
|
2213
|
+
}
|
|
2214
|
+
for (var I = /* @__PURE__ */ new Set(), $e = (
|
|
2215
|
+
/** @type {Batch} */
|
|
2216
|
+
S
|
|
2217
|
+
), Ve = ri(), J = 0; J < m; J += 1) {
|
|
2218
|
+
A && x.nodeType === gt && /** @type {Comment} */
|
|
2219
|
+
x.data === Gn && (o = /** @type {Comment} */
|
|
2220
|
+
x, $ = !0, _e(!1));
|
|
2221
|
+
var Fe = h[J], Be = r(Fe, J), L = v ? null : l.get(Be);
|
|
2222
|
+
L ? (L.v && Dt(L.v, Fe), L.i && Dt(L.i, J), Ve && $e.unskip_effect(L.e)) : (L = ro(
|
|
2223
|
+
l,
|
|
2224
|
+
v ? o : pr ?? (pr = be()),
|
|
2225
|
+
Fe,
|
|
2226
|
+
Be,
|
|
2227
|
+
J,
|
|
2228
|
+
i,
|
|
2229
|
+
t,
|
|
2230
|
+
n
|
|
2231
|
+
), v || (L.e.f |= Ye), l.set(Be, L)), I.add(Be);
|
|
2232
|
+
}
|
|
2233
|
+
if (m === 0 && s && !u && (v ? u = le(() => s(o)) : (u = le(() => s(pr ?? (pr = be()))), u.f |= Ye)), m > I.size && ns(), A && m > 0 && z(dn()), !v)
|
|
2234
|
+
if (Ve) {
|
|
2235
|
+
for (const [U, Jt] of l)
|
|
2236
|
+
I.has(U) || $e.skip_effect(Jt.e);
|
|
2237
|
+
$e.oncommit(c), $e.ondiscard(() => {
|
|
2238
|
+
});
|
|
2239
|
+
} else
|
|
2240
|
+
c();
|
|
2241
|
+
$ && _e(!0), g(f);
|
|
2242
|
+
}), d = { effect: p, items: l, outrogroups: null, fallback: u };
|
|
2243
|
+
v = !1, A && (o = x);
|
|
2244
|
+
}
|
|
2245
|
+
function Ht(e) {
|
|
2246
|
+
for (; e !== null && (e.f & we) === 0; )
|
|
2247
|
+
e = e.next;
|
|
2248
|
+
return e;
|
|
2249
|
+
}
|
|
2250
|
+
function no(e, t, n, r, i) {
|
|
2251
|
+
var s = t.length, o = e.items, l = Ht(e.effect.first), u, f = null, h = [], v = [], c, p, d, m;
|
|
2252
|
+
for (m = 0; m < s; m += 1) {
|
|
2253
|
+
if (c = t[m], p = i(c, m), d = /** @type {EachItem} */
|
|
2254
|
+
o.get(p).e, e.outrogroups !== null)
|
|
2255
|
+
for (const L of e.outrogroups)
|
|
2256
|
+
L.pending.delete(d), L.done.delete(d);
|
|
2257
|
+
if ((d.f & Ye) !== 0)
|
|
2258
|
+
if (d.f ^= Ye, d === l)
|
|
2259
|
+
Vt(d, null, n);
|
|
2260
|
+
else {
|
|
2261
|
+
var $ = f ? f.next : l;
|
|
2262
|
+
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), je(e, f, d), je(e, d, $), Vt(d, $, n), f = d, h = [], v = [], l = Ht(f.next);
|
|
2263
|
+
continue;
|
|
2264
|
+
}
|
|
2265
|
+
if ((d.f & ne) !== 0 && Qn(d), d !== l) {
|
|
2266
|
+
if (u !== void 0 && u.has(d)) {
|
|
2267
|
+
if (h.length < v.length) {
|
|
2268
|
+
var R = v[0], I;
|
|
2269
|
+
f = R.prev;
|
|
2270
|
+
var $e = h[0], Ve = h[h.length - 1];
|
|
2271
|
+
for (I = 0; I < h.length; I += 1)
|
|
2272
|
+
Vt(h[I], R, n);
|
|
2273
|
+
for (I = 0; I < v.length; I += 1)
|
|
2274
|
+
u.delete(v[I]);
|
|
2275
|
+
je(e, $e.prev, Ve.next), je(e, f, $e), je(e, Ve, R), l = R, f = Ve, m -= 1, h = [], v = [];
|
|
2276
|
+
} else
|
|
2277
|
+
u.delete(d), Vt(d, l, n), je(e, d.prev, d.next), je(e, d, f === null ? e.effect.first : f.next), je(e, f, d), f = d;
|
|
2278
|
+
continue;
|
|
2279
|
+
}
|
|
2280
|
+
for (h = [], v = []; l !== null && l !== d; )
|
|
2281
|
+
(u ?? (u = /* @__PURE__ */ new Set())).add(l), v.push(l), l = Ht(l.next);
|
|
2282
|
+
if (l === null)
|
|
2283
|
+
continue;
|
|
2284
|
+
}
|
|
2285
|
+
(d.f & Ye) === 0 && h.push(d), f = d, l = Ht(d.next);
|
|
2286
|
+
}
|
|
2287
|
+
if (e.outrogroups !== null) {
|
|
2288
|
+
for (const L of e.outrogroups)
|
|
2289
|
+
L.pending.size === 0 && (Fn(pn(L.done)), e.outrogroups?.delete(L));
|
|
2290
|
+
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
2291
|
+
}
|
|
2292
|
+
if (l !== null || u !== void 0) {
|
|
2293
|
+
var J = [];
|
|
2294
|
+
if (u !== void 0)
|
|
2295
|
+
for (d of u)
|
|
2296
|
+
(d.f & ne) === 0 && J.push(d);
|
|
2297
|
+
for (; l !== null; )
|
|
2298
|
+
(l.f & ne) === 0 && l !== e.fallback && J.push(l), l = Ht(l.next);
|
|
2299
|
+
var Fe = J.length;
|
|
2300
|
+
if (Fe > 0) {
|
|
2301
|
+
var Be = null;
|
|
2302
|
+
eo(e, J, Be);
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
function ro(e, t, n, r, i, s, o, l) {
|
|
2307
|
+
var u = (o & Vi) !== 0 ? (o & Bi) === 0 ? /* @__PURE__ */ Jr(n, !1, !1) : dt(n) : null, f = (o & Fi) !== 0 ? dt(i) : null;
|
|
2308
|
+
return {
|
|
2309
|
+
v: u,
|
|
2310
|
+
i: f,
|
|
2311
|
+
e: le(() => (s(t, u ?? n, f ?? i, l), () => {
|
|
2312
|
+
e.delete(r);
|
|
2313
|
+
}))
|
|
2314
|
+
};
|
|
2315
|
+
}
|
|
2316
|
+
function Vt(e, t, n) {
|
|
2317
|
+
if (e.nodes)
|
|
2318
|
+
for (var r = e.nodes.start, i = e.nodes.end, s = t && (t.f & Ye) === 0 ? (
|
|
2319
|
+
/** @type {EffectNodes} */
|
|
2320
|
+
t.nodes.start
|
|
2321
|
+
) : n; r !== null; ) {
|
|
2322
|
+
var o = (
|
|
2323
|
+
/** @type {TemplateNode} */
|
|
2324
|
+
/* @__PURE__ */ ce(r)
|
|
2325
|
+
);
|
|
2326
|
+
if (s.before(r), r === i)
|
|
2327
|
+
return;
|
|
2328
|
+
r = o;
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
function je(e, t, n) {
|
|
2332
|
+
t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
|
|
2333
|
+
}
|
|
2334
|
+
function io(e, t) {
|
|
2335
|
+
let n = null, r = A;
|
|
2336
|
+
var i;
|
|
2337
|
+
if (A) {
|
|
2338
|
+
n = x;
|
|
2339
|
+
for (var s = /* @__PURE__ */ vt(document.head); s !== null && (s.nodeType !== gt || /** @type {Comment} */
|
|
2340
|
+
s.data !== e); )
|
|
2341
|
+
s = /* @__PURE__ */ ce(s);
|
|
2342
|
+
if (s === null)
|
|
2343
|
+
_e(!1);
|
|
2344
|
+
else {
|
|
2345
|
+
var o = (
|
|
2346
|
+
/** @type {TemplateNode} */
|
|
2347
|
+
/* @__PURE__ */ ce(s)
|
|
2348
|
+
);
|
|
2349
|
+
s.remove(), z(o);
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
A || (i = document.head.appendChild(be()));
|
|
2353
|
+
try {
|
|
2354
|
+
Tn(() => t(i), jn);
|
|
2355
|
+
} finally {
|
|
2356
|
+
r && (_e(!0), z(
|
|
2357
|
+
/** @type {TemplateNode} */
|
|
2358
|
+
n
|
|
2359
|
+
));
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
function so(e, t) {
|
|
2363
|
+
Is(() => {
|
|
2364
|
+
var n = e.getRootNode(), r = (
|
|
2365
|
+
/** @type {ShadowRoot} */
|
|
2366
|
+
n.host ? (
|
|
2367
|
+
/** @type {ShadowRoot} */
|
|
2368
|
+
n
|
|
2369
|
+
) : (
|
|
2370
|
+
/** @type {Document} */
|
|
2371
|
+
n.head ?? /** @type {Document} */
|
|
2372
|
+
n.ownerDocument.head
|
|
2373
|
+
)
|
|
2374
|
+
);
|
|
2375
|
+
if (!r.querySelector("#" + t.hash)) {
|
|
2376
|
+
const i = Kn("style");
|
|
2377
|
+
i.id = t.hash, i.textContent = t.code, r.appendChild(i);
|
|
2378
|
+
}
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
function oo(e, t) {
|
|
2062
2382
|
return e == null ? null : String(e);
|
|
2063
2383
|
}
|
|
2064
|
-
function
|
|
2384
|
+
function mr(e, t, n, r) {
|
|
2065
2385
|
var i = e.__style;
|
|
2066
|
-
if (
|
|
2067
|
-
var s =
|
|
2068
|
-
(!
|
|
2386
|
+
if (A || i !== t) {
|
|
2387
|
+
var s = oo(t);
|
|
2388
|
+
(!A || s !== e.getAttribute("style")) && (s == null ? e.removeAttribute("style") : e.style.cssText = s), e.__style = t;
|
|
2069
2389
|
}
|
|
2070
2390
|
return r;
|
|
2071
2391
|
}
|
|
2072
|
-
|
|
2392
|
+
const lo = /* @__PURE__ */ Symbol("is custom element"), ao = /* @__PURE__ */ Symbol("is html"), uo = es ? "link" : "LINK";
|
|
2393
|
+
function br(e, t, n, r) {
|
|
2394
|
+
var i = fo(e);
|
|
2395
|
+
A && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === uo) || i[t] !== (i[t] = n) && (t === "loading" && (e[Zi] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && co(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
2396
|
+
}
|
|
2397
|
+
function fo(e) {
|
|
2398
|
+
return (
|
|
2399
|
+
/** @type {Record<string | symbol, unknown>} **/
|
|
2400
|
+
// @ts-expect-error
|
|
2401
|
+
e.__attributes ?? (e.__attributes = {
|
|
2402
|
+
[lo]: e.nodeName.includes("-"),
|
|
2403
|
+
[ao]: e.namespaceURI === Ar
|
|
2404
|
+
})
|
|
2405
|
+
);
|
|
2406
|
+
}
|
|
2407
|
+
var wr = /* @__PURE__ */ new Map();
|
|
2408
|
+
function co(e) {
|
|
2409
|
+
var t = e.getAttribute("is") || e.nodeName, n = wr.get(t);
|
|
2410
|
+
if (n) return n;
|
|
2411
|
+
wr.set(t, n = []);
|
|
2412
|
+
for (var r, i = e, s = Element.prototype; s !== i; ) {
|
|
2413
|
+
r = Ui(i);
|
|
2414
|
+
for (var o in r)
|
|
2415
|
+
r[o].set && n.push(o);
|
|
2416
|
+
i = Cr(i);
|
|
2417
|
+
}
|
|
2418
|
+
return n;
|
|
2419
|
+
}
|
|
2420
|
+
function mt(e, t, n, r) {
|
|
2073
2421
|
var i = (
|
|
2074
2422
|
/** @type {V} */
|
|
2075
2423
|
r
|
|
2076
2424
|
), s = !0, o = () => (s && (s = !1, i = /** @type {V} */
|
|
2077
|
-
r), i),
|
|
2078
|
-
|
|
2079
|
-
e[t],
|
|
2080
|
-
var
|
|
2081
|
-
|
|
2425
|
+
r), i), l;
|
|
2426
|
+
l = /** @type {V} */
|
|
2427
|
+
e[t], l === void 0 && r !== void 0 && (l = o());
|
|
2428
|
+
var u;
|
|
2429
|
+
u = () => {
|
|
2082
2430
|
var c = (
|
|
2083
2431
|
/** @type {V} */
|
|
2084
2432
|
e[t]
|
|
2085
2433
|
);
|
|
2086
2434
|
return c === void 0 ? o() : (s = !0, c);
|
|
2087
2435
|
};
|
|
2088
|
-
var f = !1, h = /* @__PURE__ */
|
|
2436
|
+
var f = !1, h = /* @__PURE__ */ En(() => (f = !1, u())), v = (
|
|
2089
2437
|
/** @type {Effect} */
|
|
2090
|
-
|
|
2438
|
+
T
|
|
2091
2439
|
);
|
|
2092
2440
|
return (
|
|
2093
2441
|
/** @type {() => V} */
|
|
2094
|
-
(function(c,
|
|
2442
|
+
(function(c, p) {
|
|
2095
2443
|
if (arguments.length > 0) {
|
|
2096
|
-
const
|
|
2097
|
-
return
|
|
2444
|
+
const d = p ? g(h) : c;
|
|
2445
|
+
return C(h, d), f = !0, i !== void 0 && (i = d), c;
|
|
2098
2446
|
}
|
|
2099
|
-
return
|
|
2447
|
+
return Xe && f || (v.f & Ie) !== 0 ? h.v : g(h);
|
|
2100
2448
|
})
|
|
2101
2449
|
);
|
|
2102
2450
|
}
|
|
2103
|
-
function
|
|
2104
|
-
return new
|
|
2451
|
+
function ho(e) {
|
|
2452
|
+
return new vo(e);
|
|
2105
2453
|
}
|
|
2106
|
-
var
|
|
2107
|
-
class
|
|
2454
|
+
var qe, oe;
|
|
2455
|
+
class vo {
|
|
2108
2456
|
/**
|
|
2109
2457
|
* @param {ComponentConstructorOptions & {
|
|
2110
2458
|
* component: any;
|
|
@@ -2112,56 +2460,56 @@ class Ji {
|
|
|
2112
2460
|
*/
|
|
2113
2461
|
constructor(t) {
|
|
2114
2462
|
/** @type {any} */
|
|
2115
|
-
|
|
2463
|
+
w(this, qe);
|
|
2116
2464
|
/** @type {Record<string, any>} */
|
|
2117
|
-
|
|
2465
|
+
w(this, oe);
|
|
2118
2466
|
var n = /* @__PURE__ */ new Map(), r = (s, o) => {
|
|
2119
|
-
var
|
|
2120
|
-
return n.set(s,
|
|
2467
|
+
var l = /* @__PURE__ */ Jr(o, !1, !1);
|
|
2468
|
+
return n.set(s, l), l;
|
|
2121
2469
|
};
|
|
2122
2470
|
const i = new Proxy(
|
|
2123
2471
|
{ ...t.props || {}, $$events: {} },
|
|
2124
2472
|
{
|
|
2125
2473
|
get(s, o) {
|
|
2126
|
-
return
|
|
2474
|
+
return g(n.get(o) ?? r(o, Reflect.get(s, o)));
|
|
2127
2475
|
},
|
|
2128
2476
|
has(s, o) {
|
|
2129
|
-
return o ===
|
|
2477
|
+
return o === Qi ? !0 : (g(n.get(o) ?? r(o, Reflect.get(s, o))), Reflect.has(s, o));
|
|
2130
2478
|
},
|
|
2131
|
-
set(s, o,
|
|
2132
|
-
return
|
|
2479
|
+
set(s, o, l) {
|
|
2480
|
+
return C(n.get(o) ?? r(o, l), l), Reflect.set(s, o, l);
|
|
2133
2481
|
}
|
|
2134
2482
|
}
|
|
2135
2483
|
);
|
|
2136
|
-
|
|
2484
|
+
b(this, oe, (t.hydrate ? Xs : wi)(t.component, {
|
|
2137
2485
|
target: t.target,
|
|
2138
2486
|
anchor: t.anchor,
|
|
2139
2487
|
props: i,
|
|
2140
2488
|
context: t.context,
|
|
2141
2489
|
intro: t.intro ?? !1,
|
|
2142
2490
|
recover: t.recover
|
|
2143
|
-
})), (!t?.props?.$$host || t.sync === !1) &&
|
|
2144
|
-
for (const s of Object.keys(
|
|
2145
|
-
s === "$set" || s === "$destroy" || s === "$on" ||
|
|
2491
|
+
})), (!t?.props?.$$host || t.sync === !1) && et(), b(this, qe, i.$$events);
|
|
2492
|
+
for (const s of Object.keys(a(this, oe)))
|
|
2493
|
+
s === "$set" || s === "$destroy" || s === "$on" || hn(this, s, {
|
|
2146
2494
|
get() {
|
|
2147
|
-
return
|
|
2495
|
+
return a(this, oe)[s];
|
|
2148
2496
|
},
|
|
2149
2497
|
/** @param {any} value */
|
|
2150
2498
|
set(o) {
|
|
2151
|
-
|
|
2499
|
+
a(this, oe)[s] = o;
|
|
2152
2500
|
},
|
|
2153
2501
|
enumerable: !0
|
|
2154
2502
|
});
|
|
2155
|
-
|
|
2503
|
+
a(this, oe).$set = /** @param {Record<string, any>} next */
|
|
2156
2504
|
(s) => {
|
|
2157
2505
|
Object.assign(i, s);
|
|
2158
|
-
},
|
|
2159
|
-
|
|
2506
|
+
}, a(this, oe).$destroy = () => {
|
|
2507
|
+
Js(a(this, oe));
|
|
2160
2508
|
};
|
|
2161
2509
|
}
|
|
2162
2510
|
/** @param {Record<string, any>} props */
|
|
2163
2511
|
$set(t) {
|
|
2164
|
-
|
|
2512
|
+
a(this, oe).$set(t);
|
|
2165
2513
|
}
|
|
2166
2514
|
/**
|
|
2167
2515
|
* @param {string} event
|
|
@@ -2169,22 +2517,22 @@ class Ji {
|
|
|
2169
2517
|
* @returns {any}
|
|
2170
2518
|
*/
|
|
2171
2519
|
$on(t, n) {
|
|
2172
|
-
|
|
2520
|
+
a(this, qe)[t] = a(this, qe)[t] || [];
|
|
2173
2521
|
const r = (...i) => n.call(this, ...i);
|
|
2174
|
-
return
|
|
2175
|
-
|
|
2522
|
+
return a(this, qe)[t].push(r), () => {
|
|
2523
|
+
a(this, qe)[t] = a(this, qe)[t].filter(
|
|
2176
2524
|
/** @param {any} fn */
|
|
2177
2525
|
(i) => i !== r
|
|
2178
2526
|
);
|
|
2179
2527
|
};
|
|
2180
2528
|
}
|
|
2181
2529
|
$destroy() {
|
|
2182
|
-
|
|
2530
|
+
a(this, oe).$destroy();
|
|
2183
2531
|
}
|
|
2184
2532
|
}
|
|
2185
|
-
|
|
2186
|
-
let
|
|
2187
|
-
typeof HTMLElement == "function" && (
|
|
2533
|
+
qe = new WeakMap(), oe = new WeakMap();
|
|
2534
|
+
let $i;
|
|
2535
|
+
typeof HTMLElement == "function" && ($i = class extends HTMLElement {
|
|
2188
2536
|
/**
|
|
2189
2537
|
* @param {*} $$componentCtor
|
|
2190
2538
|
* @param {*} $$slots
|
|
@@ -2193,27 +2541,27 @@ typeof HTMLElement == "function" && (kr = class extends HTMLElement {
|
|
|
2193
2541
|
constructor(t, n, r) {
|
|
2194
2542
|
super();
|
|
2195
2543
|
/** The Svelte component constructor */
|
|
2196
|
-
|
|
2544
|
+
O(this, "$$ctor");
|
|
2197
2545
|
/** Slots */
|
|
2198
|
-
|
|
2546
|
+
O(this, "$$s");
|
|
2199
2547
|
/** @type {any} The Svelte component instance */
|
|
2200
|
-
|
|
2548
|
+
O(this, "$$c");
|
|
2201
2549
|
/** Whether or not the custom element is connected */
|
|
2202
|
-
|
|
2550
|
+
O(this, "$$cn", !1);
|
|
2203
2551
|
/** @type {Record<string, any>} Component props data */
|
|
2204
|
-
|
|
2552
|
+
O(this, "$$d", {});
|
|
2205
2553
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
2206
|
-
|
|
2554
|
+
O(this, "$$r", !1);
|
|
2207
2555
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
2208
|
-
|
|
2556
|
+
O(this, "$$p_d", {});
|
|
2209
2557
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
2210
|
-
|
|
2558
|
+
O(this, "$$l", {});
|
|
2211
2559
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
2212
|
-
|
|
2560
|
+
O(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
2213
2561
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
2214
|
-
|
|
2562
|
+
O(this, "$$me");
|
|
2215
2563
|
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
2216
|
-
|
|
2564
|
+
O(this, "$$shadowRoot", null);
|
|
2217
2565
|
this.$$ctor = t, this.$$s = n, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
2218
2566
|
}
|
|
2219
2567
|
/**
|
|
@@ -2243,22 +2591,22 @@ typeof HTMLElement == "function" && (kr = class extends HTMLElement {
|
|
|
2243
2591
|
if (this.$$cn = !0, !this.$$c) {
|
|
2244
2592
|
let t = function(i) {
|
|
2245
2593
|
return (s) => {
|
|
2246
|
-
const o =
|
|
2247
|
-
i !== "default" && (o.name = i),
|
|
2594
|
+
const o = Kn("slot");
|
|
2595
|
+
i !== "default" && (o.name = i), re(s, o);
|
|
2248
2596
|
};
|
|
2249
2597
|
};
|
|
2250
2598
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2251
2599
|
return;
|
|
2252
|
-
const n = {}, r =
|
|
2600
|
+
const n = {}, r = _o(this);
|
|
2253
2601
|
for (const i of this.$$s)
|
|
2254
2602
|
i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = t(i), n.default = !0) : n[i] = t(i));
|
|
2255
2603
|
for (const i of this.attributes) {
|
|
2256
2604
|
const s = this.$$g_p(i.name);
|
|
2257
|
-
s in this.$$d || (this.$$d[s] =
|
|
2605
|
+
s in this.$$d || (this.$$d[s] = fn(s, i.value, this.$$p_d, "toProp"));
|
|
2258
2606
|
}
|
|
2259
2607
|
for (const i in this.$$p_d)
|
|
2260
2608
|
!(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
2261
|
-
this.$$c =
|
|
2609
|
+
this.$$c = ho({
|
|
2262
2610
|
component: this.$$ctor,
|
|
2263
2611
|
target: this.$$shadowRoot || this,
|
|
2264
2612
|
props: {
|
|
@@ -2266,13 +2614,13 @@ typeof HTMLElement == "function" && (kr = class extends HTMLElement {
|
|
|
2266
2614
|
$$slots: n,
|
|
2267
2615
|
$$host: this
|
|
2268
2616
|
}
|
|
2269
|
-
}), this.$$me =
|
|
2270
|
-
|
|
2617
|
+
}), this.$$me = Ms(() => {
|
|
2618
|
+
oi(() => {
|
|
2271
2619
|
this.$$r = !0;
|
|
2272
|
-
for (const i of
|
|
2620
|
+
for (const i of cn(this.$$c)) {
|
|
2273
2621
|
if (!this.$$p_d[i]?.reflect) continue;
|
|
2274
2622
|
this.$$d[i] = this.$$c[i];
|
|
2275
|
-
const s =
|
|
2623
|
+
const s = fn(
|
|
2276
2624
|
i,
|
|
2277
2625
|
this.$$d[i],
|
|
2278
2626
|
this.$$p_d,
|
|
@@ -2299,7 +2647,7 @@ typeof HTMLElement == "function" && (kr = class extends HTMLElement {
|
|
|
2299
2647
|
* @param {string} newValue
|
|
2300
2648
|
*/
|
|
2301
2649
|
attributeChangedCallback(t, n, r) {
|
|
2302
|
-
this.$$r || (t = this.$$g_p(t), this.$$d[t] =
|
|
2650
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = fn(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
2303
2651
|
}
|
|
2304
2652
|
disconnectedCallback() {
|
|
2305
2653
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2310,12 +2658,12 @@ typeof HTMLElement == "function" && (kr = class extends HTMLElement {
|
|
|
2310
2658
|
* @param {string} attribute_name
|
|
2311
2659
|
*/
|
|
2312
2660
|
$$g_p(t) {
|
|
2313
|
-
return
|
|
2661
|
+
return cn(this.$$p_d).find(
|
|
2314
2662
|
(n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
|
|
2315
2663
|
) || t;
|
|
2316
2664
|
}
|
|
2317
2665
|
});
|
|
2318
|
-
function
|
|
2666
|
+
function fn(e, t, n, r) {
|
|
2319
2667
|
const i = n[e]?.type;
|
|
2320
2668
|
if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
|
|
2321
2669
|
return t;
|
|
@@ -2345,7 +2693,7 @@ function Rt(e, t, n, r) {
|
|
|
2345
2693
|
return t;
|
|
2346
2694
|
}
|
|
2347
2695
|
}
|
|
2348
|
-
function
|
|
2696
|
+
function _o(e) {
|
|
2349
2697
|
const t = {};
|
|
2350
2698
|
return e.childNodes.forEach((n) => {
|
|
2351
2699
|
t[
|
|
@@ -2354,285 +2702,588 @@ function Xi(e) {
|
|
|
2354
2702
|
] = !0;
|
|
2355
2703
|
}), t;
|
|
2356
2704
|
}
|
|
2357
|
-
function
|
|
2358
|
-
let o = class extends
|
|
2705
|
+
function go(e, t, n, r, i, s) {
|
|
2706
|
+
let o = class extends $i {
|
|
2359
2707
|
constructor() {
|
|
2360
2708
|
super(e, n, i), this.$$p_d = t;
|
|
2361
2709
|
}
|
|
2362
2710
|
static get observedAttributes() {
|
|
2363
|
-
return
|
|
2364
|
-
(
|
|
2711
|
+
return cn(t).map(
|
|
2712
|
+
(l) => (t[l].attribute || l).toLowerCase()
|
|
2365
2713
|
);
|
|
2366
2714
|
}
|
|
2367
2715
|
};
|
|
2368
|
-
return
|
|
2369
|
-
|
|
2716
|
+
return cn(t).forEach((l) => {
|
|
2717
|
+
hn(o.prototype, l, {
|
|
2370
2718
|
get() {
|
|
2371
|
-
return this.$$c &&
|
|
2719
|
+
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2372
2720
|
},
|
|
2373
|
-
set(
|
|
2374
|
-
|
|
2721
|
+
set(u) {
|
|
2722
|
+
u = fn(l, u, t), this.$$d[l] = u;
|
|
2375
2723
|
var f = this.$$c;
|
|
2376
2724
|
if (f) {
|
|
2377
|
-
var h =
|
|
2378
|
-
h ? f[
|
|
2725
|
+
var h = wt(f, l)?.get;
|
|
2726
|
+
h ? f[l] = u : f.$set({ [l]: u });
|
|
2379
2727
|
}
|
|
2380
2728
|
}
|
|
2381
2729
|
});
|
|
2382
|
-
}), r.forEach((
|
|
2383
|
-
|
|
2730
|
+
}), r.forEach((l) => {
|
|
2731
|
+
hn(o.prototype, l, {
|
|
2384
2732
|
get() {
|
|
2385
|
-
return this.$$c?.[
|
|
2733
|
+
return this.$$c?.[l];
|
|
2386
2734
|
}
|
|
2387
2735
|
});
|
|
2388
2736
|
}), e.element = /** @type {any} */
|
|
2389
2737
|
o, o;
|
|
2390
2738
|
}
|
|
2391
|
-
var
|
|
2739
|
+
var yr;
|
|
2392
2740
|
(function(e) {
|
|
2393
2741
|
e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
|
|
2394
|
-
})(
|
|
2395
|
-
var
|
|
2742
|
+
})(yr || (yr = {}));
|
|
2743
|
+
var ze;
|
|
2396
2744
|
(function(e) {
|
|
2397
|
-
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange";
|
|
2398
|
-
})(
|
|
2399
|
-
const
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2745
|
+
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
|
|
2746
|
+
})(ze || (ze = {}));
|
|
2747
|
+
const po = {
|
|
2748
|
+
/**
|
|
2749
|
+
* Visual accessibility features
|
|
2750
|
+
* For students with low vision, color blindness, or visual processing needs
|
|
2751
|
+
*/
|
|
2752
|
+
visual: {
|
|
2753
|
+
// Magnification and zoom
|
|
2754
|
+
magnification: "magnification",
|
|
2755
|
+
screenMagnifier: "screenMagnifier",
|
|
2756
|
+
zoomable: "zoomable",
|
|
2757
|
+
// Color and contrast
|
|
2758
|
+
highContrastDisplay: "highContrastDisplay",
|
|
2759
|
+
highContrastAudio: "highContrastAudio",
|
|
2760
|
+
colorContrast: "colorContrast",
|
|
2761
|
+
invertColors: "invertColors",
|
|
2762
|
+
// Display customization
|
|
2763
|
+
displayTransformability: "displayTransformability",
|
|
2764
|
+
largePrint: "largePrint",
|
|
2765
|
+
fontEnlargement: "fontEnlargement",
|
|
2766
|
+
resizeText: "resizeText",
|
|
2767
|
+
// Visual alternatives
|
|
2768
|
+
alternativeText: "alternativeText",
|
|
2769
|
+
longDescription: "longDescription",
|
|
2770
|
+
describedMath: "describedMath",
|
|
2771
|
+
tactileGraphic: "tactileGraphic",
|
|
2772
|
+
tactileObject: "tactileObject"
|
|
2773
|
+
},
|
|
2774
|
+
/**
|
|
2775
|
+
* Auditory accessibility features
|
|
2776
|
+
* For students who are deaf, hard of hearing, or benefit from audio
|
|
2777
|
+
*/
|
|
2778
|
+
auditory: {
|
|
2779
|
+
// Audio output
|
|
2780
|
+
audioDescription: "audioDescription",
|
|
2781
|
+
textToSpeech: "textToSpeech",
|
|
2782
|
+
readAloud: "readAloud",
|
|
2783
|
+
humanVoice: "humanVoice",
|
|
2784
|
+
syntheticVoice: "syntheticVoice",
|
|
2785
|
+
// Speech control
|
|
2786
|
+
speechRate: "speechRate",
|
|
2787
|
+
speechVolume: "speechVolume",
|
|
2788
|
+
voicePitch: "voicePitch",
|
|
2789
|
+
// Visual alternatives for audio
|
|
2790
|
+
captions: "captions",
|
|
2791
|
+
closedCaptions: "closedCaptions",
|
|
2792
|
+
openCaptions: "openCaptions",
|
|
2793
|
+
transcript: "transcript",
|
|
2794
|
+
signLanguage: "signLanguage",
|
|
2795
|
+
subtitles: "subtitles",
|
|
2796
|
+
// Audio adjustments
|
|
2797
|
+
audioControl: "audioControl",
|
|
2798
|
+
noBackgroundAudio: "noBackgroundAudio"
|
|
2799
|
+
},
|
|
2800
|
+
/**
|
|
2801
|
+
* Motor/physical accessibility features
|
|
2802
|
+
* For students with limited mobility or motor control
|
|
2803
|
+
*/
|
|
2804
|
+
motor: {
|
|
2805
|
+
// Input alternatives
|
|
2806
|
+
keyboardControl: "keyboardControl",
|
|
2807
|
+
mouseControl: "mouseControl",
|
|
2808
|
+
touchControl: "touchControl",
|
|
2809
|
+
voiceControl: "voiceControl",
|
|
2810
|
+
switchControl: "switchControl",
|
|
2811
|
+
eyeGazeControl: "eyeGazeControl",
|
|
2812
|
+
// Keyboard features
|
|
2813
|
+
singleSwitchAccess: "singleSwitchAccess",
|
|
2814
|
+
stickyKeys: "stickyKeys",
|
|
2815
|
+
keyboardShortcuts: "keyboardShortcuts",
|
|
2816
|
+
// Timing
|
|
2817
|
+
timingControl: "timingControl",
|
|
2818
|
+
unlimitedTime: "unlimitedTime",
|
|
2819
|
+
extendedTime: "extendedTime",
|
|
2820
|
+
pauseControl: "pauseControl"
|
|
2821
|
+
},
|
|
2822
|
+
/**
|
|
2823
|
+
* Cognitive/learning accessibility features
|
|
2824
|
+
* For students with learning disabilities, ADHD, autism, etc.
|
|
2825
|
+
*/
|
|
2826
|
+
cognitive: {
|
|
2827
|
+
// Content simplification
|
|
2828
|
+
simplifiedLanguage: "simplifiedLanguage",
|
|
2829
|
+
reducedComplexity: "reducedComplexity",
|
|
2830
|
+
structuralNavigation: "structuralNavigation",
|
|
2831
|
+
tableOfContents: "tableOfContents",
|
|
2832
|
+
// Focus and attention
|
|
2833
|
+
reducedDistraction: "reducedDistraction",
|
|
2834
|
+
noFlashing: "noFlashing",
|
|
2835
|
+
pauseAnimation: "pauseAnimation",
|
|
2836
|
+
// Organization and support
|
|
2837
|
+
annotations: "annotations",
|
|
2838
|
+
bookmarking: "bookmarking",
|
|
2839
|
+
highlighting: "highlighting",
|
|
2840
|
+
guidedNavigation: "guidedNavigation",
|
|
2841
|
+
// Tools
|
|
2842
|
+
calculator: "calculator",
|
|
2843
|
+
dictionary: "dictionary",
|
|
2844
|
+
thesaurus: "thesaurus",
|
|
2845
|
+
spellingAssistance: "spellingAssistance",
|
|
2846
|
+
grammarAssistance: "grammarAssistance"
|
|
2847
|
+
},
|
|
2848
|
+
/**
|
|
2849
|
+
* Reading support features
|
|
2850
|
+
* For students with dyslexia or reading challenges
|
|
2851
|
+
*/
|
|
2852
|
+
reading: {
|
|
2853
|
+
// Text presentation
|
|
2854
|
+
lineSpacing: "lineSpacing",
|
|
2855
|
+
wordSpacing: "wordSpacing",
|
|
2856
|
+
letterSpacing: "letterSpacing",
|
|
2857
|
+
fontFamily: "fontFamily",
|
|
2858
|
+
readingMask: "readingMask",
|
|
2859
|
+
readingGuide: "readingGuide",
|
|
2860
|
+
readingRuler: "readingRuler",
|
|
2861
|
+
// Highlighting and emphasis
|
|
2862
|
+
wordHighlighting: "wordHighlighting",
|
|
2863
|
+
lineHighlighting: "lineHighlighting",
|
|
2864
|
+
focusIndicator: "focusIndicator",
|
|
2865
|
+
// Content support
|
|
2866
|
+
printableResource: "printableResource",
|
|
2867
|
+
braille: "braille",
|
|
2868
|
+
nemeth: "nemeth",
|
|
2869
|
+
refreshableBraille: "refreshableBraille"
|
|
2870
|
+
},
|
|
2871
|
+
/**
|
|
2872
|
+
* Navigation features
|
|
2873
|
+
* For efficient content navigation
|
|
2874
|
+
*/
|
|
2875
|
+
navigation: {
|
|
2876
|
+
// Structure
|
|
2877
|
+
index: "index",
|
|
2878
|
+
pageNavigation: "pageNavigation",
|
|
2879
|
+
skipContent: "skipContent",
|
|
2880
|
+
breadcrumbs: "breadcrumbs",
|
|
2881
|
+
// Search
|
|
2882
|
+
searchable: "searchable",
|
|
2883
|
+
fullTextSearch: "fullTextSearch"
|
|
2884
|
+
},
|
|
2885
|
+
/**
|
|
2886
|
+
* Linguistic features
|
|
2887
|
+
* For language support
|
|
2888
|
+
*/
|
|
2889
|
+
linguistic: {
|
|
2890
|
+
// Languages
|
|
2891
|
+
multilingualText: "multilingualText",
|
|
2892
|
+
translatedText: "translatedText",
|
|
2893
|
+
glossary: "glossary",
|
|
2894
|
+
// Sign language
|
|
2895
|
+
signLanguageInterpretation: "signLanguageInterpretation",
|
|
2896
|
+
visualLanguage: "visualLanguage"
|
|
2897
|
+
},
|
|
2898
|
+
/**
|
|
2899
|
+
* Assessment-specific features
|
|
2900
|
+
* Features specific to test-taking environments
|
|
2901
|
+
*/
|
|
2902
|
+
assessment: {
|
|
2903
|
+
// Tools
|
|
2904
|
+
protractor: "protractor",
|
|
2905
|
+
ruler: "ruler",
|
|
2906
|
+
graph: "graph",
|
|
2907
|
+
graphingCalculator: "graphingCalculator",
|
|
2908
|
+
periodicTable: "periodicTable",
|
|
2909
|
+
formulaSheet: "formulaSheet",
|
|
2910
|
+
// Answer support
|
|
2911
|
+
answerMasking: "answerMasking",
|
|
2912
|
+
answerEliminator: "answerEliminator",
|
|
2913
|
+
strikethrough: "strikethrough",
|
|
2914
|
+
// Item features
|
|
2915
|
+
itemGlossary: "itemGlossary",
|
|
2916
|
+
tutorialAvailable: "tutorialAvailable"
|
|
2917
|
+
}
|
|
2415
2918
|
};
|
|
2416
|
-
Object.
|
|
2417
|
-
var
|
|
2919
|
+
Object.values(po).flatMap((e) => Object.values(e));
|
|
2920
|
+
var $r;
|
|
2418
2921
|
(function(e) {
|
|
2419
2922
|
e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
2420
|
-
})(
|
|
2421
|
-
var
|
|
2923
|
+
})($r || ($r = {}));
|
|
2924
|
+
var Er;
|
|
2422
2925
|
(function(e) {
|
|
2423
2926
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
2424
|
-
})(
|
|
2425
|
-
class
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2927
|
+
})(Er || (Er = {}));
|
|
2928
|
+
var mo = /* @__PURE__ */ ye('<link rel="stylesheet" href="./highlights.css"/>'), bo = /* @__PURE__ */ ye('<button class="highlight-swatch svelte-g8qu62"><span class="sr-only svelte-g8qu62"> </span></button>'), wo = /* @__PURE__ */ ye('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="btn btn-sm btn-square svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), yo = /* @__PURE__ */ ye('<button class="btn btn-sm btn-square svelte-g8qu62" aria-label="Look up selected text in dictionary" title="Dictionary"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M18,22A2,2 0 0,0 20,20V4C20,2.89 19.1,2 18,2H12V9L9.5,7.5L7,9V2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18Z"></path></svg></button>'), $o = /* @__PURE__ */ ye('<button class="btn btn-sm btn-square svelte-g8qu62" aria-label="Look up selected text in picture dictionary" title="Picture Dictionary"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z"></path></svg></button>'), Eo = /* @__PURE__ */ ye('<button class="btn btn-sm btn-square svelte-g8qu62" aria-label="Translate selected text" title="Translation"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M12.87,15.07L10.33,12.56L10.36,12.53C12.1,10.59 13.34,8.36 14.07,6H17V4H10V2H8V4H1V6H12.17C11.5,7.92 10.44,9.75 9,11.35C8.07,10.32 7.3,9.19 6.69,8H4.69C5.42,9.63 6.42,11.17 7.67,12.56L2.58,17.58L4,19L9,14L12.11,17.11L12.87,15.07M18.5,10H16.5L12,22H14L15.12,19H19.87L21,22H23L18.5,10M15.88,17L17.5,12.67L19.12,17H15.88Z"></path></svg></button>'), To = /* @__PURE__ */ ye('<button class="btn btn-sm btn-ghost text-warning" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), Ao = /* @__PURE__ */ ye('<button class="btn btn-sm btn-ghost text-error" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), xo = /* @__PURE__ */ ye('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Co = /* @__PURE__ */ ye('<div class="annotation-toolbar notranslate fixed z-[4200] flex gap-1 bg-base-100 shadow-lg rounded-lg p-2 border border-base-300 svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="btn btn-sm btn-square svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!> <!> <!> <!></div>'), So = /* @__PURE__ */ ye('<!> <div role="status" aria-live="polite" aria-atomic="true" class="sr-only svelte-g8qu62"> </div>', 1);
|
|
2929
|
+
const ko = {
|
|
2930
|
+
hash: "svelte-g8qu62",
|
|
2931
|
+
code: `.annotation-toolbar.svelte-g8qu62 {user-select:none;}.highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid rgba(0, 0, 0, 0.2);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:rgba(0, 0, 0, 0.4);box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);}.highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid hsl(var(--p));outline-offset:2px;}.divider-horizontal.svelte-g8qu62 {height:auto;background-color:hsl(var(--bc) / 0.2);}
|
|
2932
|
+
|
|
2933
|
+
/* Screen reader only content */.sr-only.svelte-g8qu62 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;}
|
|
2934
|
+
|
|
2935
|
+
/* Button styling */.btn-square.svelte-g8qu62 {padding:0.5rem;}.btn-square.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
|
|
2936
|
+
};
|
|
2937
|
+
function Ro(e, t) {
|
|
2938
|
+
Dr(t, !0), so(e, ko);
|
|
2939
|
+
let n = mt(t, "enabled", 7, !0), r = mt(t, "highlightCoordinator", 7, null), i = mt(t, "ttsService", 7, null), s = mt(t, "ondictionarylookup"), o = mt(t, "ontranslationrequest"), l = mt(t, "onpicturedictionarylookup");
|
|
2940
|
+
const u = typeof window < "u", f = "pie-annotations", h = [
|
|
2941
|
+
{
|
|
2942
|
+
name: ze.YELLOW,
|
|
2943
|
+
hex: "#fde995",
|
|
2944
|
+
label: "Yellow highlight"
|
|
2945
|
+
},
|
|
2946
|
+
{
|
|
2947
|
+
name: ze.PINK,
|
|
2948
|
+
hex: "#ff9fae",
|
|
2949
|
+
label: "Pink highlight"
|
|
2950
|
+
},
|
|
2951
|
+
{
|
|
2952
|
+
name: ze.BLUE,
|
|
2953
|
+
hex: "#a7e0f6",
|
|
2954
|
+
label: "Blue highlight"
|
|
2955
|
+
},
|
|
2956
|
+
{
|
|
2957
|
+
name: ze.GREEN,
|
|
2958
|
+
hex: "#a6e1c5",
|
|
2959
|
+
label: "Green highlight"
|
|
2960
|
+
}
|
|
2961
|
+
], v = [
|
|
2962
|
+
"button",
|
|
2963
|
+
"input",
|
|
2964
|
+
"select",
|
|
2965
|
+
"textarea",
|
|
2966
|
+
'[contenteditable="true"]',
|
|
2967
|
+
".annotation-toolbar",
|
|
2968
|
+
".tool-toolbar",
|
|
2969
|
+
'[role="button"]',
|
|
2970
|
+
'[role="textbox"]'
|
|
2971
|
+
];
|
|
2972
|
+
let c = /* @__PURE__ */ W(bt({
|
|
2973
|
+
isVisible: !1,
|
|
2974
|
+
selectedText: "",
|
|
2975
|
+
selectedRange: null,
|
|
2976
|
+
toolbarPosition: { x: 0, y: 0 }
|
|
2977
|
+
})), p = /* @__PURE__ */ W(!1), d = /* @__PURE__ */ W(
|
|
2978
|
+
!1
|
|
2979
|
+
// Flag to prevent immediate hiding after showing
|
|
2980
|
+
), m = /* @__PURE__ */ W(
|
|
2981
|
+
""
|
|
2982
|
+
// For screen readers when toolbar is repositioned
|
|
2983
|
+
), $ = /* @__PURE__ */ W(0), R = /* @__PURE__ */ W(null), I = /* @__PURE__ */ fr(() => g($) > 0), $e = /* @__PURE__ */ fr(() => g(R) !== null);
|
|
2984
|
+
function Ve(_) {
|
|
2985
|
+
if (!r()) return null;
|
|
2986
|
+
const E = r().getAnnotations();
|
|
2987
|
+
for (const k of E) {
|
|
2988
|
+
const G = _.compareBoundaryPoints(Range.START_TO_START, k.range), Qe = _.compareBoundaryPoints(Range.END_TO_END, k.range), It = _.compareBoundaryPoints(Range.START_TO_END, k.range), pt = _.compareBoundaryPoints(Range.END_TO_START, k.range);
|
|
2989
|
+
if (G >= 0 && Qe <= 0 || // selection inside annotation
|
|
2990
|
+
G <= 0 && Qe >= 0 || // annotation inside selection
|
|
2991
|
+
It > 0 && pt < 0)
|
|
2992
|
+
return k.id;
|
|
2993
|
+
}
|
|
2994
|
+
return null;
|
|
2452
2995
|
}
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
}
|
|
2463
|
-
async speak(t) {
|
|
2464
|
-
return new Promise((n, r) => {
|
|
2465
|
-
if (!this.config) {
|
|
2466
|
-
r(new Error("TTS not initialized"));
|
|
2467
|
-
return;
|
|
2996
|
+
function J(_) {
|
|
2997
|
+
if (_.nodeType !== Node.ELEMENT_NODE && _.nodeType !== Node.TEXT_NODE)
|
|
2998
|
+
return !1;
|
|
2999
|
+
const E = _.nodeType === Node.TEXT_NODE ? _.parentElement : _;
|
|
3000
|
+
return E ? !v.some((k) => {
|
|
3001
|
+
try {
|
|
3002
|
+
return E.closest(k) !== null;
|
|
3003
|
+
} catch {
|
|
3004
|
+
return !1;
|
|
2468
3005
|
}
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
3006
|
+
}) : !1;
|
|
3007
|
+
}
|
|
3008
|
+
function Fe() {
|
|
3009
|
+
if (!(!u || !r()))
|
|
3010
|
+
try {
|
|
3011
|
+
const _ = document.body, E = r().exportAnnotations(_);
|
|
3012
|
+
sessionStorage.setItem(f, JSON.stringify(E));
|
|
3013
|
+
} catch (_) {
|
|
3014
|
+
console.error("[AnnotationToolbar] Failed to save annotations:", _);
|
|
2474
3015
|
}
|
|
2475
|
-
this.config.rate && (this.utterance.rate = this.config.rate), this.config.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
|
|
2476
|
-
this._isPlaying = !0, this._isPaused = !1;
|
|
2477
|
-
}, this.utterance.onend = () => {
|
|
2478
|
-
this._isPlaying = !1, this._isPaused = !1, n();
|
|
2479
|
-
}, this.utterance.onerror = (o) => {
|
|
2480
|
-
if (this._isPlaying = !1, this._isPaused = !1, o.error === "interrupted" || o.error === "canceled") {
|
|
2481
|
-
n();
|
|
2482
|
-
return;
|
|
2483
|
-
}
|
|
2484
|
-
r(new Error(`Speech synthesis error: ${o.error}`));
|
|
2485
|
-
}, this.utterance.onpause = () => {
|
|
2486
|
-
this._isPaused = !0;
|
|
2487
|
-
}, this.utterance.onresume = () => {
|
|
2488
|
-
this._isPaused = !1;
|
|
2489
|
-
}, this.utterance.onboundary = (o) => {
|
|
2490
|
-
if (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name === "word" && this.onWordBoundary) {
|
|
2491
|
-
if (s++, o.charIndex === i && s > 2) {
|
|
2492
|
-
console.warn("[BrowserProvider] Browser word boundaries broken - disabling word highlighting"), this.utterance && (this.utterance.onboundary = null);
|
|
2493
|
-
return;
|
|
2494
|
-
}
|
|
2495
|
-
i = o.charIndex;
|
|
2496
|
-
const u = t.substring(o.charIndex, o.charIndex + (o.charLength || 0));
|
|
2497
|
-
console.log("[BrowserProvider] Calling onWordBoundary with word:", u, "at position:", o.charIndex), this.onWordBoundary(u, o.charIndex);
|
|
2498
|
-
}
|
|
2499
|
-
}, speechSynthesis.speak(this.utterance);
|
|
2500
|
-
});
|
|
2501
3016
|
}
|
|
2502
|
-
|
|
2503
|
-
|
|
3017
|
+
function Be() {
|
|
3018
|
+
if (!(!u || !r()))
|
|
3019
|
+
try {
|
|
3020
|
+
const _ = sessionStorage.getItem(f);
|
|
3021
|
+
if (!_) return;
|
|
3022
|
+
const E = JSON.parse(_), k = document.body, G = r().importAnnotations(E, k);
|
|
3023
|
+
console.log(`[AnnotationToolbar] Restored ${G} annotations`), C($, r().getAnnotations().length, !0);
|
|
3024
|
+
} catch (_) {
|
|
3025
|
+
console.error("[AnnotationToolbar] Failed to load annotations:", _);
|
|
3026
|
+
}
|
|
2504
3027
|
}
|
|
2505
|
-
|
|
2506
|
-
|
|
3028
|
+
function L() {
|
|
3029
|
+
if (!n() || !u) return;
|
|
3030
|
+
const _ = window.getSelection();
|
|
3031
|
+
if (!_ || _.rangeCount === 0) return U();
|
|
3032
|
+
const E = _.getRangeAt(0), k = _.toString().trim();
|
|
3033
|
+
if (!k || !J(E.commonAncestorContainer))
|
|
3034
|
+
return U();
|
|
3035
|
+
const G = E.getBoundingClientRect(), Qe = G.left + G.width / 2, It = G.top - 8;
|
|
3036
|
+
C(R, Ve(E), !0), g(c).isVisible = !0, g(c).selectedText = k, g(c).selectedRange = E.cloneRange(), g(c).toolbarPosition = { x: Qe, y: It };
|
|
3037
|
+
const pt = k.length > 30 ? k.substring(0, 30) + "..." : k;
|
|
3038
|
+
C(m, `Annotation toolbar opened for "${pt}"`), setTimeout(
|
|
3039
|
+
() => {
|
|
3040
|
+
C(m, "");
|
|
3041
|
+
},
|
|
3042
|
+
2e3
|
|
3043
|
+
), C(d, !0), setTimeout(
|
|
3044
|
+
() => {
|
|
3045
|
+
C(d, !1);
|
|
3046
|
+
},
|
|
3047
|
+
100
|
|
3048
|
+
);
|
|
2507
3049
|
}
|
|
2508
|
-
|
|
2509
|
-
|
|
3050
|
+
function U() {
|
|
3051
|
+
g(p) && (i().stop(), C(p, !1)), g(c).isVisible = !1, g(c).selectedText = "", g(c).selectedRange = null;
|
|
2510
3052
|
}
|
|
2511
|
-
|
|
2512
|
-
|
|
3053
|
+
function Jt(_) {
|
|
3054
|
+
if (!g(c).selectedRange || !r()) return;
|
|
3055
|
+
const E = g(c).selectedText;
|
|
3056
|
+
r().addAnnotation(g(c).selectedRange, _), C($, r().getAnnotations().length, !0), Fe();
|
|
3057
|
+
const k = _ === ze.UNDERLINE ? "underlined" : `highlighted in ${_}`, G = E.length > 30 ? E.substring(0, 30) + "..." : E;
|
|
3058
|
+
C(m, `"${G}" ${k}`), setTimeout(
|
|
3059
|
+
() => {
|
|
3060
|
+
C(m, "");
|
|
3061
|
+
},
|
|
3062
|
+
3e3
|
|
3063
|
+
), U();
|
|
2513
3064
|
}
|
|
2514
|
-
|
|
2515
|
-
|
|
3065
|
+
function Ei() {
|
|
3066
|
+
if (!g(R) || !r()) {
|
|
3067
|
+
console.warn("[AnnotationToolbar] No overlapping annotation to remove");
|
|
3068
|
+
return;
|
|
3069
|
+
}
|
|
3070
|
+
console.log("[AnnotationToolbar] Removing annotation:", g(R));
|
|
3071
|
+
const _ = r().getAnnotation(g(R));
|
|
3072
|
+
if (!_) {
|
|
3073
|
+
console.warn("[AnnotationToolbar] Annotation not found:", g(R));
|
|
3074
|
+
return;
|
|
3075
|
+
}
|
|
3076
|
+
const E = _.range.toString();
|
|
3077
|
+
r().removeAnnotation(g(R));
|
|
3078
|
+
const k = r().getAnnotations().length;
|
|
3079
|
+
C($, k, !0), console.log("[AnnotationToolbar] Annotations remaining:", k), Fe();
|
|
3080
|
+
const G = E.length > 30 ? E.substring(0, 30) + "..." : E;
|
|
3081
|
+
C(m, `Removed annotation from "${G}"`), setTimeout(
|
|
3082
|
+
() => {
|
|
3083
|
+
C(m, "");
|
|
3084
|
+
},
|
|
3085
|
+
3e3
|
|
3086
|
+
), U();
|
|
2516
3087
|
}
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
3088
|
+
function Ti() {
|
|
3089
|
+
const _ = g($);
|
|
3090
|
+
r()?.clearAnnotations(), C($, 0), sessionStorage.removeItem(f), C(m, `${_} annotation${_ === 1 ? "" : "s"} cleared`), setTimeout(
|
|
3091
|
+
() => {
|
|
3092
|
+
C(m, "");
|
|
3093
|
+
},
|
|
3094
|
+
3e3
|
|
3095
|
+
), U();
|
|
2523
3096
|
}
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
function rs(e, t) {
|
|
2527
|
-
Fn(t, !0);
|
|
2528
|
-
let n = ft(t, "enabled", 7, !0), r = ft(t, "highlightCoordinator", 7, null), i = ft(t, "ttsService"), s = ft(t, "ondictionarylookup"), o = ft(t, "ontranslationrequest");
|
|
2529
|
-
const u = typeof window < "u";
|
|
2530
|
-
let a = /* @__PURE__ */ ue(We({ visible: !1, text: "", range: null, pos: { x: 0, y: 0 } }));
|
|
2531
|
-
async function f() {
|
|
2532
|
-
try {
|
|
2533
|
-
const E = new es();
|
|
2534
|
-
await i().initialize(E);
|
|
2535
|
-
} catch {
|
|
2536
|
-
}
|
|
3097
|
+
function Ai() {
|
|
3098
|
+
g(c).selectedText && (s()?.({ text: g(c).selectedText }), U());
|
|
2537
3099
|
}
|
|
2538
|
-
function
|
|
2539
|
-
|
|
3100
|
+
function xi() {
|
|
3101
|
+
g(c).selectedText && (o()?.({ text: g(c).selectedText }), U());
|
|
2540
3102
|
}
|
|
2541
|
-
function
|
|
2542
|
-
|
|
2543
|
-
const E = window.getSelection();
|
|
2544
|
-
if (!E || E.rangeCount === 0) return h();
|
|
2545
|
-
const Q = E.getRangeAt(0), Ee = E.toString().trim();
|
|
2546
|
-
if (!Ee) return h();
|
|
2547
|
-
const Ye = Q.getBoundingClientRect();
|
|
2548
|
-
m(a).visible = !0, m(a).text = Ee, m(a).range = Q.cloneRange(), m(a).pos = { x: Ye.left + Ye.width / 2, y: Ye.top - 8 };
|
|
3103
|
+
function Ci() {
|
|
3104
|
+
g(c).selectedText && (l()?.({ text: g(c).selectedText }), U());
|
|
2549
3105
|
}
|
|
2550
|
-
function
|
|
2551
|
-
!
|
|
3106
|
+
async function Si() {
|
|
3107
|
+
if (!(!g(c).selectedRange || !i())) {
|
|
3108
|
+
C(p, !0);
|
|
3109
|
+
try {
|
|
3110
|
+
console.log("[AnnotationToolbar] Speaking range:", g(c).selectedRange.toString().substring(0, 50)), await i().speakRange(g(c).selectedRange), console.log("[AnnotationToolbar] TTS completed successfully");
|
|
3111
|
+
} catch (_) {
|
|
3112
|
+
console.error("[AnnotationToolbar] TTS error:", _), alert(`TTS failed: ${_ instanceof Error ? _.message : String(_)}`);
|
|
3113
|
+
} finally {
|
|
3114
|
+
C(p, !1);
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
2552
3117
|
}
|
|
2553
|
-
function
|
|
2554
|
-
|
|
3118
|
+
function er(_) {
|
|
3119
|
+
_.key === "Escape" && g(c).isVisible && (_.preventDefault(), U());
|
|
2555
3120
|
}
|
|
2556
|
-
|
|
2557
|
-
|
|
3121
|
+
function Qt(_) {
|
|
3122
|
+
if (!g(c).isVisible || g(d)) return;
|
|
3123
|
+
const E = document.querySelector(".annotation-toolbar");
|
|
3124
|
+
E && !E.contains(_.target) && U();
|
|
2558
3125
|
}
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
3126
|
+
Ds(() => {
|
|
3127
|
+
if (!u) return;
|
|
3128
|
+
const _ = setTimeout(
|
|
3129
|
+
() => {
|
|
3130
|
+
Be();
|
|
3131
|
+
},
|
|
3132
|
+
2e3
|
|
3133
|
+
);
|
|
3134
|
+
return document.addEventListener("mouseup", L), document.addEventListener("click", Qt), document.addEventListener("touchend", L), document.addEventListener("touchstart", Qt), document.addEventListener("keydown", er), window.addEventListener("scroll", U, !0), () => {
|
|
3135
|
+
clearTimeout(_), document.removeEventListener("mouseup", L), document.removeEventListener("click", Qt), document.removeEventListener("touchend", L), document.removeEventListener("touchstart", Qt), document.removeEventListener("keydown", er), window.removeEventListener("scroll", U, !0);
|
|
2563
3136
|
};
|
|
2564
3137
|
});
|
|
2565
|
-
var
|
|
3138
|
+
var ki = {
|
|
2566
3139
|
get enabled() {
|
|
2567
3140
|
return n();
|
|
2568
3141
|
},
|
|
2569
|
-
set enabled(
|
|
2570
|
-
n(
|
|
3142
|
+
set enabled(_ = !0) {
|
|
3143
|
+
n(_), et();
|
|
2571
3144
|
},
|
|
2572
3145
|
get highlightCoordinator() {
|
|
2573
3146
|
return r();
|
|
2574
3147
|
},
|
|
2575
|
-
set highlightCoordinator(
|
|
2576
|
-
r(
|
|
3148
|
+
set highlightCoordinator(_ = null) {
|
|
3149
|
+
r(_), et();
|
|
2577
3150
|
},
|
|
2578
3151
|
get ttsService() {
|
|
2579
3152
|
return i();
|
|
2580
3153
|
},
|
|
2581
|
-
set ttsService(
|
|
2582
|
-
i(
|
|
3154
|
+
set ttsService(_ = null) {
|
|
3155
|
+
i(_), et();
|
|
2583
3156
|
},
|
|
2584
3157
|
get ondictionarylookup() {
|
|
2585
3158
|
return s();
|
|
2586
3159
|
},
|
|
2587
|
-
set ondictionarylookup(
|
|
2588
|
-
s(
|
|
3160
|
+
set ondictionarylookup(_) {
|
|
3161
|
+
s(_), et();
|
|
2589
3162
|
},
|
|
2590
3163
|
get ontranslationrequest() {
|
|
2591
3164
|
return o();
|
|
2592
3165
|
},
|
|
2593
|
-
set ontranslationrequest(
|
|
2594
|
-
o(
|
|
3166
|
+
set ontranslationrequest(_) {
|
|
3167
|
+
o(_), et();
|
|
3168
|
+
},
|
|
3169
|
+
get onpicturedictionarylookup() {
|
|
3170
|
+
return l();
|
|
3171
|
+
},
|
|
3172
|
+
set onpicturedictionarylookup(_) {
|
|
3173
|
+
l(_), et();
|
|
2595
3174
|
}
|
|
2596
|
-
},
|
|
3175
|
+
}, tr = So();
|
|
3176
|
+
io("g8qu62", (_) => {
|
|
3177
|
+
var E = mo();
|
|
3178
|
+
re(_, E);
|
|
3179
|
+
});
|
|
3180
|
+
var nr = Sn(tr);
|
|
2597
3181
|
{
|
|
2598
|
-
var
|
|
2599
|
-
var
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
3182
|
+
var Ri = (_) => {
|
|
3183
|
+
var E = Co(), k = nn(E);
|
|
3184
|
+
to(k, 17, () => h, Zs, (N, M) => {
|
|
3185
|
+
var Q = bo();
|
|
3186
|
+
Q.__click = () => Jt(g(M).name);
|
|
3187
|
+
var Zt = nn(Q), An = nn(Zt, !0);
|
|
3188
|
+
en(Zt), en(Q), rn(() => {
|
|
3189
|
+
mr(Q, `background-color: ${g(M).hex ?? ""};`), br(Q, "aria-label", g(M).label), br(Q, "title", g(M).label), gr(An, g(M).label);
|
|
3190
|
+
}), re(N, Q);
|
|
3191
|
+
});
|
|
3192
|
+
var G = Ee(k, 2);
|
|
3193
|
+
G.__click = () => Jt(ze.UNDERLINE);
|
|
3194
|
+
var Qe = Ee(G, 2);
|
|
3195
|
+
{
|
|
3196
|
+
var It = (N) => {
|
|
3197
|
+
var M = wo(), Q = Ee(Sn(M), 2);
|
|
3198
|
+
Q.__click = Si, rn(() => Q.disabled = g(p)), re(N, M);
|
|
3199
|
+
};
|
|
3200
|
+
Ge(Qe, (N) => {
|
|
3201
|
+
i() && N(It);
|
|
3202
|
+
});
|
|
3203
|
+
}
|
|
3204
|
+
var pt = Ee(Qe, 2);
|
|
3205
|
+
{
|
|
3206
|
+
var Ni = (N) => {
|
|
3207
|
+
var M = yo();
|
|
3208
|
+
M.__click = Ai, re(N, M);
|
|
3209
|
+
};
|
|
3210
|
+
Ge(pt, (N) => {
|
|
3211
|
+
s() && N(Ni);
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
var ir = Ee(pt, 2);
|
|
3215
|
+
{
|
|
3216
|
+
var Oi = (N) => {
|
|
3217
|
+
var M = $o();
|
|
3218
|
+
M.__click = Ci, re(N, M);
|
|
3219
|
+
};
|
|
3220
|
+
Ge(ir, (N) => {
|
|
3221
|
+
l() && N(Oi);
|
|
3222
|
+
});
|
|
3223
|
+
}
|
|
3224
|
+
var sr = Ee(ir, 2);
|
|
3225
|
+
{
|
|
3226
|
+
var Di = (N) => {
|
|
3227
|
+
var M = Eo();
|
|
3228
|
+
M.__click = xi, re(N, M);
|
|
3229
|
+
};
|
|
3230
|
+
Ge(sr, (N) => {
|
|
3231
|
+
o() && N(Di);
|
|
3232
|
+
});
|
|
3233
|
+
}
|
|
3234
|
+
var Mi = Ee(sr, 2);
|
|
3235
|
+
{
|
|
3236
|
+
var qi = (N) => {
|
|
3237
|
+
var M = xo(), Q = Ee(Sn(M), 2);
|
|
3238
|
+
{
|
|
3239
|
+
var Zt = (Ze) => {
|
|
3240
|
+
var Pt = To();
|
|
3241
|
+
Pt.__click = Ei, re(Ze, Pt);
|
|
3242
|
+
};
|
|
3243
|
+
Ge(Q, (Ze) => {
|
|
3244
|
+
g($e) && Ze(Zt);
|
|
3245
|
+
});
|
|
3246
|
+
}
|
|
3247
|
+
var An = Ee(Q, 2);
|
|
3248
|
+
{
|
|
3249
|
+
var Ii = (Ze) => {
|
|
3250
|
+
var Pt = Ao();
|
|
3251
|
+
Pt.__click = Ti, re(Ze, Pt);
|
|
3252
|
+
};
|
|
3253
|
+
Ge(An, (Ze) => {
|
|
3254
|
+
g(I) && Ze(Ii);
|
|
3255
|
+
});
|
|
3256
|
+
}
|
|
3257
|
+
re(N, M);
|
|
3258
|
+
};
|
|
3259
|
+
Ge(Mi, (N) => {
|
|
3260
|
+
(g($e) || g(I)) && N(qi);
|
|
3261
|
+
});
|
|
3262
|
+
}
|
|
3263
|
+
en(E), rn(() => mr(E, `left:${g(c).toolbarPosition.x}px; top:${g(c).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), re(_, E);
|
|
2615
3264
|
};
|
|
2616
|
-
|
|
2617
|
-
|
|
3265
|
+
Ge(nr, (_) => {
|
|
3266
|
+
g(c).isVisible && _(Ri);
|
|
2618
3267
|
});
|
|
2619
3268
|
}
|
|
2620
|
-
|
|
3269
|
+
var rr = Ee(nr, 2), Li = nn(rr, !0);
|
|
3270
|
+
return en(rr), rn(() => gr(Li, g(m))), re(e, tr), Mr(ki);
|
|
2621
3271
|
}
|
|
2622
|
-
|
|
2623
|
-
customElements.define("pie-tool-annotation-toolbar",
|
|
2624
|
-
|
|
3272
|
+
js(["click"]);
|
|
3273
|
+
customElements.define("pie-tool-annotation-toolbar", go(
|
|
3274
|
+
Ro,
|
|
2625
3275
|
{
|
|
2626
3276
|
enabled: { attribute: "enabled", type: "Boolean" },
|
|
2627
|
-
highlightCoordinator: {
|
|
2628
|
-
ttsService: {},
|
|
3277
|
+
highlightCoordinator: { type: "Object" },
|
|
3278
|
+
ttsService: { type: "Object" },
|
|
2629
3279
|
ondictionarylookup: {},
|
|
2630
|
-
ontranslationrequest: {}
|
|
3280
|
+
ontranslationrequest: {},
|
|
3281
|
+
onpicturedictionarylookup: {}
|
|
2631
3282
|
},
|
|
2632
3283
|
[],
|
|
2633
3284
|
[]
|
|
2634
3285
|
));
|
|
2635
3286
|
export {
|
|
2636
|
-
|
|
3287
|
+
Ro as default
|
|
2637
3288
|
};
|
|
2638
3289
|
//# sourceMappingURL=tool-annotation-toolbar.js.map
|