@pie-players/pie-tool-answer-eliminator 1.0.0-beta.6 → 1.0.0-beta.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.
@@ -1,17 +1,18 @@
1
1
  import { coerceBooleanAttributes as Fn } from "@pie-players/pie-players-shared/ui/attribute-coercion";
2
+ import { resolveInterfaceI18n as Wt, stampInterfaceLocale as hr } from "@pie-players/pie-players-shared/i18n/provider";
2
3
  import { connectToolRuntimeContext as Gn, connectToolShellContext as Dn } from "@pie-players/pie-assessment-toolkit/tools/registration";
3
4
  import { parseVersionedTagName as Wn } from "@pie-players/pie-players-shared/pie/tag-names";
4
5
  if (typeof window < "u") {
5
- var vr, _r;
6
- ((vr = (_r = window).__svelte ?? (_r.__svelte = {})).v ?? (vr.v = /* @__PURE__ */ new Set())).add("5");
6
+ var dr, vr;
7
+ ((dr = (vr = window).__svelte ?? (vr.__svelte = {})).v ?? (dr.v = /* @__PURE__ */ new Set())).add("5");
7
8
  }
8
- var Le = {}, N = /* @__PURE__ */ Symbol("uninitialized");
9
- var jn = Array.isArray, qn = Array.prototype.indexOf, rt = Array.prototype.includes, Yn = Array.from, St = Object.keys, nt = Object.defineProperty, Te = Object.getOwnPropertyDescriptor, zn = Object.prototype, Vn = Array.prototype, Xn = Object.getPrototypeOf, pr = Object.isExtensible, Un = () => {
9
+ var Ie = {}, N = /* @__PURE__ */ Symbol("uninitialized");
10
+ var jn = Array.isArray, qn = Array.prototype.indexOf, Ze = Array.prototype.includes, Yn = Array.from, bt = Object.keys, et = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, zn = Object.prototype, Vn = Array.prototype, Xn = Object.getPrototypeOf, _r = Object.isExtensible, Un = () => {
10
11
  };
11
- function Qn(t) {
12
+ function Jn(t) {
12
13
  for (var e = 0; e < t.length; e++) t[e]();
13
14
  }
14
- function Jn() {
15
+ function Qn() {
15
16
  var t, e;
16
17
  return {
17
18
  promise: new Promise((r, n) => {
@@ -21,27 +22,27 @@ function Jn() {
21
22
  reject: e
22
23
  };
23
24
  }
24
- function it(t) {
25
+ function tt(t) {
25
26
  "@babel/helpers - typeof";
26
- return it = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
27
+ return tt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
27
28
  return typeof e;
28
29
  } : function(e) {
29
30
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
30
- }, it(t);
31
+ }, tt(t);
31
32
  }
32
33
  function Zn(t, e) {
33
- if (it(t) != "object" || !t) return t;
34
+ if (tt(t) != "object" || !t) return t;
34
35
  var r = t[Symbol.toPrimitive];
35
36
  if (r !== void 0) {
36
37
  var n = r.call(t, e || "default");
37
- if (it(n) != "object") return n;
38
+ if (tt(n) != "object") return n;
38
39
  throw new TypeError("@@toPrimitive must return a primitive value.");
39
40
  }
40
41
  return (e === "string" ? String : Number)(t);
41
42
  }
42
43
  function ei(t) {
43
44
  var e = Zn(t, "string");
44
- return it(e) == "symbol" ? e : e + "";
45
+ return tt(e) == "symbol" ? e : e + "";
45
46
  }
46
47
  function u(t, e, r) {
47
48
  return (e = ei(e)) in t ? Object.defineProperty(t, e, {
@@ -51,36 +52,36 @@ function u(t, e, r) {
51
52
  writable: !0
52
53
  }) : t[e] = r, t;
53
54
  }
54
- var Ds = 1 << 24, ne = 1024, V = 2048, xe = 4096, Pr = 8192, Kr = 16384, Br = 32768, Yt = 1 << 25, Fr = 65536, Ws = 1 << 17, js = 1 << 18, ut = 1 << 19, ti = 1 << 20, mr = 1 << 21, qs = 1 << 22, Gr = 1 << 23, Ze = /* @__PURE__ */ Symbol("$state"), Dr = /* @__PURE__ */ Symbol("component"), Wr = /* @__PURE__ */ Symbol("legacy props"), ri = /* @__PURE__ */ Symbol("proxy path"), ni = /* @__PURE__ */ Symbol("attributes"), ii = /* @__PURE__ */ Symbol("class"), si = /* @__PURE__ */ Symbol("style"), ai = /* @__PURE__ */ Symbol("text"), xt = new class extends Error {
55
+ var qs = 1 << 24, re = 1024, z = 2048, be = 4096, Hr = 8192, Nr = 16384, Pr = 32768, jt = 1 << 25, Kr = 65536, Ys = 1 << 17, zs = 1 << 18, lt = 1 << 19, ti = 1 << 20, pr = 1 << 21, Vs = 1 << 22, Br = 1 << 23, Ue = /* @__PURE__ */ Symbol("$state"), Fr = /* @__PURE__ */ Symbol("component"), Gr = /* @__PURE__ */ Symbol("legacy props"), ri = /* @__PURE__ */ Symbol("proxy path"), ni = /* @__PURE__ */ Symbol("attributes"), ii = /* @__PURE__ */ Symbol("class"), si = /* @__PURE__ */ Symbol("style"), ai = /* @__PURE__ */ Symbol("text"), It = new class extends Error {
55
56
  constructor(...e) {
56
57
  super(...e), u(this, "name", "StaleReactionError"), u(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
57
58
  }
58
- }(), zs = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
59
+ }(), Us = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
59
60
  function li() {
60
61
  console.warn("https://svelte.dev/e/derived_inert");
61
62
  }
62
- function rr(t) {
63
+ function Zt(t) {
63
64
  console.warn("https://svelte.dev/e/hydration_mismatch");
64
65
  }
65
66
  function oi() {
66
67
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
67
68
  }
68
69
  var J = !1;
69
- function ft(t) {
70
+ function ut(t) {
70
71
  J = t;
71
72
  }
72
73
  var F;
73
- function st(t) {
74
+ function rt(t) {
74
75
  if (t === null)
75
- throw rr(), Le;
76
+ throw Zt(), Ie;
76
77
  return F = t;
77
78
  }
78
- function jr() {
79
- return st(/* @__PURE__ */ Ve(F));
79
+ function Dr() {
80
+ return rt(/* @__PURE__ */ Ye(F));
80
81
  }
81
82
  function ui(t = 1) {
82
83
  if (J) {
83
- for (var e = t, r = F; e--; ) r = /* @__PURE__ */ Ve(r);
84
+ for (var e = t, r = F; e--; ) r = /* @__PURE__ */ Ye(r);
84
85
  F = r;
85
86
  }
86
87
  }
@@ -93,22 +94,22 @@ function ci(t = !0) {
93
94
  e -= 1;
94
95
  } else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (e += 1);
95
96
  }
96
- var i = /* @__PURE__ */ Ve(r);
97
+ var i = /* @__PURE__ */ Ye(r);
97
98
  t && r.remove(), r = i;
98
99
  }
99
100
  }
100
101
  function fi(t) {
101
102
  if (!t || t.nodeType !== 8)
102
- throw rr(), Le;
103
+ throw Zt(), Ie;
103
104
  return t.data;
104
105
  }
105
- function qr(t) {
106
+ function Wr(t) {
106
107
  return t === this.v;
107
108
  }
108
109
  function hi(t, e) {
109
110
  return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
110
111
  }
111
- function Yr(t) {
112
+ function jr(t) {
112
113
  return !hi(t, this.v);
113
114
  }
114
115
  function di(t) {
@@ -141,91 +142,91 @@ function wi() {
141
142
  function Si() {
142
143
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
143
144
  }
144
- var He = !1, Ht = !1;
145
- function gr(t, e) {
145
+ var He = !1, Ot = !1;
146
+ function mr(t, e) {
146
147
  return t.label = e, Ai(t.v, e), t;
147
148
  }
148
149
  function Ai(t, e) {
149
150
  return t?.[ri]?.(e), t;
150
151
  }
151
- var I = null;
152
- function At(t) {
153
- I = t;
152
+ var x = null;
153
+ function wt(t) {
154
+ x = t;
154
155
  }
155
- function zr(t, e = !1, r) {
156
- I = {
157
- p: I,
156
+ function qr(t, e = !1, r) {
157
+ x = {
158
+ p: x,
158
159
  i: !1,
159
160
  c: null,
160
161
  e: null,
161
162
  s: t,
162
163
  x: null,
163
164
  r: T,
164
- l: Ht && !e ? {
165
+ l: Ot && !e ? {
165
166
  s: null,
166
167
  u: null,
167
168
  $: []
168
169
  } : null
169
170
  };
170
171
  }
171
- function Vr(t) {
172
- var e = I, r = e.e;
172
+ function Yr(t) {
173
+ var e = x, r = e.e;
173
174
  if (r !== null) {
174
175
  e.e = null;
175
- for (var n of r) mn(n);
176
+ for (var n of r) pn(n);
176
177
  }
177
- return t !== void 0 && (e.x = t), e.i = !0, I = e.p, nr(t);
178
+ return t !== void 0 && (e.x = t), e.i = !0, x = e.p, er(t);
178
179
  }
179
- function nr(t = {}) {
180
- return nt(t, Dr, { value: !0 }), t;
180
+ function er(t = {}) {
181
+ return et(t, Fr, { value: !0 }), t;
181
182
  }
182
- function Nt() {
183
- return !Ht || I !== null && I.l === null;
183
+ function Mt() {
184
+ return !Ot || x !== null && x.l === null;
184
185
  }
185
- var Se = [];
186
- function Xr() {
187
- var t = Se;
188
- Se = [], Qn(t);
186
+ var Te = [];
187
+ function zr() {
188
+ var t = Te;
189
+ Te = [], Jn(t);
189
190
  }
190
191
  function Oe(t) {
191
- if (Se.length === 0 && !et) {
192
- var e = Se;
192
+ if (Te.length === 0 && !Je) {
193
+ var e = Te;
193
194
  queueMicrotask(() => {
194
- e === Se && Xr();
195
+ e === Te && zr();
195
196
  });
196
197
  }
197
- Se.push(t);
198
+ Te.push(t);
198
199
  }
199
200
  function Ei() {
200
- for (; Se.length > 0; ) Xr();
201
+ for (; Te.length > 0; ) zr();
201
202
  }
202
- var Ti = ~(V | xe | ne);
203
- function M(t, e) {
203
+ var Ti = ~(z | be | re);
204
+ function H(t, e) {
204
205
  t.f = t.f & Ti | e;
205
206
  }
206
- function ir(t) {
207
- (t.f & 512) !== 0 || t.deps === null ? M(t, ne) : M(t, xe);
207
+ function tr(t) {
208
+ (t.f & 512) !== 0 || t.deps === null ? H(t, re) : H(t, be);
208
209
  }
209
- function Ur(t, e, r) {
210
- (t.f & 2048) !== 0 ? e.add(t) : (t.f & 4096) !== 0 && r.add(t), M(t, ne);
210
+ function Vr(t, e) {
211
+ (t.f & 2048) !== 0 ? e.set(t, z) : (t.f & 4096) !== 0 && e.get(t) !== 2048 && e.set(t, be), H(t, re);
211
212
  }
212
- function Pt(t) {
213
- var e = E, r = T;
214
- le(null), _e(null);
213
+ function xt(t) {
214
+ var e = A, r = T;
215
+ oe(null), ye(null);
215
216
  try {
216
217
  return t();
217
218
  } finally {
218
- le(e), _e(r);
219
+ oe(e), ye(r);
219
220
  }
220
221
  }
221
222
  // @__NO_SIDE_EFFECTS__
222
- function Et(t) {
223
- var e = 2 | V;
224
- return T !== null && (T.f |= ut), {
225
- ctx: I,
223
+ function St(t) {
224
+ var e = 2 | z;
225
+ return T !== null && (T.f |= lt), {
226
+ ctx: x,
226
227
  deps: null,
227
228
  effects: null,
228
- equals: qr,
229
+ equals: Wr,
229
230
  f: e,
230
231
  fn: t,
231
232
  reactions: null,
@@ -236,205 +237,192 @@ function Et(t) {
236
237
  ac: null
237
238
  };
238
239
  }
239
- var $i = /* @__PURE__ */ Symbol("obsolete");
240
+ var Ci = /* @__PURE__ */ Symbol("obsolete");
240
241
  // @__NO_SIDE_EFFECTS__
241
- function yr(t) {
242
- const e = /* @__PURE__ */ Et(t);
243
- return He || wn(e), e;
242
+ function Pt(t) {
243
+ const e = /* @__PURE__ */ St(t);
244
+ return He || bn(e), e;
244
245
  }
245
246
  // @__NO_SIDE_EFFECTS__
246
- function ki(t) {
247
- const e = /* @__PURE__ */ Et(t);
248
- return e.equals = Yr, e;
247
+ function $i(t) {
248
+ const e = /* @__PURE__ */ St(t);
249
+ return e.equals = jr, e;
249
250
  }
250
- function Ci(t) {
251
+ function ki(t) {
251
252
  var e = t.effects;
252
253
  if (e !== null) {
253
254
  t.effects = null;
254
- for (var r = 0; r < e.length; r += 1) Z(e[r]);
255
+ for (var r = 0; r < e.length; r += 1) Q(e[r]);
255
256
  }
256
257
  }
257
- function sr(t) {
258
+ function rr(t) {
258
259
  var e, r = T, n = t.parent;
259
260
  if (!fe && n !== null && t.v !== N && (n.f & 24576) !== 0)
260
261
  return li(), t.v;
261
- _e(n);
262
+ ye(n);
262
263
  try {
263
- Ci(t), e = Tn(t);
264
+ ki(t), e = En(t);
264
265
  } finally {
265
- _e(r);
266
+ ye(r);
266
267
  }
267
268
  return e;
268
269
  }
269
- function Qr(t) {
270
- var e = sr(t);
271
- if (!t.equals(e) && (t.wv = An(), (!$?.is_fork || t.deps === null) && ($ !== null ? ($.capture(t, e, !0), qe?.capture(t, e, !0)) : t.v = e, t.deps === null))) {
272
- M(t, ne);
270
+ function Xr(t) {
271
+ var e = rr(t);
272
+ if (!t.equals(e) && (t.wv = Sn(), (!C?.is_fork || t.deps === null) && (C !== null ? (C.capture(t, e, !0), We?.capture(t, e, !0)) : t.v = e, t.deps === null))) {
273
+ H(t, re);
273
274
  return;
274
275
  }
275
- fe || (B !== null ? (ur() || $?.is_fork) && B.set(t, e) : ir(t));
276
+ fe || (B !== null ? (ar() || C?.is_fork) && B.set(t, e) : tr(t));
276
277
  }
277
278
  function Ri(t) {
278
279
  if (t.effects !== null)
279
- for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac !== null && Pt(() => {
280
- e.ac.abort(xt), e.ac = null;
281
- }), e.fn !== null && (e.teardown = Un), lt(e, 0), fr(e));
280
+ for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac !== null && xt(() => {
281
+ e.ac.abort(It), e.ac = null;
282
+ }), e.fn !== null && (e.teardown = Un), it(e, 0), or(e));
282
283
  }
283
- function Jr(t) {
284
+ function Ur(t) {
284
285
  if (t.effects !== null)
285
- for (const e of t.effects) e.teardown && e.fn !== null && Ye(e);
286
+ for (const e of t.effects) e.teardown && e.fn !== null && je(e);
286
287
  }
287
- function Zr(t, e) {
288
+ function Jr(t, e) {
288
289
  if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
289
290
  }
290
- function ar(t, e) {
291
- Zr(t, e), e.add(t);
291
+ function nr(t, e) {
292
+ Jr(t, e), e.add(t);
292
293
  }
293
- function S(t, e, r) {
294
- Zr(t, e), e.set(t, r);
294
+ function E(t, e, r) {
295
+ Jr(t, e), e.set(t, r);
295
296
  }
296
297
  function p(t, e, r) {
297
298
  if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : r;
298
299
  throw new TypeError("Private element is not present on this object");
299
300
  }
300
- function g(t, e, r) {
301
- return t.set(p(t, e), r), r;
302
- }
303
- function a(t, e) {
301
+ function l(t, e) {
304
302
  return t.get(p(t, e));
305
303
  }
306
- var en, Tt = null, Fe = null, $ = null, qe = null, B = null, zt = null, et = !1, Gt = !1, at = null, $t = null, tn = 0;
307
- var Li = 1, kt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakSet(), ze = class rn {
304
+ function w(t, e, r) {
305
+ return t.set(p(t, e), r), r;
306
+ }
307
+ var Qr, At = null, Ke = null, C = null, We = null, B = null, qt = null, Je = !1, Kt = !1, nt = null, Et = null, Zr = 0;
308
+ var Li = 1, Tt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), qe = class en {
308
309
  constructor() {
309
- ar(this, C), u(this, "id", Li++), S(this, kt, !1), u(this, "linked", !0), S(this, $e, null), S(this, Ae, null), u(this, "async_deriveds", /* @__PURE__ */ new Map()), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), S(this, Ct, /* @__PURE__ */ new Set()), S(this, ht, /* @__PURE__ */ new Set()), S(this, Ge, 0), S(this, ye, /* @__PURE__ */ new Map()), S(this, Ue, null), S(this, X, []), S(this, Vt, []), S(this, Me, /* @__PURE__ */ new Set()), S(this, ce, /* @__PURE__ */ new Set()), S(this, he, /* @__PURE__ */ new Map()), S(this, mt, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), S(this, Qe, !1), Fe === null ? Tt = Fe = this : (g(Ae, Fe, this), g($e, this, Fe)), Fe = this;
310
+ nr(this, $), u(this, "id", Li++), u(this, "started", !1), u(this, "linked", !0), u(this, "prev", null), u(this, "next", null), u(this, "async_deriveds", /* @__PURE__ */ new Map()), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), E(this, Tt, /* @__PURE__ */ new Set()), E(this, ct, /* @__PURE__ */ new Set()), E(this, Be, 0), E(this, Ae, /* @__PURE__ */ new Map()), E(this, ze, null), E(this, Me, []), E(this, Yt, []), E(this, pe, /* @__PURE__ */ new Map()), E(this, _e, /* @__PURE__ */ new Map()), E(this, _t, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), E(this, Ve, !1), Ke === null ? At = Ke = this : (Ke.next = this, this.prev = Ke), Ke = this;
310
311
  }
311
312
  skip_effect(e) {
312
- a(he, this).has(e) || a(he, this).set(e, {
313
+ l(_e, this).has(e) || l(_e, this).set(e, {
313
314
  d: [],
314
315
  m: []
315
- }), a(mt, this).delete(e);
316
+ }), l(_t, this).delete(e);
316
317
  }
317
318
  unskip_effect(e, r = (n) => this.schedule(n)) {
318
- var n = a(he, this).get(e);
319
+ var n = l(_e, this).get(e);
319
320
  if (n) {
320
- a(he, this).delete(e);
321
+ l(_e, this).delete(e);
321
322
  for (var i of n.d)
322
- M(i, V), r(i);
323
+ H(i, z), r(i);
323
324
  for (i of n.m)
324
- M(i, xe), r(i);
325
+ H(i, be), r(i);
325
326
  }
326
- a(mt, this).add(e);
327
+ l(_t, this).add(e);
327
328
  }
328
329
  capture(e, r, n = !1) {
329
330
  e.v !== N && !this.previous.has(e) && this.previous.set(e, e.v), (e.f & 8388608) === 0 && (this.current.set(e, [r, n]), B?.set(e, r)), this.is_fork || (e.v = r);
330
331
  }
331
332
  activate() {
332
- $ = this;
333
+ C = this;
333
334
  }
334
335
  deactivate() {
335
- $ = null, B = null;
336
+ C = null, B = null;
336
337
  }
337
338
  flush() {
338
339
  try {
339
- Gt = !0, $ = this, p(C, this, Rt).call(this);
340
+ Kt = !0, C = this, p($, this, Ct).call(this);
340
341
  } finally {
341
- tn = 0, zt = null, at = null, $t = null, Gt = !1, $ = null, B = null, ae.clear();
342
+ Zr = 0, qt = null, nt = null, Et = null, Kt = !1, C = null, B = null, le.clear();
342
343
  }
343
344
  }
344
345
  discard() {
345
- for (const e of a(ht, this)) e(this);
346
- a(ht, this).clear();
347
- for (const e of this.async_deriveds.values()) e.reject($i);
348
- p(C, this, Lt).call(this), a(Ue, this)?.resolve();
346
+ for (const e of l(ct, this)) e(this);
347
+ l(ct, this).clear();
348
+ for (const e of this.async_deriveds.values()) e.reject(Ci);
349
+ p($, this, $t).call(this), l(ze, this)?.resolve();
349
350
  }
350
351
  register_created_effect(e) {
351
- a(Vt, this).push(e);
352
+ l(Yt, this).push(e);
352
353
  }
353
354
  increment(e, r) {
354
- if (g(Ge, this, a(Ge, this) + 1), e) {
355
- let n = a(ye, this).get(r) ?? 0;
356
- a(ye, this).set(r, n + 1);
355
+ if (w(Be, this, l(Be, this) + 1), e) {
356
+ let n = l(Ae, this).get(r) ?? 0;
357
+ l(Ae, this).set(r, n + 1);
357
358
  }
358
359
  }
359
360
  decrement(e, r) {
360
- if (g(Ge, this, a(Ge, this) - 1), e) {
361
- let n = a(ye, this).get(r) ?? 0;
362
- n === 1 ? a(ye, this).delete(r) : a(ye, this).set(r, n - 1);
361
+ if (w(Be, this, l(Be, this) - 1), e) {
362
+ let n = l(Ae, this).get(r) ?? 0;
363
+ n === 1 ? l(Ae, this).delete(r) : l(Ae, this).set(r, n - 1);
363
364
  }
364
- a(Qe, this) || (g(Qe, this, !0), Oe(() => {
365
- g(Qe, this, !1), this.linked && this.flush();
365
+ l(Ve, this) || (w(Ve, this, !0), Oe(() => {
366
+ w(Ve, this, !1), this.linked && this.flush();
366
367
  }));
367
368
  }
368
- transfer_effects(e, r) {
369
- for (const n of e) a(Me, this).add(n);
370
- for (const n of r) a(ce, this).add(n);
371
- e.clear(), r.clear();
369
+ transfer_reactions(e) {
370
+ for (const [r, n] of e) this.add_dirty_reaction(r, n);
371
+ e.clear();
372
+ }
373
+ add_dirty_reaction(e, r) {
374
+ (r === 2048 || l(pe, this).get(e) !== 2048) && l(pe, this).set(e, r);
372
375
  }
373
376
  oncommit(e) {
374
- a(Ct, this).add(e);
377
+ l(Tt, this).add(e);
375
378
  }
376
379
  ondiscard(e) {
377
- a(ht, this).add(e);
380
+ l(ct, this).add(e);
378
381
  }
379
382
  settled() {
380
- return (a(Ue, this) ?? g(Ue, this, Jn())).promise;
383
+ return (l(ze, this) ?? w(ze, this, Qn())).promise;
381
384
  }
382
385
  static ensure() {
383
- if ($ === null) {
384
- const e = $ = new rn();
385
- !Gt && !et && Oe(() => {
386
- a(kt, e) || e.flush();
386
+ if (C === null) {
387
+ const e = C = new en();
388
+ !Kt && !Je && Oe(() => {
389
+ e.started || e.flush();
387
390
  });
388
391
  }
389
- return $;
392
+ return C;
390
393
  }
391
394
  apply() {
392
- if (!He || !this.is_fork && a($e, this) === null && a(Ae, this) === null) {
395
+ if (!He || !this.is_fork && this.prev === null && this.next === null) {
393
396
  B = null;
394
397
  return;
395
398
  }
396
399
  B = /* @__PURE__ */ new Map();
397
- for (const [r, [n]] of this.current) B.set(r, n);
398
- for (let r = Tt; r !== null; r = a(Ae, r))
399
- if (!(r === this || r.is_fork)) {
400
- var e = !1;
401
- if (r.id < this.id) {
402
- for (const [n, [, i]] of r.current)
403
- if (!i && this.current.has(n)) {
404
- e = !0;
405
- break;
406
- }
407
- }
408
- if (!e)
409
- for (const [n, i] of r.previous) B.has(n) || B.set(n, i);
410
- }
400
+ for (const [e, [r]] of this.current) B.set(e, r);
401
+ for (let e = At; e !== null; e = e.next)
402
+ if (!(e === this || e.is_fork) && (e.id >= this.id || !p($, e, nn).call(e, this)))
403
+ for (const [r, n] of e.previous) B.has(r) || B.set(r, n);
411
404
  }
412
405
  schedule(e) {
413
- if (zt = e, e.b?.is_pending && (e.f & 16777228) !== 0 && (e.f & 32768) === 0) {
406
+ if (qt = e, e.b?.is_pending && (e.f & 16777228) !== 0 && (e.f & 32768) === 0) {
414
407
  e.b.defer_effect(e);
415
408
  return;
416
409
  }
417
- a(X, this).push(e);
410
+ l(Me, this).push(e);
418
411
  }
419
412
  };
420
- en = ze;
421
- function br() {
413
+ Qr = qe;
414
+ function gr() {
422
415
  if (this.is_fork) return !0;
423
- for (const r of a(ye, this).keys()) {
424
- for (var t = r, e = !1; t.parent !== null; ) {
425
- if (a(he, this).has(t)) {
426
- e = !0;
427
- break;
428
- }
429
- t = t.parent;
430
- }
431
- if (!e) return !0;
432
- }
416
+ for (const t of l(Ae, this).keys()) if (!p($, this, Ii).call(this, t)) return !0;
417
+ return !1;
418
+ }
419
+ function Ii(t) {
420
+ for (var e = t; e !== null; e = e.parent) if (l(_e, this).has(e)) return !0;
433
421
  return !1;
434
422
  }
435
- function nn() {
423
+ function tn() {
436
424
  var t = [];
437
- for (const i of a(X, this))
425
+ for (const i of l(Me, this))
438
426
  if (!((i.f & 16384) !== 0 || (i.f & 6144) === 0)) {
439
427
  for (var e = i, r = !1; e.parent !== null; ) {
440
428
  e = e.parent;
@@ -444,63 +432,56 @@ function nn() {
444
432
  r = !0;
445
433
  break;
446
434
  }
447
- e.f ^= ne;
435
+ e.f ^= re;
448
436
  }
449
437
  }
450
438
  r || t.push(e);
451
439
  }
452
- return g(X, this, []), t;
440
+ return w(Me, this, []), t;
453
441
  }
454
- function Rt() {
455
- g(kt, this, !0);
456
- for (const l of a(Me, this))
457
- a(ce, this).delete(l), M(l, V), this.schedule(l);
458
- for (const l of a(ce, this))
459
- M(l, xe), this.schedule(l);
442
+ function Ct() {
443
+ this.started = !0;
444
+ for (const [a, o] of l(pe, this))
445
+ H(a, o), this.schedule(a);
460
446
  this.apply();
461
- for (var t = at = [], e = [], r = $t = []; a(X, this).length > 0; ) {
462
- tn++ > 1e3 && (p(C, this, Lt).call(this), xi());
463
- for (const l of p(C, this, nn).call(this)) try {
464
- p(C, this, sn).call(this, l, t, e);
447
+ for (var t = nt = [], e = [], r = Et = []; l(Me, this).length > 0; ) {
448
+ Zr++ > 1e3 && (p($, this, $t).call(this), Hi());
449
+ for (const a of p($, this, tn).call(this)) try {
450
+ p($, this, rn).call(this, a, t, e);
465
451
  } catch (o) {
466
- throw on(l), p(C, this, br).call(this) || this.discard(), o;
452
+ throw ln(a), p($, this, gr).call(this) || this.discard(), o;
467
453
  }
468
454
  }
469
- if ($ = null, r.length > 0) {
470
- var n = en.ensure();
471
- for (const l of r) n.schedule(l);
455
+ if (C = null, r.length > 0) {
456
+ var n = Qr.ensure();
457
+ for (const a of r) n.schedule(a);
472
458
  }
473
- if (at = null, $t = null, p(C, this, br).call(this)) {
474
- p(C, this, Je).call(this, e), p(C, this, Je).call(this, t);
475
- for (const [l, o] of a(he, this)) ln(l, o);
476
- r.length > 0 && p(C, $, Rt).call($);
459
+ if (nt = null, Et = null, p($, this, gr).call(this)) {
460
+ p($, this, Xe).call(this, e), p($, this, Xe).call(this, t);
461
+ for (const [a, o] of l(_e, this)) an(a, o);
462
+ r.length > 0 && p($, C, Ct).call(C);
477
463
  return;
478
464
  }
479
- const i = p(C, this, Oi).call(this);
465
+ const i = p($, this, Oi).call(this);
480
466
  if (i) {
481
- p(C, this, Je).call(this, e), p(C, this, Je).call(this, t), p(C, i, Mi).call(i, this);
467
+ p($, this, Xe).call(this, e), p($, this, Xe).call(this, t), p($, i, Mi).call(i, this);
482
468
  return;
483
469
  }
484
- a(Me, this).clear(), a(ce, this).clear();
485
- for (const l of a(Ct, this)) l(this);
486
- a(Ct, this).clear(), qe = this, wr(e), wr(t), qe = null, a(Ue, this)?.resolve();
487
- var s = $;
488
- if (a(Ge, this) === 0 && (a(X, this).length === 0 || s !== null) && (p(C, this, Lt).call(this), He && (p(C, this, Ii).call(this), $ = s)), a(X, this).length > 0)
489
- if (s !== null) {
490
- for (const l of a(X, this)) a(X, s).push(l);
491
- g(X, this, []);
492
- } else s = this;
493
- s !== null && (ae.clear(), p(C, s, Rt).call(s));
494
- }
495
- function sn(t, e, r) {
496
- t.f ^= ne;
470
+ l(pe, this).clear();
471
+ for (const a of l(Tt, this)) a(this);
472
+ l(Tt, this).clear(), We = this, yr(e), yr(t), We = null, l(ze, this)?.resolve();
473
+ var s = C;
474
+ l(Be, this) === 0 && (l(Me, this).length === 0 || s !== null) && (p($, this, $t).call(this), He && (p($, this, xi).call(this), C = s)), s !== null && (le.clear(), p($, s, Ct).call(s));
475
+ }
476
+ function rn(t, e, r) {
477
+ t.f ^= re;
497
478
  for (var n = t.first; n !== null; ) {
498
479
  var i = n.f, s = (i & 96) !== 0;
499
- if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || a(he, this).has(n)) && n.fn !== null) {
500
- s ? n.f ^= ne : (i & 4) !== 0 ? e.push(n) : He && (i & 16777224) !== 0 ? r.push(n) : ct(n) && ((i & 16) !== 0 && a(ce, this).add(n), Ye(n));
501
- var l = n.first;
502
- if (l !== null) {
503
- n = l;
480
+ if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || l(_e, this).has(n)) && n.fn !== null) {
481
+ s ? n.f ^= re : (i & 4) !== 0 ? e.push(n) : He && (i & 16777224) !== 0 ? r.push(n) : ot(n) && ((i & 16) !== 0 && this.add_dirty_reaction(n, be), je(n));
482
+ var a = n.first;
483
+ if (a !== null) {
484
+ n = a;
504
485
  continue;
505
486
  }
506
487
  }
@@ -515,14 +496,15 @@ function sn(t, e, r) {
515
496
  }
516
497
  }
517
498
  function Oi() {
518
- for (var t = a($e, this); t !== null; ) {
519
- if (!t.is_fork) {
520
- for (const [e, [, r]] of this.current) if (t.current.has(e) && !r) return t;
521
- }
522
- t = a($e, t);
523
- }
499
+ for (var t = this.prev; t !== null; t = t.prev) if (!t.is_fork && p($, this, nn).call(this, t)) return t;
524
500
  return null;
525
501
  }
502
+ function nn(t) {
503
+ for (const [e, [, r]] of this.current)
504
+ if (!r && t.current.has(e))
505
+ return !0;
506
+ return !1;
507
+ }
526
508
  function Mi(t) {
527
509
  for (const [r, n] of t.current)
528
510
  !this.previous.has(r) && t.previous.has(r) && this.previous.set(r, t.previous.get(r)), this.current.set(r, n);
@@ -530,164 +512,164 @@ function Mi(t) {
530
512
  const i = this.async_deriveds.get(r);
531
513
  i && n.promise.then(i.resolve).catch(i.reject);
532
514
  }
533
- t.async_deriveds.clear(), this.transfer_effects(a(Me, t), a(ce, t));
515
+ t.async_deriveds.clear(), this.transfer_reactions(l(pe, t));
534
516
  const e = (r) => {
535
517
  var n = r.reactions;
536
518
  if (n !== null && !((r.f & 2) !== 0 && (r.f & 6144) === 0))
537
- for (const l of n) {
538
- var i = l.f;
539
- if ((i & 2) !== 0) e(l);
519
+ for (const a of n) {
520
+ var i = a.f;
521
+ if ((i & 2) !== 0) e(a);
540
522
  else {
541
- var s = l;
542
- i & 4194320 && !this.async_deriveds.has(s) && (a(ce, this).delete(s), M(s, V), this.schedule(s));
523
+ var s = a;
524
+ i & 4194320 && !this.async_deriveds.has(s) && (l(pe, this).delete(s), H(s, z), this.schedule(s));
543
525
  }
544
526
  }
545
527
  };
546
528
  for (const r of this.current.keys()) e(r);
547
- this.oncommit(() => t.discard()), p(C, t, Lt).call(t), $ = this, p(C, this, Rt).call(this);
529
+ this.oncommit(() => t.discard()), p($, t, $t).call(t), C = this, p($, this, Ct).call(this);
548
530
  }
549
- function Je(t) {
550
- for (var e = 0; e < t.length; e += 1) Ur(t[e], a(Me, this), a(ce, this));
531
+ function Xe(t) {
532
+ for (var e = 0; e < t.length; e += 1) Vr(t[e], l(pe, this));
551
533
  }
552
- function Ii() {
553
- for (let v = Tt; v !== null; v = a(Ae, v)) {
534
+ function xi() {
535
+ for (let v = At; v !== null; v = v.next) {
554
536
  var t = v.id < this.id, e = [];
555
- for (const [c, [d, h]] of this.current) {
556
- if (v.current.has(c)) {
557
- var r = v.current.get(c)[0];
558
- if (t && d !== r) v.current.set(c, [d, h]);
537
+ for (const [h, [f, d]] of this.current) {
538
+ if (v.current.has(h)) {
539
+ var r = v.current.get(h)[0];
540
+ if (t && f !== r) v.current.set(h, [f, d]);
559
541
  else continue;
560
542
  }
561
- e.push(c);
543
+ e.push(h);
562
544
  }
563
- if (t) for (const [c, d] of this.async_deriveds) {
564
- const h = v.async_deriveds.get(c);
565
- h && d.promise.then(h.resolve).catch(h.reject);
545
+ if (t) for (const [h, f] of this.async_deriveds) {
546
+ const d = v.async_deriveds.get(h);
547
+ d && f.promise.then(d.resolve).catch(d.reject);
566
548
  }
567
- var n = [...v.current.keys()].filter((c) => !v.current.get(c)[1]);
568
- if (!(!a(kt, v) || n.length === 0)) {
569
- var i = n.filter((c) => !this.current.has(c));
549
+ var n = [...v.current.keys()].filter((h) => !v.current.get(h)[1]);
550
+ if (!(!v.started || n.length === 0)) {
551
+ var i = n.filter((h) => !this.current.has(h));
570
552
  if (i.length === 0)
571
553
  t && v.discard();
572
554
  else if (e.length > 0) {
573
- if (t) for (const c of a(mt, this)) v.unskip_effect(c, (d) => {
574
- (d.f & 4194320) !== 0 ? v.schedule(d) : p(C, v, Je).call(v, [d]);
555
+ if (t) for (const h of l(_t, this)) v.unskip_effect(h, (f) => {
556
+ (f.f & 4194320) !== 0 ? v.schedule(f) : p($, v, Xe).call(v, [f]);
575
557
  });
576
558
  v.activate();
577
- var s = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
578
- for (var o of e) an(o, i, s, l);
579
- l = /* @__PURE__ */ new Map();
580
- var f = [...v.current].filter(([c, d]) => {
581
- const h = this.current.get(c);
582
- return h ? h[0] !== d[0] || h[1] !== d[1] : !0;
583
- }).map(([c]) => c);
584
- if (f.length > 0)
585
- for (const c of a(Vt, this)) (c.f & 155648) === 0 && lr(c, f, l) && ((c.f & 4194320) !== 0 ? (M(c, V), v.schedule(c)) : a(Me, v).add(c));
586
- if (a(X, v).length > 0 && !a(Qe, v)) {
559
+ var s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
560
+ for (var o of e) sn(o, i, s, a);
561
+ a = /* @__PURE__ */ new Map();
562
+ var c = [...v.current].filter(([h, f]) => {
563
+ const d = this.current.get(h);
564
+ return d ? d[0] !== f[0] || d[1] !== f[1] : !0;
565
+ }).map(([h]) => h);
566
+ if (c.length > 0)
567
+ for (const h of l(Yt, this)) (h.f & 155648) === 0 && ir(h, c, a) && ((h.f & 4194320) !== 0 ? (H(h, z), v.schedule(h)) : v.add_dirty_reaction(h, z));
568
+ if (l(Me, v).length > 0 && !l(Ve, v)) {
587
569
  v.apply();
588
- for (var y of p(C, v, nn).call(v)) p(C, v, sn).call(v, y, [], []);
570
+ for (var y of p($, v, tn).call(v)) p($, v, rn).call(v, y, [], []);
589
571
  }
590
572
  v.deactivate();
591
573
  }
592
574
  }
593
575
  }
594
576
  }
595
- function Lt() {
577
+ function $t() {
596
578
  if (this.linked) {
597
- var t = a($e, this), e = a(Ae, this);
598
- t === null ? Tt = e : g(Ae, t, e), e === null ? Fe = t : g($e, e, t), this.linked = !1;
579
+ var t = this.prev, e = this.next;
580
+ t === null ? At = e : t.next = e, e === null ? Ke = t : e.prev = t, this.linked = !1;
599
581
  }
600
582
  }
601
- function be(t) {
602
- var e = et, r = qe;
603
- qe = null, et = !0;
583
+ function ve(t) {
584
+ var e = Je, r = We;
585
+ We = null, Je = !0;
604
586
  try {
605
587
  var n;
606
- for (t && (be(), n = t()); ; ) {
607
- if (Ei(), $ === null) return n;
608
- $.flush();
588
+ for (t && (ve(), n = t()); ; ) {
589
+ if (Ei(), C === null) return n;
590
+ C.flush();
609
591
  }
610
592
  } finally {
611
- et = e, qe = r;
593
+ Je = e, We = r;
612
594
  }
613
595
  }
614
- function xi() {
596
+ function Hi() {
615
597
  if (0) {
616
598
  var t;
617
- for (const r of $.current.keys()) for (const [n, i] of r.updated ?? [])
599
+ for (const r of C.current.keys()) for (const [n, i] of r.updated ?? [])
618
600
  var e;
619
601
  }
620
602
  try {
621
603
  pi();
622
604
  } catch (r) {
623
- de(r, zt);
605
+ me(r, qt);
624
606
  }
625
607
  }
626
- var ue = null;
627
- function wr(t) {
608
+ var ce = null;
609
+ function yr(t) {
628
610
  var e = t.length;
629
611
  if (e !== 0) {
630
612
  for (var r = 0; r < e; ) {
631
613
  var n = t[r++];
632
- if ((n.f & 24576) === 0 && ct(n) && (ue = /* @__PURE__ */ new Set(), Ye(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && yn(n), ue?.size > 0)) {
633
- ae.clear();
634
- for (const i of ue) {
614
+ if ((n.f & 24576) === 0 && ot(n) && (ce = /* @__PURE__ */ new Set(), je(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && gn(n), ce?.size > 0)) {
615
+ le.clear();
616
+ for (const i of ce) {
635
617
  if ((i.f & 24576) !== 0) continue;
636
618
  const s = [i];
637
- let l = i.parent;
638
- for (; l !== null; )
639
- ue.has(l) && (ue.delete(l), s.push(l)), l = l.parent;
619
+ let a = i.parent;
620
+ for (; a !== null; )
621
+ ce.has(a) && (ce.delete(a), s.push(a)), a = a.parent;
640
622
  for (let o = s.length - 1; o >= 0; o--) {
641
- const f = s[o];
642
- (f.f & 24576) === 0 && Ye(f);
623
+ const c = s[o];
624
+ (c.f & 24576) === 0 && je(c);
643
625
  }
644
626
  }
645
- ue.clear();
627
+ ce.clear();
646
628
  }
647
629
  }
648
- ue = null;
630
+ ce = null;
649
631
  }
650
632
  }
651
- function an(t, e, r, n) {
633
+ function sn(t, e, r, n) {
652
634
  if (!r.has(t) && (r.add(t), t.reactions !== null))
653
635
  for (const i of t.reactions) {
654
636
  const s = i.f;
655
- (s & 2) !== 0 ? an(i, e, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && lr(i, e, n) && (M(i, V), or(i));
637
+ (s & 2) !== 0 ? sn(i, e, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && ir(i, e, n) && (H(i, z), sr(i));
656
638
  }
657
639
  }
658
- function lr(t, e, r) {
640
+ function ir(t, e, r) {
659
641
  const n = r.get(t);
660
642
  if (n !== void 0) return n;
661
643
  if (t.deps !== null) for (const i of t.deps) {
662
- if (rt.call(e, i)) return !0;
663
- if ((i.f & 2) !== 0 && lr(i, e, r))
644
+ if (Ze.call(e, i)) return !0;
645
+ if ((i.f & 2) !== 0 && ir(i, e, r))
664
646
  return r.set(i, !0), !0;
665
647
  }
666
648
  return r.set(t, !1), !1;
667
649
  }
668
- function or(t) {
669
- $.schedule(t);
650
+ function sr(t) {
651
+ C.schedule(t);
670
652
  }
671
- function ln(t, e) {
653
+ function an(t, e) {
672
654
  if (!((t.f & 32) !== 0 && (t.f & 1024) !== 0)) {
673
- (t.f & 2048) !== 0 ? e.d.push(t) : (t.f & 4096) !== 0 && e.m.push(t), M(t, ne);
655
+ (t.f & 2048) !== 0 ? e.d.push(t) : (t.f & 4096) !== 0 && e.m.push(t), H(t, re);
674
656
  for (var r = t.first; r !== null; )
675
- ln(r, e), r = r.next;
657
+ an(r, e), r = r.next;
676
658
  }
677
659
  }
678
- function on(t) {
679
- M(t, ne);
660
+ function ln(t) {
661
+ H(t, re);
680
662
  for (var e = t.first; e !== null; )
681
- on(e), e = e.next;
663
+ ln(e), e = e.next;
682
664
  }
683
- var Ot = /* @__PURE__ */ new Set(), ae = /* @__PURE__ */ new Map();
684
- var un = !1;
685
- function Kt(t, e) {
665
+ var kt = /* @__PURE__ */ new Set(), le = /* @__PURE__ */ new Map();
666
+ var on = !1;
667
+ function Ht(t, e) {
686
668
  var r = {
687
669
  f: 0,
688
670
  v: t,
689
671
  reactions: null,
690
- equals: qr,
672
+ equals: Wr,
691
673
  rv: 0,
692
674
  wv: 0
693
675
  };
@@ -695,138 +677,138 @@ function Kt(t, e) {
695
677
  }
696
678
  // @__NO_SIDE_EFFECTS__
697
679
  function j(t, e) {
698
- const r = Kt(t, e);
699
- return wn(r), r;
680
+ const r = Ht(t, e);
681
+ return bn(r), r;
700
682
  }
701
683
  // @__NO_SIDE_EFFECTS__
702
- function Hi(t, e = !1, r = !0) {
703
- const n = Kt(t);
704
- if (e || (n.equals = Yr), Ht && r && I !== null && I.l !== null) {
684
+ function Ni(t, e = !1, r = !0) {
685
+ const n = Ht(t);
686
+ if (e || (n.equals = jr), Ot && r && x !== null && x.l !== null) {
705
687
  var i;
706
- ((i = I.l).s ?? (i.s = [])).push(n);
688
+ ((i = x.l).s ?? (i.s = [])).push(n);
707
689
  }
708
690
  return n;
709
691
  }
710
- function P(t, e, r = !1) {
711
- E !== null && (!U || (E.f & 131072) !== 0) && Nt() && (E.f & 4325394) !== 0 && (ee === null || !ee.has(t)) && wi();
712
- let n = r ? je(e) : e;
713
- return cn(t, n, $t);
692
+ function K(t, e, r = !1) {
693
+ A !== null && (!X || (A.f & 131072) !== 0) && Mt() && (A.f & 4325394) !== 0 && (Z === null || !Z.has(t)) && wi();
694
+ let n = r ? De(e) : e;
695
+ return un(t, n, Et);
714
696
  }
715
- var we = null, Xt = 0;
716
- function cn(t, e, r = null) {
697
+ var Ee = null, zt = 0;
698
+ function un(t, e, r = null) {
717
699
  if (!t.equals(e)) {
718
- fe ? ae.set(t, e) : ae.has(t) || ae.set(t, t.v);
719
- var n = ze.ensure();
700
+ fe ? le.set(t, e) : le.has(t) || le.set(t, t.v);
701
+ var n = qe.ensure();
720
702
  if (n.capture(t, e), (t.f & 2) !== 0) {
721
703
  const i = t;
722
- (t.f & 2048) !== 0 && sr(i), B === null && ir(i);
704
+ (t.f & 2048) !== 0 && rr(i), B === null && tr(i);
723
705
  }
724
- t.wv = An(), we = null, Xt = 0, fn(t, V, r), we = null, Nt() && T !== null && (T.f & 1024) !== 0 && (T.f & 96) === 0 && (z === null ? Ji([t]) : z.push(t)), !n.is_fork && Ot.size > 0 && !un && Ni();
706
+ t.wv = Sn(), Ee = null, zt = 0, cn(t, z, r), Ee = null, Mt() && T !== null && (T.f & 1024) !== 0 && (T.f & 96) === 0 && (V === null ? Zi([t]) : V.push(t)), !n.is_fork && kt.size > 0 && !on && Pi();
725
707
  }
726
708
  return e;
727
709
  }
728
- function Ni() {
729
- un = !1;
730
- for (const t of Ot) {
731
- (t.f & 1024) !== 0 && M(t, xe);
710
+ function Pi() {
711
+ on = !1;
712
+ for (const t of kt) {
713
+ (t.f & 1024) !== 0 && H(t, be);
732
714
  let e;
733
715
  try {
734
- e = ct(t);
716
+ e = ot(t);
735
717
  } catch {
736
718
  e = !0;
737
719
  }
738
- e && Ye(t);
720
+ e && je(t);
739
721
  }
740
- Ot.clear();
722
+ kt.clear();
741
723
  }
742
- function tt(t) {
743
- P(t, t.v + 1);
724
+ function Qe(t) {
725
+ K(t, t.v + 1);
744
726
  }
745
- function fn(t, e, r) {
727
+ function cn(t, e, r) {
746
728
  var n = t.reactions;
747
729
  if (n !== null) {
748
- var i = Nt(), s = n.length;
749
- if (Xt += s, Xt > 1e5 && we === null && (we = /* @__PURE__ */ new Set()), we !== null) {
750
- if (we.has(t)) return;
751
- we.add(t);
730
+ var i = Mt(), s = n.length;
731
+ if (zt += s, zt > 1e5 && Ee === null && (Ee = /* @__PURE__ */ new Set()), Ee !== null) {
732
+ if (Ee.has(t)) return;
733
+ Ee.add(t);
752
734
  }
753
- for (var l = 0; l < s; l++) {
754
- var o = n[l], f = o.f;
735
+ for (var a = 0; a < s; a++) {
736
+ var o = n[a], c = o.f;
755
737
  if (!(!i && o === T)) {
756
- var y = (f & V) === 0;
757
- if (y && M(o, e), (f & 131072) !== 0) Ot.add(o);
758
- else if ((f & 2) !== 0) {
738
+ var y = (c & z) === 0;
739
+ if (y && H(o, e), (c & 131072) !== 0) kt.add(o);
740
+ else if ((c & 2) !== 0) {
759
741
  var v = o;
760
- B?.delete(v), fn(v, xe, r);
742
+ B?.delete(v), cn(v, be, r);
761
743
  } else if (y) {
762
- var c = o;
763
- (f & 16) !== 0 && ue !== null && ue.add(c), r !== null ? r.push(c) : or(c);
744
+ var h = o;
745
+ (c & 16) !== 0 && ce !== null && ce.add(h), r !== null ? r.push(h) : sr(h);
764
746
  }
765
747
  }
766
748
  }
767
749
  }
768
750
  }
769
- var Pi = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
770
- function je(t) {
771
- if (typeof t != "object" || t === null || Ze in t || Dr in t) return t;
751
+ var Ki = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
752
+ function De(t) {
753
+ if (typeof t != "object" || t === null || Ue in t || Fr in t) return t;
772
754
  const e = Xn(t);
773
755
  if (e !== zn && e !== Vn) return t;
774
- var r = /* @__PURE__ */ new Map(), n = jn(t), i = /* @__PURE__ */ j(0), s = null, l = ke, o = (c) => {
775
- if (ke === l) return c();
776
- var d = E, h = ke;
777
- le(null), Er(l);
778
- var _ = c();
779
- return le(d), Er(h), _;
756
+ var r = /* @__PURE__ */ new Map(), n = jn(t), i = /* @__PURE__ */ j(0), s = null, a = ke, o = (h) => {
757
+ if (ke === a) return h();
758
+ var f = A, d = ke;
759
+ oe(null), Sr(a);
760
+ var _ = h();
761
+ return oe(f), Sr(d), _;
780
762
  };
781
763
  n && r.set("length", /* @__PURE__ */ j(t.length, s));
782
- var f = "";
764
+ var c = "";
783
765
  let y = !1;
784
- function v(c) {
766
+ function v(h) {
785
767
  if (!y) {
786
- y = !0, f = c, gr(i, `${f} version`);
787
- for (const [d, h] of r) gr(h, Ki(f, d));
768
+ y = !0, c = h, mr(i, `${c} version`);
769
+ for (const [f, d] of r) mr(d, Bi(c, f));
788
770
  y = !1;
789
771
  }
790
772
  }
791
773
  return new Proxy(t, {
792
- defineProperty(c, d, h) {
793
- (!("value" in h) || h.configurable === !1 || h.enumerable === !1 || h.writable === !1) && yi();
794
- var _ = r.get(d);
774
+ defineProperty(h, f, d) {
775
+ (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && yi();
776
+ var _ = r.get(f);
795
777
  return _ === void 0 ? o(() => {
796
- var m = /* @__PURE__ */ j(h.value, s);
797
- return r.set(d, m), m;
798
- }) : P(_, h.value, !0), !0;
778
+ var m = /* @__PURE__ */ j(d.value, s);
779
+ return r.set(f, m), m;
780
+ }) : K(_, d.value, !0), !0;
799
781
  },
800
- deleteProperty(c, d) {
801
- var h = r.get(d);
802
- if (h === void 0) {
803
- if (d in c) {
782
+ deleteProperty(h, f) {
783
+ var d = r.get(f);
784
+ if (d === void 0) {
785
+ if (f in h) {
804
786
  const _ = o(() => /* @__PURE__ */ j(N, s));
805
- r.set(d, _), tt(i);
787
+ r.set(f, _), Qe(i);
806
788
  }
807
789
  } else
808
- P(h, N), tt(i);
790
+ K(d, N), Qe(i);
809
791
  return !0;
810
792
  },
811
- get(c, d, h) {
812
- if (d === Ze) return t;
813
- var _ = r.get(d), m = d in c;
814
- if (_ === void 0 && (!m || Te(c, d)?.writable) && (_ = o(() => {
815
- var O = je(m ? c[d] : N), x = /* @__PURE__ */ j(O, s);
816
- return x;
817
- }), r.set(d, _)), _ !== void 0) {
818
- var L = A(_);
819
- return L === N ? void 0 : L;
793
+ get(h, f, d) {
794
+ if (f === Ue) return t;
795
+ var _ = r.get(f), m = f in h;
796
+ if (_ === void 0 && (!m || $e(h, f)?.writable) && (_ = o(() => {
797
+ var R = De(m ? h[f] : N), P = /* @__PURE__ */ j(R, s);
798
+ return P;
799
+ }), r.set(f, _)), _ !== void 0) {
800
+ var I = S(_);
801
+ return I === N ? void 0 : I;
820
802
  }
821
- return Reflect.get(c, d, h);
803
+ return Reflect.get(h, f, d);
822
804
  },
823
- getOwnPropertyDescriptor(c, d) {
824
- this.has?.(c, d);
825
- var h = Reflect.getOwnPropertyDescriptor(c, d), _ = r.get(d);
805
+ getOwnPropertyDescriptor(h, f) {
806
+ this.has?.(h, f);
807
+ var d = Reflect.getOwnPropertyDescriptor(h, f), _ = r.get(f);
826
808
  if (_ !== void 0) {
827
- var m = A(_);
809
+ var m = S(_);
828
810
  if (m === N) return;
829
- if (h && "value" in h) h.value = m;
811
+ if (d && "value" in d) d.value = m;
830
812
  else return {
831
813
  enumerable: !0,
832
814
  configurable: !0,
@@ -834,91 +816,91 @@ function je(t) {
834
816
  writable: !0
835
817
  };
836
818
  }
837
- return h;
819
+ return d;
838
820
  },
839
- has(c, d) {
840
- if (d === Ze) return !0;
841
- var h = r.get(d), _ = h !== void 0 && h.v !== N || Reflect.has(c, d);
842
- return (h !== void 0 || T !== null && (!_ || Te(c, d)?.writable)) && (h === void 0 && (h = o(() => {
843
- var m = _ ? je(c[d]) : N, L = /* @__PURE__ */ j(m, s);
844
- return L;
845
- }), r.set(d, h)), A(h) === N) ? !1 : _;
821
+ has(h, f) {
822
+ if (f === Ue) return !0;
823
+ var d = r.get(f), _ = d !== void 0 && d.v !== N || Reflect.has(h, f);
824
+ return (d !== void 0 || (T !== null || A !== null) && (!_ || $e(h, f)?.writable)) && (d === void 0 && (d = o(() => {
825
+ var m = _ ? De(h[f]) : N, I = /* @__PURE__ */ j(m, s);
826
+ return I;
827
+ }), r.set(f, d)), S(d) === N) ? !1 : _;
846
828
  },
847
- set(c, d, h, _) {
848
- var m = r.get(d), L = d in c;
849
- if (n && d === "length") for (var O = h; O < m.v; O += 1) {
850
- var x = r.get(O + "");
851
- x !== void 0 ? P(x, N) : O in c && (x = o(() => /* @__PURE__ */ j(N, s)), r.set(O + "", x));
829
+ set(h, f, d, _) {
830
+ var m = r.get(f), I = f in h;
831
+ if (n && f === "length") for (var R = d; R < m.v; R += 1) {
832
+ var P = r.get(R + "");
833
+ P !== void 0 ? K(P, N) : R in h && (P = o(() => /* @__PURE__ */ j(N, s)), r.set(R + "", P));
852
834
  }
853
835
  if (m === void 0)
854
- (!L || Te(c, d)?.writable) && (m = o(() => /* @__PURE__ */ j(void 0, s)), P(m, je(h)), r.set(d, m));
836
+ (!I || $e(h, f)?.writable) && (m = o(() => /* @__PURE__ */ j(void 0, s)), K(m, De(d)), r.set(f, m));
855
837
  else {
856
- L = m.v !== N;
857
- var w = o(() => je(h));
858
- P(m, w);
838
+ I = m.v !== N;
839
+ var ne = o(() => De(d));
840
+ K(m, ne);
859
841
  }
860
- var H = Reflect.getOwnPropertyDescriptor(c, d);
861
- if (H?.set && H.set.call(_, h), !L) {
862
- if (n && typeof d == "string") {
863
- var pe = r.get("length"), Ke = Number(d);
864
- Number.isInteger(Ke) && Ke >= pe.v && P(pe, Ke + 1);
842
+ var O = Reflect.getOwnPropertyDescriptor(h, f);
843
+ if (O?.set && O.set.call(_, d), !I) {
844
+ if (n && typeof f == "string") {
845
+ var ie = r.get("length"), g = Number(f);
846
+ Number.isInteger(g) && g >= ie.v && K(ie, g + 1);
865
847
  }
866
- tt(i);
848
+ Qe(i);
867
849
  }
868
850
  return !0;
869
851
  },
870
- ownKeys(c) {
871
- A(i);
872
- var d = Reflect.ownKeys(c).filter((m) => {
873
- var L = r.get(m);
874
- return L === void 0 || L.v !== N;
852
+ ownKeys(h) {
853
+ S(i);
854
+ var f = Reflect.ownKeys(h).filter((m) => {
855
+ var I = r.get(m);
856
+ return I === void 0 || I.v !== N;
875
857
  });
876
- for (var [h, _] of r) _.v !== N && !(h in c) && d.push(h);
877
- return d;
858
+ for (var [d, _] of r) _.v !== N && !(d in h) && f.push(d);
859
+ return f;
878
860
  },
879
861
  setPrototypeOf() {
880
862
  bi();
881
863
  }
882
864
  });
883
865
  }
884
- function Ki(t, e) {
885
- return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` : Pi.test(e) ? `${t}.${e}` : /^\d+$/.test(e) ? `${t}[${e}]` : `${t}['${e}']`;
866
+ function Bi(t, e) {
867
+ return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` : Ki.test(e) ? `${t}.${e}` : /^\d+$/.test(e) ? `${t}[${e}]` : `${t}['${e}']`;
886
868
  }
887
- var Sr, Bi, hn, dn, vn;
888
- function Ut() {
889
- if (Sr === void 0) {
890
- Sr = window, Bi = document, hn = /Firefox/.test(navigator.userAgent);
869
+ var br, Fi, fn, hn, dn;
870
+ function Vt() {
871
+ if (br === void 0) {
872
+ br = window, Fi = document, fn = /Firefox/.test(navigator.userAgent);
891
873
  var t = Element.prototype, e = Node.prototype, r = Text.prototype;
892
- dn = Te(e, "firstChild").get, vn = Te(e, "nextSibling").get, pr(t) && (t[ii] = void 0, t[ni] = null, t[si] = void 0, t.__e = void 0), pr(r) && (r[ai] = void 0);
874
+ hn = $e(e, "firstChild").get, dn = $e(e, "nextSibling").get, _r(t) && (t[ii] = void 0, t[ni] = null, t[si] = void 0, t.__e = void 0), _r(r) && (r[ai] = void 0);
893
875
  }
894
876
  }
895
- function _n(t = "") {
877
+ function vn(t = "") {
896
878
  return document.createTextNode(t);
897
879
  }
898
880
  // @__NO_SIDE_EFFECTS__
899
- function Qt(t) {
900
- return dn.call(t);
881
+ function Xt(t) {
882
+ return hn.call(t);
901
883
  }
902
884
  // @__NO_SIDE_EFFECTS__
903
- function Ve(t) {
904
- return vn.call(t);
885
+ function Ye(t) {
886
+ return dn.call(t);
905
887
  }
906
- function Fi(t) {
888
+ function Gi(t) {
907
889
  t.textContent = "";
908
890
  }
909
- function pn(t, e, r) {
891
+ function _n(t, e, r) {
910
892
  return e == null || e === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(t, { is: r }) : document.createElement(t) : r ? document.createElementNS(e, t, { is: r }) : document.createElementNS(e, t);
911
893
  }
912
- function Gi(t) {
894
+ function Di(t) {
913
895
  var e = T;
914
896
  if (e === null)
915
- return E.f |= Gr, t;
897
+ return A.f |= Br, t;
916
898
  if ((e.f & 32768) === 0 && (e.f & 4) === 0)
917
899
  throw t;
918
- de(t, e);
900
+ me(t, e);
919
901
  }
920
- function de(t, e) {
921
- if (t === Le) throw t;
902
+ function me(t, e) {
903
+ if (t === Ie) throw t;
922
904
  if (!(e !== null && (e.f & 16384) !== 0)) {
923
905
  for (; e !== null; ) {
924
906
  if ((e.f & 128) !== 0 && (e.f & 33570816) === 0) {
@@ -935,21 +917,21 @@ function de(t, e) {
935
917
  throw t;
936
918
  }
937
919
  }
938
- function Di(t) {
939
- T === null && (E === null && _i(t), vi()), fe && di(t);
920
+ function Wi(t) {
921
+ T === null && (A === null && _i(t), vi()), fe && di(t);
940
922
  }
941
- function Wi(t, e) {
923
+ function ji(t, e) {
942
924
  var r = e.last;
943
925
  r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
944
926
  }
945
927
  function Ne(t, e) {
946
928
  var r = T;
947
- r !== null && (r.f & 8192) !== 0 && (t |= Pr);
929
+ r !== null && (r.f & 8192) !== 0 && (t |= Hr);
948
930
  var n = {
949
- ctx: I,
931
+ ctx: x,
950
932
  deps: null,
951
933
  nodes: null,
952
- f: t | V | 512,
934
+ f: t | z | 512,
953
935
  first: null,
954
936
  fn: e,
955
937
  last: null,
@@ -961,236 +943,236 @@ function Ne(t, e) {
961
943
  wv: 0,
962
944
  ac: null
963
945
  };
964
- $?.register_created_effect(n);
946
+ C?.register_created_effect(n);
965
947
  var i = n;
966
948
  if ((t & 4) !== 0)
967
- at !== null ? at.push(n) : ze.ensure().schedule(n);
949
+ nt !== null ? nt.push(n) : qe.ensure().schedule(n);
968
950
  else if (e !== null) {
969
951
  try {
970
- Ye(n);
971
- } catch (l) {
972
- throw Z(n), l;
952
+ je(n);
953
+ } catch (a) {
954
+ throw Q(n), a;
973
955
  }
974
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |= Fr));
956
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |= Kr));
975
957
  }
976
- if (i !== null && (i.parent = r, r !== null && Wi(i, r), E !== null && (E.f & 2) !== 0 && (t & 64) === 0)) {
977
- var s = E;
958
+ if (i !== null && (i.parent = r, r !== null && ji(i, r), A !== null && (A.f & 2) !== 0 && (t & 64) === 0)) {
959
+ var s = A;
978
960
  (s.effects ?? (s.effects = [])).push(i);
979
961
  }
980
962
  return n;
981
963
  }
982
- function ur() {
983
- return E !== null && !U;
964
+ function ar() {
965
+ return A !== null && !X;
984
966
  }
985
- function Be(t) {
986
- Di("$effect");
967
+ function de(t) {
968
+ Wi("$effect");
987
969
  var e = T.f;
988
- if (!E && (e & 32) !== 0 && I !== null && !I.i) {
989
- var r = I;
970
+ if (!A && (e & 32) !== 0 && x !== null && !x.i) {
971
+ var r = x;
990
972
  (r.e ?? (r.e = [])).push(t);
991
- } else return mn(t);
973
+ } else return pn(t);
992
974
  }
993
- function mn(t) {
975
+ function pn(t) {
994
976
  return Ne(4 | ti, t);
995
977
  }
996
- function ji(t) {
997
- ze.ensure();
998
- const e = Ne(64 | ut, t);
978
+ function qi(t) {
979
+ qe.ensure();
980
+ const e = Ne(64 | lt, t);
999
981
  return () => {
1000
- Z(e);
982
+ Q(e);
1001
983
  };
1002
984
  }
1003
- function qi(t) {
1004
- ze.ensure();
1005
- const e = Ne(64 | ut, t);
985
+ function Yi(t) {
986
+ qe.ensure();
987
+ const e = Ne(64 | lt, t);
1006
988
  return (r = {}) => new Promise((n) => {
1007
- r.outro ? Bt(e, () => {
1008
- Z(e), n(void 0);
1009
- }) : (Z(e), n(void 0));
989
+ r.outro ? Nt(e, () => {
990
+ Q(e), n(void 0);
991
+ }) : (Q(e), n(void 0));
1010
992
  });
1011
993
  }
1012
- function Yi(t) {
994
+ function zi(t) {
1013
995
  return Ne(4, t);
1014
996
  }
1015
- function cr(t, e = 0) {
997
+ function lr(t, e = 0) {
1016
998
  return Ne(8 | e, t);
1017
999
  }
1018
- function zi(t, e = 0) {
1000
+ function Vi(t, e = 0) {
1019
1001
  var r = Ne(16 | e, t);
1020
1002
  return r;
1021
1003
  }
1022
- function Ie(t) {
1023
- return Ne(32 | ut, t);
1004
+ function xe(t) {
1005
+ return Ne(32 | lt, t);
1024
1006
  }
1025
- function gn(t) {
1007
+ function mn(t) {
1026
1008
  var e = t.teardown;
1027
1009
  if (e !== null) {
1028
- const r = fe, n = E;
1029
- Ar(!0), le(null);
1010
+ const r = fe, n = A;
1011
+ wr(!0), oe(null);
1030
1012
  try {
1031
1013
  e.call(null);
1032
1014
  } catch (i) {
1033
- de(i, t.parent);
1015
+ me(i, t.parent);
1034
1016
  } finally {
1035
- Ar(r), le(n);
1017
+ wr(r), oe(n);
1036
1018
  }
1037
1019
  }
1038
1020
  }
1039
- function fr(t, e = !1) {
1021
+ function or(t, e = !1) {
1040
1022
  var r = t.first;
1041
1023
  for (t.first = t.last = null; r !== null; ) {
1042
1024
  const i = r.ac;
1043
- i !== null && Pt(() => {
1044
- i.abort(xt);
1025
+ i !== null && xt(() => {
1026
+ i.abort(It);
1045
1027
  });
1046
1028
  var n = r.next;
1047
- (r.f & 64) !== 0 ? r.parent = null : Z(r, e), r = n;
1029
+ (r.f & 64) !== 0 ? r.parent = null : Q(r, e), r = n;
1048
1030
  }
1049
1031
  }
1050
- function Vi(t) {
1032
+ function Xi(t) {
1051
1033
  for (var e = t.first; e !== null; ) {
1052
1034
  var r = e.next;
1053
- (e.f & 32) === 0 && Z(e), e = r;
1035
+ (e.f & 32) === 0 && Q(e), e = r;
1054
1036
  }
1055
1037
  }
1056
- function Z(t, e = !0) {
1038
+ function Q(t, e = !0) {
1057
1039
  var r = !1;
1058
- (e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (Xi(t.nodes.start, t.nodes.end), r = !0), t.f |= Yt, fr(t, e && !r), lt(t, 0);
1040
+ (e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (Ui(t.nodes.start, t.nodes.end), r = !0), t.f |= jt, or(t, e && !r), it(t, 0);
1059
1041
  var n = t.nodes && t.nodes.t;
1060
1042
  if (n !== null) for (const s of n) s.stop();
1061
- gn(t), t.f ^= Yt, t.f |= Kr;
1043
+ mn(t), t.f ^= jt, t.f |= Nr;
1062
1044
  var i = t.parent;
1063
- i !== null && i.first !== null && yn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1045
+ i !== null && i.first !== null && gn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1064
1046
  }
1065
- function Xi(t, e) {
1047
+ function Ui(t, e) {
1066
1048
  for (; t !== null; ) {
1067
- var r = t === e ? null : /* @__PURE__ */ Ve(t);
1049
+ var r = t === e ? null : /* @__PURE__ */ Ye(t);
1068
1050
  t.remove(), t = r;
1069
1051
  }
1070
1052
  }
1071
- function yn(t) {
1053
+ function gn(t) {
1072
1054
  var e = t.parent, r = t.prev, n = t.next;
1073
1055
  r !== null && (r.next = n), n !== null && (n.prev = r), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = r));
1074
1056
  }
1075
- function Bt(t, e, r = !0) {
1057
+ function Nt(t, e, r = !0) {
1076
1058
  var n = [];
1077
- t.f |= 256, bn(t, n, !0);
1059
+ t.f |= 256, yn(t, n, !0);
1078
1060
  var i = () => {
1079
- r && Z(t), e && e();
1061
+ r && Q(t), e && e();
1080
1062
  }, s = n.length;
1081
1063
  if (s > 0) {
1082
- var l = () => --s || i();
1083
- for (var o of n) o.out(l);
1064
+ var a = () => --s || i();
1065
+ for (var o of n) o.out(a);
1084
1066
  } else i();
1085
1067
  }
1086
- function bn(t, e, r) {
1068
+ function yn(t, e, r) {
1087
1069
  if ((t.f & 8192) === 0) {
1088
- t.f ^= Pr;
1070
+ t.f ^= Hr;
1089
1071
  var n = t.nodes && t.nodes.t;
1090
1072
  if (n !== null)
1091
1073
  for (const o of n) (o.is_global || r) && e.push(o);
1092
1074
  for (var i = t.first; i !== null; ) {
1093
1075
  var s = i.next;
1094
1076
  if ((i.f & 64) === 0) {
1095
- var l = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
1096
- bn(i, e, l ? r : !1);
1077
+ var a = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
1078
+ yn(i, e, a ? r : !1);
1097
1079
  }
1098
1080
  i = s;
1099
1081
  }
1100
1082
  }
1101
1083
  }
1102
- function Ui(t, e) {
1084
+ function Ji(t, e) {
1103
1085
  if (t.nodes)
1104
1086
  for (var r = t.nodes.start, n = t.nodes.end; r !== null; ) {
1105
- var i = r === n ? null : /* @__PURE__ */ Ve(r);
1087
+ var i = r === n ? null : /* @__PURE__ */ Ye(r);
1106
1088
  e.append(r), r = i;
1107
1089
  }
1108
1090
  }
1109
1091
  var Qi = null, fe = !1;
1110
- function Ar(t) {
1092
+ function wr(t) {
1111
1093
  fe = t;
1112
1094
  }
1113
- var E = null, U = !1;
1114
- function le(t) {
1115
- E = t;
1095
+ var A = null, X = !1;
1096
+ function oe(t) {
1097
+ A = t;
1116
1098
  }
1117
1099
  var T = null;
1118
- function _e(t) {
1100
+ function ye(t) {
1119
1101
  T = t;
1120
1102
  }
1121
- var ee = null;
1122
- function wn(t) {
1123
- E !== null && (!He && (E.f & 2097152) !== 0 || (E.f & 2) !== 0) && (ee ?? (ee = /* @__PURE__ */ new Set())).add(t);
1103
+ var Z = null;
1104
+ function bn(t) {
1105
+ A !== null && (!He && (A.f & 2097152) !== 0 || (A.f & 2) !== 0) && (Z ?? (Z = /* @__PURE__ */ new Set())).add(t);
1124
1106
  }
1125
- var G = null, q = 0, z = null;
1126
- function Ji(t) {
1127
- z = t;
1107
+ var G = null, q = 0, V = null;
1108
+ function Zi(t) {
1109
+ V = t;
1128
1110
  }
1129
- var Sn = 1, Ee = 0, ke = Ee;
1130
- function Er(t) {
1111
+ var wn = 1, Ce = 0, ke = Ce;
1112
+ function Sr(t) {
1131
1113
  ke = t;
1132
1114
  }
1133
- function An() {
1134
- return ++Sn;
1115
+ function Sn() {
1116
+ return ++wn;
1135
1117
  }
1136
- function ct(t) {
1118
+ function ot(t) {
1137
1119
  var e = t.f;
1138
1120
  if ((e & 2048) !== 0) return !0;
1139
1121
  if ((e & 4096) !== 0) {
1140
1122
  for (var r = t.deps, n = r.length, i = 0; i < n; i++) {
1141
1123
  var s = r[i];
1142
- if (ct(s) && Qr(s), s.wv > t.wv) return !0;
1124
+ if (ot(s) && Xr(s), s.wv > t.wv) return !0;
1143
1125
  }
1144
- (e & 512) !== 0 && B === null && M(t, ne);
1126
+ (e & 512) !== 0 && B === null && H(t, re);
1145
1127
  }
1146
1128
  return !1;
1147
1129
  }
1148
- function En(t, e, r = !0) {
1130
+ function An(t, e, r = !0) {
1149
1131
  var n = t.reactions;
1150
- if (n !== null && !(!He && ee !== null && ee.has(t)))
1132
+ if (n !== null && !(!He && Z !== null && Z.has(t)))
1151
1133
  for (var i = 0; i < n.length; i++) {
1152
1134
  var s = n[i];
1153
- (s.f & 2) !== 0 ? En(s, e, !1) : e === s && (r ? M(s, V) : (s.f & 1024) !== 0 && M(s, xe), or(s));
1135
+ (s.f & 2) !== 0 ? An(s, e, !1) : e === s && (r ? H(s, z) : (s.f & 1024) !== 0 && H(s, be), sr(s));
1154
1136
  }
1155
1137
  }
1156
- function Tn(t) {
1157
- var e = G, r = q, n = z, i = E, s = ee, l = I, o = U, f = ke, y = t.f;
1158
- G = null, q = 0, z = null, E = (y & 96) === 0 ? t : null, ee = null, At(t.ctx), U = !1, ke = ++Ee, t.ac !== null && (Pt(() => {
1159
- t.ac.abort(xt);
1138
+ function En(t) {
1139
+ var e = G, r = q, n = V, i = A, s = Z, a = x, o = X, c = ke, y = t.f;
1140
+ G = null, q = 0, V = null, A = (y & 96) === 0 ? t : null, Z = null, wt(t.ctx), X = !1, ke = ++Ce, t.ac !== null && (xt(() => {
1141
+ t.ac.abort(It);
1160
1142
  }), t.ac = null);
1161
1143
  try {
1162
- t.f |= mr;
1163
- var v = t.fn, c = v();
1164
- t.f |= Br;
1165
- var d = Tr(t);
1166
- if (Nt() && z !== null && !U && d !== null && (t.f & 6146) === 0) for (var h = 0; h < z.length; h++) En(z[h], t);
1144
+ t.f |= pr;
1145
+ var v = t.fn, h = v();
1146
+ t.f |= Pr;
1147
+ var f = Ar(t);
1148
+ if (Mt() && V !== null && !X && f !== null && (t.f & 6146) === 0) for (var d = 0; d < V.length; d++) An(V[d], t);
1167
1149
  if (i !== null && i !== t) {
1168
- if (Ee++, i.deps !== null) for (let _ = 0; _ < r; _ += 1) i.deps[_].rv = Ee;
1169
- if (e !== null) for (const _ of e) _.rv = Ee;
1170
- z !== null && (n === null ? n = z : n.push(...z));
1150
+ if (Ce++, i.deps !== null) for (let _ = 0; _ < r; _ += 1) i.deps[_].rv = Ce;
1151
+ if (e !== null) for (const _ of e) _.rv = Ce;
1152
+ V !== null && (n === null ? n = V : n.push(...V));
1171
1153
  }
1172
- return (t.f & 8388608) !== 0 && (t.f ^= Gr), c;
1154
+ return (t.f & 8388608) !== 0 && (t.f ^= Br), h;
1173
1155
  } catch (_) {
1174
- return Tr(t), Gi(_);
1156
+ return Ar(t), Di(_);
1175
1157
  } finally {
1176
- t.f ^= mr, G = e, q = r, z = n, E = i, ee = s, At(l), U = o, ke = f;
1158
+ t.f ^= pr, G = e, q = r, V = n, A = i, Z = s, wt(a), X = o, ke = c;
1177
1159
  }
1178
1160
  }
1179
- function Tr(t) {
1180
- var e = t.deps, r = $?.is_fork;
1161
+ function Ar(t) {
1162
+ var e = t.deps, r = C?.is_fork;
1181
1163
  if (G !== null) {
1182
1164
  var n;
1183
- if (r || lt(t, q), e !== null && q > 0)
1165
+ if (r || it(t, q), e !== null && q > 0)
1184
1166
  for (e.length = q + G.length, n = 0; n < G.length; n++) e[q + n] = G[n];
1185
1167
  else t.deps = e = G;
1186
- if (ur() && (t.f & 512) !== 0) for (n = q; n < e.length; n++) {
1168
+ if (ar() && (t.f & 512) !== 0) for (n = q; n < e.length; n++) {
1187
1169
  var i;
1188
1170
  ((i = e[n]).reactions ?? (i.reactions = [])).push(t);
1189
1171
  }
1190
- } else !r && e !== null && q < e.length && (lt(t, q), e.length = q);
1172
+ } else !r && e !== null && q < e.length && (it(t, q), e.length = q);
1191
1173
  return e;
1192
1174
  }
1193
- function Zi(t, e) {
1175
+ function es(t, e) {
1194
1176
  let r = e.reactions;
1195
1177
  if (r !== null) {
1196
1178
  var n = qn.call(r, t);
@@ -1199,149 +1181,149 @@ function Zi(t, e) {
1199
1181
  i === 0 ? r = e.reactions = null : (r[n] = r[i], r.pop());
1200
1182
  }
1201
1183
  }
1202
- if (r === null && (e.f & 2) !== 0 && (G === null || !rt.call(G, e))) {
1184
+ if (r === null && (e.f & 2) !== 0 && (G === null || !Ze.call(G, e))) {
1203
1185
  var s = e;
1204
- (s.f & 512) !== 0 && (s.f ^= 512), s.v !== N && ir(s), s.ac !== null && Pt(() => {
1205
- s.ac.abort(xt), s.ac = null, M(s, V);
1206
- }), Ri(s), lt(s, 0);
1186
+ (s.f & 512) !== 0 && (s.f ^= 512), s.v !== N && tr(s), s.ac !== null && xt(() => {
1187
+ s.ac.abort(It), s.ac = null, H(s, z);
1188
+ }), Ri(s), it(s, 0);
1207
1189
  }
1208
1190
  }
1209
- function lt(t, e) {
1191
+ function it(t, e) {
1210
1192
  var r = t.deps;
1211
1193
  if (r !== null)
1212
- for (var n = e; n < r.length; n++) Zi(t, r[n]);
1194
+ for (var n = e; n < r.length; n++) es(t, r[n]);
1213
1195
  }
1214
- function Ye(t) {
1196
+ function je(t) {
1215
1197
  var e = t.f;
1216
1198
  if ((e & 16384) === 0) {
1217
- M(t, ne);
1199
+ H(t, re);
1218
1200
  var r = T;
1219
1201
  if (T = t, 0)
1220
1202
  var n, i;
1221
1203
  try {
1222
- (e & 16777232) !== 0 ? Vi(t) : fr(t), gn(t);
1223
- var s = Tn(t);
1224
- if (t.teardown = typeof s == "function" ? s : null, t.wv = Sn, 0)
1225
- for (var l of t.deps) ;
1204
+ (e & 16777232) !== 0 ? Xi(t) : or(t), mn(t);
1205
+ var s = En(t);
1206
+ if (t.teardown = typeof s == "function" ? s : null, t.wv = wn, 0)
1207
+ for (var a of t.deps) ;
1226
1208
  } finally {
1227
1209
  T = r;
1228
1210
  }
1229
1211
  }
1230
1212
  }
1231
- function A(t) {
1213
+ function S(t) {
1232
1214
  var e = (t.f & 2) !== 0;
1233
- if (Qi?.add(t), E !== null && !U && !(T !== null && (T.f & 16384) !== 0) && (ee === null || !ee.has(t))) {
1234
- var r = E.deps;
1235
- if ((E.f & 2097152) !== 0)
1236
- t.rv < Ee && (t.rv = Ee, G === null && r !== null && r[q] === t ? q++ : G === null ? G = [t] : G.push(t));
1215
+ if (Qi?.add(t), A !== null && !X && !(T !== null && (T.f & 16384) !== 0) && (Z === null || !Z.has(t))) {
1216
+ var r = A.deps;
1217
+ if ((A.f & 2097152) !== 0)
1218
+ t.rv < Ce && (t.rv = Ce, G === null && r !== null && r[q] === t ? q++ : G === null ? G = [t] : G.push(t));
1237
1219
  else {
1238
1220
  var n;
1239
- (n = E).deps ?? (n.deps = []), rt.call(E.deps, t) || E.deps.push(t);
1221
+ (n = A).deps ?? (n.deps = []), Ze.call(A.deps, t) || A.deps.push(t);
1240
1222
  var i = t.reactions;
1241
- i === null ? t.reactions = [E] : rt.call(i, E) || i.push(E);
1223
+ i === null ? t.reactions = [A] : Ze.call(i, A) || i.push(A);
1242
1224
  }
1243
1225
  }
1244
1226
  if (0) {
1245
- if (!U && reactivity_loss_tracker && $ === null && qe === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(t))
1227
+ if (!X && reactivity_loss_tracker && C === null && We === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(t))
1246
1228
  var s;
1247
- if (tracing_mode_flag && !U && tracing_expressions !== null && E !== null && tracing_expressions.reaction === E && !t.trace) {
1229
+ if (tracing_mode_flag && !X && tracing_expressions !== null && A !== null && tracing_expressions.reaction === A && !t.trace) {
1248
1230
  if (s)
1249
- var l, o;
1231
+ var a, o;
1250
1232
  }
1251
1233
  }
1252
- if (fe && ae.has(t)) return ae.get(t);
1234
+ if (fe && le.has(t)) return le.get(t);
1253
1235
  if (e) {
1254
- var f = t;
1236
+ var c = t;
1255
1237
  if (fe) {
1256
- var y = f.v;
1257
- return ((f.f & 1024) === 0 && f.reactions !== null || kn(f)) && (y = sr(f)), ae.set(f, y), y;
1238
+ var y = c.v;
1239
+ return ((c.f & 1024) === 0 && c.reactions !== null || Cn(c)) && (y = rr(c)), le.set(c, y), y;
1258
1240
  }
1259
- var v = (f.f & 512) === 0 && !U && E !== null && (E.f & 512) !== 0, c = (f.f & Br) === 0;
1260
- ct(f) && (v && (f.f |= 512), Qr(f)), v && !c && (Jr(f), $n(f));
1241
+ var v = (c.f & 512) === 0 && !X && A !== null && (A.f & 512) !== 0, h = (c.f & Pr) === 0;
1242
+ ot(c) && (v && (c.f |= 512), Xr(c)), v && !h && (Ur(c), Tn(c));
1261
1243
  }
1262
1244
  if (B?.has(t)) return B.get(t);
1263
1245
  if ((t.f & 8388608) !== 0) throw t.v;
1264
1246
  return t.v;
1265
1247
  }
1266
- function $n(t) {
1248
+ function Tn(t) {
1267
1249
  if (t.f |= 512, t.deps !== null)
1268
1250
  for (const r of t.deps) {
1269
1251
  var e = r.reactions;
1270
- e === null ? r.reactions = [t] : rt.call(e, t) || e.push(t), (r.f & 2) !== 0 && (r.f & 512) === 0 && (Jr(r), $n(r));
1252
+ e === null ? r.reactions = [t] : Ze.call(e, t) || e.push(t), (r.f & 2) !== 0 && (r.f & 512) === 0 && (Ur(r), Tn(r));
1271
1253
  }
1272
1254
  }
1273
- function kn(t) {
1255
+ function Cn(t) {
1274
1256
  if (t.v === N) return !0;
1275
1257
  if (t.deps === null) return !1;
1276
1258
  for (const e of t.deps)
1277
- if (ae.has(e) || (e.f & 2) !== 0 && kn(e)) return !0;
1259
+ if (le.has(e) || (e.f & 2) !== 0 && Cn(e)) return !0;
1278
1260
  return !1;
1279
1261
  }
1280
- function Ft(t) {
1281
- var e = U;
1262
+ function st(t) {
1263
+ var e = X;
1282
1264
  try {
1283
- return U = !0, t();
1265
+ return X = !0, t();
1284
1266
  } finally {
1285
- U = e;
1267
+ X = e;
1286
1268
  }
1287
1269
  }
1288
- var dt = /* @__PURE__ */ Symbol("events"), es = /* @__PURE__ */ new Set(), $r = /* @__PURE__ */ new Set(), Dt = null, Wt = !1;
1289
- function kr(t) {
1270
+ var ft = /* @__PURE__ */ Symbol("events"), ts = /* @__PURE__ */ new Set(), Er = /* @__PURE__ */ new Set(), Bt = null, Ft = !1;
1271
+ function Tr(t) {
1290
1272
  var e = this, r = e.ownerDocument, n = t.type, i = t.composedPath?.() || [], s = i[0] || t.target;
1291
- Dt = t, Wt || (Wt = !0, setTimeout(() => {
1292
- Wt = !1, Dt = null;
1273
+ Bt = t, Ft || (Ft = !0, setTimeout(() => {
1274
+ Ft = !1, Bt = null;
1293
1275
  }));
1294
- var l = 0, o = Dt === t && t[dt];
1276
+ var a = 0, o = Bt === t && t[ft];
1295
1277
  if (o) {
1296
- var f = i.indexOf(o);
1297
- if (f !== -1 && (e === document || e === window)) {
1298
- t[dt] = e;
1278
+ var c = i.indexOf(o);
1279
+ if (c !== -1 && (e === document || e === window)) {
1280
+ t[ft] = e;
1299
1281
  return;
1300
1282
  }
1301
1283
  var y = i.indexOf(e);
1302
1284
  if (y === -1) return;
1303
- f <= y && (l = f);
1285
+ c <= y && (a = c);
1304
1286
  }
1305
- if (s = i[l] || t.target, s !== e) {
1306
- nt(t, "currentTarget", {
1287
+ if (s = i[a] || t.target, s !== e) {
1288
+ et(t, "currentTarget", {
1307
1289
  configurable: !0,
1308
1290
  get() {
1309
1291
  return s || r;
1310
1292
  }
1311
1293
  });
1312
- var v = E, c = T;
1313
- le(null), _e(null);
1294
+ var v = A, h = T;
1295
+ oe(null), ye(null);
1314
1296
  try {
1315
- for (var d, h = []; s !== null && s !== e; ) {
1297
+ for (var f, d = []; s !== null && s !== e; ) {
1316
1298
  try {
1317
- var _ = s[dt]?.[n];
1299
+ var _ = s[ft]?.[n];
1318
1300
  _ != null && (!s.disabled || t.target === s) && _.call(s, t);
1319
1301
  } catch (m) {
1320
- d ? h.push(m) : d = m;
1302
+ f ? d.push(m) : f = m;
1321
1303
  }
1322
1304
  if (t.cancelBubble) break;
1323
- l++, s = l < i.length ? i[l] : null;
1305
+ a++, s = a < i.length ? i[a] : null;
1324
1306
  }
1325
- if (d) {
1326
- for (let m of h) queueMicrotask(() => {
1307
+ if (f) {
1308
+ for (let m of d) queueMicrotask(() => {
1327
1309
  throw m;
1328
1310
  });
1329
- throw d;
1311
+ throw f;
1330
1312
  }
1331
1313
  } finally {
1332
- t[dt] = e, delete t.currentTarget, le(v), _e(c);
1314
+ t[ft] = e, delete t.currentTarget, oe(v), ye(h);
1333
1315
  }
1334
1316
  }
1335
1317
  }
1336
- var ts = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1337
- function rs(t) {
1338
- return ts?.createHTML(t) ?? t;
1339
- }
1318
+ var rs = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1340
1319
  function ns(t) {
1341
- var e = pn("template");
1342
- return e.innerHTML = rs(t.replaceAll("<!>", "<!---->")), e.content;
1320
+ return rs?.createHTML(t) ?? t;
1343
1321
  }
1344
- function gt(t, e) {
1322
+ function is(t) {
1323
+ var e = _n("template");
1324
+ return e.innerHTML = ns(t.replaceAll("<!>", "<!---->")), e.content;
1325
+ }
1326
+ function pt(t, e) {
1345
1327
  var r = T;
1346
1328
  r.nodes === null && (r.nodes = {
1347
1329
  start: t,
@@ -1351,29 +1333,29 @@ function gt(t, e) {
1351
1333
  });
1352
1334
  }
1353
1335
  // @__NO_SIDE_EFFECTS__
1354
- function is(t, e) {
1336
+ function ss(t, e) {
1355
1337
  var r = (e & 1) !== 0, n = (e & 2) !== 0, i, s = !t.startsWith("<!>");
1356
1338
  return () => {
1357
1339
  if (J)
1358
- return gt(F, null), F;
1359
- i === void 0 && (i = ns(s ? t : "<!>" + t), r || (i = /* @__PURE__ */ Qt(i)));
1360
- var l = n || hn ? document.importNode(i, !0) : i.cloneNode(!0);
1340
+ return pt(F, null), F;
1341
+ i === void 0 && (i = is(s ? t : "<!>" + t), r || (i = /* @__PURE__ */ Xt(i)));
1342
+ var a = n || fn ? document.importNode(i, !0) : i.cloneNode(!0);
1361
1343
  if (r) {
1362
- var o = /* @__PURE__ */ Qt(l), f = l.lastChild;
1363
- gt(o, f);
1364
- } else gt(l, l);
1365
- return l;
1344
+ var o = /* @__PURE__ */ Xt(a), c = a.lastChild;
1345
+ pt(o, c);
1346
+ } else pt(a, a);
1347
+ return a;
1366
1348
  };
1367
1349
  }
1368
- function Cn(t, e) {
1350
+ function $n(t, e) {
1369
1351
  if (J) {
1370
1352
  var r = T;
1371
- ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = F), jr();
1353
+ ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = F), Dr();
1372
1354
  return;
1373
1355
  }
1374
1356
  t !== null && t.before(e);
1375
1357
  }
1376
- var ss = [
1358
+ var as = [
1377
1359
  "allowfullscreen",
1378
1360
  "async",
1379
1361
  "autofocus",
@@ -1402,8 +1384,8 @@ var ss = [
1402
1384
  "defer",
1403
1385
  "disablepictureinpicture",
1404
1386
  "disableremoteplayback"
1405
- ], Vs = [
1406
- ...ss,
1387
+ ], Js = [
1388
+ ...as,
1407
1389
  "formNoValidate",
1408
1390
  "isMap",
1409
1391
  "noModule",
@@ -1418,17 +1400,17 @@ var ss = [
1418
1400
  "allowFullscreen",
1419
1401
  "disablePictureInPicture",
1420
1402
  "disableRemotePlayback"
1421
- ], as = ["touchstart", "touchmove"];
1422
- function ls(t) {
1423
- return as.includes(t);
1403
+ ], ls = ["touchstart", "touchmove"];
1404
+ function os(t) {
1405
+ return ls.includes(t);
1424
1406
  }
1425
- var os = [
1407
+ var us = [
1426
1408
  "$state",
1427
1409
  "$state.raw",
1428
1410
  "$derived",
1429
1411
  "$derived.by"
1430
- ], Xs = [
1431
- ...os,
1412
+ ], Qs = [
1413
+ ...us,
1432
1414
  "$state.eager",
1433
1415
  "$state.snapshot",
1434
1416
  "$props",
@@ -1444,380 +1426,380 @@ var os = [
1444
1426
  "$inspect.trace",
1445
1427
  "$host"
1446
1428
  ];
1447
- function us(t) {
1448
- let e = 0, r = Kt(0), n;
1429
+ function cs(t) {
1430
+ let e = 0, r = Ht(0), n;
1449
1431
  return () => {
1450
- ur() && (A(r), cr(() => (e === 0 && (n = Ft(() => t(() => tt(r)))), e += 1, () => {
1432
+ ar() && (S(r), lr(() => (e === 0 && (n = st(() => t(() => Qe(r)))), e += 1, () => {
1451
1433
  Oe(() => {
1452
- e -= 1, e === 0 && (n?.(), n = void 0, tt(r));
1434
+ e -= 1, e === 0 && (n?.(), n = void 0, Qe(r));
1453
1435
  });
1454
1436
  })));
1455
1437
  };
1456
1438
  }
1457
- var cs = Fr | ut;
1458
- function fs(t, e, r, n) {
1459
- new hs(t, e, r, n);
1439
+ var fs = Kr | lt;
1440
+ function hs(t, e, r, n) {
1441
+ new ds(t, e, r, n);
1460
1442
  }
1461
- var te = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakSet(), hs = class {
1443
+ var ee = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakSet(), ds = class {
1462
1444
  constructor(t, e, r, n) {
1463
- ar(this, k), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), S(this, te, void 0), S(this, Jt, J ? F : null), S(this, se, void 0), S(this, ot, void 0), S(this, D, void 0), S(this, re, null), S(this, Y, null), S(this, Q, null), S(this, ve, null), S(this, De, 0), S(this, Ce, 0), S(this, vt, !1), S(this, Zt, /* @__PURE__ */ new Set()), S(this, er, /* @__PURE__ */ new Set()), S(this, me, null), S(this, Cr, us(() => (g(me, this, Kt(a(De, this))), () => {
1464
- g(me, this, null);
1465
- }))), g(te, this, t), g(se, this, e), g(ot, this, (i) => {
1445
+ nr(this, k), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), E(this, ee, void 0), E(this, Ut, J ? F : null), E(this, ae, void 0), E(this, at, void 0), E(this, D, void 0), E(this, te, null), E(this, Y, null), E(this, U, null), E(this, ge, null), E(this, Fe, 0), E(this, Re, 0), E(this, ht, !1), E(this, Jt, /* @__PURE__ */ new Map()), E(this, we, null), E(this, Cr, cs(() => (w(we, this, Ht(l(Fe, this))), () => {
1446
+ w(we, this, null);
1447
+ }))), w(ee, this, t), w(ae, this, e), w(at, this, (i) => {
1466
1448
  var s = T;
1467
1449
  s.b = this, s.f |= 128, r(i);
1468
- }), this.parent = T.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), g(D, this, zi(() => {
1450
+ }), this.parent = T.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), w(D, this, Vi(() => {
1469
1451
  if (J) {
1470
- const i = fi(a(Jt, this));
1471
- jr();
1452
+ const i = fi(l(Ut, this));
1453
+ Dr();
1472
1454
  const s = i === "[!";
1473
1455
  if (i.startsWith("[?")) {
1474
- const l = JSON.parse(i.slice(2));
1475
- p(k, this, vs).call(this, l);
1476
- } else s ? p(k, this, _s).call(this) : p(k, this, ds).call(this);
1477
- } else p(k, this, Ln).call(this);
1478
- }, cs)), J && g(te, this, F);
1456
+ const a = JSON.parse(i.slice(2));
1457
+ p(k, this, _s).call(this, a);
1458
+ } else s ? p(k, this, ps).call(this) : p(k, this, vs).call(this);
1459
+ } else p(k, this, Rn).call(this);
1460
+ }, fs)), J && w(ee, this, F);
1479
1461
  }
1480
1462
  defer_effect(t) {
1481
- Ur(t, a(Zt, this), a(er, this));
1463
+ Vr(t, l(Jt, this));
1482
1464
  }
1483
1465
  is_rendered() {
1484
1466
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
1485
1467
  }
1486
1468
  has_pending_snippet() {
1487
- return !!a(se, this).pending;
1469
+ return !!l(ae, this).pending;
1488
1470
  }
1489
1471
  update_pending_count(t, e) {
1490
- p(k, this, On).call(this, t, e), g(De, this, a(De, this) + t), !(!a(me, this) || a(vt, this)) && (g(vt, this, !0), Oe(() => {
1491
- g(vt, this, !1), a(me, this) && cn(a(me, this), a(De, this));
1472
+ p(k, this, Ln).call(this, t, e), w(Fe, this, l(Fe, this) + t), !(!l(we, this) || l(ht, this)) && (w(ht, this, !0), Oe(() => {
1473
+ w(ht, this, !1), l(we, this) && un(l(we, this), l(Fe, this));
1492
1474
  }));
1493
1475
  }
1494
1476
  get_effect_pending() {
1495
- return a(Cr, this).call(this), A(a(me, this));
1477
+ return l(Cr, this).call(this), S(l(we, this));
1496
1478
  }
1497
1479
  error(t) {
1498
- if (t === Le || !a(se, this).onerror && !a(se, this).failed) throw t;
1499
- $?.is_fork ? (a(re, this) && $.skip_effect(a(re, this)), a(Y, this) && $.skip_effect(a(Y, this)), a(Q, this) && $.skip_effect(a(Q, this)), $.oncommit(() => {
1500
- p(k, this, Re).call(this) || p(k, this, Rr).call(this, t);
1501
- })) : p(k, this, Rr).call(this, t);
1480
+ if (t === Ie || !l(ae, this).onerror && !l(ae, this).failed) throw t;
1481
+ C?.is_fork ? (l(te, this) && C.skip_effect(l(te, this)), l(Y, this) && C.skip_effect(l(Y, this)), l(U, this) && C.skip_effect(l(U, this)), C.oncommit(() => {
1482
+ p(k, this, Le).call(this) || p(k, this, $r).call(this, t);
1483
+ })) : p(k, this, $r).call(this, t);
1502
1484
  }
1503
1485
  };
1504
- function ds() {
1486
+ function vs() {
1505
1487
  try {
1506
- g(re, this, Ie(() => a(ot, this).call(this, a(te, this))));
1488
+ w(te, this, xe(() => l(at, this).call(this, l(ee, this))));
1507
1489
  } catch (t) {
1508
1490
  this.error(t);
1509
1491
  }
1510
1492
  }
1511
- function vs(t) {
1512
- const e = a(se, this).failed, { reset: r, invoke_onerror: n } = p(k, this, Rn).call(this, t);
1513
- Oe(n), e && g(Q, this, Ie(() => {
1514
- e(a(te, this), () => t, () => r);
1493
+ function _s(t) {
1494
+ const e = l(ae, this).failed, { reset: r, invoke_onerror: n } = p(k, this, kn).call(this, t);
1495
+ Oe(n), e && w(U, this, xe(() => {
1496
+ e(l(ee, this), () => t, () => r);
1515
1497
  }));
1516
1498
  }
1517
- function Rn(t) {
1499
+ function kn(t) {
1518
1500
  var e = !1, r = !1;
1519
1501
  const n = () => {
1520
- if (!p(k, this, Re).call(this)) {
1502
+ if (!p(k, this, Le).call(this)) {
1521
1503
  if (e) {
1522
1504
  oi();
1523
1505
  return;
1524
1506
  }
1525
- e = !0, r && Si(), a(Q, this) !== null && Bt(a(Q, this), () => {
1526
- g(Q, this, null);
1527
- }), p(k, this, hr).call(this, () => {
1528
- p(k, this, Ln).call(this);
1507
+ e = !0, r && Si(), l(U, this) !== null && Nt(l(U, this), () => {
1508
+ w(U, this, null);
1509
+ }), p(k, this, ur).call(this, () => {
1510
+ p(k, this, Rn).call(this);
1529
1511
  });
1530
1512
  }
1531
1513
  };
1532
1514
  return {
1533
1515
  reset: n,
1534
1516
  invoke_onerror: () => {
1535
- if (!p(k, this, Re).call(this))
1517
+ if (!p(k, this, Le).call(this))
1536
1518
  try {
1537
- r = !0, a(se, this).onerror?.(t, n), r = !1;
1519
+ r = !0, l(ae, this).onerror?.(t, n), r = !1;
1538
1520
  } catch (s) {
1539
- de(s, a(D, this) && a(D, this).parent);
1521
+ me(s, l(D, this) && l(D, this).parent);
1540
1522
  }
1541
1523
  }
1542
1524
  };
1543
1525
  }
1544
- function Re() {
1545
- return (a(D, this).f & (Kr | Yt)) !== 0;
1526
+ function Le() {
1527
+ return (l(D, this).f & (Nr | jt)) !== 0;
1546
1528
  }
1547
- function _s() {
1548
- const t = a(se, this).pending;
1549
- t && (this.is_pending = !0, g(Y, this, Ie(() => t(a(te, this)))), Oe(() => {
1550
- if (!p(k, this, Re).call(this)) {
1551
- var e = g(ve, this, document.createDocumentFragment()), r = _n(), n = !1;
1552
- if (e.append(r), g(re, this, p(k, this, hr).call(this, () => {
1529
+ function ps() {
1530
+ const t = l(ae, this).pending;
1531
+ t && (this.is_pending = !0, w(Y, this, xe(() => t(l(ee, this)))), Oe(() => {
1532
+ if (!p(k, this, Le).call(this)) {
1533
+ var e = w(ge, this, document.createDocumentFragment()), r = vn(), n = !1;
1534
+ if (e.append(r), w(te, this, p(k, this, ur).call(this, () => {
1553
1535
  try {
1554
- return Ie(() => a(ot, this).call(this, r));
1536
+ return xe(() => l(at, this).call(this, r));
1555
1537
  } catch (i) {
1556
1538
  try {
1557
1539
  this.error(i), n = !0;
1558
1540
  } catch (s) {
1559
- de(s, a(D, this).parent);
1541
+ me(s, l(D, this).parent);
1560
1542
  }
1561
1543
  return null;
1562
1544
  }
1563
- })), a(re, this) === null) {
1564
- g(ve, this, null), n && p(k, this, Mt).call(this, $);
1545
+ })), l(te, this) === null) {
1546
+ w(ge, this, null), n && p(k, this, Rt).call(this, C);
1565
1547
  return;
1566
1548
  }
1567
- a(Ce, this) === 0 && (a(te, this).before(e), g(ve, this, null), Bt(a(Y, this), () => {
1568
- g(Y, this, null);
1569
- }), p(k, this, Mt).call(this, $));
1549
+ l(Re, this) === 0 && (l(ee, this).before(e), w(ge, this, null), Nt(l(Y, this), () => {
1550
+ w(Y, this, null);
1551
+ }), p(k, this, Rt).call(this, C));
1570
1552
  }
1571
1553
  }));
1572
1554
  }
1573
- function Ln() {
1555
+ function Rn() {
1574
1556
  try {
1575
- if (this.is_pending = this.has_pending_snippet(), g(Ce, this, 0), g(De, this, 0), g(re, this, Ie(() => {
1576
- a(ot, this).call(this, a(te, this));
1577
- })), a(Ce, this) > 0) {
1578
- var t = g(ve, this, document.createDocumentFragment());
1579
- Ui(a(re, this), t);
1580
- const e = a(se, this).pending;
1581
- g(Y, this, Ie(() => e(a(te, this))));
1582
- } else p(k, this, Mt).call(this, $);
1557
+ if (this.is_pending = this.has_pending_snippet(), w(Re, this, 0), w(Fe, this, 0), w(te, this, xe(() => {
1558
+ l(at, this).call(this, l(ee, this));
1559
+ })), l(Re, this) > 0) {
1560
+ var t = w(ge, this, document.createDocumentFragment());
1561
+ Ji(l(te, this), t);
1562
+ const e = l(ae, this).pending;
1563
+ w(Y, this, xe(() => e(l(ee, this))));
1564
+ } else p(k, this, Rt).call(this, C);
1583
1565
  } catch (e) {
1584
1566
  this.error(e);
1585
1567
  }
1586
1568
  }
1587
- function Mt(t) {
1588
- this.is_pending = !1, t.transfer_effects(a(Zt, this), a(er, this));
1569
+ function Rt(t) {
1570
+ this.is_pending = !1, t.transfer_reactions(l(Jt, this));
1589
1571
  }
1590
- function hr(t) {
1591
- var e = T, r = E, n = I;
1592
- _e(a(D, this)), le(a(D, this)), At(a(D, this).ctx);
1572
+ function ur(t) {
1573
+ var e = T, r = A, n = x;
1574
+ ye(l(D, this)), oe(l(D, this)), wt(l(D, this).ctx);
1593
1575
  try {
1594
- return ze.ensure(), t();
1576
+ return qe.ensure(), t();
1595
1577
  } finally {
1596
- _e(e), le(r), At(n);
1578
+ ye(e), oe(r), wt(n);
1597
1579
  }
1598
1580
  }
1599
- function On(t, e) {
1581
+ function Ln(t, e) {
1600
1582
  if (!this.has_pending_snippet()) {
1601
1583
  if (this.parent) {
1602
1584
  var r;
1603
- p(k, r = this.parent, On).call(r, t, e);
1585
+ p(k, r = this.parent, Ln).call(r, t, e);
1604
1586
  }
1605
1587
  return;
1606
1588
  }
1607
- g(Ce, this, a(Ce, this) + t), a(Ce, this) === 0 && (p(k, this, Mt).call(this, e), a(Y, this) && Bt(a(Y, this), () => {
1608
- g(Y, this, null);
1609
- }), a(ve, this) && (a(te, this).before(a(ve, this)), g(ve, this, null)));
1589
+ w(Re, this, l(Re, this) + t), l(Re, this) === 0 && (p(k, this, Rt).call(this, e), l(Y, this) && Nt(l(Y, this), () => {
1590
+ w(Y, this, null);
1591
+ }), l(ge, this) && (l(ee, this).before(l(ge, this)), w(ge, this, null)));
1610
1592
  }
1611
- function Rr(t) {
1612
- a(re, this) && (Z(a(re, this)), g(re, this, null)), a(Y, this) && (Z(a(Y, this)), g(Y, this, null)), a(Q, this) && (Z(a(Q, this)), g(Q, this, null)), J && (st(a(Jt, this)), ui(), st(ci()));
1613
- let e = a(se, this).failed;
1593
+ function $r(t) {
1594
+ l(te, this) && (Q(l(te, this)), w(te, this, null)), l(Y, this) && (Q(l(Y, this)), w(Y, this, null)), l(U, this) && (Q(l(U, this)), w(U, this, null)), J && (rt(l(Ut, this)), ui(), rt(ci()));
1595
+ let e = l(ae, this).failed;
1614
1596
  const r = (n) => {
1615
- if (p(k, this, Re).call(this)) return;
1616
- const { reset: i, invoke_onerror: s } = p(k, this, Rn).call(this, n);
1617
- s(), e && !p(k, this, Re).call(this) && g(Q, this, p(k, this, hr).call(this, () => {
1597
+ if (p(k, this, Le).call(this)) return;
1598
+ const { reset: i, invoke_onerror: s } = p(k, this, kn).call(this, n);
1599
+ s(), e && !p(k, this, Le).call(this) && w(U, this, p(k, this, ur).call(this, () => {
1618
1600
  try {
1619
- return Ie(() => {
1620
- var l = T;
1621
- l.b = this, l.f |= 128, e(a(te, this), () => n, () => i);
1601
+ return xe(() => {
1602
+ var a = T;
1603
+ a.b = this, a.f |= 128, e(l(ee, this), () => n, () => i);
1622
1604
  });
1623
- } catch (l) {
1624
- return de(l, a(D, this).parent), null;
1605
+ } catch (a) {
1606
+ return me(a, l(D, this).parent), null;
1625
1607
  }
1626
1608
  }));
1627
1609
  };
1628
1610
  Oe(() => {
1629
- if (!p(k, this, Re).call(this)) {
1611
+ if (!p(k, this, Le).call(this)) {
1630
1612
  var n;
1631
1613
  try {
1632
1614
  n = this.transform_error(t);
1633
1615
  } catch (i) {
1634
- de(i, a(D, this) && a(D, this).parent);
1616
+ me(i, l(D, this) && l(D, this).parent);
1635
1617
  return;
1636
1618
  }
1637
- n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => de(i, a(D, this) && a(D, this).parent)) : r(n);
1619
+ n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => me(i, l(D, this) && l(D, this).parent)) : r(n);
1638
1620
  }
1639
1621
  });
1640
1622
  }
1641
- var Lr = !0;
1642
- function Mn(t, e) {
1643
- return In(t, e);
1623
+ var kr = !0;
1624
+ function In(t, e) {
1625
+ return On(t, e);
1644
1626
  }
1645
- function ps(t, e) {
1646
- Ut(), e.intro = e.intro ?? !1;
1627
+ function ms(t, e) {
1628
+ Vt(), e.intro = e.intro ?? !1;
1647
1629
  const r = e.target, n = J, i = F;
1648
1630
  try {
1649
- for (var s = /* @__PURE__ */ Qt(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ Ve(s);
1650
- if (!s) throw Le;
1651
- ft(!0), st(s);
1652
- const l = In(t, {
1631
+ for (var s = /* @__PURE__ */ Xt(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ Ye(s);
1632
+ if (!s) throw Ie;
1633
+ ut(!0), rt(s);
1634
+ const a = On(t, {
1653
1635
  ...e,
1654
1636
  anchor: s
1655
1637
  });
1656
- return ft(!1), l;
1657
- } catch (l) {
1658
- if (l instanceof Error && l.message.split(`
1659
- `).some((o) => o.startsWith("https://svelte.dev/e/"))) throw l;
1660
- return l !== Le && console.warn("Failed to hydrate: ", l), e.recover === !1 && mi(), Ut(), Fi(r), ft(!1), Mn(t, e);
1638
+ return ut(!1), a;
1639
+ } catch (a) {
1640
+ if (a instanceof Error && a.message.split(`
1641
+ `).some((o) => o.startsWith("https://svelte.dev/e/"))) throw a;
1642
+ return a !== Ie && console.warn("Failed to hydrate: ", a), e.recover === !1 && mi(), Vt(), Gi(r), ut(!1), In(t, e);
1661
1643
  } finally {
1662
- ft(n), st(i);
1663
- }
1664
- }
1665
- var _t = /* @__PURE__ */ new Map();
1666
- function In(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: l = !0, transformError: o }) {
1667
- Ut();
1668
- var f = void 0, y = qi(() => {
1669
- var v = r ?? e.appendChild(_n());
1670
- fs(v, { pending: () => {
1671
- } }, (h) => {
1672
- zr({});
1673
- var _ = I;
1674
- if (s && (_.c = s), i && (n.$$events = i), J && gt(h, null), Lr = l, f = t(h, n) || nr(), Lr = !0, J && (T.nodes.end = F, F === null || F.nodeType !== 8 || F.data !== "]"))
1675
- throw rr(), Le;
1676
- Vr();
1644
+ ut(n), rt(i);
1645
+ }
1646
+ }
1647
+ var dt = /* @__PURE__ */ new Map();
1648
+ function On(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: a = !0, transformError: o }) {
1649
+ Vt();
1650
+ var c = void 0, y = Yi(() => {
1651
+ var v = r ?? e.appendChild(vn());
1652
+ hs(v, { pending: () => {
1653
+ } }, (d) => {
1654
+ qr({});
1655
+ var _ = x;
1656
+ if (s && (_.c = s), i && (n.$$events = i), J && pt(d, null), kr = a, c = t(d, n) || er(), kr = !0, J && (T.nodes.end = F, F === null || F.nodeType !== 8 || F.data !== "]"))
1657
+ throw Zt(), Ie;
1658
+ Yr();
1677
1659
  }, o);
1678
- var c = /* @__PURE__ */ new Set(), d = (h) => {
1679
- for (var _ = 0; _ < h.length; _++) {
1680
- var m = h[_];
1681
- if (!c.has(m)) {
1682
- c.add(m);
1683
- var L = ls(m);
1684
- for (const w of [e, document]) {
1685
- var O = _t.get(w);
1686
- O === void 0 && (O = /* @__PURE__ */ new Map(), _t.set(w, O));
1687
- var x = O.get(m);
1688
- x === void 0 ? (w.addEventListener(m, kr, { passive: L }), O.set(m, 1)) : O.set(m, x + 1);
1660
+ var h = /* @__PURE__ */ new Set(), f = (d) => {
1661
+ for (var _ = 0; _ < d.length; _++) {
1662
+ var m = d[_];
1663
+ if (!h.has(m)) {
1664
+ h.add(m);
1665
+ var I = os(m);
1666
+ for (const ne of [e, document]) {
1667
+ var R = dt.get(ne);
1668
+ R === void 0 && (R = /* @__PURE__ */ new Map(), dt.set(ne, R));
1669
+ var P = R.get(m);
1670
+ P === void 0 ? (ne.addEventListener(m, Tr, { passive: I }), R.set(m, 1)) : R.set(m, P + 1);
1689
1671
  }
1690
1672
  }
1691
1673
  }
1692
1674
  };
1693
- return d(Yn(es)), $r.add(d), () => {
1694
- for (var h of c) for (const L of [e, document]) {
1695
- var _ = _t.get(L), m = _.get(h);
1696
- --m == 0 ? (L.removeEventListener(h, kr), _.delete(h), _.size === 0 && _t.delete(L)) : _.set(h, m);
1675
+ return f(Yn(ts)), Er.add(f), () => {
1676
+ for (var d of h) for (const I of [e, document]) {
1677
+ var _ = dt.get(I), m = _.get(d);
1678
+ --m == 0 ? (I.removeEventListener(d, Tr), _.delete(d), _.size === 0 && dt.delete(I)) : _.set(d, m);
1697
1679
  }
1698
- $r.delete(d), v !== r && v.parentNode?.removeChild(v);
1680
+ Er.delete(f), v !== r && v.parentNode?.removeChild(v);
1699
1681
  };
1700
1682
  });
1701
- return tr.set(f, y), f;
1683
+ return Qt.set(c, y), c;
1702
1684
  }
1703
- var tr = /* @__PURE__ */ new WeakMap();
1704
- function ms(t, e) {
1705
- const r = tr.get(t);
1706
- return r ? (tr.delete(t), r(e)) : Promise.resolve();
1685
+ var Qt = /* @__PURE__ */ new WeakMap();
1686
+ function gs(t, e) {
1687
+ const r = Qt.get(t);
1688
+ return r ? (Qt.delete(t), r(e)) : Promise.resolve();
1707
1689
  }
1708
- var xn, We = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakSet(), Hn = class {
1690
+ var Mn, Ge = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakSet(), xn = class {
1709
1691
  constructor(t) {
1710
- ar(this, Or), S(this, We, /* @__PURE__ */ new WeakMap()), S(this, It, void 0), S(this, jt, void 0), g(jt, this, t);
1692
+ nr(this, Rr), E(this, Ge, /* @__PURE__ */ new WeakMap()), E(this, Lt, void 0), E(this, Gt, void 0), w(Gt, this, t);
1711
1693
  }
1712
1694
  observe(t, e) {
1713
- var r = a(We, this).get(t) || /* @__PURE__ */ new Set();
1714
- return r.add(e), a(We, this).set(t, r), p(Or, this, gs).call(this).observe(t, a(jt, this)), () => {
1715
- var n = a(We, this).get(t);
1716
- n.delete(e), n.size === 0 && (a(We, this).delete(t), a(It, this).unobserve(t));
1695
+ var r = l(Ge, this).get(t) || /* @__PURE__ */ new Set();
1696
+ return r.add(e), l(Ge, this).set(t, r), p(Rr, this, ys).call(this).observe(t, l(Gt, this)), () => {
1697
+ var n = l(Ge, this).get(t);
1698
+ n.delete(e), n.size === 0 && (l(Ge, this).delete(t), l(Lt, this).unobserve(t));
1717
1699
  };
1718
1700
  }
1719
1701
  };
1720
- xn = Hn;
1721
- function gs() {
1722
- return a(It, this) ?? g(It, this, new ResizeObserver((t) => {
1702
+ Mn = xn;
1703
+ function ys() {
1704
+ return l(Lt, this) ?? w(Lt, this, new ResizeObserver((t) => {
1723
1705
  for (var e of t) {
1724
- xn.entries.set(e.target, e);
1725
- for (var r of a(We, this).get(e.target) || []) r(e);
1706
+ Mn.entries.set(e.target, e);
1707
+ for (var r of l(Ge, this).get(e.target) || []) r(e);
1726
1708
  }
1727
1709
  }));
1728
1710
  }
1729
- u(Hn, "entries", /* @__PURE__ */ new WeakMap());
1730
- function qt(t, e) {
1731
- return t === e || t?.[Ze] === e;
1732
- }
1733
- function ys(t = nr(), e, r, n) {
1734
- var i = I.r, s = T;
1735
- return Yi(() => {
1736
- var l, o;
1737
- return cr(() => {
1738
- l = o, o = n?.() || [], Ft(() => {
1739
- qt(r(...o), t) || (e(t, ...o), l && qt(r(...l), t) && e(null, ...l));
1711
+ u(xn, "entries", /* @__PURE__ */ new WeakMap());
1712
+ function Dt(t, e) {
1713
+ return t === e || t?.[Ue] === e;
1714
+ }
1715
+ function bs(t = er(), e, r, n) {
1716
+ var i = x.r, s = T;
1717
+ return zi(() => {
1718
+ var a, o;
1719
+ return lr(() => {
1720
+ a = o, o = n?.() || [], st(() => {
1721
+ Dt(r(...o), t) || (e(t, ...o), a && Dt(r(...a), t) && e(null, ...a));
1740
1722
  });
1741
1723
  }), () => {
1742
- let f = s;
1743
- for (; f !== i && f.parent !== null && f.parent.f & 33554432; ) f = f.parent;
1724
+ let c = s;
1725
+ for (; c !== i && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
1744
1726
  const y = () => {
1745
- o && qt(r(...o), t) && e(null, ...o);
1746
- }, v = f.teardown;
1747
- f.teardown = () => {
1727
+ o && Dt(r(...o), t) && e(null, ...o);
1728
+ }, v = c.teardown;
1729
+ c.teardown = () => {
1748
1730
  y(), v?.();
1749
1731
  };
1750
1732
  };
1751
1733
  }), t;
1752
1734
  }
1753
- var pt = !1;
1754
- function bs(t) {
1755
- var e = pt;
1735
+ var vt = !1;
1736
+ function ws(t) {
1737
+ var e = vt;
1756
1738
  try {
1757
- return pt = !1, [t(), pt];
1739
+ return vt = !1, [t(), vt];
1758
1740
  } finally {
1759
- pt = e;
1741
+ vt = e;
1760
1742
  }
1761
1743
  }
1762
- function Xe(t, e, r, n) {
1763
- var i = !Ht || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, o = n, f = !0, y = void 0, v = () => l && i ? (y ?? (y = /* @__PURE__ */ Et(n)), A(y)) : (f && (f = !1, o = l ? Ft(n) : n), o);
1764
- let c;
1744
+ function Pe(t, e, r, n) {
1745
+ var i = !Ot || (r & 2) !== 0, s = (r & 8) !== 0, a = (r & 16) !== 0, o = n, c = !0, y = void 0, v = () => a && i ? (y ?? (y = /* @__PURE__ */ St(n)), S(y)) : (c && (c = !1, o = a ? st(n) : n), o);
1746
+ let h;
1765
1747
  if (s) {
1766
- var d = Ze in t || Wr in t;
1767
- c = Te(t, e)?.set ?? (d && e in t ? (H) => t[e] = H : void 0);
1748
+ var f = Ue in t || Gr in t;
1749
+ h = $e(t, e)?.set ?? (f && e in t ? (O) => t[e] = O : void 0);
1768
1750
  }
1769
- var h, _ = !1;
1770
- s ? [h, _] = bs(() => t[e]) : h = t[e], h === void 0 && n !== void 0 && (h = v(), c && (i && gi(e), c(h)));
1751
+ var d, _ = !1;
1752
+ s ? [d, _] = ws(() => t[e]) : d = t[e], d === void 0 && n !== void 0 && (d = v(), h && (i && gi(e), h(d)));
1771
1753
  var m;
1772
1754
  if (i ? m = () => {
1773
- var H = t[e];
1774
- return H === void 0 ? v() : (f = !0, H);
1755
+ var O = t[e];
1756
+ return O === void 0 ? v() : (c = !0, O);
1775
1757
  } : m = () => {
1776
- var H = t[e];
1777
- return H !== void 0 && (o = void 0), H === void 0 ? o : H;
1758
+ var O = t[e];
1759
+ return O !== void 0 && (o = void 0), O === void 0 ? o : O;
1778
1760
  }, i && (r & 4) === 0) return m;
1779
- if (c) {
1780
- var L = t.$$legacy;
1781
- return (function(H, pe) {
1782
- return arguments.length > 0 ? ((!i || !pe || L || _) && c(pe ? m() : H), H) : m();
1761
+ if (h) {
1762
+ var I = t.$$legacy;
1763
+ return (function(O, ie) {
1764
+ return arguments.length > 0 ? ((!i || !ie || I || _) && h(ie ? m() : O), O) : m();
1783
1765
  });
1784
1766
  }
1785
- var O = !1, x = ((r & 1) !== 0 ? Et : ki)(() => (O = !1, m()));
1786
- s && A(x);
1787
- var w = T;
1788
- return (function(H, pe) {
1767
+ var R = !1, P = ((r & 1) !== 0 ? St : $i)(() => (R = !1, m()));
1768
+ s && S(P);
1769
+ var ne = T;
1770
+ return (function(O, ie) {
1789
1771
  if (arguments.length > 0) {
1790
- const Ke = pe ? A(x) : i && s ? je(H) : H;
1791
- return P(x, Ke), O = !0, o !== void 0 && (o = Ke), H;
1772
+ const g = ie ? S(P) : i && s ? De(O) : O;
1773
+ return K(P, g), R = !0, o !== void 0 && (o = g), O;
1792
1774
  }
1793
- return fe && O || (w.f & 16384) !== 0 ? x.v : A(x);
1775
+ return fe && R || (ne.f & 16384) !== 0 ? P.v : S(P);
1794
1776
  });
1795
1777
  }
1796
- function ws(t) {
1797
- return new Ss(t);
1778
+ function Ss(t) {
1779
+ return new As(t);
1798
1780
  }
1799
- var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ss = class {
1781
+ var Se = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), As = class {
1800
1782
  constructor(t) {
1801
- S(this, ge, void 0), S(this, ie, void 0);
1783
+ E(this, Se, void 0), E(this, se, void 0);
1802
1784
  var e = /* @__PURE__ */ new Map(), r = (i, s) => {
1803
- var l = /* @__PURE__ */ Hi(s, !1, !1);
1804
- return e.set(i, l), l;
1785
+ var a = /* @__PURE__ */ Ni(s, !1, !1);
1786
+ return e.set(i, a), a;
1805
1787
  };
1806
1788
  const n = new Proxy({
1807
1789
  ...t.props || {},
1808
1790
  $$events: {}
1809
1791
  }, {
1810
1792
  get(i, s) {
1811
- return A(e.get(s) ?? r(s, Reflect.get(i, s)));
1793
+ return S(e.get(s) ?? r(s, Reflect.get(i, s)));
1812
1794
  },
1813
1795
  has(i, s) {
1814
- return s === Wr ? !0 : (A(e.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
1796
+ return s === Gr ? !0 : (S(e.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
1815
1797
  },
1816
- set(i, s, l) {
1817
- return P(e.get(s) ?? r(s, l), l), Reflect.set(i, s, l);
1798
+ set(i, s, a) {
1799
+ return K(e.get(s) ?? r(s, a), a), Reflect.set(i, s, a);
1818
1800
  }
1819
1801
  });
1820
- g(ie, this, (t.hydrate ? ps : Mn)(t.component, {
1802
+ w(se, this, (t.hydrate ? ms : In)(t.component, {
1821
1803
  target: t.target,
1822
1804
  anchor: t.anchor,
1823
1805
  props: n,
@@ -1825,38 +1807,38 @@ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ss =
1825
1807
  intro: t.intro ?? !1,
1826
1808
  recover: t.recover,
1827
1809
  transformError: t.transformError
1828
- })), !He && (!t?.props?.$$host || t.sync === !1) && be(), g(ge, this, n.$$events);
1829
- for (const i of Object.keys(a(ie, this)))
1830
- i === "$set" || i === "$destroy" || i === "$on" || nt(this, i, {
1810
+ })), !He && (!t?.props?.$$host || t.sync === !1) && ve(), w(Se, this, n.$$events);
1811
+ for (const i of Object.keys(l(se, this)))
1812
+ i === "$set" || i === "$destroy" || i === "$on" || et(this, i, {
1831
1813
  get() {
1832
- return a(ie, this)[i];
1814
+ return l(se, this)[i];
1833
1815
  },
1834
1816
  set(s) {
1835
- a(ie, this)[i] = s;
1817
+ l(se, this)[i] = s;
1836
1818
  },
1837
1819
  enumerable: !0
1838
1820
  });
1839
- a(ie, this).$set = (i) => {
1821
+ l(se, this).$set = (i) => {
1840
1822
  Object.assign(n, i);
1841
- }, a(ie, this).$destroy = () => {
1842
- ms(a(ie, this));
1823
+ }, l(se, this).$destroy = () => {
1824
+ gs(l(se, this));
1843
1825
  };
1844
1826
  }
1845
1827
  $set(t) {
1846
- a(ie, this).$set(t);
1828
+ l(se, this).$set(t);
1847
1829
  }
1848
1830
  $on(t, e) {
1849
- a(ge, this)[t] = a(ge, this)[t] || [];
1831
+ l(Se, this)[t] = l(Se, this)[t] || [];
1850
1832
  const r = (...n) => e.call(this, ...n);
1851
- return a(ge, this)[t].push(r), () => {
1852
- a(ge, this)[t] = a(ge, this)[t].filter((n) => n !== r);
1833
+ return l(Se, this)[t].push(r), () => {
1834
+ l(Se, this)[t] = l(Se, this)[t].filter((n) => n !== r);
1853
1835
  };
1854
1836
  }
1855
1837
  $destroy() {
1856
- a(ie, this).$destroy();
1838
+ l(se, this).$destroy();
1857
1839
  }
1858
- }, Nn;
1859
- typeof HTMLElement == "function" && (Nn = class extends HTMLElement {
1840
+ }, Hn;
1841
+ typeof HTMLElement == "function" && (Hn = class extends HTMLElement {
1860
1842
  constructor(t, e, r) {
1861
1843
  super(), u(this, "$$ctor", void 0), u(this, "$$s", void 0), u(this, "$$c", void 0), u(this, "$$cn", !1), u(this, "$$d", {}), u(this, "$$r", !1), u(this, "$$p_d", {}), u(this, "$$l", {}), u(this, "$$l_u", /* @__PURE__ */ new Map()), u(this, "$$me", void 0), u(this, "$$shadowRoot", null), this.$$ctor = t, this.$$s = e, r && (this.$$shadowRoot = this.attachShadow(r));
1862
1844
  }
@@ -1877,19 +1859,19 @@ typeof HTMLElement == "function" && (Nn = class extends HTMLElement {
1877
1859
  if (this.$$cn = !0, !this.$$c) {
1878
1860
  let t = function(n) {
1879
1861
  return (i) => {
1880
- const s = pn("slot");
1881
- n !== "default" && (s.name = n), Cn(i, s);
1862
+ const s = _n("slot");
1863
+ n !== "default" && (s.name = n), $n(i, s);
1882
1864
  };
1883
1865
  };
1884
1866
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
1885
- const e = {}, r = As(this);
1867
+ const e = {}, r = Es(this);
1886
1868
  for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), e.default = !0) : e[n] = t(n));
1887
1869
  for (const n of this.attributes) {
1888
1870
  const i = this.$$g_p(n.name);
1889
- i in this.$$d || (this.$$d[i] = yt(i, n.value, this.$$p_d, "toProp"));
1871
+ i in this.$$d || (this.$$d[i] = mt(i, n.value, this.$$p_d, "toProp"));
1890
1872
  }
1891
1873
  for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
1892
- this.$$c = ws({
1874
+ this.$$c = Ss({
1893
1875
  component: this.$$ctor,
1894
1876
  target: this.$$shadowRoot || this,
1895
1877
  props: {
@@ -1897,13 +1879,13 @@ typeof HTMLElement == "function" && (Nn = class extends HTMLElement {
1897
1879
  $$slots: e,
1898
1880
  $$host: this
1899
1881
  }
1900
- }), this.$$me = ji(() => {
1901
- cr(() => {
1882
+ }), this.$$me = qi(() => {
1883
+ lr(() => {
1902
1884
  this.$$r = !0;
1903
- for (const n of St(this.$$c)) {
1885
+ for (const n of bt(this.$$c)) {
1904
1886
  if (!this.$$p_d[n]?.reflect) continue;
1905
1887
  this.$$d[n] = this.$$c[n];
1906
- const i = yt(n, this.$$d[n], this.$$p_d, "toAttribute");
1888
+ const i = mt(n, this.$$d[n], this.$$p_d, "toAttribute");
1907
1889
  i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
1908
1890
  }
1909
1891
  this.$$r = !1;
@@ -1917,7 +1899,7 @@ typeof HTMLElement == "function" && (Nn = class extends HTMLElement {
1917
1899
  }
1918
1900
  }
1919
1901
  attributeChangedCallback(t, e, r) {
1920
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = yt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
1902
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = mt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
1921
1903
  }
1922
1904
  disconnectedCallback() {
1923
1905
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -1925,10 +1907,10 @@ typeof HTMLElement == "function" && (Nn = class extends HTMLElement {
1925
1907
  });
1926
1908
  }
1927
1909
  $$g_p(t) {
1928
- return St(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
1910
+ return bt(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
1929
1911
  }
1930
1912
  });
1931
- function yt(t, e, r, n) {
1913
+ function mt(t, e, r, n) {
1932
1914
  const i = r[t]?.type;
1933
1915
  if (e = i === "Boolean" && typeof e != "boolean" ? e != null : e, !n || !r[t]) return e;
1934
1916
  if (n === "toAttribute") switch (i) {
@@ -1954,39 +1936,39 @@ function yt(t, e, r, n) {
1954
1936
  return e;
1955
1937
  }
1956
1938
  }
1957
- function As(t) {
1939
+ function Es(t) {
1958
1940
  const e = {};
1959
1941
  return t.childNodes.forEach((r) => {
1960
1942
  e[r.slot || "default"] = !0;
1961
1943
  }), e;
1962
1944
  }
1963
- function Es(t, e, r, n, i, s) {
1964
- let l = class extends Nn {
1945
+ function Ts(t, e, r, n, i, s) {
1946
+ let a = class extends Hn {
1965
1947
  constructor() {
1966
1948
  super(t, r, i), this.$$p_d = e;
1967
1949
  }
1968
1950
  static get observedAttributes() {
1969
- return St(e).map((o) => (e[o].attribute || o).toLowerCase());
1951
+ return bt(e).map((o) => (e[o].attribute || o).toLowerCase());
1970
1952
  }
1971
1953
  };
1972
- return St(e).forEach((o) => {
1973
- nt(l.prototype, o, {
1954
+ return bt(e).forEach((o) => {
1955
+ et(a.prototype, o, {
1974
1956
  get() {
1975
1957
  return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
1976
1958
  },
1977
- set(f) {
1978
- f = yt(o, f, e), this.$$d[o] = f;
1959
+ set(c) {
1960
+ c = mt(o, c, e), this.$$d[o] = c;
1979
1961
  var y = this.$$c;
1980
- y && (Te(y, o)?.get ? y[o] = f : y.$set({ [o]: f }));
1962
+ y && ($e(y, o)?.get ? y[o] = c : y.$set({ [o]: c }));
1981
1963
  }
1982
1964
  });
1983
1965
  }), n.forEach((o) => {
1984
- nt(l.prototype, o, { get() {
1966
+ et(a.prototype, o, { get() {
1985
1967
  return this.$$c?.[o];
1986
1968
  } });
1987
- }), s && (l = s(l)), t.element = l, l;
1969
+ }), s && (a = s(a)), t.element = a, a;
1988
1970
  }
1989
- var Pn, oe = class W {
1971
+ var Nn, ue = class W {
1990
1972
  findChoices(e) {
1991
1973
  e.setAttribute(W.ROOT_HOOK_ATTR, "true");
1992
1974
  const r = Array.from(e.querySelectorAll(W.CHOICE_SELECTOR));
@@ -2004,7 +1986,7 @@ var Pn, oe = class W {
2004
1986
  return r?.getAttribute("value") || r?.id || this.generateFallbackId(e);
2005
1987
  }
2006
1988
  getChoiceLabel(e) {
2007
- return this.resolveLabelElement(e)?.textContent?.trim() || "Unlabeled choice";
1989
+ return this.resolveLabelElement(e)?.textContent?.trim() || "";
2008
1990
  }
2009
1991
  isSelected(e) {
2010
1992
  const r = e.querySelector('input[type="checkbox"], input[type="radio"]');
@@ -2037,27 +2019,27 @@ var Pn, oe = class W {
2037
2019
  for (const r of e.querySelectorAll(".feedback-tick")) r.setAttribute(W.FEEDBACK_HOOK_ATTR, "true");
2038
2020
  }
2039
2021
  };
2040
- Pn = oe;
2041
- u(oe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2042
- u(oe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2043
- u(oe, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
2044
- u(oe, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
2045
- u(oe, "CHOICE_SELECTOR", `[${Pn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
2046
- u(oe, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
2047
- u(oe, "MUI_DISABLED_CLASS", "Mui-disabled");
2048
- var Ts = "ebsr-multiple-choice", Kn = (t) => t instanceof HTMLElement && Wn(t.tagName.toLowerCase()).baseName === Ts, Mr = (t, e) => Array.from(t.querySelectorAll(`[id="${e}"]`)).find(Kn) ?? null, $s = (t) => {
2022
+ Nn = ue;
2023
+ u(ue, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2024
+ u(ue, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2025
+ u(ue, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
2026
+ u(ue, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
2027
+ u(ue, "CHOICE_SELECTOR", `[${Nn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
2028
+ u(ue, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
2029
+ u(ue, "MUI_DISABLED_CLASS", "Mui-disabled");
2030
+ var Cs = "ebsr-multiple-choice", Pn = (t) => t instanceof HTMLElement && Wn(t.tagName.toLowerCase()).baseName === Cs, Lr = (t, e) => Array.from(t.querySelectorAll(`[id="${e}"]`)).find(Pn) ?? null, $s = (t) => {
2049
2031
  let e = t.parentElement;
2050
2032
  for (; e !== null; ) {
2051
- if (Kn(e)) return e;
2033
+ if (Pn(e)) return e;
2052
2034
  e = e.parentElement;
2053
2035
  }
2054
2036
  return null;
2055
2037
  }, ks = class {
2056
2038
  constructor() {
2057
- u(this, "mcAdapter", new oe());
2039
+ u(this, "mcAdapter", new ue());
2058
2040
  }
2059
2041
  findChoices(t) {
2060
- const e = Mr(t, "a"), r = Mr(t, "b"), n = [];
2042
+ const e = Lr(t, "a"), r = Lr(t, "b"), n = [];
2061
2043
  return e && n.push(...this.mcAdapter.findChoices(e)), r && n.push(...this.mcAdapter.findChoices(r)), n;
2062
2044
  }
2063
2045
  createChoiceRange(t) {
@@ -2078,8 +2060,8 @@ var Ts = "ebsr-multiple-choice", Kn = (t) => t instanceof HTMLElement && Wn(t.ta
2078
2060
  setSelectable(t, e) {
2079
2061
  this.mcAdapter.setSelectable(t, e);
2080
2062
  }
2081
- }, Ir = "answer-masking", Cs = "data-pie-answer-eliminator-choice", Rs = "data-pie-answer-eliminator-label";
2082
- function Bn(t) {
2063
+ }, Ir = "answer-masking", Rs = "data-pie-answer-eliminator-choice", Ls = "data-pie-answer-eliminator-label";
2064
+ function Kn(t) {
2083
2065
  if (!t.localName.includes("-")) return null;
2084
2066
  try {
2085
2067
  const e = t.constructor.pieSupports;
@@ -2088,13 +2070,13 @@ function Bn(t) {
2088
2070
  return null;
2089
2071
  }
2090
2072
  }
2091
- function Ls(t) {
2073
+ function Is(t) {
2092
2074
  const e = [];
2093
2075
  for (const r of [t, ...t.querySelectorAll("*")])
2094
- Bn(r) && (e.some((n) => n.contains(r)) || e.push(r));
2076
+ Kn(r) && (e.some((n) => n.contains(r)) || e.push(r));
2095
2077
  return e;
2096
2078
  }
2097
- function bt(t, e, r) {
2079
+ function gt(t, e, r) {
2098
2080
  try {
2099
2081
  return t();
2100
2082
  } catch (n) {
@@ -2103,50 +2085,50 @@ function bt(t, e, r) {
2103
2085
  }
2104
2086
  function Os(t) {
2105
2087
  if (!t || typeof t != "object") return null;
2106
- const e = t, { id: r, label: n, container: i, content: s } = e, { isSelected: l, isEliminable: o, setEliminated: f } = e;
2107
- return typeof r != "string" || !r || typeof n != "string" || !(i instanceof HTMLElement) || !(s instanceof Element) || !i.contains(s) || typeof l != "function" || typeof o != "function" || typeof f != "function" ? null : {
2088
+ const e = t, { id: r, label: n, container: i, content: s } = e, { isSelected: a, isEliminable: o, setEliminated: c } = e;
2089
+ return typeof r != "string" || !r || typeof n != "string" || !(i instanceof HTMLElement) || !(s instanceof Element) || !i.contains(s) || typeof a != "function" || typeof o != "function" || typeof c != "function" ? null : {
2108
2090
  target: {
2109
2091
  id: r,
2110
- label: n.trim() || s.textContent?.trim() || "Unlabeled choice",
2092
+ label: n.trim() || s.textContent?.trim() || "",
2111
2093
  container: i,
2112
2094
  createRange() {
2113
2095
  const y = document.createRange();
2114
2096
  return y.selectNodeContents(s), y;
2115
2097
  },
2116
- isSelected: () => bt(() => l.call(t) === !0, !1, "isSelected"),
2117
- canEliminate: () => bt(() => o.call(t) === !0, !1, "isEliminable"),
2118
- setEliminated: (y) => bt(() => f.call(t, y), void 0, "setEliminated")
2098
+ isSelected: () => gt(() => a.call(t) === !0, !1, "isSelected"),
2099
+ canEliminate: () => gt(() => o.call(t) === !0, !1, "isEliminable"),
2100
+ setEliminated: (y) => gt(() => c.call(t, y), void 0, "setEliminated")
2119
2101
  },
2120
2102
  content: s
2121
2103
  };
2122
2104
  }
2123
- function xr(t, e) {
2105
+ function Or(t, e) {
2124
2106
  t.getAttribute(e) !== "true" && t.setAttribute(e, "true");
2125
2107
  }
2126
2108
  function Ms(t) {
2127
- if (!Bn(t)?.includes("answer-masking")) return [];
2109
+ if (!Kn(t)?.includes("answer-masking")) return [];
2128
2110
  const e = t.pieSupportTargets;
2129
2111
  if (typeof e != "function")
2130
2112
  return console.warn(`[AnswerEliminator] <${t.localName}> declares ${Ir} but has no pieSupportTargets()`), [];
2131
- const r = bt(() => e.call(t, Ir), [], `<${t.localName}>.pieSupportTargets`);
2113
+ const r = gt(() => e.call(t, Ir), [], `<${t.localName}>.pieSupportTargets`);
2132
2114
  if (!Array.isArray(r)) return [];
2133
2115
  const n = [], i = /* @__PURE__ */ new Set();
2134
2116
  for (const s of r) {
2135
- const l = Os(s);
2136
- if (!l || i.has(l.target.id)) {
2117
+ const a = Os(s);
2118
+ if (!a || i.has(a.target.id)) {
2137
2119
  console.warn(`[AnswerEliminator] <${t.localName}> supplied a choice that is malformed or repeats an id`, s);
2138
2120
  continue;
2139
2121
  }
2140
- const { target: o, content: f } = l;
2141
- i.add(o.id), xr(o.container, Cs), xr(f, Rs), n.push({
2122
+ const { target: o, content: c } = a;
2123
+ i.add(o.id), Or(o.container, Rs), Or(c, Ls), n.push({
2142
2124
  target: o,
2143
2125
  owner: t
2144
2126
  });
2145
2127
  }
2146
2128
  return n;
2147
2129
  }
2148
- var Is = [new ks(), new oe()];
2149
- function xs(t, e) {
2130
+ var xs = [new ks(), new ue()];
2131
+ function Hs(t, e) {
2150
2132
  return {
2151
2133
  id: e.getChoiceId(t),
2152
2134
  label: e.getChoiceLabel(t),
@@ -2157,25 +2139,40 @@ function xs(t, e) {
2157
2139
  setEliminated: (r) => e.setSelectable(t, !r)
2158
2140
  };
2159
2141
  }
2160
- function Hs(t, e, r) {
2142
+ function Ns(t, e, r) {
2161
2143
  const n = [], i = new Set(r.map(({ target: s }) => s.container));
2162
- for (const s of Is) for (const l of s.findChoices(t))
2163
- i.has(l) || (i.add(l), !e.some((o) => o.contains(l)) && n.push({
2164
- target: xs(l, s),
2144
+ for (const s of xs) for (const a of s.findChoices(t))
2145
+ i.has(a) || (i.add(a), !e.some((o) => o.contains(a)) && n.push({
2146
+ target: Hs(a, s),
2165
2147
  owner: null
2166
2148
  }));
2167
2149
  return n;
2168
2150
  }
2169
- function Hr(t) {
2170
- const e = Ls(t), r = e.flatMap(Ms);
2171
- return [...r, ...Hs(t, e, r)];
2151
+ function Mr(t) {
2152
+ const e = Is(t), r = e.flatMap(Ms);
2153
+ return [...r, ...Ns(t, e, r)];
2172
2154
  }
2173
- var Pe = class K {
2155
+ var Bn = () => ({
2156
+ eliminatedText: "(eliminated)",
2157
+ stamp: () => {
2158
+ }
2159
+ }), he = class M {
2174
2160
  constructor() {
2175
- u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
2161
+ u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "chrome", Bn());
2176
2162
  }
2177
2163
  initialize() {
2178
2164
  }
2165
+ setChrome(e) {
2166
+ this.chrome = e;
2167
+ const r = [...Array.from(this.ranges.values(), (n) => this.findChoiceContainer(n)), ...this.fallbackContainers.values()];
2168
+ for (const n of r) {
2169
+ const i = n?.querySelector(`.${M.SR_CLASS}`);
2170
+ i && this.labelAnnouncement(i);
2171
+ }
2172
+ }
2173
+ labelAnnouncement(e) {
2174
+ e.textContent = ` ${this.chrome.eliminatedText}`, this.chrome.stamp(e);
2175
+ }
2179
2176
  destroy() {
2180
2177
  this.clearAll();
2181
2178
  }
@@ -2186,14 +2183,14 @@ var Pe = class K {
2186
2183
  }
2187
2184
  this.injectHighlightCSS(e);
2188
2185
  const n = new Highlight(r);
2189
- CSS.highlights.set(`${K.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2186
+ CSS.highlights.set(`${M.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
2190
2187
  }
2191
2188
  remove(e) {
2192
2189
  if (!this.isSupported()) {
2193
2190
  this.removeFallback(e);
2194
2191
  return;
2195
2192
  }
2196
- CSS.highlights.delete(`${K.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2193
+ CSS.highlights.delete(`${M.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
2197
2194
  const r = this.ranges.get(e);
2198
2195
  r && this.removeAriaAttributes(r), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
2199
2196
  }
@@ -2211,56 +2208,67 @@ var Pe = class K {
2211
2208
  return typeof CSS < "u" && "highlights" in CSS;
2212
2209
  }
2213
2210
  injectHighlightCSS(e) {
2214
- const r = `${K.HIGHLIGHT_STYLE_PREFIX}${e}`;
2211
+ const r = `${M.HIGHLIGHT_STYLE_PREFIX}${e}`;
2215
2212
  if (document.getElementById(r)) return;
2216
2213
  const n = document.createElement("style");
2217
2214
  n.id = r, n.textContent = `
2218
- ::highlight(${K.HIGHLIGHT_NAME_PREFIX}${e}) {
2215
+ ::highlight(${M.HIGHLIGHT_NAME_PREFIX}${e}) {
2219
2216
  opacity: 0.2;
2220
2217
  filter: blur(2px);
2221
2218
  }
2222
2219
  `, document.head.appendChild(n);
2223
2220
  }
2224
2221
  removeHighlightCSS(e) {
2225
- document.getElementById(`${K.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2222
+ document.getElementById(`${M.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
2226
2223
  }
2227
2224
  addAriaAttributes(e) {
2228
2225
  const r = this.findChoiceContainer(e);
2229
- r && (r.setAttribute(K.ELIMINATED_ATTR, "true"), r.setAttribute("aria-hidden", "true"));
2226
+ if (!r) return;
2227
+ r.setAttribute(M.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
2228
+ const n = this.resolveLabelElement(r);
2229
+ if (n && !n.querySelector(`.${M.SR_CLASS}`)) {
2230
+ const i = document.createElement("span");
2231
+ i.className = M.SR_CLASS, this.labelAnnouncement(i), n.appendChild(i);
2232
+ }
2230
2233
  }
2231
2234
  removeAriaAttributes(e) {
2232
2235
  const r = this.findChoiceContainer(e);
2233
- r && (r.removeAttribute(K.ELIMINATED_ATTR), r.removeAttribute("aria-hidden"));
2236
+ r && (r.removeAttribute(M.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${M.SR_CLASS}`)?.remove());
2237
+ }
2238
+ resolveLabelElement(e) {
2239
+ return e.querySelector(`[${M.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label");
2234
2240
  }
2235
2241
  findChoiceContainer(e) {
2236
2242
  let r = e.startContainer;
2237
2243
  for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
2238
- if (r.getAttribute(K.CHOICE_HOOK_ATTR) === "true") return r;
2244
+ if (r.getAttribute(M.CHOICE_HOOK_ATTR) === "true") return r;
2239
2245
  r = r.parentElement;
2240
2246
  }
2241
2247
  return null;
2242
2248
  }
2243
2249
  applyFallback(e, r) {
2244
2250
  const n = this.findChoiceContainer(r);
2245
- n && (n.classList.add(K.FALLBACK_CLASS), n.setAttribute(K.ELIMINATED_ATTR, "true"), n.setAttribute(K.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2251
+ n && (n.classList.add(M.FALLBACK_CLASS), n.setAttribute(M.ELIMINATED_ATTR, "true"), n.setAttribute(M.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
2246
2252
  }
2247
2253
  removeFallback(e) {
2248
2254
  const r = this.fallbackContainers.get(e);
2249
2255
  if (!r) return;
2250
- r.classList.remove(K.FALLBACK_CLASS), r.removeAttribute(K.ELIMINATED_ATTR), r.removeAttribute(K.ELIMINATED_ID_ATTR);
2256
+ r.classList.remove(M.FALLBACK_CLASS), r.removeAttribute(M.ELIMINATED_ATTR), r.removeAttribute(M.ELIMINATED_ID_ATTR);
2251
2257
  const n = document.createRange();
2252
2258
  n.selectNodeContents(r), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
2253
2259
  }
2254
2260
  };
2255
- u(Pe, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
2256
- u(Pe, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
2257
- u(Pe, "FALLBACK_CLASS", "pie-answer-masked-fallback");
2258
- u(Pe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2259
- u(Pe, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2260
- u(Pe, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2261
- var R = class b {
2261
+ u(he, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
2262
+ u(he, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
2263
+ u(he, "FALLBACK_CLASS", "pie-answer-masked-fallback");
2264
+ u(he, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
2265
+ u(he, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2266
+ u(he, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2267
+ u(he, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2268
+ u(he, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2269
+ var L = class b {
2262
2270
  constructor() {
2263
- u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "imageWrappers", /* @__PURE__ */ new Map()), u(this, "mathTargets", /* @__PURE__ */ new Map());
2271
+ u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "imageWrappers", /* @__PURE__ */ new Map()), u(this, "mathTargets", /* @__PURE__ */ new Map()), u(this, "chrome", Bn());
2264
2272
  }
2265
2273
  initialize() {
2266
2274
  this.isSupported() || console.warn("CSS Custom Highlight API not supported, using fallback");
@@ -2268,6 +2276,17 @@ var R = class b {
2268
2276
  destroy() {
2269
2277
  this.clearAll();
2270
2278
  }
2279
+ setChrome(e) {
2280
+ this.chrome = e;
2281
+ const r = [...Array.from(this.ranges.values(), (n) => this.findChoiceContainer(n)), ...this.fallbackContainers.values()];
2282
+ for (const n of r) {
2283
+ const i = n?.querySelector(`.${b.SR_CLASS}`);
2284
+ i && this.labelAnnouncement(i);
2285
+ }
2286
+ }
2287
+ labelAnnouncement(e) {
2288
+ e.textContent = ` ${this.chrome.eliminatedText}`, this.chrome.stamp(e);
2289
+ }
2271
2290
  apply(e, r) {
2272
2291
  if (this.isSupported()) {
2273
2292
  this.injectHighlightCSS(e);
@@ -2326,7 +2345,7 @@ var R = class b {
2326
2345
  const n = this.resolveLabelElement(r);
2327
2346
  if (n && !n.querySelector(`.${b.SR_CLASS}`)) {
2328
2347
  const i = document.createElement("span");
2329
- i.className = b.SR_CLASS, i.textContent = " (eliminated)", n.appendChild(i);
2348
+ i.className = b.SR_CLASS, this.labelAnnouncement(i), n.appendChild(i);
2330
2349
  }
2331
2350
  }
2332
2351
  removeAriaAttributes(e) {
@@ -2357,8 +2376,8 @@ var R = class b {
2357
2376
  if (!n) return;
2358
2377
  const i = [];
2359
2378
  for (const s of Array.from(n.querySelectorAll("img"))) {
2360
- const l = this.wrapImage(s);
2361
- l && i.push(l);
2379
+ const a = this.wrapImage(s);
2380
+ a && i.push(a);
2362
2381
  }
2363
2382
  i.length > 0 && this.imageWrappers.set(e, i);
2364
2383
  }
@@ -2374,8 +2393,8 @@ var R = class b {
2374
2393
  if (!n) return;
2375
2394
  const i = [];
2376
2395
  for (const s of n.querySelectorAll(b.MATH_SELECTOR)) {
2377
- const l = s.querySelector(b.MATH_BOX_SELECTOR) ?? s, o = !!l.querySelector(b.MATH_STACKED_SELECTOR);
2378
- l.classList.add(b.MATH_STRIKE_CLASS, o ? b.MATH_STRIKE_CROSS_CLASS : b.MATH_STRIKE_LINE_CLASS), l.setAttribute(b.MATH_STRIKE_ATTR, o ? "cross" : "line"), i.push(l);
2396
+ const a = s.querySelector(b.MATH_BOX_SELECTOR) ?? s, o = !!a.querySelector(b.MATH_STACKED_SELECTOR);
2397
+ a.classList.add(b.MATH_STRIKE_CLASS, o ? b.MATH_STRIKE_CROSS_CLASS : b.MATH_STRIKE_LINE_CLASS), a.setAttribute(b.MATH_STRIKE_ATTR, o ? "cross" : "line"), i.push(a);
2379
2398
  }
2380
2399
  i.length > 0 && this.mathTargets.set(e, i);
2381
2400
  }
@@ -2424,9 +2443,9 @@ var R = class b {
2424
2443
  x2: "100",
2425
2444
  y2: "0"
2426
2445
  }];
2427
- for (const n of [b.IMAGE_CASING_CLASS, b.IMAGE_LINE_CLASS]) for (const { x1: i, y1: s, x2: l, y2: o } of r) {
2428
- const f = document.createElementNS(b.SVG_NS, "line");
2429
- f.setAttribute("class", n), f.setAttribute("x1", i), f.setAttribute("y1", s), f.setAttribute("x2", l), f.setAttribute("y2", o), f.setAttribute("vector-effect", "non-scaling-stroke"), e.appendChild(f);
2446
+ for (const n of [b.IMAGE_CASING_CLASS, b.IMAGE_LINE_CLASS]) for (const { x1: i, y1: s, x2: a, y2: o } of r) {
2447
+ const c = document.createElementNS(b.SVG_NS, "line");
2448
+ c.setAttribute("class", n), c.setAttribute("x1", i), c.setAttribute("y1", s), c.setAttribute("x2", a), c.setAttribute("y2", o), c.setAttribute("vector-effect", "non-scaling-stroke"), e.appendChild(c);
2430
2449
  }
2431
2450
  return e;
2432
2451
  }
@@ -2434,28 +2453,28 @@ var R = class b {
2434
2453
  return e.querySelector(`[${b.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label");
2435
2454
  }
2436
2455
  };
2437
- u(R, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
2438
- u(R, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
2439
- u(R, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
2440
- u(R, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
2441
- u(R, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2442
- u(R, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2443
- u(R, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2444
- u(R, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2445
- u(R, "IMAGE_WRAPPER_CLASS", "pie-answer-eliminator-image-strike");
2446
- u(R, "IMAGE_WRAPPER_ATTR", "data-pie-answer-eliminator-image-strike");
2447
- u(R, "IMAGE_OVERLAY_CLASS", "pie-answer-eliminator-image-strike-overlay");
2448
- u(R, "IMAGE_LINE_CLASS", "pie-answer-eliminator-image-strike-line");
2449
- u(R, "IMAGE_CASING_CLASS", "pie-answer-eliminator-image-strike-casing");
2450
- u(R, "MATH_STRIKE_CLASS", "pie-answer-eliminator-math-strike");
2451
- u(R, "MATH_STRIKE_LINE_CLASS", "pie-answer-eliminator-math-strike--line");
2452
- u(R, "MATH_STRIKE_CROSS_CLASS", "pie-answer-eliminator-math-strike--cross");
2453
- u(R, "MATH_STRIKE_ATTR", "data-pie-answer-eliminator-math-strike");
2454
- u(R, "MATH_STACKED_SELECTOR", "mjx-mfrac, mjx-mtable");
2455
- u(R, "MATH_BOX_SELECTOR", "mjx-math");
2456
- u(R, "MATH_SELECTOR", "mjx-container");
2457
- u(R, "SVG_NS", "http://www.w3.org/2000/svg");
2458
- u(R, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
2456
+ u(L, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
2457
+ u(L, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
2458
+ u(L, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
2459
+ u(L, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
2460
+ u(L, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
2461
+ u(L, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
2462
+ u(L, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
2463
+ u(L, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
2464
+ u(L, "IMAGE_WRAPPER_CLASS", "pie-answer-eliminator-image-strike");
2465
+ u(L, "IMAGE_WRAPPER_ATTR", "data-pie-answer-eliminator-image-strike");
2466
+ u(L, "IMAGE_OVERLAY_CLASS", "pie-answer-eliminator-image-strike-overlay");
2467
+ u(L, "IMAGE_LINE_CLASS", "pie-answer-eliminator-image-strike-line");
2468
+ u(L, "IMAGE_CASING_CLASS", "pie-answer-eliminator-image-strike-casing");
2469
+ u(L, "MATH_STRIKE_CLASS", "pie-answer-eliminator-math-strike");
2470
+ u(L, "MATH_STRIKE_LINE_CLASS", "pie-answer-eliminator-math-strike--line");
2471
+ u(L, "MATH_STRIKE_CROSS_CLASS", "pie-answer-eliminator-math-strike--cross");
2472
+ u(L, "MATH_STRIKE_ATTR", "data-pie-answer-eliminator-math-strike");
2473
+ u(L, "MATH_STACKED_SELECTOR", "mjx-mfrac, mjx-mtable");
2474
+ u(L, "MATH_BOX_SELECTOR", "mjx-math");
2475
+ u(L, "MATH_SELECTOR", "mjx-container");
2476
+ u(L, "SVG_NS", "http://www.w3.org/2000/svg");
2477
+ u(L, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
2459
2478
  "block",
2460
2479
  "flex",
2461
2480
  "grid",
@@ -2463,18 +2482,45 @@ u(R, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
2463
2482
  "flow-root",
2464
2483
  "list-item"
2465
2484
  ]));
2466
- var Nr = "answerEliminator", dr = class wt {
2467
- constructor(e = "strikethrough", r = "right") {
2468
- u(this, "strategy", void 0), u(this, "choices", /* @__PURE__ */ new Map()), u(this, "eliminated", /* @__PURE__ */ new Set()), u(this, "strategyKeys", /* @__PURE__ */ new Map()), u(this, "anonymousGroups", /* @__PURE__ */ new WeakMap()), u(this, "nextToken", 0), u(this, "buttonAlignment", "right"), u(this, "shouldRestoreState", !0), u(this, "active", !0), u(this, "questionRoot", null), u(this, "selectionChangeHandler", null), u(this, "selectionObserver", null), u(this, "selectionRefreshFrame", null), u(this, "focusedKey", null), u(this, "store", null), u(this, "elementStateKeys", {}), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = r;
2485
+ function Ps(t) {
2486
+ switch (t) {
2487
+ case "start":
2488
+ case "left":
2489
+ return "start";
2490
+ case "end":
2491
+ case "right":
2492
+ return "end";
2493
+ default:
2494
+ return "inline";
2495
+ }
2496
+ }
2497
+ var xr = "answerEliminator", cr = class yt {
2498
+ constructor(e = "strikethrough", r = "inline") {
2499
+ u(this, "strategy", void 0), u(this, "choices", /* @__PURE__ */ new Map()), u(this, "eliminated", /* @__PURE__ */ new Set()), u(this, "strategyKeys", /* @__PURE__ */ new Map()), u(this, "anonymousGroups", /* @__PURE__ */ new WeakMap()), u(this, "nextToken", 0), u(this, "buttonAlignment", "inline"), u(this, "i18n", Wt(null)), u(this, "shouldRestoreState", !0), u(this, "active", !0), u(this, "questionRoot", null), u(this, "selectionChangeHandler", null), u(this, "selectionObserver", null), u(this, "selectionRefreshFrame", null), u(this, "focusedKey", null), u(this, "store", null), u(this, "elementStateKeys", {}), u(this, "elementIds", null), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.applyStrategyChrome(), this.buttonAlignment = Ps(r);
2500
+ }
2501
+ setInterfaceI18n(e) {
2502
+ this.i18n = e ?? Wt(null);
2503
+ for (const r of this.choices.values()) r.button && this.labelToggle(r.button, r);
2504
+ this.applyStrategyChrome();
2505
+ }
2506
+ applyStrategyChrome() {
2507
+ this.strategy.setChrome?.({
2508
+ eliminatedText: this.i18n.t("tools.answerEliminator.eliminatedA11y"),
2509
+ stamp: (e) => hr(e, this.i18n)
2510
+ });
2511
+ }
2512
+ labelToggle(e, r) {
2513
+ const n = r.target.label || this.i18n.t("tools.answerEliminator.unlabeledChoice");
2514
+ e.setAttribute("aria-label", this.i18n.t("tools.answerEliminator.toggleA11y", { choice: n })), hr(e, this.i18n);
2469
2515
  }
2470
2516
  createStrategy(e) {
2471
- return e === "mask" ? new Pe() : new R();
2517
+ return e === "mask" ? new he() : new L();
2472
2518
  }
2473
2519
  initializeForQuestion(e) {
2474
2520
  this.active = !0;
2475
2521
  const r = new Set(this.eliminated);
2476
2522
  this.restoreAllSelectable(), this.strategy.clearAll(), this.eliminated.clear(), this.cleanupButtons();
2477
- for (const i of Hr(e)) this.initializeChoice(i, e);
2523
+ for (const i of Mr(e)) this.initializeChoice(i, e);
2478
2524
  const n = this.readPersistedEliminations();
2479
2525
  for (const [i, s] of this.choices) (n.has(s.group) ? n.get(s.group)?.has(s.choiceId) : r.has(i)) && this.applyElimination(i, s);
2480
2526
  this.attachSelectionListener(e);
@@ -2489,42 +2535,49 @@ var Nr = "answerEliminator", dr = class wt {
2489
2535
  i === null && o.localName.includes("-") && (i = o);
2490
2536
  }
2491
2537
  const s = i ?? n;
2492
- let l = this.anonymousGroups.get(s);
2493
- return l || (l = `\0anonymous-${this.nextToken++}`, this.anonymousGroups.set(s, l)), l;
2538
+ let a = this.anonymousGroups.get(s);
2539
+ return a || (a = `\0anonymous-${this.nextToken++}`, this.anonymousGroups.set(s, a)), a;
2540
+ }
2541
+ isEligible({ target: e, owner: r }, n) {
2542
+ const i = this.elementIds;
2543
+ if (i === null) return !0;
2544
+ for (let s = r ?? e.container; s !== null; s = s === n ? null : s.parentElement) if (s.id && i.has(s.id)) return !0;
2545
+ return !1;
2494
2546
  }
2495
2547
  strategyKeyFor(e) {
2496
2548
  let r = this.strategyKeys.get(e);
2497
2549
  return r || (r = `choice-${this.nextToken++}`, this.strategyKeys.set(e, r)), r;
2498
2550
  }
2499
2551
  initializeChoice(e, r) {
2500
- const { target: n, owner: i } = e, s = n.id, l = this.resolveGroup(e, r), o = this.trackingKey(l, s), f = {
2552
+ if (!this.isEligible(e, r)) return;
2553
+ const { target: n, owner: i } = e, s = n.id, a = this.resolveGroup(e, r), o = this.trackingKey(a, s), c = {
2501
2554
  choiceId: s,
2502
- group: l,
2555
+ group: a,
2503
2556
  strategyKey: this.strategyKeyFor(o),
2504
2557
  target: n,
2505
2558
  owner: i,
2506
2559
  button: null
2507
2560
  };
2508
- this.choices.set(o, f);
2509
- const y = this.createToggleButton(o, f, this.alignmentFor(n.container));
2510
- f.button = y, this.updateButtonVisibility(o), n.container.style.position = "relative", n.container.appendChild(y);
2561
+ this.choices.set(o, c);
2562
+ const y = this.createToggleButton(o, c, this.alignmentFor(n.container));
2563
+ c.button = y, this.updateButtonVisibility(o), n.container.style.position = "relative", n.container.appendChild(y);
2511
2564
  }
2512
2565
  alignmentFor(e) {
2513
2566
  return this.buttonAlignment === "inline" || getComputedStyle(e).display === "inline" ? "inline" : this.buttonAlignment;
2514
2567
  }
2515
2568
  createToggleButton(e, r, n) {
2516
- const i = r.target.label, s = document.createElement("button");
2517
- s.type = "button", s.className = wt.TOGGLE_CLASS, s.setAttribute("aria-label", `Toggle elimination for ${i}`), s.setAttribute("aria-pressed", "false"), s.setAttribute("data-choice-id", r.choiceId);
2518
- const l = document.createElement("span");
2519
- return l.setAttribute("aria-hidden", "true"), l.textContent = "⊗", s.appendChild(l), this.applyButtonAlignment(s, n), s.dataset.pieShownDisplay = s.style.display, s.addEventListener("click", (o) => {
2520
- o.preventDefault(), o.stopPropagation(), this.toggleElimination(e);
2521
- }), s.addEventListener("focus", () => {
2569
+ const i = document.createElement("button");
2570
+ i.type = "button", i.className = yt.TOGGLE_CLASS, this.labelToggle(i, r), i.setAttribute("aria-pressed", "false"), i.setAttribute("data-choice-id", r.choiceId);
2571
+ const s = document.createElement("span");
2572
+ return s.setAttribute("aria-hidden", "true"), s.textContent = "⊗", i.appendChild(s), this.applyButtonAlignment(i, n, r.target.container), i.dataset.pieShownDisplay = i.style.display, i.addEventListener("click", (a) => {
2573
+ a.preventDefault(), a.stopPropagation(), this.toggleElimination(e);
2574
+ }), i.addEventListener("focus", () => {
2522
2575
  this.focusedKey = e;
2523
- }), s.addEventListener("blur", () => {
2576
+ }), i.addEventListener("blur", () => {
2524
2577
  queueMicrotask(() => {
2525
- s.isConnected && this.focusedKey === e && (this.focusedKey = null);
2578
+ i.isConnected && this.focusedKey === e && (this.focusedKey = null);
2526
2579
  });
2527
- }), s;
2580
+ }), i;
2528
2581
  }
2529
2582
  toggleElimination(e) {
2530
2583
  const r = this.choices.get(e);
@@ -2546,11 +2599,11 @@ var Nr = "answerEliminator", dr = class wt {
2546
2599
  applyElimination(e, r, n = !0) {
2547
2600
  if (r.target.isSelected()) return !1;
2548
2601
  const i = r.target.createRange();
2549
- return i ? (this.strategy.apply(r.strategyKey, i), this.eliminated.add(e), n && r.target.setEliminated(!0), r.button && (r.button.classList.add(wt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "true")), this.updateButtonVisibility(e), !0) : !1;
2602
+ return i ? (this.strategy.apply(r.strategyKey, i), this.eliminated.add(e), n && r.target.setEliminated(!0), r.button && (r.button.classList.add(yt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "true")), this.updateButtonVisibility(e), !0) : !1;
2550
2603
  }
2551
2604
  restoreChoice(e) {
2552
2605
  const r = this.choices.get(e);
2553
- this.eliminated.delete(e), r && (this.strategy.remove(r.strategyKey), r.target.setEliminated(!1), r.button && (r.button.classList.remove(wt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "false")), this.updateButtonVisibility(e));
2606
+ this.eliminated.delete(e), r && (this.strategy.remove(r.strategyKey), r.target.setEliminated(!1), r.button && (r.button.classList.remove(yt.TOGGLE_ACTIVE_CLASS), r.button.setAttribute("aria-pressed", "false")), this.updateButtonVisibility(e));
2554
2607
  }
2555
2608
  resetAll() {
2556
2609
  if (this.eliminated.size === 0) return;
@@ -2564,6 +2617,9 @@ var Nr = "answerEliminator", dr = class wt {
2564
2617
  getEliminatedCount() {
2565
2618
  return this.eliminated.size;
2566
2619
  }
2620
+ setElementIds(e) {
2621
+ this.elementIds = e ? new Set(e) : null;
2622
+ }
2567
2623
  setStoreIntegration(e, r) {
2568
2624
  this.store = e, this.elementStateKeys = r;
2569
2625
  }
@@ -2574,7 +2630,7 @@ var Nr = "answerEliminator", dr = class wt {
2574
2630
  const i = this.choices.get(n);
2575
2631
  i?.group === e && r.push(i.choiceId);
2576
2632
  }
2577
- this.store.setState(this.elementStateKeys[e], Nr, { eliminatedChoices: r });
2633
+ this.store.setState(this.elementStateKeys[e], xr, { eliminatedChoices: r });
2578
2634
  }
2579
2635
  readPersistedEliminations() {
2580
2636
  const e = /* @__PURE__ */ new Map();
@@ -2582,7 +2638,7 @@ var Nr = "answerEliminator", dr = class wt {
2582
2638
  for (const { group: r } of this.choices.values())
2583
2639
  if (!(e.has(r) || !Object.hasOwn(this.elementStateKeys, r)))
2584
2640
  try {
2585
- const n = this.store.getState(this.elementStateKeys[r], Nr), i = Array.isArray(n?.eliminatedChoices) ? n.eliminatedChoices.filter((s) => typeof s == "string") : [];
2641
+ const n = this.store.getState(this.elementStateKeys[r], xr), i = Array.isArray(n?.eliminatedChoices) ? n.eliminatedChoices.filter((s) => typeof s == "string") : [];
2586
2642
  e.set(r, new Set(i));
2587
2643
  } catch (n) {
2588
2644
  console.error("Failed to restore eliminator state:", n);
@@ -2617,10 +2673,10 @@ var Nr = "answerEliminator", dr = class wt {
2617
2673
  this.strategy.clearAll(), this.eliminated.clear();
2618
2674
  for (const { button: s } of n.values()) s?.remove();
2619
2675
  this.choices = /* @__PURE__ */ new Map();
2620
- for (const s of Hr(e)) this.initializeChoice(s, e);
2676
+ for (const s of Mr(e)) this.initializeChoice(s, e);
2621
2677
  for (const s of i) {
2622
- const l = n.get(s), o = this.choices.get(s), f = !!l?.owner && o?.owner === l.owner;
2623
- o && this.applyElimination(s, o, !f) || (o ?? l)?.target.setEliminated(!1);
2678
+ const a = n.get(s), o = this.choices.get(s), c = !!a?.owner && o?.owner === a.owner;
2679
+ o && this.applyElimination(s, o, !c) || (o ?? a)?.target.setEliminated(!1);
2624
2680
  }
2625
2681
  r && this.choices.get(r)?.button?.focus({ preventScroll: !0 });
2626
2682
  }
@@ -2648,24 +2704,19 @@ var Nr = "answerEliminator", dr = class wt {
2648
2704
  for (const { button: e } of this.choices.values()) e?.remove();
2649
2705
  this.choices.clear();
2650
2706
  }
2651
- applyButtonAlignment(e, r) {
2707
+ applyButtonAlignment(e, r, n) {
2652
2708
  switch (r) {
2653
- case "right":
2709
+ case "start":
2710
+ case "end": {
2711
+ const i = getComputedStyle(n).direction === "rtl", s = r === "end" === i ? "left" : "right";
2654
2712
  Object.assign(e.style, {
2655
2713
  position: "absolute",
2656
- right: "8px",
2657
- top: "50%",
2658
- transform: "translateY(-50%)"
2659
- });
2660
- break;
2661
- case "left":
2662
- Object.assign(e.style, {
2663
- position: "absolute",
2664
- left: "8px",
2714
+ [s]: "8px",
2665
2715
  top: "50%",
2666
2716
  transform: "translateY(-50%)"
2667
2717
  });
2668
2718
  break;
2719
+ }
2669
2720
  case "inline":
2670
2721
  Object.assign(e.style, {
2671
2722
  position: "relative",
@@ -2689,100 +2740,117 @@ var Nr = "answerEliminator", dr = class wt {
2689
2740
  this.restoreAllSelectable(), this.eliminated.clear(), this.cleanupButtons(), this.strategy.destroy();
2690
2741
  }
2691
2742
  };
2692
- u(dr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
2693
- u(dr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
2694
- var Ns = /* @__PURE__ */ is('<div style="display: none;" aria-hidden="true"></div>');
2695
- function Ps(t, e) {
2696
- zr(e, !0);
2697
- let r = Xe(e, "visible", 7, !1), n = Xe(e, "strategy", 7, "strikethrough"), i = Xe(e, "alwaysOn", 7, !1), s = Xe(e, "buttonAlignment", 7, "right"), l = Xe(e, "elementStateKeys", 23, () => ({})), o = /* @__PURE__ */ j(null), f = /* @__PURE__ */ j(null), y = /* @__PURE__ */ j(null);
2698
- const v = /* @__PURE__ */ yr(() => A(f)?.elementToolStateStore ?? null);
2699
- let c = /* @__PURE__ */ j(null), d = /* @__PURE__ */ j(null), h = /* @__PURE__ */ yr(() => i() || r());
2700
- Be(() => {
2701
- if (A(o))
2702
- return Gn(A(o), (w) => {
2703
- P(f, w, !0);
2743
+ u(cr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
2744
+ u(cr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
2745
+ var Ks = /* @__PURE__ */ ss('<div style="display: none;" aria-hidden="true"></div>');
2746
+ function Bs(t, e) {
2747
+ qr(e, !0);
2748
+ let r = Pe(e, "visible", 7, !1), n = Pe(e, "strategy", 7, "strikethrough"), i = Pe(e, "alwaysOn", 7, !1), s = Pe(e, "buttonAlignment", 7, "inline"), a = Pe(e, "elementStateKeys", 23, () => ({})), o = Pe(e, "elementIds", 7, void 0), c = /* @__PURE__ */ j(null), y = /* @__PURE__ */ j(null), v = /* @__PURE__ */ j(null);
2749
+ const h = /* @__PURE__ */ Pt(() => S(y)?.elementToolStateStore ?? null);
2750
+ let f = /* @__PURE__ */ j(null);
2751
+ const d = /* @__PURE__ */ Pt(() => Wt(S(y)));
2752
+ let _ = /* @__PURE__ */ j(null), m = /* @__PURE__ */ Pt(() => i() || r());
2753
+ de(() => {
2754
+ if (S(c))
2755
+ return Gn(S(c), (g) => {
2756
+ K(y, g, !0);
2704
2757
  });
2705
- }), Be(() => {
2706
- if (A(o))
2707
- return Dn(A(o), (w) => {
2708
- P(y, w, !0);
2758
+ }), de(() => {
2759
+ if (S(c))
2760
+ return Dn(S(c), (g) => {
2761
+ K(v, g, !0);
2709
2762
  });
2710
2763
  });
2711
- function _() {
2712
- return A(y)?.scopeElement || null;
2764
+ function I() {
2765
+ return S(v)?.scopeElement || null;
2713
2766
  }
2714
- function m() {
2715
- if (!A(h) || !A(c)) return;
2716
- const w = _();
2717
- if (!w) {
2767
+ function R() {
2768
+ if (!S(m) || !S(f)) return;
2769
+ const g = I();
2770
+ if (!g) {
2718
2771
  console.warn("[AnswerEliminator] Missing shell scope context for question root");
2719
2772
  return;
2720
2773
  }
2721
- A(c).initializeForQuestion(w);
2774
+ S(f).initializeForQuestion(g);
2722
2775
  }
2723
- function L() {
2776
+ function P() {
2724
2777
  requestAnimationFrame(() => {
2725
2778
  requestAnimationFrame(() => {
2726
- m();
2779
+ R();
2727
2780
  });
2728
2781
  });
2729
2782
  }
2730
- Be(() => {
2731
- A(c)?.setStoreIntegration(A(v), l() ?? {});
2732
- }), Be(() => {
2733
- const w = new dr(n(), s());
2734
- return Ft(() => {
2735
- w.setStoreIntegration(A(v), l() ?? {}), P(c, w, !0), A(h) ? m() : w.cleanup();
2783
+ de(() => {
2784
+ S(f)?.setInterfaceI18n(S(d));
2785
+ }), de(() => {
2786
+ S(f)?.setStoreIntegration(S(h), a() ?? {});
2787
+ });
2788
+ let ne = null;
2789
+ de(() => {
2790
+ const g = o() ? [...o()] : null, fr = g ? JSON.stringify(g) : null;
2791
+ st(() => {
2792
+ S(f) && (S(f).setElementIds(g), fr !== ne && (ne = fr, R()));
2793
+ });
2794
+ }), de(() => {
2795
+ const g = new cr(n(), s());
2796
+ return st(() => {
2797
+ g.setStoreIntegration(S(h), a() ?? {}), g.setElementIds(o() ? [...o()] : null), g.setInterfaceI18n(S(d)), K(f, g, !0), S(m) ? R() : g.cleanup();
2736
2798
  }), () => {
2737
- w.destroy(), A(c) === w && P(c, null);
2799
+ g.destroy(), S(f) === g && K(f, null);
2738
2800
  };
2739
- }), Be(() => {
2740
- const w = A(y)?.contextVersion ?? null;
2741
- if (w !== null) {
2742
- if (A(d) === null) {
2743
- P(d, w, !0);
2801
+ }), de(() => {
2802
+ const g = S(v)?.contextVersion ?? null;
2803
+ if (g !== null) {
2804
+ if (S(_) === null) {
2805
+ K(_, g, !0);
2744
2806
  return;
2745
2807
  }
2746
- w !== A(d) && (P(d, w, !0), L());
2808
+ g !== S(_) && (K(_, g, !0), P());
2747
2809
  }
2748
- }), Be(() => {
2749
- A(c) && (A(h) ? (A(c).enableStateRestoration(), m()) : A(c).cleanup());
2810
+ }), de(() => {
2811
+ S(f) && (S(m) ? (S(f).enableStateRestoration(), R()) : S(f).cleanup());
2750
2812
  });
2751
2813
  var O = {
2752
2814
  get visible() {
2753
2815
  return r();
2754
2816
  },
2755
- set visible(w = !1) {
2756
- r(w), be();
2817
+ set visible(g = !1) {
2818
+ r(g), ve();
2757
2819
  },
2758
2820
  get strategy() {
2759
2821
  return n();
2760
2822
  },
2761
- set strategy(w = "strikethrough") {
2762
- n(w), be();
2823
+ set strategy(g = "strikethrough") {
2824
+ n(g), ve();
2763
2825
  },
2764
2826
  get alwaysOn() {
2765
2827
  return i();
2766
2828
  },
2767
- set alwaysOn(w = !1) {
2768
- i(w), be();
2829
+ set alwaysOn(g = !1) {
2830
+ i(g), ve();
2769
2831
  },
2770
2832
  get buttonAlignment() {
2771
2833
  return s();
2772
2834
  },
2773
- set buttonAlignment(w = "right") {
2774
- s(w), be();
2835
+ set buttonAlignment(g = "inline") {
2836
+ s(g), ve();
2775
2837
  },
2776
2838
  get elementStateKeys() {
2777
- return l();
2839
+ return a();
2840
+ },
2841
+ set elementStateKeys(g = {}) {
2842
+ a(g), ve();
2843
+ },
2844
+ get elementIds() {
2845
+ return o();
2778
2846
  },
2779
- set elementStateKeys(w = {}) {
2780
- l(w), be();
2847
+ set elementIds(g = void 0) {
2848
+ o(g), ve();
2781
2849
  }
2782
- }, x = Ns();
2783
- return ys(x, (w) => P(o, w), () => A(o)), Cn(t, x), Vr(O);
2850
+ }, ie = Ks();
2851
+ return bs(ie, (g) => K(c, g), () => S(c)), $n(t, ie), Yr(O);
2784
2852
  }
2785
- Ks("pie-tool-answer-eliminator", Es(Ps, {
2853
+ Fs("pie-tool-answer-eliminator", Ts(Bs, {
2786
2854
  visible: {
2787
2855
  attribute: "visible",
2788
2856
  type: "Boolean"
@@ -2799,11 +2867,12 @@ Ks("pie-tool-answer-eliminator", Es(Ps, {
2799
2867
  attribute: "button-alignment",
2800
2868
  type: "String"
2801
2869
  },
2802
- elementStateKeys: { type: "Object" }
2870
+ elementStateKeys: { type: "Object" },
2871
+ elementIds: { type: "Array" }
2803
2872
  }, [], [], { mode: "open" }, Fn));
2804
- function Ks(t, e) {
2873
+ function Fs(t, e) {
2805
2874
  customElements.get(t) || customElements.define(t, e);
2806
2875
  }
2807
2876
  export {
2808
- Ps as default
2877
+ Bs as default
2809
2878
  };