@pie-players/pie-tool-annotation-toolbar 0.3.9 → 0.3.11

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,73 +1,73 @@
1
- var ai = Object.defineProperty;
2
- var Eo = (t) => {
1
+ var fi = Object.defineProperty;
2
+ var $o = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var ci = (t, e, n) => e in t ? ai(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
- var m = (t, e, n) => ci(t, typeof e != "symbol" ? e + "" : e, n), Dn = (t, e, n) => e.has(t) || Eo("Cannot " + n);
7
- var u = (t, e, n) => (Dn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), T = (t, e, n) => e.has(t) ? Eo("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), y = (t, e, n, o) => (Dn(t, e, "write to private field"), o ? o.call(t, n) : e.set(t, n), n), P = (t, e, n) => (Dn(t, e, "access private method"), n);
8
- var Xo;
9
- typeof window < "u" && ((Xo = window.__svelte ?? (window.__svelte = {})).v ?? (Xo.v = /* @__PURE__ */ new Set())).add("5");
10
- const ui = 1, fi = 2, di = 16, hi = 1, pi = 2, Jo = "[", oo = "[!", $o = "[?", ro = "]", Lt = {}, D = /* @__PURE__ */ Symbol(), Qo = "http://www.w3.org/1999/xhtml", Bn = !1;
11
- var Zo = Array.isArray, vi = Array.prototype.indexOf, Pt = Array.prototype.includes, En = Array.from, wn = Object.keys, Tn = Object.defineProperty, It = Object.getOwnPropertyDescriptor, gi = Object.getOwnPropertyDescriptors, mi = Object.prototype, bi = Array.prototype, er = Object.getPrototypeOf, ko = Object.isExtensible;
12
- const _i = () => {
5
+ var di = (t, e, n) => e in t ? fi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var m = (t, e, n) => di(t, typeof e != "symbol" ? e + "" : e, n), Dn = (t, e, n) => e.has(t) || $o("Cannot " + n);
7
+ var u = (t, e, n) => (Dn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), T = (t, e, n) => e.has(t) ? $o("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), y = (t, e, n, o) => (Dn(t, e, "write to private field"), o ? o.call(t, n) : e.set(t, n), n), P = (t, e, n) => (Dn(t, e, "access private method"), n);
8
+ var Jo;
9
+ typeof window < "u" && ((Jo = window.__svelte ?? (window.__svelte = {})).v ?? (Jo.v = /* @__PURE__ */ new Set())).add("5");
10
+ const hi = 1, pi = 2, vi = 16, gi = 1, mi = 2, Qo = "[", ro = "[!", ko = "[?", io = "]", Lt = {}, D = /* @__PURE__ */ Symbol(), Zo = "http://www.w3.org/1999/xhtml", Bn = !1;
11
+ var er = Array.isArray, bi = Array.prototype.indexOf, Pt = Array.prototype.includes, En = Array.from, wn = Object.keys, Tn = Object.defineProperty, It = Object.getOwnPropertyDescriptor, _i = Object.getOwnPropertyDescriptors, yi = Object.prototype, wi = Array.prototype, tr = Object.getPrototypeOf, Co = Object.isExtensible;
12
+ const Ti = () => {
13
13
  };
14
- function yi(t) {
14
+ function Ii(t) {
15
15
  for (var e = 0; e < t.length; e++)
16
16
  t[e]();
17
17
  }
18
- function tr() {
18
+ function nr() {
19
19
  var t, e, n = new Promise((o, r) => {
20
20
  t = o, e = r;
21
21
  });
22
22
  return { promise: n, resolve: t, reject: e };
23
23
  }
24
- const z = 2, zt = 4, xt = 8, io = 1 << 24, et = 16, Ie = 32, tt = 64, jn = 128, se = 512, V = 1024, F = 2048, we = 4096, j = 8192, Ce = 16384, yt = 32768, Nt = 65536, Co = 1 << 17, nr = 1 << 18, nt = 1 << 19, wi = 1 << 20, Fe = 1 << 25, mt = 65536, qn = 1 << 21, so = 1 << 22, Je = 1 << 23, hn = /* @__PURE__ */ Symbol("$state"), Ti = /* @__PURE__ */ Symbol("legacy props"), Ii = /* @__PURE__ */ Symbol(""), st = new class extends Error {
24
+ const z = 2, zt = 4, xt = 8, so = 1 << 24, et = 16, Ie = 32, tt = 64, jn = 128, se = 512, V = 1024, F = 2048, we = 4096, j = 8192, Ce = 16384, yt = 32768, Mt = 65536, Ro = 1 << 17, or = 1 << 18, nt = 1 << 19, Si = 1 << 20, Fe = 1 << 25, mt = 65536, qn = 1 << 21, lo = 1 << 22, Je = 1 << 23, hn = /* @__PURE__ */ Symbol("$state"), Ai = /* @__PURE__ */ Symbol("legacy props"), Ei = /* @__PURE__ */ Symbol(""), st = new class extends Error {
25
25
  constructor() {
26
26
  super(...arguments);
27
27
  m(this, "name", "StaleReactionError");
28
28
  m(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
29
29
  }
30
- }(), Ai = (
30
+ }(), $i = (
31
31
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
32
32
  !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
33
33
  ), $n = 3, Ht = 8;
34
- function Si() {
34
+ function ki() {
35
35
  throw new Error("https://svelte.dev/e/async_derived_orphan");
36
36
  }
37
- function Ei(t, e, n) {
37
+ function Ci(t, e, n) {
38
38
  throw new Error("https://svelte.dev/e/each_key_duplicate");
39
39
  }
40
- function $i(t) {
40
+ function Ri(t) {
41
41
  throw new Error("https://svelte.dev/e/effect_in_teardown");
42
42
  }
43
- function ki() {
43
+ function Oi() {
44
44
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
45
45
  }
46
- function Ci(t) {
46
+ function Li(t) {
47
47
  throw new Error("https://svelte.dev/e/effect_orphan");
48
48
  }
49
- function Ri() {
49
+ function Pi() {
50
50
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
51
51
  }
52
- function Oi() {
52
+ function xi() {
53
53
  throw new Error("https://svelte.dev/e/hydration_failed");
54
54
  }
55
- function Li() {
55
+ function Mi() {
56
56
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
57
57
  }
58
- function Pi() {
58
+ function Ni() {
59
59
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
60
60
  }
61
- function xi() {
61
+ function Di() {
62
62
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
63
63
  }
64
- function Ni() {
64
+ function Vi() {
65
65
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
66
66
  }
67
67
  function kn(t) {
68
68
  console.warn("https://svelte.dev/e/hydration_mismatch");
69
69
  }
70
- function Mi() {
70
+ function Fi() {
71
71
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
72
72
  }
73
73
  let R = !1;
@@ -90,7 +90,7 @@ function an(t) {
90
90
  k = t;
91
91
  }
92
92
  }
93
- function Di(t = 1) {
93
+ function zi(t = 1) {
94
94
  if (R) {
95
95
  for (var e = t, n = k; e--; )
96
96
  n = /** @type {TemplateNode} */
@@ -105,10 +105,10 @@ function In(t = !0) {
105
105
  /** @type {Comment} */
106
106
  n.data
107
107
  );
108
- if (o === ro) {
108
+ if (o === io) {
109
109
  if (e === 0) return n;
110
110
  e -= 1;
111
- } else (o === Jo || o === oo || // "[1", "[2", etc. for if blocks
111
+ } else (o === Qo || o === ro || // "[1", "[2", etc. for if blocks
112
112
  o[0] === "[" && !isNaN(Number(o.slice(1)))) && (e += 1);
113
113
  }
114
114
  var r = (
@@ -118,7 +118,7 @@ function In(t = !0) {
118
118
  t && n.remove(), n = r;
119
119
  }
120
120
  }
121
- function or(t) {
121
+ function rr(t) {
122
122
  if (!t || t.nodeType !== Ht)
123
123
  throw kn(), Lt;
124
124
  return (
@@ -126,20 +126,20 @@ function or(t) {
126
126
  t.data
127
127
  );
128
128
  }
129
- function rr(t) {
129
+ function ir(t) {
130
130
  return t === this.v;
131
131
  }
132
- function Vi(t, e) {
132
+ function Hi(t, e) {
133
133
  return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
134
134
  }
135
- function ir(t) {
136
- return !Vi(t, this.v);
135
+ function sr(t) {
136
+ return !Hi(t, this.v);
137
137
  }
138
- let Fi = !1, ae = null;
139
- function Mt(t) {
138
+ let Bi = !1, ae = null;
139
+ function Nt(t) {
140
140
  ae = t;
141
141
  }
142
- function sr(t, e = !1, n) {
142
+ function lr(t, e = !1, n) {
143
143
  ae = {
144
144
  p: ae,
145
145
  i: !1,
@@ -150,7 +150,7 @@ function sr(t, e = !1, n) {
150
150
  l: null
151
151
  };
152
152
  }
153
- function lr(t) {
153
+ function ar(t) {
154
154
  var e = (
155
155
  /** @type {ComponentContext} */
156
156
  ae
@@ -158,36 +158,36 @@ function lr(t) {
158
158
  if (n !== null) {
159
159
  e.e = null;
160
160
  for (var o of n)
161
- Or(o);
161
+ Lr(o);
162
162
  }
163
163
  return t !== void 0 && (e.x = t), e.i = !0, ae = e.p, t ?? /** @type {T} */
164
164
  {};
165
165
  }
166
- function ar() {
166
+ function cr() {
167
167
  return !0;
168
168
  }
169
169
  let lt = [];
170
- function cr() {
170
+ function ur() {
171
171
  var t = lt;
172
- lt = [], yi(t);
172
+ lt = [], Ii(t);
173
173
  }
174
174
  function pt(t) {
175
175
  if (lt.length === 0 && !Xt) {
176
176
  var e = lt;
177
177
  queueMicrotask(() => {
178
- e === lt && cr();
178
+ e === lt && ur();
179
179
  });
180
180
  }
181
181
  lt.push(t);
182
182
  }
183
- function zi() {
183
+ function ji() {
184
184
  for (; lt.length > 0; )
185
- cr();
185
+ ur();
186
186
  }
187
- function ur(t) {
187
+ function fr(t) {
188
188
  var e = E;
189
189
  if (e === null)
190
- return A.f |= Je, t;
190
+ return S.f |= Je, t;
191
191
  if ((e.f & yt) === 0 && (e.f & zt) === 0)
192
192
  throw t;
193
193
  Xe(t, e);
@@ -208,32 +208,32 @@ function Xe(t, e) {
208
208
  }
209
209
  throw t;
210
210
  }
211
- const Hi = -7169;
212
- function N(t, e) {
213
- t.f = t.f & Hi | e;
211
+ const qi = -7169;
212
+ function M(t, e) {
213
+ t.f = t.f & qi | e;
214
214
  }
215
- function lo(t) {
216
- (t.f & se) !== 0 || t.deps === null ? N(t, V) : N(t, we);
215
+ function ao(t) {
216
+ (t.f & se) !== 0 || t.deps === null ? M(t, V) : M(t, we);
217
217
  }
218
- function fr(t) {
218
+ function dr(t) {
219
219
  if (t !== null)
220
220
  for (const e of t)
221
- (e.f & z) === 0 || (e.f & mt) === 0 || (e.f ^= mt, fr(
221
+ (e.f & z) === 0 || (e.f & mt) === 0 || (e.f ^= mt, dr(
222
222
  /** @type {Derived} */
223
223
  e.deps
224
224
  ));
225
225
  }
226
- function dr(t, e, n) {
227
- (t.f & F) !== 0 ? e.add(t) : (t.f & we) !== 0 && n.add(t), fr(t.deps), N(t, V);
226
+ function hr(t, e, n) {
227
+ (t.f & F) !== 0 ? e.add(t) : (t.f & we) !== 0 && n.add(t), dr(t.deps), M(t, V);
228
228
  }
229
229
  const cn = /* @__PURE__ */ new Set();
230
- let L = null, be = null, W = [], Rn = null, Xt = !1, Dt = null, Bi = 1;
231
- var We, At, ut, St, Et, $t, Ke, Ae, kt, Y, Gn, Un, Wn, Kn;
232
- const _o = class _o {
230
+ let L = null, be = null, W = [], Rn = null, Xt = !1, Dt = null, Gi = 1;
231
+ var We, St, ut, At, Et, $t, Ke, Se, kt, Y, Gn, Un, Wn, Kn;
232
+ const yo = class yo {
233
233
  constructor() {
234
234
  T(this, Y);
235
235
  // for debugging. TODO remove once async is stable
236
- m(this, "id", Bi++);
236
+ m(this, "id", Gi++);
237
237
  /**
238
238
  * The current values of any sources that are updated in this batch
239
239
  * They keys of this map are identical to `this.#previous`
@@ -256,7 +256,7 @@ const _o = class _o {
256
256
  * If a fork is discarded, we need to destroy any effects that are no longer needed
257
257
  * @type {Set<(batch: Batch) => void>}
258
258
  */
259
- T(this, At, /* @__PURE__ */ new Set());
259
+ T(this, St, /* @__PURE__ */ new Set());
260
260
  /**
261
261
  * The number of async effects that are currently in flight
262
262
  */
@@ -264,7 +264,7 @@ const _o = class _o {
264
264
  /**
265
265
  * The number of async effects that are currently in flight, _not_ inside a pending boundary
266
266
  */
267
- T(this, St, 0);
267
+ T(this, At, 0);
268
268
  /**
269
269
  * A deferred that resolves when the batch is committed, used with `settled()`
270
270
  * TODO replace with Promise.withResolvers once supported widely enough
@@ -288,7 +288,7 @@ const _o = class _o {
288
288
  * so they can be rescheduled if the branch survives.
289
289
  * @type {Map<Effect, { d: Effect[], m: Effect[] }>}
290
290
  */
291
- T(this, Ae, /* @__PURE__ */ new Map());
291
+ T(this, Se, /* @__PURE__ */ new Map());
292
292
  m(this, "is_fork", !1);
293
293
  T(this, kt, !1);
294
294
  }
@@ -297,7 +297,7 @@ const _o = class _o {
297
297
  * @param {Effect} effect
298
298
  */
299
299
  skip_effect(e) {
300
- u(this, Ae).has(e) || u(this, Ae).set(e, { d: [], m: [] });
300
+ u(this, Se).has(e) || u(this, Se).set(e, { d: [], m: [] });
301
301
  }
302
302
  /**
303
303
  * Remove an effect from the #skipped_branches map and reschedule
@@ -305,13 +305,13 @@ const _o = class _o {
305
305
  * @param {Effect} effect
306
306
  */
307
307
  unskip_effect(e) {
308
- var n = u(this, Ae).get(e);
308
+ var n = u(this, Se).get(e);
309
309
  if (n) {
310
- u(this, Ae).delete(e);
310
+ u(this, Se).delete(e);
311
311
  for (var o of n.d)
312
- N(o, F), ke(o);
312
+ M(o, F), ke(o);
313
313
  for (o of n.m)
314
- N(o, we), ke(o);
314
+ M(o, we), ke(o);
315
315
  }
316
316
  }
317
317
  /**
@@ -325,12 +325,12 @@ const _o = class _o {
325
325
  P(this, Y, Un).call(this, r, n, o);
326
326
  if (Dt = null, P(this, Y, Gn).call(this)) {
327
327
  P(this, Y, Wn).call(this, o), P(this, Y, Wn).call(this, n);
328
- for (const [r, i] of u(this, Ae))
329
- gr(r, i);
328
+ for (const [r, i] of u(this, Se))
329
+ mr(r, i);
330
330
  } else {
331
331
  L = null;
332
332
  for (const r of u(this, We)) r(this);
333
- u(this, We).clear(), u(this, ut) === 0 && P(this, Y, Kn).call(this), Ro(o), Ro(n), u(this, $t).clear(), u(this, Ke).clear(), u(this, Et)?.resolve();
333
+ u(this, We).clear(), u(this, ut) === 0 && P(this, Y, Kn).call(this), Oo(o), Oo(n), u(this, $t).clear(), u(this, Ke).clear(), u(this, Et)?.resolve();
334
334
  }
335
335
  be = null;
336
336
  }
@@ -351,7 +351,7 @@ const _o = class _o {
351
351
  }
352
352
  flush() {
353
353
  if (W.length > 0)
354
- L = this, hr();
354
+ L = this, pr();
355
355
  else if (u(this, ut) === 0 && !this.is_fork) {
356
356
  for (const e of u(this, We)) e(this);
357
357
  u(this, We).clear(), P(this, Y, Kn).call(this), u(this, Et)?.resolve();
@@ -359,30 +359,30 @@ const _o = class _o {
359
359
  this.deactivate();
360
360
  }
361
361
  discard() {
362
- for (const e of u(this, At)) e(this);
363
- u(this, At).clear();
362
+ for (const e of u(this, St)) e(this);
363
+ u(this, St).clear();
364
364
  }
365
365
  /**
366
366
  *
367
367
  * @param {boolean} blocking
368
368
  */
369
369
  increment(e) {
370
- y(this, ut, u(this, ut) + 1), e && y(this, St, u(this, St) + 1);
370
+ y(this, ut, u(this, ut) + 1), e && y(this, At, u(this, At) + 1);
371
371
  }
372
372
  /**
373
373
  *
374
374
  * @param {boolean} blocking
375
375
  */
376
376
  decrement(e) {
377
- y(this, ut, u(this, ut) - 1), e && y(this, St, u(this, St) - 1), !u(this, kt) && (y(this, kt, !0), pt(() => {
377
+ y(this, ut, u(this, ut) - 1), e && y(this, At, u(this, At) - 1), !u(this, kt) && (y(this, kt, !0), pt(() => {
378
378
  y(this, kt, !1), P(this, Y, Gn).call(this) ? W.length > 0 && this.flush() : this.revive();
379
379
  }));
380
380
  }
381
381
  revive() {
382
382
  for (const e of u(this, $t))
383
- u(this, Ke).delete(e), N(e, F), ke(e);
383
+ u(this, Ke).delete(e), M(e, F), ke(e);
384
384
  for (const e of u(this, Ke))
385
- N(e, we), ke(e);
385
+ M(e, we), ke(e);
386
386
  this.flush();
387
387
  }
388
388
  /** @param {(batch: Batch) => void} fn */
@@ -391,14 +391,14 @@ const _o = class _o {
391
391
  }
392
392
  /** @param {(batch: Batch) => void} fn */
393
393
  ondiscard(e) {
394
- u(this, At).add(e);
394
+ u(this, St).add(e);
395
395
  }
396
396
  settled() {
397
- return (u(this, Et) ?? y(this, Et, tr())).promise;
397
+ return (u(this, Et) ?? y(this, Et, nr())).promise;
398
398
  }
399
399
  static ensure() {
400
400
  if (L === null) {
401
- const e = L = new _o();
401
+ const e = L = new yo();
402
402
  cn.add(L), Xt || pt(() => {
403
403
  L === e && e.flush();
404
404
  });
@@ -408,8 +408,8 @@ const _o = class _o {
408
408
  apply() {
409
409
  }
410
410
  };
411
- We = new WeakMap(), At = new WeakMap(), ut = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), $t = new WeakMap(), Ke = new WeakMap(), Ae = new WeakMap(), kt = new WeakMap(), Y = new WeakSet(), Gn = function() {
412
- return this.is_fork || u(this, St) > 0;
411
+ We = new WeakMap(), St = new WeakMap(), ut = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), $t = new WeakMap(), Ke = new WeakMap(), Se = new WeakMap(), kt = new WeakMap(), Y = new WeakSet(), Gn = function() {
412
+ return this.is_fork || u(this, At) > 0;
413
413
  }, /**
414
414
  * Traverse the effect tree, executing effects or stashing
415
415
  * them for later execution as appropriate
@@ -420,9 +420,9 @@ We = new WeakMap(), At = new WeakMap(), ut = new WeakMap(), St = new WeakMap(),
420
420
  Un = function(e, n, o) {
421
421
  e.f ^= V;
422
422
  for (var r = e.first; r !== null; ) {
423
- var i = r.f, s = (i & (Ie | tt)) !== 0, l = s && (i & V) !== 0, a = (i & j) !== 0, c = l || u(this, Ae).has(r);
423
+ var i = r.f, s = (i & (Ie | tt)) !== 0, a = s && (i & V) !== 0, l = (i & j) !== 0, c = a || u(this, Se).has(r);
424
424
  if (!c && r.fn !== null) {
425
- s ? a || (r.f ^= V) : (i & zt) !== 0 ? n.push(r) : (i & (xt | io)) !== 0 && a ? o.push(r) : nn(r) && (Ft(r), (i & et) !== 0 && (u(this, Ke).add(r), a && N(r, F)));
425
+ s ? l || (r.f ^= V) : (i & zt) !== 0 ? n.push(r) : (i & (xt | so)) !== 0 && l ? o.push(r) : nn(r) && (Ft(r), (i & et) !== 0 && (u(this, Ke).add(r), l && M(r, F)));
426
426
  var f = r.first;
427
427
  if (f !== null) {
428
428
  r = f;
@@ -443,7 +443,7 @@ Un = function(e, n, o) {
443
443
  */
444
444
  Wn = function(e) {
445
445
  for (var n = 0; n < e.length; n += 1)
446
- dr(e[n], u(this, $t), u(this, Ke));
446
+ hr(e[n], u(this, $t), u(this, Ke));
447
447
  }, Kn = function() {
448
448
  var i;
449
449
  if (cn.size > 1) {
@@ -454,24 +454,24 @@ Wn = function(e) {
454
454
  o = !1;
455
455
  continue;
456
456
  }
457
- const l = [];
457
+ const a = [];
458
458
  for (const [c, f] of this.current) {
459
459
  if (s.current.has(c))
460
460
  if (o && f !== s.current.get(c))
461
461
  s.current.set(c, f);
462
462
  else
463
463
  continue;
464
- l.push(c);
464
+ a.push(c);
465
465
  }
466
- if (l.length === 0)
466
+ if (a.length === 0)
467
467
  continue;
468
- const a = [...s.current.keys()].filter((c) => !this.current.has(c));
469
- if (a.length > 0) {
468
+ const l = [...s.current.keys()].filter((c) => !this.current.has(c));
469
+ if (l.length > 0) {
470
470
  var r = W;
471
471
  W = [];
472
472
  const c = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
473
- for (const d of l)
474
- pr(d, a, c, f);
473
+ for (const d of a)
474
+ vr(d, l, c, f);
475
475
  if (W.length > 0) {
476
476
  L = s, s.apply();
477
477
  for (const d of W)
@@ -483,31 +483,31 @@ Wn = function(e) {
483
483
  }
484
484
  L = e, be = n;
485
485
  }
486
- u(this, Ae).clear(), cn.delete(this);
486
+ u(this, Se).clear(), cn.delete(this);
487
487
  };
488
- let ze = _o;
488
+ let ze = yo;
489
489
  function pn(t) {
490
490
  var e = Xt;
491
491
  Xt = !0;
492
492
  try {
493
493
  for (var n; ; ) {
494
- if (zi(), W.length === 0 && (L?.flush(), W.length === 0))
494
+ if (ji(), W.length === 0 && (L?.flush(), W.length === 0))
495
495
  return Rn = null, /** @type {T} */
496
496
  n;
497
- hr();
497
+ pr();
498
498
  }
499
499
  } finally {
500
500
  Xt = e;
501
501
  }
502
502
  }
503
- function hr() {
503
+ function pr() {
504
504
  var t = null;
505
505
  try {
506
506
  for (var e = 0; W.length > 0; ) {
507
507
  var n = ze.ensure();
508
508
  if (e++ > 1e3) {
509
509
  var o, r;
510
- ji();
510
+ Ui();
511
511
  }
512
512
  n.process(W), Qe.clear();
513
513
  }
@@ -515,62 +515,62 @@ function hr() {
515
515
  W = [], Rn = null, Dt = null;
516
516
  }
517
517
  }
518
- function ji() {
518
+ function Ui() {
519
519
  try {
520
- Ri();
520
+ Pi();
521
521
  } catch (t) {
522
522
  Xe(t, Rn);
523
523
  }
524
524
  }
525
- let Ne = null;
526
- function Ro(t) {
525
+ let Me = null;
526
+ function Oo(t) {
527
527
  var e = t.length;
528
528
  if (e !== 0) {
529
529
  for (var n = 0; n < e; ) {
530
530
  var o = t[n++];
531
- if ((o.f & (Ce | j)) === 0 && nn(o) && (Ne = /* @__PURE__ */ new Set(), Ft(o), o.deps === null && o.first === null && o.nodes === null && o.teardown === null && o.ac === null && xr(o), Ne?.size > 0)) {
531
+ if ((o.f & (Ce | j)) === 0 && nn(o) && (Me = /* @__PURE__ */ new Set(), Ft(o), o.deps === null && o.first === null && o.nodes === null && o.teardown === null && o.ac === null && Mr(o), Me?.size > 0)) {
532
532
  Qe.clear();
533
- for (const r of Ne) {
533
+ for (const r of Me) {
534
534
  if ((r.f & (Ce | j)) !== 0) continue;
535
535
  const i = [r];
536
536
  let s = r.parent;
537
537
  for (; s !== null; )
538
- Ne.has(s) && (Ne.delete(s), i.push(s)), s = s.parent;
539
- for (let l = i.length - 1; l >= 0; l--) {
540
- const a = i[l];
541
- (a.f & (Ce | j)) === 0 && Ft(a);
538
+ Me.has(s) && (Me.delete(s), i.push(s)), s = s.parent;
539
+ for (let a = i.length - 1; a >= 0; a--) {
540
+ const l = i[a];
541
+ (l.f & (Ce | j)) === 0 && Ft(l);
542
542
  }
543
543
  }
544
- Ne.clear();
544
+ Me.clear();
545
545
  }
546
546
  }
547
- Ne = null;
547
+ Me = null;
548
548
  }
549
549
  }
550
- function pr(t, e, n, o) {
550
+ function vr(t, e, n, o) {
551
551
  if (!n.has(t) && (n.add(t), t.reactions !== null))
552
552
  for (const r of t.reactions) {
553
553
  const i = r.f;
554
- (i & z) !== 0 ? pr(
554
+ (i & z) !== 0 ? vr(
555
555
  /** @type {Derived} */
556
556
  r,
557
557
  e,
558
558
  n,
559
559
  o
560
- ) : (i & (so | et)) !== 0 && (i & F) === 0 && vr(r, e, o) && (N(r, F), ke(
560
+ ) : (i & (lo | et)) !== 0 && (i & F) === 0 && gr(r, e, o) && (M(r, F), ke(
561
561
  /** @type {Effect} */
562
562
  r
563
563
  ));
564
564
  }
565
565
  }
566
- function vr(t, e, n) {
566
+ function gr(t, e, n) {
567
567
  const o = n.get(t);
568
568
  if (o !== void 0) return o;
569
569
  if (t.deps !== null)
570
570
  for (const r of t.deps) {
571
571
  if (Pt.call(e, r))
572
572
  return !0;
573
- if ((r.f & z) !== 0 && vr(
573
+ if ((r.f & z) !== 0 && gr(
574
574
  /** @type {Derived} */
575
575
  r,
576
576
  e,
@@ -586,7 +586,7 @@ function vr(t, e, n) {
586
586
  }
587
587
  function ke(t) {
588
588
  var e = Rn = t, n = e.b;
589
- if (n?.is_pending && (t.f & (zt | xt | io)) !== 0 && (t.f & yt) === 0) {
589
+ if (n?.is_pending && (t.f & (zt | xt | so)) !== 0 && (t.f & yt) === 0) {
590
590
  n.defer_effect(t);
591
591
  return;
592
592
  }
@@ -603,29 +603,29 @@ function ke(t) {
603
603
  }
604
604
  W.push(e);
605
605
  }
606
- function gr(t, e) {
606
+ function mr(t, e) {
607
607
  if (!((t.f & Ie) !== 0 && (t.f & V) !== 0)) {
608
- (t.f & F) !== 0 ? e.d.push(t) : (t.f & we) !== 0 && e.m.push(t), N(t, V);
608
+ (t.f & F) !== 0 ? e.d.push(t) : (t.f & we) !== 0 && e.m.push(t), M(t, V);
609
609
  for (var n = t.first; n !== null; )
610
- gr(n, e), n = n.next;
610
+ mr(n, e), n = n.next;
611
611
  }
612
612
  }
613
- function qi(t) {
613
+ function Wi(t) {
614
614
  let e = 0, n = bt(0), o;
615
615
  return () => {
616
- fo() && (v(n), ho(() => (e === 0 && (o = qr(() => t(() => Jt(n)))), e += 1, () => {
616
+ ho() && (v(n), po(() => (e === 0 && (o = Gr(() => t(() => Jt(n)))), e += 1, () => {
617
617
  pt(() => {
618
618
  e -= 1, e === 0 && (o?.(), o = void 0, Jt(n));
619
619
  });
620
620
  })));
621
621
  };
622
622
  }
623
- var Gi = Nt | nt;
624
- function Ui(t, e, n, o) {
625
- new Wi(t, e, n, o);
623
+ var Ki = Mt | nt;
624
+ function Yi(t, e, n, o) {
625
+ new Xi(t, e, n, o);
626
626
  }
627
- var Q, Zt, Se, ft, U, Ee, Z, ge, Me, dt, Ye, Ct, Rt, Ot, De, An, x, mr, br, _r, Yn, vn, gn, Xn;
628
- class Wi {
627
+ var Q, Zt, Ae, ft, U, Ee, Z, ge, Ne, dt, Ye, Ct, Rt, Ot, De, Sn, x, br, _r, yr, Yn, vn, gn, Xn;
628
+ class Xi {
629
629
  /**
630
630
  * @param {TemplateNode} node
631
631
  * @param {BoundaryProps} props
@@ -648,7 +648,7 @@ class Wi {
648
648
  /** @type {TemplateNode | null} */
649
649
  T(this, Zt, R ? k : null);
650
650
  /** @type {BoundaryProps} */
651
- T(this, Se);
651
+ T(this, Ae);
652
652
  /** @type {((anchor: Node) => void)} */
653
653
  T(this, ft);
654
654
  /** @type {Effect} */
@@ -660,7 +660,7 @@ class Wi {
660
660
  /** @type {Effect | null} */
661
661
  T(this, ge, null);
662
662
  /** @type {DocumentFragment | null} */
663
- T(this, Me, null);
663
+ T(this, Ne, null);
664
664
  T(this, dt, 0);
665
665
  T(this, Ye, 0);
666
666
  T(this, Ct, !1);
@@ -676,10 +676,10 @@ class Wi {
676
676
  * @type {Source<number> | null}
677
677
  */
678
678
  T(this, De, null);
679
- T(this, An, qi(() => (y(this, De, bt(u(this, dt))), () => {
679
+ T(this, Sn, Wi(() => (y(this, De, bt(u(this, dt))), () => {
680
680
  y(this, De, null);
681
681
  })));
682
- y(this, Q, e), y(this, Se, n), y(this, ft, (i) => {
682
+ y(this, Q, e), y(this, Ae, n), y(this, ft, (i) => {
683
683
  var s = (
684
684
  /** @type {Effect} */
685
685
  E
@@ -693,21 +693,21 @@ class Wi {
693
693
  u(this, Zt)
694
694
  );
695
695
  Cn();
696
- const s = i.data === oo;
697
- if (i.data.startsWith($o)) {
698
- const a = JSON.parse(i.data.slice($o.length));
699
- P(this, x, br).call(this, a);
700
- } else s ? P(this, x, _r).call(this) : P(this, x, mr).call(this);
696
+ const s = i.data === ro;
697
+ if (i.data.startsWith(ko)) {
698
+ const l = JSON.parse(i.data.slice(ko.length));
699
+ P(this, x, _r).call(this, l);
700
+ } else s ? P(this, x, yr).call(this) : P(this, x, br).call(this);
701
701
  } else
702
702
  P(this, x, Yn).call(this);
703
- }, Gi)), R && y(this, Q, k);
703
+ }, Ki)), R && y(this, Q, k);
704
704
  }
705
705
  /**
706
706
  * Defer an effect inside a pending boundary until the boundary resolves
707
707
  * @param {Effect} effect
708
708
  */
709
709
  defer_effect(e) {
710
- dr(e, u(this, Rt), u(this, Ot));
710
+ hr(e, u(this, Rt), u(this, Ot));
711
711
  }
712
712
  /**
713
713
  * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
@@ -717,7 +717,7 @@ class Wi {
717
717
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
718
718
  }
719
719
  has_pending_snippet() {
720
- return !!u(this, Se).pending;
720
+ return !!u(this, Ae).pending;
721
721
  }
722
722
  /**
723
723
  * Update the source that powers `$effect.pending()` inside this boundary,
@@ -731,35 +731,35 @@ class Wi {
731
731
  }));
732
732
  }
733
733
  get_effect_pending() {
734
- return u(this, An).call(this), v(
734
+ return u(this, Sn).call(this), v(
735
735
  /** @type {Source<number>} */
736
736
  u(this, De)
737
737
  );
738
738
  }
739
739
  /** @param {unknown} error */
740
740
  error(e) {
741
- var n = u(this, Se).onerror;
742
- let o = u(this, Se).failed;
741
+ var n = u(this, Ae).onerror;
742
+ let o = u(this, Ae).failed;
743
743
  if (!n && !o)
744
744
  throw e;
745
745
  u(this, Ee) && (q(u(this, Ee)), y(this, Ee, null)), u(this, Z) && (q(u(this, Z)), y(this, Z, null)), u(this, ge) && (q(u(this, ge)), y(this, ge, null)), R && (G(
746
746
  /** @type {TemplateNode} */
747
747
  u(this, Zt)
748
- ), Di(), G(In()));
748
+ ), zi(), G(In()));
749
749
  var r = !1, i = !1;
750
750
  const s = () => {
751
751
  if (r) {
752
- Mi();
752
+ Fi();
753
753
  return;
754
754
  }
755
- r = !0, i && Ni(), u(this, ge) !== null && vt(u(this, ge), () => {
755
+ r = !0, i && Vi(), u(this, ge) !== null && vt(u(this, ge), () => {
756
756
  y(this, ge, null);
757
757
  }), P(this, x, gn).call(this, () => {
758
758
  ze.ensure(), P(this, x, Yn).call(this);
759
759
  });
760
- }, l = (a) => {
760
+ }, a = (l) => {
761
761
  try {
762
- i = !0, n?.(a, s), i = !1;
762
+ i = !0, n?.(l, s), i = !1;
763
763
  } catch (c) {
764
764
  Xe(c, u(this, U) && u(this, U).parent);
765
765
  }
@@ -773,7 +773,7 @@ class Wi {
773
773
  );
774
774
  c.b = this, c.f |= jn, o(
775
775
  u(this, Q),
776
- () => a,
776
+ () => l,
777
777
  () => s
778
778
  );
779
779
  });
@@ -787,23 +787,23 @@ class Wi {
787
787
  }));
788
788
  };
789
789
  pt(() => {
790
- var a;
790
+ var l;
791
791
  try {
792
- a = this.transform_error(e);
792
+ l = this.transform_error(e);
793
793
  } catch (c) {
794
794
  Xe(c, u(this, U) && u(this, U).parent);
795
795
  return;
796
796
  }
797
- a !== null && typeof a == "object" && typeof /** @type {any} */
798
- a.then == "function" ? a.then(
799
- l,
797
+ l !== null && typeof l == "object" && typeof /** @type {any} */
798
+ l.then == "function" ? l.then(
799
+ a,
800
800
  /** @param {unknown} e */
801
801
  (c) => Xe(c, u(this, U) && u(this, U).parent)
802
- ) : l(a);
802
+ ) : a(l);
803
803
  });
804
804
  }
805
805
  }
806
- Q = new WeakMap(), Zt = new WeakMap(), Se = new WeakMap(), ft = new WeakMap(), U = new WeakMap(), Ee = new WeakMap(), Z = new WeakMap(), ge = new WeakMap(), Me = new WeakMap(), dt = new WeakMap(), Ye = new WeakMap(), Ct = new WeakMap(), Rt = new WeakMap(), Ot = new WeakMap(), De = new WeakMap(), An = new WeakMap(), x = new WeakSet(), mr = function() {
806
+ Q = new WeakMap(), Zt = new WeakMap(), Ae = new WeakMap(), ft = new WeakMap(), U = new WeakMap(), Ee = new WeakMap(), Z = new WeakMap(), ge = new WeakMap(), Ne = new WeakMap(), dt = new WeakMap(), Ye = new WeakMap(), Ct = new WeakMap(), Rt = new WeakMap(), Ot = new WeakMap(), De = new WeakMap(), Sn = new WeakMap(), x = new WeakSet(), br = function() {
807
807
  try {
808
808
  y(this, Ee, ie(() => u(this, ft).call(this, u(this, Q))));
809
809
  } catch (e) {
@@ -812,8 +812,8 @@ Q = new WeakMap(), Zt = new WeakMap(), Se = new WeakMap(), ft = new WeakMap(), U
812
812
  }, /**
813
813
  * @param {unknown} error The deserialized error from the server's hydration comment
814
814
  */
815
- br = function(e) {
816
- const n = u(this, Se).failed;
815
+ _r = function(e) {
816
+ const n = u(this, Ae).failed;
817
817
  n && y(this, ge, ie(() => {
818
818
  n(
819
819
  u(this, Q),
@@ -822,11 +822,11 @@ br = function(e) {
822
822
  }
823
823
  );
824
824
  }));
825
- }, _r = function() {
826
- const e = u(this, Se).pending;
825
+ }, yr = function() {
826
+ const e = u(this, Ae).pending;
827
827
  e && (this.is_pending = !0, y(this, Z, ie(() => e(u(this, Q)))), pt(() => {
828
- var n = y(this, Me, document.createDocumentFragment()), o = Te();
829
- n.append(o), y(this, Ee, P(this, x, gn).call(this, () => (ze.ensure(), ie(() => u(this, ft).call(this, o))))), u(this, Ye) === 0 && (u(this, Q).before(n), y(this, Me, null), vt(
828
+ var n = y(this, Ne, document.createDocumentFragment()), o = Te();
829
+ n.append(o), y(this, Ee, P(this, x, gn).call(this, () => (ze.ensure(), ie(() => u(this, ft).call(this, o))))), u(this, Ye) === 0 && (u(this, Q).before(n), y(this, Ne, null), vt(
830
830
  /** @type {Effect} */
831
831
  u(this, Z),
832
832
  () => {
@@ -839,11 +839,11 @@ br = function(e) {
839
839
  if (this.is_pending = this.has_pending_snippet(), y(this, Ye, 0), y(this, dt, 0), y(this, Ee, ie(() => {
840
840
  u(this, ft).call(this, u(this, Q));
841
841
  })), u(this, Ye) > 0) {
842
- var e = y(this, Me, document.createDocumentFragment());
843
- go(u(this, Ee), e);
842
+ var e = y(this, Ne, document.createDocumentFragment());
843
+ mo(u(this, Ee), e);
844
844
  const n = (
845
845
  /** @type {(anchor: Node) => void} */
846
- u(this, Se).pending
846
+ u(this, Ae).pending
847
847
  );
848
848
  y(this, Z, ie(() => n(u(this, Q))));
849
849
  } else
@@ -854,23 +854,23 @@ br = function(e) {
854
854
  }, vn = function() {
855
855
  this.is_pending = !1;
856
856
  for (const e of u(this, Rt))
857
- N(e, F), ke(e);
857
+ M(e, F), ke(e);
858
858
  for (const e of u(this, Ot))
859
- N(e, we), ke(e);
859
+ M(e, we), ke(e);
860
860
  u(this, Rt).clear(), u(this, Ot).clear();
861
861
  }, /**
862
862
  * @template T
863
863
  * @param {() => T} fn
864
864
  */
865
865
  gn = function(e) {
866
- var n = E, o = A, r = ae;
867
- Re(u(this, U)), ue(u(this, U)), Mt(u(this, U).ctx);
866
+ var n = E, o = S, r = ae;
867
+ Re(u(this, U)), ue(u(this, U)), Nt(u(this, U).ctx);
868
868
  try {
869
869
  return e();
870
870
  } catch (i) {
871
- return ur(i), null;
871
+ return fr(i), null;
872
872
  } finally {
873
- Re(n), ue(o), Mt(r);
873
+ Re(n), ue(o), Nt(r);
874
874
  }
875
875
  }, /**
876
876
  * Updates the pending count associated with the currently visible pending snippet,
@@ -885,9 +885,9 @@ Xn = function(e) {
885
885
  }
886
886
  y(this, Ye, u(this, Ye) + e), u(this, Ye) === 0 && (P(this, x, vn).call(this), u(this, Z) && vt(u(this, Z), () => {
887
887
  y(this, Z, null);
888
- }), u(this, Me) && (u(this, Q).before(u(this, Me)), y(this, Me, null)));
888
+ }), u(this, Ne) && (u(this, Q).before(u(this, Ne)), y(this, Ne, null)));
889
889
  };
890
- function Ki(t, e, n, o) {
890
+ function Ji(t, e, n, o) {
891
891
  const r = On;
892
892
  var i = t.filter((d) => !d.settled);
893
893
  if (n.length === 0 && i.length === 0) {
@@ -897,9 +897,9 @@ function Ki(t, e, n, o) {
897
897
  var s = (
898
898
  /** @type {Effect} */
899
899
  E
900
- ), l = Yi(), a = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((d) => d.promise)) : null;
900
+ ), a = Qi(), l = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((d) => d.promise)) : null;
901
901
  function c(d) {
902
- l();
902
+ a();
903
903
  try {
904
904
  o(d);
905
905
  } catch (g) {
@@ -908,24 +908,24 @@ function Ki(t, e, n, o) {
908
908
  Jn();
909
909
  }
910
910
  if (n.length === 0) {
911
- a.then(() => c(e.map(r)));
911
+ l.then(() => c(e.map(r)));
912
912
  return;
913
913
  }
914
914
  function f() {
915
- l(), Promise.all(n.map((d) => /* @__PURE__ */ Ji(d))).then((d) => c([...e.map(r), ...d])).catch((d) => Xe(d, s));
915
+ a(), Promise.all(n.map((d) => /* @__PURE__ */ es(d))).then((d) => c([...e.map(r), ...d])).catch((d) => Xe(d, s));
916
916
  }
917
- a ? a.then(f) : f();
917
+ l ? l.then(f) : f();
918
918
  }
919
- function Yi() {
920
- var t = E, e = A, n = ae, o = L;
919
+ function Qi() {
920
+ var t = E, e = S, n = ae, o = L;
921
921
  return function(i = !0) {
922
- Re(t), ue(e), Mt(n), i && o?.activate();
922
+ Re(t), ue(e), Nt(n), i && o?.activate();
923
923
  };
924
924
  }
925
925
  function Jn(t = !0) {
926
- Re(null), ue(null), Mt(null), t && L?.deactivate();
926
+ Re(null), ue(null), Nt(null), t && L?.deactivate();
927
927
  }
928
- function Xi() {
928
+ function Zi() {
929
929
  var t = (
930
930
  /** @type {Boundary} */
931
931
  /** @type {Effect} */
@@ -940,15 +940,15 @@ function Xi() {
940
940
  }
941
941
  // @__NO_SIDE_EFFECTS__
942
942
  function On(t) {
943
- var e = z | F, n = A !== null && (A.f & z) !== 0 ? (
943
+ var e = z | F, n = S !== null && (S.f & z) !== 0 ? (
944
944
  /** @type {Derived} */
945
- A
945
+ S
946
946
  ) : null;
947
947
  return E !== null && (E.f |= nt), {
948
948
  ctx: ae,
949
949
  deps: null,
950
950
  effects: null,
951
- equals: rr,
951
+ equals: ir,
952
952
  f: e,
953
953
  fn: t,
954
954
  reactions: null,
@@ -963,9 +963,9 @@ function On(t) {
963
963
  };
964
964
  }
965
965
  // @__NO_SIDE_EFFECTS__
966
- function Ji(t, e, n) {
966
+ function es(t, e, n) {
967
967
  /** @type {Effect | null} */
968
- E === null && Si();
968
+ E === null && ki();
969
969
  var r = (
970
970
  /** @type {Promise<V>} */
971
971
  /** @type {unknown} */
@@ -973,43 +973,43 @@ function Ji(t, e, n) {
973
973
  ), i = bt(
974
974
  /** @type {V} */
975
975
  D
976
- ), s = !A, l = /* @__PURE__ */ new Map();
977
- return as(() => {
978
- var a = tr();
979
- r = a.promise;
976
+ ), s = !S, a = /* @__PURE__ */ new Map();
977
+ return fs(() => {
978
+ var l = nr();
979
+ r = l.promise;
980
980
  try {
981
- Promise.resolve(t()).then(a.resolve, a.reject).finally(Jn);
981
+ Promise.resolve(t()).then(l.resolve, l.reject).finally(Jn);
982
982
  } catch (g) {
983
- a.reject(g), Jn();
983
+ l.reject(g), Jn();
984
984
  }
985
985
  var c = (
986
986
  /** @type {Batch} */
987
987
  L
988
988
  );
989
989
  if (s) {
990
- var f = Xi();
991
- l.get(c)?.reject(st), l.delete(c), l.set(c, a);
990
+ var f = Zi();
991
+ a.get(c)?.reject(st), a.delete(c), a.set(c, l);
992
992
  }
993
993
  const d = (g, b = void 0) => {
994
994
  if (c.activate(), b)
995
995
  b !== st && (i.f |= Je, Vt(i, b));
996
996
  else {
997
997
  (i.f & Je) !== 0 && (i.f ^= Je), Vt(i, g);
998
- for (const [h, S] of l) {
999
- if (l.delete(h), h === c) break;
1000
- S.reject(st);
998
+ for (const [h, A] of a) {
999
+ if (a.delete(h), h === c) break;
1000
+ A.reject(st);
1001
1001
  }
1002
1002
  }
1003
1003
  f && f();
1004
1004
  };
1005
- a.promise.then(d, (g) => d(null, g || "unknown"));
1006
- }), is(() => {
1007
- for (const a of l.values())
1008
- a.reject(st);
1009
- }), new Promise((a) => {
1005
+ l.promise.then(d, (g) => d(null, g || "unknown"));
1006
+ }), as(() => {
1007
+ for (const l of a.values())
1008
+ l.reject(st);
1009
+ }), new Promise((l) => {
1010
1010
  function c(f) {
1011
1011
  function d() {
1012
- f === r ? a(i) : c(r);
1012
+ f === r ? l(i) : c(r);
1013
1013
  }
1014
1014
  f.then(d, d);
1015
1015
  }
@@ -1019,14 +1019,14 @@ function Ji(t, e, n) {
1019
1019
  // @__NO_SIDE_EFFECTS__
1020
1020
  function Vn(t) {
1021
1021
  const e = /* @__PURE__ */ On(t);
1022
- return Dr(e), e;
1022
+ return Vr(e), e;
1023
1023
  }
1024
1024
  // @__NO_SIDE_EFFECTS__
1025
- function Qi(t) {
1025
+ function ts(t) {
1026
1026
  const e = /* @__PURE__ */ On(t);
1027
- return e.equals = ir, e;
1027
+ return e.equals = sr, e;
1028
1028
  }
1029
- function Zi(t) {
1029
+ function ns(t) {
1030
1030
  var e = t.effects;
1031
1031
  if (e !== null) {
1032
1032
  t.effects = null;
@@ -1037,7 +1037,7 @@ function Zi(t) {
1037
1037
  );
1038
1038
  }
1039
1039
  }
1040
- function es(t) {
1040
+ function os(t) {
1041
1041
  for (var e = t.parent; e !== null; ) {
1042
1042
  if ((e.f & z) === 0)
1043
1043
  return (e.f & Ce) === 0 ? (
@@ -1048,63 +1048,63 @@ function es(t) {
1048
1048
  }
1049
1049
  return null;
1050
1050
  }
1051
- function ao(t) {
1051
+ function co(t) {
1052
1052
  var e, n = E;
1053
- Re(es(t));
1053
+ Re(os(t));
1054
1054
  try {
1055
- t.f &= ~mt, Zi(t), e = Hr(t);
1055
+ t.f &= ~mt, ns(t), e = Br(t);
1056
1056
  } finally {
1057
1057
  Re(n);
1058
1058
  }
1059
1059
  return e;
1060
1060
  }
1061
- function yr(t) {
1062
- var e = ao(t);
1063
- if (!t.equals(e) && (t.wv = Fr(), (!L?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
1064
- N(t, V);
1061
+ function wr(t) {
1062
+ var e = co(t);
1063
+ if (!t.equals(e) && (t.wv = zr(), (!L?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
1064
+ M(t, V);
1065
1065
  return;
1066
1066
  }
1067
- Ze || (be !== null ? (fo() || L?.is_fork) && be.set(t, e) : lo(t));
1067
+ Ze || (be !== null ? (ho() || L?.is_fork) && be.set(t, e) : ao(t));
1068
1068
  }
1069
- function ts(t) {
1069
+ function rs(t) {
1070
1070
  if (t.effects !== null)
1071
1071
  for (const e of t.effects)
1072
- (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(st), e.teardown = _i, e.ac = null, Qt(e, 0), po(e));
1072
+ (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(st), e.teardown = Ti, e.ac = null, Qt(e, 0), vo(e));
1073
1073
  }
1074
- function wr(t) {
1074
+ function Tr(t) {
1075
1075
  if (t.effects !== null)
1076
1076
  for (const e of t.effects)
1077
1077
  e.teardown && Ft(e);
1078
1078
  }
1079
1079
  let Qn = /* @__PURE__ */ new Set();
1080
1080
  const Qe = /* @__PURE__ */ new Map();
1081
- let Tr = !1;
1081
+ let Ir = !1;
1082
1082
  function bt(t, e) {
1083
1083
  var n = {
1084
1084
  f: 0,
1085
1085
  // TODO ideally we could skip this altogether, but it causes type errors
1086
1086
  v: t,
1087
1087
  reactions: null,
1088
- equals: rr,
1088
+ equals: ir,
1089
1089
  rv: 0,
1090
1090
  wv: 0
1091
1091
  };
1092
1092
  return n;
1093
1093
  }
1094
1094
  // @__NO_SIDE_EFFECTS__
1095
- function M(t, e) {
1095
+ function N(t, e) {
1096
1096
  const n = bt(t);
1097
- return Dr(n), n;
1097
+ return Vr(n), n;
1098
1098
  }
1099
1099
  // @__NO_SIDE_EFFECTS__
1100
- function Ir(t, e = !1, n = !0) {
1100
+ function Sr(t, e = !1, n = !0) {
1101
1101
  const o = bt(t);
1102
- return e || (o.equals = ir), o;
1102
+ return e || (o.equals = sr), o;
1103
1103
  }
1104
1104
  function $(t, e, n = !1) {
1105
- A !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1105
+ S !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1106
1106
  // to ensure we error if state is set inside an inspect effect
1107
- (!ye || (A.f & Co) !== 0) && ar() && (A.f & (z | et | so | Co)) !== 0 && (le === null || !Pt.call(le, t)) && xi();
1107
+ (!ye || (S.f & Ro) !== 0) && cr() && (S.f & (z | et | lo | Ro)) !== 0 && (le === null || !Pt.call(le, t)) && Di();
1108
1108
  let o = n ? Tt(e) : e;
1109
1109
  return Vt(t, o);
1110
1110
  }
@@ -1118,16 +1118,16 @@ function Vt(t, e) {
1118
1118
  /** @type {Derived} */
1119
1119
  t
1120
1120
  );
1121
- (t.f & F) !== 0 && ao(r), lo(r);
1121
+ (t.f & F) !== 0 && co(r), ao(r);
1122
1122
  }
1123
- t.wv = Fr(), Ar(t, F), E !== null && (E.f & V) !== 0 && (E.f & (Ie | tt)) === 0 && (oe === null ? fs([t]) : oe.push(t)), !o.is_fork && Qn.size > 0 && !Tr && ns();
1123
+ t.wv = zr(), Ar(t, F), E !== null && (E.f & V) !== 0 && (E.f & (Ie | tt)) === 0 && (oe === null ? ps([t]) : oe.push(t)), !o.is_fork && Qn.size > 0 && !Ir && is();
1124
1124
  }
1125
1125
  return e;
1126
1126
  }
1127
- function ns() {
1128
- Tr = !1;
1127
+ function is() {
1128
+ Ir = !1;
1129
1129
  for (const t of Qn)
1130
- (t.f & V) !== 0 && N(t, we), nn(t) && Ft(t);
1130
+ (t.f & V) !== 0 && M(t, we), nn(t) && Ft(t);
1131
1131
  Qn.clear();
1132
1132
  }
1133
1133
  function Jt(t) {
@@ -1137,14 +1137,14 @@ function Ar(t, e) {
1137
1137
  var n = t.reactions;
1138
1138
  if (n !== null)
1139
1139
  for (var o = n.length, r = 0; r < o; r++) {
1140
- var i = n[r], s = i.f, l = (s & F) === 0;
1141
- if (l && N(i, e), (s & z) !== 0) {
1142
- var a = (
1140
+ var i = n[r], s = i.f, a = (s & F) === 0;
1141
+ if (a && M(i, e), (s & z) !== 0) {
1142
+ var l = (
1143
1143
  /** @type {Derived} */
1144
1144
  i
1145
1145
  );
1146
- be?.delete(a), (s & mt) === 0 && (s & se && (i.f |= mt), Ar(a, we));
1147
- } else l && ((s & et) !== 0 && Ne !== null && Ne.add(
1146
+ be?.delete(l), (s & mt) === 0 && (s & se && (i.f |= mt), Ar(l, we));
1147
+ } else a && ((s & et) !== 0 && Me !== null && Me.add(
1148
1148
  /** @type {Effect} */
1149
1149
  i
1150
1150
  ), ke(
@@ -1156,63 +1156,63 @@ function Ar(t, e) {
1156
1156
  function Tt(t) {
1157
1157
  if (typeof t != "object" || t === null || hn in t)
1158
1158
  return t;
1159
- const e = er(t);
1160
- if (e !== mi && e !== bi)
1159
+ const e = tr(t);
1160
+ if (e !== yi && e !== wi)
1161
1161
  return t;
1162
- var n = /* @__PURE__ */ new Map(), o = Zo(t), r = /* @__PURE__ */ M(0), i = gt, s = (l) => {
1162
+ var n = /* @__PURE__ */ new Map(), o = er(t), r = /* @__PURE__ */ N(0), i = gt, s = (a) => {
1163
1163
  if (gt === i)
1164
- return l();
1165
- var a = A, c = gt;
1166
- ue(null), xo(i);
1167
- var f = l();
1168
- return ue(a), xo(c), f;
1164
+ return a();
1165
+ var l = S, c = gt;
1166
+ ue(null), Mo(i);
1167
+ var f = a();
1168
+ return ue(l), Mo(c), f;
1169
1169
  };
1170
- return o && n.set("length", /* @__PURE__ */ M(
1170
+ return o && n.set("length", /* @__PURE__ */ N(
1171
1171
  /** @type {any[]} */
1172
1172
  t.length
1173
1173
  )), new Proxy(
1174
1174
  /** @type {any} */
1175
1175
  t,
1176
1176
  {
1177
- defineProperty(l, a, c) {
1178
- (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Li();
1179
- var f = n.get(a);
1177
+ defineProperty(a, l, c) {
1178
+ (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Mi();
1179
+ var f = n.get(l);
1180
1180
  return f === void 0 ? s(() => {
1181
- var d = /* @__PURE__ */ M(c.value);
1182
- return n.set(a, d), d;
1181
+ var d = /* @__PURE__ */ N(c.value);
1182
+ return n.set(l, d), d;
1183
1183
  }) : $(f, c.value, !0), !0;
1184
1184
  },
1185
- deleteProperty(l, a) {
1186
- var c = n.get(a);
1185
+ deleteProperty(a, l) {
1186
+ var c = n.get(l);
1187
1187
  if (c === void 0) {
1188
- if (a in l) {
1189
- const f = s(() => /* @__PURE__ */ M(D));
1190
- n.set(a, f), Jt(r);
1188
+ if (l in a) {
1189
+ const f = s(() => /* @__PURE__ */ N(D));
1190
+ n.set(l, f), Jt(r);
1191
1191
  }
1192
1192
  } else
1193
1193
  $(c, D), Jt(r);
1194
1194
  return !0;
1195
1195
  },
1196
- get(l, a, c) {
1197
- if (a === hn)
1196
+ get(a, l, c) {
1197
+ if (l === hn)
1198
1198
  return t;
1199
- var f = n.get(a), d = a in l;
1200
- if (f === void 0 && (!d || It(l, a)?.writable) && (f = s(() => {
1201
- var b = Tt(d ? l[a] : D), h = /* @__PURE__ */ M(b);
1199
+ var f = n.get(l), d = l in a;
1200
+ if (f === void 0 && (!d || It(a, l)?.writable) && (f = s(() => {
1201
+ var b = Tt(d ? a[l] : D), h = /* @__PURE__ */ N(b);
1202
1202
  return h;
1203
- }), n.set(a, f)), f !== void 0) {
1203
+ }), n.set(l, f)), f !== void 0) {
1204
1204
  var g = v(f);
1205
1205
  return g === D ? void 0 : g;
1206
1206
  }
1207
- return Reflect.get(l, a, c);
1207
+ return Reflect.get(a, l, c);
1208
1208
  },
1209
- getOwnPropertyDescriptor(l, a) {
1210
- var c = Reflect.getOwnPropertyDescriptor(l, a);
1209
+ getOwnPropertyDescriptor(a, l) {
1210
+ var c = Reflect.getOwnPropertyDescriptor(a, l);
1211
1211
  if (c && "value" in c) {
1212
- var f = n.get(a);
1212
+ var f = n.get(l);
1213
1213
  f && (c.value = v(f));
1214
1214
  } else if (c === void 0) {
1215
- var d = n.get(a), g = d?.v;
1215
+ var d = n.get(l), g = d?.v;
1216
1216
  if (d !== void 0 && g !== D)
1217
1217
  return {
1218
1218
  enumerable: !0,
@@ -1223,71 +1223,71 @@ function Tt(t) {
1223
1223
  }
1224
1224
  return c;
1225
1225
  },
1226
- has(l, a) {
1227
- if (a === hn)
1226
+ has(a, l) {
1227
+ if (l === hn)
1228
1228
  return !0;
1229
- var c = n.get(a), f = c !== void 0 && c.v !== D || Reflect.has(l, a);
1230
- if (c !== void 0 || E !== null && (!f || It(l, a)?.writable)) {
1229
+ var c = n.get(l), f = c !== void 0 && c.v !== D || Reflect.has(a, l);
1230
+ if (c !== void 0 || E !== null && (!f || It(a, l)?.writable)) {
1231
1231
  c === void 0 && (c = s(() => {
1232
- var g = f ? Tt(l[a]) : D, b = /* @__PURE__ */ M(g);
1232
+ var g = f ? Tt(a[l]) : D, b = /* @__PURE__ */ N(g);
1233
1233
  return b;
1234
- }), n.set(a, c));
1234
+ }), n.set(l, c));
1235
1235
  var d = v(c);
1236
1236
  if (d === D)
1237
1237
  return !1;
1238
1238
  }
1239
1239
  return f;
1240
1240
  },
1241
- set(l, a, c, f) {
1242
- var d = n.get(a), g = a in l;
1243
- if (o && a === "length")
1241
+ set(a, l, c, f) {
1242
+ var d = n.get(l), g = l in a;
1243
+ if (o && l === "length")
1244
1244
  for (var b = c; b < /** @type {Source<number>} */
1245
1245
  d.v; b += 1) {
1246
1246
  var h = n.get(b + "");
1247
- h !== void 0 ? $(h, D) : b in l && (h = s(() => /* @__PURE__ */ M(D)), n.set(b + "", h));
1247
+ h !== void 0 ? $(h, D) : b in a && (h = s(() => /* @__PURE__ */ N(D)), n.set(b + "", h));
1248
1248
  }
1249
1249
  if (d === void 0)
1250
- (!g || It(l, a)?.writable) && (d = s(() => /* @__PURE__ */ M(void 0)), $(d, Tt(c)), n.set(a, d));
1250
+ (!g || It(a, l)?.writable) && (d = s(() => /* @__PURE__ */ N(void 0)), $(d, Tt(c)), n.set(l, d));
1251
1251
  else {
1252
1252
  g = d.v !== D;
1253
- var S = s(() => Tt(c));
1254
- $(d, S);
1253
+ var A = s(() => Tt(c));
1254
+ $(d, A);
1255
1255
  }
1256
- var w = Reflect.getOwnPropertyDescriptor(l, a);
1256
+ var w = Reflect.getOwnPropertyDescriptor(a, l);
1257
1257
  if (w?.set && w.set.call(f, c), !g) {
1258
- if (o && typeof a == "string") {
1258
+ if (o && typeof l == "string") {
1259
1259
  var I = (
1260
1260
  /** @type {Source<number>} */
1261
1261
  n.get("length")
1262
- ), O = Number(a);
1262
+ ), O = Number(l);
1263
1263
  Number.isInteger(O) && O >= I.v && $(I, O + 1);
1264
1264
  }
1265
1265
  Jt(r);
1266
1266
  }
1267
1267
  return !0;
1268
1268
  },
1269
- ownKeys(l) {
1269
+ ownKeys(a) {
1270
1270
  v(r);
1271
- var a = Reflect.ownKeys(l).filter((d) => {
1271
+ var l = Reflect.ownKeys(a).filter((d) => {
1272
1272
  var g = n.get(d);
1273
1273
  return g === void 0 || g.v !== D;
1274
1274
  });
1275
1275
  for (var [c, f] of n)
1276
- f.v !== D && !(c in l) && a.push(c);
1277
- return a;
1276
+ f.v !== D && !(c in a) && l.push(c);
1277
+ return l;
1278
1278
  },
1279
1279
  setPrototypeOf() {
1280
- Pi();
1280
+ Ni();
1281
1281
  }
1282
1282
  }
1283
1283
  );
1284
1284
  }
1285
- var Oo, Sr, Er, $r;
1285
+ var Lo, Er, $r, kr;
1286
1286
  function Zn() {
1287
- if (Oo === void 0) {
1288
- Oo = window, Sr = /Firefox/.test(navigator.userAgent);
1287
+ if (Lo === void 0) {
1288
+ Lo = window, Er = /Firefox/.test(navigator.userAgent);
1289
1289
  var t = Element.prototype, e = Node.prototype, n = Text.prototype;
1290
- Er = It(e, "firstChild").get, $r = It(e, "nextSibling").get, ko(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), ko(n) && (n.__t = void 0);
1290
+ $r = It(e, "firstChild").get, kr = It(e, "nextSibling").get, Co(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Co(n) && (n.__t = void 0);
1291
1291
  }
1292
1292
  }
1293
1293
  function Te(t = "") {
@@ -1297,14 +1297,14 @@ function Te(t = "") {
1297
1297
  function _t(t) {
1298
1298
  return (
1299
1299
  /** @type {TemplateNode | null} */
1300
- Er.call(t)
1300
+ $r.call(t)
1301
1301
  );
1302
1302
  }
1303
1303
  // @__NO_SIDE_EFFECTS__
1304
1304
  function ce(t) {
1305
1305
  return (
1306
1306
  /** @type {TemplateNode | null} */
1307
- $r.call(t)
1307
+ kr.call(t)
1308
1308
  );
1309
1309
  }
1310
1310
  function un(t, e) {
@@ -1317,7 +1317,7 @@ function un(t, e) {
1317
1317
  var o = Te();
1318
1318
  return n?.before(o), G(o), o;
1319
1319
  }
1320
- return e && uo(
1320
+ return e && fo(
1321
1321
  /** @type {Text} */
1322
1322
  n
1323
1323
  ), G(n), n;
@@ -1332,7 +1332,7 @@ function Fn(t, e = !1) {
1332
1332
  var o = Te();
1333
1333
  return k?.before(o), G(o), o;
1334
1334
  }
1335
- uo(
1335
+ fo(
1336
1336
  /** @type {Text} */
1337
1337
  k
1338
1338
  );
@@ -1351,26 +1351,26 @@ function qe(t, e = 1, n = !1) {
1351
1351
  var i = Te();
1352
1352
  return o === null ? r?.after(i) : o.before(i), G(i), i;
1353
1353
  }
1354
- uo(
1354
+ fo(
1355
1355
  /** @type {Text} */
1356
1356
  o
1357
1357
  );
1358
1358
  }
1359
1359
  return G(o), o;
1360
1360
  }
1361
- function kr(t) {
1361
+ function Cr(t) {
1362
1362
  t.textContent = "";
1363
1363
  }
1364
- function Cr() {
1364
+ function Rr() {
1365
1365
  return !1;
1366
1366
  }
1367
- function co(t, e, n) {
1367
+ function uo(t, e, n) {
1368
1368
  return (
1369
1369
  /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
1370
- document.createElementNS(Qo, t, void 0)
1370
+ document.createElementNS(Zo, t, void 0)
1371
1371
  );
1372
1372
  }
1373
- function uo(t) {
1373
+ function fo(t) {
1374
1374
  if (
1375
1375
  /** @type {string} */
1376
1376
  t.nodeValue.length < 65536
@@ -1381,8 +1381,8 @@ function uo(t) {
1381
1381
  e.remove(), t.nodeValue += /** @type {string} */
1382
1382
  e.nodeValue, e = t.nextSibling;
1383
1383
  }
1384
- function Rr(t) {
1385
- var e = A, n = E;
1384
+ function Or(t) {
1385
+ var e = S, n = E;
1386
1386
  ue(null), Re(null);
1387
1387
  try {
1388
1388
  return t();
@@ -1390,10 +1390,10 @@ function Rr(t) {
1390
1390
  ue(e), Re(n);
1391
1391
  }
1392
1392
  }
1393
- function os(t) {
1394
- E === null && (A === null && Ci(), ki()), Ze && $i();
1393
+ function ss(t) {
1394
+ E === null && (S === null && Li(), Oi()), Ze && Ri();
1395
1395
  }
1396
- function rs(t, e) {
1396
+ function ls(t, e) {
1397
1397
  var n = e.last;
1398
1398
  n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
1399
1399
  }
@@ -1425,30 +1425,30 @@ function Oe(t, e) {
1425
1425
  throw q(o), s;
1426
1426
  }
1427
1427
  r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
1428
- (r.f & nt) === 0 && (r = r.first, (t & et) !== 0 && (t & Nt) !== 0 && r !== null && (r.f |= Nt));
1428
+ (r.f & nt) === 0 && (r = r.first, (t & et) !== 0 && (t & Mt) !== 0 && r !== null && (r.f |= Mt));
1429
1429
  }
1430
- if (r !== null && (r.parent = n, n !== null && rs(r, n), A !== null && (A.f & z) !== 0 && (t & tt) === 0)) {
1430
+ if (r !== null && (r.parent = n, n !== null && ls(r, n), S !== null && (S.f & z) !== 0 && (t & tt) === 0)) {
1431
1431
  var i = (
1432
1432
  /** @type {Derived} */
1433
- A
1433
+ S
1434
1434
  );
1435
1435
  (i.effects ?? (i.effects = [])).push(r);
1436
1436
  }
1437
1437
  return o;
1438
1438
  }
1439
- function fo() {
1440
- return A !== null && !ye;
1439
+ function ho() {
1440
+ return S !== null && !ye;
1441
1441
  }
1442
- function is(t) {
1442
+ function as(t) {
1443
1443
  const e = Oe(xt, null);
1444
- return N(e, V), e.teardown = t, e;
1444
+ return M(e, V), e.teardown = t, e;
1445
1445
  }
1446
- function Lo(t) {
1447
- os();
1446
+ function Po(t) {
1447
+ ss();
1448
1448
  var e = (
1449
1449
  /** @type {Effect} */
1450
1450
  E.f
1451
- ), n = !A && (e & Ie) !== 0 && (e & yt) === 0;
1451
+ ), n = !S && (e & Ie) !== 0 && (e & yt) === 0;
1452
1452
  if (n) {
1453
1453
  var o = (
1454
1454
  /** @type {ComponentContext} */
@@ -1456,19 +1456,19 @@ function Lo(t) {
1456
1456
  );
1457
1457
  (o.e ?? (o.e = [])).push(t);
1458
1458
  } else
1459
- return Or(t);
1459
+ return Lr(t);
1460
1460
  }
1461
- function Or(t) {
1462
- return Oe(zt | wi, t);
1461
+ function Lr(t) {
1462
+ return Oe(zt | Si, t);
1463
1463
  }
1464
- function ss(t) {
1464
+ function cs(t) {
1465
1465
  ze.ensure();
1466
1466
  const e = Oe(tt | nt, t);
1467
1467
  return () => {
1468
1468
  q(e);
1469
1469
  };
1470
1470
  }
1471
- function ls(t) {
1471
+ function us(t) {
1472
1472
  ze.ensure();
1473
1473
  const e = Oe(tt | nt, t);
1474
1474
  return (n = {}) => new Promise((o) => {
@@ -1477,17 +1477,17 @@ function ls(t) {
1477
1477
  }) : (q(e), o(void 0));
1478
1478
  });
1479
1479
  }
1480
- function Lr(t) {
1480
+ function Pr(t) {
1481
1481
  return Oe(zt, t);
1482
1482
  }
1483
- function as(t) {
1484
- return Oe(so | nt, t);
1483
+ function fs(t) {
1484
+ return Oe(lo | nt, t);
1485
1485
  }
1486
- function ho(t, e = 0) {
1486
+ function po(t, e = 0) {
1487
1487
  return Oe(xt | e, t);
1488
1488
  }
1489
1489
  function fn(t, e = [], n = [], o = []) {
1490
- Ki(o, e, n, (r) => {
1490
+ Ji(o, e, n, (r) => {
1491
1491
  Oe(xt, () => t(...r.map(v)));
1492
1492
  });
1493
1493
  }
@@ -1498,30 +1498,30 @@ function Ln(t, e = 0) {
1498
1498
  function ie(t) {
1499
1499
  return Oe(Ie | nt, t);
1500
1500
  }
1501
- function Pr(t) {
1501
+ function xr(t) {
1502
1502
  var e = t.teardown;
1503
1503
  if (e !== null) {
1504
- const n = Ze, o = A;
1505
- Po(!0), ue(null);
1504
+ const n = Ze, o = S;
1505
+ xo(!0), ue(null);
1506
1506
  try {
1507
1507
  e.call(null);
1508
1508
  } finally {
1509
- Po(n), ue(o);
1509
+ xo(n), ue(o);
1510
1510
  }
1511
1511
  }
1512
1512
  }
1513
- function po(t, e = !1) {
1513
+ function vo(t, e = !1) {
1514
1514
  var n = t.first;
1515
1515
  for (t.first = t.last = null; n !== null; ) {
1516
1516
  const r = n.ac;
1517
- r !== null && Rr(() => {
1517
+ r !== null && Or(() => {
1518
1518
  r.abort(st);
1519
1519
  });
1520
1520
  var o = n.next;
1521
1521
  (n.f & tt) !== 0 ? n.parent = null : q(n, e), n = o;
1522
1522
  }
1523
1523
  }
1524
- function cs(t) {
1524
+ function ds(t) {
1525
1525
  for (var e = t.first; e !== null; ) {
1526
1526
  var n = e.next;
1527
1527
  (e.f & Ie) === 0 && q(e), e = n;
@@ -1529,26 +1529,26 @@ function cs(t) {
1529
1529
  }
1530
1530
  function q(t, e = !0) {
1531
1531
  var n = !1;
1532
- (e || (t.f & nr) !== 0) && t.nodes !== null && t.nodes.end !== null && (us(
1532
+ (e || (t.f & or) !== 0) && t.nodes !== null && t.nodes.end !== null && (hs(
1533
1533
  t.nodes.start,
1534
1534
  /** @type {TemplateNode} */
1535
1535
  t.nodes.end
1536
- ), n = !0), po(t, e && !n), Qt(t, 0), N(t, Ce);
1536
+ ), n = !0), vo(t, e && !n), Qt(t, 0), M(t, Ce);
1537
1537
  var o = t.nodes && t.nodes.t;
1538
1538
  if (o !== null)
1539
1539
  for (const i of o)
1540
1540
  i.stop();
1541
- Pr(t);
1541
+ xr(t);
1542
1542
  var r = t.parent;
1543
- r !== null && r.first !== null && xr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
1543
+ r !== null && r.first !== null && Mr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
1544
1544
  }
1545
- function us(t, e) {
1545
+ function hs(t, e) {
1546
1546
  for (; t !== null; ) {
1547
1547
  var n = t === e ? null : /* @__PURE__ */ ce(t);
1548
1548
  t.remove(), t = n;
1549
1549
  }
1550
1550
  }
1551
- function xr(t) {
1551
+ function Mr(t) {
1552
1552
  var e = t.parent, n = t.prev, o = t.next;
1553
1553
  n !== null && (n.next = o), o !== null && (o.prev = n), e !== null && (e.first === t && (e.first = o), e.last === t && (e.last = n));
1554
1554
  }
@@ -1560,8 +1560,8 @@ function vt(t, e, n = !0) {
1560
1560
  }, i = o.length;
1561
1561
  if (i > 0) {
1562
1562
  var s = () => --i || r();
1563
- for (var l of o)
1564
- l.out(s);
1563
+ for (var a of o)
1564
+ a.out(s);
1565
1565
  } else
1566
1566
  r();
1567
1567
  }
@@ -1570,10 +1570,10 @@ function Nr(t, e, n) {
1570
1570
  t.f ^= j;
1571
1571
  var o = t.nodes && t.nodes.t;
1572
1572
  if (o !== null)
1573
- for (const l of o)
1574
- (l.is_global || n) && e.push(l);
1573
+ for (const a of o)
1574
+ (a.is_global || n) && e.push(a);
1575
1575
  for (var r = t.first; r !== null; ) {
1576
- var i = r.next, s = (r.f & Nt) !== 0 || // If this is a branch effect without a block effect parent,
1576
+ var i = r.next, s = (r.f & Mt) !== 0 || // If this is a branch effect without a block effect parent,
1577
1577
  // it means the parent block effect was pruned. In that case,
1578
1578
  // transparency information was transferred to the branch effect.
1579
1579
  (r.f & Ie) !== 0 && (t.f & et) !== 0;
@@ -1581,15 +1581,15 @@ function Nr(t, e, n) {
1581
1581
  }
1582
1582
  }
1583
1583
  }
1584
- function vo(t) {
1585
- Mr(t, !0);
1584
+ function go(t) {
1585
+ Dr(t, !0);
1586
1586
  }
1587
- function Mr(t, e) {
1587
+ function Dr(t, e) {
1588
1588
  if ((t.f & j) !== 0) {
1589
1589
  t.f ^= j;
1590
1590
  for (var n = t.first; n !== null; ) {
1591
- var o = n.next, r = (n.f & Nt) !== 0 || (n.f & Ie) !== 0;
1592
- Mr(n, r ? e : !1), n = o;
1591
+ var o = n.next, r = (n.f & Mt) !== 0 || (n.f & Ie) !== 0;
1592
+ Dr(n, r ? e : !1), n = o;
1593
1593
  }
1594
1594
  var i = t.nodes && t.nodes.t;
1595
1595
  if (i !== null)
@@ -1597,7 +1597,7 @@ function Mr(t, e) {
1597
1597
  (s.is_global || e) && s.in();
1598
1598
  }
1599
1599
  }
1600
- function go(t, e) {
1600
+ function mo(t, e) {
1601
1601
  if (t.nodes)
1602
1602
  for (var n = t.nodes.start, o = t.nodes.end; n !== null; ) {
1603
1603
  var r = n === o ? null : /* @__PURE__ */ ce(n);
@@ -1605,31 +1605,31 @@ function go(t, e) {
1605
1605
  }
1606
1606
  }
1607
1607
  let mn = !1, Ze = !1;
1608
- function Po(t) {
1608
+ function xo(t) {
1609
1609
  Ze = t;
1610
1610
  }
1611
- let A = null, ye = !1;
1611
+ let S = null, ye = !1;
1612
1612
  function ue(t) {
1613
- A = t;
1613
+ S = t;
1614
1614
  }
1615
1615
  let E = null;
1616
1616
  function Re(t) {
1617
1617
  E = t;
1618
1618
  }
1619
1619
  let le = null;
1620
- function Dr(t) {
1621
- A !== null && (le === null ? le = [t] : le.push(t));
1620
+ function Vr(t) {
1621
+ S !== null && (le === null ? le = [t] : le.push(t));
1622
1622
  }
1623
1623
  let K = null, J = 0, oe = null;
1624
- function fs(t) {
1624
+ function ps(t) {
1625
1625
  oe = t;
1626
1626
  }
1627
- let Vr = 1, at = 0, gt = at;
1628
- function xo(t) {
1627
+ let Fr = 1, at = 0, gt = at;
1628
+ function Mo(t) {
1629
1629
  gt = t;
1630
1630
  }
1631
- function Fr() {
1632
- return ++Vr;
1631
+ function zr() {
1632
+ return ++Fr;
1633
1633
  }
1634
1634
  function nn(t) {
1635
1635
  var e = t.f;
@@ -1644,7 +1644,7 @@ function nn(t) {
1644
1644
  if (nn(
1645
1645
  /** @type {Derived} */
1646
1646
  i
1647
- ) && yr(
1647
+ ) && wr(
1648
1648
  /** @type {Derived} */
1649
1649
  i
1650
1650
  ), i.wv > t.wv)
@@ -1652,31 +1652,31 @@ function nn(t) {
1652
1652
  }
1653
1653
  (e & se) !== 0 && // During time traveling we don't want to reset the status so that
1654
1654
  // traversal of the graph in the other batches still happens
1655
- be === null && N(t, V);
1655
+ be === null && M(t, V);
1656
1656
  }
1657
1657
  return !1;
1658
1658
  }
1659
- function zr(t, e, n = !0) {
1659
+ function Hr(t, e, n = !0) {
1660
1660
  var o = t.reactions;
1661
1661
  if (o !== null && !(le !== null && Pt.call(le, t)))
1662
1662
  for (var r = 0; r < o.length; r++) {
1663
1663
  var i = o[r];
1664
- (i.f & z) !== 0 ? zr(
1664
+ (i.f & z) !== 0 ? Hr(
1665
1665
  /** @type {Derived} */
1666
1666
  i,
1667
1667
  e,
1668
1668
  !1
1669
- ) : e === i && (n ? N(i, F) : (i.f & V) !== 0 && N(i, we), ke(
1669
+ ) : e === i && (n ? M(i, F) : (i.f & V) !== 0 && M(i, we), ke(
1670
1670
  /** @type {Effect} */
1671
1671
  i
1672
1672
  ));
1673
1673
  }
1674
1674
  }
1675
- function Hr(t) {
1676
- var S;
1677
- var e = K, n = J, o = oe, r = A, i = le, s = ae, l = ye, a = gt, c = t.f;
1675
+ function Br(t) {
1676
+ var A;
1677
+ var e = K, n = J, o = oe, r = S, i = le, s = ae, a = ye, l = gt, c = t.f;
1678
1678
  K = /** @type {null | Value[]} */
1679
- null, J = 0, oe = null, A = (c & (Ie | tt)) === 0 ? t : null, le = null, Mt(t.ctx), ye = !1, gt = ++at, t.ac !== null && (Rr(() => {
1679
+ null, J = 0, oe = null, S = (c & (Ie | tt)) === 0 ? t : null, le = null, Nt(t.ctx), ye = !1, gt = ++at, t.ac !== null && (Or(() => {
1680
1680
  t.ac.abort(st);
1681
1681
  }), t.ac = null);
1682
1682
  try {
@@ -1694,14 +1694,14 @@ function Hr(t) {
1694
1694
  g[J + h] = K[h];
1695
1695
  else
1696
1696
  t.deps = g = K;
1697
- if (fo() && (t.f & se) !== 0)
1697
+ if (ho() && (t.f & se) !== 0)
1698
1698
  for (h = J; h < g.length; h++)
1699
- ((S = g[h]).reactions ?? (S.reactions = [])).push(t);
1699
+ ((A = g[h]).reactions ?? (A.reactions = [])).push(t);
1700
1700
  } else !b && g !== null && J < g.length && (Qt(t, J), g.length = J);
1701
- if (ar() && oe !== null && !ye && g !== null && (t.f & (z | we | F)) === 0)
1701
+ if (cr() && oe !== null && !ye && g !== null && (t.f & (z | we | F)) === 0)
1702
1702
  for (h = 0; h < /** @type {Source[]} */
1703
1703
  oe.length; h++)
1704
- zr(
1704
+ Hr(
1705
1705
  oe[h],
1706
1706
  /** @type {Effect} */
1707
1707
  t
@@ -1718,15 +1718,15 @@ function Hr(t) {
1718
1718
  }
1719
1719
  return (t.f & Je) !== 0 && (t.f ^= Je), d;
1720
1720
  } catch (w) {
1721
- return ur(w);
1721
+ return fr(w);
1722
1722
  } finally {
1723
- t.f ^= qn, K = e, J = n, oe = o, A = r, le = i, Mt(s), ye = l, gt = a;
1723
+ t.f ^= qn, K = e, J = n, oe = o, S = r, le = i, Nt(s), ye = a, gt = l;
1724
1724
  }
1725
1725
  }
1726
- function ds(t, e) {
1726
+ function vs(t, e) {
1727
1727
  let n = e.reactions;
1728
1728
  if (n !== null) {
1729
- var o = vi.call(n, t);
1729
+ var o = bi.call(n, t);
1730
1730
  if (o !== -1) {
1731
1731
  var r = n.length - 1;
1732
1732
  r === 0 ? n = e.reactions = null : (n[o] = n[r], n.pop());
@@ -1740,27 +1740,27 @@ function ds(t, e) {
1740
1740
  /** @type {Derived} */
1741
1741
  e
1742
1742
  );
1743
- (i.f & se) !== 0 && (i.f ^= se, i.f &= ~mt), lo(i), ts(i), Qt(i, 0);
1743
+ (i.f & se) !== 0 && (i.f ^= se, i.f &= ~mt), ao(i), rs(i), Qt(i, 0);
1744
1744
  }
1745
1745
  }
1746
1746
  function Qt(t, e) {
1747
1747
  var n = t.deps;
1748
1748
  if (n !== null)
1749
1749
  for (var o = e; o < n.length; o++)
1750
- ds(t, n[o]);
1750
+ vs(t, n[o]);
1751
1751
  }
1752
1752
  function Ft(t) {
1753
1753
  var e = t.f;
1754
1754
  if ((e & Ce) === 0) {
1755
- N(t, V);
1755
+ M(t, V);
1756
1756
  var n = E, o = mn;
1757
1757
  E = t, mn = !0;
1758
1758
  try {
1759
- (e & (et | io)) !== 0 ? cs(t) : po(t), Pr(t);
1760
- var r = Hr(t);
1761
- t.teardown = typeof r == "function" ? r : null, t.wv = Vr;
1759
+ (e & (et | so)) !== 0 ? ds(t) : vo(t), xr(t);
1760
+ var r = Br(t);
1761
+ t.teardown = typeof r == "function" ? r : null, t.wv = Fr;
1762
1762
  var i;
1763
- Bn && Fi && (t.f & F) !== 0 && t.deps;
1763
+ Bn && Bi && (t.f & F) !== 0 && t.deps;
1764
1764
  } finally {
1765
1765
  mn = o, E = n;
1766
1766
  }
@@ -1768,16 +1768,16 @@ function Ft(t) {
1768
1768
  }
1769
1769
  function v(t) {
1770
1770
  var e = t.f, n = (e & z) !== 0;
1771
- if (A !== null && !ye) {
1771
+ if (S !== null && !ye) {
1772
1772
  var o = E !== null && (E.f & Ce) !== 0;
1773
1773
  if (!o && (le === null || !Pt.call(le, t))) {
1774
- var r = A.deps;
1775
- if ((A.f & qn) !== 0)
1774
+ var r = S.deps;
1775
+ if ((S.f & qn) !== 0)
1776
1776
  t.rv < at && (t.rv = at, K === null && r !== null && r[J] === t ? J++ : K === null ? K = [t] : K.push(t));
1777
1777
  else {
1778
- (A.deps ?? (A.deps = [])).push(t);
1778
+ (S.deps ?? (S.deps = [])).push(t);
1779
1779
  var i = t.reactions;
1780
- i === null ? t.reactions = [A] : Pt.call(i, A) || i.push(A);
1780
+ i === null ? t.reactions = [S] : Pt.call(i, S) || i.push(S);
1781
1781
  }
1782
1782
  }
1783
1783
  }
@@ -1789,11 +1789,11 @@ function v(t) {
1789
1789
  t
1790
1790
  );
1791
1791
  if (Ze) {
1792
- var l = s.v;
1793
- return ((s.f & V) === 0 && s.reactions !== null || jr(s)) && (l = ao(s)), Qe.set(s, l), l;
1792
+ var a = s.v;
1793
+ return ((s.f & V) === 0 && s.reactions !== null || qr(s)) && (a = co(s)), Qe.set(s, a), a;
1794
1794
  }
1795
- var a = (s.f & se) === 0 && !ye && A !== null && (mn || (A.f & se) !== 0), c = (s.f & yt) === 0;
1796
- nn(s) && (a && (s.f |= se), yr(s)), a && !c && (wr(s), Br(s));
1795
+ var l = (s.f & se) === 0 && !ye && S !== null && (mn || (S.f & se) !== 0), c = (s.f & yt) === 0;
1796
+ nn(s) && (l && (s.f |= se), wr(s)), l && !c && (Tr(s), jr(s));
1797
1797
  }
1798
1798
  if (be?.has(t))
1799
1799
  return be.get(t);
@@ -1801,29 +1801,29 @@ function v(t) {
1801
1801
  throw t.v;
1802
1802
  return t.v;
1803
1803
  }
1804
- function Br(t) {
1804
+ function jr(t) {
1805
1805
  if (t.f |= se, t.deps !== null)
1806
1806
  for (const e of t.deps)
1807
- (e.reactions ?? (e.reactions = [])).push(t), (e.f & z) !== 0 && (e.f & se) === 0 && (wr(
1807
+ (e.reactions ?? (e.reactions = [])).push(t), (e.f & z) !== 0 && (e.f & se) === 0 && (Tr(
1808
1808
  /** @type {Derived} */
1809
1809
  e
1810
- ), Br(
1810
+ ), jr(
1811
1811
  /** @type {Derived} */
1812
1812
  e
1813
1813
  ));
1814
1814
  }
1815
- function jr(t) {
1815
+ function qr(t) {
1816
1816
  if (t.v === D) return !0;
1817
1817
  if (t.deps === null) return !1;
1818
1818
  for (const e of t.deps)
1819
- if (Qe.has(e) || (e.f & z) !== 0 && jr(
1819
+ if (Qe.has(e) || (e.f & z) !== 0 && qr(
1820
1820
  /** @type {Derived} */
1821
1821
  e
1822
1822
  ))
1823
1823
  return !0;
1824
1824
  return !1;
1825
1825
  }
1826
- function qr(t) {
1826
+ function Gr(t) {
1827
1827
  var e = ye;
1828
1828
  try {
1829
1829
  return ye = !0, t();
@@ -1831,18 +1831,18 @@ function qr(t) {
1831
1831
  ye = e;
1832
1832
  }
1833
1833
  }
1834
- const ct = /* @__PURE__ */ Symbol("events"), Gr = /* @__PURE__ */ new Set(), eo = /* @__PURE__ */ new Set();
1834
+ const ct = /* @__PURE__ */ Symbol("events"), Ur = /* @__PURE__ */ new Set(), eo = /* @__PURE__ */ new Set();
1835
1835
  function Gt(t, e, n) {
1836
1836
  (e[ct] ?? (e[ct] = {}))[t] = n;
1837
1837
  }
1838
- function hs(t) {
1838
+ function gs(t) {
1839
1839
  for (var e = 0; e < t.length; e++)
1840
- Gr.add(t[e]);
1840
+ Ur.add(t[e]);
1841
1841
  for (var n of eo)
1842
1842
  n(t);
1843
1843
  }
1844
1844
  let No = null;
1845
- function Mo(t) {
1845
+ function Do(t) {
1846
1846
  var e = this, n = (
1847
1847
  /** @type {Node} */
1848
1848
  e.ownerDocument
@@ -1851,10 +1851,10 @@ function Mo(t) {
1851
1851
  r[0] || t.target
1852
1852
  );
1853
1853
  No = t;
1854
- var s = 0, l = No === t && t[ct];
1855
- if (l) {
1856
- var a = r.indexOf(l);
1857
- if (a !== -1 && (e === document || e === /** @type {any} */
1854
+ var s = 0, a = No === t && t[ct];
1855
+ if (a) {
1856
+ var l = r.indexOf(a);
1857
+ if (l !== -1 && (e === document || e === /** @type {any} */
1858
1858
  window)) {
1859
1859
  t[ct] = e;
1860
1860
  return;
@@ -1862,7 +1862,7 @@ function Mo(t) {
1862
1862
  var c = r.indexOf(e);
1863
1863
  if (c === -1)
1864
1864
  return;
1865
- a <= c && (s = a);
1865
+ l <= c && (s = l);
1866
1866
  }
1867
1867
  if (i = /** @type {Element} */
1868
1868
  r[s] || t.target, i !== e) {
@@ -1872,18 +1872,18 @@ function Mo(t) {
1872
1872
  return i || n;
1873
1873
  }
1874
1874
  });
1875
- var f = A, d = E;
1875
+ var f = S, d = E;
1876
1876
  ue(null), Re(null);
1877
1877
  try {
1878
1878
  for (var g, b = []; i !== null; ) {
1879
1879
  var h = i.assignedSlot || i.parentNode || /** @type {any} */
1880
1880
  i.host || null;
1881
1881
  try {
1882
- var S = i[ct]?.[o];
1883
- S != null && (!/** @type {any} */
1882
+ var A = i[ct]?.[o];
1883
+ A != null && (!/** @type {any} */
1884
1884
  i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1885
1885
  // -> the target could not have been disabled because it emits the event in the first place
1886
- t.target === i) && S.call(i, t);
1886
+ t.target === i) && A.call(i, t);
1887
1887
  } catch (w) {
1888
1888
  g ? b.push(w) : g = w;
1889
1889
  }
@@ -1903,22 +1903,22 @@ function Mo(t) {
1903
1903
  }
1904
1904
  }
1905
1905
  }
1906
- const ps = (
1906
+ const ms = (
1907
1907
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
1908
1908
  globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
1909
1909
  /** @param {string} html */
1910
1910
  createHTML: (t) => t
1911
1911
  })
1912
1912
  );
1913
- function vs(t) {
1913
+ function bs(t) {
1914
1914
  return (
1915
1915
  /** @type {string} */
1916
- ps?.createHTML(t) ?? t
1916
+ ms?.createHTML(t) ?? t
1917
1917
  );
1918
1918
  }
1919
- function gs(t) {
1920
- var e = co("template");
1921
- return e.innerHTML = vs(t.replaceAll("<!>", "<!---->")), e.content;
1919
+ function _s(t) {
1920
+ var e = uo("template");
1921
+ return e.innerHTML = bs(t.replaceAll("<!>", "<!---->")), e.content;
1922
1922
  }
1923
1923
  function bn(t, e) {
1924
1924
  var n = (
@@ -1929,25 +1929,25 @@ function bn(t, e) {
1929
1929
  }
1930
1930
  // @__NO_SIDE_EFFECTS__
1931
1931
  function ot(t, e) {
1932
- var n = (e & hi) !== 0, o = (e & pi) !== 0, r, i = !t.startsWith("<!>");
1932
+ var n = (e & gi) !== 0, o = (e & mi) !== 0, r, i = !t.startsWith("<!>");
1933
1933
  return () => {
1934
1934
  if (R)
1935
1935
  return bn(k, null), k;
1936
- r === void 0 && (r = gs(i ? t : "<!>" + t), n || (r = /** @type {TemplateNode} */
1936
+ r === void 0 && (r = _s(i ? t : "<!>" + t), n || (r = /** @type {TemplateNode} */
1937
1937
  /* @__PURE__ */ _t(r)));
1938
1938
  var s = (
1939
1939
  /** @type {TemplateNode} */
1940
- o || Sr ? document.importNode(r, !0) : r.cloneNode(!0)
1940
+ o || Er ? document.importNode(r, !0) : r.cloneNode(!0)
1941
1941
  );
1942
1942
  if (n) {
1943
- var l = (
1943
+ var a = (
1944
1944
  /** @type {TemplateNode} */
1945
1945
  /* @__PURE__ */ _t(s)
1946
- ), a = (
1946
+ ), l = (
1947
1947
  /** @type {TemplateNode} */
1948
1948
  s.lastChild
1949
1949
  );
1950
- bn(l, a);
1950
+ bn(a, l);
1951
1951
  } else
1952
1952
  bn(s, s);
1953
1953
  return s;
@@ -1967,23 +1967,23 @@ function xe(t, e) {
1967
1967
  e
1968
1968
  );
1969
1969
  }
1970
- const ms = ["touchstart", "touchmove"];
1971
- function bs(t) {
1972
- return ms.includes(t);
1970
+ const ys = ["touchstart", "touchmove"];
1971
+ function ws(t) {
1972
+ return ys.includes(t);
1973
1973
  }
1974
- function Do(t, e) {
1974
+ function Vo(t, e) {
1975
1975
  var n = e == null ? "" : typeof e == "object" ? `${e}` : e;
1976
1976
  n !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = n, t.nodeValue = `${n}`);
1977
1977
  }
1978
- function Ur(t, e) {
1979
- return Wr(t, e);
1978
+ function Wr(t, e) {
1979
+ return Kr(t, e);
1980
1980
  }
1981
- function _s(t, e) {
1981
+ function Ts(t, e) {
1982
1982
  Zn(), e.intro = e.intro ?? !1;
1983
1983
  const n = e.target, o = R, r = k;
1984
1984
  try {
1985
1985
  for (var i = /* @__PURE__ */ _t(n); i && (i.nodeType !== Ht || /** @type {Comment} */
1986
- i.data !== Jo); )
1986
+ i.data !== Qo); )
1987
1987
  i = /* @__PURE__ */ ce(i);
1988
1988
  if (!i)
1989
1989
  throw Lt;
@@ -1991,24 +1991,24 @@ function _s(t, e) {
1991
1991
  /** @type {Comment} */
1992
1992
  i
1993
1993
  );
1994
- const s = Wr(t, { ...e, anchor: i });
1994
+ const s = Kr(t, { ...e, anchor: i });
1995
1995
  return _e(!1), /** @type {Exports} */
1996
1996
  s;
1997
1997
  } catch (s) {
1998
1998
  if (s instanceof Error && s.message.split(`
1999
- `).some((l) => l.startsWith("https://svelte.dev/e/")))
1999
+ `).some((a) => a.startsWith("https://svelte.dev/e/")))
2000
2000
  throw s;
2001
- return s !== Lt && console.warn("Failed to hydrate: ", s), e.recover === !1 && Oi(), Zn(), kr(n), _e(!1), Ur(t, e);
2001
+ return s !== Lt && console.warn("Failed to hydrate: ", s), e.recover === !1 && xi(), Zn(), Cr(n), _e(!1), Wr(t, e);
2002
2002
  } finally {
2003
2003
  _e(o), G(r);
2004
2004
  }
2005
2005
  }
2006
2006
  const dn = /* @__PURE__ */ new Map();
2007
- function Wr(t, { target: e, anchor: n, props: o = {}, events: r, context: i, intro: s = !0, transformError: l }) {
2007
+ function Kr(t, { target: e, anchor: n, props: o = {}, events: r, context: i, intro: s = !0, transformError: a }) {
2008
2008
  Zn();
2009
- var a = void 0, c = ls(() => {
2009
+ var l = void 0, c = us(() => {
2010
2010
  var f = n ?? e.appendChild(Te());
2011
- Ui(
2011
+ Yi(
2012
2012
  /** @type {TemplateNode} */
2013
2013
  f,
2014
2014
  {
@@ -2016,7 +2016,7 @@ function Wr(t, { target: e, anchor: n, props: o = {}, events: r, context: i, int
2016
2016
  }
2017
2017
  },
2018
2018
  (b) => {
2019
- sr({});
2019
+ lr({});
2020
2020
  var h = (
2021
2021
  /** @type {ComponentContext} */
2022
2022
  ae
@@ -2025,52 +2025,52 @@ function Wr(t, { target: e, anchor: n, props: o = {}, events: r, context: i, int
2025
2025
  /** @type {TemplateNode} */
2026
2026
  b,
2027
2027
  null
2028
- ), a = t(b, o) || {}, R && (E.nodes.end = k, k === null || k.nodeType !== Ht || /** @type {Comment} */
2029
- k.data !== ro))
2028
+ ), l = t(b, o) || {}, R && (E.nodes.end = k, k === null || k.nodeType !== Ht || /** @type {Comment} */
2029
+ k.data !== io))
2030
2030
  throw kn(), Lt;
2031
- lr();
2031
+ ar();
2032
2032
  },
2033
- l
2033
+ a
2034
2034
  );
2035
2035
  var d = /* @__PURE__ */ new Set(), g = (b) => {
2036
2036
  for (var h = 0; h < b.length; h++) {
2037
- var S = b[h];
2038
- if (!d.has(S)) {
2039
- d.add(S);
2040
- var w = bs(S);
2037
+ var A = b[h];
2038
+ if (!d.has(A)) {
2039
+ d.add(A);
2040
+ var w = ws(A);
2041
2041
  for (const fe of [e, document]) {
2042
2042
  var I = dn.get(fe);
2043
2043
  I === void 0 && (I = /* @__PURE__ */ new Map(), dn.set(fe, I));
2044
- var O = I.get(S);
2045
- O === void 0 ? (fe.addEventListener(S, Mo, { passive: w }), I.set(S, 1)) : I.set(S, O + 1);
2044
+ var O = I.get(A);
2045
+ O === void 0 ? (fe.addEventListener(A, Do, { passive: w }), I.set(A, 1)) : I.set(A, O + 1);
2046
2046
  }
2047
2047
  }
2048
2048
  }
2049
2049
  };
2050
- return g(En(Gr)), eo.add(g), () => {
2050
+ return g(En(Ur)), eo.add(g), () => {
2051
2051
  for (var b of d)
2052
2052
  for (const w of [e, document]) {
2053
2053
  var h = (
2054
2054
  /** @type {Map<string, number>} */
2055
2055
  dn.get(w)
2056
- ), S = (
2056
+ ), A = (
2057
2057
  /** @type {number} */
2058
2058
  h.get(b)
2059
2059
  );
2060
- --S == 0 ? (w.removeEventListener(b, Mo), h.delete(b), h.size === 0 && dn.delete(w)) : h.set(b, S);
2060
+ --A == 0 ? (w.removeEventListener(b, Do), h.delete(b), h.size === 0 && dn.delete(w)) : h.set(b, A);
2061
2061
  }
2062
2062
  eo.delete(g), f !== n && f.parentNode?.removeChild(f);
2063
2063
  };
2064
2064
  });
2065
- return to.set(a, c), a;
2065
+ return to.set(l, c), l;
2066
2066
  }
2067
2067
  let to = /* @__PURE__ */ new WeakMap();
2068
- function ys(t, e) {
2068
+ function Is(t, e) {
2069
2069
  const n = to.get(t);
2070
2070
  return n ? (to.delete(t), n(e)) : Promise.resolve();
2071
2071
  }
2072
- var me, $e, ee, ht, en, tn, Sn;
2073
- class ws {
2072
+ var me, $e, ee, ht, en, tn, An;
2073
+ class Ss {
2074
2074
  /**
2075
2075
  * @param {TemplateNode} anchor
2076
2076
  * @param {boolean} transition
@@ -2121,7 +2121,7 @@ class ws {
2121
2121
  u(this, me).get(e)
2122
2122
  ), o = u(this, $e).get(n);
2123
2123
  if (o)
2124
- vo(o), u(this, ht).delete(n);
2124
+ go(o), u(this, ht).delete(n);
2125
2125
  else {
2126
2126
  var r = u(this, ee).get(n);
2127
2127
  r && (r.effect.f & j) === 0 && (u(this, $e).set(n, r.effect), u(this, ee).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), o = r.effect);
@@ -2129,27 +2129,27 @@ class ws {
2129
2129
  for (const [i, s] of u(this, me)) {
2130
2130
  if (u(this, me).delete(i), i === e)
2131
2131
  break;
2132
- const l = u(this, ee).get(s);
2133
- l && (q(l.effect), u(this, ee).delete(s));
2132
+ const a = u(this, ee).get(s);
2133
+ a && (q(a.effect), u(this, ee).delete(s));
2134
2134
  }
2135
2135
  for (const [i, s] of u(this, $e)) {
2136
2136
  if (i === n || u(this, ht).has(i) || (s.f & j) !== 0) continue;
2137
- const l = () => {
2137
+ const a = () => {
2138
2138
  if (Array.from(u(this, me).values()).includes(i)) {
2139
2139
  var c = document.createDocumentFragment();
2140
- go(s, c), c.append(Te()), u(this, ee).set(i, { effect: s, fragment: c });
2140
+ mo(s, c), c.append(Te()), u(this, ee).set(i, { effect: s, fragment: c });
2141
2141
  } else
2142
2142
  q(s);
2143
2143
  u(this, ht).delete(i), u(this, $e).delete(i);
2144
2144
  };
2145
- u(this, en) || !o ? (u(this, ht).add(i), vt(s, l, !1)) : l();
2145
+ u(this, en) || !o ? (u(this, ht).add(i), vt(s, a, !1)) : a();
2146
2146
  }
2147
2147
  }
2148
2148
  });
2149
2149
  /**
2150
2150
  * @param {Batch} batch
2151
2151
  */
2152
- T(this, Sn, (e) => {
2152
+ T(this, An, (e) => {
2153
2153
  u(this, me).delete(e);
2154
2154
  const n = Array.from(u(this, me).values());
2155
2155
  for (const [o, r] of u(this, ee))
@@ -2166,7 +2166,7 @@ class ws {
2166
2166
  var o = (
2167
2167
  /** @type {Batch} */
2168
2168
  L
2169
- ), r = Cr();
2169
+ ), r = Rr();
2170
2170
  if (n && !u(this, $e).has(e) && !u(this, ee).has(e))
2171
2171
  if (r) {
2172
2172
  var i = document.createDocumentFragment(), s = Te();
@@ -2180,47 +2180,47 @@ class ws {
2180
2180
  ie(() => n(this.anchor))
2181
2181
  );
2182
2182
  if (u(this, me).set(o, e), r) {
2183
- for (const [l, a] of u(this, $e))
2184
- l === e ? o.unskip_effect(a) : o.skip_effect(a);
2185
- for (const [l, a] of u(this, ee))
2186
- l === e ? o.unskip_effect(a.effect) : o.skip_effect(a.effect);
2187
- o.oncommit(u(this, tn)), o.ondiscard(u(this, Sn));
2183
+ for (const [a, l] of u(this, $e))
2184
+ a === e ? o.unskip_effect(l) : o.skip_effect(l);
2185
+ for (const [a, l] of u(this, ee))
2186
+ a === e ? o.unskip_effect(l.effect) : o.skip_effect(l.effect);
2187
+ o.oncommit(u(this, tn)), o.ondiscard(u(this, An));
2188
2188
  } else
2189
2189
  R && (this.anchor = k), u(this, tn).call(this, o);
2190
2190
  }
2191
2191
  }
2192
- me = new WeakMap(), $e = new WeakMap(), ee = new WeakMap(), ht = new WeakMap(), en = new WeakMap(), tn = new WeakMap(), Sn = new WeakMap();
2192
+ me = new WeakMap(), $e = new WeakMap(), ee = new WeakMap(), ht = new WeakMap(), en = new WeakMap(), tn = new WeakMap(), An = new WeakMap();
2193
2193
  function Ut(t, e, n = !1) {
2194
2194
  var o;
2195
2195
  R && (o = k, Cn());
2196
- var r = new ws(t), i = n ? Nt : 0;
2197
- function s(l, a) {
2196
+ var r = new Ss(t), i = n ? Mt : 0;
2197
+ function s(a, l) {
2198
2198
  if (R) {
2199
- var c = or(
2199
+ var c = rr(
2200
2200
  /** @type {TemplateNode} */
2201
2201
  o
2202
2202
  );
2203
- if (l !== parseInt(c.substring(1))) {
2203
+ if (a !== parseInt(c.substring(1))) {
2204
2204
  var f = In();
2205
- G(f), r.anchor = f, _e(!1), r.ensure(l, a), _e(!0);
2205
+ G(f), r.anchor = f, _e(!1), r.ensure(a, l), _e(!0);
2206
2206
  return;
2207
2207
  }
2208
2208
  }
2209
- r.ensure(l, a);
2209
+ r.ensure(a, l);
2210
2210
  }
2211
2211
  Ln(() => {
2212
- var l = !1;
2213
- e((a, c = 0) => {
2214
- l = !0, s(c, a);
2215
- }), l || s(-1, null);
2212
+ var a = !1;
2213
+ e((l, c = 0) => {
2214
+ a = !0, s(c, l);
2215
+ }), a || s(-1, null);
2216
2216
  }, i);
2217
2217
  }
2218
- function Ts(t, e) {
2218
+ function As(t, e) {
2219
2219
  return e;
2220
2220
  }
2221
- function Is(t, e, n) {
2222
- for (var o = [], r = e.length, i, s = e.length, l = 0; l < r; l++) {
2223
- let d = e[l];
2221
+ function Es(t, e, n) {
2222
+ for (var o = [], r = e.length, i, s = e.length, a = 0; a < r; a++) {
2223
+ let d = e[a];
2224
2224
  vt(
2225
2225
  d,
2226
2226
  () => {
@@ -2239,8 +2239,8 @@ function Is(t, e, n) {
2239
2239
  );
2240
2240
  }
2241
2241
  if (s === 0) {
2242
- var a = o.length === 0 && n !== null;
2243
- if (a) {
2242
+ var l = o.length === 0 && n !== null;
2243
+ if (l) {
2244
2244
  var c = (
2245
2245
  /** @type {Element} */
2246
2246
  n
@@ -2248,9 +2248,9 @@ function Is(t, e, n) {
2248
2248
  /** @type {Element} */
2249
2249
  c.parentNode
2250
2250
  );
2251
- kr(f), f.append(c), t.items.clear();
2251
+ Cr(f), f.append(c), t.items.clear();
2252
2252
  }
2253
- no(t, e, !a);
2253
+ no(t, e, !l);
2254
2254
  } else
2255
2255
  i = {
2256
2256
  pending: new Set(e),
@@ -2262,10 +2262,10 @@ function no(t, e, n = !0) {
2262
2262
  if (t.pending.size > 0) {
2263
2263
  o = /* @__PURE__ */ new Set();
2264
2264
  for (const s of t.pending.values())
2265
- for (const l of s)
2265
+ for (const a of s)
2266
2266
  o.add(
2267
2267
  /** @type {EachItem} */
2268
- t.items.get(l).e
2268
+ t.items.get(a).e
2269
2269
  );
2270
2270
  }
2271
2271
  for (var r = 0; r < e.length; r++) {
@@ -2273,64 +2273,64 @@ function no(t, e, n = !0) {
2273
2273
  if (o?.has(i)) {
2274
2274
  i.f |= Fe;
2275
2275
  const s = document.createDocumentFragment();
2276
- go(i, s);
2276
+ mo(i, s);
2277
2277
  } else
2278
2278
  q(e[r], n);
2279
2279
  }
2280
2280
  }
2281
- var Vo;
2282
- function As(t, e, n, o, r, i = null) {
2283
- var s = t, l = /* @__PURE__ */ new Map();
2281
+ var Fo;
2282
+ function $s(t, e, n, o, r, i = null) {
2283
+ var s = t, a = /* @__PURE__ */ new Map();
2284
2284
  R && Cn();
2285
- var a = null, c = /* @__PURE__ */ Qi(() => {
2285
+ var l = null, c = /* @__PURE__ */ ts(() => {
2286
2286
  var I = n();
2287
- return Zo(I) ? I : I == null ? [] : En(I);
2287
+ return er(I) ? I : I == null ? [] : En(I);
2288
2288
  }), f, d = /* @__PURE__ */ new Map(), g = !0;
2289
2289
  function b(I) {
2290
- (w.effect.f & Ce) === 0 && (w.pending.delete(I), w.fallback = a, Ss(w, f, s, e, o), a !== null && (f.length === 0 ? (a.f & Fe) === 0 ? vo(a) : (a.f ^= Fe, Yt(a, null, s)) : vt(a, () => {
2291
- a = null;
2290
+ (w.effect.f & Ce) === 0 && (w.pending.delete(I), w.fallback = l, ks(w, f, s, e, o), l !== null && (f.length === 0 ? (l.f & Fe) === 0 ? go(l) : (l.f ^= Fe, Yt(l, null, s)) : vt(l, () => {
2291
+ l = null;
2292
2292
  })));
2293
2293
  }
2294
2294
  function h(I) {
2295
2295
  w.pending.delete(I);
2296
2296
  }
2297
- var S = Ln(() => {
2297
+ var A = Ln(() => {
2298
2298
  f = /** @type {V[]} */
2299
2299
  v(c);
2300
2300
  var I = f.length;
2301
2301
  let O = !1;
2302
2302
  if (R) {
2303
- var fe = or(s) === oo;
2303
+ var fe = rr(s) === ro;
2304
2304
  fe !== (I === 0) && (s = In(), G(s), _e(!1), O = !0);
2305
2305
  }
2306
2306
  for (var de = /* @__PURE__ */ new Set(), H = (
2307
2307
  /** @type {Batch} */
2308
2308
  L
2309
- ), je = Cr(), te = 0; te < I; te += 1) {
2309
+ ), je = Rr(), te = 0; te < I; te += 1) {
2310
2310
  R && k.nodeType === Ht && /** @type {Comment} */
2311
- k.data === ro && (s = /** @type {Comment} */
2311
+ k.data === io && (s = /** @type {Comment} */
2312
2312
  k, O = !0, _e(!1));
2313
- var ne = f[te], wt = o(ne, te), he = g ? null : l.get(wt);
2314
- he ? (he.v && Vt(he.v, ne), he.i && Vt(he.i, te), je && H.unskip_effect(he.e)) : (he = Es(
2315
- l,
2316
- g ? s : Vo ?? (Vo = Te()),
2313
+ var ne = f[te], wt = o(ne, te), he = g ? null : a.get(wt);
2314
+ he ? (he.v && Vt(he.v, ne), he.i && Vt(he.i, te), je && H.unskip_effect(he.e)) : (he = Cs(
2315
+ a,
2316
+ g ? s : Fo ?? (Fo = Te()),
2317
2317
  ne,
2318
2318
  wt,
2319
2319
  te,
2320
2320
  r,
2321
2321
  e,
2322
2322
  n
2323
- ), g || (he.e.f |= Fe), l.set(wt, he)), de.add(wt);
2323
+ ), g || (he.e.f |= Fe), a.set(wt, he)), de.add(wt);
2324
2324
  }
2325
- if (I === 0 && i && !a && (g ? a = ie(() => i(s)) : (a = ie(() => i(Vo ?? (Vo = Te()))), a.f |= Fe)), I > de.size && Ei(), R && I > 0 && G(In()), !g)
2325
+ if (I === 0 && i && !l && (g ? l = ie(() => i(s)) : (l = ie(() => i(Fo ?? (Fo = Te()))), l.f |= Fe)), I > de.size && Ci(), R && I > 0 && G(In()), !g)
2326
2326
  if (d.set(H, de), je) {
2327
- for (const [on, Nn] of l)
2328
- de.has(on) || H.skip_effect(Nn.e);
2327
+ for (const [on, Mn] of a)
2328
+ de.has(on) || H.skip_effect(Mn.e);
2329
2329
  H.oncommit(b), H.ondiscard(h);
2330
2330
  } else
2331
2331
  b(H);
2332
2332
  O && _e(!0), v(c);
2333
- }), w = { effect: S, items: l, pending: d, outrogroups: null, fallback: a };
2333
+ }), w = { effect: A, items: a, pending: d, outrogroups: null, fallback: l };
2334
2334
  g = !1, R && (s = k);
2335
2335
  }
2336
2336
  function Wt(t) {
@@ -2338,23 +2338,23 @@ function Wt(t) {
2338
2338
  t = t.next;
2339
2339
  return t;
2340
2340
  }
2341
- function Ss(t, e, n, o, r) {
2342
- var i = e.length, s = t.items, l = Wt(t.effect.first), a, c = null, f = [], d = [], g, b, h, S;
2343
- for (S = 0; S < i; S += 1) {
2344
- if (g = e[S], b = r(g, S), h = /** @type {EachItem} */
2341
+ function ks(t, e, n, o, r) {
2342
+ var i = e.length, s = t.items, a = Wt(t.effect.first), l, c = null, f = [], d = [], g, b, h, A;
2343
+ for (A = 0; A < i; A += 1) {
2344
+ if (g = e[A], b = r(g, A), h = /** @type {EachItem} */
2345
2345
  s.get(b).e, t.outrogroups !== null)
2346
2346
  for (const ne of t.outrogroups)
2347
2347
  ne.pending.delete(h), ne.done.delete(h);
2348
2348
  if ((h.f & Fe) !== 0)
2349
- if (h.f ^= Fe, h === l)
2349
+ if (h.f ^= Fe, h === a)
2350
2350
  Yt(h, null, n);
2351
2351
  else {
2352
- var w = c ? c.next : l;
2353
- h === t.effect.last && (t.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), Ge(t, c, h), Ge(t, h, w), Yt(h, w, n), c = h, f = [], d = [], l = Wt(c.next);
2352
+ var w = c ? c.next : a;
2353
+ h === t.effect.last && (t.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), Ge(t, c, h), Ge(t, h, w), Yt(h, w, n), c = h, f = [], d = [], a = Wt(c.next);
2354
2354
  continue;
2355
2355
  }
2356
- if ((h.f & j) !== 0 && vo(h), h !== l) {
2357
- if (a !== void 0 && a.has(h)) {
2356
+ if ((h.f & j) !== 0 && go(h), h !== a) {
2357
+ if (l !== void 0 && l.has(h)) {
2358
2358
  if (f.length < d.length) {
2359
2359
  var I = d[0], O;
2360
2360
  c = I.prev;
@@ -2362,44 +2362,44 @@ function Ss(t, e, n, o, r) {
2362
2362
  for (O = 0; O < f.length; O += 1)
2363
2363
  Yt(f[O], I, n);
2364
2364
  for (O = 0; O < d.length; O += 1)
2365
- a.delete(d[O]);
2366
- Ge(t, fe.prev, de.next), Ge(t, c, fe), Ge(t, de, I), l = I, c = de, S -= 1, f = [], d = [];
2365
+ l.delete(d[O]);
2366
+ Ge(t, fe.prev, de.next), Ge(t, c, fe), Ge(t, de, I), a = I, c = de, A -= 1, f = [], d = [];
2367
2367
  } else
2368
- a.delete(h), Yt(h, l, n), Ge(t, h.prev, h.next), Ge(t, h, c === null ? t.effect.first : c.next), Ge(t, c, h), c = h;
2368
+ l.delete(h), Yt(h, a, n), Ge(t, h.prev, h.next), Ge(t, h, c === null ? t.effect.first : c.next), Ge(t, c, h), c = h;
2369
2369
  continue;
2370
2370
  }
2371
- for (f = [], d = []; l !== null && l !== h; )
2372
- (a ?? (a = /* @__PURE__ */ new Set())).add(l), d.push(l), l = Wt(l.next);
2373
- if (l === null)
2371
+ for (f = [], d = []; a !== null && a !== h; )
2372
+ (l ?? (l = /* @__PURE__ */ new Set())).add(a), d.push(a), a = Wt(a.next);
2373
+ if (a === null)
2374
2374
  continue;
2375
2375
  }
2376
- (h.f & Fe) === 0 && f.push(h), c = h, l = Wt(h.next);
2376
+ (h.f & Fe) === 0 && f.push(h), c = h, a = Wt(h.next);
2377
2377
  }
2378
2378
  if (t.outrogroups !== null) {
2379
2379
  for (const ne of t.outrogroups)
2380
2380
  ne.pending.size === 0 && (no(t, En(ne.done)), t.outrogroups?.delete(ne));
2381
2381
  t.outrogroups.size === 0 && (t.outrogroups = null);
2382
2382
  }
2383
- if (l !== null || a !== void 0) {
2383
+ if (a !== null || l !== void 0) {
2384
2384
  var H = [];
2385
- if (a !== void 0)
2386
- for (h of a)
2385
+ if (l !== void 0)
2386
+ for (h of l)
2387
2387
  (h.f & j) === 0 && H.push(h);
2388
- for (; l !== null; )
2389
- (l.f & j) === 0 && l !== t.fallback && H.push(l), l = Wt(l.next);
2388
+ for (; a !== null; )
2389
+ (a.f & j) === 0 && a !== t.fallback && H.push(a), a = Wt(a.next);
2390
2390
  var je = H.length;
2391
2391
  if (je > 0) {
2392
2392
  var te = null;
2393
- Is(t, H, te);
2393
+ Es(t, H, te);
2394
2394
  }
2395
2395
  }
2396
2396
  }
2397
- function Es(t, e, n, o, r, i, s, l) {
2398
- var a = (s & ui) !== 0 ? (s & di) === 0 ? /* @__PURE__ */ Ir(n, !1, !1) : bt(n) : null, c = (s & fi) !== 0 ? bt(r) : null;
2397
+ function Cs(t, e, n, o, r, i, s, a) {
2398
+ var l = (s & hi) !== 0 ? (s & vi) === 0 ? /* @__PURE__ */ Sr(n, !1, !1) : bt(n) : null, c = (s & pi) !== 0 ? bt(r) : null;
2399
2399
  return {
2400
- v: a,
2400
+ v: l,
2401
2401
  i: c,
2402
- e: ie(() => (i(e, a ?? n, c ?? r, l), () => {
2402
+ e: ie(() => (i(e, l ?? n, c ?? r, a), () => {
2403
2403
  t.delete(o);
2404
2404
  }))
2405
2405
  };
@@ -2422,7 +2422,7 @@ function Yt(t, e, n) {
2422
2422
  function Ge(t, e, n) {
2423
2423
  e === null ? t.effect.first = n : e.next = n, n === null ? t.effect.last = e : n.prev = e;
2424
2424
  }
2425
- function $s(t, e) {
2425
+ function Rs(t, e) {
2426
2426
  let n = null, o = R;
2427
2427
  var r;
2428
2428
  if (R) {
@@ -2442,7 +2442,7 @@ function $s(t, e) {
2442
2442
  }
2443
2443
  R || (r = document.head.appendChild(Te()));
2444
2444
  try {
2445
- Ln(() => e(r), nr | nt);
2445
+ Ln(() => e(r), or | nt);
2446
2446
  } finally {
2447
2447
  o && (_e(!0), G(
2448
2448
  /** @type {TemplateNode} */
@@ -2450,8 +2450,8 @@ function $s(t, e) {
2450
2450
  ));
2451
2451
  }
2452
2452
  }
2453
- function ks(t, e) {
2454
- Lr(() => {
2453
+ function Os(t, e) {
2454
+ Pr(() => {
2455
2455
  var n = t.getRootNode(), o = (
2456
2456
  /** @type {ShadowRoot} */
2457
2457
  n.host ? (
@@ -2464,63 +2464,63 @@ function ks(t, e) {
2464
2464
  )
2465
2465
  );
2466
2466
  if (!o.querySelector("#" + e.hash)) {
2467
- const r = co("style");
2467
+ const r = uo("style");
2468
2468
  r.id = e.hash, r.textContent = e.code, o.appendChild(r);
2469
2469
  }
2470
2470
  });
2471
2471
  }
2472
- function Cs(t, e) {
2472
+ function Ls(t, e) {
2473
2473
  return t == null ? null : String(t);
2474
2474
  }
2475
- function Fo(t, e, n, o) {
2475
+ function zo(t, e, n, o) {
2476
2476
  var r = t.__style;
2477
2477
  if (R || r !== e) {
2478
- var i = Cs(e);
2478
+ var i = Ls(e);
2479
2479
  (!R || i !== t.getAttribute("style")) && (i == null ? t.removeAttribute("style") : t.style.cssText = i), t.__style = e;
2480
2480
  }
2481
2481
  return o;
2482
2482
  }
2483
- const Rs = /* @__PURE__ */ Symbol("is custom element"), Os = /* @__PURE__ */ Symbol("is html"), Ls = Ai ? "link" : "LINK";
2484
- function zo(t, e, n, o) {
2485
- var r = Ps(t);
2486
- R && (r[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Ls) || r[e] !== (r[e] = n) && (e === "loading" && (t[Ii] = n), n == null ? t.removeAttribute(e) : typeof n != "string" && xs(t).includes(e) ? t[e] = n : t.setAttribute(e, n));
2483
+ const Ps = /* @__PURE__ */ Symbol("is custom element"), xs = /* @__PURE__ */ Symbol("is html"), Ms = $i ? "link" : "LINK";
2484
+ function Ho(t, e, n, o) {
2485
+ var r = Ns(t);
2486
+ R && (r[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Ms) || r[e] !== (r[e] = n) && (e === "loading" && (t[Ei] = n), n == null ? t.removeAttribute(e) : typeof n != "string" && Ds(t).includes(e) ? t[e] = n : t.setAttribute(e, n));
2487
2487
  }
2488
- function Ps(t) {
2488
+ function Ns(t) {
2489
2489
  return (
2490
2490
  /** @type {Record<string | symbol, unknown>} **/
2491
2491
  // @ts-expect-error
2492
2492
  t.__attributes ?? (t.__attributes = {
2493
- [Rs]: t.nodeName.includes("-"),
2494
- [Os]: t.namespaceURI === Qo
2493
+ [Ps]: t.nodeName.includes("-"),
2494
+ [xs]: t.namespaceURI === Zo
2495
2495
  })
2496
2496
  );
2497
2497
  }
2498
- var Ho = /* @__PURE__ */ new Map();
2499
- function xs(t) {
2500
- var e = t.getAttribute("is") || t.nodeName, n = Ho.get(e);
2498
+ var Bo = /* @__PURE__ */ new Map();
2499
+ function Ds(t) {
2500
+ var e = t.getAttribute("is") || t.nodeName, n = Bo.get(e);
2501
2501
  if (n) return n;
2502
- Ho.set(e, n = []);
2502
+ Bo.set(e, n = []);
2503
2503
  for (var o, r = t, i = Element.prototype; i !== r; ) {
2504
- o = gi(r);
2504
+ o = _i(r);
2505
2505
  for (var s in o)
2506
2506
  o[s].set && n.push(s);
2507
- r = er(r);
2507
+ r = tr(r);
2508
2508
  }
2509
2509
  return n;
2510
2510
  }
2511
- function Bo(t, e) {
2511
+ function jo(t, e) {
2512
2512
  return t === e || t?.[hn] === e;
2513
2513
  }
2514
- function jo(t = {}, e, n, o) {
2515
- return Lr(() => {
2514
+ function qo(t = {}, e, n, o) {
2515
+ return Pr(() => {
2516
2516
  var r, i;
2517
- return ho(() => {
2518
- r = i, i = [], qr(() => {
2519
- t !== n(...i) && (e(t, ...i), r && Bo(n(...r), t) && e(null, ...r));
2517
+ return po(() => {
2518
+ r = i, i = [], Gr(() => {
2519
+ t !== n(...i) && (e(t, ...i), r && jo(n(...r), t) && e(null, ...r));
2520
2520
  });
2521
2521
  }), () => {
2522
2522
  pt(() => {
2523
- i && Bo(n(...i), t) && e(null, ...i);
2523
+ i && jo(n(...i), t) && e(null, ...i);
2524
2524
  });
2525
2525
  };
2526
2526
  }), t;
@@ -2530,18 +2530,18 @@ function zn(t, e, n, o) {
2530
2530
  /** @type {V} */
2531
2531
  o
2532
2532
  ), i = !0, s = () => (i && (i = !1, r = /** @type {V} */
2533
- o), r), l;
2534
- l = /** @type {V} */
2535
- t[e], l === void 0 && o !== void 0 && (l = s());
2536
- var a;
2537
- a = () => {
2533
+ o), r), a;
2534
+ a = /** @type {V} */
2535
+ t[e], a === void 0 && o !== void 0 && (a = s());
2536
+ var l;
2537
+ l = () => {
2538
2538
  var g = (
2539
2539
  /** @type {V} */
2540
2540
  t[e]
2541
2541
  );
2542
2542
  return g === void 0 ? s() : (i = !0, g);
2543
2543
  };
2544
- var c = !1, f = /* @__PURE__ */ On(() => (c = !1, a())), d = (
2544
+ var c = !1, f = /* @__PURE__ */ On(() => (c = !1, l())), d = (
2545
2545
  /** @type {Effect} */
2546
2546
  E
2547
2547
  );
@@ -2556,11 +2556,11 @@ function zn(t, e, n, o) {
2556
2556
  })
2557
2557
  );
2558
2558
  }
2559
- function Ns(t) {
2560
- return new Ms(t);
2559
+ function Vs(t) {
2560
+ return new Fs(t);
2561
2561
  }
2562
2562
  var Ve, re;
2563
- class Ms {
2563
+ class Fs {
2564
2564
  /**
2565
2565
  * @param {ComponentConstructorOptions & {
2566
2566
  * component: any;
@@ -2572,8 +2572,8 @@ class Ms {
2572
2572
  /** @type {Record<string, any>} */
2573
2573
  T(this, re);
2574
2574
  var n = /* @__PURE__ */ new Map(), o = (i, s) => {
2575
- var l = /* @__PURE__ */ Ir(s, !1, !1);
2576
- return n.set(i, l), l;
2575
+ var a = /* @__PURE__ */ Sr(s, !1, !1);
2576
+ return n.set(i, a), a;
2577
2577
  };
2578
2578
  const r = new Proxy(
2579
2579
  { ...e.props || {}, $$events: {} },
@@ -2582,14 +2582,14 @@ class Ms {
2582
2582
  return v(n.get(s) ?? o(s, Reflect.get(i, s)));
2583
2583
  },
2584
2584
  has(i, s) {
2585
- return s === Ti ? !0 : (v(n.get(s) ?? o(s, Reflect.get(i, s))), Reflect.has(i, s));
2585
+ return s === Ai ? !0 : (v(n.get(s) ?? o(s, Reflect.get(i, s))), Reflect.has(i, s));
2586
2586
  },
2587
- set(i, s, l) {
2588
- return $(n.get(s) ?? o(s, l), l), Reflect.set(i, s, l);
2587
+ set(i, s, a) {
2588
+ return $(n.get(s) ?? o(s, a), a), Reflect.set(i, s, a);
2589
2589
  }
2590
2590
  }
2591
2591
  );
2592
- y(this, re, (e.hydrate ? _s : Ur)(e.component, {
2592
+ y(this, re, (e.hydrate ? Ts : Wr)(e.component, {
2593
2593
  target: e.target,
2594
2594
  anchor: e.anchor,
2595
2595
  props: r,
@@ -2613,7 +2613,7 @@ class Ms {
2613
2613
  (i) => {
2614
2614
  Object.assign(r, i);
2615
2615
  }, u(this, re).$destroy = () => {
2616
- ys(u(this, re));
2616
+ Is(u(this, re));
2617
2617
  };
2618
2618
  }
2619
2619
  /** @param {Record<string, any>} props */
@@ -2640,8 +2640,8 @@ class Ms {
2640
2640
  }
2641
2641
  }
2642
2642
  Ve = new WeakMap(), re = new WeakMap();
2643
- let Kr;
2644
- typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
2643
+ let Yr;
2644
+ typeof HTMLElement == "function" && (Yr = class extends HTMLElement {
2645
2645
  /**
2646
2646
  * @param {*} $$componentCtor
2647
2647
  * @param {*} $$slots
@@ -2700,13 +2700,13 @@ typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
2700
2700
  if (this.$$cn = !0, !this.$$c) {
2701
2701
  let e = function(r) {
2702
2702
  return (i) => {
2703
- const s = co("slot");
2703
+ const s = uo("slot");
2704
2704
  r !== "default" && (s.name = r), xe(i, s);
2705
2705
  };
2706
2706
  };
2707
2707
  if (await Promise.resolve(), !this.$$cn || this.$$c)
2708
2708
  return;
2709
- const n = {}, o = Ds(this);
2709
+ const n = {}, o = zs(this);
2710
2710
  for (const r of this.$$s)
2711
2711
  r in o && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), n.default = !0) : n[r] = e(r));
2712
2712
  for (const r of this.attributes) {
@@ -2715,7 +2715,7 @@ typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
2715
2715
  }
2716
2716
  for (const r in this.$$p_d)
2717
2717
  !(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
2718
- this.$$c = Ns({
2718
+ this.$$c = Vs({
2719
2719
  component: this.$$ctor,
2720
2720
  target: this.$$shadowRoot || this,
2721
2721
  props: {
@@ -2723,8 +2723,8 @@ typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
2723
2723
  $$slots: n,
2724
2724
  $$host: this
2725
2725
  }
2726
- }), this.$$me = ss(() => {
2727
- ho(() => {
2726
+ }), this.$$me = cs(() => {
2727
+ po(() => {
2728
2728
  this.$$r = !0;
2729
2729
  for (const r of wn(this.$$c)) {
2730
2730
  if (!this.$$p_d[r]?.reflect) continue;
@@ -2802,7 +2802,7 @@ function _n(t, e, n, o) {
2802
2802
  return e;
2803
2803
  }
2804
2804
  }
2805
- function Ds(t) {
2805
+ function zs(t) {
2806
2806
  const e = {};
2807
2807
  return t.childNodes.forEach((n) => {
2808
2808
  e[
@@ -2811,41 +2811,41 @@ function Ds(t) {
2811
2811
  ] = !0;
2812
2812
  }), e;
2813
2813
  }
2814
- function Vs(t, e, n, o, r, i) {
2815
- let s = class extends Kr {
2814
+ function Hs(t, e, n, o, r, i) {
2815
+ let s = class extends Yr {
2816
2816
  constructor() {
2817
2817
  super(t, n, r), this.$$p_d = e;
2818
2818
  }
2819
2819
  static get observedAttributes() {
2820
2820
  return wn(e).map(
2821
- (l) => (e[l].attribute || l).toLowerCase()
2821
+ (a) => (e[a].attribute || a).toLowerCase()
2822
2822
  );
2823
2823
  }
2824
2824
  };
2825
- return wn(e).forEach((l) => {
2826
- Tn(s.prototype, l, {
2825
+ return wn(e).forEach((a) => {
2826
+ Tn(s.prototype, a, {
2827
2827
  get() {
2828
- return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
2828
+ return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
2829
2829
  },
2830
- set(a) {
2831
- a = _n(l, a, e), this.$$d[l] = a;
2830
+ set(l) {
2831
+ l = _n(a, l, e), this.$$d[a] = l;
2832
2832
  var c = this.$$c;
2833
2833
  if (c) {
2834
- var f = It(c, l)?.get;
2835
- f ? c[l] = a : c.$set({ [l]: a });
2834
+ var f = It(c, a)?.get;
2835
+ f ? c[a] = l : c.$set({ [a]: l });
2836
2836
  }
2837
2837
  }
2838
2838
  });
2839
- }), o.forEach((l) => {
2840
- Tn(s.prototype, l, {
2839
+ }), o.forEach((a) => {
2840
+ Tn(s.prototype, a, {
2841
2841
  get() {
2842
- return this.$$c?.[l];
2842
+ return this.$$c?.[a];
2843
2843
  }
2844
2844
  });
2845
2845
  }), t.element = /** @type {any} */
2846
2846
  s, s;
2847
2847
  }
2848
- class Fs extends Event {
2848
+ class Bs extends Event {
2849
2849
  constructor(n, o, r, i) {
2850
2850
  super("context-request", { bubbles: !0, composed: !0 });
2851
2851
  m(this, "context");
@@ -2855,7 +2855,7 @@ class Fs extends Event {
2855
2855
  this.context = n, this.contextTarget = o, this.callback = r, this.subscribe = i ?? !1;
2856
2856
  }
2857
2857
  }
2858
- class zs {
2858
+ class js {
2859
2859
  constructor(e, n) {
2860
2860
  m(this, "host");
2861
2861
  m(this, "context");
@@ -2879,13 +2879,13 @@ class zs {
2879
2879
  return this.currentValue;
2880
2880
  }
2881
2881
  requestValue() {
2882
- this.host.dispatchEvent(new Fs(this.context, this.host, this.handleValue, this.subscribe));
2882
+ this.host.dispatchEvent(new Bs(this.context, this.host, this.handleValue, this.subscribe));
2883
2883
  }
2884
2884
  }
2885
- const Yr = (t) => t, Hs = Yr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Bs = Yr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2886
- function Xr(t, e, n) {
2885
+ const Xr = (t) => t, qs = Xr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Gs = Xr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2886
+ function Jr(t, e, n) {
2887
2887
  let o = !1;
2888
- const r = new zs(t, {
2888
+ const r = new js(t, {
2889
2889
  context: e,
2890
2890
  subscribe: !0,
2891
2891
  onValue: (c) => {
@@ -2898,40 +2898,40 @@ function Xr(t, e, n) {
2898
2898
  };
2899
2899
  t.addEventListener("context-provider", i);
2900
2900
  let s = 0;
2901
- const l = 200, a = globalThis.setInterval(() => {
2902
- if (o || s >= l) {
2903
- globalThis.clearInterval(a);
2901
+ const a = 200, l = globalThis.setInterval(() => {
2902
+ if (o || s >= a) {
2903
+ globalThis.clearInterval(l);
2904
2904
  return;
2905
2905
  }
2906
2906
  s += 1, r.requestValue();
2907
2907
  }, 50);
2908
2908
  return () => {
2909
- globalThis.clearInterval(a), t.removeEventListener("context-provider", i), r.disconnect();
2909
+ globalThis.clearInterval(l), t.removeEventListener("context-provider", i), r.disconnect();
2910
2910
  };
2911
2911
  }
2912
- function js(t, e) {
2913
- return Xr(t, Hs, e);
2912
+ function Us(t, e) {
2913
+ return Jr(t, qs, e);
2914
2914
  }
2915
- function qs(t, e) {
2916
- return Xr(t, Bs, e);
2915
+ function Ws(t, e) {
2916
+ return Jr(t, Gs, e);
2917
2917
  }
2918
- var qo;
2918
+ var Go;
2919
2919
  (function(t) {
2920
2920
  t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
2921
- })(qo || (qo = {}));
2921
+ })(Go || (Go = {}));
2922
2922
  var Ue;
2923
2923
  (function(t) {
2924
2924
  t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
2925
2925
  })(Ue || (Ue = {}));
2926
- const Gs = {
2926
+ const Ks = {
2927
2927
  tts: "textToSpeech",
2928
2928
  colorScheme: "theme"
2929
2929
  };
2930
- function Us(t) {
2930
+ function Ys(t) {
2931
2931
  const e = t.trim();
2932
- return e ? Gs[e] || e : "";
2932
+ return e ? Ks[e] || e : "";
2933
2933
  }
2934
- const Ws = [
2934
+ const Xs = [
2935
2935
  "assessment",
2936
2936
  "section",
2937
2937
  "item",
@@ -2943,12 +2943,12 @@ function yn(t, e) {
2943
2943
  if (typeof t != "string" || t.trim().length === 0)
2944
2944
  throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
2945
2945
  }
2946
- function Go(t) {
2946
+ function Uo(t) {
2947
2947
  if (yn(t.toolId, "toolId"), yn(t.name, "name"), yn(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function")
2948
2948
  throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
2949
2949
  if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0)
2950
2950
  throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
2951
- const e = t.supportedLevels.find((n) => !Ws.includes(n));
2951
+ const e = t.supportedLevels.find((n) => !Xs.includes(n));
2952
2952
  if (e)
2953
2953
  throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
2954
2954
  if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway")
@@ -2964,7 +2964,7 @@ function Go(t) {
2964
2964
  if (typeof t.renderToolbar != "function")
2965
2965
  throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
2966
2966
  }
2967
- class Ks {
2967
+ class Js {
2968
2968
  constructor() {
2969
2969
  m(this, "tools", /* @__PURE__ */ new Map());
2970
2970
  m(this, "pnpIndex", /* @__PURE__ */ new Map());
@@ -2978,7 +2978,7 @@ class Ks {
2978
2978
  * Normalize a single tool alias to canonical toolId.
2979
2979
  */
2980
2980
  normalizeToolId(e) {
2981
- return Us(e);
2981
+ return Ys(e);
2982
2982
  }
2983
2983
  /**
2984
2984
  * Normalize a list of tool aliases to canonical toolIds.
@@ -2993,7 +2993,7 @@ class Ks {
2993
2993
  * @throws Error if toolId is already registered
2994
2994
  */
2995
2995
  register(e) {
2996
- if (Go(e), this.tools.has(e.toolId))
2996
+ if (Uo(e), this.tools.has(e.toolId))
2997
2997
  throw new Error(`Tool '${e.toolId}' is already registered`);
2998
2998
  if (this.tools.set(e.toolId, e), e.pnpSupportIds)
2999
2999
  for (const n of e.pnpSupportIds)
@@ -3005,7 +3005,7 @@ class Ks {
3005
3005
  * @param registration - New tool registration (must have existing toolId)
3006
3006
  */
3007
3007
  override(e) {
3008
- if (Go(e), !this.tools.has(e.toolId))
3008
+ if (Uo(e), !this.tools.has(e.toolId))
3009
3009
  throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
3010
3010
  const n = this.tools.get(e.toolId);
3011
3011
  if (n.pnpSupportIds)
@@ -3238,30 +3238,30 @@ class Ks {
3238
3238
  return r.renderToolbar(n, i);
3239
3239
  }
3240
3240
  }
3241
- function Jr(t) {
3241
+ function Qr(t) {
3242
3242
  return t.level === "item";
3243
3243
  }
3244
- function Ys(t) {
3244
+ function Qs(t) {
3245
3245
  return t.level === "passage";
3246
3246
  }
3247
- function Xs(t) {
3247
+ function Zs(t) {
3248
3248
  return t.level === "rubric";
3249
3249
  }
3250
- function Qr(t) {
3250
+ function Zr(t) {
3251
3251
  return t.level === "element";
3252
3252
  }
3253
- function mo(t) {
3254
- if (Qr(t)) {
3253
+ function bo(t) {
3254
+ if (Zr(t)) {
3255
3255
  const e = t.item.config;
3256
3256
  if (!e)
3257
3257
  return "";
3258
- const n = [], o = (a) => a.replace(/<[^>]*>/g, " ").trim(), r = e.elements?.[t.elementId];
3258
+ const n = [], o = (l) => l.replace(/<[^>]*>/g, " ").trim(), r = e.elements?.[t.elementId];
3259
3259
  r && typeof r == "string" && n.push(o(r));
3260
- const i = e.models, l = (Array.isArray(i) ? i : i && typeof i == "object" ? Object.values(i) : []).find((a) => a && typeof a == "object" && a.id === t.elementId);
3261
- if (l) {
3262
- for (const a of Object.values(l))
3263
- if (typeof a == "string" && n.push(o(a)), Array.isArray(a)) {
3264
- for (const c of a)
3260
+ const i = e.models, a = (Array.isArray(i) ? i : i && typeof i == "object" ? Object.values(i) : []).find((l) => l && typeof l == "object" && l.id === t.elementId);
3261
+ if (a) {
3262
+ for (const l of Object.values(a))
3263
+ if (typeof l == "string" && n.push(o(l)), Array.isArray(l)) {
3264
+ for (const c of l)
3265
3265
  if (c && typeof c == "object")
3266
3266
  for (const f of Object.values(c))
3267
3267
  typeof f == "string" && n.push(o(f));
@@ -3269,20 +3269,20 @@ function mo(t) {
3269
3269
  }
3270
3270
  return n.filter(Boolean).join(" ").trim();
3271
3271
  }
3272
- if (Jr(t)) {
3272
+ if (Qr(t)) {
3273
3273
  const e = t.item;
3274
3274
  if (!e?.config)
3275
3275
  return "";
3276
- const n = e.config, o = [], r = (a) => a.replace(/<[^>]*>/g, " ").trim();
3276
+ const n = e.config, o = [], r = (l) => l.replace(/<[^>]*>/g, " ").trim();
3277
3277
  typeof n.markup == "string" && o.push(r(n.markup));
3278
3278
  const i = n.elements;
3279
3279
  if (i && typeof i == "object")
3280
- for (const a of Object.values(i))
3281
- typeof a == "string" && o.push(r(a));
3282
- const s = n.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
3283
- for (const a of l)
3284
- if (!(!a || typeof a != "object")) {
3285
- for (const c of Object.values(a))
3280
+ for (const l of Object.values(i))
3281
+ typeof l == "string" && o.push(r(l));
3282
+ const s = n.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
3283
+ for (const l of a)
3284
+ if (!(!l || typeof l != "object")) {
3285
+ for (const c of Object.values(l))
3286
3286
  if (typeof c == "string" && o.push(r(c)), Array.isArray(c)) {
3287
3287
  for (const f of c)
3288
3288
  if (f && typeof f == "object")
@@ -3292,20 +3292,20 @@ function mo(t) {
3292
3292
  }
3293
3293
  return o.filter(Boolean).join(" ").trim();
3294
3294
  }
3295
- if (Ys(t)) {
3295
+ if (Qs(t)) {
3296
3296
  const e = t.passage;
3297
3297
  if (!e?.config)
3298
3298
  return "";
3299
- const n = e.config, o = [], r = (a) => a.replace(/<[^>]*>/g, " ").trim();
3299
+ const n = e.config, o = [], r = (l) => l.replace(/<[^>]*>/g, " ").trim();
3300
3300
  typeof n.markup == "string" && o.push(r(n.markup)), typeof n.content == "string" && o.push(r(n.content)), typeof n.prompt == "string" && o.push(r(n.prompt));
3301
3301
  const i = n.elements;
3302
3302
  if (i && typeof i == "object")
3303
- for (const a of Object.values(i))
3304
- typeof a == "string" && o.push(r(a));
3305
- const s = n.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
3306
- for (const a of l)
3307
- if (!(!a || typeof a != "object")) {
3308
- for (const c of Object.values(a))
3303
+ for (const l of Object.values(i))
3304
+ typeof l == "string" && o.push(r(l));
3305
+ const s = n.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
3306
+ for (const l of a)
3307
+ if (!(!l || typeof l != "object")) {
3308
+ for (const c of Object.values(l))
3309
3309
  if (typeof c == "string" && o.push(r(c)), Array.isArray(c)) {
3310
3310
  for (const f of c)
3311
3311
  if (f && typeof f == "object")
@@ -3315,14 +3315,14 @@ function mo(t) {
3315
3315
  }
3316
3316
  return o.filter(Boolean).join(" ").trim();
3317
3317
  }
3318
- if (Xs(t)) {
3318
+ if (Zs(t)) {
3319
3319
  const e = t.rubricBlock;
3320
3320
  return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
3321
3321
  }
3322
3322
  return "";
3323
3323
  }
3324
3324
  function Pn(t) {
3325
- const e = mo(t);
3325
+ const e = bo(t);
3326
3326
  return [
3327
3327
  /<math[>\s]/i,
3328
3328
  // MathML
@@ -3338,7 +3338,7 @@ function Pn(t) {
3338
3338
  // Simple arithmetic
3339
3339
  ].some((o) => o.test(e));
3340
3340
  }
3341
- function Js(t) {
3341
+ function el(t) {
3342
3342
  const e = [
3343
3343
  "pie-multiple-choice",
3344
3344
  "pie-inline-choice",
@@ -3347,7 +3347,7 @@ function Js(t) {
3347
3347
  "inline-choice",
3348
3348
  "select-text"
3349
3349
  ];
3350
- if (Qr(t)) {
3350
+ if (Zr(t)) {
3351
3351
  const n = t.item.config;
3352
3352
  if (!n?.models)
3353
3353
  return !1;
@@ -3357,7 +3357,7 @@ function Js(t) {
3357
3357
  const i = r.element || "";
3358
3358
  return e.includes(i);
3359
3359
  }
3360
- if (Jr(t)) {
3360
+ if (Qr(t)) {
3361
3361
  const n = t.item.config?.models;
3362
3362
  return (Array.isArray(n) ? n : n && typeof n == "object" ? Object.values(n) : []).some((r) => {
3363
3363
  if (!r || typeof r != "object")
@@ -3369,10 +3369,10 @@ function Js(t) {
3369
3369
  return !1;
3370
3370
  }
3371
3371
  function xn(t) {
3372
- return mo(t).trim().length >= 10;
3372
+ return bo(t).trim().length >= 10;
3373
3373
  }
3374
- function Qs(t) {
3375
- const e = mo(t);
3374
+ function tl(t) {
3375
+ const e = bo(t);
3376
3376
  return [
3377
3377
  /chemistry|chemical|element|atom|molecule|compound/i,
3378
3378
  /periodic\s+table/i,
@@ -3384,25 +3384,25 @@ function Qs(t) {
3384
3384
  /physics|force|energy|velocity|acceleration/i
3385
3385
  ].some((o) => o.test(e));
3386
3386
  }
3387
- const Zs = [
3387
+ const nl = [
3388
3388
  "assessment",
3389
3389
  "section",
3390
3390
  "item",
3391
3391
  "passage",
3392
3392
  "rubric"
3393
- ], el = new Set(Zs);
3394
- function tl(t) {
3395
- return el.has(t);
3393
+ ], ol = new Set(nl);
3394
+ function rl(t) {
3395
+ return ol.has(t);
3396
3396
  }
3397
- function bo(t, e, n) {
3397
+ function _o(t, e, n) {
3398
3398
  const o = t.trim(), r = n.trim();
3399
3399
  if (!o || !r)
3400
3400
  throw new Error("Tool instance ids require non-empty tool and scope ids");
3401
- if (!tl(e))
3401
+ if (!rl(e))
3402
3402
  throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
3403
3403
  return `${o}:${e}:${r}`;
3404
3404
  }
3405
- class nl {
3405
+ class il {
3406
3406
  constructor() {
3407
3407
  m(this, "providerId", "desmos-calculator");
3408
3408
  m(this, "providerName", "Desmos Calculator");
@@ -3488,7 +3488,33 @@ class nl {
3488
3488
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
3489
3489
  }
3490
3490
  }
3491
- class ol {
3491
+ const sl = (t, e) => {
3492
+ const n = e?.useSentenceSegmenter !== !1;
3493
+ try {
3494
+ if (!n)
3495
+ throw new Error("Segmenter disabled by policy");
3496
+ const a = globalThis.Intl?.Segmenter;
3497
+ if (typeof a == "function") {
3498
+ const l = new a(e?.locale, {
3499
+ granularity: "sentence"
3500
+ }), c = Array.from(l.segment(t)).map((f) => ({
3501
+ text: f.segment,
3502
+ offset: f.index
3503
+ })).filter((f) => f.text.trim().length > 0);
3504
+ if (c.length > 0)
3505
+ return c;
3506
+ }
3507
+ } catch {
3508
+ }
3509
+ const o = /[^.!?]+(?:[.!?]+|$)/g, r = t.match(o) || [t], i = [];
3510
+ let s = 0;
3511
+ for (const a of r) {
3512
+ const l = t.indexOf(a, s);
3513
+ l !== -1 && (i.push({ text: a, offset: l }), s = l + a.length);
3514
+ }
3515
+ return i.length > 0 ? i : [{ text: t, offset: 0 }];
3516
+ };
3517
+ class ll {
3492
3518
  constructor() {
3493
3519
  m(this, "providerId", "browser");
3494
3520
  m(this, "providerName", "Browser Speech Synthesis");
@@ -3499,7 +3525,7 @@ class ol {
3499
3525
  throw new Error("BrowserTTSProvider requires browser environment");
3500
3526
  if (!("speechSynthesis" in window))
3501
3527
  throw new Error("Browser does not support Speech Synthesis API");
3502
- return new rl(e);
3528
+ return new al(e);
3503
3529
  }
3504
3530
  supportsFeature(e) {
3505
3531
  return !0;
@@ -3517,7 +3543,7 @@ class ol {
3517
3543
  destroy() {
3518
3544
  }
3519
3545
  }
3520
- class rl {
3546
+ class al {
3521
3547
  constructor(e) {
3522
3548
  m(this, "utterance", null);
3523
3549
  m(this, "config", null);
@@ -3561,17 +3587,17 @@ class rl {
3561
3587
  return [{ text: e, offset: 0 }];
3562
3588
  const o = this.segmentSentences(e), r = [];
3563
3589
  let i = "", s = 0;
3564
- for (const l of o) {
3565
- const a = l.text.trim();
3566
- if (!a)
3590
+ for (const a of o) {
3591
+ const l = a.text.trim();
3592
+ if (!l)
3567
3593
  continue;
3568
- const c = l.text.search(/\S/), f = l.offset + (c === -1 ? 0 : c);
3594
+ const c = a.text.search(/\S/), f = a.offset + (c === -1 ? 0 : c);
3569
3595
  if (!i) {
3570
- i = a, s = f;
3596
+ i = l, s = f;
3571
3597
  continue;
3572
3598
  }
3573
- const d = `${i} ${a}`;
3574
- d.length <= 260 ? i = d : (r.push({ text: i, offset: s }), i = a, s = f);
3599
+ const d = `${i} ${l}`;
3600
+ d.length <= 260 ? i = d : (r.push({ text: i, offset: s }), i = l, s = f);
3575
3601
  }
3576
3602
  return i && r.push({ text: i, offset: s }), r.length ? r : [{ text: e, offset: 0 }];
3577
3603
  }
@@ -3587,30 +3613,11 @@ class rl {
3587
3613
  };
3588
3614
  }
3589
3615
  segmentSentences(e) {
3590
- try {
3591
- const s = this.getSegmentationPolicy();
3592
- if (!s.useSentenceSegmenter)
3593
- throw new Error("Segmenter disabled by policy");
3594
- const l = globalThis.Intl?.Segmenter;
3595
- if (typeof l == "function") {
3596
- const a = new l(s.locale, {
3597
- granularity: "sentence"
3598
- }), f = Array.from(a.segment(e)).map((d) => ({
3599
- text: d.segment,
3600
- offset: d.index
3601
- })).filter((d) => d.text.trim().length > 0);
3602
- if (f.length > 0)
3603
- return f;
3604
- }
3605
- } catch {
3606
- }
3607
- const n = /[^.!?]+(?:[.!?]+|$)/g, o = e.match(n) || [e], r = [];
3608
- let i = 0;
3609
- for (const s of o) {
3610
- const l = e.indexOf(s, i);
3611
- l !== -1 && (r.push({ text: s, offset: l }), i = l + s.length);
3612
- }
3613
- return r.length > 0 ? r : [{ text: e, offset: 0 }];
3616
+ const n = this.getSegmentationPolicy();
3617
+ return sl(e, {
3618
+ locale: n.locale,
3619
+ useSentenceSegmenter: n.useSentenceSegmenter
3620
+ });
3614
3621
  }
3615
3622
  inferWordLength(e, n) {
3616
3623
  const o = Math.max(0, Math.min(n, Math.max(0, e.length - 1)));
@@ -3623,8 +3630,8 @@ class rl {
3623
3630
  return;
3624
3631
  }
3625
3632
  if (this.utterance = new SpeechSynthesisUtterance(e), this.config?.voice) {
3626
- const l = speechSynthesis.getVoices().find((a) => a.name === this.config.voice);
3627
- l && (this.utterance.voice = l);
3633
+ const a = speechSynthesis.getVoices().find((l) => l.name === this.config.voice);
3634
+ a && (this.utterance.voice = a);
3628
3635
  }
3629
3636
  this.config?.rate && (this.utterance.rate = this.config.rate), this.config?.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
3630
3637
  o === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
@@ -3651,7 +3658,7 @@ class rl {
3651
3658
  }, this.utterance.onboundary = (s) => {
3652
3659
  if (o !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", s.name, "charIndex:", s.charIndex, "charLength:", s.charLength), s.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence")
3653
3660
  return;
3654
- const l = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), a = Number(s.charLength || 0), c = this.inferWordLength(e, l), f = Number.isFinite(a) && a > 0 && a <= 80 && l + a <= e.length ? a : c, d = e.substring(l, Math.min(e.length, l + f)).trim(), g = n + l;
3661
+ const a = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), l = Number(s.charLength || 0), c = this.inferWordLength(e, a), f = Number.isFinite(l) && l > 0 && l <= 80 && a + l <= e.length ? l : c, d = e.substring(a, Math.min(e.length, a + f)).trim(), g = n + a;
3655
3662
  console.log("[BrowserProvider] Calling onWordBoundary with word:", d, "at position:", g), this.onWordBoundary(d, g, f);
3656
3663
  }, speechSynthesis.speak(this.utterance);
3657
3664
  });
@@ -3682,7 +3689,7 @@ class rl {
3682
3689
  });
3683
3690
  }
3684
3691
  }
3685
- class il {
3692
+ class cl {
3686
3693
  /**
3687
3694
  * Create TTS tool provider
3688
3695
  *
@@ -3731,7 +3738,7 @@ class il {
3731
3738
  async _initializeBrowserTTS(e) {
3732
3739
  if (typeof window > "u" || !("speechSynthesis" in window))
3733
3740
  throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
3734
- this.ttsProvider = new ol(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
3741
+ this.ttsProvider = new ll(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
3735
3742
  }
3736
3743
  /**
3737
3744
  * Initialize server-based TTS (Polly, Google)
@@ -3797,7 +3804,7 @@ class il {
3797
3804
  this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
3798
3805
  }
3799
3806
  }
3800
- const sl = /* @__PURE__ */ new Set([
3807
+ const ul = /* @__PURE__ */ new Set([
3801
3808
  "annotation-xml",
3802
3809
  "color-profile",
3803
3810
  "font-face",
@@ -3806,7 +3813,7 @@ const sl = /* @__PURE__ */ new Set([
3806
3813
  "font-face-format",
3807
3814
  "font-face-name",
3808
3815
  "missing-glyph"
3809
- ]), ll = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, al = (t, e = "custom element tag") => {
3816
+ ]), fl = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, dl = (t, e = "custom element tag") => {
3810
3817
  if (!t || typeof t != "string")
3811
3818
  throw new Error(`Invalid ${e}: expected a non-empty string`);
3812
3819
  const n = t.trim();
@@ -3816,12 +3823,12 @@ const sl = /* @__PURE__ */ new Set([
3816
3823
  throw new Error(`Invalid ${e} "${n}": custom element names must be lowercase`);
3817
3824
  if (!n.includes("-"))
3818
3825
  throw new Error(`Invalid ${e} "${n}": custom element names must include a hyphen`);
3819
- if (sl.has(n))
3826
+ if (ul.has(n))
3820
3827
  throw new Error(`Invalid ${e} "${n}": this name is reserved by the HTML spec`);
3821
- if (!ll.test(n))
3828
+ if (!fl.test(n))
3822
3829
  throw new Error(`Invalid ${e} "${n}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3823
3830
  return n;
3824
- }, Zr = {
3831
+ }, ei = {
3825
3832
  calculator: "pie-tool-calculator",
3826
3833
  textToSpeech: "pie-tool-text-to-speech",
3827
3834
  ruler: "pie-tool-ruler",
@@ -3834,20 +3841,20 @@ const sl = /* @__PURE__ */ new Set([
3834
3841
  annotationToolbar: "pie-tool-annotation-toolbar",
3835
3842
  graph: "pie-tool-graph",
3836
3843
  periodicTable: "pie-tool-periodic-table"
3837
- }, cl = (t, e) => {
3838
- const n = e?.toolTagMap?.[t] ?? Zr[t] ?? t;
3839
- return al(n, `tool component tag for "${t}"`);
3840
- }, ul = (t) => document.createElement(t), Le = (t, e, n, o) => {
3841
- const r = cl(t, o), s = o?.toolComponentFactories?.[t] ?? o?.toolComponentFactory;
3842
- return s ? s({ toolId: t, tagName: r, context: e, toolbarContext: n }) : ul(r);
3843
- }, fl = {
3844
+ }, hl = (t, e) => {
3845
+ const n = e?.toolTagMap?.[t] ?? ei[t] ?? t;
3846
+ return dl(n, `tool component tag for "${t}"`);
3847
+ }, pl = (t) => document.createElement(t), Le = (t, e, n, o) => {
3848
+ const r = hl(t, o), s = o?.toolComponentFactories?.[t] ?? o?.toolComponentFactory;
3849
+ return s ? s({ toolId: t, tagName: r, context: e, toolbarContext: n }) : pl(r);
3850
+ }, vl = {
3844
3851
  toolId: "calculator",
3845
3852
  name: "Calculator",
3846
3853
  description: "Multi-type calculator (basic, scientific, graphing)",
3847
3854
  icon: "calculator",
3848
3855
  provider: {
3849
3856
  getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
3850
- createProvider: () => new nl(),
3857
+ createProvider: () => new il(),
3851
3858
  getInitConfig: (t) => t?.provider?.init ?? {},
3852
3859
  getAuthFetcher: (t) => {
3853
3860
  const e = t?.provider?.runtime?.authFetcher;
@@ -3887,7 +3894,7 @@ const sl = /* @__PURE__ */ new Set([
3887
3894
  return Pn(t);
3888
3895
  },
3889
3896
  renderToolbar(t, e) {
3890
- const n = bo(this.toolId, e.scope.level, e.scope.scopeId), o = e.componentOverrides, r = Le(this.toolId, t, e, o);
3897
+ const n = _o(this.toolId, e.scope.level, e.scope.scopeId), o = e.componentOverrides, r = Le(this.toolId, t, e, o);
3891
3898
  r.setAttribute("tool-id", n), r.toolkitCoordinator = e.toolkitCoordinator;
3892
3899
  const i = {
3893
3900
  toolId: this.toolId,
@@ -3920,21 +3927,48 @@ const sl = /* @__PURE__ */ new Set([
3920
3927
  ],
3921
3928
  button: i,
3922
3929
  sync: () => {
3923
- const l = e.isToolVisible(n);
3924
- i.active = l, i.ariaLabel = l ? "Close scientific calculator" : "Open scientific calculator", i.tooltip = l ? "Close calculator" : "Calculator", s !== l && (r.visible = l, s = l), r.toolkitCoordinator !== e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
3930
+ const a = e.isToolVisible(n);
3931
+ i.active = a, i.ariaLabel = a ? "Close scientific calculator" : "Open scientific calculator", i.tooltip = a ? "Close calculator" : "Calculator", s !== a && (r.visible = a, s = a), r.toolkitCoordinator !== e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
3925
3932
  },
3926
- subscribeActive: (l) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3927
- l(e.isToolVisible(n));
3933
+ subscribeActive: (a) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3934
+ a(e.isToolVisible(n));
3928
3935
  }) : () => {
3929
3936
  }
3930
3937
  };
3931
3938
  }
3932
- }, Kt = /* @__PURE__ */ new Map(), dl = "__pieToolElementUnmount", Uo = (t) => t && typeof t == "object" ? t : {}, Hn = (t) => {
3933
- const e = Uo(t), n = Uo(t?.settings);
3939
+ }, Wo = (t) => t && typeof t == "object" ? t : {}, Hn = (t) => {
3940
+ const e = Wo(t), n = Wo(t?.settings);
3934
3941
  return { ...e, ...n };
3935
- }, Wo = Object.freeze([1.5, 2]), hl = (t) => {
3942
+ }, oo = (t) => t.backend || "browser", ti = (t, e) => t.serverProvider || t.provider || (e === "polly" || e === "google" ? e : void 0), ni = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), gl = (t) => {
3943
+ const e = oo(t), n = ti(t, e), o = ni(t, n);
3944
+ return {
3945
+ voice: t.defaultVoice,
3946
+ rate: t.rate,
3947
+ pitch: t.pitch,
3948
+ providerOptions: {
3949
+ ...t.language ? { locale: t.language } : {},
3950
+ ...e === "polly" && t.engine ? { engine: t.engine } : {},
3951
+ ...e === "polly" && typeof t.sampleRate == "number" ? { sampleRate: t.sampleRate } : {},
3952
+ ...e === "polly" && t.format ? { format: t.format } : {},
3953
+ ...e === "polly" ? {
3954
+ speechMarkTypes: t.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
3955
+ } : {},
3956
+ ...o === "custom" && typeof t.cache == "boolean" ? { cache: t.cache } : {},
3957
+ ...o === "custom" && t.speedRate ? { speedRate: t.speedRate } : {},
3958
+ ...o === "custom" && t.lang_id ? { lang_id: t.lang_id } : {}
3959
+ },
3960
+ apiEndpoint: t.apiEndpoint,
3961
+ provider: n,
3962
+ language: t.language,
3963
+ transportMode: o,
3964
+ endpointMode: t.endpointMode,
3965
+ endpointValidationMode: t.endpointValidationMode,
3966
+ includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
3967
+ validateEndpoint: t.validateEndpoint
3968
+ };
3969
+ }, Kt = /* @__PURE__ */ new Map(), ml = "__pieToolElementUnmount", Ko = Object.freeze([1.5, 2]), bl = (t) => {
3936
3970
  if (!Array.isArray(t))
3937
- return [...Wo];
3971
+ return [...Ko];
3938
3972
  const e = /* @__PURE__ */ new Set();
3939
3973
  for (const n of t) {
3940
3974
  if (typeof n != "number" || !Number.isFinite(n) || n <= 0)
@@ -3942,8 +3976,8 @@ const sl = /* @__PURE__ */ new Set([
3942
3976
  const o = Math.round(n * 100) / 100;
3943
3977
  o !== 1 && e.add(o);
3944
3978
  }
3945
- return e.size ? Array.from(e) : [...Wo];
3946
- }, pl = {
3979
+ return e.size ? Array.from(e) : [...Ko];
3980
+ }, _l = {
3947
3981
  toolId: "textToSpeech",
3948
3982
  name: "Text to Speech",
3949
3983
  description: "Read content aloud",
@@ -3952,33 +3986,15 @@ const sl = /* @__PURE__ */ new Set([
3952
3986
  getProviderId: () => "tts",
3953
3987
  createProvider: (t) => {
3954
3988
  const e = Hn(t);
3955
- return new il(e.backend || "browser");
3989
+ return new cl(oo(e));
3956
3990
  },
3957
3991
  getInitConfig: (t) => {
3958
- const e = Hn(t), n = e.backend || "browser", o = e.serverProvider || e.provider || (n === "polly" || n === "google" ? n : void 0), r = e.transportMode || (o === "custom" ? "custom" : "pie");
3992
+ const e = Hn(t), n = oo(e), o = ti(e, n), r = ni(e, o);
3959
3993
  return {
3960
3994
  backend: n,
3961
- apiEndpoint: e.apiEndpoint,
3962
3995
  serverProvider: o,
3963
- providerOptions: n === "polly" || r === "custom" ? {
3964
- ...n === "polly" && e.engine ? { engine: e.engine } : {},
3965
- ...n === "polly" && typeof e.sampleRate == "number" ? { sampleRate: e.sampleRate } : {},
3966
- ...n === "polly" && e.format ? { format: e.format } : {},
3967
- ...n === "polly" ? {
3968
- speechMarkTypes: e.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
3969
- } : {},
3970
- ...r === "custom" && typeof e.cache == "boolean" ? { cache: e.cache } : {},
3971
- ...r === "custom" && e.speedRate ? { speedRate: e.speedRate } : {},
3972
- ...r === "custom" && e.lang_id ? { lang_id: e.lang_id } : {}
3973
- } : void 0,
3974
- voice: e.defaultVoice,
3975
- rate: e.rate,
3976
- pitch: e.pitch,
3977
3996
  transportMode: r,
3978
- endpointMode: e.endpointMode,
3979
- endpointValidationMode: e.endpointValidationMode,
3980
- includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
3981
- validateEndpoint: e.validateEndpoint
3997
+ ...gl(e)
3982
3998
  };
3983
3999
  },
3984
4000
  getAuthFetcher: (t) => {
@@ -4013,13 +4029,13 @@ const sl = /* @__PURE__ */ new Set([
4013
4029
  renderToolbar(t, e) {
4014
4030
  const n = () => {
4015
4031
  const s = Hn(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0);
4016
- return hl(s.speedOptions);
4017
- }, o = bo(this.toolId, e.scope.level, e.scope.scopeId), r = () => {
4032
+ return bl(s.speedOptions);
4033
+ }, o = _o(this.toolId, e.scope.level, e.scope.scopeId), r = () => {
4018
4034
  const s = e.ui?.size;
4019
4035
  return s === "sm" || s === "lg" ? s : "md";
4020
4036
  }, i = () => {
4021
4037
  let s = Kt.get(o);
4022
- return s && typeof s.isConnected == "boolean" && !s.isConnected && (Kt.delete(o), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[dl] = () => {
4038
+ return s && typeof s.isConnected == "boolean" && !s.isConnected && (Kt.delete(o), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[ml] = () => {
4023
4039
  Kt.get(o) === s && Kt.delete(o);
4024
4040
  }, Kt.set(o, s)), s.setAttribute("tool-id", o), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = n(), s;
4025
4041
  };
@@ -4034,15 +4050,15 @@ const sl = /* @__PURE__ */ new Set([
4034
4050
  ],
4035
4051
  sync: () => {
4036
4052
  const s = i();
4037
- s.setAttribute("tool-id", o), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = n(), e.ensureTTSReady && e.ensureTTSReady().catch((l) => {
4038
- console.error("[ttsToolRegistration] Failed to initialize TTS service:", l);
4053
+ s.setAttribute("tool-id", o), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = n(), e.ensureTTSReady && e.ensureTTSReady().catch((a) => {
4054
+ console.error("[ttsToolRegistration] Failed to initialize TTS service:", a);
4039
4055
  });
4040
4056
  }
4041
4057
  };
4042
4058
  }
4043
4059
  };
4044
4060
  function He(t, e) {
4045
- const n = bo(t, e.scope.level, e.scope.scopeId);
4061
+ const n = _o(t, e.scope.level, e.scope.scopeId);
4046
4062
  return {
4047
4063
  fullToolId: n,
4048
4064
  isActive: () => e.isToolVisible(n),
@@ -4056,7 +4072,7 @@ function Be(t) {
4056
4072
  const e = t.isActive();
4057
4073
  t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
4058
4074
  }
4059
- const vl = {
4075
+ const yl = {
4060
4076
  toolId: "ruler",
4061
4077
  name: "Ruler",
4062
4078
  description: "On-screen ruler for measurements",
@@ -4102,7 +4118,7 @@ const vl = {
4102
4118
  subscribeActive: n.subscribeActive
4103
4119
  };
4104
4120
  }
4105
- }, gl = {
4121
+ }, wl = {
4106
4122
  toolId: "protractor",
4107
4123
  name: "Protractor",
4108
4124
  description: "On-screen protractor for angle measurements",
@@ -4148,7 +4164,7 @@ const vl = {
4148
4164
  subscribeActive: n.subscribeActive
4149
4165
  };
4150
4166
  }
4151
- }, ml = {
4167
+ }, Tl = {
4152
4168
  toolId: "answerEliminator",
4153
4169
  name: "Answer Eliminator",
4154
4170
  description: "Strike through answer choices",
@@ -4171,7 +4187,7 @@ const vl = {
4171
4187
  * Pass 2: Answer eliminator is relevant only for choice-based questions
4172
4188
  */
4173
4189
  isVisibleInContext(t) {
4174
- return Js(t);
4190
+ return el(t);
4175
4191
  },
4176
4192
  renderToolbar(t, e) {
4177
4193
  const n = He(this.toolId, e), o = e.componentOverrides ?? {}, r = Le(this.toolId, t, e, o);
@@ -4202,7 +4218,7 @@ const vl = {
4202
4218
  subscribeActive: n.subscribeActive
4203
4219
  };
4204
4220
  }
4205
- }, bl = {
4221
+ }, Il = {
4206
4222
  toolId: "highlighter",
4207
4223
  name: "Highlighter",
4208
4224
  description: "Highlight text",
@@ -4246,7 +4262,7 @@ const vl = {
4246
4262
  subscribeActive: n.subscribeActive
4247
4263
  };
4248
4264
  }
4249
- }, _l = {
4265
+ }, Sl = {
4250
4266
  toolId: "lineReader",
4251
4267
  name: "Line Reader",
4252
4268
  description: "Reading guide overlay",
@@ -4298,7 +4314,7 @@ const vl = {
4298
4314
  subscribeActive: n.subscribeActive
4299
4315
  };
4300
4316
  }
4301
- }, yl = {
4317
+ }, Al = {
4302
4318
  toolId: "theme",
4303
4319
  name: "Theme",
4304
4320
  description: "Accessible themes and contrast",
@@ -4369,7 +4385,7 @@ const vl = {
4369
4385
  subscribeActive: n.subscribeActive
4370
4386
  };
4371
4387
  }
4372
- }, wl = yl, Tl = {
4388
+ }, El = Al, $l = {
4373
4389
  toolId: "annotationToolbar",
4374
4390
  name: "Highlighter",
4375
4391
  description: "Highlight and annotate text",
@@ -4423,7 +4439,7 @@ const vl = {
4423
4439
  subscribeActive: n.subscribeActive
4424
4440
  };
4425
4441
  }
4426
- }, Il = {
4442
+ }, kl = {
4427
4443
  toolId: "graph",
4428
4444
  name: "Graph",
4429
4445
  description: "Graphing calculator and coordinate plane",
@@ -4488,7 +4504,7 @@ const vl = {
4488
4504
  subscribeActive: n.subscribeActive
4489
4505
  };
4490
4506
  }
4491
- }, Al = {
4507
+ }, Cl = {
4492
4508
  toolId: "periodicTable",
4493
4509
  name: "Periodic Table",
4494
4510
  description: "Chemistry periodic table reference",
@@ -4509,7 +4525,7 @@ const vl = {
4509
4525
  * Pass 2: Periodic table is relevant when science content is present
4510
4526
  */
4511
4527
  isVisibleInContext(t) {
4512
- return Qs(t);
4528
+ return tl(t);
4513
4529
  },
4514
4530
  renderToolbar(t, e) {
4515
4531
  const n = He(this.toolId, e), o = {
@@ -4551,53 +4567,53 @@ const vl = {
4551
4567
  subscribeActive: n.subscribeActive
4552
4568
  };
4553
4569
  }
4554
- }, Sl = [
4555
- fl,
4556
- pl,
4570
+ }, Rl = [
4557
4571
  vl,
4558
- gl,
4559
- ml,
4560
- bl,
4561
4572
  _l,
4573
+ yl,
4562
4574
  wl,
4563
4575
  Tl,
4564
4576
  Il,
4565
- Al
4577
+ Sl,
4578
+ El,
4579
+ $l,
4580
+ kl,
4581
+ Cl
4566
4582
  ];
4567
- function El(t = {}) {
4568
- const e = new Ks(), n = {
4583
+ function Ol(t = {}) {
4584
+ const e = new Js(), n = {
4569
4585
  toolTagMap: {
4570
- ...Zr,
4586
+ ...ei,
4571
4587
  ...t.toolTagMap || {}
4572
4588
  },
4573
4589
  toolComponentFactory: t.toolComponentFactory,
4574
4590
  toolComponentFactories: t.toolComponentFactories
4575
4591
  }, o = (r) => t.overrides?.[r.toolId] || r;
4576
- return t.includePackagedTools && $l(e, {
4592
+ return t.includePackagedTools && Ll(e, {
4577
4593
  toolIds: t.toolIds,
4578
4594
  applyOverrides: o
4579
4595
  }), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(n), e;
4580
4596
  }
4581
- function $l(t, e = {}) {
4597
+ function Ll(t, e = {}) {
4582
4598
  const n = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, o = e.applyOverrides || ((r) => r);
4583
- for (const r of Sl)
4599
+ for (const r of Rl)
4584
4600
  n && !n.has(r.toolId) || t.register(o(r));
4585
4601
  }
4586
- function kl(t = {}) {
4587
- return El({
4602
+ function Pl(t = {}) {
4603
+ return Ol({
4588
4604
  ...t,
4589
4605
  includePackagedTools: !0
4590
4606
  });
4591
4607
  }
4592
- function Cl() {
4593
- const t = kl(), e = /* @__PURE__ */ new Set();
4608
+ function xl() {
4609
+ const t = Pl(), e = /* @__PURE__ */ new Set();
4594
4610
  for (const n of t.getAllTools())
4595
4611
  for (const o of n.pnpSupportIds || [])
4596
4612
  e.add(o);
4597
4613
  return [...e].sort();
4598
4614
  }
4599
- Cl();
4600
- const Rl = {
4615
+ xl();
4616
+ const Ml = {
4601
4617
  /**
4602
4618
  * Visual accessibility features
4603
4619
  * For students with low vision, color blindness, or visual processing needs
@@ -4768,17 +4784,17 @@ const Rl = {
4768
4784
  tutorialAvailable: "tutorialAvailable"
4769
4785
  }
4770
4786
  };
4771
- Object.values(Rl).flatMap((t) => Object.values(t));
4772
- var Ko;
4787
+ Object.values(Ml).flatMap((t) => Object.values(t));
4788
+ var Yo;
4773
4789
  (function(t) {
4774
4790
  t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
4775
- })(Ko || (Ko = {}));
4776
- var Yo;
4791
+ })(Yo || (Yo = {}));
4792
+ var Xo;
4777
4793
  (function(t) {
4778
4794
  t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
4779
- })(Yo || (Yo = {}));
4780
- var Ol = /* @__PURE__ */ ot('<link rel="stylesheet" href="./highlights.css"/>'), Ll = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), Pl = /* @__PURE__ */ ot('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), xl = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), Nl = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Ml = /* @__PURE__ */ ot('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Dl = /* @__PURE__ */ ot('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), Vl = /* @__PURE__ */ ot('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1);
4781
- const Fl = {
4795
+ })(Xo || (Xo = {}));
4796
+ var Nl = /* @__PURE__ */ ot('<link rel="stylesheet" href="./highlights.css"/>'), Dl = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), Vl = /* @__PURE__ */ ot('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), Fl = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), zl = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Hl = /* @__PURE__ */ ot('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Bl = /* @__PURE__ */ ot('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), jl = /* @__PURE__ */ ot('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1);
4797
+ const ql = {
4782
4798
  hash: "svelte-g8qu62",
4783
4799
  code: `.pie-tool-annotation-toolbar.svelte-g8qu62 {position:fixed;z-index:4200;display:flex;gap:0.25rem;padding:0.5rem;border-radius:0.5rem;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border, #d1d5db);box-shadow:0 10px 25px -8px rgb(0 0 0 / 0.3);user-select:none;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid color-mix(in srgb, var(--pie-border-dark, #111827) 20%, transparent);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:color-mix(in srgb, var(--pie-border-dark, #111827) 45%, transparent);box-shadow:0 2px 8px rgb(0 0 0 / 0.15);}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar.svelte-g8qu62 .divider-horizontal:where(.svelte-g8qu62) {height:auto;width:1px;background-color:color-mix(in srgb, var(--pie-border, #d1d5db) 70%, transparent);}
4784
4800
 
@@ -4786,10 +4802,10 @@ const Fl = {
4786
4802
 
4787
4803
  /* Button styling */.pie-tool-annotation-toolbar__button.svelte-g8qu62 {display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.4rem 0.55rem;border:1px solid var(--pie-button-border, #d1d5db);border-radius:0.4rem;background:var(--pie-button-bg, #fff);color:var(--pie-button-color, var(--pie-text, #111827));cursor:pointer;}.pie-tool-annotation-toolbar__button--icon.svelte-g8qu62 {min-width:2rem;min-height:2rem;padding:0.45rem;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:hover {background:var(--pie-button-hover-bg, #f9fafb);color:var(--pie-button-hover-color, var(--pie-text, #111827));border-color:var(--pie-button-hover-border, #9ca3af);}.pie-tool-annotation-toolbar__button.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:disabled {opacity:0.6;cursor:not-allowed;}.pie-tool-annotation-toolbar__button--warning.svelte-g8qu62 {color:var(--pie-missing-icon, #92400e);}.pie-tool-annotation-toolbar__button--danger.svelte-g8qu62 {color:var(--pie-incorrect-icon, #b91c1c);}.pie-tool-annotation-toolbar__button.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
4788
4804
  };
4789
- function zl(t, e) {
4790
- sr(e, !0), ks(t, Fl);
4805
+ function Gl(t, e) {
4806
+ lr(e, !0), Os(t, ql);
4791
4807
  let n = zn(e, "enabled", 7, !0), o = zn(e, "highlightCoordinator", 7, null), r = zn(e, "ttsService", 7, null);
4792
- const i = typeof window < "u", s = "pie-annotations", l = [
4808
+ const i = typeof window < "u", s = "pie-annotations", a = [
4793
4809
  {
4794
4810
  name: Ue.YELLOW,
4795
4811
  hex: "#fde995",
@@ -4810,7 +4826,7 @@ function zl(t, e) {
4810
4826
  hex: "#a6e1c5",
4811
4827
  label: "Green highlight"
4812
4828
  }
4813
- ], a = [
4829
+ ], l = [
4814
4830
  "button",
4815
4831
  "input",
4816
4832
  "select",
@@ -4821,18 +4837,18 @@ function zl(t, e) {
4821
4837
  '[role="button"]',
4822
4838
  '[role="textbox"]'
4823
4839
  ];
4824
- let c = /* @__PURE__ */ M(null), f = /* @__PURE__ */ M(null), d = /* @__PURE__ */ M(null), g = /* @__PURE__ */ M(null), b = /* @__PURE__ */ M(Tt({
4840
+ let c = /* @__PURE__ */ N(null), f = /* @__PURE__ */ N(null), d = /* @__PURE__ */ N(null), g = /* @__PURE__ */ N(null), b = /* @__PURE__ */ N(Tt({
4825
4841
  isVisible: !1,
4826
4842
  selectedText: "",
4827
4843
  selectedRange: null,
4828
4844
  toolbarPosition: { x: 0, y: 0 }
4829
- })), h = /* @__PURE__ */ M(!1), S = /* @__PURE__ */ M(
4845
+ })), h = /* @__PURE__ */ N(!1), A = /* @__PURE__ */ N(
4830
4846
  !1
4831
4847
  // Flag to prevent immediate hiding after showing
4832
- ), w = /* @__PURE__ */ M(
4848
+ ), w = /* @__PURE__ */ N(
4833
4849
  ""
4834
4850
  // For screen readers when toolbar is repositioned
4835
- ), I = /* @__PURE__ */ M(0), O = /* @__PURE__ */ M(null), fe = /* @__PURE__ */ Vn(() => v(I) > 0), de = /* @__PURE__ */ Vn(() => v(O) !== null), H = /* @__PURE__ */ Vn(() => v(g)?.scopeElement || v(d)?.scopeElement || null);
4851
+ ), I = /* @__PURE__ */ N(0), O = /* @__PURE__ */ N(null), fe = /* @__PURE__ */ Vn(() => v(I) > 0), de = /* @__PURE__ */ Vn(() => v(O) !== null), H = /* @__PURE__ */ Vn(() => v(g)?.scopeElement || v(d)?.scopeElement || null);
4836
4852
  function je() {
4837
4853
  const p = v(c)?.ownerDocument;
4838
4854
  return v(H) || p?.documentElement || document.documentElement;
@@ -4857,7 +4873,7 @@ function zl(t, e) {
4857
4873
  if (p.nodeType !== Node.ELEMENT_NODE && p.nodeType !== Node.TEXT_NODE)
4858
4874
  return !1;
4859
4875
  const _ = p.nodeType === Node.TEXT_NODE ? p.parentElement : p;
4860
- return _ ? !a.some((C) => {
4876
+ return _ ? !l.some((C) => {
4861
4877
  try {
4862
4878
  return _.closest(C) !== null;
4863
4879
  } catch {
@@ -4879,7 +4895,7 @@ function zl(t, e) {
4879
4895
  console.error("[AnnotationToolbar] Failed to save annotations:", p);
4880
4896
  }
4881
4897
  }
4882
- function Nn() {
4898
+ function Mn() {
4883
4899
  if (!(!i || !o()))
4884
4900
  try {
4885
4901
  const p = sessionStorage.getItem(te());
@@ -4905,9 +4921,9 @@ function zl(t, e) {
4905
4921
  $(w, "");
4906
4922
  },
4907
4923
  2e3
4908
- ), $(S, !0), setTimeout(
4924
+ ), $(A, !0), setTimeout(
4909
4925
  () => {
4910
- $(S, !1);
4926
+ $(A, !1);
4911
4927
  },
4912
4928
  100
4913
4929
  );
@@ -4915,7 +4931,7 @@ function zl(t, e) {
4915
4931
  function Pe() {
4916
4932
  v(h) && r() && (r().stop(), $(h, !1)), v(b).isVisible = !1, v(b).selectedText = "", v(b).selectedRange = null;
4917
4933
  }
4918
- function yo(p) {
4934
+ function wo(p) {
4919
4935
  if (!v(b).selectedRange || !o()) return;
4920
4936
  const _ = v(b).selectedText;
4921
4937
  o().addAnnotation(v(b).selectedRange, p), $(I, o().getAnnotations().length, !0), on();
@@ -4927,7 +4943,7 @@ function zl(t, e) {
4927
4943
  3e3
4928
4944
  ), Pe();
4929
4945
  }
4930
- function ei() {
4946
+ function oi() {
4931
4947
  if (!v(O) || !o()) {
4932
4948
  console.warn("[AnnotationToolbar] No overlapping annotation to remove");
4933
4949
  return;
@@ -4950,7 +4966,7 @@ function zl(t, e) {
4950
4966
  3e3
4951
4967
  ), Pe();
4952
4968
  }
4953
- function ti() {
4969
+ function ri() {
4954
4970
  const p = v(I);
4955
4971
  o()?.clearAnnotations(), $(I, 0), sessionStorage.removeItem(te()), $(w, `${p} annotation${p === 1 ? "" : "s"} cleared`), setTimeout(
4956
4972
  () => {
@@ -4959,7 +4975,7 @@ function zl(t, e) {
4959
4975
  3e3
4960
4976
  ), Pe();
4961
4977
  }
4962
- async function ni() {
4978
+ async function ii() {
4963
4979
  if (!(!v(b).selectedRange || !r())) {
4964
4980
  $(h, !0);
4965
4981
  try {
@@ -4971,35 +4987,35 @@ function zl(t, e) {
4971
4987
  }
4972
4988
  }
4973
4989
  }
4974
- function wo(p) {
4990
+ function To(p) {
4975
4991
  p.key === "Escape" && v(b).isVisible && (p.preventDefault(), Pe());
4976
4992
  }
4977
4993
  function sn(p) {
4978
- !v(b).isVisible || v(S) || v(f) && !v(f).contains(p.target) && Pe();
4994
+ !v(b).isVisible || v(A) || v(f) && !v(f).contains(p.target) && Pe();
4979
4995
  }
4980
- Lo(() => {
4996
+ Po(() => {
4981
4997
  if (!i) return;
4982
4998
  const p = setTimeout(
4983
4999
  () => {
4984
- Nn();
5000
+ Mn();
4985
5001
  },
4986
5002
  2e3
4987
5003
  ), _ = v(H) || document;
4988
- return _.addEventListener("mouseup", rn), _.addEventListener("click", sn), _.addEventListener("touchend", rn), _.addEventListener("touchstart", sn), document.addEventListener("keydown", wo), window.addEventListener("scroll", Pe, !0), () => {
4989
- clearTimeout(p), _.removeEventListener("mouseup", rn), _.removeEventListener("click", sn), _.removeEventListener("touchend", rn), _.removeEventListener("touchstart", sn), document.removeEventListener("keydown", wo), window.removeEventListener("scroll", Pe, !0);
5004
+ return _.addEventListener("mouseup", rn), _.addEventListener("click", sn), _.addEventListener("touchend", rn), _.addEventListener("touchstart", sn), document.addEventListener("keydown", To), window.addEventListener("scroll", Pe, !0), () => {
5005
+ clearTimeout(p), _.removeEventListener("mouseup", rn), _.removeEventListener("click", sn), _.removeEventListener("touchend", rn), _.removeEventListener("touchstart", sn), document.removeEventListener("keydown", To), window.removeEventListener("scroll", Pe, !0);
4990
5006
  };
4991
- }), Lo(() => {
5007
+ }), Po(() => {
4992
5008
  if (!v(c)) return;
4993
- const p = js(v(c), (C) => {
5009
+ const p = Us(v(c), (C) => {
4994
5010
  $(d, C, !0);
4995
- }), _ = qs(v(c), (C) => {
5011
+ }), _ = Ws(v(c), (C) => {
4996
5012
  $(g, C, !0);
4997
5013
  });
4998
5014
  return () => {
4999
5015
  _(), p();
5000
5016
  };
5001
5017
  });
5002
- var oi = {
5018
+ var si = {
5003
5019
  get enabled() {
5004
5020
  return n();
5005
5021
  },
@@ -5018,28 +5034,28 @@ function zl(t, e) {
5018
5034
  set ttsService(p = null) {
5019
5035
  r(p), pn();
5020
5036
  }
5021
- }, To = Vl();
5022
- $s("g8qu62", (p) => {
5023
- var _ = Ol();
5037
+ }, Io = jl();
5038
+ Rs("g8qu62", (p) => {
5039
+ var _ = Nl();
5024
5040
  xe(p, _);
5025
5041
  });
5026
- var Io = Fn(To);
5027
- jo(Io, (p) => $(c, p), () => v(c));
5028
- var Ao = qe(Io, 2);
5042
+ var So = Fn(Io);
5043
+ qo(So, (p) => $(c, p), () => v(c));
5044
+ var Ao = qe(So, 2);
5029
5045
  {
5030
- var ri = (p) => {
5031
- var _ = Dl(), C = un(_);
5032
- As(C, 17, () => l, Ts, (pe, ve) => {
5033
- var X = Ll(), ln = un(X), Mn = un(ln, !0);
5046
+ var li = (p) => {
5047
+ var _ = Bl(), C = un(_);
5048
+ $s(C, 17, () => a, As, (pe, ve) => {
5049
+ var X = Dl(), ln = un(X), Nn = un(ln, !0);
5034
5050
  an(ln), an(X), fn(() => {
5035
- Fo(X, `background-color: ${v(ve).hex ?? ""};`), zo(X, "aria-label", v(ve).label), zo(X, "title", v(ve).label), Do(Mn, v(ve).label);
5036
- }), Gt("click", X, () => yo(v(ve).name)), xe(pe, X);
5051
+ zo(X, `background-color: ${v(ve).hex ?? ""};`), Ho(X, "aria-label", v(ve).label), Ho(X, "title", v(ve).label), Vo(Nn, v(ve).label);
5052
+ }), Gt("click", X, () => wo(v(ve).name)), xe(pe, X);
5037
5053
  });
5038
5054
  var B = qe(C, 2), rt = qe(B, 2);
5039
5055
  {
5040
5056
  var Bt = (pe) => {
5041
- var ve = Pl(), X = qe(Fn(ve), 2);
5042
- fn(() => X.disabled = v(h)), Gt("click", X, ni), xe(pe, ve);
5057
+ var ve = Vl(), X = qe(Fn(ve), 2);
5058
+ fn(() => X.disabled = v(h)), Gt("click", X, ii), xe(pe, ve);
5043
5059
  };
5044
5060
  Ut(rt, (pe) => {
5045
5061
  r() && pe(Bt);
@@ -5047,45 +5063,45 @@ function zl(t, e) {
5047
5063
  }
5048
5064
  var jt = qe(rt, 2);
5049
5065
  {
5050
- var si = (pe) => {
5051
- var ve = Ml(), X = qe(Fn(ve), 2);
5066
+ var ci = (pe) => {
5067
+ var ve = Hl(), X = qe(Fn(ve), 2);
5052
5068
  {
5053
5069
  var ln = (it) => {
5054
- var qt = xl();
5055
- Gt("click", qt, ei), xe(it, qt);
5070
+ var qt = Fl();
5071
+ Gt("click", qt, oi), xe(it, qt);
5056
5072
  };
5057
5073
  Ut(X, (it) => {
5058
5074
  v(de) && it(ln);
5059
5075
  });
5060
5076
  }
5061
- var Mn = qe(X, 2);
5077
+ var Nn = qe(X, 2);
5062
5078
  {
5063
- var li = (it) => {
5064
- var qt = Nl();
5065
- Gt("click", qt, ti), xe(it, qt);
5079
+ var ui = (it) => {
5080
+ var qt = zl();
5081
+ Gt("click", qt, ri), xe(it, qt);
5066
5082
  };
5067
- Ut(Mn, (it) => {
5068
- v(fe) && it(li);
5083
+ Ut(Nn, (it) => {
5084
+ v(fe) && it(ui);
5069
5085
  });
5070
5086
  }
5071
5087
  xe(pe, ve);
5072
5088
  };
5073
5089
  Ut(jt, (pe) => {
5074
- (v(de) || v(fe)) && pe(si);
5090
+ (v(de) || v(fe)) && pe(ci);
5075
5091
  });
5076
5092
  }
5077
- an(_), jo(_, (pe) => $(f, pe), () => v(f)), fn(() => Fo(_, `left:${v(b).toolbarPosition.x}px; top:${v(b).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), Gt("click", B, () => yo(Ue.UNDERLINE)), xe(p, _);
5093
+ an(_), qo(_, (pe) => $(f, pe), () => v(f)), fn(() => zo(_, `left:${v(b).toolbarPosition.x}px; top:${v(b).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), Gt("click", B, () => wo(Ue.UNDERLINE)), xe(p, _);
5078
5094
  };
5079
5095
  Ut(Ao, (p) => {
5080
- v(b).isVisible && p(ri);
5096
+ v(b).isVisible && p(li);
5081
5097
  });
5082
5098
  }
5083
- var So = qe(Ao, 2), ii = un(So, !0);
5084
- return an(So), fn(() => Do(ii, v(w))), xe(t, To), lr(oi);
5099
+ var Eo = qe(Ao, 2), ai = un(Eo, !0);
5100
+ return an(Eo), fn(() => Vo(ai, v(w))), xe(t, Io), ar(si);
5085
5101
  }
5086
- hs(["click"]);
5087
- customElements.define("pie-tool-annotation-toolbar", Vs(
5088
- zl,
5102
+ gs(["click"]);
5103
+ customElements.define("pie-tool-annotation-toolbar", Hs(
5104
+ Gl,
5089
5105
  {
5090
5106
  enabled: { attribute: "enabled", type: "Boolean" },
5091
5107
  highlightCoordinator: { type: "Object" },
@@ -5096,5 +5112,5 @@ customElements.define("pie-tool-annotation-toolbar", Vs(
5096
5112
  { mode: "open" }
5097
5113
  ));
5098
5114
  export {
5099
- zl as default
5115
+ Gl as default
5100
5116
  };