@pie-framework/pie-fixed-player-static 1.0.0-351df72.11 → 1.0.0-351df72.12
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.
- package/README.md +2 -2
- package/dist/pie-fixed-player.js +1748 -1243
- package/package.json +3 -3
package/dist/pie-fixed-player.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Zr = Object.defineProperty;
|
|
2
|
+
var yn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
const
|
|
5
|
+
var Kr = (e, t, n) => t in e ? Zr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var O = (e, t, n) => Kr(e, typeof t != "symbol" ? t + "" : t, n), bn = (e, t, n) => t.has(e) || yn("Cannot " + n);
|
|
7
|
+
var q = (e, t, n) => (bn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Ht = (e, t, n) => t.has(e) ? yn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Vt = (e, t, n, r) => (bn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
|
+
const es = "5";
|
|
9
9
|
var Gn;
|
|
10
|
-
typeof window < "u" && ((Gn = window.__svelte ?? (window.__svelte = {})).v ?? (Gn.v = /* @__PURE__ */ new Set())).add(
|
|
11
|
-
const
|
|
12
|
-
var
|
|
10
|
+
typeof window < "u" && ((Gn = window.__svelte ?? (window.__svelte = {})).v ?? (Gn.v = /* @__PURE__ */ new Set())).add(es);
|
|
11
|
+
const ts = 1, ns = 4, rs = 8, ss = 16, is = 2, It = "[", sn = "[!", on = "]", Ve = {}, H = Symbol(), k = Symbol("filename"), wn = !0, fe = 2, Yn = 4, Ft = 8, ln = 16, _e = 32, De = 64, Et = 128, te = 256, $t = 512, V = 1024, ye = 2048, Ae = 4096, Ye = 8192, Ot = 16384, os = 32768, an = 65536, Jn = 1 << 18, ls = 1 << 19, Wn = 1 << 20, Wt = 1 << 21, Pe = Symbol("$state"), nt = Symbol("$state metadata"), Xn = Symbol("legacy props");
|
|
12
|
+
var cn = Array.isArray, as = Array.prototype.indexOf, cs = Array.from, Rt = Object.keys, ce = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, Zn = Object.prototype, us = Array.prototype, Kn = Object.getPrototypeOf, En = Object.isExtensible;
|
|
13
13
|
function er(e) {
|
|
14
14
|
for (var t = 0; t < e.length; t++)
|
|
15
15
|
e[t]();
|
|
16
16
|
}
|
|
17
|
-
let
|
|
17
|
+
let ut = [], Xt = [];
|
|
18
18
|
function tr() {
|
|
19
|
-
var e =
|
|
20
|
-
|
|
19
|
+
var e = ut;
|
|
20
|
+
ut = [], er(e);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
var e =
|
|
24
|
-
|
|
22
|
+
function fs() {
|
|
23
|
+
var e = Xt;
|
|
24
|
+
Xt = [], er(e);
|
|
25
25
|
}
|
|
26
26
|
function nr(e) {
|
|
27
|
-
|
|
27
|
+
ut.length === 0 && queueMicrotask(tr), ut.push(e);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
29
|
+
function $n() {
|
|
30
|
+
ut.length > 0 && tr(), Xt.length > 0 && fs();
|
|
31
31
|
}
|
|
32
32
|
function rr(e) {
|
|
33
33
|
return e === this.v;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function ds(e, t) {
|
|
36
36
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
37
37
|
}
|
|
38
38
|
function sr(e) {
|
|
39
|
-
return !
|
|
39
|
+
return !ds(e, this.v);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function hs(e, t, n) {
|
|
42
42
|
{
|
|
43
43
|
const r = new Error(`component_api_changed
|
|
44
44
|
${e} called \`${t}\` on an instance of ${n}, which is no longer valid in Svelte 5
|
|
@@ -46,7 +46,7 @@ https://svelte.dev/e/component_api_changed`);
|
|
|
46
46
|
throw r.name = "Svelte error", r;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function gs(e, t) {
|
|
50
50
|
{
|
|
51
51
|
const n = new Error(`component_api_invalid_new
|
|
52
52
|
Attempted to instantiate ${e} with \`new ${t}\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \`compatibility.componentApi\` compiler option to \`4\` to keep it working.
|
|
@@ -54,7 +54,7 @@ https://svelte.dev/e/component_api_invalid_new`);
|
|
|
54
54
|
throw n.name = "Svelte error", n;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function ps() {
|
|
58
58
|
{
|
|
59
59
|
const e = new Error(`derived_references_self
|
|
60
60
|
A derived value cannot reference itself recursively
|
|
@@ -62,7 +62,7 @@ https://svelte.dev/e/derived_references_self`);
|
|
|
62
62
|
throw e.name = "Svelte error", e;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function vs(e) {
|
|
66
66
|
{
|
|
67
67
|
const t = new Error(`effect_in_teardown
|
|
68
68
|
\`${e}\` cannot be used inside an effect cleanup function
|
|
@@ -70,13 +70,13 @@ https://svelte.dev/e/effect_in_teardown`);
|
|
|
70
70
|
throw t.name = "Svelte error", t;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ms() {
|
|
74
74
|
{
|
|
75
75
|
const e = new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");
|
|
76
76
|
throw e.name = "Svelte error", e;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function _s(e) {
|
|
80
80
|
{
|
|
81
81
|
const t = new Error(`effect_orphan
|
|
82
82
|
\`${e}\` can only be used inside an effect (e.g. during component initialisation)
|
|
@@ -84,7 +84,7 @@ https://svelte.dev/e/effect_orphan`);
|
|
|
84
84
|
throw t.name = "Svelte error", t;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function ys() {
|
|
88
88
|
{
|
|
89
89
|
const e = new Error(`effect_update_depth_exceeded
|
|
90
90
|
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
|
|
@@ -92,7 +92,7 @@ https://svelte.dev/e/effect_update_depth_exceeded`);
|
|
|
92
92
|
throw e.name = "Svelte error", e;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function bs() {
|
|
96
96
|
{
|
|
97
97
|
const e = new Error(`hydration_failed
|
|
98
98
|
Failed to hydrate the application
|
|
@@ -100,7 +100,7 @@ https://svelte.dev/e/hydration_failed`);
|
|
|
100
100
|
throw e.name = "Svelte error", e;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function ws(e) {
|
|
104
104
|
{
|
|
105
105
|
const t = new Error(`props_invalid_value
|
|
106
106
|
Cannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value
|
|
@@ -108,7 +108,7 @@ https://svelte.dev/e/props_invalid_value`);
|
|
|
108
108
|
throw t.name = "Svelte error", t;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Es(e) {
|
|
112
112
|
{
|
|
113
113
|
const t = new Error(`rune_outside_svelte
|
|
114
114
|
The \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
@@ -116,51 +116,51 @@ https://svelte.dev/e/rune_outside_svelte`);
|
|
|
116
116
|
throw t.name = "Svelte error", t;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function $s() {
|
|
120
120
|
{
|
|
121
121
|
const e = new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");
|
|
122
122
|
throw e.name = "Svelte error", e;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Rs() {
|
|
126
126
|
{
|
|
127
127
|
const e = new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");
|
|
128
128
|
throw e.name = "Svelte error", e;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function Cs() {
|
|
132
132
|
{
|
|
133
133
|
const e = new Error("state_unsafe_mutation\nUpdating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");
|
|
134
134
|
throw e.name = "Svelte error", e;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
let
|
|
138
|
-
var
|
|
139
|
-
function
|
|
137
|
+
let Ps = !1;
|
|
138
|
+
var Ss = "font-weight: bold", xs = "font-weight: normal";
|
|
139
|
+
function Rn(e) {
|
|
140
140
|
console.warn(`%c[svelte] state_snapshot_uncloneable
|
|
141
141
|
%c${e ? `The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:
|
|
142
142
|
|
|
143
143
|
${e}` : "Value cannot be cloned with `$state.snapshot` — the original value was returned"}
|
|
144
|
-
https://svelte.dev/e/state_snapshot_uncloneable`,
|
|
144
|
+
https://svelte.dev/e/state_snapshot_uncloneable`, Ss, xs);
|
|
145
145
|
}
|
|
146
146
|
const Ts = [];
|
|
147
|
-
function
|
|
147
|
+
function Ls(e, t = !1) {
|
|
148
148
|
if (!t) {
|
|
149
|
-
const n = [], r =
|
|
149
|
+
const n = [], r = st(e, /* @__PURE__ */ new Map(), "", n);
|
|
150
150
|
if (n.length === 1 && n[0] === "")
|
|
151
|
-
|
|
151
|
+
Rn();
|
|
152
152
|
else if (n.length > 0) {
|
|
153
153
|
const s = n.length > 10 ? n.slice(0, 7) : n.slice(0, 10), i = n.length - s.length;
|
|
154
|
-
let o = s.map((
|
|
154
|
+
let o = s.map((l) => `- <value>${l}`).join(`
|
|
155
155
|
`);
|
|
156
156
|
i > 0 && (o += `
|
|
157
|
-
- ...and ${i} more`),
|
|
157
|
+
- ...and ${i} more`), Rn(o);
|
|
158
158
|
}
|
|
159
159
|
return r;
|
|
160
160
|
}
|
|
161
|
-
return
|
|
161
|
+
return st(e, /* @__PURE__ */ new Map(), "", Ts);
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function st(e, t, n, r, s = null) {
|
|
164
164
|
if (typeof e == "object" && e !== null) {
|
|
165
165
|
var i = t.get(e);
|
|
166
166
|
if (i !== void 0) return i;
|
|
@@ -172,22 +172,22 @@ function et(e, t, n, r, s = null) {
|
|
|
172
172
|
/** @type {Snapshot<T>} */
|
|
173
173
|
new Set(e)
|
|
174
174
|
);
|
|
175
|
-
if (
|
|
175
|
+
if (cn(e)) {
|
|
176
176
|
var o = (
|
|
177
177
|
/** @type {Snapshot<any>} */
|
|
178
178
|
Array(e.length)
|
|
179
179
|
);
|
|
180
180
|
t.set(e, o), s !== null && t.set(s, o);
|
|
181
|
-
for (var
|
|
182
|
-
var
|
|
183
|
-
|
|
181
|
+
for (var l = 0; l < e.length; l += 1) {
|
|
182
|
+
var c = e[l];
|
|
183
|
+
l in e && (o[l] = st(c, t, `${n}[${l}]`, r));
|
|
184
184
|
}
|
|
185
185
|
return o;
|
|
186
186
|
}
|
|
187
187
|
if (Kn(e) === Zn) {
|
|
188
188
|
o = {}, t.set(e, o), s !== null && t.set(s, o);
|
|
189
|
-
for (var
|
|
190
|
-
o[
|
|
189
|
+
for (var a in e)
|
|
190
|
+
o[a] = st(e[a], t, `${n}.${a}`, r);
|
|
191
191
|
return o;
|
|
192
192
|
}
|
|
193
193
|
if (e instanceof Date)
|
|
@@ -197,7 +197,7 @@ function et(e, t, n, r, s = null) {
|
|
|
197
197
|
);
|
|
198
198
|
if (typeof /** @type {T & { toJSON?: any } } */
|
|
199
199
|
e.toJSON == "function")
|
|
200
|
-
return
|
|
200
|
+
return st(
|
|
201
201
|
/** @type {T & { toJSON(): any } } */
|
|
202
202
|
e.toJSON(),
|
|
203
203
|
t,
|
|
@@ -222,164 +222,164 @@ function et(e, t, n, r, s = null) {
|
|
|
222
222
|
e;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
var
|
|
226
|
-
function
|
|
225
|
+
var rt = null;
|
|
226
|
+
function Ie(e, t) {
|
|
227
227
|
if (typeof e != "object" || e === null || Pe in e)
|
|
228
228
|
return e;
|
|
229
229
|
const n = Kn(e);
|
|
230
|
-
if (n !== Zn && n !==
|
|
230
|
+
if (n !== Zn && n !== us)
|
|
231
231
|
return e;
|
|
232
|
-
var r = /* @__PURE__ */ new Map(), s =
|
|
233
|
-
var
|
|
232
|
+
var r = /* @__PURE__ */ new Map(), s = cn(e), i = U(0), o = $, l = (a) => {
|
|
233
|
+
var u = $;
|
|
234
234
|
Se(o);
|
|
235
|
-
var
|
|
235
|
+
var d;
|
|
236
236
|
{
|
|
237
|
-
var
|
|
238
|
-
|
|
237
|
+
var f = rt;
|
|
238
|
+
rt = c, d = a(), rt = f;
|
|
239
239
|
}
|
|
240
|
-
return Se(
|
|
240
|
+
return Se(u), d;
|
|
241
241
|
};
|
|
242
|
-
s && r.set("length",
|
|
242
|
+
s && r.set("length", U(
|
|
243
243
|
/** @type {any[]} */
|
|
244
244
|
e.length
|
|
245
245
|
));
|
|
246
|
-
var
|
|
247
|
-
if (
|
|
248
|
-
parent:
|
|
246
|
+
var c;
|
|
247
|
+
if (c = {
|
|
248
|
+
parent: rt,
|
|
249
249
|
owners: null
|
|
250
250
|
}, t) {
|
|
251
|
-
const
|
|
252
|
-
|
|
251
|
+
const a = t.v?.[nt]?.owners;
|
|
252
|
+
c.owners = a ? new Set(a) : null;
|
|
253
253
|
} else
|
|
254
|
-
|
|
254
|
+
c.owners = rt === null ? B !== null ? /* @__PURE__ */ new Set([B.function]) : null : /* @__PURE__ */ new Set();
|
|
255
255
|
return new Proxy(
|
|
256
256
|
/** @type {any} */
|
|
257
257
|
e,
|
|
258
258
|
{
|
|
259
|
-
defineProperty(
|
|
260
|
-
(!("value" in
|
|
261
|
-
var
|
|
262
|
-
return
|
|
263
|
-
|
|
264
|
-
|
|
259
|
+
defineProperty(a, u, d) {
|
|
260
|
+
(!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && $s();
|
|
261
|
+
var f = r.get(u);
|
|
262
|
+
return f === void 0 ? (f = l(() => U(d.value)), r.set(u, f)) : b(
|
|
263
|
+
f,
|
|
264
|
+
l(() => Ie(d.value))
|
|
265
265
|
), !0;
|
|
266
266
|
},
|
|
267
|
-
deleteProperty(
|
|
268
|
-
var
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
267
|
+
deleteProperty(a, u) {
|
|
268
|
+
var d = r.get(u);
|
|
269
|
+
if (d === void 0)
|
|
270
|
+
u in a && r.set(
|
|
271
|
+
u,
|
|
272
|
+
l(() => U(H))
|
|
273
273
|
);
|
|
274
274
|
else {
|
|
275
|
-
if (s && typeof
|
|
276
|
-
var
|
|
275
|
+
if (s && typeof u == "string") {
|
|
276
|
+
var f = (
|
|
277
277
|
/** @type {Source<number>} */
|
|
278
278
|
r.get("length")
|
|
279
|
-
),
|
|
280
|
-
Number.isInteger(
|
|
279
|
+
), g = Number(u);
|
|
280
|
+
Number.isInteger(g) && g < f.v && b(f, g);
|
|
281
281
|
}
|
|
282
|
-
|
|
282
|
+
b(d, H), Cn(i);
|
|
283
283
|
}
|
|
284
284
|
return !0;
|
|
285
285
|
},
|
|
286
|
-
get(
|
|
287
|
-
if (
|
|
288
|
-
return
|
|
289
|
-
if (
|
|
286
|
+
get(a, u, d) {
|
|
287
|
+
if (u === nt)
|
|
288
|
+
return c;
|
|
289
|
+
if (u === Pe)
|
|
290
290
|
return e;
|
|
291
|
-
var
|
|
292
|
-
if (
|
|
293
|
-
var
|
|
291
|
+
var f = r.get(u), g = u in a;
|
|
292
|
+
if (f === void 0 && (!g || Fe(a, u)?.writable) && (f = l(() => U(Ie(g ? a[u] : H))), r.set(u, f)), f !== void 0) {
|
|
293
|
+
var m = p(f);
|
|
294
294
|
{
|
|
295
|
-
var y =
|
|
296
|
-
y && y?.parent !==
|
|
295
|
+
var y = m?.[nt];
|
|
296
|
+
y && y?.parent !== c && Un(c, y);
|
|
297
297
|
}
|
|
298
|
-
return
|
|
298
|
+
return m === H ? void 0 : m;
|
|
299
299
|
}
|
|
300
|
-
return Reflect.get(
|
|
300
|
+
return Reflect.get(a, u, d);
|
|
301
301
|
},
|
|
302
|
-
getOwnPropertyDescriptor(
|
|
303
|
-
var
|
|
304
|
-
if (
|
|
305
|
-
var
|
|
306
|
-
|
|
307
|
-
} else if (
|
|
308
|
-
var
|
|
309
|
-
if (
|
|
302
|
+
getOwnPropertyDescriptor(a, u) {
|
|
303
|
+
var d = Reflect.getOwnPropertyDescriptor(a, u);
|
|
304
|
+
if (d && "value" in d) {
|
|
305
|
+
var f = r.get(u);
|
|
306
|
+
f && (d.value = p(f));
|
|
307
|
+
} else if (d === void 0) {
|
|
308
|
+
var g = r.get(u), m = g?.v;
|
|
309
|
+
if (g !== void 0 && m !== H)
|
|
310
310
|
return {
|
|
311
311
|
enumerable: !0,
|
|
312
312
|
configurable: !0,
|
|
313
|
-
value:
|
|
313
|
+
value: m,
|
|
314
314
|
writable: !0
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
|
-
return
|
|
317
|
+
return d;
|
|
318
318
|
},
|
|
319
|
-
has(
|
|
320
|
-
if (
|
|
319
|
+
has(a, u) {
|
|
320
|
+
if (u === nt || u === Pe)
|
|
321
321
|
return !0;
|
|
322
|
-
var
|
|
323
|
-
if (
|
|
324
|
-
|
|
325
|
-
var
|
|
326
|
-
if (
|
|
322
|
+
var d = r.get(u), f = d !== void 0 && d.v !== H || Reflect.has(a, u);
|
|
323
|
+
if (d !== void 0 || T !== null && (!f || Fe(a, u)?.writable)) {
|
|
324
|
+
d === void 0 && (d = l(() => U(f ? Ie(a[u]) : H)), r.set(u, d));
|
|
325
|
+
var g = p(d);
|
|
326
|
+
if (g === H)
|
|
327
327
|
return !1;
|
|
328
328
|
}
|
|
329
|
-
return
|
|
329
|
+
return f;
|
|
330
330
|
},
|
|
331
|
-
set(
|
|
332
|
-
var
|
|
333
|
-
if (s &&
|
|
334
|
-
for (var y =
|
|
335
|
-
|
|
336
|
-
var
|
|
337
|
-
|
|
331
|
+
set(a, u, d, f) {
|
|
332
|
+
var g = r.get(u), m = u in a;
|
|
333
|
+
if (s && u === "length")
|
|
334
|
+
for (var y = d; y < /** @type {Source<number>} */
|
|
335
|
+
g.v; y += 1) {
|
|
336
|
+
var R = r.get(y + "");
|
|
337
|
+
R !== void 0 ? b(R, H) : y in a && (R = l(() => U(H)), r.set(y + "", R));
|
|
338
338
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
), r.set(
|
|
343
|
-
|
|
344
|
-
|
|
339
|
+
g === void 0 ? (!m || Fe(a, u)?.writable) && (g = l(() => U(void 0)), b(
|
|
340
|
+
g,
|
|
341
|
+
l(() => Ie(d))
|
|
342
|
+
), r.set(u, g)) : (m = g.v !== H, b(
|
|
343
|
+
g,
|
|
344
|
+
l(() => Ie(d))
|
|
345
345
|
));
|
|
346
346
|
{
|
|
347
|
-
var
|
|
348
|
-
|
|
347
|
+
var N = d?.[nt];
|
|
348
|
+
N && N?.parent !== c && Un(c, N), ni(c);
|
|
349
349
|
}
|
|
350
|
-
var
|
|
351
|
-
if (
|
|
352
|
-
if (s && typeof
|
|
353
|
-
var
|
|
350
|
+
var F = Reflect.getOwnPropertyDescriptor(a, u);
|
|
351
|
+
if (F?.set && F.set.call(f, d), !m) {
|
|
352
|
+
if (s && typeof u == "string") {
|
|
353
|
+
var j = (
|
|
354
354
|
/** @type {Source<number>} */
|
|
355
355
|
r.get("length")
|
|
356
|
-
),
|
|
357
|
-
Number.isInteger(
|
|
356
|
+
), I = Number(u);
|
|
357
|
+
Number.isInteger(I) && I >= j.v && b(j, I + 1);
|
|
358
358
|
}
|
|
359
359
|
Cn(i);
|
|
360
360
|
}
|
|
361
361
|
return !0;
|
|
362
362
|
},
|
|
363
|
-
ownKeys(
|
|
364
|
-
|
|
365
|
-
var
|
|
366
|
-
var
|
|
367
|
-
return
|
|
363
|
+
ownKeys(a) {
|
|
364
|
+
p(i);
|
|
365
|
+
var u = Reflect.ownKeys(a).filter((g) => {
|
|
366
|
+
var m = r.get(g);
|
|
367
|
+
return m === void 0 || m.v !== H;
|
|
368
368
|
});
|
|
369
|
-
for (var [
|
|
370
|
-
|
|
371
|
-
return
|
|
369
|
+
for (var [d, f] of r)
|
|
370
|
+
f.v !== H && !(d in a) && u.push(d);
|
|
371
|
+
return u;
|
|
372
372
|
},
|
|
373
373
|
setPrototypeOf() {
|
|
374
|
-
|
|
374
|
+
Rs();
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
379
|
function Cn(e, t = 1) {
|
|
380
|
-
|
|
380
|
+
b(e, e.v + t);
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function it(e) {
|
|
383
383
|
try {
|
|
384
384
|
if (e !== null && typeof e == "object" && Pe in e)
|
|
385
385
|
return e[Pe];
|
|
@@ -387,10 +387,10 @@ function tt(e) {
|
|
|
387
387
|
}
|
|
388
388
|
return e;
|
|
389
389
|
}
|
|
390
|
-
let
|
|
391
|
-
const
|
|
390
|
+
let Ge = /* @__PURE__ */ new Set();
|
|
391
|
+
const ft = /* @__PURE__ */ new Map();
|
|
392
392
|
function Pn(e) {
|
|
393
|
-
|
|
393
|
+
Ge = e;
|
|
394
394
|
}
|
|
395
395
|
function ir(e, t) {
|
|
396
396
|
var n = {
|
|
@@ -404,7 +404,7 @@ function ir(e, t) {
|
|
|
404
404
|
};
|
|
405
405
|
return n;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function U(e, t) {
|
|
408
408
|
const n = ir(e);
|
|
409
409
|
return dr(n), n;
|
|
410
410
|
}
|
|
@@ -413,19 +413,19 @@ function or(e, t = !1) {
|
|
|
413
413
|
const n = ir(e);
|
|
414
414
|
return t || (n.equals = sr), n;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
418
|
-
let r = n ?
|
|
419
|
-
return
|
|
416
|
+
function b(e, t, n = !1) {
|
|
417
|
+
$ !== null && !ae && kr() && ($.f & (fe | ln)) !== 0 && !pe?.includes(e) && Cs();
|
|
418
|
+
let r = n ? Ie(t, e) : t;
|
|
419
|
+
return ks(e, r);
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function ks(e, t) {
|
|
422
422
|
if (!e.equals(t)) {
|
|
423
423
|
var n = e.v;
|
|
424
|
-
if (
|
|
425
|
-
const r = Array.from(
|
|
424
|
+
if (pt ? ft.set(e, t) : ft.set(e, n), e.v = t, e.wv = gr(), lr(e, ye), T !== null && (T.f & V) !== 0 && (T.f & (_e | De)) === 0 && (K === null ? js([e]) : K.push(e)), Ge.size > 0) {
|
|
425
|
+
const r = Array.from(Ge);
|
|
426
426
|
for (const s of r)
|
|
427
|
-
(s.f & V) !== 0 && re(s,
|
|
428
|
-
|
|
427
|
+
(s.f & V) !== 0 && re(s, Ae), et(s) && At(s);
|
|
428
|
+
Ge.clear();
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
return t;
|
|
@@ -436,15 +436,15 @@ function lr(e, t) {
|
|
|
436
436
|
for (var r = n.length, s = 0; s < r; s++) {
|
|
437
437
|
var i = n[s], o = i.f;
|
|
438
438
|
if ((o & ye) === 0) {
|
|
439
|
-
if ((o &
|
|
440
|
-
|
|
439
|
+
if ((o & Jn) !== 0) {
|
|
440
|
+
Ge.add(i);
|
|
441
441
|
continue;
|
|
442
442
|
}
|
|
443
|
-
re(i, t), (o & (V |
|
|
443
|
+
re(i, t), (o & (V | te)) !== 0 && ((o & fe) !== 0 ? lr(
|
|
444
444
|
/** @type {Derived} */
|
|
445
445
|
i,
|
|
446
|
-
|
|
447
|
-
) :
|
|
446
|
+
Ae
|
|
447
|
+
) : Bt(
|
|
448
448
|
/** @type {Effect} */
|
|
449
449
|
i
|
|
450
450
|
));
|
|
@@ -453,12 +453,12 @@ function lr(e, t) {
|
|
|
453
453
|
}
|
|
454
454
|
// @__NO_SIDE_EFFECTS__
|
|
455
455
|
function un(e) {
|
|
456
|
-
var t = fe | ye, n =
|
|
456
|
+
var t = fe | ye, n = $ !== null && ($.f & fe) !== 0 ? (
|
|
457
457
|
/** @type {Derived} */
|
|
458
|
-
|
|
458
|
+
$
|
|
459
459
|
) : null;
|
|
460
|
-
return
|
|
461
|
-
ctx:
|
|
460
|
+
return T === null || n !== null && (n.f & te) !== 0 ? t |= te : T.f |= Wn, {
|
|
461
|
+
ctx: B,
|
|
462
462
|
deps: null,
|
|
463
463
|
effects: null,
|
|
464
464
|
equals: rr,
|
|
@@ -471,10 +471,10 @@ function un(e) {
|
|
|
471
471
|
null
|
|
472
472
|
),
|
|
473
473
|
wv: 0,
|
|
474
|
-
parent: n ??
|
|
474
|
+
parent: n ?? T
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function Z(e) {
|
|
478
478
|
const t = /* @__PURE__ */ un(e);
|
|
479
479
|
return dr(t), t;
|
|
480
480
|
}
|
|
@@ -483,14 +483,14 @@ function ar(e) {
|
|
|
483
483
|
if (t !== null) {
|
|
484
484
|
e.effects = null;
|
|
485
485
|
for (var n = 0; n < t.length; n += 1)
|
|
486
|
-
|
|
486
|
+
me(
|
|
487
487
|
/** @type {Effect} */
|
|
488
488
|
t[n]
|
|
489
489
|
);
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
let
|
|
493
|
-
function
|
|
492
|
+
let Gt = [];
|
|
493
|
+
function Is(e) {
|
|
494
494
|
for (var t = e.parent; t !== null; ) {
|
|
495
495
|
if ((t.f & fe) === 0)
|
|
496
496
|
return (
|
|
@@ -501,316 +501,316 @@ function Fs(e) {
|
|
|
501
501
|
}
|
|
502
502
|
return null;
|
|
503
503
|
}
|
|
504
|
-
function
|
|
505
|
-
var t, n =
|
|
506
|
-
|
|
504
|
+
function Fs(e) {
|
|
505
|
+
var t, n = T;
|
|
506
|
+
Je(Is(e));
|
|
507
507
|
{
|
|
508
|
-
let r =
|
|
508
|
+
let r = Ge;
|
|
509
509
|
Pn(/* @__PURE__ */ new Set());
|
|
510
510
|
try {
|
|
511
|
-
|
|
511
|
+
Gt.includes(e) && ps(), Gt.push(e), ar(e), t = vr(e);
|
|
512
512
|
} finally {
|
|
513
|
-
|
|
513
|
+
Je(n), Pn(r), Gt.pop();
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
var t =
|
|
520
|
-
re(e, n), e.equals(t) || (e.v = t, e.wv =
|
|
518
|
+
function cr(e) {
|
|
519
|
+
var t = Fs(e), n = ($e || (e.f & te) !== 0) && e.deps !== null ? Ae : V;
|
|
520
|
+
re(e, n), e.equals(t) || (e.v = t, e.wv = gr());
|
|
521
521
|
}
|
|
522
|
-
var
|
|
523
|
-
function
|
|
522
|
+
var Ze = "font-weight: bold", Ke = "font-weight: normal";
|
|
523
|
+
function Os(e) {
|
|
524
524
|
console.warn(`%c[svelte] console_log_state
|
|
525
525
|
%cYour \`console.${e}\` contained \`$state\` proxies. Consider using \`$inspect(...)\` or \`$state.snapshot(...)\` instead
|
|
526
|
-
https://svelte.dev/e/console_log_state`,
|
|
526
|
+
https://svelte.dev/e/console_log_state`, Ze, Ke);
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Us(e) {
|
|
529
529
|
console.warn(`%c[svelte] hydration_html_changed
|
|
530
530
|
%c${e ? `The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value` : "The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
531
|
-
https://svelte.dev/e/hydration_html_changed`,
|
|
531
|
+
https://svelte.dev/e/hydration_html_changed`, Ze, Ke);
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Ut(e) {
|
|
534
534
|
console.warn(`%c[svelte] hydration_mismatch
|
|
535
535
|
%cHydration failed because the initial UI does not match what was rendered on the server
|
|
536
|
-
https://svelte.dev/e/hydration_mismatch`,
|
|
536
|
+
https://svelte.dev/e/hydration_mismatch`, Ze, Ke);
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function Ds() {
|
|
539
539
|
console.warn(`%c[svelte] lifecycle_double_unmount
|
|
540
540
|
%cTried to unmount a component that was not mounted
|
|
541
|
-
https://svelte.dev/e/lifecycle_double_unmount`,
|
|
541
|
+
https://svelte.dev/e/lifecycle_double_unmount`, Ze, Ke);
|
|
542
542
|
}
|
|
543
543
|
function Sn(e, t) {
|
|
544
544
|
console.warn(`%c[svelte] ownership_invalid_mutation
|
|
545
545
|
%c${e ? `${e} mutated a value owned by ${t}. This is strongly discouraged. Consider passing values to child components with \`bind:\`, or use a callback instead` : "Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead"}
|
|
546
|
-
https://svelte.dev/e/ownership_invalid_mutation`,
|
|
546
|
+
https://svelte.dev/e/ownership_invalid_mutation`, Ze, Ke);
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function yt(e) {
|
|
549
549
|
console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
550
550
|
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results
|
|
551
|
-
https://svelte.dev/e/state_proxy_equality_mismatch`,
|
|
551
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`, Ze, Ke);
|
|
552
552
|
}
|
|
553
|
-
let
|
|
554
|
-
function
|
|
555
|
-
|
|
553
|
+
let A = !1;
|
|
554
|
+
function qe(e) {
|
|
555
|
+
A = e;
|
|
556
556
|
}
|
|
557
|
-
let
|
|
558
|
-
function
|
|
557
|
+
let D;
|
|
558
|
+
function ve(e) {
|
|
559
559
|
if (e === null)
|
|
560
|
-
throw
|
|
561
|
-
return
|
|
560
|
+
throw Ut(), Ve;
|
|
561
|
+
return D = e;
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
return
|
|
563
|
+
function dt() {
|
|
564
|
+
return ve(
|
|
565
565
|
/** @type {TemplateNode} */
|
|
566
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ Be(D)
|
|
567
567
|
);
|
|
568
568
|
}
|
|
569
569
|
function oe(e) {
|
|
570
|
-
if (
|
|
571
|
-
if (/* @__PURE__ */
|
|
572
|
-
throw
|
|
573
|
-
|
|
570
|
+
if (A) {
|
|
571
|
+
if (/* @__PURE__ */ Be(D) !== null)
|
|
572
|
+
throw Ut(), Ve;
|
|
573
|
+
D = e;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
for (var e = 0, t =
|
|
576
|
+
function As() {
|
|
577
|
+
for (var e = 0, t = D; ; ) {
|
|
578
578
|
if (t.nodeType === 8) {
|
|
579
579
|
var n = (
|
|
580
580
|
/** @type {Comment} */
|
|
581
581
|
t.data
|
|
582
582
|
);
|
|
583
|
-
if (n ===
|
|
583
|
+
if (n === on) {
|
|
584
584
|
if (e === 0) return t;
|
|
585
585
|
e -= 1;
|
|
586
|
-
} else (n ===
|
|
586
|
+
} else (n === It || n === sn) && (e += 1);
|
|
587
587
|
}
|
|
588
588
|
var r = (
|
|
589
589
|
/** @type {TemplateNode} */
|
|
590
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ Be(t)
|
|
591
591
|
);
|
|
592
592
|
t.remove(), t = r;
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Bs() {
|
|
596
596
|
const e = Array.prototype, t = Array.__svelte_cleanup;
|
|
597
597
|
t && t();
|
|
598
598
|
const { indexOf: n, lastIndexOf: r, includes: s } = e;
|
|
599
599
|
e.indexOf = function(i, o) {
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
602
|
-
for (let
|
|
603
|
-
if (
|
|
604
|
-
|
|
600
|
+
const l = n.call(this, i, o);
|
|
601
|
+
if (l === -1) {
|
|
602
|
+
for (let c = o ?? 0; c < this.length; c += 1)
|
|
603
|
+
if (it(this[c]) === i) {
|
|
604
|
+
yt("array.indexOf(...)");
|
|
605
605
|
break;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
return
|
|
608
|
+
return l;
|
|
609
609
|
}, e.lastIndexOf = function(i, o) {
|
|
610
|
-
const
|
|
611
|
-
if (
|
|
612
|
-
for (let
|
|
613
|
-
if (
|
|
614
|
-
|
|
610
|
+
const l = r.call(this, i, o ?? this.length - 1);
|
|
611
|
+
if (l === -1) {
|
|
612
|
+
for (let c = 0; c <= (o ?? this.length - 1); c += 1)
|
|
613
|
+
if (it(this[c]) === i) {
|
|
614
|
+
yt("array.lastIndexOf(...)");
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
return
|
|
618
|
+
return l;
|
|
619
619
|
}, e.includes = function(i, o) {
|
|
620
|
-
const
|
|
621
|
-
if (!
|
|
622
|
-
for (let
|
|
623
|
-
if (
|
|
624
|
-
|
|
620
|
+
const l = s.call(this, i, o);
|
|
621
|
+
if (!l) {
|
|
622
|
+
for (let c = 0; c < this.length; c += 1)
|
|
623
|
+
if (it(this[c]) === i) {
|
|
624
|
+
yt("array.includes(...)");
|
|
625
625
|
break;
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
-
return
|
|
628
|
+
return l;
|
|
629
629
|
}, Array.__svelte_cleanup = () => {
|
|
630
630
|
e.indexOf = n, e.lastIndexOf = r, e.includes = s;
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function S(e, t, n = !0) {
|
|
634
634
|
try {
|
|
635
|
-
e === t != (
|
|
635
|
+
e === t != (it(e) === it(t)) && yt(n ? "===" : "!==");
|
|
636
636
|
} catch {
|
|
637
637
|
}
|
|
638
638
|
return e === t === n;
|
|
639
639
|
}
|
|
640
|
-
var
|
|
641
|
-
function
|
|
642
|
-
if (
|
|
643
|
-
|
|
640
|
+
var xn, fn, ur, fr;
|
|
641
|
+
function Zt() {
|
|
642
|
+
if (xn === void 0) {
|
|
643
|
+
xn = window, fn = /Firefox/.test(navigator.userAgent);
|
|
644
644
|
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
645
|
-
|
|
645
|
+
ur = Fe(t, "firstChild").get, fr = Fe(t, "nextSibling").get, En(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), En(n) && (n.__t = void 0), e.__svelte_meta = null, Bs();
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
function Ct(e = "") {
|
|
649
649
|
return document.createTextNode(e);
|
|
650
650
|
}
|
|
651
651
|
// @__NO_SIDE_EFFECTS__
|
|
652
|
-
function
|
|
653
|
-
return
|
|
652
|
+
function ht(e) {
|
|
653
|
+
return ur.call(e);
|
|
654
654
|
}
|
|
655
655
|
// @__NO_SIDE_EFFECTS__
|
|
656
|
-
function
|
|
656
|
+
function Be(e) {
|
|
657
657
|
return fr.call(e);
|
|
658
658
|
}
|
|
659
659
|
function le(e, t) {
|
|
660
|
-
if (!
|
|
661
|
-
return /* @__PURE__ */
|
|
660
|
+
if (!A)
|
|
661
|
+
return /* @__PURE__ */ ht(e);
|
|
662
662
|
var n = (
|
|
663
663
|
/** @type {TemplateNode} */
|
|
664
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ ht(D)
|
|
665
665
|
);
|
|
666
666
|
if (n === null)
|
|
667
|
-
n =
|
|
667
|
+
n = D.appendChild(Ct());
|
|
668
668
|
else if (t && n.nodeType !== 3) {
|
|
669
669
|
var r = Ct();
|
|
670
|
-
return n?.before(r),
|
|
670
|
+
return n?.before(r), ve(r), r;
|
|
671
671
|
}
|
|
672
|
-
return
|
|
672
|
+
return ve(n), n;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
let r =
|
|
674
|
+
function Kt(e, t = 1, n = !1) {
|
|
675
|
+
let r = A ? D : e;
|
|
676
676
|
for (var s; t--; )
|
|
677
677
|
s = r, r = /** @type {TemplateNode} */
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
if (!
|
|
678
|
+
/* @__PURE__ */ Be(r);
|
|
679
|
+
if (!A)
|
|
680
680
|
return r;
|
|
681
681
|
var i = r?.nodeType;
|
|
682
682
|
if (n && i !== 3) {
|
|
683
683
|
var o = Ct();
|
|
684
|
-
return r === null ? s?.after(o) : r.before(o),
|
|
684
|
+
return r === null ? s?.after(o) : r.before(o), ve(o), o;
|
|
685
685
|
}
|
|
686
|
-
return
|
|
686
|
+
return ve(r), /** @type {TemplateNode} */
|
|
687
687
|
r;
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Ns(e) {
|
|
690
690
|
e.textContent = "";
|
|
691
691
|
}
|
|
692
|
-
const
|
|
693
|
-
let
|
|
694
|
-
function
|
|
695
|
-
|
|
692
|
+
const Tn = /* @__PURE__ */ new WeakSet();
|
|
693
|
+
let bt = !1, Pt = !1, St = null, Oe = !1, pt = !1;
|
|
694
|
+
function Ln(e) {
|
|
695
|
+
pt = e;
|
|
696
696
|
}
|
|
697
|
-
let
|
|
697
|
+
let ot = [], xt = [], $ = null, ae = !1;
|
|
698
698
|
function Se(e) {
|
|
699
|
-
|
|
699
|
+
$ = e;
|
|
700
700
|
}
|
|
701
|
-
let
|
|
702
|
-
function
|
|
703
|
-
|
|
701
|
+
let T = null;
|
|
702
|
+
function Je(e) {
|
|
703
|
+
T = e;
|
|
704
704
|
}
|
|
705
705
|
let pe = null;
|
|
706
|
-
function
|
|
706
|
+
function Ms(e) {
|
|
707
707
|
pe = e;
|
|
708
708
|
}
|
|
709
709
|
function dr(e) {
|
|
710
|
-
|
|
710
|
+
$ !== null && $.f & Wt && (pe === null ? Ms([e]) : pe.push(e));
|
|
711
711
|
}
|
|
712
|
-
let
|
|
713
|
-
function
|
|
714
|
-
|
|
712
|
+
let Q = null, Y = 0, K = null;
|
|
713
|
+
function js(e) {
|
|
714
|
+
K = e;
|
|
715
715
|
}
|
|
716
|
-
let
|
|
717
|
-
function
|
|
718
|
-
return ++
|
|
716
|
+
let hr = 1, Tt = 0, $e = !1;
|
|
717
|
+
function gr() {
|
|
718
|
+
return ++hr;
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function et(e) {
|
|
721
721
|
var t = e.f;
|
|
722
722
|
if ((t & ye) !== 0)
|
|
723
723
|
return !0;
|
|
724
|
-
if ((t &
|
|
725
|
-
var n = e.deps, r = (t &
|
|
724
|
+
if ((t & Ae) !== 0) {
|
|
725
|
+
var n = e.deps, r = (t & te) !== 0;
|
|
726
726
|
if (n !== null) {
|
|
727
|
-
var s, i, o = (t &
|
|
728
|
-
if (o ||
|
|
729
|
-
var
|
|
727
|
+
var s, i, o = (t & $t) !== 0, l = r && T !== null && !$e, c = n.length;
|
|
728
|
+
if (o || l) {
|
|
729
|
+
var a = (
|
|
730
730
|
/** @type {Derived} */
|
|
731
731
|
e
|
|
732
|
-
),
|
|
733
|
-
for (s = 0; s <
|
|
734
|
-
i = n[s], (o || !i?.reactions?.includes(
|
|
735
|
-
o && (
|
|
732
|
+
), u = a.parent;
|
|
733
|
+
for (s = 0; s < c; s++)
|
|
734
|
+
i = n[s], (o || !i?.reactions?.includes(a)) && (i.reactions ?? (i.reactions = [])).push(a);
|
|
735
|
+
o && (a.f ^= $t), l && u !== null && (u.f & te) === 0 && (a.f ^= te);
|
|
736
736
|
}
|
|
737
|
-
for (s = 0; s <
|
|
738
|
-
if (i = n[s],
|
|
737
|
+
for (s = 0; s < c; s++)
|
|
738
|
+
if (i = n[s], et(
|
|
739
739
|
/** @type {Derived} */
|
|
740
740
|
i
|
|
741
|
-
) &&
|
|
741
|
+
) && cr(
|
|
742
742
|
/** @type {Derived} */
|
|
743
743
|
i
|
|
744
744
|
), i.wv > e.wv)
|
|
745
745
|
return !0;
|
|
746
746
|
}
|
|
747
|
-
(!r ||
|
|
747
|
+
(!r || T !== null && !$e) && re(e, V);
|
|
748
748
|
}
|
|
749
749
|
return !1;
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function kn(e, t) {
|
|
752
752
|
for (var n = t; n !== null; ) {
|
|
753
|
-
if ((n.f &
|
|
753
|
+
if ((n.f & Et) !== 0)
|
|
754
754
|
try {
|
|
755
755
|
n.fn(e);
|
|
756
756
|
return;
|
|
757
757
|
} catch {
|
|
758
|
-
n.f ^=
|
|
758
|
+
n.f ^= Et;
|
|
759
759
|
}
|
|
760
760
|
n = n.parent;
|
|
761
761
|
}
|
|
762
|
-
throw
|
|
762
|
+
throw bt = !1, e;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
return (e.f & Ot) === 0 && (e.parent === null || (e.parent.f &
|
|
764
|
+
function In(e) {
|
|
765
|
+
return (e.f & Ot) === 0 && (e.parent === null || (e.parent.f & Et) === 0);
|
|
766
766
|
}
|
|
767
|
-
function
|
|
768
|
-
if (
|
|
769
|
-
if (n === null && (
|
|
767
|
+
function Dt(e, t, n, r) {
|
|
768
|
+
if (bt) {
|
|
769
|
+
if (n === null && (bt = !1), In(t))
|
|
770
770
|
throw e;
|
|
771
771
|
return;
|
|
772
772
|
}
|
|
773
|
-
if (n !== null && (
|
|
774
|
-
|
|
773
|
+
if (n !== null && (bt = !0), r === null || !(e instanceof Error) || Tn.has(e)) {
|
|
774
|
+
kn(e, t);
|
|
775
775
|
return;
|
|
776
776
|
}
|
|
777
|
-
|
|
777
|
+
Tn.add(e);
|
|
778
778
|
const s = [], i = t.fn?.name;
|
|
779
779
|
i && s.push(i);
|
|
780
780
|
let o = r;
|
|
781
781
|
for (; o !== null; ) {
|
|
782
782
|
{
|
|
783
|
-
var
|
|
784
|
-
if (
|
|
785
|
-
const
|
|
786
|
-
s.push(
|
|
783
|
+
var l = o.function?.[k];
|
|
784
|
+
if (l) {
|
|
785
|
+
const u = l.split("/").pop();
|
|
786
|
+
s.push(u);
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
789
|
o = o.p;
|
|
790
790
|
}
|
|
791
|
-
const
|
|
792
|
-
|
|
791
|
+
const c = fn ? " " : " ";
|
|
792
|
+
ce(e, "message", {
|
|
793
793
|
value: e.message + `
|
|
794
|
-
${s.map((
|
|
795
|
-
${
|
|
794
|
+
${s.map((u) => `
|
|
795
|
+
${c}in ${u}`).join("")}
|
|
796
796
|
`
|
|
797
|
-
}),
|
|
797
|
+
}), ce(e, "component_stack", {
|
|
798
798
|
value: s
|
|
799
799
|
});
|
|
800
|
-
const
|
|
801
|
-
if (
|
|
802
|
-
const
|
|
803
|
-
`),
|
|
804
|
-
for (let
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
value:
|
|
800
|
+
const a = e.stack;
|
|
801
|
+
if (a) {
|
|
802
|
+
const u = a.split(`
|
|
803
|
+
`), d = [];
|
|
804
|
+
for (let f = 0; f < u.length; f++) {
|
|
805
|
+
const g = u[f];
|
|
806
|
+
g.includes("svelte/src/internal") || d.push(g);
|
|
807
|
+
}
|
|
808
|
+
ce(e, "stack", {
|
|
809
|
+
value: d.join(`
|
|
810
810
|
`)
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
if (
|
|
813
|
+
if (kn(e, t), In(t))
|
|
814
814
|
throw e;
|
|
815
815
|
}
|
|
816
816
|
function pr(e, t, n = !0) {
|
|
@@ -823,51 +823,51 @@ function pr(e, t, n = !0) {
|
|
|
823
823
|
i,
|
|
824
824
|
t,
|
|
825
825
|
!1
|
|
826
|
-
) : t === i && (n ? re(i, ye) : (i.f & V) !== 0 && re(i,
|
|
826
|
+
) : t === i && (n ? re(i, ye) : (i.f & V) !== 0 && re(i, Ae), Bt(
|
|
827
827
|
/** @type {Effect} */
|
|
828
828
|
i
|
|
829
829
|
)));
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
function
|
|
833
|
-
var
|
|
834
|
-
var t =
|
|
835
|
-
|
|
836
|
-
null,
|
|
832
|
+
function vr(e) {
|
|
833
|
+
var g;
|
|
834
|
+
var t = Q, n = Y, r = K, s = $, i = $e, o = pe, l = B, c = ae, a = e.f;
|
|
835
|
+
Q = /** @type {null | Value[]} */
|
|
836
|
+
null, Y = 0, K = null, $e = (a & te) !== 0 && (ae || !Oe || $ === null), $ = (a & (_e | De)) === 0 ? e : null, pe = null, Dn(e.ctx), ae = !1, Tt++, e.f |= Wt;
|
|
837
837
|
try {
|
|
838
|
-
var
|
|
838
|
+
var u = (
|
|
839
839
|
/** @type {Function} */
|
|
840
840
|
(0, e.fn)()
|
|
841
|
-
),
|
|
842
|
-
if (
|
|
843
|
-
var
|
|
844
|
-
if (
|
|
845
|
-
for (
|
|
846
|
-
|
|
841
|
+
), d = e.deps;
|
|
842
|
+
if (Q !== null) {
|
|
843
|
+
var f;
|
|
844
|
+
if (Lt(e, Y), d !== null && Y > 0)
|
|
845
|
+
for (d.length = Y + Q.length, f = 0; f < Q.length; f++)
|
|
846
|
+
d[Y + f] = Q[f];
|
|
847
847
|
else
|
|
848
|
-
e.deps =
|
|
849
|
-
if (
|
|
850
|
-
for (
|
|
851
|
-
((
|
|
852
|
-
} else
|
|
853
|
-
if (
|
|
854
|
-
for (
|
|
855
|
-
|
|
848
|
+
e.deps = d = Q;
|
|
849
|
+
if (!$e)
|
|
850
|
+
for (f = Y; f < d.length; f++)
|
|
851
|
+
((g = d[f]).reactions ?? (g.reactions = [])).push(e);
|
|
852
|
+
} else d !== null && Y < d.length && (Lt(e, Y), d.length = Y);
|
|
853
|
+
if (kr() && K !== null && !ae && d !== null && (e.f & (fe | Ae | ye)) === 0)
|
|
854
|
+
for (f = 0; f < /** @type {Source[]} */
|
|
855
|
+
K.length; f++)
|
|
856
856
|
pr(
|
|
857
|
-
|
|
857
|
+
K[f],
|
|
858
858
|
/** @type {Effect} */
|
|
859
859
|
e
|
|
860
860
|
);
|
|
861
|
-
return s !== null && (
|
|
862
|
-
|
|
861
|
+
return s !== null && (Tt++, K !== null && (r === null ? r = K : r.push(.../** @type {Source[]} */
|
|
862
|
+
K))), u;
|
|
863
863
|
} finally {
|
|
864
|
-
|
|
864
|
+
Q = t, Y = n, K = r, $ = s, $e = i, pe = o, Dn(l), ae = c, e.f ^= Wt;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function Qs(e, t) {
|
|
868
868
|
let n = t.reactions;
|
|
869
869
|
if (n !== null) {
|
|
870
|
-
var r =
|
|
870
|
+
var r = as.call(n, e);
|
|
871
871
|
if (r !== -1) {
|
|
872
872
|
var s = n.length - 1;
|
|
873
873
|
s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
|
|
@@ -876,156 +876,156 @@ function js(e, t) {
|
|
|
876
876
|
n === null && (t.f & fe) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
877
877
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
878
878
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
879
|
-
(
|
|
879
|
+
(Q === null || !Q.includes(t)) && (re(t, Ae), (t.f & (te | $t)) === 0 && (t.f ^= $t), ar(
|
|
880
880
|
/** @type {Derived} **/
|
|
881
881
|
t
|
|
882
|
-
),
|
|
882
|
+
), Lt(
|
|
883
883
|
/** @type {Derived} **/
|
|
884
884
|
t,
|
|
885
885
|
0
|
|
886
886
|
));
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function Lt(e, t) {
|
|
889
889
|
var n = e.deps;
|
|
890
890
|
if (n !== null)
|
|
891
891
|
for (var r = t; r < n.length; r++)
|
|
892
|
-
|
|
892
|
+
Qs(e, n[r]);
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function At(e) {
|
|
895
895
|
var t = e.f;
|
|
896
896
|
if ((t & Ot) === 0) {
|
|
897
897
|
re(e, V);
|
|
898
|
-
var n =
|
|
899
|
-
|
|
898
|
+
var n = T, r = B, s = Oe;
|
|
899
|
+
T = e, Oe = !0;
|
|
900
900
|
{
|
|
901
|
-
var i =
|
|
902
|
-
|
|
901
|
+
var i = Ue;
|
|
902
|
+
An(e.component_function);
|
|
903
903
|
}
|
|
904
904
|
try {
|
|
905
|
-
(t &
|
|
906
|
-
var o =
|
|
907
|
-
e.teardown = typeof o == "function" ? o : null, e.wv =
|
|
908
|
-
var
|
|
909
|
-
wn &&
|
|
910
|
-
} catch (
|
|
911
|
-
|
|
905
|
+
(t & ln) !== 0 ? Zs(e) : wr(e), br(e);
|
|
906
|
+
var o = vr(e);
|
|
907
|
+
e.teardown = typeof o == "function" ? o : null, e.wv = hr;
|
|
908
|
+
var l = e.deps, c;
|
|
909
|
+
wn && Ps && e.f & ye, wn && xt.push(e);
|
|
910
|
+
} catch (a) {
|
|
911
|
+
Dt(a, e, n, r || e.ctx);
|
|
912
912
|
} finally {
|
|
913
|
-
|
|
913
|
+
Oe = s, T = n, An(i);
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Fn() {
|
|
918
918
|
console.error(
|
|
919
919
|
"Last ten effects were: ",
|
|
920
|
-
|
|
921
|
-
),
|
|
920
|
+
xt.slice(-10).map((e) => e.fn)
|
|
921
|
+
), xt = [];
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function zs() {
|
|
924
924
|
try {
|
|
925
|
-
|
|
925
|
+
ys();
|
|
926
926
|
} catch (e) {
|
|
927
|
-
if (
|
|
927
|
+
if (ce(e, "stack", {
|
|
928
928
|
value: ""
|
|
929
929
|
}), St !== null)
|
|
930
930
|
try {
|
|
931
|
-
|
|
931
|
+
Dt(e, St, null, null);
|
|
932
932
|
} catch (t) {
|
|
933
|
-
throw
|
|
933
|
+
throw Fn(), t;
|
|
934
934
|
}
|
|
935
935
|
else
|
|
936
|
-
throw
|
|
936
|
+
throw Fn(), e;
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
var e =
|
|
939
|
+
function mr() {
|
|
940
|
+
var e = Oe;
|
|
941
941
|
try {
|
|
942
942
|
var t = 0;
|
|
943
|
-
for (
|
|
944
|
-
t++ > 1e3 &&
|
|
945
|
-
var n =
|
|
946
|
-
|
|
943
|
+
for (Oe = !0; ot.length > 0; ) {
|
|
944
|
+
t++ > 1e3 && zs();
|
|
945
|
+
var n = ot, r = n.length;
|
|
946
|
+
ot = [];
|
|
947
947
|
for (var s = 0; s < r; s++) {
|
|
948
|
-
var i =
|
|
949
|
-
|
|
948
|
+
var i = Hs(n[s]);
|
|
949
|
+
qs(i);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
} finally {
|
|
953
|
-
Pt = !1,
|
|
953
|
+
Pt = !1, Oe = e, St = null, xt = [], ft.clear();
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function qs(e) {
|
|
957
957
|
var t = e.length;
|
|
958
958
|
if (t !== 0)
|
|
959
959
|
for (var n = 0; n < t; n++) {
|
|
960
960
|
var r = e[n];
|
|
961
961
|
if ((r.f & (Ot | Ye)) === 0)
|
|
962
962
|
try {
|
|
963
|
-
|
|
963
|
+
et(r) && (At(r), r.deps === null && r.first === null && r.nodes_start === null && (r.teardown === null ? Er(r) : r.fn = null));
|
|
964
964
|
} catch (s) {
|
|
965
|
-
|
|
965
|
+
Dt(s, r, null, r.ctx);
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
function
|
|
970
|
-
Pt || (Pt = !0, queueMicrotask(
|
|
969
|
+
function Bt(e) {
|
|
970
|
+
Pt || (Pt = !0, queueMicrotask(mr));
|
|
971
971
|
for (var t = St = e; t.parent !== null; ) {
|
|
972
972
|
t = t.parent;
|
|
973
973
|
var n = t.f;
|
|
974
|
-
if ((n & (
|
|
974
|
+
if ((n & (De | _e)) !== 0) {
|
|
975
975
|
if ((n & V) === 0) return;
|
|
976
976
|
t.f ^= V;
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
|
|
979
|
+
ot.push(t);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function Hs(e) {
|
|
982
982
|
for (var t = [], n = e; n !== null; ) {
|
|
983
|
-
var r = n.f, s = (r & (
|
|
983
|
+
var r = n.f, s = (r & (_e | De)) !== 0, i = s && (r & V) !== 0;
|
|
984
984
|
if (!i && (r & Ye) === 0) {
|
|
985
|
-
if ((r &
|
|
985
|
+
if ((r & Yn) !== 0)
|
|
986
986
|
t.push(n);
|
|
987
987
|
else if (s)
|
|
988
988
|
n.f ^= V;
|
|
989
989
|
else {
|
|
990
|
-
var o =
|
|
990
|
+
var o = $;
|
|
991
991
|
try {
|
|
992
|
-
|
|
993
|
-
} catch (
|
|
994
|
-
|
|
992
|
+
$ = n, et(n) && At(n);
|
|
993
|
+
} catch (a) {
|
|
994
|
+
Dt(a, n, null, n.ctx);
|
|
995
995
|
} finally {
|
|
996
|
-
|
|
996
|
+
$ = o;
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
|
-
var
|
|
1000
|
-
if (
|
|
1001
|
-
n =
|
|
999
|
+
var l = n.first;
|
|
1000
|
+
if (l !== null) {
|
|
1001
|
+
n = l;
|
|
1002
1002
|
continue;
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
|
-
var
|
|
1006
|
-
for (n = n.next; n === null &&
|
|
1007
|
-
n =
|
|
1005
|
+
var c = n.parent;
|
|
1006
|
+
for (n = n.next; n === null && c !== null; )
|
|
1007
|
+
n = c.next, c = c.parent;
|
|
1008
1008
|
}
|
|
1009
1009
|
return t;
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1011
|
+
function E(e) {
|
|
1012
1012
|
var t;
|
|
1013
|
-
for (
|
|
1014
|
-
Pt = !0,
|
|
1013
|
+
for ($n(); ot.length > 0; )
|
|
1014
|
+
Pt = !0, mr(), $n();
|
|
1015
1015
|
return (
|
|
1016
1016
|
/** @type {T} */
|
|
1017
1017
|
t
|
|
1018
1018
|
);
|
|
1019
1019
|
}
|
|
1020
|
-
async function
|
|
1021
|
-
await Promise.resolve(),
|
|
1020
|
+
async function _r() {
|
|
1021
|
+
await Promise.resolve(), E();
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function p(e) {
|
|
1024
1024
|
var t = e.f, n = (t & fe) !== 0;
|
|
1025
|
-
if (
|
|
1025
|
+
if ($ !== null && !ae) {
|
|
1026
1026
|
if (!pe?.includes(e)) {
|
|
1027
|
-
var r =
|
|
1028
|
-
e.rv <
|
|
1027
|
+
var r = $.deps;
|
|
1028
|
+
e.rv < Tt && (e.rv = Tt, Q === null && r !== null && r[Y] === e ? Y++ : Q === null ? Q = [e] : (!$e || !Q.includes(e)) && Q.push(e));
|
|
1029
1029
|
}
|
|
1030
1030
|
} else if (n && /** @type {Derived} */
|
|
1031
1031
|
e.deps === null && /** @type {Derived} */
|
|
@@ -1034,12 +1034,12 @@ function _(e) {
|
|
|
1034
1034
|
/** @type {Derived} */
|
|
1035
1035
|
e
|
|
1036
1036
|
), i = s.parent;
|
|
1037
|
-
i !== null && (i.f &
|
|
1037
|
+
i !== null && (i.f & te) === 0 && (s.f ^= te);
|
|
1038
1038
|
}
|
|
1039
1039
|
return n && (s = /** @type {Derived} */
|
|
1040
|
-
e,
|
|
1040
|
+
e, et(s) && cr(s)), pt && ft.has(e) ? ft.get(e) : e.v;
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function We(e) {
|
|
1043
1043
|
var t = ae;
|
|
1044
1044
|
try {
|
|
1045
1045
|
return ae = !0, e();
|
|
@@ -1047,22 +1047,22 @@ function Ft(e) {
|
|
|
1047
1047
|
ae = t;
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1050
|
+
const Vs = -7169;
|
|
1051
1051
|
function re(e, t) {
|
|
1052
|
-
e.f = e.f &
|
|
1052
|
+
e.f = e.f & Vs | t;
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1055
|
-
|
|
1054
|
+
function Gs(e) {
|
|
1055
|
+
T === null && $ === null && _s(e), $ !== null && ($.f & te) !== 0 && T === null && ms(), pt && vs(e);
|
|
1056
1056
|
}
|
|
1057
1057
|
function Ys(e, t) {
|
|
1058
1058
|
var n = t.last;
|
|
1059
1059
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1062
|
-
for (var s =
|
|
1061
|
+
function Ne(e, t, n, r = !0) {
|
|
1062
|
+
for (var s = T; s !== null && (s.f & Jn) !== 0; )
|
|
1063
1063
|
s = s.parent;
|
|
1064
1064
|
var i = {
|
|
1065
|
-
ctx:
|
|
1065
|
+
ctx: B,
|
|
1066
1066
|
deps: null,
|
|
1067
1067
|
nodes_start: null,
|
|
1068
1068
|
nodes_end: null,
|
|
@@ -1077,136 +1077,136 @@ function De(e, t, n, r = !0) {
|
|
|
1077
1077
|
transitions: null,
|
|
1078
1078
|
wv: 0
|
|
1079
1079
|
};
|
|
1080
|
-
if (i.component_function =
|
|
1080
|
+
if (i.component_function = Ue, n)
|
|
1081
1081
|
try {
|
|
1082
|
-
|
|
1083
|
-
} catch (
|
|
1084
|
-
throw
|
|
1085
|
-
}
|
|
1086
|
-
else t !== null &&
|
|
1087
|
-
var o = n && i.deps === null && i.first === null && i.nodes_start === null && i.teardown === null && (i.f & (Wn |
|
|
1088
|
-
if (!o && r && (s !== null && Ys(i, s),
|
|
1089
|
-
var
|
|
1082
|
+
At(i), i.f |= os;
|
|
1083
|
+
} catch (c) {
|
|
1084
|
+
throw me(i), c;
|
|
1085
|
+
}
|
|
1086
|
+
else t !== null && Bt(i);
|
|
1087
|
+
var o = n && i.deps === null && i.first === null && i.nodes_start === null && i.teardown === null && (i.f & (Wn | Et)) === 0;
|
|
1088
|
+
if (!o && r && (s !== null && Ys(i, s), $ !== null && ($.f & fe) !== 0)) {
|
|
1089
|
+
var l = (
|
|
1090
1090
|
/** @type {Derived} */
|
|
1091
|
-
|
|
1091
|
+
$
|
|
1092
1092
|
);
|
|
1093
|
-
(
|
|
1093
|
+
(l.effects ?? (l.effects = [])).push(i);
|
|
1094
1094
|
}
|
|
1095
1095
|
return i;
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1098
|
-
const t =
|
|
1097
|
+
function Js(e) {
|
|
1098
|
+
const t = Ne(Ft, null, !1);
|
|
1099
1099
|
return re(t, V), t.teardown = e, t;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1102
|
-
|
|
1103
|
-
var t =
|
|
1104
|
-
if (
|
|
1101
|
+
function Re(e) {
|
|
1102
|
+
Gs("$effect");
|
|
1103
|
+
var t = T !== null && (T.f & _e) !== 0 && B !== null && !B.m;
|
|
1104
|
+
if (ce(e, "name", {
|
|
1105
1105
|
value: "$effect"
|
|
1106
1106
|
}), t) {
|
|
1107
1107
|
var n = (
|
|
1108
1108
|
/** @type {ComponentContext} */
|
|
1109
|
-
|
|
1109
|
+
B
|
|
1110
1110
|
);
|
|
1111
1111
|
(n.e ?? (n.e = [])).push({
|
|
1112
1112
|
fn: e,
|
|
1113
|
-
effect:
|
|
1114
|
-
reaction:
|
|
1113
|
+
effect: T,
|
|
1114
|
+
reaction: $
|
|
1115
1115
|
});
|
|
1116
1116
|
} else {
|
|
1117
|
-
var r =
|
|
1117
|
+
var r = dn(e);
|
|
1118
1118
|
return r;
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
const t = De
|
|
1121
|
+
function Ws(e) {
|
|
1122
|
+
const t = Ne(De, e, !0);
|
|
1123
1123
|
return () => {
|
|
1124
|
-
|
|
1124
|
+
me(t);
|
|
1125
1125
|
};
|
|
1126
1126
|
}
|
|
1127
1127
|
function Xs(e) {
|
|
1128
|
-
const t = De
|
|
1128
|
+
const t = Ne(De, e, !0);
|
|
1129
1129
|
return (n = {}) => new Promise((r) => {
|
|
1130
|
-
n.outro ?
|
|
1131
|
-
|
|
1132
|
-
}) : (
|
|
1130
|
+
n.outro ? en(t, () => {
|
|
1131
|
+
me(t), r(void 0);
|
|
1132
|
+
}) : (me(t), r(void 0));
|
|
1133
1133
|
});
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1135
|
+
function dn(e) {
|
|
1136
|
+
return Ne(Yn, e, !1);
|
|
1137
1137
|
}
|
|
1138
1138
|
function yr(e) {
|
|
1139
|
-
return
|
|
1139
|
+
return Ne(Ft, e, !0);
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1142
|
-
const r = t.map(n), s = () => e(...r.map(
|
|
1143
|
-
return
|
|
1141
|
+
function lt(e, t = [], n = un) {
|
|
1142
|
+
const r = t.map(n), s = () => e(...r.map(p));
|
|
1143
|
+
return ce(s, "name", {
|
|
1144
1144
|
value: "{expression}"
|
|
1145
|
-
}),
|
|
1145
|
+
}), hn(s);
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1148
|
-
return
|
|
1147
|
+
function hn(e, t = 0) {
|
|
1148
|
+
return Ne(Ft | ln | t, e, !0);
|
|
1149
1149
|
}
|
|
1150
1150
|
function kt(e, t = !0) {
|
|
1151
|
-
return
|
|
1151
|
+
return Ne(Ft | _e, e, !0, t);
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1153
|
+
function br(e) {
|
|
1154
1154
|
var t = e.teardown;
|
|
1155
1155
|
if (t !== null) {
|
|
1156
|
-
const n =
|
|
1157
|
-
|
|
1156
|
+
const n = pt, r = $;
|
|
1157
|
+
Ln(!0), Se(null);
|
|
1158
1158
|
try {
|
|
1159
1159
|
t.call(null);
|
|
1160
1160
|
} finally {
|
|
1161
|
-
|
|
1161
|
+
Ln(n), Se(r);
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function wr(e, t = !1) {
|
|
1166
1166
|
var n = e.first;
|
|
1167
1167
|
for (e.first = e.last = null; n !== null; ) {
|
|
1168
1168
|
var r = n.next;
|
|
1169
|
-
(n.f &
|
|
1169
|
+
(n.f & De) !== 0 ? n.parent = null : me(n, t), n = r;
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Zs(e) {
|
|
1173
1173
|
for (var t = e.first; t !== null; ) {
|
|
1174
1174
|
var n = t.next;
|
|
1175
|
-
(t.f &
|
|
1175
|
+
(t.f & _e) === 0 && me(t), t = n;
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function me(e, t = !0) {
|
|
1179
1179
|
var n = !1;
|
|
1180
|
-
if ((t || (e.f &
|
|
1180
|
+
if ((t || (e.f & ls) !== 0) && e.nodes_start !== null) {
|
|
1181
1181
|
for (var r = e.nodes_start, s = e.nodes_end; r !== null; ) {
|
|
1182
1182
|
var i = r === s ? null : (
|
|
1183
1183
|
/** @type {TemplateNode} */
|
|
1184
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ Be(r)
|
|
1185
1185
|
);
|
|
1186
1186
|
r.remove(), r = i;
|
|
1187
1187
|
}
|
|
1188
1188
|
n = !0;
|
|
1189
1189
|
}
|
|
1190
|
-
|
|
1190
|
+
wr(e, t && !n), Lt(e, 0), re(e, Ot);
|
|
1191
1191
|
var o = e.transitions;
|
|
1192
1192
|
if (o !== null)
|
|
1193
|
-
for (const
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
var
|
|
1197
|
-
|
|
1193
|
+
for (const c of o)
|
|
1194
|
+
c.stop();
|
|
1195
|
+
br(e);
|
|
1196
|
+
var l = e.parent;
|
|
1197
|
+
l !== null && l.first !== null && Er(e), e.component_function = null, e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
|
|
1198
1198
|
}
|
|
1199
1199
|
function Er(e) {
|
|
1200
1200
|
var t = e.parent, n = e.prev, r = e.next;
|
|
1201
1201
|
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1203
|
+
function en(e, t) {
|
|
1204
1204
|
var n = [];
|
|
1205
|
-
$r(e, n, !0),
|
|
1206
|
-
|
|
1205
|
+
$r(e, n, !0), Ks(n, () => {
|
|
1206
|
+
me(e), t && t();
|
|
1207
1207
|
});
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1209
|
+
function Ks(e, t) {
|
|
1210
1210
|
var n = e.length;
|
|
1211
1211
|
if (n > 0) {
|
|
1212
1212
|
var r = () => --n || t();
|
|
@@ -1221,34 +1221,34 @@ function $r(e, t, n) {
|
|
|
1221
1221
|
for (const o of e.transitions)
|
|
1222
1222
|
(o.is_global || n) && t.push(o);
|
|
1223
1223
|
for (var r = e.first; r !== null; ) {
|
|
1224
|
-
var s = r.next, i = (r.f &
|
|
1224
|
+
var s = r.next, i = (r.f & an) !== 0 || (r.f & _e) !== 0;
|
|
1225
1225
|
$r(r, t, i ? n : !1), r = s;
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1230
|
-
|
|
1229
|
+
function On(e) {
|
|
1230
|
+
Rr(e, !0);
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function Rr(e, t) {
|
|
1233
1233
|
if ((e.f & Ye) !== 0) {
|
|
1234
|
-
e.f ^= Ye, (e.f & V) === 0 && (e.f ^= V),
|
|
1234
|
+
e.f ^= Ye, (e.f & V) === 0 && (e.f ^= V), et(e) && (re(e, ye), Bt(e));
|
|
1235
1235
|
for (var n = e.first; n !== null; ) {
|
|
1236
|
-
var r = n.next, s = (n.f &
|
|
1237
|
-
|
|
1236
|
+
var r = n.next, s = (n.f & an) !== 0 || (n.f & _e) !== 0;
|
|
1237
|
+
Rr(n, s ? t : !1), n = r;
|
|
1238
1238
|
}
|
|
1239
1239
|
if (e.transitions !== null)
|
|
1240
1240
|
for (const i of e.transitions)
|
|
1241
1241
|
(i.is_global || t) && i.in();
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
|
-
const
|
|
1245
|
-
function
|
|
1244
|
+
const at = {}, ei = /at (?:.+ \()?(.+):(\d+):(\d+)\)?$/, ti = /@(.+):(\d+):(\d+)$/;
|
|
1245
|
+
function gn() {
|
|
1246
1246
|
const e = new Error().stack;
|
|
1247
1247
|
if (!e) return null;
|
|
1248
1248
|
const t = [];
|
|
1249
1249
|
for (const n of e.split(`
|
|
1250
1250
|
`)) {
|
|
1251
|
-
let r =
|
|
1251
|
+
let r = ei.exec(n) ?? ti.exec(n);
|
|
1252
1252
|
r && t.push({
|
|
1253
1253
|
file: r[1],
|
|
1254
1254
|
line: +r[2],
|
|
@@ -1257,11 +1257,11 @@ function vn() {
|
|
|
1257
1257
|
}
|
|
1258
1258
|
return t;
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1261
|
-
const e =
|
|
1260
|
+
function Cr() {
|
|
1261
|
+
const e = gn()?.slice(4);
|
|
1262
1262
|
if (!e) return null;
|
|
1263
1263
|
for (let t = 0; t < e.length; t++) {
|
|
1264
|
-
const n = e[t], r =
|
|
1264
|
+
const n = e[t], r = at[n.file];
|
|
1265
1265
|
if (!r) {
|
|
1266
1266
|
if (t === 0) return null;
|
|
1267
1267
|
continue;
|
|
@@ -1275,10 +1275,10 @@ function Pr() {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
return null;
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1278
|
+
function Pr() {
|
|
1279
1279
|
var t;
|
|
1280
|
-
const e =
|
|
1281
|
-
e && (
|
|
1280
|
+
const e = gn()?.[2];
|
|
1281
|
+
e && (at[t = e.file] ?? (at[t] = [])).push({
|
|
1282
1282
|
start: e,
|
|
1283
1283
|
// @ts-expect-error
|
|
1284
1284
|
end: null,
|
|
@@ -1286,14 +1286,14 @@ function Sr() {
|
|
|
1286
1286
|
component: null
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const t =
|
|
1289
|
+
function Sr(e) {
|
|
1290
|
+
const t = gn()?.[2];
|
|
1291
1291
|
if (t) {
|
|
1292
|
-
const n =
|
|
1292
|
+
const n = at[t.file], r = n[n.length - 1];
|
|
1293
1293
|
r.end = t, r.component = e;
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function Un(e, t) {
|
|
1297
1297
|
if (t.owners !== null)
|
|
1298
1298
|
for (; e; ) {
|
|
1299
1299
|
if (e.owners === null) {
|
|
@@ -1305,39 +1305,47 @@ function On(e, t) {
|
|
|
1305
1305
|
e = e.parent;
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function xr(e, t) {
|
|
1309
1309
|
return e.owners === null ? !0 : e.owners.has(t) || // This helps avoid false positives when using HMR, where the component function is replaced
|
|
1310
|
-
|
|
1310
|
+
k in t && [...e.owners].some(
|
|
1311
1311
|
(n) => (
|
|
1312
1312
|
/** @type {any} */
|
|
1313
|
-
n[
|
|
1313
|
+
n[k] === t[k]
|
|
1314
1314
|
)
|
|
1315
|
-
) || e.parent !== null &&
|
|
1315
|
+
) || e.parent !== null && xr(e.parent, t);
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1318
|
-
return e?.owners?.values().next().value ??
|
|
1317
|
+
function Tr(e) {
|
|
1318
|
+
return e?.owners?.values().next().value ?? Tr(
|
|
1319
1319
|
/** @type {ProxyMetadata} */
|
|
1320
1320
|
e.parent
|
|
1321
1321
|
);
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1324
|
-
const t =
|
|
1325
|
-
if (t && !
|
|
1326
|
-
let n =
|
|
1327
|
-
n[
|
|
1323
|
+
function ni(e) {
|
|
1324
|
+
const t = Cr();
|
|
1325
|
+
if (t && !xr(e, t)) {
|
|
1326
|
+
let n = Tr(e);
|
|
1327
|
+
n[k] !== t[k] ? Sn(t[k], n[k]) : Sn();
|
|
1328
1328
|
}
|
|
1329
1329
|
}
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1330
|
+
function Lr(e) {
|
|
1331
|
+
{
|
|
1332
|
+
const t = new Error(`lifecycle_outside_component
|
|
1333
|
+
\`${e}(...)\` can only be used during component initialisation
|
|
1334
|
+
https://svelte.dev/e/lifecycle_outside_component`);
|
|
1335
|
+
throw t.name = "Svelte error", t;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
let B = null;
|
|
1339
|
+
function Dn(e) {
|
|
1340
|
+
B = e;
|
|
1333
1341
|
}
|
|
1334
|
-
let
|
|
1335
|
-
function
|
|
1336
|
-
|
|
1342
|
+
let Ue = null;
|
|
1343
|
+
function An(e) {
|
|
1344
|
+
Ue = e;
|
|
1337
1345
|
}
|
|
1338
|
-
function
|
|
1339
|
-
var r =
|
|
1340
|
-
p:
|
|
1346
|
+
function pn(e, t = !1, n) {
|
|
1347
|
+
var r = B = {
|
|
1348
|
+
p: B,
|
|
1341
1349
|
c: null,
|
|
1342
1350
|
d: !1,
|
|
1343
1351
|
e: null,
|
|
@@ -1346,76 +1354,76 @@ function hn(e, t = !1, n) {
|
|
|
1346
1354
|
x: null,
|
|
1347
1355
|
l: null
|
|
1348
1356
|
};
|
|
1349
|
-
|
|
1357
|
+
Js(() => {
|
|
1350
1358
|
r.d = !0;
|
|
1351
|
-
}),
|
|
1359
|
+
}), B.function = n, Ue = n;
|
|
1352
1360
|
}
|
|
1353
|
-
function
|
|
1354
|
-
const t =
|
|
1361
|
+
function vn(e) {
|
|
1362
|
+
const t = B;
|
|
1355
1363
|
if (t !== null) {
|
|
1356
1364
|
e !== void 0 && (t.x = e);
|
|
1357
1365
|
const o = t.e;
|
|
1358
1366
|
if (o !== null) {
|
|
1359
|
-
var n =
|
|
1367
|
+
var n = T, r = $;
|
|
1360
1368
|
t.e = null;
|
|
1361
1369
|
try {
|
|
1362
1370
|
for (var s = 0; s < o.length; s++) {
|
|
1363
1371
|
var i = o[s];
|
|
1364
|
-
|
|
1372
|
+
Je(i.effect), Se(i.reaction), dn(i.fn);
|
|
1365
1373
|
}
|
|
1366
1374
|
} finally {
|
|
1367
|
-
|
|
1375
|
+
Je(n), Se(r);
|
|
1368
1376
|
}
|
|
1369
1377
|
}
|
|
1370
|
-
|
|
1378
|
+
B = t.p, Ue = t.p?.function ?? null, t.m = !0;
|
|
1371
1379
|
}
|
|
1372
1380
|
return e || /** @type {T} */
|
|
1373
1381
|
{};
|
|
1374
1382
|
}
|
|
1375
|
-
function
|
|
1383
|
+
function kr() {
|
|
1376
1384
|
return !0;
|
|
1377
1385
|
}
|
|
1378
|
-
const
|
|
1379
|
-
function
|
|
1380
|
-
e = e.replace(
|
|
1386
|
+
const ri = /\r/g;
|
|
1387
|
+
function si(e) {
|
|
1388
|
+
e = e.replace(ri, "");
|
|
1381
1389
|
let t = 5381, n = e.length;
|
|
1382
1390
|
for (; n--; ) t = (t << 5) - t ^ e.charCodeAt(n);
|
|
1383
1391
|
return (t >>> 0).toString(36);
|
|
1384
1392
|
}
|
|
1385
|
-
const
|
|
1386
|
-
function
|
|
1387
|
-
return
|
|
1393
|
+
const ii = ["touchstart", "touchmove"];
|
|
1394
|
+
function oi(e) {
|
|
1395
|
+
return ii.includes(e);
|
|
1388
1396
|
}
|
|
1389
|
-
function
|
|
1397
|
+
function li(e) {
|
|
1390
1398
|
return e?.replace(/\//g, "/");
|
|
1391
1399
|
}
|
|
1392
|
-
var
|
|
1393
|
-
function
|
|
1394
|
-
var n =
|
|
1395
|
-
n || (n = /* @__PURE__ */ new Set(),
|
|
1400
|
+
var Bn = /* @__PURE__ */ new Map();
|
|
1401
|
+
function ai(e, t) {
|
|
1402
|
+
var n = Bn.get(e);
|
|
1403
|
+
n || (n = /* @__PURE__ */ new Set(), Bn.set(e, n)), n.add(t);
|
|
1396
1404
|
}
|
|
1397
|
-
function
|
|
1405
|
+
function xe(e, t, n) {
|
|
1398
1406
|
return (...r) => {
|
|
1399
1407
|
const s = e(...r);
|
|
1400
|
-
var i =
|
|
1401
|
-
return
|
|
1408
|
+
var i = A ? s : s.nodeType === 11 ? s.firstChild : s;
|
|
1409
|
+
return Ir(i, t, n), s;
|
|
1402
1410
|
};
|
|
1403
1411
|
}
|
|
1404
|
-
function
|
|
1412
|
+
function ci(e, t, n) {
|
|
1405
1413
|
e.__svelte_meta = {
|
|
1406
1414
|
loc: { file: t, line: n[0], column: n[1] }
|
|
1407
|
-
}, n[2] &&
|
|
1415
|
+
}, n[2] && Ir(e.firstChild, t, n[2]);
|
|
1408
1416
|
}
|
|
1409
|
-
function
|
|
1417
|
+
function Ir(e, t, n) {
|
|
1410
1418
|
for (var r = 0, s = 0; e && r < n.length; ) {
|
|
1411
|
-
if (
|
|
1419
|
+
if (A && e.nodeType === 8) {
|
|
1412
1420
|
var i = (
|
|
1413
1421
|
/** @type {Comment} */
|
|
1414
1422
|
e
|
|
1415
1423
|
);
|
|
1416
|
-
i.data ===
|
|
1424
|
+
i.data === It || i.data === sn ? s += 1 : i.data[0] === on && (s -= 1);
|
|
1417
1425
|
}
|
|
1418
|
-
s === 0 && e.nodeType === 1 &&
|
|
1426
|
+
s === 0 && e.nodeType === 1 && ci(
|
|
1419
1427
|
/** @type {Element} */
|
|
1420
1428
|
e,
|
|
1421
1429
|
t,
|
|
@@ -1423,40 +1431,40 @@ function kr(e, t, n) {
|
|
|
1423
1431
|
), e = e.nextSibling;
|
|
1424
1432
|
}
|
|
1425
1433
|
}
|
|
1426
|
-
const
|
|
1427
|
-
function
|
|
1434
|
+
const ui = /* @__PURE__ */ new Set(), Nn = /* @__PURE__ */ new Set();
|
|
1435
|
+
function vt(e) {
|
|
1428
1436
|
var t = this, n = (
|
|
1429
1437
|
/** @type {Node} */
|
|
1430
1438
|
t.ownerDocument
|
|
1431
1439
|
), r = e.type, s = e.composedPath?.() || [], i = (
|
|
1432
1440
|
/** @type {null | Element} */
|
|
1433
1441
|
s[0] || e.target
|
|
1434
|
-
), o = 0,
|
|
1435
|
-
if (
|
|
1436
|
-
var
|
|
1437
|
-
if (
|
|
1442
|
+
), o = 0, l = e.__root;
|
|
1443
|
+
if (l) {
|
|
1444
|
+
var c = s.indexOf(l);
|
|
1445
|
+
if (c !== -1 && (t === document || t === /** @type {any} */
|
|
1438
1446
|
window)) {
|
|
1439
1447
|
e.__root = t;
|
|
1440
1448
|
return;
|
|
1441
1449
|
}
|
|
1442
|
-
var
|
|
1443
|
-
if (
|
|
1450
|
+
var a = s.indexOf(t);
|
|
1451
|
+
if (a === -1)
|
|
1444
1452
|
return;
|
|
1445
|
-
|
|
1453
|
+
c <= a && (o = c);
|
|
1446
1454
|
}
|
|
1447
1455
|
if (i = /** @type {Element} */
|
|
1448
1456
|
s[o] || e.target, i !== t) {
|
|
1449
|
-
|
|
1457
|
+
ce(e, "currentTarget", {
|
|
1450
1458
|
configurable: !0,
|
|
1451
1459
|
get() {
|
|
1452
1460
|
return i || n;
|
|
1453
1461
|
}
|
|
1454
1462
|
});
|
|
1455
|
-
var
|
|
1456
|
-
Se(null),
|
|
1463
|
+
var u = $, d = T;
|
|
1464
|
+
Se(null), Je(null);
|
|
1457
1465
|
try {
|
|
1458
|
-
for (var
|
|
1459
|
-
var
|
|
1466
|
+
for (var f, g = []; i !== null; ) {
|
|
1467
|
+
var m = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1460
1468
|
i.host || null;
|
|
1461
1469
|
try {
|
|
1462
1470
|
var y = i["__" + r];
|
|
@@ -1464,59 +1472,59 @@ function pt(e) {
|
|
|
1464
1472
|
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1465
1473
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1466
1474
|
e.target === i))
|
|
1467
|
-
if (
|
|
1468
|
-
var [
|
|
1469
|
-
|
|
1475
|
+
if (cn(y)) {
|
|
1476
|
+
var [R, ...N] = y;
|
|
1477
|
+
R.apply(i, [e, ...N]);
|
|
1470
1478
|
} else
|
|
1471
1479
|
y.call(i, e);
|
|
1472
|
-
} catch (
|
|
1473
|
-
|
|
1480
|
+
} catch (F) {
|
|
1481
|
+
f ? g.push(F) : f = F;
|
|
1474
1482
|
}
|
|
1475
|
-
if (e.cancelBubble ||
|
|
1483
|
+
if (e.cancelBubble || m === t || m === null)
|
|
1476
1484
|
break;
|
|
1477
|
-
i =
|
|
1485
|
+
i = m;
|
|
1478
1486
|
}
|
|
1479
|
-
if (
|
|
1480
|
-
for (let
|
|
1487
|
+
if (f) {
|
|
1488
|
+
for (let F of g)
|
|
1481
1489
|
queueMicrotask(() => {
|
|
1482
|
-
throw
|
|
1490
|
+
throw F;
|
|
1483
1491
|
});
|
|
1484
|
-
throw
|
|
1492
|
+
throw f;
|
|
1485
1493
|
}
|
|
1486
1494
|
} finally {
|
|
1487
|
-
e.__root = t, delete e.currentTarget, Se(
|
|
1495
|
+
e.__root = t, delete e.currentTarget, Se(u), Je(d);
|
|
1488
1496
|
}
|
|
1489
1497
|
}
|
|
1490
1498
|
}
|
|
1491
|
-
function
|
|
1499
|
+
function Fr(e) {
|
|
1492
1500
|
var t = document.createElement("template");
|
|
1493
1501
|
return t.innerHTML = e, t.content;
|
|
1494
1502
|
}
|
|
1495
|
-
function
|
|
1503
|
+
function gt(e, t) {
|
|
1496
1504
|
var n = (
|
|
1497
1505
|
/** @type {Effect} */
|
|
1498
|
-
|
|
1506
|
+
T
|
|
1499
1507
|
);
|
|
1500
1508
|
n.nodes_start === null && (n.nodes_start = e, n.nodes_end = t);
|
|
1501
1509
|
}
|
|
1502
1510
|
// @__NO_SIDE_EFFECTS__
|
|
1503
|
-
function
|
|
1504
|
-
var n = (t &
|
|
1511
|
+
function Te(e, t) {
|
|
1512
|
+
var n = (t & is) !== 0, r, s = !e.startsWith("<!>");
|
|
1505
1513
|
return () => {
|
|
1506
|
-
if (
|
|
1507
|
-
return
|
|
1508
|
-
r === void 0 && (r =
|
|
1509
|
-
/* @__PURE__ */
|
|
1514
|
+
if (A)
|
|
1515
|
+
return gt(D, null), D;
|
|
1516
|
+
r === void 0 && (r = Fr(s ? e : "<!>" + e), r = /** @type {Node} */
|
|
1517
|
+
/* @__PURE__ */ ht(r));
|
|
1510
1518
|
var i = (
|
|
1511
1519
|
/** @type {TemplateNode} */
|
|
1512
|
-
n ||
|
|
1520
|
+
n || fn ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1513
1521
|
);
|
|
1514
|
-
return
|
|
1522
|
+
return gt(i, i), i;
|
|
1515
1523
|
};
|
|
1516
1524
|
}
|
|
1517
|
-
function
|
|
1518
|
-
if (
|
|
1519
|
-
|
|
1525
|
+
function ge(e, t) {
|
|
1526
|
+
if (A) {
|
|
1527
|
+
T.nodes_end = D, dt();
|
|
1520
1528
|
return;
|
|
1521
1529
|
}
|
|
1522
1530
|
e !== null && e.before(
|
|
@@ -1524,103 +1532,103 @@ function he(e, t) {
|
|
|
1524
1532
|
t
|
|
1525
1533
|
);
|
|
1526
1534
|
}
|
|
1527
|
-
function
|
|
1535
|
+
function fi(e, t) {
|
|
1528
1536
|
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1529
1537
|
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
|
|
1530
1538
|
}
|
|
1531
|
-
function
|
|
1532
|
-
return
|
|
1539
|
+
function Or(e, t) {
|
|
1540
|
+
return Ur(e, t);
|
|
1533
1541
|
}
|
|
1534
|
-
function
|
|
1535
|
-
|
|
1536
|
-
const n = t.target, r =
|
|
1542
|
+
function di(e, t) {
|
|
1543
|
+
Zt(), t.intro = t.intro ?? !1;
|
|
1544
|
+
const n = t.target, r = A, s = D;
|
|
1537
1545
|
try {
|
|
1538
1546
|
for (var i = (
|
|
1539
1547
|
/** @type {TemplateNode} */
|
|
1540
|
-
/* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ ht(n)
|
|
1541
1549
|
); i && (i.nodeType !== 8 || /** @type {Comment} */
|
|
1542
|
-
i.data !==
|
|
1550
|
+
i.data !== It); )
|
|
1543
1551
|
i = /** @type {TemplateNode} */
|
|
1544
|
-
/* @__PURE__ */
|
|
1552
|
+
/* @__PURE__ */ Be(i);
|
|
1545
1553
|
if (!i)
|
|
1546
|
-
throw
|
|
1547
|
-
|
|
1554
|
+
throw Ve;
|
|
1555
|
+
qe(!0), ve(
|
|
1548
1556
|
/** @type {Comment} */
|
|
1549
1557
|
i
|
|
1550
|
-
),
|
|
1551
|
-
const o =
|
|
1552
|
-
if (
|
|
1553
|
-
|
|
1554
|
-
throw
|
|
1555
|
-
return
|
|
1558
|
+
), dt();
|
|
1559
|
+
const o = Ur(e, { ...t, anchor: i });
|
|
1560
|
+
if (D === null || D.nodeType !== 8 || /** @type {Comment} */
|
|
1561
|
+
D.data !== on)
|
|
1562
|
+
throw Ut(), Ve;
|
|
1563
|
+
return qe(!1), /** @type {Exports} */
|
|
1556
1564
|
o;
|
|
1557
1565
|
} catch (o) {
|
|
1558
|
-
if (o ===
|
|
1559
|
-
return t.recover === !1 &&
|
|
1566
|
+
if (o === Ve)
|
|
1567
|
+
return t.recover === !1 && bs(), Zt(), Ns(n), qe(!1), Or(e, t);
|
|
1560
1568
|
throw o;
|
|
1561
1569
|
} finally {
|
|
1562
|
-
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
const
|
|
1566
|
-
function
|
|
1567
|
-
|
|
1568
|
-
var
|
|
1569
|
-
for (var
|
|
1570
|
-
var
|
|
1571
|
-
if (!
|
|
1572
|
-
|
|
1573
|
-
var
|
|
1574
|
-
t.addEventListener(
|
|
1575
|
-
var y =
|
|
1576
|
-
y === void 0 ? (document.addEventListener(
|
|
1570
|
+
qe(r), ve(s);
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
const ze = /* @__PURE__ */ new Map();
|
|
1574
|
+
function Ur(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: o = !0 }) {
|
|
1575
|
+
Zt();
|
|
1576
|
+
var l = /* @__PURE__ */ new Set(), c = (d) => {
|
|
1577
|
+
for (var f = 0; f < d.length; f++) {
|
|
1578
|
+
var g = d[f];
|
|
1579
|
+
if (!l.has(g)) {
|
|
1580
|
+
l.add(g);
|
|
1581
|
+
var m = oi(g);
|
|
1582
|
+
t.addEventListener(g, vt, { passive: m });
|
|
1583
|
+
var y = ze.get(g);
|
|
1584
|
+
y === void 0 ? (document.addEventListener(g, vt, { passive: m }), ze.set(g, 1)) : ze.set(g, y + 1);
|
|
1577
1585
|
}
|
|
1578
1586
|
}
|
|
1579
1587
|
};
|
|
1580
|
-
|
|
1581
|
-
var
|
|
1582
|
-
var
|
|
1588
|
+
c(cs(ui)), Nn.add(c);
|
|
1589
|
+
var a = void 0, u = Xs(() => {
|
|
1590
|
+
var d = n ?? t.appendChild(Ct());
|
|
1583
1591
|
return kt(() => {
|
|
1584
1592
|
if (i) {
|
|
1585
|
-
|
|
1586
|
-
var
|
|
1593
|
+
pn({});
|
|
1594
|
+
var f = (
|
|
1587
1595
|
/** @type {ComponentContext} */
|
|
1588
|
-
|
|
1596
|
+
B
|
|
1589
1597
|
);
|
|
1590
|
-
|
|
1598
|
+
f.c = i;
|
|
1591
1599
|
}
|
|
1592
|
-
s && (r.$$events = s),
|
|
1600
|
+
s && (r.$$events = s), A && gt(
|
|
1593
1601
|
/** @type {TemplateNode} */
|
|
1594
|
-
|
|
1602
|
+
d,
|
|
1595
1603
|
null
|
|
1596
|
-
),
|
|
1604
|
+
), a = e(d, r) || {}, A && (T.nodes_end = D), i && vn();
|
|
1597
1605
|
}), () => {
|
|
1598
|
-
for (var
|
|
1599
|
-
t.removeEventListener(
|
|
1600
|
-
var
|
|
1606
|
+
for (var f of l) {
|
|
1607
|
+
t.removeEventListener(f, vt);
|
|
1608
|
+
var g = (
|
|
1601
1609
|
/** @type {number} */
|
|
1602
|
-
|
|
1610
|
+
ze.get(f)
|
|
1603
1611
|
);
|
|
1604
|
-
--
|
|
1612
|
+
--g === 0 ? (document.removeEventListener(f, vt), ze.delete(f)) : ze.set(f, g);
|
|
1605
1613
|
}
|
|
1606
|
-
|
|
1614
|
+
Nn.delete(c), d !== n && d.parentNode?.removeChild(d);
|
|
1607
1615
|
};
|
|
1608
1616
|
});
|
|
1609
|
-
return
|
|
1617
|
+
return tn.set(a, u), a;
|
|
1610
1618
|
}
|
|
1611
|
-
let
|
|
1612
|
-
function
|
|
1613
|
-
const n =
|
|
1614
|
-
return n ? (
|
|
1619
|
+
let tn = /* @__PURE__ */ new WeakMap();
|
|
1620
|
+
function hi(e, t) {
|
|
1621
|
+
const n = tn.get(e);
|
|
1622
|
+
return n ? (tn.delete(e), n(t)) : (Ds(), Promise.resolve());
|
|
1615
1623
|
}
|
|
1616
|
-
function
|
|
1617
|
-
e &&
|
|
1624
|
+
function Dr(e) {
|
|
1625
|
+
e && gs(e[k] ?? "a component", e.name);
|
|
1618
1626
|
}
|
|
1619
|
-
function
|
|
1620
|
-
const e =
|
|
1627
|
+
function Ar() {
|
|
1628
|
+
const e = B?.function;
|
|
1621
1629
|
function t(n) {
|
|
1622
|
-
const r =
|
|
1623
|
-
|
|
1630
|
+
const r = Cr()?.[k] ?? "Something";
|
|
1631
|
+
hs(r, n, e[k]);
|
|
1624
1632
|
}
|
|
1625
1633
|
return {
|
|
1626
1634
|
$destroy: () => t("$destroy()"),
|
|
@@ -1628,78 +1636,78 @@ function Ur() {
|
|
|
1628
1636
|
$set: () => t("$set(...)")
|
|
1629
1637
|
};
|
|
1630
1638
|
}
|
|
1631
|
-
function
|
|
1632
|
-
|
|
1633
|
-
var s = e, i = null, o = null,
|
|
1634
|
-
const
|
|
1635
|
-
|
|
1636
|
-
},
|
|
1637
|
-
if (
|
|
1638
|
-
let
|
|
1639
|
-
if (
|
|
1639
|
+
function ct(e, t, [n, r] = [0, 0]) {
|
|
1640
|
+
A && n === 0 && dt();
|
|
1641
|
+
var s = e, i = null, o = null, l = H, c = n > 0 ? an : 0, a = !1;
|
|
1642
|
+
const u = (f, g = !0) => {
|
|
1643
|
+
a = !0, d(g, f);
|
|
1644
|
+
}, d = (f, g) => {
|
|
1645
|
+
if (l === (l = f)) return;
|
|
1646
|
+
let m = !1;
|
|
1647
|
+
if (A && r !== -1) {
|
|
1640
1648
|
if (n === 0) {
|
|
1641
|
-
const
|
|
1649
|
+
const R = (
|
|
1642
1650
|
/** @type {Comment} */
|
|
1643
1651
|
s.data
|
|
1644
1652
|
);
|
|
1645
|
-
|
|
1653
|
+
R === It ? r = 0 : R === sn ? r = 1 / 0 : (r = parseInt(R.substring(1)), r !== r && (r = l ? 1 / 0 : -1));
|
|
1646
1654
|
}
|
|
1647
1655
|
const y = r > n;
|
|
1648
|
-
!!
|
|
1656
|
+
!!l === y && (s = As(), ve(s), qe(!1), m = !0, r = -1);
|
|
1649
1657
|
}
|
|
1650
|
-
|
|
1658
|
+
l ? (i ? On(i) : g && (i = kt(() => g(s))), o && en(o, () => {
|
|
1651
1659
|
o = null;
|
|
1652
|
-
})) : (o ?
|
|
1660
|
+
})) : (o ? On(o) : g && (o = kt(() => g(s, [n + 1, r]))), i && en(i, () => {
|
|
1653
1661
|
i = null;
|
|
1654
|
-
})),
|
|
1662
|
+
})), m && qe(!0);
|
|
1655
1663
|
};
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
},
|
|
1664
|
+
hn(() => {
|
|
1665
|
+
a = !1, t(u), a || d(null, null);
|
|
1666
|
+
}, c), A && (s = D);
|
|
1659
1667
|
}
|
|
1660
|
-
function
|
|
1661
|
-
if (!t || t ===
|
|
1668
|
+
function gi(e, t, n) {
|
|
1669
|
+
if (!t || t === si(String(n ?? ""))) return;
|
|
1662
1670
|
let r;
|
|
1663
1671
|
const s = e.__svelte_meta?.loc;
|
|
1664
|
-
s ? r = `near ${s.file}:${s.line}:${s.column}` :
|
|
1672
|
+
s ? r = `near ${s.file}:${s.line}:${s.column}` : Ue?.[k] && (r = `in ${Ue[k]}`), Us(li(r));
|
|
1665
1673
|
}
|
|
1666
|
-
function
|
|
1667
|
-
var i = e, o = "",
|
|
1668
|
-
|
|
1674
|
+
function Mn(e, t, n, r, s) {
|
|
1675
|
+
var i = e, o = "", l;
|
|
1676
|
+
hn(() => {
|
|
1669
1677
|
if (o === (o = t() ?? "")) {
|
|
1670
|
-
|
|
1678
|
+
A && dt();
|
|
1671
1679
|
return;
|
|
1672
1680
|
}
|
|
1673
|
-
|
|
1674
|
-
if (
|
|
1675
|
-
for (var
|
|
1681
|
+
l !== void 0 && (me(l), l = void 0), o !== "" && (l = kt(() => {
|
|
1682
|
+
if (A) {
|
|
1683
|
+
for (var c = (
|
|
1676
1684
|
/** @type {Comment} */
|
|
1677
|
-
|
|
1678
|
-
),
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
if (
|
|
1683
|
-
throw
|
|
1684
|
-
|
|
1685
|
+
D.data
|
|
1686
|
+
), a = dt(), u = a; a !== null && (a.nodeType !== 8 || /** @type {Comment} */
|
|
1687
|
+
a.data !== ""); )
|
|
1688
|
+
u = a, a = /** @type {TemplateNode} */
|
|
1689
|
+
/* @__PURE__ */ Be(a);
|
|
1690
|
+
if (a === null)
|
|
1691
|
+
throw Ut(), Ve;
|
|
1692
|
+
gi(
|
|
1685
1693
|
/** @type {Element} */
|
|
1686
|
-
|
|
1687
|
-
|
|
1694
|
+
a.parentNode,
|
|
1695
|
+
c,
|
|
1688
1696
|
o
|
|
1689
|
-
),
|
|
1697
|
+
), gt(D, u), i = ve(a);
|
|
1690
1698
|
return;
|
|
1691
1699
|
}
|
|
1692
|
-
var
|
|
1693
|
-
|
|
1700
|
+
var d = o + "", f = Fr(d);
|
|
1701
|
+
gt(
|
|
1694
1702
|
/** @type {TemplateNode} */
|
|
1695
|
-
/* @__PURE__ */
|
|
1703
|
+
/* @__PURE__ */ ht(f),
|
|
1696
1704
|
/** @type {TemplateNode} */
|
|
1697
|
-
|
|
1698
|
-
), i.before(
|
|
1705
|
+
f.lastChild
|
|
1706
|
+
), i.before(f);
|
|
1699
1707
|
}));
|
|
1700
1708
|
});
|
|
1701
1709
|
}
|
|
1702
|
-
function
|
|
1710
|
+
function Br(e, t) {
|
|
1703
1711
|
nr(() => {
|
|
1704
1712
|
var n = e.getRootNode(), r = (
|
|
1705
1713
|
/** @type {ShadowRoot} */
|
|
@@ -1714,30 +1722,30 @@ function Dr(e, t) {
|
|
|
1714
1722
|
);
|
|
1715
1723
|
if (!r.querySelector("#" + t.hash)) {
|
|
1716
1724
|
const s = document.createElement("style");
|
|
1717
|
-
s.id = t.hash, s.textContent = t.code, r.appendChild(s),
|
|
1725
|
+
s.id = t.hash, s.textContent = t.code, r.appendChild(s), ai(t.hash, s);
|
|
1718
1726
|
}
|
|
1719
1727
|
});
|
|
1720
1728
|
}
|
|
1721
|
-
function
|
|
1729
|
+
function pi(e, t, n) {
|
|
1722
1730
|
var r = e == null ? "" : "" + e;
|
|
1723
1731
|
return t && (r = r ? r + " " + t : t), r === "" ? null : r;
|
|
1724
1732
|
}
|
|
1725
|
-
function
|
|
1733
|
+
function He(e, t, n, r, s, i) {
|
|
1726
1734
|
var o = e.__className;
|
|
1727
|
-
if (
|
|
1728
|
-
var
|
|
1729
|
-
(!
|
|
1735
|
+
if (A || o !== n || o === void 0) {
|
|
1736
|
+
var l = pi(n, r);
|
|
1737
|
+
(!A || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = n;
|
|
1730
1738
|
}
|
|
1731
1739
|
return i;
|
|
1732
1740
|
}
|
|
1733
1741
|
function jn(e, t) {
|
|
1734
1742
|
return e === t || e?.[Pe] === t;
|
|
1735
1743
|
}
|
|
1736
|
-
function
|
|
1737
|
-
return
|
|
1744
|
+
function Nr(e = {}, t, n, r) {
|
|
1745
|
+
return dn(() => {
|
|
1738
1746
|
var s, i;
|
|
1739
1747
|
return yr(() => {
|
|
1740
|
-
s = i, i = [],
|
|
1748
|
+
s = i, i = [], We(() => {
|
|
1741
1749
|
e !== n(...i) && (t(e, ...i), s && jn(n(...s), e) && t(null, ...s));
|
|
1742
1750
|
});
|
|
1743
1751
|
}), () => {
|
|
@@ -1757,7 +1765,7 @@ function hi(e = {}, t, n, r) {
|
|
|
1757
1765
|
get: () => {
|
|
1758
1766
|
if (n !== void 0)
|
|
1759
1767
|
return n;
|
|
1760
|
-
|
|
1768
|
+
Es(t);
|
|
1761
1769
|
},
|
|
1762
1770
|
set: (r) => {
|
|
1763
1771
|
n = r;
|
|
@@ -1765,74 +1773,86 @@ function hi(e = {}, t, n, r) {
|
|
|
1765
1773
|
});
|
|
1766
1774
|
}
|
|
1767
1775
|
};
|
|
1768
|
-
var
|
|
1776
|
+
var Yi = e;
|
|
1769
1777
|
e("$state"), e("$effect"), e("$derived"), e("$inspect"), e("$props"), e("$bindable");
|
|
1770
1778
|
}
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1779
|
+
function vi(e) {
|
|
1780
|
+
B === null && Lr("onMount"), Re(() => {
|
|
1781
|
+
const t = We(e);
|
|
1782
|
+
if (typeof t == "function") return (
|
|
1783
|
+
/** @type {() => void} */
|
|
1784
|
+
t
|
|
1785
|
+
);
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
function mi(e) {
|
|
1789
|
+
B === null && Lr("onDestroy"), vi(() => () => We(e));
|
|
1790
|
+
}
|
|
1791
|
+
let mt = !1;
|
|
1792
|
+
function _i(e) {
|
|
1793
|
+
var t = mt;
|
|
1774
1794
|
try {
|
|
1775
|
-
return
|
|
1795
|
+
return mt = !1, [e(), mt];
|
|
1776
1796
|
} finally {
|
|
1777
|
-
|
|
1797
|
+
mt = t;
|
|
1778
1798
|
}
|
|
1779
1799
|
}
|
|
1780
1800
|
function Qn(e) {
|
|
1781
1801
|
return e.ctx?.d ?? !1;
|
|
1782
1802
|
}
|
|
1783
|
-
function
|
|
1784
|
-
var s = (n &
|
|
1785
|
-
o ? [
|
|
1803
|
+
function x(e, t, n, r) {
|
|
1804
|
+
var s = (n & ts) !== 0, i = !0, o = (n & rs) !== 0, l = (n & ss) !== 0, c = !1, a;
|
|
1805
|
+
o ? [a, c] = _i(() => (
|
|
1786
1806
|
/** @type {V} */
|
|
1787
1807
|
e[t]
|
|
1788
|
-
)) :
|
|
1808
|
+
)) : a = /** @type {V} */
|
|
1789
1809
|
e[t];
|
|
1790
|
-
var
|
|
1810
|
+
var u = Pe in e || Xn in e, d = o && (Fe(e, t)?.set ?? (u && t in e && ((w) => e[t] = w))) || void 0, f = (
|
|
1791
1811
|
/** @type {V} */
|
|
1792
1812
|
r
|
|
1793
|
-
),
|
|
1813
|
+
), g = !0, m = !1, y = () => (m = !0, g && (g = !1, l ? f = We(
|
|
1794
1814
|
/** @type {() => V} */
|
|
1795
1815
|
r
|
|
1796
|
-
) :
|
|
1797
|
-
r),
|
|
1798
|
-
|
|
1799
|
-
var
|
|
1800
|
-
if (
|
|
1801
|
-
var
|
|
1816
|
+
) : f = /** @type {V} */
|
|
1817
|
+
r), f);
|
|
1818
|
+
a === void 0 && r !== void 0 && (d && i && ws(t), a = y(), d && d(a));
|
|
1819
|
+
var R;
|
|
1820
|
+
if (R = () => {
|
|
1821
|
+
var w = (
|
|
1802
1822
|
/** @type {V} */
|
|
1803
1823
|
e[t]
|
|
1804
1824
|
);
|
|
1805
|
-
return
|
|
1806
|
-
}, (n &
|
|
1807
|
-
return
|
|
1808
|
-
if (
|
|
1809
|
-
var
|
|
1810
|
-
return function(
|
|
1811
|
-
return arguments.length > 0 ? ((!
|
|
1825
|
+
return w === void 0 ? y() : (g = !0, m = !1, w);
|
|
1826
|
+
}, (n & ns) === 0)
|
|
1827
|
+
return R;
|
|
1828
|
+
if (d) {
|
|
1829
|
+
var N = e.$$legacy;
|
|
1830
|
+
return function(w, M) {
|
|
1831
|
+
return arguments.length > 0 ? ((!M || N || c) && d(M ? R() : w), w) : R();
|
|
1812
1832
|
};
|
|
1813
1833
|
}
|
|
1814
|
-
var
|
|
1815
|
-
var
|
|
1816
|
-
return
|
|
1834
|
+
var F = !1, j = /* @__PURE__ */ or(a), I = /* @__PURE__ */ un(() => {
|
|
1835
|
+
var w = R(), M = p(j);
|
|
1836
|
+
return F ? (F = !1, M) : j.v = w;
|
|
1817
1837
|
});
|
|
1818
|
-
return o &&
|
|
1838
|
+
return o && p(I), s || (I.equals = sr), function(w, M) {
|
|
1819
1839
|
if (arguments.length > 0) {
|
|
1820
|
-
const W =
|
|
1821
|
-
if (!
|
|
1822
|
-
if (
|
|
1823
|
-
return
|
|
1824
|
-
|
|
1840
|
+
const W = M ? p(I) : o ? Ie(w) : w;
|
|
1841
|
+
if (!I.equals(W)) {
|
|
1842
|
+
if (F = !0, b(j, W), m && f !== void 0 && (f = W), Qn(I))
|
|
1843
|
+
return w;
|
|
1844
|
+
We(() => p(I));
|
|
1825
1845
|
}
|
|
1826
|
-
return
|
|
1846
|
+
return w;
|
|
1827
1847
|
}
|
|
1828
|
-
return Qn(
|
|
1848
|
+
return Qn(I) ? I.v : p(I);
|
|
1829
1849
|
};
|
|
1830
1850
|
}
|
|
1831
|
-
function
|
|
1832
|
-
return new
|
|
1851
|
+
function yi(e) {
|
|
1852
|
+
return new bi(e);
|
|
1833
1853
|
}
|
|
1834
|
-
var
|
|
1835
|
-
class
|
|
1854
|
+
var he, ee;
|
|
1855
|
+
class bi {
|
|
1836
1856
|
/**
|
|
1837
1857
|
* @param {ComponentConstructorOptions & {
|
|
1838
1858
|
* component: any;
|
|
@@ -1840,56 +1860,56 @@ class _i {
|
|
|
1840
1860
|
*/
|
|
1841
1861
|
constructor(t) {
|
|
1842
1862
|
/** @type {any} */
|
|
1843
|
-
|
|
1863
|
+
Ht(this, he);
|
|
1844
1864
|
/** @type {Record<string, any>} */
|
|
1845
|
-
|
|
1865
|
+
Ht(this, ee);
|
|
1846
1866
|
var n = /* @__PURE__ */ new Map(), r = (i, o) => {
|
|
1847
|
-
var
|
|
1848
|
-
return n.set(i,
|
|
1867
|
+
var l = /* @__PURE__ */ or(o);
|
|
1868
|
+
return n.set(i, l), l;
|
|
1849
1869
|
};
|
|
1850
1870
|
const s = new Proxy(
|
|
1851
1871
|
{ ...t.props || {}, $$events: {} },
|
|
1852
1872
|
{
|
|
1853
1873
|
get(i, o) {
|
|
1854
|
-
return
|
|
1874
|
+
return p(n.get(o) ?? r(o, Reflect.get(i, o)));
|
|
1855
1875
|
},
|
|
1856
1876
|
has(i, o) {
|
|
1857
|
-
return o ===
|
|
1877
|
+
return o === Xn ? !0 : (p(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
|
|
1858
1878
|
},
|
|
1859
|
-
set(i, o,
|
|
1860
|
-
return
|
|
1879
|
+
set(i, o, l) {
|
|
1880
|
+
return b(n.get(o) ?? r(o, l), l), Reflect.set(i, o, l);
|
|
1861
1881
|
}
|
|
1862
1882
|
}
|
|
1863
1883
|
);
|
|
1864
|
-
Vt(this,
|
|
1884
|
+
Vt(this, ee, (t.hydrate ? di : Or)(t.component, {
|
|
1865
1885
|
target: t.target,
|
|
1866
1886
|
anchor: t.anchor,
|
|
1867
1887
|
props: s,
|
|
1868
1888
|
context: t.context,
|
|
1869
1889
|
intro: t.intro ?? !1,
|
|
1870
1890
|
recover: t.recover
|
|
1871
|
-
})), (!t?.props?.$$host || t.sync === !1) &&
|
|
1872
|
-
for (const i of Object.keys(
|
|
1873
|
-
i === "$set" || i === "$destroy" || i === "$on" ||
|
|
1891
|
+
})), (!t?.props?.$$host || t.sync === !1) && E(), Vt(this, he, s.$$events);
|
|
1892
|
+
for (const i of Object.keys(q(this, ee)))
|
|
1893
|
+
i === "$set" || i === "$destroy" || i === "$on" || ce(this, i, {
|
|
1874
1894
|
get() {
|
|
1875
|
-
return
|
|
1895
|
+
return q(this, ee)[i];
|
|
1876
1896
|
},
|
|
1877
1897
|
/** @param {any} value */
|
|
1878
1898
|
set(o) {
|
|
1879
|
-
|
|
1899
|
+
q(this, ee)[i] = o;
|
|
1880
1900
|
},
|
|
1881
1901
|
enumerable: !0
|
|
1882
1902
|
});
|
|
1883
|
-
|
|
1903
|
+
q(this, ee).$set = /** @param {Record<string, any>} next */
|
|
1884
1904
|
(i) => {
|
|
1885
1905
|
Object.assign(s, i);
|
|
1886
|
-
},
|
|
1887
|
-
|
|
1906
|
+
}, q(this, ee).$destroy = () => {
|
|
1907
|
+
hi(q(this, ee));
|
|
1888
1908
|
};
|
|
1889
1909
|
}
|
|
1890
1910
|
/** @param {Record<string, any>} props */
|
|
1891
1911
|
$set(t) {
|
|
1892
|
-
|
|
1912
|
+
q(this, ee).$set(t);
|
|
1893
1913
|
}
|
|
1894
1914
|
/**
|
|
1895
1915
|
* @param {string} event
|
|
@@ -1897,22 +1917,22 @@ class _i {
|
|
|
1897
1917
|
* @returns {any}
|
|
1898
1918
|
*/
|
|
1899
1919
|
$on(t, n) {
|
|
1900
|
-
|
|
1920
|
+
q(this, he)[t] = q(this, he)[t] || [];
|
|
1901
1921
|
const r = (...s) => n.call(this, ...s);
|
|
1902
|
-
return
|
|
1903
|
-
|
|
1922
|
+
return q(this, he)[t].push(r), () => {
|
|
1923
|
+
q(this, he)[t] = q(this, he)[t].filter(
|
|
1904
1924
|
/** @param {any} fn */
|
|
1905
1925
|
(s) => s !== r
|
|
1906
1926
|
);
|
|
1907
1927
|
};
|
|
1908
1928
|
}
|
|
1909
1929
|
$destroy() {
|
|
1910
|
-
|
|
1930
|
+
q(this, ee).$destroy();
|
|
1911
1931
|
}
|
|
1912
1932
|
}
|
|
1913
|
-
|
|
1914
|
-
let
|
|
1915
|
-
typeof HTMLElement == "function" && (
|
|
1933
|
+
he = new WeakMap(), ee = new WeakMap();
|
|
1934
|
+
let Mr;
|
|
1935
|
+
typeof HTMLElement == "function" && (Mr = class extends HTMLElement {
|
|
1916
1936
|
/**
|
|
1917
1937
|
* @param {*} $$componentCtor
|
|
1918
1938
|
* @param {*} $$slots
|
|
@@ -1921,25 +1941,25 @@ typeof HTMLElement == "function" && (Ar = class extends HTMLElement {
|
|
|
1921
1941
|
constructor(t, n, r) {
|
|
1922
1942
|
super();
|
|
1923
1943
|
/** The Svelte component constructor */
|
|
1924
|
-
|
|
1944
|
+
O(this, "$$ctor");
|
|
1925
1945
|
/** Slots */
|
|
1926
|
-
|
|
1946
|
+
O(this, "$$s");
|
|
1927
1947
|
/** @type {any} The Svelte component instance */
|
|
1928
|
-
|
|
1948
|
+
O(this, "$$c");
|
|
1929
1949
|
/** Whether or not the custom element is connected */
|
|
1930
|
-
|
|
1950
|
+
O(this, "$$cn", !1);
|
|
1931
1951
|
/** @type {Record<string, any>} Component props data */
|
|
1932
|
-
|
|
1952
|
+
O(this, "$$d", {});
|
|
1933
1953
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1934
|
-
|
|
1954
|
+
O(this, "$$r", !1);
|
|
1935
1955
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1936
|
-
|
|
1956
|
+
O(this, "$$p_d", {});
|
|
1937
1957
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1938
|
-
|
|
1958
|
+
O(this, "$$l", {});
|
|
1939
1959
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1940
|
-
|
|
1960
|
+
O(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1941
1961
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
1942
|
-
|
|
1962
|
+
O(this, "$$me");
|
|
1943
1963
|
this.$$ctor = t, this.$$s = n, r && this.attachShadow({ mode: "open" });
|
|
1944
1964
|
}
|
|
1945
1965
|
/**
|
|
@@ -1969,14 +1989,14 @@ typeof HTMLElement == "function" && (Ar = class extends HTMLElement {
|
|
|
1969
1989
|
if (this.$$cn = !0, !this.$$c) {
|
|
1970
1990
|
let n = function(i) {
|
|
1971
1991
|
return (o) => {
|
|
1972
|
-
const
|
|
1973
|
-
i !== "default" && (
|
|
1992
|
+
const l = document.createElement("slot");
|
|
1993
|
+
i !== "default" && (l.name = i), ge(o, l);
|
|
1974
1994
|
};
|
|
1975
1995
|
};
|
|
1976
1996
|
var t = n;
|
|
1977
1997
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
1978
1998
|
return;
|
|
1979
|
-
const r = {}, s =
|
|
1999
|
+
const r = {}, s = wi(this);
|
|
1980
2000
|
for (const i of this.$$s)
|
|
1981
2001
|
i in s && (i === "default" && !this.$$d.children ? (this.$$d.children = n(i), r.default = !0) : r[i] = n(i));
|
|
1982
2002
|
for (const i of this.attributes) {
|
|
@@ -1985,7 +2005,7 @@ typeof HTMLElement == "function" && (Ar = class extends HTMLElement {
|
|
|
1985
2005
|
}
|
|
1986
2006
|
for (const i in this.$$p_d)
|
|
1987
2007
|
!(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
1988
|
-
this.$$c =
|
|
2008
|
+
this.$$c = yi({
|
|
1989
2009
|
component: this.$$ctor,
|
|
1990
2010
|
target: this.shadowRoot || this,
|
|
1991
2011
|
props: {
|
|
@@ -1993,10 +2013,10 @@ typeof HTMLElement == "function" && (Ar = class extends HTMLElement {
|
|
|
1993
2013
|
$$slots: r,
|
|
1994
2014
|
$$host: this
|
|
1995
2015
|
}
|
|
1996
|
-
}), this.$$me =
|
|
2016
|
+
}), this.$$me = Ws(() => {
|
|
1997
2017
|
yr(() => {
|
|
1998
2018
|
this.$$r = !0;
|
|
1999
|
-
for (const i of
|
|
2019
|
+
for (const i of Rt(this.$$c)) {
|
|
2000
2020
|
if (!this.$$p_d[i]?.reflect) continue;
|
|
2001
2021
|
this.$$d[i] = this.$$c[i];
|
|
2002
2022
|
const o = wt(
|
|
@@ -2012,8 +2032,8 @@ typeof HTMLElement == "function" && (Ar = class extends HTMLElement {
|
|
|
2012
2032
|
});
|
|
2013
2033
|
for (const i in this.$$l)
|
|
2014
2034
|
for (const o of this.$$l[i]) {
|
|
2015
|
-
const
|
|
2016
|
-
this.$$l_u.set(o,
|
|
2035
|
+
const l = this.$$c.$on(i, o);
|
|
2036
|
+
this.$$l_u.set(o, l);
|
|
2017
2037
|
}
|
|
2018
2038
|
this.$$l = {};
|
|
2019
2039
|
}
|
|
@@ -2037,7 +2057,7 @@ typeof HTMLElement == "function" && (Ar = class extends HTMLElement {
|
|
|
2037
2057
|
* @param {string} attribute_name
|
|
2038
2058
|
*/
|
|
2039
2059
|
$$g_p(t) {
|
|
2040
|
-
return
|
|
2060
|
+
return Rt(this.$$p_d).find(
|
|
2041
2061
|
(n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
|
|
2042
2062
|
) || t;
|
|
2043
2063
|
}
|
|
@@ -2072,7 +2092,7 @@ function wt(e, t, n, r) {
|
|
|
2072
2092
|
return t;
|
|
2073
2093
|
}
|
|
2074
2094
|
}
|
|
2075
|
-
function
|
|
2095
|
+
function wi(e) {
|
|
2076
2096
|
const t = {};
|
|
2077
2097
|
return e.childNodes.forEach((n) => {
|
|
2078
2098
|
t[
|
|
@@ -2081,76 +2101,76 @@ function mi(e) {
|
|
|
2081
2101
|
] = !0;
|
|
2082
2102
|
}), t;
|
|
2083
2103
|
}
|
|
2084
|
-
function
|
|
2085
|
-
let o = class extends
|
|
2104
|
+
function jr(e, t, n, r, s, i) {
|
|
2105
|
+
let o = class extends Mr {
|
|
2086
2106
|
constructor() {
|
|
2087
2107
|
super(e, n, s), this.$$p_d = t;
|
|
2088
2108
|
}
|
|
2089
2109
|
static get observedAttributes() {
|
|
2090
|
-
return
|
|
2091
|
-
(
|
|
2110
|
+
return Rt(t).map(
|
|
2111
|
+
(l) => (t[l].attribute || l).toLowerCase()
|
|
2092
2112
|
);
|
|
2093
2113
|
}
|
|
2094
2114
|
};
|
|
2095
|
-
return
|
|
2096
|
-
|
|
2115
|
+
return Rt(t).forEach((l) => {
|
|
2116
|
+
ce(o.prototype, l, {
|
|
2097
2117
|
get() {
|
|
2098
|
-
return this.$$c &&
|
|
2118
|
+
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2099
2119
|
},
|
|
2100
|
-
set(
|
|
2101
|
-
|
|
2102
|
-
var
|
|
2103
|
-
if (
|
|
2104
|
-
var
|
|
2105
|
-
|
|
2120
|
+
set(c) {
|
|
2121
|
+
c = wt(l, c, t), this.$$d[l] = c;
|
|
2122
|
+
var a = this.$$c;
|
|
2123
|
+
if (a) {
|
|
2124
|
+
var u = Fe(a, l)?.get;
|
|
2125
|
+
u ? a[l] = c : a.$set({ [l]: c });
|
|
2106
2126
|
}
|
|
2107
2127
|
}
|
|
2108
2128
|
});
|
|
2109
|
-
}), r.forEach((
|
|
2110
|
-
|
|
2129
|
+
}), r.forEach((l) => {
|
|
2130
|
+
ce(o.prototype, l, {
|
|
2111
2131
|
get() {
|
|
2112
|
-
return this.$$c?.[
|
|
2132
|
+
return this.$$c?.[l];
|
|
2113
2133
|
}
|
|
2114
2134
|
});
|
|
2115
2135
|
}), e.element = /** @type {any} */
|
|
2116
2136
|
o, o;
|
|
2117
2137
|
}
|
|
2118
|
-
function
|
|
2119
|
-
return
|
|
2138
|
+
function zn(e, ...t) {
|
|
2139
|
+
return We(() => {
|
|
2120
2140
|
try {
|
|
2121
2141
|
let n = !1;
|
|
2122
2142
|
const r = [];
|
|
2123
2143
|
for (const s of t)
|
|
2124
|
-
s && typeof s == "object" && Pe in s ? (r.push(
|
|
2125
|
-
n && (
|
|
2144
|
+
s && typeof s == "object" && Pe in s ? (r.push(Ls(s, !0)), n = !0) : r.push(s);
|
|
2145
|
+
n && (Os(e), console.log("%c[snapshot]", "color: grey", ...r));
|
|
2126
2146
|
} catch {
|
|
2127
2147
|
}
|
|
2128
2148
|
}), t;
|
|
2129
2149
|
}
|
|
2130
|
-
const
|
|
2150
|
+
const qn = "-pie-editor--", Qr = (...e) => e.reduce((t, n) => {
|
|
2131
2151
|
for (const r in n)
|
|
2132
2152
|
n.hasOwnProperty(r) && n[r] !== null && n[r] !== void 0 && (t[r] = n[r]);
|
|
2133
2153
|
return t;
|
|
2134
|
-
}, {}),
|
|
2135
|
-
var
|
|
2136
|
-
const
|
|
2154
|
+
}, {}), zr = {}, Ei = "https://builder.pie-api.com", $i = zr.PUBLIC_BUILDER_ORIGIN_URL || Ei, Ri = zr.PUBLIC_BUILDER_BUNDLE_URL || `${$i}/api/v1/bundles/`;
|
|
2155
|
+
var z = /* @__PURE__ */ ((e) => (e.player = "player.js", e.clientPlayer = "client-player.js", e.editor = "editor.js", e))(z || {}), nn = /* @__PURE__ */ ((e) => (e.loading = "loading", e.loaded = "loaded", e))(nn || {});
|
|
2156
|
+
const Ci = {
|
|
2137
2157
|
invokeControllerForModel: !0,
|
|
2138
2158
|
env: { mode: "gather", role: "student", partialScoring: !1 },
|
|
2139
2159
|
eventListeners: {}
|
|
2140
2160
|
};
|
|
2141
|
-
function
|
|
2161
|
+
function Pi(e) {
|
|
2142
2162
|
return e && typeof e.pie == "object";
|
|
2143
2163
|
}
|
|
2144
|
-
function
|
|
2164
|
+
function Hn(e) {
|
|
2145
2165
|
return typeof e == "function" && "prototype" in e && e.prototype instanceof HTMLElement;
|
|
2146
2166
|
}
|
|
2147
|
-
function
|
|
2167
|
+
function Si(e) {
|
|
2148
2168
|
return e && typeof e.PIE_REGISTRY == "object";
|
|
2149
2169
|
}
|
|
2150
|
-
const
|
|
2170
|
+
const mn = () => {
|
|
2151
2171
|
let e;
|
|
2152
|
-
return
|
|
2153
|
-
},
|
|
2172
|
+
return Si(window) ? e = window.PIE_REGISTRY : (e = {}, window.PIE_REGISTRY = e), e;
|
|
2173
|
+
}, qr = (e) => {
|
|
2154
2174
|
if (!e)
|
|
2155
2175
|
throw new Error("Parameter is required: input");
|
|
2156
2176
|
const t = e.charAt(0) === "@" ? e.match(/^(@[^/]+\/[^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/) : e.match(/^([^/@]+)(?:\/([^@]+))?(?:@([\s\S]+))?/);
|
|
@@ -2161,7 +2181,7 @@ const gn = () => {
|
|
|
2161
2181
|
path: t[2] || "",
|
|
2162
2182
|
version: t[3] || ""
|
|
2163
2183
|
};
|
|
2164
|
-
},
|
|
2184
|
+
}, xi = (e) => e.split("+").map((t) => qr(t).name).join("+"), Hr = (e, t, n) => {
|
|
2165
2185
|
if (!e)
|
|
2166
2186
|
throw new Error("session data is required");
|
|
2167
2187
|
const r = e.find((i) => i.id === t);
|
|
@@ -2170,7 +2190,7 @@ const gn = () => {
|
|
|
2170
2190
|
const s = n ? { id: t, element: n } : { id: t };
|
|
2171
2191
|
return e.push(s), s;
|
|
2172
2192
|
};
|
|
2173
|
-
function
|
|
2193
|
+
function Me(e, t) {
|
|
2174
2194
|
const n = `[${e}]`;
|
|
2175
2195
|
return {
|
|
2176
2196
|
// Only debug method checks debugEnabledFn - it's checked dynamically on every call
|
|
@@ -2183,11 +2203,11 @@ function dt(e, t) {
|
|
|
2183
2203
|
error: (r, ...s) => console.error(n, r, ...s)
|
|
2184
2204
|
};
|
|
2185
2205
|
}
|
|
2186
|
-
function
|
|
2206
|
+
function Xe() {
|
|
2187
2207
|
return typeof window < "u" && window.PIE_DEBUG === !0;
|
|
2188
2208
|
}
|
|
2189
|
-
const ne =
|
|
2190
|
-
const t =
|
|
2209
|
+
const ne = Me("pie-scoring", () => Xe()), _n = (e) => {
|
|
2210
|
+
const t = mn();
|
|
2191
2211
|
ne.debug(`[findPieController] Looking for controller for: ${e}`), ne.debug("[findPieController] Registry has entries for:", Object.keys(t));
|
|
2192
2212
|
const n = t[e];
|
|
2193
2213
|
if (!n) {
|
|
@@ -2205,7 +2225,7 @@ const ne = dt("pie-scoring", vt), _n = (e) => {
|
|
|
2205
2225
|
if (r)
|
|
2206
2226
|
ne.debug(`[findPieController] ✅ Controller found for ${e} with functions:`, Object.keys(r));
|
|
2207
2227
|
else {
|
|
2208
|
-
if (n.bundleType ===
|
|
2228
|
+
if (n.bundleType === z.clientPlayer)
|
|
2209
2229
|
throw ne.error(
|
|
2210
2230
|
`[findPieController] ❌ CRITICAL: Registry entry exists for ${e} but controller is missing!`
|
|
2211
2231
|
), ne.error(`[findPieController] Bundle type: ${n.bundleType} (controllers required)`), ne.error("[findPieController] Entry:", n), new Error(
|
|
@@ -2216,32 +2236,32 @@ const ne = dt("pie-scoring", vt), _n = (e) => {
|
|
|
2216
2236
|
);
|
|
2217
2237
|
}
|
|
2218
2238
|
return r;
|
|
2219
|
-
},
|
|
2220
|
-
|
|
2239
|
+
}, J = Me("pie-updates", () => Xe()), Ti = async (e, t, n, r, s, i) => {
|
|
2240
|
+
J.debug(`${i} Using controller, env:`, s), J.debug(`${i} Model before filter:`, {
|
|
2221
2241
|
id: t.id,
|
|
2222
2242
|
element: t.element,
|
|
2223
2243
|
hasCorrectResponse: "correctResponse" in t
|
|
2224
2244
|
});
|
|
2225
|
-
const o = (
|
|
2245
|
+
const o = (l, c, a) => (J.debug(`${i} updateSession called for ${l} with:`, a), Object.assign(n, a), Promise.resolve());
|
|
2226
2246
|
try {
|
|
2227
|
-
const
|
|
2247
|
+
const l = await r.model(t, n, s, o), c = {
|
|
2228
2248
|
id: t.id,
|
|
2229
2249
|
element: t.element,
|
|
2230
|
-
...
|
|
2250
|
+
...l
|
|
2231
2251
|
};
|
|
2232
|
-
|
|
2233
|
-
id:
|
|
2234
|
-
element:
|
|
2235
|
-
hasCorrectResponse: "correctResponse" in
|
|
2252
|
+
J.debug(`${i} ✅ Controller filtered model:`, {
|
|
2253
|
+
id: c.id,
|
|
2254
|
+
element: c.element,
|
|
2255
|
+
hasCorrectResponse: "correctResponse" in c,
|
|
2236
2256
|
mode: s.mode,
|
|
2237
2257
|
role: s.role
|
|
2238
|
-
}), e.model =
|
|
2239
|
-
} catch (
|
|
2240
|
-
throw
|
|
2258
|
+
}), e.model = c;
|
|
2259
|
+
} catch (l) {
|
|
2260
|
+
throw J.error(`${i} ❌ Controller error:`, l), l;
|
|
2241
2261
|
}
|
|
2242
|
-
},
|
|
2243
|
-
const { config: n, session: r, env: s, eventListeners: i, invokeControllerForModel: o } =
|
|
2244
|
-
|
|
2262
|
+
}, rn = (e, t) => {
|
|
2263
|
+
const { config: n, session: r, env: s, eventListeners: i, invokeControllerForModel: o } = Qr(
|
|
2264
|
+
Ci,
|
|
2245
2265
|
t
|
|
2246
2266
|
);
|
|
2247
2267
|
if (!s)
|
|
@@ -2250,127 +2270,127 @@ const ne = dt("pie-scoring", vt), _n = (e) => {
|
|
|
2250
2270
|
throw new Error("session is required");
|
|
2251
2271
|
if (!n)
|
|
2252
2272
|
throw new Error("config is required");
|
|
2253
|
-
const
|
|
2254
|
-
if (!
|
|
2255
|
-
|
|
2273
|
+
const l = document.querySelectorAll(e);
|
|
2274
|
+
if (!l || l.length === 0) {
|
|
2275
|
+
J.debug(`no elements found for ${e}`);
|
|
2256
2276
|
return;
|
|
2257
2277
|
}
|
|
2258
|
-
|
|
2259
|
-
const
|
|
2260
|
-
let
|
|
2261
|
-
if (!
|
|
2262
|
-
throw
|
|
2263
|
-
|
|
2264
|
-
const
|
|
2265
|
-
if (
|
|
2266
|
-
|
|
2278
|
+
l.forEach((c) => {
|
|
2279
|
+
const a = c;
|
|
2280
|
+
let u = t?.config?.models?.find((f) => f.id === c.id);
|
|
2281
|
+
if (!u)
|
|
2282
|
+
throw J.error("[updatePieElement] Model not found for", e, t), new Error(`model not found for ${e}`);
|
|
2283
|
+
J.debug(`[updatePieElement] Updating ${e}#${c.id}, env:`, s);
|
|
2284
|
+
const d = Hr(r, u.id, u.element);
|
|
2285
|
+
if (a.session = d, i && Object.entries(i).forEach(([f, g]) => {
|
|
2286
|
+
a.addEventListener(f, g);
|
|
2267
2287
|
}), s && o) {
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2288
|
+
const f = _n(e);
|
|
2289
|
+
f ? (J.debug(`[updatePieElement] Invoking controller for ${e}#${c.id}`, {
|
|
2270
2290
|
mode: s.mode,
|
|
2271
2291
|
role: s.role,
|
|
2272
|
-
hasCorrectResponse: "correctResponse" in
|
|
2273
|
-
}),
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
f,
|
|
2292
|
+
hasCorrectResponse: "correctResponse" in u
|
|
2293
|
+
}), Ti(
|
|
2294
|
+
a,
|
|
2295
|
+
u,
|
|
2277
2296
|
d,
|
|
2297
|
+
f,
|
|
2278
2298
|
s,
|
|
2279
|
-
`[updatePieElement(${e}#${
|
|
2280
|
-
).catch((
|
|
2281
|
-
|
|
2282
|
-
})) : (
|
|
2299
|
+
`[updatePieElement(${e}#${c.id})]`
|
|
2300
|
+
).catch((g) => {
|
|
2301
|
+
J.error(`[updatePieElement] Controller failed for ${e}#${c.id}:`, g), a.model = u;
|
|
2302
|
+
})) : (J.debug(`[updatePieElement] ℹ️ No controller for ${e}, using server-processed model`), a.model = u);
|
|
2283
2303
|
} else
|
|
2284
|
-
|
|
2285
|
-
`[updatePieElement] Direct model assignment for ${e}#${
|
|
2286
|
-
),
|
|
2304
|
+
J.debug(
|
|
2305
|
+
`[updatePieElement] Direct model assignment for ${e}#${c.id} (no controller invocation requested)`
|
|
2306
|
+
), a.model = u;
|
|
2287
2307
|
});
|
|
2288
2308
|
}, _t = (e, t, n) => {
|
|
2289
|
-
|
|
2290
|
-
|
|
2309
|
+
J.debug("[updatePieElements] Updating all elements with env:", n), Object.entries(e.elements).forEach(([r, s]) => {
|
|
2310
|
+
rn(r, { config: e, session: t, env: n });
|
|
2291
2311
|
});
|
|
2292
|
-
}, C =
|
|
2293
|
-
buildServiceBase:
|
|
2294
|
-
bundleType:
|
|
2312
|
+
}, C = Me("pie-initialization", () => Xe()), Li = {
|
|
2313
|
+
buildServiceBase: Ri,
|
|
2314
|
+
bundleType: z.player,
|
|
2295
2315
|
// Default to player.js (no controllers, server-processed models)
|
|
2296
2316
|
env: { mode: "gather", role: "student" }
|
|
2297
|
-
},
|
|
2317
|
+
}, Yt = (e, t) => {
|
|
2298
2318
|
const { config: n, session: r, env: s, eventListeners: i } = t, o = e.tagName.toLowerCase();
|
|
2299
2319
|
C.debug(`[initializePieElement] Initializing ${o}#${e.id}`);
|
|
2300
|
-
let
|
|
2301
|
-
if (!
|
|
2302
|
-
const
|
|
2303
|
-
|
|
2320
|
+
let l = n?.models?.find((u) => u.id === e.id);
|
|
2321
|
+
if (!l) {
|
|
2322
|
+
const d = mn()[o];
|
|
2323
|
+
d && d.bundleType === z.clientPlayer && C.warn(
|
|
2304
2324
|
`[initializePieElement] Model not found for PIE element ${o}#${e.id} (client-player.js bundle)`
|
|
2305
2325
|
);
|
|
2306
2326
|
return;
|
|
2307
2327
|
}
|
|
2308
|
-
const
|
|
2309
|
-
e.session =
|
|
2310
|
-
const
|
|
2328
|
+
const c = Hr(r, l.id, l.element);
|
|
2329
|
+
e.session = c, C.debug(`[initializePieElement] Session set for ${o}#${e.id}:`, c);
|
|
2330
|
+
const a = _n(o);
|
|
2311
2331
|
if (!s)
|
|
2312
2332
|
throw C.error(`[initializePieElement] ❌ FATAL: No env provided for ${o}`), new Error(`No env provided for ${o}. PIE elements require an env object with mode and role.`);
|
|
2313
|
-
|
|
2314
|
-
id:
|
|
2315
|
-
element:
|
|
2316
|
-
hasCorrectResponse: "correctResponse" in
|
|
2333
|
+
a ? C.debug(`[initializePieElement] Controller found for ${o}, will invoke model() function`) : (C.debug(`[initializePieElement] ℹ️ No controller for ${o}, using server-processed model`), C.debug("[initializePieElement] Model already processed by server:", {
|
|
2334
|
+
id: l.id,
|
|
2335
|
+
element: l.element,
|
|
2336
|
+
hasCorrectResponse: "correctResponse" in l,
|
|
2317
2337
|
mode: s.mode,
|
|
2318
2338
|
role: s.role
|
|
2319
|
-
}), e.model =
|
|
2320
|
-
e.addEventListener(
|
|
2339
|
+
}), e.model = l), i && Object.entries(i).forEach(([u, d]) => {
|
|
2340
|
+
e.addEventListener(u, d);
|
|
2321
2341
|
});
|
|
2322
|
-
},
|
|
2342
|
+
}, ki = (e, t, n, r, s) => {
|
|
2323
2343
|
const i = [];
|
|
2324
|
-
return C.debug("[registerPieElementsFromBundle] Available packages in bundle:", Object.keys(e)), C.debug("[registerPieElementsFromBundle] config.elements:", t.elements), typeof window < "u" && (window._pieCurrentContext = { config: t, session: n, env: s.env }), Object.entries(t.elements).forEach(([o,
|
|
2325
|
-
C.debug(`[registerPieElementsFromBundle] Processing element: ${o} -> ${
|
|
2326
|
-
const
|
|
2327
|
-
C.debug(`[registerPieElementsFromBundle] Package without version: "${
|
|
2328
|
-
const
|
|
2329
|
-
if (C.debug("[registerPieElementsFromBundle] elementData result:",
|
|
2330
|
-
throw C.error(`[registerPieElementsFromBundle] ❌ Package "${
|
|
2331
|
-
if (C.debug(`[registerPieElementsFromBundle] elementData for ${
|
|
2332
|
-
hasController: !!
|
|
2333
|
-
hasElement: !!
|
|
2334
|
-
hasConfig: !!
|
|
2335
|
-
controllerKeys:
|
|
2344
|
+
return C.debug("[registerPieElementsFromBundle] Available packages in bundle:", Object.keys(e)), C.debug("[registerPieElementsFromBundle] config.elements:", t.elements), typeof window < "u" && (window._pieCurrentContext = { config: t, session: n, env: s.env }), Object.entries(t.elements).forEach(([o, l]) => {
|
|
2345
|
+
C.debug(`[registerPieElementsFromBundle] Processing element: ${o} -> ${l}`);
|
|
2346
|
+
const c = xi(l);
|
|
2347
|
+
C.debug(`[registerPieElementsFromBundle] Package without version: "${c}"`);
|
|
2348
|
+
const a = e[c];
|
|
2349
|
+
if (C.debug("[registerPieElementsFromBundle] elementData result:", a ? "FOUND" : "UNDEFINED"), !a)
|
|
2350
|
+
throw C.error(`[registerPieElementsFromBundle] ❌ Package "${c}" not found in bundle!`), C.error(`[registerPieElementsFromBundle] Lookup key: "${c}"`), C.error("[registerPieElementsFromBundle] Available packages:", Object.keys(e)), new Error(`pie ${c} not found in ${Object.keys(e)}`);
|
|
2351
|
+
if (C.debug(`[registerPieElementsFromBundle] elementData for ${c}:`, {
|
|
2352
|
+
hasController: !!a.controller,
|
|
2353
|
+
hasElement: !!a.Element,
|
|
2354
|
+
hasConfig: !!a.config,
|
|
2355
|
+
controllerKeys: a.controller ? Object.keys(a.controller) : [],
|
|
2336
2356
|
bundleType: s.bundleType
|
|
2337
|
-
}), !
|
|
2338
|
-
if (s.bundleType ===
|
|
2339
|
-
throw C.error(`[registerPieElementsFromBundle] ❌ CRITICAL: No controller found for ${
|
|
2357
|
+
}), !a.controller) {
|
|
2358
|
+
if (s.bundleType === z.clientPlayer)
|
|
2359
|
+
throw C.error(`[registerPieElementsFromBundle] ❌ CRITICAL: No controller found for ${c}!`), C.error(`[registerPieElementsFromBundle] Bundle type: ${s.bundleType} (controllers required)`), new Error(`No controller found for ${c}. client-player.js bundles MUST include controllers!`);
|
|
2340
2360
|
C.debug(
|
|
2341
|
-
`[registerPieElementsFromBundle] ℹ️ No controller found for ${
|
|
2361
|
+
`[registerPieElementsFromBundle] ℹ️ No controller found for ${c} - using server-processed models (player.js bundle)`
|
|
2342
2362
|
);
|
|
2343
2363
|
}
|
|
2344
2364
|
if (customElements.get(o)) {
|
|
2345
|
-
if (
|
|
2365
|
+
if (rn(o, {
|
|
2346
2366
|
config: t,
|
|
2347
2367
|
session: n,
|
|
2348
2368
|
env: s.env,
|
|
2349
2369
|
...s.eventListeners?.[o] && { eventListeners: s.eventListeners[o] }
|
|
2350
|
-
}), s.bundleType ===
|
|
2351
|
-
const
|
|
2352
|
-
|
|
2370
|
+
}), s.bundleType === z.editor) {
|
|
2371
|
+
const u = o + qn;
|
|
2372
|
+
rn(u, {
|
|
2353
2373
|
config: t,
|
|
2354
2374
|
session: n,
|
|
2355
|
-
...s.eventListeners?.[
|
|
2356
|
-
eventListeners: s.eventListeners[
|
|
2375
|
+
...s.eventListeners?.[u] && {
|
|
2376
|
+
eventListeners: s.eventListeners[u]
|
|
2357
2377
|
}
|
|
2358
2378
|
});
|
|
2359
2379
|
}
|
|
2360
2380
|
} else if (C.debug(
|
|
2361
|
-
`[registerPieElementsFromBundle] Registering ${o} in registry${
|
|
2381
|
+
`[registerPieElementsFromBundle] Registering ${o} in registry${a.controller ? " with controller" : " (no controller - server-processed models)"}`
|
|
2362
2382
|
), r[o] = {
|
|
2363
|
-
package:
|
|
2364
|
-
status:
|
|
2383
|
+
package: l,
|
|
2384
|
+
status: nn.loading,
|
|
2365
2385
|
tagName: o,
|
|
2366
|
-
controller:
|
|
2367
|
-
config:
|
|
2386
|
+
controller: a.controller || null,
|
|
2387
|
+
config: a.config,
|
|
2368
2388
|
bundleType: s.bundleType
|
|
2369
|
-
},
|
|
2370
|
-
customElements.define(o,
|
|
2371
|
-
const
|
|
2372
|
-
if (C.debug(`[registerPieElementsFromBundle] Found ${
|
|
2373
|
-
|
|
2389
|
+
}, Hn(a.Element)) {
|
|
2390
|
+
customElements.define(o, a.Element);
|
|
2391
|
+
const u = document.querySelectorAll(o);
|
|
2392
|
+
if (C.debug(`[registerPieElementsFromBundle] Found ${u.length} elements for tag '${o}'`), u.forEach((d) => {
|
|
2393
|
+
Yt(d, {
|
|
2374
2394
|
config: t,
|
|
2375
2395
|
session: n,
|
|
2376
2396
|
env: s.env,
|
|
@@ -2378,33 +2398,33 @@ const ne = dt("pie-scoring", vt), _n = (e) => {
|
|
|
2378
2398
|
});
|
|
2379
2399
|
}), r[o] = {
|
|
2380
2400
|
...r[o],
|
|
2381
|
-
status:
|
|
2401
|
+
status: nn.loaded
|
|
2382
2402
|
}, i.push(
|
|
2383
2403
|
customElements.whenDefined(o).then(() => {
|
|
2384
2404
|
C.debug("[registerPieElementsFromBundle] defined custom PIE element: %s", o);
|
|
2385
2405
|
})
|
|
2386
|
-
), window._pieElementObserver || (window._pieElementObserver = new MutationObserver((
|
|
2387
|
-
const
|
|
2388
|
-
if (!
|
|
2406
|
+
), window._pieElementObserver || (window._pieElementObserver = new MutationObserver((d) => {
|
|
2407
|
+
const f = window._pieCurrentContext;
|
|
2408
|
+
if (!f) {
|
|
2389
2409
|
C.warn("[MutationObserver] No current context available");
|
|
2390
2410
|
return;
|
|
2391
2411
|
}
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
if (
|
|
2395
|
-
const y =
|
|
2396
|
-
r[y] &&
|
|
2397
|
-
config:
|
|
2398
|
-
session:
|
|
2399
|
-
env:
|
|
2412
|
+
d.forEach((g) => {
|
|
2413
|
+
g.type === "childList" && g.addedNodes.forEach((m) => {
|
|
2414
|
+
if (m.nodeType === Node.ELEMENT_NODE) {
|
|
2415
|
+
const y = m.tagName.toLowerCase();
|
|
2416
|
+
r[y] && Yt(m, {
|
|
2417
|
+
config: f.config,
|
|
2418
|
+
session: f.session,
|
|
2419
|
+
env: f.env,
|
|
2400
2420
|
eventListeners: s.eventListeners?.[y]
|
|
2401
|
-
}),
|
|
2402
|
-
const
|
|
2403
|
-
r[
|
|
2404
|
-
config:
|
|
2405
|
-
session:
|
|
2406
|
-
env:
|
|
2407
|
-
eventListeners: s.eventListeners?.[
|
|
2421
|
+
}), m.querySelectorAll("*").forEach((R) => {
|
|
2422
|
+
const N = R.tagName.toLowerCase();
|
|
2423
|
+
r[N] && Yt(R, {
|
|
2424
|
+
config: f.config,
|
|
2425
|
+
session: f.session,
|
|
2426
|
+
env: f.env,
|
|
2427
|
+
eventListeners: s.eventListeners?.[N]
|
|
2408
2428
|
});
|
|
2409
2429
|
});
|
|
2410
2430
|
}
|
|
@@ -2413,37 +2433,514 @@ const ne = dt("pie-scoring", vt), _n = (e) => {
|
|
|
2413
2433
|
}), window._pieElementObserver.observe(document.body, {
|
|
2414
2434
|
childList: !0,
|
|
2415
2435
|
subtree: !0
|
|
2416
|
-
})), s.bundleType ===
|
|
2417
|
-
if (
|
|
2418
|
-
const
|
|
2419
|
-
customElements.define(
|
|
2420
|
-
customElements.whenDefined(
|
|
2421
|
-
C.debug(`[registerPieElementsFromBundle] defined custom PIE editor element: ${
|
|
2436
|
+
})), s.bundleType === z.editor)
|
|
2437
|
+
if (Hn(a.Configure)) {
|
|
2438
|
+
const d = o + qn;
|
|
2439
|
+
customElements.define(d, a.Configure), i.push(
|
|
2440
|
+
customElements.whenDefined(d).then(() => {
|
|
2441
|
+
C.debug(`[registerPieElementsFromBundle] defined custom PIE editor element: ${d}`);
|
|
2422
2442
|
})
|
|
2423
2443
|
);
|
|
2424
2444
|
} else
|
|
2425
2445
|
C.error(
|
|
2426
|
-
`[registerPieElementsFromBundle] pie.Configure for ${
|
|
2427
|
-
|
|
2446
|
+
`[registerPieElementsFromBundle] pie.Configure for ${c} is not a valid custom element constructor.`,
|
|
2447
|
+
a.configure
|
|
2428
2448
|
);
|
|
2429
2449
|
} else
|
|
2430
2450
|
C.error(
|
|
2431
|
-
`[registerPieElementsFromBundle] pie.Element for ${
|
|
2451
|
+
`[registerPieElementsFromBundle] pie.Element for ${c} is not a valid custom element constructor.`
|
|
2432
2452
|
);
|
|
2433
2453
|
}), i;
|
|
2434
2454
|
}, Vn = (e, t, n = {}) => {
|
|
2435
|
-
const r =
|
|
2436
|
-
if (
|
|
2455
|
+
const r = mn(), s = Qr(Li, n);
|
|
2456
|
+
if (Pi(window)) {
|
|
2437
2457
|
C.debug("[initializePiesFromLoadedBundle] window.pie available");
|
|
2438
2458
|
const i = window.pie.default;
|
|
2439
|
-
|
|
2459
|
+
ki(i, e, t, r, s);
|
|
2440
2460
|
} else
|
|
2441
2461
|
C.error("[initializePiesFromLoadedBundle] window.pie not found; was the bundle inlined correctly?");
|
|
2442
|
-
}
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2462
|
+
}, Ce = {
|
|
2463
|
+
trackPageActions: !1,
|
|
2464
|
+
maxResourceRetries: 3,
|
|
2465
|
+
resourceRetryDelay: 500
|
|
2466
|
+
}, Ii = {
|
|
2467
|
+
trackPageActions: !1,
|
|
2468
|
+
maxRetries: 3,
|
|
2469
|
+
initialRetryDelay: 500,
|
|
2470
|
+
maxRetryDelay: 5e3,
|
|
2471
|
+
debug: !1
|
|
2472
|
+
}, Fi = 80;
|
|
2473
|
+
class Oi {
|
|
2474
|
+
// Track resources within our container
|
|
2475
|
+
constructor(t = {}) {
|
|
2476
|
+
O(this, "config");
|
|
2477
|
+
O(this, "logger");
|
|
2478
|
+
O(this, "observer", null);
|
|
2479
|
+
O(this, "mutationObserver", null);
|
|
2480
|
+
O(this, "errorHandler", null);
|
|
2481
|
+
O(this, "retryAttempts", /* @__PURE__ */ new Map());
|
|
2482
|
+
O(this, "container", null);
|
|
2483
|
+
O(this, "isBrowser");
|
|
2484
|
+
O(this, "containerResources", /* @__PURE__ */ new Set());
|
|
2485
|
+
this.config = { ...Ii, ...t }, this.logger = Me("resource-monitor", () => this.isDebugEnabled()), this.isBrowser = typeof window < "u" && typeof document < "u";
|
|
2486
|
+
}
|
|
2487
|
+
/**
|
|
2488
|
+
* Check if debug logging is enabled (dynamically checks window.PIE_DEBUG)
|
|
2489
|
+
*/
|
|
2490
|
+
isDebugEnabled() {
|
|
2491
|
+
return this.config.debug || typeof window < "u" && window.PIE_DEBUG === !0;
|
|
2492
|
+
}
|
|
2493
|
+
/**
|
|
2494
|
+
* Truncate URL for display in logs
|
|
2495
|
+
*/
|
|
2496
|
+
truncateUrl(t) {
|
|
2497
|
+
return t.length > Fi ? "..." + t.slice(-77) : t;
|
|
2498
|
+
}
|
|
2499
|
+
/**
|
|
2500
|
+
* Strip retry parameters from URL to get the original URL
|
|
2501
|
+
*/
|
|
2502
|
+
getOriginalUrl(t) {
|
|
2503
|
+
try {
|
|
2504
|
+
const n = new URL(t);
|
|
2505
|
+
return n.searchParams.delete("retry"), n.searchParams.delete("t"), n.toString();
|
|
2506
|
+
} catch {
|
|
2507
|
+
return t;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
/**
|
|
2511
|
+
* Track action with New Relic if enabled
|
|
2512
|
+
*/
|
|
2513
|
+
trackNewRelicAction(t, n) {
|
|
2514
|
+
!this.config.trackPageActions || !window.newrelic || window.newrelic.addPageAction(t, {
|
|
2515
|
+
...n,
|
|
2516
|
+
component: "pie-fixed-player",
|
|
2517
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
2518
|
+
});
|
|
2519
|
+
}
|
|
2520
|
+
/**
|
|
2521
|
+
* Track error with New Relic if enabled
|
|
2522
|
+
*/
|
|
2523
|
+
trackNewRelicError(t, n) {
|
|
2524
|
+
!this.config.trackPageActions || !window.newrelic || window.newrelic.noticeError(t, {
|
|
2525
|
+
...n,
|
|
2526
|
+
component: "pie-fixed-player"
|
|
2527
|
+
});
|
|
2528
|
+
}
|
|
2529
|
+
/**
|
|
2530
|
+
* Start monitoring resources in the given container
|
|
2531
|
+
*/
|
|
2532
|
+
start(t) {
|
|
2533
|
+
if (!this.isBrowser) {
|
|
2534
|
+
this.logger.debug("Not in browser environment, skipping resource monitoring");
|
|
2535
|
+
return;
|
|
2536
|
+
}
|
|
2537
|
+
this.container = t, this.setupMutationObserver(), this.scanContainerResources(), this.setupPerformanceObserver(), this.setupErrorHandler(), this.logger.info("✅ Resource monitoring started");
|
|
2538
|
+
}
|
|
2539
|
+
/**
|
|
2540
|
+
* Stop monitoring and clean up
|
|
2541
|
+
*/
|
|
2542
|
+
stop() {
|
|
2543
|
+
this.observer && (this.observer.disconnect(), this.observer = null), this.mutationObserver && (this.mutationObserver.disconnect(), this.mutationObserver = null), this.errorHandler && this.container && (this.container.removeEventListener("error", this.errorHandler, !0), this.errorHandler = null), this.retryAttempts.clear(), this.containerResources.clear(), this.container = null, this.logger.info("Resource monitoring stopped");
|
|
2544
|
+
}
|
|
2545
|
+
/**
|
|
2546
|
+
* Set up MutationObserver to track DOM changes within container
|
|
2547
|
+
* This allows us to know which resources belong to our container
|
|
2548
|
+
*/
|
|
2549
|
+
setupMutationObserver() {
|
|
2550
|
+
if (!this.isBrowser || typeof MutationObserver > "u" || !this.container) {
|
|
2551
|
+
this.logger.debug("MutationObserver not available or no container");
|
|
2552
|
+
return;
|
|
2553
|
+
}
|
|
2554
|
+
try {
|
|
2555
|
+
this.mutationObserver = new MutationObserver((t) => {
|
|
2556
|
+
for (const n of t)
|
|
2557
|
+
if (n.addedNodes.forEach((r) => {
|
|
2558
|
+
r instanceof HTMLElement && this.scanElementForResources(r);
|
|
2559
|
+
}), n.type === "attributes" && n.target instanceof HTMLElement) {
|
|
2560
|
+
const r = n.target;
|
|
2561
|
+
if (this.isResourceElement(r)) {
|
|
2562
|
+
const s = this.getResourceSrc(r);
|
|
2563
|
+
s && (this.containerResources.add(s), this.isDebugEnabled() && this.logger.debug(`📌 Tracked resource attribute change: ${s}`));
|
|
2564
|
+
}
|
|
2565
|
+
}
|
|
2566
|
+
}), this.mutationObserver.observe(this.container, {
|
|
2567
|
+
childList: !0,
|
|
2568
|
+
subtree: !0,
|
|
2569
|
+
attributes: !0,
|
|
2570
|
+
attributeFilter: ["src", "href"]
|
|
2571
|
+
}), this.logger.debug("MutationObserver set up successfully");
|
|
2572
|
+
} catch (t) {
|
|
2573
|
+
this.logger.warn("Failed to set up MutationObserver:", t);
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
/**
|
|
2577
|
+
* Scan an element and its descendants for resources
|
|
2578
|
+
*/
|
|
2579
|
+
scanElementForResources(t) {
|
|
2580
|
+
if (this.isResourceElement(t)) {
|
|
2581
|
+
const r = this.getResourceSrc(t);
|
|
2582
|
+
r && (this.containerResources.add(r), this.isDebugEnabled() && this.logger.debug(`📌 Tracked new resource in container: ${r}`));
|
|
2583
|
+
}
|
|
2584
|
+
["img", "audio", "video", 'link[rel="stylesheet"]', "source"].forEach((r) => {
|
|
2585
|
+
t.querySelectorAll(r).forEach((s) => {
|
|
2586
|
+
if (this.isResourceElement(s)) {
|
|
2587
|
+
const i = this.getResourceSrc(s);
|
|
2588
|
+
i && this.containerResources.add(i);
|
|
2589
|
+
}
|
|
2590
|
+
});
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
/**
|
|
2594
|
+
* Initial scan of container for existing resources
|
|
2595
|
+
*/
|
|
2596
|
+
scanContainerResources() {
|
|
2597
|
+
this.container && (this.scanElementForResources(this.container), this.isDebugEnabled() && (this.logger.debug(`📊 Initial container scan found ${this.containerResources.size} resources`), this.containerResources.size > 0 && this.containerResources.forEach((t) => {
|
|
2598
|
+
this.logger.debug(` - ${this.truncateUrl(t)}`);
|
|
2599
|
+
})));
|
|
2600
|
+
}
|
|
2601
|
+
/**
|
|
2602
|
+
* Set up PerformanceObserver to track resource loading timing
|
|
2603
|
+
*/
|
|
2604
|
+
setupPerformanceObserver() {
|
|
2605
|
+
if (!this.isBrowser || typeof PerformanceObserver > "u") {
|
|
2606
|
+
this.logger.debug("PerformanceObserver not available");
|
|
2607
|
+
return;
|
|
2608
|
+
}
|
|
2609
|
+
try {
|
|
2610
|
+
this.observer = new PerformanceObserver((t) => {
|
|
2611
|
+
for (const n of t.getEntries())
|
|
2612
|
+
n.entryType === "resource" && this.handleResourceTiming(n);
|
|
2613
|
+
}), this.observer.observe({
|
|
2614
|
+
type: "resource",
|
|
2615
|
+
buffered: !0
|
|
2616
|
+
// Capture resources loaded before observer started
|
|
2617
|
+
}), this.logger.debug("PerformanceObserver set up successfully");
|
|
2618
|
+
} catch (t) {
|
|
2619
|
+
this.logger.warn("Failed to set up PerformanceObserver:", t);
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
/**
|
|
2623
|
+
* Handle resource timing entry
|
|
2624
|
+
*/
|
|
2625
|
+
handleResourceTiming(t) {
|
|
2626
|
+
if (!this.isRelevantResource(t)) {
|
|
2627
|
+
this.isDebugEnabled() && (t.initiatorType === "img" || t.initiatorType === "audio" || t.initiatorType === "video") && this.logger.debug(`⏭️ Skipping non-container resource: ${this.truncateUrl(t.name)}`);
|
|
2628
|
+
return;
|
|
2629
|
+
}
|
|
2630
|
+
const r = t.duration, s = t.transferSize, i = t.name, o = t.responseEnd === 0 && t.duration > 0, l = this.retryAttempts.has(i), c = this.retryAttempts.get(i) || 0;
|
|
2631
|
+
if (this.isDebugEnabled()) {
|
|
2632
|
+
const a = this.truncateUrl(i), u = (s / 1024).toFixed(2), d = o ? "❌ FAILED" : "✅ SUCCESS", f = {
|
|
2633
|
+
total: `${r.toFixed(2)}ms`,
|
|
2634
|
+
dns: t.domainLookupEnd > 0 ? `${(t.domainLookupEnd - t.domainLookupStart).toFixed(2)}ms` : "n/a",
|
|
2635
|
+
tcp: t.connectEnd > 0 ? `${(t.connectEnd - t.connectStart).toFixed(2)}ms` : "n/a",
|
|
2636
|
+
request: t.responseStart > 0 ? `${(t.responseStart - t.requestStart).toFixed(2)}ms` : "n/a",
|
|
2637
|
+
response: t.responseEnd > 0 ? `${(t.responseEnd - t.responseStart).toFixed(2)}ms` : "n/a",
|
|
2638
|
+
size: s > 0 ? `${u} KB` : "0 KB",
|
|
2639
|
+
type: t.initiatorType,
|
|
2640
|
+
protocol: t.nextHopProtocol || "unknown"
|
|
2641
|
+
}, g = l && !o ? `
|
|
2642
|
+
🔄 Retry Success: Succeeded after ${c} ${c === 1 ? "retry" : "retries"}` : "";
|
|
2643
|
+
this.logger.info(
|
|
2644
|
+
`📊 PIE Resource Load ${d}
|
|
2645
|
+
URL: ${a}
|
|
2646
|
+
Type: ${f.type} | Protocol: ${f.protocol}
|
|
2647
|
+
⏱️ Total Time: ${f.total}
|
|
2648
|
+
└─ DNS Lookup: ${f.dns}
|
|
2649
|
+
└─ TCP Connect: ${f.tcp}
|
|
2650
|
+
└─ Request Time: ${f.request}
|
|
2651
|
+
└─ Response Time: ${f.response}
|
|
2652
|
+
📦 Transfer Size: ${f.size}${g}`
|
|
2653
|
+
);
|
|
2654
|
+
} else
|
|
2655
|
+
this.logger.debug(`Resource loaded: ${t.name}`, {
|
|
2656
|
+
duration: `${r.toFixed(2)}ms`,
|
|
2657
|
+
size: `${s} bytes`,
|
|
2658
|
+
type: t.initiatorType,
|
|
2659
|
+
failed: o,
|
|
2660
|
+
wasRetried: l,
|
|
2661
|
+
retryCount: c
|
|
2662
|
+
});
|
|
2663
|
+
o || this.handleSuccessfulLoad(i, t, r, s, c, l), this.trackNewRelicAction("pie-resource-load", {
|
|
2664
|
+
url: t.name,
|
|
2665
|
+
duration: Math.round(r),
|
|
2666
|
+
size: s,
|
|
2667
|
+
type: t.initiatorType,
|
|
2668
|
+
failed: o,
|
|
2669
|
+
wasRetried: l,
|
|
2670
|
+
retryCount: c
|
|
2671
|
+
}), o && this.handleFailedLoad(i, t, r, c, l);
|
|
2672
|
+
}
|
|
2673
|
+
/**
|
|
2674
|
+
* Handle successful resource load
|
|
2675
|
+
*/
|
|
2676
|
+
handleSuccessfulLoad(t, n, r, s, i, o) {
|
|
2677
|
+
if (this.dispatchEvent("pie-resource-load-success", {
|
|
2678
|
+
url: t,
|
|
2679
|
+
resourceType: n.initiatorType,
|
|
2680
|
+
duration: r,
|
|
2681
|
+
size: s,
|
|
2682
|
+
retryCount: i,
|
|
2683
|
+
maxRetries: this.config.maxRetries
|
|
2684
|
+
}), o) {
|
|
2685
|
+
const l = this.truncateUrl(t);
|
|
2686
|
+
this.logger.info(
|
|
2687
|
+
`✅ PIE Resource Retry Succeeded!
|
|
2688
|
+
URL: ${l}
|
|
2689
|
+
Retry Attempt: ${i}
|
|
2690
|
+
Load Time: ${r.toFixed(2)}ms
|
|
2691
|
+
Result: Resource now available to user`
|
|
2692
|
+
), this.dispatchEvent("pie-resource-retry-success", {
|
|
2693
|
+
url: t,
|
|
2694
|
+
resourceType: n.initiatorType,
|
|
2695
|
+
duration: r,
|
|
2696
|
+
size: s,
|
|
2697
|
+
retryCount: i,
|
|
2698
|
+
maxRetries: this.config.maxRetries
|
|
2699
|
+
}), this.retryAttempts.delete(t);
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
/**
|
|
2703
|
+
* Handle failed resource load
|
|
2704
|
+
*/
|
|
2705
|
+
handleFailedLoad(t, n, r, s, i) {
|
|
2706
|
+
const o = this.truncateUrl(t);
|
|
2707
|
+
i ? (this.logger.warn(
|
|
2708
|
+
`⚠️ PIE Resource Retry Failed
|
|
2709
|
+
URL: ${o}
|
|
2710
|
+
Retry Attempt: ${s}
|
|
2711
|
+
Remaining Attempts: ${this.config.maxRetries - s}
|
|
2712
|
+
Status: Will ${s >= this.config.maxRetries ? "give up" : "retry again"}`
|
|
2713
|
+
), this.dispatchEvent("pie-resource-retry-failed", {
|
|
2714
|
+
url: t,
|
|
2715
|
+
resourceType: n.initiatorType,
|
|
2716
|
+
duration: r,
|
|
2717
|
+
retryCount: s,
|
|
2718
|
+
maxRetries: this.config.maxRetries,
|
|
2719
|
+
error: "Resource load failed after retry"
|
|
2720
|
+
})) : (this.logger.warn(
|
|
2721
|
+
`⚠️ PIE Resource Initial Load Failed
|
|
2722
|
+
URL: ${o}
|
|
2723
|
+
Status: Will attempt ${this.config.maxRetries} ${this.config.maxRetries === 1 ? "retry" : "retries"}`
|
|
2724
|
+
), this.dispatchEvent("pie-resource-load-failed", {
|
|
2725
|
+
url: t,
|
|
2726
|
+
resourceType: n.initiatorType,
|
|
2727
|
+
duration: r,
|
|
2728
|
+
retryCount: 0,
|
|
2729
|
+
maxRetries: this.config.maxRetries,
|
|
2730
|
+
error: "Initial resource load failed"
|
|
2731
|
+
})), this.trackNewRelicError(new Error(`Resource load failed: ${n.name}`), {
|
|
2732
|
+
resourceUrl: n.name,
|
|
2733
|
+
resourceType: n.initiatorType,
|
|
2734
|
+
duration: Math.round(r),
|
|
2735
|
+
wasRetried: i,
|
|
2736
|
+
retryCount: s
|
|
2737
|
+
});
|
|
2738
|
+
}
|
|
2739
|
+
/**
|
|
2740
|
+
* Check if resource is relevant to our container
|
|
2741
|
+
* Uses container-scoped tracking via MutationObserver
|
|
2742
|
+
*/
|
|
2743
|
+
isRelevantResource(t) {
|
|
2744
|
+
const n = t.name, r = this.containerResources.has(n);
|
|
2745
|
+
if (!r) {
|
|
2746
|
+
for (const s of this.containerResources)
|
|
2747
|
+
if (n.endsWith(s) || s.endsWith(n))
|
|
2748
|
+
return !0;
|
|
2749
|
+
}
|
|
2750
|
+
return r;
|
|
2751
|
+
}
|
|
2752
|
+
/**
|
|
2753
|
+
* Set up error event handler for resource loading failures
|
|
2754
|
+
*/
|
|
2755
|
+
setupErrorHandler() {
|
|
2756
|
+
this.container && (this.errorHandler = (t) => {
|
|
2757
|
+
const n = t.target;
|
|
2758
|
+
if (!this.isResourceElement(n))
|
|
2759
|
+
return;
|
|
2760
|
+
const r = n.tagName.toLowerCase(), s = this.getResourceSrc(n);
|
|
2761
|
+
if (!s)
|
|
2762
|
+
return;
|
|
2763
|
+
const i = this.getOriginalUrl(s), o = this.retryAttempts.get(i) || 0, l = this.config.maxRetries - o, c = l > 0;
|
|
2764
|
+
if (this.isDebugEnabled()) {
|
|
2765
|
+
const a = this.truncateUrl(s);
|
|
2766
|
+
(c ? this.logger.warn.bind(this.logger) : this.logger.error.bind(this.logger))(
|
|
2767
|
+
`${c ? "⚠️" : "❌"} PIE Resource Load Error
|
|
2768
|
+
Element: <${r}>
|
|
2769
|
+
URL: ${a}
|
|
2770
|
+
Current Attempts: ${o}
|
|
2771
|
+
Remaining Retries: ${l}/${this.config.maxRetries}
|
|
2772
|
+
Action: ${c ? "Will retry with exponential backoff" : "Max retries reached, giving up"}`
|
|
2773
|
+
);
|
|
2774
|
+
} else
|
|
2775
|
+
(c ? this.logger.warn.bind(this.logger) : this.logger.error.bind(this.logger))(`${c ? "⚠️" : "❌"} Resource error: ${r} failed to load ${s}`);
|
|
2776
|
+
this.trackNewRelicError(new Error(`Resource load error: ${i}`), {
|
|
2777
|
+
resourceType: r,
|
|
2778
|
+
resourceUrl: i
|
|
2779
|
+
}), this.retryResourceLoad(n, i);
|
|
2780
|
+
}, this.container.addEventListener("error", this.errorHandler, !0), this.logger.debug("Error handler attached to container"));
|
|
2781
|
+
}
|
|
2782
|
+
/**
|
|
2783
|
+
* Check if element is a resource element
|
|
2784
|
+
*/
|
|
2785
|
+
isResourceElement(t) {
|
|
2786
|
+
if (!t || !(t instanceof HTMLElement))
|
|
2787
|
+
return !1;
|
|
2788
|
+
const n = t.tagName.toLowerCase();
|
|
2789
|
+
return ["img", "audio", "video", "link", "source"].includes(n);
|
|
2790
|
+
}
|
|
2791
|
+
/**
|
|
2792
|
+
* Get resource src/href from element
|
|
2793
|
+
*/
|
|
2794
|
+
getResourceSrc(t) {
|
|
2795
|
+
return t instanceof HTMLLinkElement ? t.href : "src" in t && t.src ? t.src : null;
|
|
2796
|
+
}
|
|
2797
|
+
/**
|
|
2798
|
+
* Handle permanent resource failure after all retries exhausted
|
|
2799
|
+
*/
|
|
2800
|
+
handlePermanentFailure(t, n, r) {
|
|
2801
|
+
if (this.isDebugEnabled()) {
|
|
2802
|
+
const s = this.truncateUrl(t);
|
|
2803
|
+
this.logger.error(
|
|
2804
|
+
`❌ PIE Resource Permanently Failed
|
|
2805
|
+
URL: ${s}
|
|
2806
|
+
Total Attempts: ${r + 1} (initial + ${r} retries)
|
|
2807
|
+
Status: Giving up after ${this.config.maxRetries} retries
|
|
2808
|
+
⚠️ This resource will not be available to the user`
|
|
2809
|
+
);
|
|
2810
|
+
} else
|
|
2811
|
+
this.logger.error(`❌ Failed to load resource after ${this.config.maxRetries} retries: ${t}`);
|
|
2812
|
+
this.dispatchEvent("pie-resource-load-error", {
|
|
2813
|
+
url: t,
|
|
2814
|
+
resourceType: n,
|
|
2815
|
+
retryCount: r,
|
|
2816
|
+
maxRetries: this.config.maxRetries,
|
|
2817
|
+
error: `Resource permanently failed after ${this.config.maxRetries} retries`
|
|
2818
|
+
}), this.trackNewRelicError(new Error(`Resource permanently failed after ${this.config.maxRetries} retries: ${t}`), {
|
|
2819
|
+
resourceUrl: t,
|
|
2820
|
+
retryCount: r,
|
|
2821
|
+
resourceType: n
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
/**
|
|
2825
|
+
* Log retry schedule information
|
|
2826
|
+
*/
|
|
2827
|
+
logRetrySchedule(t, n, r, s) {
|
|
2828
|
+
if (this.isDebugEnabled()) {
|
|
2829
|
+
const i = this.truncateUrl(t), o = Math.min(
|
|
2830
|
+
this.config.initialRetryDelay * Math.pow(2, n + 1),
|
|
2831
|
+
this.config.maxRetryDelay
|
|
2832
|
+
), l = s === "img" ? "Cache-busting URL" : s === "audio" || s === "video" ? "element.load()" : "Element replacement";
|
|
2833
|
+
this.logger.info(
|
|
2834
|
+
`🔄 PIE Resource Retry Scheduled
|
|
2835
|
+
URL: ${i}
|
|
2836
|
+
Attempt: ${n + 1}/${this.config.maxRetries}
|
|
2837
|
+
⏰ Wait Time: ${r}ms (exponential backoff)
|
|
2838
|
+
Next Retry Delay: ${o}ms (if this fails)
|
|
2839
|
+
Strategy: ${l}`
|
|
2840
|
+
);
|
|
2841
|
+
} else
|
|
2842
|
+
this.logger.info(
|
|
2843
|
+
`🔄 Retrying resource load (attempt ${n + 1}/${this.config.maxRetries}) after ${r}ms: ${t}`
|
|
2844
|
+
);
|
|
2845
|
+
}
|
|
2846
|
+
/**
|
|
2847
|
+
* Retry loading a failed resource with exponential backoff
|
|
2848
|
+
*/
|
|
2849
|
+
async retryResourceLoad(t, n) {
|
|
2850
|
+
const r = this.retryAttempts.get(n) || 0;
|
|
2851
|
+
if (r >= this.config.maxRetries) {
|
|
2852
|
+
this.handlePermanentFailure(n, t.tagName.toLowerCase(), r);
|
|
2853
|
+
return;
|
|
2854
|
+
}
|
|
2855
|
+
const s = Math.min(this.config.initialRetryDelay * Math.pow(2, r), this.config.maxRetryDelay);
|
|
2856
|
+
this.logRetrySchedule(n, r, s, t.tagName.toLowerCase()), this.trackNewRelicAction("pie-resource-retry", {
|
|
2857
|
+
url: n,
|
|
2858
|
+
attempt: r + 1,
|
|
2859
|
+
delay: s
|
|
2860
|
+
}), await new Promise((i) => setTimeout(i, s)), this.isDebugEnabled() && this.logger.debug(`⏱️ Retry wait completed (${s}ms), attempting reload now...`), this.retryAttempts.set(n, r + 1);
|
|
2861
|
+
try {
|
|
2862
|
+
if (t instanceof HTMLAudioElement || t instanceof HTMLVideoElement)
|
|
2863
|
+
t.load(), this.isDebugEnabled() ? this.logger.debug(`✓ Triggered load() on <${t.tagName.toLowerCase()}>`) : this.logger.debug(`Triggered load() on ${t.tagName.toLowerCase()}`);
|
|
2864
|
+
else if (t instanceof HTMLImageElement) {
|
|
2865
|
+
const i = new URL(n);
|
|
2866
|
+
i.searchParams.set("retry", (r + 1).toString()), i.searchParams.set("t", Date.now().toString()), t.src = i.toString(), this.isDebugEnabled() ? this.logger.debug(`✓ Updated <img> src with cache-busting params: retry=${r + 1}, t=${Date.now()}`) : this.logger.debug("Updated img src with cache-busting params");
|
|
2867
|
+
} else if (t instanceof HTMLLinkElement) {
|
|
2868
|
+
const i = t.cloneNode(!0), o = new URL(n);
|
|
2869
|
+
o.searchParams.set("retry", (r + 1).toString()), i.href = o.toString(), t.parentNode?.replaceChild(i, t), this.isDebugEnabled() ? this.logger.debug("✓ Recreated <link> element with cache-busting params") : this.logger.debug("Recreated link element with cache-busting params");
|
|
2870
|
+
}
|
|
2871
|
+
} catch (i) {
|
|
2872
|
+
this.isDebugEnabled() ? this.logger.error(`❌ Error during retry attempt for ${n}:`, i) : this.logger.error(`Error during retry for ${n}:`, i);
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
/**
|
|
2876
|
+
* Dispatch a custom event from the container
|
|
2877
|
+
*/
|
|
2878
|
+
dispatchEvent(t, n) {
|
|
2879
|
+
if (!this.container)
|
|
2880
|
+
return;
|
|
2881
|
+
const r = new CustomEvent(t, {
|
|
2882
|
+
detail: n,
|
|
2883
|
+
bubbles: !0,
|
|
2884
|
+
composed: !0
|
|
2885
|
+
// Allow crossing shadow DOM boundaries
|
|
2886
|
+
});
|
|
2887
|
+
this.container.dispatchEvent(r);
|
|
2888
|
+
}
|
|
2889
|
+
/**
|
|
2890
|
+
* Get current retry statistics
|
|
2891
|
+
*/
|
|
2892
|
+
getStats() {
|
|
2893
|
+
const t = [];
|
|
2894
|
+
return this.retryAttempts.forEach((n, r) => {
|
|
2895
|
+
t.push({ url: r, attempts: n });
|
|
2896
|
+
}), {
|
|
2897
|
+
activeRetries: this.retryAttempts.size,
|
|
2898
|
+
failedResources: t.sort((n, r) => r.attempts - n.attempts)
|
|
2899
|
+
};
|
|
2900
|
+
}
|
|
2901
|
+
}
|
|
2902
|
+
const Ui = 5e3;
|
|
2903
|
+
function Di(e, t, n, r = "pie-player") {
|
|
2904
|
+
const s = Me("use-resource-monitor", n);
|
|
2905
|
+
let i = U(null), o = U(!1);
|
|
2906
|
+
return Re(() => {
|
|
2907
|
+
const l = e(), c = t(), a = n();
|
|
2908
|
+
l && !p(o) && (s.debug(`Initializing resource monitor for ${r}`, {
|
|
2909
|
+
trackPageActions: c?.trackPageActions ?? !1,
|
|
2910
|
+
maxRetries: c?.maxResourceRetries ?? Ce.maxResourceRetries,
|
|
2911
|
+
retryDelay: c?.resourceRetryDelay ?? Ce.resourceRetryDelay
|
|
2912
|
+
}), b(
|
|
2913
|
+
i,
|
|
2914
|
+
new Oi({
|
|
2915
|
+
trackPageActions: c?.trackPageActions ?? !1,
|
|
2916
|
+
maxRetries: c?.maxResourceRetries ?? Ce.maxResourceRetries,
|
|
2917
|
+
initialRetryDelay: c?.resourceRetryDelay ?? Ce.resourceRetryDelay,
|
|
2918
|
+
maxRetryDelay: Ui,
|
|
2919
|
+
debug: a
|
|
2920
|
+
}),
|
|
2921
|
+
!0
|
|
2922
|
+
), p(i).start(l), b(o, !0), s.info(`✅ Resource monitoring enabled for ${r}` + (c?.trackPageActions ? " (with New Relic tracking)" : " (retry only)")));
|
|
2923
|
+
}), mi(() => {
|
|
2924
|
+
if (p(i)) {
|
|
2925
|
+
const l = p(i).getStats();
|
|
2926
|
+
s.debug(`Resource monitor stats at cleanup for ${r}:`, l), p(i).stop(), b(i, null), b(o, !1);
|
|
2927
|
+
}
|
|
2928
|
+
}), {
|
|
2929
|
+
get instance() {
|
|
2930
|
+
return p(i);
|
|
2931
|
+
},
|
|
2932
|
+
getStats() {
|
|
2933
|
+
return p(i)?.getStats() ?? { activeRetries: 0, failedResources: [] };
|
|
2934
|
+
},
|
|
2935
|
+
get isActive() {
|
|
2936
|
+
return p(o) && S(p(i), null, !1);
|
|
2937
|
+
}
|
|
2938
|
+
};
|
|
2939
|
+
}
|
|
2940
|
+
Pr();
|
|
2941
|
+
ue[k] = "src/lib/components/PieItemPlayer.svelte";
|
|
2942
|
+
var Ai = xe(/* @__PURE__ */ Te("<div><!></div>"), ue[k], [[256, 2]]), Bi = xe(/* @__PURE__ */ Te("<div><!></div>"), ue[k], [[262, 2]]), Ni = xe(/* @__PURE__ */ Te('<div class="pie-item-player svelte-d1rctr"><!> <!></div>'), ue[k], [[254, 0]]);
|
|
2943
|
+
const Mi = {
|
|
2447
2944
|
hash: "svelte-d1rctr",
|
|
2448
2945
|
code: `
|
|
2449
2946
|
.pie-item-player.svelte-d1rctr {
|
|
@@ -2457,54 +2954,54 @@ const Ri = {
|
|
|
2457
2954
|
width: 100%;
|
|
2458
2955
|
}
|
|
2459
2956
|
|
|
2460
|
-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
2957
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGllSXRlbVBsYXllci5zdmVsdGUiLCJtYXBwaW5ncyI6IjtBQTRRQSxDQUFDLDhCQUFnQixDQUFDO0FBQ2xCLEVBQUUsY0FBYztBQUNoQixFQUFFLFdBQVc7QUFDYjs7QUFFQSxDQUFDLG9DQUFzQjtBQUN2QixDQUFDLGlDQUFtQixDQUFDO0FBQ3JCLEVBQUUsY0FBYztBQUNoQixFQUFFLFdBQVc7QUFDYiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOlsiUGllSXRlbVBsYXllci5zdmVsdGUiXX0= */`
|
|
2461
2958
|
};
|
|
2462
|
-
function
|
|
2463
|
-
|
|
2464
|
-
const n =
|
|
2465
|
-
let r =
|
|
2466
|
-
const
|
|
2467
|
-
|
|
2468
|
-
const
|
|
2469
|
-
detail:
|
|
2959
|
+
function ue(e, t) {
|
|
2960
|
+
Dr(new.target), pn(t, !0, ue), Br(e, Mi);
|
|
2961
|
+
const n = Me("pie-item-player", () => Xe());
|
|
2962
|
+
let r = x(t, "itemConfig", 7), s = x(t, "passageConfig", 7, null), i = x(t, "env", 23, () => ({ mode: "gather", role: "student" })), o = x(t, "session", 23, () => []), l = x(t, "addCorrectResponse", 7, !1), c = x(t, "customClassname", 7, ""), a = x(t, "passageContainerClass", 7, ""), u = x(t, "containerClass", 7, ""), d = x(t, "bundleType", 23, () => z.player), f = x(t, "loaderConfig", 7, Ce), g = x(t, "onLoadComplete", 7), m = x(t, "onPlayerError", 7), y = x(t, "onSessionChanged", 7), R = U(!1);
|
|
2963
|
+
const N = (v, L) => {
|
|
2964
|
+
S(v, "load-complete") && g() ? g()(L) : S(v, "player-error") && m() ? m()(L) : S(v, "session-changed") && y() && y()(L);
|
|
2965
|
+
const h = new CustomEvent(v, {
|
|
2966
|
+
detail: L,
|
|
2470
2967
|
bubbles: !0,
|
|
2471
2968
|
composed: !0
|
|
2472
2969
|
// Allow events to cross shadow DOM boundaries
|
|
2473
2970
|
});
|
|
2474
|
-
dispatchEvent(
|
|
2971
|
+
dispatchEvent(h);
|
|
2475
2972
|
};
|
|
2476
|
-
async function
|
|
2477
|
-
if (!
|
|
2973
|
+
async function F() {
|
|
2974
|
+
if (!l() || !r() || p(R)) return;
|
|
2478
2975
|
n.debug("[PieItemPlayer] Populating session with correct responses");
|
|
2479
|
-
const
|
|
2480
|
-
for (const
|
|
2481
|
-
const
|
|
2482
|
-
if (
|
|
2976
|
+
const v = [];
|
|
2977
|
+
for (const L of r().models) {
|
|
2978
|
+
const h = _n(L.element);
|
|
2979
|
+
if (h && h.createCorrectResponseSession)
|
|
2483
2980
|
try {
|
|
2484
|
-
const
|
|
2485
|
-
|
|
2486
|
-
id:
|
|
2487
|
-
element:
|
|
2488
|
-
...
|
|
2981
|
+
const _ = await h.createCorrectResponseSession(L, i()), { id: P, ...X } = _;
|
|
2982
|
+
v.push({
|
|
2983
|
+
id: L.id,
|
|
2984
|
+
element: L.element,
|
|
2985
|
+
...X
|
|
2489
2986
|
});
|
|
2490
|
-
} catch (
|
|
2491
|
-
n.warn(`[PieItemPlayer] Failed to create correct response for ${
|
|
2987
|
+
} catch (_) {
|
|
2988
|
+
n.warn(`[PieItemPlayer] Failed to create correct response for ${L.element}:`, _);
|
|
2492
2989
|
}
|
|
2493
2990
|
}
|
|
2494
|
-
o().length = 0, o().push(...
|
|
2991
|
+
o().length = 0, o().push(...v), b(R, !0), n.debug("[PieItemPlayer] Correct responses added to session:", o());
|
|
2495
2992
|
}
|
|
2496
|
-
const
|
|
2993
|
+
const j = Z(() => [
|
|
2497
2994
|
"pie-passage-container",
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
].filter(Boolean).join(" ")),
|
|
2995
|
+
c(),
|
|
2996
|
+
a()
|
|
2997
|
+
].filter(Boolean).join(" ")), I = Z(() => [
|
|
2501
2998
|
"pie-item-container",
|
|
2502
|
-
|
|
2503
|
-
|
|
2999
|
+
c(),
|
|
3000
|
+
u()
|
|
2504
3001
|
].filter(Boolean).join(" "));
|
|
2505
|
-
let
|
|
2506
|
-
|
|
2507
|
-
!r() ||
|
|
3002
|
+
let w = U(!1), M = U(!1), W = U(!1), de = U(null);
|
|
3003
|
+
Di(() => p(de), () => f(), () => Xe(), "pie-item-player"), Re(() => {
|
|
3004
|
+
!r() || p(w) || (n.debug("[PieItemPlayer] Item config received, initializing after DOM renders..."), _r().then(async () => {
|
|
2508
3005
|
try {
|
|
2509
3006
|
if (n.debug("[PieItemPlayer] DOM ready, initializing PIE elements"), n.debug("[PieItemPlayer] Config:", {
|
|
2510
3007
|
itemElements: Object.keys(r().elements || {}),
|
|
@@ -2512,134 +3009,140 @@ function ce(e, t) {
|
|
|
2512
3009
|
passageElements: s() ? Object.keys(s().elements || {}) : [],
|
|
2513
3010
|
passageModels: s() ? (s().models || []).length : 0,
|
|
2514
3011
|
sessionLength: o().length,
|
|
2515
|
-
addCorrectResponse:
|
|
3012
|
+
addCorrectResponse: l(),
|
|
2516
3013
|
env: i()
|
|
2517
|
-
}), Vn(r(), [], { env: i(), bundleType:
|
|
2518
|
-
const
|
|
2519
|
-
if (
|
|
3014
|
+
}), Vn(r(), [], { env: i(), bundleType: d() }), n.debug("[PieItemPlayer] Item bundle initialized (bundle type: %s)", d()), s() && (Vn(s(), [], { env: i(), bundleType: d() }), n.debug("[PieItemPlayer] Passage bundle initialized (bundle type: %s)", d())), await F(), n.debug("[PieItemPlayer] Updating elements with session (length=" + o().length + ")"), _t(r(), o(), i()), s() && _t(s(), o(), i()), b(w, !0), !p(M)) {
|
|
3015
|
+
const v = document.querySelector(".pie-item-player"), L = (h) => {
|
|
3016
|
+
if (p(W))
|
|
2520
3017
|
return;
|
|
2521
|
-
const
|
|
2522
|
-
n.debug("[PieItemPlayer] session-changed event received from PIE element"),
|
|
3018
|
+
const _ = h;
|
|
3019
|
+
n.debug("[PieItemPlayer] session-changed event received from PIE element"), b(W, !0);
|
|
2523
3020
|
try {
|
|
2524
|
-
|
|
3021
|
+
N("session-changed", _.detail);
|
|
2525
3022
|
} finally {
|
|
2526
3023
|
setTimeout(
|
|
2527
3024
|
() => {
|
|
2528
|
-
|
|
3025
|
+
b(W, !1);
|
|
2529
3026
|
},
|
|
2530
3027
|
0
|
|
2531
3028
|
);
|
|
2532
3029
|
}
|
|
2533
3030
|
};
|
|
2534
|
-
|
|
3031
|
+
v && (v.addEventListener("session-changed", L), b(M, !0), n.debug("[PieItemPlayer] session-changed listener attached to root element"));
|
|
2535
3032
|
}
|
|
2536
|
-
n.debug("[PieItemPlayer] ✅ Initialization complete, dispatching load-complete event"),
|
|
2537
|
-
} catch (
|
|
2538
|
-
n.error("[PieItemPlayer] Error initializing:",
|
|
3033
|
+
n.debug("[PieItemPlayer] ✅ Initialization complete, dispatching load-complete event"), N("load-complete");
|
|
3034
|
+
} catch (v) {
|
|
3035
|
+
n.error("[PieItemPlayer] Error initializing:", v), N("player-error", v.message);
|
|
2539
3036
|
}
|
|
2540
3037
|
}));
|
|
2541
|
-
}),
|
|
2542
|
-
!
|
|
3038
|
+
}), Re(() => {
|
|
3039
|
+
!p(w) || !i() || !r() || !o() || (n.debug("[PieItemPlayer] Dependencies changed, updating elements"), n.debug("[PieItemPlayer] Env:", i()), n.debug("[PieItemPlayer] Session (length=" + o().length + "):", o()), _t(r(), o(), i()), s() && _t(s(), o(), i()));
|
|
2543
3040
|
});
|
|
2544
|
-
var
|
|
3041
|
+
var Le = Ni(), se = le(Le);
|
|
2545
3042
|
{
|
|
2546
|
-
var
|
|
2547
|
-
var
|
|
2548
|
-
|
|
3043
|
+
var tt = (v) => {
|
|
3044
|
+
var L = Ai(), h = le(L);
|
|
3045
|
+
Mn(h, () => s().markup), oe(L), lt(() => He(L, 1, p(j), "svelte-d1rctr")), ge(v, L);
|
|
2549
3046
|
};
|
|
2550
|
-
|
|
2551
|
-
s()?.markup &&
|
|
3047
|
+
ct(se, (v) => {
|
|
3048
|
+
s()?.markup && v(tt);
|
|
2552
3049
|
});
|
|
2553
3050
|
}
|
|
2554
|
-
var
|
|
3051
|
+
var ke = Kt(se, 2);
|
|
2555
3052
|
{
|
|
2556
|
-
var
|
|
2557
|
-
var
|
|
2558
|
-
|
|
3053
|
+
var Nt = (v) => {
|
|
3054
|
+
var L = Bi(), h = le(L);
|
|
3055
|
+
Mn(h, () => r().markup), oe(L), lt(() => He(L, 1, p(I), "svelte-d1rctr")), ge(v, L);
|
|
2559
3056
|
};
|
|
2560
|
-
|
|
2561
|
-
r()?.markup &&
|
|
3057
|
+
ct(ke, (v) => {
|
|
3058
|
+
r()?.markup && v(Nt);
|
|
2562
3059
|
});
|
|
2563
3060
|
}
|
|
2564
|
-
return oe(
|
|
3061
|
+
return oe(Le), Nr(Le, (v) => b(de, v), () => p(de)), ge(e, Le), vn({
|
|
2565
3062
|
get itemConfig() {
|
|
2566
3063
|
return r();
|
|
2567
3064
|
},
|
|
2568
|
-
set itemConfig(
|
|
2569
|
-
r(
|
|
3065
|
+
set itemConfig(v) {
|
|
3066
|
+
r(v), E();
|
|
2570
3067
|
},
|
|
2571
3068
|
get passageConfig() {
|
|
2572
3069
|
return s();
|
|
2573
3070
|
},
|
|
2574
|
-
set passageConfig(
|
|
2575
|
-
s(
|
|
3071
|
+
set passageConfig(v = null) {
|
|
3072
|
+
s(v), E();
|
|
2576
3073
|
},
|
|
2577
3074
|
get env() {
|
|
2578
3075
|
return i();
|
|
2579
3076
|
},
|
|
2580
|
-
set env(
|
|
2581
|
-
i(
|
|
3077
|
+
set env(v = { mode: "gather", role: "student" }) {
|
|
3078
|
+
i(v), E();
|
|
2582
3079
|
},
|
|
2583
3080
|
get session() {
|
|
2584
3081
|
return o();
|
|
2585
3082
|
},
|
|
2586
|
-
set session(
|
|
2587
|
-
o(
|
|
3083
|
+
set session(v = []) {
|
|
3084
|
+
o(v), E();
|
|
2588
3085
|
},
|
|
2589
3086
|
get addCorrectResponse() {
|
|
2590
|
-
return
|
|
3087
|
+
return l();
|
|
2591
3088
|
},
|
|
2592
|
-
set addCorrectResponse(
|
|
2593
|
-
|
|
3089
|
+
set addCorrectResponse(v = !1) {
|
|
3090
|
+
l(v), E();
|
|
2594
3091
|
},
|
|
2595
3092
|
get customClassname() {
|
|
2596
|
-
return
|
|
3093
|
+
return c();
|
|
2597
3094
|
},
|
|
2598
|
-
set customClassname(
|
|
2599
|
-
|
|
3095
|
+
set customClassname(v = "") {
|
|
3096
|
+
c(v), E();
|
|
2600
3097
|
},
|
|
2601
3098
|
get passageContainerClass() {
|
|
2602
|
-
return
|
|
3099
|
+
return a();
|
|
2603
3100
|
},
|
|
2604
|
-
set passageContainerClass(
|
|
2605
|
-
|
|
3101
|
+
set passageContainerClass(v = "") {
|
|
3102
|
+
a(v), E();
|
|
2606
3103
|
},
|
|
2607
3104
|
get containerClass() {
|
|
2608
|
-
return
|
|
3105
|
+
return u();
|
|
2609
3106
|
},
|
|
2610
|
-
set containerClass(
|
|
2611
|
-
|
|
3107
|
+
set containerClass(v = "") {
|
|
3108
|
+
u(v), E();
|
|
2612
3109
|
},
|
|
2613
3110
|
get bundleType() {
|
|
3111
|
+
return d();
|
|
3112
|
+
},
|
|
3113
|
+
set bundleType(v = z.player) {
|
|
3114
|
+
d(v), E();
|
|
3115
|
+
},
|
|
3116
|
+
get loaderConfig() {
|
|
2614
3117
|
return f();
|
|
2615
3118
|
},
|
|
2616
|
-
set
|
|
2617
|
-
f(
|
|
3119
|
+
set loaderConfig(v = Ce) {
|
|
3120
|
+
f(v), E();
|
|
2618
3121
|
},
|
|
2619
3122
|
get onLoadComplete() {
|
|
2620
|
-
return
|
|
3123
|
+
return g();
|
|
2621
3124
|
},
|
|
2622
|
-
set onLoadComplete(
|
|
2623
|
-
|
|
3125
|
+
set onLoadComplete(v) {
|
|
3126
|
+
g(v), E();
|
|
2624
3127
|
},
|
|
2625
3128
|
get onPlayerError() {
|
|
2626
|
-
return
|
|
3129
|
+
return m();
|
|
2627
3130
|
},
|
|
2628
|
-
set onPlayerError(
|
|
2629
|
-
v
|
|
3131
|
+
set onPlayerError(v) {
|
|
3132
|
+
m(v), E();
|
|
2630
3133
|
},
|
|
2631
3134
|
get onSessionChanged() {
|
|
2632
|
-
return
|
|
3135
|
+
return y();
|
|
2633
3136
|
},
|
|
2634
|
-
set onSessionChanged(
|
|
2635
|
-
|
|
3137
|
+
set onSessionChanged(v) {
|
|
3138
|
+
y(v), E();
|
|
2636
3139
|
},
|
|
2637
|
-
...
|
|
3140
|
+
...Ar()
|
|
2638
3141
|
});
|
|
2639
3142
|
}
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
3143
|
+
Sr(ue);
|
|
3144
|
+
jr(
|
|
3145
|
+
ue,
|
|
2643
3146
|
{
|
|
2644
3147
|
itemConfig: {},
|
|
2645
3148
|
passageConfig: {},
|
|
@@ -2650,6 +3153,7 @@ Nr(
|
|
|
2650
3153
|
passageContainerClass: {},
|
|
2651
3154
|
containerClass: {},
|
|
2652
3155
|
bundleType: {},
|
|
3156
|
+
loaderConfig: {},
|
|
2653
3157
|
onLoadComplete: {},
|
|
2654
3158
|
onPlayerError: {},
|
|
2655
3159
|
onSessionChanged: {}
|
|
@@ -2658,60 +3162,58 @@ Nr(
|
|
|
2658
3162
|
[],
|
|
2659
3163
|
!0
|
|
2660
3164
|
);
|
|
2661
|
-
const
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
const { baseName: c, existingVersion: f } = n(u), { version: d } = Mr(l);
|
|
2672
|
-
return f !== d ? `${c}${t}${d.replace(/\./g, "-")}` : u;
|
|
3165
|
+
const Jt = (e) => {
|
|
3166
|
+
const t = "--version-", n = (c) => {
|
|
3167
|
+
const a = c.match(`${t}(\\d+-\\d+-\\d+)$`);
|
|
3168
|
+
return a ? {
|
|
3169
|
+
baseName: c.replace(`${t}${a[1]}`, ""),
|
|
3170
|
+
existingVersion: a[1].replace(/-/g, ".")
|
|
3171
|
+
} : { baseName: c };
|
|
3172
|
+
}, r = (c, a) => {
|
|
3173
|
+
const { baseName: u, existingVersion: d } = n(c), { version: f } = qr(a);
|
|
3174
|
+
return d !== f ? `${u}${t}${f.replace(/\./g, "-")}` : c;
|
|
2673
3175
|
}, s = Object.entries(e.config.elements).reduce(
|
|
2674
|
-
(
|
|
2675
|
-
const
|
|
3176
|
+
(c, [a, u]) => {
|
|
3177
|
+
const d = r(a, u);
|
|
2676
3178
|
return {
|
|
2677
|
-
...
|
|
2678
|
-
[
|
|
2679
|
-
versionedName:
|
|
2680
|
-
package:
|
|
3179
|
+
...c,
|
|
3180
|
+
[a]: {
|
|
3181
|
+
versionedName: d,
|
|
3182
|
+
package: u
|
|
2681
3183
|
}
|
|
2682
3184
|
};
|
|
2683
3185
|
},
|
|
2684
3186
|
{}
|
|
2685
3187
|
), i = Object.entries(s).reduce(
|
|
2686
|
-
(
|
|
3188
|
+
(c, [a, { versionedName: u }]) => a !== u ? c.replace(new RegExp(`<${a}`, "g"), `<${u}`).replace(new RegExp(`</${a}`, "g"), `</${u}`) : c,
|
|
2687
3189
|
e.config.markup
|
|
2688
3190
|
), o = Object.values(s).reduce(
|
|
2689
|
-
(
|
|
2690
|
-
...
|
|
2691
|
-
[
|
|
3191
|
+
(c, { versionedName: a, package: u }) => ({
|
|
3192
|
+
...c,
|
|
3193
|
+
[a]: u
|
|
2692
3194
|
}),
|
|
2693
3195
|
{}
|
|
2694
|
-
),
|
|
2695
|
-
const
|
|
2696
|
-
if (
|
|
3196
|
+
), l = e.config.models.map((c) => {
|
|
3197
|
+
const a = c.element, u = s[a];
|
|
3198
|
+
if (u && u.versionedName !== a)
|
|
2697
3199
|
return {
|
|
2698
|
-
...
|
|
2699
|
-
element:
|
|
3200
|
+
...c,
|
|
3201
|
+
element: u.versionedName
|
|
2700
3202
|
};
|
|
2701
|
-
if (o[
|
|
2702
|
-
return
|
|
2703
|
-
const
|
|
2704
|
-
const { baseName:
|
|
2705
|
-
return
|
|
3203
|
+
if (o[a])
|
|
3204
|
+
return c;
|
|
3205
|
+
const d = Object.entries(s).filter(([f, { versionedName: g }]) => {
|
|
3206
|
+
const { baseName: m } = n(f);
|
|
3207
|
+
return m === a;
|
|
2706
3208
|
});
|
|
2707
|
-
if (
|
|
2708
|
-
const [, { versionedName:
|
|
3209
|
+
if (d.length > 0) {
|
|
3210
|
+
const [, { versionedName: f }] = d[0];
|
|
2709
3211
|
return {
|
|
2710
|
-
...
|
|
2711
|
-
element:
|
|
3212
|
+
...c,
|
|
3213
|
+
element: f
|
|
2712
3214
|
};
|
|
2713
3215
|
}
|
|
2714
|
-
return
|
|
3216
|
+
return c;
|
|
2715
3217
|
});
|
|
2716
3218
|
return {
|
|
2717
3219
|
...e,
|
|
@@ -2719,14 +3221,14 @@ const Yn = {
|
|
|
2719
3221
|
...e.config,
|
|
2720
3222
|
elements: o,
|
|
2721
3223
|
markup: i,
|
|
2722
|
-
models:
|
|
3224
|
+
models: l
|
|
2723
3225
|
}
|
|
2724
3226
|
};
|
|
2725
3227
|
};
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
var
|
|
2729
|
-
/* @__PURE__ */
|
|
3228
|
+
Pr();
|
|
3229
|
+
be[k] = "src/lib/tags/pie-fixed-player/PieFixedPlayer.svelte";
|
|
3230
|
+
var ji = xe(
|
|
3231
|
+
/* @__PURE__ */ Te(`<div class="pie-player-error" style="
|
|
2730
3232
|
padding: 20px;
|
|
2731
3233
|
margin: 20px;
|
|
2732
3234
|
border: 2px solid #d32f2f;
|
|
@@ -2735,10 +3237,10 @@ var Li = Te(
|
|
|
2735
3237
|
color: #c62828;
|
|
2736
3238
|
font-family: sans-serif;
|
|
2737
3239
|
"><h3 style="margin: 0 0 10px 0">⚠️ Configuration Error</h3> <p style="margin: 0"> </p></div>`),
|
|
2738
|
-
|
|
3240
|
+
be[k],
|
|
2739
3241
|
[[337, 2, [[346, 3], [347, 3]]]]
|
|
2740
|
-
),
|
|
2741
|
-
const
|
|
3242
|
+
), Qi = xe(/* @__PURE__ */ Te('<div class="pie-loading" style="padding: 20px; text-align: center;"><p>Loading...</p></div>'), be[k], [[350, 2, [[351, 3]]]]), zi = xe(/* @__PURE__ */ Te('<div class="pie-stimulus-container" style="display: flex; gap: 20px; width: 100%;"><div style="flex: 1; min-width: 0;"><!></div> <div style="flex: 1; min-width: 0;"><!></div></div>'), be[k], [[356, 2, [[357, 3], [373, 3]]]]), qi = xe(/* @__PURE__ */ Te("<div><!></div>"), be[k], [[392, 2]]), Hi = xe(/* @__PURE__ */ Te("<div><!></div>"), be[k], [[335, 0]]);
|
|
3243
|
+
const Vi = {
|
|
2742
3244
|
hash: "svelte-10l24ug",
|
|
2743
3245
|
code: `
|
|
2744
3246
|
:host {
|
|
@@ -2754,320 +3256,323 @@ const Ai = {
|
|
|
2754
3256
|
width: 100%;
|
|
2755
3257
|
}
|
|
2756
3258
|
|
|
2757
|
-
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
3259
|
+
/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGllRml4ZWRQbGF5ZXIuc3ZlbHRlIiwibWFwcGluZ3MiOiI7QUErWkEsQ0FBQyxLQUFLLENBQUM7QUFDUCxFQUFFLGNBQWM7QUFDaEI7O0FBRUEsQ0FBUyxpQkFBa0IsQ0FBQztBQUM1QixFQUFFLFdBQVc7QUFDYjs7QUFFQSxDQUFTLHNCQUF1QjtBQUNoQyxDQUFTLDBCQUEyQixDQUFDO0FBQ3JDLEVBQUUsV0FBVztBQUNiIiwibmFtZXMiOltdLCJpZ25vcmVMaXN0IjpbXSwic291cmNlcyI6WyJQaWVGaXhlZFBsYXllci5zdmVsdGUiXX0= */`
|
|
2758
3260
|
};
|
|
2759
|
-
function
|
|
2760
|
-
|
|
2761
|
-
let n =
|
|
2762
|
-
const
|
|
2763
|
-
if (
|
|
2764
|
-
const
|
|
2765
|
-
if (
|
|
3261
|
+
function be(e, t) {
|
|
3262
|
+
Dr(new.target), pn(t, !0, be), Br(e, Vi);
|
|
3263
|
+
let n = x(t, "config", 7, null), r = x(t, "session", 23, () => ({ id: "", data: [] })), s = x(t, "env", 23, () => ({ mode: "gather", role: "student" })), i = x(t, "addCorrectResponse", 7, !1), o = x(t, "renderStimulus", 7, !0), l = x(t, "allowedResize", 7, !1), c = x(t, "showBottomBorder", 7, !1), a = x(t, "debug", 7, ""), u = x(t, "customClassname", 7, ""), d = x(t, "containerClass", 7, ""), f = x(t, "passageContainerClass", 7, ""), g = x(t, "externalStyleUrls", 7, ""), m = x(t, "bundleType", 7, "player.js"), y = x(t, "loaderConfig", 7, Ce);
|
|
3264
|
+
const R = S(typeof window, "undefined", !1) && S(typeof document, "undefined", !1), N = Z(() => {
|
|
3265
|
+
if (S(a(), void 0, !1) && S(a(), null, !1)) {
|
|
3266
|
+
const _ = String(a()), P = !(S(_.toLowerCase(), "false") || S(_, "0") || S(_, ""));
|
|
3267
|
+
if (R)
|
|
2766
3268
|
try {
|
|
2767
|
-
window.PIE_DEBUG =
|
|
3269
|
+
window.PIE_DEBUG = P, console.log(...zn("log", "[pie-fixed-player] Setting PIE_DEBUG:", P, "from debug prop:", a(), "type:", typeof a()));
|
|
2768
3270
|
} catch {
|
|
2769
3271
|
}
|
|
2770
|
-
return
|
|
2771
|
-
}
|
|
2772
|
-
const h =
|
|
2773
|
-
return
|
|
2774
|
-
}),
|
|
2775
|
-
let
|
|
2776
|
-
const
|
|
2777
|
-
|
|
3272
|
+
return P;
|
|
3273
|
+
}
|
|
3274
|
+
const h = Xe();
|
|
3275
|
+
return R && console.log(...zn("log", "[pie-fixed-player] Using global PIE_DEBUG:", h)), h;
|
|
3276
|
+
}), F = Me("pie-fixed-player", () => p(N));
|
|
3277
|
+
let j = U(!0), I = U(null), w = U(null), M = U(null), W = U(null);
|
|
3278
|
+
const de = u() || `pie-player-${Date.now().toString(36)}`;
|
|
3279
|
+
Re(() => {
|
|
2778
3280
|
if (n()) {
|
|
2779
3281
|
performance.mark("pie-load-end");
|
|
2780
3282
|
try {
|
|
2781
|
-
const h =
|
|
3283
|
+
const h = S(typeof n(), "string") ? JSON.parse(n()) : n();
|
|
2782
3284
|
if (h.pie && h.passage) {
|
|
2783
|
-
const
|
|
2784
|
-
w
|
|
3285
|
+
const _ = Jt({ config: h.pie }), P = Jt({ config: h.passage });
|
|
3286
|
+
b(w, _.config, !0), b(M, o() ? P.config : null, !0), b(j, !1), b(I, null);
|
|
2785
3287
|
} else if (h.elements || h.models || h.markup) {
|
|
2786
|
-
const
|
|
2787
|
-
w
|
|
3288
|
+
const _ = Jt({ config: h });
|
|
3289
|
+
b(w, _.config, !0), b(M, null), b(j, !1), b(I, null);
|
|
2788
3290
|
} else {
|
|
2789
|
-
const
|
|
2790
|
-
if (
|
|
3291
|
+
const _ = "Invalid config: must contain elements, models, and markup, or pie/passage structure";
|
|
3292
|
+
if (b(I, _), b(j, !1), R && y()?.trackPageActions)
|
|
2791
3293
|
try {
|
|
2792
|
-
const
|
|
2793
|
-
|
|
3294
|
+
const P = window?.newrelic;
|
|
3295
|
+
P && S(typeof P.noticeError, "function") && P.noticeError(new Error(_), {
|
|
2794
3296
|
component: "pie-fixed-player",
|
|
2795
3297
|
errorType: "InvalidConfig"
|
|
2796
3298
|
});
|
|
2797
3299
|
} catch {
|
|
2798
|
-
|
|
3300
|
+
F.debug("New Relic tracking skipped (InvalidConfig)");
|
|
2799
3301
|
}
|
|
2800
3302
|
}
|
|
2801
3303
|
} catch (h) {
|
|
2802
|
-
const
|
|
2803
|
-
if (
|
|
3304
|
+
const _ = `Error parsing config: ${h.message}`;
|
|
3305
|
+
if (b(I, _), b(j, !1), R && y()?.trackPageActions)
|
|
2804
3306
|
try {
|
|
2805
|
-
const
|
|
2806
|
-
|
|
3307
|
+
const P = window?.newrelic;
|
|
3308
|
+
P && S(typeof P.noticeError, "function") && P.noticeError(h, {
|
|
2807
3309
|
component: "pie-fixed-player",
|
|
2808
3310
|
errorType: "ConfigParseError"
|
|
2809
3311
|
});
|
|
2810
3312
|
} catch {
|
|
2811
|
-
|
|
3313
|
+
F.debug("New Relic tracking skipped (ConfigParseError)");
|
|
2812
3314
|
}
|
|
2813
3315
|
}
|
|
2814
3316
|
} else
|
|
2815
|
-
w
|
|
3317
|
+
b(w, null), b(M, null), b(j, !0);
|
|
2816
3318
|
});
|
|
2817
|
-
const
|
|
2818
|
-
if (!(!
|
|
3319
|
+
const Le = async (h) => {
|
|
3320
|
+
if (!(!R || !h || S(typeof h, "string", !1))) {
|
|
2819
3321
|
if (document.querySelector(`style[data-pie-style="${h}"]`)) {
|
|
2820
|
-
|
|
3322
|
+
F.debug(`Stylesheet already loaded: ${h}`);
|
|
2821
3323
|
return;
|
|
2822
3324
|
}
|
|
2823
3325
|
try {
|
|
2824
|
-
const
|
|
2825
|
-
ie.setAttribute("data-pie-style", h), ie.textContent =
|
|
2826
|
-
} catch (
|
|
2827
|
-
|
|
3326
|
+
const X = (await (await fetch(h)).text()).replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g, `.pie-fixed-player.${de} $1$2`), ie = document.createElement("style");
|
|
3327
|
+
ie.setAttribute("data-pie-style", h), ie.textContent = X, document.head.appendChild(ie), F.info(`✅ Loaded and scoped stylesheet: ${h}`);
|
|
3328
|
+
} catch (_) {
|
|
3329
|
+
F.error(`❌ Failed to load external stylesheet: ${h}`, _);
|
|
2828
3330
|
}
|
|
2829
3331
|
}
|
|
2830
3332
|
};
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
3333
|
+
Re(() => {
|
|
3334
|
+
g() && S(typeof g(), "string") && g().split(",").map((_) => _.trim()).forEach((_) => {
|
|
3335
|
+
_ && Le(_);
|
|
2834
3336
|
});
|
|
2835
|
-
}),
|
|
2836
|
-
if (!
|
|
2837
|
-
const h =
|
|
2838
|
-
Array.isArray(h) && h.forEach((
|
|
2839
|
-
const
|
|
2840
|
-
|
|
3337
|
+
}), Re(() => {
|
|
3338
|
+
if (!p(w)?.resources?.stylesheets) return;
|
|
3339
|
+
const h = p(w).resources.stylesheets;
|
|
3340
|
+
Array.isArray(h) && h.forEach((_) => {
|
|
3341
|
+
const P = _?.url;
|
|
3342
|
+
P && S(typeof P, "string") && Le(P);
|
|
2841
3343
|
});
|
|
2842
|
-
}),
|
|
2843
|
-
|
|
2844
|
-
Object.keys(
|
|
2845
|
-
document.querySelectorAll(
|
|
2846
|
-
|
|
3344
|
+
}), Re(() => {
|
|
3345
|
+
c() && S(s().mode, "evaluate") && p(w)?.elements && _r().then(() => {
|
|
3346
|
+
Object.keys(p(w).elements).forEach((_) => {
|
|
3347
|
+
document.querySelectorAll(_).forEach((X) => {
|
|
3348
|
+
X instanceof HTMLElement && (X.style.borderBottom = "1px solid #ddd", X.style.paddingBottom = "20px", X.style.marginBottom = "20px");
|
|
2847
3349
|
});
|
|
2848
3350
|
});
|
|
2849
3351
|
});
|
|
2850
3352
|
});
|
|
2851
|
-
const
|
|
2852
|
-
const
|
|
3353
|
+
const se = (h) => {
|
|
3354
|
+
const _ = new CustomEvent(h.type, {
|
|
2853
3355
|
detail: h.detail,
|
|
2854
3356
|
bubbles: !0,
|
|
2855
3357
|
composed: !0
|
|
2856
3358
|
});
|
|
2857
|
-
|
|
2858
|
-
},
|
|
2859
|
-
|
|
3359
|
+
p(W)?.parentElement ? (p(W).parentElement.dispatchEvent(_), F.debug(`Dispatched ${h.type} event from custom element host`)) : F.warn("⚠️ Cannot dispatch event: custom element host not found");
|
|
3360
|
+
}, tt = (h) => {
|
|
3361
|
+
se(h);
|
|
2860
3362
|
};
|
|
2861
|
-
var
|
|
2862
|
-
|
|
2863
|
-
var
|
|
3363
|
+
var ke = Hi();
|
|
3364
|
+
He(ke, 1, `pie-fixed-player ${de ?? ""}`);
|
|
3365
|
+
var Nt = le(ke);
|
|
2864
3366
|
{
|
|
2865
|
-
var
|
|
2866
|
-
var
|
|
2867
|
-
oe(
|
|
2868
|
-
},
|
|
3367
|
+
var v = (h) => {
|
|
3368
|
+
var _ = ji(), P = Kt(le(_), 2), X = le(P, !0);
|
|
3369
|
+
oe(P), oe(_), lt(() => fi(X, p(I))), ge(h, _);
|
|
3370
|
+
}, L = (h, _) => {
|
|
2869
3371
|
{
|
|
2870
|
-
var
|
|
2871
|
-
var
|
|
2872
|
-
|
|
2873
|
-
},
|
|
3372
|
+
var P = (ie) => {
|
|
3373
|
+
var Mt = Qi();
|
|
3374
|
+
ge(ie, Mt);
|
|
3375
|
+
}, X = (ie, Mt) => {
|
|
2874
3376
|
{
|
|
2875
|
-
var
|
|
2876
|
-
var
|
|
2877
|
-
const Qt =
|
|
2878
|
-
|
|
3377
|
+
var Vr = (je) => {
|
|
3378
|
+
var we = zi(), Qe = le(we), jt = le(Qe);
|
|
3379
|
+
const Qt = Z(() => S(typeof s(), "string") ? JSON.parse(s()) : s()), zt = Z(() => (S(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), Ee = Z(() => S(m(), "client-player.js") ? z.clientPlayer : z.player);
|
|
3380
|
+
ue(jt, {
|
|
2879
3381
|
get itemConfig() {
|
|
2880
|
-
return
|
|
3382
|
+
return p(M);
|
|
2881
3383
|
},
|
|
2882
3384
|
get env() {
|
|
2883
|
-
return
|
|
3385
|
+
return p(Qt);
|
|
2884
3386
|
},
|
|
2885
3387
|
get session() {
|
|
2886
|
-
return
|
|
3388
|
+
return p(zt);
|
|
2887
3389
|
},
|
|
2888
3390
|
get addCorrectResponse() {
|
|
2889
3391
|
return i();
|
|
2890
3392
|
},
|
|
2891
|
-
customClassname:
|
|
3393
|
+
customClassname: de,
|
|
2892
3394
|
get bundleType() {
|
|
2893
|
-
return
|
|
3395
|
+
return p(Ee);
|
|
2894
3396
|
},
|
|
2895
|
-
onLoadComplete: (G) =>
|
|
2896
|
-
onPlayerError: (G) =>
|
|
2897
|
-
onSessionChanged: (G) =>
|
|
2898
|
-
}), oe(
|
|
2899
|
-
var
|
|
2900
|
-
const
|
|
2901
|
-
|
|
3397
|
+
onLoadComplete: (G) => se(new CustomEvent("load-complete", { detail: G })),
|
|
3398
|
+
onPlayerError: (G) => se(new CustomEvent("player-error", { detail: G })),
|
|
3399
|
+
onSessionChanged: (G) => tt(new CustomEvent("session-changed", { detail: G }))
|
|
3400
|
+
}), oe(Qe);
|
|
3401
|
+
var qt = Kt(Qe, 2), Yr = le(qt);
|
|
3402
|
+
const Jr = Z(() => S(typeof s(), "string") ? JSON.parse(s()) : s()), Wr = Z(() => (S(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), Xr = Z(() => S(m(), "client-player.js") ? z.clientPlayer : z.player);
|
|
3403
|
+
ue(Yr, {
|
|
2902
3404
|
get itemConfig() {
|
|
2903
|
-
return
|
|
3405
|
+
return p(w);
|
|
2904
3406
|
},
|
|
2905
3407
|
get env() {
|
|
2906
|
-
return
|
|
3408
|
+
return p(Jr);
|
|
2907
3409
|
},
|
|
2908
3410
|
get session() {
|
|
2909
|
-
return
|
|
3411
|
+
return p(Wr);
|
|
2910
3412
|
},
|
|
2911
3413
|
get addCorrectResponse() {
|
|
2912
3414
|
return i();
|
|
2913
3415
|
},
|
|
2914
|
-
customClassname:
|
|
3416
|
+
customClassname: de,
|
|
2915
3417
|
get bundleType() {
|
|
2916
|
-
return
|
|
3418
|
+
return p(Xr);
|
|
2917
3419
|
},
|
|
2918
|
-
onLoadComplete: (G) =>
|
|
2919
|
-
onPlayerError: (G) =>
|
|
2920
|
-
onSessionChanged: (G) =>
|
|
2921
|
-
}), oe(
|
|
2922
|
-
|
|
2923
|
-
}),
|
|
2924
|
-
},
|
|
2925
|
-
var
|
|
2926
|
-
const jt =
|
|
2927
|
-
|
|
3420
|
+
onLoadComplete: (G) => se(new CustomEvent("load-complete", { detail: G })),
|
|
3421
|
+
onPlayerError: (G) => se(new CustomEvent("player-error", { detail: G })),
|
|
3422
|
+
onSessionChanged: (G) => tt(new CustomEvent("session-changed", { detail: G }))
|
|
3423
|
+
}), oe(qt), oe(we), lt(() => {
|
|
3424
|
+
He(Qe, 1, `player-stimulus-container ${f() ?? ""}`), He(qt, 1, `player-item-container ${d() ?? ""}`);
|
|
3425
|
+
}), ge(je, we);
|
|
3426
|
+
}, Gr = (je) => {
|
|
3427
|
+
var we = qi(), Qe = le(we);
|
|
3428
|
+
const jt = Z(() => S(typeof s(), "string") ? JSON.parse(s()) : s()), Qt = Z(() => (S(typeof r(), "string") ? JSON.parse(r()) : r()).data || []), zt = Z(() => S(m(), "client-player.js") ? z.clientPlayer : z.player);
|
|
3429
|
+
ue(Qe, {
|
|
2928
3430
|
get itemConfig() {
|
|
2929
|
-
return
|
|
3431
|
+
return p(w);
|
|
2930
3432
|
},
|
|
2931
3433
|
get passageConfig() {
|
|
2932
|
-
return
|
|
3434
|
+
return p(M);
|
|
2933
3435
|
},
|
|
2934
3436
|
get env() {
|
|
2935
|
-
return
|
|
3437
|
+
return p(jt);
|
|
2936
3438
|
},
|
|
2937
3439
|
get session() {
|
|
2938
|
-
return
|
|
3440
|
+
return p(Qt);
|
|
2939
3441
|
},
|
|
2940
3442
|
get addCorrectResponse() {
|
|
2941
3443
|
return i();
|
|
2942
3444
|
},
|
|
2943
|
-
customClassname:
|
|
3445
|
+
customClassname: de,
|
|
2944
3446
|
get passageContainerClass() {
|
|
2945
|
-
return
|
|
3447
|
+
return f();
|
|
2946
3448
|
},
|
|
2947
3449
|
get containerClass() {
|
|
2948
|
-
return
|
|
3450
|
+
return d();
|
|
2949
3451
|
},
|
|
2950
3452
|
get bundleType() {
|
|
2951
|
-
return
|
|
3453
|
+
return p(zt);
|
|
2952
3454
|
},
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
3455
|
+
get loaderConfig() {
|
|
3456
|
+
return y();
|
|
3457
|
+
},
|
|
3458
|
+
onLoadComplete: (Ee) => se(new CustomEvent("load-complete", { detail: Ee })),
|
|
3459
|
+
onPlayerError: (Ee) => se(new CustomEvent("player-error", { detail: Ee })),
|
|
3460
|
+
onSessionChanged: (Ee) => tt(new CustomEvent("session-changed", { detail: Ee }))
|
|
3461
|
+
}), oe(we), lt(() => He(we, 1, `player-item-container ${d() ?? ""}`)), ge(je, we);
|
|
2957
3462
|
};
|
|
2958
|
-
|
|
3463
|
+
ct(
|
|
2959
3464
|
ie,
|
|
2960
|
-
(
|
|
2961
|
-
|
|
3465
|
+
(je) => {
|
|
3466
|
+
p(M) && o() ? je(Vr) : je(Gr, !1);
|
|
2962
3467
|
},
|
|
2963
|
-
|
|
3468
|
+
Mt
|
|
2964
3469
|
);
|
|
2965
3470
|
}
|
|
2966
3471
|
};
|
|
2967
|
-
|
|
3472
|
+
ct(
|
|
2968
3473
|
h,
|
|
2969
3474
|
(ie) => {
|
|
2970
|
-
|
|
3475
|
+
p(j) || !p(w) ? ie(P) : ie(X, !1);
|
|
2971
3476
|
},
|
|
2972
|
-
|
|
3477
|
+
_
|
|
2973
3478
|
);
|
|
2974
3479
|
}
|
|
2975
3480
|
};
|
|
2976
|
-
|
|
2977
|
-
|
|
3481
|
+
ct(Nt, (h) => {
|
|
3482
|
+
p(I) ? h(v) : h(L, !1);
|
|
2978
3483
|
});
|
|
2979
3484
|
}
|
|
2980
|
-
return oe(
|
|
3485
|
+
return oe(ke), Nr(ke, (h) => b(W, h), () => p(W)), ge(e, ke), vn({
|
|
2981
3486
|
get config() {
|
|
2982
3487
|
return n();
|
|
2983
3488
|
},
|
|
2984
3489
|
set config(h = null) {
|
|
2985
|
-
n(h),
|
|
3490
|
+
n(h), E();
|
|
2986
3491
|
},
|
|
2987
3492
|
get session() {
|
|
2988
3493
|
return r();
|
|
2989
3494
|
},
|
|
2990
3495
|
set session(h = { id: "", data: [] }) {
|
|
2991
|
-
r(h),
|
|
3496
|
+
r(h), E();
|
|
2992
3497
|
},
|
|
2993
3498
|
get env() {
|
|
2994
3499
|
return s();
|
|
2995
3500
|
},
|
|
2996
3501
|
set env(h = { mode: "gather", role: "student" }) {
|
|
2997
|
-
s(h),
|
|
3502
|
+
s(h), E();
|
|
2998
3503
|
},
|
|
2999
3504
|
get addCorrectResponse() {
|
|
3000
3505
|
return i();
|
|
3001
3506
|
},
|
|
3002
3507
|
set addCorrectResponse(h = !1) {
|
|
3003
|
-
i(h),
|
|
3508
|
+
i(h), E();
|
|
3004
3509
|
},
|
|
3005
3510
|
get renderStimulus() {
|
|
3006
3511
|
return o();
|
|
3007
3512
|
},
|
|
3008
3513
|
set renderStimulus(h = !0) {
|
|
3009
|
-
o(h),
|
|
3514
|
+
o(h), E();
|
|
3010
3515
|
},
|
|
3011
3516
|
get allowedResize() {
|
|
3012
|
-
return
|
|
3517
|
+
return l();
|
|
3013
3518
|
},
|
|
3014
3519
|
set allowedResize(h = !1) {
|
|
3015
|
-
|
|
3520
|
+
l(h), E();
|
|
3016
3521
|
},
|
|
3017
3522
|
get showBottomBorder() {
|
|
3018
|
-
return
|
|
3523
|
+
return c();
|
|
3019
3524
|
},
|
|
3020
3525
|
set showBottomBorder(h = !1) {
|
|
3021
|
-
|
|
3526
|
+
c(h), E();
|
|
3022
3527
|
},
|
|
3023
3528
|
get debug() {
|
|
3024
|
-
return
|
|
3529
|
+
return a();
|
|
3025
3530
|
},
|
|
3026
3531
|
set debug(h = "") {
|
|
3027
|
-
|
|
3532
|
+
a(h), E();
|
|
3028
3533
|
},
|
|
3029
3534
|
get customClassname() {
|
|
3030
|
-
return
|
|
3535
|
+
return u();
|
|
3031
3536
|
},
|
|
3032
3537
|
set customClassname(h = "") {
|
|
3033
|
-
|
|
3538
|
+
u(h), E();
|
|
3034
3539
|
},
|
|
3035
3540
|
get containerClass() {
|
|
3036
|
-
return
|
|
3541
|
+
return d();
|
|
3037
3542
|
},
|
|
3038
3543
|
set containerClass(h = "") {
|
|
3039
|
-
|
|
3544
|
+
d(h), E();
|
|
3040
3545
|
},
|
|
3041
3546
|
get passageContainerClass() {
|
|
3042
|
-
return
|
|
3547
|
+
return f();
|
|
3043
3548
|
},
|
|
3044
3549
|
set passageContainerClass(h = "") {
|
|
3045
|
-
|
|
3550
|
+
f(h), E();
|
|
3046
3551
|
},
|
|
3047
3552
|
get externalStyleUrls() {
|
|
3048
|
-
return
|
|
3553
|
+
return g();
|
|
3049
3554
|
},
|
|
3050
3555
|
set externalStyleUrls(h = "") {
|
|
3051
|
-
|
|
3556
|
+
g(h), E();
|
|
3052
3557
|
},
|
|
3053
3558
|
get bundleType() {
|
|
3054
|
-
return
|
|
3559
|
+
return m();
|
|
3055
3560
|
},
|
|
3056
3561
|
set bundleType(h = "player.js") {
|
|
3057
|
-
|
|
3562
|
+
m(h), E();
|
|
3058
3563
|
},
|
|
3059
3564
|
get loaderConfig() {
|
|
3060
3565
|
return y();
|
|
3061
3566
|
},
|
|
3062
|
-
set loaderConfig(h =
|
|
3063
|
-
y(h),
|
|
3567
|
+
set loaderConfig(h = Ce) {
|
|
3568
|
+
y(h), E();
|
|
3064
3569
|
},
|
|
3065
|
-
...
|
|
3570
|
+
...Ar()
|
|
3066
3571
|
});
|
|
3067
3572
|
}
|
|
3068
|
-
|
|
3069
|
-
customElements.define("pie-fixed-player",
|
|
3070
|
-
|
|
3573
|
+
Sr(be);
|
|
3574
|
+
customElements.define("pie-fixed-player", jr(
|
|
3575
|
+
be,
|
|
3071
3576
|
{
|
|
3072
3577
|
config: { attribute: "config", type: "Object" },
|
|
3073
3578
|
session: { attribute: "session", type: "Object" },
|