@pie-players/pie-tool-calculator-inline-desmos 0.3.72 → 0.3.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,13 @@
1
- import { ZIndexLayer as an, connectToolRuntimeContext as sn, toOverlayToolId as on } from "@pie-players/pie-assessment-toolkit";
1
+ import { connectToolRuntimeContext as Wr, connectToolShellContext as Xr, createScopedToolId as Zr } from "@pie-players/pie-assessment-toolkit";
2
+ import { resolveInterfaceI18n as Jr } from "@pie-players/pie-players-shared/i18n/provider";
2
3
  typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
3
- var ye = {}, x = /* @__PURE__ */ Symbol("uninitialized");
4
- var ln = "http://www.w3.org/1999/xhtml", cn = Array.isArray, un = Array.prototype.indexOf, Je = Array.prototype.includes, fn = Array.from, Qe = Object.keys, Re = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, dn = Object.getOwnPropertyDescriptors, hn = Object.prototype, vn = Array.prototype, nr = Object.getPrototypeOf, Ht = Object.isExtensible, pn = () => {
4
+ var we = {}, A = /* @__PURE__ */ Symbol("uninitialized");
5
+ var Qr = "http://www.w3.org/1999/xhtml", en = Array.isArray, tn = Array.prototype.indexOf, Ge = Array.prototype.includes, rn = Array.from, Ke = Object.keys, Ce = Object.defineProperty, de = Object.getOwnPropertyDescriptor, nn = Object.getOwnPropertyDescriptors, sn = Object.prototype, an = Array.prototype, Xt = Object.getPrototypeOf, Lt = Object.isExtensible, ln = () => {
5
6
  };
6
- function _n(e) {
7
+ function on(e) {
7
8
  for (var t = 0; t < e.length; t++) e[t]();
8
9
  }
9
- function ir() {
10
+ function Zt() {
10
11
  var e, t;
11
12
  return {
12
13
  promise: new Promise((r, n) => {
@@ -16,48 +17,48 @@ function ir() {
16
17
  reject: t
17
18
  };
18
19
  }
19
- var ha = 1 << 24, U = 1024, N = 2048, de = 4096, St = 8192, gn = 16384, At = 32768, Ut = 1 << 25, kt = 65536, va = 1 << 17, pa = 1 << 18, Se = 1 << 19, mn = 1 << 20, De = 65536, zt = 1 << 21, yn = 1 << 22, Ze = 1 << 23, Te = /* @__PURE__ */ Symbol("$state"), ar = /* @__PURE__ */ Symbol("component"), sr = /* @__PURE__ */ Symbol("legacy props"), wn = /* @__PURE__ */ Symbol(""), bn = /* @__PURE__ */ Symbol("proxy path"), or = /* @__PURE__ */ Symbol("attributes"), ht = /* @__PURE__ */ Symbol("class"), Sn = /* @__PURE__ */ Symbol("style"), vt = /* @__PURE__ */ Symbol("text");
20
- var Ne = new class extends Error {
20
+ var Zi = 1 << 24, P = 1024, H = 2048, ve = 4096, mt = 8192, fn = 16384, yt = 32768, qt = 1 << 25, wt = 65536, Ji = 1 << 17, Qi = 1 << 18, ke = 1 << 19, un = 1 << 20, Ht = 1 << 21, cn = 1 << 22, We = 1 << 23, Se = /* @__PURE__ */ Symbol("$state"), Jt = /* @__PURE__ */ Symbol("component"), Qt = /* @__PURE__ */ Symbol("legacy props"), dn = /* @__PURE__ */ Symbol(""), hn = /* @__PURE__ */ Symbol("proxy path"), er = /* @__PURE__ */ Symbol("attributes"), ot = /* @__PURE__ */ Symbol("class"), vn = /* @__PURE__ */ Symbol("style"), ft = /* @__PURE__ */ Symbol("text");
21
+ var Le = new class extends Error {
21
22
  name = "StaleReactionError";
22
23
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
23
- }(), An = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
24
- function kn() {
24
+ }(), _n = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
25
+ function pn() {
25
26
  console.warn("https://svelte.dev/e/derived_inert");
26
27
  }
27
- function rt(e) {
28
+ function Qe(e) {
28
29
  console.warn("https://svelte.dev/e/hydration_mismatch");
29
30
  }
30
- function $n() {
31
+ function gn() {
31
32
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
32
33
  }
33
34
  var k = !1;
34
- function pe(e) {
35
+ function ge(e) {
35
36
  k = e;
36
37
  }
37
- var b;
38
- function G(e) {
38
+ var w;
39
+ function U(e) {
39
40
  if (e === null)
40
- throw rt(), ye;
41
- return b = e;
41
+ throw Qe(), we;
42
+ return w = e;
42
43
  }
43
- function $t() {
44
- return G(/* @__PURE__ */ se(b));
44
+ function bt() {
45
+ return U(/* @__PURE__ */ se(w));
45
46
  }
46
- function lr(e) {
47
+ function tr(e) {
47
48
  if (k) {
48
- if (/* @__PURE__ */ se(b) !== null)
49
- throw rt(), ye;
50
- b = e;
49
+ if (/* @__PURE__ */ se(w) !== null)
50
+ throw Qe(), we;
51
+ w = e;
51
52
  }
52
53
  }
53
- function Tn(e = 1) {
54
+ function mn(e = 1) {
54
55
  if (k) {
55
- for (var t = e, r = b; t--; ) r = /* @__PURE__ */ se(r);
56
- b = r;
56
+ for (var t = e, r = w; t--; ) r = /* @__PURE__ */ se(r);
57
+ w = r;
57
58
  }
58
59
  }
59
- function cr(e = !0) {
60
- for (var t = 0, r = b; ; ) {
60
+ function rr(e = !0) {
61
+ for (var t = 0, r = w; ; ) {
61
62
  if (r.nodeType === 8) {
62
63
  var n = r.data;
63
64
  if (n === "]") {
@@ -69,299 +70,285 @@ function cr(e = !0) {
69
70
  e && r.remove(), r = i;
70
71
  }
71
72
  }
72
- function En(e) {
73
+ function yn(e) {
73
74
  if (!e || e.nodeType !== 8)
74
- throw rt(), ye;
75
+ throw Qe(), we;
75
76
  return e.data;
76
77
  }
77
- function ur(e) {
78
+ function nr(e) {
78
79
  return e === this.v;
79
80
  }
80
- function xn(e, t) {
81
+ function wn(e, t) {
81
82
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
82
83
  }
83
- function fr(e) {
84
- return !xn(e, this.v);
84
+ function ir(e) {
85
+ return !wn(e, this.v);
85
86
  }
86
- function Pn() {
87
+ function bn() {
87
88
  throw new Error("https://svelte.dev/e/async_derived_orphan");
88
89
  }
89
- function Rn(e) {
90
+ function $n(e) {
90
91
  throw new Error("https://svelte.dev/e/effect_in_teardown");
91
92
  }
92
- function Mn() {
93
+ function kn() {
93
94
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
94
95
  }
95
- function Ln(e) {
96
+ function Tn(e) {
96
97
  throw new Error("https://svelte.dev/e/effect_orphan");
97
98
  }
98
- function Cn() {
99
+ function En() {
99
100
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
100
101
  }
101
- function In() {
102
+ function xn() {
102
103
  throw new Error("https://svelte.dev/e/hydration_failed");
103
104
  }
104
- function Dn(e) {
105
+ function Sn(e) {
105
106
  throw new Error("https://svelte.dev/e/props_invalid_value");
106
107
  }
107
- function Nn() {
108
+ function An() {
108
109
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
109
110
  }
110
111
  function On() {
111
112
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
112
113
  }
113
- function Fn() {
114
+ function Mn() {
114
115
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
115
116
  }
116
- function Hn() {
117
+ function Rn() {
117
118
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
118
119
  }
119
- var ne = !1, nt = !1;
120
+ var le = !1, et = !1;
120
121
  function jt(e, t) {
121
- return e.label = t, Un(e.v, t), e;
122
+ return e.label = t, Cn(e.v, t), e;
122
123
  }
123
- function Un(e, t) {
124
- return e?.[bn]?.(t), e;
124
+ function Cn(e, t) {
125
+ return e?.[hn]?.(t), e;
125
126
  }
126
- var E = null;
127
- function we(e) {
128
- E = e;
127
+ var S = null;
128
+ function be(e) {
129
+ S = e;
129
130
  }
130
- function Tt(e, t = !1, r) {
131
- E = {
132
- p: E,
131
+ function $t(e, t = !1, r) {
132
+ S = {
133
+ p: S,
133
134
  i: !1,
134
135
  c: null,
135
136
  e: null,
136
137
  s: e,
137
138
  x: null,
138
- r: g,
139
- l: nt && !t ? {
139
+ r: p,
140
+ l: et && !t ? {
140
141
  s: null,
141
142
  u: null,
142
143
  $: []
143
144
  } : null
144
145
  };
145
146
  }
146
- function Et(e) {
147
- var t = E, r = t.e;
147
+ function kt(e) {
148
+ var t = S, r = t.e;
148
149
  if (r !== null) {
149
150
  t.e = null;
150
- for (var n of r) xr(n);
151
+ for (var n of r) wr(n);
151
152
  }
152
- return e !== void 0 && (t.x = e), t.i = !0, E = t.p, xt(e);
153
+ return e !== void 0 && (t.x = e), t.i = !0, S = t.p, Tt(e);
153
154
  }
154
- function xt(e = {}) {
155
- return Re(e, ar, { value: !0 }), e;
155
+ function Tt(e = {}) {
156
+ return Ce(e, Jt, { value: !0 }), e;
156
157
  }
157
- function Oe() {
158
- return !nt || E !== null && E.l === null;
158
+ function qe() {
159
+ return !et || S !== null && S.l === null;
159
160
  }
160
- var oe = [];
161
- function dr() {
162
- var e = oe;
163
- oe = [], _n(e);
161
+ var fe = [];
162
+ function sr() {
163
+ var e = fe;
164
+ fe = [], on(e);
164
165
  }
165
- function le(e) {
166
- if (oe.length === 0 && !Ee) {
167
- var t = oe;
166
+ function ue(e) {
167
+ if (fe.length === 0 && !Ae) {
168
+ var t = fe;
168
169
  queueMicrotask(() => {
169
- t === oe && dr();
170
+ t === fe && sr();
170
171
  });
171
172
  }
172
- oe.push(e);
173
- }
174
- function zn() {
175
- for (; oe.length > 0; ) dr();
176
- }
177
- var jn = ~(N | de | U);
178
- function $(e, t) {
179
- e.f = e.f & jn | t;
173
+ fe.push(e);
180
174
  }
181
- function Pt(e) {
182
- (e.f & 512) !== 0 || e.deps === null ? $(e, U) : $(e, de);
175
+ function In() {
176
+ for (; fe.length > 0; ) sr();
183
177
  }
184
- function hr(e) {
185
- if (e !== null)
186
- for (const t of e)
187
- (t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= De, hr(t.deps));
178
+ var Nn = ~(H | ve | P);
179
+ function E(e, t) {
180
+ e.f = e.f & Nn | t;
188
181
  }
189
- function vr(e, t, r) {
190
- (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), hr(e.deps), $(e, U);
182
+ function Et(e) {
183
+ (e.f & 512) !== 0 || e.deps === null ? E(e, P) : E(e, ve);
191
184
  }
192
- var Bn = !1, ze = !1;
193
- function Vn(e) {
194
- var t = ze;
195
- try {
196
- return ze = !1, [e(), ze];
197
- } finally {
198
- ze = t;
199
- }
185
+ function ar(e, t, r) {
186
+ (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), E(e, P);
200
187
  }
201
- function it(e) {
202
- var t = y, r = g;
203
- z(null), Z(null);
188
+ function tt(e) {
189
+ var t = y, r = p;
190
+ V(null), W(null);
204
191
  try {
205
192
  return e();
206
193
  } finally {
207
- z(t), Z(r);
194
+ V(t), W(r);
208
195
  }
209
196
  }
210
- function qn(e, t, r, n) {
211
- const i = Oe() ? Me : _r;
212
- var a = e.filter((c) => !c.settled), o = t.map(i);
213
- if (r.length === 0 && a.length === 0) {
214
- n(o);
197
+ function Ln(e, t, r, n) {
198
+ const i = qe() ? Ie : or;
199
+ var s = e.filter((o) => !o.settled), l = t.map(i);
200
+ if (r.length === 0 && s.length === 0) {
201
+ n(l);
215
202
  return;
216
203
  }
217
- var s = g, l = Gn(), h = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((c) => c.promise)) : null;
218
- function _(c) {
219
- if ((s.f & 16384) === 0) {
220
- l();
204
+ var a = p, c = qn(), v = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((o) => o.promise)) : null;
205
+ function g(o) {
206
+ if ((a.f & 16384) === 0) {
207
+ c();
221
208
  try {
222
- n([...o, ...c]);
209
+ n([...l, ...o]);
223
210
  } catch (d) {
224
- W(d, s);
211
+ Y(d, a);
225
212
  }
226
213
  Xe();
227
214
  }
228
215
  }
229
- var f = pr();
216
+ var u = lr();
230
217
  if (r.length === 0) {
231
- h.then(() => _([])).finally(f);
218
+ v.then(() => g([])).finally(u);
232
219
  return;
233
220
  }
234
- function u() {
235
- Promise.all(r.map((c) => /* @__PURE__ */ Wn(c))).then(_).catch((c) => W(c, s)).finally(f);
221
+ function f() {
222
+ Promise.all(r.map((o) => /* @__PURE__ */ jn(o))).then(g).catch((o) => Y(o, a)).finally(u);
236
223
  }
237
- h ? h.then(() => {
238
- l(), u(), Xe();
239
- }) : u();
224
+ v ? v.then(() => {
225
+ c(), f(), Xe();
226
+ }) : f();
240
227
  }
241
- function Gn() {
242
- var e = g, t = y, r = E, n = m;
228
+ function qn() {
229
+ var e = p, t = y, r = S, n = m;
243
230
  if (0) var i;
244
- return function(o = !0) {
245
- Z(e), z(t), we(r), o && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
231
+ return function(l = !0) {
232
+ W(e), V(t), be(r), l && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
246
233
  };
247
234
  }
248
- var Yn = !1;
235
+ var Hn = !1;
249
236
  function Xe(e = !0) {
250
- Yn = !1, Z(null), z(null), we(null), e && m?.deactivate();
237
+ Hn = !1, W(null), V(null), be(null), e && m?.deactivate();
251
238
  }
252
- function pr() {
253
- var e = g, t = e.b, r = m, n = !!t?.is_rendered();
239
+ function lr() {
240
+ var e = p, t = e.b, r = m, n = !!t?.is_rendered();
254
241
  return t?.update_pending_count(1, r), r.increment(n, e), () => {
255
242
  t?.update_pending_count(-1, r), r.decrement(n, e);
256
243
  };
257
244
  }
258
245
  // @__NO_SIDE_EFFECTS__
259
- function Me(e) {
260
- var t = 2 | N;
261
- return g !== null && (g.f |= Se), {
262
- ctx: E,
246
+ function Ie(e) {
247
+ var t = 2 | H;
248
+ return p !== null && (p.f |= ke), {
249
+ ctx: S,
263
250
  deps: null,
264
251
  effects: null,
265
- equals: ur,
252
+ equals: nr,
266
253
  f: t,
267
254
  fn: e,
268
255
  reactions: null,
269
256
  rv: 0,
270
- v: x,
257
+ v: A,
271
258
  wv: 0,
272
- parent: g,
259
+ parent: p,
273
260
  ac: null
274
261
  };
275
262
  }
276
- var ke = /* @__PURE__ */ Symbol("obsolete");
263
+ var Ee = /* @__PURE__ */ Symbol("obsolete");
277
264
  // @__NO_SIDE_EFFECTS__
278
- function Wn(e, t, r) {
279
- let n = g;
280
- n === null && Pn();
281
- var i = void 0, a = Fe(x), o = !y, s = /* @__PURE__ */ new Set();
282
- return pi(() => {
283
- var l = g, h = ir();
284
- i = h.promise;
265
+ function jn(e, t, r) {
266
+ let n = p;
267
+ n === null && bn();
268
+ var i = void 0, s = He(A), l = !y, a = /* @__PURE__ */ new Set();
269
+ return si(() => {
270
+ var c = p, v = Zt();
271
+ i = v.promise;
285
272
  try {
286
- Promise.resolve(e()).then(h.resolve, (c) => {
287
- c !== Ne && h.reject(c);
273
+ Promise.resolve(e()).then(v.resolve, (o) => {
274
+ o !== Le && v.reject(o);
288
275
  }).finally(Xe);
289
- } catch (c) {
290
- h.reject(c), Xe();
291
- }
292
- var _ = m;
293
- if (o) {
294
- if ((l.f & 32768) !== 0) var f = pr();
295
- if (n.b?.is_rendered()) _.async_deriveds.get(l)?.reject(ke);
296
- else for (const c of s.values()) c.reject(ke);
297
- s.add(h), _.async_deriveds.set(l, h);
298
- }
299
- const u = (c, d = void 0) => {
300
- f?.(), s.delete(h), d !== ke && (_.activate(), d ? (a.f |= Ze, tt(a, d)) : ((a.f & 8388608) !== 0 && (a.f ^= Ze), tt(a, c)), _.deactivate());
276
+ } catch (o) {
277
+ v.reject(o), Xe();
278
+ }
279
+ var g = m;
280
+ if (l) {
281
+ if ((c.f & 32768) !== 0) var u = lr();
282
+ if (n.b?.is_rendered()) g.async_deriveds.get(c)?.reject(Ee);
283
+ else for (const o of a.values()) o.reject(Ee);
284
+ a.add(v), g.async_deriveds.set(c, v);
285
+ }
286
+ const f = (o, d = void 0) => {
287
+ u?.(), a.delete(v), d !== Ee && (g.activate(), d ? (s.f |= We, Je(s, d)) : ((s.f & 8388608) !== 0 && (s.f ^= We), Je(s, o)), g.deactivate());
301
288
  };
302
- h.promise.then(u, (c) => u(null, c || "unknown"));
303
- }), di(() => {
304
- for (const l of s) l.reject(ke);
305
- }), new Promise((l) => {
306
- function h(_) {
307
- function f() {
308
- _ === i ? l(a) : h(i);
289
+ v.promise.then(f, (o) => f(null, o || "unknown"));
290
+ }), ri(() => {
291
+ for (const c of a) c.reject(Ee);
292
+ }), new Promise((c) => {
293
+ function v(g) {
294
+ function u() {
295
+ g === i ? c(s) : v(i);
309
296
  }
310
- _.then(f, f);
297
+ g.then(u, u);
311
298
  }
312
- h(i);
299
+ v(i);
313
300
  });
314
301
  }
315
302
  // @__NO_SIDE_EFFECTS__
316
- function te(e) {
317
- const t = /* @__PURE__ */ Me(e);
318
- return ne || Nr(t), t;
303
+ function ee(e) {
304
+ const t = /* @__PURE__ */ Ie(e);
305
+ return le || Ar(t), t;
319
306
  }
320
307
  // @__NO_SIDE_EFFECTS__
321
- function _r(e) {
322
- const t = /* @__PURE__ */ Me(e);
323
- return t.equals = fr, t;
308
+ function or(e) {
309
+ const t = /* @__PURE__ */ Ie(e);
310
+ return t.equals = ir, t;
324
311
  }
325
- function Kn(e) {
312
+ function Pn(e) {
326
313
  var t = e.effects;
327
314
  if (t !== null) {
328
315
  e.effects = null;
329
- for (var r = 0; r < t.length; r += 1) C(t[r]);
316
+ for (var r = 0; r < t.length; r += 1) N(t[r]);
330
317
  }
331
318
  }
332
- function Rt(e) {
333
- var t, r = g, n = e.parent;
334
- if (!ae && n !== null && e.v !== x && (n.f & 24576) !== 0)
335
- return kn(), e.v;
336
- Z(n);
319
+ function xt(e) {
320
+ var t, r = p, n = e.parent;
321
+ if (!ie && n !== null && e.v !== A && (n.f & 24576) !== 0)
322
+ return pn(), e.v;
323
+ W(n);
337
324
  try {
338
- e.f &= ~De, Kn(e), t = Ur(e);
325
+ Pn(e), t = Cr(e);
339
326
  } finally {
340
- Z(r);
327
+ W(r);
341
328
  }
342
329
  return t;
343
330
  }
344
- function gr(e) {
345
- var t = Rt(e);
346
- if (!e.equals(t) && (e.wv = Fr(), (!m?.is_fork || e.deps === null) && (m !== null ? (m.capture(e, t, !0), pt?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
347
- $(e, U);
331
+ function fr(e) {
332
+ var t = xt(e);
333
+ if (!e.equals(t) && (e.wv = Mr(), (!m?.is_fork || e.deps === null) && (m !== null ? (m.capture(e, t, !0), ut?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
334
+ E(e, P);
348
335
  return;
349
336
  }
350
- ae || (R !== null ? (Dt() || m?.is_fork) && R.set(e, t) : Pt(e));
337
+ ie || (R !== null ? (Rt() || m?.is_fork) && R.set(e, t) : Et(e));
351
338
  }
352
- function Jn(e) {
339
+ function Vn(e) {
353
340
  if (e.effects !== null)
354
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && it(() => {
355
- t.ac.abort(Ne), t.ac = null;
356
- }), t.fn !== null && (t.teardown = pn), Le(t, 0), Ot(t));
341
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && tt(() => {
342
+ t.ac.abort(Le), t.ac = null;
343
+ }), t.fn !== null && (t.teardown = ln), Ne(t, 0), It(t));
357
344
  }
358
- function mr(e) {
345
+ function ur(e) {
359
346
  if (e.effects !== null)
360
- for (const t of e.effects) t.teardown && t.fn !== null && be(t);
347
+ for (const t of e.effects) t.teardown && t.fn !== null && $e(t);
361
348
  }
362
- var je = null, ve = null, m = null, pt = null, R = null, _t = null, Ee = !1, st = !1, _e = null, Ge = null, Bt = 0;
363
- var Qn = 1, Ae = class gt {
364
- id = Qn++;
349
+ var Ve = null, pe = null, m = null, ut = null, R = null, ct = null, Ae = !1, nt = !1, Oe = null, Ue = null, Pt = 0;
350
+ var Dn = 1, Te = class dt {
351
+ id = Dn++;
365
352
  #e = !1;
366
353
  linked = !0;
367
354
  #t = null;
@@ -369,23 +356,23 @@ var Qn = 1, Ae = class gt {
369
356
  async_deriveds = /* @__PURE__ */ new Map();
370
357
  current = /* @__PURE__ */ new Map();
371
358
  previous = /* @__PURE__ */ new Map();
372
- #l = /* @__PURE__ */ new Set();
359
+ #o = /* @__PURE__ */ new Set();
373
360
  #i = /* @__PURE__ */ new Set();
374
- #s = 0;
361
+ #a = 0;
375
362
  #n = /* @__PURE__ */ new Map();
376
- #o = null;
377
- #a = [];
378
- #p = [];
379
- #c = /* @__PURE__ */ new Set();
363
+ #l = null;
364
+ #s = [];
365
+ #v = [];
366
+ #f = /* @__PURE__ */ new Set();
380
367
  #u = /* @__PURE__ */ new Set();
381
368
  #d = /* @__PURE__ */ new Map();
382
- #_ = /* @__PURE__ */ new Set();
369
+ #p = /* @__PURE__ */ new Set();
383
370
  is_fork = !1;
384
- #f = !1;
371
+ #c = !1;
385
372
  constructor() {
386
- ve === null ? je = ve = this : (ve.#r = this, this.#t = ve), ve = this;
373
+ pe === null ? Ve = pe = this : (pe.#r = this, this.#t = pe), pe = this;
387
374
  }
388
- #y() {
375
+ #w() {
389
376
  if (this.is_fork) return !0;
390
377
  for (const n of this.#n.keys()) {
391
378
  for (var t = n, r = !1; t.parent !== null; ) {
@@ -403,82 +390,102 @@ var Qn = 1, Ae = class gt {
403
390
  this.#d.has(t) || this.#d.set(t, {
404
391
  d: [],
405
392
  m: []
406
- }), this.#_.delete(t);
393
+ }), this.#p.delete(t);
407
394
  }
408
395
  unskip_effect(t, r = (n) => this.schedule(n)) {
409
396
  var n = this.#d.get(t);
410
397
  if (n) {
411
398
  this.#d.delete(t);
412
399
  for (var i of n.d)
413
- $(i, N), r(i);
400
+ E(i, H), r(i);
414
401
  for (i of n.m)
415
- $(i, de), r(i);
402
+ E(i, ve), r(i);
416
403
  }
417
- this.#_.add(t);
404
+ this.#p.add(t);
405
+ }
406
+ #b() {
407
+ var t = [];
408
+ for (const s of this.#s)
409
+ if (!((s.f & 16384) !== 0 || (s.f & 6144) === 0)) {
410
+ for (var r = s, n = !1; r.parent !== null; ) {
411
+ r = r.parent;
412
+ var i = r.f;
413
+ if ((i & 96) !== 0) {
414
+ if ((i & 1024) === 0) {
415
+ n = !0;
416
+ break;
417
+ }
418
+ r.f ^= P;
419
+ }
420
+ }
421
+ n || t.push(r);
422
+ }
423
+ return this.#s = [], t;
418
424
  }
419
425
  #g() {
420
- this.#e = !0, Bt++ > 1e3 && (this.#v(), Zn());
421
- for (const l of this.#c)
422
- this.#u.delete(l), $(l, N), this.schedule(l);
423
- for (const l of this.#u)
424
- $(l, de), this.schedule(l);
425
- const t = this.#a;
426
- this.#a = [], this.apply();
427
- var r = _e = [], n = [], i = Ge = [];
428
- for (const l of t) try {
429
- this.#w(l, r, n);
430
- } catch (h) {
431
- throw br(l), this.#y() || this.discard(), h;
432
- }
433
- if (m = null, i.length > 0) {
434
- var a = gt.ensure();
435
- for (const l of i) a.schedule(l);
436
- }
437
- if (_e = null, Ge = null, this.#y()) {
438
- this.#h(n), this.#h(r);
439
- for (const [l, h] of this.#d) wr(l, h);
440
- i.length > 0 && m.#g();
426
+ this.#e = !0;
427
+ for (const a of this.#f)
428
+ this.#u.delete(a), E(a, H), this.schedule(a);
429
+ for (const a of this.#u)
430
+ E(a, ve), this.schedule(a);
431
+ this.apply();
432
+ for (var t = Oe = [], r = [], n = Ue = []; this.#s.length > 0; ) {
433
+ Pt++ > 1e3 && (this.#_(), Bn());
434
+ for (const a of this.#b()) try {
435
+ this.#m(a, t, r);
436
+ } catch (c) {
437
+ throw hr(a), this.#w() || this.discard(), c;
438
+ }
439
+ }
440
+ if (m = null, n.length > 0) {
441
+ var i = dt.ensure();
442
+ for (const a of n) i.schedule(a);
443
+ }
444
+ if (Oe = null, Ue = null, this.#w()) {
445
+ this.#h(r), this.#h(t);
446
+ for (const [a, c] of this.#d) dr(a, c);
447
+ n.length > 0 && m.#g();
441
448
  return;
442
449
  }
443
- const o = this.#b();
444
- if (o) {
445
- this.#h(n), this.#h(r), o.#S(this);
450
+ const s = this.#k();
451
+ if (s) {
452
+ this.#h(r), this.#h(t), s.#$(this);
446
453
  return;
447
454
  }
448
- this.#c.clear(), this.#u.clear();
449
- for (const l of this.#l) l(this);
450
- this.#l.clear(), pt = this, Vt(n), Vt(r), pt = null, this.#o?.resolve();
451
- var s = m;
452
- if (this.#s === 0 && (this.#a.length === 0 || s !== null) && (this.#v(), ne && (this.#m(), m = s)), this.#a.length > 0)
453
- if (s !== null) {
454
- const l = s;
455
- l.#a.push(...this.#a.filter((h) => !l.#a.includes(h)));
456
- } else s = this;
457
- s !== null && (J.clear(), s.#g());
458
- }
459
- #w(t, r, n) {
460
- t.f ^= U;
455
+ this.#f.clear(), this.#u.clear();
456
+ for (const a of this.#o) a(this);
457
+ this.#o.clear(), ut = this, Vt(r), Vt(t), ut = null, this.#l?.resolve();
458
+ var l = m;
459
+ if (this.#a === 0 && (this.#s.length === 0 || l !== null) && (this.#_(), le && (this.#y(), m = l)), this.#s.length > 0)
460
+ if (l !== null) {
461
+ for (const a of this.#s) l.#s.push(a);
462
+ this.#s = [];
463
+ } else l = this;
464
+ l !== null && (G.clear(), l.#g());
465
+ }
466
+ #m(t, r, n) {
467
+ t.f ^= P;
461
468
  for (var i = t.first; i !== null; ) {
462
- var a = i.f, o = (a & 96) !== 0;
463
- if (!(o && (a & 1024) !== 0 || (a & 8192) !== 0 || this.#d.has(i)) && i.fn !== null) {
464
- o ? i.f ^= U : (a & 4) !== 0 ? r.push(i) : ne && (a & 16777224) !== 0 ? n.push(i) : He(i) && ((a & 16) !== 0 && this.#u.add(i), be(i));
465
- var s = i.first;
466
- if (s !== null) {
467
- i = s;
469
+ var s = i.f, l = (s & 96) !== 0;
470
+ if (!(l && (s & 1024) !== 0 || (s & 8192) !== 0 || this.#d.has(i)) && i.fn !== null) {
471
+ l ? i.f ^= P : (s & 4) !== 0 ? r.push(i) : le && (s & 16777224) !== 0 ? n.push(i) : je(i) && ((s & 16) !== 0 && this.#u.add(i), $e(i));
472
+ var a = i.first;
473
+ if (a !== null) {
474
+ i = a;
468
475
  continue;
469
476
  }
470
477
  }
471
478
  for (; i !== null; ) {
472
- var l = i.next;
473
- if (l !== null) {
474
- i = l;
479
+ var c = i.next;
480
+ if (c !== null) {
481
+ i = c;
475
482
  break;
476
483
  }
477
484
  i = i.parent;
478
485
  }
479
486
  }
480
487
  }
481
- #b() {
488
+ #k() {
482
489
  for (var t = this.#t; t !== null; ) {
483
490
  if (!t.is_fork) {
484
491
  for (const [r, [, n]] of this.current) if (t.current.has(r) && !n) return t;
@@ -487,34 +494,34 @@ var Qn = 1, Ae = class gt {
487
494
  }
488
495
  return null;
489
496
  }
490
- #S(t) {
497
+ #$(t) {
491
498
  for (const [n, i] of t.current)
492
499
  !this.previous.has(n) && t.previous.has(n) && this.previous.set(n, t.previous.get(n)), this.current.set(n, i);
493
500
  for (const [n, i] of t.async_deriveds) {
494
- const a = this.async_deriveds.get(n);
495
- a && i.promise.then(a.resolve).catch(a.reject);
501
+ const s = this.async_deriveds.get(n);
502
+ s && i.promise.then(s.resolve).catch(s.reject);
496
503
  }
497
- t.async_deriveds.clear(), this.transfer_effects(t.#c, t.#u);
504
+ t.async_deriveds.clear(), this.transfer_effects(t.#f, t.#u);
498
505
  const r = (n) => {
499
506
  var i = n.reactions;
500
507
  if (i !== null && !((n.f & 2) !== 0 && (n.f & 6144) === 0))
501
- for (const s of i) {
502
- var a = s.f;
503
- if ((a & 2) !== 0) r(s);
508
+ for (const a of i) {
509
+ var s = a.f;
510
+ if ((s & 2) !== 0) r(a);
504
511
  else {
505
- var o = s;
506
- a & 4194320 && !this.async_deriveds.has(o) && (this.#u.delete(o), $(o, N), this.schedule(o));
512
+ var l = a;
513
+ s & 4194320 && !this.async_deriveds.has(l) && (this.#u.delete(l), E(l, H), this.schedule(l));
507
514
  }
508
515
  }
509
516
  };
510
517
  for (const n of this.current.keys()) r(n);
511
- this.oncommit(() => t.discard()), t.#v(), m = this, this.#g();
518
+ this.oncommit(() => t.discard()), t.#_(), m = this, this.#g();
512
519
  }
513
520
  #h(t) {
514
- for (var r = 0; r < t.length; r += 1) vr(t[r], this.#c, this.#u);
521
+ for (var r = 0; r < t.length; r += 1) ar(t[r], this.#f, this.#u);
515
522
  }
516
523
  capture(t, r, n = !1) {
517
- t.v !== x && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), R?.set(t, r)), this.is_fork || (t.v = r);
524
+ t.v !== A && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), R?.set(t, r)), this.is_fork || (t.v = r);
518
525
  }
519
526
  activate() {
520
527
  m = this;
@@ -524,110 +531,109 @@ var Qn = 1, Ae = class gt {
524
531
  }
525
532
  flush() {
526
533
  try {
527
- st = !0, m = this, this.#g();
534
+ nt = !0, m = this, this.#g();
528
535
  } finally {
529
- Bt = 0, _t = null, _e = null, Ge = null, st = !1, m = null, R = null, J.clear();
536
+ Pt = 0, ct = null, Oe = null, Ue = null, nt = !1, m = null, R = null, G.clear();
530
537
  }
531
538
  }
532
539
  discard() {
533
540
  for (const t of this.#i) t(this);
534
541
  this.#i.clear();
535
- for (const t of this.async_deriveds.values()) t.reject(ke);
536
- this.#v(), this.#o?.resolve();
542
+ for (const t of this.async_deriveds.values()) t.reject(Ee);
543
+ this.#_(), this.#l?.resolve();
537
544
  }
538
545
  register_created_effect(t) {
539
- this.#p.push(t);
540
- }
541
- #m() {
542
- for (let f = je; f !== null; f = f.#r) {
543
- var t = f.id < this.id, r = [];
544
- for (const [u, [c, d]] of this.current) {
545
- if (f.current.has(u)) {
546
- var n = f.current.get(u)[0];
547
- if (t && c !== n) f.current.set(u, [c, d]);
546
+ this.#v.push(t);
547
+ }
548
+ #y() {
549
+ for (let u = Ve; u !== null; u = u.#r) {
550
+ var t = u.id < this.id, r = [];
551
+ for (const [f, [o, d]] of this.current) {
552
+ if (u.current.has(f)) {
553
+ var n = u.current.get(f)[0];
554
+ if (t && o !== n) u.current.set(f, [o, d]);
548
555
  else continue;
549
556
  }
550
- r.push(u);
557
+ r.push(f);
551
558
  }
552
- if (t) for (const [u, c] of this.async_deriveds) {
553
- const d = f.async_deriveds.get(u);
554
- d && c.promise.then(d.resolve).catch(d.reject);
559
+ if (t) for (const [f, o] of this.async_deriveds) {
560
+ const d = u.async_deriveds.get(f);
561
+ d && o.promise.then(d.resolve).catch(d.reject);
555
562
  }
556
- var i = [...f.current.keys()].filter((u) => !f.current.get(u)[1]);
557
- if (!(!f.#e || i.length === 0)) {
558
- var a = i.filter((u) => !this.current.has(u));
559
- if (a.length === 0)
560
- t && f.discard();
563
+ var i = [...u.current.keys()].filter((f) => !u.current.get(f)[1]);
564
+ if (!(!u.#e || i.length === 0)) {
565
+ var s = i.filter((f) => !this.current.has(f));
566
+ if (s.length === 0)
567
+ t && u.discard();
561
568
  else if (r.length > 0) {
562
- if (t) for (const u of this.#_) f.unskip_effect(u, (c) => {
563
- (c.f & 4194320) !== 0 ? f.schedule(c) : f.#h([c]);
569
+ if (t) for (const f of this.#p) u.unskip_effect(f, (o) => {
570
+ (o.f & 4194320) !== 0 ? u.schedule(o) : u.#h([o]);
564
571
  });
565
- f.activate();
566
- var o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
567
- for (var l of r) yr(l, a, o, s);
568
- s = /* @__PURE__ */ new Map();
569
- var h = [...f.current].filter(([u, c]) => {
570
- const d = this.current.get(u);
571
- return d ? d[0] !== c[0] || d[1] !== c[1] : !0;
572
- }).map(([u]) => u);
573
- if (h.length > 0)
574
- for (const u of this.#p) (u.f & 155648) === 0 && Mt(u, h, s) && ((u.f & 4194320) !== 0 ? ($(u, N), f.schedule(u)) : f.#c.add(u));
575
- if (f.#a.length > 0 && !f.#f) {
576
- f.apply();
577
- for (var _ of f.#a) f.#w(_, [], []);
578
- f.#a = [];
572
+ u.activate();
573
+ var l = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
574
+ for (var c of r) cr(c, s, l, a);
575
+ a = /* @__PURE__ */ new Map();
576
+ var v = [...u.current].filter(([f, o]) => {
577
+ const d = this.current.get(f);
578
+ return d ? d[0] !== o[0] || d[1] !== o[1] : !0;
579
+ }).map(([f]) => f);
580
+ if (v.length > 0)
581
+ for (const f of this.#v) (f.f & 155648) === 0 && St(f, v, a) && ((f.f & 4194320) !== 0 ? (E(f, H), u.schedule(f)) : u.#f.add(f));
582
+ if (u.#s.length > 0 && !u.#c) {
583
+ u.apply();
584
+ for (var g of u.#b()) u.#m(g, [], []);
579
585
  }
580
- f.deactivate();
586
+ u.deactivate();
581
587
  }
582
588
  }
583
589
  }
584
590
  }
585
591
  increment(t, r) {
586
- if (this.#s += 1, t) {
592
+ if (this.#a += 1, t) {
587
593
  let n = this.#n.get(r) ?? 0;
588
594
  this.#n.set(r, n + 1);
589
595
  }
590
596
  }
591
597
  decrement(t, r) {
592
- if (this.#s -= 1, t) {
598
+ if (this.#a -= 1, t) {
593
599
  let n = this.#n.get(r) ?? 0;
594
600
  n === 1 ? this.#n.delete(r) : this.#n.set(r, n - 1);
595
601
  }
596
- this.#f || (this.#f = !0, le(() => {
597
- this.#f = !1, this.linked && this.flush();
602
+ this.#c || (this.#c = !0, ue(() => {
603
+ this.#c = !1, this.linked && this.flush();
598
604
  }));
599
605
  }
600
606
  transfer_effects(t, r) {
601
- for (const n of t) this.#c.add(n);
607
+ for (const n of t) this.#f.add(n);
602
608
  for (const n of r) this.#u.add(n);
603
609
  t.clear(), r.clear();
604
610
  }
605
611
  oncommit(t) {
606
- this.#l.add(t);
612
+ this.#o.add(t);
607
613
  }
608
614
  ondiscard(t) {
609
615
  this.#i.add(t);
610
616
  }
611
617
  settled() {
612
- return (this.#o ??= ir()).promise;
618
+ return (this.#l ??= Zt()).promise;
613
619
  }
614
620
  static ensure() {
615
621
  if (m === null) {
616
- const t = m = new gt();
617
- !st && !Ee && le(() => {
622
+ const t = m = new dt();
623
+ !nt && !Ae && ue(() => {
618
624
  t.#e || t.flush();
619
625
  });
620
626
  }
621
627
  return m;
622
628
  }
623
629
  apply() {
624
- if (!ne || !this.is_fork && this.#t === null && this.#r === null) {
630
+ if (!le || !this.is_fork && this.#t === null && this.#r === null) {
625
631
  R = null;
626
632
  return;
627
633
  }
628
634
  R = /* @__PURE__ */ new Map();
629
635
  for (const [r, [n]] of this.current) R.set(r, n);
630
- for (let r = je; r !== null; r = r.#r)
636
+ for (let r = Ve; r !== null; r = r.#r)
631
637
  if (!(r === this || r.is_fork)) {
632
638
  var t = !1;
633
639
  if (r.id < this.id) {
@@ -642,390 +648,387 @@ var Qn = 1, Ae = class gt {
642
648
  }
643
649
  }
644
650
  schedule(t) {
645
- if (_t = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
651
+ if (ct = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
646
652
  t.b.defer_effect(t);
647
653
  return;
648
654
  }
649
- for (var r = t; r.parent !== null; ) {
650
- r = r.parent;
651
- var n = r.f;
652
- if (_e !== null && r === g && (ne || (y === null || (y.f & 2) === 0) && !Bn))
653
- return;
654
- if ((n & 96) !== 0) {
655
- if ((n & 1024) === 0) return;
656
- r.f ^= U;
657
- }
658
- }
659
- this.#a.push(r);
655
+ this.#s.push(t);
660
656
  }
661
- #v() {
657
+ #_() {
662
658
  if (this.linked) {
663
659
  var t = this.#t, r = this.#r;
664
- t === null ? je = r : t.#r = r, r === null ? ve = t : r.#t = t, this.linked = !1;
660
+ t === null ? Ve = r : t.#r = r, r === null ? pe = t : r.#t = t, this.linked = !1;
665
661
  }
666
662
  }
667
663
  };
668
- function V(e) {
669
- var t = Ee;
670
- Ee = !0;
664
+ function re(e) {
665
+ var t = Ae;
666
+ Ae = !0;
671
667
  try {
672
668
  var r;
673
669
  for (e && (m !== null && !m.is_fork && m.flush(), r = e()); ; ) {
674
- if (zn(), m === null) return r;
670
+ if (In(), m === null) return r;
675
671
  m.flush();
676
672
  }
677
673
  } finally {
678
- Ee = t;
674
+ Ae = t;
679
675
  }
680
676
  }
681
- function Zn() {
677
+ function Bn() {
682
678
  if (0) {
683
679
  var e;
684
680
  for (const r of m.current.keys()) for (const [n, i] of r.updated ?? [])
685
681
  var t;
686
682
  }
687
683
  try {
688
- Cn();
684
+ En();
689
685
  } catch (r) {
690
- W(r, _t);
686
+ Y(r, ct);
691
687
  }
692
688
  }
693
- var Y = null;
689
+ var F = null;
694
690
  function Vt(e) {
695
691
  var t = e.length;
696
692
  if (t !== 0) {
697
693
  for (var r = 0; r < t; ) {
698
694
  var n = e[r++];
699
- if ((n.f & 24576) === 0 && He(n) && (Y = /* @__PURE__ */ new Set(), be(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Lr(n), Y?.size > 0)) {
700
- J.clear();
701
- for (const i of Y) {
695
+ if ((n.f & 24576) === 0 && je(n) && (F = /* @__PURE__ */ new Set(), $e(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Tr(n), F?.size > 0)) {
696
+ G.clear();
697
+ for (const i of F) {
702
698
  if ((i.f & 24576) !== 0) continue;
703
- const a = [i];
704
- let o = i.parent;
705
- for (; o !== null; )
706
- Y.has(o) && (Y.delete(o), a.push(o)), o = o.parent;
707
- for (let s = a.length - 1; s >= 0; s--) {
708
- const l = a[s];
709
- (l.f & 24576) === 0 && be(l);
699
+ const s = [i];
700
+ let l = i.parent;
701
+ for (; l !== null; )
702
+ F.has(l) && (F.delete(l), s.push(l)), l = l.parent;
703
+ for (let a = s.length - 1; a >= 0; a--) {
704
+ const c = s[a];
705
+ (c.f & 24576) === 0 && $e(c);
710
706
  }
711
707
  }
712
- Y.clear();
708
+ F.clear();
713
709
  }
714
710
  }
715
- Y = null;
711
+ F = null;
716
712
  }
717
713
  }
718
- function yr(e, t, r, n) {
714
+ function cr(e, t, r, n) {
719
715
  if (!r.has(e) && (r.add(e), e.reactions !== null))
720
716
  for (const i of e.reactions) {
721
- const a = i.f;
722
- (a & 2) !== 0 ? yr(i, t, r, n) : (a & 4194320) !== 0 && (a & 2048) === 0 && Mt(i, t, n) && ($(i, N), Lt(i));
717
+ const s = i.f;
718
+ (s & 2) !== 0 ? cr(i, t, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && St(i, t, n) && (E(i, H), At(i));
723
719
  }
724
720
  }
725
- function Mt(e, t, r) {
721
+ function St(e, t, r) {
726
722
  const n = r.get(e);
727
723
  if (n !== void 0) return n;
728
724
  if (e.deps !== null) for (const i of e.deps) {
729
- if (Je.call(t, i)) return !0;
730
- if ((i.f & 2) !== 0 && Mt(i, t, r))
725
+ if (Ge.call(t, i)) return !0;
726
+ if ((i.f & 2) !== 0 && St(i, t, r))
731
727
  return r.set(i, !0), !0;
732
728
  }
733
729
  return r.set(e, !1), !1;
734
730
  }
735
- function Lt(e) {
731
+ function At(e) {
736
732
  m.schedule(e);
737
733
  }
738
- function wr(e, t) {
734
+ function dr(e, t) {
739
735
  if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
740
- (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), $(e, U);
736
+ (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), E(e, P);
741
737
  for (var r = e.first; r !== null; )
742
- wr(r, t), r = r.next;
738
+ dr(r, t), r = r.next;
743
739
  }
744
740
  }
745
- function br(e) {
746
- $(e, U);
741
+ function hr(e) {
742
+ E(e, P);
747
743
  for (var t = e.first; t !== null; )
748
- br(t), t = t.next;
744
+ hr(t), t = t.next;
749
745
  }
750
- var et = /* @__PURE__ */ new Set(), J = /* @__PURE__ */ new Map();
751
- var Sr = !1;
752
- function Fe(e, t) {
746
+ var Ze = /* @__PURE__ */ new Set(), G = /* @__PURE__ */ new Map();
747
+ var vr = !1;
748
+ function He(e, t) {
753
749
  var r = {
754
750
  f: 0,
755
751
  v: e,
756
752
  reactions: null,
757
- equals: ur,
753
+ equals: nr,
758
754
  rv: 0,
759
755
  wv: 0
760
756
  };
761
757
  return r;
762
758
  }
763
759
  // @__NO_SIDE_EFFECTS__
764
- function H(e, t) {
765
- const r = Fe(e, t);
766
- return Nr(r), r;
760
+ function L(e, t) {
761
+ const r = He(e, t);
762
+ return Ar(r), r;
767
763
  }
768
764
  // @__NO_SIDE_EFFECTS__
769
- function Xn(e, t = !1, r = !0) {
770
- const n = Fe(e);
771
- return t || (n.equals = fr), nt && r && E !== null && E.l !== null && (E.l.s ??= []).push(n), n;
765
+ function zn(e, t = !1, r = !0) {
766
+ const n = He(e);
767
+ return t || (n.equals = ir), et && r && S !== null && S.l !== null && (S.l.s ??= []).push(n), n;
772
768
  }
773
- function D(e, t, r = !1) {
774
- y !== null && (!q || (y.f & 131072) !== 0) && Oe() && (y.f & 4325394) !== 0 && (Q === null || !Q.has(e)) && Fn();
775
- let n = r ? ge(t) : t;
776
- return tt(e, n, Ge);
769
+ function C(e, t, r = !1) {
770
+ y !== null && (!z || (y.f & 131072) !== 0) && qe() && (y.f & 4325394) !== 0 && (K === null || !K.has(e)) && Mn();
771
+ let n = r ? me(t) : t;
772
+ return Je(e, n, Ue);
777
773
  }
778
- function tt(e, t, r = null) {
774
+ var oe = null, ht = 0;
775
+ function Je(e, t, r = null) {
779
776
  if (!e.equals(t)) {
780
- ae ? J.set(e, t) : J.has(e) || J.set(e, e.v);
781
- var n = Ae.ensure();
777
+ ie ? G.set(e, t) : G.has(e) || G.set(e, e.v);
778
+ var n = Te.ensure();
782
779
  if (n.capture(e, t), (e.f & 2) !== 0) {
783
780
  const i = e;
784
- (e.f & 2048) !== 0 && Rt(i), R === null && Pt(i);
781
+ (e.f & 2048) !== 0 && xt(i), R === null && Et(i);
785
782
  }
786
- e.wv = Fr(), Ar(e, N, r), Oe() && g !== null && (g.f & 1024) !== 0 && (g.f & 96) === 0 && (F === null ? wi([e]) : F.push(e)), !n.is_fork && et.size > 0 && !Sr && ei();
783
+ e.wv = Mr(), oe = null, ht = 0, _r(e, H, r), oe = null, qe() && p !== null && (p.f & 1024) !== 0 && (p.f & 96) === 0 && (j === null ? ui([e]) : j.push(e)), !n.is_fork && Ze.size > 0 && !vr && Un();
787
784
  }
788
785
  return t;
789
786
  }
790
- function ei() {
791
- Sr = !1;
792
- for (const e of et) {
793
- (e.f & 1024) !== 0 && $(e, de);
787
+ function Un() {
788
+ vr = !1;
789
+ for (const e of Ze) {
790
+ (e.f & 1024) !== 0 && E(e, ve);
794
791
  let t;
795
792
  try {
796
- t = He(e);
793
+ t = je(e);
797
794
  } catch {
798
795
  t = !0;
799
796
  }
800
- t && be(e);
797
+ t && $e(e);
801
798
  }
802
- et.clear();
799
+ Ze.clear();
803
800
  }
804
- function xe(e) {
805
- D(e, e.v + 1);
801
+ function Me(e) {
802
+ C(e, e.v + 1);
806
803
  }
807
- function Ar(e, t, r) {
804
+ function _r(e, t, r) {
808
805
  var n = e.reactions;
809
- if (n !== null)
810
- for (var i = Oe(), a = n.length, o = 0; o < a; o++) {
811
- var s = n[o], l = s.f;
812
- if (!(!i && s === g)) {
813
- var h = (l & N) === 0;
814
- if (h && $(s, t), (l & 131072) !== 0) et.add(s);
815
- else if ((l & 2) !== 0) {
816
- var _ = s;
817
- R?.delete(_), (l & 65536) === 0 && (l & 512 && (g === null || (g.f & 2097152) === 0) && (s.f |= De), Ar(_, de, r));
818
- } else if (h) {
819
- var f = s;
820
- (l & 16) !== 0 && Y !== null && Y.add(f), r !== null ? r.push(f) : Lt(f);
806
+ if (n !== null) {
807
+ var i = qe(), s = n.length;
808
+ if (ht += s, ht > 1e5 && oe === null && (oe = /* @__PURE__ */ new Set()), oe !== null) {
809
+ if (oe.has(e)) return;
810
+ oe.add(e);
811
+ }
812
+ for (var l = 0; l < s; l++) {
813
+ var a = n[l], c = a.f;
814
+ if (!(!i && a === p)) {
815
+ var v = (c & H) === 0;
816
+ if (v && E(a, t), (c & 131072) !== 0) Ze.add(a);
817
+ else if ((c & 2) !== 0) {
818
+ var g = a;
819
+ R?.delete(g), _r(g, ve, r);
820
+ } else if (v) {
821
+ var u = a;
822
+ (c & 16) !== 0 && F !== null && F.add(u), r !== null ? r.push(u) : At(u);
821
823
  }
822
824
  }
823
825
  }
826
+ }
824
827
  }
825
- var ti = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
826
- function ge(e) {
827
- if (typeof e != "object" || e === null || Te in e || ar in e) return e;
828
- const t = nr(e);
829
- if (t !== hn && t !== vn) return e;
830
- var r = /* @__PURE__ */ new Map(), n = cn(e), i = /* @__PURE__ */ H(0), a = null, o = fe, s = (f) => {
831
- if (fe === o) return f();
832
- var u = y, c = fe;
833
- z(null), Wt(o);
834
- var d = f();
835
- return z(u), Wt(c), d;
828
+ var Fn = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
829
+ function me(e) {
830
+ if (typeof e != "object" || e === null || Se in e || Jt in e) return e;
831
+ const t = Xt(e);
832
+ if (t !== sn && t !== an) return e;
833
+ var r = /* @__PURE__ */ new Map(), n = en(e), i = /* @__PURE__ */ L(0), s = null, l = he, a = (u) => {
834
+ if (he === l) return u();
835
+ var f = y, o = he;
836
+ V(null), Ut(l);
837
+ var d = u();
838
+ return V(f), Ut(o), d;
836
839
  };
837
- n && r.set("length", /* @__PURE__ */ H(e.length, a));
838
- var l = "";
839
- let h = !1;
840
- function _(f) {
841
- if (!h) {
842
- h = !0, l = f, jt(i, `${l} version`);
843
- for (const [u, c] of r) jt(c, ri(l, u));
844
- h = !1;
840
+ n && r.set("length", /* @__PURE__ */ L(e.length, s));
841
+ var c = "";
842
+ let v = !1;
843
+ function g(u) {
844
+ if (!v) {
845
+ v = !0, c = u, jt(i, `${c} version`);
846
+ for (const [f, o] of r) jt(o, Yn(c, f));
847
+ v = !1;
845
848
  }
846
849
  }
847
850
  return new Proxy(e, {
848
- defineProperty(f, u, c) {
849
- (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Nn();
850
- var d = r.get(u);
851
- return d === void 0 ? s(() => {
852
- var v = /* @__PURE__ */ H(c.value, a);
853
- return r.set(u, v), v;
854
- }) : D(d, c.value, !0), !0;
851
+ defineProperty(u, f, o) {
852
+ (!("value" in o) || o.configurable === !1 || o.enumerable === !1 || o.writable === !1) && An();
853
+ var d = r.get(f);
854
+ return d === void 0 ? a(() => {
855
+ var _ = /* @__PURE__ */ L(o.value, s);
856
+ return r.set(f, _), _;
857
+ }) : C(d, o.value, !0), !0;
855
858
  },
856
- deleteProperty(f, u) {
857
- var c = r.get(u);
858
- if (c === void 0) {
859
- if (u in f) {
860
- const d = s(() => /* @__PURE__ */ H(x, a));
861
- r.set(u, d), xe(i);
859
+ deleteProperty(u, f) {
860
+ var o = r.get(f);
861
+ if (o === void 0) {
862
+ if (f in u) {
863
+ const d = a(() => /* @__PURE__ */ L(A, s));
864
+ r.set(f, d), Me(i);
862
865
  }
863
866
  } else
864
- D(c, x), xe(i);
867
+ C(o, A), Me(i);
865
868
  return !0;
866
869
  },
867
- get(f, u, c) {
868
- if (u === Te) return e;
869
- var d = r.get(u), v = u in f;
870
- if (d === void 0 && (!v || ue(f, u)?.writable) && (d = s(() => {
871
- var A = ge(v ? f[u] : x), P = /* @__PURE__ */ H(A, a);
872
- return P;
873
- }), r.set(u, d)), d !== void 0) {
874
- var S = p(d);
875
- return S === x ? void 0 : S;
870
+ get(u, f, o) {
871
+ if (f === Se) return e;
872
+ var d = r.get(f), _ = f in u;
873
+ if (d === void 0 && (!_ || de(u, f)?.writable) && (d = a(() => {
874
+ var b = me(_ ? u[f] : A), O = /* @__PURE__ */ L(b, s);
875
+ return O;
876
+ }), r.set(f, d)), d !== void 0) {
877
+ var T = h(d);
878
+ return T === A ? void 0 : T;
876
879
  }
877
- return Reflect.get(f, u, c);
880
+ return Reflect.get(u, f, o);
878
881
  },
879
- getOwnPropertyDescriptor(f, u) {
880
- var c = Reflect.getOwnPropertyDescriptor(f, u);
881
- if (c && "value" in c) {
882
- var d = r.get(u);
883
- d && (c.value = p(d));
884
- } else if (c === void 0) {
885
- var v = r.get(u), S = v?.v;
886
- if (v !== void 0 && S !== x) return {
882
+ getOwnPropertyDescriptor(u, f) {
883
+ this.has?.(u, f);
884
+ var o = Reflect.getOwnPropertyDescriptor(u, f), d = r.get(f);
885
+ if (d !== void 0) {
886
+ var _ = h(d);
887
+ if (_ === A) return;
888
+ if (o && "value" in o) o.value = _;
889
+ else return {
887
890
  enumerable: !0,
888
891
  configurable: !0,
889
- value: S,
892
+ value: _,
890
893
  writable: !0
891
894
  };
892
895
  }
893
- return c;
896
+ return o;
894
897
  },
895
- has(f, u) {
896
- if (u === Te) return !0;
897
- var c = r.get(u), d = c !== void 0 && c.v !== x || Reflect.has(f, u);
898
- return (c !== void 0 || g !== null && (!d || ue(f, u)?.writable)) && (c === void 0 && (c = s(() => {
899
- var v = d ? ge(f[u]) : x, S = /* @__PURE__ */ H(v, a);
900
- return S;
901
- }), r.set(u, c)), p(c) === x) ? !1 : d;
898
+ has(u, f) {
899
+ if (f === Se) return !0;
900
+ var o = r.get(f), d = o !== void 0 && o.v !== A || Reflect.has(u, f);
901
+ return (o !== void 0 || p !== null && (!d || de(u, f)?.writable)) && (o === void 0 && (o = a(() => {
902
+ var _ = d ? me(u[f]) : A, T = /* @__PURE__ */ L(_, s);
903
+ return T;
904
+ }), r.set(f, o)), h(o) === A) ? !1 : d;
902
905
  },
903
- set(f, u, c, d) {
904
- var v = r.get(u), S = u in f;
905
- if (n && u === "length") for (var A = c; A < v.v; A += 1) {
906
- var P = r.get(A + "");
907
- P !== void 0 ? D(P, x) : A in f && (P = s(() => /* @__PURE__ */ H(x, a)), r.set(A + "", P));
906
+ set(u, f, o, d) {
907
+ var _ = r.get(f), T = f in u;
908
+ if (n && f === "length") for (var b = o; b < _.v; b += 1) {
909
+ var O = r.get(b + "");
910
+ O !== void 0 ? C(O, A) : b in u && (O = a(() => /* @__PURE__ */ L(A, s)), r.set(b + "", O));
908
911
  }
909
- if (v === void 0)
910
- (!S || ue(f, u)?.writable) && (v = s(() => /* @__PURE__ */ H(void 0, a)), D(v, ge(c)), r.set(u, v));
912
+ if (_ === void 0)
913
+ (!T || de(u, f)?.writable) && (_ = a(() => /* @__PURE__ */ L(void 0, s)), C(_, me(o)), r.set(f, _));
911
914
  else {
912
- S = v.v !== x;
913
- var j = s(() => ge(c));
914
- D(v, j);
915
+ T = _.v !== A;
916
+ var D = a(() => me(o));
917
+ C(_, D);
915
918
  }
916
- var T = Reflect.getOwnPropertyDescriptor(f, u);
917
- if (T?.set && T.set.call(d, c), !S) {
918
- if (n && typeof u == "string") {
919
- var B = r.get("length"), ee = Number(u);
920
- Number.isInteger(ee) && ee >= B.v && D(B, ee + 1);
919
+ var x = Reflect.getOwnPropertyDescriptor(u, f);
920
+ if (x?.set && x.set.call(d, o), !T) {
921
+ if (n && typeof f == "string") {
922
+ var B = r.get("length"), Z = Number(f);
923
+ Number.isInteger(Z) && Z >= B.v && C(B, Z + 1);
921
924
  }
922
- xe(i);
925
+ Me(i);
923
926
  }
924
927
  return !0;
925
928
  },
926
- ownKeys(f) {
927
- p(i);
928
- var u = Reflect.ownKeys(f).filter((v) => {
929
- var S = r.get(v);
930
- return S === void 0 || S.v !== x;
929
+ ownKeys(u) {
930
+ h(i);
931
+ var f = Reflect.ownKeys(u).filter((_) => {
932
+ var T = r.get(_);
933
+ return T === void 0 || T.v !== A;
931
934
  });
932
- for (var [c, d] of r) d.v !== x && !(c in f) && u.push(c);
933
- return u;
935
+ for (var [o, d] of r) d.v !== A && !(o in u) && f.push(o);
936
+ return f;
934
937
  },
935
938
  setPrototypeOf() {
936
939
  On();
937
940
  }
938
941
  });
939
942
  }
940
- function ri(e, t) {
941
- return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : ti.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
943
+ function Yn(e, t) {
944
+ return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Fn.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
942
945
  }
943
- var qt, ni, kr, $r, Tr;
944
- function mt() {
945
- if (qt === void 0) {
946
- qt = window, ni = document, kr = /Firefox/.test(navigator.userAgent);
946
+ var Dt, Gn, pr, gr, mr;
947
+ function vt() {
948
+ if (Dt === void 0) {
949
+ Dt = window, Gn = document, pr = /Firefox/.test(navigator.userAgent);
947
950
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
948
- $r = ue(t, "firstChild").get, Tr = ue(t, "nextSibling").get, Ht(e) && (e[ht] = void 0, e[or] = null, e[Sn] = void 0, e.__e = void 0), Ht(r) && (r[vt] = void 0);
951
+ gr = de(t, "firstChild").get, mr = de(t, "nextSibling").get, Lt(e) && (e[ot] = void 0, e[er] = null, e[vn] = void 0, e.__e = void 0), Lt(r) && (r[ft] = void 0);
949
952
  }
950
953
  }
951
- function ie(e = "") {
954
+ function ne(e = "") {
952
955
  return document.createTextNode(e);
953
956
  }
954
957
  // @__NO_SIDE_EFFECTS__
955
- function he(e) {
956
- return $r.call(e);
958
+ function _e(e) {
959
+ return gr.call(e);
957
960
  }
958
961
  // @__NO_SIDE_EFFECTS__
959
962
  function se(e) {
960
- return Tr.call(e);
963
+ return mr.call(e);
961
964
  }
962
- function Er(e, t) {
963
- if (!k) return /* @__PURE__ */ he(e);
964
- var r = /* @__PURE__ */ he(b);
965
- if (r === null) r = b.appendChild(ie());
965
+ function yr(e, t) {
966
+ if (!k) return /* @__PURE__ */ _e(e);
967
+ var r = /* @__PURE__ */ _e(w);
968
+ if (r === null) r = w.appendChild(ne());
966
969
  else if (t && r.nodeType !== 3) {
967
- var n = ie();
968
- return r?.before(n), G(n), n;
970
+ var n = ne();
971
+ return r?.before(n), U(n), n;
969
972
  }
970
- return t && It(r), G(r), r;
973
+ return t && Mt(r), U(r), r;
971
974
  }
972
- function ii(e, t = !1) {
975
+ function Kn(e, t = !1) {
973
976
  if (!k) {
974
- var r = /* @__PURE__ */ he(e);
977
+ var r = /* @__PURE__ */ _e(e);
975
978
  return r instanceof Comment && r.data === "" ? /* @__PURE__ */ se(r) : r;
976
979
  }
977
980
  if (t) {
978
- if (b?.nodeType !== 3) {
979
- var n = ie();
980
- return b?.before(n), G(n), n;
981
+ if (w?.nodeType !== 3) {
982
+ var n = ne();
983
+ return w?.before(n), U(n), n;
981
984
  }
982
- It(b);
985
+ Mt(w);
983
986
  }
984
- return b;
987
+ return w;
985
988
  }
986
- function ai(e, t = !1) {
987
- if (!k) return /* @__PURE__ */ he(e);
988
- var r = Er(e, t);
989
- return lr(e), r;
989
+ function Wn(e, t = !1) {
990
+ if (!k) return /* @__PURE__ */ _e(e);
991
+ var r = yr(e, t);
992
+ return tr(e), r;
990
993
  }
991
- function si(e, t = 1, r = !1) {
992
- let n = k ? b : e;
994
+ function Xn(e, t = 1, r = !1) {
995
+ let n = k ? w : e;
993
996
  for (var i; t--; )
994
997
  i = n, n = /* @__PURE__ */ se(n);
995
998
  if (!k) return n;
996
999
  if (r) {
997
1000
  if (n?.nodeType !== 3) {
998
- var a = ie();
999
- return n === null ? i?.after(a) : n.before(a), G(a), a;
1001
+ var s = ne();
1002
+ return n === null ? i?.after(s) : n.before(s), U(s), s;
1000
1003
  }
1001
- It(n);
1004
+ Mt(n);
1002
1005
  }
1003
- return G(n), n;
1006
+ return U(n), n;
1004
1007
  }
1005
- function oi(e) {
1008
+ function Zn(e) {
1006
1009
  e.textContent = "";
1007
1010
  }
1008
- function li() {
1009
- return !ne || Y !== null ? !1 : (g.f & At) !== 0;
1011
+ function Jn() {
1012
+ return !le || F !== null ? !1 : (p.f & yt) !== 0;
1010
1013
  }
1011
- function Ct(e, t, r) {
1014
+ function Ot(e, t, r) {
1012
1015
  return t == null || t === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(e, { is: r }) : document.createElement(e) : r ? document.createElementNS(t, e, { is: r }) : document.createElementNS(t, e);
1013
1016
  }
1014
- function It(e) {
1017
+ function Mt(e) {
1015
1018
  if (e.nodeValue.length < 65536) return;
1016
1019
  let t = e.nextSibling;
1017
1020
  for (; t !== null && t.nodeType === 3; )
1018
1021
  t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1019
1022
  }
1020
- function ci(e) {
1021
- var t = g;
1023
+ function Qn(e) {
1024
+ var t = p;
1022
1025
  if (t === null)
1023
- return y.f |= Ze, e;
1026
+ return y.f |= We, e;
1024
1027
  if ((t.f & 32768) === 0 && (t.f & 4) === 0)
1025
1028
  throw e;
1026
- W(e, t);
1029
+ Y(e, t);
1027
1030
  }
1028
- function W(e, t) {
1031
+ function Y(e, t) {
1029
1032
  if (!(t !== null && (t.f & 16384) !== 0)) {
1030
1033
  for (; t !== null; ) {
1031
1034
  if ((t.f & 128) !== 0 && (t.f & 33570816) === 0) {
@@ -1042,21 +1045,21 @@ function W(e, t) {
1042
1045
  throw e;
1043
1046
  }
1044
1047
  }
1045
- function ui(e) {
1046
- g === null && (y === null && Ln(e), Mn()), ae && Rn(e);
1048
+ function ei(e) {
1049
+ p === null && (y === null && Tn(e), kn()), ie && $n(e);
1047
1050
  }
1048
- function fi(e, t) {
1051
+ function ti(e, t) {
1049
1052
  var r = t.last;
1050
1053
  r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
1051
1054
  }
1052
1055
  function X(e, t) {
1053
- var r = g;
1054
- r !== null && (r.f & 8192) !== 0 && (e |= St);
1056
+ var r = p;
1057
+ r !== null && (r.f & 8192) !== 0 && (e |= mt);
1055
1058
  var n = {
1056
- ctx: E,
1059
+ ctx: S,
1057
1060
  deps: null,
1058
1061
  nodes: null,
1059
- f: e | N | 512,
1062
+ f: e | H | 512,
1060
1063
  first: null,
1061
1064
  fn: t,
1062
1065
  last: null,
@@ -1071,416 +1074,416 @@ function X(e, t) {
1071
1074
  m?.register_created_effect(n);
1072
1075
  var i = n;
1073
1076
  if ((e & 4) !== 0)
1074
- _e !== null ? _e.push(n) : Ae.ensure().schedule(n);
1077
+ Oe !== null ? Oe.push(n) : Te.ensure().schedule(n);
1075
1078
  else if (t !== null) {
1076
1079
  try {
1077
- be(n);
1078
- } catch (o) {
1079
- throw C(n), o;
1080
+ $e(n);
1081
+ } catch (l) {
1082
+ throw N(n), l;
1080
1083
  }
1081
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= kt));
1084
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= wt));
1082
1085
  }
1083
- if (i !== null && (i.parent = r, r !== null && fi(i, r), y !== null && (y.f & 2) !== 0 && (e & 64) === 0)) {
1084
- var a = y;
1085
- (a.effects ??= []).push(i);
1086
+ if (i !== null && (i.parent = r, r !== null && ti(i, r), y !== null && (y.f & 2) !== 0 && (e & 64) === 0)) {
1087
+ var s = y;
1088
+ (s.effects ??= []).push(i);
1086
1089
  }
1087
1090
  return n;
1088
1091
  }
1089
- function Dt() {
1090
- return y !== null && !q;
1092
+ function Rt() {
1093
+ return y !== null && !z;
1091
1094
  }
1092
- function di(e) {
1095
+ function ri(e) {
1093
1096
  const t = X(8, null);
1094
- return $(t, U), t.teardown = e, t;
1097
+ return E(t, P), t.teardown = e, t;
1095
1098
  }
1096
- function ot(e) {
1097
- ui("$effect");
1098
- var t = g.f;
1099
- if (!y && (t & 32) !== 0 && E !== null && !E.i) {
1100
- var r = E;
1099
+ function it(e) {
1100
+ ei("$effect");
1101
+ var t = p.f;
1102
+ if (!y && (t & 32) !== 0 && S !== null && !S.i) {
1103
+ var r = S;
1101
1104
  (r.e ??= []).push(e);
1102
- } else return xr(e);
1105
+ } else return wr(e);
1103
1106
  }
1104
- function xr(e) {
1105
- return X(4 | mn, e);
1107
+ function wr(e) {
1108
+ return X(4 | un, e);
1106
1109
  }
1107
- function hi(e) {
1108
- Ae.ensure();
1109
- const t = X(64 | Se, e);
1110
+ function ni(e) {
1111
+ Te.ensure();
1112
+ const t = X(64 | ke, e);
1110
1113
  return () => {
1111
- C(t);
1114
+ N(t);
1112
1115
  };
1113
1116
  }
1114
- function vi(e) {
1115
- Ae.ensure();
1116
- const t = X(64 | Se, e);
1117
+ function ii(e) {
1118
+ Te.ensure();
1119
+ const t = X(64 | ke, e);
1117
1120
  return (r = {}) => new Promise((n) => {
1118
- r.outro ? Pe(t, () => {
1119
- C(t), n(void 0);
1120
- }) : (C(t), n(void 0));
1121
+ r.outro ? Re(t, () => {
1122
+ N(t), n(void 0);
1123
+ }) : (N(t), n(void 0));
1121
1124
  });
1122
1125
  }
1123
- function Pr(e) {
1126
+ function br(e) {
1124
1127
  return X(4, e);
1125
1128
  }
1126
- function pi(e) {
1127
- return X(yn | Se, e);
1129
+ function si(e) {
1130
+ return X(cn | ke, e);
1128
1131
  }
1129
- function Nt(e, t = 0) {
1132
+ function Ct(e, t = 0) {
1130
1133
  return X(8 | t, e);
1131
1134
  }
1132
- function _i(e, t = [], r = [], n = []) {
1133
- qn(n, t, r, (i) => {
1135
+ function ai(e, t = [], r = [], n = []) {
1136
+ Ln(n, t, r, (i) => {
1134
1137
  X(8, () => {
1135
- e(...i.map(p));
1138
+ e(...i.map(h));
1136
1139
  });
1137
1140
  });
1138
1141
  }
1139
- function Rr(e, t = 0) {
1142
+ function $r(e, t = 0) {
1140
1143
  var r = X(16 | t, e);
1141
1144
  return r;
1142
1145
  }
1143
- function re(e) {
1144
- return X(32 | Se, e);
1146
+ function te(e) {
1147
+ return X(32 | ke, e);
1145
1148
  }
1146
- function Mr(e) {
1149
+ function kr(e) {
1147
1150
  var t = e.teardown;
1148
1151
  if (t !== null) {
1149
- const r = ae, n = y;
1150
- Yt(!0), z(null);
1152
+ const r = ie, n = y;
1153
+ zt(!0), V(null);
1151
1154
  try {
1152
1155
  t.call(null);
1153
1156
  } catch (i) {
1154
- W(i, e.parent);
1157
+ Y(i, e.parent);
1155
1158
  } finally {
1156
- Yt(r), z(n);
1159
+ zt(r), V(n);
1157
1160
  }
1158
1161
  }
1159
1162
  }
1160
- function Ot(e, t = !1) {
1163
+ function It(e, t = !1) {
1161
1164
  var r = e.first;
1162
1165
  for (e.first = e.last = null; r !== null; ) {
1163
1166
  const i = r.ac;
1164
- i !== null && it(() => {
1165
- i.abort(Ne);
1167
+ i !== null && tt(() => {
1168
+ i.abort(Le);
1166
1169
  });
1167
1170
  var n = r.next;
1168
- (r.f & 64) !== 0 ? r.parent = null : C(r, t), r = n;
1171
+ (r.f & 64) !== 0 ? r.parent = null : N(r, t), r = n;
1169
1172
  }
1170
1173
  }
1171
- function gi(e) {
1174
+ function li(e) {
1172
1175
  for (var t = e.first; t !== null; ) {
1173
1176
  var r = t.next;
1174
- (t.f & 32) === 0 && C(t), t = r;
1177
+ (t.f & 32) === 0 && N(t), t = r;
1175
1178
  }
1176
1179
  }
1177
- function C(e, t = !0) {
1180
+ function N(e, t = !0) {
1178
1181
  var r = !1;
1179
- (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (mi(e.nodes.start, e.nodes.end), r = !0), e.f |= Ut, Ot(e, t && !r), Le(e, 0);
1182
+ (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (oi(e.nodes.start, e.nodes.end), r = !0), e.f |= qt, It(e, t && !r), Ne(e, 0);
1180
1183
  var n = e.nodes && e.nodes.t;
1181
- if (n !== null) for (const a of n) a.stop();
1182
- Mr(e), e.f ^= Ut, e.f |= gn;
1184
+ if (n !== null) for (const s of n) s.stop();
1185
+ kr(e), e.f ^= qt, e.f |= fn;
1183
1186
  var i = e.parent;
1184
- i !== null && i.first !== null && Lr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1187
+ i !== null && i.first !== null && Tr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1185
1188
  }
1186
- function mi(e, t) {
1189
+ function oi(e, t) {
1187
1190
  for (; e !== null; ) {
1188
1191
  var r = e === t ? null : /* @__PURE__ */ se(e);
1189
1192
  e.remove(), e = r;
1190
1193
  }
1191
1194
  }
1192
- function Lr(e) {
1195
+ function Tr(e) {
1193
1196
  var t = e.parent, r = e.prev, n = e.next;
1194
1197
  r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
1195
1198
  }
1196
- function Pe(e, t, r = !0) {
1199
+ function Re(e, t, r = !0) {
1197
1200
  var n = [];
1198
- e.f |= 256, Cr(e, n, !0);
1201
+ e.f |= 256, Er(e, n, !0);
1199
1202
  var i = () => {
1200
- r && C(e), t && t();
1201
- }, a = n.length;
1202
- if (a > 0) {
1203
- var o = () => --a || i();
1204
- for (var s of n) s.out(o);
1203
+ r && N(e), t && t();
1204
+ }, s = n.length;
1205
+ if (s > 0) {
1206
+ var l = () => --s || i();
1207
+ for (var a of n) a.out(l);
1205
1208
  } else i();
1206
1209
  }
1207
- function Cr(e, t, r) {
1210
+ function Er(e, t, r) {
1208
1211
  if ((e.f & 8192) === 0) {
1209
- e.f ^= St;
1212
+ e.f ^= mt;
1210
1213
  var n = e.nodes && e.nodes.t;
1211
1214
  if (n !== null)
1212
- for (const s of n) (s.is_global || r) && t.push(s);
1215
+ for (const a of n) (a.is_global || r) && t.push(a);
1213
1216
  for (var i = e.first; i !== null; ) {
1214
- var a = i.next;
1217
+ var s = i.next;
1215
1218
  if ((i.f & 64) === 0) {
1216
- var o = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
1217
- Cr(i, t, o ? r : !1);
1219
+ var l = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
1220
+ Er(i, t, l ? r : !1);
1218
1221
  }
1219
- i = a;
1222
+ i = s;
1220
1223
  }
1221
1224
  }
1222
1225
  }
1223
- function Gt(e) {
1224
- e.f &= -257, Ir(e, !0);
1226
+ function Bt(e) {
1227
+ e.f &= -257, xr(e, !0);
1225
1228
  }
1226
- function Ir(e, t) {
1229
+ function xr(e, t) {
1227
1230
  if ((e.f & 256) === 0 && (e.f & 8192) !== 0) {
1228
- e.f ^= St, (e.f & 1024) === 0 && ($(e, N), Ae.ensure().schedule(e));
1231
+ e.f ^= mt, (e.f & 1024) === 0 && (E(e, H), Te.ensure().schedule(e));
1229
1232
  for (var r = e.first; r !== null; ) {
1230
1233
  var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1231
- Ir(r, i ? t : !1), r = n;
1234
+ xr(r, i ? t : !1), r = n;
1232
1235
  }
1233
- var a = e.nodes && e.nodes.t;
1234
- if (a !== null)
1235
- for (const o of a) (o.is_global || t) && o.in();
1236
+ var s = e.nodes && e.nodes.t;
1237
+ if (s !== null)
1238
+ for (const l of s) (l.is_global || t) && l.in();
1236
1239
  }
1237
1240
  }
1238
- function Dr(e, t) {
1241
+ function Sr(e, t) {
1239
1242
  if (e.nodes)
1240
1243
  for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
1241
1244
  var i = r === n ? null : /* @__PURE__ */ se(r);
1242
1245
  t.append(r), r = i;
1243
1246
  }
1244
1247
  }
1245
- var yi = null, Ye = !1, ae = !1;
1246
- function Yt(e) {
1247
- ae = e;
1248
+ var fi = null, Fe = !1, ie = !1;
1249
+ function zt(e) {
1250
+ ie = e;
1248
1251
  }
1249
- var y = null, q = !1;
1250
- function z(e) {
1252
+ var y = null, z = !1;
1253
+ function V(e) {
1251
1254
  y = e;
1252
1255
  }
1253
- var g = null;
1254
- function Z(e) {
1255
- g = e;
1256
+ var p = null;
1257
+ function W(e) {
1258
+ p = e;
1256
1259
  }
1257
- var Q = null;
1258
- function Nr(e) {
1259
- y !== null && (!ne || (y.f & 2) !== 0) && (Q ??= /* @__PURE__ */ new Set()).add(e);
1260
+ var K = null;
1261
+ function Ar(e) {
1262
+ y !== null && (!le && (y.f & 2097152) !== 0 || (y.f & 2) !== 0) && (K ??= /* @__PURE__ */ new Set()).add(e);
1260
1263
  }
1261
- var L = null, I = 0, F = null;
1262
- function wi(e) {
1263
- F = e;
1264
+ var I = null, q = 0, j = null;
1265
+ function ui(e) {
1266
+ j = e;
1264
1267
  }
1265
- var Or = 1, ce = 0, fe = ce;
1266
- function Wt(e) {
1267
- fe = e;
1268
+ var Or = 1, ce = 0, he = ce;
1269
+ function Ut(e) {
1270
+ he = e;
1268
1271
  }
1269
- function Fr() {
1272
+ function Mr() {
1270
1273
  return ++Or;
1271
1274
  }
1272
- function He(e) {
1275
+ function je(e) {
1273
1276
  var t = e.f;
1274
1277
  if ((t & 2048) !== 0) return !0;
1275
- if (t & 2 && (e.f &= ~De), (t & 4096) !== 0) {
1278
+ if ((t & 4096) !== 0) {
1276
1279
  for (var r = e.deps, n = r.length, i = 0; i < n; i++) {
1277
- var a = r[i];
1278
- if (He(a) && gr(a), a.wv > e.wv) return !0;
1280
+ var s = r[i];
1281
+ if (je(s) && fr(s), s.wv > e.wv) return !0;
1279
1282
  }
1280
- (t & 512) !== 0 && R === null && $(e, U);
1283
+ (t & 512) !== 0 && R === null && E(e, P);
1281
1284
  }
1282
1285
  return !1;
1283
1286
  }
1284
- function Hr(e, t, r = !0) {
1287
+ function Rr(e, t, r = !0) {
1285
1288
  var n = e.reactions;
1286
- if (n !== null && !(!ne && Q !== null && Q.has(e)))
1289
+ if (n !== null && !(!le && K !== null && K.has(e)))
1287
1290
  for (var i = 0; i < n.length; i++) {
1288
- var a = n[i];
1289
- (a.f & 2) !== 0 ? Hr(a, t, !1) : t === a && (r ? $(a, N) : (a.f & 1024) !== 0 && $(a, de), Lt(a));
1291
+ var s = n[i];
1292
+ (s.f & 2) !== 0 ? Rr(s, t, !1) : t === s && (r ? E(s, H) : (s.f & 1024) !== 0 && E(s, ve), At(s));
1290
1293
  }
1291
1294
  }
1292
- function Ur(e) {
1293
- var t = L, r = I, n = F, i = y, a = Q, o = E, s = q, l = fe, h = e.f;
1294
- L = null, I = 0, F = null, y = (h & 96) === 0 ? e : null, Q = null, we(e.ctx), q = !1, fe = ++ce, e.ac !== null && (it(() => {
1295
- e.ac.abort(Ne);
1295
+ function Cr(e) {
1296
+ var t = I, r = q, n = j, i = y, s = K, l = S, a = z, c = he, v = e.f;
1297
+ I = null, q = 0, j = null, y = (v & 96) === 0 ? e : null, K = null, be(e.ctx), z = !1, he = ++ce, e.ac !== null && (tt(() => {
1298
+ e.ac.abort(Le);
1296
1299
  }), e.ac = null);
1297
1300
  try {
1298
- e.f |= zt;
1299
- var _ = e.fn, f = _();
1300
- e.f |= At;
1301
- var u = Kt(e);
1302
- if (Oe() && F !== null && !q && u !== null && (e.f & 6146) === 0) for (var c = 0; c < F.length; c++) Hr(F[c], e);
1301
+ e.f |= Ht;
1302
+ var g = e.fn, u = g();
1303
+ e.f |= yt;
1304
+ var f = Ft(e);
1305
+ if (qe() && j !== null && !z && f !== null && (e.f & 6146) === 0) for (var o = 0; o < j.length; o++) Rr(j[o], e);
1303
1306
  if (i !== null && i !== e) {
1304
1307
  if (ce++, i.deps !== null) for (let d = 0; d < r; d += 1) i.deps[d].rv = ce;
1305
1308
  if (t !== null) for (const d of t) d.rv = ce;
1306
- F !== null && (n === null ? n = F : n.push(...F));
1309
+ j !== null && (n === null ? n = j : n.push(...j));
1307
1310
  }
1308
- return (e.f & 8388608) !== 0 && (e.f ^= Ze), f;
1311
+ return (e.f & 8388608) !== 0 && (e.f ^= We), u;
1309
1312
  } catch (d) {
1310
- return Kt(e), ci(d);
1313
+ return Ft(e), Qn(d);
1311
1314
  } finally {
1312
- e.f ^= zt, L = t, I = r, F = n, y = i, Q = a, we(o), q = s, fe = l;
1315
+ e.f ^= Ht, I = t, q = r, j = n, y = i, K = s, be(l), z = a, he = c;
1313
1316
  }
1314
1317
  }
1315
- function Kt(e) {
1318
+ function Ft(e) {
1316
1319
  var t = e.deps, r = m?.is_fork;
1317
- if (L !== null) {
1320
+ if (I !== null) {
1318
1321
  var n;
1319
- if (r || Le(e, I), t !== null && I > 0)
1320
- for (t.length = I + L.length, n = 0; n < L.length; n++) t[I + n] = L[n];
1321
- else e.deps = t = L;
1322
- if (Dt() && (e.f & 512) !== 0) for (n = I; n < t.length; n++) (t[n].reactions ??= []).push(e);
1323
- } else !r && t !== null && I < t.length && (Le(e, I), t.length = I);
1322
+ if (r || Ne(e, q), t !== null && q > 0)
1323
+ for (t.length = q + I.length, n = 0; n < I.length; n++) t[q + n] = I[n];
1324
+ else e.deps = t = I;
1325
+ if (Rt() && (e.f & 512) !== 0) for (n = q; n < t.length; n++) (t[n].reactions ??= []).push(e);
1326
+ } else !r && t !== null && q < t.length && (Ne(e, q), t.length = q);
1324
1327
  return t;
1325
1328
  }
1326
- function bi(e, t) {
1329
+ function ci(e, t) {
1327
1330
  let r = t.reactions;
1328
1331
  if (r !== null) {
1329
- var n = un.call(r, e);
1332
+ var n = tn.call(r, e);
1330
1333
  if (n !== -1) {
1331
1334
  var i = r.length - 1;
1332
1335
  i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
1333
1336
  }
1334
1337
  }
1335
- if (r === null && (t.f & 2) !== 0 && (L === null || !Je.call(L, t))) {
1336
- var a = t;
1337
- (a.f & 512) !== 0 && (a.f ^= 512, a.f &= ~De), a.v !== x && Pt(a), a.ac !== null && it(() => {
1338
- a.ac.abort(Ne), a.ac = null, $(a, N);
1339
- }), Jn(a), Le(a, 0);
1338
+ if (r === null && (t.f & 2) !== 0 && (I === null || !Ge.call(I, t))) {
1339
+ var s = t;
1340
+ (s.f & 512) !== 0 && (s.f ^= 512), s.v !== A && Et(s), s.ac !== null && tt(() => {
1341
+ s.ac.abort(Le), s.ac = null, E(s, H);
1342
+ }), Vn(s), Ne(s, 0);
1340
1343
  }
1341
1344
  }
1342
- function Le(e, t) {
1345
+ function Ne(e, t) {
1343
1346
  var r = e.deps;
1344
1347
  if (r !== null)
1345
- for (var n = t; n < r.length; n++) bi(e, r[n]);
1348
+ for (var n = t; n < r.length; n++) ci(e, r[n]);
1346
1349
  }
1347
- function be(e) {
1350
+ function $e(e) {
1348
1351
  var t = e.f;
1349
1352
  if ((t & 16384) === 0) {
1350
- $(e, U);
1351
- var r = g, n = Ye;
1352
- if (g = e, Ye = (t & 96) === 0, 0)
1353
- var i, a;
1353
+ E(e, P);
1354
+ var r = p, n = Fe;
1355
+ if (p = e, Fe = (t & 96) === 0, 0)
1356
+ var i, s;
1354
1357
  try {
1355
- (t & 16777232) !== 0 ? gi(e) : Ot(e), Mr(e);
1356
- var o = Ur(e);
1357
- if (e.teardown = typeof o == "function" ? o : null, e.wv = Or, 0)
1358
- for (var s of e.deps) ;
1358
+ (t & 16777232) !== 0 ? li(e) : It(e), kr(e);
1359
+ var l = Cr(e);
1360
+ if (e.teardown = typeof l == "function" ? l : null, e.wv = Or, 0)
1361
+ for (var a of e.deps) ;
1359
1362
  } finally {
1360
- Ye = n, g = r;
1363
+ Fe = n, p = r;
1361
1364
  }
1362
1365
  }
1363
1366
  }
1364
- function p(e) {
1367
+ function h(e) {
1365
1368
  var t = (e.f & 2) !== 0;
1366
- if (yi?.add(e), y !== null && !q && !(g !== null && (g.f & 16384) !== 0) && (Q === null || !Q.has(e))) {
1369
+ if (fi?.add(e), y !== null && !z && !(p !== null && (p.f & 16384) !== 0) && (K === null || !K.has(e))) {
1367
1370
  var r = y.deps;
1368
1371
  if ((y.f & 2097152) !== 0)
1369
- e.rv < ce && (e.rv = ce, L === null && r !== null && r[I] === e ? I++ : L === null ? L = [e] : L.push(e));
1372
+ e.rv < ce && (e.rv = ce, I === null && r !== null && r[q] === e ? q++ : I === null ? I = [e] : I.push(e));
1370
1373
  else {
1371
- y.deps ??= [], Je.call(y.deps, e) || y.deps.push(e);
1374
+ y.deps ??= [], Ge.call(y.deps, e) || y.deps.push(e);
1372
1375
  var n = e.reactions;
1373
- n === null ? e.reactions = [y] : Je.call(n, y) || n.push(y);
1376
+ n === null ? e.reactions = [y] : Ge.call(n, y) || n.push(y);
1374
1377
  }
1375
1378
  }
1376
1379
  if (0) {
1377
- if (!q && reactivity_loss_tracker && m === null && pt === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1380
+ if (!z && reactivity_loss_tracker && m === null && ut === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1378
1381
  var i;
1379
- if (tracing_mode_flag && !q && tracing_expressions !== null && y !== null && tracing_expressions.reaction === y && !e.trace) {
1382
+ if (tracing_mode_flag && !z && tracing_expressions !== null && y !== null && tracing_expressions.reaction === y && !e.trace) {
1380
1383
  if (i)
1381
- var a, o;
1384
+ var s, l;
1382
1385
  }
1383
1386
  }
1384
- if (ae && J.has(e)) return J.get(e);
1387
+ if (ie && G.has(e)) return G.get(e);
1385
1388
  if (t) {
1386
- var s = e;
1387
- if (ae) {
1388
- var l = s.v;
1389
- return ((s.f & 1024) === 0 && s.reactions !== null || jr(s)) && (l = Rt(s)), J.set(s, l), l;
1389
+ var a = e;
1390
+ if (ie) {
1391
+ var c = a.v;
1392
+ return ((a.f & 1024) === 0 && a.reactions !== null || Nr(a)) && (c = xt(a)), G.set(a, c), c;
1390
1393
  }
1391
- var h = (s.f & 512) === 0 && !q && y !== null && (Ye || (y.f & 512) !== 0), _ = (s.f & At) === 0;
1392
- He(s) && (h && (s.f |= 512), gr(s)), h && !_ && (mr(s), zr(s));
1394
+ var v = (a.f & 512) === 0 && !z && y !== null && (Fe || (y.f & 512) !== 0), g = (a.f & yt) === 0;
1395
+ je(a) && (v && (a.f |= 512), fr(a)), v && !g && (ur(a), Ir(a));
1393
1396
  }
1394
1397
  if (R?.has(e)) return R.get(e);
1395
1398
  if ((e.f & 8388608) !== 0) throw e.v;
1396
1399
  return e.v;
1397
1400
  }
1398
- function zr(e) {
1401
+ function Ir(e) {
1399
1402
  if (e.f |= 512, e.deps !== null)
1400
1403
  for (const t of e.deps)
1401
- (t.reactions ??= []).push(e), (t.f & 2) !== 0 && (t.f & 512) === 0 && (mr(t), zr(t));
1404
+ (t.reactions ??= []).push(e), (t.f & 2) !== 0 && (t.f & 512) === 0 && (ur(t), Ir(t));
1402
1405
  }
1403
- function jr(e) {
1404
- if (e.v === x) return !0;
1406
+ function Nr(e) {
1407
+ if (e.v === A) return !0;
1405
1408
  if (e.deps === null) return !1;
1406
1409
  for (const t of e.deps)
1407
- if (J.has(t) || (t.f & 2) !== 0 && jr(t)) return !0;
1410
+ if (G.has(t) || (t.f & 2) !== 0 && Nr(t)) return !0;
1408
1411
  return !1;
1409
1412
  }
1410
- function Ce(e) {
1411
- var t = q;
1413
+ function rt(e) {
1414
+ var t = z;
1412
1415
  try {
1413
- return q = !0, e();
1416
+ return z = !0, e();
1414
1417
  } finally {
1415
- q = t;
1418
+ z = t;
1416
1419
  }
1417
1420
  }
1418
- var $e = /* @__PURE__ */ Symbol("events"), Br = /* @__PURE__ */ new Set(), yt = /* @__PURE__ */ new Set();
1419
- function Si(e, t, r) {
1420
- (t[$e] ??= {})[e] = r;
1421
+ var xe = /* @__PURE__ */ Symbol("events"), Lr = /* @__PURE__ */ new Set(), _t = /* @__PURE__ */ new Set();
1422
+ function di(e, t, r) {
1423
+ (t[xe] ??= {})[e] = r;
1421
1424
  }
1422
- function Ai(e) {
1423
- for (var t = 0; t < e.length; t++) Br.add(e[t]);
1424
- for (var r of yt) r(e);
1425
+ function hi(e) {
1426
+ for (var t = 0; t < e.length; t++) Lr.add(e[t]);
1427
+ for (var r of _t) r(e);
1425
1428
  }
1426
- var lt = null, ct = !1;
1427
- function Jt(e) {
1428
- var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], a = i[0] || e.target;
1429
- lt = e, ct || (ct = !0, setTimeout(() => {
1430
- ct = !1, lt = null;
1429
+ var st = null, at = !1;
1430
+ function Yt(e) {
1431
+ var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], s = i[0] || e.target;
1432
+ st = e, at || (at = !0, setTimeout(() => {
1433
+ at = !1, st = null;
1431
1434
  }));
1432
- var o = 0, s = lt === e && e[$e];
1433
- if (s) {
1434
- var l = i.indexOf(s);
1435
- if (l !== -1 && (t === document || t === window)) {
1436
- e[$e] = t;
1435
+ var l = 0, a = st === e && e[xe];
1436
+ if (a) {
1437
+ var c = i.indexOf(a);
1438
+ if (c !== -1 && (t === document || t === window)) {
1439
+ e[xe] = t;
1437
1440
  return;
1438
1441
  }
1439
- var h = i.indexOf(t);
1440
- if (h === -1) return;
1441
- l <= h && (o = l);
1442
+ var v = i.indexOf(t);
1443
+ if (v === -1) return;
1444
+ c <= v && (l = c);
1442
1445
  }
1443
- if (a = i[o] || e.target, a !== t) {
1444
- Re(e, "currentTarget", {
1446
+ if (s = i[l] || e.target, s !== t) {
1447
+ Ce(e, "currentTarget", {
1445
1448
  configurable: !0,
1446
1449
  get() {
1447
- return a || r;
1450
+ return s || r;
1448
1451
  }
1449
1452
  });
1450
- var _ = y, f = g;
1451
- z(null), Z(null);
1453
+ var g = y, u = p;
1454
+ V(null), W(null);
1452
1455
  try {
1453
- for (var u, c = []; a !== null && a !== t; ) {
1456
+ for (var f, o = []; s !== null && s !== t; ) {
1454
1457
  try {
1455
- var d = a[$e]?.[n];
1456
- d != null && (!a.disabled || e.target === a) && d.call(a, e);
1457
- } catch (v) {
1458
- u ? c.push(v) : u = v;
1458
+ var d = s[xe]?.[n];
1459
+ d != null && (!s.disabled || e.target === s) && d.call(s, e);
1460
+ } catch (_) {
1461
+ f ? o.push(_) : f = _;
1459
1462
  }
1460
1463
  if (e.cancelBubble) break;
1461
- o++, a = o < i.length ? i[o] : null;
1464
+ l++, s = l < i.length ? i[l] : null;
1462
1465
  }
1463
- if (u) {
1464
- for (let v of c) queueMicrotask(() => {
1465
- throw v;
1466
+ if (f) {
1467
+ for (let _ of o) queueMicrotask(() => {
1468
+ throw _;
1466
1469
  });
1467
- throw u;
1470
+ throw f;
1468
1471
  }
1469
1472
  } finally {
1470
- e[$e] = t, delete e.currentTarget, z(_), Z(f);
1473
+ e[xe] = t, delete e.currentTarget, V(g), W(u);
1471
1474
  }
1472
1475
  }
1473
1476
  }
1474
- var ki = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1475
- function $i(e) {
1476
- return ki?.createHTML(e) ?? e;
1477
+ var vi = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1478
+ function _i(e) {
1479
+ return vi?.createHTML(e) ?? e;
1477
1480
  }
1478
- function Ti(e) {
1479
- var t = Ct("template");
1480
- return t.innerHTML = $i(e.replaceAll("<!>", "<!---->")), t.content;
1481
+ function pi(e) {
1482
+ var t = Ot("template");
1483
+ return t.innerHTML = _i(e.replaceAll("<!>", "<!---->")), t.content;
1481
1484
  }
1482
- function me(e, t) {
1483
- var r = g;
1485
+ function ye(e, t) {
1486
+ var r = p;
1484
1487
  r.nodes === null && (r.nodes = {
1485
1488
  start: e,
1486
1489
  end: t,
@@ -1489,35 +1492,35 @@ function me(e, t) {
1489
1492
  });
1490
1493
  }
1491
1494
  // @__NO_SIDE_EFFECTS__
1492
- function Ei(e, t) {
1493
- var r = (t & 1) !== 0, n = (t & 2) !== 0, i, a = !e.startsWith("<!>");
1495
+ function gi(e, t) {
1496
+ var r = (t & 1) !== 0, n = (t & 2) !== 0, i, s = !e.startsWith("<!>");
1494
1497
  return () => {
1495
1498
  if (k)
1496
- return me(b, null), b;
1497
- i === void 0 && (i = Ti(a ? e : "<!>" + e), r || (i = /* @__PURE__ */ he(i)));
1498
- var o = n || kr ? document.importNode(i, !0) : i.cloneNode(!0);
1499
+ return ye(w, null), w;
1500
+ i === void 0 && (i = pi(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ _e(i)));
1501
+ var l = n || pr ? document.importNode(i, !0) : i.cloneNode(!0);
1499
1502
  if (r) {
1500
- var s = /* @__PURE__ */ he(o), l = o.lastChild;
1501
- me(s, l);
1502
- } else me(o, o);
1503
- return o;
1503
+ var a = /* @__PURE__ */ _e(l), c = l.lastChild;
1504
+ ye(a, c);
1505
+ } else ye(l, l);
1506
+ return l;
1504
1507
  };
1505
1508
  }
1506
- function xi() {
1509
+ function mi() {
1507
1510
  if (k)
1508
- return me(b, null), b;
1509
- var e = document.createDocumentFragment(), t = document.createComment(""), r = ie();
1510
- return e.append(t, r), me(t, r), e;
1511
+ return ye(w, null), w;
1512
+ var e = document.createDocumentFragment(), t = document.createComment(""), r = ne();
1513
+ return e.append(t, r), ye(t, r), e;
1511
1514
  }
1512
- function wt(e, t) {
1515
+ function pt(e, t) {
1513
1516
  if (k) {
1514
- var r = g;
1515
- ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = b), $t();
1517
+ var r = p;
1518
+ ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = w), bt();
1516
1519
  return;
1517
1520
  }
1518
1521
  e !== null && e.before(t);
1519
1522
  }
1520
- var Pi = [
1523
+ var yi = [
1521
1524
  "allowfullscreen",
1522
1525
  "async",
1523
1526
  "autofocus",
@@ -1546,8 +1549,8 @@ var Pi = [
1546
1549
  "defer",
1547
1550
  "disablepictureinpicture",
1548
1551
  "disableremoteplayback"
1549
- ], ga = [
1550
- ...Pi,
1552
+ ], ts = [
1553
+ ...yi,
1551
1554
  "formNoValidate",
1552
1555
  "isMap",
1553
1556
  "noModule",
@@ -1562,17 +1565,17 @@ var Pi = [
1562
1565
  "allowFullscreen",
1563
1566
  "disablePictureInPicture",
1564
1567
  "disableRemotePlayback"
1565
- ], Ri = ["touchstart", "touchmove"];
1566
- function Mi(e) {
1567
- return Ri.includes(e);
1568
+ ], wi = ["touchstart", "touchmove"];
1569
+ function bi(e) {
1570
+ return wi.includes(e);
1568
1571
  }
1569
- var Li = [
1572
+ var $i = [
1570
1573
  "$state",
1571
1574
  "$state.raw",
1572
1575
  "$derived",
1573
1576
  "$derived.by"
1574
- ], ma = [
1575
- ...Li,
1577
+ ], rs = [
1578
+ ...$i,
1576
1579
  "$state.eager",
1577
1580
  "$state.snapshot",
1578
1581
  "$props",
@@ -1588,82 +1591,82 @@ var Li = [
1588
1591
  "$inspect.trace",
1589
1592
  "$host"
1590
1593
  ];
1591
- function Ci(e) {
1592
- let t = 0, r = Fe(0), n;
1594
+ function ki(e) {
1595
+ let t = 0, r = He(0), n;
1593
1596
  return () => {
1594
- Dt() && (p(r), Nt(() => (t === 0 && (n = Ce(() => e(() => xe(r)))), t += 1, () => {
1595
- le(() => {
1596
- t -= 1, t === 0 && (n?.(), n = void 0, xe(r));
1597
+ Rt() && (h(r), Ct(() => (t === 0 && (n = rt(() => e(() => Me(r)))), t += 1, () => {
1598
+ ue(() => {
1599
+ t -= 1, t === 0 && (n?.(), n = void 0, Me(r));
1597
1600
  });
1598
1601
  })));
1599
1602
  };
1600
1603
  }
1601
- var Ii = kt | Se;
1602
- function Di(e, t, r, n) {
1603
- new Ni(e, t, r, n);
1604
+ var Ti = wt | ke;
1605
+ function Ei(e, t, r, n) {
1606
+ new xi(e, t, r, n);
1604
1607
  }
1605
- var Ni = class {
1608
+ var xi = class {
1606
1609
  parent;
1607
1610
  is_pending = !1;
1608
1611
  transform_error;
1609
1612
  #e;
1610
- #t = k ? b : null;
1613
+ #t = k ? w : null;
1611
1614
  #r;
1612
- #l;
1615
+ #o;
1613
1616
  #i;
1614
- #s = null;
1615
- #n = null;
1616
- #o = null;
1617
1617
  #a = null;
1618
- #p = 0;
1619
- #c = 0;
1618
+ #n = null;
1619
+ #l = null;
1620
+ #s = null;
1621
+ #v = 0;
1622
+ #f = 0;
1620
1623
  #u = !1;
1621
1624
  #d = /* @__PURE__ */ new Set();
1622
- #_ = /* @__PURE__ */ new Set();
1623
- #f = null;
1624
- #y = Ci(() => (this.#f = Fe(this.#p), () => {
1625
- this.#f = null;
1625
+ #p = /* @__PURE__ */ new Set();
1626
+ #c = null;
1627
+ #w = ki(() => (this.#c = He(this.#v), () => {
1628
+ this.#c = null;
1626
1629
  }));
1627
1630
  constructor(e, t, r, n) {
1628
- this.#e = e, this.#r = t, this.#l = (i) => {
1629
- var a = g;
1630
- a.b = this, a.f |= 128, r(i);
1631
- }, this.parent = g.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), this.#i = Rr(() => {
1631
+ this.#e = e, this.#r = t, this.#o = (i) => {
1632
+ var s = p;
1633
+ s.b = this, s.f |= 128, r(i);
1634
+ }, this.parent = p.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), this.#i = $r(() => {
1632
1635
  if (k) {
1633
1636
  const i = this.#t;
1634
- $t();
1635
- const a = i.data === "[!";
1637
+ bt();
1638
+ const s = i.data === "[!";
1636
1639
  if (i.data.startsWith("[?")) {
1637
- const o = JSON.parse(i.data.slice(2));
1638
- this.#w(o);
1639
- } else a ? this.#S() : this.#g();
1640
- } else this.#h();
1641
- }, Ii), k && (this.#e = b);
1640
+ const l = JSON.parse(i.data.slice(2));
1641
+ this.#g(l);
1642
+ } else s ? this.#k() : this.#b();
1643
+ } else this.#$();
1644
+ }, Ti), k && (this.#e = w);
1642
1645
  }
1643
- #g() {
1646
+ #b() {
1644
1647
  try {
1645
- this.#s = re(() => this.#l(this.#e));
1648
+ this.#a = te(() => this.#o(this.#e));
1646
1649
  } catch (e) {
1647
1650
  this.error(e);
1648
1651
  }
1649
1652
  }
1650
- #w(e) {
1651
- const t = this.#r.failed, { reset: r, invoke_onerror: n } = this.#b(e);
1652
- le(n), t && (this.#o = re(() => {
1653
+ #g(e) {
1654
+ const t = this.#r.failed, { reset: r, invoke_onerror: n } = this.#m(e);
1655
+ ue(n), t && (this.#l = te(() => {
1653
1656
  t(this.#e, () => e, () => r);
1654
1657
  }));
1655
1658
  }
1656
- #b(e) {
1659
+ #m(e) {
1657
1660
  var t = !1, r = !1;
1658
1661
  const n = () => {
1659
1662
  if (t) {
1660
- $n();
1663
+ gn();
1661
1664
  return;
1662
1665
  }
1663
- t = !0, r && Hn(), this.#o !== null && Pe(this.#o, () => {
1664
- this.#o = null;
1665
- }), this.#v(() => {
1666
- this.#h();
1666
+ t = !0, r && Rn(), this.#l !== null && Re(this.#l, () => {
1667
+ this.#l = null;
1668
+ }), this.#y(() => {
1669
+ this.#$();
1667
1670
  });
1668
1671
  };
1669
1672
  return {
@@ -1671,55 +1674,55 @@ var Ni = class {
1671
1674
  invoke_onerror: () => {
1672
1675
  try {
1673
1676
  r = !0, this.#r.onerror?.(e, n), r = !1;
1674
- } catch (a) {
1675
- W(a, this.#i && this.#i.parent);
1677
+ } catch (s) {
1678
+ Y(s, this.#i && this.#i.parent);
1676
1679
  }
1677
1680
  }
1678
1681
  };
1679
1682
  }
1680
- #S() {
1683
+ #k() {
1681
1684
  const e = this.#r.pending;
1682
- e && (this.is_pending = !0, this.#n = re(() => e(this.#e)), le(() => {
1683
- var t = this.#a = document.createDocumentFragment(), r = ie(), n = !1;
1684
- if (t.append(r), this.#s = this.#v(() => {
1685
+ e && (this.is_pending = !0, this.#n = te(() => e(this.#e)), ue(() => {
1686
+ var t = this.#s = document.createDocumentFragment(), r = ne(), n = !1;
1687
+ if (t.append(r), this.#a = this.#y(() => {
1685
1688
  try {
1686
- return re(() => this.#l(r));
1689
+ return te(() => this.#o(r));
1687
1690
  } catch (i) {
1688
1691
  try {
1689
1692
  this.error(i), n = !0;
1690
- } catch (a) {
1691
- W(a, this.#i.parent);
1693
+ } catch (s) {
1694
+ Y(s, this.#i.parent);
1692
1695
  }
1693
1696
  return null;
1694
1697
  }
1695
- }), this.#s === null) {
1696
- this.#a = null, n && this.#m(m);
1698
+ }), this.#a === null) {
1699
+ this.#s = null, n && this.#h(m);
1697
1700
  return;
1698
1701
  }
1699
- this.#c === 0 && (this.#e.before(t), this.#a = null, Pe(this.#n, () => {
1702
+ this.#f === 0 && (this.#e.before(t), this.#s = null, Re(this.#n, () => {
1700
1703
  this.#n = null;
1701
- }), this.#m(m));
1704
+ }), this.#h(m));
1702
1705
  }));
1703
1706
  }
1704
- #h() {
1707
+ #$() {
1705
1708
  try {
1706
- if (this.is_pending = this.has_pending_snippet(), this.#c = 0, this.#p = 0, this.#s = re(() => {
1707
- this.#l(this.#e);
1708
- }), this.#c > 0) {
1709
- var e = this.#a = document.createDocumentFragment();
1710
- Dr(this.#s, e);
1709
+ if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#v = 0, this.#a = te(() => {
1710
+ this.#o(this.#e);
1711
+ }), this.#f > 0) {
1712
+ var e = this.#s = document.createDocumentFragment();
1713
+ Sr(this.#a, e);
1711
1714
  const t = this.#r.pending;
1712
- this.#n = re(() => t(this.#e));
1713
- } else this.#m(m);
1715
+ this.#n = te(() => t(this.#e));
1716
+ } else this.#h(m);
1714
1717
  } catch (t) {
1715
1718
  this.error(t);
1716
1719
  }
1717
1720
  }
1718
- #m(e) {
1719
- this.is_pending = !1, e.transfer_effects(this.#d, this.#_);
1721
+ #h(e) {
1722
+ this.is_pending = !1, e.transfer_effects(this.#d, this.#p);
1720
1723
  }
1721
1724
  defer_effect(e) {
1722
- vr(e, this.#d, this.#_);
1725
+ ar(e, this.#d, this.#p);
1723
1726
  }
1724
1727
  is_rendered() {
1725
1728
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -1727,366 +1730,375 @@ var Ni = class {
1727
1730
  has_pending_snippet() {
1728
1731
  return !!this.#r.pending;
1729
1732
  }
1730
- #v(e) {
1731
- var t = g, r = y, n = E;
1732
- Z(this.#i), z(this.#i), we(this.#i.ctx);
1733
+ #y(e) {
1734
+ var t = p, r = y, n = S;
1735
+ W(this.#i), V(this.#i), be(this.#i.ctx);
1733
1736
  try {
1734
- return Ae.ensure(), e();
1737
+ return Te.ensure(), e();
1735
1738
  } finally {
1736
- Z(t), z(r), we(n);
1739
+ W(t), V(r), be(n);
1737
1740
  }
1738
1741
  }
1739
- #A(e, t) {
1742
+ #_(e, t) {
1740
1743
  if (!this.has_pending_snippet()) {
1741
- this.parent && this.parent.#A(e, t);
1744
+ this.parent && this.parent.#_(e, t);
1742
1745
  return;
1743
1746
  }
1744
- this.#c += e, this.#c === 0 && (this.#m(t), this.#n && Pe(this.#n, () => {
1747
+ this.#f += e, this.#f === 0 && (this.#h(t), this.#n && Re(this.#n, () => {
1745
1748
  this.#n = null;
1746
- }), this.#a && (this.#e.before(this.#a), this.#a = null));
1749
+ }), this.#s && (this.#e.before(this.#s), this.#s = null));
1747
1750
  }
1748
1751
  update_pending_count(e, t) {
1749
- this.#A(e, t), this.#p += e, !(!this.#f || this.#u) && (this.#u = !0, le(() => {
1750
- this.#u = !1, this.#f && tt(this.#f, this.#p);
1752
+ this.#_(e, t), this.#v += e, !(!this.#c || this.#u) && (this.#u = !0, ue(() => {
1753
+ this.#u = !1, this.#c && Je(this.#c, this.#v);
1751
1754
  }));
1752
1755
  }
1753
1756
  get_effect_pending() {
1754
- return this.#y(), p(this.#f);
1757
+ return this.#w(), h(this.#c);
1755
1758
  }
1756
1759
  error(e) {
1757
1760
  if (!this.#r.onerror && !this.#r.failed) throw e;
1758
- m?.is_fork ? (this.#s && m.skip_effect(this.#s), this.#n && m.skip_effect(this.#n), this.#o && m.skip_effect(this.#o), m.oncommit(() => {
1759
- this.#k(e);
1760
- })) : this.#k(e);
1761
+ m?.is_fork ? (this.#a && m.skip_effect(this.#a), this.#n && m.skip_effect(this.#n), this.#l && m.skip_effect(this.#l), m.oncommit(() => {
1762
+ this.#T(e);
1763
+ })) : this.#T(e);
1761
1764
  }
1762
- #k(e) {
1763
- this.#s && (C(this.#s), this.#s = null), this.#n && (C(this.#n), this.#n = null), this.#o && (C(this.#o), this.#o = null), k && (G(this.#t), Tn(), G(cr()));
1765
+ #T(e) {
1766
+ this.#a && (N(this.#a), this.#a = null), this.#n && (N(this.#n), this.#n = null), this.#l && (N(this.#l), this.#l = null), k && (U(this.#t), mn(), U(rr()));
1764
1767
  let t = this.#r.failed;
1765
1768
  const r = (n) => {
1766
- const { reset: i, invoke_onerror: a } = this.#b(n);
1767
- a(), t && (this.#o = this.#v(() => {
1769
+ const { reset: i, invoke_onerror: s } = this.#m(n);
1770
+ s(), t && (this.#l = this.#y(() => {
1768
1771
  try {
1769
- return re(() => {
1770
- var o = g;
1771
- o.b = this, o.f |= 128, t(this.#e, () => n, () => i);
1772
+ return te(() => {
1773
+ var l = p;
1774
+ l.b = this, l.f |= 128, t(this.#e, () => n, () => i);
1772
1775
  });
1773
- } catch (o) {
1774
- return W(o, this.#i.parent), null;
1776
+ } catch (l) {
1777
+ return Y(l, this.#i.parent), null;
1775
1778
  }
1776
1779
  }));
1777
1780
  };
1778
- le(() => {
1781
+ ue(() => {
1779
1782
  var n;
1780
1783
  try {
1781
1784
  n = this.transform_error(e);
1782
1785
  } catch (i) {
1783
- W(i, this.#i && this.#i.parent);
1786
+ Y(i, this.#i && this.#i.parent);
1784
1787
  return;
1785
1788
  }
1786
- n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => W(i, this.#i && this.#i.parent)) : r(n);
1789
+ n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => Y(i, this.#i && this.#i.parent)) : r(n);
1787
1790
  });
1788
1791
  }
1789
- }, Qt = !0;
1790
- function Oi(e, t) {
1792
+ }, Gt = !0;
1793
+ function Si(e, t) {
1791
1794
  var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
1792
- r !== (e[vt] ??= e.nodeValue) && (e[vt] = r, e.nodeValue = `${r}`);
1795
+ r !== (e[ft] ??= e.nodeValue) && (e[ft] = r, e.nodeValue = `${r}`);
1793
1796
  }
1794
- function Vr(e, t) {
1795
- return qr(e, t);
1797
+ function qr(e, t) {
1798
+ return Hr(e, t);
1796
1799
  }
1797
- function Fi(e, t) {
1798
- mt(), t.intro = t.intro ?? !1;
1799
- const r = t.target, n = k, i = b;
1800
+ function Ai(e, t) {
1801
+ vt(), t.intro = t.intro ?? !1;
1802
+ const r = t.target, n = k, i = w;
1800
1803
  try {
1801
- for (var a = /* @__PURE__ */ he(r); a && (a.nodeType !== 8 || a.data !== "["); ) a = /* @__PURE__ */ se(a);
1802
- if (!a) throw ye;
1803
- pe(!0), G(a);
1804
- const o = qr(e, {
1804
+ for (var s = /* @__PURE__ */ _e(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ se(s);
1805
+ if (!s) throw we;
1806
+ ge(!0), U(s);
1807
+ const l = Hr(e, {
1805
1808
  ...t,
1806
- anchor: a
1809
+ anchor: s
1807
1810
  });
1808
- return pe(!1), o;
1809
- } catch (o) {
1810
- if (o instanceof Error && o.message.split(`
1811
- `).some((s) => s.startsWith("https://svelte.dev/e/"))) throw o;
1812
- return o !== ye && console.warn("Failed to hydrate: ", o), t.recover === !1 && In(), mt(), oi(r), pe(!1), Vr(e, t);
1811
+ return ge(!1), l;
1812
+ } catch (l) {
1813
+ if (l instanceof Error && l.message.split(`
1814
+ `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw l;
1815
+ return l !== we && console.warn("Failed to hydrate: ", l), t.recover === !1 && xn(), vt(), Zn(r), ge(!1), qr(e, t);
1813
1816
  } finally {
1814
- pe(n), G(i);
1815
- }
1816
- }
1817
- var Be = /* @__PURE__ */ new Map();
1818
- function qr(e, { target: t, anchor: r, props: n = {}, events: i, context: a, intro: o = !0, transformError: s }) {
1819
- mt();
1820
- var l = void 0, h = vi(() => {
1821
- var _ = r ?? t.appendChild(ie());
1822
- Di(_, { pending: () => {
1823
- } }, (c) => {
1824
- Tt({});
1825
- var d = E;
1826
- if (a && (d.c = a), i && (n.$$events = i), k && me(c, null), Qt = o, l = e(c, n) || xt(), Qt = !0, k && (g.nodes.end = b, b === null || b.nodeType !== 8 || b.data !== "]"))
1827
- throw rt(), ye;
1828
- Et();
1829
- }, s);
1830
- var f = /* @__PURE__ */ new Set(), u = (c) => {
1831
- for (var d = 0; d < c.length; d++) {
1832
- var v = c[d];
1833
- if (!f.has(v)) {
1834
- f.add(v);
1835
- var S = Mi(v);
1836
- for (const j of [t, document]) {
1837
- var A = Be.get(j);
1838
- A === void 0 && (A = /* @__PURE__ */ new Map(), Be.set(j, A));
1839
- var P = A.get(v);
1840
- P === void 0 ? (j.addEventListener(v, Jt, { passive: S }), A.set(v, 1)) : A.set(v, P + 1);
1817
+ ge(n), U(i);
1818
+ }
1819
+ }
1820
+ var De = /* @__PURE__ */ new Map();
1821
+ function Hr(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: l = !0, transformError: a }) {
1822
+ vt();
1823
+ var c = void 0, v = ii(() => {
1824
+ var g = r ?? t.appendChild(ne());
1825
+ Ei(g, { pending: () => {
1826
+ } }, (o) => {
1827
+ $t({});
1828
+ var d = S;
1829
+ if (s && (d.c = s), i && (n.$$events = i), k && ye(o, null), Gt = l, c = e(o, n) || Tt(), Gt = !0, k && (p.nodes.end = w, w === null || w.nodeType !== 8 || w.data !== "]"))
1830
+ throw Qe(), we;
1831
+ kt();
1832
+ }, a);
1833
+ var u = /* @__PURE__ */ new Set(), f = (o) => {
1834
+ for (var d = 0; d < o.length; d++) {
1835
+ var _ = o[d];
1836
+ if (!u.has(_)) {
1837
+ u.add(_);
1838
+ var T = bi(_);
1839
+ for (const D of [t, document]) {
1840
+ var b = De.get(D);
1841
+ b === void 0 && (b = /* @__PURE__ */ new Map(), De.set(D, b));
1842
+ var O = b.get(_);
1843
+ O === void 0 ? (D.addEventListener(_, Yt, { passive: T }), b.set(_, 1)) : b.set(_, O + 1);
1841
1844
  }
1842
1845
  }
1843
1846
  }
1844
1847
  };
1845
- return u(fn(Br)), yt.add(u), () => {
1846
- for (var c of f) for (const S of [t, document]) {
1847
- var d = Be.get(S), v = d.get(c);
1848
- --v == 0 ? (S.removeEventListener(c, Jt), d.delete(c), d.size === 0 && Be.delete(S)) : d.set(c, v);
1848
+ return f(rn(Lr)), _t.add(f), () => {
1849
+ for (var o of u) for (const T of [t, document]) {
1850
+ var d = De.get(T), _ = d.get(o);
1851
+ --_ == 0 ? (T.removeEventListener(o, Yt), d.delete(o), d.size === 0 && De.delete(T)) : d.set(o, _);
1849
1852
  }
1850
- yt.delete(u), _ !== r && _.parentNode?.removeChild(_);
1853
+ _t.delete(f), g !== r && g.parentNode?.removeChild(g);
1851
1854
  };
1852
1855
  });
1853
- return bt.set(l, h), l;
1856
+ return gt.set(c, v), c;
1854
1857
  }
1855
- var bt = /* @__PURE__ */ new WeakMap();
1856
- function Hi(e, t) {
1857
- const r = bt.get(e);
1858
- return r ? (bt.delete(e), r(t)) : Promise.resolve();
1858
+ var gt = /* @__PURE__ */ new WeakMap();
1859
+ function Oi(e, t) {
1860
+ const r = gt.get(e);
1861
+ return r ? (gt.delete(e), r(t)) : Promise.resolve();
1859
1862
  }
1860
- var Ui = class {
1863
+ var Mi = class {
1861
1864
  anchor;
1862
1865
  #e = /* @__PURE__ */ new Map();
1863
1866
  #t = /* @__PURE__ */ new Map();
1864
1867
  #r = /* @__PURE__ */ new Map();
1865
- #l = /* @__PURE__ */ new Set();
1868
+ #o = /* @__PURE__ */ new Set();
1866
1869
  #i = !0;
1867
1870
  constructor(e, t = !0) {
1868
1871
  this.anchor = e, this.#i = t;
1869
1872
  }
1870
- #s = (e) => {
1873
+ #a = (e) => {
1871
1874
  if (this.#e.has(e)) {
1872
1875
  var t = this.#e.get(e), r = this.#t.get(t);
1873
1876
  if (r)
1874
- Gt(r), this.#l.delete(t);
1877
+ Bt(r), this.#o.delete(t);
1875
1878
  else {
1876
1879
  var n = this.#r.get(t);
1877
- n && (Gt(n.effect), this.#t.set(t, n.effect), this.#r.delete(t), n.fragment.lastChild.remove(), this.anchor.before(n.fragment), r = n.effect);
1880
+ n && (Bt(n.effect), this.#t.set(t, n.effect), this.#r.delete(t), n.fragment.lastChild.remove(), this.anchor.before(n.fragment), r = n.effect);
1878
1881
  }
1879
- for (const [i, a] of this.#e) {
1882
+ for (const [i, s] of this.#e) {
1880
1883
  if (this.#e.delete(i), i === e) break;
1881
- const o = this.#r.get(a);
1882
- o && (C(o.effect), this.#r.delete(a));
1884
+ const l = this.#r.get(s);
1885
+ l && (N(l.effect), this.#r.delete(s));
1883
1886
  }
1884
- for (const [i, a] of this.#t) {
1885
- if (i === t || this.#l.has(i)) continue;
1886
- const o = () => {
1887
+ for (const [i, s] of this.#t) {
1888
+ if (i === t || this.#o.has(i)) continue;
1889
+ const l = () => {
1887
1890
  if (Array.from(this.#e.values()).includes(i)) {
1888
- var s = document.createDocumentFragment();
1889
- Dr(a, s), s.append(ie()), this.#r.set(i, {
1890
- effect: a,
1891
- fragment: s
1891
+ var a = document.createDocumentFragment();
1892
+ Sr(s, a), a.append(ne()), this.#r.set(i, {
1893
+ effect: s,
1894
+ fragment: a
1892
1895
  });
1893
- } else C(a);
1894
- this.#l.delete(i), this.#t.delete(i);
1896
+ } else N(s);
1897
+ this.#o.delete(i), this.#t.delete(i);
1895
1898
  };
1896
- this.#i || !r ? (this.#l.add(i), Pe(a, o, !1)) : o();
1899
+ this.#i || !r ? (this.#o.add(i), Re(s, l, !1)) : l();
1897
1900
  }
1898
1901
  }
1899
1902
  };
1900
1903
  #n = (e) => {
1901
1904
  this.#e.delete(e);
1902
1905
  const t = Array.from(this.#e.values());
1903
- for (const [r, n] of this.#r) t.includes(r) || (C(n.effect), this.#r.delete(r));
1906
+ for (const [r, n] of this.#r) t.includes(r) || (N(n.effect), this.#r.delete(r));
1904
1907
  };
1905
1908
  ensure(e, t) {
1906
- var r = m, n = li();
1909
+ var r = m, n = Jn();
1907
1910
  if (t && !this.#t.has(e) && !this.#r.has(e))
1908
1911
  if (n) {
1909
- var i = document.createDocumentFragment(), a = ie();
1910
- i.append(a), this.#r.set(e, {
1911
- effect: re(() => t(a)),
1912
+ var i = document.createDocumentFragment(), s = ne();
1913
+ i.append(s), this.#r.set(e, {
1914
+ effect: te(() => t(s)),
1912
1915
  fragment: i
1913
1916
  });
1914
- } else this.#t.set(e, re(() => t(this.anchor)));
1917
+ } else this.#t.set(e, te(() => t(this.anchor)));
1915
1918
  if (this.#e.set(r, e), n) {
1916
- for (const [o, s] of this.#t) o === e ? r.unskip_effect(s) : r.skip_effect(s);
1917
- for (const [o, s] of this.#r) o === e ? r.unskip_effect(s.effect) : r.skip_effect(s.effect);
1918
- r.oncommit(this.#s), r.ondiscard(this.#n);
1919
+ for (const [l, a] of this.#t) l === e ? r.unskip_effect(a) : r.skip_effect(a);
1920
+ for (const [l, a] of this.#r) l === e ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
1921
+ r.oncommit(this.#a), r.ondiscard(this.#n);
1919
1922
  } else
1920
- k && (this.anchor = b), this.#s(r);
1923
+ k && (this.anchor = w), this.#a(r);
1921
1924
  }
1922
1925
  };
1923
- function zi(e, t, r = !1) {
1926
+ function Ri(e, t, r = !1) {
1924
1927
  var n;
1925
- k && (n = b, $t());
1926
- var i = new Ui(e), a = r ? kt : 0;
1927
- function o(s, l) {
1928
+ k && (n = w, bt());
1929
+ var i = new Mi(e), s = r ? wt : 0;
1930
+ function l(a, c) {
1928
1931
  if (k) {
1929
- var h = En(n);
1930
- if (s !== parseInt(h.substring(1))) {
1931
- var _ = cr();
1932
- G(_), i.anchor = _, pe(!1), i.ensure(s, l), pe(!0);
1932
+ var v = yn(n);
1933
+ if (a !== parseInt(v.substring(1))) {
1934
+ var g = rr();
1935
+ U(g), i.anchor = g, ge(!1), i.ensure(a, c), ge(!0);
1933
1936
  return;
1934
1937
  }
1935
1938
  }
1936
- i.ensure(s, l);
1939
+ i.ensure(a, c);
1937
1940
  }
1938
- Rr(() => {
1939
- var s = !1;
1940
- t((l, h = 0) => {
1941
- s = !0, o(h, l);
1942
- }), s || o(-1, null);
1943
- }, a);
1941
+ $r(() => {
1942
+ var a = !1;
1943
+ t((c, v = 0) => {
1944
+ a = !0, l(v, c);
1945
+ }), a || l(-1, null);
1946
+ }, s);
1944
1947
  }
1945
- function ji(e, t) {
1946
- Pr(() => {
1947
- e = g?.parent?.nodes?.start ?? e;
1948
+ function Ci(e, t) {
1949
+ br(() => {
1950
+ e = p?.parent?.nodes?.start ?? e;
1948
1951
  var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
1949
1952
  if (!n.querySelector("#" + t.hash)) {
1950
- const i = Ct("style");
1953
+ const i = Ot("style");
1951
1954
  i.id = t.hash, i.textContent = t.code, n.appendChild(i);
1952
1955
  }
1953
1956
  });
1954
1957
  }
1955
- var Zt = [...`
1958
+ var Kt = [...`
1956
1959
  \r\f \v\uFEFF`];
1957
- function Bi(e, t, r) {
1960
+ function Ii(e, t, r) {
1958
1961
  var n = e == null ? "" : "" + e;
1959
1962
  if (t && (n = n ? n + " " + t : t), r) {
1960
1963
  for (var i of Object.keys(r)) if (r[i]) n = n ? n + " " + i : i;
1961
1964
  else if (n.length)
1962
- for (var a = i.length, o = 0; (o = n.indexOf(i, o)) >= 0; ) {
1963
- var s = o + a;
1964
- (o === 0 || Zt.includes(n[o - 1])) && (s === n.length || Zt.includes(n[s])) ? n = (o === 0 ? "" : n.substring(0, o)) + n.substring(s + 1) : o = s;
1965
+ for (var s = i.length, l = 0; (l = n.indexOf(i, l)) >= 0; ) {
1966
+ var a = l + s;
1967
+ (l === 0 || Kt.includes(n[l - 1])) && (a === n.length || Kt.includes(n[a])) ? n = (l === 0 ? "" : n.substring(0, l)) + n.substring(a + 1) : l = a;
1965
1968
  }
1966
1969
  }
1967
1970
  return n === "" ? null : n;
1968
1971
  }
1969
- function Vi(e, t, r, n, i, a) {
1970
- var o = e[ht];
1971
- if (k || o !== r || o === void 0) {
1972
- var s = Bi(r, n, a);
1973
- (!k || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e[ht] = r;
1974
- } else if (a && i !== a) for (var l in a) {
1975
- var h = !!a[l];
1976
- (i == null || h !== !!i[l]) && e.classList.toggle(l, h);
1977
- }
1978
- return a;
1979
- }
1980
- var qi = /* @__PURE__ */ Symbol("is custom element"), Gi = /* @__PURE__ */ Symbol("is html"), Yi = An ? "link" : "LINK";
1981
- function Ve(e, t, r, n) {
1982
- var i = Wi(e);
1983
- if (k && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Yi)) {
1972
+ function Ni(e, t, r, n, i, s) {
1973
+ var l = e[ot];
1974
+ if (k || l !== r || l === void 0) {
1975
+ var a = Ii(r, n, s);
1976
+ (!k || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : t ? e.className = a : e.setAttribute("class", a)), e[ot] = r;
1977
+ } else if (s && i !== s) for (var c in s) {
1978
+ var v = !!s[c];
1979
+ (i == null || v !== !!i[c]) && e.classList.toggle(c, v);
1980
+ }
1981
+ return s;
1982
+ }
1983
+ var Li = /* @__PURE__ */ Symbol("is custom element"), qi = /* @__PURE__ */ Symbol("is html"), Hi = _n ? "link" : "LINK";
1984
+ function Be(e, t, r, n) {
1985
+ var i = ji(e);
1986
+ if (k && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Hi)) {
1984
1987
  n || void 0;
1985
1988
  return;
1986
1989
  }
1987
- i[t] !== (i[t] = r) && (t === "loading" && (e[wn] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ki(e).has(t) ? e[t] = r : e.setAttribute(t, r));
1990
+ i[t] !== (i[t] = r) && (t === "loading" && (e[dn] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Pi(e).has(t) ? e[t] = r : e.setAttribute(t, r));
1988
1991
  }
1989
- function Wi(e) {
1990
- return e[or] ??= {
1991
- [qi]: e.nodeName.includes("-"),
1992
- [Gi]: e.namespaceURI === ln
1992
+ function ji(e) {
1993
+ return e[er] ??= {
1994
+ [Li]: e.nodeName.includes("-"),
1995
+ [qi]: e.namespaceURI === Qr
1993
1996
  };
1994
1997
  }
1995
- var Xt = /* @__PURE__ */ new Map();
1996
- function Ki(e) {
1997
- var t = e.getAttribute("is") || e.nodeName, r = Xt.get(t);
1998
+ var Wt = /* @__PURE__ */ new Map();
1999
+ function Pi(e) {
2000
+ var t = e.getAttribute("is") || e.nodeName, r = Wt.get(t);
1998
2001
  if (r) return r;
1999
- Xt.set(t, r = /* @__PURE__ */ new Set());
2000
- for (var n, i = e, a = Element.prototype; a !== i; ) {
2001
- n = dn(i);
2002
- for (var o in n) n[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && r.add(o);
2003
- i = nr(i);
2002
+ Wt.set(t, r = /* @__PURE__ */ new Set());
2003
+ for (var n, i = e, s = Element.prototype; s !== i; ) {
2004
+ n = nn(i);
2005
+ for (var l in n) n[l].set && l !== "innerHTML" && l !== "textContent" && l !== "innerText" && r.add(l);
2006
+ i = Xt(i);
2004
2007
  }
2005
2008
  return r;
2006
2009
  }
2007
- function ut(e, t) {
2008
- return e === t || e?.[Te] === t;
2010
+ function lt(e, t) {
2011
+ return e === t || e?.[Se] === t;
2009
2012
  }
2010
- function Ji(e = xt(), t, r, n) {
2011
- var i = E.r, a = g;
2012
- return Pr(() => {
2013
- var o, s;
2014
- return Nt(() => {
2015
- o = s, s = n?.() || [], Ce(() => {
2016
- ut(r(...s), e) || (t(e, ...s), o && ut(r(...o), e) && t(null, ...o));
2013
+ function Vi(e = Tt(), t, r, n) {
2014
+ var i = S.r, s = p;
2015
+ return br(() => {
2016
+ var l, a;
2017
+ return Ct(() => {
2018
+ l = a, a = n?.() || [], rt(() => {
2019
+ lt(r(...a), e) || (t(e, ...a), l && lt(r(...l), e) && t(null, ...l));
2017
2020
  });
2018
2021
  }), () => {
2019
- let l = a;
2020
- for (; l !== i && l.parent !== null && l.parent.f & 33554432; ) l = l.parent;
2021
- const h = () => {
2022
- s && ut(r(...s), e) && t(null, ...s);
2023
- }, _ = l.teardown;
2024
- l.teardown = () => {
2025
- h(), _?.();
2022
+ let c = s;
2023
+ for (; c !== i && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
2024
+ const v = () => {
2025
+ a && lt(r(...a), e) && t(null, ...a);
2026
+ }, g = c.teardown;
2027
+ c.teardown = () => {
2028
+ v(), g?.();
2026
2029
  };
2027
2030
  };
2028
2031
  }), e;
2029
2032
  }
2030
- function K(e, t, r, n) {
2031
- var i = !nt || (r & 2) !== 0, a = (r & 8) !== 0, o = (r & 16) !== 0, s = n, l = !0, h = void 0, _ = () => o && i ? (h ??= /* @__PURE__ */ Me(n), p(h)) : (l && (l = !1, s = o ? Ce(n) : n), s);
2032
- let f;
2033
- if (a) {
2034
- var u = Te in e || sr in e;
2035
- f = ue(e, t)?.set ?? (u && t in e ? (T) => e[t] = T : void 0);
2036
- }
2037
- var c, d = !1;
2038
- a ? [c, d] = Vn(() => e[t]) : c = e[t], c === void 0 && n !== void 0 && (c = _(), f && (i && Dn(t), f(c)));
2039
- var v;
2040
- if (i ? v = () => {
2041
- var T = e[t];
2042
- return T === void 0 ? _() : (l = !0, T);
2043
- } : v = () => {
2044
- var T = e[t];
2045
- return T !== void 0 && (s = void 0), T === void 0 ? s : T;
2046
- }, i && (r & 4) === 0) return v;
2047
- if (f) {
2048
- var S = e.$$legacy;
2049
- return (function(T, B) {
2050
- return arguments.length > 0 ? ((!i || !B || S || d) && f(B ? v() : T), T) : v();
2033
+ var ze = !1;
2034
+ function Di(e) {
2035
+ var t = ze;
2036
+ try {
2037
+ return ze = !1, [e(), ze];
2038
+ } finally {
2039
+ ze = t;
2040
+ }
2041
+ }
2042
+ function ae(e, t, r, n) {
2043
+ var i = !et || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, a = n, c = !0, v = void 0, g = () => l && i ? (v ??= /* @__PURE__ */ Ie(n), h(v)) : (c && (c = !1, a = l ? rt(n) : n), a);
2044
+ let u;
2045
+ if (s) {
2046
+ var f = Se in e || Qt in e;
2047
+ u = de(e, t)?.set ?? (f && t in e ? (x) => e[t] = x : void 0);
2048
+ }
2049
+ var o, d = !1;
2050
+ s ? [o, d] = Di(() => e[t]) : o = e[t], o === void 0 && n !== void 0 && (o = g(), u && (i && Sn(t), u(o)));
2051
+ var _;
2052
+ if (i ? _ = () => {
2053
+ var x = e[t];
2054
+ return x === void 0 ? g() : (c = !0, x);
2055
+ } : _ = () => {
2056
+ var x = e[t];
2057
+ return x !== void 0 && (a = void 0), x === void 0 ? a : x;
2058
+ }, i && (r & 4) === 0) return _;
2059
+ if (u) {
2060
+ var T = e.$$legacy;
2061
+ return (function(x, B) {
2062
+ return arguments.length > 0 ? ((!i || !B || T || d) && u(B ? _() : x), x) : _();
2051
2063
  });
2052
2064
  }
2053
- var A = !1, P = ((r & 1) !== 0 ? Me : _r)(() => (A = !1, v()));
2054
- a && p(P);
2055
- var j = g;
2056
- return (function(T, B) {
2065
+ var b = !1, O = ((r & 1) !== 0 ? Ie : or)(() => (b = !1, _()));
2066
+ s && h(O);
2067
+ var D = p;
2068
+ return (function(x, B) {
2057
2069
  if (arguments.length > 0) {
2058
- const ee = B ? p(P) : i && a ? ge(T) : T;
2059
- return D(P, ee), A = !0, s !== void 0 && (s = ee), T;
2070
+ const Z = B ? h(O) : i && s ? me(x) : x;
2071
+ return C(O, Z), b = !0, a !== void 0 && (a = Z), x;
2060
2072
  }
2061
- return ae && A || (j.f & 16384) !== 0 ? P.v : p(P);
2073
+ return ie && b || (D.f & 16384) !== 0 ? O.v : h(O);
2062
2074
  });
2063
2075
  }
2064
- function Qi(e) {
2065
- return new Zi(e);
2076
+ function Bi(e) {
2077
+ return new zi(e);
2066
2078
  }
2067
- var Zi = class {
2079
+ var zi = class {
2068
2080
  #e;
2069
2081
  #t;
2070
2082
  constructor(e) {
2071
- var t = /* @__PURE__ */ new Map(), r = (i, a) => {
2072
- var o = /* @__PURE__ */ Xn(a, !1, !1);
2073
- return t.set(i, o), o;
2083
+ var t = /* @__PURE__ */ new Map(), r = (i, s) => {
2084
+ var l = /* @__PURE__ */ zn(s, !1, !1);
2085
+ return t.set(i, l), l;
2074
2086
  };
2075
2087
  const n = new Proxy({
2076
2088
  ...e.props || {},
2077
2089
  $$events: {}
2078
2090
  }, {
2079
- get(i, a) {
2080
- return p(t.get(a) ?? r(a, Reflect.get(i, a)));
2091
+ get(i, s) {
2092
+ return h(t.get(s) ?? r(s, Reflect.get(i, s)));
2081
2093
  },
2082
- has(i, a) {
2083
- return a === sr ? !0 : (p(t.get(a) ?? r(a, Reflect.get(i, a))), Reflect.has(i, a));
2094
+ has(i, s) {
2095
+ return s === Qt ? !0 : (h(t.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
2084
2096
  },
2085
- set(i, a, o) {
2086
- return D(t.get(a) ?? r(a, o), o), Reflect.set(i, a, o);
2097
+ set(i, s, l) {
2098
+ return C(t.get(s) ?? r(s, l), l), Reflect.set(i, s, l);
2087
2099
  }
2088
2100
  });
2089
- this.#t = (e.hydrate ? Fi : Vr)(e.component, {
2101
+ this.#t = (e.hydrate ? Ai : qr)(e.component, {
2090
2102
  target: e.target,
2091
2103
  anchor: e.anchor,
2092
2104
  props: n,
@@ -2094,21 +2106,21 @@ var Zi = class {
2094
2106
  intro: e.intro ?? !1,
2095
2107
  recover: e.recover,
2096
2108
  transformError: e.transformError
2097
- }), !ne && (!e?.props?.$$host || e.sync === !1) && V(), this.#e = n.$$events;
2109
+ }), !le && (!e?.props?.$$host || e.sync === !1) && re(), this.#e = n.$$events;
2098
2110
  for (const i of Object.keys(this.#t))
2099
- i === "$set" || i === "$destroy" || i === "$on" || Re(this, i, {
2111
+ i === "$set" || i === "$destroy" || i === "$on" || Ce(this, i, {
2100
2112
  get() {
2101
2113
  return this.#t[i];
2102
2114
  },
2103
- set(a) {
2104
- this.#t[i] = a;
2115
+ set(s) {
2116
+ this.#t[i] = s;
2105
2117
  },
2106
2118
  enumerable: !0
2107
2119
  });
2108
2120
  this.#t.$set = (i) => {
2109
2121
  Object.assign(n, i);
2110
2122
  }, this.#t.$destroy = () => {
2111
- Hi(this.#t);
2123
+ Oi(this.#t);
2112
2124
  };
2113
2125
  }
2114
2126
  $set(e) {
@@ -2124,8 +2136,8 @@ var Zi = class {
2124
2136
  $destroy() {
2125
2137
  this.#t.$destroy();
2126
2138
  }
2127
- }, Gr;
2128
- typeof HTMLElement == "function" && (Gr = class extends HTMLElement {
2139
+ }, jr;
2140
+ typeof HTMLElement == "function" && (jr = class extends HTMLElement {
2129
2141
  $$ctor;
2130
2142
  $$s;
2131
2143
  $$c;
@@ -2157,19 +2169,19 @@ typeof HTMLElement == "function" && (Gr = class extends HTMLElement {
2157
2169
  if (this.$$cn = !0, !this.$$c) {
2158
2170
  let e = function(n) {
2159
2171
  return (i) => {
2160
- const a = Ct("slot");
2161
- n !== "default" && (a.name = n), wt(i, a);
2172
+ const s = Ot("slot");
2173
+ n !== "default" && (s.name = n), pt(i, s);
2162
2174
  };
2163
2175
  };
2164
2176
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2165
- const t = {}, r = Xi(this);
2177
+ const t = {}, r = Ui(this);
2166
2178
  for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
2167
2179
  for (const n of this.attributes) {
2168
2180
  const i = this.$$g_p(n.name);
2169
- i in this.$$d || (this.$$d[i] = We(i, n.value, this.$$p_d, "toProp"));
2181
+ i in this.$$d || (this.$$d[i] = Ye(i, n.value, this.$$p_d, "toProp"));
2170
2182
  }
2171
2183
  for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2172
- this.$$c = Qi({
2184
+ this.$$c = Bi({
2173
2185
  component: this.$$ctor,
2174
2186
  target: this.$$shadowRoot || this,
2175
2187
  props: {
@@ -2177,27 +2189,27 @@ typeof HTMLElement == "function" && (Gr = class extends HTMLElement {
2177
2189
  $$slots: t,
2178
2190
  $$host: this
2179
2191
  }
2180
- }), this.$$me = hi(() => {
2181
- Nt(() => {
2192
+ }), this.$$me = ni(() => {
2193
+ Ct(() => {
2182
2194
  this.$$r = !0;
2183
- for (const n of Qe(this.$$c)) {
2195
+ for (const n of Ke(this.$$c)) {
2184
2196
  if (!this.$$p_d[n]?.reflect) continue;
2185
2197
  this.$$d[n] = this.$$c[n];
2186
- const i = We(n, this.$$d[n], this.$$p_d, "toAttribute");
2198
+ const i = Ye(n, this.$$d[n], this.$$p_d, "toAttribute");
2187
2199
  i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
2188
2200
  }
2189
2201
  this.$$r = !1;
2190
2202
  });
2191
2203
  });
2192
2204
  for (const n in this.$$l) for (const i of this.$$l[n]) {
2193
- const a = this.$$c.$on(n, i);
2194
- this.$$l_u.set(i, a);
2205
+ const s = this.$$c.$on(n, i);
2206
+ this.$$l_u.set(i, s);
2195
2207
  }
2196
2208
  this.$$l = {};
2197
2209
  }
2198
2210
  }
2199
2211
  attributeChangedCallback(e, t, r) {
2200
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = We(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2212
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = Ye(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2201
2213
  }
2202
2214
  disconnectedCallback() {
2203
2215
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2205,10 +2217,10 @@ typeof HTMLElement == "function" && (Gr = class extends HTMLElement {
2205
2217
  });
2206
2218
  }
2207
2219
  $$g_p(e) {
2208
- return Qe(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2220
+ return Ke(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2209
2221
  }
2210
2222
  });
2211
- function We(e, t, r, n) {
2223
+ function Ye(e, t, r, n) {
2212
2224
  const i = r[e]?.type;
2213
2225
  if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e]) return t;
2214
2226
  if (n === "toAttribute") switch (i) {
@@ -2234,807 +2246,47 @@ function We(e, t, r, n) {
2234
2246
  return t;
2235
2247
  }
2236
2248
  }
2237
- function Xi(e) {
2249
+ function Ui(e) {
2238
2250
  const t = {};
2239
2251
  return e.childNodes.forEach((r) => {
2240
2252
  t[r.slot || "default"] = !0;
2241
2253
  }), t;
2242
2254
  }
2243
- function Yr(e, t, r, n, i, a) {
2244
- let o = class extends Gr {
2255
+ function Pr(e, t, r, n, i, s) {
2256
+ let l = class extends jr {
2245
2257
  constructor() {
2246
2258
  super(e, r, i), this.$$p_d = t;
2247
2259
  }
2248
2260
  static get observedAttributes() {
2249
- return Qe(t).map((s) => (t[s].attribute || s).toLowerCase());
2261
+ return Ke(t).map((a) => (t[a].attribute || a).toLowerCase());
2250
2262
  }
2251
2263
  };
2252
- return Qe(t).forEach((s) => {
2253
- Re(o.prototype, s, {
2264
+ return Ke(t).forEach((a) => {
2265
+ Ce(l.prototype, a, {
2254
2266
  get() {
2255
- return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
2267
+ return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
2256
2268
  },
2257
- set(l) {
2258
- l = We(s, l, t), this.$$d[s] = l;
2259
- var h = this.$$c;
2260
- h && (ue(h, s)?.get ? h[s] = l : h.$set({ [s]: l }));
2269
+ set(c) {
2270
+ c = Ye(a, c, t), this.$$d[a] = c;
2271
+ var v = this.$$c;
2272
+ v && (de(v, a)?.get ? v[a] = c : v.$set({ [a]: c }));
2261
2273
  }
2262
2274
  });
2263
- }), n.forEach((s) => {
2264
- Re(o.prototype, s, { get() {
2265
- return this.$$c?.[s];
2275
+ }), n.forEach((a) => {
2276
+ Ce(l.prototype, a, { get() {
2277
+ return this.$$c?.[a];
2266
2278
  } });
2267
- }), a && (o = a(o)), e.element = o, o;
2268
- }
2269
- function Ie(e) {
2270
- return e ? e.trim().replace(/_/g, "-").split(/[.@]/)[0].toLowerCase() : "";
2271
- }
2272
- function ea(e) {
2273
- const t = Ie(e);
2274
- if (!t) return [];
2275
- const r = t.split("-"), n = [];
2276
- for (let i = r.length; i > 0; i--) {
2277
- const a = r.slice(0, i);
2278
- a.length > 1 && a[a.length - 1].length === 1 || n.push(a.join("-"));
2279
- }
2280
- return n;
2281
- }
2282
- function ta(e, t) {
2283
- for (const r of ea(e)) {
2284
- const n = t.find((i) => Ie(i) === r);
2285
- if (n != null) return n;
2286
- }
2287
- }
2288
- var ra = {
2289
- common: {
2290
- close: "Close",
2291
- cancel: "Cancel",
2292
- save: "Save",
2293
- reset: "Reset",
2294
- retry: "Retry",
2295
- back: "Back",
2296
- next: "Next",
2297
- previous: "Previous",
2298
- submit: "Submit",
2299
- continue: "Continue",
2300
- finish: "Finish",
2301
- yes: "Yes",
2302
- no: "No",
2303
- ok: "OK",
2304
- any: "Any",
2305
- off: "Off",
2306
- auto: "Auto",
2307
- all: "All",
2308
- none: "None",
2309
- loading: "Loading…",
2310
- error: "Error",
2311
- settings: "Settings",
2312
- language: "Language",
2313
- theme: "Theme",
2314
- preview: "Preview",
2315
- author: "Author",
2316
- unknown: "Unknown",
2317
- untitled: "Untitled",
2318
- apply: "Apply",
2319
- enabled: "Enabled",
2320
- disabled: "Disabled",
2321
- closeA11y: "Close",
2322
- settingsA11y: "Open settings menu"
2323
- },
2324
- player: {
2325
- passage: "Passage",
2326
- passages: "Passages",
2327
- question: "Question",
2328
- questionNumbered: "Question {position}",
2329
- questions: "Questions",
2330
- items: "Items",
2331
- section: "Section",
2332
- loadingSection: "Loading section content…",
2333
- loadingPassage: "Loading passage content…",
2334
- configurationError: "Configuration Error",
2335
- playerError: "Player Error",
2336
- authoringBackendError: "Authoring Backend Configuration Error",
2337
- itemLoadError: "Question could not be loaded.",
2338
- sectionTabsA11y: "Section content tabs",
2339
- passagesRegionA11y: "Passages",
2340
- itemsRegionA11y: "Items",
2341
- sectionToolsA11y: "Section tools",
2342
- scrollDownA11y: "Scroll down",
2343
- resizePanels: "Resize panels",
2344
- resizePassagesAndItemsA11y: "Resize passages and items panels",
2345
- resizeMediaRegion: "Resize media region",
2346
- resizeQuestionAndMediaA11y: "Resize question and media panels",
2347
- resizePassageAndMediaA11y: "Resize passage and media panels",
2348
- assessment: {
2349
- sectionPosition: "Section {position} of {total}",
2350
- noSections: "No sections",
2351
- loadFailed: "The assessment could not be loaded. Try again.",
2352
- restoreFailed: "Your saved answers for this section could not be restored. Try again."
2353
- },
2354
- formative: {
2355
- checkAnswer: "Check answer",
2356
- tryAgain: "Try again",
2357
- answerRecorded: "Answer recorded.",
2358
- correct: "Correct.",
2359
- partlyCorrect: "Partly correct.",
2360
- notCorrect: "Not correct.",
2361
- notAutoScored: "Answer recorded. This question is not scored automatically.",
2362
- checkFailed: "This question could not be checked. Try again.",
2363
- triesLeft: {
2364
- one: "{count} try left.",
2365
- other: "{count} tries left."
2366
- }
2367
- },
2368
- timedMedia: {
2369
- waitingForMedia: "Questions will appear as the media plays.",
2370
- questionAvailable: "Question {position} is now available.",
2371
- playbackPaused: "Playback paused. Answer question {position} to continue.",
2372
- playbackAdvisory: "Answer question {position} before continuing with the media.",
2373
- playbackReleased: "Answer accepted. Continue playing the media."
2374
- }
2375
- },
2376
- toolkit: {
2377
- toolsA11y: "Assessment tools",
2378
- toolbarInitError: "Unable to initialize assessment toolkit.",
2379
- settingsTitle: "Settings",
2380
- closeSettingsA11y: "Close settings",
2381
- dragPanelA11y: "Drag panel",
2382
- closePanelA11y: "Close panel",
2383
- resizeWindow: "Resize window",
2384
- minimize: "Minimize",
2385
- maximize: "Maximize",
2386
- minimizePanelA11y: "Minimize panel",
2387
- maximizePanelA11y: "Maximize panel",
2388
- window: {
2389
- moveLeftA11y: "Move tool left",
2390
- moveRightA11y: "Move tool right",
2391
- moveUpA11y: "Move tool up",
2392
- moveDownA11y: "Move tool down",
2393
- shrinkA11y: "Shrink tool window",
2394
- growA11y: "Grow tool window",
2395
- centerA11y: "Center tool window",
2396
- closeA11y: "Close tool"
2397
- },
2398
- announce: {
2399
- movedUp: "Moved up to {position}",
2400
- movedDown: "Moved down to {position}",
2401
- movedLeft: "Moved left to {position}",
2402
- movedRight: "Moved right to {position}",
2403
- rotatedTo: "Rotated to {degrees} degrees"
2404
- }
2405
- },
2406
- tools: {
2407
- calculator: {
2408
- name: "Calculator",
2409
- nameBasic: "Basic Calculator",
2410
- nameScientific: "Scientific Calculator",
2411
- nameGraphing: "Graphing Calculator",
2412
- description: "Multi-type calculator (basic, scientific, graphing)",
2413
- openedBasic: "Basic calculator opened",
2414
- openedScientific: "Scientific calculator opened",
2415
- openedGraphing: "Graphing calculator opened",
2416
- closedBasic: "Basic calculator closed",
2417
- closedScientific: "Scientific calculator closed",
2418
- closedGraphing: "Graphing calculator closed",
2419
- toolA11y: "Calculator tool",
2420
- loading: "Loading calculator…",
2421
- providerUnavailable: "The calculator is unavailable."
2422
- },
2423
- graph: {
2424
- name: "Graph",
2425
- description: "Graphing calculator and coordinate plane",
2426
- buttonA11y: "Graph, graphing calculator",
2427
- tooltip: "Graph",
2428
- toolA11y: "Graph tool — draw points and lines on a coordinate grid",
2429
- canvasA11y: "Graph canvas — use tools to add points and draw lines",
2430
- grid: "Grid:",
2431
- gridOpacityA11y: "Grid opacity",
2432
- pointA11y: "Graph point {id}",
2433
- modeSelector: "Selector",
2434
- modeSelectorHint: "Selector: click and drag points to move them or associated lines.",
2435
- modePoint: "Point",
2436
- modePointHint: "Point: click on the grid to add points.",
2437
- modeLine: "Line",
2438
- modeLineHint: "Line: click a starting point, then an ending point to draw a line.",
2439
- modeDelete: "Delete",
2440
- modeDeleteHint: "Delete: click on a point to delete it and any connected lines."
2441
- },
2442
- periodicTable: {
2443
- name: "Periodic Table",
2444
- description: "Chemistry periodic table reference",
2445
- buttonA11y: "Periodic Table, chemistry reference",
2446
- tooltip: "Periodic Table",
2447
- toolA11y: "Periodic table — select an element to view its details",
2448
- elementsA11y: "Periodic table elements",
2449
- showAllA11y: "Show all elements",
2450
- allElements: "All Elements",
2451
- atomicMass: "Atomic Mass",
2452
- atomicNumber: "Atomic No",
2453
- electronConfig: "Electron Config",
2454
- phase: "Phase",
2455
- filterByA11y: "Filter by {category}",
2456
- elementA11y: "{name}, Symbol: {symbol}, Atomic number: {number}, Atomic mass: {mass}, Category: {category}",
2457
- outsideFilterA11y: ", outside the current filter",
2458
- category: {
2459
- unknown: "Unknown",
2460
- alkaliMetal: "Alkali Metal",
2461
- alkalineEarthMetal: "Alkaline Earth Metal",
2462
- transitionMetal: "Transition Metal",
2463
- postTransitionMetal: "Post-transition Metal",
2464
- metalloid: "Metalloid",
2465
- diatomicNonmetal: "Diatomic Nonmetal",
2466
- polyatomicNonmetal: "Polyatomic Nonmetal",
2467
- nobleGas: "Noble Gas",
2468
- lanthanide: "Lanthanide",
2469
- actinide: "Actinide"
2470
- }
2471
- },
2472
- ruler: {
2473
- name: "Ruler",
2474
- description: "On-screen ruler for measurements",
2475
- buttonA11y: "Ruler",
2476
- tooltip: "Ruler",
2477
- toolA11y: "Draggable and rotatable ruler measurement tool",
2478
- unitSelectionA11y: "Ruler unit selection",
2479
- inches: "Inches",
2480
- centimeters: "Centimeters",
2481
- inchesInSentence: "inches",
2482
- centimetersInSentence: "centimeters",
2483
- switchToInchesA11y: "Switch to inches",
2484
- switchToCentimetersA11y: "Switch to centimeters",
2485
- switchedTo: "Switched to {unit}",
2486
- applicationA11y: "Ruler tool. Use arrow keys to move, Shift+arrows to rotate, PageUp or PageDown for fine rotation, U to toggle units. Current unit: {unit}",
2487
- imageAlt: "Ruler showing {unit}"
2488
- },
2489
- protractor: {
2490
- name: "Protractor",
2491
- description: "On-screen protractor for angle measurements",
2492
- buttonA11y: "Protractor",
2493
- tooltip: "Protractor",
2494
- toolA11y: "Protractor tool. Use arrow keys to move, Shift+arrows to rotate, and PageUp or PageDown for fine rotation.",
2495
- roleA11y: "Draggable and rotatable protractor measurement tool",
2496
- imageAlt: "Protractor with 180-degree semicircular scale marked from 0 to 180 degrees in both directions, with degree markings every 10 degrees"
2497
- },
2498
- dictionary: {
2499
- name: "Dictionary",
2500
- description: "Look up word definitions",
2501
- buttonA11y: "Dictionary, look up word definitions",
2502
- tooltip: "Dictionary",
2503
- toolA11y: "Dictionary"
2504
- },
2505
- pictureDictionary: {
2506
- name: "Picture Dictionary",
2507
- description: "Look up pictures for words",
2508
- buttonA11y: "Picture Dictionary, look up pictures for words",
2509
- tooltip: "Picture Dictionary",
2510
- toolA11y: "Picture Dictionary"
2511
- },
2512
- dictionarySpanish: {
2513
- name: "Spanish Dictionary",
2514
- description: "Look up word definitions in Spanish",
2515
- buttonA11y: "Spanish Dictionary, look up word definitions in Spanish",
2516
- tooltip: "Spanish Dictionary",
2517
- toolA11y: "Spanish Dictionary"
2518
- },
2519
- pictureDictionarySpanish: {
2520
- name: "Spanish Picture Dictionary",
2521
- description: "Look up pictures for words in Spanish",
2522
- buttonA11y: "Spanish Picture Dictionary, look up pictures for words in Spanish",
2523
- tooltip: "Spanish Picture Dictionary",
2524
- toolA11y: "Spanish Picture Dictionary"
2525
- },
2526
- lineReader: {
2527
- name: "Line Reader",
2528
- description: "Reading guide overlay",
2529
- buttonA11y: "Line Reader, reading guide",
2530
- tooltip: "Line Reader",
2531
- roleA11y: "Draggable and resizable reading guide overlay",
2532
- close: "Close line reader",
2533
- resizeWindowA11y: "Drag to resize the reading window",
2534
- resizeFrameA11y: "Drag to resize the frame and window width",
2535
- windowHeightAnnounce: "Reading window height {pixels} pixels",
2536
- frameHeightAnnounce: "Frame height {pixels} pixels",
2537
- widthAnnounce: "Width {pixels} pixels",
2538
- applicationA11y: "Line Reader tool. A clear reading window inside an obscuring frame. Use arrow keys to move, +/- to resize the reading window, Escape to close. Reading window height: {paneHeight} pixels, Frame height: {frameHeight} pixels",
2539
- resizeWindowFullA11y: "Resize the reading window. Drag, or use the up and down arrow keys to change its height. Current height {paneHeight} pixels",
2540
- resizeFrameFullA11y: "Resize the frame. Drag, or use the up and down arrow keys to change the frame height and the left and right arrow keys to change the width. Current frame height {frameHeight} pixels, width {width} pixels"
2541
- },
2542
- answerEliminator: {
2543
- name: "Answer Eliminator",
2544
- description: "Strike through answer choices",
2545
- buttonA11y: "Strike Through, eliminate answer choices",
2546
- tooltip: "Strike Through"
2547
- },
2548
- highlighter: {
2549
- name: "Highlighter",
2550
- description: "Highlight and annotate text",
2551
- buttonA11y: "Highlight text",
2552
- tooltip: "Highlight"
2553
- },
2554
- annotationToolbar: {
2555
- name: "Annotation",
2556
- description: "Highlight and annotate text",
2557
- buttonA11y: "Annotate, highlight and mark up text",
2558
- tooltip: "Annotate",
2559
- toolbarA11y: "Text annotation toolbar",
2560
- underline: "Underline",
2561
- underlineA11y: "Underline selected text",
2562
- readAloud: "Read Aloud",
2563
- readAloudA11y: "Read selected text aloud",
2564
- remove: "Remove",
2565
- removeA11y: "Remove this annotation",
2566
- clearAll: "Clear All",
2567
- clearAllA11y: "Clear all annotations from document",
2568
- highlightYellowA11y: "Yellow highlight",
2569
- highlightPinkA11y: "Pink highlight",
2570
- highlightBlueA11y: "Blue highlight",
2571
- highlightGreenA11y: "Green highlight"
2572
- },
2573
- theme: {
2574
- name: "Theme",
2575
- description: "Accessible themes and contrast",
2576
- buttonA11y: "Theme, change colors and contrast",
2577
- tooltip: "Theme",
2578
- selectorA11y: "Theme selector",
2579
- hint: "Select a theme to improve readability and reduce eye strain.",
2580
- selectA11y: "Select theme",
2581
- selectCurrentA11y: "Select theme. Current theme: {name}",
2582
- optionUnavailableA11y: "{name}, unavailable",
2583
- unavailableName: "Unavailable theme: {id}",
2584
- unavailableDescription: "PIE's managed base theme remains active until this theme becomes available again.",
2585
- unavailableStatus: "The selected theme is unavailable. PIE's managed base theme is active until it becomes available again."
2586
- },
2587
- textToSpeech: {
2588
- name: "Text to Speech",
2589
- description: "Read content aloud",
2590
- toolA11y: "Text-to-speech tool",
2591
- title: "Text-to-Speech",
2592
- initializing: "Initializing…",
2593
- initFailed: "Failed to initialize text-to-speech.",
2594
- selectText: "Select text on the page to read it aloud.",
2595
- speed: "Speed:",
2596
- play: "Play",
2597
- pause: "Pause",
2598
- resume: "Resume",
2599
- stop: "Stop",
2600
- speaking: "Speaking…",
2601
- paused: "Paused",
2602
- charactersSelected: {
2603
- one: "{count} character selected",
2604
- other: "{count} characters selected"
2605
- },
2606
- rate: {
2607
- slow: "Slow",
2608
- slower: "Slower",
2609
- normal: "Normal",
2610
- faster: "Faster",
2611
- fast: "Fast",
2612
- veryFast: "Very Fast"
2613
- },
2614
- inline: {
2615
- controlsA11y: "Reading controls",
2616
- playbackSpeedA11y: "Playback speed",
2617
- rewindA11y: "Rewind",
2618
- fastForwardA11y: "Fast-forward",
2619
- stopA11y: "Stop reading",
2620
- initializing: "Initializing text-to-speech",
2621
- initFailed: "Unable to initialize text-to-speech. Try again.",
2622
- starting: "Starting reading",
2623
- started: "Reading started",
2624
- resumed: "Reading resumed",
2625
- pausedAnnouncement: "Reading paused",
2626
- stopped: "Reading stopped",
2627
- switchedSection: "Reading switched to another section",
2628
- startFailed: "Unable to start reading",
2629
- skippedForward: "Skipped forward",
2630
- skipForwardFailed: "Unable to skip forward",
2631
- skippedBackward: "Skipped backward",
2632
- skipBackwardFailed: "Unable to skip backward",
2633
- speedChangeFailed: "Unable to change playback speed",
2634
- speedAnnounce: "Playback speed {label}",
2635
- playA11y: "Play reading",
2636
- pauseA11y: "Pause reading",
2637
- resumeA11y: "Resume reading"
2638
- }
2639
- },
2640
- signLanguage: {
2641
- name: "Sign Language",
2642
- description: "Signed alternate for authored content",
2643
- generic: "Sign language",
2644
- unknown: "Sign language ({code})",
2645
- ase: "American Sign Language",
2646
- bfi: "British Sign Language",
2647
- fsl: "French Sign Language",
2648
- gss: "Greek Sign Language",
2649
- mfs: "Mexican Sign Language",
2650
- signedEnglish: "Signed English",
2651
- regionA11y: "{language} translation"
2652
- },
2653
- audioTranscript: {
2654
- name: "Audio Transcript",
2655
- description: "Text transcript of audio content",
2656
- regionA11y: "Transcript"
2657
- }
2658
- },
2659
- debug: {
2660
- session: "Session",
2661
- sessionData: "Session Data",
2662
- sessionDataPersistent: "PIE Session Data (Persistent)",
2663
- noItemSessionYet: "No item session data yet. Interact with the item to see updates here.",
2664
- itemSessionsSnapshot: "Item Sessions Snapshot",
2665
- sectionControllerUnavailable: "Section controller not available for this section yet.",
2666
- filteredModel: "Filtered Model",
2667
- environment: "Environment",
2668
- events: "Events",
2669
- controllerEvents: "Controller Events",
2670
- instrumentation: "Instrumentation",
2671
- databaseState: "Database state",
2672
- sessionDb: "Session DB (Server)",
2673
- noRows: "No rows",
2674
- noRecords: "No instrumentation records yet.",
2675
- selectRecord: "Select a record to inspect details.",
2676
- selectEvent: "Select an event to inspect payload details.",
2677
- showRawTables: "Show raw tables",
2678
- showReconstructedSnapshots: "Show reconstructed snapshots",
2679
- showSectionRequest: "Show section request",
2680
- showAssessmentRequest: "Show assessment request",
2681
- liveUpdatesUnsupported: "Live updates are not supported in this browser",
2682
- liveUpdatesDisconnected: "Live updates disconnected; retrying…",
2683
- fieldType: "Type:",
2684
- fieldTarget: "Target:",
2685
- fieldItem: "Item:",
2686
- fieldCanonical: "Canonical:",
2687
- fieldIntent: "Intent:",
2688
- fieldDuplicates: "Duplicates:",
2689
- fieldSemanticRepeats: "Semantic Repeats:",
2690
- dragItemSessionPanelA11y: "Drag item session panel",
2691
- debuggerTabsA11y: "Debugger tabs",
2692
- sessionDataJsonA11y: "Session data JSON",
2693
- environmentJsonA11y: "Environment JSON",
2694
- filteredModelJsonA11y: "Filtered model JSON",
2695
- sectionSessionJsonA11y: "Section session snapshot JSON",
2696
- eventLevelFilterA11y: "Event level filter",
2697
- controllerEventDetailsA11y: "Controller event details",
2698
- instrumentationFilterA11y: "Filter instrumentation record type",
2699
- instrumentationDetailsA11y: "Instrumentation record details",
2700
- toggleSessionPanelA11y: "Toggle session panel",
2701
- toggleEventPanelA11y: "Toggle event broadcast panel",
2702
- toggleDatabasePanelA11y: "Toggle database state panel",
2703
- toggleInstrumentationPanelA11y: "Toggle instrumentation panel",
2704
- pnp: {
2705
- title: "PNP Profile",
2706
- noAssessmentBound: "No assessment bound",
2707
- determinationReadOnly: "Determination (read-only)",
2708
- toolsEditor: "Tools Editor",
2709
- enforcement: "PNP enforcement",
2710
- allAvailableTools: "All available tools",
2711
- clearPlacement: "Clear placement",
2712
- tool: "Tool",
2713
- placement: "Placement",
2714
- provider: "Provider",
2715
- simulation: "PNP simulation",
2716
- resolvedTools: "Resolved Tools (toolkit)",
2717
- provenanceSummary: "Tool Policy Provenance Summary",
2718
- perToolDecisions: "Per-Tool Decisions",
2719
- profileReadOnly: "PNP Profile (read-only)"
2720
- },
2721
- tts: {
2722
- title: "TTS settings",
2723
- closeA11y: "Close TTS settings",
2724
- toolbarLayoutMode: "Toolbar layout mode",
2725
- reservedRow: "Reserved row",
2726
- expandingRow: "Expanding row",
2727
- floatingOverlay: "Floating overlay",
2728
- leftAlignedControls: "Left-aligned controls",
2729
- inlineSpeedButtons: "Inline speed buttons",
2730
- resetToDefaults: "Reset to defaults",
2731
- mathHighlighting: "Math highlighting",
2732
- checkingAvailability: "Checking availability…",
2733
- recheck: "Recheck",
2734
- voice: "Voice",
2735
- bestAvailableVoice: "Best available voice (auto)",
2736
- unnamedVoice: "Unnamed voice",
2737
- apiEndpoint: "API endpoint",
2738
- gender: "Gender",
2739
- any: "Any",
2740
- male: "Male",
2741
- female: "Female",
2742
- neutral: "Neutral",
2743
- engine: "Engine",
2744
- neural: "Neural",
2745
- standard: "Standard",
2746
- providerDefault: "Provider default",
2747
- format: "Format",
2748
- sampleRate: "Sample rate",
2749
- speechMarks: "Speech marks",
2750
- word: "Word",
2751
- wordAndSentence: "Word + sentence",
2752
- voiceType: "Voice type",
2753
- wavenetVoiceType: "WaveNet",
2754
- studioVoiceType: "Studio",
2755
- plainText: "Plain text",
2756
- sampleText: "Sample text",
2757
- resetSample: "Reset sample",
2758
- providerAvailable: "Provider available.",
2759
- providerUnavailable: "Provider unavailable.",
2760
- providerCheckFailed: "Provider availability check failed.",
2761
- providerNotChecked: "Provider availability has not been checked yet.",
2762
- webSpeechUnavailable: "Web Speech API is not available in this browser.",
2763
- browserNoVoices: "Browser text-to-speech is available, but no voices were returned yet.",
2764
- browserUnavailable: "Browser text-to-speech is not available.",
2765
- googleUnavailable: "Google Cloud TTS is not available from the configured API.",
2766
- pollyUnavailable: "AWS Polly is not available from the configured API.",
2767
- recommendedVoices: "Recommended voices",
2768
- allVoices: "All available voices",
2769
- previewVoice: "Preview voice",
2770
- stopPreview: "Stop preview",
2771
- applying: "Applying…",
2772
- ssmlPreviewUnsupported: "SSML preview is not supported in the Browser backend.",
2773
- pollySsmlHint: "Some Polly neural voices reject certain SSML tags (for example emphasis). Use basic SSML tags if preview fails.",
2774
- mathHighlightParts: "Highlighting each part of a formula as it is read, falling back to the whole formula when alignment is uncertain.",
2775
- mathHighlightBlock: "Highlighting each formula as a single block instead of breaking it into parts.",
2776
- previewFailed: "Failed to play preview audio.",
2777
- previewNoAudio: "Preview response did not include audio content.",
2778
- previewEnterText: "Enter preview text before starting playback.",
2779
- previewUnavailable: "Cannot preview while this service is unavailable.",
2780
- browserSynthesisUnavailable: "Browser speech synthesis is unavailable.",
2781
- browserSynthesisEndedEarly: "Browser speech synthesis ended before audio started. Restart the browser and try again.",
2782
- browserSynthesisQueueFailed: "Browser speech synthesis failed to queue preview audio.",
2783
- browserPreviewFailed: "Failed to play browser voice preview.",
2784
- ssmlWordTrackingDisabled: "Google SSML preview preserves authored SSML, so word tracking is disabled.",
2785
- applyUnavailable: "Cannot apply settings while this service is unavailable.",
2786
- coordinatorUnavailable: "Toolkit coordinator is not available for text-to-speech updates."
2787
- }
2788
- }
2789
- }, ft = "en-US", na = /* @__PURE__ */ new Set([
2790
- "ar",
2791
- "ckb",
2792
- "dv",
2793
- "fa",
2794
- "he",
2795
- "iw",
2796
- "ks",
2797
- "ku",
2798
- "nqo",
2799
- "ps",
2800
- "sd",
2801
- "syr",
2802
- "ug",
2803
- "ur",
2804
- "yi"
2805
- ]), ia = /* @__PURE__ */ new Set([
2806
- "zero",
2807
- "one",
2808
- "two",
2809
- "few",
2810
- "many",
2811
- "other"
2812
- ]);
2813
- function er(e) {
2814
- if (typeof e != "object" || e === null) return !1;
2815
- const t = Object.keys(e);
2816
- return t.length > 0 && t.every((r) => ia.has(r));
2817
- }
2818
- function tr(e) {
2819
- try {
2820
- const r = new Intl.Locale(e).textInfo;
2821
- if (r?.direction === "rtl" || r?.direction === "ltr") return r.direction;
2822
- } catch {
2823
- }
2824
- const t = Ie(e).split("-")[0] ?? "";
2825
- return na.has(t) ? "rtl" : "ltr";
2826
- }
2827
- var aa = class Ke {
2828
- static pluralRules = /* @__PURE__ */ new Map();
2829
- locale;
2830
- fallbackLocale;
2831
- catalogs;
2832
- customMessages;
2833
- loading;
2834
- listeners = /* @__PURE__ */ new Set();
2835
- config;
2836
- constructor(t = {}) {
2837
- this.config = { ...t }, this.fallbackLocale = qe(t.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[ft, ra]]), this.customMessages = { ...t.customMessages ?? {} }, this.loading = /* @__PURE__ */ new Map(), this.locale = this.resolveLocaleTag(t.locale) ?? "en-US";
2838
- }
2839
- async initialize(t) {
2840
- if (this.config = {
2841
- ...this.config,
2842
- ...t
2843
- }, t.customMessages) for (const [r, n] of Object.entries(t.customMessages)) this.addCustomMessages(r, n);
2844
- await this.setLocale(t.locale ?? this.locale);
2845
- }
2846
- getLocale() {
2847
- return this.locale;
2848
- }
2849
- async setLocale(t) {
2850
- const r = this.resolveLocaleTag(t);
2851
- if (!r) {
2852
- this.locale = qe(t) || "en-US", this.notify();
2853
- return;
2854
- }
2855
- if (!this.catalogs.has(r)) {
2856
- const n = this.loading.get(r);
2857
- if (n) await n;
2858
- else {
2859
- const i = this.loadCatalog(r);
2860
- this.loading.set(r, i);
2861
- try {
2862
- await i;
2863
- } finally {
2864
- this.loading.delete(r);
2865
- }
2866
- }
2867
- }
2868
- this.locale = r, this.notify();
2869
- }
2870
- t(t, r) {
2871
- const n = this.lookup(t);
2872
- return n === void 0 ? (this.config.onMissingKey?.(t, this.locale), t) : rr(n, r);
2873
- }
2874
- plural(t, r) {
2875
- const n = this.lookupNode(t);
2876
- return n === void 0 || !er(n) ? this.t(t, r) : rr(n[this.selectPluralCategory(r.count)] ?? n.other, r);
2877
- }
2878
- getDirection() {
2879
- return tr(this.locale);
2880
- }
2881
- getAvailableLocales() {
2882
- return [.../* @__PURE__ */ new Set([
2883
- ...this.catalogs.keys(),
2884
- ...this.config.availableLocales ?? [],
2885
- ...Object.keys(this.customMessages)
2886
- ])];
2887
- }
2888
- isLocaleLoaded(t) {
2889
- const r = this.resolveLocaleTag(t);
2890
- return r !== void 0 && this.catalogs.has(r);
2891
- }
2892
- subscribe(t) {
2893
- return this.listeners.add(t), () => {
2894
- this.listeners.delete(t);
2895
- };
2896
- }
2897
- hasKey(t) {
2898
- return this.lookup(t) !== void 0;
2899
- }
2900
- addCustomMessages(t, r) {
2901
- const n = qe(t);
2902
- this.customMessages[n] = Wr(this.customMessages[n] ?? {}, r), this.notify();
2903
- }
2904
- withLocale(t) {
2905
- const r = this.resolveLocaleTag(t) ?? qe(t);
2906
- if (r === this.locale) return this;
2907
- const n = new Ke({
2908
- ...this.config,
2909
- locale: r
2910
- });
2911
- return n.locale = r || "en-US", n.catalogs = this.catalogs, n.customMessages = this.customMessages, n.loading = this.loading, n;
2912
- }
2913
- formatNumber(t, r) {
2914
- try {
2915
- return new Intl.NumberFormat(this.locale, r).format(t);
2916
- } catch {
2917
- return new Intl.NumberFormat(ft, r).format(t);
2918
- }
2919
- }
2920
- formatDate(t, r) {
2921
- try {
2922
- return new Intl.DateTimeFormat(this.locale, r).format(t);
2923
- } catch {
2924
- return new Intl.DateTimeFormat(ft, r).format(t);
2925
- }
2926
- }
2927
- getBundle(t = this.locale) {
2928
- const r = this.resolveLocaleTag(t);
2929
- if (!r) return;
2930
- const n = this.catalogs.get(r);
2931
- if (n)
2932
- return {
2933
- locale: r,
2934
- translations: n,
2935
- direction: tr(r)
2936
- };
2937
- }
2938
- resolveLocaleTag(t) {
2939
- if (!t) return;
2940
- const r = this.getAvailableLocales(), n = ta(t, r);
2941
- if (n) return n;
2942
- const i = Ie(t).split("-")[0];
2943
- if (i)
2944
- return r.find((a) => Ie(a).split("-")[0] === i);
2945
- }
2946
- async loadCatalog(t) {
2947
- const r = this.config.loadCatalog;
2948
- if (r)
2949
- try {
2950
- this.catalogs.set(t, await r(t));
2951
- } catch (n) {
2952
- throw new Error(`Failed to load i18n catalog for locale: ${t}`, { cause: n });
2953
- }
2954
- }
2955
- lookupNode(t) {
2956
- const r = [
2957
- this.customMessages[this.locale],
2958
- this.catalogs.get(this.locale),
2959
- this.customMessages[this.fallbackLocale],
2960
- this.catalogs.get(this.fallbackLocale)
2961
- ];
2962
- for (const n of r) {
2963
- const i = sa(n, t);
2964
- if (i !== void 0) return i;
2965
- }
2966
- }
2967
- lookup(t) {
2968
- const r = this.lookupNode(t);
2969
- if (typeof r == "string") return r;
2970
- if (r !== void 0 && er(r)) return r.other;
2971
- }
2972
- selectPluralCategory(t) {
2973
- let r = Ke.pluralRules.get(this.locale);
2974
- if (!r) {
2975
- try {
2976
- r = new Intl.PluralRules(this.locale);
2977
- } catch {
2978
- return t === 1 ? "one" : "other";
2979
- }
2980
- Ke.pluralRules.set(this.locale, r);
2981
- }
2982
- return r.select(t);
2983
- }
2984
- notify() {
2985
- for (const t of this.listeners) t();
2986
- }
2987
- };
2988
- function qe(e) {
2989
- return e ? e.trim().replace(/_/g, "-") : "";
2990
- }
2991
- function sa(e, t) {
2992
- if (!e) return;
2993
- let r = e;
2994
- for (const n of t.split("."))
2995
- if (typeof r != "object" || r === null || (r = r[n], r === void 0)) return;
2996
- return r;
2997
- }
2998
- function rr(e, t) {
2999
- return t ? e.replace(/\{(\w+)\}/g, (r, n) => {
3000
- const i = t[n];
3001
- return i == null ? r : String(i);
3002
- }) : e;
3003
- }
3004
- function Wr(e, t) {
3005
- const r = { ...e };
3006
- for (const [n, i] of Object.entries(t)) {
3007
- const a = r[n];
3008
- i && typeof i == "object" && a && typeof a == "object" ? r[n] = Wr(a, i) : r[n] = i;
3009
- }
3010
- return r;
2279
+ }), s && (l = s(l)), e.element = l, l;
3011
2280
  }
3012
- var dt;
3013
- function oa() {
3014
- return dt || (dt = new aa()), dt;
3015
- }
3016
- function la(e) {
3017
- const t = e?.i18n ?? oa();
3018
- return {
3019
- getLocale: () => t.getLocale(),
3020
- setLocale: (r) => t.setLocale(r),
3021
- t: (r, n) => t.t(r, n),
3022
- plural: (r, n) => t.plural?.(r, n) ?? t.t(r, n),
3023
- getDirection: () => t.getDirection?.() ?? "ltr",
3024
- hasKey: (r) => t.hasKey?.(r) ?? !1,
3025
- subscribe: (r) => t.subscribe?.(r) ?? (() => {
3026
- })
3027
- };
3028
- }
3029
- var ca = /* @__PURE__ */ Ei('<div class="pie-tool-calculator-inline svelte-ar9a63"><button type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-calculator-inline__icon svelte-ar9a63" aria-hidden="true"><path d="M7,2H17A2,2 0 0,1 19,4V20A2,2 0 0,1 17,22H7A2,2 0 0,1 5,20V4A2,2 0 0,1 7,2M7,4V8H17V4H7M7,10V12H9V10H7M11,10V12H13V10H11M15,10V12H17V10H15M7,14V16H9V14H7M11,14V16H13V14H11M15,14V16H17V14H15M7,18V20H9V18H7M11,18V20H13V18H11M15,18V20H17V18H15Z"></path></svg></button> <div class="pie-sr-only svelte-ar9a63" role="status" aria-live="polite" aria-atomic="true"> </div></div>'), ua = {
3030
- hash: "svelte-ar9a63",
3031
- code: `.pie-tool-calculator-inline.svelte-ar9a63 {display:inline-flex;align-items:center;gap:0.25rem;}.pie-tool-calculator-inline__button.svelte-ar9a63 {position:relative;display:inline-flex;align-items:center;justify-content:center;padding:0.25rem;border:1px solid var(--pie-border, #ccc);border-radius:4px;
2281
+ var Fi = /* @__PURE__ */ gi('<div class="pie-tool-calculator-inline svelte-h8q6l7"><button type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-calculator-inline__icon svelte-h8q6l7" aria-hidden="true"><path d="M7,2H17A2,2 0 0,1 19,4V20A2,2 0 0,1 17,22H7A2,2 0 0,1 5,20V4A2,2 0 0,1 7,2M7,4V8H17V4H7M7,10V12H9V10H7M11,10V12H13V10H11M15,10V12H17V10H15M7,14V16H9V14H7M11,14V16H13V14H11M15,14V16H17V14H15M7,18V20H9V18H7M11,18V20H13V18H11M15,18V20H17V18H15Z"></path></svg></button> <div class="pie-sr-only svelte-h8q6l7" role="status" aria-live="polite" aria-atomic="true"> </div></div>'), Yi = {
2282
+ hash: "svelte-h8q6l7",
2283
+ code: `.pie-tool-calculator-inline.svelte-h8q6l7 {display:inline-flex;align-items:center;gap:0.25rem;}.pie-tool-calculator-inline__button.svelte-h8q6l7 {position:relative;display:inline-flex;align-items:center;justify-content:center;padding:0.25rem;border:1px solid var(--pie-border, #ccc);border-radius:4px;
3032
2284
  /* Button fills resolve through the button tokens, which every base theme
3033
2285
  and colour scheme sets opaque. The base light theme ships
3034
- --pie-background transparent so PIE content reveals the host page. */background-color:var(--pie-button-background-color, var(--pie-button-bg, var(--pie-white, #fff)));color:var(--pie-text, #333);cursor:pointer;transition:background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;}.pie-tool-calculator-inline__button.svelte-ar9a63:hover:not(:disabled) {background-color:var(--pie-button-hover-background-color, var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5)));transform:translateY(-1px);box-shadow:0 2px 4px rgb(0 0 0 / 10%);}.pie-tool-calculator-inline__button.svelte-ar9a63:focus-visible {z-index:1;outline:2px solid var(--pie-button-focus-outline, #0066cc);outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb, var(--pie-button-focus-outline, #0066cc) 20%, transparent);}.pie-tool-calculator-inline__button--active.svelte-ar9a63 {border-color:var(--pie-tool-trigger-active-border-color, var(--pie-primary, #1976d2));background-color:var(--pie-tool-trigger-active-background, var(--pie-primary, #1976d2));color:var(
2286
+ --pie-background transparent so PIE content reveals the host page. */background-color:var(--pie-button-background-color, var(--pie-button-bg, var(--pie-white, #fff)));color:var(--pie-text, #333);cursor:pointer;transition:background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;}.pie-tool-calculator-inline__button.svelte-h8q6l7:hover:not(:disabled) {background-color:var(--pie-button-hover-background-color, var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5)));transform:translateY(-1px);box-shadow:0 2px 4px rgb(0 0 0 / 10%);}.pie-tool-calculator-inline__button.svelte-h8q6l7:focus-visible {z-index:1;outline:2px solid var(--pie-button-focus-outline, #0066cc);outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb, var(--pie-button-focus-outline, #0066cc) 20%, transparent);}.pie-tool-calculator-inline__button--active.svelte-h8q6l7 {border-color:var(--pie-tool-trigger-active-border-color, var(--pie-primary, #1976d2));background-color:var(--pie-tool-trigger-active-background, var(--pie-primary, #1976d2));color:var(
3035
2287
  --pie-tool-trigger-active-color,
3036
2288
  color-mix(in srgb, var(--pie-background, #fff) var(--pie-fixed-hue-collapse, 0%), white)
3037
- );}.pie-tool-calculator-inline__button--active.svelte-ar9a63:hover:not(:disabled) {border-color:var(--pie-tool-trigger-active-border-color, var(--pie-primary, #1976d2));background-color:var(
2289
+ );}.pie-tool-calculator-inline__button--active.svelte-h8q6l7:hover:not(:disabled) {border-color:var(--pie-tool-trigger-active-border-color, var(--pie-primary, #1976d2));background-color:var(
3038
2290
  --pie-tool-trigger-active-background,
3039
2291
  color-mix(
3040
2292
  in srgb,
@@ -3044,19 +2296,19 @@ var ca = /* @__PURE__ */ Ei('<div class="pie-tool-calculator-inline svelte-ar9a6
3044
2296
  );color:var(
3045
2297
  --pie-tool-trigger-active-color,
3046
2298
  color-mix(in srgb, var(--pie-background, #fff) var(--pie-fixed-hue-collapse, 0%), white)
3047
- );}.pie-tool-calculator-inline__button.svelte-ar9a63:disabled {cursor:not-allowed;opacity:0.6;}.pie-tool-calculator-inline__button--sm.svelte-ar9a63 {width:1.5rem;height:1.5rem;padding:0.625rem;}.pie-tool-calculator-inline__button--md.svelte-ar9a63 {width:2rem;height:2rem;}.pie-tool-calculator-inline__button--lg.svelte-ar9a63 {width:2.5rem;height:2.5rem;}.pie-tool-calculator-inline__icon.svelte-ar9a63 {width:1.25rem;height:1.25rem;fill:currentColor;}.pie-tool-calculator-inline__button.svelte-ar9a63:not(.pie-tool-calculator-inline__button--active):hover:not(:disabled) .pie-tool-calculator-inline__icon:where(.svelte-ar9a63) {color:var(--pie-button-hover-color, #667eea);}.pie-tool-calculator-inline__button--active.svelte-ar9a63 .pie-tool-calculator-inline__icon:where(.svelte-ar9a63) {color:var(--pie-tool-trigger-active-color, inherit);}.pie-tool-calculator-inline__button--sm.svelte-ar9a63 .pie-tool-calculator-inline__icon:where(.svelte-ar9a63) {width:1rem;height:1rem;}.pie-tool-calculator-inline__button--lg.svelte-ar9a63 .pie-tool-calculator-inline__icon:where(.svelte-ar9a63) {width:1.5rem;height:1.5rem;}.pie-sr-only.svelte-ar9a63 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
2299
+ );}.pie-tool-calculator-inline__button.svelte-h8q6l7:disabled {cursor:not-allowed;opacity:0.6;}.pie-tool-calculator-inline__button--sm.svelte-h8q6l7 {width:1.5rem;height:1.5rem;padding:0.625rem;}.pie-tool-calculator-inline__button--md.svelte-h8q6l7 {width:2rem;height:2rem;}.pie-tool-calculator-inline__button--lg.svelte-h8q6l7 {width:2.5rem;height:2.5rem;}.pie-tool-calculator-inline__icon.svelte-h8q6l7 {width:1.25rem;height:1.25rem;fill:currentColor;}.pie-tool-calculator-inline__button.svelte-h8q6l7:not(.pie-tool-calculator-inline__button--active):hover:not(:disabled) .pie-tool-calculator-inline__icon:where(.svelte-h8q6l7) {color:var(--pie-button-hover-color, #667eea);}.pie-tool-calculator-inline__button--active.svelte-h8q6l7 .pie-tool-calculator-inline__icon:where(.svelte-h8q6l7) {color:var(--pie-tool-trigger-active-color, inherit);}.pie-tool-calculator-inline__button--sm.svelte-h8q6l7 .pie-tool-calculator-inline__icon:where(.svelte-h8q6l7) {width:1rem;height:1rem;}.pie-tool-calculator-inline__button--lg.svelte-h8q6l7 .pie-tool-calculator-inline__icon:where(.svelte-h8q6l7) {width:1.5rem;height:1.5rem;}.pie-sr-only.svelte-h8q6l7 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
3048
2300
 
3049
- @media (prefers-reduced-motion: reduce) {.pie-tool-calculator-inline__button.svelte-ar9a63 {transition:none;}
2301
+ @media (prefers-reduced-motion: reduce) {.pie-tool-calculator-inline__button.svelte-h8q6l7 {transition:none;}
3050
2302
  }`
3051
2303
  };
3052
- function Kr(e, t) {
3053
- Tt(t, !0), ji(e, ua);
3054
- let r = K(t, "toolId", 7, "calculator-inline"), n = K(t, "targetToolId", 7, ""), i = K(t, "calculatorType", 7, "basic"), a = K(t, "availableTypes", 7, "basic,scientific,graphing"), o = K(t, "size", 7, "md");
3055
- const s = typeof window < "u", l = [
2304
+ function Vr(e, t) {
2305
+ $t(t, !0), Ci(e, Yi);
2306
+ let r = ae(t, "targetToolId", 7, ""), n = ae(t, "calculatorType", 7, "basic"), i = ae(t, "availableTypes", 7, "basic,scientific,graphing"), s = ae(t, "size", 7, "md");
2307
+ const l = typeof window < "u", a = "calculator", c = 1e3, v = [
3056
2308
  "basic",
3057
2309
  "scientific",
3058
2310
  "graphing"
3059
- ], h = {
2311
+ ], g = {
3060
2312
  basic: {
3061
2313
  name: "tools.calculator.nameBasic",
3062
2314
  opened: "tools.calculator.openedBasic",
@@ -3073,141 +2325,131 @@ function Kr(e, t) {
3073
2325
  closed: "tools.calculator.closedGraphing"
3074
2326
  }
3075
2327
  };
3076
- let _ = /* @__PURE__ */ H(null), f = /* @__PURE__ */ H(null), u = /* @__PURE__ */ H(!1), c = /* @__PURE__ */ H(""), d = null, v = null;
3077
- const S = /* @__PURE__ */ te(() => la(p(f))), A = /* @__PURE__ */ te(() => p(f)?.toolCoordinator), P = /* @__PURE__ */ te(() => new Set(a().split(",").map((w) => w.trim()).filter(Boolean))), j = /* @__PURE__ */ te(() => p(P).has(i()) ? i() : "basic"), T = /* @__PURE__ */ te(() => l.includes(p(j)) ? p(j) : "basic"), B = /* @__PURE__ */ te(() => h[p(T)]), ee = /* @__PURE__ */ te(() => p(S).t(p(B).name)), at = /* @__PURE__ */ te(() => n() || on(r())), Jr = /* @__PURE__ */ te(() => o() === "sm" ? "pie-tool-calculator-inline__button--sm" : o() === "lg" ? "pie-tool-calculator-inline__button--lg" : "pie-tool-calculator-inline__button--md");
3078
- ot(() => {
3079
- if (p(_)) return sn(p(_), (w) => {
3080
- D(f, w, !0);
2328
+ let u = /* @__PURE__ */ L(null), f = /* @__PURE__ */ L(null), o = /* @__PURE__ */ L(null), d = /* @__PURE__ */ L(!1), _ = /* @__PURE__ */ L("");
2329
+ const T = /* @__PURE__ */ ee(() => Jr(h(f))), b = /* @__PURE__ */ ee(() => h(f)?.toolCoordinator), O = /* @__PURE__ */ ee(() => new Set(i().split(",").map(($) => $.trim()).filter(Boolean))), D = /* @__PURE__ */ ee(() => h(O).has(n()) ? n() : "basic"), x = /* @__PURE__ */ ee(() => v.includes(h(D)) ? h(D) : "basic"), B = /* @__PURE__ */ ee(() => g[h(x)]), Z = /* @__PURE__ */ ee(() => h(T).t(h(B).name)), J = /* @__PURE__ */ ee(() => {
2330
+ if (r()) return r();
2331
+ if (h(o)?.kind !== "item") return null;
2332
+ const $ = h(o).canonicalItemId || h(o).itemId;
2333
+ return $ ? Zr(a, "item", $) : null;
2334
+ }), Dr = /* @__PURE__ */ ee(() => s() === "sm" ? "pie-tool-calculator-inline__button--sm" : s() === "lg" ? "pie-tool-calculator-inline__button--lg" : "pie-tool-calculator-inline__button--md");
2335
+ it(() => {
2336
+ if (!h(u)) return;
2337
+ const $ = Wr(h(u), (M) => {
2338
+ C(f, M, !0);
2339
+ }), Q = Xr(h(u), (M) => {
2340
+ C(o, M, !0);
3081
2341
  });
3082
- }), ot(() => {
3083
- const w = p(A), O = r(), M = p(_);
3084
- if (!(!w || !O || !M)) return Ce(() => {
3085
- d && v && (d !== w || v !== O) && (d.unregisterTool(v), d = null, v = null), d || (w.registerTool(O, "Calculator Inline", M, an.TOOL), d = w, v = O);
3086
- }), () => {
3087
- d === w && v === O && (d.unregisterTool(v), d = null, v = null);
2342
+ return () => {
2343
+ Q(), $();
3088
2344
  };
3089
- }), ot(() => {
3090
- const w = p(A), O = p(at);
3091
- if (!s || !w) return;
2345
+ }), it(() => {
2346
+ if (!l || !h(b) || h(J)) return;
2347
+ const $ = setTimeout(() => {
2348
+ console.warn("[pie-tool-calculator-inline] No calculator to toggle: place the button inside <pie-item-shell>, or set target-tool-id to the calculator tool id.");
2349
+ }, c);
2350
+ return () => clearTimeout($);
2351
+ }), it(() => {
2352
+ const $ = h(b), Q = h(J);
2353
+ if (!l || !$ || !Q) return;
3092
2354
  const M = () => {
3093
- D(u, w.isToolVisible(O), !0);
3094
- }, Ue = w.subscribe(M);
3095
- return Ce(M), Ue;
2355
+ C(d, $.isToolVisible(Q), !0);
2356
+ }, Pe = $.subscribe(M);
2357
+ return rt(M), Pe;
3096
2358
  });
3097
- function Qr() {
3098
- if (!p(A)) return;
3099
- const w = p(A).isToolVisible(p(at));
3100
- p(A).toggleTool(p(at)), D(c, p(S).t(w ? p(B).closed : p(B).opened), !0);
2359
+ function Br() {
2360
+ if (!h(b) || !h(J)) return;
2361
+ const $ = h(b).isToolVisible(h(J));
2362
+ h(b).getToolState(h(J)) || h(b).registerTool(h(J), h(J).split(":")[0]), h(b).toggleTool(h(J)), C(_, h(T).t($ ? h(B).closed : h(B).opened), !0);
3101
2363
  }
3102
- var Zr = {
3103
- get toolId() {
3104
- return r();
3105
- },
3106
- set toolId(w = "calculator-inline") {
3107
- r(w), V();
3108
- },
2364
+ var zr = {
3109
2365
  get targetToolId() {
3110
- return n();
2366
+ return r();
3111
2367
  },
3112
- set targetToolId(w = "") {
3113
- n(w), V();
2368
+ set targetToolId($ = "") {
2369
+ r($), re();
3114
2370
  },
3115
2371
  get calculatorType() {
3116
- return i();
2372
+ return n();
3117
2373
  },
3118
- set calculatorType(w = "basic") {
3119
- i(w), V();
2374
+ set calculatorType($ = "basic") {
2375
+ n($), re();
3120
2376
  },
3121
2377
  get availableTypes() {
3122
- return a();
2378
+ return i();
3123
2379
  },
3124
- set availableTypes(w = "basic,scientific,graphing") {
3125
- a(w), V();
2380
+ set availableTypes($ = "basic,scientific,graphing") {
2381
+ i($), re();
3126
2382
  },
3127
2383
  get size() {
3128
- return o();
2384
+ return s();
3129
2385
  },
3130
- set size(w = "md") {
3131
- o(w), V();
3132
- }
3133
- }, Ft = xi(), Xr = ii(Ft), en = (w) => {
3134
- var O = ca(), M = Er(O);
3135
- let Ue;
3136
- var tn = si(M, 2), rn = ai(tn, !0);
3137
- lr(O), Ji(O, (nn) => D(_, nn), () => p(_)), _i(() => {
3138
- Ue = Vi(M, 1, `pie-tool-calculator-inline__button ${p(Jr) ?? ""}`, "svelte-ar9a63", Ue, { "pie-tool-calculator-inline__button--active": p(u) }), Ve(M, "aria-label", p(ee)), Ve(M, "aria-pressed", p(u)), Ve(M, "title", p(ee)), Ve(M, "data-calculator-type", p(j)), M.disabled = !p(A), Oi(rn, p(c));
3139
- }), Si("click", M, Qr), wt(w, O);
2386
+ set size($ = "md") {
2387
+ s($), re();
2388
+ }
2389
+ }, Nt = mi(), Ur = Kn(Nt), Fr = ($) => {
2390
+ var Q = Fi(), M = yr(Q);
2391
+ let Pe;
2392
+ var Yr = Xn(M, 2), Gr = Wn(Yr, !0);
2393
+ tr(Q), Vi(Q, (Kr) => C(u, Kr), () => h(u)), ai(() => {
2394
+ Pe = Ni(M, 1, `pie-tool-calculator-inline__button ${h(Dr) ?? ""}`, "svelte-h8q6l7", Pe, { "pie-tool-calculator-inline__button--active": h(d) }), Be(M, "aria-label", h(Z)), Be(M, "aria-pressed", h(d)), Be(M, "title", h(Z)), Be(M, "data-calculator-type", h(D)), M.disabled = !h(b) || !h(J), Si(Gr, h(_));
2395
+ }), di("click", M, Br), pt($, Q);
3140
2396
  };
3141
- return zi(Xr, (w) => {
3142
- s && w(en);
3143
- }), wt(e, Ft), Et(Zr);
2397
+ return Ri(Ur, ($) => {
2398
+ l && $(Fr);
2399
+ }), pt(e, Nt), kt(zr);
3144
2400
  }
3145
- Ai(["click"]);
3146
- Yr(Kr, {
3147
- toolId: {},
2401
+ hi(["click"]);
2402
+ Pr(Vr, {
3148
2403
  targetToolId: {},
3149
2404
  calculatorType: {},
3150
2405
  availableTypes: {},
3151
2406
  size: {}
3152
2407
  }, [], [], { mode: "open" });
3153
- function fa(e, t) {
3154
- Tt(t, !0);
3155
- let r = K(t, "toolId", 7, "calculator-inline"), n = K(t, "targetToolId", 7, ""), i = K(t, "calculatorType", 7, "basic"), a = K(t, "availableTypes", 7, "basic,scientific,graphing"), o = K(t, "size", 7, "md");
3156
- var s = {
3157
- get toolId() {
3158
- return r();
3159
- },
3160
- set toolId(l = "calculator-inline") {
3161
- r(l), V();
3162
- },
2408
+ function Gi(e, t) {
2409
+ $t(t, !0);
2410
+ let r = ae(t, "targetToolId", 7, ""), n = ae(t, "calculatorType", 7, "basic"), i = ae(t, "availableTypes", 7, "basic,scientific,graphing"), s = ae(t, "size", 7, "md");
2411
+ var l = {
3163
2412
  get targetToolId() {
3164
- return n();
2413
+ return r();
3165
2414
  },
3166
- set targetToolId(l = "") {
3167
- n(l), V();
2415
+ set targetToolId(a = "") {
2416
+ r(a), re();
3168
2417
  },
3169
2418
  get calculatorType() {
3170
- return i();
2419
+ return n();
3171
2420
  },
3172
- set calculatorType(l = "basic") {
3173
- i(l), V();
2421
+ set calculatorType(a = "basic") {
2422
+ n(a), re();
3174
2423
  },
3175
2424
  get availableTypes() {
3176
- return a();
2425
+ return i();
3177
2426
  },
3178
- set availableTypes(l = "basic,scientific,graphing") {
3179
- a(l), V();
2427
+ set availableTypes(a = "basic,scientific,graphing") {
2428
+ i(a), re();
3180
2429
  },
3181
2430
  get size() {
3182
- return o();
2431
+ return s();
3183
2432
  },
3184
- set size(l = "md") {
3185
- o(l), V();
2433
+ set size(a = "md") {
2434
+ s(a), re();
3186
2435
  }
3187
2436
  };
3188
- return Kr(e, {
3189
- get toolId() {
3190
- return r();
3191
- },
2437
+ return Vr(e, {
3192
2438
  get targetToolId() {
3193
- return n();
2439
+ return r();
3194
2440
  },
3195
2441
  get calculatorType() {
3196
- return i();
2442
+ return n();
3197
2443
  },
3198
2444
  get availableTypes() {
3199
- return a();
2445
+ return i();
3200
2446
  },
3201
2447
  get size() {
3202
- return o();
2448
+ return s();
3203
2449
  }
3204
- }), Et(s);
2450
+ }), kt(l);
3205
2451
  }
3206
- customElements.define("pie-tool-calculator-inline", Yr(fa, {
3207
- toolId: {
3208
- attribute: "tool-id",
3209
- type: "String"
3210
- },
2452
+ Ki("pie-tool-calculator-inline", Pr(Gi, {
3211
2453
  targetToolId: {
3212
2454
  attribute: "target-tool-id",
3213
2455
  type: "String"
@@ -3225,6 +2467,9 @@ customElements.define("pie-tool-calculator-inline", Yr(fa, {
3225
2467
  type: "String"
3226
2468
  }
3227
2469
  }, [], [], { mode: "open" }));
2470
+ function Ki(e, t) {
2471
+ customElements.get(e) || customElements.define(e, t);
2472
+ }
3228
2473
  export {
3229
- fa as default
2474
+ Gi as default
3230
2475
  };