@pie-players/pie-tool-calculator-desmos 0.3.67 → 0.3.68

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