@pie-players/pie-tool-tts-inline 0.3.16 → 0.3.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/tool-tts-inline.js +1117 -1081
  2. package/package.json +3 -3
@@ -1,108 +1,108 @@
1
- import { connectToolRuntimeContext as Jr, connectToolShellContext as Xr, connectToolRegionScopeContext as Zr } from "@pie-players/pie-assessment-toolkit";
2
- const Qr = "5";
3
- typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Qr);
4
- const ei = 1, ti = 2, ni = 16, ri = 1, ii = 4, si = 8, oi = 16, li = 2, In = "[", Wt = "[!", bn = "[?", Gt = "]", Ye = {}, M = /* @__PURE__ */ Symbol(), Pn = "http://www.w3.org/1999/xhtml", Dt = !1;
5
- var Ln = Array.isArray, ai = Array.prototype.indexOf, Ke = Array.prototype.includes, At = Array.from, St = Object.keys, xt = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, fi = Object.getOwnPropertyDescriptors, ui = Object.prototype, ci = Array.prototype, Dn = Object.getPrototypeOf, yn = Object.isExtensible;
6
- const di = () => {
1
+ import { connectToolRuntimeContext as ni, connectToolShellContext as ri, connectToolRegionScopeContext as ii } from "@pie-players/pie-assessment-toolkit";
2
+ const si = "5";
3
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(si);
4
+ const oi = 1, li = 2, ai = 16, fi = 1, ui = 4, ci = 8, di = 16, hi = 2, Bn = "[", Jt = "[!", Tn = "[?", Xt = "]", qe = {}, M = /* @__PURE__ */ Symbol(), Hn = "http://www.w3.org/1999/xhtml", Bt = !1;
5
+ var Vn = Array.isArray, vi = Array.prototype.indexOf, Ye = Array.prototype.includes, Ct = Array.from, At = Object.keys, Rt = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, _i = Object.getOwnPropertyDescriptors, pi = Object.prototype, gi = Array.prototype, jn = Object.getPrototypeOf, xn = Object.isExtensible;
6
+ const wi = () => {
7
7
  };
8
- function hi(e) {
8
+ function mi(e) {
9
9
  for (var t = 0; t < e.length; t++)
10
10
  e[t]();
11
11
  }
12
- function Fn() {
12
+ function Un() {
13
13
  var e, t, n = new Promise((r, i) => {
14
14
  e = r, t = i;
15
15
  });
16
16
  return { promise: n, resolve: e, reject: t };
17
17
  }
18
- const L = 2, et = 4, We = 8, Jt = 1 << 24, Se = 16, se = 32, xe = 64, Ft = 128, G = 512, I = 1024, P = 2048, re = 4096, B = 8192, fe = 16384, Be = 32768, Ge = 65536, $n = 1 << 17, vi = 1 << 18, He = 1 << 19, _i = 1 << 20, _e = 1 << 25, Pe = 65536, Bt = 1 << 21, Xt = 1 << 22, ye = 1 << 23, dt = /* @__PURE__ */ Symbol("$state"), Bn = /* @__PURE__ */ Symbol("legacy props"), pi = /* @__PURE__ */ Symbol(""), Re = new class extends Error {
18
+ const D = 2, Qe = 4, We = 8, Zt = 1 << 24, Se = 16, oe = 32, Te = 64, Ht = 128, Z = 512, P = 1024, L = 2048, ie = 4096, B = 8192, fe = 16384, De = 32768, Ke = 65536, kn = 1 << 17, bi = 1 << 18, Fe = 1 << 19, yi = 1 << 20, _e = 1 << 25, Ie = 65536, Vt = 1 << 21, Qt = 1 << 22, be = 1 << 23, dt = /* @__PURE__ */ Symbol("$state"), qn = /* @__PURE__ */ Symbol("legacy props"), $i = /* @__PURE__ */ Symbol(""), Ae = new class extends Error {
19
19
  name = "StaleReactionError";
20
20
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
21
- }(), gi = (
21
+ }(), Ei = (
22
22
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
23
23
  !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
24
- ), zt = 3, pt = 8;
25
- function mi() {
24
+ ), Ot = 3, pt = 8;
25
+ function Si() {
26
26
  throw new Error("https://svelte.dev/e/async_derived_orphan");
27
27
  }
28
- function wi(e, t, n) {
28
+ function Ti(e, t, n) {
29
29
  throw new Error("https://svelte.dev/e/each_key_duplicate");
30
30
  }
31
- function bi(e) {
31
+ function xi(e) {
32
32
  throw new Error("https://svelte.dev/e/effect_in_teardown");
33
33
  }
34
- function yi() {
34
+ function ki() {
35
35
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
36
36
  }
37
- function $i(e) {
37
+ function Ai(e) {
38
38
  throw new Error("https://svelte.dev/e/effect_orphan");
39
39
  }
40
- function Ei() {
40
+ function Ri() {
41
41
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
42
42
  }
43
- function Ti() {
43
+ function zi() {
44
44
  throw new Error("https://svelte.dev/e/hydration_failed");
45
45
  }
46
- function Si(e) {
46
+ function Ci(e) {
47
47
  throw new Error("https://svelte.dev/e/props_invalid_value");
48
48
  }
49
- function xi() {
49
+ function Oi() {
50
50
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
51
51
  }
52
- function ki() {
52
+ function Ni() {
53
53
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
54
54
  }
55
- function Ai() {
55
+ function Ii() {
56
56
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
57
57
  }
58
- function zi() {
58
+ function Mi() {
59
59
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
60
60
  }
61
- function Rt(e) {
61
+ function Nt(e) {
62
62
  console.warn("https://svelte.dev/e/hydration_mismatch");
63
63
  }
64
- function Ri() {
64
+ function Pi() {
65
65
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
66
66
  }
67
- let x = !1;
67
+ let k = !1;
68
68
  function pe(e) {
69
- x = e;
69
+ k = e;
70
70
  }
71
- let T;
72
- function Y(e) {
71
+ let E;
72
+ function W(e) {
73
73
  if (e === null)
74
- throw Rt(), Ye;
75
- return T = e;
74
+ throw Nt(), qe;
75
+ return E = e;
76
76
  }
77
- function Ct() {
78
- return Y(/* @__PURE__ */ ce(T));
77
+ function It() {
78
+ return W(/* @__PURE__ */ ce(E));
79
79
  }
80
- function je(e) {
81
- if (x) {
82
- if (/* @__PURE__ */ ce(T) !== null)
83
- throw Rt(), Ye;
84
- T = e;
80
+ function He(e) {
81
+ if (k) {
82
+ if (/* @__PURE__ */ ce(E) !== null)
83
+ throw Nt(), qe;
84
+ E = e;
85
85
  }
86
86
  }
87
- function Ci(e = 1) {
88
- if (x) {
89
- for (var t = e, n = T; t--; )
87
+ function Li(e = 1) {
88
+ if (k) {
89
+ for (var t = e, n = E; t--; )
90
90
  n = /** @type {TemplateNode} */
91
91
  /* @__PURE__ */ ce(n);
92
- T = n;
92
+ E = n;
93
93
  }
94
94
  }
95
- function kt(e = !0) {
96
- for (var t = 0, n = T; ; ) {
95
+ function zt(e = !0) {
96
+ for (var t = 0, n = E; ; ) {
97
97
  if (n.nodeType === pt) {
98
98
  var r = (
99
99
  /** @type {Comment} */
100
100
  n.data
101
101
  );
102
- if (r === Gt) {
102
+ if (r === Xt) {
103
103
  if (t === 0) return n;
104
104
  t -= 1;
105
- } else (r === In || r === Wt || // "[1", "[2", etc. for if blocks
105
+ } else (r === Bn || r === Jt || // "[1", "[2", etc. for if blocks
106
106
  r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
107
107
  }
108
108
  var i = (
@@ -112,30 +112,30 @@ function kt(e = !0) {
112
112
  e && n.remove(), n = i;
113
113
  }
114
114
  }
115
- function Hn(e) {
115
+ function Yn(e) {
116
116
  if (!e || e.nodeType !== pt)
117
- throw Rt(), Ye;
117
+ throw Nt(), qe;
118
118
  return (
119
119
  /** @type {Comment} */
120
120
  e.data
121
121
  );
122
122
  }
123
- function jn(e) {
123
+ function Wn(e) {
124
124
  return e === this.v;
125
125
  }
126
- function Ni(e, t) {
126
+ function Di(e, t) {
127
127
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
128
128
  }
129
- function Un(e) {
130
- return !Ni(e, this.v);
129
+ function Kn(e) {
130
+ return !Di(e, this.v);
131
131
  }
132
- let Oi = !1, X = null;
133
- function Je(e) {
134
- X = e;
132
+ let Fi = !1, ee = null;
133
+ function Ge(e) {
134
+ ee = e;
135
135
  }
136
- function Vn(e, t = !1, n) {
137
- X = {
138
- p: X,
136
+ function Gn(e, t = !1, n) {
137
+ ee = {
138
+ p: ee,
139
139
  i: !1,
140
140
  c: null,
141
141
  e: null,
@@ -144,52 +144,52 @@ function Vn(e, t = !1, n) {
144
144
  l: null
145
145
  };
146
146
  }
147
- function qn(e) {
147
+ function Jn(e) {
148
148
  var t = (
149
149
  /** @type {ComponentContext} */
150
- X
150
+ ee
151
151
  ), n = t.e;
152
152
  if (n !== null) {
153
153
  t.e = null;
154
154
  for (var r of n)
155
- hr(r);
155
+ wr(r);
156
156
  }
157
- return e !== void 0 && (t.x = e), t.i = !0, X = t.p, e ?? /** @type {T} */
157
+ return e !== void 0 && (t.x = e), t.i = !0, ee = t.p, e ?? /** @type {T} */
158
158
  {};
159
159
  }
160
- function Yn() {
160
+ function Xn() {
161
161
  return !0;
162
162
  }
163
- let Ce = [];
164
- function Kn() {
165
- var e = Ce;
166
- Ce = [], hi(e);
163
+ let Re = [];
164
+ function Zn() {
165
+ var e = Re;
166
+ Re = [], mi(e);
167
167
  }
168
- function $e(e) {
169
- if (Ce.length === 0 && !ht) {
170
- var t = Ce;
168
+ function ye(e) {
169
+ if (Re.length === 0 && !ht) {
170
+ var t = Re;
171
171
  queueMicrotask(() => {
172
- t === Ce && Kn();
172
+ t === Re && Zn();
173
173
  });
174
174
  }
175
- Ce.push(e);
175
+ Re.push(e);
176
176
  }
177
- function Mi() {
178
- for (; Ce.length > 0; )
179
- Kn();
177
+ function Bi() {
178
+ for (; Re.length > 0; )
179
+ Zn();
180
180
  }
181
- function Wn(e) {
181
+ function Qn(e) {
182
182
  var t = S;
183
183
  if (t === null)
184
- return E.f |= ye, e;
185
- if ((t.f & Be) === 0 && (t.f & et) === 0)
184
+ return $.f |= be, e;
185
+ if ((t.f & De) === 0 && (t.f & Qe) === 0)
186
186
  throw e;
187
- be(e, t);
187
+ me(e, t);
188
188
  }
189
- function be(e, t) {
189
+ function me(e, t) {
190
190
  for (; t !== null; ) {
191
- if ((t.f & Ft) !== 0) {
192
- if ((t.f & Be) === 0)
191
+ if ((t.f & Ht) !== 0) {
192
+ if ((t.f & De) === 0)
193
193
  throw e;
194
194
  try {
195
195
  t.b.error(e);
@@ -202,29 +202,29 @@ function be(e, t) {
202
202
  }
203
203
  throw e;
204
204
  }
205
- const Ii = -7169;
205
+ const Hi = -7169;
206
206
  function C(e, t) {
207
- e.f = e.f & Ii | t;
207
+ e.f = e.f & Hi | t;
208
208
  }
209
- function Zt(e) {
210
- (e.f & G) !== 0 || e.deps === null ? C(e, I) : C(e, re);
209
+ function en(e) {
210
+ (e.f & Z) !== 0 || e.deps === null ? C(e, P) : C(e, ie);
211
211
  }
212
- function Gn(e) {
212
+ function er(e) {
213
213
  if (e !== null)
214
214
  for (const t of e)
215
- (t.f & L) === 0 || (t.f & Pe) === 0 || (t.f ^= Pe, Gn(
215
+ (t.f & D) === 0 || (t.f & Ie) === 0 || (t.f ^= Ie, er(
216
216
  /** @type {Derived} */
217
217
  t.deps
218
218
  ));
219
219
  }
220
- function Jn(e, t, n) {
221
- (e.f & P) !== 0 ? t.add(e) : (e.f & re) !== 0 && n.add(e), Gn(e.deps), C(e, I);
220
+ function tr(e, t, n) {
221
+ (e.f & L) !== 0 ? t.add(e) : (e.f & ie) !== 0 && n.add(e), er(e.deps), C(e, P);
222
222
  }
223
- const mt = /* @__PURE__ */ new Set();
224
- let z = null, te = null, j = [], Nt = null, ht = !1, Xe = null, Pi = 1;
223
+ const yt = /* @__PURE__ */ new Set();
224
+ let z = null, ne = null, V = [], Mt = null, ht = !1, Je = null, Vi = 1;
225
225
  class ge {
226
226
  // for debugging. TODO remove once async is stable
227
- id = Pi++;
227
+ id = Vi++;
228
228
  /**
229
229
  * The current values of any sources that are updated in this batch
230
230
  * They keys of this map are identical to `this.#previous`
@@ -302,9 +302,9 @@ class ge {
302
302
  if (n) {
303
303
  this.#s.delete(t);
304
304
  for (var r of n.d)
305
- C(r, P), ae(r);
305
+ C(r, L), ae(r);
306
306
  for (r of n.m)
307
- C(r, re), ae(r);
307
+ C(r, ie), ae(r);
308
308
  }
309
309
  }
310
310
  /**
@@ -312,20 +312,20 @@ class ge {
312
312
  * @param {Effect[]} root_effects
313
313
  */
314
314
  process(t) {
315
- j = [], this.apply();
316
- var n = Xe = [], r = [];
315
+ V = [], this.apply();
316
+ var n = Je = [], r = [];
317
317
  for (const i of t)
318
318
  this.#f(i, n, r);
319
- if (Xe = null, this.#u()) {
319
+ if (Je = null, this.#u()) {
320
320
  this.#c(r), this.#c(n);
321
321
  for (const [i, s] of this.#s)
322
- er(i, s);
322
+ sr(i, s);
323
323
  } else {
324
324
  z = null;
325
325
  for (const i of this.#e) i(this);
326
- this.#e.clear(), this.#n === 0 && this.#d(), En(r), En(n), this.#o.clear(), this.#i.clear(), this.#r?.resolve();
326
+ this.#e.clear(), this.#n === 0 && this.#d(), An(r), An(n), this.#o.clear(), this.#i.clear(), this.#r?.resolve();
327
327
  }
328
- te = null;
328
+ ne = null;
329
329
  }
330
330
  /**
331
331
  * Traverse the effect tree, executing effects or stashing
@@ -335,21 +335,21 @@ class ge {
335
335
  * @param {Effect[]} render_effects
336
336
  */
337
337
  #f(t, n, r) {
338
- t.f ^= I;
338
+ t.f ^= P;
339
339
  for (var i = t.first; i !== null; ) {
340
- var s = i.f, o = (s & (se | xe)) !== 0, l = o && (s & I) !== 0, a = (s & B) !== 0, f = l || this.#s.has(i);
340
+ var s = i.f, o = (s & (oe | Te)) !== 0, l = o && (s & P) !== 0, a = (s & B) !== 0, f = l || this.#s.has(i);
341
341
  if (!f && i.fn !== null) {
342
- o ? a || (i.f ^= I) : (s & et) !== 0 ? n.push(i) : (s & (We | Jt)) !== 0 && a ? r.push(i) : gt(i) && (Qe(i), (s & Se) !== 0 && (this.#i.add(i), a && C(i, P)));
343
- var h = i.first;
344
- if (h !== null) {
345
- i = h;
342
+ o ? a || (i.f ^= P) : (s & Qe) !== 0 ? n.push(i) : (s & (We | Zt)) !== 0 && a ? r.push(i) : gt(i) && (Ze(i), (s & Se) !== 0 && (this.#i.add(i), a && C(i, L)));
343
+ var d = i.first;
344
+ if (d !== null) {
345
+ i = d;
346
346
  continue;
347
347
  }
348
348
  }
349
349
  for (; i !== null; ) {
350
- var v = i.next;
351
- if (v !== null) {
352
- i = v;
350
+ var h = i.next;
351
+ if (h !== null) {
352
+ i = h;
353
353
  break;
354
354
  }
355
355
  i = i.parent;
@@ -361,7 +361,7 @@ class ge {
361
361
  */
362
362
  #c(t) {
363
363
  for (var n = 0; n < t.length; n += 1)
364
- Jn(t[n], this.#o, this.#i);
364
+ tr(t[n], this.#o, this.#i);
365
365
  }
366
366
  /**
367
367
  * Associate a change to a given source with the current
@@ -370,17 +370,17 @@ class ge {
370
370
  * @param {any} value
371
371
  */
372
372
  capture(t, n) {
373
- n !== M && !this.previous.has(t) && this.previous.set(t, n), (t.f & ye) === 0 && (this.current.set(t, t.v), te?.set(t, t.v));
373
+ n !== M && !this.previous.has(t) && this.previous.set(t, n), (t.f & be) === 0 && (this.current.set(t, t.v), ne?.set(t, t.v));
374
374
  }
375
375
  activate() {
376
376
  z = this, this.apply();
377
377
  }
378
378
  deactivate() {
379
- z === this && (z = null, te = null);
379
+ z === this && (z = null, ne = null);
380
380
  }
381
381
  flush() {
382
- if (j.length > 0)
383
- z = this, Xn();
382
+ if (V.length > 0)
383
+ z = this, nr();
384
384
  else if (this.#n === 0 && !this.is_fork) {
385
385
  for (const t of this.#e) t(this);
386
386
  this.#e.clear(), this.#d(), this.#r?.resolve();
@@ -392,10 +392,10 @@ class ge {
392
392
  this.#t.clear();
393
393
  }
394
394
  #d() {
395
- if (mt.size > 1) {
395
+ if (yt.size > 1) {
396
396
  this.previous.clear();
397
- var t = z, n = te, r = !0;
398
- for (const s of mt) {
397
+ var t = z, n = ne, r = !0;
398
+ for (const s of yt) {
399
399
  if (s === this) {
400
400
  r = !1;
401
401
  continue;
@@ -413,23 +413,23 @@ class ge {
413
413
  continue;
414
414
  const l = [...s.current.keys()].filter((a) => !this.current.has(a));
415
415
  if (l.length > 0) {
416
- var i = j;
417
- j = [];
416
+ var i = V;
417
+ V = [];
418
418
  const a = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
419
- for (const h of o)
420
- Zn(h, l, a, f);
421
- if (j.length > 0) {
419
+ for (const d of o)
420
+ rr(d, l, a, f);
421
+ if (V.length > 0) {
422
422
  z = s, s.apply();
423
- for (const h of j)
424
- s.#f(h, [], []);
423
+ for (const d of V)
424
+ s.#f(d, [], []);
425
425
  s.deactivate();
426
426
  }
427
- j = i;
427
+ V = i;
428
428
  }
429
429
  }
430
- z = t, te = n;
430
+ z = t, ne = n;
431
431
  }
432
- this.#s.clear(), mt.delete(this);
432
+ this.#s.clear(), yt.delete(this);
433
433
  }
434
434
  /**
435
435
  *
@@ -443,15 +443,15 @@ class ge {
443
443
  * @param {boolean} blocking
444
444
  */
445
445
  decrement(t) {
446
- this.#n -= 1, t && (this.#l -= 1), !this.#a && (this.#a = !0, $e(() => {
447
- this.#a = !1, this.#u() ? j.length > 0 && this.flush() : this.revive();
446
+ this.#n -= 1, t && (this.#l -= 1), !this.#a && (this.#a = !0, ye(() => {
447
+ this.#a = !1, this.#u() ? V.length > 0 && this.flush() : this.revive();
448
448
  }));
449
449
  }
450
450
  revive() {
451
451
  for (const t of this.#o)
452
- this.#i.delete(t), C(t, P), ae(t);
452
+ this.#i.delete(t), C(t, L), ae(t);
453
453
  for (const t of this.#i)
454
- C(t, re), ae(t);
454
+ C(t, ie), ae(t);
455
455
  this.flush();
456
456
  }
457
457
  /** @param {(batch: Batch) => void} fn */
@@ -463,12 +463,12 @@ class ge {
463
463
  this.#t.add(t);
464
464
  }
465
465
  settled() {
466
- return (this.#r ??= Fn()).promise;
466
+ return (this.#r ??= Un()).promise;
467
467
  }
468
468
  static ensure() {
469
469
  if (z === null) {
470
470
  const t = z = new ge();
471
- mt.add(z), ht || $e(() => {
471
+ yt.add(z), ht || ye(() => {
472
472
  z === t && t.flush();
473
473
  });
474
474
  }
@@ -482,45 +482,45 @@ function ft(e) {
482
482
  ht = !0;
483
483
  try {
484
484
  for (var n; ; ) {
485
- if (Mi(), j.length === 0 && (z?.flush(), j.length === 0))
486
- return Nt = null, /** @type {T} */
485
+ if (Bi(), V.length === 0 && (z?.flush(), V.length === 0))
486
+ return Mt = null, /** @type {T} */
487
487
  n;
488
- Xn();
488
+ nr();
489
489
  }
490
490
  } finally {
491
491
  ht = t;
492
492
  }
493
493
  }
494
- function Xn() {
494
+ function nr() {
495
495
  var e = null;
496
496
  try {
497
- for (var t = 0; j.length > 0; ) {
497
+ for (var t = 0; V.length > 0; ) {
498
498
  var n = ge.ensure();
499
499
  if (t++ > 1e3) {
500
500
  var r, i;
501
- Li();
501
+ ji();
502
502
  }
503
- n.process(j), Ee.clear();
503
+ n.process(V), $e.clear();
504
504
  }
505
505
  } finally {
506
- j = [], Nt = null, Xe = null;
506
+ V = [], Mt = null, Je = null;
507
507
  }
508
508
  }
509
- function Li() {
509
+ function ji() {
510
510
  try {
511
- Ei();
511
+ Ri();
512
512
  } catch (e) {
513
- be(e, Nt);
513
+ me(e, Mt);
514
514
  }
515
515
  }
516
516
  let ve = null;
517
- function En(e) {
517
+ function An(e) {
518
518
  var t = e.length;
519
519
  if (t !== 0) {
520
520
  for (var n = 0; n < t; ) {
521
521
  var r = e[n++];
522
- if ((r.f & (fe | B)) === 0 && gt(r) && (ve = /* @__PURE__ */ new Set(), Qe(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && pr(r), ve?.size > 0)) {
523
- Ee.clear();
522
+ if ((r.f & (fe | B)) === 0 && gt(r) && (ve = /* @__PURE__ */ new Set(), Ze(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && yr(r), ve?.size > 0)) {
523
+ $e.clear();
524
524
  for (const i of ve) {
525
525
  if ((i.f & (fe | B)) !== 0) continue;
526
526
  const s = [i];
@@ -529,7 +529,7 @@ function En(e) {
529
529
  ve.has(o) && (ve.delete(o), s.push(o)), o = o.parent;
530
530
  for (let l = s.length - 1; l >= 0; l--) {
531
531
  const a = s[l];
532
- (a.f & (fe | B)) === 0 && Qe(a);
532
+ (a.f & (fe | B)) === 0 && Ze(a);
533
533
  }
534
534
  }
535
535
  ve.clear();
@@ -538,30 +538,30 @@ function En(e) {
538
538
  ve = null;
539
539
  }
540
540
  }
541
- function Zn(e, t, n, r) {
541
+ function rr(e, t, n, r) {
542
542
  if (!n.has(e) && (n.add(e), e.reactions !== null))
543
543
  for (const i of e.reactions) {
544
544
  const s = i.f;
545
- (s & L) !== 0 ? Zn(
545
+ (s & D) !== 0 ? rr(
546
546
  /** @type {Derived} */
547
547
  i,
548
548
  t,
549
549
  n,
550
550
  r
551
- ) : (s & (Xt | Se)) !== 0 && (s & P) === 0 && Qn(i, t, r) && (C(i, P), ae(
551
+ ) : (s & (Qt | Se)) !== 0 && (s & L) === 0 && ir(i, t, r) && (C(i, L), ae(
552
552
  /** @type {Effect} */
553
553
  i
554
554
  ));
555
555
  }
556
556
  }
557
- function Qn(e, t, n) {
557
+ function ir(e, t, n) {
558
558
  const r = n.get(e);
559
559
  if (r !== void 0) return r;
560
560
  if (e.deps !== null)
561
561
  for (const i of e.deps) {
562
- if (Ke.call(t, i))
562
+ if (Ye.call(t, i))
563
563
  return !0;
564
- if ((i.f & L) !== 0 && Qn(
564
+ if ((i.f & D) !== 0 && ir(
565
565
  /** @type {Derived} */
566
566
  i,
567
567
  t,
@@ -576,46 +576,46 @@ function Qn(e, t, n) {
576
576
  return n.set(e, !1), !1;
577
577
  }
578
578
  function ae(e) {
579
- var t = Nt = e, n = t.b;
580
- if (n?.is_pending && (e.f & (et | We | Jt)) !== 0 && (e.f & Be) === 0) {
579
+ var t = Mt = e, n = t.b;
580
+ if (n?.is_pending && (e.f & (Qe | We | Zt)) !== 0 && (e.f & De) === 0) {
581
581
  n.defer_effect(e);
582
582
  return;
583
583
  }
584
584
  for (; t.parent !== null; ) {
585
585
  t = t.parent;
586
586
  var r = t.f;
587
- if (Xe !== null && t === S && (e.f & We) === 0)
587
+ if (Je !== null && t === S && (e.f & We) === 0)
588
588
  return;
589
- if ((r & (xe | se)) !== 0) {
590
- if ((r & I) === 0)
589
+ if ((r & (Te | oe)) !== 0) {
590
+ if ((r & P) === 0)
591
591
  return;
592
- t.f ^= I;
592
+ t.f ^= P;
593
593
  }
594
594
  }
595
- j.push(t);
595
+ V.push(t);
596
596
  }
597
- function er(e, t) {
598
- if (!((e.f & se) !== 0 && (e.f & I) !== 0)) {
599
- (e.f & P) !== 0 ? t.d.push(e) : (e.f & re) !== 0 && t.m.push(e), C(e, I);
597
+ function sr(e, t) {
598
+ if (!((e.f & oe) !== 0 && (e.f & P) !== 0)) {
599
+ (e.f & L) !== 0 ? t.d.push(e) : (e.f & ie) !== 0 && t.m.push(e), C(e, P);
600
600
  for (var n = e.first; n !== null; )
601
- er(n, t), n = n.next;
601
+ sr(n, t), n = n.next;
602
602
  }
603
603
  }
604
- function Di(e) {
605
- let t = 0, n = Le(0), r;
604
+ function Ui(e) {
605
+ let t = 0, n = Me(0), r;
606
606
  return () => {
607
- rn() && (u(n), sn(() => (t === 0 && (r = un(() => e(() => vt(n)))), t += 1, () => {
608
- $e(() => {
607
+ on() && (c(n), ln(() => (t === 0 && (r = dn(() => e(() => vt(n)))), t += 1, () => {
608
+ ye(() => {
609
609
  t -= 1, t === 0 && (r?.(), r = void 0, vt(n));
610
610
  });
611
611
  })));
612
612
  };
613
613
  }
614
- var Fi = Ge | He;
615
- function Bi(e, t, n, r) {
616
- new Hi(e, t, n, r);
614
+ var qi = Ke | Fe;
615
+ function Yi(e, t, n, r) {
616
+ new Wi(e, t, n, r);
617
617
  }
618
- class Hi {
618
+ class Wi {
619
619
  /** @type {Boundary | null} */
620
620
  parent;
621
621
  is_pending = !1;
@@ -628,7 +628,7 @@ class Hi {
628
628
  /** @type {TemplateNode} */
629
629
  #e;
630
630
  /** @type {TemplateNode | null} */
631
- #t = x ? T : null;
631
+ #t = k ? E : null;
632
632
  /** @type {BoundaryProps} */
633
633
  #n;
634
634
  /** @type {((anchor: Node) => void)} */
@@ -658,7 +658,7 @@ class Hi {
658
658
  * @type {Source<number> | null}
659
659
  */
660
660
  #h = null;
661
- #w = Di(() => (this.#h = Le(this.#u), () => {
661
+ #m = Ui(() => (this.#h = Me(this.#u), () => {
662
662
  this.#h = null;
663
663
  }));
664
664
  /**
@@ -673,27 +673,27 @@ class Hi {
673
673
  /** @type {Effect} */
674
674
  S
675
675
  );
676
- o.b = this, o.f |= Ft, r(s);
676
+ o.b = this, o.f |= Ht, r(s);
677
677
  }, this.parent = /** @type {Effect} */
678
- S.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#r = on(() => {
679
- if (x) {
678
+ S.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#r = an(() => {
679
+ if (k) {
680
680
  const s = (
681
681
  /** @type {Comment} */
682
682
  this.#t
683
683
  );
684
- Ct();
685
- const o = s.data === Wt;
686
- if (s.data.startsWith(bn)) {
687
- const a = JSON.parse(s.data.slice(bn.length));
684
+ It();
685
+ const o = s.data === Jt;
686
+ if (s.data.startsWith(Tn)) {
687
+ const a = JSON.parse(s.data.slice(Tn.length));
688
688
  this.#y(a);
689
689
  } else o ? this.#$() : this.#b();
690
690
  } else
691
691
  this.#g();
692
- }, Fi), x && (this.#e = T);
692
+ }, qi), k && (this.#e = E);
693
693
  }
694
694
  #b() {
695
695
  try {
696
- this.#o = W(() => this.#l(this.#e));
696
+ this.#o = X(() => this.#l(this.#e));
697
697
  } catch (t) {
698
698
  this.error(t);
699
699
  }
@@ -703,7 +703,7 @@ class Hi {
703
703
  */
704
704
  #y(t) {
705
705
  const n = this.#n.failed;
706
- n && (this.#s = W(() => {
706
+ n && (this.#s = X(() => {
707
707
  n(
708
708
  this.#e,
709
709
  () => t,
@@ -714,9 +714,9 @@ class Hi {
714
714
  }
715
715
  #$() {
716
716
  const t = this.#n.pending;
717
- t && (this.is_pending = !0, this.#i = W(() => t(this.#e)), $e(() => {
718
- var n = this.#a = document.createDocumentFragment(), r = ie();
719
- n.append(r), this.#o = this.#p(() => (ge.ensure(), W(() => this.#l(r)))), this.#f === 0 && (this.#e.before(n), this.#a = null, Me(
717
+ t && (this.is_pending = !0, this.#i = X(() => t(this.#e)), ye(() => {
718
+ var n = this.#a = document.createDocumentFragment(), r = se();
719
+ n.append(r), this.#o = this.#p(() => (ge.ensure(), X(() => this.#l(r)))), this.#f === 0 && (this.#e.before(n), this.#a = null, Oe(
720
720
  /** @type {Effect} */
721
721
  this.#i,
722
722
  () => {
@@ -727,16 +727,16 @@ class Hi {
727
727
  }
728
728
  #g() {
729
729
  try {
730
- if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#u = 0, this.#o = W(() => {
730
+ if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#u = 0, this.#o = X(() => {
731
731
  this.#l(this.#e);
732
732
  }), this.#f > 0) {
733
733
  var t = this.#a = document.createDocumentFragment();
734
- fn(this.#o, t);
734
+ cn(this.#o, t);
735
735
  const n = (
736
736
  /** @type {(anchor: Node) => void} */
737
737
  this.#n.pending
738
738
  );
739
- this.#i = W(() => n(this.#e));
739
+ this.#i = X(() => n(this.#e));
740
740
  } else
741
741
  this.#_();
742
742
  } catch (n) {
@@ -746,9 +746,9 @@ class Hi {
746
746
  #_() {
747
747
  this.is_pending = !1;
748
748
  for (const t of this.#d)
749
- C(t, P), ae(t);
749
+ C(t, L), ae(t);
750
750
  for (const t of this.#v)
751
- C(t, re), ae(t);
751
+ C(t, ie), ae(t);
752
752
  this.#d.clear(), this.#v.clear();
753
753
  }
754
754
  /**
@@ -756,7 +756,7 @@ class Hi {
756
756
  * @param {Effect} effect
757
757
  */
758
758
  defer_effect(t) {
759
- Jn(t, this.#d, this.#v);
759
+ tr(t, this.#d, this.#v);
760
760
  }
761
761
  /**
762
762
  * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
@@ -773,14 +773,14 @@ class Hi {
773
773
  * @param {() => T} fn
774
774
  */
775
775
  #p(t) {
776
- var n = S, r = E, i = X;
777
- ue(this.#r), Z(this.#r), Je(this.#r.ctx);
776
+ var n = S, r = $, i = ee;
777
+ ue(this.#r), te(this.#r), Ge(this.#r.ctx);
778
778
  try {
779
779
  return t();
780
780
  } catch (s) {
781
- return Wn(s), null;
781
+ return Qn(s), null;
782
782
  } finally {
783
- ue(n), Z(r), Je(i);
783
+ ue(n), te(r), Ge(i);
784
784
  }
785
785
  }
786
786
  /**
@@ -788,12 +788,12 @@ class Hi {
788
788
  * if any, such that we can replace the snippet with content once work is done
789
789
  * @param {1 | -1} d
790
790
  */
791
- #m(t) {
791
+ #w(t) {
792
792
  if (!this.has_pending_snippet()) {
793
- this.parent && this.parent.#m(t);
793
+ this.parent && this.parent.#w(t);
794
794
  return;
795
795
  }
796
- this.#f += t, this.#f === 0 && (this.#_(), this.#i && Me(this.#i, () => {
796
+ this.#f += t, this.#f === 0 && (this.#_(), this.#i && Oe(this.#i, () => {
797
797
  this.#i = null;
798
798
  }), this.#a && (this.#e.before(this.#a), this.#a = null));
799
799
  }
@@ -804,12 +804,12 @@ class Hi {
804
804
  * @param {1 | -1} d
805
805
  */
806
806
  update_pending_count(t) {
807
- this.#m(t), this.#u += t, !(!this.#h || this.#c) && (this.#c = !0, $e(() => {
808
- this.#c = !1, this.#h && Ze(this.#h, this.#u);
807
+ this.#w(t), this.#u += t, !(!this.#h || this.#c) && (this.#c = !0, ye(() => {
808
+ this.#c = !1, this.#h && Xe(this.#h, this.#u);
809
809
  }));
810
810
  }
811
811
  get_effect_pending() {
812
- return this.#w(), u(
812
+ return this.#m(), c(
813
813
  /** @type {Source<number>} */
814
814
  this.#h
815
815
  );
@@ -820,17 +820,17 @@ class Hi {
820
820
  let r = this.#n.failed;
821
821
  if (!n && !r)
822
822
  throw t;
823
- this.#o && (H(this.#o), this.#o = null), this.#i && (H(this.#i), this.#i = null), this.#s && (H(this.#s), this.#s = null), x && (Y(
823
+ this.#o && (H(this.#o), this.#o = null), this.#i && (H(this.#i), this.#i = null), this.#s && (H(this.#s), this.#s = null), k && (W(
824
824
  /** @type {TemplateNode} */
825
825
  this.#t
826
- ), Ci(), Y(kt()));
826
+ ), Li(), W(zt()));
827
827
  var i = !1, s = !1;
828
828
  const o = () => {
829
829
  if (i) {
830
- Ri();
830
+ Pi();
831
831
  return;
832
832
  }
833
- i = !0, s && zi(), this.#s !== null && Me(this.#s, () => {
833
+ i = !0, s && Mi(), this.#s !== null && Oe(this.#s, () => {
834
834
  this.#s = null;
835
835
  }), this.#p(() => {
836
836
  ge.ensure(), this.#g();
@@ -839,24 +839,24 @@ class Hi {
839
839
  try {
840
840
  s = !0, n?.(a, o), s = !1;
841
841
  } catch (f) {
842
- be(f, this.#r && this.#r.parent);
842
+ me(f, this.#r && this.#r.parent);
843
843
  }
844
844
  r && (this.#s = this.#p(() => {
845
845
  ge.ensure();
846
846
  try {
847
- return W(() => {
847
+ return X(() => {
848
848
  var f = (
849
849
  /** @type {Effect} */
850
850
  S
851
851
  );
852
- f.b = this, f.f |= Ft, r(
852
+ f.b = this, f.f |= Ht, r(
853
853
  this.#e,
854
854
  () => a,
855
855
  () => o
856
856
  );
857
857
  });
858
858
  } catch (f) {
859
- return be(
859
+ return me(
860
860
  f,
861
861
  /** @type {Effect} */
862
862
  this.#r.parent
@@ -864,26 +864,26 @@ class Hi {
864
864
  }
865
865
  }));
866
866
  };
867
- $e(() => {
867
+ ye(() => {
868
868
  var a;
869
869
  try {
870
870
  a = this.transform_error(t);
871
871
  } catch (f) {
872
- be(f, this.#r && this.#r.parent);
872
+ me(f, this.#r && this.#r.parent);
873
873
  return;
874
874
  }
875
875
  a !== null && typeof a == "object" && typeof /** @type {any} */
876
876
  a.then == "function" ? a.then(
877
877
  l,
878
878
  /** @param {unknown} e */
879
- (f) => be(f, this.#r && this.#r.parent)
879
+ (f) => me(f, this.#r && this.#r.parent)
880
880
  ) : l(a);
881
881
  });
882
882
  }
883
883
  }
884
- function ji(e, t, n, r) {
885
- const i = Ot;
886
- var s = e.filter((v) => !v.settled);
884
+ function Ki(e, t, n, r) {
885
+ const i = Pt;
886
+ var s = e.filter((h) => !h.settled);
887
887
  if (n.length === 0 && s.length === 0) {
888
888
  r(t.map(i));
889
889
  return;
@@ -891,35 +891,35 @@ function ji(e, t, n, r) {
891
891
  var o = (
892
892
  /** @type {Effect} */
893
893
  S
894
- ), l = Ui(), a = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((v) => v.promise)) : null;
895
- function f(v) {
894
+ ), l = Gi(), a = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((h) => h.promise)) : null;
895
+ function f(h) {
896
896
  l();
897
897
  try {
898
- r(v);
899
- } catch (c) {
900
- (o.f & fe) === 0 && be(c, o);
898
+ r(h);
899
+ } catch (_) {
900
+ (o.f & fe) === 0 && me(_, o);
901
901
  }
902
- Ht();
902
+ jt();
903
903
  }
904
904
  if (n.length === 0) {
905
905
  a.then(() => f(t.map(i)));
906
906
  return;
907
907
  }
908
- function h() {
909
- l(), Promise.all(n.map((v) => /* @__PURE__ */ qi(v))).then((v) => f([...t.map(i), ...v])).catch((v) => be(v, o));
908
+ function d() {
909
+ l(), Promise.all(n.map((h) => /* @__PURE__ */ Xi(h))).then((h) => f([...t.map(i), ...h])).catch((h) => me(h, o));
910
910
  }
911
- a ? a.then(h) : h();
911
+ a ? a.then(d) : d();
912
912
  }
913
- function Ui() {
914
- var e = S, t = E, n = X, r = z;
913
+ function Gi() {
914
+ var e = S, t = $, n = ee, r = z;
915
915
  return function(s = !0) {
916
- ue(e), Z(t), Je(n), s && r?.activate();
916
+ ue(e), te(t), Ge(n), s && r?.activate();
917
917
  };
918
918
  }
919
- function Ht(e = !0) {
920
- ue(null), Z(null), Je(null), e && z?.deactivate();
919
+ function jt(e = !0) {
920
+ ue(null), te(null), Ge(null), e && z?.deactivate();
921
921
  }
922
- function Vi() {
922
+ function Ji() {
923
923
  var e = (
924
924
  /** @type {Boundary} */
925
925
  /** @type {Effect} */
@@ -933,16 +933,16 @@ function Vi() {
933
933
  };
934
934
  }
935
935
  // @__NO_SIDE_EFFECTS__
936
- function Ot(e) {
937
- var t = L | P, n = E !== null && (E.f & L) !== 0 ? (
936
+ function Pt(e) {
937
+ var t = D | L, n = $ !== null && ($.f & D) !== 0 ? (
938
938
  /** @type {Derived} */
939
- E
939
+ $
940
940
  ) : null;
941
- return S !== null && (S.f |= He), {
942
- ctx: X,
941
+ return S !== null && (S.f |= Fe), {
942
+ ctx: ee,
943
943
  deps: null,
944
944
  effects: null,
945
- equals: jn,
945
+ equals: Wn,
946
946
  f: t,
947
947
  fn: e,
948
948
  reactions: null,
@@ -957,70 +957,70 @@ function Ot(e) {
957
957
  };
958
958
  }
959
959
  // @__NO_SIDE_EFFECTS__
960
- function qi(e, t, n) {
960
+ function Xi(e, t, n) {
961
961
  /** @type {Effect | null} */
962
- S === null && mi();
962
+ S === null && Si();
963
963
  var i = (
964
964
  /** @type {Promise<V>} */
965
965
  /** @type {unknown} */
966
966
  void 0
967
- ), s = Le(
967
+ ), s = Me(
968
968
  /** @type {V} */
969
969
  M
970
- ), o = !E, l = /* @__PURE__ */ new Map();
971
- return ts(() => {
972
- var a = Fn();
970
+ ), o = !$, l = /* @__PURE__ */ new Map();
971
+ return ls(() => {
972
+ var a = Un();
973
973
  i = a.promise;
974
974
  try {
975
- Promise.resolve(e()).then(a.resolve, a.reject).finally(Ht);
976
- } catch (c) {
977
- a.reject(c), Ht();
975
+ Promise.resolve(e()).then(a.resolve, a.reject).finally(jt);
976
+ } catch (_) {
977
+ a.reject(_), jt();
978
978
  }
979
979
  var f = (
980
980
  /** @type {Batch} */
981
981
  z
982
982
  );
983
983
  if (o) {
984
- var h = Vi();
985
- l.get(f)?.reject(Re), l.delete(f), l.set(f, a);
984
+ var d = Ji();
985
+ l.get(f)?.reject(Ae), l.delete(f), l.set(f, a);
986
986
  }
987
- const v = (c, p = void 0) => {
987
+ const h = (_, p = void 0) => {
988
988
  if (f.activate(), p)
989
- p !== Re && (s.f |= ye, Ze(s, p));
989
+ p !== Ae && (s.f |= be, Xe(s, p));
990
990
  else {
991
- (s.f & ye) !== 0 && (s.f ^= ye), Ze(s, c);
992
- for (const [d, g] of l) {
993
- if (l.delete(d), d === f) break;
994
- g.reject(Re);
991
+ (s.f & be) !== 0 && (s.f ^= be), Xe(s, _);
992
+ for (const [u, g] of l) {
993
+ if (l.delete(u), u === f) break;
994
+ g.reject(Ae);
995
995
  }
996
996
  }
997
- h && h();
997
+ d && d();
998
998
  };
999
- a.promise.then(v, (c) => v(null, c || "unknown"));
1000
- }), dr(() => {
999
+ a.promise.then(h, (_) => h(null, _ || "unknown"));
1000
+ }), gr(() => {
1001
1001
  for (const a of l.values())
1002
- a.reject(Re);
1002
+ a.reject(Ae);
1003
1003
  }), new Promise((a) => {
1004
- function f(h) {
1005
- function v() {
1006
- h === i ? a(s) : f(i);
1004
+ function f(d) {
1005
+ function h() {
1006
+ d === i ? a(s) : f(i);
1007
1007
  }
1008
- h.then(v, v);
1008
+ d.then(h, h);
1009
1009
  }
1010
1010
  f(i);
1011
1011
  });
1012
1012
  }
1013
1013
  // @__NO_SIDE_EFFECTS__
1014
- function ot(e) {
1015
- const t = /* @__PURE__ */ Ot(e);
1016
- return wr(t), t;
1014
+ function st(e) {
1015
+ const t = /* @__PURE__ */ Pt(e);
1016
+ return Sr(t), t;
1017
1017
  }
1018
1018
  // @__NO_SIDE_EFFECTS__
1019
- function tr(e) {
1020
- const t = /* @__PURE__ */ Ot(e);
1021
- return t.equals = Un, t;
1019
+ function or(e) {
1020
+ const t = /* @__PURE__ */ Pt(e);
1021
+ return t.equals = Kn, t;
1022
1022
  }
1023
- function Yi(e) {
1023
+ function Zi(e) {
1024
1024
  var t = e.effects;
1025
1025
  if (t !== null) {
1026
1026
  e.effects = null;
@@ -1031,9 +1031,9 @@ function Yi(e) {
1031
1031
  );
1032
1032
  }
1033
1033
  }
1034
- function Ki(e) {
1034
+ function Qi(e) {
1035
1035
  for (var t = e.parent; t !== null; ) {
1036
- if ((t.f & L) === 0)
1036
+ if ((t.f & D) === 0)
1037
1037
  return (t.f & fe) === 0 ? (
1038
1038
  /** @type {Effect} */
1039
1039
  t
@@ -1042,102 +1042,102 @@ function Ki(e) {
1042
1042
  }
1043
1043
  return null;
1044
1044
  }
1045
- function Qt(e) {
1045
+ function tn(e) {
1046
1046
  var t, n = S;
1047
- ue(Ki(e));
1047
+ ue(Qi(e));
1048
1048
  try {
1049
- e.f &= ~Pe, Yi(e), t = Er(e);
1049
+ e.f &= ~Ie, Zi(e), t = Ar(e);
1050
1050
  } finally {
1051
1051
  ue(n);
1052
1052
  }
1053
1053
  return t;
1054
1054
  }
1055
- function nr(e) {
1056
- var t = Qt(e);
1057
- if (!e.equals(t) && (e.wv = yr(), (!z?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
1058
- C(e, I);
1055
+ function lr(e) {
1056
+ var t = tn(e);
1057
+ if (!e.equals(t) && (e.wv = xr(), (!z?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
1058
+ C(e, P);
1059
1059
  return;
1060
1060
  }
1061
- Te || (te !== null ? (rn() || z?.is_fork) && te.set(e, t) : Zt(e));
1061
+ Ee || (ne !== null ? (on() || z?.is_fork) && ne.set(e, t) : en(e));
1062
1062
  }
1063
- function Wi(e) {
1063
+ function es(e) {
1064
1064
  if (e.effects !== null)
1065
1065
  for (const t of e.effects)
1066
- (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Re), t.teardown = di, t.ac = null, _t(t, 0), ln(t));
1066
+ (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Ae), t.teardown = wi, t.ac = null, _t(t, 0), fn(t));
1067
1067
  }
1068
- function rr(e) {
1068
+ function ar(e) {
1069
1069
  if (e.effects !== null)
1070
1070
  for (const t of e.effects)
1071
- t.teardown && Qe(t);
1071
+ t.teardown && Ze(t);
1072
1072
  }
1073
- let jt = /* @__PURE__ */ new Set();
1074
- const Ee = /* @__PURE__ */ new Map();
1075
- let ir = !1;
1076
- function Le(e, t) {
1073
+ let Ut = /* @__PURE__ */ new Set();
1074
+ const $e = /* @__PURE__ */ new Map();
1075
+ let fr = !1;
1076
+ function Me(e, t) {
1077
1077
  var n = {
1078
1078
  f: 0,
1079
1079
  // TODO ideally we could skip this altogether, but it causes type errors
1080
1080
  v: e,
1081
1081
  reactions: null,
1082
- equals: jn,
1082
+ equals: Wn,
1083
1083
  rv: 0,
1084
1084
  wv: 0
1085
1085
  };
1086
1086
  return n;
1087
1087
  }
1088
1088
  // @__NO_SIDE_EFFECTS__
1089
- function N(e, t) {
1090
- const n = Le(e);
1091
- return wr(n), n;
1089
+ function O(e, t) {
1090
+ const n = Me(e);
1091
+ return Sr(n), n;
1092
1092
  }
1093
1093
  // @__NO_SIDE_EFFECTS__
1094
- function sr(e, t = !1, n = !0) {
1095
- const r = Le(e);
1096
- return t || (r.equals = Un), r;
1094
+ function ur(e, t = !1, n = !0) {
1095
+ const r = Me(e);
1096
+ return t || (r.equals = Kn), r;
1097
1097
  }
1098
- function w(e, t, n = !1) {
1099
- E !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1098
+ function b(e, t, n = !1) {
1099
+ $ !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1100
1100
  // to ensure we error if state is set inside an inspect effect
1101
- (!ne || (E.f & $n) !== 0) && Yn() && (E.f & (L | Se | Xt | $n)) !== 0 && (J === null || !Ke.call(J, e)) && Ai();
1102
- let r = n ? qe(t) : t;
1103
- return Ze(e, r);
1101
+ (!re || ($.f & kn) !== 0) && Xn() && ($.f & (D | Se | Qt | kn)) !== 0 && (Q === null || !Ye.call(Q, e)) && Ii();
1102
+ let r = n ? Ue(t) : t;
1103
+ return Xe(e, r);
1104
1104
  }
1105
- function Ze(e, t) {
1105
+ function Xe(e, t) {
1106
1106
  if (!e.equals(t)) {
1107
1107
  var n = e.v;
1108
- Te ? Ee.set(e, t) : Ee.set(e, n), e.v = t;
1108
+ Ee ? $e.set(e, t) : $e.set(e, n), e.v = t;
1109
1109
  var r = ge.ensure();
1110
- if (r.capture(e, n), (e.f & L) !== 0) {
1110
+ if (r.capture(e, n), (e.f & D) !== 0) {
1111
1111
  const i = (
1112
1112
  /** @type {Derived} */
1113
1113
  e
1114
1114
  );
1115
- (e.f & P) !== 0 && Qt(i), Zt(i);
1115
+ (e.f & L) !== 0 && tn(i), en(i);
1116
1116
  }
1117
- e.wv = yr(), or(e, P), S !== null && (S.f & I) !== 0 && (S.f & (se | xe)) === 0 && (K === null ? is([e]) : K.push(e)), !r.is_fork && jt.size > 0 && !ir && Gi();
1117
+ e.wv = xr(), cr(e, L), S !== null && (S.f & P) !== 0 && (S.f & (oe | Te)) === 0 && (J === null ? us([e]) : J.push(e)), !r.is_fork && Ut.size > 0 && !fr && ts();
1118
1118
  }
1119
1119
  return t;
1120
1120
  }
1121
- function Gi() {
1122
- ir = !1;
1123
- for (const e of jt)
1124
- (e.f & I) !== 0 && C(e, re), gt(e) && Qe(e);
1125
- jt.clear();
1121
+ function ts() {
1122
+ fr = !1;
1123
+ for (const e of Ut)
1124
+ (e.f & P) !== 0 && C(e, ie), gt(e) && Ze(e);
1125
+ Ut.clear();
1126
1126
  }
1127
1127
  function vt(e) {
1128
- w(e, e.v + 1);
1128
+ b(e, e.v + 1);
1129
1129
  }
1130
- function or(e, t) {
1130
+ function cr(e, t) {
1131
1131
  var n = e.reactions;
1132
1132
  if (n !== null)
1133
1133
  for (var r = n.length, i = 0; i < r; i++) {
1134
- var s = n[i], o = s.f, l = (o & P) === 0;
1135
- if (l && C(s, t), (o & L) !== 0) {
1134
+ var s = n[i], o = s.f, l = (o & L) === 0;
1135
+ if (l && C(s, t), (o & D) !== 0) {
1136
1136
  var a = (
1137
1137
  /** @type {Derived} */
1138
1138
  s
1139
1139
  );
1140
- te?.delete(a), (o & Pe) === 0 && (o & G && (s.f |= Pe), or(a, re));
1140
+ ne?.delete(a), (o & Ie) === 0 && (o & Z && (s.f |= Ie), cr(a, ie));
1141
1141
  } else l && ((o & Se) !== 0 && ve !== null && ve.add(
1142
1142
  /** @type {Effect} */
1143
1143
  s
@@ -1147,21 +1147,21 @@ function or(e, t) {
1147
1147
  ));
1148
1148
  }
1149
1149
  }
1150
- function qe(e) {
1150
+ function Ue(e) {
1151
1151
  if (typeof e != "object" || e === null || dt in e)
1152
1152
  return e;
1153
- const t = Dn(e);
1154
- if (t !== ui && t !== ci)
1153
+ const t = jn(e);
1154
+ if (t !== pi && t !== gi)
1155
1155
  return e;
1156
- var n = /* @__PURE__ */ new Map(), r = Ln(e), i = /* @__PURE__ */ N(0), s = Ie, o = (l) => {
1157
- if (Ie === s)
1156
+ var n = /* @__PURE__ */ new Map(), r = Vn(e), i = /* @__PURE__ */ O(0), s = Ne, o = (l) => {
1157
+ if (Ne === s)
1158
1158
  return l();
1159
- var a = E, f = Ie;
1160
- Z(null), xn(s);
1161
- var h = l();
1162
- return Z(a), xn(f), h;
1159
+ var a = $, f = Ne;
1160
+ te(null), Cn(s);
1161
+ var d = l();
1162
+ return te(a), Cn(f), d;
1163
1163
  };
1164
- return r && n.set("length", /* @__PURE__ */ N(
1164
+ return r && n.set("length", /* @__PURE__ */ O(
1165
1165
  /** @type {any[]} */
1166
1166
  e.length
1167
1167
  )), new Proxy(
@@ -1169,49 +1169,49 @@ function qe(e) {
1169
1169
  e,
1170
1170
  {
1171
1171
  defineProperty(l, a, f) {
1172
- (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && xi();
1173
- var h = n.get(a);
1174
- return h === void 0 ? o(() => {
1175
- var v = /* @__PURE__ */ N(f.value);
1176
- return n.set(a, v), v;
1177
- }) : w(h, f.value, !0), !0;
1172
+ (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Oi();
1173
+ var d = n.get(a);
1174
+ return d === void 0 ? o(() => {
1175
+ var h = /* @__PURE__ */ O(f.value);
1176
+ return n.set(a, h), h;
1177
+ }) : b(d, f.value, !0), !0;
1178
1178
  },
1179
1179
  deleteProperty(l, a) {
1180
1180
  var f = n.get(a);
1181
1181
  if (f === void 0) {
1182
1182
  if (a in l) {
1183
- const h = o(() => /* @__PURE__ */ N(M));
1184
- n.set(a, h), vt(i);
1183
+ const d = o(() => /* @__PURE__ */ O(M));
1184
+ n.set(a, d), vt(i);
1185
1185
  }
1186
1186
  } else
1187
- w(f, M), vt(i);
1187
+ b(f, M), vt(i);
1188
1188
  return !0;
1189
1189
  },
1190
1190
  get(l, a, f) {
1191
1191
  if (a === dt)
1192
1192
  return e;
1193
- var h = n.get(a), v = a in l;
1194
- if (h === void 0 && (!v || Oe(l, a)?.writable) && (h = o(() => {
1195
- var p = qe(v ? l[a] : M), d = /* @__PURE__ */ N(p);
1196
- return d;
1197
- }), n.set(a, h)), h !== void 0) {
1198
- var c = u(h);
1199
- return c === M ? void 0 : c;
1193
+ var d = n.get(a), h = a in l;
1194
+ if (d === void 0 && (!h || Ce(l, a)?.writable) && (d = o(() => {
1195
+ var p = Ue(h ? l[a] : M), u = /* @__PURE__ */ O(p);
1196
+ return u;
1197
+ }), n.set(a, d)), d !== void 0) {
1198
+ var _ = c(d);
1199
+ return _ === M ? void 0 : _;
1200
1200
  }
1201
1201
  return Reflect.get(l, a, f);
1202
1202
  },
1203
1203
  getOwnPropertyDescriptor(l, a) {
1204
1204
  var f = Reflect.getOwnPropertyDescriptor(l, a);
1205
1205
  if (f && "value" in f) {
1206
- var h = n.get(a);
1207
- h && (f.value = u(h));
1206
+ var d = n.get(a);
1207
+ d && (f.value = c(d));
1208
1208
  } else if (f === void 0) {
1209
- var v = n.get(a), c = v?.v;
1210
- if (v !== void 0 && c !== M)
1209
+ var h = n.get(a), _ = h?.v;
1210
+ if (h !== void 0 && _ !== M)
1211
1211
  return {
1212
1212
  enumerable: !0,
1213
1213
  configurable: !0,
1214
- value: c,
1214
+ value: _,
1215
1215
  writable: !0
1216
1216
  };
1217
1217
  }
@@ -1220,174 +1220,174 @@ function qe(e) {
1220
1220
  has(l, a) {
1221
1221
  if (a === dt)
1222
1222
  return !0;
1223
- var f = n.get(a), h = f !== void 0 && f.v !== M || Reflect.has(l, a);
1224
- if (f !== void 0 || S !== null && (!h || Oe(l, a)?.writable)) {
1223
+ var f = n.get(a), d = f !== void 0 && f.v !== M || Reflect.has(l, a);
1224
+ if (f !== void 0 || S !== null && (!d || Ce(l, a)?.writable)) {
1225
1225
  f === void 0 && (f = o(() => {
1226
- var c = h ? qe(l[a]) : M, p = /* @__PURE__ */ N(c);
1226
+ var _ = d ? Ue(l[a]) : M, p = /* @__PURE__ */ O(_);
1227
1227
  return p;
1228
1228
  }), n.set(a, f));
1229
- var v = u(f);
1230
- if (v === M)
1229
+ var h = c(f);
1230
+ if (h === M)
1231
1231
  return !1;
1232
1232
  }
1233
- return h;
1233
+ return d;
1234
1234
  },
1235
- set(l, a, f, h) {
1236
- var v = n.get(a), c = a in l;
1235
+ set(l, a, f, d) {
1236
+ var h = n.get(a), _ = a in l;
1237
1237
  if (r && a === "length")
1238
1238
  for (var p = f; p < /** @type {Source<number>} */
1239
- v.v; p += 1) {
1240
- var d = n.get(p + "");
1241
- d !== void 0 ? w(d, M) : p in l && (d = o(() => /* @__PURE__ */ N(M)), n.set(p + "", d));
1239
+ h.v; p += 1) {
1240
+ var u = n.get(p + "");
1241
+ u !== void 0 ? b(u, M) : p in l && (u = o(() => /* @__PURE__ */ O(M)), n.set(p + "", u));
1242
1242
  }
1243
- if (v === void 0)
1244
- (!c || Oe(l, a)?.writable) && (v = o(() => /* @__PURE__ */ N(void 0)), w(v, qe(f)), n.set(a, v));
1243
+ if (h === void 0)
1244
+ (!_ || Ce(l, a)?.writable) && (h = o(() => /* @__PURE__ */ O(void 0)), b(h, Ue(f)), n.set(a, h));
1245
1245
  else {
1246
- c = v.v !== M;
1247
- var g = o(() => qe(f));
1248
- w(v, g);
1246
+ _ = h.v !== M;
1247
+ var g = o(() => Ue(f));
1248
+ b(h, g);
1249
1249
  }
1250
- var b = Reflect.getOwnPropertyDescriptor(l, a);
1251
- if (b?.set && b.set.call(h, f), !c) {
1250
+ var T = Reflect.getOwnPropertyDescriptor(l, a);
1251
+ if (T?.set && T.set.call(d, f), !_) {
1252
1252
  if (r && typeof a == "string") {
1253
1253
  var y = (
1254
1254
  /** @type {Source<number>} */
1255
1255
  n.get("length")
1256
1256
  ), m = Number(a);
1257
- Number.isInteger(m) && m >= y.v && w(y, m + 1);
1257
+ Number.isInteger(m) && m >= y.v && b(y, m + 1);
1258
1258
  }
1259
1259
  vt(i);
1260
1260
  }
1261
1261
  return !0;
1262
1262
  },
1263
1263
  ownKeys(l) {
1264
- u(i);
1265
- var a = Reflect.ownKeys(l).filter((v) => {
1266
- var c = n.get(v);
1267
- return c === void 0 || c.v !== M;
1264
+ c(i);
1265
+ var a = Reflect.ownKeys(l).filter((h) => {
1266
+ var _ = n.get(h);
1267
+ return _ === void 0 || _.v !== M;
1268
1268
  });
1269
- for (var [f, h] of n)
1270
- h.v !== M && !(f in l) && a.push(f);
1269
+ for (var [f, d] of n)
1270
+ d.v !== M && !(f in l) && a.push(f);
1271
1271
  return a;
1272
1272
  },
1273
1273
  setPrototypeOf() {
1274
- ki();
1274
+ Ni();
1275
1275
  }
1276
1276
  }
1277
1277
  );
1278
1278
  }
1279
- var Tn, lr, ar, fr;
1280
- function Ut() {
1281
- if (Tn === void 0) {
1282
- Tn = window, lr = /Firefox/.test(navigator.userAgent);
1279
+ var Rn, dr, hr, vr;
1280
+ function qt() {
1281
+ if (Rn === void 0) {
1282
+ Rn = window, dr = /Firefox/.test(navigator.userAgent);
1283
1283
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1284
- ar = Oe(t, "firstChild").get, fr = Oe(t, "nextSibling").get, yn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), yn(n) && (n.__t = void 0);
1284
+ hr = Ce(t, "firstChild").get, vr = Ce(t, "nextSibling").get, xn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), xn(n) && (n.__t = void 0);
1285
1285
  }
1286
1286
  }
1287
- function ie(e = "") {
1287
+ function se(e = "") {
1288
1288
  return document.createTextNode(e);
1289
1289
  }
1290
1290
  // @__NO_SIDE_EFFECTS__
1291
- function De(e) {
1291
+ function Pe(e) {
1292
1292
  return (
1293
1293
  /** @type {TemplateNode | null} */
1294
- ar.call(e)
1294
+ hr.call(e)
1295
1295
  );
1296
1296
  }
1297
1297
  // @__NO_SIDE_EFFECTS__
1298
1298
  function ce(e) {
1299
1299
  return (
1300
1300
  /** @type {TemplateNode | null} */
1301
- fr.call(e)
1301
+ vr.call(e)
1302
1302
  );
1303
1303
  }
1304
- function Ue(e, t) {
1305
- if (!x)
1306
- return /* @__PURE__ */ De(e);
1307
- var n = /* @__PURE__ */ De(T);
1304
+ function Ve(e, t) {
1305
+ if (!k)
1306
+ return /* @__PURE__ */ Pe(e);
1307
+ var n = /* @__PURE__ */ Pe(E);
1308
1308
  if (n === null)
1309
- n = T.appendChild(ie());
1310
- else if (t && n.nodeType !== zt) {
1311
- var r = ie();
1312
- return n?.before(r), Y(r), r;
1309
+ n = E.appendChild(se());
1310
+ else if (t && n.nodeType !== Ot) {
1311
+ var r = se();
1312
+ return n?.before(r), W(r), r;
1313
1313
  }
1314
- return t && tn(
1314
+ return t && rn(
1315
1315
  /** @type {Text} */
1316
1316
  n
1317
- ), Y(n), n;
1317
+ ), W(n), n;
1318
1318
  }
1319
- function Ji(e, t = !1) {
1320
- if (!x) {
1321
- var n = /* @__PURE__ */ De(e);
1319
+ function ns(e, t = !1) {
1320
+ if (!k) {
1321
+ var n = /* @__PURE__ */ Pe(e);
1322
1322
  return n instanceof Comment && n.data === "" ? /* @__PURE__ */ ce(n) : n;
1323
1323
  }
1324
1324
  if (t) {
1325
- if (T?.nodeType !== zt) {
1326
- var r = ie();
1327
- return T?.before(r), Y(r), r;
1325
+ if (E?.nodeType !== Ot) {
1326
+ var r = se();
1327
+ return E?.before(r), W(r), r;
1328
1328
  }
1329
- tn(
1329
+ rn(
1330
1330
  /** @type {Text} */
1331
- T
1331
+ E
1332
1332
  );
1333
1333
  }
1334
- return T;
1334
+ return E;
1335
1335
  }
1336
- function Ve(e, t = 1, n = !1) {
1337
- let r = x ? T : e;
1336
+ function ot(e, t = 1, n = !1) {
1337
+ let r = k ? E : e;
1338
1338
  for (var i; t--; )
1339
1339
  i = r, r = /** @type {TemplateNode} */
1340
1340
  /* @__PURE__ */ ce(r);
1341
- if (!x)
1341
+ if (!k)
1342
1342
  return r;
1343
1343
  if (n) {
1344
- if (r?.nodeType !== zt) {
1345
- var s = ie();
1346
- return r === null ? i?.after(s) : r.before(s), Y(s), s;
1344
+ if (r?.nodeType !== Ot) {
1345
+ var s = se();
1346
+ return r === null ? i?.after(s) : r.before(s), W(s), s;
1347
1347
  }
1348
- tn(
1348
+ rn(
1349
1349
  /** @type {Text} */
1350
1350
  r
1351
1351
  );
1352
1352
  }
1353
- return Y(r), r;
1353
+ return W(r), r;
1354
1354
  }
1355
- function ur(e) {
1355
+ function _r(e) {
1356
1356
  e.textContent = "";
1357
1357
  }
1358
- function cr() {
1358
+ function pr() {
1359
1359
  return !1;
1360
1360
  }
1361
- function en(e, t, n) {
1361
+ function nn(e, t, n) {
1362
1362
  return (
1363
1363
  /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
1364
- document.createElementNS(Pn, e, void 0)
1364
+ document.createElementNS(Hn, e, void 0)
1365
1365
  );
1366
1366
  }
1367
- function tn(e) {
1367
+ function rn(e) {
1368
1368
  if (
1369
1369
  /** @type {string} */
1370
1370
  e.nodeValue.length < 65536
1371
1371
  )
1372
1372
  return;
1373
1373
  let t = e.nextSibling;
1374
- for (; t !== null && t.nodeType === zt; )
1374
+ for (; t !== null && t.nodeType === Ot; )
1375
1375
  t.remove(), e.nodeValue += /** @type {string} */
1376
1376
  t.nodeValue, t = e.nextSibling;
1377
1377
  }
1378
- function nn(e) {
1379
- var t = E, n = S;
1380
- Z(null), ue(null);
1378
+ function sn(e) {
1379
+ var t = $, n = S;
1380
+ te(null), ue(null);
1381
1381
  try {
1382
1382
  return e();
1383
1383
  } finally {
1384
- Z(t), ue(n);
1384
+ te(t), ue(n);
1385
1385
  }
1386
1386
  }
1387
- function Xi(e) {
1388
- S === null && (E === null && $i(), yi()), Te && bi();
1387
+ function rs(e) {
1388
+ S === null && ($ === null && Ai(), ki()), Ee && xi();
1389
1389
  }
1390
- function Zi(e, t) {
1390
+ function is(e, t) {
1391
1391
  var n = t.last;
1392
1392
  n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
1393
1393
  }
@@ -1395,10 +1395,10 @@ function de(e, t) {
1395
1395
  var n = S;
1396
1396
  n !== null && (n.f & B) !== 0 && (e |= B);
1397
1397
  var r = {
1398
- ctx: X,
1398
+ ctx: ee,
1399
1399
  deps: null,
1400
1400
  nodes: null,
1401
- f: e | P | G,
1401
+ f: e | L | Z,
1402
1402
  first: null,
1403
1403
  fn: t,
1404
1404
  last: null,
@@ -1410,145 +1410,145 @@ function de(e, t) {
1410
1410
  wv: 0,
1411
1411
  ac: null
1412
1412
  }, i = r;
1413
- if ((e & et) !== 0)
1414
- Xe !== null ? Xe.push(r) : ae(r);
1413
+ if ((e & Qe) !== 0)
1414
+ Je !== null ? Je.push(r) : ae(r);
1415
1415
  else if (t !== null) {
1416
1416
  try {
1417
- Qe(r);
1417
+ Ze(r);
1418
1418
  } catch (o) {
1419
1419
  throw H(r), o;
1420
1420
  }
1421
1421
  i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
1422
- (i.f & He) === 0 && (i = i.first, (e & Se) !== 0 && (e & Ge) !== 0 && i !== null && (i.f |= Ge));
1422
+ (i.f & Fe) === 0 && (i = i.first, (e & Se) !== 0 && (e & Ke) !== 0 && i !== null && (i.f |= Ke));
1423
1423
  }
1424
- if (i !== null && (i.parent = n, n !== null && Zi(i, n), E !== null && (E.f & L) !== 0 && (e & xe) === 0)) {
1424
+ if (i !== null && (i.parent = n, n !== null && is(i, n), $ !== null && ($.f & D) !== 0 && (e & Te) === 0)) {
1425
1425
  var s = (
1426
1426
  /** @type {Derived} */
1427
- E
1427
+ $
1428
1428
  );
1429
1429
  (s.effects ??= []).push(i);
1430
1430
  }
1431
1431
  return r;
1432
1432
  }
1433
- function rn() {
1434
- return E !== null && !ne;
1433
+ function on() {
1434
+ return $ !== null && !re;
1435
1435
  }
1436
- function dr(e) {
1436
+ function gr(e) {
1437
1437
  const t = de(We, null);
1438
- return C(t, I), t.teardown = e, t;
1438
+ return C(t, P), t.teardown = e, t;
1439
1439
  }
1440
- function wt(e) {
1441
- Xi();
1440
+ function lt(e) {
1441
+ rs();
1442
1442
  var t = (
1443
1443
  /** @type {Effect} */
1444
1444
  S.f
1445
- ), n = !E && (t & se) !== 0 && (t & Be) === 0;
1445
+ ), n = !$ && (t & oe) !== 0 && (t & De) === 0;
1446
1446
  if (n) {
1447
1447
  var r = (
1448
1448
  /** @type {ComponentContext} */
1449
- X
1449
+ ee
1450
1450
  );
1451
1451
  (r.e ??= []).push(e);
1452
1452
  } else
1453
- return hr(e);
1453
+ return wr(e);
1454
1454
  }
1455
- function hr(e) {
1456
- return de(et | _i, e);
1455
+ function wr(e) {
1456
+ return de(Qe | yi, e);
1457
1457
  }
1458
- function Qi(e) {
1458
+ function ss(e) {
1459
1459
  ge.ensure();
1460
- const t = de(xe | He, e);
1460
+ const t = de(Te | Fe, e);
1461
1461
  return () => {
1462
1462
  H(t);
1463
1463
  };
1464
1464
  }
1465
- function es(e) {
1465
+ function os(e) {
1466
1466
  ge.ensure();
1467
- const t = de(xe | He, e);
1467
+ const t = de(Te | Fe, e);
1468
1468
  return (n = {}) => new Promise((r) => {
1469
- n.outro ? Me(t, () => {
1469
+ n.outro ? Oe(t, () => {
1470
1470
  H(t), r(void 0);
1471
1471
  }) : (H(t), r(void 0));
1472
1472
  });
1473
1473
  }
1474
- function vr(e) {
1475
- return de(et, e);
1474
+ function mr(e) {
1475
+ return de(Qe, e);
1476
1476
  }
1477
- function ts(e) {
1478
- return de(Xt | He, e);
1477
+ function ls(e) {
1478
+ return de(Qt | Fe, e);
1479
1479
  }
1480
- function sn(e, t = 0) {
1480
+ function ln(e, t = 0) {
1481
1481
  return de(We | t, e);
1482
1482
  }
1483
- function Pt(e, t = [], n = [], r = []) {
1484
- ji(r, t, n, (i) => {
1485
- de(We, () => e(...i.map(u)));
1483
+ function Dt(e, t = [], n = [], r = []) {
1484
+ Ki(r, t, n, (i) => {
1485
+ de(We, () => e(...i.map(c)));
1486
1486
  });
1487
1487
  }
1488
- function on(e, t = 0) {
1488
+ function an(e, t = 0) {
1489
1489
  var n = de(Se | t, e);
1490
1490
  return n;
1491
1491
  }
1492
- function W(e) {
1493
- return de(se | He, e);
1492
+ function X(e) {
1493
+ return de(oe | Fe, e);
1494
1494
  }
1495
- function _r(e) {
1495
+ function br(e) {
1496
1496
  var t = e.teardown;
1497
1497
  if (t !== null) {
1498
- const n = Te, r = E;
1499
- Sn(!0), Z(null);
1498
+ const n = Ee, r = $;
1499
+ zn(!0), te(null);
1500
1500
  try {
1501
1501
  t.call(null);
1502
1502
  } finally {
1503
- Sn(n), Z(r);
1503
+ zn(n), te(r);
1504
1504
  }
1505
1505
  }
1506
1506
  }
1507
- function ln(e, t = !1) {
1507
+ function fn(e, t = !1) {
1508
1508
  var n = e.first;
1509
1509
  for (e.first = e.last = null; n !== null; ) {
1510
1510
  const i = n.ac;
1511
- i !== null && nn(() => {
1512
- i.abort(Re);
1511
+ i !== null && sn(() => {
1512
+ i.abort(Ae);
1513
1513
  });
1514
1514
  var r = n.next;
1515
- (n.f & xe) !== 0 ? n.parent = null : H(n, t), n = r;
1515
+ (n.f & Te) !== 0 ? n.parent = null : H(n, t), n = r;
1516
1516
  }
1517
1517
  }
1518
- function ns(e) {
1518
+ function as(e) {
1519
1519
  for (var t = e.first; t !== null; ) {
1520
1520
  var n = t.next;
1521
- (t.f & se) === 0 && H(t), t = n;
1521
+ (t.f & oe) === 0 && H(t), t = n;
1522
1522
  }
1523
1523
  }
1524
1524
  function H(e, t = !0) {
1525
1525
  var n = !1;
1526
- (t || (e.f & vi) !== 0) && e.nodes !== null && e.nodes.end !== null && (rs(
1526
+ (t || (e.f & bi) !== 0) && e.nodes !== null && e.nodes.end !== null && (fs(
1527
1527
  e.nodes.start,
1528
1528
  /** @type {TemplateNode} */
1529
1529
  e.nodes.end
1530
- ), n = !0), ln(e, t && !n), _t(e, 0), C(e, fe);
1530
+ ), n = !0), fn(e, t && !n), _t(e, 0), C(e, fe);
1531
1531
  var r = e.nodes && e.nodes.t;
1532
1532
  if (r !== null)
1533
1533
  for (const s of r)
1534
1534
  s.stop();
1535
- _r(e);
1535
+ br(e);
1536
1536
  var i = e.parent;
1537
- i !== null && i.first !== null && pr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1537
+ i !== null && i.first !== null && yr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1538
1538
  }
1539
- function rs(e, t) {
1539
+ function fs(e, t) {
1540
1540
  for (; e !== null; ) {
1541
1541
  var n = e === t ? null : /* @__PURE__ */ ce(e);
1542
1542
  e.remove(), e = n;
1543
1543
  }
1544
1544
  }
1545
- function pr(e) {
1545
+ function yr(e) {
1546
1546
  var t = e.parent, n = e.prev, r = e.next;
1547
1547
  n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1548
1548
  }
1549
- function Me(e, t, n = !0) {
1549
+ function Oe(e, t, n = !0) {
1550
1550
  var r = [];
1551
- gr(e, r, !0);
1551
+ $r(e, r, !0);
1552
1552
  var i = () => {
1553
1553
  n && H(e), t && t();
1554
1554
  }, s = r.length;
@@ -1559,7 +1559,7 @@ function Me(e, t, n = !0) {
1559
1559
  } else
1560
1560
  i();
1561
1561
  }
1562
- function gr(e, t, n) {
1562
+ function $r(e, t, n) {
1563
1563
  if ((e.f & B) === 0) {
1564
1564
  e.f ^= B;
1565
1565
  var r = e.nodes && e.nodes.t;
@@ -1567,23 +1567,23 @@ function gr(e, t, n) {
1567
1567
  for (const l of r)
1568
1568
  (l.is_global || n) && t.push(l);
1569
1569
  for (var i = e.first; i !== null; ) {
1570
- var s = i.next, o = (i.f & Ge) !== 0 || // If this is a branch effect without a block effect parent,
1570
+ var s = i.next, o = (i.f & Ke) !== 0 || // If this is a branch effect without a block effect parent,
1571
1571
  // it means the parent block effect was pruned. In that case,
1572
1572
  // transparency information was transferred to the branch effect.
1573
- (i.f & se) !== 0 && (e.f & Se) !== 0;
1574
- gr(i, t, o ? n : !1), i = s;
1573
+ (i.f & oe) !== 0 && (e.f & Se) !== 0;
1574
+ $r(i, t, o ? n : !1), i = s;
1575
1575
  }
1576
1576
  }
1577
1577
  }
1578
- function an(e) {
1579
- mr(e, !0);
1578
+ function un(e) {
1579
+ Er(e, !0);
1580
1580
  }
1581
- function mr(e, t) {
1581
+ function Er(e, t) {
1582
1582
  if ((e.f & B) !== 0) {
1583
1583
  e.f ^= B;
1584
1584
  for (var n = e.first; n !== null; ) {
1585
- var r = n.next, i = (n.f & Ge) !== 0 || (n.f & se) !== 0;
1586
- mr(n, i ? t : !1), n = r;
1585
+ var r = n.next, i = (n.f & Ke) !== 0 || (n.f & oe) !== 0;
1586
+ Er(n, i ? t : !1), n = r;
1587
1587
  }
1588
1588
  var s = e.nodes && e.nodes.t;
1589
1589
  if (s !== null)
@@ -1591,45 +1591,45 @@ function mr(e, t) {
1591
1591
  (o.is_global || t) && o.in();
1592
1592
  }
1593
1593
  }
1594
- function fn(e, t) {
1594
+ function cn(e, t) {
1595
1595
  if (e.nodes)
1596
1596
  for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
1597
1597
  var i = n === r ? null : /* @__PURE__ */ ce(n);
1598
1598
  t.append(n), n = i;
1599
1599
  }
1600
1600
  }
1601
- let Et = !1, Te = !1;
1602
- function Sn(e) {
1603
- Te = e;
1601
+ let xt = !1, Ee = !1;
1602
+ function zn(e) {
1603
+ Ee = e;
1604
1604
  }
1605
- let E = null, ne = !1;
1606
- function Z(e) {
1607
- E = e;
1605
+ let $ = null, re = !1;
1606
+ function te(e) {
1607
+ $ = e;
1608
1608
  }
1609
1609
  let S = null;
1610
1610
  function ue(e) {
1611
1611
  S = e;
1612
1612
  }
1613
- let J = null;
1614
- function wr(e) {
1615
- E !== null && (J === null ? J = [e] : J.push(e));
1613
+ let Q = null;
1614
+ function Sr(e) {
1615
+ $ !== null && (Q === null ? Q = [e] : Q.push(e));
1616
1616
  }
1617
- let U = null, q = 0, K = null;
1618
- function is(e) {
1619
- K = e;
1617
+ let j = null, Y = 0, J = null;
1618
+ function us(e) {
1619
+ J = e;
1620
1620
  }
1621
- let br = 1, Ne = 0, Ie = Ne;
1622
- function xn(e) {
1623
- Ie = e;
1621
+ let Tr = 1, ze = 0, Ne = ze;
1622
+ function Cn(e) {
1623
+ Ne = e;
1624
1624
  }
1625
- function yr() {
1626
- return ++br;
1625
+ function xr() {
1626
+ return ++Tr;
1627
1627
  }
1628
1628
  function gt(e) {
1629
1629
  var t = e.f;
1630
- if ((t & P) !== 0)
1630
+ if ((t & L) !== 0)
1631
1631
  return !0;
1632
- if (t & L && (e.f &= ~Pe), (t & re) !== 0) {
1632
+ if (t & D && (e.f &= ~Ie), (t & ie) !== 0) {
1633
1633
  for (var n = (
1634
1634
  /** @type {Value[]} */
1635
1635
  e.deps
@@ -1638,222 +1638,222 @@ function gt(e) {
1638
1638
  if (gt(
1639
1639
  /** @type {Derived} */
1640
1640
  s
1641
- ) && nr(
1641
+ ) && lr(
1642
1642
  /** @type {Derived} */
1643
1643
  s
1644
1644
  ), s.wv > e.wv)
1645
1645
  return !0;
1646
1646
  }
1647
- (t & G) !== 0 && // During time traveling we don't want to reset the status so that
1647
+ (t & Z) !== 0 && // During time traveling we don't want to reset the status so that
1648
1648
  // traversal of the graph in the other batches still happens
1649
- te === null && C(e, I);
1649
+ ne === null && C(e, P);
1650
1650
  }
1651
1651
  return !1;
1652
1652
  }
1653
- function $r(e, t, n = !0) {
1653
+ function kr(e, t, n = !0) {
1654
1654
  var r = e.reactions;
1655
- if (r !== null && !(J !== null && Ke.call(J, e)))
1655
+ if (r !== null && !(Q !== null && Ye.call(Q, e)))
1656
1656
  for (var i = 0; i < r.length; i++) {
1657
1657
  var s = r[i];
1658
- (s.f & L) !== 0 ? $r(
1658
+ (s.f & D) !== 0 ? kr(
1659
1659
  /** @type {Derived} */
1660
1660
  s,
1661
1661
  t,
1662
1662
  !1
1663
- ) : t === s && (n ? C(s, P) : (s.f & I) !== 0 && C(s, re), ae(
1663
+ ) : t === s && (n ? C(s, L) : (s.f & P) !== 0 && C(s, ie), ae(
1664
1664
  /** @type {Effect} */
1665
1665
  s
1666
1666
  ));
1667
1667
  }
1668
1668
  }
1669
- function Er(e) {
1670
- var t = U, n = q, r = K, i = E, s = J, o = X, l = ne, a = Ie, f = e.f;
1671
- U = /** @type {null | Value[]} */
1672
- null, q = 0, K = null, E = (f & (se | xe)) === 0 ? e : null, J = null, Je(e.ctx), ne = !1, Ie = ++Ne, e.ac !== null && (nn(() => {
1673
- e.ac.abort(Re);
1669
+ function Ar(e) {
1670
+ var t = j, n = Y, r = J, i = $, s = Q, o = ee, l = re, a = Ne, f = e.f;
1671
+ j = /** @type {null | Value[]} */
1672
+ null, Y = 0, J = null, $ = (f & (oe | Te)) === 0 ? e : null, Q = null, Ge(e.ctx), re = !1, Ne = ++ze, e.ac !== null && (sn(() => {
1673
+ e.ac.abort(Ae);
1674
1674
  }), e.ac = null);
1675
1675
  try {
1676
- e.f |= Bt;
1677
- var h = (
1676
+ e.f |= Vt;
1677
+ var d = (
1678
1678
  /** @type {Function} */
1679
1679
  e.fn
1680
- ), v = h();
1681
- e.f |= Be;
1682
- var c = e.deps, p = z?.is_fork;
1683
- if (U !== null) {
1684
- var d;
1685
- if (p || _t(e, q), c !== null && q > 0)
1686
- for (c.length = q + U.length, d = 0; d < U.length; d++)
1687
- c[q + d] = U[d];
1680
+ ), h = d();
1681
+ e.f |= De;
1682
+ var _ = e.deps, p = z?.is_fork;
1683
+ if (j !== null) {
1684
+ var u;
1685
+ if (p || _t(e, Y), _ !== null && Y > 0)
1686
+ for (_.length = Y + j.length, u = 0; u < j.length; u++)
1687
+ _[Y + u] = j[u];
1688
1688
  else
1689
- e.deps = c = U;
1690
- if (rn() && (e.f & G) !== 0)
1691
- for (d = q; d < c.length; d++)
1692
- (c[d].reactions ??= []).push(e);
1693
- } else !p && c !== null && q < c.length && (_t(e, q), c.length = q);
1694
- if (Yn() && K !== null && !ne && c !== null && (e.f & (L | re | P)) === 0)
1695
- for (d = 0; d < /** @type {Source[]} */
1696
- K.length; d++)
1697
- $r(
1698
- K[d],
1689
+ e.deps = _ = j;
1690
+ if (on() && (e.f & Z) !== 0)
1691
+ for (u = Y; u < _.length; u++)
1692
+ (_[u].reactions ??= []).push(e);
1693
+ } else !p && _ !== null && Y < _.length && (_t(e, Y), _.length = Y);
1694
+ if (Xn() && J !== null && !re && _ !== null && (e.f & (D | ie | L)) === 0)
1695
+ for (u = 0; u < /** @type {Source[]} */
1696
+ J.length; u++)
1697
+ kr(
1698
+ J[u],
1699
1699
  /** @type {Effect} */
1700
1700
  e
1701
1701
  );
1702
1702
  if (i !== null && i !== e) {
1703
- if (Ne++, i.deps !== null)
1703
+ if (ze++, i.deps !== null)
1704
1704
  for (let g = 0; g < n; g += 1)
1705
- i.deps[g].rv = Ne;
1705
+ i.deps[g].rv = ze;
1706
1706
  if (t !== null)
1707
1707
  for (const g of t)
1708
- g.rv = Ne;
1709
- K !== null && (r === null ? r = K : r.push(.../** @type {Source[]} */
1710
- K));
1708
+ g.rv = ze;
1709
+ J !== null && (r === null ? r = J : r.push(.../** @type {Source[]} */
1710
+ J));
1711
1711
  }
1712
- return (e.f & ye) !== 0 && (e.f ^= ye), v;
1712
+ return (e.f & be) !== 0 && (e.f ^= be), h;
1713
1713
  } catch (g) {
1714
- return Wn(g);
1714
+ return Qn(g);
1715
1715
  } finally {
1716
- e.f ^= Bt, U = t, q = n, K = r, E = i, J = s, Je(o), ne = l, Ie = a;
1716
+ e.f ^= Vt, j = t, Y = n, J = r, $ = i, Q = s, Ge(o), re = l, Ne = a;
1717
1717
  }
1718
1718
  }
1719
- function ss(e, t) {
1719
+ function cs(e, t) {
1720
1720
  let n = t.reactions;
1721
1721
  if (n !== null) {
1722
- var r = ai.call(n, e);
1722
+ var r = vi.call(n, e);
1723
1723
  if (r !== -1) {
1724
1724
  var i = n.length - 1;
1725
1725
  i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
1726
1726
  }
1727
1727
  }
1728
- if (n === null && (t.f & L) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1728
+ if (n === null && (t.f & D) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1729
1729
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1730
1730
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1731
- (U === null || !Ke.call(U, t))) {
1731
+ (j === null || !Ye.call(j, t))) {
1732
1732
  var s = (
1733
1733
  /** @type {Derived} */
1734
1734
  t
1735
1735
  );
1736
- (s.f & G) !== 0 && (s.f ^= G, s.f &= ~Pe), Zt(s), Wi(s), _t(s, 0);
1736
+ (s.f & Z) !== 0 && (s.f ^= Z, s.f &= ~Ie), en(s), es(s), _t(s, 0);
1737
1737
  }
1738
1738
  }
1739
1739
  function _t(e, t) {
1740
1740
  var n = e.deps;
1741
1741
  if (n !== null)
1742
1742
  for (var r = t; r < n.length; r++)
1743
- ss(e, n[r]);
1743
+ cs(e, n[r]);
1744
1744
  }
1745
- function Qe(e) {
1745
+ function Ze(e) {
1746
1746
  var t = e.f;
1747
1747
  if ((t & fe) === 0) {
1748
- C(e, I);
1749
- var n = S, r = Et;
1750
- S = e, Et = !0;
1748
+ C(e, P);
1749
+ var n = S, r = xt;
1750
+ S = e, xt = !0;
1751
1751
  try {
1752
- (t & (Se | Jt)) !== 0 ? ns(e) : ln(e), _r(e);
1753
- var i = Er(e);
1754
- e.teardown = typeof i == "function" ? i : null, e.wv = br;
1752
+ (t & (Se | Zt)) !== 0 ? as(e) : fn(e), br(e);
1753
+ var i = Ar(e);
1754
+ e.teardown = typeof i == "function" ? i : null, e.wv = Tr;
1755
1755
  var s;
1756
- Dt && Oi && (e.f & P) !== 0 && e.deps;
1756
+ Bt && Fi && (e.f & L) !== 0 && e.deps;
1757
1757
  } finally {
1758
- Et = r, S = n;
1758
+ xt = r, S = n;
1759
1759
  }
1760
1760
  }
1761
1761
  }
1762
- function u(e) {
1763
- var t = e.f, n = (t & L) !== 0;
1764
- if (E !== null && !ne) {
1762
+ function c(e) {
1763
+ var t = e.f, n = (t & D) !== 0;
1764
+ if ($ !== null && !re) {
1765
1765
  var r = S !== null && (S.f & fe) !== 0;
1766
- if (!r && (J === null || !Ke.call(J, e))) {
1767
- var i = E.deps;
1768
- if ((E.f & Bt) !== 0)
1769
- e.rv < Ne && (e.rv = Ne, U === null && i !== null && i[q] === e ? q++ : U === null ? U = [e] : U.push(e));
1766
+ if (!r && (Q === null || !Ye.call(Q, e))) {
1767
+ var i = $.deps;
1768
+ if (($.f & Vt) !== 0)
1769
+ e.rv < ze && (e.rv = ze, j === null && i !== null && i[Y] === e ? Y++ : j === null ? j = [e] : j.push(e));
1770
1770
  else {
1771
- (E.deps ??= []).push(e);
1771
+ ($.deps ??= []).push(e);
1772
1772
  var s = e.reactions;
1773
- s === null ? e.reactions = [E] : Ke.call(s, E) || s.push(E);
1773
+ s === null ? e.reactions = [$] : Ye.call(s, $) || s.push($);
1774
1774
  }
1775
1775
  }
1776
1776
  }
1777
- if (Te && Ee.has(e))
1778
- return Ee.get(e);
1777
+ if (Ee && $e.has(e))
1778
+ return $e.get(e);
1779
1779
  if (n) {
1780
1780
  var o = (
1781
1781
  /** @type {Derived} */
1782
1782
  e
1783
1783
  );
1784
- if (Te) {
1784
+ if (Ee) {
1785
1785
  var l = o.v;
1786
- return ((o.f & I) === 0 && o.reactions !== null || Sr(o)) && (l = Qt(o)), Ee.set(o, l), l;
1786
+ return ((o.f & P) === 0 && o.reactions !== null || zr(o)) && (l = tn(o)), $e.set(o, l), l;
1787
1787
  }
1788
- var a = (o.f & G) === 0 && !ne && E !== null && (Et || (E.f & G) !== 0), f = (o.f & Be) === 0;
1789
- gt(o) && (a && (o.f |= G), nr(o)), a && !f && (rr(o), Tr(o));
1788
+ var a = (o.f & Z) === 0 && !re && $ !== null && (xt || ($.f & Z) !== 0), f = (o.f & De) === 0;
1789
+ gt(o) && (a && (o.f |= Z), lr(o)), a && !f && (ar(o), Rr(o));
1790
1790
  }
1791
- if (te?.has(e))
1792
- return te.get(e);
1793
- if ((e.f & ye) !== 0)
1791
+ if (ne?.has(e))
1792
+ return ne.get(e);
1793
+ if ((e.f & be) !== 0)
1794
1794
  throw e.v;
1795
1795
  return e.v;
1796
1796
  }
1797
- function Tr(e) {
1798
- if (e.f |= G, e.deps !== null)
1797
+ function Rr(e) {
1798
+ if (e.f |= Z, e.deps !== null)
1799
1799
  for (const t of e.deps)
1800
- (t.reactions ??= []).push(e), (t.f & L) !== 0 && (t.f & G) === 0 && (rr(
1800
+ (t.reactions ??= []).push(e), (t.f & D) !== 0 && (t.f & Z) === 0 && (ar(
1801
1801
  /** @type {Derived} */
1802
1802
  t
1803
- ), Tr(
1803
+ ), Rr(
1804
1804
  /** @type {Derived} */
1805
1805
  t
1806
1806
  ));
1807
1807
  }
1808
- function Sr(e) {
1808
+ function zr(e) {
1809
1809
  if (e.v === M) return !0;
1810
1810
  if (e.deps === null) return !1;
1811
1811
  for (const t of e.deps)
1812
- if (Ee.has(t) || (t.f & L) !== 0 && Sr(
1812
+ if ($e.has(t) || (t.f & D) !== 0 && zr(
1813
1813
  /** @type {Derived} */
1814
1814
  t
1815
1815
  ))
1816
1816
  return !0;
1817
1817
  return !1;
1818
1818
  }
1819
- function un(e) {
1820
- var t = ne;
1819
+ function dn(e) {
1820
+ var t = re;
1821
1821
  try {
1822
- return ne = !0, e();
1822
+ return re = !0, e();
1823
1823
  } finally {
1824
- ne = t;
1824
+ re = t;
1825
1825
  }
1826
1826
  }
1827
- const ut = /* @__PURE__ */ Symbol("events"), xr = /* @__PURE__ */ new Set(), Vt = /* @__PURE__ */ new Set();
1828
- function os(e, t, n, r = {}) {
1827
+ const ut = /* @__PURE__ */ Symbol("events"), Cr = /* @__PURE__ */ new Set(), Yt = /* @__PURE__ */ new Set();
1828
+ function ds(e, t, n, r = {}) {
1829
1829
  function i(s) {
1830
- if (r.capture || qt.call(t, s), !s.cancelBubble)
1831
- return nn(() => n?.call(this, s));
1830
+ if (r.capture || Wt.call(t, s), !s.cancelBubble)
1831
+ return sn(() => n?.call(this, s));
1832
1832
  }
1833
- return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? $e(() => {
1833
+ return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? ye(() => {
1834
1834
  t.addEventListener(e, i, r);
1835
1835
  }) : t.addEventListener(e, i, r), i;
1836
1836
  }
1837
- function lt(e, t, n, r, i) {
1838
- var s = { capture: r, passive: i }, o = os(e, t, n, s);
1837
+ function $t(e, t, n, r, i) {
1838
+ var s = { capture: r, passive: i }, o = ds(e, t, n, s);
1839
1839
  (t === document.body || // @ts-ignore
1840
1840
  t === window || // @ts-ignore
1841
1841
  t === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
1842
- t instanceof HTMLMediaElement) && dr(() => {
1842
+ t instanceof HTMLMediaElement) && gr(() => {
1843
1843
  t.removeEventListener(e, o, s);
1844
1844
  });
1845
1845
  }
1846
- function ze(e, t, n) {
1846
+ function je(e, t, n) {
1847
1847
  (t[ut] ??= {})[e] = n;
1848
1848
  }
1849
- function ls(e) {
1849
+ function hs(e) {
1850
1850
  for (var t = 0; t < e.length; t++)
1851
- xr.add(e[t]);
1852
- for (var n of Vt)
1851
+ Cr.add(e[t]);
1852
+ for (var n of Yt)
1853
1853
  n(e);
1854
1854
  }
1855
- let kn = null;
1856
- function qt(e) {
1855
+ let On = null;
1856
+ function Wt(e) {
1857
1857
  var t = this, n = (
1858
1858
  /** @type {Node} */
1859
1859
  t.ownerDocument
@@ -1861,8 +1861,8 @@ function qt(e) {
1861
1861
  /** @type {null | Element} */
1862
1862
  i[0] || e.target
1863
1863
  );
1864
- kn = e;
1865
- var o = 0, l = kn === e && e[ut];
1864
+ On = e;
1865
+ var o = 0, l = On === e && e[ut];
1866
1866
  if (l) {
1867
1867
  var a = i.indexOf(l);
1868
1868
  if (a !== -1 && (t === document || t === /** @type {any} */
@@ -1877,17 +1877,17 @@ function qt(e) {
1877
1877
  }
1878
1878
  if (s = /** @type {Element} */
1879
1879
  i[o] || e.target, s !== t) {
1880
- xt(e, "currentTarget", {
1880
+ Rt(e, "currentTarget", {
1881
1881
  configurable: !0,
1882
1882
  get() {
1883
1883
  return s || n;
1884
1884
  }
1885
1885
  });
1886
- var h = E, v = S;
1887
- Z(null), ue(null);
1886
+ var d = $, h = S;
1887
+ te(null), ue(null);
1888
1888
  try {
1889
- for (var c, p = []; s !== null; ) {
1890
- var d = s.assignedSlot || s.parentNode || /** @type {any} */
1889
+ for (var _, p = []; s !== null; ) {
1890
+ var u = s.assignedSlot || s.parentNode || /** @type {any} */
1891
1891
  s.host || null;
1892
1892
  try {
1893
1893
  var g = s[ut]?.[r];
@@ -1895,43 +1895,43 @@ function qt(e) {
1895
1895
  s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1896
1896
  // -> the target could not have been disabled because it emits the event in the first place
1897
1897
  e.target === s) && g.call(s, e);
1898
- } catch (b) {
1899
- c ? p.push(b) : c = b;
1898
+ } catch (T) {
1899
+ _ ? p.push(T) : _ = T;
1900
1900
  }
1901
- if (e.cancelBubble || d === t || d === null)
1901
+ if (e.cancelBubble || u === t || u === null)
1902
1902
  break;
1903
- s = d;
1903
+ s = u;
1904
1904
  }
1905
- if (c) {
1906
- for (let b of p)
1905
+ if (_) {
1906
+ for (let T of p)
1907
1907
  queueMicrotask(() => {
1908
- throw b;
1908
+ throw T;
1909
1909
  });
1910
- throw c;
1910
+ throw _;
1911
1911
  }
1912
1912
  } finally {
1913
- e[ut] = t, delete e.currentTarget, Z(h), ue(v);
1913
+ e[ut] = t, delete e.currentTarget, te(d), ue(h);
1914
1914
  }
1915
1915
  }
1916
1916
  }
1917
- const as = (
1917
+ const vs = (
1918
1918
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
1919
1919
  globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
1920
1920
  /** @param {string} html */
1921
1921
  createHTML: (e) => e
1922
1922
  })
1923
1923
  );
1924
- function fs(e) {
1924
+ function _s(e) {
1925
1925
  return (
1926
1926
  /** @type {string} */
1927
- as?.createHTML(e) ?? e
1927
+ vs?.createHTML(e) ?? e
1928
1928
  );
1929
1929
  }
1930
- function kr(e) {
1931
- var t = en("template");
1932
- return t.innerHTML = fs(e.replaceAll("<!>", "<!---->")), t.content;
1930
+ function Or(e) {
1931
+ var t = nn("template");
1932
+ return t.innerHTML = _s(e.replaceAll("<!>", "<!---->")), t.content;
1933
1933
  }
1934
- function Fe(e, t) {
1934
+ function Le(e, t) {
1935
1935
  var n = (
1936
1936
  /** @type {Effect} */
1937
1937
  S
@@ -1939,61 +1939,61 @@ function Fe(e, t) {
1939
1939
  n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
1940
1940
  }
1941
1941
  // @__NO_SIDE_EFFECTS__
1942
- function cn(e, t) {
1943
- var n = (t & li) !== 0, r, i = !e.startsWith("<!>");
1942
+ function hn(e, t) {
1943
+ var n = (t & hi) !== 0, r, i = !e.startsWith("<!>");
1944
1944
  return () => {
1945
- if (x)
1946
- return Fe(T, null), T;
1947
- r === void 0 && (r = kr(i ? e : "<!>" + e), r = /** @type {TemplateNode} */
1948
- /* @__PURE__ */ De(r));
1945
+ if (k)
1946
+ return Le(E, null), E;
1947
+ r === void 0 && (r = Or(i ? e : "<!>" + e), r = /** @type {TemplateNode} */
1948
+ /* @__PURE__ */ Pe(r));
1949
1949
  var s = (
1950
1950
  /** @type {TemplateNode} */
1951
- n || lr ? document.importNode(r, !0) : r.cloneNode(!0)
1951
+ n || dr ? document.importNode(r, !0) : r.cloneNode(!0)
1952
1952
  );
1953
- return Fe(s, s), s;
1953
+ return Le(s, s), s;
1954
1954
  };
1955
1955
  }
1956
1956
  // @__NO_SIDE_EFFECTS__
1957
- function us(e, t, n = "svg") {
1957
+ function ps(e, t, n = "svg") {
1958
1958
  var r = !e.startsWith("<!>"), i = `<${n}>${r ? e : "<!>" + e}</${n}>`, s;
1959
1959
  return () => {
1960
- if (x)
1961
- return Fe(T, null), T;
1960
+ if (k)
1961
+ return Le(E, null), E;
1962
1962
  if (!s) {
1963
1963
  var o = (
1964
1964
  /** @type {DocumentFragment} */
1965
- kr(i)
1965
+ Or(i)
1966
1966
  ), l = (
1967
1967
  /** @type {Element} */
1968
- /* @__PURE__ */ De(o)
1968
+ /* @__PURE__ */ Pe(o)
1969
1969
  );
1970
1970
  s = /** @type {Element} */
1971
- /* @__PURE__ */ De(l);
1971
+ /* @__PURE__ */ Pe(l);
1972
1972
  }
1973
1973
  var a = (
1974
1974
  /** @type {TemplateNode} */
1975
1975
  s.cloneNode(!0)
1976
1976
  );
1977
- return Fe(a, a), a;
1977
+ return Le(a, a), a;
1978
1978
  };
1979
1979
  }
1980
1980
  // @__NO_SIDE_EFFECTS__
1981
- function dn(e, t) {
1982
- return /* @__PURE__ */ us(e, t, "svg");
1981
+ function Nr(e, t) {
1982
+ return /* @__PURE__ */ ps(e, t, "svg");
1983
1983
  }
1984
- function cs() {
1985
- if (x)
1986
- return Fe(T, null), T;
1987
- var e = document.createDocumentFragment(), t = document.createComment(""), n = ie();
1988
- return e.append(t, n), Fe(t, n), e;
1984
+ function gs() {
1985
+ if (k)
1986
+ return Le(E, null), E;
1987
+ var e = document.createDocumentFragment(), t = document.createComment(""), n = se();
1988
+ return e.append(t, n), Le(t, n), e;
1989
1989
  }
1990
- function we(e, t) {
1991
- if (x) {
1990
+ function ke(e, t) {
1991
+ if (k) {
1992
1992
  var n = (
1993
1993
  /** @type {Effect & { nodes: EffectNodes }} */
1994
1994
  S
1995
1995
  );
1996
- ((n.f & Be) === 0 || n.nodes.end === null) && (n.nodes.end = T), Ct();
1996
+ ((n.f & De) === 0 || n.nodes.end === null) && (n.nodes.end = E), It();
1997
1997
  return;
1998
1998
  }
1999
1999
  e !== null && e.before(
@@ -2001,109 +2001,109 @@ function we(e, t) {
2001
2001
  t
2002
2002
  );
2003
2003
  }
2004
- const ds = ["touchstart", "touchmove"];
2005
- function hs(e) {
2006
- return ds.includes(e);
2004
+ const ws = ["touchstart", "touchmove"];
2005
+ function ms(e) {
2006
+ return ws.includes(e);
2007
2007
  }
2008
- function An(e, t) {
2008
+ function Nn(e, t) {
2009
2009
  var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
2010
2010
  n !== (e.__t ??= e.nodeValue) && (e.__t = n, e.nodeValue = `${n}`);
2011
2011
  }
2012
- function Ar(e, t) {
2013
- return zr(e, t);
2012
+ function Ir(e, t) {
2013
+ return Mr(e, t);
2014
2014
  }
2015
- function vs(e, t) {
2016
- Ut(), t.intro = t.intro ?? !1;
2017
- const n = t.target, r = x, i = T;
2015
+ function bs(e, t) {
2016
+ qt(), t.intro = t.intro ?? !1;
2017
+ const n = t.target, r = k, i = E;
2018
2018
  try {
2019
- for (var s = /* @__PURE__ */ De(n); s && (s.nodeType !== pt || /** @type {Comment} */
2020
- s.data !== In); )
2019
+ for (var s = /* @__PURE__ */ Pe(n); s && (s.nodeType !== pt || /** @type {Comment} */
2020
+ s.data !== Bn); )
2021
2021
  s = /* @__PURE__ */ ce(s);
2022
2022
  if (!s)
2023
- throw Ye;
2024
- pe(!0), Y(
2023
+ throw qe;
2024
+ pe(!0), W(
2025
2025
  /** @type {Comment} */
2026
2026
  s
2027
2027
  );
2028
- const o = zr(e, { ...t, anchor: s });
2028
+ const o = Mr(e, { ...t, anchor: s });
2029
2029
  return pe(!1), /** @type {Exports} */
2030
2030
  o;
2031
2031
  } catch (o) {
2032
2032
  if (o instanceof Error && o.message.split(`
2033
2033
  `).some((l) => l.startsWith("https://svelte.dev/e/")))
2034
2034
  throw o;
2035
- return o !== Ye && console.warn("Failed to hydrate: ", o), t.recover === !1 && Ti(), Ut(), ur(n), pe(!1), Ar(e, t);
2035
+ return o !== qe && console.warn("Failed to hydrate: ", o), t.recover === !1 && zi(), qt(), _r(n), pe(!1), Ir(e, t);
2036
2036
  } finally {
2037
- pe(r), Y(i);
2037
+ pe(r), W(i);
2038
2038
  }
2039
2039
  }
2040
- const bt = /* @__PURE__ */ new Map();
2041
- function zr(e, { target: t, anchor: n, props: r = {}, events: i, context: s, intro: o = !0, transformError: l }) {
2042
- Ut();
2043
- var a = void 0, f = es(() => {
2044
- var h = n ?? t.appendChild(ie());
2045
- Bi(
2040
+ const Et = /* @__PURE__ */ new Map();
2041
+ function Mr(e, { target: t, anchor: n, props: r = {}, events: i, context: s, intro: o = !0, transformError: l }) {
2042
+ qt();
2043
+ var a = void 0, f = os(() => {
2044
+ var d = n ?? t.appendChild(se());
2045
+ Yi(
2046
2046
  /** @type {TemplateNode} */
2047
- h,
2047
+ d,
2048
2048
  {
2049
2049
  pending: () => {
2050
2050
  }
2051
2051
  },
2052
2052
  (p) => {
2053
- Vn({});
2054
- var d = (
2053
+ Gn({});
2054
+ var u = (
2055
2055
  /** @type {ComponentContext} */
2056
- X
2056
+ ee
2057
2057
  );
2058
- if (s && (d.c = s), i && (r.$$events = i), x && Fe(
2058
+ if (s && (u.c = s), i && (r.$$events = i), k && Le(
2059
2059
  /** @type {TemplateNode} */
2060
2060
  p,
2061
2061
  null
2062
- ), a = e(p, r) || {}, x && (S.nodes.end = T, T === null || T.nodeType !== pt || /** @type {Comment} */
2063
- T.data !== Gt))
2064
- throw Rt(), Ye;
2065
- qn();
2062
+ ), a = e(p, r) || {}, k && (S.nodes.end = E, E === null || E.nodeType !== pt || /** @type {Comment} */
2063
+ E.data !== Xt))
2064
+ throw Nt(), qe;
2065
+ Jn();
2066
2066
  },
2067
2067
  l
2068
2068
  );
2069
- var v = /* @__PURE__ */ new Set(), c = (p) => {
2070
- for (var d = 0; d < p.length; d++) {
2071
- var g = p[d];
2072
- if (!v.has(g)) {
2073
- v.add(g);
2074
- var b = hs(g);
2075
- for (const O of [t, document]) {
2076
- var y = bt.get(O);
2077
- y === void 0 && (y = /* @__PURE__ */ new Map(), bt.set(O, y));
2069
+ var h = /* @__PURE__ */ new Set(), _ = (p) => {
2070
+ for (var u = 0; u < p.length; u++) {
2071
+ var g = p[u];
2072
+ if (!h.has(g)) {
2073
+ h.add(g);
2074
+ var T = ms(g);
2075
+ for (const R of [t, document]) {
2076
+ var y = Et.get(R);
2077
+ y === void 0 && (y = /* @__PURE__ */ new Map(), Et.set(R, y));
2078
2078
  var m = y.get(g);
2079
- m === void 0 ? (O.addEventListener(g, qt, { passive: b }), y.set(g, 1)) : y.set(g, m + 1);
2079
+ m === void 0 ? (R.addEventListener(g, Wt, { passive: T }), y.set(g, 1)) : y.set(g, m + 1);
2080
2080
  }
2081
2081
  }
2082
2082
  }
2083
2083
  };
2084
- return c(At(xr)), Vt.add(c), () => {
2085
- for (var p of v)
2086
- for (const b of [t, document]) {
2087
- var d = (
2084
+ return _(Ct(Cr)), Yt.add(_), () => {
2085
+ for (var p of h)
2086
+ for (const T of [t, document]) {
2087
+ var u = (
2088
2088
  /** @type {Map<string, number>} */
2089
- bt.get(b)
2089
+ Et.get(T)
2090
2090
  ), g = (
2091
2091
  /** @type {number} */
2092
- d.get(p)
2092
+ u.get(p)
2093
2093
  );
2094
- --g == 0 ? (b.removeEventListener(p, qt), d.delete(p), d.size === 0 && bt.delete(b)) : d.set(p, g);
2094
+ --g == 0 ? (T.removeEventListener(p, Wt), u.delete(p), u.size === 0 && Et.delete(T)) : u.set(p, g);
2095
2095
  }
2096
- Vt.delete(c), h !== n && h.parentNode?.removeChild(h);
2096
+ Yt.delete(_), d !== n && d.parentNode?.removeChild(d);
2097
2097
  };
2098
2098
  });
2099
- return Yt.set(a, f), a;
2099
+ return Kt.set(a, f), a;
2100
2100
  }
2101
- let Yt = /* @__PURE__ */ new WeakMap();
2102
- function _s(e, t) {
2103
- const n = Yt.get(e);
2104
- return n ? (Yt.delete(e), n(t)) : Promise.resolve();
2101
+ let Kt = /* @__PURE__ */ new WeakMap();
2102
+ function ys(e, t) {
2103
+ const n = Kt.get(e);
2104
+ return n ? (Kt.delete(e), n(t)) : Promise.resolve();
2105
2105
  }
2106
- class ps {
2106
+ class $s {
2107
2107
  /** @type {TemplateNode} */
2108
2108
  anchor;
2109
2109
  /** @type {Map<Batch, Key>} */
@@ -2156,7 +2156,7 @@ class ps {
2156
2156
  this.#e.get(t)
2157
2157
  ), r = this.#t.get(n);
2158
2158
  if (r)
2159
- an(r), this.#l.delete(n);
2159
+ un(r), this.#l.delete(n);
2160
2160
  else {
2161
2161
  var i = this.#n.get(n);
2162
2162
  i && (i.effect.f & B) === 0 && (this.#t.set(n, i.effect), this.#n.delete(n), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
@@ -2172,12 +2172,12 @@ class ps {
2172
2172
  const l = () => {
2173
2173
  if (Array.from(this.#e.values()).includes(s)) {
2174
2174
  var f = document.createDocumentFragment();
2175
- fn(o, f), f.append(ie()), this.#n.set(s, { effect: o, fragment: f });
2175
+ cn(o, f), f.append(se()), this.#n.set(s, { effect: o, fragment: f });
2176
2176
  } else
2177
2177
  H(o);
2178
2178
  this.#l.delete(s), this.#t.delete(s);
2179
2179
  };
2180
- this.#r || !r ? (this.#l.add(s), Me(o, l, !1)) : l();
2180
+ this.#r || !r ? (this.#l.add(s), Oe(o, l, !1)) : l();
2181
2181
  }
2182
2182
  }
2183
2183
  };
@@ -2199,18 +2199,18 @@ class ps {
2199
2199
  var r = (
2200
2200
  /** @type {Batch} */
2201
2201
  z
2202
- ), i = cr();
2202
+ ), i = pr();
2203
2203
  if (n && !this.#t.has(t) && !this.#n.has(t))
2204
2204
  if (i) {
2205
- var s = document.createDocumentFragment(), o = ie();
2205
+ var s = document.createDocumentFragment(), o = se();
2206
2206
  s.append(o), this.#n.set(t, {
2207
- effect: W(() => n(o)),
2207
+ effect: X(() => n(o)),
2208
2208
  fragment: s
2209
2209
  });
2210
2210
  } else
2211
2211
  this.#t.set(
2212
2212
  t,
2213
- W(() => n(this.anchor))
2213
+ X(() => n(this.anchor))
2214
2214
  );
2215
2215
  if (this.#e.set(r, t), i) {
2216
2216
  for (const [l, a] of this.#t)
@@ -2219,47 +2219,47 @@ class ps {
2219
2219
  l === t ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
2220
2220
  r.oncommit(this.#o), r.ondiscard(this.#i);
2221
2221
  } else
2222
- x && (this.anchor = T), this.#o(r);
2222
+ k && (this.anchor = E), this.#o(r);
2223
2223
  }
2224
2224
  }
2225
- function Lt(e, t, n = !1) {
2225
+ function Ft(e, t, n = !1) {
2226
2226
  var r;
2227
- x && (r = T, Ct());
2228
- var i = new ps(e), s = n ? Ge : 0;
2227
+ k && (r = E, It());
2228
+ var i = new $s(e), s = n ? Ke : 0;
2229
2229
  function o(l, a) {
2230
- if (x) {
2231
- var f = Hn(
2230
+ if (k) {
2231
+ var f = Yn(
2232
2232
  /** @type {TemplateNode} */
2233
2233
  r
2234
2234
  );
2235
2235
  if (l !== parseInt(f.substring(1))) {
2236
- var h = kt();
2237
- Y(h), i.anchor = h, pe(!1), i.ensure(l, a), pe(!0);
2236
+ var d = zt();
2237
+ W(d), i.anchor = d, pe(!1), i.ensure(l, a), pe(!0);
2238
2238
  return;
2239
2239
  }
2240
2240
  }
2241
2241
  i.ensure(l, a);
2242
2242
  }
2243
- on(() => {
2243
+ an(() => {
2244
2244
  var l = !1;
2245
2245
  t((a, f = 0) => {
2246
2246
  l = !0, o(f, a);
2247
2247
  }), l || o(-1, null);
2248
2248
  }, s);
2249
2249
  }
2250
- function gs(e, t, n) {
2250
+ function Es(e, t, n) {
2251
2251
  for (var r = [], i = t.length, s, o = t.length, l = 0; l < i; l++) {
2252
- let v = t[l];
2253
- Me(
2254
- v,
2252
+ let h = t[l];
2253
+ Oe(
2254
+ h,
2255
2255
  () => {
2256
2256
  if (s) {
2257
- if (s.pending.delete(v), s.done.add(v), s.pending.size === 0) {
2258
- var c = (
2257
+ if (s.pending.delete(h), s.done.add(h), s.pending.size === 0) {
2258
+ var _ = (
2259
2259
  /** @type {Set<EachOutroGroup>} */
2260
2260
  e.outrogroups
2261
2261
  );
2262
- Kt(e, At(s.done)), c.delete(s), c.size === 0 && (e.outrogroups = null);
2262
+ Gt(e, Ct(s.done)), _.delete(s), _.size === 0 && (e.outrogroups = null);
2263
2263
  }
2264
2264
  } else
2265
2265
  o -= 1;
@@ -2273,20 +2273,20 @@ function gs(e, t, n) {
2273
2273
  var f = (
2274
2274
  /** @type {Element} */
2275
2275
  n
2276
- ), h = (
2276
+ ), d = (
2277
2277
  /** @type {Element} */
2278
2278
  f.parentNode
2279
2279
  );
2280
- ur(h), h.append(f), e.items.clear();
2280
+ _r(d), d.append(f), e.items.clear();
2281
2281
  }
2282
- Kt(e, t, !a);
2282
+ Gt(e, t, !a);
2283
2283
  } else
2284
2284
  s = {
2285
2285
  pending: new Set(t),
2286
2286
  done: /* @__PURE__ */ new Set()
2287
2287
  }, (e.outrogroups ??= /* @__PURE__ */ new Set()).add(s);
2288
2288
  }
2289
- function Kt(e, t, n = !0) {
2289
+ function Gt(e, t, n = !0) {
2290
2290
  var r;
2291
2291
  if (e.pending.size > 0) {
2292
2292
  r = /* @__PURE__ */ new Set();
@@ -2302,133 +2302,133 @@ function Kt(e, t, n = !0) {
2302
2302
  if (r?.has(s)) {
2303
2303
  s.f |= _e;
2304
2304
  const o = document.createDocumentFragment();
2305
- fn(s, o);
2305
+ cn(s, o);
2306
2306
  } else
2307
2307
  H(t[i], n);
2308
2308
  }
2309
2309
  }
2310
- var zn;
2311
- function ms(e, t, n, r, i, s = null) {
2310
+ var In;
2311
+ function Ss(e, t, n, r, i, s = null) {
2312
2312
  var o = e, l = /* @__PURE__ */ new Map();
2313
- x && Ct();
2314
- var a = null, f = /* @__PURE__ */ tr(() => {
2313
+ k && It();
2314
+ var a = null, f = /* @__PURE__ */ or(() => {
2315
2315
  var y = n();
2316
- return Ln(y) ? y : y == null ? [] : At(y);
2317
- }), h, v = /* @__PURE__ */ new Map(), c = !0;
2316
+ return Vn(y) ? y : y == null ? [] : Ct(y);
2317
+ }), d, h = /* @__PURE__ */ new Map(), _ = !0;
2318
2318
  function p(y) {
2319
- (b.effect.f & fe) === 0 && (b.pending.delete(y), b.fallback = a, ws(b, h, o, t, r), a !== null && (h.length === 0 ? (a.f & _e) === 0 ? an(a) : (a.f ^= _e, ct(a, null, o)) : Me(a, () => {
2319
+ (T.effect.f & fe) === 0 && (T.pending.delete(y), T.fallback = a, Ts(T, d, o, t, r), a !== null && (d.length === 0 ? (a.f & _e) === 0 ? un(a) : (a.f ^= _e, ct(a, null, o)) : Oe(a, () => {
2320
2320
  a = null;
2321
2321
  })));
2322
2322
  }
2323
- function d(y) {
2324
- b.pending.delete(y);
2323
+ function u(y) {
2324
+ T.pending.delete(y);
2325
2325
  }
2326
- var g = on(() => {
2327
- h = /** @type {V[]} */
2328
- u(f);
2329
- var y = h.length;
2326
+ var g = an(() => {
2327
+ d = /** @type {V[]} */
2328
+ c(f);
2329
+ var y = d.length;
2330
2330
  let m = !1;
2331
- if (x) {
2332
- var O = Hn(o) === Wt;
2333
- O !== (y === 0) && (o = kt(), Y(o), pe(!1), m = !0);
2331
+ if (k) {
2332
+ var R = Yn(o) === Jt;
2333
+ R !== (y === 0) && (o = zt(), W(o), pe(!1), m = !0);
2334
2334
  }
2335
- for (var k = /* @__PURE__ */ new Set(), R = (
2335
+ for (var A = /* @__PURE__ */ new Set(), F = (
2336
2336
  /** @type {Batch} */
2337
2337
  z
2338
- ), ke = cr(), oe = 0; oe < y; oe += 1) {
2339
- x && T.nodeType === pt && /** @type {Comment} */
2340
- T.data === Gt && (o = /** @type {Comment} */
2341
- T, m = !0, pe(!1));
2342
- var V = h[oe], Ae = r(V, oe), D = c ? null : l.get(Ae);
2343
- D ? (D.v && Ze(D.v, V), D.i && Ze(D.i, oe), ke && R.unskip_effect(D.e)) : (D = bs(
2338
+ ), I = pr(), U = 0; U < y; U += 1) {
2339
+ k && E.nodeType === pt && /** @type {Comment} */
2340
+ E.data === Xt && (o = /** @type {Comment} */
2341
+ E, m = !0, pe(!1));
2342
+ var N = d[U], q = r(N, U), K = _ ? null : l.get(q);
2343
+ K ? (K.v && Xe(K.v, N), K.i && Xe(K.i, U), I && F.unskip_effect(K.e)) : (K = xs(
2344
2344
  l,
2345
- c ? o : zn ??= ie(),
2346
- V,
2347
- Ae,
2348
- oe,
2345
+ _ ? o : In ??= se(),
2346
+ N,
2347
+ q,
2348
+ U,
2349
2349
  i,
2350
2350
  t,
2351
2351
  n
2352
- ), c || (D.e.f |= _e), l.set(Ae, D)), k.add(Ae);
2352
+ ), _ || (K.e.f |= _e), l.set(q, K)), A.add(q);
2353
2353
  }
2354
- if (y === 0 && s && !a && (c ? a = W(() => s(o)) : (a = W(() => s(zn ??= ie())), a.f |= _e)), y > k.size && wi(), x && y > 0 && Y(kt()), !c)
2355
- if (v.set(R, k), ke) {
2356
- for (const [Mt, It] of l)
2357
- k.has(Mt) || R.skip_effect(It.e);
2358
- R.oncommit(p), R.ondiscard(d);
2354
+ if (y === 0 && s && !a && (_ ? a = X(() => s(o)) : (a = X(() => s(In ??= se())), a.f |= _e)), y > A.size && Ti(), k && y > 0 && W(zt()), !_)
2355
+ if (h.set(F, A), I) {
2356
+ for (const [et, Be] of l)
2357
+ A.has(et) || F.skip_effect(Be.e);
2358
+ F.oncommit(p), F.ondiscard(u);
2359
2359
  } else
2360
- p(R);
2361
- m && pe(!0), u(f);
2362
- }), b = { effect: g, items: l, pending: v, outrogroups: null, fallback: a };
2363
- c = !1, x && (o = T);
2360
+ p(F);
2361
+ m && pe(!0), c(f);
2362
+ }), T = { effect: g, items: l, pending: h, outrogroups: null, fallback: a };
2363
+ _ = !1, k && (o = E);
2364
2364
  }
2365
2365
  function at(e) {
2366
- for (; e !== null && (e.f & se) === 0; )
2366
+ for (; e !== null && (e.f & oe) === 0; )
2367
2367
  e = e.next;
2368
2368
  return e;
2369
2369
  }
2370
- function ws(e, t, n, r, i) {
2371
- var s = t.length, o = e.items, l = at(e.effect.first), a, f = null, h = [], v = [], c, p, d, g;
2370
+ function Ts(e, t, n, r, i) {
2371
+ var s = t.length, o = e.items, l = at(e.effect.first), a, f = null, d = [], h = [], _, p, u, g;
2372
2372
  for (g = 0; g < s; g += 1) {
2373
- if (c = t[g], p = i(c, g), d = /** @type {EachItem} */
2373
+ if (_ = t[g], p = i(_, g), u = /** @type {EachItem} */
2374
2374
  o.get(p).e, e.outrogroups !== null)
2375
- for (const V of e.outrogroups)
2376
- V.pending.delete(d), V.done.delete(d);
2377
- if ((d.f & _e) !== 0)
2378
- if (d.f ^= _e, d === l)
2379
- ct(d, null, n);
2375
+ for (const N of e.outrogroups)
2376
+ N.pending.delete(u), N.done.delete(u);
2377
+ if ((u.f & _e) !== 0)
2378
+ if (u.f ^= _e, u === l)
2379
+ ct(u, null, n);
2380
2380
  else {
2381
- var b = f ? f.next : l;
2382
- d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), me(e, f, d), me(e, d, b), ct(d, b, n), f = d, h = [], v = [], l = at(f.next);
2381
+ var T = f ? f.next : l;
2382
+ u === e.effect.last && (e.effect.last = u.prev), u.prev && (u.prev.next = u.next), u.next && (u.next.prev = u.prev), we(e, f, u), we(e, u, T), ct(u, T, n), f = u, d = [], h = [], l = at(f.next);
2383
2383
  continue;
2384
2384
  }
2385
- if ((d.f & B) !== 0 && an(d), d !== l) {
2386
- if (a !== void 0 && a.has(d)) {
2387
- if (h.length < v.length) {
2388
- var y = v[0], m;
2385
+ if ((u.f & B) !== 0 && un(u), u !== l) {
2386
+ if (a !== void 0 && a.has(u)) {
2387
+ if (d.length < h.length) {
2388
+ var y = h[0], m;
2389
2389
  f = y.prev;
2390
- var O = h[0], k = h[h.length - 1];
2390
+ var R = d[0], A = d[d.length - 1];
2391
+ for (m = 0; m < d.length; m += 1)
2392
+ ct(d[m], y, n);
2391
2393
  for (m = 0; m < h.length; m += 1)
2392
- ct(h[m], y, n);
2393
- for (m = 0; m < v.length; m += 1)
2394
- a.delete(v[m]);
2395
- me(e, O.prev, k.next), me(e, f, O), me(e, k, y), l = y, f = k, g -= 1, h = [], v = [];
2394
+ a.delete(h[m]);
2395
+ we(e, R.prev, A.next), we(e, f, R), we(e, A, y), l = y, f = A, g -= 1, d = [], h = [];
2396
2396
  } else
2397
- a.delete(d), ct(d, l, n), me(e, d.prev, d.next), me(e, d, f === null ? e.effect.first : f.next), me(e, f, d), f = d;
2397
+ a.delete(u), ct(u, l, n), we(e, u.prev, u.next), we(e, u, f === null ? e.effect.first : f.next), we(e, f, u), f = u;
2398
2398
  continue;
2399
2399
  }
2400
- for (h = [], v = []; l !== null && l !== d; )
2401
- (a ??= /* @__PURE__ */ new Set()).add(l), v.push(l), l = at(l.next);
2400
+ for (d = [], h = []; l !== null && l !== u; )
2401
+ (a ??= /* @__PURE__ */ new Set()).add(l), h.push(l), l = at(l.next);
2402
2402
  if (l === null)
2403
2403
  continue;
2404
2404
  }
2405
- (d.f & _e) === 0 && h.push(d), f = d, l = at(d.next);
2405
+ (u.f & _e) === 0 && d.push(u), f = u, l = at(u.next);
2406
2406
  }
2407
2407
  if (e.outrogroups !== null) {
2408
- for (const V of e.outrogroups)
2409
- V.pending.size === 0 && (Kt(e, At(V.done)), e.outrogroups?.delete(V));
2408
+ for (const N of e.outrogroups)
2409
+ N.pending.size === 0 && (Gt(e, Ct(N.done)), e.outrogroups?.delete(N));
2410
2410
  e.outrogroups.size === 0 && (e.outrogroups = null);
2411
2411
  }
2412
2412
  if (l !== null || a !== void 0) {
2413
- var R = [];
2413
+ var F = [];
2414
2414
  if (a !== void 0)
2415
- for (d of a)
2416
- (d.f & B) === 0 && R.push(d);
2415
+ for (u of a)
2416
+ (u.f & B) === 0 && F.push(u);
2417
2417
  for (; l !== null; )
2418
- (l.f & B) === 0 && l !== e.fallback && R.push(l), l = at(l.next);
2419
- var ke = R.length;
2420
- if (ke > 0) {
2421
- var oe = null;
2422
- gs(e, R, oe);
2418
+ (l.f & B) === 0 && l !== e.fallback && F.push(l), l = at(l.next);
2419
+ var I = F.length;
2420
+ if (I > 0) {
2421
+ var U = null;
2422
+ Es(e, F, U);
2423
2423
  }
2424
2424
  }
2425
2425
  }
2426
- function bs(e, t, n, r, i, s, o, l) {
2427
- var a = (o & ei) !== 0 ? (o & ni) === 0 ? /* @__PURE__ */ sr(n, !1, !1) : Le(n) : null, f = (o & ti) !== 0 ? Le(i) : null;
2426
+ function xs(e, t, n, r, i, s, o, l) {
2427
+ var a = (o & oi) !== 0 ? (o & ai) === 0 ? /* @__PURE__ */ ur(n, !1, !1) : Me(n) : null, f = (o & li) !== 0 ? Me(i) : null;
2428
2428
  return {
2429
2429
  v: a,
2430
2430
  i: f,
2431
- e: W(() => (s(t, a ?? n, f ?? i, l), () => {
2431
+ e: X(() => (s(t, a ?? n, f ?? i, l), () => {
2432
2432
  e.delete(r);
2433
2433
  }))
2434
2434
  };
@@ -2448,11 +2448,11 @@ function ct(e, t, n) {
2448
2448
  r = o;
2449
2449
  }
2450
2450
  }
2451
- function me(e, t, n) {
2451
+ function we(e, t, n) {
2452
2452
  t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
2453
2453
  }
2454
- function ys(e, t) {
2455
- vr(() => {
2454
+ function ks(e, t) {
2455
+ mr(() => {
2456
2456
  var n = e.getRootNode(), r = (
2457
2457
  /** @type {ShadowRoot} */
2458
2458
  n.host ? (
@@ -2465,14 +2465,14 @@ function ys(e, t) {
2465
2465
  )
2466
2466
  );
2467
2467
  if (!r.querySelector("#" + t.hash)) {
2468
- const i = en("style");
2468
+ const i = nn("style");
2469
2469
  i.id = t.hash, i.textContent = t.code, r.appendChild(i);
2470
2470
  }
2471
2471
  });
2472
2472
  }
2473
- const Rn = [...`
2473
+ const Mn = [...`
2474
2474
  \r\f \v\uFEFF`];
2475
- function $s(e, t, n) {
2475
+ function As(e, t, n) {
2476
2476
  var r = e == null ? "" : "" + e;
2477
2477
  if (t && (r = r ? r + " " + t : t), n) {
2478
2478
  for (var i of Object.keys(n))
@@ -2481,16 +2481,16 @@ function $s(e, t, n) {
2481
2481
  else if (r.length)
2482
2482
  for (var s = i.length, o = 0; (o = r.indexOf(i, o)) >= 0; ) {
2483
2483
  var l = o + s;
2484
- (o === 0 || Rn.includes(r[o - 1])) && (l === r.length || Rn.includes(r[l])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(l + 1) : o = l;
2484
+ (o === 0 || Mn.includes(r[o - 1])) && (l === r.length || Mn.includes(r[l])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(l + 1) : o = l;
2485
2485
  }
2486
2486
  }
2487
2487
  return r === "" ? null : r;
2488
2488
  }
2489
- function Cn(e, t, n, r, i, s) {
2489
+ function Pn(e, t, n, r, i, s) {
2490
2490
  var o = e.__className;
2491
- if (x || o !== n || o === void 0) {
2492
- var l = $s(n, r, s);
2493
- (!x || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = n;
2491
+ if (k || o !== n || o === void 0) {
2492
+ var l = As(n, r, s);
2493
+ (!k || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = n;
2494
2494
  } else if (s && i !== s)
2495
2495
  for (var a in s) {
2496
2496
  var f = !!s[a];
@@ -2498,65 +2498,65 @@ function Cn(e, t, n, r, i, s) {
2498
2498
  }
2499
2499
  return s;
2500
2500
  }
2501
- const Es = /* @__PURE__ */ Symbol("is custom element"), Ts = /* @__PURE__ */ Symbol("is html"), Ss = gi ? "link" : "LINK";
2502
- function ee(e, t, n, r) {
2503
- var i = xs(e);
2504
- x && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ss) || i[t] !== (i[t] = n) && (t === "loading" && (e[pi] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && ks(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2501
+ const Rs = /* @__PURE__ */ Symbol("is custom element"), zs = /* @__PURE__ */ Symbol("is html"), Cs = Ei ? "link" : "LINK";
2502
+ function xe(e, t, n, r) {
2503
+ var i = Os(e);
2504
+ k && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Cs) || i[t] !== (i[t] = n) && (t === "loading" && (e[$i] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && Ns(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2505
2505
  }
2506
- function xs(e) {
2506
+ function Os(e) {
2507
2507
  return (
2508
2508
  /** @type {Record<string | symbol, unknown>} **/
2509
2509
  // @ts-expect-error
2510
2510
  e.__attributes ??= {
2511
- [Es]: e.nodeName.includes("-"),
2512
- [Ts]: e.namespaceURI === Pn
2511
+ [Rs]: e.nodeName.includes("-"),
2512
+ [zs]: e.namespaceURI === Hn
2513
2513
  }
2514
2514
  );
2515
2515
  }
2516
- var Nn = /* @__PURE__ */ new Map();
2517
- function ks(e) {
2518
- var t = e.getAttribute("is") || e.nodeName, n = Nn.get(t);
2516
+ var Ln = /* @__PURE__ */ new Map();
2517
+ function Ns(e) {
2518
+ var t = e.getAttribute("is") || e.nodeName, n = Ln.get(t);
2519
2519
  if (n) return n;
2520
- Nn.set(t, n = []);
2520
+ Ln.set(t, n = []);
2521
2521
  for (var r, i = e, s = Element.prototype; s !== i; ) {
2522
- r = fi(i);
2522
+ r = _i(i);
2523
2523
  for (var o in r)
2524
2524
  r[o].set && n.push(o);
2525
- i = Dn(i);
2525
+ i = jn(i);
2526
2526
  }
2527
2527
  return n;
2528
2528
  }
2529
- function On(e, t) {
2529
+ function Dn(e, t) {
2530
2530
  return e === t || e?.[dt] === t;
2531
2531
  }
2532
- function Mn(e = {}, t, n, r) {
2533
- return vr(() => {
2532
+ function Fn(e = {}, t, n, r) {
2533
+ return mr(() => {
2534
2534
  var i, s;
2535
- return sn(() => {
2536
- i = s, s = [], un(() => {
2537
- e !== n(...s) && (t(e, ...s), i && On(n(...i), e) && t(null, ...i));
2535
+ return ln(() => {
2536
+ i = s, s = [], dn(() => {
2537
+ e !== n(...s) && (t(e, ...s), i && Dn(n(...i), e) && t(null, ...i));
2538
2538
  });
2539
2539
  }), () => {
2540
- $e(() => {
2541
- s && On(n(...s), e) && t(null, ...s);
2540
+ ye(() => {
2541
+ s && Dn(n(...s), e) && t(null, ...s);
2542
2542
  });
2543
2543
  };
2544
2544
  }), e;
2545
2545
  }
2546
- let yt = !1;
2547
- function As(e) {
2548
- var t = yt;
2546
+ let St = !1;
2547
+ function Is(e) {
2548
+ var t = St;
2549
2549
  try {
2550
- return yt = !1, [e(), yt];
2550
+ return St = !1, [e(), St];
2551
2551
  } finally {
2552
- yt = t;
2552
+ St = t;
2553
2553
  }
2554
2554
  }
2555
- function $t(e, t, n, r) {
2556
- var i = (n & si) !== 0, s = (n & oi) !== 0, o = (
2555
+ function Tt(e, t, n, r) {
2556
+ var i = (n & ci) !== 0, s = (n & di) !== 0, o = (
2557
2557
  /** @type {V} */
2558
2558
  r
2559
- ), l = !0, a = () => (l && (l = !1, o = s ? un(
2559
+ ), l = !0, a = () => (l && (l = !1, o = s ? dn(
2560
2560
  /** @type {() => V} */
2561
2561
  r
2562
2562
  ) : (
@@ -2564,15 +2564,15 @@ function $t(e, t, n, r) {
2564
2564
  r
2565
2565
  )), o), f;
2566
2566
  if (i) {
2567
- var h = dt in e || Bn in e;
2568
- f = Oe(e, t)?.set ?? (h && t in e ? (m) => e[t] = m : void 0);
2567
+ var d = dt in e || qn in e;
2568
+ f = Ce(e, t)?.set ?? (d && t in e ? (m) => e[t] = m : void 0);
2569
2569
  }
2570
- var v, c = !1;
2571
- i ? [v, c] = As(() => (
2570
+ var h, _ = !1;
2571
+ i ? [h, _] = Is(() => (
2572
2572
  /** @type {V} */
2573
2573
  e[t]
2574
- )) : v = /** @type {V} */
2575
- e[t], v === void 0 && r !== void 0 && (v = a(), f && (Si(), f(v)));
2574
+ )) : h = /** @type {V} */
2575
+ e[t], h === void 0 && r !== void 0 && (h = a(), f && (Ci(), f(h)));
2576
2576
  var p;
2577
2577
  if (p = () => {
2578
2578
  var m = (
@@ -2580,38 +2580,38 @@ function $t(e, t, n, r) {
2580
2580
  e[t]
2581
2581
  );
2582
2582
  return m === void 0 ? a() : (l = !0, m);
2583
- }, (n & ii) === 0)
2583
+ }, (n & ui) === 0)
2584
2584
  return p;
2585
2585
  if (f) {
2586
- var d = e.$$legacy;
2586
+ var u = e.$$legacy;
2587
2587
  return (
2588
2588
  /** @type {() => V} */
2589
- (function(m, O) {
2590
- return arguments.length > 0 ? ((!O || d || c) && f(O ? p() : m), m) : p();
2589
+ (function(m, R) {
2590
+ return arguments.length > 0 ? ((!R || u || _) && f(R ? p() : m), m) : p();
2591
2591
  })
2592
2592
  );
2593
2593
  }
2594
- var g = !1, b = ((n & ri) !== 0 ? Ot : tr)(() => (g = !1, p()));
2595
- i && u(b);
2594
+ var g = !1, T = ((n & fi) !== 0 ? Pt : or)(() => (g = !1, p()));
2595
+ i && c(T);
2596
2596
  var y = (
2597
2597
  /** @type {Effect} */
2598
2598
  S
2599
2599
  );
2600
2600
  return (
2601
2601
  /** @type {() => V} */
2602
- (function(m, O) {
2602
+ (function(m, R) {
2603
2603
  if (arguments.length > 0) {
2604
- const k = O ? u(b) : i ? qe(m) : m;
2605
- return w(b, k), g = !0, o !== void 0 && (o = k), m;
2604
+ const A = R ? c(T) : i ? Ue(m) : m;
2605
+ return b(T, A), g = !0, o !== void 0 && (o = A), m;
2606
2606
  }
2607
- return Te && g || (y.f & fe) !== 0 ? b.v : u(b);
2607
+ return Ee && g || (y.f & fe) !== 0 ? T.v : c(T);
2608
2608
  })
2609
2609
  );
2610
2610
  }
2611
- function zs(e) {
2612
- return new Rs(e);
2611
+ function Ms(e) {
2612
+ return new Ps(e);
2613
2613
  }
2614
- class Rs {
2614
+ class Ps {
2615
2615
  /** @type {any} */
2616
2616
  #e;
2617
2617
  /** @type {Record<string, any>} */
@@ -2623,24 +2623,24 @@ class Rs {
2623
2623
  */
2624
2624
  constructor(t) {
2625
2625
  var n = /* @__PURE__ */ new Map(), r = (s, o) => {
2626
- var l = /* @__PURE__ */ sr(o, !1, !1);
2626
+ var l = /* @__PURE__ */ ur(o, !1, !1);
2627
2627
  return n.set(s, l), l;
2628
2628
  };
2629
2629
  const i = new Proxy(
2630
2630
  { ...t.props || {}, $$events: {} },
2631
2631
  {
2632
2632
  get(s, o) {
2633
- return u(n.get(o) ?? r(o, Reflect.get(s, o)));
2633
+ return c(n.get(o) ?? r(o, Reflect.get(s, o)));
2634
2634
  },
2635
2635
  has(s, o) {
2636
- return o === Bn ? !0 : (u(n.get(o) ?? r(o, Reflect.get(s, o))), Reflect.has(s, o));
2636
+ return o === qn ? !0 : (c(n.get(o) ?? r(o, Reflect.get(s, o))), Reflect.has(s, o));
2637
2637
  },
2638
2638
  set(s, o, l) {
2639
- return w(n.get(o) ?? r(o, l), l), Reflect.set(s, o, l);
2639
+ return b(n.get(o) ?? r(o, l), l), Reflect.set(s, o, l);
2640
2640
  }
2641
2641
  }
2642
2642
  );
2643
- this.#t = (t.hydrate ? vs : Ar)(t.component, {
2643
+ this.#t = (t.hydrate ? bs : Ir)(t.component, {
2644
2644
  target: t.target,
2645
2645
  anchor: t.anchor,
2646
2646
  props: i,
@@ -2650,7 +2650,7 @@ class Rs {
2650
2650
  transformError: t.transformError
2651
2651
  }), (!t?.props?.$$host || t.sync === !1) && ft(), this.#e = i.$$events;
2652
2652
  for (const s of Object.keys(this.#t))
2653
- s === "$set" || s === "$destroy" || s === "$on" || xt(this, s, {
2653
+ s === "$set" || s === "$destroy" || s === "$on" || Rt(this, s, {
2654
2654
  get() {
2655
2655
  return this.#t[s];
2656
2656
  },
@@ -2664,7 +2664,7 @@ class Rs {
2664
2664
  (s) => {
2665
2665
  Object.assign(i, s);
2666
2666
  }, this.#t.$destroy = () => {
2667
- _s(this.#t);
2667
+ ys(this.#t);
2668
2668
  };
2669
2669
  }
2670
2670
  /** @param {Record<string, any>} props */
@@ -2690,8 +2690,8 @@ class Rs {
2690
2690
  this.#t.$destroy();
2691
2691
  }
2692
2692
  }
2693
- let Rr;
2694
- typeof HTMLElement == "function" && (Rr = class extends HTMLElement {
2693
+ let Pr;
2694
+ typeof HTMLElement == "function" && (Pr = class extends HTMLElement {
2695
2695
  /** The Svelte component constructor */
2696
2696
  $$ctor;
2697
2697
  /** Slots */
@@ -2749,22 +2749,22 @@ typeof HTMLElement == "function" && (Rr = class extends HTMLElement {
2749
2749
  if (this.$$cn = !0, !this.$$c) {
2750
2750
  let e = function(r) {
2751
2751
  return (i) => {
2752
- const s = en("slot");
2753
- r !== "default" && (s.name = r), we(i, s);
2752
+ const s = nn("slot");
2753
+ r !== "default" && (s.name = r), ke(i, s);
2754
2754
  };
2755
2755
  };
2756
2756
  if (await Promise.resolve(), !this.$$cn || this.$$c)
2757
2757
  return;
2758
- const t = {}, n = Cs(this);
2758
+ const t = {}, n = Ls(this);
2759
2759
  for (const r of this.$$s)
2760
2760
  r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), t.default = !0) : t[r] = e(r));
2761
2761
  for (const r of this.attributes) {
2762
2762
  const i = this.$$g_p(r.name);
2763
- i in this.$$d || (this.$$d[i] = Tt(i, r.value, this.$$p_d, "toProp"));
2763
+ i in this.$$d || (this.$$d[i] = kt(i, r.value, this.$$p_d, "toProp"));
2764
2764
  }
2765
2765
  for (const r in this.$$p_d)
2766
2766
  !(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
2767
- this.$$c = zs({
2767
+ this.$$c = Ms({
2768
2768
  component: this.$$ctor,
2769
2769
  target: this.$$shadowRoot || this,
2770
2770
  props: {
@@ -2772,13 +2772,13 @@ typeof HTMLElement == "function" && (Rr = class extends HTMLElement {
2772
2772
  $$slots: t,
2773
2773
  $$host: this
2774
2774
  }
2775
- }), this.$$me = Qi(() => {
2776
- sn(() => {
2775
+ }), this.$$me = ss(() => {
2776
+ ln(() => {
2777
2777
  this.$$r = !0;
2778
- for (const r of St(this.$$c)) {
2778
+ for (const r of At(this.$$c)) {
2779
2779
  if (!this.$$p_d[r]?.reflect) continue;
2780
2780
  this.$$d[r] = this.$$c[r];
2781
- const i = Tt(
2781
+ const i = kt(
2782
2782
  r,
2783
2783
  this.$$d[r],
2784
2784
  this.$$p_d,
@@ -2805,7 +2805,7 @@ typeof HTMLElement == "function" && (Rr = class extends HTMLElement {
2805
2805
  * @param {string} newValue
2806
2806
  */
2807
2807
  attributeChangedCallback(e, t, n) {
2808
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = Tt(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2808
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = kt(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2809
2809
  }
2810
2810
  disconnectedCallback() {
2811
2811
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2816,12 +2816,12 @@ typeof HTMLElement == "function" && (Rr = class extends HTMLElement {
2816
2816
  * @param {string} attribute_name
2817
2817
  */
2818
2818
  $$g_p(e) {
2819
- return St(this.$$p_d).find(
2819
+ return At(this.$$p_d).find(
2820
2820
  (t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
2821
2821
  ) || e;
2822
2822
  }
2823
2823
  });
2824
- function Tt(e, t, n, r) {
2824
+ function kt(e, t, n, r) {
2825
2825
  const i = n[e]?.type;
2826
2826
  if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
2827
2827
  return t;
@@ -2851,7 +2851,7 @@ function Tt(e, t, n, r) {
2851
2851
  return t;
2852
2852
  }
2853
2853
  }
2854
- function Cs(e) {
2854
+ function Ls(e) {
2855
2855
  const t = {};
2856
2856
  return e.childNodes.forEach((n) => {
2857
2857
  t[
@@ -2860,33 +2860,33 @@ function Cs(e) {
2860
2860
  ] = !0;
2861
2861
  }), t;
2862
2862
  }
2863
- function Ns(e, t, n, r, i, s) {
2864
- let o = class extends Rr {
2863
+ function Ds(e, t, n, r, i, s) {
2864
+ let o = class extends Pr {
2865
2865
  constructor() {
2866
2866
  super(e, n, i), this.$$p_d = t;
2867
2867
  }
2868
2868
  static get observedAttributes() {
2869
- return St(t).map(
2869
+ return At(t).map(
2870
2870
  (l) => (t[l].attribute || l).toLowerCase()
2871
2871
  );
2872
2872
  }
2873
2873
  };
2874
- return St(t).forEach((l) => {
2875
- xt(o.prototype, l, {
2874
+ return At(t).forEach((l) => {
2875
+ Rt(o.prototype, l, {
2876
2876
  get() {
2877
2877
  return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
2878
2878
  },
2879
2879
  set(a) {
2880
- a = Tt(l, a, t), this.$$d[l] = a;
2880
+ a = kt(l, a, t), this.$$d[l] = a;
2881
2881
  var f = this.$$c;
2882
2882
  if (f) {
2883
- var h = Oe(f, l)?.get;
2884
- h ? f[l] = a : f.$set({ [l]: a });
2883
+ var d = Ce(f, l)?.get;
2884
+ d ? f[l] = a : f.$set({ [l]: a });
2885
2885
  }
2886
2886
  }
2887
2887
  });
2888
2888
  }), r.forEach((l) => {
2889
- xt(o.prototype, l, {
2889
+ Rt(o.prototype, l, {
2890
2890
  get() {
2891
2891
  return this.$$c?.[l];
2892
2892
  }
@@ -2894,276 +2894,312 @@ function Ns(e, t, n, r, i, s) {
2894
2894
  }), e.element = /** @type {any} */
2895
2895
  o, o;
2896
2896
  }
2897
- var Os = /* @__PURE__ */ dn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M8 5v14l11-7z"></path></svg>'), Ms = /* @__PURE__ */ dn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"></path></svg>'), Is = /* @__PURE__ */ dn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M8 5v14l11-7z"></path></svg>'), Ps = /* @__PURE__ */ cn('<button type="button" data-pie-tts-control=""><span aria-hidden="true"> </span></button>'), Ls = /* @__PURE__ */ cn('<div class="pie-tool-tts-inline__panel svelte-18mzc0g" role="toolbar" aria-label="Reading controls" tabindex="-1"><button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control pie-tool-tts-inline__control--primary svelte-18mzc0g"><!></button> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Stop reading"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M6 6h12v12H6z"></path></svg></button> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Fast-forward"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M4 18l8.5-6L4 6v12zm9.5 0L22 12l-8.5-6v12z"></path></svg></button> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Rewind"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M20 18V6l-8.5 6L20 18zM10.5 18V6L2 12l8.5 6z"></path></svg></button> <!></div>'), Ds = /* @__PURE__ */ cn('<div class="pie-tool-tts-inline svelte-18mzc0g"><button type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"></path></svg></button> <!> <div class="pie-sr-only svelte-18mzc0g" role="status" aria-live="polite" aria-atomic="true"> </div></div>');
2898
- const Fs = {
2897
+ var Fs = /* @__PURE__ */ Nr('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"></path></svg>'), Bs = /* @__PURE__ */ Nr('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M8 5v14l11-7z"></path></svg>'), Hs = /* @__PURE__ */ hn('<button type="button" data-pie-tts-control=""><span aria-hidden="true"> </span></button>'), Vs = /* @__PURE__ */ hn('<div class="pie-tool-tts-inline__panel svelte-18mzc0g" role="toolbar" aria-label="Reading controls" tabindex="-1"><!> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Rewind"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M20 18V6l-8.5 6L20 18zM10.5 18V6L2 12l8.5 6z"></path></svg></button> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Fast-forward"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M4 18l8.5-6L4 6v12zm9.5 0L22 12l-8.5-6v12z"></path></svg></button> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Stop reading"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M6 6h12v12H6z"></path></svg></button></div>'), js = /* @__PURE__ */ hn('<div class="pie-tool-tts-inline svelte-18mzc0g"><button type="button"><!></button> <!> <div class="pie-sr-only svelte-18mzc0g" role="status" aria-live="polite" aria-atomic="true"> </div></div>');
2898
+ const Us = {
2899
2899
  hash: "svelte-18mzc0g",
2900
- code: `.pie-tool-tts-inline.svelte-18mzc0g {position:relative;display:inline-block;}.pie-tool-tts-inline__trigger.svelte-18mzc0g {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid var(--pie-button-border-color, var(--pie-border, #c6c6c6));background-color:var(--pie-button-background-color, var(--pie-background, #fff));color:var(--pie-button-color, var(--pie-text, #333));border-radius:0.25rem;cursor:pointer;transition:background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;}.pie-tool-tts-inline__trigger.svelte-18mzc0g:hover:not(:disabled),
2900
+ code: `.pie-tool-tts-inline.svelte-18mzc0g {position:relative;display:inline-flex;align-items:center;}.pie-tool-tts-inline__trigger.svelte-18mzc0g {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid var(--pie-button-border-color, var(--pie-border, #c6c6c6));background-color:var(--pie-button-background-color, var(--pie-background, #fff));color:var(--pie-button-color, var(--pie-text, #333));border-radius:0.25rem;cursor:pointer;transition:background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;}.pie-tool-tts-inline__trigger.svelte-18mzc0g:hover:not(:disabled),
2901
2901
  .pie-tool-tts-inline__control.svelte-18mzc0g:hover:not(:disabled) {background-color:var(--pie-button-hover-background-color, var(--pie-secondary-background, #f2f4f8));transform:translateY(-1px);box-shadow:0 2px 6px color-mix(in srgb, var(--pie-shadow, #000) 14%, transparent);}.pie-tool-tts-inline__trigger.svelte-18mzc0g:active:not(:disabled),
2902
2902
  .pie-tool-tts-inline__control.svelte-18mzc0g:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.pie-tool-tts-inline__trigger.svelte-18mzc0g:focus-visible,
2903
- .pie-tool-tts-inline__control.svelte-18mzc0g:focus-visible {outline:2px solid var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-primary, #0066cc)));outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb, var(--pie-primary, #0066cc) 22%, transparent);}.pie-tool-tts-inline__trigger--active.svelte-18mzc0g {border-color:var(--pie-primary, #1565c0);background-color:color-mix(in srgb, var(--pie-primary, #1565c0) 10%, var(--pie-background, #fff));}.pie-tool-tts-inline__panel.svelte-18mzc0g {position:absolute;z-index:2;top:calc(100% + 0.5rem);right:0;left:auto;transform-origin:top right;display:grid;grid-auto-flow:row;justify-items:center;gap:0.25rem;padding:0.5rem;min-width:3rem;background:var(--pie-surface, var(--pie-background, #fff));border:1px solid var(--pie-border, #d0d0d0);border-radius:0.75rem;box-shadow:0 6px 18px color-mix(in srgb, var(--pie-shadow, #000) 18%, transparent);}.pie-tool-tts-inline__control.svelte-18mzc0g {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid var(--pie-button-border-color, var(--pie-border, #c6c6c6));border-radius:0.25rem;background:var(--pie-button-background-color, var(--pie-background, #fff));color:var(--pie-button-color, var(--pie-text, #222));cursor:pointer;transition:background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;}.pie-tool-tts-inline__control--speed.svelte-18mzc0g {font-size:0.6875rem;font-weight:400;letter-spacing:0;white-space:nowrap;}.pie-tool-tts-inline__control--speed-active.svelte-18mzc0g {border-color:var(--pie-primary, #1565c0);background:color-mix(in srgb, var(--pie-primary, #1565c0) 14%, var(--pie-background, #fff));color:var(--pie-primary, #1565c0);font-weight:600;}.pie-tool-tts-inline__trigger.svelte-18mzc0g:disabled,
2903
+ .pie-tool-tts-inline__control.svelte-18mzc0g:focus-visible {outline:2px solid var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-primary, #0066cc)));outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb, var(--pie-primary, #0066cc) 22%, transparent);}.pie-tool-tts-inline__trigger--active.svelte-18mzc0g {border-color:var(--pie-primary, #1565c0);background-color:color-mix(in srgb, var(--pie-primary, #1565c0) 10%, var(--pie-background, #fff));}.pie-tool-tts-inline__panel.svelte-18mzc0g {position:absolute;z-index:2;top:100%;right:0;left:auto;display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:0.25rem;box-sizing:border-box;height:var(--pie-tts-controls-row-height, 2.875rem);padding:0 0.5rem;background:var(--pie-surface, var(--pie-background, #fff));border:1px solid var(--pie-border, #d0d0d0);border-radius:0.5rem;}.pie-tool-tts-inline__control.svelte-18mzc0g {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid var(--pie-button-border-color, var(--pie-border, #c6c6c6));border-radius:0.25rem;background:var(--pie-button-background-color, var(--pie-background, #fff));color:var(--pie-button-color, var(--pie-text, #222));cursor:pointer;transition:background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;}.pie-tool-tts-inline__control--speed.svelte-18mzc0g {font-size:0.6875rem;font-weight:400;letter-spacing:0;white-space:nowrap;}.pie-tool-tts-inline__control--speed-active.svelte-18mzc0g {border-color:var(--pie-primary, #1565c0);background:color-mix(in srgb, var(--pie-primary, #1565c0) 14%, var(--pie-background, #fff));color:var(--pie-primary, #1565c0);font-weight:600;}.pie-tool-tts-inline__trigger.svelte-18mzc0g:disabled,
2904
2904
  .pie-tool-tts-inline__control.svelte-18mzc0g:disabled {cursor:not-allowed;opacity:0.6;}.pie-tool-tts-inline__trigger--sm.svelte-18mzc0g {width:1.75rem;height:1.75rem;}.pie-tool-tts-inline__trigger--sm.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1rem;height:1rem;}.pie-tool-tts-inline__trigger--md.svelte-18mzc0g {width:2rem;height:2rem;}.pie-tool-tts-inline__trigger--md.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1.25rem;height:1.25rem;}.pie-tool-tts-inline__trigger--lg.svelte-18mzc0g {width:2.5rem;height:2.5rem;}.pie-tool-tts-inline__trigger--lg.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1.5rem;height:1.5rem;}.pie-tool-tts-inline__icon.svelte-18mzc0g {fill:currentColor;color:currentColor;}.pie-sr-only.svelte-18mzc0g {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
2905
2905
 
2906
2906
  @media (prefers-reduced-motion: reduce) {.pie-tool-tts-inline__trigger.svelte-18mzc0g,
2907
2907
  .pie-tool-tts-inline__control.svelte-18mzc0g {transition:none !important;}
2908
2908
  }`
2909
2909
  };
2910
- function Bs(e, t) {
2911
- Vn(t, !0), ys(e, Fs);
2912
- let n = $t(
2910
+ function qs(e, t) {
2911
+ Gn(t, !0), ks(e, Us);
2912
+ let n = Tt(
2913
2913
  t,
2914
2914
  "catalogId",
2915
2915
  7,
2916
2916
  ""
2917
2917
  // Explicit catalog ID
2918
- ), r = $t(t, "language", 7, "en-US"), i = $t(t, "size", 7, "md"), s = $t(t, "speedOptions", 23, () => [1.5, 2]);
2919
- const o = typeof window < "u";
2920
- let l = /* @__PURE__ */ N(void 0), a = /* @__PURE__ */ N(void 0), f = /* @__PURE__ */ N(null), h = /* @__PURE__ */ N(null), v = /* @__PURE__ */ N(null);
2921
- const c = /* @__PURE__ */ ot(() => u(f)?.ttsService), p = /* @__PURE__ */ ot(() => u(f)?.highlightCoordinator), d = /* @__PURE__ */ ot(() => u(v)?.scopeElement || u(h)?.scopeElement || null);
2922
- let g = /* @__PURE__ */ N(!1), b = /* @__PURE__ */ N(!1), y = /* @__PURE__ */ N(!1), m = /* @__PURE__ */ N(""), O = /* @__PURE__ */ N(1), k = /* @__PURE__ */ N(0), R = /* @__PURE__ */ N(!1);
2923
- const ke = 4, oe = /* @__PURE__ */ ot(() => {
2918
+ ), r = Tt(t, "language", 7, "en-US"), i = Tt(t, "size", 7, "md"), s = Tt(t, "speedOptions", 23, () => [1.5, 2]);
2919
+ const o = typeof window < "u", l = "__pie_tts_inline_active_owner__", a = "pie-tts-inline-owner-change";
2920
+ let f = /* @__PURE__ */ O(void 0), d = /* @__PURE__ */ O(void 0), h = /* @__PURE__ */ O(null), _ = /* @__PURE__ */ O(null), p = /* @__PURE__ */ O(null);
2921
+ const u = /* @__PURE__ */ st(() => c(h)?.ttsService), g = /* @__PURE__ */ st(() => c(h)?.highlightCoordinator), T = /* @__PURE__ */ st(() => c(p)?.scopeElement || c(_)?.scopeElement || null);
2922
+ let y = /* @__PURE__ */ O(!1), m = /* @__PURE__ */ O(!1), R = /* @__PURE__ */ O(!1), A = /* @__PURE__ */ O(""), F = /* @__PURE__ */ O(1), I = /* @__PURE__ */ O(0), U = /* @__PURE__ */ O(!1);
2923
+ const N = /* @__PURE__ */ st(() => {
2924
2924
  if (!Array.isArray(s())) return [1.5, 2];
2925
- const _ = /* @__PURE__ */ new Set();
2926
- for (const $ of s()) {
2927
- if (typeof $ != "number" || !Number.isFinite($) || $ <= 0) continue;
2928
- const A = Math.round($ * 100) / 100;
2929
- A !== 1 && _.add(A);
2930
- }
2931
- return _.size ? Array.from(_) : [1.5, 2];
2932
- }), V = `pie-tts-inline-${Math.random().toString(36).slice(2)}`;
2933
- wt(() => {
2934
- if (u(l))
2935
- return Jr(u(l), (_) => {
2936
- w(f, _, !0);
2925
+ const v = /* @__PURE__ */ new Set();
2926
+ for (const w of s()) {
2927
+ if (typeof w != "number" || !Number.isFinite(w) || w <= 0) continue;
2928
+ const x = Math.round(w * 100) / 100;
2929
+ x !== 1 && v.add(x);
2930
+ }
2931
+ return v.size ? Array.from(v).sort((w, x) => x - w) : [2, 1.5];
2932
+ }), q = `pie-tts-inline-instance-${Math.random().toString(36).slice(2)}`, K = `pie-tts-inline-${Math.random().toString(36).slice(2)}`;
2933
+ function et() {
2934
+ if (!o) return null;
2935
+ const v = window[l];
2936
+ return typeof v == "string" ? v : null;
2937
+ }
2938
+ function Be() {
2939
+ return et() === q;
2940
+ }
2941
+ function vn(v, w) {
2942
+ o && window.dispatchEvent(new CustomEvent(a, { detail: { ownerId: v, previousOwnerId: w } }));
2943
+ }
2944
+ function Lr() {
2945
+ if (!o) return;
2946
+ const v = et();
2947
+ v !== q && (window[l] = q, vn(q, v));
2948
+ }
2949
+ function _n() {
2950
+ !o || et() !== q || (delete window[l], vn(null, q));
2951
+ }
2952
+ function pn(v = "", w = !1) {
2953
+ b(m, !1), b(R, !1), b(I, 0), b(y, w, !0), b(A, v, !0);
2954
+ }
2955
+ lt(() => {
2956
+ if (c(f))
2957
+ return ni(c(f), (v) => {
2958
+ b(h, v, !0);
2937
2959
  });
2938
- }), wt(() => {
2939
- if (!u(l)) return;
2940
- const _ = Xr(u(l), (A) => {
2941
- w(h, A, !0);
2942
- }), $ = Zr(u(l), (A) => {
2943
- w(v, A, !0);
2960
+ }), lt(() => {
2961
+ if (!c(f)) return;
2962
+ const v = ri(c(f), (x) => {
2963
+ b(_, x, !0);
2964
+ }), w = ii(c(f), (x) => {
2965
+ b(p, x, !0);
2944
2966
  });
2945
2967
  return () => {
2946
- $(), _();
2947
- };
2948
- }), wt(() => {
2949
- if (!u(c)) return;
2950
- const _ = (A) => {
2951
- w(b, A === "playing" || A === "paused", !0), w(y, A === "paused");
2952
- }, $ = (A) => {
2953
- _(A);
2968
+ w(), v();
2954
2969
  };
2955
- return u(c).onStateChange(V, $), _(u(c).getState()), () => {
2956
- u(c).offStateChange(V, $);
2957
- };
2958
- }), wt(() => {
2959
- let _ = !1;
2960
- return (async () => {
2961
- if (!u(f)?.toolkitCoordinator?.ensureTTSReady) {
2962
- w(R, !!u(c));
2970
+ }), lt(() => {
2971
+ if (!c(u)) return;
2972
+ const v = (x) => {
2973
+ if (!c(y) || !Be()) {
2974
+ b(m, !1), b(R, !1);
2963
2975
  return;
2964
2976
  }
2965
- try {
2966
- await u(f).toolkitCoordinator.ensureTTSReady(), _ || w(R, !0);
2967
- } catch (A) {
2968
- _ || (w(R, !1), console.error("[TTS Inline] Failed to initialize TTS:", A));
2969
- }
2970
- })(), () => {
2971
- _ = !0;
2977
+ b(m, x === "playing" || x === "paused", !0), b(R, x === "paused");
2978
+ }, w = (x) => {
2979
+ v(x);
2980
+ };
2981
+ return c(u).onStateChange(K, w), v(c(u).getState()), () => {
2982
+ c(u).offStateChange(K, w);
2983
+ };
2984
+ }), lt(() => {
2985
+ if (!o) return;
2986
+ const v = (w) => {
2987
+ const x = w, { ownerId: mt = null, previousOwnerId: Lt = null } = x.detail || {};
2988
+ Lt === q && mt !== q && pn("Reading switched to another section");
2989
+ };
2990
+ return window.addEventListener(a, v), () => {
2991
+ window.removeEventListener(a, v);
2972
2992
  };
2993
+ }), lt(() => () => {
2994
+ _n();
2973
2995
  });
2974
- function Ae() {
2975
- return u(a) ? Array.from(u(a).querySelectorAll("[data-pie-tts-control]")) : [];
2976
- }
2977
- function D(_) {
2978
- const $ = Ae();
2979
- if (!$.length) return;
2980
- const A = (_ + $.length) % $.length;
2981
- w(k, A), $[A].focus();
2982
- }
2983
- function Mt(_) {
2984
- const $ = Ae();
2985
- if ($.length)
2986
- switch (_.key) {
2996
+ async function Dr() {
2997
+ if (!c(u)) return !1;
2998
+ try {
2999
+ return await c(h)?.toolkitCoordinator?.ensureTTSReady?.(), !0;
3000
+ } catch (v) {
3001
+ return console.error("[TTS Inline] Failed to initialize TTS:", v), !1;
3002
+ }
3003
+ }
3004
+ function gn() {
3005
+ return c(d) ? Array.from(c(d).querySelectorAll("[data-pie-tts-control]")) : [];
3006
+ }
3007
+ function wt(v) {
3008
+ const w = gn();
3009
+ if (!w.length) return;
3010
+ const x = (v + w.length) % w.length;
3011
+ b(I, x), w[x].focus();
3012
+ }
3013
+ function Fr(v) {
3014
+ const w = gn();
3015
+ if (w.length)
3016
+ switch (v.key) {
2987
3017
  case "ArrowDown":
2988
3018
  case "ArrowRight":
2989
- _.preventDefault(), D(u(k) + 1);
3019
+ v.preventDefault(), wt(c(I) + 1);
2990
3020
  break;
2991
3021
  case "ArrowUp":
2992
3022
  case "ArrowLeft":
2993
- _.preventDefault(), D(u(k) - 1);
3023
+ v.preventDefault(), wt(c(I) - 1);
2994
3024
  break;
2995
3025
  case "Home":
2996
- _.preventDefault(), D(0);
3026
+ v.preventDefault(), wt(0);
2997
3027
  break;
2998
3028
  case "End":
2999
- _.preventDefault(), D($.length - 1);
3029
+ v.preventDefault(), wt(w.length - 1);
3000
3030
  break;
3001
3031
  }
3002
3032
  }
3003
- function It() {
3004
- w(g, !u(g)), u(g) && queueMicrotask(() => D(u(k)));
3005
- }
3006
- function Cr() {
3007
- if (!u(d)) return null;
3008
- const _ = u(d);
3009
- if (_.getAttribute?.("data-region") === "content")
3010
- return _;
3011
- const $ = _.querySelector?.("[data-region='content']");
3012
- return $ instanceof Element ? $ : _;
3013
- }
3014
- async function Nr() {
3015
- if (!u(c)) return;
3016
- if (!u(R)) {
3017
- w(m, "Text-to-speech is still initializing");
3018
- return;
3019
- }
3020
- const _ = Cr();
3021
- if (!_) {
3033
+ function Br() {
3034
+ if (!c(T)) return null;
3035
+ const v = c(T);
3036
+ if (v.getAttribute?.("data-region") === "content")
3037
+ return v;
3038
+ const w = v.querySelector?.("[data-region='content']");
3039
+ return w instanceof Element ? w : v;
3040
+ }
3041
+ async function Hr() {
3042
+ if (!c(u)) return;
3043
+ const v = Br();
3044
+ if (!v) {
3022
3045
  console.warn("[TTS Inline] No target container found from shell scope context");
3023
3046
  return;
3024
3047
  }
3025
3048
  try {
3026
- w(g, !0);
3027
- const $ = _.textContent || "";
3028
- if (!$) {
3049
+ b(y, !0);
3050
+ const w = v.textContent || "";
3051
+ if (!w) {
3029
3052
  console.warn("[TTS Inline] No text content found");
3030
3053
  return;
3031
3054
  }
3032
- u(p) && u(c).setHighlightCoordinator && u(c).setHighlightCoordinator(u(p)), u(c).setRootElement?.(_);
3033
- const A = !!_.closest("pie-passage-shell");
3034
- w(m, "Reading started"), await u(c).speak($, {
3035
- catalogId: A ? void 0 : n() || void 0,
3055
+ c(g) && c(u).setHighlightCoordinator && c(u).setHighlightCoordinator(c(g)), c(u).setRootElement?.(v);
3056
+ const x = !!v.closest("pie-passage-shell");
3057
+ b(A, "Reading started"), await c(u).speak(w, {
3058
+ catalogId: x ? void 0 : n() || void 0,
3036
3059
  language: r(),
3037
- contentElement: _
3060
+ contentElement: v
3038
3061
  });
3039
- } catch ($) {
3040
- console.error("[TTS Inline] Error:", $), w(m, "Unable to start reading"), u(p) && u(p).clearTTS();
3062
+ } catch (w) {
3063
+ console.error("[TTS Inline] Error:", w), b(A, "Unable to start reading"), c(g) && c(g).clearTTS();
3041
3064
  }
3042
3065
  }
3043
- async function Or() {
3044
- if (u(c)) {
3045
- if (u(y)) {
3046
- u(c).resume(), w(m, "Reading resumed");
3066
+ async function Vr() {
3067
+ if (c(u)) {
3068
+ if (Be() && c(R)) {
3069
+ c(u).resume(), b(A, "Reading resumed");
3047
3070
  return;
3048
3071
  }
3049
- if (u(b) && !u(y)) {
3050
- u(c).pause(), w(m, "Reading paused");
3072
+ if (Be() && c(m) && !c(R)) {
3073
+ c(u).pause(), b(A, "Reading paused");
3051
3074
  return;
3052
3075
  }
3053
- await Nr();
3076
+ if (!c(U)) {
3077
+ b(U, !0);
3078
+ try {
3079
+ if (b(A, "Initializing text-to-speech"), !await Dr()) {
3080
+ b(A, "Unable to initialize text-to-speech. Try again.");
3081
+ return;
3082
+ }
3083
+ const v = String(c(u).getState?.() || "");
3084
+ (v === "playing" || v === "paused" || v === "loading") && !Be() && c(u).stop(), Lr(), await Hr();
3085
+ } finally {
3086
+ b(U, !1);
3087
+ }
3088
+ }
3054
3089
  }
3055
3090
  }
3056
- function Mr() {
3057
- u(c) && (u(c).stop(), w(g, !1), w(m, "Reading stopped"), u(p) && u(p).clearTTS());
3091
+ function jr() {
3092
+ c(u) && (c(u).stop(), _n(), pn("Reading stopped"), c(g) && c(g).clearTTS());
3058
3093
  }
3059
- async function Ir() {
3060
- if (!(!u(c) || !u(b)))
3094
+ async function Ur() {
3095
+ if (!(!c(u) || !c(m)))
3061
3096
  try {
3062
- await u(c).seekForward?.(1), w(m, "Skipped forward");
3063
- } catch (_) {
3064
- console.error("[TTS Inline] Seek forward failed:", _), w(m, "Unable to skip forward");
3097
+ await c(u).seekForward?.(1), b(A, "Skipped forward");
3098
+ } catch (v) {
3099
+ console.error("[TTS Inline] Seek forward failed:", v), b(A, "Unable to skip forward");
3065
3100
  }
3066
3101
  }
3067
- async function Pr() {
3068
- if (!(!u(c) || !u(b)))
3102
+ async function qr() {
3103
+ if (!(!c(u) || !c(m)))
3069
3104
  try {
3070
- await u(c).seekBackward?.(1), w(m, "Skipped backward");
3071
- } catch (_) {
3072
- console.error("[TTS Inline] Seek backward failed:", _), w(m, "Unable to skip backward");
3105
+ await c(u).seekBackward?.(1), b(A, "Skipped backward");
3106
+ } catch (v) {
3107
+ console.error("[TTS Inline] Seek backward failed:", v), b(A, "Unable to skip backward");
3073
3108
  }
3074
3109
  }
3075
- async function Lr(_) {
3076
- if (!u(c)) return;
3077
- const $ = u(O) === _ ? 1 : _;
3078
- w(O, $, !0), await u(c).updateSettings({ rate: $ }), w(
3079
- m,
3080
- $ === 1 ? "Playback speed reset to 1x" : `Playback speed ${$}x`,
3110
+ async function Yr(v) {
3111
+ if (!c(u)) return;
3112
+ const w = c(F) === v ? 1 : v;
3113
+ b(F, w, !0), await c(u).updateSettings({ rate: w }), b(
3114
+ A,
3115
+ w === 1 ? "Playback speed reset to 1x" : `Playback speed ${w}x`,
3081
3116
  !0
3082
3117
  );
3083
3118
  }
3084
- const Dr = /* @__PURE__ */ ot(() => i() === "sm" ? "pie-tool-tts-inline__trigger--sm" : i() === "lg" ? "pie-tool-tts-inline__trigger--lg" : "pie-tool-tts-inline__trigger--md");
3085
- var Fr = {
3119
+ const Wr = /* @__PURE__ */ st(() => i() === "sm" ? "pie-tool-tts-inline__trigger--sm" : i() === "lg" ? "pie-tool-tts-inline__trigger--lg" : "pie-tool-tts-inline__trigger--md");
3120
+ var Kr = {
3086
3121
  get catalogId() {
3087
3122
  return n();
3088
3123
  },
3089
- set catalogId(_ = "") {
3090
- n(_), ft();
3124
+ set catalogId(v = "") {
3125
+ n(v), ft();
3091
3126
  },
3092
3127
  get language() {
3093
3128
  return r();
3094
3129
  },
3095
- set language(_ = "en-US") {
3096
- r(_), ft();
3130
+ set language(v = "en-US") {
3131
+ r(v), ft();
3097
3132
  },
3098
3133
  get size() {
3099
3134
  return i();
3100
3135
  },
3101
- set size(_ = "md") {
3102
- i(_), ft();
3136
+ set size(v = "md") {
3137
+ i(v), ft();
3103
3138
  },
3104
3139
  get speedOptions() {
3105
3140
  return s();
3106
3141
  },
3107
- set speedOptions(_ = [1.5, 2]) {
3108
- s(_), ft();
3142
+ set speedOptions(v = [1.5, 2]) {
3143
+ s(v), ft();
3109
3144
  }
3110
- }, hn = cs(), Br = Ji(hn);
3145
+ }, wn = gs(), Gr = ns(wn);
3111
3146
  {
3112
- var Hr = (_) => {
3113
- var $ = Ds(), A = Ue($);
3114
- let vn;
3115
- var _n = Ve(A, 2);
3147
+ var Jr = (v) => {
3148
+ var w = js(), x = Ve(w);
3149
+ let mt;
3150
+ var Lt = Ve(x);
3116
3151
  {
3117
- var jr = (tt) => {
3118
- var nt = Ls(), he = Ue(nt), Vr = Ue(he);
3119
- {
3120
- var qr = (F) => {
3121
- var Q = Os();
3122
- we(F, Q);
3123
- }, Yr = (F) => {
3124
- var Q = Ms();
3125
- we(F, Q);
3126
- }, Kr = (F) => {
3127
- var Q = Is();
3128
- we(F, Q);
3129
- };
3130
- Lt(Vr, (F) => {
3131
- u(y) ? F(qr) : u(b) ? F(Yr, 1) : F(Kr, -1);
3132
- });
3133
- }
3134
- je(he);
3135
- var rt = Ve(he, 2), it = Ve(rt, 2), st = Ve(it, 2), Wr = Ve(st, 2);
3136
- ms(Wr, 18, () => u(oe), (F) => F, (F, Q, gn) => {
3137
- var le = Ps();
3138
- let mn;
3139
- var wn = Ue(le), Gr = Ue(wn);
3140
- je(wn), je(le), Pt(() => {
3141
- mn = Cn(le, 1, "pie-tool-tts-inline__control pie-tool-tts-inline__control--speed svelte-18mzc0g", null, mn, {
3142
- "pie-tool-tts-inline__control--speed-active": u(O) === Q
3143
- }), ee(le, "tabindex", u(k) === ke + u(gn) ? 0 : -1), ee(le, "aria-label", `Speed ${Q}x`), ee(le, "aria-pressed", u(O) === Q), le.disabled = !u(c) || !u(R), An(Gr, `${Q ?? ""} x`);
3144
- }), ze("click", le, () => Lr(Q)), lt("focus", le, () => w(k, ke + u(gn))), we(F, le);
3145
- }), je(nt), Mn(nt, (F) => w(a, F), () => u(a)), Pt(() => {
3146
- ee(he, "tabindex", u(k) === 0 ? 0 : -1), ee(he, "aria-label", u(y) ? "Resume reading" : u(b) ? "Pause reading" : "Read aloud"), ee(he, "aria-pressed", u(b)), he.disabled = !u(c) || !u(R), ee(rt, "tabindex", u(k) === 1 ? 0 : -1), rt.disabled = !u(c) || !u(R) || !u(b) && !u(y), ee(it, "tabindex", u(k) === 2 ? 0 : -1), it.disabled = !u(c) || !u(R) || !u(b), ee(st, "tabindex", u(k) === 3 ? 0 : -1), st.disabled = !u(c) || !u(R) || !u(b);
3147
- }), ze("keydown", nt, Mt), ze("click", he, Or), lt("focus", he, () => w(k, 0)), ze("click", rt, Mr), lt("focus", rt, () => w(k, 1)), ze("click", it, Ir), lt("focus", it, () => w(k, 2)), ze("click", st, Pr), lt("focus", st, () => w(k, 3)), we(tt, nt);
3152
+ var Xr = (G) => {
3153
+ var he = Fs();
3154
+ ke(G, he);
3155
+ }, Zr = (G) => {
3156
+ var he = Bs();
3157
+ ke(G, he);
3158
+ };
3159
+ Ft(Lt, (G) => {
3160
+ c(m) && !c(R) ? G(Xr) : G(Zr, -1);
3161
+ });
3162
+ }
3163
+ He(x);
3164
+ var mn = ot(x, 2);
3165
+ {
3166
+ var Qr = (G) => {
3167
+ var he = Vs(), yn = Ve(he);
3168
+ Ss(yn, 18, () => c(N), (rt) => rt, (rt, it, $n) => {
3169
+ var le = Hs();
3170
+ let En;
3171
+ var Sn = Ve(le), ti = Ve(Sn);
3172
+ He(Sn), He(le), Dt(() => {
3173
+ En = Pn(le, 1, "pie-tool-tts-inline__control pie-tool-tts-inline__control--speed svelte-18mzc0g", null, En, {
3174
+ "pie-tool-tts-inline__control--speed-active": c(F) === it
3175
+ }), xe(le, "tabindex", c(I) === c($n) ? 0 : -1), xe(le, "aria-label", `Speed ${it}x`), xe(le, "aria-pressed", c(F) === it), le.disabled = !c(u), Nn(ti, `${it ?? ""}x`);
3176
+ }), je("click", le, () => Yr(it)), $t("focus", le, () => b(I, c($n), !0)), ke(rt, le);
3177
+ });
3178
+ var tt = ot(yn, 2), nt = ot(tt, 2), bt = ot(nt, 2);
3179
+ He(he), Fn(he, (rt) => b(d, rt), () => c(d)), Dt(() => {
3180
+ xe(tt, "tabindex", c(I) === c(N).length ? 0 : -1), tt.disabled = !c(u) || !c(m), xe(nt, "tabindex", c(I) === c(N).length + 1 ? 0 : -1), nt.disabled = !c(u) || !c(m), xe(bt, "tabindex", c(I) === c(N).length + 2 ? 0 : -1), bt.disabled = !c(u) || !c(m) && !c(R);
3181
+ }), je("keydown", he, Fr), je("click", tt, qr), $t("focus", tt, () => b(I, c(N).length, !0)), je("click", nt, Ur), $t("focus", nt, () => b(I, c(N).length + 1)), je("click", bt, jr), $t("focus", bt, () => b(I, c(N).length + 2)), ke(G, he);
3148
3182
  };
3149
- Lt(_n, (tt) => {
3150
- u(g) && tt(jr);
3183
+ Ft(mn, (G) => {
3184
+ c(y) && G(Qr);
3151
3185
  });
3152
3186
  }
3153
- var pn = Ve(_n, 2), Ur = Ue(pn, !0);
3154
- je(pn), je($), Mn($, (tt) => w(l, tt), () => u(l)), Pt(() => {
3155
- vn = Cn(A, 1, `pie-tool-tts-inline__trigger ${u(Dr) ?? ""}`, "svelte-18mzc0g", vn, { "pie-tool-tts-inline__trigger--active": u(g) }), ee(A, "aria-label", u(g) ? "Close reading controls" : "Open reading controls"), ee(A, "aria-expanded", u(g)), A.disabled = !u(c) || !u(R), An(Ur, u(m));
3156
- }), ze("click", A, It), we(_, $);
3187
+ var bn = ot(mn, 2), ei = Ve(bn, !0);
3188
+ He(bn), He(w), Fn(w, (G) => b(f, G), () => c(f)), Dt(() => {
3189
+ mt = Pn(x, 1, `pie-tool-tts-inline__trigger ${c(Wr) ?? ""}`, "svelte-18mzc0g", mt, {
3190
+ "pie-tool-tts-inline__trigger--active": c(y)
3191
+ }), xe(x, "aria-label", c(m) && !c(R) ? "Pause reading" : c(R) ? "Resume reading" : "Play reading"), x.disabled = !c(u) || c(U), Nn(ei, c(A));
3192
+ }), je("click", x, Vr), ke(v, w);
3157
3193
  };
3158
- Lt(Br, (_) => {
3159
- o && _(Hr);
3194
+ Ft(Gr, (v) => {
3195
+ o && v(Jr);
3160
3196
  });
3161
3197
  }
3162
- return we(e, hn), qn(Fr);
3198
+ return ke(e, wn), Jn(Kr);
3163
3199
  }
3164
- ls(["click", "keydown"]);
3165
- customElements.define("pie-tool-tts-inline", Ns(
3166
- Bs,
3200
+ hs(["click", "keydown"]);
3201
+ customElements.define("pie-tool-tts-inline", Ds(
3202
+ qs,
3167
3203
  {
3168
3204
  catalogId: { attribute: "catalog-id", type: "String" },
3169
3205
  language: { attribute: "language", type: "String" },
@@ -3175,5 +3211,5 @@ customElements.define("pie-tool-tts-inline", Ns(
3175
3211
  { mode: "open" }
3176
3212
  ));
3177
3213
  export {
3178
- Bs as default
3214
+ qs as default
3179
3215
  };