@pie-element/simple-cloze 0.1.4-next.2 → 0.1.4-next.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/author.js +2 -0
  2. package/dist/author/index.d.ts +2 -10
  3. package/dist/author/index.js +23818 -29583
  4. package/dist/author/index.js.map +1 -1
  5. package/dist/browser/author/index.js +12295 -17035
  6. package/dist/browser/author/index.js.map +1 -1
  7. package/dist/browser/client-e4ZTphpa.js +2370 -0
  8. package/dist/browser/client-e4ZTphpa.js.map +1 -0
  9. package/dist/browser/controller/index.js +2 -52
  10. package/dist/browser/controller-1IBOQFFL.js +69 -0
  11. package/dist/browser/controller-1IBOQFFL.js.map +1 -0
  12. package/dist/browser/delivery/index.js +205 -141
  13. package/dist/browser/delivery/index.js.map +1 -1
  14. package/dist/browser/editor-runtime/author/index.js +634 -0
  15. package/dist/browser/editor-runtime/author/index.js.map +1 -0
  16. package/dist/browser/editor-runtime/client-e4ZTphpa.js +2370 -0
  17. package/dist/browser/editor-runtime/client-e4ZTphpa.js.map +1 -0
  18. package/dist/browser/editor-runtime/controller/index.js +2 -0
  19. package/dist/browser/editor-runtime/controller-1IBOQFFL.js +69 -0
  20. package/dist/browser/editor-runtime/controller-1IBOQFFL.js.map +1 -0
  21. package/dist/browser/editor-runtime/delivery/index.js +243 -0
  22. package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
  23. package/dist/browser/editor-runtime/i18n-BTsdzpBv.js +1755 -0
  24. package/dist/browser/editor-runtime/i18n-BTsdzpBv.js.map +1 -0
  25. package/dist/browser/editor-runtime/plain-text-iaQZhkGe.js +53 -0
  26. package/dist/browser/editor-runtime/plain-text-iaQZhkGe.js.map +1 -0
  27. package/dist/browser/editor-runtime/print/index.js +71 -0
  28. package/dist/browser/editor-runtime/print/index.js.map +1 -0
  29. package/dist/browser/i18n-BTsdzpBv.js +1755 -0
  30. package/dist/browser/i18n-BTsdzpBv.js.map +1 -0
  31. package/dist/browser/plain-text-iaQZhkGe.js +53 -0
  32. package/dist/browser/plain-text-iaQZhkGe.js.map +1 -0
  33. package/dist/browser/print/index.js +56 -28
  34. package/dist/browser/print/index.js.map +1 -1
  35. package/dist/controller/defaults.d.ts +6 -0
  36. package/dist/controller/index.d.ts +51 -8
  37. package/dist/controller/index.js +132 -33
  38. package/dist/controller/index.js.map +1 -1
  39. package/dist/controller/plain-text.d.ts +11 -0
  40. package/dist/delivery/index.d.ts +2 -14
  41. package/dist/delivery/index.js +5557 -2784
  42. package/dist/delivery/index.js.map +1 -1
  43. package/dist/i18n.d.ts +7 -0
  44. package/dist/index.d.ts +1 -1
  45. package/dist/index.iife.d.ts +1 -1
  46. package/dist/index.iife.js +9 -3
  47. package/dist/index.js +2 -4809
  48. package/dist/print/index.d.ts +6 -7
  49. package/dist/print/index.js +6138 -3178
  50. package/dist/print/index.js.map +1 -1
  51. package/dist/runtime-support.js +5 -5
  52. package/dist/runtime-support.js.map +1 -1
  53. package/module/print.js +3947 -0
  54. package/module/print.js.map +1 -0
  55. package/package.json +34 -18
  56. package/print.js +2 -0
  57. package/dist/browser/client-Cas_f5u-.js +0 -2315
  58. package/dist/browser/client-Cas_f5u-.js.map +0 -1
  59. package/dist/browser/controller/index.js.map +0 -1
  60. package/dist/index.js.map +0 -1
@@ -0,0 +1,3947 @@
1
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/disclose-version.js
2
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
3
+ //#endregion
4
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/constants.js
5
+ var e = {}, t = Symbol("uninitialized"), n = "http://www.w3.org/1999/xhtml", r = "http://www.w3.org/2000/svg", i = "http://www.w3.org/1998/Math/MathML", a = Array.isArray, o = Array.prototype.indexOf, s = Array.prototype.includes, c = Array.from, l = Object.keys, u = Object.defineProperty, d = Object.getOwnPropertyDescriptor, f = Object.getOwnPropertyDescriptors, p = Object.prototype, m = Array.prototype, h = Object.getPrototypeOf, g = Object.isExtensible, ee = () => {};
6
+ function _(e) {
7
+ for (var t = 0; t < e.length; t++) e[t]();
8
+ }
9
+ function v() {
10
+ var e, t;
11
+ return {
12
+ promise: new Promise((n, r) => {
13
+ e = n, t = r;
14
+ }),
15
+ resolve: e,
16
+ reject: t
17
+ };
18
+ }
19
+ var y = 1024, b = 2048, te = 4096, ne = 8192, re = 16384, x = 32768, S = 1 << 25, ie = 65536, ae = 1 << 19, oe = 1 << 20, se = 1 << 21, ce = 1 << 22, le = 1 << 23, ue = Symbol("$state"), de = Symbol("component"), fe = Symbol("legacy props"), pe = Symbol(""), me = Symbol("attributes"), he = Symbol("class"), ge = Symbol("style"), _e = Symbol("text"), ve = new class extends Error {
20
+ name = "StaleReactionError";
21
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
22
+ }(), ye = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
23
+ function be() {
24
+ console.warn("https://svelte.dev/e/derived_inert");
25
+ }
26
+ function xe(e) {
27
+ console.warn("https://svelte.dev/e/hydration_mismatch");
28
+ }
29
+ function Se() {
30
+ console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
31
+ }
32
+ //#endregion
33
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/hydration.js
34
+ var C = !1;
35
+ function Ce(e) {
36
+ C = e;
37
+ }
38
+ var w;
39
+ function T(t) {
40
+ if (t === null) throw xe(), e;
41
+ return w = t;
42
+ }
43
+ function we() {
44
+ return T(/* @__PURE__ */ F(w));
45
+ }
46
+ function Te(t) {
47
+ if (C) {
48
+ if (/* @__PURE__ */ F(w) !== null) throw xe(), e;
49
+ w = t;
50
+ }
51
+ }
52
+ function Ee(e = 1) {
53
+ if (C) {
54
+ for (var t = e, n = w; t--;) n = /* @__PURE__ */ F(n);
55
+ w = n;
56
+ }
57
+ }
58
+ function De(e = !0) {
59
+ for (var t = 0, n = w;;) {
60
+ if (n.nodeType === 8) {
61
+ var r = n.data;
62
+ if (r === "]") {
63
+ if (t === 0) return n;
64
+ --t;
65
+ } else (r === "[" || r === "[!" || r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
66
+ }
67
+ var i = /* @__PURE__ */ F(n);
68
+ e && n.remove(), n = i;
69
+ }
70
+ }
71
+ function Oe(t) {
72
+ if (!t || t.nodeType !== 8) throw xe(), e;
73
+ return t.data;
74
+ }
75
+ //#endregion
76
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/equality.js
77
+ function ke(e) {
78
+ return e === this.v;
79
+ }
80
+ function Ae(e, t) {
81
+ return e == e ? e !== t || typeof e == "object" && !!e || typeof e == "function" : t == t;
82
+ }
83
+ function je(e) {
84
+ return !Ae(e, this.v);
85
+ }
86
+ //#endregion
87
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/errors.js
88
+ function Me() {
89
+ throw Error("https://svelte.dev/e/async_derived_orphan");
90
+ }
91
+ function Ne(e) {
92
+ throw Error("https://svelte.dev/e/effect_in_teardown");
93
+ }
94
+ function Pe() {
95
+ throw Error("https://svelte.dev/e/effect_in_unowned_derived");
96
+ }
97
+ function Fe(e) {
98
+ throw Error("https://svelte.dev/e/effect_orphan");
99
+ }
100
+ function Ie() {
101
+ throw Error("https://svelte.dev/e/effect_update_depth_exceeded");
102
+ }
103
+ function Le() {
104
+ throw Error("https://svelte.dev/e/hydration_failed");
105
+ }
106
+ function Re(e) {
107
+ throw Error("https://svelte.dev/e/props_invalid_value");
108
+ }
109
+ function ze() {
110
+ throw Error("https://svelte.dev/e/state_descriptors_fixed");
111
+ }
112
+ function Be() {
113
+ throw Error("https://svelte.dev/e/state_prototype_fixed");
114
+ }
115
+ function Ve() {
116
+ throw Error("https://svelte.dev/e/state_unsafe_mutation");
117
+ }
118
+ function He() {
119
+ throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
120
+ }
121
+ //#endregion
122
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/context.js
123
+ var E = null;
124
+ function Ue(e) {
125
+ E = e;
126
+ }
127
+ function We(e, t = !1, n) {
128
+ E = {
129
+ p: E,
130
+ i: !1,
131
+ c: null,
132
+ e: null,
133
+ s: e,
134
+ x: null,
135
+ r: W,
136
+ l: null
137
+ };
138
+ }
139
+ function Ge(e) {
140
+ var t = E, n = t.e;
141
+ if (n !== null) {
142
+ t.e = null;
143
+ for (var r of n) fn(r);
144
+ }
145
+ return e !== void 0 && (t.x = e), t.i = !0, E = t.p, Ke(e);
146
+ }
147
+ function Ke(e = {}) {
148
+ return u(e, de, { value: !0 }), e;
149
+ }
150
+ function qe() {
151
+ return !0;
152
+ }
153
+ //#endregion
154
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/task.js
155
+ var Je = [];
156
+ function Ye() {
157
+ var e = Je;
158
+ Je = [], _(e);
159
+ }
160
+ function Xe(e) {
161
+ if (Je.length === 0 && !yt) {
162
+ var t = Je;
163
+ queueMicrotask(() => {
164
+ t === Je && Ye();
165
+ });
166
+ }
167
+ Je.push(e);
168
+ }
169
+ function Ze() {
170
+ for (; Je.length > 0;) Ye();
171
+ }
172
+ //#endregion
173
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/status.js
174
+ var Qe = ~(b | te | y);
175
+ function D(e, t) {
176
+ e.f = e.f & Qe | t;
177
+ }
178
+ function $e(e) {
179
+ e.f & 512 || e.deps === null ? D(e, y) : D(e, te);
180
+ }
181
+ //#endregion
182
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/utils.js
183
+ function et(e, t, n) {
184
+ e.f & 2048 ? t.add(e) : e.f & 4096 && n.add(e), D(e, y);
185
+ }
186
+ //#endregion
187
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
188
+ function tt(e) {
189
+ var t = V, n = W;
190
+ U(null), G(null);
191
+ try {
192
+ return e();
193
+ } finally {
194
+ U(t), G(n);
195
+ }
196
+ }
197
+ //#endregion
198
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/async.js
199
+ function nt(e, t, n, r) {
200
+ let i = qe() ? ot : ut;
201
+ var a = e.filter((e) => !e.settled), o = t.map(i);
202
+ if (n.length === 0 && a.length === 0) {
203
+ r(o);
204
+ return;
205
+ }
206
+ var s = W, c = rt(), l = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((e) => e.promise)) : null;
207
+ function u(e) {
208
+ if (!(s.f & 16384)) {
209
+ c();
210
+ try {
211
+ r([...o, ...e]);
212
+ } catch (e) {
213
+ I(e, s);
214
+ }
215
+ it();
216
+ }
217
+ }
218
+ var d = at();
219
+ if (n.length === 0) {
220
+ l.then(() => u([])).finally(d);
221
+ return;
222
+ }
223
+ function f() {
224
+ Promise.all(n.map((e) => /* @__PURE__ */ ct(e))).then(u).catch((e) => I(e, s)).finally(d);
225
+ }
226
+ l ? l.then(() => {
227
+ c(), f(), it();
228
+ }) : f();
229
+ }
230
+ function rt() {
231
+ var e = W, t = V, n = E, r = O;
232
+ return function(i = !0) {
233
+ G(e), U(t), Ue(n), i && !(e.f & 16384) && (r?.activate(), r?.apply());
234
+ };
235
+ }
236
+ function it(e = !0) {
237
+ G(null), U(null), Ue(null), e && O?.deactivate();
238
+ }
239
+ function at() {
240
+ var e = W, t = e.b, n = O, r = !!t?.is_rendered();
241
+ return t?.update_pending_count(1, n), n.increment(r, e), () => {
242
+ t?.update_pending_count(-1, n), n.decrement(r, e);
243
+ };
244
+ }
245
+ /*#__NO_SIDE_EFFECTS__*/
246
+ function ot(e) {
247
+ var n = 2 | b;
248
+ return W !== null && (W.f |= ae), {
249
+ ctx: E,
250
+ deps: null,
251
+ effects: null,
252
+ equals: ke,
253
+ f: n,
254
+ fn: e,
255
+ reactions: null,
256
+ rv: 0,
257
+ v: t,
258
+ wv: 0,
259
+ parent: W,
260
+ ac: null
261
+ };
262
+ }
263
+ var st = Symbol("obsolete");
264
+ /*#__NO_SIDE_EFFECTS__*/
265
+ function ct(e, n, r) {
266
+ let i = W;
267
+ i === null && Me();
268
+ var a = void 0, o = It(t), s = !V, c = /* @__PURE__ */ new Set();
269
+ return gn(() => {
270
+ var t = W, n = v();
271
+ a = n.promise;
272
+ try {
273
+ Promise.resolve(e()).then(n.resolve, (e) => {
274
+ e !== ve && n.reject(e);
275
+ }).finally(it);
276
+ } catch (e) {
277
+ n.reject(e), it();
278
+ }
279
+ var r = O;
280
+ if (s) {
281
+ if (t.f & 32768) var l = at();
282
+ if (i.b?.is_rendered()) r.async_deriveds.get(t)?.reject(st);
283
+ else for (let e of c.values()) e.reject(st);
284
+ c.add(n), r.async_deriveds.set(t, n);
285
+ }
286
+ let u = (e, t = void 0) => {
287
+ l?.(), c.delete(n), t !== st && (r.activate(), t ? (o.f |= le, Bt(o, t)) : (o.f & 8388608 && (o.f ^= le), Bt(o, e)), r.deactivate());
288
+ };
289
+ n.promise.then(u, (e) => u(null, e || "unknown"));
290
+ }), un(() => {
291
+ for (let e of c) e.reject(st);
292
+ }), new Promise((e) => {
293
+ function t(n) {
294
+ function r() {
295
+ n === a ? e(o) : t(a);
296
+ }
297
+ n.then(r, r);
298
+ }
299
+ t(a);
300
+ });
301
+ }
302
+ /*#__NO_SIDE_EFFECTS__*/
303
+ function lt(e) {
304
+ let t = /* @__PURE__ */ ot(e);
305
+ return Nn(t), t;
306
+ }
307
+ /*#__NO_SIDE_EFFECTS__*/
308
+ function ut(e) {
309
+ let t = /* @__PURE__ */ ot(e);
310
+ return t.equals = je, t;
311
+ }
312
+ function dt(e) {
313
+ var t = e.effects;
314
+ if (t !== null) {
315
+ e.effects = null;
316
+ for (var n = 0; n < t.length; n += 1) z(t[n]);
317
+ }
318
+ }
319
+ function ft(e) {
320
+ var n, r = W, i = e.parent;
321
+ if (!B && i !== null && e.v !== t && i.f & 24576) return be(), e.v;
322
+ G(i);
323
+ try {
324
+ dt(e), n = Hn(e);
325
+ } finally {
326
+ G(r);
327
+ }
328
+ return n;
329
+ }
330
+ function pt(e) {
331
+ var t = ft(e);
332
+ if (!e.equals(t) && (e.wv = zn(), (!O?.is_fork || e.deps === null) && (O === null ? e.v = t : (O.capture(e, t, !0), _t?.capture(e, t, !0)), e.deps === null))) {
333
+ D(e, y);
334
+ return;
335
+ }
336
+ B || (k === null ? $e(e) : (ln() || O?.is_fork) && k.set(e, t));
337
+ }
338
+ function mt(e) {
339
+ if (e.effects !== null) for (let t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && tt(() => {
340
+ t.ac.abort(ve), t.ac = null;
341
+ }), t.fn !== null && (t.teardown = ee), Gn(t, 0), xn(t));
342
+ }
343
+ function ht(e) {
344
+ if (e.effects !== null) for (let t of e.effects) t.teardown && t.fn !== null && Kn(t);
345
+ }
346
+ //#endregion
347
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/batch.js
348
+ var gt = null, O = null, _t = null, k = null, vt = null, yt = !1, bt = !1, xt = null, St = null, Ct = 0, wt = 1, Tt = class e {
349
+ id = wt++;
350
+ #e = !1;
351
+ linked = !0;
352
+ #t = null;
353
+ #n = null;
354
+ async_deriveds = /* @__PURE__ */ new Map();
355
+ current = /* @__PURE__ */ new Map();
356
+ previous = /* @__PURE__ */ new Map();
357
+ #r = /* @__PURE__ */ new Set();
358
+ #i = /* @__PURE__ */ new Set();
359
+ #a = 0;
360
+ #o = /* @__PURE__ */ new Map();
361
+ #s = null;
362
+ #c = [];
363
+ #l = [];
364
+ #u = /* @__PURE__ */ new Set();
365
+ #d = /* @__PURE__ */ new Set();
366
+ #f = /* @__PURE__ */ new Map();
367
+ #p = /* @__PURE__ */ new Set();
368
+ is_fork = !1;
369
+ #m = !1;
370
+ constructor() {
371
+ gt === null ? gt = this : (gt.#n = this, this.#t = gt), gt = this;
372
+ }
373
+ #h() {
374
+ if (this.is_fork) return !0;
375
+ for (let n of this.#o.keys()) {
376
+ for (var e = n, t = !1; e.parent !== null;) {
377
+ if (this.#f.has(e)) {
378
+ t = !0;
379
+ break;
380
+ }
381
+ e = e.parent;
382
+ }
383
+ if (!t) return !0;
384
+ }
385
+ return !1;
386
+ }
387
+ skip_effect(e) {
388
+ this.#f.has(e) || this.#f.set(e, {
389
+ d: [],
390
+ m: []
391
+ }), this.#p.delete(e);
392
+ }
393
+ unskip_effect(e, t = (e) => this.schedule(e)) {
394
+ var n = this.#f.get(e);
395
+ if (n) {
396
+ this.#f.delete(e);
397
+ for (var r of n.d) D(r, b), t(r);
398
+ for (r of n.m) D(r, te), t(r);
399
+ }
400
+ this.#p.add(e);
401
+ }
402
+ #g() {
403
+ var e = [];
404
+ for (let i of this.#c) if (!(i.f & 16384 || !(i.f & 6144))) {
405
+ for (var t = i, n = !1; t.parent !== null;) {
406
+ t = t.parent;
407
+ var r = t.f;
408
+ if (r & 96) {
409
+ if (!(r & 1024)) {
410
+ n = !0;
411
+ break;
412
+ }
413
+ t.f ^= y;
414
+ }
415
+ }
416
+ n || e.push(t);
417
+ }
418
+ return this.#c = [], e;
419
+ }
420
+ #_() {
421
+ this.#e = !0;
422
+ for (let e of this.#u) this.#d.delete(e), D(e, b), this.schedule(e);
423
+ for (let e of this.#d) D(e, te), this.schedule(e);
424
+ this.apply();
425
+ for (var t = xt = [], n = [], r = St = []; this.#c.length > 0;) {
426
+ Ct++ > 1e3 && (this.#S(), Dt());
427
+ for (let e of this.#g()) try {
428
+ this.#v(e, t, n);
429
+ } catch (t) {
430
+ throw Nt(e), this.#h() || this.discard(), t;
431
+ }
432
+ }
433
+ if (O = null, r.length > 0) {
434
+ var i = e.ensure();
435
+ for (let e of r) i.schedule(e);
436
+ }
437
+ if (xt = null, St = null, this.#h()) {
438
+ this.#x(n), this.#x(t);
439
+ for (let [e, t] of this.#f) Mt(e, t);
440
+ r.length > 0 && O.#_();
441
+ return;
442
+ }
443
+ let a = this.#y();
444
+ if (a) {
445
+ this.#x(n), this.#x(t), a.#b(this);
446
+ return;
447
+ }
448
+ this.#u.clear(), this.#d.clear();
449
+ for (let e of this.#r) e(this);
450
+ this.#r.clear(), _t = this, Ot(n), Ot(t), _t = null, this.#s?.resolve();
451
+ var o = O;
452
+ if (this.#a === 0 && (this.#c.length === 0 || o !== null) && this.#S(), this.#c.length > 0) if (o !== null) {
453
+ for (let e of this.#c) o.#c.push(e);
454
+ this.#c = [];
455
+ } else o = this;
456
+ o !== null && (j.clear(), o.#_());
457
+ }
458
+ #v(e, t, n) {
459
+ e.f ^= y;
460
+ for (var r = e.first; r !== null;) {
461
+ var i = r.f, a = (i & 96) != 0;
462
+ if (!(a && i & 1024 || i & 8192 || this.#f.has(r)) && r.fn !== null) {
463
+ a ? r.f ^= y : i & 4 ? t.push(r) : Bn(r) && (i & 16 && this.#d.add(r), Kn(r));
464
+ var o = r.first;
465
+ if (o !== null) {
466
+ r = o;
467
+ continue;
468
+ }
469
+ }
470
+ for (; r !== null;) {
471
+ var s = r.next;
472
+ if (s !== null) {
473
+ r = s;
474
+ break;
475
+ }
476
+ r = r.parent;
477
+ }
478
+ }
479
+ }
480
+ #y() {
481
+ for (var e = this.#t; e !== null;) {
482
+ if (!e.is_fork) {
483
+ for (let [t, [, n]] of this.current) if (e.current.has(t) && !n) return e;
484
+ }
485
+ e = e.#t;
486
+ }
487
+ return null;
488
+ }
489
+ #b(e) {
490
+ for (let [t, n] of e.current) !this.previous.has(t) && e.previous.has(t) && this.previous.set(t, e.previous.get(t)), this.current.set(t, n);
491
+ for (let [t, n] of e.async_deriveds) {
492
+ let e = this.async_deriveds.get(t);
493
+ e && n.promise.then(e.resolve).catch(e.reject);
494
+ }
495
+ e.async_deriveds.clear(), this.transfer_effects(e.#u, e.#d);
496
+ let t = (e) => {
497
+ var n = e.reactions;
498
+ if (n !== null && !(e.f & 2 && !(e.f & 6144))) for (let e of n) {
499
+ var r = e.f;
500
+ if (r & 2) t(e);
501
+ else {
502
+ var i = e;
503
+ r & 4194320 && !this.async_deriveds.has(i) && (this.#d.delete(i), D(i, b), this.schedule(i));
504
+ }
505
+ }
506
+ };
507
+ for (let e of this.current.keys()) t(e);
508
+ this.oncommit(() => e.discard()), e.#S(), O = this, this.#_();
509
+ }
510
+ #x(e) {
511
+ for (var t = 0; t < e.length; t += 1) et(e[t], this.#u, this.#d);
512
+ }
513
+ capture(e, n, r = !1) {
514
+ e.v !== t && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [n, r]), k?.set(e, n)), this.is_fork || (e.v = n);
515
+ }
516
+ activate() {
517
+ O = this;
518
+ }
519
+ deactivate() {
520
+ O = null, k = null;
521
+ }
522
+ flush() {
523
+ try {
524
+ bt = !0, O = this, this.#_();
525
+ } finally {
526
+ Ct = 0, vt = null, xt = null, St = null, bt = !1, O = null, k = null, j.clear();
527
+ }
528
+ }
529
+ discard() {
530
+ for (let e of this.#i) e(this);
531
+ this.#i.clear();
532
+ for (let e of this.async_deriveds.values()) e.reject(st);
533
+ this.#S(), this.#s?.resolve();
534
+ }
535
+ register_created_effect(e) {
536
+ this.#l.push(e);
537
+ }
538
+ increment(e, t) {
539
+ if (this.#a += 1, e) {
540
+ let e = this.#o.get(t) ?? 0;
541
+ this.#o.set(t, e + 1);
542
+ }
543
+ }
544
+ decrement(e, t) {
545
+ if (--this.#a, e) {
546
+ let e = this.#o.get(t) ?? 0;
547
+ e === 1 ? this.#o.delete(t) : this.#o.set(t, e - 1);
548
+ }
549
+ this.#m || (this.#m = !0, Xe(() => {
550
+ this.#m = !1, this.linked && this.flush();
551
+ }));
552
+ }
553
+ transfer_effects(e, t) {
554
+ for (let t of e) this.#u.add(t);
555
+ for (let e of t) this.#d.add(e);
556
+ e.clear(), t.clear();
557
+ }
558
+ oncommit(e) {
559
+ this.#r.add(e);
560
+ }
561
+ ondiscard(e) {
562
+ this.#i.add(e);
563
+ }
564
+ settled() {
565
+ return (this.#s ??= v()).promise;
566
+ }
567
+ static ensure() {
568
+ if (O === null) {
569
+ let t = O = new e();
570
+ !bt && !yt && Xe(() => {
571
+ t.#e || t.flush();
572
+ });
573
+ }
574
+ return O;
575
+ }
576
+ apply() {
577
+ k = null;
578
+ }
579
+ schedule(e) {
580
+ if (vt = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
581
+ e.b.defer_effect(e);
582
+ return;
583
+ }
584
+ this.#c.push(e);
585
+ }
586
+ #S() {
587
+ if (this.linked) {
588
+ var e = this.#t, t = this.#n;
589
+ e === null || (e.#n = t), t === null ? gt = e : t.#t = e, this.linked = !1;
590
+ }
591
+ }
592
+ };
593
+ function Et(e) {
594
+ var t = yt;
595
+ yt = !0;
596
+ try {
597
+ var n;
598
+ for (e && (O !== null && !O.is_fork && O.flush(), n = e());;) {
599
+ if (Ze(), O === null) return n;
600
+ O.flush();
601
+ }
602
+ } finally {
603
+ yt = t;
604
+ }
605
+ }
606
+ function Dt() {
607
+ try {
608
+ Ie();
609
+ } catch (e) {
610
+ I(e, vt);
611
+ }
612
+ }
613
+ var A = null;
614
+ function Ot(e) {
615
+ var t = e.length;
616
+ if (t !== 0) {
617
+ for (var n = 0; n < t;) {
618
+ var r = e[n++];
619
+ if (!(r.f & 24576) && Bn(r) && (A = /* @__PURE__ */ new Set(), Kn(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && wn(r), A?.size > 0)) {
620
+ j.clear();
621
+ for (let e of A) {
622
+ if (e.f & 24576) continue;
623
+ let t = [e], n = e.parent;
624
+ for (; n !== null;) A.has(n) && (A.delete(n), t.push(n)), n = n.parent;
625
+ for (let e = t.length - 1; e >= 0; e--) {
626
+ let n = t[e];
627
+ n.f & 24576 || Kn(n);
628
+ }
629
+ }
630
+ A.clear();
631
+ }
632
+ }
633
+ A = null;
634
+ }
635
+ }
636
+ function kt(e, t, n, r) {
637
+ if (!n.has(e) && (n.add(e), e.reactions !== null)) for (let i of e.reactions) {
638
+ let e = i.f;
639
+ e & 2 ? kt(i, t, n, r) : e & 4194320 && !(e & 2048) && At(i, t, r) && (D(i, b), jt(i));
640
+ }
641
+ }
642
+ function At(e, t, n) {
643
+ let r = n.get(e);
644
+ if (r !== void 0) return r;
645
+ if (e.deps !== null) for (let r of e.deps) {
646
+ if (s.call(t, r)) return !0;
647
+ if (r.f & 2 && At(r, t, n)) return n.set(r, !0), !0;
648
+ }
649
+ return n.set(e, !1), !1;
650
+ }
651
+ function jt(e) {
652
+ O.schedule(e);
653
+ }
654
+ function Mt(e, t) {
655
+ if (!(e.f & 32 && e.f & 1024)) {
656
+ e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), D(e, y);
657
+ for (var n = e.first; n !== null;) Mt(n, t), n = n.next;
658
+ }
659
+ }
660
+ function Nt(e) {
661
+ D(e, y);
662
+ for (var t = e.first; t !== null;) Nt(t), t = t.next;
663
+ }
664
+ //#endregion
665
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/sources.js
666
+ var Pt = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Map(), Ft = !1;
667
+ function It(e, t) {
668
+ return {
669
+ f: 0,
670
+ v: e,
671
+ reactions: null,
672
+ equals: ke,
673
+ rv: 0,
674
+ wv: 0
675
+ };
676
+ }
677
+ /*#__NO_SIDE_EFFECTS__*/
678
+ function M(e, t) {
679
+ let n = It(e, t);
680
+ return Nn(n), n;
681
+ }
682
+ /*#__NO_SIDE_EFFECTS__*/
683
+ function Lt(e, t = !1, n = !0) {
684
+ let r = It(e);
685
+ return t || (r.equals = je), r;
686
+ }
687
+ function N(e, t, n = !1) {
688
+ return V !== null && (!H || V.f & 131072) && qe() && V.f & 4325394 && (K === null || !K.has(e)) && Ve(), Bt(e, n ? Wt(t) : t, St);
689
+ }
690
+ var Rt = null, zt = 0;
691
+ function Bt(e, t, n = null) {
692
+ if (!e.equals(t)) {
693
+ B ? j.set(e, t) : j.has(e) || j.set(e, e.v);
694
+ var r = Tt.ensure();
695
+ if (r.capture(e, t), e.f & 2) {
696
+ let t = e;
697
+ e.f & 2048 && ft(t), k === null && $e(t);
698
+ }
699
+ e.wv = zn(), Rt = null, zt = 0, Ut(e, b, n), Rt = null, qe() && W !== null && W.f & 1024 && !(W.f & 96) && (Y === null ? Pn([e]) : Y.push(e)), !r.is_fork && Pt.size > 0 && !Ft && Vt();
700
+ }
701
+ return t;
702
+ }
703
+ function Vt() {
704
+ Ft = !1;
705
+ for (let e of Pt) {
706
+ e.f & 1024 && D(e, te);
707
+ let t;
708
+ try {
709
+ t = Bn(e);
710
+ } catch {
711
+ t = !0;
712
+ }
713
+ t && Kn(e);
714
+ }
715
+ Pt.clear();
716
+ }
717
+ function Ht(e) {
718
+ N(e, e.v + 1);
719
+ }
720
+ function Ut(e, t, n) {
721
+ var r = e.reactions;
722
+ if (r !== null) {
723
+ var i = qe(), a = r.length;
724
+ if (zt += a, zt > 1e5 && Rt === null && (Rt = /* @__PURE__ */ new Set()), Rt !== null) {
725
+ if (Rt.has(e)) return;
726
+ Rt.add(e);
727
+ }
728
+ for (var o = 0; o < a; o++) {
729
+ var s = r[o], c = s.f;
730
+ if (!(!i && s === W)) {
731
+ var l = (c & b) === 0;
732
+ if (l && D(s, t), c & 131072) Pt.add(s);
733
+ else if (c & 2) {
734
+ var u = s;
735
+ k?.delete(u), Ut(u, te, n);
736
+ } else if (l) {
737
+ var d = s;
738
+ c & 16 && A !== null && A.add(d), n === null ? jt(d) : n.push(d);
739
+ }
740
+ }
741
+ }
742
+ }
743
+ }
744
+ function Wt(e) {
745
+ if (typeof e != "object" || !e || ue in e || de in e) return e;
746
+ let n = h(e);
747
+ if (n !== p && n !== m) return e;
748
+ var r = /* @__PURE__ */ new Map(), i = a(e), o = /* @__PURE__ */ M(0), s = null, c = Ln, l = (e) => {
749
+ if (Ln === c) return e();
750
+ var t = V, n = Ln;
751
+ U(null), Rn(c);
752
+ var r = e();
753
+ return U(t), Rn(n), r;
754
+ };
755
+ return i && r.set("length", /* @__PURE__ */ M(e.length, s)), new Proxy(e, {
756
+ defineProperty(e, t, n) {
757
+ (!("value" in n) || n.configurable === !1 || n.enumerable === !1 || n.writable === !1) && ze();
758
+ var i = r.get(t);
759
+ return i === void 0 ? l(() => {
760
+ var e = /* @__PURE__ */ M(n.value, s);
761
+ return r.set(t, e), e;
762
+ }) : N(i, n.value, !0), !0;
763
+ },
764
+ deleteProperty(e, n) {
765
+ var i = r.get(n);
766
+ if (i === void 0) {
767
+ if (n in e) {
768
+ let e = l(() => /* @__PURE__ */ M(t, s));
769
+ r.set(n, e), Ht(o);
770
+ }
771
+ } else N(i, t), Ht(o);
772
+ return !0;
773
+ },
774
+ get(n, i, a) {
775
+ if (i === ue) return e;
776
+ var o = r.get(i), c = i in n;
777
+ if (o === void 0 && (!c || d(n, i)?.writable) && (o = l(() => /* @__PURE__ */ M(Wt(c ? n[i] : t), s)), r.set(i, o)), o !== void 0) {
778
+ var u = X(o);
779
+ return u === t ? void 0 : u;
780
+ }
781
+ return Reflect.get(n, i, a);
782
+ },
783
+ getOwnPropertyDescriptor(e, n) {
784
+ this.has?.(e, n);
785
+ var i = Reflect.getOwnPropertyDescriptor(e, n), a = r.get(n);
786
+ if (a !== void 0) {
787
+ var o = X(a);
788
+ if (o === t) return;
789
+ if (i && "value" in i) i.value = o;
790
+ else return {
791
+ enumerable: !0,
792
+ configurable: !0,
793
+ value: o,
794
+ writable: !0
795
+ };
796
+ }
797
+ return i;
798
+ },
799
+ has(e, n) {
800
+ if (n === ue) return !0;
801
+ var i = r.get(n), a = i !== void 0 && i.v !== t || Reflect.has(e, n);
802
+ return (i !== void 0 || W !== null && (!a || d(e, n)?.writable)) && (i === void 0 && (i = l(() => /* @__PURE__ */ M(a ? Wt(e[n]) : t, s)), r.set(n, i)), X(i) === t) ? !1 : a;
803
+ },
804
+ set(e, n, a, c) {
805
+ var u = r.get(n), f = n in e;
806
+ if (i && n === "length") for (var p = a; p < u.v; p += 1) {
807
+ var m = r.get(p + "");
808
+ m === void 0 ? p in e && (m = l(() => /* @__PURE__ */ M(t, s)), r.set(p + "", m)) : N(m, t);
809
+ }
810
+ if (u === void 0) (!f || d(e, n)?.writable) && (u = l(() => /* @__PURE__ */ M(void 0, s)), N(u, Wt(a)), r.set(n, u));
811
+ else {
812
+ f = u.v !== t;
813
+ var h = l(() => Wt(a));
814
+ N(u, h);
815
+ }
816
+ var g = Reflect.getOwnPropertyDescriptor(e, n);
817
+ if (g?.set && g.set.call(c, a), !f) {
818
+ if (i && typeof n == "string") {
819
+ var ee = r.get("length"), _ = Number(n);
820
+ Number.isInteger(_) && _ >= ee.v && N(ee, _ + 1);
821
+ }
822
+ Ht(o);
823
+ }
824
+ return !0;
825
+ },
826
+ ownKeys(e) {
827
+ X(o);
828
+ var n = Reflect.ownKeys(e).filter((e) => {
829
+ var n = r.get(e);
830
+ return n === void 0 || n.v !== t;
831
+ });
832
+ for (var [i, a] of r) a.v !== t && !(i in e) && n.push(i);
833
+ return n;
834
+ },
835
+ setPrototypeOf() {
836
+ Be();
837
+ }
838
+ });
839
+ }
840
+ var Gt, Kt, qt, Jt;
841
+ function Yt() {
842
+ if (Gt === void 0) {
843
+ Gt = window, Kt = /Firefox/.test(navigator.userAgent);
844
+ var e = Element.prototype, t = Node.prototype, n = Text.prototype;
845
+ qt = d(t, "firstChild").get, Jt = d(t, "nextSibling").get, g(e) && (e[he] = void 0, e[me] = null, e[ge] = void 0, e.__e = void 0), g(n) && (n[_e] = void 0);
846
+ }
847
+ }
848
+ function Xt(e = "") {
849
+ return document.createTextNode(e);
850
+ }
851
+ /*@__NO_SIDE_EFFECTS__*/
852
+ function P(e) {
853
+ return qt.call(e);
854
+ }
855
+ /*@__NO_SIDE_EFFECTS__*/
856
+ function F(e) {
857
+ return Jt.call(e);
858
+ }
859
+ function Zt(e, t) {
860
+ if (!C) return /* @__PURE__ */ P(e);
861
+ var n = /* @__PURE__ */ P(w);
862
+ if (n === null) n = w.appendChild(Xt());
863
+ else if (t && n.nodeType !== 3) {
864
+ var r = Xt();
865
+ return n?.before(r), T(r), r;
866
+ }
867
+ return t && an(n), T(n), n;
868
+ }
869
+ function Qt(e, t = !1) {
870
+ if (!C) {
871
+ var n = /* @__PURE__ */ P(e);
872
+ return n instanceof Comment && n.data === "" ? /* @__PURE__ */ F(n) : n;
873
+ }
874
+ if (t) {
875
+ if (w?.nodeType !== 3) {
876
+ var r = Xt();
877
+ return w?.before(r), T(r), r;
878
+ }
879
+ an(w);
880
+ }
881
+ return w;
882
+ }
883
+ function $t(e, t = !1) {
884
+ if (!C) return /* @__PURE__ */ P(e);
885
+ var n = Zt(e, t);
886
+ return Te(e), n;
887
+ }
888
+ function en(e, t = 1, n = !1) {
889
+ let r = C ? w : e;
890
+ for (var i; t--;) i = r, r = /* @__PURE__ */ F(r);
891
+ if (!C) return r;
892
+ if (n) {
893
+ if (r?.nodeType !== 3) {
894
+ var a = Xt();
895
+ return r === null ? i?.after(a) : r.before(a), T(a), a;
896
+ }
897
+ an(r);
898
+ }
899
+ return T(r), r;
900
+ }
901
+ function tn(e) {
902
+ e.textContent = "";
903
+ }
904
+ function nn() {
905
+ return !1;
906
+ }
907
+ function rn(e, t, n) {
908
+ return t == null || t === "http://www.w3.org/1999/xhtml" ? n ? document.createElement(e, { is: n }) : document.createElement(e) : n ? document.createElementNS(t, e, { is: n }) : document.createElementNS(t, e);
909
+ }
910
+ function an(e) {
911
+ if (e.nodeValue.length < 65536) return;
912
+ let t = e.nextSibling;
913
+ for (; t !== null && t.nodeType === 3;) t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
914
+ }
915
+ function on(e) {
916
+ var t = W;
917
+ if (t === null) return V.f |= le, e;
918
+ if (!(t.f & 32768) && !(t.f & 4)) throw e;
919
+ I(e, t);
920
+ }
921
+ function I(e, t) {
922
+ if (!(t !== null && t.f & 16384)) {
923
+ for (; t !== null;) {
924
+ if (t.f & 128 && !(t.f & 33570816)) {
925
+ if (!(t.f & 32768)) throw e;
926
+ try {
927
+ t.b.error(e);
928
+ return;
929
+ } catch (t) {
930
+ e = t;
931
+ }
932
+ }
933
+ t = t.parent;
934
+ }
935
+ throw e;
936
+ }
937
+ }
938
+ //#endregion
939
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/effects.js
940
+ function sn(e) {
941
+ W === null && (V === null && Fe(e), Pe()), B && Ne(e);
942
+ }
943
+ function cn(e, t) {
944
+ var n = t.last;
945
+ n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
946
+ }
947
+ function L(e, t) {
948
+ var n = W;
949
+ n !== null && n.f & 8192 && (e |= ne);
950
+ var r = {
951
+ ctx: E,
952
+ deps: null,
953
+ nodes: null,
954
+ f: e | b | 512,
955
+ first: null,
956
+ fn: t,
957
+ last: null,
958
+ next: null,
959
+ parent: n,
960
+ b: n && n.b,
961
+ prev: null,
962
+ teardown: null,
963
+ wv: 0,
964
+ ac: null
965
+ };
966
+ O?.register_created_effect(r);
967
+ var i = r;
968
+ if (e & 4) xt === null ? Tt.ensure().schedule(r) : xt.push(r);
969
+ else if (t !== null) {
970
+ try {
971
+ Kn(r);
972
+ } catch (e) {
973
+ throw z(r), e;
974
+ }
975
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, e & 16 && e & 65536 && i !== null && (i.f |= ie));
976
+ }
977
+ if (i !== null && (i.parent = n, n !== null && cn(i, n), V !== null && V.f & 2 && !(e & 64))) {
978
+ var a = V;
979
+ (a.effects ??= []).push(i);
980
+ }
981
+ return r;
982
+ }
983
+ function ln() {
984
+ return V !== null && !H;
985
+ }
986
+ function un(e) {
987
+ let t = L(8, null);
988
+ return D(t, y), t.teardown = e, t;
989
+ }
990
+ function dn(e) {
991
+ sn("$effect");
992
+ var t = W.f;
993
+ if (!V && t & 32 && E !== null && !E.i) {
994
+ var n = E;
995
+ (n.e ??= []).push(e);
996
+ } else return fn(e);
997
+ }
998
+ function fn(e) {
999
+ return L(4 | oe, e);
1000
+ }
1001
+ function pn(e) {
1002
+ Tt.ensure();
1003
+ let t = L(64 | ae, e);
1004
+ return () => {
1005
+ z(t);
1006
+ };
1007
+ }
1008
+ function mn(e) {
1009
+ Tt.ensure();
1010
+ let t = L(64 | ae, e);
1011
+ return (e = {}) => new Promise((n) => {
1012
+ e.outro ? Tn(t, () => {
1013
+ z(t), n(void 0);
1014
+ }) : (z(t), n(void 0));
1015
+ });
1016
+ }
1017
+ function hn(e) {
1018
+ return L(4, e);
1019
+ }
1020
+ function gn(e) {
1021
+ return L(ce | ae, e);
1022
+ }
1023
+ function _n(e, t = 0) {
1024
+ return L(8 | t, e);
1025
+ }
1026
+ function vn(e, t = [], n = [], r = []) {
1027
+ nt(r, t, n, (t) => {
1028
+ L(8, () => {
1029
+ e(...t.map(X));
1030
+ });
1031
+ });
1032
+ }
1033
+ function yn(e, t = 0) {
1034
+ return L(16 | t, e);
1035
+ }
1036
+ function R(e) {
1037
+ return L(32 | ae, e);
1038
+ }
1039
+ function bn(e) {
1040
+ var t = e.teardown;
1041
+ if (t !== null) {
1042
+ let n = B, r = V;
1043
+ Mn(!0), U(null);
1044
+ try {
1045
+ t.call(null);
1046
+ } catch (t) {
1047
+ I(t, e.parent);
1048
+ } finally {
1049
+ Mn(n), U(r);
1050
+ }
1051
+ }
1052
+ }
1053
+ function xn(e, t = !1) {
1054
+ var n = e.first;
1055
+ for (e.first = e.last = null; n !== null;) {
1056
+ let e = n.ac;
1057
+ e !== null && tt(() => {
1058
+ e.abort(ve);
1059
+ });
1060
+ var r = n.next;
1061
+ n.f & 64 ? n.parent = null : z(n, t), n = r;
1062
+ }
1063
+ }
1064
+ function Sn(e) {
1065
+ for (var t = e.first; t !== null;) {
1066
+ var n = t.next;
1067
+ t.f & 32 || z(t), t = n;
1068
+ }
1069
+ }
1070
+ function z(e, t = !0) {
1071
+ var n = !1;
1072
+ (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (Cn(e.nodes.start, e.nodes.end), n = !0), e.f |= S, xn(e, t && !n), Gn(e, 0);
1073
+ var r = e.nodes && e.nodes.t;
1074
+ if (r !== null) for (let e of r) e.stop();
1075
+ bn(e), e.f ^= S, e.f |= re;
1076
+ var i = e.parent;
1077
+ i !== null && i.first !== null && wn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1078
+ }
1079
+ function Cn(e, t) {
1080
+ for (; e !== null;) {
1081
+ var n = e === t ? null : /* @__PURE__ */ F(e);
1082
+ e.remove(), e = n;
1083
+ }
1084
+ }
1085
+ function wn(e) {
1086
+ var t = e.parent, n = e.prev, r = e.next;
1087
+ n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1088
+ }
1089
+ function Tn(e, t, n = !0) {
1090
+ var r = [];
1091
+ e.f |= 256, En(e, r, !0);
1092
+ var i = () => {
1093
+ n && z(e), t && t();
1094
+ }, a = r.length;
1095
+ if (a > 0) {
1096
+ var o = () => --a || i();
1097
+ for (var s of r) s.out(o);
1098
+ } else i();
1099
+ }
1100
+ function En(e, t, n) {
1101
+ if (!(e.f & 8192)) {
1102
+ e.f ^= ne;
1103
+ var r = e.nodes && e.nodes.t;
1104
+ if (r !== null) for (let e of r) (e.is_global || n) && t.push(e);
1105
+ for (var i = e.first; i !== null;) {
1106
+ var a = i.next;
1107
+ if (!(i.f & 64)) {
1108
+ var o = (i.f & 65536) != 0 || (i.f & 32) != 0 && (e.f & 16) != 0;
1109
+ En(i, t, o ? n : !1);
1110
+ }
1111
+ i = a;
1112
+ }
1113
+ }
1114
+ }
1115
+ function Dn(e) {
1116
+ e.f &= -257, On(e, !0);
1117
+ }
1118
+ function On(e, t) {
1119
+ if (!(e.f & 256) && e.f & 8192) {
1120
+ e.f ^= ne, e.f & 1024 || (D(e, b), Tt.ensure().schedule(e));
1121
+ for (var n = e.first; n !== null;) {
1122
+ var r = n.next, i = (n.f & 65536) != 0 || (n.f & 32) != 0;
1123
+ On(n, i ? t : !1), n = r;
1124
+ }
1125
+ var a = e.nodes && e.nodes.t;
1126
+ if (a !== null) for (let e of a) (e.is_global || t) && e.in();
1127
+ }
1128
+ }
1129
+ function kn(e, t) {
1130
+ if (e.nodes) for (var n = e.nodes.start, r = e.nodes.end; n !== null;) {
1131
+ var i = n === r ? null : /* @__PURE__ */ F(n);
1132
+ t.append(n), n = i;
1133
+ }
1134
+ }
1135
+ //#endregion
1136
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/legacy.js
1137
+ var An = null, jn = !1, B = !1;
1138
+ function Mn(e) {
1139
+ B = e;
1140
+ }
1141
+ var V = null, H = !1;
1142
+ function U(e) {
1143
+ V = e;
1144
+ }
1145
+ var W = null;
1146
+ function G(e) {
1147
+ W = e;
1148
+ }
1149
+ var K = null;
1150
+ function Nn(e) {
1151
+ V !== null && (V.f & 2097152 || V.f & 2) && (K ??= /* @__PURE__ */ new Set()).add(e);
1152
+ }
1153
+ var q = null, J = 0, Y = null;
1154
+ function Pn(e) {
1155
+ Y = e;
1156
+ }
1157
+ var Fn = 1, In = 0, Ln = In;
1158
+ function Rn(e) {
1159
+ Ln = e;
1160
+ }
1161
+ function zn() {
1162
+ return ++Fn;
1163
+ }
1164
+ function Bn(e) {
1165
+ var t = e.f;
1166
+ if (t & 2048) return !0;
1167
+ if (t & 4096) {
1168
+ for (var n = e.deps, r = n.length, i = 0; i < r; i++) {
1169
+ var a = n[i];
1170
+ if (Bn(a) && pt(a), a.wv > e.wv) return !0;
1171
+ }
1172
+ t & 512 && k === null && D(e, y);
1173
+ }
1174
+ return !1;
1175
+ }
1176
+ function Vn(e, t, n = !0) {
1177
+ var r = e.reactions;
1178
+ if (r !== null && !(K !== null && K.has(e))) for (var i = 0; i < r.length; i++) {
1179
+ var a = r[i];
1180
+ a.f & 2 ? Vn(a, t, !1) : t === a && (n ? D(a, b) : a.f & 1024 && D(a, te), jt(a));
1181
+ }
1182
+ }
1183
+ function Hn(e) {
1184
+ var t = q, n = J, r = Y, i = V, a = K, o = E, s = H, c = Ln, l = e.f;
1185
+ q = null, J = 0, Y = null, V = l & 96 ? null : e, K = null, Ue(e.ctx), H = !1, Ln = ++In, e.ac !== null && (tt(() => {
1186
+ e.ac.abort(ve);
1187
+ }), e.ac = null);
1188
+ try {
1189
+ e.f |= se;
1190
+ var u = e.fn, d = u();
1191
+ e.f |= x;
1192
+ var f = Un(e);
1193
+ if (qe() && Y !== null && !H && f !== null && !(e.f & 6146)) for (var p = 0; p < Y.length; p++) Vn(Y[p], e);
1194
+ if (i !== null && i !== e) {
1195
+ if (In++, i.deps !== null) for (let e = 0; e < n; e += 1) i.deps[e].rv = In;
1196
+ if (t !== null) for (let e of t) e.rv = In;
1197
+ Y !== null && (r === null ? r = Y : r.push(...Y));
1198
+ }
1199
+ return e.f & 8388608 && (e.f ^= le), d;
1200
+ } catch (t) {
1201
+ return Un(e), on(t);
1202
+ } finally {
1203
+ e.f ^= se, q = t, J = n, Y = r, V = i, K = a, Ue(o), H = s, Ln = c;
1204
+ }
1205
+ }
1206
+ function Un(e) {
1207
+ var t = e.deps, n = O?.is_fork;
1208
+ if (q !== null) {
1209
+ var r;
1210
+ if (n || Gn(e, J), t !== null && J > 0) for (t.length = J + q.length, r = 0; r < q.length; r++) t[J + r] = q[r];
1211
+ else e.deps = t = q;
1212
+ if (ln() && e.f & 512) for (r = J; r < t.length; r++) (t[r].reactions ??= []).push(e);
1213
+ } else !n && t !== null && J < t.length && (Gn(e, J), t.length = J);
1214
+ return t;
1215
+ }
1216
+ function Wn(e, n) {
1217
+ let r = n.reactions;
1218
+ if (r !== null) {
1219
+ var i = o.call(r, e);
1220
+ if (i !== -1) {
1221
+ var a = r.length - 1;
1222
+ a === 0 ? r = n.reactions = null : (r[i] = r[a], r.pop());
1223
+ }
1224
+ }
1225
+ if (r === null && n.f & 2 && (q === null || !s.call(q, n))) {
1226
+ var c = n;
1227
+ c.f & 512 && (c.f ^= 512), c.v !== t && $e(c), c.ac !== null && tt(() => {
1228
+ c.ac.abort(ve), c.ac = null, D(c, b);
1229
+ }), mt(c), Gn(c, 0);
1230
+ }
1231
+ }
1232
+ function Gn(e, t) {
1233
+ var n = e.deps;
1234
+ if (n !== null) for (var r = t; r < n.length; r++) Wn(e, n[r]);
1235
+ }
1236
+ function Kn(e) {
1237
+ var t = e.f;
1238
+ if (!(t & 16384)) {
1239
+ D(e, y);
1240
+ var n = W, r = jn;
1241
+ W = e, jn = (t & 96) == 0;
1242
+ try {
1243
+ t & 16777232 ? Sn(e) : xn(e), bn(e);
1244
+ var i = Hn(e);
1245
+ e.teardown = typeof i == "function" ? i : null, e.wv = Fn;
1246
+ } finally {
1247
+ jn = r, W = n;
1248
+ }
1249
+ }
1250
+ }
1251
+ function X(e) {
1252
+ var t = (e.f & 2) != 0;
1253
+ if (An?.add(e), V !== null && !H && !(W !== null && W.f & 16384) && (K === null || !K.has(e))) {
1254
+ var n = V.deps;
1255
+ if (V.f & 2097152) e.rv < In && (e.rv = In, q === null && n !== null && n[J] === e ? J++ : q === null ? q = [e] : q.push(e));
1256
+ else {
1257
+ V.deps ??= [], s.call(V.deps, e) || V.deps.push(e);
1258
+ var r = e.reactions;
1259
+ r === null ? e.reactions = [V] : s.call(r, V) || r.push(V);
1260
+ }
1261
+ }
1262
+ if (B && j.has(e)) return j.get(e);
1263
+ if (t) {
1264
+ var i = e;
1265
+ if (B) {
1266
+ var a = i.v;
1267
+ return (!(i.f & 1024) && i.reactions !== null || Jn(i)) && (a = ft(i)), j.set(i, a), a;
1268
+ }
1269
+ var o = (i.f & 512) == 0 && !H && V !== null && (jn || (V.f & 512) != 0), c = (i.f & x) === 0;
1270
+ Bn(i) && (o && (i.f |= 512), pt(i)), o && !c && (ht(i), qn(i));
1271
+ }
1272
+ if (k?.has(e)) return k.get(e);
1273
+ if (e.f & 8388608) throw e.v;
1274
+ return e.v;
1275
+ }
1276
+ function qn(e) {
1277
+ if (e.f |= 512, e.deps !== null) for (let t of e.deps) (t.reactions ??= []).push(e), t.f & 2 && !(t.f & 512) && (ht(t), qn(t));
1278
+ }
1279
+ function Jn(e) {
1280
+ if (e.v === t) return !0;
1281
+ if (e.deps === null) return !1;
1282
+ for (let t of e.deps) if (j.has(t) || t.f & 2 && Jn(t)) return !0;
1283
+ return !1;
1284
+ }
1285
+ function Yn(e) {
1286
+ var t = H;
1287
+ try {
1288
+ return H = !0, e();
1289
+ } finally {
1290
+ H = t;
1291
+ }
1292
+ }
1293
+ //#endregion
1294
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/events.js
1295
+ var Xn = Symbol("events"), Zn = /* @__PURE__ */ new Set(), Qn = /* @__PURE__ */ new Set(), $n = null, er = !1;
1296
+ function tr(e) {
1297
+ var t = this, n = t.ownerDocument, r = e.type, i = e.composedPath?.() || [], a = i[0] || e.target;
1298
+ $n = e, er || (er = !0, setTimeout(() => {
1299
+ er = !1, $n = null;
1300
+ }));
1301
+ var o = 0, s = $n === e && e[Xn];
1302
+ if (s) {
1303
+ var c = i.indexOf(s);
1304
+ if (c !== -1 && (t === document || t === window)) {
1305
+ e[Xn] = t;
1306
+ return;
1307
+ }
1308
+ var l = i.indexOf(t);
1309
+ if (l === -1) return;
1310
+ c <= l && (o = c);
1311
+ }
1312
+ if (a = i[o] || e.target, a !== t) {
1313
+ u(e, "currentTarget", {
1314
+ configurable: !0,
1315
+ get() {
1316
+ return a || n;
1317
+ }
1318
+ });
1319
+ var d = V, f = W;
1320
+ U(null), G(null);
1321
+ try {
1322
+ for (var p, m = []; a !== null && a !== t;) {
1323
+ try {
1324
+ var h = a[Xn]?.[r];
1325
+ h != null && (!a.disabled || e.target === a) && h.call(a, e);
1326
+ } catch (e) {
1327
+ p ? m.push(e) : p = e;
1328
+ }
1329
+ if (e.cancelBubble) break;
1330
+ o++, a = o < i.length ? i[o] : null;
1331
+ }
1332
+ if (p) {
1333
+ for (let e of m) queueMicrotask(() => {
1334
+ throw e;
1335
+ });
1336
+ throw p;
1337
+ }
1338
+ } finally {
1339
+ e[Xn] = t, delete e.currentTarget, U(d), G(f);
1340
+ }
1341
+ }
1342
+ }
1343
+ //#endregion
1344
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/reconciler.js
1345
+ var nr = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1346
+ function rr(e) {
1347
+ return nr?.createHTML(e) ?? e;
1348
+ }
1349
+ function ir(e) {
1350
+ var t = rn("template");
1351
+ return t.innerHTML = rr(e.replaceAll("<!>", "<!---->")), t.content;
1352
+ }
1353
+ //#endregion
1354
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/template.js
1355
+ function ar(e, t) {
1356
+ var n = W;
1357
+ n.nodes === null && (n.nodes = {
1358
+ start: e,
1359
+ end: t,
1360
+ a: null,
1361
+ t: null
1362
+ });
1363
+ }
1364
+ /*#__NO_SIDE_EFFECTS__*/
1365
+ function or(e, t) {
1366
+ var n = (t & 1) != 0, r = (t & 2) != 0, i, a = !e.startsWith("<!>");
1367
+ return () => {
1368
+ if (C) return ar(w, null), w;
1369
+ i === void 0 && (i = ir(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ P(i)));
1370
+ var t = r || Kt ? document.importNode(i, !0) : i.cloneNode(!0);
1371
+ if (n) {
1372
+ var o = /* @__PURE__ */ P(t), s = t.lastChild;
1373
+ ar(o, s);
1374
+ } else ar(t, t);
1375
+ return t;
1376
+ };
1377
+ }
1378
+ function sr(e, t) {
1379
+ if (C) {
1380
+ var n = W;
1381
+ (!(n.f & 32768) || n.nodes.end === null) && (n.nodes.end = w), we();
1382
+ return;
1383
+ }
1384
+ e !== null && e.before(t);
1385
+ }
1386
+ [.../* @__PURE__ */ "allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback".split(".")];
1387
+ var cr = ["touchstart", "touchmove"];
1388
+ function lr(e) {
1389
+ return cr.includes(e);
1390
+ }
1391
+ //#endregion
1392
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/reactivity/create-subscriber.js
1393
+ function ur(e) {
1394
+ let t = 0, n = It(0), r;
1395
+ return () => {
1396
+ ln() && (X(n), _n(() => (t === 0 && (r = Yn(() => e(() => Ht(n)))), t += 1, () => {
1397
+ Xe(() => {
1398
+ --t, t === 0 && (r?.(), r = void 0, Ht(n));
1399
+ });
1400
+ })));
1401
+ };
1402
+ }
1403
+ //#endregion
1404
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1405
+ var dr = ie | ae;
1406
+ function fr(e, t, n, r) {
1407
+ new pr(e, t, n, r);
1408
+ }
1409
+ var pr = class {
1410
+ parent;
1411
+ is_pending = !1;
1412
+ transform_error;
1413
+ #e;
1414
+ #t = C ? w : null;
1415
+ #n;
1416
+ #r;
1417
+ #i;
1418
+ #a = null;
1419
+ #o = null;
1420
+ #s = null;
1421
+ #c = null;
1422
+ #l = 0;
1423
+ #u = 0;
1424
+ #d = !1;
1425
+ #f = /* @__PURE__ */ new Set();
1426
+ #p = /* @__PURE__ */ new Set();
1427
+ #m = null;
1428
+ #h = ur(() => (this.#m = It(this.#l), () => {
1429
+ this.#m = null;
1430
+ }));
1431
+ constructor(e, t, n, r) {
1432
+ this.#e = e, this.#n = t, this.#r = (e) => {
1433
+ var t = W;
1434
+ t.b = this, t.f |= 128, n(e);
1435
+ }, this.parent = W.b, this.transform_error = r ?? this.parent?.transform_error ?? ((e) => e), this.#i = yn(() => {
1436
+ if (C) {
1437
+ let e = this.#t;
1438
+ we();
1439
+ let t = e.data === "[!";
1440
+ if (e.data.startsWith("[?")) {
1441
+ let t = JSON.parse(e.data.slice(2));
1442
+ this.#_(t);
1443
+ } else t ? this.#y() : this.#g();
1444
+ } else this.#b();
1445
+ }, dr), C && (this.#e = w);
1446
+ }
1447
+ #g() {
1448
+ try {
1449
+ this.#a = R(() => this.#r(this.#e));
1450
+ } catch (e) {
1451
+ this.error(e);
1452
+ }
1453
+ }
1454
+ #_(e) {
1455
+ let t = this.#n.failed, { reset: n, invoke_onerror: r } = this.#v(e);
1456
+ Xe(r), t && (this.#s = R(() => {
1457
+ t(this.#e, () => e, () => n);
1458
+ }));
1459
+ }
1460
+ #v(e) {
1461
+ var t = !1, n = !1;
1462
+ let r = () => {
1463
+ if (t) {
1464
+ Se();
1465
+ return;
1466
+ }
1467
+ t = !0, n && He(), this.#s !== null && Tn(this.#s, () => {
1468
+ this.#s = null;
1469
+ }), this.#S(() => {
1470
+ this.#b();
1471
+ });
1472
+ };
1473
+ return {
1474
+ reset: r,
1475
+ invoke_onerror: () => {
1476
+ try {
1477
+ n = !0, this.#n.onerror?.(e, r), n = !1;
1478
+ } catch (e) {
1479
+ I(e, this.#i && this.#i.parent);
1480
+ }
1481
+ }
1482
+ };
1483
+ }
1484
+ #y() {
1485
+ let e = this.#n.pending;
1486
+ e && (this.is_pending = !0, this.#o = R(() => e(this.#e)), Xe(() => {
1487
+ var e = this.#c = document.createDocumentFragment(), t = Xt(), n = !1;
1488
+ if (e.append(t), this.#a = this.#S(() => {
1489
+ try {
1490
+ return R(() => this.#r(t));
1491
+ } catch (e) {
1492
+ try {
1493
+ this.error(e), n = !0;
1494
+ } catch (e) {
1495
+ I(e, this.#i.parent);
1496
+ }
1497
+ return null;
1498
+ }
1499
+ }), this.#a === null) {
1500
+ this.#c = null, n && this.#x(O);
1501
+ return;
1502
+ }
1503
+ this.#u === 0 && (this.#e.before(e), this.#c = null, Tn(this.#o, () => {
1504
+ this.#o = null;
1505
+ }), this.#x(O));
1506
+ }));
1507
+ }
1508
+ #b() {
1509
+ try {
1510
+ if (this.is_pending = this.has_pending_snippet(), this.#u = 0, this.#l = 0, this.#a = R(() => {
1511
+ this.#r(this.#e);
1512
+ }), this.#u > 0) {
1513
+ var e = this.#c = document.createDocumentFragment();
1514
+ kn(this.#a, e);
1515
+ let t = this.#n.pending;
1516
+ this.#o = R(() => t(this.#e));
1517
+ } else this.#x(O);
1518
+ } catch (e) {
1519
+ this.error(e);
1520
+ }
1521
+ }
1522
+ #x(e) {
1523
+ this.is_pending = !1, e.transfer_effects(this.#f, this.#p);
1524
+ }
1525
+ defer_effect(e) {
1526
+ et(e, this.#f, this.#p);
1527
+ }
1528
+ is_rendered() {
1529
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
1530
+ }
1531
+ has_pending_snippet() {
1532
+ return !!this.#n.pending;
1533
+ }
1534
+ #S(e) {
1535
+ var t = W, n = V, r = E;
1536
+ G(this.#i), U(this.#i), Ue(this.#i.ctx);
1537
+ try {
1538
+ return Tt.ensure(), e();
1539
+ } finally {
1540
+ G(t), U(n), Ue(r);
1541
+ }
1542
+ }
1543
+ #C(e, t) {
1544
+ if (!this.has_pending_snippet()) {
1545
+ this.parent && this.parent.#C(e, t);
1546
+ return;
1547
+ }
1548
+ this.#u += e, this.#u === 0 && (this.#x(t), this.#o && Tn(this.#o, () => {
1549
+ this.#o = null;
1550
+ }), this.#c &&= (this.#e.before(this.#c), null));
1551
+ }
1552
+ update_pending_count(e, t) {
1553
+ this.#C(e, t), this.#l += e, !(!this.#m || this.#d) && (this.#d = !0, Xe(() => {
1554
+ this.#d = !1, this.#m && Bt(this.#m, this.#l);
1555
+ }));
1556
+ }
1557
+ get_effect_pending() {
1558
+ return this.#h(), X(this.#m);
1559
+ }
1560
+ error(e) {
1561
+ if (!this.#n.onerror && !this.#n.failed) throw e;
1562
+ O?.is_fork ? (this.#a && O.skip_effect(this.#a), this.#o && O.skip_effect(this.#o), this.#s && O.skip_effect(this.#s), O.oncommit(() => {
1563
+ this.#w(e);
1564
+ })) : this.#w(e);
1565
+ }
1566
+ #w(e) {
1567
+ this.#a &&= (z(this.#a), null), this.#o &&= (z(this.#o), null), this.#s &&= (z(this.#s), null), C && (T(this.#t), Ee(), T(De()));
1568
+ let t = this.#n.failed, n = (e) => {
1569
+ let { reset: n, invoke_onerror: r } = this.#v(e);
1570
+ r(), t && (this.#s = this.#S(() => {
1571
+ try {
1572
+ return R(() => {
1573
+ var r = W;
1574
+ r.b = this, r.f |= 128, t(this.#e, () => e, () => n);
1575
+ });
1576
+ } catch (e) {
1577
+ return I(e, this.#i.parent), null;
1578
+ }
1579
+ }));
1580
+ };
1581
+ Xe(() => {
1582
+ var t;
1583
+ try {
1584
+ t = this.transform_error(e);
1585
+ } catch (e) {
1586
+ I(e, this.#i && this.#i.parent);
1587
+ return;
1588
+ }
1589
+ typeof t == "object" && t && typeof t.then == "function" ? t.then(n, (e) => I(e, this.#i && this.#i.parent)) : n(t);
1590
+ });
1591
+ }
1592
+ };
1593
+ function mr(e, t) {
1594
+ var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
1595
+ n !== (e[_e] ??= e.nodeValue) && (e[_e] = n, e.nodeValue = `${n}`);
1596
+ }
1597
+ function hr(e, t) {
1598
+ return vr(e, t);
1599
+ }
1600
+ function gr(t, n) {
1601
+ Yt(), n.intro = n.intro ?? !1;
1602
+ let r = n.target, i = C, a = w;
1603
+ try {
1604
+ for (var o = /* @__PURE__ */ P(r); o && (o.nodeType !== 8 || o.data !== "[");) o = /* @__PURE__ */ F(o);
1605
+ if (!o) throw e;
1606
+ Ce(!0), T(o);
1607
+ let i = vr(t, {
1608
+ ...n,
1609
+ anchor: o
1610
+ });
1611
+ return Ce(!1), i;
1612
+ } catch (i) {
1613
+ if (i instanceof Error && i.message.split("\n").some((e) => e.startsWith("https://svelte.dev/e/"))) throw i;
1614
+ return i !== e && console.warn("Failed to hydrate: ", i), n.recover === !1 && Le(), Yt(), tn(r), Ce(!1), hr(t, n);
1615
+ } finally {
1616
+ Ce(i), T(a);
1617
+ }
1618
+ }
1619
+ var _r = /* @__PURE__ */ new Map();
1620
+ function vr(t, { target: n, anchor: r, props: i = {}, events: a, context: o, intro: s = !0, transformError: l }) {
1621
+ Yt();
1622
+ var u = void 0, d = mn(() => {
1623
+ var s = r ?? n.appendChild(Xt());
1624
+ fr(s, { pending: () => {} }, (n) => {
1625
+ We({});
1626
+ var r = E;
1627
+ if (o && (r.c = o), a && (i.$$events = a), C && ar(n, null), u = t(n, i) || Ke(), C && (W.nodes.end = w, w === null || w.nodeType !== 8 || w.data !== "]")) throw xe(), e;
1628
+ Ge();
1629
+ }, l);
1630
+ var d = /* @__PURE__ */ new Set(), f = (e) => {
1631
+ for (var t = 0; t < e.length; t++) {
1632
+ var r = e[t];
1633
+ if (!d.has(r)) {
1634
+ d.add(r);
1635
+ var i = lr(r);
1636
+ for (let e of [n, document]) {
1637
+ var a = _r.get(e);
1638
+ a === void 0 && (a = /* @__PURE__ */ new Map(), _r.set(e, a));
1639
+ var o = a.get(r);
1640
+ o === void 0 ? (e.addEventListener(r, tr, { passive: i }), a.set(r, 1)) : a.set(r, o + 1);
1641
+ }
1642
+ }
1643
+ }
1644
+ };
1645
+ return f(c(Zn)), Qn.add(f), () => {
1646
+ for (var e of d) for (let r of [n, document]) {
1647
+ var t = _r.get(r), i = t.get(e);
1648
+ --i == 0 ? (r.removeEventListener(e, tr), t.delete(e), t.size === 0 && _r.delete(r)) : t.set(e, i);
1649
+ }
1650
+ Qn.delete(f), s !== r && s.parentNode?.removeChild(s);
1651
+ };
1652
+ });
1653
+ return yr.set(u, d), u;
1654
+ }
1655
+ var yr = /* @__PURE__ */ new WeakMap();
1656
+ function br(e, t) {
1657
+ let n = yr.get(e);
1658
+ return n ? (yr.delete(e), n(t)) : Promise.resolve();
1659
+ }
1660
+ //#endregion
1661
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/branches.js
1662
+ var xr = class {
1663
+ anchor;
1664
+ #e = /* @__PURE__ */ new Map();
1665
+ #t = /* @__PURE__ */ new Map();
1666
+ #n = /* @__PURE__ */ new Map();
1667
+ #r = /* @__PURE__ */ new Set();
1668
+ #i = !0;
1669
+ constructor(e, t = !0) {
1670
+ this.anchor = e, this.#i = t;
1671
+ }
1672
+ #a = (e) => {
1673
+ if (this.#e.has(e)) {
1674
+ var t = this.#e.get(e), n = this.#t.get(t);
1675
+ if (n) Dn(n), this.#r.delete(t);
1676
+ else {
1677
+ var r = this.#n.get(t);
1678
+ r && (Dn(r.effect), this.#t.set(t, r.effect), this.#n.delete(t), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
1679
+ }
1680
+ for (let [t, n] of this.#e) {
1681
+ if (this.#e.delete(t), t === e) break;
1682
+ let r = this.#n.get(n);
1683
+ r && (z(r.effect), this.#n.delete(n));
1684
+ }
1685
+ for (let [e, r] of this.#t) {
1686
+ if (e === t || this.#r.has(e)) continue;
1687
+ let i = () => {
1688
+ if (Array.from(this.#e.values()).includes(e)) {
1689
+ var t = document.createDocumentFragment();
1690
+ kn(r, t), t.append(Xt()), this.#n.set(e, {
1691
+ effect: r,
1692
+ fragment: t
1693
+ });
1694
+ } else z(r);
1695
+ this.#r.delete(e), this.#t.delete(e);
1696
+ };
1697
+ this.#i || !n ? (this.#r.add(e), Tn(r, i, !1)) : i();
1698
+ }
1699
+ }
1700
+ };
1701
+ #o = (e) => {
1702
+ this.#e.delete(e);
1703
+ let t = Array.from(this.#e.values());
1704
+ for (let [e, n] of this.#n) t.includes(e) || (z(n.effect), this.#n.delete(e));
1705
+ };
1706
+ ensure(e, t) {
1707
+ var n = O, r = nn();
1708
+ if (t && !this.#t.has(e) && !this.#n.has(e)) if (r) {
1709
+ var i = document.createDocumentFragment(), a = Xt();
1710
+ i.append(a), this.#n.set(e, {
1711
+ effect: R(() => t(a)),
1712
+ fragment: i
1713
+ });
1714
+ } else this.#t.set(e, R(() => t(this.anchor)));
1715
+ if (this.#e.set(n, e), r) {
1716
+ for (let [t, r] of this.#t) t === e ? n.unskip_effect(r) : n.skip_effect(r);
1717
+ for (let [t, r] of this.#n) t === e ? n.unskip_effect(r.effect) : n.skip_effect(r.effect);
1718
+ n.oncommit(this.#a), n.ondiscard(this.#o);
1719
+ } else C && (this.anchor = w), this.#a(n);
1720
+ }
1721
+ };
1722
+ //#endregion
1723
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/if.js
1724
+ function Sr(e, t, n = !1) {
1725
+ var r;
1726
+ C && (r = w, we());
1727
+ var i = new xr(e), a = n ? ie : 0;
1728
+ function o(e, t) {
1729
+ if (C) {
1730
+ var n = Oe(r);
1731
+ if (e !== parseInt(n.substring(1))) {
1732
+ var a = De();
1733
+ T(a), i.anchor = a, Ce(!1), i.ensure(e, t), Ce(!0);
1734
+ return;
1735
+ }
1736
+ }
1737
+ i.ensure(e, t);
1738
+ }
1739
+ yn(() => {
1740
+ var e = !1;
1741
+ t((t, n = 0) => {
1742
+ e = !0, o(n, t);
1743
+ }), e || o(-1, null);
1744
+ }, a);
1745
+ }
1746
+ function Cr(t, n, a = !1, o = !1, s = !1, c = !1) {
1747
+ var l = t, u = "";
1748
+ if (a) {
1749
+ var d = t;
1750
+ C && (l = T(/* @__PURE__ */ P(d)));
1751
+ }
1752
+ vn(() => {
1753
+ var t = W;
1754
+ if (u === (u = n() ?? "")) {
1755
+ C && we();
1756
+ return;
1757
+ }
1758
+ if (a && !C) {
1759
+ t.nodes = null, d.innerHTML = u, u !== "" && ar(/* @__PURE__ */ P(d), d.lastChild);
1760
+ return;
1761
+ }
1762
+ if (t.nodes !== null && (Cn(t.nodes.start, t.nodes.end), t.nodes = null), u !== "") {
1763
+ if (C) {
1764
+ for (var c = w.data, f = we(), p = f; f !== null && (f.nodeType !== 8 || f.data !== "");) p = f, f = /* @__PURE__ */ F(f);
1765
+ if (f === null) throw xe(), e;
1766
+ ar(w, p), l = T(f);
1767
+ return;
1768
+ }
1769
+ var m = rn(o ? "svg" : s ? "math" : "template", o ? r : s ? i : void 0);
1770
+ m.innerHTML = u;
1771
+ var h = o || s ? m : m.content;
1772
+ if (ar(/* @__PURE__ */ P(h), h.lastChild), o || s) for (; /* @__PURE__ */ P(h);) l.before(/* @__PURE__ */ P(h));
1773
+ else l.before(h);
1774
+ }
1775
+ });
1776
+ }
1777
+ //#endregion
1778
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/css.js
1779
+ function wr(e, t) {
1780
+ hn(() => {
1781
+ e = W?.parent?.nodes?.start ?? e;
1782
+ var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
1783
+ if (!r.querySelector("#" + t.hash)) {
1784
+ let e = rn("style");
1785
+ e.id = t.hash, e.textContent = t.code, r.appendChild(e);
1786
+ }
1787
+ });
1788
+ }
1789
+ //#endregion
1790
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/attributes.js
1791
+ var Tr = Symbol("is custom element"), Er = Symbol("is html"), Dr = ye ? "link" : "LINK";
1792
+ function Or(e, t, n, r) {
1793
+ var i = kr(e);
1794
+ C && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Dr) || i[t] !== (i[t] = n) && (t === "loading" && (e[pe] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && jr(e).has(t) ? e[t] = n : e.setAttribute(t, n));
1795
+ }
1796
+ function kr(e) {
1797
+ return e[me] ??= {
1798
+ [Tr]: e.nodeName.includes("-"),
1799
+ [Er]: e.namespaceURI === n
1800
+ };
1801
+ }
1802
+ var Ar = /* @__PURE__ */ new Map();
1803
+ function jr(e) {
1804
+ var t = e.getAttribute("is") || e.nodeName, n = Ar.get(t);
1805
+ if (n) return n;
1806
+ Ar.set(t, n = /* @__PURE__ */ new Set());
1807
+ for (var r, i = e, a = Element.prototype; a !== i;) {
1808
+ for (var o in r = f(i), r) r[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && n.add(o);
1809
+ i = h(i);
1810
+ }
1811
+ return n;
1812
+ }
1813
+ //#endregion
1814
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
1815
+ function Mr(e, t) {
1816
+ return e === t || e?.[ue] === t;
1817
+ }
1818
+ function Nr(e = Ke(), t, n, r) {
1819
+ var i = E.r, a = W;
1820
+ return hn(() => {
1821
+ var o, s;
1822
+ return _n(() => {
1823
+ o = s, s = r?.() || [], Yn(() => {
1824
+ Mr(n(...s), e) || (t(e, ...s), o && Mr(n(...o), e) && t(null, ...o));
1825
+ });
1826
+ }), () => {
1827
+ let r = a;
1828
+ for (; r !== i && r.parent !== null && r.parent.f & 33554432;) r = r.parent;
1829
+ let o = () => {
1830
+ s && Mr(n(...s), e) && t(null, ...s);
1831
+ }, c = r.teardown;
1832
+ r.teardown = () => {
1833
+ o(), c?.();
1834
+ };
1835
+ };
1836
+ }), e;
1837
+ }
1838
+ //#endregion
1839
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/store.js
1840
+ var Pr = !1;
1841
+ function Fr(e) {
1842
+ var t = Pr;
1843
+ try {
1844
+ return Pr = !1, [e(), Pr];
1845
+ } finally {
1846
+ Pr = t;
1847
+ }
1848
+ }
1849
+ //#endregion
1850
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/props.js
1851
+ function Ir(e, t, n, r) {
1852
+ var i = !0, a = (n & 8) != 0, o = (n & 16) != 0, s = r, c = !0, l = void 0, u = () => o && i ? (l ??= /* @__PURE__ */ ot(r), X(l)) : (c && (c = !1, s = o ? Yn(r) : r), s);
1853
+ let f;
1854
+ if (a) {
1855
+ var p = ue in e || fe in e;
1856
+ f = d(e, t)?.set ?? (p && t in e ? (n) => e[t] = n : void 0);
1857
+ }
1858
+ var m, h = !1;
1859
+ a ? [m, h] = Fr(() => e[t]) : m = e[t], m === void 0 && r !== void 0 && (m = u(), f && (i && Re(t), f(m)));
1860
+ var g = i ? () => {
1861
+ var n = e[t];
1862
+ return n === void 0 ? u() : (c = !0, n);
1863
+ } : () => {
1864
+ var n = e[t];
1865
+ return n !== void 0 && (s = void 0), n === void 0 ? s : n;
1866
+ };
1867
+ if (i && !(n & 4)) return g;
1868
+ if (f) {
1869
+ var ee = e.$$legacy;
1870
+ return (function(e, t) {
1871
+ return arguments.length > 0 ? ((!i || !t || ee || h) && f(t ? g() : e), e) : g();
1872
+ });
1873
+ }
1874
+ var _ = !1, v = (n & 1 ? ot : ut)(() => (_ = !1, g()));
1875
+ a && X(v);
1876
+ var y = W;
1877
+ return (function(e, t) {
1878
+ if (arguments.length > 0) {
1879
+ let n = t ? X(v) : i && a ? Wt(e) : e;
1880
+ return N(v, n), _ = !0, s !== void 0 && (s = n), e;
1881
+ }
1882
+ return B && _ || y.f & 16384 ? v.v : X(v);
1883
+ });
1884
+ }
1885
+ //#endregion
1886
+ //#region ../../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/legacy/legacy-client.js
1887
+ function Lr(e) {
1888
+ return new Rr(e);
1889
+ }
1890
+ var Rr = class {
1891
+ #e;
1892
+ #t;
1893
+ constructor(e) {
1894
+ var t = /* @__PURE__ */ new Map(), n = (e, n) => {
1895
+ var r = /* @__PURE__ */ Lt(n, !1, !1);
1896
+ return t.set(e, r), r;
1897
+ };
1898
+ let r = new Proxy({
1899
+ ...e.props || {},
1900
+ $$events: {}
1901
+ }, {
1902
+ get(e, r) {
1903
+ return X(t.get(r) ?? n(r, Reflect.get(e, r)));
1904
+ },
1905
+ has(e, r) {
1906
+ return r === fe ? !0 : (X(t.get(r) ?? n(r, Reflect.get(e, r))), Reflect.has(e, r));
1907
+ },
1908
+ set(e, r, i) {
1909
+ return N(t.get(r) ?? n(r, i), i), Reflect.set(e, r, i);
1910
+ }
1911
+ });
1912
+ this.#t = (e.hydrate ? gr : hr)(e.component, {
1913
+ target: e.target,
1914
+ anchor: e.anchor,
1915
+ props: r,
1916
+ context: e.context,
1917
+ intro: e.intro ?? !1,
1918
+ recover: e.recover,
1919
+ transformError: e.transformError
1920
+ }), (!e?.props?.$$host || e.sync === !1) && Et(), this.#e = r.$$events;
1921
+ for (let e of Object.keys(this.#t)) e === "$set" || e === "$destroy" || e === "$on" || u(this, e, {
1922
+ get() {
1923
+ return this.#t[e];
1924
+ },
1925
+ set(t) {
1926
+ this.#t[e] = t;
1927
+ },
1928
+ enumerable: !0
1929
+ });
1930
+ this.#t.$set = (e) => {
1931
+ Object.assign(r, e);
1932
+ }, this.#t.$destroy = () => {
1933
+ br(this.#t);
1934
+ };
1935
+ }
1936
+ $set(e) {
1937
+ this.#t.$set(e);
1938
+ }
1939
+ $on(e, t) {
1940
+ this.#e[e] = this.#e[e] || [];
1941
+ let n = (...e) => t.call(this, ...e);
1942
+ return this.#e[e].push(n), () => {
1943
+ this.#e[e] = this.#e[e].filter((e) => e !== n);
1944
+ };
1945
+ }
1946
+ $destroy() {
1947
+ this.#t.$destroy();
1948
+ }
1949
+ }, zr;
1950
+ typeof HTMLElement == "function" && (zr = class extends HTMLElement {
1951
+ $$ctor;
1952
+ $$s;
1953
+ $$c;
1954
+ $$cn = !1;
1955
+ $$d = {};
1956
+ $$r = !1;
1957
+ $$p_d = {};
1958
+ $$l = {};
1959
+ $$l_u = /* @__PURE__ */ new Map();
1960
+ $$me;
1961
+ $$shadowRoot = null;
1962
+ constructor(e, t, n) {
1963
+ super(), this.$$ctor = e, this.$$s = t, n && (this.$$shadowRoot = this.attachShadow(n));
1964
+ }
1965
+ addEventListener(e, t, n) {
1966
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
1967
+ let n = this.$$c.$on(e, t);
1968
+ this.$$l_u.set(t, n);
1969
+ }
1970
+ super.addEventListener(e, t, n);
1971
+ }
1972
+ removeEventListener(e, t, n) {
1973
+ if (super.removeEventListener(e, t, n), this.$$c) {
1974
+ let e = this.$$l_u.get(t);
1975
+ e && (e(), this.$$l_u.delete(t));
1976
+ }
1977
+ }
1978
+ async connectedCallback() {
1979
+ if (this.$$cn = !0, !this.$$c) {
1980
+ if (await Promise.resolve(), !this.$$cn || this.$$c) return;
1981
+ function e(e) {
1982
+ return (t) => {
1983
+ let n = rn("slot");
1984
+ e !== "default" && (n.name = e), sr(t, n);
1985
+ };
1986
+ }
1987
+ let t = {}, n = Vr(this);
1988
+ for (let r of this.$$s) r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), t.default = !0) : t[r] = e(r));
1989
+ for (let e of this.attributes) {
1990
+ let t = this.$$g_p(e.name);
1991
+ t in this.$$d || (this.$$d[t] = Br(t, e.value, this.$$p_d, "toProp"));
1992
+ }
1993
+ for (let e in this.$$p_d) !(e in this.$$d) && this[e] !== void 0 && (this.$$d[e] = this[e], delete this[e]);
1994
+ this.$$c = Lr({
1995
+ component: this.$$ctor,
1996
+ target: this.$$shadowRoot || this,
1997
+ props: {
1998
+ ...this.$$d,
1999
+ $$slots: t,
2000
+ $$host: this
2001
+ }
2002
+ }), this.$$me = pn(() => {
2003
+ _n(() => {
2004
+ this.$$r = !0;
2005
+ for (let e of l(this.$$c)) {
2006
+ if (!this.$$p_d[e]?.reflect) continue;
2007
+ this.$$d[e] = this.$$c[e];
2008
+ let t = Br(e, this.$$d[e], this.$$p_d, "toAttribute");
2009
+ t == null ? this.removeAttribute(this.$$p_d[e].attribute || e) : this.setAttribute(this.$$p_d[e].attribute || e, t);
2010
+ }
2011
+ this.$$r = !1;
2012
+ });
2013
+ });
2014
+ for (let e in this.$$l) for (let t of this.$$l[e]) {
2015
+ let n = this.$$c.$on(e, t);
2016
+ this.$$l_u.set(t, n);
2017
+ }
2018
+ this.$$l = {};
2019
+ }
2020
+ }
2021
+ attributeChangedCallback(e, t, n) {
2022
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = Br(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2023
+ }
2024
+ disconnectedCallback() {
2025
+ this.$$cn = !1, Promise.resolve().then(() => {
2026
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2027
+ });
2028
+ }
2029
+ $$g_p(e) {
2030
+ return l(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2031
+ }
2032
+ });
2033
+ function Br(e, t, n, r) {
2034
+ let i = n[e]?.type;
2035
+ if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e]) return t;
2036
+ if (r === "toAttribute") switch (i) {
2037
+ case "Object":
2038
+ case "Array": return t == null ? null : JSON.stringify(t);
2039
+ case "Boolean": return t ? "" : null;
2040
+ case "Number": return t ?? null;
2041
+ default: return t;
2042
+ }
2043
+ else switch (i) {
2044
+ case "Object":
2045
+ case "Array": return t && JSON.parse(t);
2046
+ case "Boolean": return t;
2047
+ case "Number": return t == null ? t : +t;
2048
+ default: return t;
2049
+ }
2050
+ }
2051
+ function Vr(e) {
2052
+ let t = {};
2053
+ return e.childNodes.forEach((e) => {
2054
+ t[e.slot || "default"] = !0;
2055
+ }), t;
2056
+ }
2057
+ function Hr(e, t, n, r, i, a) {
2058
+ let o = class extends zr {
2059
+ constructor() {
2060
+ super(e, n, i), this.$$p_d = t;
2061
+ }
2062
+ static get observedAttributes() {
2063
+ return l(t).map((e) => (t[e].attribute || e).toLowerCase());
2064
+ }
2065
+ };
2066
+ return l(t).forEach((e) => {
2067
+ u(o.prototype, e, {
2068
+ get() {
2069
+ return this.$$c && e in this.$$c ? this.$$c[e] : this.$$d[e];
2070
+ },
2071
+ set(n) {
2072
+ n = Br(e, n, t), this.$$d[e] = n;
2073
+ var r = this.$$c;
2074
+ r && (d(r, e)?.get ? r[e] = n : r.$set({ [e]: n }));
2075
+ }
2076
+ });
2077
+ }), r.forEach((e) => {
2078
+ u(o.prototype, e, { get() {
2079
+ return this.$$c?.[e];
2080
+ } });
2081
+ }), a && (o = a(o)), e.element = o, o;
2082
+ }
2083
+ //#endregion
2084
+ //#region ../../shared/math-rendering-mathjax/dist/index.js
2085
+ var Ur = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page", Wr = "pie-mathjax-version-conflict", Gr = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
2086
+ function Kr(e, t) {
2087
+ if (typeof window > "u") return;
2088
+ let n = globalThis;
2089
+ n[Gr] ??= {
2090
+ logged: !1,
2091
+ conditions: []
2092
+ };
2093
+ let r = n[Gr];
2094
+ if (r.conditions.includes(e)) return;
2095
+ r.conditions.push(e);
2096
+ let i = `[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Ur}`;
2097
+ r.logged || (r.logged = !0, console.error(i)), window.dispatchEvent(new CustomEvent(Wr, { detail: {
2098
+ condition: e,
2099
+ message: i,
2100
+ docsUrl: Ur
2101
+ } }));
2102
+ }
2103
+ function qr() {
2104
+ let e = window.MathJax?.version;
2105
+ return typeof e == "string" && e.startsWith("3.") ? e : void 0;
2106
+ }
2107
+ var Jr = "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js", Yr = {
2108
+ parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
2109
+ overarc: "\\overparen",
2110
+ napprox: "\\not\\approx",
2111
+ longdiv: "\\enclose{longdiv}",
2112
+ abs: ["\\left|#1\\right|", 1]
2113
+ }, Xr = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Zr = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, Qr = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, $r = /\\embed\{newLine\}\[\]/g, ei = [
2114
+ ["$$", "$$"],
2115
+ ["$", "$"],
2116
+ ["\\[", "\\]"],
2117
+ ["\\(", "\\)"]
2118
+ ], ti = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), ni = "PIE-MJX-CHTML-styles", ri = "MJX-CHTML-styles", ii = [ri, "MJX-SVG-styles"], ai = 201;
2119
+ function oi(e) {
2120
+ let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
2121
+ for (let e of t) for (let t of [e, ...e.querySelectorAll("[data-latex],[data-latex-item]")]) t.removeAttribute("data-latex"), t.removeAttribute("data-latex-item");
2122
+ }
2123
+ function si() {
2124
+ return window.MathJax;
2125
+ }
2126
+ function ci(e) {
2127
+ for (let [t, n] of ei) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
2128
+ return e;
2129
+ }
2130
+ function li(e) {
2131
+ return ci(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
2132
+ }
2133
+ var ui = "mathjax_ignore", di = "mathjax_process";
2134
+ function fi(e, t) {
2135
+ let n = e.closest(`.${ui}, .${di}`);
2136
+ return n !== null && t.contains(n) && !n.classList.contains(di);
2137
+ }
2138
+ function pi(e) {
2139
+ for (let t of e.querySelectorAll("[data-latex]")) {
2140
+ if (t.dataset.mathHandled || t.closest("mjx-container") || fi(t, e)) continue;
2141
+ let n = t.textContent;
2142
+ n && (t.textContent = `\\(${li(n)}\\)`.replace($r, "\\newline "), t.dataset.mathHandled = "true");
2143
+ }
2144
+ }
2145
+ function mi(e, t) {
2146
+ for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
2147
+ return (t ? Qr : Zr).test(e.textContent ?? "");
2148
+ }
2149
+ function hi(e) {
2150
+ return new Promise((t, n) => {
2151
+ let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = e, s = {
2152
+ loader: {
2153
+ load: i ? ["a11y/assistive-mml"] : [],
2154
+ failed: (e) => n(e)
2155
+ },
2156
+ startup: {
2157
+ typeset: !1,
2158
+ ready: () => {
2159
+ let e = si(), r = e?.startup, i = !!e?.version?.startsWith("4.");
2160
+ i && gi(e), r?.defaultReady?.(), i && _i(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
2161
+ }
2162
+ },
2163
+ tex: { macros: { ...Yr } },
2164
+ options: {
2165
+ enableMenu: i,
2166
+ menuOptions: { settings: {
2167
+ assistiveMml: i,
2168
+ enrich: !1,
2169
+ inTabOrder: !1
2170
+ } }
2171
+ }
2172
+ };
2173
+ r && s.tex && (console.warn(Xr), s.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], s.tex.processEscapes = !0), a || (s.chtml = { fontURL: "" }), window.MathJax = s;
2174
+ let c = document.createElement("script");
2175
+ c.src = o || Jr, c.async = !0, c.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(c);
2176
+ });
2177
+ }
2178
+ function gi(e) {
2179
+ let t = e?._?.output?.chtml_ts?.CHTML;
2180
+ t && (t.STYLESHEETID = ni);
2181
+ }
2182
+ function _i(e) {
2183
+ if (!e) return;
2184
+ let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
2185
+ let n = e.typesetRoot;
2186
+ !n || t.has(n) || (oi(n), t.add(n));
2187
+ };
2188
+ e.addRenderAction?.("pie-strip-latex", ai, (e) => {
2189
+ for (let t of e.math ?? []) n(t);
2190
+ return !1;
2191
+ }, (e) => {
2192
+ let t = e.typesetRoot;
2193
+ return t && oi(t), !1;
2194
+ });
2195
+ let r = e.outputJax?.chtmlStyles;
2196
+ r?.id === ri && (r.id = ni), bi();
2197
+ }
2198
+ function vi(e) {
2199
+ return e instanceof HTMLStyleElement && ii.includes(e.id);
2200
+ }
2201
+ function yi(e) {
2202
+ Kr("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
2203
+ }
2204
+ function bi() {
2205
+ let e = document.head, t = [...e.children].find(vi);
2206
+ if (t) {
2207
+ yi(t);
2208
+ return;
2209
+ }
2210
+ let n = new MutationObserver((e) => {
2211
+ for (let t of e) {
2212
+ let e = [...t.addedNodes].find(vi);
2213
+ if (e) {
2214
+ yi(e), n.disconnect();
2215
+ return;
2216
+ }
2217
+ }
2218
+ });
2219
+ n.observe(e, { childList: !0 });
2220
+ }
2221
+ function xi(e) {
2222
+ return new Promise((t, n) => {
2223
+ let r = e.startup ?? {};
2224
+ e.startup = r;
2225
+ let i = r.ready;
2226
+ r.ready = () => {
2227
+ let e = si()?.startup;
2228
+ i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
2229
+ };
2230
+ });
2231
+ }
2232
+ function Si(e) {
2233
+ let t = si();
2234
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : xi(t) : hi(e);
2235
+ }
2236
+ function Ci(e) {
2237
+ return Si(e).then(() => {
2238
+ typeof si()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
2239
+ });
2240
+ }
2241
+ function wi(e) {
2242
+ let t = globalThis, n = t[ti];
2243
+ return n || (n = Ci(e), t[ti] = n), n;
2244
+ }
2245
+ function Ti(e = {}) {
2246
+ let t = e.useSingleDollar ?? !1;
2247
+ return async (n) => {
2248
+ if (typeof window > "u") return;
2249
+ let r = qr();
2250
+ r && Kr("mathjax-3-global", `window.MathJax is MathJax ${r}`), pi(n);
2251
+ let i = wi(e);
2252
+ if (!mi(n, t)) {
2253
+ i.catch(() => {});
2254
+ return;
2255
+ }
2256
+ await i;
2257
+ let a = si();
2258
+ await a?.startup?.promise, typeof a?.typesetPromise == "function" && (await a.typesetPromise([n]), oi(n));
2259
+ };
2260
+ }
2261
+ var Ei = "@pie-lib/math-rendering", Di = "@pie-lib/math-rendering@2", Oi = "pie-print", ki = 50, Ai = 1e4, ji = null;
2262
+ function Mi() {
2263
+ return !!window[Di]?.opts?.useSingleDollar;
2264
+ }
2265
+ function Ni() {
2266
+ return ji ||= Ti({ useSingleDollar: Mi() }), ji;
2267
+ }
2268
+ function Pi() {
2269
+ if (typeof window > "u") return null;
2270
+ let e = window[Ei];
2271
+ return typeof e?.renderMath == "function" && e.renderMath !== Ri ? e : null;
2272
+ }
2273
+ function Fi(e) {
2274
+ let t = e;
2275
+ for (; t;) {
2276
+ if (t instanceof Element && t.localName === Oi) return t;
2277
+ t = t instanceof ShadowRoot ? t.host : t.parentNode;
2278
+ }
2279
+ return null;
2280
+ }
2281
+ function Ii() {
2282
+ let e = window.renderMath;
2283
+ return typeof e == "function" ? e : null;
2284
+ }
2285
+ async function Li(e) {
2286
+ let t = Fi(e);
2287
+ if (!t) return null;
2288
+ let n = Ii();
2289
+ if (n || t.mathRenderingModuleUrlImported !== !0) return n;
2290
+ let r = Date.now() + Ai;
2291
+ for (; Date.now() < r;) {
2292
+ await new Promise((e) => setTimeout(e, ki));
2293
+ let e = Ii();
2294
+ if (e) return e;
2295
+ }
2296
+ return null;
2297
+ }
2298
+ var Ri = async (e) => {
2299
+ if (typeof window > "u") return;
2300
+ let t = typeof e == "string", n;
2301
+ t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
2302
+ let r = Pi(), i = r || t ? null : await Li(n);
2303
+ return r ? await r.renderMath?.(n) : i && i !== Ri ? await i(n) : await Ni()(n), t ? n.innerHTML : void 0;
2304
+ }, zi = [
2305
+ "nbsp iexcl cent pound curren yen brvbar sect uml copy ordf laquo not shy reg macr",
2306
+ "deg plusmn sup2 sup3 acute micro para middot cedil sup1 ordm raquo frac14 frac12 frac34 iquest",
2307
+ "Agrave Aacute Acirc Atilde Auml Aring AElig Ccedil Egrave Eacute Ecirc Euml Igrave Iacute Icirc Iuml",
2308
+ "ETH Ntilde Ograve Oacute Ocirc Otilde Ouml times Oslash Ugrave Uacute Ucirc Uuml Yacute THORN szlig",
2309
+ "agrave aacute acirc atilde auml aring aelig ccedil egrave eacute ecirc euml igrave iacute icirc iuml",
2310
+ "eth ntilde ograve oacute ocirc otilde ouml divide oslash ugrave uacute ucirc uuml yacute thorn yuml"
2311
+ ].join(" "), Bi = "alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigmaf sigma tau upsilon phi chi psi omega", Vi = new Map(Object.entries({
2312
+ quot: 34,
2313
+ amp: 38,
2314
+ apos: 39,
2315
+ lt: 60,
2316
+ gt: 62,
2317
+ ensp: 8194,
2318
+ emsp: 8195,
2319
+ thinsp: 8201,
2320
+ ndash: 8211,
2321
+ mdash: 8212,
2322
+ lsquo: 8216,
2323
+ rsquo: 8217,
2324
+ sbquo: 8218,
2325
+ ldquo: 8220,
2326
+ rdquo: 8221,
2327
+ bdquo: 8222,
2328
+ bull: 8226,
2329
+ hellip: 8230,
2330
+ prime: 8242,
2331
+ Prime: 8243,
2332
+ euro: 8364,
2333
+ trade: 8482,
2334
+ minus: 8722,
2335
+ radic: 8730,
2336
+ infin: 8734,
2337
+ asymp: 8776,
2338
+ ne: 8800,
2339
+ le: 8804,
2340
+ ge: 8805
2341
+ }));
2342
+ for (let [e, t] of zi.split(" ").entries()) Vi.set(t, 160 + e);
2343
+ for (let [e, t] of Bi.split(" ").entries()) Vi.set(t, 945 + e), t !== "sigmaf" && Vi.set(t[0].toUpperCase() + t.slice(1), 913 + e);
2344
+ var Hi = /<\/?(?:br|p|div|li|h[1-6]|blockquote|pre|tr|td|th)\b[^>]*>/gi, Ui = /<\/?[a-z][^>]*>|<!--[\s\S]*?-->/gi, Wi = /&(#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]*);/gi, Gi = (e, t) => {
2345
+ if (t[0] === "#") {
2346
+ let e = t[1] === "x" || t[1] === "X", n = Number.parseInt(t.slice(e ? 2 : 1), e ? 16 : 10), r = n > 0 && n <= 1114111 && (n < 55296 || n > 57343);
2347
+ return String.fromCodePoint(r ? n : 65533);
2348
+ }
2349
+ let n = Vi.get(t);
2350
+ return n === void 0 ? e : String.fromCodePoint(n);
2351
+ }, Ki = (e) => typeof e == "string" ? e.replace(Hi, " ").replace(Ui, "").replace(Wi, Gi).replace(/\s+/g, " ").trim() : "", qi = {
2352
+ translation: {
2353
+ categorize: {
2354
+ limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
2355
+ maxChoicesPerCategoryRestriction: "To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s]."
2356
+ },
2357
+ ebsr: { part: "Part {{index}}" },
2358
+ numberLine: {
2359
+ addElementLimit_one: "You can only add {{count}} element",
2360
+ addElementLimit_other: "You can only add {{count}} elements",
2361
+ clearAll: "Clear all"
2362
+ },
2363
+ imageClozeAssociation: {
2364
+ reachedLimit_one: "You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",
2365
+ reachedLimit_other: "Full"
2366
+ },
2367
+ drawingResponse: {
2368
+ fillColor: "Fill color",
2369
+ outlineColor: "Outline color",
2370
+ noFill: "No fill",
2371
+ lightblue: "Light blue",
2372
+ lightyellow: "Light yellow",
2373
+ red: "Red",
2374
+ orange: "Orange",
2375
+ yellow: "Yellow",
2376
+ violet: "Violet",
2377
+ blue: "Blue",
2378
+ green: "Green",
2379
+ white: "White",
2380
+ black: "Black",
2381
+ onDoubleClick: "Double click to edit this text. Press Enter to submit."
2382
+ },
2383
+ charting: {
2384
+ addCategory: "Add category",
2385
+ actions: "Actions",
2386
+ add: "Add",
2387
+ delete: "Delete",
2388
+ newLabel: "New label",
2389
+ reachedLimit_other: "There can't be more than {{count}} categories.",
2390
+ keyLegend: {
2391
+ incorrectAnswer: "Student incorrect answer",
2392
+ correctAnswer: "Student correct answer",
2393
+ correctKeyAnswer: "Answer key correct"
2394
+ }
2395
+ },
2396
+ graphing: {
2397
+ point: "Point",
2398
+ circle: "Circle",
2399
+ line: "Line",
2400
+ parabola: "Parabola",
2401
+ absolute: "Absolute Value",
2402
+ exponential: "Exponential",
2403
+ polygon: "Polygon",
2404
+ ray: "Ray",
2405
+ segment: "Segment",
2406
+ sine: "Sine",
2407
+ vector: "Vector",
2408
+ label: "Label",
2409
+ redo: "Redo",
2410
+ reset: "Reset"
2411
+ },
2412
+ mathInline: { primaryCorrectWithAlternates: "Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct." },
2413
+ mcPopulatedBlank: {
2414
+ answerChoices: "Answer choices",
2415
+ blankLabel: "blank",
2416
+ emptyBlank: "(blank)",
2417
+ blankPreSelectionHint: "The answer you choose will appear on the blank line above.",
2418
+ correctAnswerSelected: "Correct answer selected",
2419
+ incorrectAnswerSelected: "Incorrect answer selected",
2420
+ selectedAnswerImage: "Selected answer image",
2421
+ choiceImage: "Choice {{id}}",
2422
+ clickToEnableAutoplay: "Click to enable audio autoplay",
2423
+ audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured.",
2424
+ listen: "Listen",
2425
+ listenSilentAlt: "Repeat instructions",
2426
+ listenPlayingAlt: "Instructions are playing",
2427
+ printAudio: "Audio:",
2428
+ printTranscript: "Transcript:"
2429
+ },
2430
+ multipleChoice: {
2431
+ minSelections: "Select at least {{minSelections}}.",
2432
+ maxSelections_one: "Only {{maxSelections}} answer is allowed.",
2433
+ maxSelections_other: "Only {{maxSelections}} answers are allowed.",
2434
+ minmaxSelections_equal: "Select {{minSelections}}.",
2435
+ minmaxSelections_range: "Select between {{minSelections}} and {{maxSelections}}."
2436
+ },
2437
+ selectText: {
2438
+ correctAnswerSelected: "Correct",
2439
+ correctAnswerNotSelected: "Correct Answer Not Selected",
2440
+ incorrectSelection: "Incorrect Selection",
2441
+ key: "Key"
2442
+ },
2443
+ simpleCloze: {
2444
+ correctAnswerShown: "Correct answer",
2445
+ correct: "Correct",
2446
+ incorrect: "Incorrect",
2447
+ unanswered: "No answer",
2448
+ placeholder: "Enter your answer...",
2449
+ answerInput: "Your answer",
2450
+ printCorrectAnswer: "Correct answer:",
2451
+ printAnswerBlank: "Answer blank"
2452
+ },
2453
+ vennClassification: {
2454
+ tray: "Tiles to classify",
2455
+ unknownTarget: "unknown",
2456
+ cancelled: "Cancelled",
2457
+ returnedToTray: "{{name}} returned to tray",
2458
+ placedIn: "{{name}} placed in {{target}}",
2459
+ pickedUp: "Picked up {{name}}",
2460
+ pickedUpWithKeyboard: "Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.",
2461
+ dropTarget: "Drop target: {{target}}",
2462
+ unsupportedCircles_one: "This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.",
2463
+ unsupportedCircles_other: "This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.",
2464
+ setNumber: "Set {{number}}",
2465
+ regionOnly: "{{set}} only",
2466
+ regionNeither: "Neither {{first}} nor {{second}}",
2467
+ regionNoneOf: "None of {{sets}}",
2468
+ regionAndSeparator: " and ",
2469
+ tileFallbackName: "Tile",
2470
+ tileNotPlaced: "not placed",
2471
+ tileInRegion: "in {{region}}",
2472
+ tileCorrect: "correct",
2473
+ tileIncorrect: "incorrect"
2474
+ }
2475
+ },
2476
+ common: {
2477
+ undo: "Undo",
2478
+ clearAll: "Clear all",
2479
+ correct: "Correct",
2480
+ incorrect: "Incorrect",
2481
+ showCorrectAnswer: "Show correct answer",
2482
+ hideCorrectAnswer: "Hide correct answer",
2483
+ showTeacherInstructions: "Show Teacher Instructions",
2484
+ hideTeacherInstructions: "Hide Teacher Instructions",
2485
+ commonCorrectAnswerWithAlternates: "Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",
2486
+ warning: "Warning",
2487
+ showNote: "Show Note",
2488
+ hideNote: "Hide Note",
2489
+ cancel: "Cancel"
2490
+ }
2491
+ }, Ji = {
2492
+ translation: {
2493
+ categorize: {
2494
+ limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
2495
+ maxChoicesPerCategoryRestriction: "Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta"
2496
+ },
2497
+ ebsr: { part: "Parte {{index}}" },
2498
+ numberLine: {
2499
+ addElementLimit_one: "Solo puedes agregar {{count}} elemento",
2500
+ addElementLimit_other: "Solo puedes agregar {{count}} elementos",
2501
+ clearAll: "Borrar todo"
2502
+ },
2503
+ imageClozeAssociation: {
2504
+ reachedLimit_one: "Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
2505
+ reachedLimit_other: "Lleno"
2506
+ },
2507
+ drawingResponse: {
2508
+ fillColor: "Color de relleno",
2509
+ outlineColor: "Color del contorno",
2510
+ noFill: "Sin relleno",
2511
+ lightblue: "Azul claro",
2512
+ lightyellow: "Amarillo claro",
2513
+ red: "Rojo",
2514
+ orange: "Naranja",
2515
+ yellow: "Amarillo",
2516
+ violet: "Violeta",
2517
+ blue: "Azul",
2518
+ green: "Verde",
2519
+ white: "Blanco",
2520
+ black: "Negro",
2521
+ onDoubleClick: "Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"
2522
+ },
2523
+ charting: {
2524
+ addCategory: "Añadir categoría",
2525
+ actions: "Acciones",
2526
+ add: "Añadir",
2527
+ delete: "Eliminar",
2528
+ newLabel: "Nueva etiqueta",
2529
+ reachedLimit_other: "No puede haber más de {{count}} categorías.",
2530
+ keyLegend: {
2531
+ incorrectAnswer: "Respuesta incorrecta del estudiante",
2532
+ correctAnswer: "Respuesta correcta del estudiante",
2533
+ correctKeyAnswer: "Clave de respuesta correcta"
2534
+ }
2535
+ },
2536
+ graphing: {
2537
+ point: "Punto",
2538
+ circle: "Circulo",
2539
+ line: "Línea",
2540
+ parabola: "Parábola",
2541
+ absolute: "Valor absoluto",
2542
+ exponential: "Exponencial",
2543
+ polygon: "Polígono",
2544
+ ray: "Semirrecta",
2545
+ segment: "Segmento ",
2546
+ sine: "Seno",
2547
+ vector: "Vector",
2548
+ label: "Etiqueta",
2549
+ redo: "Rehacer",
2550
+ reset: "Reiniciar"
2551
+ },
2552
+ mathInline: { primaryCorrectWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas." },
2553
+ mcPopulatedBlank: {
2554
+ answerChoices: "Opciones de respuesta",
2555
+ blankLabel: "espacio en blanco",
2556
+ emptyBlank: "(en blanco)",
2557
+ blankPreSelectionHint: "La respuesta que elijas aparecerá en la línea en blanco de arriba.",
2558
+ correctAnswerSelected: "Respuesta correcta seleccionada",
2559
+ incorrectAnswerSelected: "Respuesta incorrecta seleccionada",
2560
+ selectedAnswerImage: "Imagen de la respuesta seleccionada",
2561
+ choiceImage: "Opción {{id}}",
2562
+ clickToEnableAutoplay: "Haz clic para activar la reproducción automática del audio",
2563
+ audioResourceUnavailable: "El audio está activado, pero no hay una URL de audio reproducible configurada.",
2564
+ listen: "Escuchar",
2565
+ listenSilentAlt: "Escuchar. Repetir las instrucciones.",
2566
+ listenPlayingAlt: "Escuchar. Estas son las instrucciones.",
2567
+ printAudio: "Audio:",
2568
+ printTranscript: "Transcripción:"
2569
+ },
2570
+ multipleChoice: {
2571
+ minSelections: "Seleccione al menos {{minSelections}}.",
2572
+ maxSelections_one: "Sólo se permite {{maxSelections}} respuesta.",
2573
+ maxSelections_other: "Sólo se permiten {{maxSelections}} respuestas.",
2574
+ minmaxSelections_equal: "Seleccione {{minSelections}}.",
2575
+ minmaxSelections_range: "Seleccione entre {{minSelections}} y {{maxSelections}}."
2576
+ },
2577
+ selectText: {
2578
+ correctAnswerSelected: "Respuesta Correcta",
2579
+ correctAnswerNotSelected: "Respuesta Correcta No Seleccionada",
2580
+ incorrectSelection: "Selección Incorrecta",
2581
+ key: "Clave"
2582
+ },
2583
+ simpleCloze: {
2584
+ correctAnswerShown: "Respuesta correcta",
2585
+ correct: "Correcto",
2586
+ incorrect: "Incorrecto",
2587
+ unanswered: "Sin respuesta",
2588
+ placeholder: "Escribe tu respuesta...",
2589
+ answerInput: "Tu respuesta",
2590
+ printCorrectAnswer: "Respuesta correcta:",
2591
+ printAnswerBlank: "Espacio para la respuesta"
2592
+ },
2593
+ vennClassification: {
2594
+ tray: "Fichas para clasificar",
2595
+ unknownTarget: "desconocido",
2596
+ cancelled: "Cancelado",
2597
+ returnedToTray: "Se devolvió {{name}} a la bandeja",
2598
+ placedIn: "Se colocó {{name}} en {{target}}",
2599
+ pickedUp: "Se tomó {{name}}",
2600
+ pickedUpWithKeyboard: "Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.",
2601
+ dropTarget: "Destino: {{target}}",
2602
+ unsupportedCircles_one: "No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.",
2603
+ unsupportedCircles_other: "No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.",
2604
+ setNumber: "Conjunto {{number}}",
2605
+ regionOnly: "Solo {{set}}",
2606
+ regionNeither: "Ni {{first}} ni {{second}}",
2607
+ regionNoneOf: "Ninguno de {{sets}}",
2608
+ regionAndSeparator: " y ",
2609
+ tileFallbackName: "Ficha",
2610
+ tileNotPlaced: "sin colocar",
2611
+ tileInRegion: "en {{region}}",
2612
+ tileCorrect: "correcta",
2613
+ tileIncorrect: "incorrecta"
2614
+ }
2615
+ },
2616
+ common: {
2617
+ undo: "Deshacer",
2618
+ clearAll: "Borrar todo",
2619
+ correct: "Correcto",
2620
+ incorrect: "Incorrecto",
2621
+ showCorrectAnswer: "Mostrar respuesta correcta",
2622
+ hideCorrectAnswer: "Ocultar respuesta correcta",
2623
+ showTeacherInstructions: "Mostrar instrucciones para el maestro",
2624
+ hideTeacherInstructions: "Ocultar instrucciones para el maestro",
2625
+ commonCorrectAnswerWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",
2626
+ warning: "Advertencia",
2627
+ showNote: "Mostrar Nota",
2628
+ hideNote: "Ocultar Nota",
2629
+ cancel: "Cancelar"
2630
+ }
2631
+ }, Z = (e) => typeof e == "string", Yi = () => {
2632
+ let e, t, n = new Promise((n, r) => {
2633
+ e = n, t = r;
2634
+ });
2635
+ return n.resolve = e, n.reject = t, n;
2636
+ }, Xi = (e) => e == null ? "" : "" + e, Zi = (e, t, n) => {
2637
+ e.forEach((e) => {
2638
+ t[e] && (n[e] = t[e]);
2639
+ });
2640
+ }, Qi = /###/g, $i = (e) => e && e.indexOf("###") > -1 ? e.replace(Qi, ".") : e, ea = (e) => !e || Z(e), ta = (e, t, n) => {
2641
+ let r = Z(t) ? t.split(".") : t, i = 0;
2642
+ for (; i < r.length - 1;) {
2643
+ if (ea(e)) return {};
2644
+ let t = $i(r[i]);
2645
+ !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
2646
+ }
2647
+ return ea(e) ? {} : {
2648
+ obj: e,
2649
+ k: $i(r[i])
2650
+ };
2651
+ }, na = (e, t, n) => {
2652
+ let { obj: r, k: i } = ta(e, t, Object);
2653
+ if (r !== void 0 || t.length === 1) {
2654
+ r[i] = n;
2655
+ return;
2656
+ }
2657
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = ta(e, o, Object);
2658
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = ta(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2659
+ s.obj[`${s.k}.${a}`] = n;
2660
+ }, ra = (e, t, n, r) => {
2661
+ let { obj: i, k: a } = ta(e, t, Object);
2662
+ i[a] = i[a] || [], i[a].push(n);
2663
+ }, ia = (e, t) => {
2664
+ let { obj: n, k: r } = ta(e, t);
2665
+ if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
2666
+ }, aa = (e, t, n) => {
2667
+ let r = ia(e, n);
2668
+ return r === void 0 ? ia(t, n) : r;
2669
+ }, oa = (e, t, n) => {
2670
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? Z(e[r]) || e[r] instanceof String || Z(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : oa(e[r], t[r], n) : e[r] = t[r]);
2671
+ return e;
2672
+ }, sa = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ca = {
2673
+ "&": "&amp;",
2674
+ "<": "&lt;",
2675
+ ">": "&gt;",
2676
+ "\"": "&quot;",
2677
+ "'": "&#39;",
2678
+ "/": "&#x2F;"
2679
+ }, la = (e) => Z(e) ? e.replace(/[&<>"'\/]/g, (e) => ca[e]) : e, ua = class {
2680
+ constructor(e) {
2681
+ this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
2682
+ }
2683
+ getRegExp(e) {
2684
+ let t = this.regExpMap.get(e);
2685
+ if (t !== void 0) return t;
2686
+ let n = new RegExp(e);
2687
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
2688
+ }
2689
+ }, da = [
2690
+ " ",
2691
+ ",",
2692
+ "?",
2693
+ "!",
2694
+ ";"
2695
+ ], fa = new ua(20), pa = (e, t, n) => {
2696
+ t ||= "", n ||= "";
2697
+ let r = da.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2698
+ if (r.length === 0) return !0;
2699
+ let i = fa.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2700
+ if (!a) {
2701
+ let t = e.indexOf(n);
2702
+ t > 0 && !i.test(e.substring(0, t)) && (a = !0);
2703
+ }
2704
+ return a;
2705
+ }, ma = (e, t, n = ".") => {
2706
+ if (!e) return;
2707
+ if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
2708
+ let r = t.split(n), i = e;
2709
+ for (let e = 0; e < r.length;) {
2710
+ if (!i || typeof i != "object") return;
2711
+ let t, a = "";
2712
+ for (let o = e; o < r.length; ++o) if (o !== e && (a += n), a += r[o], t = i[a], t !== void 0) {
2713
+ if ([
2714
+ "string",
2715
+ "number",
2716
+ "boolean"
2717
+ ].indexOf(typeof t) > -1 && o < r.length - 1) continue;
2718
+ e += o - e + 1;
2719
+ break;
2720
+ }
2721
+ i = t;
2722
+ }
2723
+ return i;
2724
+ }, ha = (e) => e?.replace(/_/g, "-"), ga = {
2725
+ type: "logger",
2726
+ log(e) {
2727
+ this.output("log", e);
2728
+ },
2729
+ warn(e) {
2730
+ this.output("warn", e);
2731
+ },
2732
+ error(e) {
2733
+ this.output("error", e);
2734
+ },
2735
+ output(e, t) {
2736
+ console?.[e]?.apply?.(console, t);
2737
+ }
2738
+ }, Q = new class e {
2739
+ constructor(e, t = {}) {
2740
+ this.init(e, t);
2741
+ }
2742
+ init(e, t = {}) {
2743
+ this.prefix = t.prefix || "i18next:", this.logger = e || ga, this.options = t, this.debug = t.debug;
2744
+ }
2745
+ log(...e) {
2746
+ return this.forward(e, "log", "", !0);
2747
+ }
2748
+ warn(...e) {
2749
+ return this.forward(e, "warn", "", !0);
2750
+ }
2751
+ error(...e) {
2752
+ return this.forward(e, "error", "");
2753
+ }
2754
+ deprecate(...e) {
2755
+ return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
2756
+ }
2757
+ forward(e, t, n, r) {
2758
+ return r && !this.debug ? null : (Z(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
2759
+ }
2760
+ create(t) {
2761
+ return new e(this.logger, {
2762
+ prefix: `${this.prefix}:${t}:`,
2763
+ ...this.options
2764
+ });
2765
+ }
2766
+ clone(t) {
2767
+ return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
2768
+ }
2769
+ }(), _a = class {
2770
+ constructor() {
2771
+ this.observers = {};
2772
+ }
2773
+ on(e, t) {
2774
+ return e.split(" ").forEach((e) => {
2775
+ this.observers[e] || (this.observers[e] = /* @__PURE__ */ new Map());
2776
+ let n = this.observers[e].get(t) || 0;
2777
+ this.observers[e].set(t, n + 1);
2778
+ }), this;
2779
+ }
2780
+ off(e, t) {
2781
+ if (this.observers[e]) {
2782
+ if (!t) {
2783
+ delete this.observers[e];
2784
+ return;
2785
+ }
2786
+ this.observers[e].delete(t);
2787
+ }
2788
+ }
2789
+ emit(e, ...t) {
2790
+ this.observers[e] && Array.from(this.observers[e].entries()).forEach(([e, n]) => {
2791
+ for (let r = 0; r < n; r++) e(...t);
2792
+ }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([n, r]) => {
2793
+ for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
2794
+ });
2795
+ }
2796
+ }, va = class extends _a {
2797
+ constructor(e, t = {
2798
+ ns: ["translation"],
2799
+ defaultNS: "translation"
2800
+ }) {
2801
+ super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
2802
+ }
2803
+ addNamespaces(e) {
2804
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
2805
+ }
2806
+ removeNamespaces(e) {
2807
+ let t = this.options.ns.indexOf(e);
2808
+ t > -1 && this.options.ns.splice(t, 1);
2809
+ }
2810
+ getResource(e, t, n, r = {}) {
2811
+ let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
2812
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : Z(n) && i ? o.push(...n.split(i)) : o.push(n)));
2813
+ let s = ia(this.data, o);
2814
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !Z(n) ? s : ma(this.data?.[e]?.[t], n, i);
2815
+ }
2816
+ addResource(e, t, n, r, i = { silent: !1 }) {
2817
+ let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
2818
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), na(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2819
+ }
2820
+ addResources(e, t, n, r = { silent: !1 }) {
2821
+ for (let r in n) (Z(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
2822
+ r.silent || this.emit("added", e, t, n);
2823
+ }
2824
+ addResourceBundle(e, t, n, r, i, a = {
2825
+ silent: !1,
2826
+ skipCopy: !1
2827
+ }) {
2828
+ let o = [e, t];
2829
+ e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
2830
+ let s = ia(this.data, o) || {};
2831
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? oa(s, n, i) : s = {
2832
+ ...s,
2833
+ ...n
2834
+ }, na(this.data, o, s), a.silent || this.emit("added", e, t, n);
2835
+ }
2836
+ removeResourceBundle(e, t) {
2837
+ this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
2838
+ }
2839
+ hasResourceBundle(e, t) {
2840
+ return this.getResource(e, t) !== void 0;
2841
+ }
2842
+ getResourceBundle(e, t) {
2843
+ return t ||= this.options.defaultNS, this.getResource(e, t);
2844
+ }
2845
+ getDataByLanguage(e) {
2846
+ return this.data[e];
2847
+ }
2848
+ hasLanguageSomeTranslations(e) {
2849
+ let t = this.getDataByLanguage(e);
2850
+ return !!(t && Object.keys(t) || []).find((e) => t[e] && Object.keys(t[e]).length > 0);
2851
+ }
2852
+ toJSON() {
2853
+ return this.data;
2854
+ }
2855
+ }, ya = {
2856
+ processors: {},
2857
+ addPostProcessor(e) {
2858
+ this.processors[e.name] = e;
2859
+ },
2860
+ handle(e, t, n, r, i) {
2861
+ return e.forEach((e) => {
2862
+ t = this.processors[e]?.process(t, n, r, i) ?? t;
2863
+ }), t;
2864
+ }
2865
+ }, ba = Symbol("i18next/PATH_KEY");
2866
+ function xa() {
2867
+ let e = [], t = Object.create(null), n;
2868
+ return t.get = (r, i) => (n?.revoke?.(), i === ba ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
2869
+ }
2870
+ function Sa(e, t) {
2871
+ let { [ba]: n } = e(xa()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
2872
+ if (n.length > 1 && i) {
2873
+ let e = t?.ns, a = Array.isArray(e) ? e : null;
2874
+ if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
2875
+ }
2876
+ return n.join(r);
2877
+ }
2878
+ var Ca = {}, wa = (e) => !Z(e) && typeof e != "boolean" && typeof e != "number", Ta = class e extends _a {
2879
+ constructor(e, t = {}) {
2880
+ super(), Zi([
2881
+ "resourceStore",
2882
+ "languageUtils",
2883
+ "pluralResolver",
2884
+ "interpolator",
2885
+ "backendConnector",
2886
+ "i18nFormat",
2887
+ "utils"
2888
+ ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Q.create("translator");
2889
+ }
2890
+ changeLanguage(e) {
2891
+ e && (this.language = e);
2892
+ }
2893
+ exists(e, t = { interpolation: {} }) {
2894
+ let n = { ...t };
2895
+ if (e == null) return !1;
2896
+ let r = this.resolve(e, n);
2897
+ if (r?.res === void 0) return !1;
2898
+ let i = wa(r.res);
2899
+ return !(n.returnObjects === !1 && i);
2900
+ }
2901
+ extractFromKey(e, t) {
2902
+ let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
2903
+ n === void 0 && (n = ":");
2904
+ let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !pa(e, n, r);
2905
+ if (a && !o) {
2906
+ let t = e.match(this.interpolator.nestingRegexp);
2907
+ if (t && t.length > 0) return {
2908
+ key: e,
2909
+ namespaces: Z(i) ? [i] : i
2910
+ };
2911
+ let a = e.split(n);
2912
+ (n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
2913
+ }
2914
+ return {
2915
+ key: e,
2916
+ namespaces: Z(i) ? [i] : i
2917
+ };
2918
+ }
2919
+ translate(t, n, r) {
2920
+ let i = typeof n == "object" ? { ...n } : n;
2921
+ if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
2922
+ typeof t == "function" && (t = Sa(t, {
2923
+ ...this.options,
2924
+ ...i
2925
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? Sa(e, {
2926
+ ...this.options,
2927
+ ...i
2928
+ }) : String(e));
2929
+ let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: s, namespaces: c } = this.extractFromKey(t[t.length - 1], i), l = c[c.length - 1], u = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
2930
+ u === void 0 && (u = ":");
2931
+ let d = i.lng || this.language, f = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
2932
+ if (d?.toLowerCase() === "cimode") return f ? a ? {
2933
+ res: `${l}${u}${s}`,
2934
+ usedKey: s,
2935
+ exactUsedKey: s,
2936
+ usedLng: d,
2937
+ usedNS: l,
2938
+ usedParams: this.getUsedParamsDetails(i)
2939
+ } : `${l}${u}${s}` : a ? {
2940
+ res: s,
2941
+ usedKey: s,
2942
+ exactUsedKey: s,
2943
+ usedLng: d,
2944
+ usedNS: l,
2945
+ usedParams: this.getUsedParamsDetails(i)
2946
+ } : s;
2947
+ let p = this.resolve(t, i), m = p?.res, h = p?.usedKey || s, g = p?.exactUsedKey || s, ee = [
2948
+ "[object Number]",
2949
+ "[object Function]",
2950
+ "[object RegExp]"
2951
+ ], _ = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, v = !this.i18nFormat || this.i18nFormat.handleAsObject, y = i.count !== void 0 && !Z(i.count), b = e.hasDefaultValue(i), te = y ? this.pluralResolver.getSuffix(d, i.count, i) : "", ne = i.ordinal && y ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", re = y && !i.ordinal && i.count === 0, x = re && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${te}`] || i[`defaultValue${ne}`] || i.defaultValue, S = m;
2952
+ v && !m && b && (S = x);
2953
+ let ie = wa(S), ae = Object.prototype.toString.apply(S);
2954
+ if (v && S && ie && ee.indexOf(ae) < 0 && !(Z(_) && Array.isArray(S))) {
2955
+ if (!i.returnObjects && !this.options.returnObjects) {
2956
+ this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
2957
+ let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, S, {
2958
+ ...i,
2959
+ ns: c
2960
+ }) : `key '${s} (${this.language})' returned an object instead of string.`;
2961
+ return a ? (p.res = e, p.usedParams = this.getUsedParamsDetails(i), p) : e;
2962
+ }
2963
+ if (o) {
2964
+ let e = Array.isArray(S), t = e ? [] : {}, n = e ? g : h;
2965
+ for (let e in S) if (Object.prototype.hasOwnProperty.call(S, e)) {
2966
+ let r = `${n}${o}${e}`;
2967
+ b && !m ? t[e] = this.translate(r, {
2968
+ ...i,
2969
+ defaultValue: wa(x) ? x[e] : void 0,
2970
+ joinArrays: !1,
2971
+ ns: c
2972
+ }) : t[e] = this.translate(r, {
2973
+ ...i,
2974
+ joinArrays: !1,
2975
+ ns: c
2976
+ }), t[e] === r && (t[e] = S[e]);
2977
+ }
2978
+ m = t;
2979
+ }
2980
+ } else if (v && Z(_) && Array.isArray(m)) m = m.join(_), m &&= this.extendTranslation(m, t, i, r);
2981
+ else {
2982
+ let e = !1, n = !1;
2983
+ !this.isValidLookup(m) && b && (e = !0, m = x), this.isValidLookup(m) || (n = !0, m = s);
2984
+ let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : m, c = b && x !== m && this.options.updateMissing;
2985
+ if (n || e || c) {
2986
+ if (this.logger.log(c ? "updateKey" : "missingKey", d, l, s, c ? x : m), o) {
2987
+ let e = this.resolve(s, {
2988
+ ...i,
2989
+ keySeparator: !1
2990
+ });
2991
+ e && e.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
2992
+ }
2993
+ let e = [], t = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
2994
+ if (this.options.saveMissingTo === "fallback" && t && t[0]) for (let n = 0; n < t.length; n++) e.push(t[n]);
2995
+ else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(i.lng || this.language) : e.push(i.lng || this.language);
2996
+ let n = (e, t, n) => {
2997
+ let r = b && n !== m ? n : a;
2998
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(e, l, t, r, c, i) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e, l, t, r, c, i), this.emit("missingKey", e, l, t, m);
2999
+ };
3000
+ this.options.saveMissing && (this.options.saveMissingPlurals && y ? e.forEach((e) => {
3001
+ let t = this.pluralResolver.getSuffixes(e, i);
3002
+ re && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
3003
+ n([e], s + t, i[`defaultValue${t}`] || x);
3004
+ });
3005
+ }) : n(e, s, x));
3006
+ }
3007
+ m = this.extendTranslation(m, t, i, p, r), n && m === s && this.options.appendNamespaceToMissingKey && (m = `${l}${u}${s}`), (n || e) && this.options.parseMissingKeyHandler && (m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${u}${s}` : s, e ? m : void 0, i));
3008
+ }
3009
+ return a ? (p.res = m, p.usedParams = this.getUsedParamsDetails(i), p) : m;
3010
+ }
3011
+ extendTranslation(e, t, n, r, i) {
3012
+ if (this.i18nFormat?.parse) e = this.i18nFormat.parse(e, {
3013
+ ...this.options.interpolation.defaultVariables,
3014
+ ...n
3015
+ }, n.lng || this.language || r.usedLng, r.usedNS, r.usedKey, { resolved: r });
3016
+ else if (!n.skipInterpolation) {
3017
+ n.interpolation && this.interpolator.init({
3018
+ ...n,
3019
+ interpolation: {
3020
+ ...this.options.interpolation,
3021
+ ...n.interpolation
3022
+ }
3023
+ });
3024
+ let a = Z(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
3025
+ if (a) {
3026
+ let t = e.match(this.interpolator.nestingRegexp);
3027
+ o = t && t.length;
3028
+ }
3029
+ let s = n.replace && !Z(n.replace) ? n.replace : n;
3030
+ if (this.options.interpolation.defaultVariables && (s = {
3031
+ ...this.options.interpolation.defaultVariables,
3032
+ ...s
3033
+ }), e = this.interpolator.interpolate(e, s, n.lng || this.language || r.usedLng, n), a) {
3034
+ let t = e.match(this.interpolator.nestingRegexp), r = t && t.length;
3035
+ o < r && (n.nest = !1);
3036
+ }
3037
+ !n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
3038
+ }
3039
+ let a = n.postProcess || this.options.postProcess, o = Z(a) ? [a] : a;
3040
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = ya.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
3041
+ i18nResolved: {
3042
+ ...r,
3043
+ usedParams: this.getUsedParamsDetails(n)
3044
+ },
3045
+ ...n
3046
+ } : n, this)), e;
3047
+ }
3048
+ resolve(e, t = {}) {
3049
+ let n, r, i, a, o;
3050
+ return Z(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? Sa(e, {
3051
+ ...this.options,
3052
+ ...t
3053
+ }) : e)), e.forEach((e) => {
3054
+ if (this.isValidLookup(n)) return;
3055
+ let s = this.extractFromKey(e, t), c = s.key;
3056
+ r = c;
3057
+ let l = s.namespaces;
3058
+ this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
3059
+ let u = t.count !== void 0 && !Z(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (Z(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
3060
+ l.forEach((e) => {
3061
+ this.isValidLookup(n) || (o = e, !Ca[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Ca[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
3062
+ if (this.isValidLookup(n)) return;
3063
+ a = r;
3064
+ let o = [c];
3065
+ if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o, c, r, e, t);
3066
+ else {
3067
+ let e;
3068
+ u && (e = this.pluralResolver.getSuffix(r, t.count, t));
3069
+ let n = `${this.options.pluralSeparator}zero`, i = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
3070
+ if (u && (t.ordinal && e.indexOf(i) === 0 && o.push(c + e.replace(i, this.options.pluralSeparator)), o.push(c + e), d && o.push(c + n)), f) {
3071
+ let r = `${c}${this.options.contextSeparator || "_"}${t.context}`;
3072
+ o.push(r), u && (t.ordinal && e.indexOf(i) === 0 && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), d && o.push(r + n));
3073
+ }
3074
+ }
3075
+ let s;
3076
+ for (; s = o.pop();) this.isValidLookup(n) || (i = s, n = this.getResource(r, e, s, t));
3077
+ }));
3078
+ });
3079
+ }), {
3080
+ res: n,
3081
+ usedKey: r,
3082
+ exactUsedKey: i,
3083
+ usedLng: a,
3084
+ usedNS: o
3085
+ };
3086
+ }
3087
+ isValidLookup(e) {
3088
+ return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
3089
+ }
3090
+ getResource(e, t, n, r = {}) {
3091
+ return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t, n, r) : this.resourceStore.getResource(e, t, n, r);
3092
+ }
3093
+ getUsedParamsDetails(e = {}) {
3094
+ let t = [
3095
+ "defaultValue",
3096
+ "ordinal",
3097
+ "context",
3098
+ "replace",
3099
+ "lng",
3100
+ "lngs",
3101
+ "fallbackLng",
3102
+ "ns",
3103
+ "keySeparator",
3104
+ "nsSeparator",
3105
+ "returnObjects",
3106
+ "returnDetails",
3107
+ "joinArrays",
3108
+ "postProcess",
3109
+ "interpolation"
3110
+ ], n = e.replace && !Z(e.replace), r = n ? e.replace : e;
3111
+ if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
3112
+ ...this.options.interpolation.defaultVariables,
3113
+ ...r
3114
+ }), !n) {
3115
+ r = { ...r };
3116
+ for (let e of t) delete r[e];
3117
+ }
3118
+ return r;
3119
+ }
3120
+ static hasDefaultValue(e) {
3121
+ for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
3122
+ return !1;
3123
+ }
3124
+ }, Ea = class {
3125
+ constructor(e) {
3126
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Q.create("languageUtils");
3127
+ }
3128
+ getScriptPartFromCode(e) {
3129
+ if (e = ha(e), !e || e.indexOf("-") < 0) return null;
3130
+ let t = e.split("-");
3131
+ return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
3132
+ }
3133
+ getLanguagePartFromCode(e) {
3134
+ if (e = ha(e), !e || e.indexOf("-") < 0) return e;
3135
+ let t = e.split("-");
3136
+ return this.formatLanguageCode(t[0]);
3137
+ }
3138
+ formatLanguageCode(e) {
3139
+ if (Z(e) && e.indexOf("-") > -1) {
3140
+ let t;
3141
+ try {
3142
+ t = Intl.getCanonicalLocales(e)[0];
3143
+ } catch {}
3144
+ return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
3145
+ }
3146
+ return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
3147
+ }
3148
+ isSupportedCode(e) {
3149
+ return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
3150
+ }
3151
+ getBestMatchFromCodes(e) {
3152
+ if (!e) return null;
3153
+ let t;
3154
+ return e.forEach((e) => {
3155
+ if (t) return;
3156
+ let n = this.formatLanguageCode(e);
3157
+ (!this.options.supportedLngs || this.isSupportedCode(n)) && (t = n);
3158
+ }), !t && this.options.supportedLngs && e.forEach((e) => {
3159
+ if (t) return;
3160
+ let n = this.getScriptPartFromCode(e);
3161
+ if (this.isSupportedCode(n)) return t = n;
3162
+ let r = this.getLanguagePartFromCode(e);
3163
+ if (this.isSupportedCode(r)) return t = r;
3164
+ t = this.options.supportedLngs.find((e) => {
3165
+ if (e === r || !(e.indexOf("-") < 0 && r.indexOf("-") < 0) && (e.indexOf("-") > 0 && r.indexOf("-") < 0 && e.substring(0, e.indexOf("-")) === r || e.indexOf(r) === 0 && r.length > 1)) return e;
3166
+ });
3167
+ }), t ||= this.getFallbackCodes(this.options.fallbackLng)[0], t;
3168
+ }
3169
+ getFallbackCodes(e, t) {
3170
+ if (!e) return [];
3171
+ if (typeof e == "function" && (e = e(t)), Z(e) && (e = [e]), Array.isArray(e)) return e;
3172
+ if (!t) return e.default || [];
3173
+ let n = e[t];
3174
+ return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
3175
+ }
3176
+ toResolveHierarchy(e, t) {
3177
+ let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
3178
+ e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
3179
+ };
3180
+ return Z(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : Z(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
3181
+ r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
3182
+ }), r;
3183
+ }
3184
+ }, Da = {
3185
+ zero: 0,
3186
+ one: 1,
3187
+ two: 2,
3188
+ few: 3,
3189
+ many: 4,
3190
+ other: 5
3191
+ }, Oa = {
3192
+ select: (e) => e === 1 ? "one" : "other",
3193
+ resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
3194
+ }, ka = class {
3195
+ constructor(e, t = {}) {
3196
+ this.languageUtils = e, this.options = t, this.logger = Q.create("pluralResolver"), this.pluralRulesCache = {};
3197
+ }
3198
+ clearCache() {
3199
+ this.pluralRulesCache = {};
3200
+ }
3201
+ getRule(e, t = {}) {
3202
+ let n = ha(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
3203
+ cleanedCode: n,
3204
+ type: r
3205
+ });
3206
+ if (i in this.pluralRulesCache) return this.pluralRulesCache[i];
3207
+ let a;
3208
+ try {
3209
+ a = new Intl.PluralRules(n, { type: r });
3210
+ } catch {
3211
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), Oa;
3212
+ if (!e.match(/-|_/)) return Oa;
3213
+ let n = this.languageUtils.getLanguagePartFromCode(e);
3214
+ a = this.getRule(n, t);
3215
+ }
3216
+ return this.pluralRulesCache[i] = a, a;
3217
+ }
3218
+ needsPlural(e, t = {}) {
3219
+ let n = this.getRule(e, t);
3220
+ return n ||= this.getRule("dev", t), n?.resolvedOptions().pluralCategories.length > 1;
3221
+ }
3222
+ getPluralFormsOfKey(e, t, n = {}) {
3223
+ return this.getSuffixes(e, n).map((e) => `${t}${e}`);
3224
+ }
3225
+ getSuffixes(e, t = {}) {
3226
+ let n = this.getRule(e, t);
3227
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => Da[e] - Da[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
3228
+ }
3229
+ getSuffix(e, t, n = {}) {
3230
+ let r = this.getRule(e, n);
3231
+ return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
3232
+ }
3233
+ }, Aa = (e, t, n, r = ".", i = !0) => {
3234
+ let a = aa(e, t, n);
3235
+ return !a && i && Z(n) && (a = ma(e, n, r), a === void 0 && (a = ma(t, n, r))), a;
3236
+ }, ja = (e) => e.replace(/\$/g, "$$$$"), Ma = class {
3237
+ constructor(e = {}) {
3238
+ this.logger = Q.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
3239
+ }
3240
+ init(e = {}) {
3241
+ e.interpolation ||= { escapeValue: !0 };
3242
+ let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: ee } = e.interpolation;
3243
+ this.escape = t === void 0 ? la : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? sa(i) : a || "{{", this.suffix = o ? sa(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? sa(d) : f || sa("$t("), this.nestingSuffix = p ? sa(p) : m || sa(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = ee !== void 0 && ee, this.resetRegExp();
3244
+ }
3245
+ reset() {
3246
+ this.options && this.init(this.options);
3247
+ }
3248
+ resetRegExp() {
3249
+ let e = (e, t) => e?.source === t ? (e.lastIndex = 0, e) : new RegExp(t, "g");
3250
+ this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
3251
+ }
3252
+ interpolate(e, t, n, r) {
3253
+ let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
3254
+ if (e.indexOf(this.formatSeparator) < 0) {
3255
+ let i = Aa(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
3256
+ return this.alwaysFormat ? this.format(i, void 0, n, {
3257
+ ...r,
3258
+ ...t,
3259
+ interpolationkey: e
3260
+ }) : i;
3261
+ }
3262
+ let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
3263
+ return this.format(Aa(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
3264
+ ...r,
3265
+ ...t,
3266
+ interpolationkey: a
3267
+ });
3268
+ };
3269
+ this.resetRegExp();
3270
+ let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
3271
+ return [{
3272
+ regex: this.regexpUnescape,
3273
+ safeValue: (e) => ja(e)
3274
+ }, {
3275
+ regex: this.regexp,
3276
+ safeValue: (e) => this.escapeValue ? ja(this.escape(e)) : ja(e)
3277
+ }].forEach((t) => {
3278
+ for (o = 0; i = t.regex.exec(e);) {
3279
+ let n = i[1].trim();
3280
+ if (a = c(n), a === void 0) if (typeof l == "function") {
3281
+ let t = l(e, i, r);
3282
+ a = Z(t) ? t : "";
3283
+ } else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
3284
+ else if (u) {
3285
+ a = i[0];
3286
+ continue;
3287
+ } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
3288
+ else !Z(a) && !this.useRawValueToEscape && (a = Xi(a));
3289
+ let s = t.safeValue(a);
3290
+ if (e = e.replace(i[0], s), u ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
3291
+ }
3292
+ }), e;
3293
+ }
3294
+ nest(e, t, n = {}) {
3295
+ let r, i, a, o = (e, t) => {
3296
+ let n = this.nestingOptionsSeparator;
3297
+ if (e.indexOf(n) < 0) return e;
3298
+ let r = e.split(RegExp(`${sa(n)}[ ]*{`)), i = `{${r[1]}`;
3299
+ e = r[0], i = this.interpolate(i, a);
3300
+ let o = i.match(/'/g), s = i.match(/"/g);
3301
+ ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
3302
+ try {
3303
+ a = JSON.parse(i), t && (a = {
3304
+ ...t,
3305
+ ...a
3306
+ });
3307
+ } catch (t) {
3308
+ return this.logger.warn(`failed parsing options string in nesting for key ${e}`, t), `${e}${n}${i}`;
3309
+ }
3310
+ return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, e;
3311
+ };
3312
+ for (; r = this.nestingRegexp.exec(e);) {
3313
+ let s = [];
3314
+ a = { ...n }, a = a.replace && !Z(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
3315
+ let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
3316
+ if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !Z(i)) return i;
3317
+ Z(i) || (i = Xi(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
3318
+ ...n,
3319
+ interpolationkey: r[1].trim()
3320
+ }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
3321
+ }
3322
+ return e;
3323
+ }
3324
+ }, Na = (e) => {
3325
+ let t = e.toLowerCase().trim(), n = {};
3326
+ if (e.indexOf("(") > -1) {
3327
+ let r = e.split("(");
3328
+ t = r[0].toLowerCase().trim();
3329
+ let i = r[1].substring(0, r[1].length - 1);
3330
+ t === "currency" && i.indexOf(":") < 0 ? n.currency ||= i.trim() : t === "relativetime" && i.indexOf(":") < 0 ? n.range ||= i.trim() : i.split(";").forEach((e) => {
3331
+ if (e) {
3332
+ let [t, ...r] = e.split(":"), i = r.join(":").trim().replace(/^'+|'+$/g, ""), a = t.trim();
3333
+ n[a] || (n[a] = i), i === "false" && (n[a] = !1), i === "true" && (n[a] = !0), isNaN(i) || (n[a] = parseInt(i, 10));
3334
+ }
3335
+ });
3336
+ }
3337
+ return {
3338
+ formatName: t,
3339
+ formatOptions: n
3340
+ };
3341
+ }, Pa = (e) => {
3342
+ let t = {};
3343
+ return (n, r, i) => {
3344
+ let a = i;
3345
+ i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (a = {
3346
+ ...a,
3347
+ [i.interpolationkey]: void 0
3348
+ });
3349
+ let o = r + JSON.stringify(a), s = t[o];
3350
+ return s || (s = e(ha(r), i), t[o] = s), s(n);
3351
+ };
3352
+ }, Fa = (e) => (t, n, r) => e(ha(n), r)(t), Ia = class {
3353
+ constructor(e = {}) {
3354
+ this.logger = Q.create("formatter"), this.options = e, this.init(e);
3355
+ }
3356
+ init(e, t = { interpolation: {} }) {
3357
+ this.formatSeparator = t.interpolation.formatSeparator || ",";
3358
+ let n = t.cacheInBuiltFormats ? Pa : Fa;
3359
+ this.formats = {
3360
+ number: n((e, t) => {
3361
+ let n = new Intl.NumberFormat(e, { ...t });
3362
+ return (e) => n.format(e);
3363
+ }),
3364
+ currency: n((e, t) => {
3365
+ let n = new Intl.NumberFormat(e, {
3366
+ ...t,
3367
+ style: "currency"
3368
+ });
3369
+ return (e) => n.format(e);
3370
+ }),
3371
+ datetime: n((e, t) => {
3372
+ let n = new Intl.DateTimeFormat(e, { ...t });
3373
+ return (e) => n.format(e);
3374
+ }),
3375
+ relativetime: n((e, t) => {
3376
+ let n = new Intl.RelativeTimeFormat(e, { ...t });
3377
+ return (e) => n.format(e, t.range || "day");
3378
+ }),
3379
+ list: n((e, t) => {
3380
+ let n = new Intl.ListFormat(e, { ...t });
3381
+ return (e) => n.format(e);
3382
+ })
3383
+ };
3384
+ }
3385
+ add(e, t) {
3386
+ this.formats[e.toLowerCase().trim()] = t;
3387
+ }
3388
+ addCached(e, t) {
3389
+ this.formats[e.toLowerCase().trim()] = Pa(t);
3390
+ }
3391
+ format(e, t, n, r = {}) {
3392
+ let i = t.split(this.formatSeparator);
3393
+ if (i.length > 1 && i[0].indexOf("(") > 1 && i[0].indexOf(")") < 0 && i.find((e) => e.indexOf(")") > -1)) {
3394
+ let e = i.findIndex((e) => e.indexOf(")") > -1);
3395
+ i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
3396
+ }
3397
+ return i.reduce((e, t) => {
3398
+ let { formatName: i, formatOptions: a } = Na(t);
3399
+ if (this.formats[i]) {
3400
+ let t = e;
3401
+ try {
3402
+ let o = r?.formatParams?.[r.interpolationkey] || {}, s = o.locale || o.lng || r.locale || r.lng || n;
3403
+ t = this.formats[i](e, s, {
3404
+ ...a,
3405
+ ...r,
3406
+ ...o
3407
+ });
3408
+ } catch (e) {
3409
+ this.logger.warn(e);
3410
+ }
3411
+ return t;
3412
+ } else this.logger.warn(`there was no format function for ${i}`);
3413
+ return e;
3414
+ }, e);
3415
+ }
3416
+ }, La = (e, t) => {
3417
+ e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
3418
+ }, Ra = class extends _a {
3419
+ constructor(e, t, n, r = {}) {
3420
+ super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = Q.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
3421
+ }
3422
+ queueLoad(e, t, n, r) {
3423
+ let i = {}, a = {}, o = {}, s = {};
3424
+ return e.forEach((e) => {
3425
+ let r = !0;
3426
+ t.forEach((t) => {
3427
+ let o = `${e}|${t}`;
3428
+ !n.reload && this.store.hasResourceBundle(e, t) ? this.state[o] = 2 : this.state[o] < 0 || (this.state[o] === 1 ? a[o] === void 0 && (a[o] = !0) : (this.state[o] = 1, r = !1, a[o] === void 0 && (a[o] = !0), i[o] === void 0 && (i[o] = !0), s[t] === void 0 && (s[t] = !0)));
3429
+ }), r || (o[e] = !0);
3430
+ }), (Object.keys(i).length || Object.keys(a).length) && this.queue.push({
3431
+ pending: a,
3432
+ pendingCount: Object.keys(a).length,
3433
+ loaded: {},
3434
+ errors: [],
3435
+ callback: r
3436
+ }), {
3437
+ toLoad: Object.keys(i),
3438
+ pending: Object.keys(a),
3439
+ toLoadLanguages: Object.keys(o),
3440
+ toLoadNamespaces: Object.keys(s)
3441
+ };
3442
+ }
3443
+ loaded(e, t, n) {
3444
+ let r = e.split("|"), i = r[0], a = r[1];
3445
+ t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
3446
+ let o = {};
3447
+ this.queue.forEach((n) => {
3448
+ ra(n.loaded, [i], a), La(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
3449
+ o[e] || (o[e] = {});
3450
+ let t = n.loaded[e];
3451
+ t.length && t.forEach((t) => {
3452
+ o[e][t] === void 0 && (o[e][t] = !0);
3453
+ });
3454
+ }), n.done = !0, n.errors.length ? n.callback(n.errors) : n.callback());
3455
+ }), this.emit("loaded", o), this.queue = this.queue.filter((e) => !e.done);
3456
+ }
3457
+ read(e, t, n, r = 0, i = this.retryTimeout, a) {
3458
+ if (!e.length) return a(null, {});
3459
+ if (this.readingCalls >= this.maxParallelReads) {
3460
+ this.waitingReads.push({
3461
+ lng: e,
3462
+ ns: t,
3463
+ fcName: n,
3464
+ tried: r,
3465
+ wait: i,
3466
+ callback: a
3467
+ });
3468
+ return;
3469
+ }
3470
+ this.readingCalls++;
3471
+ let o = (o, s) => {
3472
+ if (this.readingCalls--, this.waitingReads.length > 0) {
3473
+ let e = this.waitingReads.shift();
3474
+ this.read(e.lng, e.ns, e.fcName, e.tried, e.wait, e.callback);
3475
+ }
3476
+ if (o && s && r < this.maxRetries) {
3477
+ setTimeout(() => {
3478
+ this.read.call(this, e, t, n, r + 1, i * 2, a);
3479
+ }, i);
3480
+ return;
3481
+ }
3482
+ a(o, s);
3483
+ }, s = this.backend[n].bind(this.backend);
3484
+ if (s.length === 2) {
3485
+ try {
3486
+ let n = s(e, t);
3487
+ n && typeof n.then == "function" ? n.then((e) => o(null, e)).catch(o) : o(null, n);
3488
+ } catch (e) {
3489
+ o(e);
3490
+ }
3491
+ return;
3492
+ }
3493
+ return s(e, t, o);
3494
+ }
3495
+ prepareLoading(e, t, n = {}, r) {
3496
+ if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
3497
+ Z(e) && (e = this.languageUtils.toResolveHierarchy(e)), Z(t) && (t = [t]);
3498
+ let i = this.queueLoad(e, t, n, r);
3499
+ if (!i.toLoad.length) return i.pending.length || r(), null;
3500
+ i.toLoad.forEach((e) => {
3501
+ this.loadOne(e);
3502
+ });
3503
+ }
3504
+ load(e, t, n) {
3505
+ this.prepareLoading(e, t, {}, n);
3506
+ }
3507
+ reload(e, t, n) {
3508
+ this.prepareLoading(e, t, { reload: !0 }, n);
3509
+ }
3510
+ loadOne(e, t = "") {
3511
+ let n = e.split("|"), r = n[0], i = n[1];
3512
+ this.read(r, i, "read", void 0, void 0, (n, a) => {
3513
+ n && this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`, n), !n && a && this.logger.log(`${t}loaded namespace ${i} for language ${r}`, a), this.loaded(e, n, a);
3514
+ });
3515
+ }
3516
+ saveMissing(e, t, n, r, i, a = {}, o = () => {}) {
3517
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) {
3518
+ this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
3519
+ return;
3520
+ }
3521
+ if (!(n == null || n === "")) {
3522
+ if (this.backend?.create) {
3523
+ let s = {
3524
+ ...a,
3525
+ isUpdate: i
3526
+ }, c = this.backend.create.bind(this.backend);
3527
+ if (c.length < 6) try {
3528
+ let i;
3529
+ i = c.length === 5 ? c(e, t, n, r, s) : c(e, t, n, r), i && typeof i.then == "function" ? i.then((e) => o(null, e)).catch(o) : o(null, i);
3530
+ } catch (e) {
3531
+ o(e);
3532
+ }
3533
+ else c(e, t, n, r, o, s);
3534
+ }
3535
+ !e || !e[0] || this.store.addResource(e[0], t, n, r);
3536
+ }
3537
+ }
3538
+ }, za = () => ({
3539
+ debug: !1,
3540
+ initAsync: !0,
3541
+ ns: ["translation"],
3542
+ defaultNS: ["translation"],
3543
+ fallbackLng: ["dev"],
3544
+ fallbackNS: !1,
3545
+ supportedLngs: !1,
3546
+ nonExplicitSupportedLngs: !1,
3547
+ load: "all",
3548
+ preload: !1,
3549
+ simplifyPluralSuffix: !0,
3550
+ keySeparator: ".",
3551
+ nsSeparator: ":",
3552
+ pluralSeparator: "_",
3553
+ contextSeparator: "_",
3554
+ partialBundledLanguages: !1,
3555
+ saveMissing: !1,
3556
+ updateMissing: !1,
3557
+ saveMissingTo: "fallback",
3558
+ saveMissingPlurals: !0,
3559
+ missingKeyHandler: !1,
3560
+ missingInterpolationHandler: !1,
3561
+ postProcess: !1,
3562
+ postProcessPassResolved: !1,
3563
+ returnNull: !1,
3564
+ returnEmptyString: !0,
3565
+ returnObjects: !1,
3566
+ joinArrays: !1,
3567
+ returnedObjectHandler: !1,
3568
+ parseMissingKeyHandler: !1,
3569
+ appendNamespaceToMissingKey: !1,
3570
+ appendNamespaceToCIMode: !1,
3571
+ overloadTranslationOptionHandler: (e) => {
3572
+ let t = {};
3573
+ if (typeof e[1] == "object" && (t = e[1]), Z(e[1]) && (t.defaultValue = e[1]), Z(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
3574
+ let n = e[3] || e[2];
3575
+ Object.keys(n).forEach((e) => {
3576
+ t[e] = n[e];
3577
+ });
3578
+ }
3579
+ return t;
3580
+ },
3581
+ interpolation: {
3582
+ escapeValue: !0,
3583
+ format: (e) => e,
3584
+ prefix: "{{",
3585
+ suffix: "}}",
3586
+ formatSeparator: ",",
3587
+ unescapePrefix: "-",
3588
+ nestingPrefix: "$t(",
3589
+ nestingSuffix: ")",
3590
+ nestingOptionsSeparator: ",",
3591
+ maxReplaces: 1e3,
3592
+ skipOnVariables: !0
3593
+ },
3594
+ cacheInBuiltFormats: !0
3595
+ }), Ba = (e) => (Z(e.ns) && (e.ns = [e.ns]), Z(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), Z(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Va = () => {}, Ha = (e) => {
3596
+ Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
3597
+ typeof e[t] == "function" && (e[t] = e[t].bind(e));
3598
+ });
3599
+ }, Ua = "__i18next_supportNoticeShown", Wa = () => !!(typeof globalThis < "u" && globalThis[Ua] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Ga = () => {
3600
+ typeof globalThis < "u" && (globalThis[Ua] = !0);
3601
+ }, Ka = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), $ = class e extends _a {
3602
+ constructor(e = {}, t) {
3603
+ if (super(), this.options = Ba(e), this.services = {}, this.logger = Q, this.modules = { external: [] }, Ha(this), t && !this.isInitialized && !e.isClone) {
3604
+ if (!this.options.initAsync) return this.init(e, t), this;
3605
+ setTimeout(() => {
3606
+ this.init(e, t);
3607
+ }, 0);
3608
+ }
3609
+ }
3610
+ init(e = {}, t) {
3611
+ this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (Z(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
3612
+ let n = za();
3613
+ this.options = {
3614
+ ...n,
3615
+ ...this.options,
3616
+ ...Ba(e)
3617
+ }, this.options.interpolation = {
3618
+ ...n.interpolation,
3619
+ ...this.options.interpolation
3620
+ }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !Ka(this) && !Wa() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), Ga());
3621
+ let r = (e) => e ? typeof e == "function" ? new e() : e : null;
3622
+ if (!this.options.isClone) {
3623
+ this.modules.logger ? Q.init(r(this.modules.logger), this.options) : Q.init(null, this.options);
3624
+ let e;
3625
+ e = this.modules.formatter ? this.modules.formatter : Ia;
3626
+ let t = new Ea(this.options);
3627
+ this.store = new va(this.options.resources, this.options);
3628
+ let i = this.services;
3629
+ i.logger = Q, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new ka(t, {
3630
+ prepend: this.options.pluralSeparator,
3631
+ simplifyPluralSuffix: this.options.simplifyPluralSuffix
3632
+ }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new Ma(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Ra(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
3633
+ this.emit(e, ...t);
3634
+ }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new Ta(this.services, this.options), this.translator.on("*", (e, ...t) => {
3635
+ this.emit(e, ...t);
3636
+ }), this.modules.external.forEach((e) => {
3637
+ e.init && e.init(this);
3638
+ });
3639
+ }
3640
+ if (this.format = this.options.interpolation.format, t ||= Va, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3641
+ let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
3642
+ e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
3643
+ }
3644
+ !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), [
3645
+ "getResource",
3646
+ "hasResourceBundle",
3647
+ "getResourceBundle",
3648
+ "getDataByLanguage"
3649
+ ].forEach((e) => {
3650
+ this[e] = (...t) => this.store[e](...t);
3651
+ }), [
3652
+ "addResource",
3653
+ "addResources",
3654
+ "addResourceBundle",
3655
+ "removeResourceBundle"
3656
+ ].forEach((e) => {
3657
+ this[e] = (...t) => (this.store[e](...t), this);
3658
+ });
3659
+ let i = Yi(), a = () => {
3660
+ let e = (e, n) => {
3661
+ this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
3662
+ };
3663
+ if (this.languages && !this.isInitialized) return e(null, this.t.bind(this));
3664
+ this.changeLanguage(this.options.lng, e);
3665
+ };
3666
+ return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
3667
+ }
3668
+ loadResources(e, t = Va) {
3669
+ let n = t, r = Z(e) ? e : this.language;
3670
+ if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
3671
+ if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
3672
+ let e = [], t = (t) => {
3673
+ t && t !== "cimode" && this.services.languageUtils.toResolveHierarchy(t).forEach((t) => {
3674
+ t !== "cimode" && e.indexOf(t) < 0 && e.push(t);
3675
+ });
3676
+ };
3677
+ r ? t(r) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e) => t(e)), this.options.preload?.forEach?.((e) => t(e)), this.services.backendConnector.load(e, this.options.ns, (e) => {
3678
+ !e && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(e);
3679
+ });
3680
+ } else n(null);
3681
+ }
3682
+ reloadResources(e, t, n) {
3683
+ let r = Yi();
3684
+ return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= Va, this.services.backendConnector.reload(e, t, (e) => {
3685
+ r.resolve(), n(e);
3686
+ }), r;
3687
+ }
3688
+ use(e) {
3689
+ if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
3690
+ if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
3691
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && ya.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3692
+ }
3693
+ setResolvedLanguage(e) {
3694
+ if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
3695
+ for (let e = 0; e < this.languages.length; e++) {
3696
+ let t = this.languages[e];
3697
+ if (!(["cimode", "dev"].indexOf(t) > -1) && this.store.hasLanguageSomeTranslations(t)) {
3698
+ this.resolvedLanguage = t;
3699
+ break;
3700
+ }
3701
+ }
3702
+ !this.resolvedLanguage && this.languages.indexOf(e) < 0 && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e));
3703
+ }
3704
+ }
3705
+ changeLanguage(e, t) {
3706
+ this.isLanguageChangingTo = e;
3707
+ let n = Yi();
3708
+ this.emit("languageChanging", e);
3709
+ let r = (e) => {
3710
+ this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
3711
+ }, i = (i, a) => {
3712
+ a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
3713
+ }, a = (t) => {
3714
+ !e && !t && this.services.languageDetector && (t = []);
3715
+ let n = Z(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(Z(t) ? [t] : t);
3716
+ a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
3717
+ i(e, a);
3718
+ });
3719
+ };
3720
+ return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(e), n;
3721
+ }
3722
+ getFixedT(e, t, n) {
3723
+ let r = (e, t, ...i) => {
3724
+ let a;
3725
+ a = typeof t == "object" ? { ...t } : this.options.overloadTranslationOptionHandler([e, t].concat(i)), a.lng = a.lng || r.lng, a.lngs = a.lngs || r.lngs, a.ns = a.ns || r.ns, a.keyPrefix !== "" && (a.keyPrefix = a.keyPrefix || n || r.keyPrefix);
3726
+ let o = {
3727
+ ...this.options,
3728
+ ...a
3729
+ };
3730
+ typeof a.keyPrefix == "function" && (a.keyPrefix = Sa(a.keyPrefix, o));
3731
+ let s = this.options.keySeparator || ".", c;
3732
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = Sa(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = Sa(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
3733
+ };
3734
+ return Z(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
3735
+ }
3736
+ t(...e) {
3737
+ return this.translator?.translate(...e);
3738
+ }
3739
+ exists(...e) {
3740
+ return this.translator?.exists(...e);
3741
+ }
3742
+ setDefaultNamespace(e) {
3743
+ this.options.defaultNS = e;
3744
+ }
3745
+ hasLoadedNamespace(e, t = {}) {
3746
+ if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
3747
+ if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
3748
+ let n = t.lng || this.resolvedLanguage || this.languages[0], r = this.options ? this.options.fallbackLng : !1, i = this.languages[this.languages.length - 1];
3749
+ if (n.toLowerCase() === "cimode") return !0;
3750
+ let a = (e, t) => {
3751
+ let n = this.services.backendConnector.state[`${e}|${t}`];
3752
+ return n === -1 || n === 0 || n === 2;
3753
+ };
3754
+ if (t.precheck) {
3755
+ let e = t.precheck(this, a);
3756
+ if (e !== void 0) return e;
3757
+ }
3758
+ return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
3759
+ }
3760
+ loadNamespaces(e, t) {
3761
+ let n = Yi();
3762
+ return this.options.ns ? (Z(e) && (e = [e]), e.forEach((e) => {
3763
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
3764
+ }), this.loadResources((e) => {
3765
+ n.resolve(), t && t(e);
3766
+ }), n) : (t && t(), Promise.resolve());
3767
+ }
3768
+ loadLanguages(e, t) {
3769
+ let n = Yi();
3770
+ Z(e) && (e = [e]);
3771
+ let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
3772
+ return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
3773
+ n.resolve(), t && t(e);
3774
+ }), n) : (t && t(), Promise.resolve());
3775
+ }
3776
+ dir(e) {
3777
+ if (e ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e) return "rtl";
3778
+ try {
3779
+ let t = new Intl.Locale(e);
3780
+ if (t && t.getTextInfo) {
3781
+ let e = t.getTextInfo();
3782
+ if (e && e.direction) return e.direction;
3783
+ }
3784
+ } catch {}
3785
+ let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new Ea(za());
3786
+ return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
3787
+ }
3788
+ static createInstance(t = {}, n) {
3789
+ let r = new e(t, n);
3790
+ return r.createInstance = e.createInstance, r;
3791
+ }
3792
+ cloneInstance(t = {}, n = Va) {
3793
+ let r = t.forkResourceStore;
3794
+ r && delete t.forkResourceStore;
3795
+ let i = {
3796
+ ...this.options,
3797
+ ...t,
3798
+ isClone: !0
3799
+ }, a = new e(i);
3800
+ if ((t.debug !== void 0 || t.prefix !== void 0) && (a.logger = a.logger.clone(t)), [
3801
+ "store",
3802
+ "services",
3803
+ "language"
3804
+ ].forEach((e) => {
3805
+ a[e] = this[e];
3806
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new va(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
3807
+ let e = {
3808
+ ...za().interpolation,
3809
+ ...this.options.interpolation,
3810
+ ...t.interpolation
3811
+ }, n = {
3812
+ ...i,
3813
+ interpolation: e
3814
+ };
3815
+ a.services.interpolator = new Ma(n);
3816
+ }
3817
+ return a.translator = new Ta(a.services, i), a.translator.on("*", (e, ...t) => {
3818
+ a.emit(e, ...t);
3819
+ }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
3820
+ }
3821
+ toJSON() {
3822
+ return {
3823
+ options: this.options,
3824
+ store: this.store,
3825
+ language: this.language,
3826
+ languages: this.languages,
3827
+ resolvedLanguage: this.resolvedLanguage
3828
+ };
3829
+ }
3830
+ }.createInstance();
3831
+ //#endregion
3832
+ //#region ../../shared/translator/dist/index.js
3833
+ $.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.changeLanguage, $.getFixedT, $.t, $.exists, $.setDefaultNamespace, $.hasLoadedNamespace, $.loadNamespaces, $.loadLanguages, $.init({
3834
+ fallbackLng: "en",
3835
+ lng: "en",
3836
+ showSupportNotice: !1,
3837
+ resources: {
3838
+ en: qi,
3839
+ es: Ji
3840
+ }
3841
+ });
3842
+ //#endregion
3843
+ //#region src/i18n.ts
3844
+ var { translator: qa } = {
3845
+ translator: {
3846
+ ...$,
3847
+ t: (e, t) => {
3848
+ let { lng: n } = t;
3849
+ switch (n) {
3850
+ case "en_US":
3851
+ case "en-US":
3852
+ t.lng = "en";
3853
+ break;
3854
+ case "es_ES":
3855
+ case "es-ES":
3856
+ case "es_MX":
3857
+ case "es-MX":
3858
+ t.lng = "es";
3859
+ break;
3860
+ default: break;
3861
+ }
3862
+ return $.t(e, {
3863
+ lng: n,
3864
+ ...t
3865
+ });
3866
+ }
3867
+ },
3868
+ languageOptions: [{
3869
+ value: "en_US",
3870
+ label: "English (US)"
3871
+ }, {
3872
+ value: "es_ES",
3873
+ label: "Spanish"
3874
+ }]
3875
+ };
3876
+ function Ja(e, t) {
3877
+ return qa.t(`translation:simpleCloze:${e}`, { lng: t });
3878
+ }
3879
+ //#endregion
3880
+ //#region src/print/Print.svelte
3881
+ var Ya = /* @__PURE__ */ or("<div class=\"simple-cloze-print-teacher-instructions svelte-1fx5wwa\"></div>"), Xa = /* @__PURE__ */ or("<div class=\"simple-cloze-print-prompt svelte-1fx5wwa\"></div>"), Za = /* @__PURE__ */ or("<span class=\"simple-cloze-print-key-label svelte-1fx5wwa\"> </span> <span class=\"simple-cloze-print-blank simple-cloze-print-blank--key svelte-1fx5wwa\"> </span>", 1), Qa = /* @__PURE__ */ or("<span class=\"simple-cloze-print-blank svelte-1fx5wwa\" role=\"img\"></span>"), $a = /* @__PURE__ */ or("<div class=\"simple-cloze-print svelte-1fx5wwa\"><!> <!> <div class=\"simple-cloze-print-response svelte-1fx5wwa\"><!></div></div>"), eo = {
3882
+ hash: "svelte-1fx5wwa",
3883
+ code: "\n /* Self-contained: print players ship no Tailwind or CSS reset. */.simple-cloze-print.svelte-1fx5wwa {padding:1rem;color:var(--pie-text, black);}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa,\n .simple-cloze-print-prompt.svelte-1fx5wwa {margin-bottom:1rem;}.simple-cloze-print-teacher-instructions.svelte-1fx5wwa p,\n .simple-cloze-print-prompt.svelte-1fx5wwa p {margin:0.5em 0;}.simple-cloze-print-prompt.svelte-1fx5wwa strong {font-weight:600;}.simple-cloze-print-response.svelte-1fx5wwa {display:inline-flex;align-items:baseline;gap:0.5rem;}.simple-cloze-print-key-label.svelte-1fx5wwa {font-size:0.875rem;line-height:1.25rem;font-weight:600;}.simple-cloze-print-blank.svelte-1fx5wwa {display:inline-block;min-width:12rem;min-height:1.5rem;padding:0.5rem 0.75rem;border-bottom:2px solid var(--pie-text, black);}.simple-cloze-print-blank--key.svelte-1fx5wwa {min-width:6rem;font-weight:600;}\n\n @media print {.simple-cloze-print.svelte-1fx5wwa {padding:0;}\n }"
3884
+ };
3885
+ function to(e, t) {
3886
+ We(t, !0), wr(e, eo);
3887
+ let n = Ir(t, "model", 7, null), r = Ir(t, "options", 7, null), i = /* @__PURE__ */ lt(() => r()?.role === "instructor"), a = /* @__PURE__ */ lt(() => n()?.promptEnabled !== !1 && typeof n()?.prompt == "string" ? n().prompt : ""), o = /* @__PURE__ */ lt(() => Ki(n()?.correctAnswer)), s = /* @__PURE__ */ lt(() => X(i) && !!X(o)), c = /* @__PURE__ */ lt(() => X(i) && n()?.teacherInstructionsEnabled !== !1 && n()?.teacherInstructions || ""), l = /* @__PURE__ */ M(null);
3888
+ dn(() => {
3889
+ if (!X(l) || !X(a)) return;
3890
+ let e = (e) => console.warn("simple-cloze: MathJax render failed", e);
3891
+ try {
3892
+ Promise.resolve(Ri(X(l))).catch(e);
3893
+ } catch (t) {
3894
+ e(t);
3895
+ }
3896
+ });
3897
+ var u = {
3898
+ get model() {
3899
+ return n();
3900
+ },
3901
+ set model(e = null) {
3902
+ n(e), Et();
3903
+ },
3904
+ get options() {
3905
+ return r();
3906
+ },
3907
+ set options(e = null) {
3908
+ r(e), Et();
3909
+ }
3910
+ }, d = $a(), f = Zt(d), p = (e) => {
3911
+ var t = Ya();
3912
+ Cr(t, () => X(c), !0), Te(t), sr(e, t);
3913
+ };
3914
+ Sr(f, (e) => {
3915
+ X(c) && e(p);
3916
+ });
3917
+ var m = en(f, 2), h = (e) => {
3918
+ var t = Xa();
3919
+ Cr(t, () => X(a), !0), Te(t), Nr(t, (e) => N(l, e), () => X(l)), sr(e, t);
3920
+ };
3921
+ Sr(m, (e) => {
3922
+ X(a) && e(h);
3923
+ });
3924
+ var g = en(m, 2), ee = Zt(g), _ = (e) => {
3925
+ var t = Za(), r = Qt(t), i = $t(r, !0), a = $t(en(r, 2), !0);
3926
+ vn((e) => {
3927
+ mr(i, e), mr(a, X(o));
3928
+ }, [() => Ja("printCorrectAnswer", n()?.language)]), sr(e, t);
3929
+ }, v = (e) => {
3930
+ var t = Qa();
3931
+ vn((e) => Or(t, "aria-label", e), [() => Ja("printAnswerBlank", n()?.language)]), sr(e, t);
3932
+ };
3933
+ return Sr(ee, (e) => {
3934
+ X(s) ? e(_) : e(v, -1);
3935
+ }), Te(g), Te(d), sr(e, d), Ge(u);
3936
+ }
3937
+ Hr(to, {
3938
+ model: { type: "Object" },
3939
+ options: { type: "Object" }
3940
+ }, [], []);
3941
+ //#endregion
3942
+ //#region src/print/index.ts
3943
+ var no = to.element;
3944
+ //#endregion
3945
+ export { no as default };
3946
+
3947
+ //# sourceMappingURL=print.js.map