@pie-players/pie-tool-answer-eliminator 0.2.6 → 0.2.8
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/adapters/adapter-registry.ts +4 -4
- package/adapters/ebsr-adapter.ts +2 -2
- package/adapters/inline-dropdown-adapter.ts +1 -1
- package/adapters/multiple-choice-adapter.ts +1 -1
- package/answer-eliminator-core.ts +5 -5
- package/dist/adapters/adapter-registry.d.ts +1 -1
- package/dist/adapters/adapter-registry.d.ts.map +1 -1
- package/dist/adapters/ebsr-adapter.d.ts +1 -1
- package/dist/adapters/ebsr-adapter.d.ts.map +1 -1
- package/dist/adapters/inline-dropdown-adapter.d.ts +1 -1
- package/dist/adapters/inline-dropdown-adapter.d.ts.map +1 -1
- package/dist/adapters/multiple-choice-adapter.d.ts +1 -1
- package/dist/adapters/multiple-choice-adapter.d.ts.map +1 -1
- package/dist/answer-eliminator-core.d.ts +1 -1
- package/dist/answer-eliminator-core.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/strategies/mask-strategy.d.ts +1 -1
- package/dist/strategies/mask-strategy.d.ts.map +1 -1
- package/dist/strategies/strikethrough-strategy.d.ts +1 -1
- package/dist/strategies/strikethrough-strategy.d.ts.map +1 -1
- package/dist/tool-answer-eliminator.js +1131 -1121
- package/dist/tool-answer-eliminator.js.map +1 -1
- package/index.ts +1 -1
- package/package.json +3 -3
- package/strategies/mask-strategy.ts +1 -1
- package/strategies/strikethrough-strategy.ts +1 -1
- package/tool-answer-eliminator.svelte +1 -1
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var or = Object.defineProperty;
|
|
2
|
+
var Ut = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var lr = (t, e, n) => e in t ? or(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var g = (t, e, n) => lr(t, typeof e != "symbol" ? e + "" : e, n), At = (t, e, n) => e.has(t) || Ut("Cannot " + n);
|
|
7
|
+
var a = (t, e, n) => (At(t, e, "read from private field"), n ? n.call(t) : e.get(t)), b = (t, e, n) => e.has(t) ? Ut("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), v = (t, e, n, r) => (At(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), I = (t, e, n) => (At(t, e, "access private method"), n);
|
|
8
|
+
var ln;
|
|
9
|
+
typeof window < "u" && ((ln = window.__svelte ?? (window.__svelte = {})).v ?? (ln.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const an = "[", un = "[!", cn = "]", gt = {}, T = /* @__PURE__ */ Symbol(), ar = "http://www.w3.org/1999/xhtml", xt = !1;
|
|
11
|
+
var ur = Array.isArray, cr = Array.prototype.indexOf, Pe = Array.prototype.includes, fr = Array.from, pt = Object.keys, mt = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, hr = Object.prototype, dr = Array.prototype, gr = Object.getPrototypeOf, Kt = Object.isExtensible;
|
|
12
|
+
const pr = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function mr(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
var t, e, n = new Promise((
|
|
20
|
-
t =
|
|
18
|
+
function vr() {
|
|
19
|
+
var t, e, n = new Promise((r, i) => {
|
|
20
|
+
t = r, e = i;
|
|
21
21
|
});
|
|
22
22
|
return { promise: n, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const x = 2, vt = 4, fn = 8, hn = 1 << 24, de = 16, ge = 32, Ce = 64, Tt = 128, z = 512, R = 1024, N = 2048, W = 4096, ve = 8192, _e = 16384, ze = 32768, _t = 65536, Wt = 1 << 17, dn = 1 << 18, Ge = 1 << 19, _r = 1 << 20, Re = 65536, Rt = 1 << 21, gn = 1 << 22, Je = 1 << 23, kt = /* @__PURE__ */ Symbol("$state"), yr = /* @__PURE__ */ Symbol("legacy props"), jt = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
g(this, "name", "StaleReactionError");
|
|
28
|
+
g(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
31
|
-
function
|
|
30
|
+
}(), Pt = 8;
|
|
31
|
+
function br(t) {
|
|
32
32
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function wr(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Cr() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Sr(t) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Er() {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function $r() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Ar() {
|
|
50
50
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function kr() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function xr() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Tr() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function pn(t) {
|
|
62
62
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Rr() {
|
|
65
65
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
66
66
|
}
|
|
67
67
|
let te = !1;
|
|
68
|
-
function
|
|
68
|
+
function st(t) {
|
|
69
69
|
te = t;
|
|
70
70
|
}
|
|
71
|
-
let
|
|
72
|
-
function
|
|
71
|
+
let M;
|
|
72
|
+
function Xe(t) {
|
|
73
73
|
if (t === null)
|
|
74
|
-
throw
|
|
75
|
-
return
|
|
74
|
+
throw pn(), gt;
|
|
75
|
+
return M = t;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function mn() {
|
|
78
|
+
return Xe(/* @__PURE__ */ Ye(M));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Or(t = 1) {
|
|
81
81
|
if (te) {
|
|
82
|
-
for (var e = t, n =
|
|
82
|
+
for (var e = t, n = M; e--; )
|
|
83
83
|
n = /** @type {TemplateNode} */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
84
|
+
/* @__PURE__ */ Ye(n);
|
|
85
|
+
M = n;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
for (var e = 0, n =
|
|
90
|
-
if (n.nodeType ===
|
|
91
|
-
var
|
|
88
|
+
function Nr(t = !0) {
|
|
89
|
+
for (var e = 0, n = M; ; ) {
|
|
90
|
+
if (n.nodeType === Pt) {
|
|
91
|
+
var r = (
|
|
92
92
|
/** @type {Comment} */
|
|
93
93
|
n.data
|
|
94
94
|
);
|
|
95
|
-
if (
|
|
95
|
+
if (r === cn) {
|
|
96
96
|
if (e === 0) return n;
|
|
97
97
|
e -= 1;
|
|
98
|
-
} else (
|
|
99
|
-
|
|
98
|
+
} else (r === an || r === un || // "[1", "[2", etc. for if blocks
|
|
99
|
+
r[0] === "[" && !isNaN(Number(r.slice(1)))) && (e += 1);
|
|
100
100
|
}
|
|
101
|
-
var
|
|
101
|
+
var i = (
|
|
102
102
|
/** @type {TemplateNode} */
|
|
103
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ Ye(n)
|
|
104
104
|
);
|
|
105
|
-
t && n.remove(), n =
|
|
105
|
+
t && n.remove(), n = i;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function vn(t) {
|
|
109
109
|
return t === this.v;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Ir(t, e) {
|
|
112
112
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return !
|
|
114
|
+
function Lr(t) {
|
|
115
|
+
return !Ir(t, this.v);
|
|
116
116
|
}
|
|
117
|
-
let
|
|
118
|
-
function
|
|
119
|
-
|
|
117
|
+
let Fr = !1, Y = null;
|
|
118
|
+
function yt(t) {
|
|
119
|
+
Y = t;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
p:
|
|
121
|
+
function _n(t, e = !1, n) {
|
|
122
|
+
Y = {
|
|
123
|
+
p: Y,
|
|
124
124
|
i: !1,
|
|
125
125
|
c: null,
|
|
126
126
|
e: null,
|
|
@@ -129,52 +129,52 @@ function bn(t, e = !1, n) {
|
|
|
129
129
|
l: null
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function yn(t) {
|
|
133
133
|
var e = (
|
|
134
134
|
/** @type {ComponentContext} */
|
|
135
|
-
|
|
135
|
+
Y
|
|
136
136
|
), n = e.e;
|
|
137
137
|
if (n !== null) {
|
|
138
138
|
e.e = null;
|
|
139
|
-
for (var
|
|
140
|
-
|
|
139
|
+
for (var r of n)
|
|
140
|
+
Hn(r);
|
|
141
141
|
}
|
|
142
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
142
|
+
return t !== void 0 && (e.x = t), e.i = !0, Y = e.p, t ?? /** @type {T} */
|
|
143
143
|
{};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function bn() {
|
|
146
146
|
return !0;
|
|
147
147
|
}
|
|
148
|
-
let
|
|
149
|
-
function
|
|
150
|
-
var t =
|
|
151
|
-
|
|
148
|
+
let Se = [];
|
|
149
|
+
function wn() {
|
|
150
|
+
var t = Se;
|
|
151
|
+
Se = [], mr(t);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
if (
|
|
155
|
-
var e =
|
|
153
|
+
function Ie(t) {
|
|
154
|
+
if (Se.length === 0 && !We) {
|
|
155
|
+
var e = Se;
|
|
156
156
|
queueMicrotask(() => {
|
|
157
|
-
e ===
|
|
157
|
+
e === Se && wn();
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
Se.push(t);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
for (;
|
|
164
|
-
|
|
162
|
+
function Dr() {
|
|
163
|
+
for (; Se.length > 0; )
|
|
164
|
+
wn();
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Cn(t) {
|
|
167
167
|
var e = w;
|
|
168
168
|
if (e === null)
|
|
169
|
-
return _.f |=
|
|
170
|
-
if ((e.f &
|
|
169
|
+
return _.f |= Je, t;
|
|
170
|
+
if ((e.f & ze) === 0 && (e.f & vt) === 0)
|
|
171
171
|
throw t;
|
|
172
|
-
|
|
172
|
+
bt(t, e);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function bt(t, e) {
|
|
175
175
|
for (; e !== null; ) {
|
|
176
|
-
if ((e.f &
|
|
177
|
-
if ((e.f &
|
|
176
|
+
if ((e.f & Tt) !== 0) {
|
|
177
|
+
if ((e.f & ze) === 0)
|
|
178
178
|
throw t;
|
|
179
179
|
try {
|
|
180
180
|
e.b.error(t);
|
|
@@ -187,78 +187,78 @@ function Ct(t, e) {
|
|
|
187
187
|
}
|
|
188
188
|
throw t;
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
function
|
|
192
|
-
t.f = t.f &
|
|
190
|
+
const Br = -7169;
|
|
191
|
+
function E(t, e) {
|
|
192
|
+
t.f = t.f & Br | e;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
(t.f &
|
|
194
|
+
function Ht(t) {
|
|
195
|
+
(t.f & z) !== 0 || t.deps === null ? E(t, R) : E(t, W);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Sn(t) {
|
|
198
198
|
if (t !== null)
|
|
199
199
|
for (const e of t)
|
|
200
|
-
(e.f &
|
|
200
|
+
(e.f & x) === 0 || (e.f & Re) === 0 || (e.f ^= Re, Sn(
|
|
201
201
|
/** @type {Derived} */
|
|
202
202
|
e.deps
|
|
203
203
|
));
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
(t.f &
|
|
205
|
+
function En(t, e, n) {
|
|
206
|
+
(t.f & N) !== 0 ? e.add(t) : (t.f & W) !== 0 && n.add(t), Sn(t.deps), E(t, R);
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
let
|
|
210
|
-
var
|
|
211
|
-
const
|
|
208
|
+
const ot = /* @__PURE__ */ new Set();
|
|
209
|
+
let A = null, V = null, L = [], Ct = null, Ot = !1, We = !1;
|
|
210
|
+
var Le, Fe, $e, De, et, tt, Ae, le, Be, ie, Nt, It, $n;
|
|
211
|
+
const Vt = class Vt {
|
|
212
212
|
constructor() {
|
|
213
|
-
b(this,
|
|
214
|
-
|
|
213
|
+
b(this, ie);
|
|
214
|
+
g(this, "committed", !1);
|
|
215
215
|
/**
|
|
216
216
|
* The current values of any sources that are updated in this batch
|
|
217
217
|
* They keys of this map are identical to `this.#previous`
|
|
218
218
|
* @type {Map<Source, any>}
|
|
219
219
|
*/
|
|
220
|
-
|
|
220
|
+
g(this, "current", /* @__PURE__ */ new Map());
|
|
221
221
|
/**
|
|
222
222
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
223
223
|
* They keys of this map are identical to `this.#current`
|
|
224
224
|
* @type {Map<Source, any>}
|
|
225
225
|
*/
|
|
226
|
-
|
|
226
|
+
g(this, "previous", /* @__PURE__ */ new Map());
|
|
227
227
|
/**
|
|
228
228
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
229
229
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
230
230
|
* @type {Set<() => void>}
|
|
231
231
|
*/
|
|
232
|
-
b(this,
|
|
232
|
+
b(this, Le, /* @__PURE__ */ new Set());
|
|
233
233
|
/**
|
|
234
234
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
235
235
|
* @type {Set<(batch: Batch) => void>}
|
|
236
236
|
*/
|
|
237
|
-
b(this,
|
|
237
|
+
b(this, Fe, /* @__PURE__ */ new Set());
|
|
238
238
|
/**
|
|
239
239
|
* The number of async effects that are currently in flight
|
|
240
240
|
*/
|
|
241
|
-
b(this,
|
|
241
|
+
b(this, $e, 0);
|
|
242
242
|
/**
|
|
243
243
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
244
244
|
*/
|
|
245
|
-
b(this,
|
|
245
|
+
b(this, De, 0);
|
|
246
246
|
/**
|
|
247
247
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
248
248
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
249
249
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
250
250
|
*/
|
|
251
|
-
b(this,
|
|
251
|
+
b(this, et, null);
|
|
252
252
|
/**
|
|
253
253
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
254
254
|
* @type {Set<Effect>}
|
|
255
255
|
*/
|
|
256
|
-
b(this,
|
|
256
|
+
b(this, tt, /* @__PURE__ */ new Set());
|
|
257
257
|
/**
|
|
258
258
|
* Deferred effects that are MAYBE_DIRTY
|
|
259
259
|
* @type {Set<Effect>}
|
|
260
260
|
*/
|
|
261
|
-
b(this,
|
|
261
|
+
b(this, Ae, /* @__PURE__ */ new Set());
|
|
262
262
|
/**
|
|
263
263
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
264
264
|
* is committed — we skip over these during `process`.
|
|
@@ -266,19 +266,19 @@ const Ut = class Ut {
|
|
|
266
266
|
* so they can be rescheduled if the branch survives.
|
|
267
267
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
268
268
|
*/
|
|
269
|
-
b(this,
|
|
270
|
-
|
|
271
|
-
b(this,
|
|
269
|
+
b(this, le, /* @__PURE__ */ new Map());
|
|
270
|
+
g(this, "is_fork", !1);
|
|
271
|
+
b(this, Be, !1);
|
|
272
272
|
}
|
|
273
273
|
is_deferred() {
|
|
274
|
-
return this.is_fork ||
|
|
274
|
+
return this.is_fork || a(this, De) > 0;
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* Add an effect to the #skipped_branches map and reset its children
|
|
278
278
|
* @param {Effect} effect
|
|
279
279
|
*/
|
|
280
280
|
skip_effect(e) {
|
|
281
|
-
|
|
281
|
+
a(this, le).has(e) || a(this, le).set(e, { d: [], m: [] });
|
|
282
282
|
}
|
|
283
283
|
/**
|
|
284
284
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -286,13 +286,13 @@ const Ut = class Ut {
|
|
|
286
286
|
* @param {Effect} effect
|
|
287
287
|
*/
|
|
288
288
|
unskip_effect(e) {
|
|
289
|
-
var n =
|
|
289
|
+
var n = a(this, le).get(e);
|
|
290
290
|
if (n) {
|
|
291
|
-
|
|
292
|
-
for (var
|
|
293
|
-
|
|
294
|
-
for (
|
|
295
|
-
|
|
291
|
+
a(this, le).delete(e);
|
|
292
|
+
for (var r of n.d)
|
|
293
|
+
E(r, N), ne(r);
|
|
294
|
+
for (r of n.m)
|
|
295
|
+
E(r, W), ne(r);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
@@ -300,19 +300,19 @@ const Ut = class Ut {
|
|
|
300
300
|
* @param {Effect[]} root_effects
|
|
301
301
|
*/
|
|
302
302
|
process(e) {
|
|
303
|
-
|
|
304
|
-
var n = [],
|
|
305
|
-
for (const
|
|
306
|
-
|
|
303
|
+
L = [], this.apply();
|
|
304
|
+
var n = [], r = [];
|
|
305
|
+
for (const i of e)
|
|
306
|
+
I(this, ie, Nt).call(this, i, n, r);
|
|
307
307
|
if (this.is_deferred()) {
|
|
308
|
-
|
|
309
|
-
for (const [
|
|
310
|
-
|
|
308
|
+
I(this, ie, It).call(this, r), I(this, ie, It).call(this, n);
|
|
309
|
+
for (const [i, s] of a(this, le))
|
|
310
|
+
Tn(i, s);
|
|
311
311
|
} else {
|
|
312
|
-
for (const
|
|
313
|
-
|
|
312
|
+
for (const i of a(this, Le)) i();
|
|
313
|
+
a(this, Le).clear(), a(this, $e) === 0 && I(this, ie, $n).call(this), A = null, Qt(r), Qt(n), a(this, et)?.resolve();
|
|
314
314
|
}
|
|
315
|
-
|
|
315
|
+
V = null;
|
|
316
316
|
}
|
|
317
317
|
/**
|
|
318
318
|
* Associate a change to a given source with the current
|
|
@@ -321,106 +321,112 @@ const Ut = class Ut {
|
|
|
321
321
|
* @param {any} value
|
|
322
322
|
*/
|
|
323
323
|
capture(e, n) {
|
|
324
|
-
n !==
|
|
324
|
+
n !== T && !this.previous.has(e) && this.previous.set(e, n), (e.f & Je) === 0 && (this.current.set(e, e.v), V?.set(e, e.v));
|
|
325
325
|
}
|
|
326
326
|
activate() {
|
|
327
|
-
|
|
327
|
+
A = this, this.apply();
|
|
328
328
|
}
|
|
329
329
|
deactivate() {
|
|
330
|
-
|
|
330
|
+
A === this && (A = null, V = null);
|
|
331
331
|
}
|
|
332
332
|
flush() {
|
|
333
|
-
if (this.activate(),
|
|
334
|
-
if (
|
|
333
|
+
if (this.activate(), L.length > 0) {
|
|
334
|
+
if (An(), A !== null && A !== this)
|
|
335
335
|
return;
|
|
336
|
-
} else
|
|
336
|
+
} else a(this, $e) === 0 && this.process([]);
|
|
337
337
|
this.deactivate();
|
|
338
338
|
}
|
|
339
339
|
discard() {
|
|
340
|
-
for (const e of
|
|
341
|
-
|
|
340
|
+
for (const e of a(this, Fe)) e(this);
|
|
341
|
+
a(this, Fe).clear();
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
344
344
|
*
|
|
345
345
|
* @param {boolean} blocking
|
|
346
346
|
*/
|
|
347
347
|
increment(e) {
|
|
348
|
-
|
|
348
|
+
v(this, $e, a(this, $e) + 1), e && v(this, De, a(this, De) + 1);
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
351
|
*
|
|
352
352
|
* @param {boolean} blocking
|
|
353
353
|
*/
|
|
354
354
|
decrement(e) {
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
v(this, $e, a(this, $e) - 1), e && v(this, De, a(this, De) - 1), !a(this, Be) && (v(this, Be, !0), Ie(() => {
|
|
356
|
+
v(this, Be, !1), this.is_deferred() ? L.length > 0 && this.flush() : this.revive();
|
|
357
357
|
}));
|
|
358
358
|
}
|
|
359
359
|
revive() {
|
|
360
|
-
for (const e of
|
|
361
|
-
|
|
362
|
-
for (const e of
|
|
363
|
-
|
|
360
|
+
for (const e of a(this, tt))
|
|
361
|
+
a(this, Ae).delete(e), E(e, N), ne(e);
|
|
362
|
+
for (const e of a(this, Ae))
|
|
363
|
+
E(e, W), ne(e);
|
|
364
364
|
this.flush();
|
|
365
365
|
}
|
|
366
366
|
/** @param {() => void} fn */
|
|
367
367
|
oncommit(e) {
|
|
368
|
-
|
|
368
|
+
a(this, Le).add(e);
|
|
369
369
|
}
|
|
370
370
|
/** @param {(batch: Batch) => void} fn */
|
|
371
371
|
ondiscard(e) {
|
|
372
|
-
|
|
372
|
+
a(this, Fe).add(e);
|
|
373
373
|
}
|
|
374
374
|
settled() {
|
|
375
|
-
return (
|
|
375
|
+
return (a(this, et) ?? v(this, et, vr())).promise;
|
|
376
376
|
}
|
|
377
377
|
static ensure() {
|
|
378
|
-
if (
|
|
379
|
-
const e =
|
|
380
|
-
|
|
381
|
-
|
|
378
|
+
if (A === null) {
|
|
379
|
+
const e = A = new Vt();
|
|
380
|
+
ot.add(A), We || Ie(() => {
|
|
381
|
+
A === e && e.flush();
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
return
|
|
384
|
+
return A;
|
|
385
385
|
}
|
|
386
386
|
apply() {
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
|
-
|
|
389
|
+
Le = new WeakMap(), Fe = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Ae = new WeakMap(), le = new WeakMap(), Be = new WeakMap(), ie = new WeakSet(), /**
|
|
390
390
|
* Traverse the effect tree, executing effects or stashing
|
|
391
391
|
* them for later execution as appropriate
|
|
392
392
|
* @param {Effect} root
|
|
393
393
|
* @param {Effect[]} effects
|
|
394
394
|
* @param {Effect[]} render_effects
|
|
395
395
|
*/
|
|
396
|
-
|
|
397
|
-
e.f ^=
|
|
398
|
-
for (var
|
|
399
|
-
var o =
|
|
400
|
-
if (!c &&
|
|
401
|
-
|
|
402
|
-
var
|
|
403
|
-
if (
|
|
404
|
-
|
|
396
|
+
Nt = function(e, n, r) {
|
|
397
|
+
e.f ^= R;
|
|
398
|
+
for (var i = e.first, s = null; i !== null; ) {
|
|
399
|
+
var o = i.f, l = (o & (ge | Ce)) !== 0, u = l && (o & R) !== 0, c = u || (o & ve) !== 0 || a(this, le).has(i);
|
|
400
|
+
if (!c && i.fn !== null) {
|
|
401
|
+
l ? i.f ^= R : s !== null && (o & (vt | fn | hn)) !== 0 ? s.b.defer_effect(i) : (o & vt) !== 0 ? n.push(i) : rt(i) && ((o & de) !== 0 && a(this, Ae).add(i), He(i));
|
|
402
|
+
var f = i.first;
|
|
403
|
+
if (f !== null) {
|
|
404
|
+
i = f;
|
|
405
405
|
continue;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
408
|
+
for (; i !== null; ) {
|
|
409
|
+
i === s && (s = null);
|
|
410
|
+
var d = i.next;
|
|
411
|
+
if (d !== null) {
|
|
412
|
+
i = d;
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
i = i.parent;
|
|
416
|
+
}
|
|
411
417
|
}
|
|
412
418
|
}, /**
|
|
413
419
|
* @param {Effect[]} effects
|
|
414
420
|
*/
|
|
415
|
-
|
|
421
|
+
It = function(e) {
|
|
416
422
|
for (var n = 0; n < e.length; n += 1)
|
|
417
|
-
|
|
418
|
-
},
|
|
419
|
-
var
|
|
420
|
-
if (
|
|
423
|
+
En(e[n], a(this, tt), a(this, Ae));
|
|
424
|
+
}, $n = function() {
|
|
425
|
+
var i;
|
|
426
|
+
if (ot.size > 1) {
|
|
421
427
|
this.previous.clear();
|
|
422
|
-
var e =
|
|
423
|
-
for (const s of
|
|
428
|
+
var e = V, n = !0;
|
|
429
|
+
for (const s of ot) {
|
|
424
430
|
if (s === this) {
|
|
425
431
|
n = !1;
|
|
426
432
|
continue;
|
|
@@ -436,200 +442,197 @@ Ft = function(e) {
|
|
|
436
442
|
}
|
|
437
443
|
if (o.length === 0)
|
|
438
444
|
continue;
|
|
439
|
-
const
|
|
440
|
-
if (
|
|
441
|
-
var
|
|
442
|
-
|
|
445
|
+
const l = [...s.current.keys()].filter((u) => !this.current.has(u));
|
|
446
|
+
if (l.length > 0) {
|
|
447
|
+
var r = L;
|
|
448
|
+
L = [];
|
|
443
449
|
const u = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
|
|
444
|
-
for (const
|
|
445
|
-
|
|
446
|
-
if (
|
|
447
|
-
|
|
448
|
-
for (const
|
|
449
|
-
|
|
450
|
+
for (const f of o)
|
|
451
|
+
kn(f, l, u, c);
|
|
452
|
+
if (L.length > 0) {
|
|
453
|
+
A = s, s.apply();
|
|
454
|
+
for (const f of L)
|
|
455
|
+
I(i = s, ie, Nt).call(i, f, [], []);
|
|
450
456
|
s.deactivate();
|
|
451
457
|
}
|
|
452
|
-
|
|
458
|
+
L = r;
|
|
453
459
|
}
|
|
454
460
|
}
|
|
455
|
-
|
|
461
|
+
A = null, V = e;
|
|
456
462
|
}
|
|
457
|
-
this.committed = !0,
|
|
463
|
+
this.committed = !0, ot.delete(this);
|
|
458
464
|
};
|
|
459
|
-
let
|
|
465
|
+
let he = Vt;
|
|
460
466
|
function J(t) {
|
|
461
|
-
var e =
|
|
462
|
-
|
|
467
|
+
var e = We;
|
|
468
|
+
We = !0;
|
|
463
469
|
try {
|
|
464
470
|
for (var n; ; ) {
|
|
465
|
-
if (
|
|
466
|
-
return
|
|
471
|
+
if (Dr(), L.length === 0 && (A?.flush(), L.length === 0))
|
|
472
|
+
return Ct = null, /** @type {T} */
|
|
467
473
|
n;
|
|
468
|
-
|
|
474
|
+
An();
|
|
469
475
|
}
|
|
470
476
|
} finally {
|
|
471
|
-
|
|
477
|
+
We = e;
|
|
472
478
|
}
|
|
473
479
|
}
|
|
474
|
-
function
|
|
475
|
-
|
|
480
|
+
function An() {
|
|
481
|
+
Ot = !0;
|
|
476
482
|
var t = null;
|
|
477
483
|
try {
|
|
478
|
-
for (var e = 0;
|
|
479
|
-
var n =
|
|
484
|
+
for (var e = 0; L.length > 0; ) {
|
|
485
|
+
var n = he.ensure();
|
|
480
486
|
if (e++ > 1e3) {
|
|
481
|
-
var
|
|
482
|
-
|
|
487
|
+
var r, i;
|
|
488
|
+
Mr();
|
|
483
489
|
}
|
|
484
|
-
n.process(
|
|
490
|
+
n.process(L), ye.clear();
|
|
485
491
|
}
|
|
486
492
|
} finally {
|
|
487
|
-
|
|
493
|
+
L = [], Ot = !1, Ct = null;
|
|
488
494
|
}
|
|
489
495
|
}
|
|
490
|
-
function
|
|
496
|
+
function Mr() {
|
|
491
497
|
try {
|
|
492
|
-
|
|
498
|
+
Er();
|
|
493
499
|
} catch (t) {
|
|
494
|
-
|
|
500
|
+
bt(t, Ct);
|
|
495
501
|
}
|
|
496
502
|
}
|
|
497
|
-
let
|
|
498
|
-
function
|
|
503
|
+
let oe = null;
|
|
504
|
+
function Qt(t) {
|
|
499
505
|
var e = t.length;
|
|
500
506
|
if (e !== 0) {
|
|
501
507
|
for (var n = 0; n < e; ) {
|
|
502
|
-
var
|
|
503
|
-
if ((
|
|
508
|
+
var r = t[n++];
|
|
509
|
+
if ((r.f & (_e | ve)) === 0 && rt(r) && (oe = /* @__PURE__ */ new Set(), He(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Yn(r), oe?.size > 0)) {
|
|
504
510
|
ye.clear();
|
|
505
|
-
for (const
|
|
506
|
-
if ((
|
|
507
|
-
const s = [
|
|
508
|
-
let o =
|
|
511
|
+
for (const i of oe) {
|
|
512
|
+
if ((i.f & (_e | ve)) !== 0) continue;
|
|
513
|
+
const s = [i];
|
|
514
|
+
let o = i.parent;
|
|
509
515
|
for (; o !== null; )
|
|
510
|
-
|
|
511
|
-
for (let
|
|
512
|
-
const u = s[
|
|
513
|
-
(u.f & (_e | ve)) === 0 &&
|
|
516
|
+
oe.has(o) && (oe.delete(o), s.push(o)), o = o.parent;
|
|
517
|
+
for (let l = s.length - 1; l >= 0; l--) {
|
|
518
|
+
const u = s[l];
|
|
519
|
+
(u.f & (_e | ve)) === 0 && He(u);
|
|
514
520
|
}
|
|
515
521
|
}
|
|
516
|
-
|
|
522
|
+
oe.clear();
|
|
517
523
|
}
|
|
518
524
|
}
|
|
519
|
-
|
|
525
|
+
oe = null;
|
|
520
526
|
}
|
|
521
527
|
}
|
|
522
|
-
function
|
|
528
|
+
function kn(t, e, n, r) {
|
|
523
529
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
524
|
-
for (const
|
|
525
|
-
const s =
|
|
526
|
-
(s &
|
|
530
|
+
for (const i of t.reactions) {
|
|
531
|
+
const s = i.f;
|
|
532
|
+
(s & x) !== 0 ? kn(
|
|
527
533
|
/** @type {Derived} */
|
|
528
|
-
|
|
534
|
+
i,
|
|
529
535
|
e,
|
|
530
536
|
n,
|
|
531
|
-
i
|
|
532
|
-
) : (s & (mn | ge)) !== 0 && (s & I) === 0 && Rn(r, e, i) && (A(r, I), ne(
|
|
533
|
-
/** @type {Effect} */
|
|
534
537
|
r
|
|
538
|
+
) : (s & (gn | de)) !== 0 && (s & N) === 0 && xn(i, e, r) && (E(i, N), ne(
|
|
539
|
+
/** @type {Effect} */
|
|
540
|
+
i
|
|
535
541
|
));
|
|
536
542
|
}
|
|
537
543
|
}
|
|
538
|
-
function
|
|
539
|
-
const
|
|
540
|
-
if (
|
|
544
|
+
function xn(t, e, n) {
|
|
545
|
+
const r = n.get(t);
|
|
546
|
+
if (r !== void 0) return r;
|
|
541
547
|
if (t.deps !== null)
|
|
542
|
-
for (const
|
|
543
|
-
if (
|
|
548
|
+
for (const i of t.deps) {
|
|
549
|
+
if (Pe.call(e, i))
|
|
544
550
|
return !0;
|
|
545
|
-
if ((
|
|
551
|
+
if ((i.f & x) !== 0 && xn(
|
|
546
552
|
/** @type {Derived} */
|
|
547
|
-
|
|
553
|
+
i,
|
|
548
554
|
e,
|
|
549
555
|
n
|
|
550
556
|
))
|
|
551
557
|
return n.set(
|
|
552
558
|
/** @type {Derived} */
|
|
553
|
-
|
|
559
|
+
i,
|
|
554
560
|
!0
|
|
555
561
|
), !0;
|
|
556
562
|
}
|
|
557
563
|
return n.set(t, !1), !1;
|
|
558
564
|
}
|
|
559
565
|
function ne(t) {
|
|
560
|
-
for (var e =
|
|
566
|
+
for (var e = Ct = t; e.parent !== null; ) {
|
|
561
567
|
e = e.parent;
|
|
562
568
|
var n = e.f;
|
|
563
|
-
if (
|
|
569
|
+
if (Ot && e === w && (n & de) !== 0 && (n & dn) === 0)
|
|
564
570
|
return;
|
|
565
|
-
if ((n & (Ce |
|
|
566
|
-
if ((n &
|
|
567
|
-
e.f ^=
|
|
571
|
+
if ((n & (Ce | ge)) !== 0) {
|
|
572
|
+
if ((n & R) === 0) return;
|
|
573
|
+
e.f ^= R;
|
|
568
574
|
}
|
|
569
575
|
}
|
|
570
|
-
|
|
576
|
+
L.push(e);
|
|
571
577
|
}
|
|
572
|
-
function
|
|
573
|
-
if (!((t.f &
|
|
574
|
-
(t.f &
|
|
578
|
+
function Tn(t, e) {
|
|
579
|
+
if (!((t.f & ge) !== 0 && (t.f & R) !== 0)) {
|
|
580
|
+
(t.f & N) !== 0 ? e.d.push(t) : (t.f & W) !== 0 && e.m.push(t), E(t, R);
|
|
575
581
|
for (var n = t.first; n !== null; )
|
|
576
|
-
|
|
582
|
+
Tn(n, e), n = n.next;
|
|
577
583
|
}
|
|
578
584
|
}
|
|
579
|
-
function
|
|
580
|
-
let e = 0, n =
|
|
585
|
+
function qr(t) {
|
|
586
|
+
let e = 0, n = St(0), r;
|
|
581
587
|
return () => {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
e -= 1, e === 0 && (
|
|
588
|
+
Gt() && (y(n), zn(() => (e === 0 && (r = er(() => t(() => Qe(n)))), e += 1, () => {
|
|
589
|
+
Ie(() => {
|
|
590
|
+
e -= 1, e === 0 && (r?.(), r = void 0, Qe(n));
|
|
585
591
|
});
|
|
586
592
|
})));
|
|
587
593
|
};
|
|
588
594
|
}
|
|
589
|
-
var
|
|
590
|
-
function
|
|
591
|
-
new
|
|
595
|
+
var jr = _t | Ge;
|
|
596
|
+
function Pr(t, e, n) {
|
|
597
|
+
new Hr(t, e, n);
|
|
592
598
|
}
|
|
593
|
-
var
|
|
594
|
-
class
|
|
599
|
+
var j, nt, ae, ke, X, Z, B, ee, ue, xe, me, Me, qe, je, ce, wt, O, Rn, On, Lt, ut, Ft;
|
|
600
|
+
class Hr {
|
|
595
601
|
/**
|
|
596
602
|
* @param {TemplateNode} node
|
|
597
603
|
* @param {BoundaryProps} props
|
|
598
604
|
* @param {((anchor: Node) => void)} children
|
|
599
605
|
*/
|
|
600
|
-
constructor(e, n,
|
|
601
|
-
b(this,
|
|
606
|
+
constructor(e, n, r) {
|
|
607
|
+
b(this, O);
|
|
602
608
|
/** @type {Boundary | null} */
|
|
603
|
-
|
|
604
|
-
|
|
609
|
+
g(this, "parent");
|
|
610
|
+
g(this, "is_pending", !1);
|
|
605
611
|
/** @type {TemplateNode} */
|
|
606
|
-
b(this,
|
|
612
|
+
b(this, j);
|
|
607
613
|
/** @type {TemplateNode | null} */
|
|
608
|
-
b(this,
|
|
614
|
+
b(this, nt, te ? M : null);
|
|
609
615
|
/** @type {BoundaryProps} */
|
|
610
|
-
b(this,
|
|
616
|
+
b(this, ae);
|
|
611
617
|
/** @type {((anchor: Node) => void)} */
|
|
612
|
-
b(this,
|
|
618
|
+
b(this, ke);
|
|
613
619
|
/** @type {Effect} */
|
|
614
|
-
b(this,
|
|
620
|
+
b(this, X);
|
|
615
621
|
/** @type {Effect | null} */
|
|
616
|
-
b(this,
|
|
622
|
+
b(this, Z, null);
|
|
617
623
|
/** @type {Effect | null} */
|
|
618
|
-
b(this,
|
|
624
|
+
b(this, B, null);
|
|
619
625
|
/** @type {Effect | null} */
|
|
620
626
|
b(this, ee, null);
|
|
621
627
|
/** @type {DocumentFragment | null} */
|
|
622
628
|
b(this, ue, null);
|
|
623
|
-
|
|
624
|
-
b(this, me,
|
|
625
|
-
b(this,
|
|
626
|
-
b(this, ce, 0);
|
|
627
|
-
b(this, je, !1);
|
|
628
|
-
b(this, Re, !1);
|
|
629
|
+
b(this, xe, 0);
|
|
630
|
+
b(this, me, 0);
|
|
631
|
+
b(this, Me, !1);
|
|
629
632
|
/** @type {Set<Effect>} */
|
|
630
|
-
b(this,
|
|
633
|
+
b(this, qe, /* @__PURE__ */ new Set());
|
|
631
634
|
/** @type {Set<Effect>} */
|
|
632
|
-
b(this,
|
|
635
|
+
b(this, je, /* @__PURE__ */ new Set());
|
|
633
636
|
/**
|
|
634
637
|
* A source containing the number of pending async deriveds/expressions.
|
|
635
638
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -637,37 +640,34 @@ class Gi {
|
|
|
637
640
|
* calls followed by no-op flushes
|
|
638
641
|
* @type {Source<number> | null}
|
|
639
642
|
*/
|
|
640
|
-
b(this,
|
|
641
|
-
b(this,
|
|
642
|
-
|
|
643
|
+
b(this, ce, null);
|
|
644
|
+
b(this, wt, qr(() => (v(this, ce, St(a(this, xe))), () => {
|
|
645
|
+
v(this, ce, null);
|
|
643
646
|
})));
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
l(this, me)?.remove();
|
|
662
|
-
};
|
|
663
|
-
}, Hi)), te && m(this, M, q);
|
|
647
|
+
v(this, j, e), v(this, ae, n), v(this, ke, (i) => {
|
|
648
|
+
var s = (
|
|
649
|
+
/** @type {Effect} */
|
|
650
|
+
w
|
|
651
|
+
);
|
|
652
|
+
s.b = this, s.f |= Tt, r(i);
|
|
653
|
+
}), this.parent = /** @type {Effect} */
|
|
654
|
+
w.b, v(this, X, ni(() => {
|
|
655
|
+
if (te) {
|
|
656
|
+
const i = (
|
|
657
|
+
/** @type {Comment} */
|
|
658
|
+
a(this, nt)
|
|
659
|
+
);
|
|
660
|
+
mn(), i.data === un ? I(this, O, On).call(this) : I(this, O, Rn).call(this);
|
|
661
|
+
} else
|
|
662
|
+
I(this, O, Lt).call(this);
|
|
663
|
+
}, jr)), te && v(this, j, M);
|
|
664
664
|
}
|
|
665
665
|
/**
|
|
666
666
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
667
667
|
* @param {Effect} effect
|
|
668
668
|
*/
|
|
669
669
|
defer_effect(e) {
|
|
670
|
-
|
|
670
|
+
En(e, a(this, qe), a(this, je));
|
|
671
671
|
}
|
|
672
672
|
/**
|
|
673
673
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -677,7 +677,7 @@ class Gi {
|
|
|
677
677
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
678
678
|
}
|
|
679
679
|
has_pending_snippet() {
|
|
680
|
-
return !!
|
|
680
|
+
return !!a(this, ae).pending;
|
|
681
681
|
}
|
|
682
682
|
/**
|
|
683
683
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -686,148 +686,158 @@ class Gi {
|
|
|
686
686
|
* @param {1 | -1} d
|
|
687
687
|
*/
|
|
688
688
|
update_pending_count(e) {
|
|
689
|
-
|
|
690
|
-
|
|
689
|
+
I(this, O, Ft).call(this, e), v(this, xe, a(this, xe) + e), !(!a(this, ce) || a(this, Me)) && (v(this, Me, !0), Ie(() => {
|
|
690
|
+
v(this, Me, !1), a(this, ce) && Dn(a(this, ce), a(this, xe));
|
|
691
691
|
}));
|
|
692
692
|
}
|
|
693
693
|
get_effect_pending() {
|
|
694
|
-
return
|
|
694
|
+
return a(this, wt).call(this), y(
|
|
695
695
|
/** @type {Source<number>} */
|
|
696
|
-
|
|
696
|
+
a(this, ce)
|
|
697
697
|
);
|
|
698
698
|
}
|
|
699
699
|
/** @param {unknown} error */
|
|
700
700
|
error(e) {
|
|
701
|
-
var n =
|
|
702
|
-
let
|
|
703
|
-
if (
|
|
701
|
+
var n = a(this, ae).onerror;
|
|
702
|
+
let r = a(this, ae).failed;
|
|
703
|
+
if (!n && !r)
|
|
704
704
|
throw e;
|
|
705
|
-
|
|
705
|
+
a(this, Z) && (K(a(this, Z)), v(this, Z, null)), a(this, B) && (K(a(this, B)), v(this, B, null)), a(this, ee) && (K(a(this, ee)), v(this, ee, null)), te && (Xe(
|
|
706
706
|
/** @type {TemplateNode} */
|
|
707
|
-
|
|
708
|
-
),
|
|
709
|
-
var
|
|
707
|
+
a(this, nt)
|
|
708
|
+
), Or(), Xe(Nr()));
|
|
709
|
+
var i = !1, s = !1;
|
|
710
710
|
const o = () => {
|
|
711
|
-
if (
|
|
712
|
-
|
|
711
|
+
if (i) {
|
|
712
|
+
Rr();
|
|
713
713
|
return;
|
|
714
714
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
}),
|
|
715
|
+
i = !0, s && Tr(), a(this, ee) !== null && ft(a(this, ee), () => {
|
|
716
|
+
v(this, ee, null);
|
|
717
|
+
}), I(this, O, ut).call(this, () => {
|
|
718
|
+
he.ensure(), I(this, O, Lt).call(this);
|
|
719
|
+
});
|
|
718
720
|
};
|
|
719
|
-
|
|
721
|
+
Ie(() => {
|
|
720
722
|
try {
|
|
721
723
|
s = !0, n?.(e, o), s = !1;
|
|
722
|
-
} catch (
|
|
723
|
-
|
|
724
|
+
} catch (l) {
|
|
725
|
+
bt(l, a(this, X) && a(this, X).parent);
|
|
724
726
|
}
|
|
725
|
-
|
|
726
|
-
|
|
727
|
+
r && v(this, ee, I(this, O, ut).call(this, () => {
|
|
728
|
+
he.ensure();
|
|
727
729
|
try {
|
|
728
|
-
return
|
|
729
|
-
|
|
730
|
-
|
|
730
|
+
return Oe(() => {
|
|
731
|
+
var l = (
|
|
732
|
+
/** @type {Effect} */
|
|
733
|
+
w
|
|
734
|
+
);
|
|
735
|
+
l.b = this, l.f |= Tt, r(
|
|
736
|
+
a(this, j),
|
|
731
737
|
() => e,
|
|
732
738
|
() => o
|
|
733
739
|
);
|
|
734
740
|
});
|
|
735
|
-
} catch (
|
|
736
|
-
return
|
|
737
|
-
|
|
741
|
+
} catch (l) {
|
|
742
|
+
return bt(
|
|
743
|
+
l,
|
|
738
744
|
/** @type {Effect} */
|
|
739
|
-
|
|
745
|
+
a(this, X).parent
|
|
740
746
|
), null;
|
|
741
|
-
} finally {
|
|
742
|
-
m(this, Re, !1);
|
|
743
747
|
}
|
|
744
748
|
}));
|
|
745
749
|
});
|
|
746
750
|
}
|
|
747
751
|
}
|
|
748
|
-
|
|
752
|
+
j = new WeakMap(), nt = new WeakMap(), ae = new WeakMap(), ke = new WeakMap(), X = new WeakMap(), Z = new WeakMap(), B = new WeakMap(), ee = new WeakMap(), ue = new WeakMap(), xe = new WeakMap(), me = new WeakMap(), Me = new WeakMap(), qe = new WeakMap(), je = new WeakMap(), ce = new WeakMap(), wt = new WeakMap(), O = new WeakSet(), Rn = function() {
|
|
749
753
|
try {
|
|
750
|
-
|
|
754
|
+
v(this, Z, Oe(() => a(this, ke).call(this, a(this, j))));
|
|
751
755
|
} catch (e) {
|
|
752
756
|
this.error(e);
|
|
753
757
|
}
|
|
754
|
-
},
|
|
755
|
-
const e =
|
|
756
|
-
e && (
|
|
757
|
-
var n =
|
|
758
|
-
|
|
758
|
+
}, On = function() {
|
|
759
|
+
const e = a(this, ae).pending;
|
|
760
|
+
e && (this.is_pending = !0, v(this, B, Oe(() => e(a(this, j)))), Ie(() => {
|
|
761
|
+
var n = v(this, ue, document.createDocumentFragment()), r = jn();
|
|
762
|
+
n.append(r), v(this, Z, I(this, O, ut).call(this, () => (he.ensure(), Oe(() => a(this, ke).call(this, r))))), a(this, me) === 0 && (a(this, j).before(n), v(this, ue, null), ft(
|
|
759
763
|
/** @type {Effect} */
|
|
760
|
-
|
|
764
|
+
a(this, B),
|
|
761
765
|
() => {
|
|
762
|
-
|
|
766
|
+
v(this, B, null);
|
|
763
767
|
}
|
|
764
768
|
), this.is_pending = !1);
|
|
765
769
|
}));
|
|
766
|
-
},
|
|
767
|
-
|
|
768
|
-
|
|
770
|
+
}, Lt = function() {
|
|
771
|
+
try {
|
|
772
|
+
if (this.is_pending = this.has_pending_snippet(), v(this, me, 0), v(this, xe, 0), v(this, Z, Oe(() => {
|
|
773
|
+
a(this, ke).call(this, a(this, j));
|
|
774
|
+
})), a(this, me) > 0) {
|
|
775
|
+
var e = v(this, ue, document.createDocumentFragment());
|
|
776
|
+
si(a(this, Z), e);
|
|
777
|
+
const n = (
|
|
778
|
+
/** @type {(anchor: Node) => void} */
|
|
779
|
+
a(this, ae).pending
|
|
780
|
+
);
|
|
781
|
+
v(this, B, Oe(() => n(a(this, j))));
|
|
782
|
+
} else
|
|
783
|
+
this.is_pending = !1;
|
|
784
|
+
} catch (n) {
|
|
785
|
+
this.error(n);
|
|
786
|
+
}
|
|
769
787
|
}, /**
|
|
770
|
-
* @
|
|
788
|
+
* @template T
|
|
789
|
+
* @param {() => T} fn
|
|
771
790
|
*/
|
|
772
|
-
|
|
773
|
-
var n = w,
|
|
774
|
-
we(
|
|
791
|
+
ut = function(e) {
|
|
792
|
+
var n = w, r = _, i = Y;
|
|
793
|
+
we(a(this, X)), re(a(this, X)), yt(a(this, X).ctx);
|
|
775
794
|
try {
|
|
776
795
|
return e();
|
|
777
796
|
} catch (s) {
|
|
778
|
-
return
|
|
797
|
+
return Cn(s), null;
|
|
779
798
|
} finally {
|
|
780
|
-
we(n),
|
|
799
|
+
we(n), re(r), yt(i);
|
|
781
800
|
}
|
|
782
|
-
}, ft = function() {
|
|
783
|
-
const e = (
|
|
784
|
-
/** @type {(anchor: Node) => void} */
|
|
785
|
-
l(this, X).pending
|
|
786
|
-
);
|
|
787
|
-
l(this, P) !== null && (m(this, ue, document.createDocumentFragment()), l(this, ue).append(
|
|
788
|
-
/** @type {TemplateNode} */
|
|
789
|
-
l(this, me)
|
|
790
|
-
), lr(l(this, P), l(this, ue))), l(this, L) === null && m(this, L, Se(() => e(l(this, M))));
|
|
791
801
|
}, /**
|
|
792
802
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
793
803
|
* if any, such that we can replace the snippet with content once work is done
|
|
794
804
|
* @param {1 | -1} d
|
|
795
805
|
*/
|
|
796
|
-
|
|
806
|
+
Ft = function(e) {
|
|
797
807
|
var n;
|
|
798
808
|
if (!this.has_pending_snippet()) {
|
|
799
|
-
this.parent &&
|
|
809
|
+
this.parent && I(n = this.parent, O, Ft).call(n, e);
|
|
800
810
|
return;
|
|
801
811
|
}
|
|
802
|
-
if (
|
|
812
|
+
if (v(this, me, a(this, me) + e), a(this, me) === 0) {
|
|
803
813
|
this.is_pending = !1;
|
|
804
|
-
for (const
|
|
805
|
-
|
|
806
|
-
for (const
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}),
|
|
814
|
+
for (const r of a(this, qe))
|
|
815
|
+
E(r, N), ne(r);
|
|
816
|
+
for (const r of a(this, je))
|
|
817
|
+
E(r, W), ne(r);
|
|
818
|
+
a(this, qe).clear(), a(this, je).clear(), a(this, B) && ft(a(this, B), () => {
|
|
819
|
+
v(this, B, null);
|
|
820
|
+
}), a(this, ue) && (a(this, j).before(a(this, ue)), v(this, ue, null));
|
|
811
821
|
}
|
|
812
822
|
};
|
|
813
823
|
// @__NO_SIDE_EFFECTS__
|
|
814
|
-
function
|
|
815
|
-
var e =
|
|
824
|
+
function Nn(t) {
|
|
825
|
+
var e = x | N, n = _ !== null && (_.f & x) !== 0 ? (
|
|
816
826
|
/** @type {Derived} */
|
|
817
827
|
_
|
|
818
828
|
) : null;
|
|
819
|
-
return w !== null && (w.f |=
|
|
820
|
-
ctx:
|
|
829
|
+
return w !== null && (w.f |= Ge), {
|
|
830
|
+
ctx: Y,
|
|
821
831
|
deps: null,
|
|
822
832
|
effects: null,
|
|
823
|
-
equals:
|
|
833
|
+
equals: vn,
|
|
824
834
|
f: e,
|
|
825
835
|
fn: t,
|
|
826
836
|
reactions: null,
|
|
827
837
|
rv: 0,
|
|
828
838
|
v: (
|
|
829
839
|
/** @type {V} */
|
|
830
|
-
|
|
840
|
+
T
|
|
831
841
|
),
|
|
832
842
|
wv: 0,
|
|
833
843
|
parent: n ?? w,
|
|
@@ -835,24 +845,24 @@ function Ln(t) {
|
|
|
835
845
|
};
|
|
836
846
|
}
|
|
837
847
|
// @__NO_SIDE_EFFECTS__
|
|
838
|
-
function
|
|
839
|
-
const e = /* @__PURE__ */
|
|
840
|
-
return
|
|
848
|
+
function zr(t) {
|
|
849
|
+
const e = /* @__PURE__ */ Nn(t);
|
|
850
|
+
return Un(e), e;
|
|
841
851
|
}
|
|
842
|
-
function
|
|
852
|
+
function Gr(t) {
|
|
843
853
|
var e = t.effects;
|
|
844
854
|
if (e !== null) {
|
|
845
855
|
t.effects = null;
|
|
846
856
|
for (var n = 0; n < e.length; n += 1)
|
|
847
|
-
|
|
857
|
+
K(
|
|
848
858
|
/** @type {Effect} */
|
|
849
859
|
e[n]
|
|
850
860
|
);
|
|
851
861
|
}
|
|
852
862
|
}
|
|
853
|
-
function
|
|
863
|
+
function Yr(t) {
|
|
854
864
|
for (var e = t.parent; e !== null; ) {
|
|
855
|
-
if ((e.f &
|
|
865
|
+
if ((e.f & x) === 0)
|
|
856
866
|
return (e.f & _e) === 0 ? (
|
|
857
867
|
/** @type {Effect} */
|
|
858
868
|
e
|
|
@@ -861,103 +871,103 @@ function Ui(t) {
|
|
|
861
871
|
}
|
|
862
872
|
return null;
|
|
863
873
|
}
|
|
864
|
-
function
|
|
874
|
+
function zt(t) {
|
|
865
875
|
var e, n = w;
|
|
866
|
-
we(
|
|
876
|
+
we(Yr(t));
|
|
867
877
|
try {
|
|
868
|
-
t.f &= ~
|
|
878
|
+
t.f &= ~Re, Gr(t), e = Jn(t);
|
|
869
879
|
} finally {
|
|
870
880
|
we(n);
|
|
871
881
|
}
|
|
872
882
|
return e;
|
|
873
883
|
}
|
|
874
|
-
function
|
|
875
|
-
var e =
|
|
876
|
-
if (!t.equals(e) && (t.wv =
|
|
877
|
-
|
|
884
|
+
function In(t) {
|
|
885
|
+
var e = zt(t);
|
|
886
|
+
if (!t.equals(e) && (t.wv = Wn(), (!A?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
887
|
+
E(t, R);
|
|
878
888
|
return;
|
|
879
889
|
}
|
|
880
|
-
be || (
|
|
890
|
+
be || (V !== null ? (Gt() || A?.is_fork) && V.set(t, e) : Ht(t));
|
|
881
891
|
}
|
|
882
|
-
function
|
|
892
|
+
function Vr(t) {
|
|
883
893
|
if (t.effects !== null)
|
|
884
894
|
for (const e of t.effects)
|
|
885
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(
|
|
895
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(jt), e.teardown = pr, e.ac = null, Ze(e, 0), Yt(e));
|
|
886
896
|
}
|
|
887
|
-
function
|
|
897
|
+
function Ln(t) {
|
|
888
898
|
if (t.effects !== null)
|
|
889
899
|
for (const e of t.effects)
|
|
890
|
-
e.teardown &&
|
|
900
|
+
e.teardown && He(e);
|
|
891
901
|
}
|
|
892
|
-
let
|
|
902
|
+
let Dt = /* @__PURE__ */ new Set();
|
|
893
903
|
const ye = /* @__PURE__ */ new Map();
|
|
894
|
-
let
|
|
895
|
-
function
|
|
904
|
+
let Fn = !1;
|
|
905
|
+
function St(t, e) {
|
|
896
906
|
var n = {
|
|
897
907
|
f: 0,
|
|
898
908
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
899
909
|
v: t,
|
|
900
910
|
reactions: null,
|
|
901
|
-
equals:
|
|
911
|
+
equals: vn,
|
|
902
912
|
rv: 0,
|
|
903
913
|
wv: 0
|
|
904
914
|
};
|
|
905
915
|
return n;
|
|
906
916
|
}
|
|
907
917
|
// @__NO_SIDE_EFFECTS__
|
|
908
|
-
function
|
|
909
|
-
const n =
|
|
910
|
-
return
|
|
918
|
+
function H(t, e) {
|
|
919
|
+
const n = St(t);
|
|
920
|
+
return Un(n), n;
|
|
911
921
|
}
|
|
912
922
|
// @__NO_SIDE_EFFECTS__
|
|
913
|
-
function
|
|
914
|
-
const
|
|
915
|
-
return e || (
|
|
923
|
+
function Ur(t, e = !1, n = !0) {
|
|
924
|
+
const r = St(t);
|
|
925
|
+
return e || (r.equals = Lr), r;
|
|
916
926
|
}
|
|
917
|
-
function
|
|
927
|
+
function k(t, e, n = !1) {
|
|
918
928
|
_ !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
919
929
|
// to ensure we error if state is set inside an inspect effect
|
|
920
|
-
(!
|
|
921
|
-
let
|
|
922
|
-
return
|
|
930
|
+
(!U || (_.f & Wt) !== 0) && bn() && (_.f & (x | de | gn | Wt)) !== 0 && (G === null || !Pe.call(G, t)) && xr();
|
|
931
|
+
let r = n ? Ke(e) : e;
|
|
932
|
+
return Dn(t, r);
|
|
923
933
|
}
|
|
924
|
-
function
|
|
934
|
+
function Dn(t, e) {
|
|
925
935
|
if (!t.equals(e)) {
|
|
926
936
|
var n = t.v;
|
|
927
937
|
be ? ye.set(t, e) : ye.set(t, n), t.v = e;
|
|
928
|
-
var
|
|
929
|
-
if (
|
|
930
|
-
const
|
|
938
|
+
var r = he.ensure();
|
|
939
|
+
if (r.capture(t, n), (t.f & x) !== 0) {
|
|
940
|
+
const i = (
|
|
931
941
|
/** @type {Derived} */
|
|
932
942
|
t
|
|
933
943
|
);
|
|
934
|
-
(t.f &
|
|
944
|
+
(t.f & N) !== 0 && zt(i), Ht(i);
|
|
935
945
|
}
|
|
936
|
-
t.wv =
|
|
946
|
+
t.wv = Wn(), Bn(t, N), w !== null && (w.f & R) !== 0 && (w.f & (ge | Ce)) === 0 && (q === null ? oi([t]) : q.push(t)), !r.is_fork && Dt.size > 0 && !Fn && Kr();
|
|
937
947
|
}
|
|
938
948
|
return e;
|
|
939
949
|
}
|
|
940
|
-
function
|
|
941
|
-
|
|
942
|
-
for (const t of
|
|
943
|
-
(t.f &
|
|
944
|
-
|
|
950
|
+
function Kr() {
|
|
951
|
+
Fn = !1;
|
|
952
|
+
for (const t of Dt)
|
|
953
|
+
(t.f & R) !== 0 && E(t, W), rt(t) && He(t);
|
|
954
|
+
Dt.clear();
|
|
945
955
|
}
|
|
946
|
-
function
|
|
947
|
-
|
|
956
|
+
function Qe(t) {
|
|
957
|
+
k(t, t.v + 1);
|
|
948
958
|
}
|
|
949
|
-
function
|
|
959
|
+
function Bn(t, e) {
|
|
950
960
|
var n = t.reactions;
|
|
951
961
|
if (n !== null)
|
|
952
|
-
for (var
|
|
953
|
-
var s = n[
|
|
954
|
-
if (
|
|
962
|
+
for (var r = n.length, i = 0; i < r; i++) {
|
|
963
|
+
var s = n[i], o = s.f, l = (o & N) === 0;
|
|
964
|
+
if (l && E(s, e), (o & x) !== 0) {
|
|
955
965
|
var u = (
|
|
956
966
|
/** @type {Derived} */
|
|
957
967
|
s
|
|
958
968
|
);
|
|
959
|
-
|
|
960
|
-
} else
|
|
969
|
+
V?.delete(u), (o & Re) === 0 && (o & z && (s.f |= Re), Bn(u, W));
|
|
970
|
+
} else l && ((o & de) !== 0 && oe !== null && oe.add(
|
|
961
971
|
/** @type {Effect} */
|
|
962
972
|
s
|
|
963
973
|
), ne(
|
|
@@ -966,199 +976,199 @@ function qn(t, e) {
|
|
|
966
976
|
));
|
|
967
977
|
}
|
|
968
978
|
}
|
|
969
|
-
function
|
|
970
|
-
if (typeof t != "object" || t === null ||
|
|
979
|
+
function Ke(t) {
|
|
980
|
+
if (typeof t != "object" || t === null || kt in t)
|
|
971
981
|
return t;
|
|
972
|
-
const e =
|
|
973
|
-
if (e !==
|
|
982
|
+
const e = gr(t);
|
|
983
|
+
if (e !== hr && e !== dr)
|
|
974
984
|
return t;
|
|
975
|
-
var n = /* @__PURE__ */ new Map(),
|
|
976
|
-
if (
|
|
977
|
-
return
|
|
978
|
-
var u = _, c =
|
|
979
|
-
|
|
980
|
-
var
|
|
981
|
-
return
|
|
985
|
+
var n = /* @__PURE__ */ new Map(), r = ur(t), i = /* @__PURE__ */ H(0), s = Te, o = (l) => {
|
|
986
|
+
if (Te === s)
|
|
987
|
+
return l();
|
|
988
|
+
var u = _, c = Te;
|
|
989
|
+
re(null), Zt(s);
|
|
990
|
+
var f = l();
|
|
991
|
+
return re(u), Zt(c), f;
|
|
982
992
|
};
|
|
983
|
-
return
|
|
993
|
+
return r && n.set("length", /* @__PURE__ */ H(
|
|
984
994
|
/** @type {any[]} */
|
|
985
995
|
t.length
|
|
986
996
|
)), new Proxy(
|
|
987
997
|
/** @type {any} */
|
|
988
998
|
t,
|
|
989
999
|
{
|
|
990
|
-
defineProperty(
|
|
991
|
-
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) &&
|
|
992
|
-
var
|
|
993
|
-
return
|
|
994
|
-
var
|
|
995
|
-
return n.set(u,
|
|
996
|
-
}) :
|
|
1000
|
+
defineProperty(l, u, c) {
|
|
1001
|
+
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Ar();
|
|
1002
|
+
var f = n.get(u);
|
|
1003
|
+
return f === void 0 ? o(() => {
|
|
1004
|
+
var d = /* @__PURE__ */ H(c.value);
|
|
1005
|
+
return n.set(u, d), d;
|
|
1006
|
+
}) : k(f, c.value, !0), !0;
|
|
997
1007
|
},
|
|
998
|
-
deleteProperty(
|
|
1008
|
+
deleteProperty(l, u) {
|
|
999
1009
|
var c = n.get(u);
|
|
1000
1010
|
if (c === void 0) {
|
|
1001
|
-
if (u in
|
|
1002
|
-
const
|
|
1003
|
-
n.set(u,
|
|
1011
|
+
if (u in l) {
|
|
1012
|
+
const f = o(() => /* @__PURE__ */ H(T));
|
|
1013
|
+
n.set(u, f), Qe(i);
|
|
1004
1014
|
}
|
|
1005
1015
|
} else
|
|
1006
|
-
|
|
1016
|
+
k(c, T), Qe(i);
|
|
1007
1017
|
return !0;
|
|
1008
1018
|
},
|
|
1009
|
-
get(
|
|
1010
|
-
if (u ===
|
|
1019
|
+
get(l, u, c) {
|
|
1020
|
+
if (u === kt)
|
|
1011
1021
|
return t;
|
|
1012
|
-
var
|
|
1013
|
-
if (
|
|
1014
|
-
var
|
|
1015
|
-
return
|
|
1016
|
-
}), n.set(u,
|
|
1017
|
-
var
|
|
1018
|
-
return
|
|
1022
|
+
var f = n.get(u), d = u in l;
|
|
1023
|
+
if (f === void 0 && (!d || Ne(l, u)?.writable) && (f = o(() => {
|
|
1024
|
+
var m = Ke(d ? l[u] : T), p = /* @__PURE__ */ H(m);
|
|
1025
|
+
return p;
|
|
1026
|
+
}), n.set(u, f)), f !== void 0) {
|
|
1027
|
+
var h = y(f);
|
|
1028
|
+
return h === T ? void 0 : h;
|
|
1019
1029
|
}
|
|
1020
|
-
return Reflect.get(
|
|
1030
|
+
return Reflect.get(l, u, c);
|
|
1021
1031
|
},
|
|
1022
|
-
getOwnPropertyDescriptor(
|
|
1023
|
-
var c = Reflect.getOwnPropertyDescriptor(
|
|
1032
|
+
getOwnPropertyDescriptor(l, u) {
|
|
1033
|
+
var c = Reflect.getOwnPropertyDescriptor(l, u);
|
|
1024
1034
|
if (c && "value" in c) {
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1035
|
+
var f = n.get(u);
|
|
1036
|
+
f && (c.value = y(f));
|
|
1027
1037
|
} else if (c === void 0) {
|
|
1028
|
-
var
|
|
1029
|
-
if (
|
|
1038
|
+
var d = n.get(u), h = d?.v;
|
|
1039
|
+
if (d !== void 0 && h !== T)
|
|
1030
1040
|
return {
|
|
1031
1041
|
enumerable: !0,
|
|
1032
1042
|
configurable: !0,
|
|
1033
|
-
value:
|
|
1043
|
+
value: h,
|
|
1034
1044
|
writable: !0
|
|
1035
1045
|
};
|
|
1036
1046
|
}
|
|
1037
1047
|
return c;
|
|
1038
1048
|
},
|
|
1039
|
-
has(
|
|
1040
|
-
if (u ===
|
|
1049
|
+
has(l, u) {
|
|
1050
|
+
if (u === kt)
|
|
1041
1051
|
return !0;
|
|
1042
|
-
var c = n.get(u),
|
|
1043
|
-
if (c !== void 0 || w !== null && (!
|
|
1052
|
+
var c = n.get(u), f = c !== void 0 && c.v !== T || Reflect.has(l, u);
|
|
1053
|
+
if (c !== void 0 || w !== null && (!f || Ne(l, u)?.writable)) {
|
|
1044
1054
|
c === void 0 && (c = o(() => {
|
|
1045
|
-
var
|
|
1046
|
-
return
|
|
1055
|
+
var h = f ? Ke(l[u]) : T, m = /* @__PURE__ */ H(h);
|
|
1056
|
+
return m;
|
|
1047
1057
|
}), n.set(u, c));
|
|
1048
|
-
var
|
|
1049
|
-
if (
|
|
1058
|
+
var d = y(c);
|
|
1059
|
+
if (d === T)
|
|
1050
1060
|
return !1;
|
|
1051
1061
|
}
|
|
1052
|
-
return
|
|
1062
|
+
return f;
|
|
1053
1063
|
},
|
|
1054
|
-
set(
|
|
1055
|
-
var
|
|
1056
|
-
if (
|
|
1057
|
-
for (var
|
|
1058
|
-
|
|
1059
|
-
var
|
|
1060
|
-
|
|
1064
|
+
set(l, u, c, f) {
|
|
1065
|
+
var d = n.get(u), h = u in l;
|
|
1066
|
+
if (r && u === "length")
|
|
1067
|
+
for (var m = c; m < /** @type {Source<number>} */
|
|
1068
|
+
d.v; m += 1) {
|
|
1069
|
+
var p = n.get(m + "");
|
|
1070
|
+
p !== void 0 ? k(p, T) : m in l && (p = o(() => /* @__PURE__ */ H(T)), n.set(m + "", p));
|
|
1061
1071
|
}
|
|
1062
|
-
if (
|
|
1063
|
-
(!
|
|
1072
|
+
if (d === void 0)
|
|
1073
|
+
(!h || Ne(l, u)?.writable) && (d = o(() => /* @__PURE__ */ H(void 0)), k(d, Ke(c)), n.set(u, d));
|
|
1064
1074
|
else {
|
|
1065
|
-
|
|
1066
|
-
var
|
|
1067
|
-
|
|
1075
|
+
h = d.v !== T;
|
|
1076
|
+
var $ = o(() => Ke(c));
|
|
1077
|
+
k(d, $);
|
|
1068
1078
|
}
|
|
1069
|
-
var
|
|
1070
|
-
if (
|
|
1071
|
-
if (
|
|
1072
|
-
var
|
|
1079
|
+
var C = Reflect.getOwnPropertyDescriptor(l, u);
|
|
1080
|
+
if (C?.set && C.set.call(f, c), !h) {
|
|
1081
|
+
if (r && typeof u == "string") {
|
|
1082
|
+
var pe = (
|
|
1073
1083
|
/** @type {Source<number>} */
|
|
1074
1084
|
n.get("length")
|
|
1075
|
-
),
|
|
1076
|
-
Number.isInteger(
|
|
1085
|
+
), Q = Number(u);
|
|
1086
|
+
Number.isInteger(Q) && Q >= pe.v && k(pe, Q + 1);
|
|
1077
1087
|
}
|
|
1078
|
-
|
|
1088
|
+
Qe(i);
|
|
1079
1089
|
}
|
|
1080
1090
|
return !0;
|
|
1081
1091
|
},
|
|
1082
|
-
ownKeys(
|
|
1083
|
-
y(
|
|
1084
|
-
var u = Reflect.ownKeys(
|
|
1085
|
-
var
|
|
1086
|
-
return
|
|
1092
|
+
ownKeys(l) {
|
|
1093
|
+
y(i);
|
|
1094
|
+
var u = Reflect.ownKeys(l).filter((d) => {
|
|
1095
|
+
var h = n.get(d);
|
|
1096
|
+
return h === void 0 || h.v !== T;
|
|
1087
1097
|
});
|
|
1088
|
-
for (var [c,
|
|
1089
|
-
|
|
1098
|
+
for (var [c, f] of n)
|
|
1099
|
+
f.v !== T && !(c in l) && u.push(c);
|
|
1090
1100
|
return u;
|
|
1091
1101
|
},
|
|
1092
1102
|
setPrototypeOf() {
|
|
1093
|
-
|
|
1103
|
+
kr();
|
|
1094
1104
|
}
|
|
1095
1105
|
}
|
|
1096
1106
|
);
|
|
1097
1107
|
}
|
|
1098
|
-
var
|
|
1099
|
-
function
|
|
1100
|
-
if (
|
|
1101
|
-
|
|
1108
|
+
var Jt, Mn, qn;
|
|
1109
|
+
function Bt() {
|
|
1110
|
+
if (Jt === void 0) {
|
|
1111
|
+
Jt = window;
|
|
1102
1112
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1103
|
-
|
|
1113
|
+
Mn = Ne(e, "firstChild").get, qn = Ne(e, "nextSibling").get, Kt(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Kt(n) && (n.__t = void 0);
|
|
1104
1114
|
}
|
|
1105
1115
|
}
|
|
1106
|
-
function
|
|
1116
|
+
function jn(t = "") {
|
|
1107
1117
|
return document.createTextNode(t);
|
|
1108
1118
|
}
|
|
1109
1119
|
// @__NO_SIDE_EFFECTS__
|
|
1110
|
-
function
|
|
1120
|
+
function Wr(t) {
|
|
1111
1121
|
return (
|
|
1112
1122
|
/** @type {TemplateNode | null} */
|
|
1113
|
-
|
|
1123
|
+
Mn.call(t)
|
|
1114
1124
|
);
|
|
1115
1125
|
}
|
|
1116
1126
|
// @__NO_SIDE_EFFECTS__
|
|
1117
|
-
function
|
|
1127
|
+
function Ye(t) {
|
|
1118
1128
|
return (
|
|
1119
1129
|
/** @type {TemplateNode | null} */
|
|
1120
|
-
|
|
1130
|
+
qn.call(t)
|
|
1121
1131
|
);
|
|
1122
1132
|
}
|
|
1123
|
-
function
|
|
1133
|
+
function Qr(t) {
|
|
1124
1134
|
t.textContent = "";
|
|
1125
1135
|
}
|
|
1126
|
-
function
|
|
1136
|
+
function Jr(t, e, n) {
|
|
1127
1137
|
return (
|
|
1128
1138
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1129
|
-
document.createElementNS(
|
|
1139
|
+
document.createElementNS(ar, t, void 0)
|
|
1130
1140
|
);
|
|
1131
1141
|
}
|
|
1132
|
-
function
|
|
1142
|
+
function Pn(t) {
|
|
1133
1143
|
var e = _, n = w;
|
|
1134
|
-
|
|
1144
|
+
re(null), we(null);
|
|
1135
1145
|
try {
|
|
1136
1146
|
return t();
|
|
1137
1147
|
} finally {
|
|
1138
|
-
|
|
1148
|
+
re(e), we(n);
|
|
1139
1149
|
}
|
|
1140
1150
|
}
|
|
1141
|
-
function
|
|
1142
|
-
w === null && (_ === null &&
|
|
1151
|
+
function Xr(t) {
|
|
1152
|
+
w === null && (_ === null && Sr(), Cr()), be && wr();
|
|
1143
1153
|
}
|
|
1144
|
-
function
|
|
1154
|
+
function Zr(t, e) {
|
|
1145
1155
|
var n = e.last;
|
|
1146
1156
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1147
1157
|
}
|
|
1148
|
-
function
|
|
1149
|
-
var
|
|
1150
|
-
|
|
1151
|
-
var
|
|
1152
|
-
ctx:
|
|
1158
|
+
function Ve(t, e, n) {
|
|
1159
|
+
var r = w;
|
|
1160
|
+
r !== null && (r.f & ve) !== 0 && (t |= ve);
|
|
1161
|
+
var i = {
|
|
1162
|
+
ctx: Y,
|
|
1153
1163
|
deps: null,
|
|
1154
1164
|
nodes: null,
|
|
1155
|
-
f: t |
|
|
1165
|
+
f: t | N | z,
|
|
1156
1166
|
first: null,
|
|
1157
1167
|
fn: e,
|
|
1158
1168
|
last: null,
|
|
1159
1169
|
next: null,
|
|
1160
|
-
parent:
|
|
1161
|
-
b:
|
|
1170
|
+
parent: r,
|
|
1171
|
+
b: r && r.b,
|
|
1162
1172
|
prev: null,
|
|
1163
1173
|
teardown: null,
|
|
1164
1174
|
wv: 0,
|
|
@@ -1166,333 +1176,333 @@ function Ke(t, e, n) {
|
|
|
1166
1176
|
};
|
|
1167
1177
|
if (n)
|
|
1168
1178
|
try {
|
|
1169
|
-
|
|
1170
|
-
} catch (
|
|
1171
|
-
throw
|
|
1179
|
+
He(i);
|
|
1180
|
+
} catch (l) {
|
|
1181
|
+
throw K(i), l;
|
|
1172
1182
|
}
|
|
1173
|
-
else e !== null && ne(
|
|
1174
|
-
var s =
|
|
1183
|
+
else e !== null && ne(i);
|
|
1184
|
+
var s = i;
|
|
1175
1185
|
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1176
|
-
(s.f &
|
|
1186
|
+
(s.f & Ge) === 0 && (s = s.first, (t & de) !== 0 && (t & _t) !== 0 && s !== null && (s.f |= _t)), s !== null && (s.parent = r, r !== null && Zr(s, r), _ !== null && (_.f & x) !== 0 && (t & Ce) === 0)) {
|
|
1177
1187
|
var o = (
|
|
1178
1188
|
/** @type {Derived} */
|
|
1179
1189
|
_
|
|
1180
1190
|
);
|
|
1181
1191
|
(o.effects ?? (o.effects = [])).push(s);
|
|
1182
1192
|
}
|
|
1183
|
-
return
|
|
1193
|
+
return i;
|
|
1184
1194
|
}
|
|
1185
|
-
function
|
|
1186
|
-
return _ !== null && !
|
|
1195
|
+
function Gt() {
|
|
1196
|
+
return _ !== null && !U;
|
|
1187
1197
|
}
|
|
1188
|
-
function
|
|
1189
|
-
|
|
1198
|
+
function ct(t) {
|
|
1199
|
+
Xr();
|
|
1190
1200
|
var e = (
|
|
1191
1201
|
/** @type {Effect} */
|
|
1192
1202
|
w.f
|
|
1193
|
-
), n = !_ && (e &
|
|
1203
|
+
), n = !_ && (e & ge) !== 0 && (e & ze) === 0;
|
|
1194
1204
|
if (n) {
|
|
1195
|
-
var
|
|
1205
|
+
var r = (
|
|
1196
1206
|
/** @type {ComponentContext} */
|
|
1197
|
-
|
|
1207
|
+
Y
|
|
1198
1208
|
);
|
|
1199
|
-
(
|
|
1209
|
+
(r.e ?? (r.e = [])).push(t);
|
|
1200
1210
|
} else
|
|
1201
|
-
return
|
|
1211
|
+
return Hn(t);
|
|
1202
1212
|
}
|
|
1203
|
-
function
|
|
1204
|
-
return
|
|
1213
|
+
function Hn(t) {
|
|
1214
|
+
return Ve(vt | _r, t, !1);
|
|
1205
1215
|
}
|
|
1206
|
-
function
|
|
1207
|
-
|
|
1208
|
-
const e =
|
|
1216
|
+
function ei(t) {
|
|
1217
|
+
he.ensure();
|
|
1218
|
+
const e = Ve(Ce | Ge, t, !0);
|
|
1209
1219
|
return () => {
|
|
1210
|
-
|
|
1220
|
+
K(e);
|
|
1211
1221
|
};
|
|
1212
1222
|
}
|
|
1213
|
-
function
|
|
1214
|
-
|
|
1215
|
-
const e =
|
|
1216
|
-
return (n = {}) => new Promise((
|
|
1217
|
-
n.outro ?
|
|
1218
|
-
|
|
1219
|
-
}) : (
|
|
1223
|
+
function ti(t) {
|
|
1224
|
+
he.ensure();
|
|
1225
|
+
const e = Ve(Ce | Ge, t, !0);
|
|
1226
|
+
return (n = {}) => new Promise((r) => {
|
|
1227
|
+
n.outro ? ft(e, () => {
|
|
1228
|
+
K(e), r(void 0);
|
|
1229
|
+
}) : (K(e), r(void 0));
|
|
1220
1230
|
});
|
|
1221
1231
|
}
|
|
1222
|
-
function
|
|
1223
|
-
return
|
|
1232
|
+
function zn(t, e = 0) {
|
|
1233
|
+
return Ve(fn | e, t, !0);
|
|
1224
1234
|
}
|
|
1225
|
-
function
|
|
1226
|
-
var n =
|
|
1235
|
+
function ni(t, e = 0) {
|
|
1236
|
+
var n = Ve(de | e, t, !0);
|
|
1227
1237
|
return n;
|
|
1228
1238
|
}
|
|
1229
|
-
function
|
|
1230
|
-
return
|
|
1239
|
+
function Oe(t) {
|
|
1240
|
+
return Ve(ge | Ge, t, !0);
|
|
1231
1241
|
}
|
|
1232
|
-
function
|
|
1242
|
+
function Gn(t) {
|
|
1233
1243
|
var e = t.teardown;
|
|
1234
1244
|
if (e !== null) {
|
|
1235
|
-
const n = be,
|
|
1236
|
-
|
|
1245
|
+
const n = be, r = _;
|
|
1246
|
+
Xt(!0), re(null);
|
|
1237
1247
|
try {
|
|
1238
1248
|
e.call(null);
|
|
1239
1249
|
} finally {
|
|
1240
|
-
|
|
1250
|
+
Xt(n), re(r);
|
|
1241
1251
|
}
|
|
1242
1252
|
}
|
|
1243
1253
|
}
|
|
1244
|
-
function
|
|
1254
|
+
function Yt(t, e = !1) {
|
|
1245
1255
|
var n = t.first;
|
|
1246
1256
|
for (t.first = t.last = null; n !== null; ) {
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1249
|
-
|
|
1257
|
+
const i = n.ac;
|
|
1258
|
+
i !== null && Pn(() => {
|
|
1259
|
+
i.abort(jt);
|
|
1250
1260
|
});
|
|
1251
|
-
var
|
|
1252
|
-
(n.f & Ce) !== 0 ? n.parent = null :
|
|
1261
|
+
var r = n.next;
|
|
1262
|
+
(n.f & Ce) !== 0 ? n.parent = null : K(n, e), n = r;
|
|
1253
1263
|
}
|
|
1254
1264
|
}
|
|
1255
|
-
function
|
|
1265
|
+
function ri(t) {
|
|
1256
1266
|
for (var e = t.first; e !== null; ) {
|
|
1257
1267
|
var n = e.next;
|
|
1258
|
-
(e.f &
|
|
1268
|
+
(e.f & ge) === 0 && K(e), e = n;
|
|
1259
1269
|
}
|
|
1260
1270
|
}
|
|
1261
|
-
function
|
|
1271
|
+
function K(t, e = !0) {
|
|
1262
1272
|
var n = !1;
|
|
1263
|
-
(e || (t.f &
|
|
1273
|
+
(e || (t.f & dn) !== 0) && t.nodes !== null && t.nodes.end !== null && (ii(
|
|
1264
1274
|
t.nodes.start,
|
|
1265
1275
|
/** @type {TemplateNode} */
|
|
1266
1276
|
t.nodes.end
|
|
1267
|
-
), n = !0),
|
|
1268
|
-
var
|
|
1269
|
-
if (
|
|
1270
|
-
for (const s of
|
|
1277
|
+
), n = !0), Yt(t, e && !n), Ze(t, 0), E(t, _e);
|
|
1278
|
+
var r = t.nodes && t.nodes.t;
|
|
1279
|
+
if (r !== null)
|
|
1280
|
+
for (const s of r)
|
|
1271
1281
|
s.stop();
|
|
1272
|
-
|
|
1273
|
-
var
|
|
1274
|
-
|
|
1282
|
+
Gn(t);
|
|
1283
|
+
var i = t.parent;
|
|
1284
|
+
i !== null && i.first !== null && Yn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1275
1285
|
}
|
|
1276
|
-
function
|
|
1286
|
+
function ii(t, e) {
|
|
1277
1287
|
for (; t !== null; ) {
|
|
1278
|
-
var n = t === e ? null : /* @__PURE__ */
|
|
1288
|
+
var n = t === e ? null : /* @__PURE__ */ Ye(t);
|
|
1279
1289
|
t.remove(), t = n;
|
|
1280
1290
|
}
|
|
1281
1291
|
}
|
|
1282
|
-
function
|
|
1283
|
-
var e = t.parent, n = t.prev,
|
|
1284
|
-
n !== null && (n.next =
|
|
1285
|
-
}
|
|
1286
|
-
function
|
|
1287
|
-
var
|
|
1288
|
-
|
|
1289
|
-
var
|
|
1290
|
-
n &&
|
|
1291
|
-
}, s =
|
|
1292
|
+
function Yn(t) {
|
|
1293
|
+
var e = t.parent, n = t.prev, r = t.next;
|
|
1294
|
+
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
1295
|
+
}
|
|
1296
|
+
function ft(t, e, n = !0) {
|
|
1297
|
+
var r = [];
|
|
1298
|
+
Vn(t, r, !0);
|
|
1299
|
+
var i = () => {
|
|
1300
|
+
n && K(t), e && e();
|
|
1301
|
+
}, s = r.length;
|
|
1292
1302
|
if (s > 0) {
|
|
1293
|
-
var o = () => --s ||
|
|
1294
|
-
for (var
|
|
1295
|
-
|
|
1303
|
+
var o = () => --s || i();
|
|
1304
|
+
for (var l of r)
|
|
1305
|
+
l.out(o);
|
|
1296
1306
|
} else
|
|
1297
|
-
|
|
1307
|
+
i();
|
|
1298
1308
|
}
|
|
1299
|
-
function
|
|
1309
|
+
function Vn(t, e, n) {
|
|
1300
1310
|
if ((t.f & ve) === 0) {
|
|
1301
1311
|
t.f ^= ve;
|
|
1302
|
-
var
|
|
1303
|
-
if (
|
|
1304
|
-
for (const
|
|
1305
|
-
(
|
|
1306
|
-
for (var
|
|
1307
|
-
var s =
|
|
1312
|
+
var r = t.nodes && t.nodes.t;
|
|
1313
|
+
if (r !== null)
|
|
1314
|
+
for (const l of r)
|
|
1315
|
+
(l.is_global || n) && e.push(l);
|
|
1316
|
+
for (var i = t.first; i !== null; ) {
|
|
1317
|
+
var s = i.next, o = (i.f & _t) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1308
1318
|
// it means the parent block effect was pruned. In that case,
|
|
1309
1319
|
// transparency information was transferred to the branch effect.
|
|
1310
|
-
(
|
|
1311
|
-
|
|
1320
|
+
(i.f & ge) !== 0 && (t.f & de) !== 0;
|
|
1321
|
+
Vn(i, e, o ? n : !1), i = s;
|
|
1312
1322
|
}
|
|
1313
1323
|
}
|
|
1314
1324
|
}
|
|
1315
|
-
function
|
|
1325
|
+
function si(t, e) {
|
|
1316
1326
|
if (t.nodes)
|
|
1317
|
-
for (var n = t.nodes.start,
|
|
1318
|
-
var
|
|
1319
|
-
e.append(n), n =
|
|
1327
|
+
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1328
|
+
var i = n === r ? null : /* @__PURE__ */ Ye(n);
|
|
1329
|
+
e.append(n), n = i;
|
|
1320
1330
|
}
|
|
1321
1331
|
}
|
|
1322
|
-
let
|
|
1323
|
-
function
|
|
1332
|
+
let ht = !1, be = !1;
|
|
1333
|
+
function Xt(t) {
|
|
1324
1334
|
be = t;
|
|
1325
1335
|
}
|
|
1326
|
-
let _ = null,
|
|
1327
|
-
function
|
|
1336
|
+
let _ = null, U = !1;
|
|
1337
|
+
function re(t) {
|
|
1328
1338
|
_ = t;
|
|
1329
1339
|
}
|
|
1330
1340
|
let w = null;
|
|
1331
1341
|
function we(t) {
|
|
1332
1342
|
w = t;
|
|
1333
1343
|
}
|
|
1334
|
-
let
|
|
1335
|
-
function
|
|
1336
|
-
_ !== null && (
|
|
1344
|
+
let G = null;
|
|
1345
|
+
function Un(t) {
|
|
1346
|
+
_ !== null && (G === null ? G = [t] : G.push(t));
|
|
1337
1347
|
}
|
|
1338
|
-
let
|
|
1339
|
-
function
|
|
1340
|
-
|
|
1348
|
+
let F = null, D = 0, q = null;
|
|
1349
|
+
function oi(t) {
|
|
1350
|
+
q = t;
|
|
1341
1351
|
}
|
|
1342
|
-
let
|
|
1343
|
-
function
|
|
1344
|
-
|
|
1352
|
+
let Kn = 1, Ee = 0, Te = Ee;
|
|
1353
|
+
function Zt(t) {
|
|
1354
|
+
Te = t;
|
|
1345
1355
|
}
|
|
1346
|
-
function
|
|
1347
|
-
return ++
|
|
1356
|
+
function Wn() {
|
|
1357
|
+
return ++Kn;
|
|
1348
1358
|
}
|
|
1349
|
-
function
|
|
1359
|
+
function rt(t) {
|
|
1350
1360
|
var e = t.f;
|
|
1351
|
-
if ((e &
|
|
1361
|
+
if ((e & N) !== 0)
|
|
1352
1362
|
return !0;
|
|
1353
|
-
if (e &
|
|
1363
|
+
if (e & x && (t.f &= ~Re), (e & W) !== 0) {
|
|
1354
1364
|
for (var n = (
|
|
1355
1365
|
/** @type {Value[]} */
|
|
1356
1366
|
t.deps
|
|
1357
|
-
),
|
|
1358
|
-
var s = n[
|
|
1359
|
-
if (
|
|
1367
|
+
), r = n.length, i = 0; i < r; i++) {
|
|
1368
|
+
var s = n[i];
|
|
1369
|
+
if (rt(
|
|
1360
1370
|
/** @type {Derived} */
|
|
1361
1371
|
s
|
|
1362
|
-
) &&
|
|
1372
|
+
) && In(
|
|
1363
1373
|
/** @type {Derived} */
|
|
1364
1374
|
s
|
|
1365
1375
|
), s.wv > t.wv)
|
|
1366
1376
|
return !0;
|
|
1367
1377
|
}
|
|
1368
|
-
(e &
|
|
1378
|
+
(e & z) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1369
1379
|
// traversal of the graph in the other batches still happens
|
|
1370
|
-
|
|
1380
|
+
V === null && E(t, R);
|
|
1371
1381
|
}
|
|
1372
1382
|
return !1;
|
|
1373
1383
|
}
|
|
1374
|
-
function
|
|
1375
|
-
var
|
|
1376
|
-
if (
|
|
1377
|
-
for (var
|
|
1378
|
-
var s = i
|
|
1379
|
-
(s.f &
|
|
1384
|
+
function Qn(t, e, n = !0) {
|
|
1385
|
+
var r = t.reactions;
|
|
1386
|
+
if (r !== null && !(G !== null && Pe.call(G, t)))
|
|
1387
|
+
for (var i = 0; i < r.length; i++) {
|
|
1388
|
+
var s = r[i];
|
|
1389
|
+
(s.f & x) !== 0 ? Qn(
|
|
1380
1390
|
/** @type {Derived} */
|
|
1381
1391
|
s,
|
|
1382
1392
|
e,
|
|
1383
1393
|
!1
|
|
1384
|
-
) : e === s && (n ?
|
|
1394
|
+
) : e === s && (n ? E(s, N) : (s.f & R) !== 0 && E(s, W), ne(
|
|
1385
1395
|
/** @type {Effect} */
|
|
1386
1396
|
s
|
|
1387
1397
|
));
|
|
1388
1398
|
}
|
|
1389
1399
|
}
|
|
1390
|
-
function
|
|
1391
|
-
var
|
|
1392
|
-
var e =
|
|
1393
|
-
|
|
1394
|
-
null, D = 0,
|
|
1395
|
-
t.ac.abort(
|
|
1400
|
+
function Jn(t) {
|
|
1401
|
+
var $;
|
|
1402
|
+
var e = F, n = D, r = q, i = _, s = G, o = Y, l = U, u = Te, c = t.f;
|
|
1403
|
+
F = /** @type {null | Value[]} */
|
|
1404
|
+
null, D = 0, q = null, _ = (c & (ge | Ce)) === 0 ? t : null, G = null, yt(t.ctx), U = !1, Te = ++Ee, t.ac !== null && (Pn(() => {
|
|
1405
|
+
t.ac.abort(jt);
|
|
1396
1406
|
}), t.ac = null);
|
|
1397
1407
|
try {
|
|
1398
|
-
t.f |=
|
|
1399
|
-
var
|
|
1408
|
+
t.f |= Rt;
|
|
1409
|
+
var f = (
|
|
1400
1410
|
/** @type {Function} */
|
|
1401
1411
|
t.fn
|
|
1402
|
-
),
|
|
1403
|
-
t.f |=
|
|
1404
|
-
var
|
|
1405
|
-
if (
|
|
1406
|
-
var
|
|
1407
|
-
if (
|
|
1408
|
-
for (
|
|
1409
|
-
|
|
1412
|
+
), d = f();
|
|
1413
|
+
t.f |= ze;
|
|
1414
|
+
var h = t.deps, m = A?.is_fork;
|
|
1415
|
+
if (F !== null) {
|
|
1416
|
+
var p;
|
|
1417
|
+
if (m || Ze(t, D), h !== null && D > 0)
|
|
1418
|
+
for (h.length = D + F.length, p = 0; p < F.length; p++)
|
|
1419
|
+
h[D + p] = F[p];
|
|
1410
1420
|
else
|
|
1411
|
-
t.deps =
|
|
1412
|
-
if (
|
|
1413
|
-
for (
|
|
1414
|
-
((
|
|
1415
|
-
} else !
|
|
1416
|
-
if (
|
|
1417
|
-
for (
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
+
t.deps = h = F;
|
|
1422
|
+
if (Gt() && (t.f & z) !== 0)
|
|
1423
|
+
for (p = D; p < h.length; p++)
|
|
1424
|
+
(($ = h[p]).reactions ?? ($.reactions = [])).push(t);
|
|
1425
|
+
} else !m && h !== null && D < h.length && (Ze(t, D), h.length = D);
|
|
1426
|
+
if (bn() && q !== null && !U && h !== null && (t.f & (x | W | N)) === 0)
|
|
1427
|
+
for (p = 0; p < /** @type {Source[]} */
|
|
1428
|
+
q.length; p++)
|
|
1429
|
+
Qn(
|
|
1430
|
+
q[p],
|
|
1421
1431
|
/** @type {Effect} */
|
|
1422
1432
|
t
|
|
1423
1433
|
);
|
|
1424
|
-
if (
|
|
1425
|
-
if (
|
|
1426
|
-
for (let
|
|
1427
|
-
|
|
1434
|
+
if (i !== null && i !== t) {
|
|
1435
|
+
if (Ee++, i.deps !== null)
|
|
1436
|
+
for (let C = 0; C < n; C += 1)
|
|
1437
|
+
i.deps[C].rv = Ee;
|
|
1428
1438
|
if (e !== null)
|
|
1429
|
-
for (const
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1439
|
+
for (const C of e)
|
|
1440
|
+
C.rv = Ee;
|
|
1441
|
+
q !== null && (r === null ? r = q : r.push(.../** @type {Source[]} */
|
|
1442
|
+
q));
|
|
1433
1443
|
}
|
|
1434
|
-
return (t.f &
|
|
1435
|
-
} catch (
|
|
1436
|
-
return
|
|
1444
|
+
return (t.f & Je) !== 0 && (t.f ^= Je), d;
|
|
1445
|
+
} catch (C) {
|
|
1446
|
+
return Cn(C);
|
|
1437
1447
|
} finally {
|
|
1438
|
-
t.f ^=
|
|
1448
|
+
t.f ^= Rt, F = e, D = n, q = r, _ = i, G = s, yt(o), U = l, Te = u;
|
|
1439
1449
|
}
|
|
1440
1450
|
}
|
|
1441
|
-
function
|
|
1451
|
+
function li(t, e) {
|
|
1442
1452
|
let n = e.reactions;
|
|
1443
1453
|
if (n !== null) {
|
|
1444
|
-
var
|
|
1445
|
-
if (
|
|
1446
|
-
var
|
|
1447
|
-
|
|
1454
|
+
var r = cr.call(n, t);
|
|
1455
|
+
if (r !== -1) {
|
|
1456
|
+
var i = n.length - 1;
|
|
1457
|
+
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
1448
1458
|
}
|
|
1449
1459
|
}
|
|
1450
|
-
if (n === null && (e.f &
|
|
1460
|
+
if (n === null && (e.f & x) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1451
1461
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1452
1462
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1453
|
-
(
|
|
1463
|
+
(F === null || !Pe.call(F, e))) {
|
|
1454
1464
|
var s = (
|
|
1455
1465
|
/** @type {Derived} */
|
|
1456
1466
|
e
|
|
1457
1467
|
);
|
|
1458
|
-
(s.f &
|
|
1468
|
+
(s.f & z) !== 0 && (s.f ^= z, s.f &= ~Re), Ht(s), Vr(s), Ze(s, 0);
|
|
1459
1469
|
}
|
|
1460
1470
|
}
|
|
1461
|
-
function
|
|
1471
|
+
function Ze(t, e) {
|
|
1462
1472
|
var n = t.deps;
|
|
1463
1473
|
if (n !== null)
|
|
1464
|
-
for (var
|
|
1465
|
-
|
|
1474
|
+
for (var r = e; r < n.length; r++)
|
|
1475
|
+
li(t, n[r]);
|
|
1466
1476
|
}
|
|
1467
|
-
function
|
|
1477
|
+
function He(t) {
|
|
1468
1478
|
var e = t.f;
|
|
1469
1479
|
if ((e & _e) === 0) {
|
|
1470
|
-
|
|
1471
|
-
var n = w,
|
|
1472
|
-
w = t,
|
|
1480
|
+
E(t, R);
|
|
1481
|
+
var n = w, r = ht;
|
|
1482
|
+
w = t, ht = !0;
|
|
1473
1483
|
try {
|
|
1474
|
-
(e & (
|
|
1475
|
-
var
|
|
1476
|
-
t.teardown = typeof
|
|
1484
|
+
(e & (de | hn)) !== 0 ? ri(t) : Yt(t), Gn(t);
|
|
1485
|
+
var i = Jn(t);
|
|
1486
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = Kn;
|
|
1477
1487
|
var s;
|
|
1478
|
-
|
|
1488
|
+
xt && Fr && (t.f & N) !== 0 && t.deps;
|
|
1479
1489
|
} finally {
|
|
1480
|
-
|
|
1490
|
+
ht = r, w = n;
|
|
1481
1491
|
}
|
|
1482
1492
|
}
|
|
1483
1493
|
}
|
|
1484
1494
|
function y(t) {
|
|
1485
|
-
var e = t.f, n = (e &
|
|
1486
|
-
if (_ !== null && !
|
|
1487
|
-
var
|
|
1488
|
-
if (!
|
|
1489
|
-
var
|
|
1490
|
-
if ((_.f &
|
|
1491
|
-
t.rv <
|
|
1495
|
+
var e = t.f, n = (e & x) !== 0;
|
|
1496
|
+
if (_ !== null && !U) {
|
|
1497
|
+
var r = w !== null && (w.f & _e) !== 0;
|
|
1498
|
+
if (!r && (G === null || !Pe.call(G, t))) {
|
|
1499
|
+
var i = _.deps;
|
|
1500
|
+
if ((_.f & Rt) !== 0)
|
|
1501
|
+
t.rv < Ee && (t.rv = Ee, F === null && i !== null && i[D] === t ? D++ : F === null ? F = [t] : F.push(t));
|
|
1492
1502
|
else {
|
|
1493
1503
|
(_.deps ?? (_.deps = [])).push(t);
|
|
1494
1504
|
var s = t.reactions;
|
|
1495
|
-
s === null ? t.reactions = [_] :
|
|
1505
|
+
s === null ? t.reactions = [_] : Pe.call(s, _) || s.push(_);
|
|
1496
1506
|
}
|
|
1497
1507
|
}
|
|
1498
1508
|
}
|
|
@@ -1504,125 +1514,125 @@ function y(t) {
|
|
|
1504
1514
|
t
|
|
1505
1515
|
);
|
|
1506
1516
|
if (be) {
|
|
1507
|
-
var
|
|
1508
|
-
return ((o.f &
|
|
1517
|
+
var l = o.v;
|
|
1518
|
+
return ((o.f & R) === 0 && o.reactions !== null || Zn(o)) && (l = zt(o)), ye.set(o, l), l;
|
|
1509
1519
|
}
|
|
1510
|
-
var u = (o.f &
|
|
1511
|
-
|
|
1520
|
+
var u = (o.f & z) === 0 && !U && _ !== null && (ht || (_.f & z) !== 0), c = (o.f & ze) === 0;
|
|
1521
|
+
rt(o) && (u && (o.f |= z), In(o)), u && !c && (Ln(o), Xn(o));
|
|
1512
1522
|
}
|
|
1513
|
-
if (
|
|
1514
|
-
return
|
|
1515
|
-
if ((t.f &
|
|
1523
|
+
if (V?.has(t))
|
|
1524
|
+
return V.get(t);
|
|
1525
|
+
if ((t.f & Je) !== 0)
|
|
1516
1526
|
throw t.v;
|
|
1517
1527
|
return t.v;
|
|
1518
1528
|
}
|
|
1519
|
-
function
|
|
1520
|
-
if (t.f |=
|
|
1529
|
+
function Xn(t) {
|
|
1530
|
+
if (t.f |= z, t.deps !== null)
|
|
1521
1531
|
for (const e of t.deps)
|
|
1522
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f &
|
|
1532
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & x) !== 0 && (e.f & z) === 0 && (Ln(
|
|
1523
1533
|
/** @type {Derived} */
|
|
1524
1534
|
e
|
|
1525
|
-
),
|
|
1535
|
+
), Xn(
|
|
1526
1536
|
/** @type {Derived} */
|
|
1527
1537
|
e
|
|
1528
1538
|
));
|
|
1529
1539
|
}
|
|
1530
|
-
function
|
|
1531
|
-
if (t.v ===
|
|
1540
|
+
function Zn(t) {
|
|
1541
|
+
if (t.v === T) return !0;
|
|
1532
1542
|
if (t.deps === null) return !1;
|
|
1533
1543
|
for (const e of t.deps)
|
|
1534
|
-
if (ye.has(e) || (e.f &
|
|
1544
|
+
if (ye.has(e) || (e.f & x) !== 0 && Zn(
|
|
1535
1545
|
/** @type {Derived} */
|
|
1536
1546
|
e
|
|
1537
1547
|
))
|
|
1538
1548
|
return !0;
|
|
1539
1549
|
return !1;
|
|
1540
1550
|
}
|
|
1541
|
-
function
|
|
1542
|
-
var e =
|
|
1551
|
+
function er(t) {
|
|
1552
|
+
var e = U;
|
|
1543
1553
|
try {
|
|
1544
|
-
return
|
|
1554
|
+
return U = !0, t();
|
|
1545
1555
|
} finally {
|
|
1546
|
-
|
|
1556
|
+
U = e;
|
|
1547
1557
|
}
|
|
1548
1558
|
}
|
|
1549
|
-
const
|
|
1550
|
-
let
|
|
1551
|
-
function
|
|
1559
|
+
const lt = /* @__PURE__ */ Symbol("events"), ai = /* @__PURE__ */ new Set(), en = /* @__PURE__ */ new Set();
|
|
1560
|
+
let tn = null;
|
|
1561
|
+
function nn(t) {
|
|
1552
1562
|
var e = this, n = (
|
|
1553
1563
|
/** @type {Node} */
|
|
1554
1564
|
e.ownerDocument
|
|
1555
|
-
),
|
|
1565
|
+
), r = t.type, i = t.composedPath?.() || [], s = (
|
|
1556
1566
|
/** @type {null | Element} */
|
|
1557
|
-
|
|
1567
|
+
i[0] || t.target
|
|
1558
1568
|
);
|
|
1559
|
-
|
|
1560
|
-
var o = 0,
|
|
1561
|
-
if (
|
|
1562
|
-
var u =
|
|
1569
|
+
tn = t;
|
|
1570
|
+
var o = 0, l = tn === t && t[lt];
|
|
1571
|
+
if (l) {
|
|
1572
|
+
var u = i.indexOf(l);
|
|
1563
1573
|
if (u !== -1 && (e === document || e === /** @type {any} */
|
|
1564
1574
|
window)) {
|
|
1565
|
-
t
|
|
1575
|
+
t[lt] = e;
|
|
1566
1576
|
return;
|
|
1567
1577
|
}
|
|
1568
|
-
var c =
|
|
1578
|
+
var c = i.indexOf(e);
|
|
1569
1579
|
if (c === -1)
|
|
1570
1580
|
return;
|
|
1571
1581
|
u <= c && (o = u);
|
|
1572
1582
|
}
|
|
1573
1583
|
if (s = /** @type {Element} */
|
|
1574
|
-
|
|
1575
|
-
|
|
1584
|
+
i[o] || t.target, s !== e) {
|
|
1585
|
+
mt(t, "currentTarget", {
|
|
1576
1586
|
configurable: !0,
|
|
1577
1587
|
get() {
|
|
1578
1588
|
return s || n;
|
|
1579
1589
|
}
|
|
1580
1590
|
});
|
|
1581
|
-
var
|
|
1582
|
-
|
|
1591
|
+
var f = _, d = w;
|
|
1592
|
+
re(null), we(null);
|
|
1583
1593
|
try {
|
|
1584
|
-
for (var
|
|
1585
|
-
var
|
|
1594
|
+
for (var h, m = []; s !== null; ) {
|
|
1595
|
+
var p = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1586
1596
|
s.host || null;
|
|
1587
1597
|
try {
|
|
1588
|
-
var
|
|
1589
|
-
|
|
1598
|
+
var $ = s[lt]?.[r];
|
|
1599
|
+
$ != null && (!/** @type {any} */
|
|
1590
1600
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1591
1601
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1592
|
-
t.target === s) &&
|
|
1593
|
-
} catch (
|
|
1594
|
-
|
|
1602
|
+
t.target === s) && $.call(s, t);
|
|
1603
|
+
} catch (C) {
|
|
1604
|
+
h ? m.push(C) : h = C;
|
|
1595
1605
|
}
|
|
1596
|
-
if (t.cancelBubble ||
|
|
1606
|
+
if (t.cancelBubble || p === e || p === null)
|
|
1597
1607
|
break;
|
|
1598
|
-
s =
|
|
1608
|
+
s = p;
|
|
1599
1609
|
}
|
|
1600
|
-
if (
|
|
1601
|
-
for (let
|
|
1610
|
+
if (h) {
|
|
1611
|
+
for (let C of m)
|
|
1602
1612
|
queueMicrotask(() => {
|
|
1603
|
-
throw
|
|
1613
|
+
throw C;
|
|
1604
1614
|
});
|
|
1605
|
-
throw
|
|
1615
|
+
throw h;
|
|
1606
1616
|
}
|
|
1607
1617
|
} finally {
|
|
1608
|
-
t
|
|
1618
|
+
t[lt] = e, delete t.currentTarget, re(f), we(d);
|
|
1609
1619
|
}
|
|
1610
1620
|
}
|
|
1611
1621
|
}
|
|
1612
|
-
function
|
|
1622
|
+
function ui(t, e) {
|
|
1613
1623
|
var n = (
|
|
1614
1624
|
/** @type {Effect} */
|
|
1615
1625
|
w
|
|
1616
1626
|
);
|
|
1617
1627
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1618
1628
|
}
|
|
1619
|
-
function
|
|
1629
|
+
function ci(t, e) {
|
|
1620
1630
|
if (te) {
|
|
1621
1631
|
var n = (
|
|
1622
1632
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1623
1633
|
w
|
|
1624
1634
|
);
|
|
1625
|
-
((n.f &
|
|
1635
|
+
((n.f & ze) === 0 || n.nodes.end === null) && (n.nodes.end = M), mn();
|
|
1626
1636
|
return;
|
|
1627
1637
|
}
|
|
1628
1638
|
t !== null && t.before(
|
|
@@ -1630,148 +1640,148 @@ function hr(t, e) {
|
|
|
1630
1640
|
e
|
|
1631
1641
|
);
|
|
1632
1642
|
}
|
|
1633
|
-
const
|
|
1634
|
-
function
|
|
1635
|
-
return
|
|
1643
|
+
const fi = ["touchstart", "touchmove"];
|
|
1644
|
+
function hi(t) {
|
|
1645
|
+
return fi.includes(t);
|
|
1636
1646
|
}
|
|
1637
|
-
function
|
|
1638
|
-
return
|
|
1647
|
+
function tr(t, e) {
|
|
1648
|
+
return nr(t, e);
|
|
1639
1649
|
}
|
|
1640
|
-
function
|
|
1641
|
-
|
|
1642
|
-
const n = e.target,
|
|
1650
|
+
function di(t, e) {
|
|
1651
|
+
Bt(), e.intro = e.intro ?? !1;
|
|
1652
|
+
const n = e.target, r = te, i = M;
|
|
1643
1653
|
try {
|
|
1644
|
-
for (var s = /* @__PURE__ */
|
|
1645
|
-
s.data !==
|
|
1646
|
-
s = /* @__PURE__ */
|
|
1654
|
+
for (var s = /* @__PURE__ */ Wr(n); s && (s.nodeType !== Pt || /** @type {Comment} */
|
|
1655
|
+
s.data !== an); )
|
|
1656
|
+
s = /* @__PURE__ */ Ye(s);
|
|
1647
1657
|
if (!s)
|
|
1648
|
-
throw
|
|
1649
|
-
|
|
1658
|
+
throw gt;
|
|
1659
|
+
st(!0), Xe(
|
|
1650
1660
|
/** @type {Comment} */
|
|
1651
1661
|
s
|
|
1652
1662
|
);
|
|
1653
|
-
const o =
|
|
1654
|
-
return
|
|
1663
|
+
const o = nr(t, { ...e, anchor: s });
|
|
1664
|
+
return st(!1), /** @type {Exports} */
|
|
1655
1665
|
o;
|
|
1656
1666
|
} catch (o) {
|
|
1657
1667
|
if (o instanceof Error && o.message.split(`
|
|
1658
|
-
`).some((
|
|
1668
|
+
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1659
1669
|
throw o;
|
|
1660
|
-
return o !==
|
|
1670
|
+
return o !== gt && console.warn("Failed to hydrate: ", o), e.recover === !1 && $r(), Bt(), Qr(n), st(!1), tr(t, e);
|
|
1661
1671
|
} finally {
|
|
1662
|
-
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
const
|
|
1666
|
-
function
|
|
1667
|
-
|
|
1668
|
-
var
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
if (!a.has(g)) {
|
|
1672
|
-
a.add(g);
|
|
1673
|
-
var v = gr(g);
|
|
1674
|
-
for (const se of [e, document]) {
|
|
1675
|
-
var S = ut.get(se);
|
|
1676
|
-
S === void 0 && (S = /* @__PURE__ */ new Map(), ut.set(se, S));
|
|
1677
|
-
var E = S.get(g);
|
|
1678
|
-
E === void 0 ? (se.addEventListener(g, rn, { passive: v }), S.set(g, 1)) : S.set(g, E + 1);
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
};
|
|
1683
|
-
u(di(cr)), tn.add(u);
|
|
1684
|
-
var c = void 0, h = ir(() => {
|
|
1685
|
-
var f = n ?? e.appendChild(Hn());
|
|
1686
|
-
return zi(
|
|
1672
|
+
st(r), Xe(i);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
const at = /* @__PURE__ */ new Map();
|
|
1676
|
+
function nr(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: o = !0 }) {
|
|
1677
|
+
Bt();
|
|
1678
|
+
var l = void 0, u = ti(() => {
|
|
1679
|
+
var c = n ?? e.appendChild(jn());
|
|
1680
|
+
Pr(
|
|
1687
1681
|
/** @type {TemplateNode} */
|
|
1688
|
-
|
|
1682
|
+
c,
|
|
1689
1683
|
{
|
|
1690
1684
|
pending: () => {
|
|
1691
1685
|
}
|
|
1692
1686
|
},
|
|
1693
|
-
(
|
|
1694
|
-
|
|
1695
|
-
var
|
|
1687
|
+
(h) => {
|
|
1688
|
+
_n({});
|
|
1689
|
+
var m = (
|
|
1696
1690
|
/** @type {ComponentContext} */
|
|
1697
|
-
|
|
1691
|
+
Y
|
|
1698
1692
|
);
|
|
1699
|
-
if (s && (
|
|
1693
|
+
if (s && (m.c = s), i && (r.$$events = i), te && ui(
|
|
1700
1694
|
/** @type {TemplateNode} */
|
|
1701
|
-
|
|
1695
|
+
h,
|
|
1702
1696
|
null
|
|
1703
|
-
),
|
|
1704
|
-
|
|
1705
|
-
throw
|
|
1706
|
-
|
|
1697
|
+
), l = t(h, r) || {}, te && (w.nodes.end = M, M === null || M.nodeType !== Pt || /** @type {Comment} */
|
|
1698
|
+
M.data !== cn))
|
|
1699
|
+
throw pn(), gt;
|
|
1700
|
+
yn();
|
|
1701
|
+
}
|
|
1702
|
+
);
|
|
1703
|
+
var f = /* @__PURE__ */ new Set(), d = (h) => {
|
|
1704
|
+
for (var m = 0; m < h.length; m++) {
|
|
1705
|
+
var p = h[m];
|
|
1706
|
+
if (!f.has(p)) {
|
|
1707
|
+
f.add(p);
|
|
1708
|
+
var $ = hi(p);
|
|
1709
|
+
for (const Q of [e, document]) {
|
|
1710
|
+
var C = at.get(Q);
|
|
1711
|
+
C === void 0 && (C = /* @__PURE__ */ new Map(), at.set(Q, C));
|
|
1712
|
+
var pe = C.get(p);
|
|
1713
|
+
pe === void 0 ? (Q.addEventListener(p, nn, { passive: $ }), C.set(p, 1)) : C.set(p, pe + 1);
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1707
1716
|
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1717
|
+
};
|
|
1718
|
+
return d(fr(ai)), en.add(d), () => {
|
|
1719
|
+
for (var h of f)
|
|
1720
|
+
for (const $ of [e, document]) {
|
|
1721
|
+
var m = (
|
|
1712
1722
|
/** @type {Map<string, number>} */
|
|
1713
|
-
|
|
1714
|
-
),
|
|
1723
|
+
at.get($)
|
|
1724
|
+
), p = (
|
|
1715
1725
|
/** @type {number} */
|
|
1716
|
-
|
|
1726
|
+
m.get(h)
|
|
1717
1727
|
);
|
|
1718
|
-
--
|
|
1728
|
+
--p == 0 ? ($.removeEventListener(h, nn), m.delete(h), m.size === 0 && at.delete($)) : m.set(h, p);
|
|
1719
1729
|
}
|
|
1720
|
-
|
|
1730
|
+
en.delete(d), c !== n && c.parentNode?.removeChild(c);
|
|
1721
1731
|
};
|
|
1722
1732
|
});
|
|
1723
|
-
return
|
|
1733
|
+
return Mt.set(l, u), l;
|
|
1724
1734
|
}
|
|
1725
|
-
let
|
|
1726
|
-
function
|
|
1727
|
-
const n =
|
|
1728
|
-
return n ? (
|
|
1735
|
+
let Mt = /* @__PURE__ */ new WeakMap();
|
|
1736
|
+
function gi(t, e) {
|
|
1737
|
+
const n = Mt.get(t);
|
|
1738
|
+
return n ? (Mt.delete(t), n(e)) : Promise.resolve();
|
|
1729
1739
|
}
|
|
1730
|
-
function
|
|
1731
|
-
|
|
1732
|
-
const e =
|
|
1740
|
+
function pi(t) {
|
|
1741
|
+
Y === null && br(), ct(() => {
|
|
1742
|
+
const e = er(t);
|
|
1733
1743
|
if (typeof e == "function") return (
|
|
1734
1744
|
/** @type {() => void} */
|
|
1735
1745
|
e
|
|
1736
1746
|
);
|
|
1737
1747
|
});
|
|
1738
1748
|
}
|
|
1739
|
-
function
|
|
1740
|
-
var
|
|
1749
|
+
function se(t, e, n, r) {
|
|
1750
|
+
var i = (
|
|
1741
1751
|
/** @type {V} */
|
|
1742
|
-
|
|
1743
|
-
), s = !0, o = () => (s && (s = !1,
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
t[e],
|
|
1752
|
+
r
|
|
1753
|
+
), s = !0, o = () => (s && (s = !1, i = /** @type {V} */
|
|
1754
|
+
r), i), l;
|
|
1755
|
+
l = /** @type {V} */
|
|
1756
|
+
t[e], l === void 0 && r !== void 0 && (l = o());
|
|
1747
1757
|
var u;
|
|
1748
1758
|
u = () => {
|
|
1749
|
-
var
|
|
1759
|
+
var h = (
|
|
1750
1760
|
/** @type {V} */
|
|
1751
1761
|
t[e]
|
|
1752
1762
|
);
|
|
1753
|
-
return
|
|
1763
|
+
return h === void 0 ? o() : (s = !0, h);
|
|
1754
1764
|
};
|
|
1755
|
-
var c = !1,
|
|
1765
|
+
var c = !1, f = /* @__PURE__ */ Nn(() => (c = !1, u())), d = (
|
|
1756
1766
|
/** @type {Effect} */
|
|
1757
1767
|
w
|
|
1758
1768
|
);
|
|
1759
1769
|
return (
|
|
1760
1770
|
/** @type {() => V} */
|
|
1761
|
-
(function(
|
|
1771
|
+
(function(h, m) {
|
|
1762
1772
|
if (arguments.length > 0) {
|
|
1763
|
-
const
|
|
1764
|
-
return
|
|
1773
|
+
const p = m ? y(f) : h;
|
|
1774
|
+
return k(f, p), c = !0, i !== void 0 && (i = p), h;
|
|
1765
1775
|
}
|
|
1766
|
-
return be && c || (
|
|
1776
|
+
return be && c || (d.f & _e) !== 0 ? f.v : y(f);
|
|
1767
1777
|
})
|
|
1768
1778
|
);
|
|
1769
1779
|
}
|
|
1770
|
-
function
|
|
1771
|
-
return new
|
|
1780
|
+
function mi(t) {
|
|
1781
|
+
return new vi(t);
|
|
1772
1782
|
}
|
|
1773
|
-
var
|
|
1774
|
-
class
|
|
1783
|
+
var fe, P;
|
|
1784
|
+
class vi {
|
|
1775
1785
|
/**
|
|
1776
1786
|
* @param {ComponentConstructorOptions & {
|
|
1777
1787
|
* component: any;
|
|
@@ -1779,56 +1789,56 @@ class yr {
|
|
|
1779
1789
|
*/
|
|
1780
1790
|
constructor(e) {
|
|
1781
1791
|
/** @type {any} */
|
|
1782
|
-
b(this,
|
|
1792
|
+
b(this, fe);
|
|
1783
1793
|
/** @type {Record<string, any>} */
|
|
1784
|
-
b(this,
|
|
1785
|
-
var n = /* @__PURE__ */ new Map(),
|
|
1786
|
-
var
|
|
1787
|
-
return n.set(s,
|
|
1794
|
+
b(this, P);
|
|
1795
|
+
var n = /* @__PURE__ */ new Map(), r = (s, o) => {
|
|
1796
|
+
var l = /* @__PURE__ */ Ur(o, !1, !1);
|
|
1797
|
+
return n.set(s, l), l;
|
|
1788
1798
|
};
|
|
1789
|
-
const
|
|
1799
|
+
const i = new Proxy(
|
|
1790
1800
|
{ ...e.props || {}, $$events: {} },
|
|
1791
1801
|
{
|
|
1792
1802
|
get(s, o) {
|
|
1793
|
-
return y(n.get(o) ??
|
|
1803
|
+
return y(n.get(o) ?? r(o, Reflect.get(s, o)));
|
|
1794
1804
|
},
|
|
1795
1805
|
has(s, o) {
|
|
1796
|
-
return o ===
|
|
1806
|
+
return o === yr ? !0 : (y(n.get(o) ?? r(o, Reflect.get(s, o))), Reflect.has(s, o));
|
|
1797
1807
|
},
|
|
1798
|
-
set(s, o,
|
|
1799
|
-
return
|
|
1808
|
+
set(s, o, l) {
|
|
1809
|
+
return k(n.get(o) ?? r(o, l), l), Reflect.set(s, o, l);
|
|
1800
1810
|
}
|
|
1801
1811
|
}
|
|
1802
1812
|
);
|
|
1803
|
-
|
|
1813
|
+
v(this, P, (e.hydrate ? di : tr)(e.component, {
|
|
1804
1814
|
target: e.target,
|
|
1805
1815
|
anchor: e.anchor,
|
|
1806
|
-
props:
|
|
1816
|
+
props: i,
|
|
1807
1817
|
context: e.context,
|
|
1808
1818
|
intro: e.intro ?? !1,
|
|
1809
1819
|
recover: e.recover
|
|
1810
|
-
})), (!e?.props?.$$host || e.sync === !1) && J(),
|
|
1811
|
-
for (const s of Object.keys(
|
|
1812
|
-
s === "$set" || s === "$destroy" || s === "$on" ||
|
|
1820
|
+
})), (!e?.props?.$$host || e.sync === !1) && J(), v(this, fe, i.$$events);
|
|
1821
|
+
for (const s of Object.keys(a(this, P)))
|
|
1822
|
+
s === "$set" || s === "$destroy" || s === "$on" || mt(this, s, {
|
|
1813
1823
|
get() {
|
|
1814
|
-
return
|
|
1824
|
+
return a(this, P)[s];
|
|
1815
1825
|
},
|
|
1816
1826
|
/** @param {any} value */
|
|
1817
1827
|
set(o) {
|
|
1818
|
-
|
|
1828
|
+
a(this, P)[s] = o;
|
|
1819
1829
|
},
|
|
1820
1830
|
enumerable: !0
|
|
1821
1831
|
});
|
|
1822
|
-
|
|
1832
|
+
a(this, P).$set = /** @param {Record<string, any>} next */
|
|
1823
1833
|
(s) => {
|
|
1824
|
-
Object.assign(
|
|
1825
|
-
},
|
|
1826
|
-
|
|
1834
|
+
Object.assign(i, s);
|
|
1835
|
+
}, a(this, P).$destroy = () => {
|
|
1836
|
+
gi(a(this, P));
|
|
1827
1837
|
};
|
|
1828
1838
|
}
|
|
1829
1839
|
/** @param {Record<string, any>} props */
|
|
1830
1840
|
$set(e) {
|
|
1831
|
-
|
|
1841
|
+
a(this, P).$set(e);
|
|
1832
1842
|
}
|
|
1833
1843
|
/**
|
|
1834
1844
|
* @param {string} event
|
|
@@ -1836,96 +1846,96 @@ class yr {
|
|
|
1836
1846
|
* @returns {any}
|
|
1837
1847
|
*/
|
|
1838
1848
|
$on(e, n) {
|
|
1839
|
-
|
|
1840
|
-
const
|
|
1841
|
-
return
|
|
1842
|
-
|
|
1849
|
+
a(this, fe)[e] = a(this, fe)[e] || [];
|
|
1850
|
+
const r = (...i) => n.call(this, ...i);
|
|
1851
|
+
return a(this, fe)[e].push(r), () => {
|
|
1852
|
+
a(this, fe)[e] = a(this, fe)[e].filter(
|
|
1843
1853
|
/** @param {any} fn */
|
|
1844
|
-
(
|
|
1854
|
+
(i) => i !== r
|
|
1845
1855
|
);
|
|
1846
1856
|
};
|
|
1847
1857
|
}
|
|
1848
1858
|
$destroy() {
|
|
1849
|
-
|
|
1859
|
+
a(this, P).$destroy();
|
|
1850
1860
|
}
|
|
1851
1861
|
}
|
|
1852
|
-
|
|
1853
|
-
let
|
|
1854
|
-
typeof HTMLElement == "function" && (
|
|
1862
|
+
fe = new WeakMap(), P = new WeakMap();
|
|
1863
|
+
let rr;
|
|
1864
|
+
typeof HTMLElement == "function" && (rr = class extends HTMLElement {
|
|
1855
1865
|
/**
|
|
1856
1866
|
* @param {*} $$componentCtor
|
|
1857
1867
|
* @param {*} $$slots
|
|
1858
1868
|
* @param {ShadowRootInit | undefined} shadow_root_init
|
|
1859
1869
|
*/
|
|
1860
|
-
constructor(e, n,
|
|
1870
|
+
constructor(e, n, r) {
|
|
1861
1871
|
super();
|
|
1862
1872
|
/** The Svelte component constructor */
|
|
1863
|
-
|
|
1873
|
+
g(this, "$$ctor");
|
|
1864
1874
|
/** Slots */
|
|
1865
|
-
|
|
1875
|
+
g(this, "$$s");
|
|
1866
1876
|
/** @type {any} The Svelte component instance */
|
|
1867
|
-
|
|
1877
|
+
g(this, "$$c");
|
|
1868
1878
|
/** Whether or not the custom element is connected */
|
|
1869
|
-
|
|
1879
|
+
g(this, "$$cn", !1);
|
|
1870
1880
|
/** @type {Record<string, any>} Component props data */
|
|
1871
|
-
|
|
1881
|
+
g(this, "$$d", {});
|
|
1872
1882
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1873
|
-
|
|
1883
|
+
g(this, "$$r", !1);
|
|
1874
1884
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1875
|
-
|
|
1885
|
+
g(this, "$$p_d", {});
|
|
1876
1886
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1877
|
-
|
|
1887
|
+
g(this, "$$l", {});
|
|
1878
1888
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1879
|
-
|
|
1889
|
+
g(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1880
1890
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
1881
|
-
|
|
1891
|
+
g(this, "$$me");
|
|
1882
1892
|
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
1883
|
-
|
|
1884
|
-
this.$$ctor = e, this.$$s = n,
|
|
1893
|
+
g(this, "$$shadowRoot", null);
|
|
1894
|
+
this.$$ctor = e, this.$$s = n, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
1885
1895
|
}
|
|
1886
1896
|
/**
|
|
1887
1897
|
* @param {string} type
|
|
1888
1898
|
* @param {EventListenerOrEventListenerObject} listener
|
|
1889
1899
|
* @param {boolean | AddEventListenerOptions} [options]
|
|
1890
1900
|
*/
|
|
1891
|
-
addEventListener(e, n,
|
|
1901
|
+
addEventListener(e, n, r) {
|
|
1892
1902
|
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(n), this.$$c) {
|
|
1893
|
-
const
|
|
1894
|
-
this.$$l_u.set(n,
|
|
1903
|
+
const i = this.$$c.$on(e, n);
|
|
1904
|
+
this.$$l_u.set(n, i);
|
|
1895
1905
|
}
|
|
1896
|
-
super.addEventListener(e, n,
|
|
1906
|
+
super.addEventListener(e, n, r);
|
|
1897
1907
|
}
|
|
1898
1908
|
/**
|
|
1899
1909
|
* @param {string} type
|
|
1900
1910
|
* @param {EventListenerOrEventListenerObject} listener
|
|
1901
1911
|
* @param {boolean | AddEventListenerOptions} [options]
|
|
1902
1912
|
*/
|
|
1903
|
-
removeEventListener(e, n,
|
|
1904
|
-
if (super.removeEventListener(e, n,
|
|
1905
|
-
const
|
|
1906
|
-
|
|
1913
|
+
removeEventListener(e, n, r) {
|
|
1914
|
+
if (super.removeEventListener(e, n, r), this.$$c) {
|
|
1915
|
+
const i = this.$$l_u.get(n);
|
|
1916
|
+
i && (i(), this.$$l_u.delete(n));
|
|
1907
1917
|
}
|
|
1908
1918
|
}
|
|
1909
1919
|
async connectedCallback() {
|
|
1910
1920
|
if (this.$$cn = !0, !this.$$c) {
|
|
1911
|
-
let e = function(
|
|
1921
|
+
let e = function(i) {
|
|
1912
1922
|
return (s) => {
|
|
1913
|
-
const o =
|
|
1914
|
-
|
|
1923
|
+
const o = Jr("slot");
|
|
1924
|
+
i !== "default" && (o.name = i), ci(s, o);
|
|
1915
1925
|
};
|
|
1916
1926
|
};
|
|
1917
1927
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1918
1928
|
return;
|
|
1919
|
-
const n = {},
|
|
1920
|
-
for (const
|
|
1921
|
-
|
|
1922
|
-
for (const
|
|
1923
|
-
const s = this.$$g_p(
|
|
1924
|
-
s in this.$$d || (this.$$d[s] =
|
|
1929
|
+
const n = {}, r = _i(this);
|
|
1930
|
+
for (const i of this.$$s)
|
|
1931
|
+
i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = e(i), n.default = !0) : n[i] = e(i));
|
|
1932
|
+
for (const i of this.attributes) {
|
|
1933
|
+
const s = this.$$g_p(i.name);
|
|
1934
|
+
s in this.$$d || (this.$$d[s] = dt(s, i.value, this.$$p_d, "toProp"));
|
|
1925
1935
|
}
|
|
1926
|
-
for (const
|
|
1927
|
-
!(
|
|
1928
|
-
this.$$c =
|
|
1936
|
+
for (const i in this.$$p_d)
|
|
1937
|
+
!(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
1938
|
+
this.$$c = mi({
|
|
1929
1939
|
component: this.$$ctor,
|
|
1930
1940
|
target: this.$$shadowRoot || this,
|
|
1931
1941
|
props: {
|
|
@@ -1933,26 +1943,26 @@ typeof HTMLElement == "function" && (si = class extends HTMLElement {
|
|
|
1933
1943
|
$$slots: n,
|
|
1934
1944
|
$$host: this
|
|
1935
1945
|
}
|
|
1936
|
-
}), this.$$me =
|
|
1937
|
-
|
|
1946
|
+
}), this.$$me = ei(() => {
|
|
1947
|
+
zn(() => {
|
|
1938
1948
|
this.$$r = !0;
|
|
1939
|
-
for (const
|
|
1940
|
-
if (!this.$$p_d[
|
|
1941
|
-
this.$$d[
|
|
1942
|
-
const s =
|
|
1943
|
-
|
|
1944
|
-
this.$$d[
|
|
1949
|
+
for (const i of pt(this.$$c)) {
|
|
1950
|
+
if (!this.$$p_d[i]?.reflect) continue;
|
|
1951
|
+
this.$$d[i] = this.$$c[i];
|
|
1952
|
+
const s = dt(
|
|
1953
|
+
i,
|
|
1954
|
+
this.$$d[i],
|
|
1945
1955
|
this.$$p_d,
|
|
1946
1956
|
"toAttribute"
|
|
1947
1957
|
);
|
|
1948
|
-
s == null ? this.removeAttribute(this.$$p_d[
|
|
1958
|
+
s == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, s);
|
|
1949
1959
|
}
|
|
1950
1960
|
this.$$r = !1;
|
|
1951
1961
|
});
|
|
1952
1962
|
});
|
|
1953
|
-
for (const
|
|
1954
|
-
for (const s of this.$$l[
|
|
1955
|
-
const o = this.$$c.$on(
|
|
1963
|
+
for (const i in this.$$l)
|
|
1964
|
+
for (const s of this.$$l[i]) {
|
|
1965
|
+
const o = this.$$c.$on(i, s);
|
|
1956
1966
|
this.$$l_u.set(s, o);
|
|
1957
1967
|
}
|
|
1958
1968
|
this.$$l = {};
|
|
@@ -1965,8 +1975,8 @@ typeof HTMLElement == "function" && (si = class extends HTMLElement {
|
|
|
1965
1975
|
* @param {string} _oldValue
|
|
1966
1976
|
* @param {string} newValue
|
|
1967
1977
|
*/
|
|
1968
|
-
attributeChangedCallback(e, n,
|
|
1969
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
1978
|
+
attributeChangedCallback(e, n, r) {
|
|
1979
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = dt(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
1970
1980
|
}
|
|
1971
1981
|
disconnectedCallback() {
|
|
1972
1982
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -1977,17 +1987,17 @@ typeof HTMLElement == "function" && (si = class extends HTMLElement {
|
|
|
1977
1987
|
* @param {string} attribute_name
|
|
1978
1988
|
*/
|
|
1979
1989
|
$$g_p(e) {
|
|
1980
|
-
return
|
|
1990
|
+
return pt(this.$$p_d).find(
|
|
1981
1991
|
(n) => this.$$p_d[n].attribute === e || !this.$$p_d[n].attribute && n.toLowerCase() === e
|
|
1982
1992
|
) || e;
|
|
1983
1993
|
}
|
|
1984
1994
|
});
|
|
1985
|
-
function
|
|
1986
|
-
const
|
|
1987
|
-
if (e =
|
|
1995
|
+
function dt(t, e, n, r) {
|
|
1996
|
+
const i = n[t]?.type;
|
|
1997
|
+
if (e = i === "Boolean" && typeof e != "boolean" ? e != null : e, !r || !n[t])
|
|
1988
1998
|
return e;
|
|
1989
|
-
if (
|
|
1990
|
-
switch (
|
|
1999
|
+
if (r === "toAttribute")
|
|
2000
|
+
switch (i) {
|
|
1991
2001
|
case "Object":
|
|
1992
2002
|
case "Array":
|
|
1993
2003
|
return e == null ? null : JSON.stringify(e);
|
|
@@ -1999,7 +2009,7 @@ function pt(t, e, n, i) {
|
|
|
1999
2009
|
return e;
|
|
2000
2010
|
}
|
|
2001
2011
|
else
|
|
2002
|
-
switch (
|
|
2012
|
+
switch (i) {
|
|
2003
2013
|
case "Object":
|
|
2004
2014
|
case "Array":
|
|
2005
2015
|
return e && JSON.parse(e);
|
|
@@ -2012,7 +2022,7 @@ function pt(t, e, n, i) {
|
|
|
2012
2022
|
return e;
|
|
2013
2023
|
}
|
|
2014
2024
|
}
|
|
2015
|
-
function
|
|
2025
|
+
function _i(t) {
|
|
2016
2026
|
const e = {};
|
|
2017
2027
|
return t.childNodes.forEach((n) => {
|
|
2018
2028
|
e[
|
|
@@ -2021,49 +2031,49 @@ function br(t) {
|
|
|
2021
2031
|
] = !0;
|
|
2022
2032
|
}), e;
|
|
2023
2033
|
}
|
|
2024
|
-
function
|
|
2025
|
-
let o = class extends
|
|
2034
|
+
function yi(t, e, n, r, i, s) {
|
|
2035
|
+
let o = class extends rr {
|
|
2026
2036
|
constructor() {
|
|
2027
|
-
super(t, n,
|
|
2037
|
+
super(t, n, i), this.$$p_d = e;
|
|
2028
2038
|
}
|
|
2029
2039
|
static get observedAttributes() {
|
|
2030
|
-
return
|
|
2031
|
-
(
|
|
2040
|
+
return pt(e).map(
|
|
2041
|
+
(l) => (e[l].attribute || l).toLowerCase()
|
|
2032
2042
|
);
|
|
2033
2043
|
}
|
|
2034
2044
|
};
|
|
2035
|
-
return
|
|
2036
|
-
|
|
2045
|
+
return pt(e).forEach((l) => {
|
|
2046
|
+
mt(o.prototype, l, {
|
|
2037
2047
|
get() {
|
|
2038
|
-
return this.$$c &&
|
|
2048
|
+
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2039
2049
|
},
|
|
2040
2050
|
set(u) {
|
|
2041
|
-
u =
|
|
2051
|
+
u = dt(l, u, e), this.$$d[l] = u;
|
|
2042
2052
|
var c = this.$$c;
|
|
2043
2053
|
if (c) {
|
|
2044
|
-
var
|
|
2045
|
-
|
|
2054
|
+
var f = Ne(c, l)?.get;
|
|
2055
|
+
f ? c[l] = u : c.$set({ [l]: u });
|
|
2046
2056
|
}
|
|
2047
2057
|
}
|
|
2048
2058
|
});
|
|
2049
|
-
}),
|
|
2050
|
-
|
|
2059
|
+
}), r.forEach((l) => {
|
|
2060
|
+
mt(o.prototype, l, {
|
|
2051
2061
|
get() {
|
|
2052
|
-
return this.$$c?.[
|
|
2062
|
+
return this.$$c?.[l];
|
|
2053
2063
|
}
|
|
2054
2064
|
});
|
|
2055
2065
|
}), t.element = /** @type {any} */
|
|
2056
2066
|
o, o;
|
|
2057
2067
|
}
|
|
2058
|
-
var
|
|
2068
|
+
var rn;
|
|
2059
2069
|
(function(t) {
|
|
2060
2070
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2061
|
-
})(
|
|
2062
|
-
var
|
|
2071
|
+
})(rn || (rn = {}));
|
|
2072
|
+
var sn;
|
|
2063
2073
|
(function(t) {
|
|
2064
2074
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2065
|
-
})(
|
|
2066
|
-
const
|
|
2075
|
+
})(sn || (sn = {}));
|
|
2076
|
+
const bi = {
|
|
2067
2077
|
/**
|
|
2068
2078
|
* Visual accessibility features
|
|
2069
2079
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -2235,19 +2245,19 @@ const Cr = {
|
|
|
2235
2245
|
tutorialAvailable: "tutorialAvailable"
|
|
2236
2246
|
}
|
|
2237
2247
|
};
|
|
2238
|
-
Object.values(
|
|
2239
|
-
var
|
|
2248
|
+
Object.values(bi).flatMap((t) => Object.values(t));
|
|
2249
|
+
var qt;
|
|
2240
2250
|
(function(t) {
|
|
2241
2251
|
t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
2242
|
-
})(
|
|
2243
|
-
var
|
|
2252
|
+
})(qt || (qt = {}));
|
|
2253
|
+
var on;
|
|
2244
2254
|
(function(t) {
|
|
2245
2255
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
2246
|
-
})(
|
|
2247
|
-
class
|
|
2256
|
+
})(on || (on = {}));
|
|
2257
|
+
class ir {
|
|
2248
2258
|
constructor() {
|
|
2249
|
-
|
|
2250
|
-
|
|
2259
|
+
g(this, "elementType", "multiple-choice");
|
|
2260
|
+
g(this, "priority", 100);
|
|
2251
2261
|
}
|
|
2252
2262
|
canHandle(e) {
|
|
2253
2263
|
return e.tagName.toLowerCase() === "multiple-choice" || e.classList.contains("multiple-choice");
|
|
@@ -2263,8 +2273,8 @@ class oi {
|
|
|
2263
2273
|
const n = e.querySelector(".label") || e.querySelector("label") || e.querySelector('[class*="label"]') || e.querySelector("span");
|
|
2264
2274
|
if (!n)
|
|
2265
2275
|
return null;
|
|
2266
|
-
const
|
|
2267
|
-
return
|
|
2276
|
+
const r = document.createRange();
|
|
2277
|
+
return r.selectNodeContents(n), r;
|
|
2268
2278
|
}
|
|
2269
2279
|
getChoiceId(e) {
|
|
2270
2280
|
const n = e.querySelector(
|
|
@@ -2285,30 +2295,30 @@ class oi {
|
|
|
2285
2295
|
return e;
|
|
2286
2296
|
}
|
|
2287
2297
|
generateFallbackId(e) {
|
|
2288
|
-
const
|
|
2289
|
-
return `choice-${Array.from(
|
|
2298
|
+
const r = e.closest(".multiple-choice")?.querySelectorAll(".choice-input") || [];
|
|
2299
|
+
return `choice-${Array.from(r).indexOf(e)}`;
|
|
2290
2300
|
}
|
|
2291
2301
|
}
|
|
2292
|
-
class
|
|
2302
|
+
class wi {
|
|
2293
2303
|
constructor() {
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2304
|
+
g(this, "elementType", "ebsr");
|
|
2305
|
+
g(this, "priority", 95);
|
|
2306
|
+
g(this, "mcAdapter", new ir());
|
|
2297
2307
|
}
|
|
2298
2308
|
canHandle(e) {
|
|
2299
2309
|
return e.tagName.toLowerCase() === "ebsr" || e.querySelector("ebsr-multiple-choice") !== null;
|
|
2300
2310
|
}
|
|
2301
2311
|
findChoices(e) {
|
|
2302
|
-
const n = e.querySelector('ebsr-multiple-choice[id="a"]'),
|
|
2303
|
-
return n &&
|
|
2312
|
+
const n = e.querySelector('ebsr-multiple-choice[id="a"]'), r = e.querySelector('ebsr-multiple-choice[id="b"]'), i = [];
|
|
2313
|
+
return n && i.push(...this.mcAdapter.findChoices(n)), r && i.push(...this.mcAdapter.findChoices(r)), i;
|
|
2304
2314
|
}
|
|
2305
2315
|
// Delegate all other methods to MultipleChoiceAdapter
|
|
2306
2316
|
createChoiceRange(e) {
|
|
2307
2317
|
return this.mcAdapter.createChoiceRange(e);
|
|
2308
2318
|
}
|
|
2309
2319
|
getChoiceId(e) {
|
|
2310
|
-
const n = e.closest("ebsr-multiple-choice")?.id || "unknown",
|
|
2311
|
-
return `${n}-${
|
|
2320
|
+
const n = e.closest("ebsr-multiple-choice")?.id || "unknown", r = this.mcAdapter.getChoiceId(e);
|
|
2321
|
+
return `${n}-${r}`;
|
|
2312
2322
|
}
|
|
2313
2323
|
getChoiceLabel(e) {
|
|
2314
2324
|
return this.mcAdapter.getChoiceLabel(e);
|
|
@@ -2320,10 +2330,10 @@ class Sr {
|
|
|
2320
2330
|
return this.mcAdapter.getButtonContainer(e);
|
|
2321
2331
|
}
|
|
2322
2332
|
}
|
|
2323
|
-
class
|
|
2333
|
+
class Ci {
|
|
2324
2334
|
constructor() {
|
|
2325
|
-
|
|
2326
|
-
|
|
2335
|
+
g(this, "elementType", "inline-dropdown");
|
|
2336
|
+
g(this, "priority", 90);
|
|
2327
2337
|
}
|
|
2328
2338
|
canHandle(e) {
|
|
2329
2339
|
return e.tagName.toLowerCase() === "inline-dropdown" || e.querySelector('[role="combobox"]') !== null;
|
|
@@ -2348,13 +2358,13 @@ class Er {
|
|
|
2348
2358
|
return e;
|
|
2349
2359
|
}
|
|
2350
2360
|
}
|
|
2351
|
-
class
|
|
2361
|
+
class Si {
|
|
2352
2362
|
constructor() {
|
|
2353
|
-
|
|
2363
|
+
g(this, "adapters");
|
|
2354
2364
|
this.adapters = [
|
|
2355
|
-
new
|
|
2356
|
-
new
|
|
2357
|
-
new
|
|
2365
|
+
new ir(),
|
|
2366
|
+
new wi(),
|
|
2367
|
+
new Ci()
|
|
2358
2368
|
].sort((e, n) => n.priority - e.priority);
|
|
2359
2369
|
}
|
|
2360
2370
|
/**
|
|
@@ -2367,11 +2377,11 @@ class $r {
|
|
|
2367
2377
|
* Find all choices with their adapters within a root element
|
|
2368
2378
|
*/
|
|
2369
2379
|
findAllChoicesWithAdapters(e) {
|
|
2370
|
-
const n = [],
|
|
2371
|
-
for (const
|
|
2372
|
-
const s =
|
|
2380
|
+
const n = [], r = /* @__PURE__ */ new Set();
|
|
2381
|
+
for (const i of this.adapters) {
|
|
2382
|
+
const s = i.findChoices(e);
|
|
2373
2383
|
for (const o of s)
|
|
2374
|
-
|
|
2384
|
+
r.has(o) || (r.add(o), n.push({ choice: o, adapter: i }));
|
|
2375
2385
|
}
|
|
2376
2386
|
return n;
|
|
2377
2387
|
}
|
|
@@ -2379,14 +2389,14 @@ class $r {
|
|
|
2379
2389
|
* Register a custom adapter
|
|
2380
2390
|
*/
|
|
2381
2391
|
registerAdapter(e) {
|
|
2382
|
-
this.adapters.push(e), this.adapters.sort((n,
|
|
2392
|
+
this.adapters.push(e), this.adapters.sort((n, r) => r.priority - n.priority);
|
|
2383
2393
|
}
|
|
2384
2394
|
}
|
|
2385
|
-
class
|
|
2395
|
+
class Ei {
|
|
2386
2396
|
constructor() {
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2397
|
+
g(this, "name", "mask");
|
|
2398
|
+
g(this, "highlights", /* @__PURE__ */ new Map());
|
|
2399
|
+
g(this, "ranges", /* @__PURE__ */ new Map());
|
|
2390
2400
|
}
|
|
2391
2401
|
initialize() {
|
|
2392
2402
|
this.injectCSS();
|
|
@@ -2400,8 +2410,8 @@ class Ar {
|
|
|
2400
2410
|
return;
|
|
2401
2411
|
}
|
|
2402
2412
|
this.injectHighlightCSS(e);
|
|
2403
|
-
const
|
|
2404
|
-
CSS.highlights.set(`answer-masked-${e}`,
|
|
2413
|
+
const r = new Highlight(n);
|
|
2414
|
+
CSS.highlights.set(`answer-masked-${e}`, r), this.highlights.set(e, r), this.ranges.set(e, n), this.addAriaAttributes(n);
|
|
2405
2415
|
}
|
|
2406
2416
|
remove(e) {
|
|
2407
2417
|
if (!this.isSupported()) {
|
|
@@ -2440,13 +2450,13 @@ class Ar {
|
|
|
2440
2450
|
injectHighlightCSS(e) {
|
|
2441
2451
|
const n = `answer-eliminator-mask-highlight-${e}`;
|
|
2442
2452
|
if (document.getElementById(n)) return;
|
|
2443
|
-
const
|
|
2444
|
-
|
|
2453
|
+
const r = document.createElement("style");
|
|
2454
|
+
r.id = n, r.textContent = `
|
|
2445
2455
|
::highlight(answer-masked-${e}) {
|
|
2446
2456
|
opacity: 0.2;
|
|
2447
2457
|
filter: blur(2px);
|
|
2448
2458
|
}
|
|
2449
|
-
`, document.head.appendChild(
|
|
2459
|
+
`, document.head.appendChild(r);
|
|
2450
2460
|
}
|
|
2451
2461
|
removeHighlightCSS(e) {
|
|
2452
2462
|
document.getElementById(`answer-eliminator-mask-highlight-${e}`)?.remove();
|
|
@@ -2472,8 +2482,8 @@ class Ar {
|
|
|
2472
2482
|
return null;
|
|
2473
2483
|
}
|
|
2474
2484
|
applyFallback(e, n) {
|
|
2475
|
-
const
|
|
2476
|
-
|
|
2485
|
+
const r = this.findChoiceContainer(n);
|
|
2486
|
+
r && (r.classList.add("answer-masked-fallback"), r.setAttribute("data-eliminated", "true"), r.setAttribute("data-eliminated-id", e), this.addAriaAttributes(n));
|
|
2477
2487
|
}
|
|
2478
2488
|
removeFallback(e) {
|
|
2479
2489
|
const n = document.querySelector(
|
|
@@ -2481,15 +2491,15 @@ class Ar {
|
|
|
2481
2491
|
);
|
|
2482
2492
|
if (!n) return;
|
|
2483
2493
|
n.classList.remove("answer-masked-fallback"), n.removeAttribute("data-eliminated"), n.removeAttribute("data-eliminated-id");
|
|
2484
|
-
const
|
|
2485
|
-
|
|
2494
|
+
const r = document.createRange();
|
|
2495
|
+
r.selectNodeContents(n), this.removeAriaAttributes(r);
|
|
2486
2496
|
}
|
|
2487
2497
|
}
|
|
2488
|
-
class
|
|
2498
|
+
class $i {
|
|
2489
2499
|
constructor() {
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2500
|
+
g(this, "name", "strikethrough");
|
|
2501
|
+
g(this, "highlights", /* @__PURE__ */ new Map());
|
|
2502
|
+
g(this, "ranges", /* @__PURE__ */ new Map());
|
|
2493
2503
|
}
|
|
2494
2504
|
initialize() {
|
|
2495
2505
|
if (!this.isSupported()) {
|
|
@@ -2507,8 +2517,8 @@ class kr {
|
|
|
2507
2517
|
return;
|
|
2508
2518
|
}
|
|
2509
2519
|
this.injectHighlightCSS(e);
|
|
2510
|
-
const
|
|
2511
|
-
CSS.highlights.set(`answer-eliminated-${e}`,
|
|
2520
|
+
const r = new Highlight(n);
|
|
2521
|
+
CSS.highlights.set(`answer-eliminated-${e}`, r), this.highlights.set(e, r), this.ranges.set(e, n), this.addAriaAttributes(n);
|
|
2512
2522
|
}
|
|
2513
2523
|
remove(e) {
|
|
2514
2524
|
if (!this.isSupported()) {
|
|
@@ -2558,15 +2568,15 @@ class kr {
|
|
|
2558
2568
|
injectHighlightCSS(e) {
|
|
2559
2569
|
const n = `answer-eliminator-highlight-${e}`;
|
|
2560
2570
|
if (document.getElementById(n)) return;
|
|
2561
|
-
const
|
|
2562
|
-
|
|
2571
|
+
const r = document.createElement("style");
|
|
2572
|
+
r.id = n, r.textContent = `
|
|
2563
2573
|
::highlight(answer-eliminated-${e}) {
|
|
2564
2574
|
text-decoration: line-through;
|
|
2565
2575
|
text-decoration-thickness: 2px;
|
|
2566
2576
|
text-decoration-color: var(--pie-incorrect, #ff9800);
|
|
2567
2577
|
opacity: 0.6;
|
|
2568
2578
|
}
|
|
2569
|
-
`, document.head.appendChild(
|
|
2579
|
+
`, document.head.appendChild(r);
|
|
2570
2580
|
}
|
|
2571
2581
|
removeHighlightCSS(e) {
|
|
2572
2582
|
document.getElementById(`answer-eliminator-highlight-${e}`)?.remove();
|
|
@@ -2580,10 +2590,10 @@ class kr {
|
|
|
2580
2590
|
const n = this.findChoiceContainer(e);
|
|
2581
2591
|
if (!n) return;
|
|
2582
2592
|
n.setAttribute("data-eliminated", "true"), n.setAttribute("aria-disabled", "true");
|
|
2583
|
-
const
|
|
2584
|
-
if (
|
|
2585
|
-
const
|
|
2586
|
-
|
|
2593
|
+
const r = n.querySelector(".label");
|
|
2594
|
+
if (r && !r.querySelector(".sr-announcement")) {
|
|
2595
|
+
const i = document.createElement("span");
|
|
2596
|
+
i.className = "sr-announcement", i.textContent = " (eliminated)", r.appendChild(i);
|
|
2587
2597
|
}
|
|
2588
2598
|
}
|
|
2589
2599
|
removeAriaAttributes(e) {
|
|
@@ -2602,8 +2612,8 @@ class kr {
|
|
|
2602
2612
|
}
|
|
2603
2613
|
// Fallback for browsers without CSS Highlight API
|
|
2604
2614
|
applyFallback(e, n) {
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2615
|
+
const r = this.findChoiceContainer(n);
|
|
2616
|
+
r && (r.classList.add("answer-eliminated-fallback"), r.setAttribute("data-eliminated", "true"), r.setAttribute("data-eliminated-id", e), this.addAriaAttributes(n));
|
|
2607
2617
|
}
|
|
2608
2618
|
removeFallback(e) {
|
|
2609
2619
|
const n = document.querySelector(
|
|
@@ -2611,29 +2621,29 @@ class kr {
|
|
|
2611
2621
|
);
|
|
2612
2622
|
if (!n) return;
|
|
2613
2623
|
n.classList.remove("answer-eliminated-fallback"), n.removeAttribute("data-eliminated"), n.removeAttribute("data-eliminated-id");
|
|
2614
|
-
const
|
|
2615
|
-
|
|
2624
|
+
const r = document.createRange();
|
|
2625
|
+
r.selectNodeContents(n), this.removeAriaAttributes(r);
|
|
2616
2626
|
}
|
|
2617
2627
|
}
|
|
2618
|
-
class
|
|
2628
|
+
class Ai {
|
|
2619
2629
|
constructor(e = "strikethrough", n = "right") {
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2630
|
+
g(this, "registry");
|
|
2631
|
+
g(this, "strategy");
|
|
2632
|
+
g(this, "eliminatedChoices", /* @__PURE__ */ new Set());
|
|
2623
2633
|
// Set<choiceId> for current element
|
|
2624
|
-
|
|
2634
|
+
g(this, "choiceElements", /* @__PURE__ */ new Map());
|
|
2625
2635
|
// choiceId -> element
|
|
2626
|
-
|
|
2636
|
+
g(this, "choiceButtons", /* @__PURE__ */ new Map());
|
|
2627
2637
|
// choiceId -> button
|
|
2628
|
-
|
|
2629
|
-
|
|
2638
|
+
g(this, "buttonAlignment", "right");
|
|
2639
|
+
g(this, "shouldRestoreState", !0);
|
|
2630
2640
|
// Whether to restore eliminations from state storage
|
|
2631
2641
|
// Store integration (replaces session/localStorage)
|
|
2632
|
-
|
|
2633
|
-
this.registry = new
|
|
2642
|
+
g(this, "storeIntegration", null);
|
|
2643
|
+
this.registry = new Si(), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = n;
|
|
2634
2644
|
}
|
|
2635
2645
|
createStrategy(e) {
|
|
2636
|
-
return e === "mask" ? new
|
|
2646
|
+
return e === "mask" ? new Ei() : new $i();
|
|
2637
2647
|
}
|
|
2638
2648
|
/**
|
|
2639
2649
|
* Initialize eliminator for a question
|
|
@@ -2641,28 +2651,28 @@ class xr {
|
|
|
2641
2651
|
initializeForQuestion(e) {
|
|
2642
2652
|
this.cleanupButtons();
|
|
2643
2653
|
const n = this.registry.findAllChoicesWithAdapters(e);
|
|
2644
|
-
for (const { choice:
|
|
2645
|
-
this.initializeChoice(
|
|
2654
|
+
for (const { choice: r, adapter: i } of n)
|
|
2655
|
+
this.initializeChoice(r, i);
|
|
2646
2656
|
this.shouldRestoreState && this.restoreState();
|
|
2647
2657
|
}
|
|
2648
2658
|
/**
|
|
2649
2659
|
* Initialize a single choice
|
|
2650
2660
|
*/
|
|
2651
2661
|
initializeChoice(e, n) {
|
|
2652
|
-
const
|
|
2653
|
-
this.choiceElements.set(
|
|
2654
|
-
const
|
|
2655
|
-
if (!
|
|
2656
|
-
this.choiceButtons.set(
|
|
2662
|
+
const r = n.getChoiceId(e);
|
|
2663
|
+
this.choiceElements.set(r, e);
|
|
2664
|
+
const i = this.createToggleButton(e, n);
|
|
2665
|
+
if (!i) return;
|
|
2666
|
+
this.choiceButtons.set(r, i);
|
|
2657
2667
|
const s = n.getButtonContainer(e);
|
|
2658
|
-
s && (s.style.position = "relative", s.appendChild(
|
|
2668
|
+
s && (s.style.position = "relative", s.appendChild(i));
|
|
2659
2669
|
}
|
|
2660
2670
|
/**
|
|
2661
2671
|
* Create elimination toggle button
|
|
2662
2672
|
*/
|
|
2663
2673
|
createToggleButton(e, n) {
|
|
2664
|
-
const
|
|
2665
|
-
return s.type = "button", s.className = "answer-eliminator-toggle", s.setAttribute("aria-label", `Toggle elimination for ${
|
|
2674
|
+
const r = n.getChoiceId(e), i = n.getChoiceLabel(e), s = document.createElement("button");
|
|
2675
|
+
return s.type = "button", s.className = "answer-eliminator-toggle", s.setAttribute("aria-label", `Toggle elimination for ${i}`), s.setAttribute("data-choice-id", r), s.textContent = "⊗", this.applyButtonAlignment(s), Object.assign(s.style, {
|
|
2666
2676
|
width: "28px",
|
|
2667
2677
|
height: "28px",
|
|
2668
2678
|
padding: "0",
|
|
@@ -2681,7 +2691,7 @@ class xr {
|
|
|
2681
2691
|
}), s.addEventListener("mouseenter", () => {
|
|
2682
2692
|
s.style.background = "#f0f0f0", s.style.borderColor = "#999", s.style.color = "#333";
|
|
2683
2693
|
}), s.addEventListener("mouseleave", () => {
|
|
2684
|
-
this.strategy.isEliminated(
|
|
2694
|
+
this.strategy.isEliminated(r) || (s.style.background = "white", s.style.borderColor = "#ccc", s.style.color = "#666");
|
|
2685
2695
|
}), s.addEventListener("click", (o) => {
|
|
2686
2696
|
o.preventDefault(), o.stopPropagation(), this.toggleElimination(e, n);
|
|
2687
2697
|
}), s;
|
|
@@ -2690,9 +2700,9 @@ class xr {
|
|
|
2690
2700
|
* Toggle elimination for a choice
|
|
2691
2701
|
*/
|
|
2692
2702
|
toggleElimination(e, n) {
|
|
2693
|
-
const
|
|
2694
|
-
if (this.strategy.isEliminated(
|
|
2695
|
-
this.restoreChoice(
|
|
2703
|
+
const r = n.getChoiceId(e);
|
|
2704
|
+
if (this.strategy.isEliminated(r))
|
|
2705
|
+
this.restoreChoice(r);
|
|
2696
2706
|
else {
|
|
2697
2707
|
if (!n.canEliminate(e)) {
|
|
2698
2708
|
console.warn(
|
|
@@ -2708,13 +2718,13 @@ class xr {
|
|
|
2708
2718
|
* Eliminate a choice
|
|
2709
2719
|
*/
|
|
2710
2720
|
eliminateChoice(e, n) {
|
|
2711
|
-
const
|
|
2712
|
-
if (!
|
|
2721
|
+
const r = n.getChoiceId(e), i = n.createChoiceRange(e);
|
|
2722
|
+
if (!i) {
|
|
2713
2723
|
console.error("Failed to create range for choice");
|
|
2714
2724
|
return;
|
|
2715
2725
|
}
|
|
2716
|
-
this.strategy.apply(
|
|
2717
|
-
const s = this.choiceButtons.get(
|
|
2726
|
+
this.strategy.apply(r, i), this.eliminatedChoices.add(r);
|
|
2727
|
+
const s = this.choiceButtons.get(r);
|
|
2718
2728
|
s && (s.classList.add("active"), s.setAttribute("aria-pressed", "true"), s.style.background = "#ff9800", s.style.borderColor = "#ff9800", s.style.color = "white"), this.saveState();
|
|
2719
2729
|
}
|
|
2720
2730
|
/**
|
|
@@ -2776,16 +2786,16 @@ class xr {
|
|
|
2776
2786
|
try {
|
|
2777
2787
|
const n = e.eliminatedChoices;
|
|
2778
2788
|
if (!n || n.length === 0) return;
|
|
2779
|
-
for (const
|
|
2780
|
-
const
|
|
2781
|
-
if (!
|
|
2782
|
-
const s = this.findAdapterForChoice(
|
|
2789
|
+
for (const r of n) {
|
|
2790
|
+
const i = this.choiceElements.get(r);
|
|
2791
|
+
if (!i) continue;
|
|
2792
|
+
const s = this.findAdapterForChoice(i);
|
|
2783
2793
|
if (!s) continue;
|
|
2784
|
-
const o = s.createChoiceRange(
|
|
2794
|
+
const o = s.createChoiceRange(i);
|
|
2785
2795
|
if (o) {
|
|
2786
|
-
this.strategy.apply(
|
|
2787
|
-
const
|
|
2788
|
-
|
|
2796
|
+
this.strategy.apply(r, o), this.eliminatedChoices.add(r);
|
|
2797
|
+
const l = this.choiceButtons.get(r);
|
|
2798
|
+
l && (l.classList.add("active"), l.setAttribute("aria-pressed", "true"), l.style.background = "#ff9800", l.style.borderColor = "#ff9800", l.style.color = "white");
|
|
2789
2799
|
}
|
|
2790
2800
|
}
|
|
2791
2801
|
} catch (n) {
|
|
@@ -2798,8 +2808,8 @@ class xr {
|
|
|
2798
2808
|
findAdapterForChoice(e) {
|
|
2799
2809
|
let n = e;
|
|
2800
2810
|
for (; n && n !== document.body; ) {
|
|
2801
|
-
const
|
|
2802
|
-
if (
|
|
2811
|
+
const r = this.registry.findAdapter(n);
|
|
2812
|
+
if (r) return r;
|
|
2803
2813
|
n = n.parentElement;
|
|
2804
2814
|
}
|
|
2805
2815
|
return null;
|
|
@@ -2883,144 +2893,144 @@ class xr {
|
|
|
2883
2893
|
this.cleanupButtons(), this.strategy.destroy();
|
|
2884
2894
|
}
|
|
2885
2895
|
}
|
|
2886
|
-
function
|
|
2887
|
-
|
|
2888
|
-
let n =
|
|
2896
|
+
function ki(t, e) {
|
|
2897
|
+
_n(e, !0);
|
|
2898
|
+
let n = se(e, "visible", 7, !1), r = se(e, "toolId", 7, "answerEliminator"), i = se(e, "strategy", 7, "strikethrough"), s = se(
|
|
2889
2899
|
e,
|
|
2890
2900
|
"alwaysOn",
|
|
2891
2901
|
7,
|
|
2892
2902
|
!1
|
|
2893
2903
|
// Set true for profile-based accommodation
|
|
2894
|
-
), o =
|
|
2904
|
+
), o = se(
|
|
2895
2905
|
e,
|
|
2896
2906
|
"buttonAlignment",
|
|
2897
2907
|
7,
|
|
2898
2908
|
"right"
|
|
2899
2909
|
// Button placement: left, right, or inline with checkbox
|
|
2900
|
-
),
|
|
2910
|
+
), l = se(e, "coordinator"), u = se(
|
|
2901
2911
|
e,
|
|
2902
2912
|
"scopeElement",
|
|
2903
2913
|
7,
|
|
2904
2914
|
null
|
|
2905
2915
|
// Container element to limit DOM queries (for multi-item pages)
|
|
2906
|
-
), c =
|
|
2916
|
+
), c = se(
|
|
2907
2917
|
e,
|
|
2908
2918
|
"elementToolStateStore",
|
|
2909
2919
|
7,
|
|
2910
2920
|
null
|
|
2911
2921
|
// ElementToolStateStore instance
|
|
2912
|
-
),
|
|
2922
|
+
), f = se(
|
|
2913
2923
|
e,
|
|
2914
2924
|
"globalElementId",
|
|
2915
2925
|
7,
|
|
2916
2926
|
""
|
|
2917
2927
|
// Composite key: "assessmentId:sectionId:itemId:elementId"
|
|
2918
|
-
),
|
|
2919
|
-
function
|
|
2920
|
-
if (!y(
|
|
2921
|
-
const
|
|
2922
|
-
if (!
|
|
2928
|
+
), d = /* @__PURE__ */ H(null), h = /* @__PURE__ */ H(0), m = /* @__PURE__ */ H(null), p = /* @__PURE__ */ H(!1), $ = /* @__PURE__ */ zr(() => s() || n());
|
|
2929
|
+
function C() {
|
|
2930
|
+
if (!y($) || !y(d)) return;
|
|
2931
|
+
const S = u() || document.body, it = S.querySelector("pie-player") || S.querySelector("multiple-choice") || S.querySelector("ebsr") || S.querySelector("[data-pie-element]") || S;
|
|
2932
|
+
if (!it) {
|
|
2923
2933
|
console.warn("[AnswerEliminator] Could not find question root within scope");
|
|
2924
2934
|
return;
|
|
2925
2935
|
}
|
|
2926
|
-
y(
|
|
2936
|
+
y(d).initializeForQuestion(it), Et();
|
|
2927
2937
|
}
|
|
2928
|
-
function
|
|
2929
|
-
const
|
|
2930
|
-
|
|
2931
|
-
|
|
2938
|
+
function pe(S, it = 5e3) {
|
|
2939
|
+
const Ue = u() || document.body, $t = () => Ue.querySelector("pie-player") || Ue.querySelector("multiple-choice") || Ue.querySelector("ebsr") || Ue.querySelector("[data-pie-element]") ? (y(m) && (y(m).disconnect(), k(m, null)), S(), !0) : !1;
|
|
2940
|
+
$t() || (k(
|
|
2941
|
+
m,
|
|
2932
2942
|
new MutationObserver(() => {
|
|
2933
|
-
|
|
2943
|
+
$t();
|
|
2934
2944
|
}),
|
|
2935
2945
|
!0
|
|
2936
|
-
), y(
|
|
2946
|
+
), y(m).observe(Ue, { childList: !0, subtree: !0 }), setTimeout(
|
|
2937
2947
|
() => {
|
|
2938
|
-
y(
|
|
2948
|
+
y(m) && (y(m).disconnect(), k(m, null), $t());
|
|
2939
2949
|
},
|
|
2940
|
-
|
|
2950
|
+
it
|
|
2941
2951
|
));
|
|
2942
2952
|
}
|
|
2943
|
-
function
|
|
2944
|
-
|
|
2945
|
-
|
|
2953
|
+
function Q() {
|
|
2954
|
+
pe(() => {
|
|
2955
|
+
C();
|
|
2946
2956
|
});
|
|
2947
2957
|
}
|
|
2948
|
-
function
|
|
2949
|
-
|
|
2950
|
-
}
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
}),
|
|
2954
|
-
y(
|
|
2955
|
-
}),
|
|
2956
|
-
|
|
2957
|
-
}), y(
|
|
2958
|
-
|
|
2959
|
-
}) : y(
|
|
2960
|
-
y(
|
|
2961
|
-
})),
|
|
2962
|
-
y(
|
|
2958
|
+
function Et() {
|
|
2959
|
+
k(h, y(d)?.getEliminatedCount() || 0, !0);
|
|
2960
|
+
}
|
|
2961
|
+
ct(() => {
|
|
2962
|
+
l() && r() && !y(p) && (l().registerTool(r(), "Answer Eliminator", void 0, qt.MODAL), k(p, !0));
|
|
2963
|
+
}), ct(() => {
|
|
2964
|
+
y(d) && c() && f() && y(d).setStoreIntegration(c(), f());
|
|
2965
|
+
}), pi(() => (k(d, new Ai(i(), o()), !0), y(d) && c() && f() && y(d).setStoreIntegration(c(), f()), document.addEventListener("pie-item-changed", Q), document.addEventListener("answer-eliminator-state-change", () => {
|
|
2966
|
+
Et();
|
|
2967
|
+
}), y($) ? pe(() => {
|
|
2968
|
+
C();
|
|
2969
|
+
}) : y(d).cleanup(), () => {
|
|
2970
|
+
y(m) && (y(m).disconnect(), k(m, null)), y(d)?.destroy(), k(d, null), l() && r() && l().unregisterTool(r()), document.removeEventListener("pie-item-changed", Q), document.removeEventListener("answer-eliminator-state-change", Et);
|
|
2971
|
+
})), ct(() => {
|
|
2972
|
+
y(d) && (y($) ? (y(d).enableStateRestoration(), C()) : y(d).cleanup());
|
|
2963
2973
|
});
|
|
2964
|
-
var
|
|
2974
|
+
var sr = {
|
|
2965
2975
|
get visible() {
|
|
2966
2976
|
return n();
|
|
2967
2977
|
},
|
|
2968
|
-
set visible(
|
|
2969
|
-
n(
|
|
2978
|
+
set visible(S = !1) {
|
|
2979
|
+
n(S), J();
|
|
2970
2980
|
},
|
|
2971
2981
|
get toolId() {
|
|
2972
|
-
return
|
|
2982
|
+
return r();
|
|
2973
2983
|
},
|
|
2974
|
-
set toolId(
|
|
2975
|
-
|
|
2984
|
+
set toolId(S = "answerEliminator") {
|
|
2985
|
+
r(S), J();
|
|
2976
2986
|
},
|
|
2977
2987
|
get strategy() {
|
|
2978
|
-
return
|
|
2988
|
+
return i();
|
|
2979
2989
|
},
|
|
2980
|
-
set strategy(
|
|
2981
|
-
|
|
2990
|
+
set strategy(S = "strikethrough") {
|
|
2991
|
+
i(S), J();
|
|
2982
2992
|
},
|
|
2983
2993
|
get alwaysOn() {
|
|
2984
2994
|
return s();
|
|
2985
2995
|
},
|
|
2986
|
-
set alwaysOn(
|
|
2987
|
-
s(
|
|
2996
|
+
set alwaysOn(S = !1) {
|
|
2997
|
+
s(S), J();
|
|
2988
2998
|
},
|
|
2989
2999
|
get buttonAlignment() {
|
|
2990
3000
|
return o();
|
|
2991
3001
|
},
|
|
2992
|
-
set buttonAlignment(
|
|
2993
|
-
o(
|
|
3002
|
+
set buttonAlignment(S = "right") {
|
|
3003
|
+
o(S), J();
|
|
2994
3004
|
},
|
|
2995
3005
|
get coordinator() {
|
|
2996
|
-
return
|
|
3006
|
+
return l();
|
|
2997
3007
|
},
|
|
2998
|
-
set coordinator(
|
|
2999
|
-
|
|
3008
|
+
set coordinator(S) {
|
|
3009
|
+
l(S), J();
|
|
3000
3010
|
},
|
|
3001
3011
|
get scopeElement() {
|
|
3002
3012
|
return u();
|
|
3003
3013
|
},
|
|
3004
|
-
set scopeElement(
|
|
3005
|
-
u(
|
|
3014
|
+
set scopeElement(S = null) {
|
|
3015
|
+
u(S), J();
|
|
3006
3016
|
},
|
|
3007
3017
|
get elementToolStateStore() {
|
|
3008
3018
|
return c();
|
|
3009
3019
|
},
|
|
3010
|
-
set elementToolStateStore(
|
|
3011
|
-
c(
|
|
3020
|
+
set elementToolStateStore(S = null) {
|
|
3021
|
+
c(S), J();
|
|
3012
3022
|
},
|
|
3013
3023
|
get globalElementId() {
|
|
3014
|
-
return
|
|
3024
|
+
return f();
|
|
3015
3025
|
},
|
|
3016
|
-
set globalElementId(
|
|
3017
|
-
|
|
3026
|
+
set globalElementId(S = "") {
|
|
3027
|
+
f(S), J();
|
|
3018
3028
|
}
|
|
3019
3029
|
};
|
|
3020
|
-
return
|
|
3030
|
+
return yn(sr);
|
|
3021
3031
|
}
|
|
3022
|
-
customElements.define("pie-tool-answer-eliminator",
|
|
3023
|
-
|
|
3032
|
+
customElements.define("pie-tool-answer-eliminator", yi(
|
|
3033
|
+
ki,
|
|
3024
3034
|
{
|
|
3025
3035
|
visible: { attribute: "visible", type: "Boolean" },
|
|
3026
3036
|
toolId: { attribute: "tool-id", type: "String" },
|
|
@@ -3036,6 +3046,6 @@ customElements.define("pie-tool-answer-eliminator", wr(
|
|
|
3036
3046
|
[]
|
|
3037
3047
|
));
|
|
3038
3048
|
export {
|
|
3039
|
-
|
|
3049
|
+
ki as default
|
|
3040
3050
|
};
|
|
3041
3051
|
//# sourceMappingURL=tool-answer-eliminator.js.map
|