@pie-qti/item-player 1.0.0-beta.5 → 1.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3773 +0,0 @@
1
- import { assignProps as e, createSvelteMountController as t, warnOnce as n } from "@pie-qti/qti-common";
2
- import { createAssessmentItemDefinition as r } from "./core/AssessmentItemDefinition.js";
3
- import { UnknownResponseIdentifierError as i, getItemSessionBinding as a } from "./core/ItemSession.js";
4
- import { SESSION_INPUTS as o } from "./session-inputs.js";
5
- import { contentLanguageAttributes as s, interfaceLocaleAttributes as c, joinSentences as l, translate as u } from "@pie-qti/i18n";
6
- import { INTERACTION_SLOT_ATTRIBUTE as d } from "./presentation/interactionSlots.js";
7
- import { typesetAction as f } from "./components/actions/typesetAction.js";
8
- import { glossaryAction as p } from "./catalog/glossaryAction.js";
9
- import { isWithinPnpSurface as m } from "./pnp/applyPnp.js";
10
- import { textEntryStringIdentifier as h } from "./interactions/text-entry/response.js";
11
- import { plainValueEquals as g } from "./core/serialization/valueForms.js";
12
- import { UNSLOTTED_CLASS as _, createItemBodyRenderer as v } from "./components/utils/itemBodyRenderer.js";
13
- import { sentenceContextId as y } from "./components/utils/sentenceContext.js";
14
- import { isCandidateAttemptFeedback as b, nextFeedbackAnnouncement as ee } from "./presentation/feedbackAnnouncement.js";
15
- import { inlineInteractionLabel as x, textEntryPatternMessage as S } from "./interactions/inline/accessibleName.js";
16
- import { xsdPatternSource as te } from "@pie-qti/qti-processing";
17
- import { textEntryInputStyle as ne } from "./interactions/text-entry/inlineInputStyle.js";
18
- import { textEntryInputMode as re } from "./interactions/text-entry/inputMode.js";
19
- import { closeModalDialog as ie, deepActiveElement as ae, focusContainer as oe, openModalDialog as se, restoreFocus as C } from "./components/utils/focus.js";
20
- import { endAttemptRequest as ce } from "./components/utils/endAttempt.js";
21
- import { isQtiRole as le, parseQtiRole as ue } from "./core/rolePolicy.js";
22
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/shared/utils.js
23
- var de = Array.isArray, fe = Array.prototype.indexOf, pe = Array.prototype.includes, me = Array.from, he = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, _e = Object.getOwnPropertyDescriptors, ve = Object.prototype, ye = Array.prototype, be = Object.getPrototypeOf, xe = Object.isExtensible, Se = () => {};
24
- function Ce(e) {
25
- for (var t = 0; t < e.length; t++) e[t]();
26
- }
27
- function we() {
28
- var e, t;
29
- return {
30
- promise: new Promise((n, r) => {
31
- e = n, t = r;
32
- }),
33
- resolve: e,
34
- reject: t
35
- };
36
- }
37
- //#endregion
38
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
39
- function Te(e) {
40
- "@babel/helpers - typeof";
41
- return Te = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
42
- return typeof e;
43
- } : function(e) {
44
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
45
- }, Te(e);
46
- }
47
- //#endregion
48
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
49
- function Ee(e, t) {
50
- if (Te(e) != "object" || !e) return e;
51
- var n = e[Symbol.toPrimitive];
52
- if (n !== void 0) {
53
- var r = n.call(e, t || "default");
54
- if (Te(r) != "object") return r;
55
- throw TypeError("@@toPrimitive must return a primitive value.");
56
- }
57
- return (t === "string" ? String : Number)(e);
58
- }
59
- //#endregion
60
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
61
- function De(e) {
62
- var t = Ee(e, "string");
63
- return Te(t) == "symbol" ? t : t + "";
64
- }
65
- //#endregion
66
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
67
- function Oe(e, t, n) {
68
- return (t = De(t)) in e ? Object.defineProperty(e, t, {
69
- value: n,
70
- enumerable: !0,
71
- configurable: !0,
72
- writable: !0
73
- }) : e[t] = n, e;
74
- }
75
- //#endregion
76
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/constants.js
77
- var ke = 1 << 24, Ae = 1024, je = 2048, Me = 4096, Ne = 8192, Pe = 16384, Fe = 32768, Ie = 1 << 25, Le = 65536, Re = 1 << 19, ze = 1 << 20, Be = 1 << 25, Ve = 1 << 21, He = 1 << 22, Ue = 1 << 23, We = Symbol("$state"), Ge = Symbol("component"), Ke = Symbol("legacy props"), qe = Symbol(""), Je = Symbol("attributes"), Ye = Symbol("class"), Xe = Symbol("style"), Ze = Symbol("text"), Qe = Symbol("form reset"), $e = new class extends Error {
78
- constructor(...e) {
79
- super(...e), Oe(this, "name", "StaleReactionError"), Oe(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
80
- }
81
- }(), et = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml"), tt = {}, w = Symbol("uninitialized"), nt = "http://www.w3.org/2000/svg", rt = "http://www.w3.org/1998/Math/MathML";
82
- function it() {
83
- console.warn("https://svelte.dev/e/derived_inert");
84
- }
85
- function at(e) {
86
- console.warn("https://svelte.dev/e/hydration_mismatch");
87
- }
88
- function ot() {
89
- console.warn("https://svelte.dev/e/select_multiple_invalid_value");
90
- }
91
- function st() {
92
- console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
93
- }
94
- //#endregion
95
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/hydration.js
96
- var T = !1;
97
- function ct(e) {
98
- T = e;
99
- }
100
- var E;
101
- function D(e) {
102
- if (e === null) throw at(), tt;
103
- return E = e;
104
- }
105
- function lt() {
106
- return D(/* @__PURE__ */ pr(E));
107
- }
108
- function ut(e) {
109
- if (T) {
110
- if (/* @__PURE__ */ pr(E) !== null) throw at(), tt;
111
- E = e;
112
- }
113
- }
114
- function dt(e = 1) {
115
- if (T) {
116
- for (var t = e, n = E; t--;) n = /* @__PURE__ */ pr(n);
117
- E = n;
118
- }
119
- }
120
- function ft(e = !0) {
121
- for (var t = 0, n = E;;) {
122
- if (n.nodeType === 8) {
123
- var r = n.data;
124
- if (r === "]") {
125
- if (t === 0) return n;
126
- --t;
127
- } else (r === "[" || r === "[!" || r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
128
- }
129
- var i = /* @__PURE__ */ pr(n);
130
- e && n.remove(), n = i;
131
- }
132
- }
133
- function pt(e) {
134
- if (!e || e.nodeType !== 8) throw at(), tt;
135
- return e.data;
136
- }
137
- //#endregion
138
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/equality.js
139
- function mt(e) {
140
- return e === this.v;
141
- }
142
- function ht(e, t) {
143
- return e == e ? e !== t || typeof e == "object" && !!e || typeof e == "function" : t == t;
144
- }
145
- function gt(e) {
146
- return !ht(e, this.v);
147
- }
148
- //#endregion
149
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/errors.js
150
- function _t() {
151
- throw Error("https://svelte.dev/e/async_derived_orphan");
152
- }
153
- function vt(e, t, n) {
154
- throw Error("https://svelte.dev/e/each_key_duplicate");
155
- }
156
- function yt(e) {
157
- throw Error("https://svelte.dev/e/effect_in_teardown");
158
- }
159
- function bt() {
160
- throw Error("https://svelte.dev/e/effect_in_unowned_derived");
161
- }
162
- function xt(e) {
163
- throw Error("https://svelte.dev/e/effect_orphan");
164
- }
165
- function St() {
166
- throw Error("https://svelte.dev/e/effect_update_depth_exceeded");
167
- }
168
- function Ct(e) {
169
- throw Error("https://svelte.dev/e/props_invalid_value");
170
- }
171
- function wt() {
172
- throw Error("https://svelte.dev/e/state_descriptors_fixed");
173
- }
174
- function Tt() {
175
- throw Error("https://svelte.dev/e/state_prototype_fixed");
176
- }
177
- function Et() {
178
- throw Error("https://svelte.dev/e/state_unsafe_mutation");
179
- }
180
- function Dt() {
181
- throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
182
- }
183
- //#endregion
184
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/context.js
185
- var O = null;
186
- function Ot(e) {
187
- O = e;
188
- }
189
- function kt(e, t = !1, n) {
190
- O = {
191
- p: O,
192
- i: !1,
193
- c: null,
194
- e: null,
195
- s: e,
196
- x: null,
197
- r: H,
198
- l: null
199
- };
200
- }
201
- function At(e) {
202
- var t = O, n = t.e;
203
- if (n !== null) {
204
- t.e = null;
205
- for (var r of n) Ar(r);
206
- }
207
- return e !== void 0 && (t.x = e), t.i = !0, O = t.p, jt(e);
208
- }
209
- function jt(e = {}) {
210
- return he(e, Ge, { value: !0 }), e;
211
- }
212
- function Mt() {
213
- return !0;
214
- }
215
- //#endregion
216
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/task.js
217
- var Nt = [];
218
- function Pt() {
219
- var e = Nt;
220
- Nt = [], Ce(e);
221
- }
222
- function Ft(e) {
223
- if (Nt.length === 0 && !un) {
224
- var t = Nt;
225
- queueMicrotask(() => {
226
- t === Nt && Pt();
227
- });
228
- }
229
- Nt.push(e);
230
- }
231
- //#endregion
232
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/status.js
233
- var It = ~(je | Me | Ae);
234
- function k(e, t) {
235
- e.f = e.f & It | t;
236
- }
237
- function Lt(e) {
238
- e.f & 512 || e.deps === null ? k(e, Ae) : k(e, Me);
239
- }
240
- //#endregion
241
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/utils.js
242
- function Rt(e, t, n) {
243
- e.f & 2048 ? t.add(e) : e.f & 4096 && n.add(e), k(e, Ae);
244
- }
245
- //#endregion
246
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/misc.js
247
- function zt(e, t) {
248
- if (t) {
249
- let t = document.body;
250
- e.autofocus = !0, Ft(() => {
251
- document.activeElement === t && e.focus();
252
- });
253
- }
254
- }
255
- var Bt = !1;
256
- function Vt() {
257
- Bt || (Bt = !0, document.addEventListener("reset", (e) => {
258
- Promise.resolve().then(() => {
259
- if (!e.defaultPrevented) for (let t of e.target.elements) t[Qe]?.();
260
- });
261
- }, { capture: !0 }));
262
- }
263
- //#endregion
264
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
265
- function Ht(e) {
266
- var t = V, n = H;
267
- $r(null), ei(null);
268
- try {
269
- return e();
270
- } finally {
271
- $r(t), ei(n);
272
- }
273
- }
274
- //#endregion
275
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/async.js
276
- function Ut(e, t, n, r) {
277
- let i = Mt() ? qt : Xt;
278
- var a = e.filter((e) => !e.settled), o = t.map(i);
279
- if (n.length === 0 && a.length === 0) {
280
- r(o);
281
- return;
282
- }
283
- var s = H, c = Wt(), l = a.length === 1 ? a[0].promise : a.length > 1 ? Promise.all(a.map((e) => e.promise)) : null;
284
- function u(e) {
285
- if (!(s.f & 16384)) {
286
- c();
287
- try {
288
- r([...o, ...e]);
289
- } catch (e) {
290
- Cr(e, s);
291
- }
292
- Gt();
293
- }
294
- }
295
- var d = Kt();
296
- if (n.length === 0) {
297
- l.then(() => u([])).finally(d);
298
- return;
299
- }
300
- function f() {
301
- Promise.all(n.map((e) => /* @__PURE__ */ Yt(e))).then(u).catch((e) => Cr(e, s)).finally(d);
302
- }
303
- l ? l.then(() => {
304
- c(), f(), Gt();
305
- }) : f();
306
- }
307
- function Wt() {
308
- var e = H, t = V, n = O, r = F;
309
- return function(i = !0) {
310
- ei(e), $r(t), Ot(n), i && !(e.f & 16384) && (r?.activate(), r?.apply());
311
- };
312
- }
313
- function Gt(e = !0) {
314
- ei(null), $r(null), Ot(null), e && F?.deactivate();
315
- }
316
- function Kt() {
317
- var e = H, t = e.b, n = F, r = !!t?.is_rendered();
318
- return t?.update_pending_count(1, n), n.increment(r, e), () => {
319
- t?.update_pending_count(-1, n), n.decrement(r, e);
320
- };
321
- }
322
- /*#__NO_SIDE_EFFECTS__*/
323
- function qt(e) {
324
- var t = 2 | je;
325
- return H !== null && (H.f |= Re), {
326
- ctx: O,
327
- deps: null,
328
- effects: null,
329
- equals: mt,
330
- f: t,
331
- fn: e,
332
- reactions: null,
333
- rv: 0,
334
- v: w,
335
- wv: 0,
336
- parent: H,
337
- ac: null
338
- };
339
- }
340
- var Jt = Symbol("obsolete");
341
- /*#__NO_SIDE_EFFECTS__*/
342
- function Yt(e, t, n) {
343
- let r = H;
344
- r === null && _t();
345
- var i = void 0, a = Yn(w), o = !V, s = /* @__PURE__ */ new Set();
346
- return Nr(() => {
347
- var t = H, n = we();
348
- i = n.promise;
349
- try {
350
- Promise.resolve(e()).then(n.resolve, (e) => {
351
- e !== $e && n.reject(e);
352
- }).finally(Gt);
353
- } catch (e) {
354
- n.reject(e), Gt();
355
- }
356
- var c = F;
357
- if (o) {
358
- if (t.f & 32768) var l = Kt();
359
- if (r.b?.is_rendered()) c.async_deriveds.get(t)?.reject(Jt);
360
- else for (let e of s.values()) e.reject(Jt);
361
- s.add(n), c.async_deriveds.set(t, n);
362
- }
363
- let u = (e, t = void 0) => {
364
- l?.(), s.delete(n), t !== Jt && (c.activate(), t ? (a.f |= Ue, $n(a, t)) : (a.f & 8388608 && (a.f ^= Ue), $n(a, e)), c.deactivate());
365
- };
366
- n.promise.then(u, (e) => u(null, e || "unknown"));
367
- }), Or(() => {
368
- for (let e of s) e.reject(Jt);
369
- }), new Promise((e) => {
370
- function t(n) {
371
- function r() {
372
- n === i ? e(a) : t(i);
373
- }
374
- n.then(r, r);
375
- }
376
- t(i);
377
- });
378
- }
379
- /*#__NO_SIDE_EFFECTS__*/
380
- function A(e) {
381
- let t = /* @__PURE__ */ qt(e);
382
- return ni(t), t;
383
- }
384
- /*#__NO_SIDE_EFFECTS__*/
385
- function Xt(e) {
386
- let t = /* @__PURE__ */ qt(e);
387
- return t.equals = gt, t;
388
- }
389
- function Zt(e) {
390
- var t = e.effects;
391
- if (t !== null) {
392
- e.effects = null;
393
- for (var n = 0; n < t.length; n += 1) B(t[n]);
394
- }
395
- }
396
- function Qt(e) {
397
- var t, n = H, r = e.parent;
398
- if (!Xr && r !== null && e.v !== w && r.f & 24576) return it(), e.v;
399
- ei(r);
400
- try {
401
- Zt(e), t = mi(e);
402
- } finally {
403
- ei(n);
404
- }
405
- return t;
406
- }
407
- function $t(e) {
408
- var t = Qt(e);
409
- !e.equals(t) && (e.wv = di(), (!F?.is_fork || e.deps === null) && (F === null ? e.v = t : (F.capture(e, t, !0), sn?.capture(e, t, !0)), e.deps === null)) ? k(e, Ae) : Xr || (cn === null ? Lt(e) : (Dr() || F?.is_fork) && cn.set(e, t));
410
- }
411
- function en(e) {
412
- if (e.effects !== null) for (let t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && Ht(() => {
413
- t.ac.abort($e), t.ac = null;
414
- }), t.fn !== null && (t.teardown = Se), _i(t, 0), zr(t));
415
- }
416
- function tn(e) {
417
- if (e.effects !== null) for (let t of e.effects) t.teardown && t.fn !== null && vi(t);
418
- }
419
- //#endregion
420
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/checkPrivateRedeclaration.js
421
- function nn(e, t) {
422
- if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
423
- }
424
- //#endregion
425
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateMethodInitSpec.js
426
- function rn(e, t) {
427
- nn(e, t), t.add(e);
428
- }
429
- //#endregion
430
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldInitSpec.js
431
- function j(e, t, n) {
432
- nn(e, t), t.set(e, n);
433
- }
434
- //#endregion
435
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/assertClassBrand.js
436
- function M(e, t, n) {
437
- if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
438
- throw TypeError("Private element is not present on this object");
439
- }
440
- //#endregion
441
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldSet2.js
442
- function N(e, t, n) {
443
- return e.set(M(e, t), n), n;
444
- }
445
- //#endregion
446
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldGet2.js
447
- function P(e, t) {
448
- return e.get(M(e, t));
449
- }
450
- //#endregion
451
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/batch.js
452
- var an, on = null, F = null, sn = null, cn = null, ln = null, un = !1, dn = !1, fn = null, pn = null, mn = 0, hn = 1, gn = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), vn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), kn = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakSet(), jn = class e {
453
- constructor() {
454
- rn(this, I), Oe(this, "id", hn++), j(this, gn, !1), Oe(this, "linked", !0), j(this, _n, null), j(this, vn, null), Oe(this, "async_deriveds", /* @__PURE__ */ new Map()), Oe(this, "current", /* @__PURE__ */ new Map()), Oe(this, "previous", /* @__PURE__ */ new Map()), j(this, yn, /* @__PURE__ */ new Set()), j(this, bn, /* @__PURE__ */ new Set()), j(this, xn, 0), j(this, Sn, /* @__PURE__ */ new Map()), j(this, Cn, null), j(this, wn, []), j(this, Tn, []), j(this, En, /* @__PURE__ */ new Set()), j(this, Dn, /* @__PURE__ */ new Set()), j(this, On, /* @__PURE__ */ new Map()), j(this, kn, /* @__PURE__ */ new Set()), Oe(this, "is_fork", !1), j(this, An, !1), on === null ? on = this : (N(vn, on, this), N(_n, this, on)), on = this;
455
- }
456
- skip_effect(e) {
457
- P(On, this).has(e) || P(On, this).set(e, {
458
- d: [],
459
- m: []
460
- }), P(kn, this).delete(e);
461
- }
462
- unskip_effect(e, t = (e) => this.schedule(e)) {
463
- var n = P(On, this).get(e);
464
- if (n) {
465
- P(On, this).delete(e);
466
- for (var r of n.d) k(r, je), t(r);
467
- for (r of n.m) k(r, Me), t(r);
468
- }
469
- P(kn, this).add(e);
470
- }
471
- capture(e, t, n = !1) {
472
- e.v !== w && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [t, n]), cn?.set(e, t)), this.is_fork || (e.v = t);
473
- }
474
- activate() {
475
- F = this;
476
- }
477
- deactivate() {
478
- F = null, cn = null;
479
- }
480
- flush() {
481
- try {
482
- dn = !0, F = this, M(I, this, Pn).call(this);
483
- } finally {
484
- mn = 0, ln = null, fn = null, pn = null, dn = !1, F = null, cn = null, qn.clear();
485
- }
486
- }
487
- discard() {
488
- for (let e of P(bn, this)) e(this);
489
- P(bn, this).clear();
490
- for (let e of this.async_deriveds.values()) e.reject(Jt);
491
- M(I, this, zn).call(this), P(Cn, this)?.resolve();
492
- }
493
- register_created_effect(e) {
494
- P(Tn, this).push(e);
495
- }
496
- increment(e, t) {
497
- if (N(xn, this, P(xn, this) + 1), e) {
498
- let e = P(Sn, this).get(t) ?? 0;
499
- P(Sn, this).set(t, e + 1);
500
- }
501
- }
502
- decrement(e, t) {
503
- if (N(xn, this, P(xn, this) - 1), e) {
504
- let e = P(Sn, this).get(t) ?? 0;
505
- e === 1 ? P(Sn, this).delete(t) : P(Sn, this).set(t, e - 1);
506
- }
507
- P(An, this) || (N(An, this, !0), Ft(() => {
508
- N(An, this, !1), this.linked && this.flush();
509
- }));
510
- }
511
- transfer_effects(e, t) {
512
- for (let t of e) P(En, this).add(t);
513
- for (let e of t) P(Dn, this).add(e);
514
- e.clear(), t.clear();
515
- }
516
- oncommit(e) {
517
- P(yn, this).add(e);
518
- }
519
- ondiscard(e) {
520
- P(bn, this).add(e);
521
- }
522
- settled() {
523
- return (P(Cn, this) ?? N(Cn, this, we())).promise;
524
- }
525
- static ensure() {
526
- if (F === null) {
527
- let t = F = new e();
528
- !dn && Ft(() => {
529
- P(gn, t) || t.flush();
530
- });
531
- }
532
- return F;
533
- }
534
- apply() {
535
- cn = null;
536
- }
537
- schedule(e) {
538
- ln = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768) ? e.b.defer_effect(e) : P(wn, this).push(e);
539
- }
540
- };
541
- an = jn;
542
- function Mn() {
543
- if (this.is_fork) return !0;
544
- for (let n of P(Sn, this).keys()) {
545
- for (var e = n, t = !1; e.parent !== null;) {
546
- if (P(On, this).has(e)) {
547
- t = !0;
548
- break;
549
- }
550
- e = e.parent;
551
- }
552
- if (!t) return !0;
553
- }
554
- return !1;
555
- }
556
- function Nn() {
557
- var e = [];
558
- for (let i of P(wn, this)) if (!(i.f & 16384 || !(i.f & 6144))) {
559
- for (var t = i, n = !1; t.parent !== null;) {
560
- t = t.parent;
561
- var r = t.f;
562
- if (r & 96) {
563
- if (!(r & 1024)) {
564
- n = !0;
565
- break;
566
- }
567
- t.f ^= Ae;
568
- }
569
- }
570
- n || e.push(t);
571
- }
572
- return N(wn, this, []), e;
573
- }
574
- function Pn() {
575
- N(gn, this, !0);
576
- for (let e of P(En, this)) P(Dn, this).delete(e), k(e, je), this.schedule(e);
577
- for (let e of P(Dn, this)) k(e, Me), this.schedule(e);
578
- this.apply();
579
- for (var e = fn = [], t = [], n = pn = []; P(wn, this).length > 0;) {
580
- mn++ > 1e3 && (M(I, this, zn).call(this), Bn());
581
- for (let n of M(I, this, Nn).call(this)) try {
582
- M(I, this, Fn).call(this, n, e, t);
583
- } catch (e) {
584
- throw Gn(n), M(I, this, Mn).call(this) || this.discard(), e;
585
- }
586
- }
587
- if (F = null, n.length > 0) {
588
- var r = an.ensure();
589
- for (let e of n) r.schedule(e);
590
- }
591
- if (fn = null, pn = null, M(I, this, Mn).call(this)) {
592
- M(I, this, Rn).call(this, t), M(I, this, Rn).call(this, e);
593
- for (let [e, t] of P(On, this)) Wn(e, t);
594
- n.length > 0 && M(I, F, Pn).call(F);
595
- return;
596
- }
597
- let i = M(I, this, In).call(this);
598
- if (i) M(I, this, Rn).call(this, t), M(I, this, Rn).call(this, e), M(I, i, Ln).call(i, this);
599
- else {
600
- P(En, this).clear(), P(Dn, this).clear();
601
- for (let e of P(yn, this)) e(this);
602
- P(yn, this).clear(), sn = this, Hn(t), Hn(e), sn = null, P(Cn, this)?.resolve();
603
- var a = F;
604
- if (P(xn, this) === 0 && (P(wn, this).length === 0 || a !== null) && M(I, this, zn).call(this), P(wn, this).length > 0) {
605
- if (a !== null) {
606
- for (let e of P(wn, this)) P(wn, a).push(e);
607
- N(wn, this, []);
608
- } else a = this;
609
- }
610
- a !== null && (qn.clear(), M(I, a, Pn).call(a));
611
- }
612
- }
613
- function Fn(e, t, n) {
614
- e.f ^= Ae;
615
- for (var r = e.first; r !== null;) {
616
- var i = r.f, a = !!(i & 96);
617
- if (!(a && i & 1024 || i & 8192 || P(On, this).has(r)) && r.fn !== null) {
618
- a ? r.f ^= Ae : i & 4 ? t.push(r) : fi(r) && (i & 16 && P(Dn, this).add(r), vi(r));
619
- var o = r.first;
620
- if (o !== null) {
621
- r = o;
622
- continue;
623
- }
624
- }
625
- for (; r !== null;) {
626
- var s = r.next;
627
- if (s !== null) {
628
- r = s;
629
- break;
630
- }
631
- r = r.parent;
632
- }
633
- }
634
- }
635
- function In() {
636
- for (var e = P(_n, this); e !== null;) {
637
- if (!e.is_fork) {
638
- for (let [t, [, n]] of this.current) if (e.current.has(t) && !n) return e;
639
- }
640
- e = P(_n, e);
641
- }
642
- return null;
643
- }
644
- function Ln(e) {
645
- 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);
646
- for (let [t, n] of e.async_deriveds) {
647
- let e = this.async_deriveds.get(t);
648
- e && n.promise.then(e.resolve).catch(e.reject);
649
- }
650
- e.async_deriveds.clear(), this.transfer_effects(P(En, e), P(Dn, e));
651
- let t = (e) => {
652
- var n = e.reactions;
653
- if (n !== null && !(e.f & 2 && !(e.f & 6144))) for (let e of n) {
654
- var r = e.f;
655
- if (r & 2) t(e);
656
- else {
657
- var i = e;
658
- r & 4194320 && !this.async_deriveds.has(i) && (P(Dn, this).delete(i), k(i, je), this.schedule(i));
659
- }
660
- }
661
- };
662
- for (let e of this.current.keys()) t(e);
663
- this.oncommit(() => e.discard()), M(I, e, zn).call(e), F = this, M(I, this, Pn).call(this);
664
- }
665
- function Rn(e) {
666
- for (var t = 0; t < e.length; t += 1) Rt(e[t], P(En, this), P(Dn, this));
667
- }
668
- function zn() {
669
- if (this.linked) {
670
- var e = P(_n, this), t = P(vn, this);
671
- e === null || N(vn, e, t), t === null ? on = e : N(_n, t, e), this.linked = !1;
672
- }
673
- }
674
- function Bn() {
675
- try {
676
- St();
677
- } catch (e) {
678
- Cr(e, ln);
679
- }
680
- }
681
- var Vn = null;
682
- function Hn(e) {
683
- var t = e.length;
684
- if (t !== 0) {
685
- for (var n = 0; n < t;) {
686
- var r = e[n++];
687
- if (!(r.f & 24576) && fi(r) && (Vn = /* @__PURE__ */ new Set(), vi(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Hr(r), Vn?.size > 0)) {
688
- qn.clear();
689
- for (let e of Vn) {
690
- if (e.f & 24576) continue;
691
- let t = [e], n = e.parent;
692
- for (; n !== null;) Vn.has(n) && (Vn.delete(n), t.push(n)), n = n.parent;
693
- for (let e = t.length - 1; e >= 0; e--) {
694
- let n = t[e];
695
- n.f & 24576 || vi(n);
696
- }
697
- }
698
- Vn.clear();
699
- }
700
- }
701
- Vn = null;
702
- }
703
- }
704
- function Un(e) {
705
- F.schedule(e);
706
- }
707
- function Wn(e, t) {
708
- if (!(e.f & 32 && e.f & 1024)) {
709
- e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), k(e, Ae);
710
- for (var n = e.first; n !== null;) Wn(n, t), n = n.next;
711
- }
712
- }
713
- function Gn(e) {
714
- k(e, Ae);
715
- for (var t = e.first; t !== null;) Gn(t), t = t.next;
716
- }
717
- //#endregion
718
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/sources.js
719
- var Kn = /* @__PURE__ */ new Set(), qn = /* @__PURE__ */ new Map(), Jn = !1;
720
- function Yn(e, t) {
721
- return {
722
- f: 0,
723
- v: e,
724
- reactions: null,
725
- equals: mt,
726
- rv: 0,
727
- wv: 0
728
- };
729
- }
730
- /*#__NO_SIDE_EFFECTS__*/
731
- function L(e, t) {
732
- let n = Yn(e, t);
733
- return ni(n), n;
734
- }
735
- /*#__NO_SIDE_EFFECTS__*/
736
- function Xn(e, t = !1, n = !0) {
737
- let r = Yn(e);
738
- return t || (r.equals = gt), r;
739
- }
740
- function R(e, t, n = !1) {
741
- return V !== null && (!Qr || V.f & 131072) && Mt() && V.f & 4325394 && (ti === null || !ti.has(e)) && Et(), $n(e, n ? rr(t) : t, pn);
742
- }
743
- var Zn = null, Qn = 0;
744
- function $n(e, t, n = null) {
745
- if (!e.equals(t)) {
746
- Xr ? qn.set(e, t) : qn.has(e) || qn.set(e, e.v);
747
- var r = jn.ensure();
748
- if (r.capture(e, t), e.f & 2) {
749
- let t = e;
750
- e.f & 2048 && Qt(t), cn === null && Lt(t);
751
- }
752
- e.wv = di(), Zn = null, Qn = 0, nr(e, je, n), Zn = null, Mt() && H !== null && H.f & 1024 && !(H.f & 96) && (ai === null ? oi([e]) : ai.push(e)), !r.is_fork && Kn.size > 0 && !Jn && er();
753
- }
754
- return t;
755
- }
756
- function er() {
757
- Jn = !1;
758
- for (let e of Kn) {
759
- e.f & 1024 && k(e, Me);
760
- let t;
761
- try {
762
- t = fi(e);
763
- } catch {
764
- t = !0;
765
- }
766
- t && vi(e);
767
- }
768
- Kn.clear();
769
- }
770
- function tr(e) {
771
- R(e, e.v + 1);
772
- }
773
- function nr(e, t, n) {
774
- var r = e.reactions;
775
- if (r !== null) {
776
- var i = Mt(), a = r.length;
777
- if (Qn += a, Qn > 1e5 && Zn === null && (Zn = /* @__PURE__ */ new Set()), Zn !== null) {
778
- if (Zn.has(e)) return;
779
- Zn.add(e);
780
- }
781
- for (var o = 0; o < a; o++) {
782
- var s = r[o], c = s.f;
783
- if (i || s !== H) {
784
- var l = (c & je) === 0;
785
- if (l && k(s, t), c & 131072) Kn.add(s);
786
- else if (c & 2) {
787
- var u = s;
788
- cn?.delete(u), nr(u, Me, n);
789
- } else if (l) {
790
- var d = s;
791
- c & 16 && Vn !== null && Vn.add(d), n === null ? Un(d) : n.push(d);
792
- }
793
- }
794
- }
795
- }
796
- }
797
- function rr(e) {
798
- if (typeof e != "object" || !e || We in e || Ge in e) return e;
799
- let t = be(e);
800
- if (t !== ve && t !== ye) return e;
801
- var n = /* @__PURE__ */ new Map(), r = de(e), i = /* @__PURE__ */ L(0), a = null, o = li, s = (e) => {
802
- if (li === o) return e();
803
- var t = V, n = li;
804
- $r(null), ui(o);
805
- var r = e();
806
- return $r(t), ui(n), r;
807
- };
808
- return r && n.set("length", /* @__PURE__ */ L(e.length, a)), new Proxy(e, {
809
- defineProperty(e, t, r) {
810
- (!("value" in r) || r.configurable === !1 || r.enumerable === !1 || r.writable === !1) && wt();
811
- var i = n.get(t);
812
- return i === void 0 ? s(() => {
813
- var e = /* @__PURE__ */ L(r.value, a);
814
- return n.set(t, e), e;
815
- }) : R(i, r.value, !0), !0;
816
- },
817
- deleteProperty(e, t) {
818
- var r = n.get(t);
819
- if (r === void 0) {
820
- if (t in e) {
821
- let e = s(() => /* @__PURE__ */ L(w, a));
822
- n.set(t, e), tr(i);
823
- }
824
- } else R(r, w), tr(i);
825
- return !0;
826
- },
827
- get(t, r, i) {
828
- if (r === We) return e;
829
- var o = n.get(r), c = r in t;
830
- if (o === void 0 && (!c || ge(t, r)?.writable) && (o = s(() => /* @__PURE__ */ L(rr(c ? t[r] : w), a)), n.set(r, o)), o !== void 0) {
831
- var l = U(o);
832
- return l === w ? void 0 : l;
833
- }
834
- return Reflect.get(t, r, i);
835
- },
836
- getOwnPropertyDescriptor(e, t) {
837
- this.has?.(e, t);
838
- var r = Reflect.getOwnPropertyDescriptor(e, t), i = n.get(t);
839
- if (i !== void 0) {
840
- var a = U(i);
841
- if (a === w) return;
842
- if (r && "value" in r) r.value = a;
843
- else return {
844
- enumerable: !0,
845
- configurable: !0,
846
- value: a,
847
- writable: !0
848
- };
849
- }
850
- return r;
851
- },
852
- has(e, t) {
853
- if (t === We) return !0;
854
- var r = n.get(t), i = r !== void 0 && r.v !== w || Reflect.has(e, t);
855
- return (r !== void 0 || H !== null && (!i || ge(e, t)?.writable)) && (r === void 0 && (r = s(() => /* @__PURE__ */ L(i ? rr(e[t]) : w, a)), n.set(t, r)), U(r) === w) ? !1 : i;
856
- },
857
- set(e, t, o, c) {
858
- var l = n.get(t), u = t in e;
859
- if (r && t === "length") for (var d = o; d < l.v; d += 1) {
860
- var f = n.get(d + "");
861
- f === void 0 ? d in e && (f = s(() => /* @__PURE__ */ L(w, a)), n.set(d + "", f)) : R(f, w);
862
- }
863
- if (l === void 0) (!u || ge(e, t)?.writable) && (l = s(() => /* @__PURE__ */ L(void 0, a)), R(l, rr(o)), n.set(t, l));
864
- else {
865
- u = l.v !== w;
866
- var p = s(() => rr(o));
867
- R(l, p);
868
- }
869
- var m = Reflect.getOwnPropertyDescriptor(e, t);
870
- if (m?.set && m.set.call(c, o), !u) {
871
- if (r && typeof t == "string") {
872
- var h = n.get("length"), g = Number(t);
873
- Number.isInteger(g) && g >= h.v && R(h, g + 1);
874
- }
875
- tr(i);
876
- }
877
- return !0;
878
- },
879
- ownKeys(e) {
880
- U(i);
881
- var t = Reflect.ownKeys(e).filter((e) => {
882
- var t = n.get(e);
883
- return t === void 0 || t.v !== w;
884
- });
885
- for (var [r, a] of n) a.v !== w && !(r in e) && t.push(r);
886
- return t;
887
- },
888
- setPrototypeOf() {
889
- Tt();
890
- }
891
- });
892
- }
893
- function ir(e) {
894
- try {
895
- if (typeof e == "object" && e && We in e) return e[We];
896
- } catch {}
897
- return e;
898
- }
899
- function ar(e, t) {
900
- return Object.is(ir(e), ir(t));
901
- }
902
- var or, sr, cr, lr;
903
- function ur() {
904
- if (or === void 0) {
905
- or = window, sr = /Firefox/.test(navigator.userAgent);
906
- var e = Element.prototype, t = Node.prototype, n = Text.prototype;
907
- cr = ge(t, "firstChild").get, lr = ge(t, "nextSibling").get, xe(e) && (e[Ye] = void 0, e[Je] = null, e[Xe] = void 0, e.__e = void 0), xe(n) && (n[Ze] = void 0);
908
- }
909
- }
910
- function dr(e = "") {
911
- return document.createTextNode(e);
912
- }
913
- /*@__NO_SIDE_EFFECTS__*/
914
- function fr(e) {
915
- return cr.call(e);
916
- }
917
- /*@__NO_SIDE_EFFECTS__*/
918
- function pr(e) {
919
- return lr.call(e);
920
- }
921
- function mr(e, t) {
922
- if (!T) return /* @__PURE__ */ fr(e);
923
- var n = /* @__PURE__ */ fr(E);
924
- if (n === null) n = E.appendChild(dr());
925
- else if (t && n.nodeType !== 3) {
926
- var r = dr();
927
- return n?.before(r), D(r), r;
928
- }
929
- return t && xr(n), D(n), n;
930
- }
931
- function hr(e, t = !1) {
932
- if (!T) {
933
- var n = /* @__PURE__ */ fr(e);
934
- return n instanceof Comment && n.data === "" ? /* @__PURE__ */ pr(n) : n;
935
- }
936
- if (t) {
937
- if (E?.nodeType !== 3) {
938
- var r = dr();
939
- return E?.before(r), D(r), r;
940
- }
941
- xr(E);
942
- }
943
- return E;
944
- }
945
- function gr(e, t = !1) {
946
- if (!T) return /* @__PURE__ */ fr(e);
947
- var n = mr(e, t);
948
- return ut(e), n;
949
- }
950
- function _r(e, t = 1, n = !1) {
951
- let r = T ? E : e;
952
- for (var i; t--;) i = r, r = /* @__PURE__ */ pr(r);
953
- if (!T) return r;
954
- if (n) {
955
- if (r?.nodeType !== 3) {
956
- var a = dr();
957
- return r === null ? i?.after(a) : r.before(a), D(a), a;
958
- }
959
- xr(r);
960
- }
961
- return D(r), r;
962
- }
963
- function vr(e) {
964
- e.textContent = "";
965
- }
966
- function yr() {
967
- return !1;
968
- }
969
- function br(e, t, n) {
970
- 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);
971
- }
972
- function xr(e) {
973
- if (e.nodeValue.length < 65536) return;
974
- let t = e.nextSibling;
975
- for (; t !== null && t.nodeType === 3;) t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
976
- }
977
- function Sr(e) {
978
- var t = H;
979
- if (t === null) return V.f |= Ue, e;
980
- if (!(t.f & 32768) && !(t.f & 4)) throw e;
981
- Cr(e, t);
982
- }
983
- function Cr(e, t) {
984
- if (!(t !== null && t.f & 16384)) {
985
- for (; t !== null;) {
986
- if (t.f & 128 && !(t.f & 33570816)) {
987
- if (!(t.f & 32768)) throw e;
988
- try {
989
- t.b.error(e);
990
- return;
991
- } catch (t) {
992
- e = t;
993
- }
994
- }
995
- t = t.parent;
996
- }
997
- throw e;
998
- }
999
- }
1000
- //#endregion
1001
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/effects.js
1002
- function wr(e) {
1003
- H === null && (V === null && xt(e), bt()), Xr && yt(e);
1004
- }
1005
- function Tr(e, t) {
1006
- var n = t.last;
1007
- n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
1008
- }
1009
- function Er(e, t) {
1010
- var n = H;
1011
- n !== null && n.f & 8192 && (e |= Ne);
1012
- var r = {
1013
- ctx: O,
1014
- deps: null,
1015
- nodes: null,
1016
- f: e | je | 512,
1017
- first: null,
1018
- fn: t,
1019
- last: null,
1020
- next: null,
1021
- parent: n,
1022
- b: n && n.b,
1023
- prev: null,
1024
- teardown: null,
1025
- wv: 0,
1026
- ac: null
1027
- };
1028
- F?.register_created_effect(r);
1029
- var i = r;
1030
- if (e & 4) fn === null ? jn.ensure().schedule(r) : fn.push(r);
1031
- else if (t !== null) {
1032
- try {
1033
- vi(r);
1034
- } catch (e) {
1035
- throw B(r), e;
1036
- }
1037
- 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 |= Le));
1038
- }
1039
- if (i !== null && (i.parent = n, n !== null && Tr(i, n), V !== null && V.f & 2 && !(e & 64))) {
1040
- var a = V;
1041
- (a.effects ?? (a.effects = [])).push(i);
1042
- }
1043
- return r;
1044
- }
1045
- function Dr() {
1046
- return V !== null && !Qr;
1047
- }
1048
- function Or(e) {
1049
- let t = Er(8, null);
1050
- return k(t, Ae), t.teardown = e, t;
1051
- }
1052
- function kr(e) {
1053
- wr("$effect");
1054
- var t = H.f;
1055
- if (!V && t & 32 && O !== null && !O.i) {
1056
- var n = O;
1057
- (n.e ?? (n.e = [])).push(e);
1058
- } else return Ar(e);
1059
- }
1060
- function Ar(e) {
1061
- return Er(4 | ze, e);
1062
- }
1063
- function jr(e) {
1064
- jn.ensure();
1065
- let t = Er(64 | Re, e);
1066
- return (e = {}) => new Promise((n) => {
1067
- e.outro ? Ur(t, () => {
1068
- B(t), n(void 0);
1069
- }) : (B(t), n(void 0));
1070
- });
1071
- }
1072
- function Mr(e) {
1073
- return Er(4, e);
1074
- }
1075
- function Nr(e) {
1076
- return Er(He | Re, e);
1077
- }
1078
- function Pr(e, t = 0) {
1079
- return Er(8 | t, e);
1080
- }
1081
- function z(e, t = [], n = [], r = []) {
1082
- Ut(r, t, n, (t) => {
1083
- Er(8, () => {
1084
- e(...t.map(U));
1085
- });
1086
- });
1087
- }
1088
- function Fr(e, t = 0) {
1089
- return Er(16 | t, e);
1090
- }
1091
- function Ir(e, t = 0) {
1092
- return Er(ke | t, e);
1093
- }
1094
- function Lr(e) {
1095
- return Er(32 | Re, e);
1096
- }
1097
- function Rr(e) {
1098
- var t = e.teardown;
1099
- if (t !== null) {
1100
- let n = Xr, r = V;
1101
- Zr(!0), $r(null);
1102
- try {
1103
- t.call(null);
1104
- } catch (t) {
1105
- Cr(t, e.parent);
1106
- } finally {
1107
- Zr(n), $r(r);
1108
- }
1109
- }
1110
- }
1111
- function zr(e, t = !1) {
1112
- var n = e.first;
1113
- for (e.first = e.last = null; n !== null;) {
1114
- let e = n.ac;
1115
- e !== null && Ht(() => {
1116
- e.abort($e);
1117
- });
1118
- var r = n.next;
1119
- n.f & 64 ? n.parent = null : B(n, t), n = r;
1120
- }
1121
- }
1122
- function Br(e) {
1123
- for (var t = e.first; t !== null;) {
1124
- var n = t.next;
1125
- t.f & 32 || B(t), t = n;
1126
- }
1127
- }
1128
- function B(e, t = !0) {
1129
- var n = !1;
1130
- (t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (Vr(e.nodes.start, e.nodes.end), n = !0), e.f |= Ie, zr(e, t && !n), _i(e, 0);
1131
- var r = e.nodes && e.nodes.t;
1132
- if (r !== null) for (let e of r) e.stop();
1133
- Rr(e), e.f ^= Ie, e.f |= Pe;
1134
- var i = e.parent;
1135
- i !== null && i.first !== null && Hr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1136
- }
1137
- function Vr(e, t) {
1138
- for (; e !== null;) {
1139
- var n = e === t ? null : /* @__PURE__ */ pr(e);
1140
- e.remove(), e = n;
1141
- }
1142
- }
1143
- function Hr(e) {
1144
- var t = e.parent, n = e.prev, r = e.next;
1145
- n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1146
- }
1147
- function Ur(e, t, n = !0) {
1148
- var r = [];
1149
- e.f |= 256, Wr(e, r, !0);
1150
- var i = () => {
1151
- n && B(e), t && t();
1152
- }, a = r.length;
1153
- if (a > 0) {
1154
- var o = () => --a || i();
1155
- for (var s of r) s.out(o);
1156
- } else i();
1157
- }
1158
- function Wr(e, t, n) {
1159
- if (!(e.f & 8192)) {
1160
- e.f ^= Ne;
1161
- var r = e.nodes && e.nodes.t;
1162
- if (r !== null) for (let e of r) (e.is_global || n) && t.push(e);
1163
- for (var i = e.first; i !== null;) {
1164
- var a = i.next;
1165
- if (!(i.f & 64)) {
1166
- var o = !!(i.f & 65536) || !!(i.f & 32) && !!(e.f & 16);
1167
- Wr(i, t, o ? n : !1);
1168
- }
1169
- i = a;
1170
- }
1171
- }
1172
- }
1173
- function Gr(e) {
1174
- e.f &= -257, Kr(e, !0);
1175
- }
1176
- function Kr(e, t) {
1177
- if (!(e.f & 256) && e.f & 8192) {
1178
- e.f ^= Ne, e.f & 1024 || (k(e, je), jn.ensure().schedule(e));
1179
- for (var n = e.first; n !== null;) {
1180
- var r = n.next, i = !!(n.f & 65536) || !!(n.f & 32);
1181
- Kr(n, i ? t : !1), n = r;
1182
- }
1183
- var a = e.nodes && e.nodes.t;
1184
- if (a !== null) for (let e of a) (e.is_global || t) && e.in();
1185
- }
1186
- }
1187
- function qr(e, t) {
1188
- if (e.nodes) for (var n = e.nodes.start, r = e.nodes.end; n !== null;) {
1189
- var i = n === r ? null : /* @__PURE__ */ pr(n);
1190
- t.append(n), n = i;
1191
- }
1192
- }
1193
- //#endregion
1194
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/legacy.js
1195
- var Jr = null, Yr = !1, Xr = !1;
1196
- function Zr(e) {
1197
- Xr = e;
1198
- }
1199
- var V = null, Qr = !1;
1200
- function $r(e) {
1201
- V = e;
1202
- }
1203
- var H = null;
1204
- function ei(e) {
1205
- H = e;
1206
- }
1207
- var ti = null;
1208
- function ni(e) {
1209
- V !== null && (V.f & 2097152 || V.f & 2) && (ti ?? (ti = /* @__PURE__ */ new Set())).add(e);
1210
- }
1211
- var ri = null, ii = 0, ai = null;
1212
- function oi(e) {
1213
- ai = e;
1214
- }
1215
- var si = 1, ci = 0, li = ci;
1216
- function ui(e) {
1217
- li = e;
1218
- }
1219
- function di() {
1220
- return ++si;
1221
- }
1222
- function fi(e) {
1223
- var t = e.f;
1224
- if (t & 2048) return !0;
1225
- if (t & 4096) {
1226
- for (var n = e.deps, r = n.length, i = 0; i < r; i++) {
1227
- var a = n[i];
1228
- if (fi(a) && $t(a), a.wv > e.wv) return !0;
1229
- }
1230
- t & 512 && cn === null && k(e, Ae);
1231
- }
1232
- return !1;
1233
- }
1234
- function pi(e, t, n = !0) {
1235
- var r = e.reactions;
1236
- if (r !== null && !(ti !== null && ti.has(e))) for (var i = 0; i < r.length; i++) {
1237
- var a = r[i];
1238
- a.f & 2 ? pi(a, t, !1) : t === a && (n ? k(a, je) : a.f & 1024 && k(a, Me), Un(a));
1239
- }
1240
- }
1241
- function mi(e) {
1242
- var t = ri, n = ii, r = ai, i = V, a = ti, o = O, s = Qr, c = li, l = e.f;
1243
- ri = null, ii = 0, ai = null, V = l & 96 ? null : e, ti = null, Ot(e.ctx), Qr = !1, li = ++ci, e.ac !== null && (Ht(() => {
1244
- e.ac.abort($e);
1245
- }), e.ac = null);
1246
- try {
1247
- e.f |= Ve;
1248
- var u = e.fn, d = u();
1249
- e.f |= Fe;
1250
- var f = hi(e);
1251
- if (Mt() && ai !== null && !Qr && f !== null && !(e.f & 6146)) for (var p = 0; p < ai.length; p++) pi(ai[p], e);
1252
- if (i !== null && i !== e) {
1253
- if (ci++, i.deps !== null) for (let e = 0; e < n; e += 1) i.deps[e].rv = ci;
1254
- if (t !== null) for (let e of t) e.rv = ci;
1255
- ai !== null && (r === null ? r = ai : r.push(...ai));
1256
- }
1257
- return e.f & 8388608 && (e.f ^= Ue), d;
1258
- } catch (t) {
1259
- return hi(e), Sr(t);
1260
- } finally {
1261
- e.f ^= Ve, ri = t, ii = n, ai = r, V = i, ti = a, Ot(o), Qr = s, li = c;
1262
- }
1263
- }
1264
- function hi(e) {
1265
- var t = e.deps, n = F?.is_fork;
1266
- if (ri !== null) {
1267
- var r;
1268
- if (n || _i(e, ii), t !== null && ii > 0) for (t.length = ii + ri.length, r = 0; r < ri.length; r++) t[ii + r] = ri[r];
1269
- else e.deps = t = ri;
1270
- if (Dr() && e.f & 512) for (r = ii; r < t.length; r++) {
1271
- var i;
1272
- ((i = t[r]).reactions ?? (i.reactions = [])).push(e);
1273
- }
1274
- } else !n && t !== null && ii < t.length && (_i(e, ii), t.length = ii);
1275
- return t;
1276
- }
1277
- function gi(e, t) {
1278
- let n = t.reactions;
1279
- if (n !== null) {
1280
- var r = fe.call(n, e);
1281
- if (r !== -1) {
1282
- var i = n.length - 1;
1283
- i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
1284
- }
1285
- }
1286
- if (n === null && t.f & 2 && (ri === null || !pe.call(ri, t))) {
1287
- var a = t;
1288
- a.f & 512 && (a.f ^= 512), a.v !== w && Lt(a), a.ac !== null && Ht(() => {
1289
- a.ac.abort($e), a.ac = null, k(a, je);
1290
- }), en(a), _i(a, 0);
1291
- }
1292
- }
1293
- function _i(e, t) {
1294
- var n = e.deps;
1295
- if (n !== null) for (var r = t; r < n.length; r++) gi(e, n[r]);
1296
- }
1297
- function vi(e) {
1298
- var t = e.f;
1299
- if (!(t & 16384)) {
1300
- k(e, Ae);
1301
- var n = H, r = Yr;
1302
- H = e, Yr = !(t & 96);
1303
- try {
1304
- t & 16777232 ? Br(e) : zr(e), Rr(e);
1305
- var i = mi(e);
1306
- e.teardown = typeof i == "function" ? i : null, e.wv = si;
1307
- } finally {
1308
- Yr = r, H = n;
1309
- }
1310
- }
1311
- }
1312
- function U(e) {
1313
- var t = !!(e.f & 2);
1314
- if (Jr?.add(e), V !== null && !Qr && !(H !== null && H.f & 16384) && (ti === null || !ti.has(e))) {
1315
- var n = V.deps;
1316
- if (V.f & 2097152) e.rv < ci && (e.rv = ci, ri === null && n !== null && n[ii] === e ? ii++ : ri === null ? ri = [e] : ri.push(e));
1317
- else {
1318
- var r;
1319
- (r = V).deps ?? (r.deps = []), pe.call(V.deps, e) || V.deps.push(e);
1320
- var i = e.reactions;
1321
- i === null ? e.reactions = [V] : pe.call(i, V) || i.push(V);
1322
- }
1323
- }
1324
- if (Xr && qn.has(e)) return qn.get(e);
1325
- if (t) {
1326
- var a = e;
1327
- if (Xr) {
1328
- var o = a.v;
1329
- return (!(a.f & 1024) && a.reactions !== null || bi(a)) && (o = Qt(a)), qn.set(a, o), o;
1330
- }
1331
- var s = !(a.f & 512) && !Qr && V !== null && (Yr || !!(V.f & 512)), c = (a.f & Fe) === 0;
1332
- fi(a) && (s && (a.f |= 512), $t(a)), s && !c && (tn(a), yi(a));
1333
- }
1334
- if (cn?.has(e)) return cn.get(e);
1335
- if (e.f & 8388608) throw e.v;
1336
- return e.v;
1337
- }
1338
- function yi(e) {
1339
- if (e.f |= 512, e.deps !== null) for (let t of e.deps) (t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (tn(t), yi(t));
1340
- }
1341
- function bi(e) {
1342
- if (e.v === w) return !0;
1343
- if (e.deps === null) return !1;
1344
- for (let t of e.deps) if (qn.has(t) || t.f & 2 && bi(t)) return !0;
1345
- return !1;
1346
- }
1347
- function xi(e) {
1348
- var t = Qr;
1349
- try {
1350
- return Qr = !0, e();
1351
- } finally {
1352
- Qr = t;
1353
- }
1354
- }
1355
- function Si(e) {
1356
- if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
1357
- if (We in e) Ci(e);
1358
- else if (!Array.isArray(e)) for (let t in e) {
1359
- let n = e[t];
1360
- typeof n == "object" && n && We in n && Ci(n);
1361
- }
1362
- }
1363
- }
1364
- function Ci(e, t = /* @__PURE__ */ new Set()) {
1365
- if (typeof e == "object" && e && !(e instanceof EventTarget) && !t.has(e)) {
1366
- t.add(e), e instanceof Date && e.getTime();
1367
- for (let n in e) try {
1368
- Ci(e[n], t);
1369
- } catch {}
1370
- let n = be(e);
1371
- if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
1372
- let t = _e(n);
1373
- for (let n in t) {
1374
- let r = t[n].get;
1375
- if (r) try {
1376
- r.call(e);
1377
- } catch {}
1378
- }
1379
- }
1380
- }
1381
- }
1382
- function wi(e) {
1383
- return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
1384
- }
1385
- var Ti = [
1386
- "beforeinput",
1387
- "click",
1388
- "change",
1389
- "dblclick",
1390
- "contextmenu",
1391
- "focusin",
1392
- "focusout",
1393
- "input",
1394
- "keydown",
1395
- "keyup",
1396
- "mousedown",
1397
- "mousemove",
1398
- "mouseout",
1399
- "mouseover",
1400
- "mouseup",
1401
- "pointerdown",
1402
- "pointermove",
1403
- "pointerout",
1404
- "pointerover",
1405
- "pointerup",
1406
- "touchend",
1407
- "touchmove",
1408
- "touchstart"
1409
- ];
1410
- function Ei(e) {
1411
- return Ti.includes(e);
1412
- }
1413
- var Di = /* @__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("."), Oi = {
1414
- formnovalidate: "formNoValidate",
1415
- ismap: "isMap",
1416
- nomodule: "noModule",
1417
- playsinline: "playsInline",
1418
- readonly: "readOnly",
1419
- defaultvalue: "defaultValue",
1420
- defaultchecked: "defaultChecked",
1421
- srcobject: "srcObject",
1422
- novalidate: "noValidate",
1423
- allowfullscreen: "allowFullscreen",
1424
- disablepictureinpicture: "disablePictureInPicture",
1425
- disableremoteplayback: "disableRemotePlayback"
1426
- };
1427
- function ki(e) {
1428
- return e = e.toLowerCase(), Oi[e] ?? e;
1429
- }
1430
- [...Di];
1431
- var Ai = ["touchstart", "touchmove"];
1432
- function ji(e) {
1433
- return Ai.includes(e);
1434
- }
1435
- var Mi = [
1436
- "textarea",
1437
- "script",
1438
- "style",
1439
- "title"
1440
- ];
1441
- function Ni(e) {
1442
- return Mi.includes(e);
1443
- }
1444
- //#endregion
1445
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dev/css.js
1446
- var Pi = Symbol("events"), Fi = /* @__PURE__ */ new Set(), Ii = /* @__PURE__ */ new Set();
1447
- function Li(e, t, n, r = {}) {
1448
- function i(e) {
1449
- if (r.capture || Ui.call(t, e), !e.cancelBubble) return Ht(() => n?.call(this, e));
1450
- }
1451
- return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? (i.__removed = !1, Ft(() => {
1452
- i.__removed || t.addEventListener(e, i, r);
1453
- })) : t.addEventListener(e, i, r), i;
1454
- }
1455
- function Ri(e, t, n, r, i) {
1456
- var a = {
1457
- capture: r,
1458
- passive: i
1459
- }, o = Li(e, t, n, a);
1460
- (t === document.body || t === window || t === document || t instanceof HTMLMediaElement) && Or(() => {
1461
- o.__removed = !0, t.removeEventListener(e, o, a);
1462
- });
1463
- }
1464
- function zi(e, t, n) {
1465
- (t[Pi] ?? (t[Pi] = {}))[e] = n;
1466
- }
1467
- function Bi(e) {
1468
- for (var t = 0; t < e.length; t++) Fi.add(e[t]);
1469
- for (var n of Ii) n(e);
1470
- }
1471
- var Vi = null, Hi = !1;
1472
- function Ui(e) {
1473
- var t = this, n = t.ownerDocument, r = e.type, i = e.composedPath?.() || [], a = i[0] || e.target;
1474
- Vi = e, Hi || (Hi = !0, setTimeout(() => {
1475
- Hi = !1, Vi = null;
1476
- }));
1477
- var o = 0, s = Vi === e && e[Pi];
1478
- if (s) {
1479
- var c = i.indexOf(s);
1480
- if (c !== -1 && (t === document || t === window)) {
1481
- e[Pi] = t;
1482
- return;
1483
- }
1484
- var l = i.indexOf(t);
1485
- if (l === -1) return;
1486
- c <= l && (o = c);
1487
- }
1488
- if (a = i[o] || e.target, a !== t) {
1489
- he(e, "currentTarget", {
1490
- configurable: !0,
1491
- get() {
1492
- return a || n;
1493
- }
1494
- });
1495
- var u = V, d = H;
1496
- $r(null), ei(null);
1497
- try {
1498
- for (var f, p = []; a !== null && a !== t;) {
1499
- try {
1500
- var m = a[Pi]?.[r];
1501
- m != null && (!a.disabled || e.target === a) && m.call(a, e);
1502
- } catch (e) {
1503
- f ? p.push(e) : f = e;
1504
- }
1505
- if (e.cancelBubble) break;
1506
- o++, a = o < i.length ? i[o] : null;
1507
- }
1508
- if (f) {
1509
- for (let e of p) queueMicrotask(() => {
1510
- throw e;
1511
- });
1512
- throw f;
1513
- }
1514
- } finally {
1515
- e[Pi] = t, delete e.currentTarget, $r(u), ei(d);
1516
- }
1517
- }
1518
- }
1519
- //#endregion
1520
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/reconciler.js
1521
- var Wi = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1522
- function Gi(e) {
1523
- return Wi?.createHTML(e) ?? e;
1524
- }
1525
- function Ki(e) {
1526
- var t = br("template");
1527
- return t.innerHTML = Gi(e.replaceAll("<!>", "<!---->")), t.content;
1528
- }
1529
- //#endregion
1530
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/template.js
1531
- function qi(e, t) {
1532
- var n = H;
1533
- n.nodes === null && (n.nodes = {
1534
- start: e,
1535
- end: t,
1536
- a: null,
1537
- t: null
1538
- });
1539
- }
1540
- /*#__NO_SIDE_EFFECTS__*/
1541
- function W(e, t) {
1542
- var n = !!(t & 1), r = !!(t & 2), i, a = !e.startsWith("<!>");
1543
- return () => {
1544
- if (T) return qi(E, null), E;
1545
- i === void 0 && (i = Ki(a ? e : "<!>" + e), n || (i = /* @__PURE__ */ fr(i)));
1546
- var t = r || sr ? document.importNode(i, !0) : i.cloneNode(!0);
1547
- if (n) {
1548
- var o = /* @__PURE__ */ fr(t), s = t.lastChild;
1549
- qi(o, s);
1550
- } else qi(t, t);
1551
- return t;
1552
- };
1553
- }
1554
- function Ji(e = "") {
1555
- if (!T) {
1556
- var t = dr(e + "");
1557
- return qi(t, t), t;
1558
- }
1559
- var n = E;
1560
- return n.nodeType === 3 ? xr(n) : (n.before(n = dr()), D(n)), qi(n, n), n;
1561
- }
1562
- function Yi() {
1563
- if (T) return qi(E, null), E;
1564
- var e = document.createDocumentFragment(), t = document.createComment(""), n = dr();
1565
- return e.append(t, n), qi(t, n), e;
1566
- }
1567
- function G(e, t) {
1568
- if (T) {
1569
- var n = H;
1570
- (!(n.f & 32768) || n.nodes.end === null) && (n.nodes.end = E), lt();
1571
- } else e !== null && e.before(t);
1572
- }
1573
- function Xi() {
1574
- var e, t;
1575
- if (T && E && E.nodeType === 8 && E.textContent?.startsWith("$")) {
1576
- let e = E.textContent.substring(1);
1577
- return lt(), e;
1578
- }
1579
- return (e = (t = window).__svelte ?? (t.__svelte = {})).uid ?? (e.uid = 1), `c${window.__svelte.uid++}`;
1580
- }
1581
- //#endregion
1582
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/reactivity/create-subscriber.js
1583
- function Zi(e) {
1584
- let t = 0, n = Yn(0), r;
1585
- return () => {
1586
- Dr() && (U(n), Pr(() => (t === 0 && (r = xi(() => e(() => tr(n)))), t += 1, () => {
1587
- Ft(() => {
1588
- --t, t === 0 && (r?.(), r = void 0, tr(n));
1589
- });
1590
- })));
1591
- };
1592
- }
1593
- //#endregion
1594
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1595
- var Qi = Le | Re;
1596
- function $i(e, t, n, r) {
1597
- new ga(e, t, n, r);
1598
- }
1599
- var ea = /* @__PURE__ */ new WeakMap(), ta = /* @__PURE__ */ new WeakMap(), na = /* @__PURE__ */ new WeakMap(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = /* @__PURE__ */ new WeakMap(), oa = /* @__PURE__ */ new WeakMap(), sa = /* @__PURE__ */ new WeakMap(), ca = /* @__PURE__ */ new WeakMap(), la = /* @__PURE__ */ new WeakMap(), ua = /* @__PURE__ */ new WeakMap(), da = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), pa = /* @__PURE__ */ new WeakMap(), ma = /* @__PURE__ */ new WeakMap(), ha = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakSet(), ga = class {
1600
- constructor(e, t, n, r) {
1601
- rn(this, K), Oe(this, "parent", void 0), Oe(this, "is_pending", !1), Oe(this, "transform_error", void 0), j(this, ea, void 0), j(this, ta, T ? E : null), j(this, na, void 0), j(this, ra, void 0), j(this, ia, void 0), j(this, aa, null), j(this, oa, null), j(this, sa, null), j(this, ca, null), j(this, la, 0), j(this, ua, 0), j(this, da, !1), j(this, fa, /* @__PURE__ */ new Set()), j(this, pa, /* @__PURE__ */ new Set()), j(this, ma, null), j(this, ha, Zi(() => (N(ma, this, Yn(P(la, this))), () => {
1602
- N(ma, this, null);
1603
- }))), N(ea, this, e), N(na, this, t), N(ra, this, (e) => {
1604
- var t = H;
1605
- t.b = this, t.f |= 128, n(e);
1606
- }), this.parent = H.b, this.transform_error = r ?? this.parent?.transform_error ?? ((e) => e), N(ia, this, Fr(() => {
1607
- if (T) {
1608
- let e = P(ta, this);
1609
- lt();
1610
- let t = e.data === "[!";
1611
- if (e.data.startsWith("[?")) {
1612
- let t = JSON.parse(e.data.slice(2));
1613
- M(K, this, va).call(this, t);
1614
- } else t ? M(K, this, ba).call(this) : M(K, this, _a).call(this);
1615
- } else M(K, this, xa).call(this);
1616
- }, Qi)), T && N(ea, this, E);
1617
- }
1618
- defer_effect(e) {
1619
- Rt(e, P(fa, this), P(pa, this));
1620
- }
1621
- is_rendered() {
1622
- return !this.is_pending && (!this.parent || this.parent.is_rendered());
1623
- }
1624
- has_pending_snippet() {
1625
- return !!P(na, this).pending;
1626
- }
1627
- update_pending_count(e, t) {
1628
- M(K, this, wa).call(this, e, t), N(la, this, P(la, this) + e), P(ma, this) && !P(da, this) && (N(da, this, !0), Ft(() => {
1629
- N(da, this, !1), P(ma, this) && $n(P(ma, this), P(la, this));
1630
- }));
1631
- }
1632
- get_effect_pending() {
1633
- return P(ha, this).call(this), U(P(ma, this));
1634
- }
1635
- error(e) {
1636
- if (!P(na, this).onerror && !P(na, this).failed) throw e;
1637
- F?.is_fork ? (P(aa, this) && F.skip_effect(P(aa, this)), P(oa, this) && F.skip_effect(P(oa, this)), P(sa, this) && F.skip_effect(P(sa, this)), F.oncommit(() => {
1638
- M(K, this, Ta).call(this, e);
1639
- })) : M(K, this, Ta).call(this, e);
1640
- }
1641
- };
1642
- function _a() {
1643
- try {
1644
- N(aa, this, Lr(() => P(ra, this).call(this, P(ea, this))));
1645
- } catch (e) {
1646
- this.error(e);
1647
- }
1648
- }
1649
- function va(e) {
1650
- let t = P(na, this).failed, { reset: n, invoke_onerror: r } = M(K, this, ya).call(this, e);
1651
- Ft(r), t && N(sa, this, Lr(() => {
1652
- t(P(ea, this), () => e, () => n);
1653
- }));
1654
- }
1655
- function ya(e) {
1656
- var t = !1, n = !1;
1657
- let r = () => {
1658
- t ? st() : (t = !0, n && Dt(), P(sa, this) !== null && Ur(P(sa, this), () => {
1659
- N(sa, this, null);
1660
- }), M(K, this, Ca).call(this, () => {
1661
- M(K, this, xa).call(this);
1662
- }));
1663
- };
1664
- return {
1665
- reset: r,
1666
- invoke_onerror: () => {
1667
- try {
1668
- n = !0, P(na, this).onerror?.(e, r), n = !1;
1669
- } catch (e) {
1670
- Cr(e, P(ia, this) && P(ia, this).parent);
1671
- }
1672
- }
1673
- };
1674
- }
1675
- function ba() {
1676
- let e = P(na, this).pending;
1677
- e && (this.is_pending = !0, N(oa, this, Lr(() => e(P(ea, this)))), Ft(() => {
1678
- var e = N(ca, this, document.createDocumentFragment()), t = dr(), n = !1;
1679
- e.append(t), N(aa, this, M(K, this, Ca).call(this, () => {
1680
- try {
1681
- return Lr(() => P(ra, this).call(this, t));
1682
- } catch (e) {
1683
- try {
1684
- this.error(e), n = !0;
1685
- } catch (e) {
1686
- Cr(e, P(ia, this).parent);
1687
- }
1688
- return null;
1689
- }
1690
- })), P(aa, this) === null ? (N(ca, this, null), n && M(K, this, Sa).call(this, F)) : P(ua, this) === 0 && (P(ea, this).before(e), N(ca, this, null), Ur(P(oa, this), () => {
1691
- N(oa, this, null);
1692
- }), M(K, this, Sa).call(this, F));
1693
- }));
1694
- }
1695
- function xa() {
1696
- try {
1697
- if (this.is_pending = this.has_pending_snippet(), N(ua, this, 0), N(la, this, 0), N(aa, this, Lr(() => {
1698
- P(ra, this).call(this, P(ea, this));
1699
- })), P(ua, this) > 0) {
1700
- var e = N(ca, this, document.createDocumentFragment());
1701
- qr(P(aa, this), e);
1702
- let t = P(na, this).pending;
1703
- N(oa, this, Lr(() => t(P(ea, this))));
1704
- } else M(K, this, Sa).call(this, F);
1705
- } catch (e) {
1706
- this.error(e);
1707
- }
1708
- }
1709
- function Sa(e) {
1710
- this.is_pending = !1, e.transfer_effects(P(fa, this), P(pa, this));
1711
- }
1712
- function Ca(e) {
1713
- var t = H, n = V, r = O;
1714
- ei(P(ia, this)), $r(P(ia, this)), Ot(P(ia, this).ctx);
1715
- try {
1716
- return jn.ensure(), e();
1717
- } finally {
1718
- ei(t), $r(n), Ot(r);
1719
- }
1720
- }
1721
- function wa(e, t) {
1722
- if (this.has_pending_snippet()) N(ua, this, P(ua, this) + e), P(ua, this) === 0 && (M(K, this, Sa).call(this, t), P(oa, this) && Ur(P(oa, this), () => {
1723
- N(oa, this, null);
1724
- }), P(ca, this) && (P(ea, this).before(P(ca, this)), N(ca, this, null)));
1725
- else if (this.parent) {
1726
- var n;
1727
- M(K, n = this.parent, wa).call(n, e, t);
1728
- }
1729
- }
1730
- function Ta(e) {
1731
- P(aa, this) && (B(P(aa, this)), N(aa, this, null)), P(oa, this) && (B(P(oa, this)), N(oa, this, null)), P(sa, this) && (B(P(sa, this)), N(sa, this, null)), T && (D(P(ta, this)), dt(), D(ft()));
1732
- let t = P(na, this).failed, n = (e) => {
1733
- let { reset: n, invoke_onerror: r } = M(K, this, ya).call(this, e);
1734
- r(), t && N(sa, this, M(K, this, Ca).call(this, () => {
1735
- try {
1736
- return Lr(() => {
1737
- var r = H;
1738
- r.b = this, r.f |= 128, t(P(ea, this), () => e, () => n);
1739
- });
1740
- } catch (e) {
1741
- return Cr(e, P(ia, this).parent), null;
1742
- }
1743
- }));
1744
- };
1745
- Ft(() => {
1746
- var t;
1747
- try {
1748
- t = this.transform_error(e);
1749
- } catch (e) {
1750
- Cr(e, P(ia, this) && P(ia, this).parent);
1751
- return;
1752
- }
1753
- typeof t == "object" && t && typeof t.then == "function" ? t.then(n, (e) => Cr(e, P(ia, this) && P(ia, this).parent)) : n(t);
1754
- });
1755
- }
1756
- function q(e, t) {
1757
- var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
1758
- n !== (e[Ze] ?? (e[Ze] = e.nodeValue)) && (e[Ze] = n, e.nodeValue = `${n}`);
1759
- }
1760
- function Ea(e, t) {
1761
- return Oa(e, t);
1762
- }
1763
- var Da = /* @__PURE__ */ new Map();
1764
- function Oa(e, { target: t, anchor: n, props: r = {}, events: i, context: a, intro: o = !0, transformError: s }) {
1765
- ur();
1766
- var c = void 0, l = jr(() => {
1767
- var o = n ?? t.appendChild(dr());
1768
- $i(o, { pending: () => {} }, (t) => {
1769
- kt({});
1770
- var n = O;
1771
- if (a && (n.c = a), i && (r.$$events = i), T && qi(t, null), c = e(t, r) || jt(), T && (H.nodes.end = E, E === null || E.nodeType !== 8 || E.data !== "]")) throw at(), tt;
1772
- At();
1773
- }, s);
1774
- var l = /* @__PURE__ */ new Set(), u = (e) => {
1775
- for (var n = 0; n < e.length; n++) {
1776
- var r = e[n];
1777
- if (!l.has(r)) {
1778
- l.add(r);
1779
- var i = ji(r);
1780
- for (let e of [t, document]) {
1781
- var a = Da.get(e);
1782
- a === void 0 && (a = /* @__PURE__ */ new Map(), Da.set(e, a));
1783
- var o = a.get(r);
1784
- o === void 0 ? (e.addEventListener(r, Ui, { passive: i }), a.set(r, 1)) : a.set(r, o + 1);
1785
- }
1786
- }
1787
- }
1788
- };
1789
- return u(me(Fi)), Ii.add(u), () => {
1790
- for (var e of l) for (let n of [t, document]) {
1791
- var r = Da.get(n), i = r.get(e);
1792
- --i == 0 ? (n.removeEventListener(e, Ui), r.delete(e), r.size === 0 && Da.delete(n)) : r.set(e, i);
1793
- }
1794
- Ii.delete(u), o !== n && o.parentNode?.removeChild(o);
1795
- };
1796
- });
1797
- return ka.set(c, l), c;
1798
- }
1799
- var ka = /* @__PURE__ */ new WeakMap();
1800
- function Aa(e, t) {
1801
- let n = ka.get(e);
1802
- return n ? (ka.delete(e), n(t)) : Promise.resolve();
1803
- }
1804
- //#endregion
1805
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/branches.js
1806
- var ja = /* @__PURE__ */ new WeakMap(), Ma = /* @__PURE__ */ new WeakMap(), Na = /* @__PURE__ */ new WeakMap(), Pa = /* @__PURE__ */ new WeakMap(), Fa = /* @__PURE__ */ new WeakMap(), Ia = /* @__PURE__ */ new WeakMap(), La = /* @__PURE__ */ new WeakMap(), Ra = class {
1807
- constructor(e, t = !0) {
1808
- Oe(this, "anchor", void 0), j(this, ja, /* @__PURE__ */ new Map()), j(this, Ma, /* @__PURE__ */ new Map()), j(this, Na, /* @__PURE__ */ new Map()), j(this, Pa, /* @__PURE__ */ new Set()), j(this, Fa, !0), j(this, Ia, (e) => {
1809
- if (P(ja, this).has(e)) {
1810
- var t = P(ja, this).get(e), n = P(Ma, this).get(t);
1811
- if (n) Gr(n), P(Pa, this).delete(t);
1812
- else {
1813
- var r = P(Na, this).get(t);
1814
- r && (Gr(r.effect), P(Ma, this).set(t, r.effect), P(Na, this).delete(t), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
1815
- }
1816
- for (let [t, n] of P(ja, this)) {
1817
- if (P(ja, this).delete(t), t === e) break;
1818
- let r = P(Na, this).get(n);
1819
- r && (B(r.effect), P(Na, this).delete(n));
1820
- }
1821
- for (let [e, r] of P(Ma, this)) {
1822
- if (e === t || P(Pa, this).has(e)) continue;
1823
- let i = () => {
1824
- if (Array.from(P(ja, this).values()).includes(e)) {
1825
- var t = document.createDocumentFragment();
1826
- qr(r, t), t.append(dr()), P(Na, this).set(e, {
1827
- effect: r,
1828
- fragment: t
1829
- });
1830
- } else B(r);
1831
- P(Pa, this).delete(e), P(Ma, this).delete(e);
1832
- };
1833
- P(Fa, this) || !n ? (P(Pa, this).add(e), Ur(r, i, !1)) : i();
1834
- }
1835
- }
1836
- }), j(this, La, (e) => {
1837
- P(ja, this).delete(e);
1838
- let t = Array.from(P(ja, this).values());
1839
- for (let [e, n] of P(Na, this)) t.includes(e) || (B(n.effect), P(Na, this).delete(e));
1840
- }), this.anchor = e, N(Fa, this, t);
1841
- }
1842
- ensure(e, t) {
1843
- var n = F, r = yr();
1844
- if (t && !P(Ma, this).has(e) && !P(Na, this).has(e)) {
1845
- if (r) {
1846
- var i = document.createDocumentFragment(), a = dr();
1847
- i.append(a), P(Na, this).set(e, {
1848
- effect: Lr(() => t(a)),
1849
- fragment: i
1850
- });
1851
- } else P(Ma, this).set(e, Lr(() => t(this.anchor)));
1852
- }
1853
- if (P(ja, this).set(n, e), r) {
1854
- for (let [t, r] of P(Ma, this)) t === e ? n.unskip_effect(r) : n.skip_effect(r);
1855
- for (let [t, r] of P(Na, this)) t === e ? n.unskip_effect(r.effect) : n.skip_effect(r.effect);
1856
- n.oncommit(P(Ia, this)), n.ondiscard(P(La, this));
1857
- } else T && (this.anchor = E), P(Ia, this).call(this, n);
1858
- }
1859
- };
1860
- //#endregion
1861
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/if.js
1862
- function za(e, t, n = !1) {
1863
- var r;
1864
- T && (r = E, lt());
1865
- var i = new Ra(e), a = n ? Le : 0;
1866
- function o(e, t) {
1867
- if (T) {
1868
- var n = pt(r);
1869
- if (e !== parseInt(n.substring(1))) {
1870
- var a = ft();
1871
- D(a), i.anchor = a, ct(!1), i.ensure(e, t), ct(!0);
1872
- return;
1873
- }
1874
- }
1875
- i.ensure(e, t);
1876
- }
1877
- Fr(() => {
1878
- var e = !1;
1879
- t((t, n = 0) => {
1880
- e = !0, o(n, t);
1881
- }), e || o(-1, null);
1882
- }, a);
1883
- }
1884
- //#endregion
1885
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/each.js
1886
- function Ba(e, t) {
1887
- return t;
1888
- }
1889
- function Va(e, t, n) {
1890
- for (var r = [], i = t.length, a, o = t.length, s = 0; s < i; s++) {
1891
- let n = t[s];
1892
- Ur(n, () => {
1893
- if (a) {
1894
- if (a.pending.delete(n), a.done.add(n), a.pending.size === 0) {
1895
- var t = e.outrogroups;
1896
- Ha(e, me(a.done)), t.delete(a), t.size === 0 && (e.outrogroups = null);
1897
- }
1898
- } else --o;
1899
- }, !1);
1900
- }
1901
- if (o === 0) {
1902
- var c = r.length === 0 && n !== null && e.pending.size === 0;
1903
- if (c) {
1904
- var l = n, u = l.parentNode;
1905
- vr(u), u.append(l), e.items.clear();
1906
- }
1907
- Ha(e, t, !c);
1908
- } else a = {
1909
- pending: new Set(t),
1910
- done: /* @__PURE__ */ new Set()
1911
- }, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(a);
1912
- }
1913
- function Ha(e, t, n = !0) {
1914
- var r;
1915
- if (e.pending.size > 0) {
1916
- r = /* @__PURE__ */ new Set();
1917
- for (let t of e.pending.values()) for (let n of t) r.add(e.items.get(n).e);
1918
- }
1919
- for (var i = 0; i < t.length; i++) {
1920
- var a = t[i];
1921
- r?.has(a) ? (a.f |= Be, qr(a, document.createDocumentFragment())) : B(t[i], n);
1922
- }
1923
- }
1924
- var Ua;
1925
- function Wa(e, t, n, r, i, a = null) {
1926
- var o = e, s = /* @__PURE__ */ new Map();
1927
- if (t & 4) {
1928
- var c = e;
1929
- o = T ? D(/* @__PURE__ */ fr(c)) : c.appendChild(dr());
1930
- }
1931
- T && lt();
1932
- var l = null, u = /* @__PURE__ */ Xt(() => {
1933
- var e = n();
1934
- return de(e) ? e : e == null ? [] : me(e);
1935
- }), d, f = /* @__PURE__ */ new Map(), p = !0;
1936
- function m(e) {
1937
- g.effect.f & 16384 || (g.pending.delete(e), g.fallback = l, Ka(g, d, o, t, r), l !== null && (d.length === 0 ? l.f & 33554432 ? (l.f ^= Be, Ja(l, null, o)) : Gr(l) : Ur(l, () => {
1938
- l = null;
1939
- })));
1940
- }
1941
- function h(e) {
1942
- g.pending.delete(e);
1943
- }
1944
- var g = {
1945
- effect: Fr(() => {
1946
- d = U(u);
1947
- var e = d.length;
1948
- let c = !1;
1949
- T && pt(o) === "[!" != (e === 0) && (o = ft(), D(o), ct(!1), c = !0);
1950
- for (var g = /* @__PURE__ */ new Set(), _ = F, v = yr(), y = 0; y < e; y += 1) {
1951
- T && E.nodeType === 8 && E.data === "]" && (o = E, c = !0, ct(!1));
1952
- var b = d[y], ee = r(b, y), x = p ? null : s.get(ee);
1953
- x ? (x.v && $n(x.v, b), x.i && $n(x.i, y), v && _.unskip_effect(x.e)) : (x = qa(s, p ? o : Ua ?? (Ua = dr()), b, ee, y, i, t, n), p || (x.e.f |= Be), s.set(ee, x)), g.add(ee);
1954
- }
1955
- if (e === 0 && a && !l && (p ? l = Lr(() => a(o)) : (l = Lr(() => a(Ua ?? (Ua = dr()))), l.f |= Be)), e > g.size && vt("", "", ""), T && e > 0 && D(ft()), !p) {
1956
- if (f.set(_, g), v) {
1957
- for (let [e, t] of s) g.has(e) || _.skip_effect(t.e);
1958
- _.oncommit(m), _.ondiscard(h);
1959
- } else m(_);
1960
- }
1961
- c && ct(!0), U(u);
1962
- }),
1963
- flags: t,
1964
- items: s,
1965
- pending: f,
1966
- outrogroups: null,
1967
- fallback: l
1968
- };
1969
- p = !1, T && (o = E);
1970
- }
1971
- function Ga(e) {
1972
- for (; e !== null && !(e.f & 32);) e = e.next;
1973
- return e;
1974
- }
1975
- function Ka(e, t, n, r, i) {
1976
- var a = !!(r & 8), o = t.length, s = e.items, c = Ga(e.effect.first), l, u = null, d, f = [], p = [], m, h, g, _;
1977
- if (a) for (_ = 0; _ < o; _ += 1) m = t[_], h = i(m, _), g = s.get(h).e, g.f & 33554432 || (g.nodes?.a?.measure(), (d ?? (d = /* @__PURE__ */ new Set())).add(g));
1978
- for (_ = 0; _ < o; _ += 1) {
1979
- if (m = t[_], h = i(m, _), g = s.get(h).e, e.outrogroups !== null) for (let t of e.outrogroups) t.pending.delete(g), t.done.delete(g);
1980
- if (g.f & 8192 && (Gr(g), a && (g.nodes?.a?.unfix(), (d ?? (d = /* @__PURE__ */ new Set())).delete(g))), g.f & 33554432) {
1981
- if (g.f ^= Be, g === c) Ja(g, null, n);
1982
- else {
1983
- var v = u ? u.next : c;
1984
- g === e.effect.last && (e.effect.last = g.prev), g.prev && (g.prev.next = g.next), g.next && (g.next.prev = g.prev), Ya(e, u, g), Ya(e, g, v), Ja(g, v, n), u = g, f = [], p = [], c = Ga(u.next);
1985
- continue;
1986
- }
1987
- }
1988
- if (g !== c) {
1989
- if (l !== void 0 && l.has(g)) {
1990
- if (f.length < p.length) {
1991
- var y = p[0], b;
1992
- u = y.prev;
1993
- var ee = f[0], x = f[f.length - 1];
1994
- for (b = 0; b < f.length; b += 1) Ja(f[b], y, n);
1995
- for (b = 0; b < p.length; b += 1) l.delete(p[b]);
1996
- Ya(e, ee.prev, x.next), Ya(e, u, ee), Ya(e, x, y), c = y, u = x, --_, f = [], p = [];
1997
- } else l.delete(g), Ja(g, c, n), Ya(e, g.prev, g.next), Ya(e, g, u === null ? e.effect.first : u.next), Ya(e, u, g), u = g;
1998
- continue;
1999
- }
2000
- for (f = [], p = []; c !== null && c !== g;) (l ?? (l = /* @__PURE__ */ new Set())).add(c), p.push(c), c = Ga(c.next);
2001
- if (c === null) continue;
2002
- }
2003
- g.f & 33554432 || f.push(g), u = g, c = Ga(g.next);
2004
- }
2005
- if (e.outrogroups !== null) {
2006
- for (let t of e.outrogroups) t.pending.size === 0 && (Ha(e, me(t.done)), e.outrogroups?.delete(t));
2007
- e.outrogroups.size === 0 && (e.outrogroups = null);
2008
- }
2009
- if (c !== null || l !== void 0) {
2010
- var S = [];
2011
- if (l !== void 0) for (g of l) g.f & 8192 || S.push(g);
2012
- for (; c !== null;) !(c.f & 8192) && c !== e.fallback && S.push(c), c = Ga(c.next);
2013
- var te = S.length;
2014
- if (te > 0) {
2015
- var ne = r & 4 && o === 0 ? n : null;
2016
- if (a) {
2017
- for (_ = 0; _ < te; _ += 1) S[_].nodes?.a?.measure();
2018
- for (_ = 0; _ < te; _ += 1) S[_].nodes?.a?.fix();
2019
- }
2020
- Va(e, S, ne);
2021
- }
2022
- }
2023
- a && Ft(() => {
2024
- if (d !== void 0) for (g of d) g.nodes?.a?.apply();
2025
- });
2026
- }
2027
- function qa(e, t, n, r, i, a, o, s) {
2028
- var c = o & 1 ? o & 16 ? Yn(n) : /* @__PURE__ */ Xn(n, !1, !1) : null, l = o & 2 ? Yn(i) : null;
2029
- return {
2030
- v: c,
2031
- i: l,
2032
- e: Lr(() => (a(t, c ?? n, l ?? i, s), () => {
2033
- e.delete(r);
2034
- }))
2035
- };
2036
- }
2037
- function Ja(e, t, n) {
2038
- if (e.nodes) for (var r = e.nodes.start, i = e.nodes.end, a = t && !(t.f & 33554432) ? t.nodes.start : n; r !== null;) {
2039
- var o = /* @__PURE__ */ pr(r);
2040
- if (a.before(r), r === i) return;
2041
- r = o;
2042
- }
2043
- }
2044
- function Ya(e, t, n) {
2045
- t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
2046
- }
2047
- function Xa(e, t, n = !1, r = !1, i = !1, a = !1) {
2048
- var o = e, s = "";
2049
- if (n) {
2050
- var c = e;
2051
- T && (o = D(/* @__PURE__ */ fr(c)));
2052
- }
2053
- z(() => {
2054
- var e = H;
2055
- if (s === (s = t() ?? "")) T && lt();
2056
- else if (n && !T) e.nodes = null, c.innerHTML = s, s !== "" && qi(/* @__PURE__ */ fr(c), c.lastChild);
2057
- else if (e.nodes !== null && (Vr(e.nodes.start, e.nodes.end), e.nodes = null), s !== "") {
2058
- if (T) {
2059
- for (var a = E.data, l = lt(), u = l; l !== null && (l.nodeType !== 8 || l.data !== "");) u = l, l = /* @__PURE__ */ pr(l);
2060
- if (l === null) throw at(), tt;
2061
- qi(E, u), o = D(l);
2062
- } else {
2063
- var d = br(r ? "svg" : i ? "math" : "template", r ? nt : i ? rt : void 0);
2064
- d.innerHTML = s;
2065
- var f = r || i ? d : d.content;
2066
- if (qi(/* @__PURE__ */ fr(f), f.lastChild), r || i) for (; /* @__PURE__ */ fr(f);) o.before(/* @__PURE__ */ fr(f));
2067
- else o.before(f);
2068
- }
2069
- }
2070
- });
2071
- }
2072
- //#endregion
2073
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js
2074
- function Za(e, t, n, r, i, a) {
2075
- let o = T;
2076
- T && lt();
2077
- var s = null;
2078
- T && E.nodeType === 1 && (s = E, lt());
2079
- var c = T ? E : e, l = new Ra(c, !1);
2080
- Fr(() => {
2081
- let e = t() || null;
2082
- var a = i ? i() : n || e === "svg" ? nt : void 0;
2083
- if (e === null) l.ensure(null, null);
2084
- else return l.ensure(e, (t) => {
2085
- if (e) {
2086
- if (s = T ? s : br(e, a), qi(s, s), r) {
2087
- var n = null;
2088
- T && Ni(e) && s.append(n = document.createComment(""));
2089
- var i = T ? /* @__PURE__ */ fr(s) : s.appendChild(dr());
2090
- T && (i === null ? ct(!1) : D(i)), r(s, i), n?.remove();
2091
- }
2092
- H.nodes.end = s, t.before(s);
2093
- }
2094
- T && D(t);
2095
- }), () => {};
2096
- }, Le), Or(() => {}), o && (ct(!0), D(c));
2097
- }
2098
- //#endregion
2099
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/css.js
2100
- function Qa(e, t) {
2101
- Mr(() => {
2102
- e = H?.parent?.nodes?.start ?? e;
2103
- var n = e.getRootNode(), r = n.host ? n : n.head ?? n.ownerDocument.head;
2104
- if (!r.querySelector("#" + t.hash)) {
2105
- let e = br("style");
2106
- e.id = t.hash, e.textContent = t.code, r.appendChild(e);
2107
- }
2108
- });
2109
- }
2110
- //#endregion
2111
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/actions.js
2112
- function $a(e, t, n) {
2113
- Mr(() => {
2114
- var r = xi(() => t(e, n?.()) || {});
2115
- if (n && r?.update) {
2116
- var i = !1, a = {};
2117
- Pr(() => {
2118
- var e = n();
2119
- Si(e), i && ht(a, e) && (a = e, r.update(e));
2120
- }), i = !0;
2121
- }
2122
- if (r?.destroy) return () => r.destroy();
2123
- });
2124
- }
2125
- //#endregion
2126
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/attachments.js
2127
- function eo(e, t) {
2128
- var n = void 0, r;
2129
- Ir(() => {
2130
- n !== (n = t()) && (r && (B(r), r = null), n && (r = Lr(() => {
2131
- Mr(() => n(e));
2132
- })));
2133
- });
2134
- }
2135
- //#endregion
2136
- //#region ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
2137
- function to(e) {
2138
- var t, n, r = "";
2139
- if (typeof e == "string" || typeof e == "number") r += e;
2140
- else if (typeof e == "object") {
2141
- if (Array.isArray(e)) {
2142
- var i = e.length;
2143
- for (t = 0; t < i; t++) e[t] && (n = to(e[t])) && (r && (r += " "), r += n);
2144
- } else for (n in e) e[n] && (r && (r += " "), r += n);
2145
- }
2146
- return r;
2147
- }
2148
- function no() {
2149
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = to(e)) && (r && (r += " "), r += t);
2150
- return r;
2151
- }
2152
- //#endregion
2153
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/shared/attributes.js
2154
- function ro(e) {
2155
- return typeof e == "object" ? no(e) : e ?? "";
2156
- }
2157
- var io = [..." \n\r\f\xA0\v"];
2158
- function ao(e, t, n) {
2159
- var r = e == null ? "" : "" + e;
2160
- if (t && (r = r ? r + " " + t : t), n) {
2161
- for (var i of Object.keys(n)) if (n[i]) r = r ? r + " " + i : i;
2162
- else if (r.length) for (var a = i.length, o = 0; (o = r.indexOf(i, o)) >= 0;) {
2163
- var s = o + a;
2164
- (o === 0 || io.includes(r[o - 1])) && (s === r.length || io.includes(r[s])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(s + 1) : o = s;
2165
- }
2166
- }
2167
- return r === "" ? null : r;
2168
- }
2169
- function oo(e, t = !1) {
2170
- var n = t ? " !important;" : ";", r = "";
2171
- for (var i of Object.keys(e)) {
2172
- var a = e[i];
2173
- a != null && a !== "" && (r += " " + i + ": " + a + n);
2174
- }
2175
- return r;
2176
- }
2177
- function so(e) {
2178
- return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
2179
- }
2180
- function co(e, t) {
2181
- if (t) {
2182
- var n = "", r, i;
2183
- if (Array.isArray(t) ? (r = t[0], i = t[1]) : r = t, e) {
2184
- e = String(e).replaceAll(/\/\*.*?\*\//g, "").trim();
2185
- var a = !1, o = 0, s = !1, c = [];
2186
- r && c.push(...Object.keys(r).map(so)), i && c.push(...Object.keys(i).map(so));
2187
- var l = 0, u = -1;
2188
- let t = e.length;
2189
- for (var d = 0; d < t; d++) {
2190
- var f = e[d];
2191
- if (s ? f === "/" && e[d - 1] === "*" && (s = !1) : a ? a === f && (a = !1) : f === "/" && e[d + 1] === "*" ? s = !0 : f === "\"" || f === "'" ? a = f : f === "(" ? o++ : f === ")" && o--, !s && a === !1 && o === 0) {
2192
- if (f === ":" && u === -1) u = d;
2193
- else if (f === ";" || d === t - 1) {
2194
- if (u !== -1) {
2195
- var p = so(e.substring(l, u).trim());
2196
- if (!c.includes(p)) {
2197
- f !== ";" && d++;
2198
- var m = e.substring(l, d).trim();
2199
- n += " " + m + ";";
2200
- }
2201
- }
2202
- l = d + 1, u = -1;
2203
- }
2204
- }
2205
- }
2206
- }
2207
- return r && (n += oo(r)), i && (n += oo(i, !0)), n = n.trim(), n === "" ? null : n;
2208
- }
2209
- return e == null ? null : String(e);
2210
- }
2211
- //#endregion
2212
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/class.js
2213
- function lo(e, t, n, r, i, a) {
2214
- var o = e[Ye];
2215
- if (T || o !== n || o === void 0) {
2216
- var s = ao(n, r, a);
2217
- (!T || s !== e.getAttribute("class")) && (s == null ? e.removeAttribute("class") : t ? e.className = s : e.setAttribute("class", s)), e[Ye] = n;
2218
- } else if (a && i !== a) for (var c in a) {
2219
- var l = !!a[c];
2220
- (i == null || l !== !!i[c]) && e.classList.toggle(c, l);
2221
- }
2222
- return a;
2223
- }
2224
- //#endregion
2225
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/style.js
2226
- function uo(e, t = {}, n, r) {
2227
- for (var i in n) {
2228
- var a = n[i];
2229
- t[i] !== a && (n[i] == null ? e.style.removeProperty(i) : e.style.setProperty(i, a, r));
2230
- }
2231
- }
2232
- function fo(e, t, n, r) {
2233
- var i = e[Xe];
2234
- if (T || i !== t) {
2235
- var a = co(t, r);
2236
- (!T || a !== e.getAttribute("style")) && (a == null ? e.removeAttribute("style") : e.style.cssText = a), e[Xe] = t;
2237
- } else r && (Array.isArray(r) ? (uo(e, n?.[0], r[0]), uo(e, n?.[1], r[1], "important")) : uo(e, n, r));
2238
- return r;
2239
- }
2240
- //#endregion
2241
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/select.js
2242
- function po(e, t) {
2243
- t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
2244
- }
2245
- function mo(e, t) {
2246
- var n = !("__defaultValue" in e);
2247
- (n || e.__defaultValue !== t) && (e.__defaultValue = t, ho(e, !n || "__value" in e));
2248
- }
2249
- function ho(e, t) {
2250
- var n = e.__defaultValue, r = e.multiple, i = r ? n ?? [] : null;
2251
- if (!r || de(i)) {
2252
- var a = e.selectedIndex, o = t && r ? new Set(e.selectedOptions) : null;
2253
- for (var s of e.options) {
2254
- var c = vo(s);
2255
- po(s, r ? i.includes(c) : ar(c, n));
2256
- }
2257
- if (t) {
2258
- if (o !== null) for (s of e.options) {
2259
- var l = o.has(s);
2260
- s.selected !== l && (s.selected = l);
2261
- }
2262
- else e.selectedIndex !== a && (e.selectedIndex = a);
2263
- }
2264
- }
2265
- }
2266
- function go(e, t, n = !1) {
2267
- if (e.multiple) {
2268
- if (t == null) return;
2269
- if (!de(t)) return ot();
2270
- for (var r of e.options) r.selected = t.includes(vo(r));
2271
- } else {
2272
- for (r of e.options) if (ar(vo(r), t)) {
2273
- r.selected = !0;
2274
- return;
2275
- }
2276
- (!n || t !== void 0) && (e.selectedIndex = -1);
2277
- }
2278
- }
2279
- function _o(e) {
2280
- var t = new MutationObserver((t) => {
2281
- t.every(yo) || ("__defaultValue" in e && ho(e, !1), "__value" in e && go(e, e.__value));
2282
- });
2283
- t.observe(e, {
2284
- childList: !0,
2285
- subtree: !0,
2286
- attributes: !0,
2287
- attributeFilter: ["value"]
2288
- }), Or(() => {
2289
- t.disconnect();
2290
- });
2291
- }
2292
- function vo(e) {
2293
- return "__value" in e ? e.__value : e.value;
2294
- }
2295
- function yo(e) {
2296
- if (e.target.closest("selectedcontent") !== null) return !0;
2297
- if (e.type === "childList") {
2298
- var t = [...e.addedNodes, ...e.removedNodes];
2299
- return t.length > 0 && t.every((e) => e.nodeName === "SELECTEDCONTENT");
2300
- }
2301
- return !1;
2302
- }
2303
- //#endregion
2304
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/attributes.js
2305
- var bo = Symbol("class"), xo = Symbol("style"), So = Symbol("is custom element"), Co = Symbol("is html"), wo = et ? "link" : "LINK", To = et ? "input" : "INPUT", Eo = et ? "option" : "OPTION", Do = et ? "select" : "SELECT", Oo = et ? "progress" : "PROGRESS";
2306
- function ko(e) {
2307
- if (T) {
2308
- var t = !1, n = () => {
2309
- if (!t) {
2310
- if (t = !0, e.hasAttribute("value")) {
2311
- var n = e.value;
2312
- J(e, "value", null), e.value = n;
2313
- }
2314
- if (e.hasAttribute("checked")) {
2315
- var r = e.checked;
2316
- J(e, "checked", null), e.checked = r;
2317
- }
2318
- }
2319
- };
2320
- e[Qe] = n, Ft(n), Vt();
2321
- }
2322
- }
2323
- function Ao(e, t) {
2324
- var n = No(e);
2325
- n.value !== (n.value = t ?? void 0) && (e.value !== t || t === 0 && e.nodeName === Oo) && (e.value = t ?? "");
2326
- }
2327
- function J(e, t, n, r) {
2328
- var i = No(e);
2329
- T && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === wo) || i[t] !== (i[t] = n) && (t === "loading" && (e[qe] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && Fo(e).has(t) ? e[t] = n : e.setAttribute(t, n));
2330
- }
2331
- function jo(e, t, n, r, i = !1, a = !1) {
2332
- T && i && e.nodeName === To && ("defaultValue" in n || "defaultChecked" in n || ko(e));
2333
- var o = No(e), s = o[So], c = !o[Co];
2334
- let l = T && s;
2335
- l && ct(!1);
2336
- var u = t || {}, d = e.nodeName === Eo, f = e.nodeName === Do;
2337
- for (var p in t) !(p in n) && p[0] + p[1] !== "$$" && (n[p] = null);
2338
- n.class ? n.class = ro(n.class) : (r || n[bo]) && (n.class = null), n[xo] && (n.style ?? (n.style = null));
2339
- var m = Fo(e);
2340
- if (e.nodeName === To && "type" in n && ("value" in n || "__value" in n)) {
2341
- var h = n.type;
2342
- (h !== u.type || h === void 0 && e.hasAttribute("type")) && (u.type = h, J(e, "type", h, a));
2343
- }
2344
- for (let i in n) {
2345
- let l = n[i];
2346
- if (d && i === "value" && l == null) e.value = e.__value = "", u[i] = l;
2347
- else if (i === "class") lo(e, e.namespaceURI === "http://www.w3.org/1999/xhtml", l, r, t?.[bo], n[bo]), u[i] = l, u[bo] = n[bo];
2348
- else if (i === "style") fo(e, l, t?.[xo], n[xo]), u[i] = l, u[xo] = n[xo];
2349
- else {
2350
- var g = u[i];
2351
- if (l !== g || l === void 0 && e.hasAttribute(i)) {
2352
- u[i] = l;
2353
- var _ = i[0] + i[1];
2354
- if (_ !== "$$") {
2355
- if (_ === "on") {
2356
- let t = {}, n = "$$" + i, r = i.slice(2);
2357
- var v = Ei(r);
2358
- if (wi(r) && (r = r.slice(0, -7), t.capture = !0), !v && g) {
2359
- if (l != null) continue;
2360
- e.removeEventListener(r, u[n], t), u[n] = null;
2361
- }
2362
- if (v) zi(r, e, l), Bi([r]);
2363
- else if (l != null) {
2364
- function a(e) {
2365
- u[i].call(this, e);
2366
- }
2367
- u[n] = Li(r, e, a, t);
2368
- }
2369
- } else if (i === "style") J(e, i, l);
2370
- else if (i === "autofocus") zt(e, !!l);
2371
- else if (!s && (i === "__value" || i === "value" && l != null)) e.value = e.__value = l;
2372
- else if (i === "selected" && d) po(e, l);
2373
- else {
2374
- var y = i;
2375
- c || (y = ki(y));
2376
- var b = y === "defaultValue" || y === "defaultChecked";
2377
- if (f && y === "defaultValue") continue;
2378
- if (l == null && !s && !b) {
2379
- if (o[i] = null, y === "value" || y === "checked") {
2380
- let n = e, r = t === void 0;
2381
- if (y === "value") {
2382
- let e = n.defaultValue;
2383
- n.removeAttribute(y), n.defaultValue = e, n.value = n.__value = r ? e : null;
2384
- } else {
2385
- let e = n.defaultChecked;
2386
- n.removeAttribute(y), n.defaultChecked = e, n.checked = r ? e : !1;
2387
- }
2388
- } else e.removeAttribute(i);
2389
- } else b || (s || typeof l != "string") && m.has(y) ? (e[y] = l, y in o && (o[y] = w)) : typeof l != "function" && J(e, y, l, a);
2390
- }
2391
- }
2392
- }
2393
- }
2394
- }
2395
- return l && ct(!0), u;
2396
- }
2397
- function Mo(e, t, n = [], r = [], i = [], a, o = !1, s = !1) {
2398
- Ut(i, n, r, (n) => {
2399
- var r = void 0, i = {}, c = e.nodeName === Do, l = !1;
2400
- if (Ir(() => {
2401
- var u = t(...n.map(U)), d = jo(e, r, u, a, o, s);
2402
- if (l && c) {
2403
- var f = e;
2404
- "defaultValue" in u && mo(f, u.defaultValue), "value" in u && go(f, u.value);
2405
- }
2406
- for (let e of Object.getOwnPropertySymbols(i)) u[e] || B(i[e]);
2407
- for (let t of Object.getOwnPropertySymbols(u)) {
2408
- var p = u[t];
2409
- t.description === "@attach" && (!r || p !== r[t]) && (i[t] && B(i[t]), i[t] = Lr(() => eo(e, () => p))), d[t] = p;
2410
- }
2411
- r = d;
2412
- }), c) {
2413
- var u = e;
2414
- Mr(() => {
2415
- var e = r;
2416
- "defaultValue" in e && mo(u, e.defaultValue), go(u, e.value, !0), _o(u);
2417
- });
2418
- }
2419
- l = !0;
2420
- });
2421
- }
2422
- function No(e) {
2423
- return e[Je] ?? (e[Je] = {
2424
- [So]: e.nodeName.includes("-"),
2425
- [Co]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
2426
- });
2427
- }
2428
- var Po = /* @__PURE__ */ new Map();
2429
- function Fo(e) {
2430
- var t = e.getAttribute("is") || e.nodeName, n = Po.get(t);
2431
- if (n) return n;
2432
- Po.set(t, n = /* @__PURE__ */ new Set());
2433
- for (var r, i = e, a = Element.prototype; a !== i;) {
2434
- for (var o in r = _e(i), r) r[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && n.add(o);
2435
- i = be(i);
2436
- }
2437
- return n;
2438
- }
2439
- //#endregion
2440
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
2441
- var Io, Lo = /* @__PURE__ */ new WeakMap(), Ro = /* @__PURE__ */ new WeakMap(), zo = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakSet(), Vo = class {
2442
- constructor(e) {
2443
- rn(this, Bo), j(this, Lo, /* @__PURE__ */ new WeakMap()), j(this, Ro, void 0), j(this, zo, void 0), N(zo, this, e);
2444
- }
2445
- observe(e, t) {
2446
- var n = P(Lo, this).get(e) || /* @__PURE__ */ new Set();
2447
- return n.add(t), P(Lo, this).set(e, n), M(Bo, this, Ho).call(this).observe(e, P(zo, this)), () => {
2448
- var n = P(Lo, this).get(e);
2449
- n.delete(t), n.size === 0 && (P(Lo, this).delete(e), P(Ro, this).unobserve(e));
2450
- };
2451
- }
2452
- };
2453
- Io = Vo;
2454
- function Ho() {
2455
- return P(Ro, this) ?? N(Ro, this, new ResizeObserver((e) => {
2456
- for (var t of e) {
2457
- Io.entries.set(t.target, t);
2458
- for (var n of P(Lo, this).get(t.target) || []) n(t);
2459
- }
2460
- }));
2461
- }
2462
- Oe(Vo, "entries", /* @__PURE__ */ new WeakMap());
2463
- //#endregion
2464
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
2465
- function Uo(e, t) {
2466
- return e === t || e?.[We] === t;
2467
- }
2468
- function Wo(e = jt(), t, n, r) {
2469
- var i = O.r, a = H;
2470
- return Mr(() => {
2471
- var o, s;
2472
- return Pr(() => {
2473
- o = s, s = r?.() || [], xi(() => {
2474
- Uo(n(...s), e) || (t(e, ...s), o && Uo(n(...o), e) && t(null, ...o));
2475
- });
2476
- }), () => {
2477
- let r = a;
2478
- for (; r !== i && r.parent !== null && r.parent.f & 33554432;) r = r.parent;
2479
- let o = () => {
2480
- s && Uo(n(...s), e) && t(null, ...s);
2481
- }, c = r.teardown;
2482
- r.teardown = () => {
2483
- o(), c?.();
2484
- };
2485
- };
2486
- }), e;
2487
- }
2488
- //#endregion
2489
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/store.js
2490
- var Go = !1;
2491
- function Ko(e) {
2492
- var t = Go;
2493
- try {
2494
- return Go = !1, [e(), Go];
2495
- } finally {
2496
- Go = t;
2497
- }
2498
- }
2499
- //#endregion
2500
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/client/reactivity/props.js
2501
- function Y(e, t, n, r) {
2502
- var i = !0, a = !!(n & 8), o = !!(n & 16), s = r, c = !0, l = void 0, u = () => o && i ? (l ?? (l = /* @__PURE__ */ qt(r)), U(l)) : (c && (c = !1, s = o ? xi(r) : r), s);
2503
- let d;
2504
- if (a) {
2505
- var f = We in e || Ke in e;
2506
- d = ge(e, t)?.set ?? (f && t in e ? (n) => e[t] = n : void 0);
2507
- }
2508
- var p, m = !1;
2509
- a ? [p, m] = Ko(() => e[t]) : p = e[t], p === void 0 && r !== void 0 && (p = u(), d && (i && Ct(t), d(p)));
2510
- var h = i ? () => {
2511
- var n = e[t];
2512
- return n === void 0 ? u() : (c = !0, n);
2513
- } : () => {
2514
- var n = e[t];
2515
- return n !== void 0 && (s = void 0), n === void 0 ? s : n;
2516
- };
2517
- if (i && !(n & 4)) return h;
2518
- if (d) {
2519
- var g = e.$$legacy;
2520
- return (function(e, t) {
2521
- return arguments.length > 0 ? ((!i || !t || g || m) && d(t ? h() : e), e) : h();
2522
- });
2523
- }
2524
- var _ = !1, v = (n & 1 ? qt : Xt)(() => (_ = !1, h()));
2525
- a && U(v);
2526
- var y = H;
2527
- return (function(e, t) {
2528
- if (arguments.length > 0) {
2529
- let n = t ? U(v) : i && a ? rr(e) : e;
2530
- return R(v, n), _ = !0, s !== void 0 && (s = n), e;
2531
- }
2532
- return Xr && _ || y.f & 16384 ? v.v : U(v);
2533
- });
2534
- }
2535
- var qo, Jo = !1, Yo = /* @__PURE__ */ new WeakMap(), Xo = /* @__PURE__ */ new WeakMap(), Zo = /* @__PURE__ */ new WeakMap(), Qo = /* @__PURE__ */ new WeakSet();
2536
- qo = class extends Date {
2537
- constructor(...e) {
2538
- super(...e), rn(this, Qo), j(this, Yo, /* @__PURE__ */ L(super.getTime())), j(this, Xo, /* @__PURE__ */ new Map()), j(this, Zo, V), Jo || M(Qo, this, $o).call(this);
2539
- }
2540
- };
2541
- function $o() {
2542
- Jo = !0;
2543
- var e = qo.prototype, t = Date.prototype, n = Object.getOwnPropertyNames(t);
2544
- for (let r of n) (r.startsWith("get") || r.startsWith("to") || r === "valueOf") && (e[r] = function(...e) {
2545
- if (e.length > 0) return U(P(Yo, this)), t[r].apply(this, e);
2546
- var n = P(Xo, this).get(r);
2547
- if (n === void 0) {
2548
- let i = V;
2549
- $r(P(Zo, this)), n = /* @__PURE__ */ A(() => (U(P(Yo, this)), t[r].apply(this, e))), P(Xo, this).set(r, n), $r(i);
2550
- }
2551
- return U(n);
2552
- }), r.startsWith("set") && (e[r] = function(...e) {
2553
- var n = t[r].apply(this, e);
2554
- return R(P(Yo, this), t.getTime.call(this)), n;
2555
- });
2556
- }
2557
- //#endregion
2558
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/reactivity/set.js
2559
- var es, ts, ns = [
2560
- "forEach",
2561
- "isDisjointFrom",
2562
- "isSubsetOf",
2563
- "isSupersetOf"
2564
- ], rs = [
2565
- "difference",
2566
- "intersection",
2567
- "symmetricDifference",
2568
- "union"
2569
- ], is = !1, as = /* @__PURE__ */ new WeakMap(), os = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), ls = /* @__PURE__ */ new WeakSet();
2570
- ts = Symbol.iterator, es = class extends Set {
2571
- constructor(e) {
2572
- if (super(), rn(this, ls), j(this, as, /* @__PURE__ */ new Map()), j(this, os, /* @__PURE__ */ L(0)), j(this, ss, /* @__PURE__ */ L(0)), j(this, cs, li || -1), e) {
2573
- for (var t of e) super.add(t);
2574
- P(ss, this).v = super.size;
2575
- }
2576
- is || M(ls, this, ds).call(this);
2577
- }
2578
- has(e) {
2579
- var t = super.has(e), n = P(as, this), r = n.get(e);
2580
- if (r === void 0) {
2581
- if (!t) return U(P(os, this)), !1;
2582
- r = M(ls, this, us).call(this, !0), n.set(e, r);
2583
- }
2584
- return U(r), t;
2585
- }
2586
- add(e) {
2587
- return super.has(e) || (super.add(e), R(P(ss, this), super.size), tr(P(os, this))), this;
2588
- }
2589
- delete(e) {
2590
- var t = super.delete(e), n = P(as, this), r = n.get(e);
2591
- return r !== void 0 && (n.delete(e), R(r, !1)), t && (R(P(ss, this), super.size), tr(P(os, this))), t;
2592
- }
2593
- clear() {
2594
- if (super.size !== 0) {
2595
- super.clear();
2596
- var e = P(as, this);
2597
- for (var t of e.values()) R(t, !1);
2598
- e.clear(), R(P(ss, this), 0), tr(P(os, this));
2599
- }
2600
- }
2601
- keys() {
2602
- return this.values();
2603
- }
2604
- values() {
2605
- return U(P(os, this)), super.values();
2606
- }
2607
- entries() {
2608
- return U(P(os, this)), super.entries();
2609
- }
2610
- [ts]() {
2611
- return this.keys();
2612
- }
2613
- get size() {
2614
- return U(P(ss, this));
2615
- }
2616
- };
2617
- function us(e) {
2618
- return li === P(cs, this) ? /* @__PURE__ */ L(e) : Yn(e);
2619
- }
2620
- function ds() {
2621
- is = !0;
2622
- var e = es.prototype, t = Set.prototype;
2623
- for (let n of ns) e[n] = function(...e) {
2624
- return U(P(os, this)), t[n].apply(this, e);
2625
- };
2626
- for (let n of rs) e[n] = function(...e) {
2627
- U(P(os, this));
2628
- var r = t[n].apply(this, e);
2629
- return new es(r);
2630
- };
2631
- }
2632
- //#endregion
2633
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/getPrototypeOf.js
2634
- function fs(e) {
2635
- return fs = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2636
- return e.__proto__ || Object.getPrototypeOf(e);
2637
- }, fs(e);
2638
- }
2639
- //#endregion
2640
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/superPropBase.js
2641
- function ps(e, t) {
2642
- for (; !{}.hasOwnProperty.call(e, t) && (e = fs(e)) !== null;);
2643
- return e;
2644
- }
2645
- //#endregion
2646
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/get.js
2647
- function ms() {
2648
- return ms = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(e, t, n) {
2649
- var r = ps(e, t);
2650
- if (r) {
2651
- var i = Object.getOwnPropertyDescriptor(r, t);
2652
- return i.get ? i.get.call(arguments.length < 3 ? e : n) : i.value;
2653
- }
2654
- }, ms.apply(null, arguments);
2655
- }
2656
- //#endregion
2657
- //#region \0@oxc-project+runtime@0.154.0/helpers/esm/superPropGet.js
2658
- function hs(e, t, n, r) {
2659
- var i = ms(fs(1 & r ? e.prototype : e), t, n);
2660
- return 2 & r && typeof i == "function" ? function(e) {
2661
- return i.apply(n, e);
2662
- } : i;
2663
- }
2664
- //#endregion
2665
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/reactivity/map.js
2666
- var gs, _s, vs = /* @__PURE__ */ new WeakMap(), ys = /* @__PURE__ */ new WeakMap(), bs = /* @__PURE__ */ new WeakMap(), xs = /* @__PURE__ */ new WeakMap(), Ss = /* @__PURE__ */ new WeakSet();
2667
- _s = Symbol.iterator, gs = class extends Map {
2668
- constructor(e) {
2669
- if (super(), rn(this, Ss), j(this, vs, /* @__PURE__ */ new Map()), j(this, ys, /* @__PURE__ */ L(0)), j(this, bs, /* @__PURE__ */ L(0)), j(this, xs, li || -1), e) {
2670
- for (var [t, n] of e) super.set(t, n);
2671
- P(bs, this).v = super.size;
2672
- }
2673
- }
2674
- has(e) {
2675
- var t = P(vs, this), n = t.get(e);
2676
- if (n === void 0) {
2677
- if (super.has(e)) n = M(Ss, this, Cs).call(this, 0), t.set(e, n);
2678
- else return U(P(ys, this)), !1;
2679
- }
2680
- return U(n), !0;
2681
- }
2682
- forEach(e, t) {
2683
- M(Ss, this, ws).call(this), super.forEach(e, t);
2684
- }
2685
- get(e) {
2686
- var t = P(vs, this), n = t.get(e);
2687
- if (n === void 0) {
2688
- if (super.has(e)) n = M(Ss, this, Cs).call(this, 0), t.set(e, n);
2689
- else {
2690
- U(P(ys, this));
2691
- return;
2692
- }
2693
- }
2694
- return U(n), super.get(e);
2695
- }
2696
- getOrInsert(e, t) {
2697
- return super.has(e) || this.set(e, t), this.get(e);
2698
- }
2699
- getOrInsertComputed(e, t) {
2700
- return super.has(e) || this.set(e, t(e)), this.get(e);
2701
- }
2702
- set(e, t) {
2703
- var n = P(vs, this), r = n.get(e), i = super.get(e), a = super.set(e, t), o = P(ys, this);
2704
- if (r === void 0) r = M(Ss, this, Cs).call(this, 0), n.set(e, r), R(P(bs, this), super.size), tr(o);
2705
- else if (i !== t) {
2706
- tr(r);
2707
- var s = o.reactions === null ? null : new Set(o.reactions);
2708
- (s === null || !r.reactions?.every((e) => s.has(e))) && tr(o);
2709
- }
2710
- return a;
2711
- }
2712
- delete(e) {
2713
- var t = P(vs, this), n = t.get(e), r = super.delete(e);
2714
- return n !== void 0 && (t.delete(e), R(n, -1)), r && (R(P(bs, this), super.size), tr(P(ys, this))), r;
2715
- }
2716
- clear() {
2717
- if (super.size !== 0) {
2718
- super.clear();
2719
- var e = P(vs, this);
2720
- R(P(bs, this), 0);
2721
- for (var t of e.values()) R(t, -1);
2722
- tr(P(ys, this)), e.clear();
2723
- }
2724
- }
2725
- keys() {
2726
- return U(P(ys, this)), super.keys();
2727
- }
2728
- values() {
2729
- return M(Ss, this, ws).call(this), super.values();
2730
- }
2731
- entries() {
2732
- return M(Ss, this, ws).call(this), super.entries();
2733
- }
2734
- [_s]() {
2735
- return this.entries();
2736
- }
2737
- get size() {
2738
- return U(P(bs, this)), super.size;
2739
- }
2740
- };
2741
- function Cs(e) {
2742
- return li === P(xs, this) ? /* @__PURE__ */ L(e) : Yn(e);
2743
- }
2744
- function ws() {
2745
- U(P(ys, this));
2746
- var e = P(vs, this);
2747
- if (P(bs, this).v !== e.size) {
2748
- for (var t of hs(gs.prototype, "keys", this, 2)([])) if (!e.has(t)) {
2749
- var n = M(Ss, this, Cs).call(this, 0);
2750
- e.set(t, n);
2751
- }
2752
- }
2753
- for ([, n] of P(vs, this)) U(n);
2754
- }
2755
- //#endregion
2756
- //#region ../../node_modules/.bun/svelte@5.57.1/node_modules/svelte/src/internal/disclose-version.js
2757
- if (typeof window < "u") {
2758
- var Ts, Es;
2759
- ((Ts = (Es = window).__svelte ?? (Es.__svelte = {})).v ?? (Ts.v = /* @__PURE__ */ new Set())).add("5");
2760
- }
2761
- //#endregion
2762
- //#region src/interactions/inline-choice/InlineChoice.svelte
2763
- var Ds = /* @__PURE__ */ W("<span hidden=\"\"> </span>"), Os = /* @__PURE__ */ W("<option> </option>"), ks = /* @__PURE__ */ W("<span class=\"qti-inline-choice-correct-badge svelte-p2969z\"> </span>"), As = /* @__PURE__ */ W("<span class=\"inline-choice-wrapper svelte-p2969z\"><!> <!> <select><option> </option><!></select> <!></span>"), js = {
2764
- hash: "svelte-p2969z",
2765
- code: ".inline-choice-wrapper.svelte-p2969z {position:relative;display:inline-block;}.qti-inline-select.svelte-p2969z {display:inline-block;width:auto;min-width:120px;margin:0 4px;padding-block:0.25rem;padding-inline:0.5rem 1.75rem;border:1px solid var(--pie-qti-border-strong, #767676);border-radius:0.5rem;background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;}.qti-inline-select.svelte-p2969z:focus-visible {outline:2px solid var(--pie-qti-focus, #4338ca);outline-offset:2px;}.qti-inline-select-correct.svelte-p2969z {border-color:var(--pie-qti-success-text, #15803d);background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 10%, transparent);}.qti-inline-choice-correct-badge.svelte-p2969z {position:absolute;top:-1.5rem;inset-inline-start:0;display:inline-flex;align-items:center;white-space:nowrap;min-height:1.1rem;padding:0 0.5rem;border:1px solid var(--pie-qti-success-text, #15803d);border-radius:9999px;background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 12%, transparent);color:var(--pie-qti-base-content, oklch(21% 0 0));font-size:0.75rem;font-weight:600;}"
2766
- };
2767
- function Ms(e, t) {
2768
- let n = Xi();
2769
- kt(t, !0), Qa(e, js);
2770
- let r = Y(t, "response", 3, ""), i = Y(t, "correctAnswer", 3, null), a = Y(t, "disabled", 3, !1), o = Y(t, "onResponseChange", 3, () => {}), s = `${n}-description`, c = `${n}-min-message`, d = /* @__PURE__ */ A(() => i() === null ? r() : i()), f = /* @__PURE__ */ A(() => i() ? t.interaction.choices.find((e) => e.identifier === i()) : null), p = /* @__PURE__ */ A(() => x(t.i18n, t.interaction, t.position)), m = /* @__PURE__ */ A(() => t.interaction.minSelectionsMessage?.trim() || ""), h = /* @__PURE__ */ A(() => [
2771
- t.interaction.accessibility?.description ? s : "",
2772
- U(m) ? c : "",
2773
- t.contextId ?? ""
2774
- ].filter(Boolean).join(" ") || void 0);
2775
- function g(e) {
2776
- let n = e.currentTarget?.value ?? "";
2777
- o()(t.interaction.responseId, n);
2778
- }
2779
- var _ = As(), v = mr(_), y = (e) => {
2780
- var n = Ds(), r = gr(n, !0);
2781
- z(() => {
2782
- J(n, "id", s), q(r, t.interaction.accessibility.description);
2783
- }), G(e, n);
2784
- };
2785
- za(v, (e) => {
2786
- t.interaction.accessibility?.description && e(y);
2787
- });
2788
- var b = _r(v, 2), ee = (e) => {
2789
- var t = Ds(), n = gr(t, !0);
2790
- z(() => {
2791
- J(t, "id", c), q(n, U(m));
2792
- }), G(e, t);
2793
- };
2794
- za(b, (e) => {
2795
- U(m) && e(ee);
2796
- });
2797
- var S = _r(b, 2);
2798
- let te;
2799
- var ne = mr(S), re = gr(ne, !0);
2800
- ne.value = ne.__value = "", Wa(_r(ne), 17, () => t.interaction.choices, Ba, (e, t) => {
2801
- let n = /* @__PURE__ */ A(() => i() === U(t).identifier);
2802
- var r = Os(), a = gr(r), o = {};
2803
- z(() => {
2804
- q(a, `${U(t).text ?? ""}${U(n) ? " ✓" : ""}`), o !== (o = U(t).identifier) && (r.value = (r.__value = o) ?? "");
2805
- }), G(e, r);
2806
- }), ut(S);
2807
- var ie;
2808
- _o(S);
2809
- var ae = _r(S, 2), oe = (e) => {
2810
- var n = ks(), r = gr(n, !0);
2811
- z((e) => q(r, e), [() => u(t.i18n, "interactions.inline.correctChoice", "Correct: {choice}", { choice: U(f).text })]), G(e, n);
2812
- };
2813
- za(ae, (e) => {
2814
- i() !== null && U(f) && e(oe);
2815
- }), ut(_), z((e, t) => {
2816
- J(S, "aria-label", e), J(S, "aria-describedby", U(h)), S.disabled = a(), te = lo(S, 1, "svelte-p2969z", null, te, {
2817
- "qti-inline-select": !0,
2818
- "qti-inline-select-correct": i() !== null
2819
- }), q(re, t), ie !== (ie = U(d)) && (S.value = (S.__value = ie) ?? "", go(S, ie));
2820
- }, [() => i() && U(f) ? l(u(t.i18n, "accessibility.sentence", "{text}.", { text: U(p) }), u(t.i18n, "accessibility.correctAnswerIs", "Correct answer: {answer}.", { answer: U(f).text })) : U(p), () => t.interaction.label ?? t.interaction.dataPrompt ?? u(t.i18n, "interactions.inline.selectPlaceholder", "Select...")]), zi("change", S, g), G(e, _), At();
2821
- }
2822
- Bi(["change"]);
2823
- //#endregion
2824
- //#region src/interactions/text-entry/InlineTextEntry.svelte
2825
- var Ns = /* @__PURE__ */ W("<span hidden=\"\"> </span>"), Ps = /* @__PURE__ */ W("<span role=\"alert\" class=\"qti-text-entry-error svelte-v4bfxs\"> </span>"), Fs = /* @__PURE__ */ W("<input type=\"text\" spellcheck=\"false\" autocorrect=\"off\" autocapitalize=\"off\" autocomplete=\"off\" dir=\"auto\"/> <!> <!>", 1), Is = {
2826
- hash: "svelte-v4bfxs",
2827
- code: ".qti-inline-input.svelte-v4bfxs {box-sizing:border-box;padding:0.25rem 0.5rem;border:1px solid var(--pie-qti-border-strong, #767676);border-radius:0.5rem;background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;}.qti-inline-input.svelte-v4bfxs:focus-visible {outline:2px solid var(--pie-qti-focus, #4338ca);outline-offset:2px;}.qti-inline-input-correct.svelte-v4bfxs {border-color:var(--pie-qti-success-text, #15803d);background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 10%, transparent);}.qti-text-entry-error.svelte-v4bfxs {display:block;color:var(--pie-qti-error-text, #b91c1c);font-size:0.875rem;}"
2828
- };
2829
- function Ls(e, t) {
2830
- let n = Xi();
2831
- kt(t, !0), Qa(e, Is);
2832
- let r = Y(t, "response", 3, ""), i = Y(t, "stringResponse", 3, null), a = Y(t, "correctAnswer", 3, null), o = Y(t, "disabled", 3, !1), s = Y(t, "onResponseChange", 3, () => {}), c = `${n}-error`, d = `${n}-description`, f = /* @__PURE__ */ L(!1), p = /* @__PURE__ */ A(() => U(f) ? S(t.i18n, t.interaction) : null), m = /* @__PURE__ */ A(() => t.interaction.stringIdentifier && typeof i() == "string" && i().length > 0 ? i() : r()), h = /* @__PURE__ */ A(() => a() === null ? U(m) : a()), g = /* @__PURE__ */ A(() => x(t.i18n, t.interaction, t.position)), _ = /* @__PURE__ */ A(() => re(t.interaction)), v = /* @__PURE__ */ A(() => (t.interaction.interactionClasses ?? []).find((e) => e.startsWith("qti-input-width-"))), y = /* @__PURE__ */ A(() => (t.interaction.interactionClasses ?? []).filter((e) => !e.startsWith("qti-input-width-")).join(" ")), b = /* @__PURE__ */ A(() => ne(t.interaction, U(v) ? { widthClass: U(v) } : void 0)), ee = /* @__PURE__ */ A(() => [
2833
- t.interaction.accessibility?.description ? d : "",
2834
- t.contextId ?? "",
2835
- U(p) ? c : ""
2836
- ].filter(Boolean).join(" ") || void 0);
2837
- function ie(e) {
2838
- let n = e.currentTarget, r = n?.value ?? "";
2839
- s()(t.interaction.responseId, r), n?.validity.valid && R(f, !1);
2840
- }
2841
- function ae(e) {
2842
- e.preventDefault(), R(f, !0);
2843
- }
2844
- function oe(e) {
2845
- e.currentTarget?.checkValidity();
2846
- }
2847
- var se = Fs(), C = hr(se);
2848
- ko(C);
2849
- var ce = _r(C, 2), le = (e) => {
2850
- var n = Ns(), r = gr(n, !0);
2851
- z(() => {
2852
- J(n, "id", d), q(r, t.interaction.accessibility.description);
2853
- }), G(e, n);
2854
- };
2855
- za(ce, (e) => {
2856
- t.interaction.accessibility?.description && e(le);
2857
- });
2858
- var ue = _r(ce, 2), de = (e) => {
2859
- var t = Ps(), n = gr(t, !0);
2860
- z(() => {
2861
- J(t, "id", c), q(n, U(p));
2862
- }), G(e, t);
2863
- };
2864
- za(ue, (e) => {
2865
- U(p) && e(de);
2866
- }), z((e, n, r, i) => {
2867
- lo(C, 1, e, "svelte-v4bfxs"), fo(C, U(b)), J(C, "placeholder", n), J(C, "pattern", r), J(C, "data-format", t.interaction.format || void 0), J(C, "inputmode", U(_)), J(C, "aria-label", i), J(C, "aria-invalid", U(p) ? "true" : void 0), J(C, "aria-describedby", U(ee)), Ao(C, U(h)), C.disabled = o(), C.dir = C.dir;
2868
- }, [
2869
- () => ro([
2870
- "qti-inline-input",
2871
- a() === null ? "" : "qti-inline-input-correct",
2872
- U(v) ?? "",
2873
- U(y)
2874
- ].filter(Boolean).join(" ")),
2875
- () => t.interaction.placeholderText || u(t.i18n, "interactions.inline.placeholder", "..."),
2876
- () => t.interaction.patternMask ? te(t.interaction.patternMask) : void 0,
2877
- () => a() ? l(u(t.i18n, "accessibility.sentence", "{text}.", { text: U(g) }), u(t.i18n, "accessibility.correctAnswerIs", "Correct answer: {answer}.", { answer: a() })) : U(g)
2878
- ]), zi("input", C, ie), Ri("invalid", C, ae), Ri("blur", C, oe), G(e, se), At();
2879
- }
2880
- Bi(["input"]);
2881
- //#endregion
2882
- //#region src/components/ItemBody.svelte
2883
- var Rs = 0, zs = /* @__PURE__ */ W("<div class=\"qti-item-body svelte-11qbngh\"><!> <div class=\"qti-item-body-content svelte-11qbngh\"></div></div> <div class=\"qti-feedback-announcer svelte-11qbngh\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"> </div>", 1), Bs = {
2884
- hash: "svelte-11qbngh",
2885
- code: "\n /* Allow the whole item body to shrink inside flex/grid layouts (prevents overflow). */.qti-item-body.svelte-11qbngh {max-width:100%;min-width:0;}\n\n /* Read by screen readers, never seen: the feedback status message region. */.qti-feedback-announcer.svelte-11qbngh {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.qti-item-body-content.svelte-11qbngh {max-width:none;margin-bottom:1rem;}\n\n /*\n * Custom elements default to inline; force them to be block-level and width-contained.\n * This prevents wide interactions (SVGs, tables, canvases) from spilling outside panels.\n */.qti-item-body :is(\n pie-qti-choice,\n pie-qti-slider,\n pie-qti-order,\n pie-qti-match,\n pie-qti-associate,\n pie-qti-gap-match,\n pie-qti-hotspot,\n pie-qti-hottext,\n pie-qti-media,\n pie-qti-custom,\n pie-qti-portable-custom,\n pie-qti-end-attempt,\n pie-qti-position-object,\n pie-qti-graphic-gap-match,\n pie-qti-graphic-order,\n pie-qti-graphic-associate,\n pie-qti-select-point,\n pie-qti-extended-text\n ) {display:block;max-width:100%;min-width:0;}\n\n /*\n * Each interaction mounts into the empty slot that replaced its element in the body. A block\n * slot takes its own line wherever it was authored, also inside a paragraph; an inline slot\n * stays in the sentence.\n */.qti-item-body .qti-interaction-slot--block {display:block;max-width:100%;min-width:0;margin-block:1rem;}\n\n /* Interactions whose element is not in the body render after it. */.qti-item-body .qti-item-body-unslotted {display:flow-root;}\n\n /*\n * An interaction that failed to render — a mount that threw, or a component the registry\n * could not resolve — stands in as a role=\"alert\" placeholder naming it, styled like the\n * player's error alert so a failed interaction reads as one, consistently. The border is\n * a non-text indicator (WCAG 1.4.11), so it strokes with the error TEXT colour (>= 4.5:1\n * on base surfaces) rather than the fill (about 2.9:1 on white), matching the\n * *-text-token convention ShadowBaseStyles documents for indicator strokes; the fill\n * stays a tinted background.\n */.qti-item-body .qti-interaction-error {display:block;max-width:100%;margin-block:1rem;padding:0.75rem 1rem;border:1px solid var(--pie-qti-error-text, #b91c1c);border-radius:0.75rem;background:color-mix(in oklch, var(--pie-qti-error, oklch(71% 0.194 13.428)) 8%, transparent);color:var(--pie-qti-base-content, oklch(21% 0 0));}\n\n /*\n * Interaction markup with no interaction data behind it (nothing renders it) stays hidden\n * rather than showing raw prompt and choice text.\n */.qti-item-body .qti-hidden-interaction {display:none !important;}\n\n /*\n * Style for inline feedback elements that appear within choice text or other content.\n * Provides visual distinction and spacing for feedback that appears inline with content.\n */.qti-feedback-inline {display:inline-block;margin-inline-start:0.5rem;padding-inline-start:0.5rem;border-inline-start:2px solid var(--pie-qti-base-content, currentColor);opacity:0.8;}\n\n /* QTI 3.0 Shared Stimulus: stimulus blocks that were prepended before the item body */.qti-stimulus-block {margin-bottom:1rem;}\n\n /* QTI rubricBlock / qti-rubric-block content rendered in item-body source order. */.qti-item-body .qti-rubric-block {display:block;max-width:100%;min-width:0;margin:1rem 0;padding:1rem;overflow-x:auto;border:1px solid var(--pie-qti-base-300, #d1d5db);border-inline-start:4px solid var(--pie-qti-primary, #2563eb);border-radius:0.5rem;background:var(--pie-qti-base-200, #f8fafc);}.qti-item-body .qti-rubric-block > :first-child {margin-top:0;}.qti-item-body .qti-rubric-block > :last-child {margin-bottom:0;}.qti-item-body .qti-rubric-block table {max-width:100%;border-collapse:collapse;}.qti-item-body .qti-rubric-block th,\n .qti-item-body .qti-rubric-block td {padding:0.5rem;border:1px solid var(--pie-qti-base-300, #d1d5db);vertical-align:top;}\n\n /* QTI 3.0 Shared Vocabulary: qti-input-width-N sets minimum input width in character units. */.qti-input-width-1 {min-width:1ch;}.qti-input-width-2 {min-width:2ch;}.qti-input-width-3 {min-width:3ch;}.qti-input-width-4 {min-width:4ch;}.qti-input-width-5 {min-width:5ch;}.qti-input-width-6 {min-width:6ch;}.qti-input-width-10 {min-width:10ch;}.qti-input-width-15 {min-width:15ch;}.qti-input-width-20 {min-width:20ch;}.qti-input-width-25 {min-width:25ch;}.qti-input-width-30 {min-width:30ch;}.qti-input-width-35 {min-width:35ch;}.qti-input-width-40 {min-width:40ch;}.qti-input-width-45 {min-width:45ch;}.qti-input-width-50 {min-width:50ch;}.qti-input-width-72 {min-width:72ch;}"
2886
- };
2887
- function Vs(t, n) {
2888
- kt(n, !0), Qa(t, Bs);
2889
- let r = Y(n, "disabled", 3, !1), i = Y(n, "renderItemBodyRubrics", 3, !0), o = `qti-item-body-${++Rs}`, l = `[data-qti-item-body-scope="${o}"]`, x = /* @__PURE__ */ A(() => a(n.session)), S = /* @__PURE__ */ A(() => (n.revision, n.session.state())), te = /* @__PURE__ */ A(() => U(S).responses), ne = /* @__PURE__ */ new Set(), re = null, ie = /* @__PURE__ */ A(() => {
2890
- let e = U(S), t = U(x).getPnp(), a = U(x).getSecurityConfig(), o = U(x).getResponseIdentifiersPrintedInContent(), s = U(x).getContextIdentifiersPrintedInContent(), c = re;
2891
- if (c && c.disabled === r() && c.renderItemBodyRubrics === i() && c.heuristicsConfig === n.heuristicsConfig && c.lifecycleStatus === e.lifecycleStatus && c.pnp === t && c.security === a && c.printedResponseIds === o && c.printedContextIds === s && ue(c.outcomes, e.outcomes) && ue(c.templates, e.templates) && de(c.context, e.context, s) && de(c.responses, e.responses, o)) return c.presentation;
2892
- let u = n.session.present({
2893
- disabled: r(),
2894
- heuristicsConfig: n.heuristicsConfig,
2895
- itemBodyScopeSelector: l,
2896
- renderItemBodyRubrics: i(),
2897
- onComponentError: (e, t) => {
2898
- console.error(`Failed to get tag name for ${e.type}:`, t), !ne.has(e.type) && (ne.add(e.type), queueMicrotask(() => n.onError?.({
2899
- code: "render-failed",
2900
- cause: t
2901
- })));
2902
- }
2903
- });
2904
- return re = {
2905
- presentation: u,
2906
- disabled: r(),
2907
- renderItemBodyRubrics: i(),
2908
- heuristicsConfig: n.heuristicsConfig,
2909
- lifecycleStatus: e.lifecycleStatus,
2910
- pnp: t,
2911
- security: a,
2912
- outcomes: e.outcomes,
2913
- templates: e.templates,
2914
- context: e.context,
2915
- responses: e.responses,
2916
- printedResponseIds: o,
2917
- printedContextIds: s
2918
- }, u;
2919
- }), ae = /* @__PURE__ */ A(() => s(U(ie).contentLanguage)), oe = /* @__PURE__ */ A(() => {
2920
- let e = U(ie).flow.find((e) => e.kind === "html");
2921
- return e?.kind === "html" ? String(e.html) : "";
2922
- }), se = /* @__PURE__ */ A(() => U(x).getSecurityConfig()), C = /* @__PURE__ */ A(() => ({
2923
- presentation: U(ie),
2924
- responses: U(te),
2925
- i18n: n.i18n,
2926
- typeset: n.typeset,
2927
- security: U(se)
2928
- })), ce = /* @__PURE__ */ A(() => (U(oe), { player: U(x) }));
2929
- function le(e, t) {
2930
- try {
2931
- n.session.dispatch({
2932
- action: "setResponse",
2933
- responseIdentifier: e,
2934
- value: t
2935
- }), n.onResponseChange?.(e, t);
2936
- } catch (e) {
2937
- if (n.onError) {
2938
- n.onError({
2939
- code: "response-dispatch-failed",
2940
- cause: e
2941
- });
2942
- return;
2943
- }
2944
- throw e;
2945
- }
2946
- }
2947
- function ue(e, t) {
2948
- let n = Object.keys(e), r = Object.keys(t);
2949
- return n.length === r.length && n.every((n) => g(e[n], t[n]));
2950
- }
2951
- function de(e, t, n) {
2952
- for (let r of n) if (!g(e[r], t[r])) return !1;
2953
- return !0;
2954
- }
2955
- function fe(e) {
2956
- let { responseId: t, value: n } = e.detail;
2957
- le(t, n);
2958
- }
2959
- let pe = (e) => U(x).createPciHost(e), me = /* @__PURE__ */ L(null);
2960
- kr(() => {
2961
- if (!U(me)) return;
2962
- let e = U(me), t = () => {
2963
- m(e) || U(x).applyPnp(e);
2964
- };
2965
- t();
2966
- let n = U(x).onPnpChange(() => t()), r = (e) => fe(e);
2967
- return e.addEventListener("qti-change", r), () => {
2968
- e.removeEventListener("qti-change", r), n();
2969
- };
2970
- });
2971
- let he = /* @__PURE__ */ L(rr({ text: "" }));
2972
- kr(() => {
2973
- let e = n.session;
2974
- R(he, { text: "" }, !0);
2975
- let t;
2976
- try {
2977
- t = e.subscribe((t) => ge(e, t));
2978
- } catch {}
2979
- return () => t?.();
2980
- });
2981
- function ge(e, t) {
2982
- if (t.current.disposed || !b(t, t.current.role)) return;
2983
- let r;
2984
- try {
2985
- r = e.present({
2986
- heuristicsConfig: n.heuristicsConfig,
2987
- itemBodyScopeSelector: l,
2988
- renderItemBodyRubrics: i()
2989
- });
2990
- } catch {
2991
- return;
2992
- }
2993
- let { shown: a, text: o } = r.shownFeedback;
2994
- if (!a) {
2995
- R(he, { text: "" }, !0);
2996
- return;
2997
- }
2998
- let d = o || u(n.i18n, "feedback.shown", "Feedback is shown.");
2999
- R(he, {
3000
- text: ee(U(he).text, d),
3001
- language: o ? s(r.contentLanguage) : c(n.i18n)
3002
- }, !0);
3003
- }
3004
- function _e(t, r) {
3005
- let i = r, a = 0, s = () => `${o}-context-${++a}`, c = (e) => i.presentation.capabilities.canViewCorrectResponses ? i.presentation.correctResponses[e] ?? null : null, l = (e) => {
3006
- let t = i.responses[e];
3007
- return typeof t == "string" ? t : "";
3008
- };
3009
- function f(e) {
3010
- let t = "stringIdentifier" in e.interaction && typeof e.interaction.stringIdentifier == "string" ? e.interaction.stringIdentifier : void 0;
3011
- return {
3012
- response: i.responses[e.interaction.responseId] ?? null,
3013
- ...t ? { stringResponse: i.responses[t] ?? null } : {},
3014
- correctResponse: i.presentation.capabilities.canViewCorrectResponses ? i.presentation.correctResponses[e.interaction.responseId] ?? null : null
3015
- };
3016
- }
3017
- function p(e) {
3018
- return {
3019
- i18n: i.i18n,
3020
- typeset: i.typeset,
3021
- interaction: e.interaction,
3022
- ...f(e),
3023
- pnp: e.pnp,
3024
- eliminationTool: e.eliminationTool,
3025
- answerMasking: e.answerMasking,
3026
- structuredLabelSupport: e.structuredLabelSupport,
3027
- disabled: e.disabled,
3028
- role: e.componentRole,
3029
- security: i.security,
3030
- createPciHost: pe
3031
- };
3032
- }
3033
- function m(n) {
3034
- let r = t.ownerDocument.createElement(n.tagName);
3035
- ve(r, n.interaction.readAloud);
3036
- let i = n, a = !1;
3037
- return e(r, p(i)), customElements.get(n.tagName) || customElements.whenDefined(n.tagName).then(() => {
3038
- a || ye(r, p(i));
3039
- }), {
3040
- element: r,
3041
- update(t) {
3042
- i = t, e(r, p(i));
3043
- },
3044
- destroy() {
3045
- a = !0;
3046
- }
3047
- };
3048
- }
3049
- function g(e) {
3050
- let n = t.ownerDocument.createElement("span");
3051
- n.className = "qti-inline-interaction", ve(n, e.interaction.readAloud);
3052
- let r = () => ({
3053
- position: e.position,
3054
- response: l(e.interaction.responseId),
3055
- correctAnswer: c(e.interaction.responseId),
3056
- disabled: i.presentation.disabled,
3057
- i18n: i.i18n,
3058
- onResponseChange: le
3059
- });
3060
- if (e.renderer === "text-entry") {
3061
- let a = (e) => {
3062
- let t = h(e);
3063
- return (t ? i.responses[t] : void 0) ?? null;
3064
- }, o = rr({
3065
- interaction: e.interaction,
3066
- ...r(),
3067
- stringResponse: a(e.interaction)
3068
- }), c = Ea(Ls, {
3069
- target: n,
3070
- props: o
3071
- });
3072
- return {
3073
- element: n,
3074
- update(t) {
3075
- t.placement === "inline" && t.renderer === "text-entry" && (e = t, Object.assign(o, {
3076
- interaction: t.interaction,
3077
- ...r(),
3078
- stringResponse: a(t.interaction)
3079
- }));
3080
- },
3081
- placed(e) {
3082
- o.contextId = e ? y(e, t, s) : void 0;
3083
- },
3084
- destroy() {
3085
- Aa(c);
3086
- }
3087
- };
3088
- }
3089
- let a = rr({
3090
- interaction: e.interaction,
3091
- ...r()
3092
- }), o = Ea(Ms, {
3093
- target: n,
3094
- props: a
3095
- });
3096
- return {
3097
- element: n,
3098
- update(t) {
3099
- t.placement === "inline" && t.renderer === "inline-choice" && (e = t, Object.assign(a, {
3100
- interaction: t.interaction,
3101
- ...r()
3102
- }));
3103
- },
3104
- placed(e) {
3105
- a.contextId = e ? y(e, t, s) : void 0;
3106
- },
3107
- destroy() {
3108
- Aa(o);
3109
- }
3110
- };
3111
- }
3112
- let b = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set(), S = v(t, {
3113
- create: (e) => {
3114
- try {
3115
- let t = e.placement === "block" ? m(e) : g(e);
3116
- return x.delete(e.key), t;
3117
- } catch (t) {
3118
- throw x.add(e.key), t;
3119
- }
3120
- },
3121
- onError: (e, r) => {
3122
- console.error(`Failed to render ${e.interaction.type}:`, r), n.onError?.({
3123
- code: "render-failed",
3124
- cause: r
3125
- }), x.has(e.key) && (ee.add(e.key), te(t, e));
3126
- }
3127
- });
3128
- function te(e, t) {
3129
- let r = b.get(t.key);
3130
- if (r || (r = e.ownerDocument.createElement("div"), r.className = "qti-interaction-error", r.setAttribute("role", "alert"), b.set(t.key, r)), r.textContent = u(n.i18n, "interaction.renderError", "This interactive element ({type}) could not be displayed.", { type: t.interaction.type }), t.slot !== null) {
3131
- let n = Array.from(e.querySelectorAll(`[${d}]`)).find((e) => e.getAttribute(d) === t.slot);
3132
- if (n) {
3133
- n.contains(r) || n.replaceChildren(r);
3134
- return;
3135
- }
3136
- }
3137
- let i = Array.from(e.children).find((e) => e.classList.contains(_)) ?? (() => {
3138
- let t = e.ownerDocument.createElement("div");
3139
- return t.className = _, e.append(t), t;
3140
- })();
3141
- r.parentNode !== i && i.append(r);
3142
- }
3143
- let ne = () => xi(() => {
3144
- ee.clear();
3145
- let e = i.presentation.flow.find((e) => e.kind === "html"), n = i.presentation.flow.flatMap((e) => e.kind === "interaction" ? [e.mount] : []);
3146
- S.render(e?.kind === "html" ? e.html : "", n);
3147
- for (let e of i.presentation.failedInteractions) ee.add(e.key), te(t, e);
3148
- for (let [e, t] of b) ee.has(e) || (t.remove(), b.delete(e));
3149
- });
3150
- return ne(), {
3151
- update(e) {
3152
- i = e, ne();
3153
- },
3154
- destroy() {
3155
- S.destroy();
3156
- }
3157
- };
3158
- }
3159
- function ve(e, t) {
3160
- for (let [n, r] of Object.entries(t ?? {})) e.setAttribute(n, r);
3161
- }
3162
- function ye(e, t) {
3163
- let n = e;
3164
- for (let [e, r] of Object.entries(t)) r !== void 0 && (Object.prototype.hasOwnProperty.call(n, e) && delete n[e], n[e] = r);
3165
- }
3166
- var be = zs(), xe = hr(be), Se = mr(xe), Ce = (e) => {
3167
- var t = Yi();
3168
- Za(hr(t), () => "style", !1, (e, t) => {
3169
- Mo(e, () => ({ "data-qti-stylesheets": "resolved" }));
3170
- var n = Ji();
3171
- z(() => q(n, U(ie).scopedCss)), G(t, n);
3172
- }), G(e, t);
3173
- };
3174
- za(Se, (e) => {
3175
- U(ie).scopedCss && e(Ce);
3176
- });
3177
- var we = _r(Se, 2);
3178
- $a(we, (e, t) => _e?.(e, t), () => U(C)), $a(we, (e, t) => p?.(e, t), () => U(ce)), ut(xe), Wo(xe, (e) => R(me, e), () => U(me)), $a(xe, (e, t) => f?.(e, t), () => ({ typeset: n.typeset }));
3179
- var Te = _r(xe, 2), Ee = gr(Te, !0);
3180
- z(() => {
3181
- J(xe, "data-qti-item-body-scope", o), J(xe, "lang", U(ae)?.lang), J(xe, "dir", U(ae)?.dir), xe.dir = xe.dir, J(Te, "lang", U(he).language?.lang), J(Te, "dir", U(he).language?.dir), q(Ee, U(he).text), Te.dir = Te.dir;
3182
- }), G(t, be), At();
3183
- }
3184
- //#endregion
3185
- //#region src/components/ModalFeedbackDisplay.svelte
3186
- var Hs = /* @__PURE__ */ W("<h3 class=\"qti-feedback-title svelte-i66ia0\"> </h3>"), Us = /* @__PURE__ */ W("<div><!> <div class=\"qti-feedback-content svelte-i66ia0\"></div></div>"), Ws = /* @__PURE__ */ W("<dialog class=\"qti-feedback-modal svelte-i66ia0\"><div class=\"qti-feedback-modal-box svelte-i66ia0\"><button class=\"qti-feedback-close-button svelte-i66ia0\" type=\"button\"><span aria-hidden=\"true\">✕</span></button> <!> <div class=\"qti-feedback-actions svelte-i66ia0\"><button class=\"qti-feedback-primary-button svelte-i66ia0\" type=\"button\"> </button></div></div></dialog>"), Gs = {
3187
- hash: "svelte-i66ia0",
3188
- code: ".qti-feedback-modal.svelte-i66ia0 {box-sizing:border-box;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background-color:rgba(0, 0, 0, 0.5);color:var(--pie-qti-base-content, oklch(21% 0 0));}\n\n /* The dialog itself is the full-viewport scrim; its native backdrop stays transparent. */.qti-feedback-modal.svelte-i66ia0::backdrop {background:transparent;}.qti-feedback-modal[open].svelte-i66ia0 {display:grid;place-items:center;}.qti-feedback-modal-box.svelte-i66ia0 {position:relative;box-sizing:border-box;width:min(48rem, calc(100vw - 2rem));max-height:80vh;overflow-y:auto;padding:1.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:1rem;background:var(--pie-qti-base-100, oklch(100% 0 0));box-shadow:0 20px 45px rgba(0, 0, 0, 0.2);}.qti-feedback-close-button.svelte-i66ia0,\n .qti-feedback-primary-button.svelte-i66ia0 {display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--pie-qti-border-strong, #767676);background:var(--pie-qti-base-100, oklch(100% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;cursor:pointer;}.qti-feedback-close-button.svelte-i66ia0 {position:absolute;top:0.5rem;inset-inline-end:0.5rem;width:2.5rem;height:2.5rem;padding:0;border-radius:9999px;background:transparent;border-color:transparent;}.qti-feedback-close-button.svelte-i66ia0:hover {background:var(--pie-qti-base-200, oklch(98% 0 0));border-color:var(--pie-qti-border-strong, #767676);}.qti-feedback-primary-button.svelte-i66ia0 {gap:0.5rem;min-height:2.75rem;padding:0.5rem 1rem;border-radius:0.75rem;border-color:var(--pie-qti-primary, oklch(45% 0.24 277));background:color-mix(in oklch, var(--pie-qti-primary, oklch(45% 0.24 277)) 12%, transparent);}.qti-feedback-close-button.svelte-i66ia0:focus-visible,\n .qti-feedback-primary-button.svelte-i66ia0:focus-visible,\n .qti-feedback-title.svelte-i66ia0:focus-visible,\n .qti-feedback-content.svelte-i66ia0:focus-visible {outline:2px solid var(--pie-qti-focus, #4338ca);outline-offset:2px;}.qti-feedback-item.svelte-i66ia0 {margin-bottom:1rem;}.qti-feedback-item-bordered.svelte-i66ia0 {padding-bottom:1rem;border-bottom:1px solid var(--pie-qti-base-300, oklch(95% 0 0));}.qti-feedback-title.svelte-i66ia0 {margin:0 0 0.5rem;\n /* Keep the title clear of the close button. */padding-inline-end:2.5rem;font-size:1.125rem;font-weight:700;}.qti-feedback-content.svelte-i66ia0 {max-width:none;}.qti-feedback-actions.svelte-i66ia0 {display:flex;justify-content:flex-end;margin-top:1rem;}"
3189
- };
3190
- function Ks(e, t) {
3191
- let n = Xi();
3192
- kt(t, !0), Qa(e, Gs);
3193
- let r = Y(t, "feedback", 19, () => []), i = /* @__PURE__ */ A(() => s(t.contentLanguage)), a = /* @__PURE__ */ A(() => r().length > 0), o = `${n}-title`, c = /* @__PURE__ */ A(() => r().findIndex((e) => e.title)), l = /* @__PURE__ */ L(null), d = !1;
3194
- kr(() => {
3195
- let e = U(l);
3196
- if (!e) return;
3197
- let t = ae(e.ownerDocument), n = e.parentElement;
3198
- return se(e), oe(e.querySelector("[data-initial-focus]")), () => {
3199
- e.isConnected && ie(e), C(t) || oe(n);
3200
- };
3201
- });
3202
- function p() {
3203
- t.onClose?.();
3204
- }
3205
- function m(e) {
3206
- e.key === "Escape" && (e.preventDefault(), p());
3207
- }
3208
- function h(e) {
3209
- e.preventDefault(), p();
3210
- }
3211
- function g(e) {
3212
- d = e.target === e.currentTarget;
3213
- }
3214
- function _(e) {
3215
- let t = d && e.target === e.currentTarget;
3216
- d = !1, t && p();
3217
- }
3218
- var v = Yi(), y = hr(v), b = (e) => {
3219
- var n = Ws(), a = mr(n), s = mr(a), d = _r(s, 2);
3220
- Wa(d, 17, r, Ba, (e, n, a) => {
3221
- var s = Us();
3222
- let l;
3223
- var u = mr(s), d = (e) => {
3224
- var t = Hs(), r = gr(t, !0);
3225
- z(() => {
3226
- J(t, "id", a === U(c) ? o : void 0), J(t, "data-initial-focus", a === U(c) ? "" : void 0), q(r, U(n).title);
3227
- }), G(e, t);
3228
- };
3229
- za(u, (e) => {
3230
- U(n).title && e(d);
3231
- });
3232
- var p = _r(u, 2);
3233
- Xa(p, () => U(n).content, !0), ut(p), $a(p, (e, t) => f?.(e, t), () => ({ typeset: t.typeset })), ut(s), z(() => {
3234
- J(s, "lang", U(i)?.lang), J(s, "dir", U(i)?.dir), l = lo(s, 1, "svelte-i66ia0", null, l, {
3235
- "qti-feedback-item": !0,
3236
- "qti-feedback-item-bordered": a < r().length - 1
3237
- }), J(p, "data-initial-focus", U(c) < 0 && a === 0 ? "" : void 0), s.dir = s.dir;
3238
- }), G(e, s);
3239
- });
3240
- var v = _r(d, 2), y = mr(v), b = gr(y, !0);
3241
- ut(v), ut(a), ut(n), Wo(n, (e) => R(l, e), () => U(l)), z((e, t, r) => {
3242
- J(n, "aria-labelledby", U(c) >= 0 ? o : void 0), J(n, "aria-label", e), J(s, "aria-label", t), q(b, r);
3243
- }, [
3244
- () => U(c) >= 0 ? void 0 : u(t.i18n, "feedback.title", "Feedback"),
3245
- () => u(t.i18n, "feedback.closeFeedback", "Dismiss feedback"),
3246
- () => u(t.i18n, "common.continue", "Continue")
3247
- ]), Ri("cancel", n, h), Ri("close", n, p), zi("keydown", n, m), zi("pointerdown", n, g), zi("click", n, _), zi("click", s, p), zi("click", y, p), G(e, n);
3248
- };
3249
- za(y, (e) => {
3250
- U(a) && e(b);
3251
- }), G(e, v), At();
3252
- }
3253
- Bi([
3254
- "keydown",
3255
- "pointerdown",
3256
- "click"
3257
- ]);
3258
- //#endregion
3259
- //#region src/components/ItemPlayer.svelte
3260
- var qs = /* @__PURE__ */ W("<div class=\"qti-player-alert qti-player-alert-error svelte-129urwy\" role=\"alert\"><span> </span></div>"), Js = /* @__PURE__ */ W("<span class=\"qti-player-badge qti-player-badge-success svelte-129urwy\"> </span>"), Ys = /* @__PURE__ */ W("<span> </span>"), Xs = /* @__PURE__ */ W("<div class=\"qti-player-attempt-status svelte-129urwy\"><!></div>"), Zs = /* @__PURE__ */ W("<div class=\"qti-player-actions svelte-129urwy\"><button class=\"qti-player-button qti-player-button-primary svelte-129urwy\"> </button> <!></div>"), Qs = /* @__PURE__ */ W("<!> <!> <!>", 1), $s = /* @__PURE__ */ W("<div class=\"qti-player-alert qti-player-alert-info svelte-129urwy\" role=\"status\"><span> </span></div>"), ec = /* @__PURE__ */ W("<div class=\"qti-item-player svelte-129urwy\"><!></div>"), tc = {
3261
- hash: "svelte-129urwy",
3262
- code: ".qti-item-player.svelte-129urwy {color:var(--pie-qti-base-content, oklch(21% 0 0));}.qti-player-alert.svelte-129urwy {display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:0.75rem;background:var(--pie-qti-base-200, oklch(98% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));}.qti-player-alert-error.svelte-129urwy {border-color:var(--pie-qti-error, oklch(71% 0.194 13.428));background:color-mix(in oklch, var(--pie-qti-error, oklch(71% 0.194 13.428)) 8%, transparent);}.qti-player-alert-info.svelte-129urwy {border-color:var(--pie-qti-info, oklch(74% 0.16 232.661));background:color-mix(in oklch, var(--pie-qti-info, oklch(74% 0.16 232.661)) 8%, transparent);}.qti-player-actions.svelte-129urwy {display:flex;align-items:center;gap:1rem;margin-top:1.5rem;}.qti-player-button.svelte-129urwy {display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;min-height:2.75rem;padding:0.5rem 1rem;border:1px solid var(--pie-qti-border-strong, #767676);border-radius:0.75rem;background:var(--pie-qti-base-200, oklch(98% 0 0));color:var(--pie-qti-base-content, oklch(21% 0 0));font:inherit;line-height:1.1;cursor:pointer;}.qti-player-button-primary.svelte-129urwy {border-color:var(--pie-qti-primary, oklch(45% 0.24 277));background:color-mix(in oklch, var(--pie-qti-primary, oklch(45% 0.24 277)) 12%, transparent);}.qti-player-button.svelte-129urwy:disabled {opacity:0.55;cursor:not-allowed;}.qti-player-button.svelte-129urwy:focus-visible {outline:2px solid var(--pie-qti-focus, #4338ca);outline-offset:2px;}.qti-player-attempt-status.svelte-129urwy {color:color-mix(in oklch, var(--pie-qti-base-content, oklch(21% 0 0)) 70%, transparent);font-size:0.875rem;}.qti-player-badge.svelte-129urwy {display:inline-flex;align-items:center;justify-content:center;min-height:1.25rem;padding:0 0.5rem;border:1px solid var(--pie-qti-base-300, oklch(95% 0 0));border-radius:9999px;font-size:0.75rem;font-weight:600;}.qti-player-badge-success.svelte-129urwy {border-color:var(--pie-qti-success, oklch(76% 0.177 163.223));background:color-mix(in oklch, var(--pie-qti-success, oklch(76% 0.177 163.223)) 12%, transparent);}"
3263
- };
3264
- function nc(e, t) {
3265
- kt(t, !0), Qa(e, tc);
3266
- let s = Y(t, "role", 3, "candidate"), l = Y(t, "responses", 19, () => ({})), d = Y(t, "disabled", 3, !1), f = Y(t, "renderItemBodyRubrics", 3, !0), p = /* @__PURE__ */ A(() => t.showSubmit ?? !!t.onSubmit), m = /* @__PURE__ */ L(null), h = /* @__PURE__ */ L(null), g = /* @__PURE__ */ L(null), _ = /* @__PURE__ */ L(rr([])), v = /* @__PURE__ */ A(() => U(g) === "load" ? u(t.i18n, "item.loadingError", "Failed to load item") : U(g) === "submission" ? u(t.i18n, "item.submitError", "Your answer could not be submitted. Please try again.") : U(g) === "processing" ? u(t.i18n, "item.processingError", "Failed to process responses") : null), y = /* @__PURE__ */ A(() => U(h)?.adaptive ?? !1), b = /* @__PURE__ */ A(() => U(h)?.completed ?? !1), ee = /* @__PURE__ */ A(() => U(h)?.numAttempts ?? 0), x = /* @__PURE__ */ A(() => U(h)?.canSubmit ?? !1), S = /* @__PURE__ */ A(() => U(h)?.role ?? s());
3267
- function te(e) {
3268
- R(h, e, !0);
3269
- }
3270
- let ne = /* @__PURE__ */ A(() => o.itemXml.sessionValue(t.itemXml)), re = /* @__PURE__ */ A(() => o.role.sessionValue(s())), ie = /* @__PURE__ */ A(() => o.security.sessionValue(t.security)), ae = /* @__PURE__ */ A(() => o.pnp.sessionValue(t.pnp)), oe = /* @__PURE__ */ A(() => o.deliveryContext.sessionValue(t.deliveryContext)), se = /* @__PURE__ */ A(() => o.resolveProcessingFragment.sessionValue(t.resolveProcessingFragment)), C = /* @__PURE__ */ A(() => o.processingFragmentLimits.sessionValue(t.processingFragmentLimits)), le = /* @__PURE__ */ A(() => o.pci.sessionValue(t.pci)), ue = /* @__PURE__ */ A(() => o.plugins.sessionValue(t.plugins)), de = /* @__PURE__ */ A(() => o.stringComparison.sessionValue(t.stringComparison)), fe = /* @__PURE__ */ A(() => o.showFeedback.sessionValue(t.showFeedback)), pe = /* @__PURE__ */ A(() => o.showSolution.sessionValue(t.showSolution)), me = /* @__PURE__ */ A(() => t.session), he = Math.floor(Math.random() * 2147483647);
3271
- function ge(e) {
3272
- let t = (he ^ e.length) >>> 0;
3273
- for (let n = 0; n < e.length; n++) t = Math.imul(t ^ e.charCodeAt(n), 16777619) >>> 0;
3274
- return t >>> 0;
3275
- }
3276
- function _e(e, t, n) {
3277
- try {
3278
- return e.openSession({
3279
- responses: t,
3280
- presentation: n
3281
- });
3282
- } catch (r) {
3283
- if (!(r instanceof i)) throw r;
3284
- let a = e.openSession({ presentation: n }), o = ve(a, t);
3285
- return Object.keys(o).length > 0 && a.dispatch({
3286
- action: "setResponses",
3287
- responses: o
3288
- }), a;
3289
- }
3290
- }
3291
- function ve(e, t) {
3292
- let r = new Set(Object.keys(e.state().responses));
3293
- for (let e of Object.keys(t)) r.has(e) || n(`item-player:unknown-response-${e}`, `Dropped response '${e}' carried over from the previous item: this item declares no such response identifier.`);
3294
- return Object.fromEntries(Object.entries(t).filter(([e]) => r.has(e)));
3295
- }
3296
- function ye(e) {
3297
- if (!e) return {};
3298
- try {
3299
- let t = e.state().itemIdentifier;
3300
- return t ? { itemIdentifier: t } : {};
3301
- } catch {
3302
- return {};
3303
- }
3304
- }
3305
- kr(() => {
3306
- let e = null, n = !1, i, a = xi(() => ({
3307
- onReady: t.onReady,
3308
- onError: t.onError,
3309
- onOwnedSession: t.onOwnedSession,
3310
- resumeSession: t.resumeSession
3311
- }));
3312
- try {
3313
- if (U(me)) e = U(me);
3314
- else {
3315
- let t = a.resumeSession?.();
3316
- if (t && !t.state().disposed) e = t;
3317
- else {
3318
- let t = xi(() => l()), n = r({
3319
- itemXml: U(ne),
3320
- role: U(re),
3321
- security: U(ie),
3322
- pnp: U(ae),
3323
- deliveryContext: U(oe),
3324
- resolveProcessingFragment: U(se),
3325
- processingFragmentLimits: U(C),
3326
- pci: U(le),
3327
- plugins: U(ue),
3328
- ...U(de) ? { stringComparison: U(de) } : {},
3329
- seed: ge(U(ne))
3330
- });
3331
- i = n.identifier || void 0, e = _e(n, t, {
3332
- showFeedback: U(fe),
3333
- showSolution: U(pe)
3334
- });
3335
- }
3336
- n = !0, a.onOwnedSession?.(e);
3337
- }
3338
- R(m, e, !0), te(e.state()), R(g, null), R(_, [], !0), a.onReady?.();
3339
- let o = e.subscribe((r) => {
3340
- let { command: i, current: a } = r;
3341
- if (te(a), a.disposed) U(m) === e && R(m, null);
3342
- else if (i.action === "setResponse") {
3343
- t.onResponseChange?.(i.responseIdentifier, a.responses[i.responseIdentifier]);
3344
- let o = n ? ce(r, () => e?.present().flow ?? []) : null;
3345
- o && queueMicrotask(() => {
3346
- U(m) === e && xe(o.countAttempt);
3347
- });
3348
- }
3349
- });
3350
- return () => {
3351
- o(), n && e && (t.onOwnedSessionRelease ? t.onOwnedSessionRelease(e) : e.dispose()), U(m) === e && (R(m, null), R(h, null));
3352
- };
3353
- } catch (t) {
3354
- n && e?.dispose(), R(g, "load"), a.onError?.({
3355
- code: "item-load-failed",
3356
- message: t instanceof Error ? t.message : String(t),
3357
- ...i ? { itemIdentifier: i } : {}
3358
- }), R(m, null), R(h, null);
3359
- }
3360
- }), kr(() => {
3361
- let e = l(), n = U(m);
3362
- if (!n || U(me)) return;
3363
- let r = n.state().responses, i = ve(n, e);
3364
- if ([.../* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])].some((e) => r[e] !== i[e])) try {
3365
- n.dispatch({
3366
- action: "setResponses",
3367
- responses: i
3368
- });
3369
- } catch (e) {
3370
- R(g, "processing"), t.onError?.({
3371
- code: "response-processing-failed",
3372
- message: e instanceof Error ? e.message : String(e),
3373
- ...ye(n)
3374
- });
3375
- }
3376
- });
3377
- function be(e) {
3378
- e.code === "response-dispatch-failed" && R(g, "processing"), t.onError?.({
3379
- code: e.code,
3380
- message: e.cause instanceof Error ? e.cause.message : String(e.cause),
3381
- ...ye(U(m))
3382
- });
3383
- }
3384
- function xe(e = !0) {
3385
- if (U(m)) try {
3386
- let n = U(m).dispatch(U(y) ? {
3387
- action: "submitAttempt",
3388
- countAttempt: e
3389
- } : {
3390
- action: "endAttempt",
3391
- countAttempt: e
3392
- }), r = n.result?.scoring;
3393
- if (!r) throw Error("Item session submission did not produce a scoring result");
3394
- R(_, r.modalFeedback || [], !0);
3395
- let i = { ...n.current.responses };
3396
- if (t.onSubmit?.(i, r), U(y)) {
3397
- let e = r;
3398
- return e.completed && t.onComplete?.(e), e;
3399
- }
3400
- return r;
3401
- } catch (e) {
3402
- R(g, "submission"), t.onError?.({
3403
- code: "submission-failed",
3404
- message: e instanceof Error ? e.message : String(e),
3405
- ...ye(U(m))
3406
- });
3407
- }
3408
- }
3409
- function Se() {
3410
- R(_, [], !0);
3411
- }
3412
- let Ce = /* @__PURE__ */ A(() => c(t.i18n));
3413
- kr(() => {
3414
- t.i18n || n("item-player:i18n-missing", "No i18n provider configured: UI messages fall back to English and lang/dir attributes are not set. Pass an I18nProvider from @pie-qti/i18n via the i18n property.");
3415
- });
3416
- let we = /* @__PURE__ */ A(() => U(m) ? a(U(m)).getContentLanguage() : void 0);
3417
- var Te = { submit: xe }, Ee = ec(), De = mr(Ee), Oe = (e) => {
3418
- var t = qs(), n = gr(mr(t), !0);
3419
- ut(t), z(() => q(n, U(v))), G(e, t);
3420
- }, ke = (e) => {
3421
- var n = Qs(), r = hr(n);
3422
- Vs(r, {
3423
- get session() {
3424
- return U(m);
3425
- },
3426
- get revision() {
3427
- return U(h).revision;
3428
- },
3429
- get disabled() {
3430
- return d();
3431
- },
3432
- get typeset() {
3433
- return t.typeset;
3434
- },
3435
- get i18n() {
3436
- return t.i18n;
3437
- },
3438
- get renderItemBodyRubrics() {
3439
- return f();
3440
- },
3441
- onError: be
3442
- });
3443
- var i = _r(r, 2), a = (e) => {
3444
- var n = Zs(), r = mr(n), i = gr(r, !0), a = _r(r, 2), o = (e) => {
3445
- var n = Xs(), r = mr(n), i = (e) => {
3446
- var n = Js(), r = gr(n, !0);
3447
- z((e) => q(r, e), [() => u(t.i18n, "item.complete", "Complete")]), G(e, n);
3448
- }, a = (e) => {
3449
- var n = Ys(), r = gr(n, !0);
3450
- z((e) => q(r, e), [() => u(t.i18n, "item.attempt", "Attempt {numAttempts}", { numAttempts: U(ee) + 1 })]), G(e, n);
3451
- };
3452
- za(r, (e) => {
3453
- U(b) ? e(i) : e(a, -1);
3454
- }), ut(n), G(e, n);
3455
- };
3456
- za(a, (e) => {
3457
- U(y) && e(o);
3458
- }), ut(n), z((e) => {
3459
- r.disabled = U(b) || !U(x), q(i, e);
3460
- }, [() => U(y) && U(b) ? u(t.i18n, "item.completed", "Completed") : u(t.i18n, "item.submit", "Submit")]), zi("click", r, () => xe(!0)), G(e, n);
3461
- };
3462
- za(i, (e) => {
3463
- U(S) === "candidate" && !d() && U(p) && e(a);
3464
- }), Ks(_r(i, 2), {
3465
- get feedback() {
3466
- return U(_);
3467
- },
3468
- onClose: Se,
3469
- get typeset() {
3470
- return t.typeset;
3471
- },
3472
- get i18n() {
3473
- return t.i18n;
3474
- },
3475
- get contentLanguage() {
3476
- return U(we);
3477
- }
3478
- }), G(e, n);
3479
- }, Ae = (e) => {
3480
- var n = $s(), r = gr(mr(n), !0);
3481
- ut(n), z((e) => q(r, e), [() => u(t.i18n, "item.loading", "Loading item...")]), G(e, n);
3482
- };
3483
- return za(De, (e) => {
3484
- U(v) ? e(Oe) : U(m) && U(h) ? e(ke, 1) : e(Ae, -1);
3485
- }), ut(Ee), z(() => {
3486
- J(Ee, "lang", U(Ce)?.lang), J(Ee, "dir", U(Ce)?.dir), Ee.dir = Ee.dir;
3487
- }), G(e, Ee), At(Te);
3488
- }
3489
- Bi(["click"]);
3490
- //#endregion
3491
- //#region src/element-class.ts
3492
- var rc = globalThis.HTMLElement ?? class {}, ic = /* @__PURE__ */ new WeakMap(), ac = /* @__PURE__ */ new WeakMap(), oc = /* @__PURE__ */ new WeakMap(), sc = /* @__PURE__ */ new WeakMap(), cc = /* @__PURE__ */ new WeakMap(), lc = /* @__PURE__ */ new WeakMap(), uc = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), dc = /* @__PURE__ */ new WeakMap(), fc = /* @__PURE__ */ new WeakMap(), pc = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet(), mc = /* @__PURE__ */ new WeakMap(), hc = /* @__PURE__ */ new WeakMap(), gc = /* @__PURE__ */ new WeakMap(), _c = class extends rc {
3493
- constructor(...e) {
3494
- super(...e), rn(this, Q), j(this, ic, t({
3495
- host: this,
3496
- createSubscriber: Zi,
3497
- mount: (e, t) => Ea(nc, {
3498
- target: e,
3499
- props: t
3500
- }),
3501
- unmount: Aa
3502
- })), j(this, ac, !1), j(this, oc, void 0), j(this, sc, !0), j(this, cc, void 0), j(this, lc, void 0), j(this, uc, void 0), j(this, X, {
3503
- itemXml: "",
3504
- role: "candidate",
3505
- security: void 0,
3506
- pnp: void 0,
3507
- deliveryContext: void 0,
3508
- resolveProcessingFragment: void 0,
3509
- processingFragmentLimits: void 0,
3510
- pci: void 0,
3511
- stringComparison: void 0,
3512
- plugins: void 0,
3513
- showFeedback: void 0,
3514
- showSolution: void 0
3515
- }), j(this, Z, void 0), j(this, dc, !1), j(this, fc, void 0), j(this, pc, void 0), j(this, mc, () => P(uc, this) || P(dc, this) ? void 0 : P(Z, this)), j(this, hc, (e) => {
3516
- P(Z, this) && P(Z, this) !== e && P(Z, this).dispose(), N(Z, this, e), N(dc, this, !1);
3517
- }), j(this, gc, (e) => {
3518
- P(uc, this) || e.state().disposed ? (e.dispose(), P(Z, this) === e && (N(Z, this, void 0), N(dc, this, !1))) : N(Z, this, e);
3519
- });
3520
- }
3521
- static get observedAttributes() {
3522
- return [
3523
- "item-xml",
3524
- "qti-role",
3525
- "disabled",
3526
- "locale",
3527
- "show-feedback",
3528
- "show-solution"
3529
- ];
3530
- }
3531
- get itemXml() {
3532
- return P(X, this).itemXml;
3533
- }
3534
- set itemXml(e) {
3535
- M(Q, this, Sc).call(this, "itemXml", e), M(Q, this, $).call(this);
3536
- }
3537
- get role() {
3538
- return P(X, this).role;
3539
- }
3540
- set role(e) {
3541
- M(Q, this, Sc).call(this, "role", e), M(Q, this, $).call(this);
3542
- }
3543
- get disabled() {
3544
- return P(ac, this);
3545
- }
3546
- set disabled(e) {
3547
- N(ac, this, !!e), M(Q, this, $).call(this);
3548
- }
3549
- get locale() {
3550
- return P(oc, this);
3551
- }
3552
- set locale(e) {
3553
- e && !P(lc, this) && n("item-player:locale-without-provider", "locale attribute set but no i18n provider configured: it has no effect. Pass an I18nProvider via the i18n property."), N(oc, this, e ?? void 0), M(Q, this, $).call(this);
3554
- }
3555
- get renderItemBodyRubrics() {
3556
- return P(sc, this);
3557
- }
3558
- set renderItemBodyRubrics(e) {
3559
- N(sc, this, e !== !1), M(Q, this, $).call(this);
3560
- }
3561
- get showFeedback() {
3562
- return P(X, this).showFeedback;
3563
- }
3564
- set showFeedback(e) {
3565
- M(Q, this, Sc).call(this, "showFeedback", e), M(Q, this, $).call(this);
3566
- }
3567
- get showSolution() {
3568
- return P(X, this).showSolution;
3569
- }
3570
- set showSolution(e) {
3571
- M(Q, this, Sc).call(this, "showSolution", e), M(Q, this, $).call(this);
3572
- }
3573
- get typeset() {
3574
- return P(cc, this);
3575
- }
3576
- set typeset(e) {
3577
- N(cc, this, e), M(Q, this, $).call(this);
3578
- }
3579
- get i18n() {
3580
- return P(lc, this);
3581
- }
3582
- set i18n(e) {
3583
- N(lc, this, e), M(Q, this, $).call(this);
3584
- }
3585
- get security() {
3586
- return P(X, this).security;
3587
- }
3588
- set security(e) {
3589
- M(Q, this, Sc).call(this, "security", e), M(Q, this, $).call(this);
3590
- }
3591
- get pnp() {
3592
- return P(X, this).pnp;
3593
- }
3594
- set pnp(e) {
3595
- M(Q, this, Sc).call(this, "pnp", e), M(Q, this, $).call(this);
3596
- }
3597
- get deliveryContext() {
3598
- return P(X, this).deliveryContext;
3599
- }
3600
- set deliveryContext(e) {
3601
- M(Q, this, Sc).call(this, "deliveryContext", e), M(Q, this, $).call(this);
3602
- }
3603
- get pci() {
3604
- return P(X, this).pci;
3605
- }
3606
- set pci(e) {
3607
- M(Q, this, Sc).call(this, "pci", e), M(Q, this, $).call(this);
3608
- }
3609
- get stringComparison() {
3610
- return P(X, this).stringComparison;
3611
- }
3612
- set stringComparison(e) {
3613
- M(Q, this, Sc).call(this, "stringComparison", e), M(Q, this, $).call(this);
3614
- }
3615
- get plugins() {
3616
- return P(X, this).plugins;
3617
- }
3618
- set plugins(e) {
3619
- M(Q, this, Sc).call(this, "plugins", e), M(Q, this, $).call(this);
3620
- }
3621
- get resolveProcessingFragment() {
3622
- return P(X, this).resolveProcessingFragment;
3623
- }
3624
- set resolveProcessingFragment(e) {
3625
- M(Q, this, Sc).call(this, "resolveProcessingFragment", e), M(Q, this, $).call(this);
3626
- }
3627
- get processingFragmentLimits() {
3628
- return P(X, this).processingFragmentLimits;
3629
- }
3630
- set processingFragmentLimits(e) {
3631
- M(Q, this, Sc).call(this, "processingFragmentLimits", e), M(Q, this, $).call(this);
3632
- }
3633
- get responses() {
3634
- return P(pc, this);
3635
- }
3636
- get session() {
3637
- return P(uc, this);
3638
- }
3639
- set session(e) {
3640
- e && P(Z, this) && !this.isConnected && (P(Z, this).dispose(), N(Z, this, void 0), N(dc, this, !1)), N(uc, this, e), M(Q, this, $).call(this);
3641
- }
3642
- set responses(e) {
3643
- N(pc, this, e ? { ...e } : void 0), M(Q, this, $).call(this);
3644
- }
3645
- connectedCallback() {
3646
- M(Q, this, bc).call(this), P(ic, this).mountOrUpdate(M(Q, this, Cc).call(this));
3647
- }
3648
- disconnectedCallback() {
3649
- P(ic, this).teardown({ removeContainer: !0 });
3650
- }
3651
- attributeChangedCallback(e, t, n) {
3652
- e === "item-xml" ? this.itemXml = n ?? "" : e === "qti-role" ? this.role = ue(n) : e === "disabled" ? this.disabled = n !== null : e === "locale" ? (N(oc, this, n ?? void 0), M(Q, this, $).call(this)) : e === "show-feedback" ? this.showFeedback = n !== null || void 0 : e === "show-solution" && (this.showSolution = n !== null || void 0);
3653
- }
3654
- submit(e = !0) {
3655
- return P(ic, this).instance?.submit(e);
3656
- }
3657
- addEventListener(e, t, n) {
3658
- super.addEventListener(e, t, n);
3659
- }
3660
- };
3661
- function vc() {
3662
- if (!P(lc, this) || !P(oc, this)) return P(lc, this);
3663
- let e = P(lc, this).withLocale?.(P(oc, this)) ?? P(lc, this);
3664
- return M(Q, this, yc).call(this, P(lc, this), P(oc, this), e), e;
3665
- }
3666
- function yc(e, t, n) {
3667
- if (!n.ready || P(fc, this)?.i18n === e && P(fc, this).locale === t) return;
3668
- let r = {
3669
- i18n: e,
3670
- locale: t
3671
- };
3672
- N(fc, this, r), n.ready.then(() => {
3673
- P(fc, this) === r && P(lc, this) === e && P(oc, this) === t && M(Q, this, $).call(this);
3674
- });
3675
- }
3676
- function bc() {
3677
- let e = this.getAttribute("role");
3678
- e && le(e) && n("item-player:role-attribute", `The 'role' attribute is the ARIA role and no longer configures the player. Use qti-role="${e}" to render the ${e} view.`);
3679
- }
3680
- function xc() {
3681
- P(Z, this) && (this.isConnected ? N(dc, this, !0) : (P(Z, this).dispose(), N(Z, this, void 0), N(dc, this, !1)));
3682
- }
3683
- function Sc(e, t) {
3684
- let n = o[e], r = n.store(t);
3685
- n.changed(P(X, this)[e], r) && (P(X, this)[e] = r, M(Q, this, xc).call(this));
3686
- }
3687
- function Cc() {
3688
- return {
3689
- itemXml: P(X, this).itemXml,
3690
- session: P(uc, this),
3691
- role: P(X, this).role,
3692
- disabled: P(ac, this),
3693
- renderItemBodyRubrics: P(sc, this),
3694
- typeset: P(cc, this),
3695
- i18n: M(Q, this, vc).call(this),
3696
- security: P(X, this).security,
3697
- pnp: P(X, this).pnp,
3698
- deliveryContext: P(X, this).deliveryContext,
3699
- resolveProcessingFragment: P(X, this).resolveProcessingFragment,
3700
- processingFragmentLimits: P(X, this).processingFragmentLimits,
3701
- pci: P(X, this).pci,
3702
- stringComparison: P(X, this).stringComparison,
3703
- plugins: P(X, this).plugins,
3704
- responses: P(pc, this),
3705
- showFeedback: P(X, this).showFeedback,
3706
- showSolution: P(X, this).showSolution,
3707
- onReady: () => {
3708
- queueMicrotask(() => {
3709
- this.isConnected && this.dispatchEvent(new CustomEvent("ready", {
3710
- bubbles: !0,
3711
- composed: !0
3712
- }));
3713
- });
3714
- },
3715
- onError: (e) => {
3716
- this.dispatchEvent(new CustomEvent("error", {
3717
- detail: e,
3718
- bubbles: !0,
3719
- composed: !0
3720
- }));
3721
- },
3722
- onOwnedSession: P(hc, this),
3723
- onOwnedSessionRelease: P(gc, this),
3724
- resumeSession: P(mc, this),
3725
- onResponseChange: (e, t) => {
3726
- let n = P(uc, this) ?? P(Z, this), r = null;
3727
- if (n) try {
3728
- r = { ...n.state().responses };
3729
- } catch {
3730
- r = null;
3731
- }
3732
- let i = r ?? {
3733
- ...P(pc, this) ?? {},
3734
- [e]: t
3735
- };
3736
- N(pc, this, i), this.dispatchEvent(new CustomEvent("response-change", {
3737
- detail: {
3738
- responseId: e,
3739
- value: t,
3740
- responses: { ...i }
3741
- },
3742
- bubbles: !0,
3743
- composed: !0
3744
- }));
3745
- },
3746
- onSubmit: (e, t) => {
3747
- let n = { ...e };
3748
- N(pc, this, n), this.dispatchEvent(new CustomEvent("submit", {
3749
- detail: {
3750
- responses: n,
3751
- result: t
3752
- },
3753
- bubbles: !0,
3754
- composed: !0
3755
- }));
3756
- },
3757
- showSubmit: !1,
3758
- onComplete: (e) => {
3759
- this.dispatchEvent(new CustomEvent("complete", {
3760
- detail: { result: e },
3761
- bubbles: !0,
3762
- composed: !0
3763
- }));
3764
- }
3765
- };
3766
- }
3767
- function $() {
3768
- P(ic, this).update(M(Q, this, Cc).call(this));
3769
- }
3770
- //#endregion
3771
- export { _c as t };
3772
-
3773
- //# sourceMappingURL=element-class-BbF4Dj7F.js.map