akpm-akb-audit-handler 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CDN/akb-audit-handler-component.js +1175 -1172
- package/package.json +1 -1
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
/* Version: 1.0.
|
|
2
|
-
var
|
|
1
|
+
/* Version: 1.0.7 */
|
|
2
|
+
var ja = Object.defineProperty;
|
|
3
3
|
var Tn = (e) => {
|
|
4
4
|
throw TypeError(e);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
7
|
-
var G = (e, t, r) =>
|
|
8
|
-
var
|
|
6
|
+
var Ba = (e, t, r) => t in e ? ja(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
7
|
+
var G = (e, t, r) => Ba(e, typeof t != "symbol" ? t + "" : t, r), jr = (e, t, r) => t.has(e) || Tn("Cannot " + r);
|
|
8
|
+
var I = (e, t, r) => (jr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), ae = (e, t, r) => t.has(e) ? Tn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), ce = (e, t, r, n) => (jr(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), pt = (e, t, r) => (jr(e, t, "access private method"), r);
|
|
9
9
|
var jn;
|
|
10
10
|
typeof window < "u" && ((jn = window.__svelte ?? (window.__svelte = {})).v ?? (jn.v = /* @__PURE__ */ new Set())).add("5");
|
|
11
|
-
const
|
|
12
|
-
var un = Array.isArray,
|
|
11
|
+
const Ua = 1, Va = 2, Ha = 16, Ja = 1, Ya = 4, Wa = 8, Ka = 16, Ga = 1, Xa = 2, Bn = "[", sn = "[!", ln = "]", Mt = {}, re = Symbol(), Qa = "http://www.w3.org/1999/xhtml", Un = !1;
|
|
12
|
+
var un = Array.isArray, Za = Array.prototype.indexOf, dn = Array.from, br = Object.keys, Lt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, ei = Object.getOwnPropertyDescriptors, ti = Object.prototype, ri = Array.prototype, Vn = Object.getPrototypeOf, Sn = Object.isExtensible;
|
|
13
13
|
const Br = () => {
|
|
14
14
|
};
|
|
15
15
|
function Hn(e) {
|
|
16
16
|
for (var t = 0; t < e.length; t++)
|
|
17
17
|
e[t]();
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
var e, t, r = new Promise((n,
|
|
21
|
-
e = n, t =
|
|
19
|
+
function ni() {
|
|
20
|
+
var e, t, r = new Promise((n, a) => {
|
|
21
|
+
e = n, t = a;
|
|
22
22
|
});
|
|
23
23
|
return { promise: r, resolve: e, reject: t };
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const me = 2, cn = 4, fn = 8, Vt = 16, Ye = 32, lt = 64, Jn = 128, Ee = 256, yr = 512, oe = 1024, Te = 2048, ut = 4096, Ie = 8192, xt = 16384, vn = 32768, pn = 65536, An = 1 << 17, ai = 1 << 18, Ht = 1 << 19, ii = 1 << 20, Wr = 1 << 21, hn = 1 << 22, bt = 1 << 23, hr = Symbol("$state"), Yn = Symbol("legacy props"), oi = Symbol(""), _n = new class extends Error {
|
|
26
26
|
constructor() {
|
|
27
27
|
super(...arguments);
|
|
28
28
|
G(this, "name", "StaleReactionError");
|
|
29
29
|
G(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
30
30
|
}
|
|
31
31
|
}(), gn = 3, er = 8;
|
|
32
|
-
function
|
|
32
|
+
function si() {
|
|
33
33
|
throw new Error("https://svelte.dev/e/await_outside_boundary");
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function li(e) {
|
|
36
36
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ui() {
|
|
39
39
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function di(e) {
|
|
42
42
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ci() {
|
|
45
45
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function fi(e) {
|
|
48
48
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function vi() {
|
|
51
51
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function pi() {
|
|
54
54
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function hi(e) {
|
|
57
57
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function _i() {
|
|
60
60
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function gi() {
|
|
63
63
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function mi() {
|
|
66
66
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Tr(e) {
|
|
69
69
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
70
70
|
}
|
|
71
71
|
let F = !1;
|
|
@@ -73,13 +73,13 @@ function He(e) {
|
|
|
73
73
|
F = e;
|
|
74
74
|
}
|
|
75
75
|
let B;
|
|
76
|
-
function
|
|
76
|
+
function $e(e) {
|
|
77
77
|
if (e === null)
|
|
78
|
-
throw
|
|
78
|
+
throw Tr(), Mt;
|
|
79
79
|
return B = e;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
81
|
+
function Sr() {
|
|
82
|
+
return $e(
|
|
83
83
|
/** @type {TemplateNode} */
|
|
84
84
|
/* @__PURE__ */ We(B)
|
|
85
85
|
);
|
|
@@ -87,11 +87,11 @@ function Ar() {
|
|
|
87
87
|
function x(e) {
|
|
88
88
|
if (F) {
|
|
89
89
|
if (/* @__PURE__ */ We(B) !== null)
|
|
90
|
-
throw
|
|
90
|
+
throw Tr(), Mt;
|
|
91
91
|
B = e;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function qt(e = 1) {
|
|
95
95
|
if (F) {
|
|
96
96
|
for (var t = e, r = B; t--; )
|
|
97
97
|
r = /** @type {TemplateNode} */
|
|
@@ -120,7 +120,7 @@ function Kr() {
|
|
|
120
120
|
}
|
|
121
121
|
function Wn(e) {
|
|
122
122
|
if (!e || e.nodeType !== er)
|
|
123
|
-
throw
|
|
123
|
+
throw Tr(), Mt;
|
|
124
124
|
return (
|
|
125
125
|
/** @type {Comment} */
|
|
126
126
|
e.data
|
|
@@ -129,19 +129,19 @@ function Wn(e) {
|
|
|
129
129
|
function Kn(e) {
|
|
130
130
|
return e === this.v;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function bi(e, t) {
|
|
133
133
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
134
134
|
}
|
|
135
135
|
function Gn(e) {
|
|
136
|
-
return !
|
|
136
|
+
return !bi(e, this.v);
|
|
137
137
|
}
|
|
138
|
-
let
|
|
139
|
-
function
|
|
140
|
-
|
|
138
|
+
let yi = !1, Se = null;
|
|
139
|
+
function kr(e) {
|
|
140
|
+
Se = e;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
|
|
144
|
-
p:
|
|
142
|
+
function Et(e, t = !1, r) {
|
|
143
|
+
Se = {
|
|
144
|
+
p: Se,
|
|
145
145
|
c: null,
|
|
146
146
|
e: null,
|
|
147
147
|
s: e,
|
|
@@ -149,27 +149,27 @@ function Tt(e, t = !1, r) {
|
|
|
149
149
|
l: null
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function $t(e) {
|
|
153
153
|
var t = (
|
|
154
154
|
/** @type {ComponentContext} */
|
|
155
|
-
|
|
155
|
+
Se
|
|
156
156
|
), r = t.e;
|
|
157
157
|
if (r !== null) {
|
|
158
158
|
t.e = null;
|
|
159
159
|
for (var n of r)
|
|
160
|
-
|
|
160
|
+
ga(n);
|
|
161
161
|
}
|
|
162
|
-
return e !== void 0 && (t.x = e),
|
|
162
|
+
return e !== void 0 && (t.x = e), Se = t.p, e ?? /** @type {T} */
|
|
163
163
|
{};
|
|
164
164
|
}
|
|
165
165
|
function Xn() {
|
|
166
166
|
return !0;
|
|
167
167
|
}
|
|
168
|
-
const
|
|
169
|
-
function
|
|
168
|
+
const ki = /* @__PURE__ */ new WeakMap();
|
|
169
|
+
function wi(e) {
|
|
170
170
|
var t = z;
|
|
171
171
|
if (t === null)
|
|
172
|
-
return P.f |=
|
|
172
|
+
return P.f |= bt, e;
|
|
173
173
|
if ((t.f & vn) === 0) {
|
|
174
174
|
if ((t.f & Jn) === 0)
|
|
175
175
|
throw !t.parent && e instanceof Error && Qn(e), e;
|
|
@@ -191,27 +191,27 @@ function mn(e, t) {
|
|
|
191
191
|
throw e instanceof Error && Qn(e), e;
|
|
192
192
|
}
|
|
193
193
|
function Qn(e) {
|
|
194
|
-
const t =
|
|
195
|
-
t && (
|
|
194
|
+
const t = ki.get(e);
|
|
195
|
+
t && (Lt(e, "message", {
|
|
196
196
|
value: t.message
|
|
197
|
-
}),
|
|
197
|
+
}), Lt(e, "stack", {
|
|
198
198
|
value: t.stack
|
|
199
199
|
}));
|
|
200
200
|
}
|
|
201
|
-
const
|
|
202
|
-
let tt = [],
|
|
201
|
+
const xi = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
|
|
202
|
+
let tt = [], Ft = [];
|
|
203
203
|
function Zn() {
|
|
204
204
|
var e = tt;
|
|
205
205
|
tt = [], Hn(e);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
var e =
|
|
209
|
-
|
|
207
|
+
function ea() {
|
|
208
|
+
var e = Ft;
|
|
209
|
+
Ft = [], Hn(e);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
return tt.length > 0 ||
|
|
211
|
+
function Ei() {
|
|
212
|
+
return tt.length > 0 || Ft.length > 0;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function ta(e) {
|
|
215
215
|
if (tt.length === 0 && !Qt) {
|
|
216
216
|
var t = tt;
|
|
217
217
|
queueMicrotask(() => {
|
|
@@ -220,27 +220,27 @@ function ti(e) {
|
|
|
220
220
|
}
|
|
221
221
|
tt.push(e);
|
|
222
222
|
}
|
|
223
|
-
function $
|
|
224
|
-
|
|
223
|
+
function $i(e) {
|
|
224
|
+
Ft.length === 0 && xi(ea), Ft.push(e);
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
tt.length > 0 && Zn(),
|
|
226
|
+
function Ti() {
|
|
227
|
+
tt.length > 0 && Zn(), Ft.length > 0 && ea();
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function Si() {
|
|
230
230
|
const e = (
|
|
231
231
|
/** @type {Effect} */
|
|
232
232
|
z.b
|
|
233
233
|
);
|
|
234
|
-
return e === null &&
|
|
234
|
+
return e === null && si(), e;
|
|
235
235
|
}
|
|
236
236
|
// @__NO_SIDE_EFFECTS__
|
|
237
|
-
function
|
|
238
|
-
var t =
|
|
237
|
+
function Ar(e) {
|
|
238
|
+
var t = me | Te, r = P !== null && (P.f & me) !== 0 ? (
|
|
239
239
|
/** @type {Derived} */
|
|
240
240
|
P
|
|
241
241
|
) : null;
|
|
242
|
-
return z === null || r !== null && (r.f &
|
|
243
|
-
ctx:
|
|
242
|
+
return z === null || r !== null && (r.f & Ee) !== 0 ? t |= Ee : z.f |= Ht, {
|
|
243
|
+
ctx: Se,
|
|
244
244
|
deps: null,
|
|
245
245
|
effects: null,
|
|
246
246
|
equals: Kn,
|
|
@@ -258,24 +258,24 @@ function Nr(e) {
|
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
260
|
// @__NO_SIDE_EFFECTS__
|
|
261
|
-
function
|
|
261
|
+
function Ai(e, t) {
|
|
262
262
|
let r = (
|
|
263
263
|
/** @type {Effect | null} */
|
|
264
264
|
z
|
|
265
265
|
);
|
|
266
|
-
r === null &&
|
|
266
|
+
r === null && ui();
|
|
267
267
|
var n = (
|
|
268
268
|
/** @type {Boundary} */
|
|
269
269
|
r.b
|
|
270
|
-
),
|
|
270
|
+
), a = (
|
|
271
271
|
/** @type {Promise<V>} */
|
|
272
272
|
/** @type {unknown} */
|
|
273
273
|
void 0
|
|
274
|
-
),
|
|
274
|
+
), i = tr(
|
|
275
275
|
/** @type {V} */
|
|
276
276
|
re
|
|
277
277
|
), o = null, l = !P;
|
|
278
|
-
return
|
|
278
|
+
return Fi(() => {
|
|
279
279
|
try {
|
|
280
280
|
var u = e();
|
|
281
281
|
o && Promise.resolve(u).catch(() => {
|
|
@@ -284,53 +284,53 @@ function Aa(e, t) {
|
|
|
284
284
|
u = Promise.reject(c);
|
|
285
285
|
}
|
|
286
286
|
var d = () => u;
|
|
287
|
-
|
|
287
|
+
a = o?.then(d, d) ?? Promise.resolve(u), o = a;
|
|
288
288
|
var v = (
|
|
289
289
|
/** @type {Batch} */
|
|
290
290
|
W
|
|
291
|
-
),
|
|
292
|
-
l && (n.update_pending_count(1),
|
|
291
|
+
), m = n.is_pending();
|
|
292
|
+
l && (n.update_pending_count(1), m || v.increment());
|
|
293
293
|
const f = (c, p = void 0) => {
|
|
294
|
-
o = null,
|
|
294
|
+
o = null, m || v.activate(), p ? p !== _n && (i.f |= bt, wr(i, p)) : ((i.f & bt) !== 0 && (i.f ^= bt), wr(i, c)), l && (n.update_pending_count(-1), m || v.decrement()), ia();
|
|
295
295
|
};
|
|
296
|
-
if (
|
|
296
|
+
if (a.then(f, (c) => f(null, c || "unknown")), v)
|
|
297
297
|
return () => {
|
|
298
298
|
queueMicrotask(() => v.neuter());
|
|
299
299
|
};
|
|
300
300
|
}), new Promise((u) => {
|
|
301
301
|
function d(v) {
|
|
302
|
-
function
|
|
303
|
-
v ===
|
|
302
|
+
function m() {
|
|
303
|
+
v === a ? u(i) : d(a);
|
|
304
304
|
}
|
|
305
|
-
v.then(
|
|
305
|
+
v.then(m, m);
|
|
306
306
|
}
|
|
307
|
-
d(
|
|
307
|
+
d(a);
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
// @__NO_SIDE_EFFECTS__
|
|
311
311
|
function Nn(e) {
|
|
312
|
-
const t = /* @__PURE__ */
|
|
313
|
-
return
|
|
312
|
+
const t = /* @__PURE__ */ Ar(e);
|
|
313
|
+
return Ea(t), t;
|
|
314
314
|
}
|
|
315
315
|
// @__NO_SIDE_EFFECTS__
|
|
316
|
-
function
|
|
317
|
-
const t = /* @__PURE__ */
|
|
316
|
+
function ra(e) {
|
|
317
|
+
const t = /* @__PURE__ */ Ar(e);
|
|
318
318
|
return t.equals = Gn, t;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function na(e) {
|
|
321
321
|
var t = e.effects;
|
|
322
322
|
if (t !== null) {
|
|
323
323
|
e.effects = null;
|
|
324
324
|
for (var r = 0; r < t.length; r += 1)
|
|
325
|
-
|
|
325
|
+
De(
|
|
326
326
|
/** @type {Effect} */
|
|
327
327
|
t[r]
|
|
328
328
|
);
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Ni(e) {
|
|
332
332
|
for (var t = e.parent; t !== null; ) {
|
|
333
|
-
if ((t.f &
|
|
333
|
+
if ((t.f & me) === 0)
|
|
334
334
|
return (
|
|
335
335
|
/** @type {Effect} */
|
|
336
336
|
t
|
|
@@ -341,58 +341,58 @@ function Na(e) {
|
|
|
341
341
|
}
|
|
342
342
|
function bn(e) {
|
|
343
343
|
var t, r = z;
|
|
344
|
-
st(
|
|
344
|
+
st(Ni(e));
|
|
345
345
|
try {
|
|
346
|
-
|
|
346
|
+
na(e), t = Aa(e);
|
|
347
347
|
} finally {
|
|
348
348
|
st(r);
|
|
349
349
|
}
|
|
350
350
|
return t;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function aa(e) {
|
|
353
353
|
var t = bn(e);
|
|
354
|
-
if (e.equals(t) || (e.v = t, e.wv =
|
|
355
|
-
var r = (nt || (e.f &
|
|
354
|
+
if (e.equals(t) || (e.v = t, e.wv = Ta()), !Tt) {
|
|
355
|
+
var r = (nt || (e.f & Ee) !== 0) && e.deps !== null ? ut : oe;
|
|
356
356
|
pe(e, r);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
const n =
|
|
359
|
+
function Ii(e, t, r) {
|
|
360
|
+
const n = Ar;
|
|
361
361
|
if (t.length === 0) {
|
|
362
362
|
r(e.map(n));
|
|
363
363
|
return;
|
|
364
364
|
}
|
|
365
|
-
var
|
|
365
|
+
var a = W, i = (
|
|
366
366
|
/** @type {Effect} */
|
|
367
367
|
z
|
|
368
|
-
), o =
|
|
369
|
-
Promise.all(t.map((u) => /* @__PURE__ */
|
|
370
|
-
|
|
368
|
+
), o = Ci(), l = Si();
|
|
369
|
+
Promise.all(t.map((u) => /* @__PURE__ */ Ai(u))).then((u) => {
|
|
370
|
+
a?.activate(), o();
|
|
371
371
|
try {
|
|
372
372
|
r([...e.map(n), ...u]);
|
|
373
373
|
} catch (d) {
|
|
374
|
-
(
|
|
374
|
+
(i.f & xt) === 0 && mn(d, i);
|
|
375
375
|
}
|
|
376
|
-
|
|
376
|
+
a?.deactivate(), ia();
|
|
377
377
|
}).catch((u) => {
|
|
378
378
|
l.error(u);
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
var e = z, t = P, r =
|
|
381
|
+
function Ci() {
|
|
382
|
+
var e = z, t = P, r = Se, n = W;
|
|
383
383
|
return function() {
|
|
384
|
-
st(e),
|
|
384
|
+
st(e), Re(t), kr(r), n?.activate();
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
st(null),
|
|
387
|
+
function ia() {
|
|
388
|
+
st(null), Re(null), kr(null);
|
|
389
389
|
}
|
|
390
390
|
const Ur = /* @__PURE__ */ new Set();
|
|
391
|
-
let W = null,
|
|
392
|
-
var nr,
|
|
393
|
-
const
|
|
391
|
+
let W = null, _r = null, In = /* @__PURE__ */ new Set(), wt = [], Nr = null, Gr = !1, Qt = !1;
|
|
392
|
+
var nr, zt, Ze, ar, ir, _t, Dt, gt, et, Rt, or, sr, Ce, oa, gr, Xr;
|
|
393
|
+
const $r = class $r {
|
|
394
394
|
constructor() {
|
|
395
|
-
|
|
395
|
+
ae(this, Ce);
|
|
396
396
|
/**
|
|
397
397
|
* The current values of any sources that are updated in this batch
|
|
398
398
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -404,68 +404,68 @@ const Tr = class Tr {
|
|
|
404
404
|
* They keys of this map are identical to `this.#current`
|
|
405
405
|
* @type {Map<Source, any>}
|
|
406
406
|
*/
|
|
407
|
-
|
|
407
|
+
ae(this, nr, /* @__PURE__ */ new Map());
|
|
408
408
|
/**
|
|
409
409
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
410
410
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
411
411
|
* @type {Set<() => void>}
|
|
412
412
|
*/
|
|
413
|
-
|
|
413
|
+
ae(this, zt, /* @__PURE__ */ new Set());
|
|
414
414
|
/**
|
|
415
415
|
* The number of async effects that are currently in flight
|
|
416
416
|
*/
|
|
417
|
-
|
|
417
|
+
ae(this, Ze, 0);
|
|
418
418
|
/**
|
|
419
419
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
420
420
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
421
421
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
422
422
|
*/
|
|
423
|
-
|
|
423
|
+
ae(this, ar, null);
|
|
424
424
|
/**
|
|
425
425
|
* True if an async effect inside this batch resolved and
|
|
426
426
|
* its parent branch was already deleted
|
|
427
427
|
*/
|
|
428
|
-
|
|
428
|
+
ae(this, ir, !1);
|
|
429
429
|
/**
|
|
430
430
|
* Async effects (created inside `async_derived`) encountered during processing.
|
|
431
431
|
* These run after the rest of the batch has updated, since they should
|
|
432
432
|
* always have the latest values
|
|
433
433
|
* @type {Effect[]}
|
|
434
434
|
*/
|
|
435
|
-
|
|
435
|
+
ae(this, _t, []);
|
|
436
436
|
/**
|
|
437
437
|
* The same as `#async_effects`, but for effects inside a newly-created
|
|
438
438
|
* `<svelte:boundary>` — these do not prevent the batch from committing
|
|
439
439
|
* @type {Effect[]}
|
|
440
440
|
*/
|
|
441
|
-
|
|
441
|
+
ae(this, Dt, []);
|
|
442
442
|
/**
|
|
443
443
|
* Template effects and `$effect.pre` effects, which run when
|
|
444
444
|
* a batch is committed
|
|
445
445
|
* @type {Effect[]}
|
|
446
446
|
*/
|
|
447
|
-
|
|
447
|
+
ae(this, gt, []);
|
|
448
448
|
/**
|
|
449
449
|
* The same as `#render_effects`, but for `$effect` (which runs after)
|
|
450
450
|
* @type {Effect[]}
|
|
451
451
|
*/
|
|
452
|
-
|
|
452
|
+
ae(this, et, []);
|
|
453
453
|
/**
|
|
454
454
|
* Block effects, which may need to re-run on subsequent flushes
|
|
455
455
|
* in order to update internal sources (e.g. each block items)
|
|
456
456
|
* @type {Effect[]}
|
|
457
457
|
*/
|
|
458
|
-
|
|
458
|
+
ae(this, Rt, []);
|
|
459
459
|
/**
|
|
460
460
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
461
461
|
* @type {Effect[]}
|
|
462
462
|
*/
|
|
463
|
-
|
|
463
|
+
ae(this, or, []);
|
|
464
464
|
/**
|
|
465
465
|
* Deferred effects that are MAYBE_DIRTY
|
|
466
466
|
* @type {Effect[]}
|
|
467
467
|
*/
|
|
468
|
-
|
|
468
|
+
ae(this, sr, []);
|
|
469
469
|
/**
|
|
470
470
|
* A set of branches that still exist, but will be destroyed when this batch
|
|
471
471
|
* is committed — we skip over these during `process`
|
|
@@ -478,20 +478,20 @@ const Tr = class Tr {
|
|
|
478
478
|
* @param {Effect[]} root_effects
|
|
479
479
|
*/
|
|
480
480
|
process(t) {
|
|
481
|
-
|
|
482
|
-
for (const
|
|
483
|
-
|
|
484
|
-
if (
|
|
485
|
-
|
|
486
|
-
var r =
|
|
487
|
-
ce(this,
|
|
481
|
+
wt = [], _r = null;
|
|
482
|
+
for (const a of t)
|
|
483
|
+
pt(this, Ce, oa).call(this, a);
|
|
484
|
+
if (I(this, _t).length === 0 && I(this, Ze) === 0) {
|
|
485
|
+
pt(this, Ce, Xr).call(this);
|
|
486
|
+
var r = I(this, gt), n = I(this, et);
|
|
487
|
+
ce(this, gt, []), ce(this, et, []), ce(this, Rt, []), _r = W, W = null, Cn(r), Cn(n), W === null ? W = this : Ur.delete(this), I(this, ar)?.resolve();
|
|
488
488
|
} else
|
|
489
|
-
|
|
490
|
-
for (const
|
|
491
|
-
|
|
492
|
-
for (const
|
|
493
|
-
|
|
494
|
-
ce(this,
|
|
489
|
+
pt(this, Ce, gr).call(this, I(this, gt)), pt(this, Ce, gr).call(this, I(this, et)), pt(this, Ce, gr).call(this, I(this, Rt));
|
|
490
|
+
for (const a of I(this, _t))
|
|
491
|
+
Pt(a);
|
|
492
|
+
for (const a of I(this, Dt))
|
|
493
|
+
Pt(a);
|
|
494
|
+
ce(this, _t, []), ce(this, Dt, []);
|
|
495
495
|
}
|
|
496
496
|
/**
|
|
497
497
|
* Associate a change to a given source with the current
|
|
@@ -500,47 +500,47 @@ const Tr = class Tr {
|
|
|
500
500
|
* @param {any} value
|
|
501
501
|
*/
|
|
502
502
|
capture(t, r) {
|
|
503
|
-
|
|
503
|
+
I(this, nr).has(t) || I(this, nr).set(t, r), this.current.set(t, t.v);
|
|
504
504
|
}
|
|
505
505
|
activate() {
|
|
506
506
|
W = this;
|
|
507
507
|
}
|
|
508
508
|
deactivate() {
|
|
509
|
-
W = null,
|
|
509
|
+
W = null, _r = null;
|
|
510
510
|
for (const t of In)
|
|
511
511
|
if (In.delete(t), t(), W !== null)
|
|
512
512
|
break;
|
|
513
513
|
}
|
|
514
514
|
neuter() {
|
|
515
|
-
ce(this,
|
|
515
|
+
ce(this, ir, !0);
|
|
516
516
|
}
|
|
517
517
|
flush() {
|
|
518
|
-
|
|
518
|
+
wt.length > 0 ? sa() : pt(this, Ce, Xr).call(this), W === this && (I(this, Ze) === 0 && Ur.delete(this), this.deactivate());
|
|
519
519
|
}
|
|
520
520
|
increment() {
|
|
521
|
-
ce(this, Ze,
|
|
521
|
+
ce(this, Ze, I(this, Ze) + 1);
|
|
522
522
|
}
|
|
523
523
|
decrement() {
|
|
524
|
-
if (ce(this, Ze,
|
|
525
|
-
for (const t of
|
|
526
|
-
pe(t,
|
|
527
|
-
for (const t of
|
|
528
|
-
pe(t, ut),
|
|
529
|
-
ce(this,
|
|
524
|
+
if (ce(this, Ze, I(this, Ze) - 1), I(this, Ze) === 0) {
|
|
525
|
+
for (const t of I(this, or))
|
|
526
|
+
pe(t, Te), Bt(t);
|
|
527
|
+
for (const t of I(this, sr))
|
|
528
|
+
pe(t, ut), Bt(t);
|
|
529
|
+
ce(this, gt, []), ce(this, et, []), this.flush();
|
|
530
530
|
} else
|
|
531
531
|
this.deactivate();
|
|
532
532
|
}
|
|
533
533
|
/** @param {() => void} fn */
|
|
534
534
|
add_callback(t) {
|
|
535
|
-
|
|
535
|
+
I(this, zt).add(t);
|
|
536
536
|
}
|
|
537
537
|
settled() {
|
|
538
|
-
return (
|
|
538
|
+
return (I(this, ar) ?? ce(this, ar, ni())).promise;
|
|
539
539
|
}
|
|
540
540
|
static ensure() {
|
|
541
541
|
if (W === null) {
|
|
542
|
-
const t = W = new
|
|
543
|
-
Ur.add(W), Qt ||
|
|
542
|
+
const t = W = new $r();
|
|
543
|
+
Ur.add(W), Qt || $r.enqueue(() => {
|
|
544
544
|
W === t && t.flush();
|
|
545
545
|
});
|
|
546
546
|
}
|
|
@@ -548,28 +548,28 @@ const Tr = class Tr {
|
|
|
548
548
|
}
|
|
549
549
|
/** @param {() => void} task */
|
|
550
550
|
static enqueue(t) {
|
|
551
|
-
|
|
551
|
+
ta(t);
|
|
552
552
|
}
|
|
553
553
|
};
|
|
554
|
-
nr = new WeakMap(),
|
|
554
|
+
nr = new WeakMap(), zt = new WeakMap(), Ze = new WeakMap(), ar = new WeakMap(), ir = new WeakMap(), _t = new WeakMap(), Dt = new WeakMap(), gt = new WeakMap(), et = new WeakMap(), Rt = new WeakMap(), or = new WeakMap(), sr = new WeakMap(), Ce = new WeakSet(), /**
|
|
555
555
|
* Traverse the effect tree, executing effects or stashing
|
|
556
556
|
* them for later execution as appropriate
|
|
557
557
|
* @param {Effect} root
|
|
558
558
|
*/
|
|
559
|
-
|
|
559
|
+
oa = function(t) {
|
|
560
560
|
t.f ^= oe;
|
|
561
561
|
for (var r = t.first; r !== null; ) {
|
|
562
|
-
var n = r.f,
|
|
562
|
+
var n = r.f, a = (n & (Ye | lt)) !== 0, i = a && (n & oe) !== 0, o = i || (n & Ie) !== 0 || this.skipped_effects.has(r);
|
|
563
563
|
if (!o && r.fn !== null) {
|
|
564
|
-
if (
|
|
564
|
+
if (a)
|
|
565
565
|
r.f ^= oe;
|
|
566
566
|
else if ((n & cn) !== 0)
|
|
567
|
-
|
|
567
|
+
I(this, et).push(r);
|
|
568
568
|
else if ((n & oe) === 0)
|
|
569
569
|
if ((n & hn) !== 0) {
|
|
570
|
-
var l = r.b?.is_pending() ?
|
|
570
|
+
var l = r.b?.is_pending() ? I(this, Dt) : I(this, _t);
|
|
571
571
|
l.push(r);
|
|
572
|
-
} else
|
|
572
|
+
} else Cr(r) && ((r.f & Vt) !== 0 && I(this, Rt).push(r), Pt(r));
|
|
573
573
|
var u = r.first;
|
|
574
574
|
if (u !== null) {
|
|
575
575
|
r = u;
|
|
@@ -583,88 +583,88 @@ oi = function(t) {
|
|
|
583
583
|
}, /**
|
|
584
584
|
* @param {Effect[]} effects
|
|
585
585
|
*/
|
|
586
|
-
|
|
586
|
+
gr = function(t) {
|
|
587
587
|
for (const r of t)
|
|
588
|
-
((r.f &
|
|
588
|
+
((r.f & Te) !== 0 ? I(this, or) : I(this, sr)).push(r), pe(r, oe);
|
|
589
589
|
t.length = 0;
|
|
590
590
|
}, /**
|
|
591
591
|
* Append and remove branches to/from the DOM
|
|
592
592
|
*/
|
|
593
593
|
Xr = function() {
|
|
594
|
-
if (!
|
|
595
|
-
for (const t of
|
|
594
|
+
if (!I(this, ir))
|
|
595
|
+
for (const t of I(this, zt))
|
|
596
596
|
t();
|
|
597
|
-
|
|
597
|
+
I(this, zt).clear();
|
|
598
598
|
};
|
|
599
|
-
let
|
|
600
|
-
function
|
|
599
|
+
let jt = $r;
|
|
600
|
+
function ie(e) {
|
|
601
601
|
var t = Qt;
|
|
602
602
|
Qt = !0;
|
|
603
603
|
try {
|
|
604
604
|
for (var r; ; ) {
|
|
605
|
-
if (
|
|
606
|
-
return
|
|
605
|
+
if (Ti(), wt.length === 0 && !Ei() && (W?.flush(), wt.length === 0))
|
|
606
|
+
return Nr = null, /** @type {T} */
|
|
607
607
|
r;
|
|
608
|
-
|
|
608
|
+
sa();
|
|
609
609
|
}
|
|
610
610
|
} finally {
|
|
611
611
|
Qt = t;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
function
|
|
615
|
-
var e =
|
|
614
|
+
function sa() {
|
|
615
|
+
var e = Ot;
|
|
616
616
|
Gr = !0;
|
|
617
617
|
try {
|
|
618
618
|
var t = 0;
|
|
619
|
-
for (On(!0);
|
|
620
|
-
var r =
|
|
619
|
+
for (On(!0); wt.length > 0; ) {
|
|
620
|
+
var r = jt.ensure();
|
|
621
621
|
if (t++ > 1e3) {
|
|
622
|
-
var n,
|
|
623
|
-
|
|
622
|
+
var n, a;
|
|
623
|
+
Mi();
|
|
624
624
|
}
|
|
625
|
-
r.process(
|
|
625
|
+
r.process(wt), at.clear();
|
|
626
626
|
}
|
|
627
627
|
} finally {
|
|
628
|
-
Gr = !1, On(e),
|
|
628
|
+
Gr = !1, On(e), Nr = null;
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Mi() {
|
|
632
632
|
try {
|
|
633
|
-
|
|
633
|
+
vi();
|
|
634
634
|
} catch (e) {
|
|
635
|
-
mn(e,
|
|
635
|
+
mn(e, Nr);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
|
-
let
|
|
638
|
+
let ht = null;
|
|
639
639
|
function Cn(e) {
|
|
640
640
|
var t = e.length;
|
|
641
641
|
if (t !== 0) {
|
|
642
642
|
for (var r = 0; r < t; ) {
|
|
643
643
|
var n = e[r++];
|
|
644
|
-
if ((n.f & (
|
|
645
|
-
|
|
646
|
-
for (const
|
|
647
|
-
|
|
648
|
-
|
|
644
|
+
if ((n.f & (xt | Ie)) === 0 && Cr(n) && (ht = [], Pt(n), n.deps === null && n.first === null && n.nodes_start === null && (n.teardown === null && n.ac === null ? ka(n) : n.fn = null), ht?.length > 0)) {
|
|
645
|
+
at.clear();
|
|
646
|
+
for (const a of ht)
|
|
647
|
+
Pt(a);
|
|
648
|
+
ht = [];
|
|
649
649
|
}
|
|
650
650
|
}
|
|
651
|
-
|
|
651
|
+
ht = null;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
for (var t =
|
|
654
|
+
function Bt(e) {
|
|
655
|
+
for (var t = Nr = e; t.parent !== null; ) {
|
|
656
656
|
t = t.parent;
|
|
657
657
|
var r = t.f;
|
|
658
|
-
if (Gr && t === z && (r &
|
|
658
|
+
if (Gr && t === z && (r & Vt) !== 0)
|
|
659
659
|
return;
|
|
660
660
|
if ((r & (lt | Ye)) !== 0) {
|
|
661
661
|
if ((r & oe) === 0) return;
|
|
662
662
|
t.f ^= oe;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
|
|
665
|
+
wt.push(t);
|
|
666
666
|
}
|
|
667
|
-
const
|
|
667
|
+
const at = /* @__PURE__ */ new Map();
|
|
668
668
|
function tr(e, t) {
|
|
669
669
|
var r = {
|
|
670
670
|
f: 0,
|
|
@@ -680,66 +680,66 @@ function tr(e, t) {
|
|
|
680
680
|
// @__NO_SIDE_EFFECTS__
|
|
681
681
|
function D(e, t) {
|
|
682
682
|
const r = tr(e);
|
|
683
|
-
return
|
|
683
|
+
return Ea(r), r;
|
|
684
684
|
}
|
|
685
685
|
// @__NO_SIDE_EFFECTS__
|
|
686
|
-
function
|
|
686
|
+
function la(e, t = !1, r = !0) {
|
|
687
687
|
const n = tr(e);
|
|
688
688
|
return t || (n.equals = Gn), n;
|
|
689
689
|
}
|
|
690
690
|
function h(e, t, r = !1) {
|
|
691
691
|
P !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
692
692
|
// to ensure we error if state is set inside an inspect effect
|
|
693
|
-
(!
|
|
693
|
+
(!Oe || (P.f & An) !== 0) && Xn() && (P.f & (me | Vt | hn | An)) !== 0 && !Je?.includes(e) && mi();
|
|
694
694
|
let n = r ? rt(t) : t;
|
|
695
|
-
return
|
|
695
|
+
return wr(e, n);
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function wr(e, t) {
|
|
698
698
|
if (!e.equals(t)) {
|
|
699
699
|
var r = e.v;
|
|
700
|
-
|
|
701
|
-
var n =
|
|
702
|
-
n.capture(e, r), (e.f &
|
|
700
|
+
Tt ? at.set(e, t) : at.set(e, r), e.v = t;
|
|
701
|
+
var n = jt.ensure();
|
|
702
|
+
n.capture(e, r), (e.f & me) !== 0 && ((e.f & Te) !== 0 && bn(
|
|
703
703
|
/** @type {Derived} */
|
|
704
704
|
e
|
|
705
|
-
), pe(e, (e.f &
|
|
705
|
+
), pe(e, (e.f & Ee) === 0 ? oe : ut)), e.wv = Ta(), ua(e, Te), z !== null && (z.f & oe) !== 0 && (z.f & (Ye | lt)) === 0 && (ke === null ? Ui([e]) : ke.push(e));
|
|
706
706
|
}
|
|
707
707
|
return t;
|
|
708
708
|
}
|
|
709
709
|
function Vr(e) {
|
|
710
710
|
h(e, e.v + 1);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function ua(e, t) {
|
|
713
713
|
var r = e.reactions;
|
|
714
714
|
if (r !== null)
|
|
715
|
-
for (var n = r.length,
|
|
716
|
-
var
|
|
717
|
-
l && pe(
|
|
715
|
+
for (var n = r.length, a = 0; a < n; a++) {
|
|
716
|
+
var i = r[a], o = i.f, l = (o & Te) === 0;
|
|
717
|
+
l && pe(i, t), (o & me) !== 0 ? ua(
|
|
718
718
|
/** @type {Derived} */
|
|
719
|
-
|
|
719
|
+
i,
|
|
720
720
|
ut
|
|
721
|
-
) : l && ((o &
|
|
721
|
+
) : l && ((o & Vt) !== 0 && ht !== null && ht.push(
|
|
722
722
|
/** @type {Effect} */
|
|
723
|
-
|
|
724
|
-
),
|
|
723
|
+
i
|
|
724
|
+
), Bt(
|
|
725
725
|
/** @type {Effect} */
|
|
726
|
-
|
|
726
|
+
i
|
|
727
727
|
));
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
function rt(e) {
|
|
731
|
-
if (typeof e != "object" || e === null ||
|
|
731
|
+
if (typeof e != "object" || e === null || hr in e)
|
|
732
732
|
return e;
|
|
733
733
|
const t = Vn(e);
|
|
734
|
-
if (t !==
|
|
734
|
+
if (t !== ti && t !== ri)
|
|
735
735
|
return e;
|
|
736
|
-
var r = /* @__PURE__ */ new Map(), n = un(e),
|
|
737
|
-
if (
|
|
736
|
+
var r = /* @__PURE__ */ new Map(), n = un(e), a = /* @__PURE__ */ D(0), i = yt, o = (l) => {
|
|
737
|
+
if (yt === i)
|
|
738
738
|
return l();
|
|
739
|
-
var u = P, d =
|
|
740
|
-
|
|
739
|
+
var u = P, d = yt;
|
|
740
|
+
Re(null), zn(i);
|
|
741
741
|
var v = l();
|
|
742
|
-
return
|
|
742
|
+
return Re(u), zn(d), v;
|
|
743
743
|
};
|
|
744
744
|
return n && r.set("length", /* @__PURE__ */ D(
|
|
745
745
|
/** @type {any[]} */
|
|
@@ -749,11 +749,11 @@ function rt(e) {
|
|
|
749
749
|
e,
|
|
750
750
|
{
|
|
751
751
|
defineProperty(l, u, d) {
|
|
752
|
-
(!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) &&
|
|
752
|
+
(!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && _i();
|
|
753
753
|
var v = r.get(u);
|
|
754
754
|
return v === void 0 ? v = o(() => {
|
|
755
|
-
var
|
|
756
|
-
return r.set(u,
|
|
755
|
+
var m = /* @__PURE__ */ D(d.value);
|
|
756
|
+
return r.set(u, m), m;
|
|
757
757
|
}) : h(v, d.value, !0), !0;
|
|
758
758
|
},
|
|
759
759
|
deleteProperty(l, u) {
|
|
@@ -761,18 +761,18 @@ function rt(e) {
|
|
|
761
761
|
if (d === void 0) {
|
|
762
762
|
if (u in l) {
|
|
763
763
|
const v = o(() => /* @__PURE__ */ D(re));
|
|
764
|
-
r.set(u, v), Vr(
|
|
764
|
+
r.set(u, v), Vr(a);
|
|
765
765
|
}
|
|
766
766
|
} else
|
|
767
|
-
h(d, re), Vr(
|
|
767
|
+
h(d, re), Vr(a);
|
|
768
768
|
return !0;
|
|
769
769
|
},
|
|
770
770
|
get(l, u, d) {
|
|
771
|
-
if (u ===
|
|
771
|
+
if (u === hr)
|
|
772
772
|
return e;
|
|
773
|
-
var v = r.get(u),
|
|
774
|
-
if (v === void 0 && (!
|
|
775
|
-
var c = rt(
|
|
773
|
+
var v = r.get(u), m = u in l;
|
|
774
|
+
if (v === void 0 && (!m || mt(l, u)?.writable) && (v = o(() => {
|
|
775
|
+
var c = rt(m ? l[u] : re), p = /* @__PURE__ */ D(c);
|
|
776
776
|
return p;
|
|
777
777
|
}), r.set(u, v)), v !== void 0) {
|
|
778
778
|
var f = s(v);
|
|
@@ -786,8 +786,8 @@ function rt(e) {
|
|
|
786
786
|
var v = r.get(u);
|
|
787
787
|
v && (d.value = s(v));
|
|
788
788
|
} else if (d === void 0) {
|
|
789
|
-
var
|
|
790
|
-
if (
|
|
789
|
+
var m = r.get(u), f = m?.v;
|
|
790
|
+
if (m !== void 0 && f !== re)
|
|
791
791
|
return {
|
|
792
792
|
enumerable: !0,
|
|
793
793
|
configurable: !0,
|
|
@@ -798,34 +798,34 @@ function rt(e) {
|
|
|
798
798
|
return d;
|
|
799
799
|
},
|
|
800
800
|
has(l, u) {
|
|
801
|
-
if (u ===
|
|
801
|
+
if (u === hr)
|
|
802
802
|
return !0;
|
|
803
803
|
var d = r.get(u), v = d !== void 0 && d.v !== re || Reflect.has(l, u);
|
|
804
|
-
if (d !== void 0 || z !== null && (!v ||
|
|
804
|
+
if (d !== void 0 || z !== null && (!v || mt(l, u)?.writable)) {
|
|
805
805
|
d === void 0 && (d = o(() => {
|
|
806
806
|
var f = v ? rt(l[u]) : re, c = /* @__PURE__ */ D(f);
|
|
807
807
|
return c;
|
|
808
808
|
}), r.set(u, d));
|
|
809
|
-
var
|
|
810
|
-
if (
|
|
809
|
+
var m = s(d);
|
|
810
|
+
if (m === re)
|
|
811
811
|
return !1;
|
|
812
812
|
}
|
|
813
813
|
return v;
|
|
814
814
|
},
|
|
815
815
|
set(l, u, d, v) {
|
|
816
|
-
var
|
|
816
|
+
var m = r.get(u), f = u in l;
|
|
817
817
|
if (n && u === "length")
|
|
818
818
|
for (var c = d; c < /** @type {Source<number>} */
|
|
819
|
-
|
|
819
|
+
m.v; c += 1) {
|
|
820
820
|
var p = r.get(c + "");
|
|
821
821
|
p !== void 0 ? h(p, re) : c in l && (p = o(() => /* @__PURE__ */ D(re)), r.set(c + "", p));
|
|
822
822
|
}
|
|
823
|
-
if (
|
|
824
|
-
(!f ||
|
|
823
|
+
if (m === void 0)
|
|
824
|
+
(!f || mt(l, u)?.writable) && (m = o(() => /* @__PURE__ */ D(void 0)), h(m, rt(d)), r.set(u, m));
|
|
825
825
|
else {
|
|
826
|
-
f =
|
|
826
|
+
f = m.v !== re;
|
|
827
827
|
var b = o(() => rt(d));
|
|
828
|
-
h(
|
|
828
|
+
h(m, b);
|
|
829
829
|
}
|
|
830
830
|
var w = Reflect.getOwnPropertyDescriptor(l, u);
|
|
831
831
|
if (w?.set && w.set.call(v, d), !f) {
|
|
@@ -836,14 +836,14 @@ function rt(e) {
|
|
|
836
836
|
), y = Number(u);
|
|
837
837
|
Number.isInteger(y) && y >= $.v && h($, y + 1);
|
|
838
838
|
}
|
|
839
|
-
Vr(
|
|
839
|
+
Vr(a);
|
|
840
840
|
}
|
|
841
841
|
return !0;
|
|
842
842
|
},
|
|
843
843
|
ownKeys(l) {
|
|
844
|
-
s(
|
|
845
|
-
var u = Reflect.ownKeys(l).filter((
|
|
846
|
-
var f = r.get(
|
|
844
|
+
s(a);
|
|
845
|
+
var u = Reflect.ownKeys(l).filter((m) => {
|
|
846
|
+
var f = r.get(m);
|
|
847
847
|
return f === void 0 || f.v !== re;
|
|
848
848
|
});
|
|
849
849
|
for (var [d, v] of r)
|
|
@@ -851,29 +851,29 @@ function rt(e) {
|
|
|
851
851
|
return u;
|
|
852
852
|
},
|
|
853
853
|
setPrototypeOf() {
|
|
854
|
-
|
|
854
|
+
gi();
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
);
|
|
858
858
|
}
|
|
859
|
-
var Mn,
|
|
859
|
+
var Mn, da, ca, fa;
|
|
860
860
|
function Qr() {
|
|
861
861
|
if (Mn === void 0) {
|
|
862
|
-
Mn = window,
|
|
862
|
+
Mn = window, da = /Firefox/.test(navigator.userAgent);
|
|
863
863
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
864
|
-
|
|
864
|
+
ca = mt(t, "firstChild").get, fa = mt(t, "nextSibling").get, Sn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Sn(r) && (r.__t = void 0);
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function ze(e = "") {
|
|
868
868
|
return document.createTextNode(e);
|
|
869
869
|
}
|
|
870
870
|
// @__NO_SIDE_EFFECTS__
|
|
871
871
|
function ot(e) {
|
|
872
|
-
return
|
|
872
|
+
return ca.call(e);
|
|
873
873
|
}
|
|
874
874
|
// @__NO_SIDE_EFFECTS__
|
|
875
875
|
function We(e) {
|
|
876
|
-
return
|
|
876
|
+
return fa.call(e);
|
|
877
877
|
}
|
|
878
878
|
function E(e, t) {
|
|
879
879
|
if (!F)
|
|
@@ -883,14 +883,14 @@ function E(e, t) {
|
|
|
883
883
|
/* @__PURE__ */ ot(B)
|
|
884
884
|
);
|
|
885
885
|
if (r === null)
|
|
886
|
-
r = B.appendChild(
|
|
886
|
+
r = B.appendChild(ze());
|
|
887
887
|
else if (t && r.nodeType !== gn) {
|
|
888
|
-
var n =
|
|
889
|
-
return r?.before(n),
|
|
888
|
+
var n = ze();
|
|
889
|
+
return r?.before(n), $e(n), n;
|
|
890
890
|
}
|
|
891
|
-
return
|
|
891
|
+
return $e(r), r;
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function Ne(e, t) {
|
|
894
894
|
if (!F) {
|
|
895
895
|
var r = (
|
|
896
896
|
/** @type {DocumentFragment} */
|
|
@@ -903,31 +903,31 @@ function Ie(e, t) {
|
|
|
903
903
|
}
|
|
904
904
|
return B;
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function N(e, t = 1, r = !1) {
|
|
907
907
|
let n = F ? B : e;
|
|
908
|
-
for (var
|
|
909
|
-
|
|
908
|
+
for (var a; t--; )
|
|
909
|
+
a = n, n = /** @type {TemplateNode} */
|
|
910
910
|
/* @__PURE__ */ We(n);
|
|
911
911
|
if (!F)
|
|
912
912
|
return n;
|
|
913
913
|
if (r && n?.nodeType !== gn) {
|
|
914
|
-
var
|
|
915
|
-
return n === null ?
|
|
914
|
+
var i = ze();
|
|
915
|
+
return n === null ? a?.after(i) : n.before(i), $e(i), i;
|
|
916
916
|
}
|
|
917
|
-
return
|
|
917
|
+
return $e(n), /** @type {TemplateNode} */
|
|
918
918
|
n;
|
|
919
919
|
}
|
|
920
920
|
function yn(e) {
|
|
921
921
|
e.textContent = "";
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function va() {
|
|
924
924
|
return !1;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function qi(e) {
|
|
927
927
|
F && /* @__PURE__ */ ot(e) !== null && yn(e);
|
|
928
928
|
}
|
|
929
929
|
let qn = !1;
|
|
930
|
-
function
|
|
930
|
+
function pa() {
|
|
931
931
|
qn || (qn = !0, document.addEventListener(
|
|
932
932
|
"reset",
|
|
933
933
|
(e) => {
|
|
@@ -945,44 +945,44 @@ function pi() {
|
|
|
945
945
|
{ capture: !0 }
|
|
946
946
|
));
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Ir(e) {
|
|
949
949
|
var t = P, r = z;
|
|
950
|
-
|
|
950
|
+
Re(null), st(null);
|
|
951
951
|
try {
|
|
952
952
|
return e();
|
|
953
953
|
} finally {
|
|
954
|
-
|
|
954
|
+
Re(t), st(r);
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
|
-
function
|
|
958
|
-
e.addEventListener(t, () =>
|
|
959
|
-
const
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
} : e.__on_r = () => n(!0),
|
|
957
|
+
function ha(e, t, r, n = r) {
|
|
958
|
+
e.addEventListener(t, () => Ir(r));
|
|
959
|
+
const a = e.__on_r;
|
|
960
|
+
a ? e.__on_r = () => {
|
|
961
|
+
a(), n(!0);
|
|
962
|
+
} : e.__on_r = () => n(!0), pa();
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
z === null && P === null &&
|
|
964
|
+
function Oi(e) {
|
|
965
|
+
z === null && P === null && fi(), P !== null && (P.f & Ee) !== 0 && z === null && ci(), Tt && di();
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function Pi(e, t) {
|
|
968
968
|
var r = t.last;
|
|
969
969
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
var
|
|
973
|
-
|
|
974
|
-
var
|
|
975
|
-
ctx:
|
|
971
|
+
function Le(e, t, r, n = !0) {
|
|
972
|
+
var a = z;
|
|
973
|
+
a !== null && (a.f & Ie) !== 0 && (e |= Ie);
|
|
974
|
+
var i = {
|
|
975
|
+
ctx: Se,
|
|
976
976
|
deps: null,
|
|
977
977
|
nodes_start: null,
|
|
978
978
|
nodes_end: null,
|
|
979
|
-
f: e |
|
|
979
|
+
f: e | Te,
|
|
980
980
|
first: null,
|
|
981
981
|
fn: t,
|
|
982
982
|
last: null,
|
|
983
983
|
next: null,
|
|
984
|
-
parent:
|
|
985
|
-
b:
|
|
984
|
+
parent: a,
|
|
985
|
+
b: a && a.b,
|
|
986
986
|
prev: null,
|
|
987
987
|
teardown: null,
|
|
988
988
|
transitions: null,
|
|
@@ -991,15 +991,15 @@ function Fe(e, t, r, n = !0) {
|
|
|
991
991
|
};
|
|
992
992
|
if (r)
|
|
993
993
|
try {
|
|
994
|
-
|
|
994
|
+
Pt(i), i.f |= vn;
|
|
995
995
|
} catch (u) {
|
|
996
|
-
throw
|
|
996
|
+
throw De(i), u;
|
|
997
997
|
}
|
|
998
|
-
else t !== null &&
|
|
998
|
+
else t !== null && Bt(i);
|
|
999
999
|
if (n) {
|
|
1000
|
-
var o =
|
|
1000
|
+
var o = i;
|
|
1001
1001
|
if (r && o.deps === null && o.teardown === null && o.nodes_start === null && o.first === o.last && // either `null`, or a singular child
|
|
1002
|
-
(o.f &
|
|
1002
|
+
(o.f & Ht) === 0 && (o = o.first), o !== null && (o.parent = a, a !== null && Pi(o, a), P !== null && (P.f & me) !== 0 && (e & lt) === 0)) {
|
|
1003
1003
|
var l = (
|
|
1004
1004
|
/** @type {Derived} */
|
|
1005
1005
|
P
|
|
@@ -1007,14 +1007,14 @@ function Fe(e, t, r, n = !0) {
|
|
|
1007
1007
|
(l.effects ?? (l.effects = [])).push(o);
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
return
|
|
1010
|
+
return i;
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1013
|
-
const t =
|
|
1012
|
+
function zi(e) {
|
|
1013
|
+
const t = Le(fn, null, !1);
|
|
1014
1014
|
return pe(t, oe), t.teardown = e, t;
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1017
|
-
|
|
1016
|
+
function _a(e) {
|
|
1017
|
+
Oi();
|
|
1018
1018
|
var t = (
|
|
1019
1019
|
/** @type {Effect} */
|
|
1020
1020
|
z.f
|
|
@@ -1022,97 +1022,97 @@ function _i(e) {
|
|
|
1022
1022
|
if (r) {
|
|
1023
1023
|
var n = (
|
|
1024
1024
|
/** @type {ComponentContext} */
|
|
1025
|
-
|
|
1025
|
+
Se
|
|
1026
1026
|
);
|
|
1027
1027
|
(n.e ?? (n.e = [])).push(e);
|
|
1028
1028
|
} else
|
|
1029
|
-
return
|
|
1029
|
+
return ga(e);
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return
|
|
1031
|
+
function ga(e) {
|
|
1032
|
+
return Le(cn | ii, e, !1);
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1035
|
-
|
|
1036
|
-
const t =
|
|
1034
|
+
function Di(e) {
|
|
1035
|
+
jt.ensure();
|
|
1036
|
+
const t = Le(lt | Ht, e, !0);
|
|
1037
1037
|
return () => {
|
|
1038
|
-
|
|
1038
|
+
De(t);
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1042
|
-
|
|
1043
|
-
const t =
|
|
1041
|
+
function Ri(e) {
|
|
1042
|
+
jt.ensure();
|
|
1043
|
+
const t = Le(lt | Ht, e, !0);
|
|
1044
1044
|
return (r = {}) => new Promise((n) => {
|
|
1045
1045
|
r.outro ? wn(t, () => {
|
|
1046
|
-
|
|
1047
|
-
}) : (
|
|
1046
|
+
De(t), n(void 0);
|
|
1047
|
+
}) : (De(t), n(void 0));
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1050
|
+
function Li(e) {
|
|
1051
|
+
return Le(cn, e, !1);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
return
|
|
1053
|
+
function Fi(e) {
|
|
1054
|
+
return Le(hn | Ht, e, !0);
|
|
1055
1055
|
}
|
|
1056
1056
|
function kn(e, t = 0) {
|
|
1057
|
-
return
|
|
1057
|
+
return Le(fn | t, e, !0);
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1060
|
-
|
|
1061
|
-
|
|
1059
|
+
function xe(e, t = [], r = []) {
|
|
1060
|
+
Ii(t, r, (n) => {
|
|
1061
|
+
Le(fn, () => e(...n.map(s)), !0);
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1065
|
-
var r =
|
|
1064
|
+
function ma(e, t = 0) {
|
|
1065
|
+
var r = Le(Vt | t, e, !0);
|
|
1066
1066
|
return r;
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1069
|
-
return
|
|
1068
|
+
function Ut(e, t = !0) {
|
|
1069
|
+
return Le(Ye | Ht, e, !0, t);
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function ba(e) {
|
|
1072
1072
|
var t = e.teardown;
|
|
1073
1073
|
if (t !== null) {
|
|
1074
|
-
const r =
|
|
1075
|
-
Pn(!0),
|
|
1074
|
+
const r = Tt, n = P;
|
|
1075
|
+
Pn(!0), Re(null);
|
|
1076
1076
|
try {
|
|
1077
1077
|
t.call(null);
|
|
1078
1078
|
} finally {
|
|
1079
|
-
Pn(r),
|
|
1079
|
+
Pn(r), Re(n);
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function ya(e, t = !1) {
|
|
1084
1084
|
var r = e.first;
|
|
1085
1085
|
for (e.first = e.last = null; r !== null; ) {
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
|
|
1086
|
+
const a = r.ac;
|
|
1087
|
+
a !== null && Ir(() => {
|
|
1088
|
+
a.abort(_n);
|
|
1089
1089
|
});
|
|
1090
1090
|
var n = r.next;
|
|
1091
|
-
(r.f & lt) !== 0 ? r.parent = null :
|
|
1091
|
+
(r.f & lt) !== 0 ? r.parent = null : De(r, t), r = n;
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function ji(e) {
|
|
1095
1095
|
for (var t = e.first; t !== null; ) {
|
|
1096
1096
|
var r = t.next;
|
|
1097
|
-
(t.f & Ye) === 0 &&
|
|
1097
|
+
(t.f & Ye) === 0 && De(t), t = r;
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function De(e, t = !0) {
|
|
1101
1101
|
var r = !1;
|
|
1102
|
-
(t || (e.f &
|
|
1102
|
+
(t || (e.f & ai) !== 0) && e.nodes_start !== null && e.nodes_end !== null && (Bi(
|
|
1103
1103
|
e.nodes_start,
|
|
1104
1104
|
/** @type {TemplateNode} */
|
|
1105
1105
|
e.nodes_end
|
|
1106
|
-
), r = !0),
|
|
1106
|
+
), r = !0), ya(e, t && !r), xr(e, 0), pe(e, xt);
|
|
1107
1107
|
var n = e.transitions;
|
|
1108
1108
|
if (n !== null)
|
|
1109
|
-
for (const
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
var
|
|
1113
|
-
|
|
1109
|
+
for (const i of n)
|
|
1110
|
+
i.stop();
|
|
1111
|
+
ba(e);
|
|
1112
|
+
var a = e.parent;
|
|
1113
|
+
a !== null && a.first !== null && ka(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = e.ac = null;
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function Bi(e, t) {
|
|
1116
1116
|
for (; e !== null; ) {
|
|
1117
1117
|
var r = e === t ? null : (
|
|
1118
1118
|
/** @type {TemplateNode} */
|
|
@@ -1121,61 +1121,61 @@ function Ba(e, t) {
|
|
|
1121
1121
|
e.remove(), e = r;
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function ka(e) {
|
|
1125
1125
|
var t = e.parent, r = e.prev, n = e.next;
|
|
1126
1126
|
r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
|
|
1127
1127
|
}
|
|
1128
1128
|
function wn(e, t) {
|
|
1129
1129
|
var r = [];
|
|
1130
|
-
xn(e, r, !0),
|
|
1131
|
-
|
|
1130
|
+
xn(e, r, !0), wa(r, () => {
|
|
1131
|
+
De(e), t && t();
|
|
1132
1132
|
});
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function wa(e, t) {
|
|
1135
1135
|
var r = e.length;
|
|
1136
1136
|
if (r > 0) {
|
|
1137
1137
|
var n = () => --r || t();
|
|
1138
|
-
for (var
|
|
1139
|
-
|
|
1138
|
+
for (var a of e)
|
|
1139
|
+
a.out(n);
|
|
1140
1140
|
} else
|
|
1141
1141
|
t();
|
|
1142
1142
|
}
|
|
1143
1143
|
function xn(e, t, r) {
|
|
1144
|
-
if ((e.f &
|
|
1145
|
-
if (e.f ^=
|
|
1144
|
+
if ((e.f & Ie) === 0) {
|
|
1145
|
+
if (e.f ^= Ie, e.transitions !== null)
|
|
1146
1146
|
for (const o of e.transitions)
|
|
1147
1147
|
(o.is_global || r) && t.push(o);
|
|
1148
1148
|
for (var n = e.first; n !== null; ) {
|
|
1149
|
-
var
|
|
1150
|
-
xn(n, t,
|
|
1149
|
+
var a = n.next, i = (n.f & pn) !== 0 || (n.f & Ye) !== 0;
|
|
1150
|
+
xn(n, t, i ? r : !1), n = a;
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
function En(e) {
|
|
1155
|
-
|
|
1155
|
+
xa(e, !0);
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1158
|
-
if ((e.f &
|
|
1159
|
-
e.f ^=
|
|
1157
|
+
function xa(e, t) {
|
|
1158
|
+
if ((e.f & Ie) !== 0) {
|
|
1159
|
+
e.f ^= Ie, (e.f & oe) === 0 && (pe(e, Te), Bt(e));
|
|
1160
1160
|
for (var r = e.first; r !== null; ) {
|
|
1161
|
-
var n = r.next,
|
|
1162
|
-
|
|
1161
|
+
var n = r.next, a = (r.f & pn) !== 0 || (r.f & Ye) !== 0;
|
|
1162
|
+
xa(r, a ? t : !1), r = n;
|
|
1163
1163
|
}
|
|
1164
1164
|
if (e.transitions !== null)
|
|
1165
|
-
for (const
|
|
1166
|
-
(
|
|
1165
|
+
for (const i of e.transitions)
|
|
1166
|
+
(i.is_global || t) && i.in();
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
let
|
|
1169
|
+
let Ot = !1;
|
|
1170
1170
|
function On(e) {
|
|
1171
|
-
|
|
1171
|
+
Ot = e;
|
|
1172
1172
|
}
|
|
1173
|
-
let
|
|
1173
|
+
let Tt = !1;
|
|
1174
1174
|
function Pn(e) {
|
|
1175
|
-
|
|
1175
|
+
Tt = e;
|
|
1176
1176
|
}
|
|
1177
|
-
let P = null,
|
|
1178
|
-
function
|
|
1177
|
+
let P = null, Oe = !1;
|
|
1178
|
+
function Re(e) {
|
|
1179
1179
|
P = e;
|
|
1180
1180
|
}
|
|
1181
1181
|
let z = null;
|
|
@@ -1183,169 +1183,169 @@ function st(e) {
|
|
|
1183
1183
|
z = e;
|
|
1184
1184
|
}
|
|
1185
1185
|
let Je = null;
|
|
1186
|
-
function
|
|
1186
|
+
function Ea(e) {
|
|
1187
1187
|
P !== null && (Je === null ? Je = [e] : Je.push(e));
|
|
1188
1188
|
}
|
|
1189
|
-
let se = null,
|
|
1190
|
-
function
|
|
1191
|
-
|
|
1189
|
+
let se = null, ge = 0, ke = null;
|
|
1190
|
+
function Ui(e) {
|
|
1191
|
+
ke = e;
|
|
1192
1192
|
}
|
|
1193
|
-
let $
|
|
1193
|
+
let $a = 1, rr = 0, yt = rr;
|
|
1194
1194
|
function zn(e) {
|
|
1195
|
-
|
|
1195
|
+
yt = e;
|
|
1196
1196
|
}
|
|
1197
1197
|
let nt = !1;
|
|
1198
|
-
function
|
|
1199
|
-
return ++$
|
|
1198
|
+
function Ta() {
|
|
1199
|
+
return ++$a;
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function Cr(e) {
|
|
1202
1202
|
var t = e.f;
|
|
1203
|
-
if ((t &
|
|
1203
|
+
if ((t & Te) !== 0)
|
|
1204
1204
|
return !0;
|
|
1205
1205
|
if ((t & ut) !== 0) {
|
|
1206
|
-
var r = e.deps, n = (t &
|
|
1206
|
+
var r = e.deps, n = (t & Ee) !== 0;
|
|
1207
1207
|
if (r !== null) {
|
|
1208
|
-
var
|
|
1209
|
-
if ((o || l) && (z === null || (z.f &
|
|
1208
|
+
var a, i, o = (t & yr) !== 0, l = n && z !== null && !nt, u = r.length;
|
|
1209
|
+
if ((o || l) && (z === null || (z.f & xt) === 0)) {
|
|
1210
1210
|
var d = (
|
|
1211
1211
|
/** @type {Derived} */
|
|
1212
1212
|
e
|
|
1213
1213
|
), v = d.parent;
|
|
1214
|
-
for (
|
|
1215
|
-
|
|
1216
|
-
o && (d.f ^=
|
|
1214
|
+
for (a = 0; a < u; a++)
|
|
1215
|
+
i = r[a], (o || !i?.reactions?.includes(d)) && (i.reactions ?? (i.reactions = [])).push(d);
|
|
1216
|
+
o && (d.f ^= yr), l && v !== null && (v.f & Ee) === 0 && (d.f ^= Ee);
|
|
1217
1217
|
}
|
|
1218
|
-
for (
|
|
1219
|
-
if (
|
|
1218
|
+
for (a = 0; a < u; a++)
|
|
1219
|
+
if (i = r[a], Cr(
|
|
1220
1220
|
/** @type {Derived} */
|
|
1221
|
-
|
|
1222
|
-
) &&
|
|
1221
|
+
i
|
|
1222
|
+
) && aa(
|
|
1223
1223
|
/** @type {Derived} */
|
|
1224
|
-
|
|
1225
|
-
),
|
|
1224
|
+
i
|
|
1225
|
+
), i.wv > e.wv)
|
|
1226
1226
|
return !0;
|
|
1227
1227
|
}
|
|
1228
1228
|
(!n || z !== null && !nt) && pe(e, oe);
|
|
1229
1229
|
}
|
|
1230
1230
|
return !1;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function Sa(e, t, r = !0) {
|
|
1233
1233
|
var n = e.reactions;
|
|
1234
1234
|
if (n !== null && !Je?.includes(e))
|
|
1235
|
-
for (var
|
|
1236
|
-
var
|
|
1237
|
-
(
|
|
1235
|
+
for (var a = 0; a < n.length; a++) {
|
|
1236
|
+
var i = n[a];
|
|
1237
|
+
(i.f & me) !== 0 ? Sa(
|
|
1238
1238
|
/** @type {Derived} */
|
|
1239
|
-
|
|
1239
|
+
i,
|
|
1240
1240
|
t,
|
|
1241
1241
|
!1
|
|
1242
|
-
) : t ===
|
|
1242
|
+
) : t === i && (r ? pe(i, Te) : (i.f & oe) !== 0 && pe(i, ut), Bt(
|
|
1243
1243
|
/** @type {Effect} */
|
|
1244
|
-
|
|
1244
|
+
i
|
|
1245
1245
|
));
|
|
1246
1246
|
}
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1248
|
+
function Aa(e) {
|
|
1249
1249
|
var b;
|
|
1250
|
-
var t = se, r =
|
|
1250
|
+
var t = se, r = ge, n = ke, a = P, i = nt, o = Je, l = Se, u = Oe, d = yt, v = e.f;
|
|
1251
1251
|
se = /** @type {null | Value[]} */
|
|
1252
|
-
null,
|
|
1252
|
+
null, ge = 0, ke = null, nt = (v & Ee) !== 0 && (Oe || !Ot || P === null), P = (v & (Ye | lt)) === 0 ? e : null, Je = null, kr(e.ctx), Oe = !1, yt = ++rr, e.ac !== null && (Ir(() => {
|
|
1253
1253
|
e.ac.abort(_n);
|
|
1254
1254
|
}), e.ac = null);
|
|
1255
1255
|
try {
|
|
1256
1256
|
e.f |= Wr;
|
|
1257
|
-
var
|
|
1257
|
+
var m = (
|
|
1258
1258
|
/** @type {Function} */
|
|
1259
1259
|
e.fn
|
|
1260
|
-
), f =
|
|
1260
|
+
), f = m(), c = e.deps;
|
|
1261
1261
|
if (se !== null) {
|
|
1262
1262
|
var p;
|
|
1263
|
-
if (
|
|
1264
|
-
for (c.length =
|
|
1265
|
-
c[
|
|
1263
|
+
if (xr(e, ge), c !== null && ge > 0)
|
|
1264
|
+
for (c.length = ge + se.length, p = 0; p < se.length; p++)
|
|
1265
|
+
c[ge + p] = se[p];
|
|
1266
1266
|
else
|
|
1267
1267
|
e.deps = c = se;
|
|
1268
1268
|
if (!nt || // Deriveds that already have reactions can cleanup, so we still add them as reactions
|
|
1269
|
-
(v &
|
|
1269
|
+
(v & me) !== 0 && /** @type {import('#client').Derived} */
|
|
1270
1270
|
e.reactions !== null)
|
|
1271
|
-
for (p =
|
|
1271
|
+
for (p = ge; p < c.length; p++)
|
|
1272
1272
|
((b = c[p]).reactions ?? (b.reactions = [])).push(e);
|
|
1273
|
-
} else c !== null &&
|
|
1274
|
-
if (Xn() &&
|
|
1273
|
+
} else c !== null && ge < c.length && (xr(e, ge), c.length = ge);
|
|
1274
|
+
if (Xn() && ke !== null && !Oe && c !== null && (e.f & (me | ut | Te)) === 0)
|
|
1275
1275
|
for (p = 0; p < /** @type {Source[]} */
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1276
|
+
ke.length; p++)
|
|
1277
|
+
Sa(
|
|
1278
|
+
ke[p],
|
|
1279
1279
|
/** @type {Effect} */
|
|
1280
1280
|
e
|
|
1281
1281
|
);
|
|
1282
|
-
return
|
|
1283
|
-
|
|
1282
|
+
return a !== null && a !== e && (rr++, ke !== null && (n === null ? n = ke : n.push(.../** @type {Source[]} */
|
|
1283
|
+
ke))), (e.f & bt) !== 0 && (e.f ^= bt), f;
|
|
1284
1284
|
} catch (w) {
|
|
1285
|
-
return
|
|
1285
|
+
return wi(w);
|
|
1286
1286
|
} finally {
|
|
1287
|
-
e.f ^= Wr, se = t,
|
|
1287
|
+
e.f ^= Wr, se = t, ge = r, ke = n, P = a, nt = i, Je = o, kr(l), Oe = u, yt = d;
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Vi(e, t) {
|
|
1291
1291
|
let r = t.reactions;
|
|
1292
1292
|
if (r !== null) {
|
|
1293
|
-
var n =
|
|
1293
|
+
var n = Za.call(r, e);
|
|
1294
1294
|
if (n !== -1) {
|
|
1295
|
-
var
|
|
1296
|
-
|
|
1295
|
+
var a = r.length - 1;
|
|
1296
|
+
a === 0 ? r = t.reactions = null : (r[n] = r[a], r.pop());
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
|
-
r === null && (t.f &
|
|
1299
|
+
r === null && (t.f & me) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1300
1300
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1301
1301
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1302
|
-
(se === null || !se.includes(t)) && (pe(t, ut), (t.f & (
|
|
1302
|
+
(se === null || !se.includes(t)) && (pe(t, ut), (t.f & (Ee | yr)) === 0 && (t.f ^= yr), na(
|
|
1303
1303
|
/** @type {Derived} **/
|
|
1304
1304
|
t
|
|
1305
|
-
),
|
|
1305
|
+
), xr(
|
|
1306
1306
|
/** @type {Derived} **/
|
|
1307
1307
|
t,
|
|
1308
1308
|
0
|
|
1309
1309
|
));
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function xr(e, t) {
|
|
1312
1312
|
var r = e.deps;
|
|
1313
1313
|
if (r !== null)
|
|
1314
1314
|
for (var n = t; n < r.length; n++)
|
|
1315
|
-
|
|
1315
|
+
Vi(e, r[n]);
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function Pt(e) {
|
|
1318
1318
|
var t = e.f;
|
|
1319
|
-
if ((t &
|
|
1319
|
+
if ((t & xt) === 0) {
|
|
1320
1320
|
pe(e, oe);
|
|
1321
|
-
var r = z, n =
|
|
1322
|
-
z = e,
|
|
1321
|
+
var r = z, n = Ot;
|
|
1322
|
+
z = e, Ot = !0;
|
|
1323
1323
|
try {
|
|
1324
|
-
(t &
|
|
1325
|
-
var
|
|
1326
|
-
e.teardown = typeof
|
|
1327
|
-
var
|
|
1328
|
-
Un &&
|
|
1324
|
+
(t & Vt) !== 0 ? ji(e) : ya(e), ba(e);
|
|
1325
|
+
var a = Aa(e);
|
|
1326
|
+
e.teardown = typeof a == "function" ? a : null, e.wv = $a;
|
|
1327
|
+
var i;
|
|
1328
|
+
Un && yi && (e.f & Te) !== 0 && e.deps;
|
|
1329
1329
|
} finally {
|
|
1330
|
-
|
|
1330
|
+
Ot = n, z = r;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
1333
|
}
|
|
1334
|
-
async function
|
|
1335
|
-
await Promise.resolve(),
|
|
1334
|
+
async function Hi() {
|
|
1335
|
+
await Promise.resolve(), ie();
|
|
1336
1336
|
}
|
|
1337
1337
|
function s(e) {
|
|
1338
|
-
var t = e.f, r = (t &
|
|
1339
|
-
if (P !== null && !
|
|
1340
|
-
var n = z !== null && (z.f &
|
|
1338
|
+
var t = e.f, r = (t & me) !== 0;
|
|
1339
|
+
if (P !== null && !Oe) {
|
|
1340
|
+
var n = z !== null && (z.f & xt) !== 0;
|
|
1341
1341
|
if (!n && !Je?.includes(e)) {
|
|
1342
|
-
var
|
|
1342
|
+
var a = P.deps;
|
|
1343
1343
|
if ((P.f & Wr) !== 0)
|
|
1344
|
-
e.rv < rr && (e.rv = rr, se === null &&
|
|
1344
|
+
e.rv < rr && (e.rv = rr, se === null && a !== null && a[ge] === e ? ge++ : se === null ? se = [e] : (!nt || !se.includes(e)) && se.push(e));
|
|
1345
1345
|
else {
|
|
1346
1346
|
(P.deps ?? (P.deps = [])).push(e);
|
|
1347
|
-
var
|
|
1348
|
-
|
|
1347
|
+
var i = e.reactions;
|
|
1348
|
+
i === null ? e.reactions = [P] : i.includes(P) || i.push(P);
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
} else if (r && /** @type {Derived} */
|
|
@@ -1355,125 +1355,125 @@ function s(e) {
|
|
|
1355
1355
|
/** @type {Derived} */
|
|
1356
1356
|
e
|
|
1357
1357
|
), l = o.parent;
|
|
1358
|
-
l !== null && (l.f &
|
|
1358
|
+
l !== null && (l.f & Ee) === 0 && (o.f ^= Ee);
|
|
1359
1359
|
}
|
|
1360
|
-
if (
|
|
1361
|
-
if (
|
|
1362
|
-
return
|
|
1360
|
+
if (Tt) {
|
|
1361
|
+
if (at.has(e))
|
|
1362
|
+
return at.get(e);
|
|
1363
1363
|
if (r) {
|
|
1364
1364
|
o = /** @type {Derived} */
|
|
1365
1365
|
e;
|
|
1366
1366
|
var u = o.v;
|
|
1367
|
-
return ((o.f & oe) === 0 && o.reactions !== null ||
|
|
1367
|
+
return ((o.f & oe) === 0 && o.reactions !== null || Na(o)) && (u = bn(o)), at.set(o, u), u;
|
|
1368
1368
|
}
|
|
1369
1369
|
} else r && (o = /** @type {Derived} */
|
|
1370
|
-
e,
|
|
1371
|
-
if ((e.f &
|
|
1370
|
+
e, Cr(o) && aa(o));
|
|
1371
|
+
if ((e.f & bt) !== 0)
|
|
1372
1372
|
throw e.v;
|
|
1373
1373
|
return e.v;
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function Na(e) {
|
|
1376
1376
|
if (e.v === re) return !0;
|
|
1377
1377
|
if (e.deps === null) return !1;
|
|
1378
1378
|
for (const t of e.deps)
|
|
1379
|
-
if (
|
|
1379
|
+
if (at.has(t) || (t.f & me) !== 0 && Na(
|
|
1380
1380
|
/** @type {Derived} */
|
|
1381
1381
|
t
|
|
1382
1382
|
))
|
|
1383
1383
|
return !0;
|
|
1384
1384
|
return !1;
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1387
|
-
var t =
|
|
1386
|
+
function Mr(e) {
|
|
1387
|
+
var t = Oe;
|
|
1388
1388
|
try {
|
|
1389
|
-
return
|
|
1389
|
+
return Oe = !0, e();
|
|
1390
1390
|
} finally {
|
|
1391
|
-
|
|
1391
|
+
Oe = t;
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
|
-
const
|
|
1394
|
+
const Ji = -7169;
|
|
1395
1395
|
function pe(e, t) {
|
|
1396
|
-
e.f = e.f &
|
|
1396
|
+
e.f = e.f & Ji | t;
|
|
1397
1397
|
}
|
|
1398
|
-
const
|
|
1399
|
-
function
|
|
1400
|
-
function i
|
|
1401
|
-
if (n.capture ||
|
|
1402
|
-
return
|
|
1398
|
+
const Ia = /* @__PURE__ */ new Set(), Zr = /* @__PURE__ */ new Set();
|
|
1399
|
+
function Yi(e, t, r, n = {}) {
|
|
1400
|
+
function a(i) {
|
|
1401
|
+
if (n.capture || Gt.call(t, i), !i.cancelBubble)
|
|
1402
|
+
return Ir(() => r?.call(this, i));
|
|
1403
1403
|
}
|
|
1404
|
-
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ?
|
|
1405
|
-
t.addEventListener(e,
|
|
1406
|
-
}) : t.addEventListener(e,
|
|
1404
|
+
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? ta(() => {
|
|
1405
|
+
t.addEventListener(e, a, n);
|
|
1406
|
+
}) : t.addEventListener(e, a, n), a;
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
var
|
|
1408
|
+
function fr(e, t, r, n, a) {
|
|
1409
|
+
var i = { capture: n, passive: a }, o = Yi(e, t, r, i);
|
|
1410
1410
|
(t === document.body || // @ts-ignore
|
|
1411
1411
|
t === window || // @ts-ignore
|
|
1412
1412
|
t === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
|
|
1413
|
-
t instanceof HTMLMediaElement) &&
|
|
1414
|
-
t.removeEventListener(e, o,
|
|
1413
|
+
t instanceof HTMLMediaElement) && zi(() => {
|
|
1414
|
+
t.removeEventListener(e, o, i);
|
|
1415
1415
|
});
|
|
1416
1416
|
}
|
|
1417
1417
|
function lr(e) {
|
|
1418
1418
|
for (var t = 0; t < e.length; t++)
|
|
1419
|
-
|
|
1419
|
+
Ia.add(e[t]);
|
|
1420
1420
|
for (var r of Zr)
|
|
1421
1421
|
r(e);
|
|
1422
1422
|
}
|
|
1423
1423
|
let Dn = null;
|
|
1424
|
-
function
|
|
1424
|
+
function Gt(e) {
|
|
1425
1425
|
var t = this, r = (
|
|
1426
1426
|
/** @type {Node} */
|
|
1427
1427
|
t.ownerDocument
|
|
1428
|
-
), n = e.type,
|
|
1428
|
+
), n = e.type, a = e.composedPath?.() || [], i = (
|
|
1429
1429
|
/** @type {null | Element} */
|
|
1430
|
-
|
|
1430
|
+
a[0] || e.target
|
|
1431
1431
|
);
|
|
1432
1432
|
Dn = e;
|
|
1433
1433
|
var o = 0, l = Dn === e && e.__root;
|
|
1434
1434
|
if (l) {
|
|
1435
|
-
var u =
|
|
1435
|
+
var u = a.indexOf(l);
|
|
1436
1436
|
if (u !== -1 && (t === document || t === /** @type {any} */
|
|
1437
1437
|
window)) {
|
|
1438
1438
|
e.__root = t;
|
|
1439
1439
|
return;
|
|
1440
1440
|
}
|
|
1441
|
-
var d =
|
|
1441
|
+
var d = a.indexOf(t);
|
|
1442
1442
|
if (d === -1)
|
|
1443
1443
|
return;
|
|
1444
1444
|
u <= d && (o = u);
|
|
1445
1445
|
}
|
|
1446
|
-
if (
|
|
1447
|
-
|
|
1448
|
-
|
|
1446
|
+
if (i = /** @type {Element} */
|
|
1447
|
+
a[o] || e.target, i !== t) {
|
|
1448
|
+
Lt(e, "currentTarget", {
|
|
1449
1449
|
configurable: !0,
|
|
1450
1450
|
get() {
|
|
1451
|
-
return
|
|
1451
|
+
return i || r;
|
|
1452
1452
|
}
|
|
1453
1453
|
});
|
|
1454
|
-
var v = P,
|
|
1455
|
-
|
|
1454
|
+
var v = P, m = z;
|
|
1455
|
+
Re(null), st(null);
|
|
1456
1456
|
try {
|
|
1457
|
-
for (var f, c = [];
|
|
1458
|
-
var p =
|
|
1459
|
-
|
|
1457
|
+
for (var f, c = []; i !== null; ) {
|
|
1458
|
+
var p = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1459
|
+
i.host || null;
|
|
1460
1460
|
try {
|
|
1461
|
-
var b =
|
|
1461
|
+
var b = i["__" + n];
|
|
1462
1462
|
if (b != null && (!/** @type {any} */
|
|
1463
|
-
|
|
1463
|
+
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1464
1464
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1465
|
-
e.target ===
|
|
1465
|
+
e.target === i))
|
|
1466
1466
|
if (un(b)) {
|
|
1467
1467
|
var [w, ...$] = b;
|
|
1468
|
-
w.apply(
|
|
1468
|
+
w.apply(i, [e, ...$]);
|
|
1469
1469
|
} else
|
|
1470
|
-
b.call(
|
|
1470
|
+
b.call(i, e);
|
|
1471
1471
|
} catch (y) {
|
|
1472
1472
|
f ? c.push(y) : f = y;
|
|
1473
1473
|
}
|
|
1474
1474
|
if (e.cancelBubble || p === t || p === null)
|
|
1475
1475
|
break;
|
|
1476
|
-
|
|
1476
|
+
i = p;
|
|
1477
1477
|
}
|
|
1478
1478
|
if (f) {
|
|
1479
1479
|
for (let y of c)
|
|
@@ -1483,15 +1483,15 @@ function Kt(e) {
|
|
|
1483
1483
|
throw f;
|
|
1484
1484
|
}
|
|
1485
1485
|
} finally {
|
|
1486
|
-
e.__root = t, delete e.currentTarget,
|
|
1486
|
+
e.__root = t, delete e.currentTarget, Re(v), st(m);
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function Wi(e) {
|
|
1491
1491
|
var t = document.createElement("template");
|
|
1492
1492
|
return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function it(e, t) {
|
|
1495
1495
|
var r = (
|
|
1496
1496
|
/** @type {Effect} */
|
|
1497
1497
|
z
|
|
@@ -1500,15 +1500,15 @@ function at(e, t) {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
// @__NO_SIDE_EFFECTS__
|
|
1502
1502
|
function U(e, t) {
|
|
1503
|
-
var r = (t &
|
|
1503
|
+
var r = (t & Ga) !== 0, n = (t & Xa) !== 0, a, i = !e.startsWith("<!>");
|
|
1504
1504
|
return () => {
|
|
1505
1505
|
if (F)
|
|
1506
|
-
return
|
|
1507
|
-
|
|
1508
|
-
/* @__PURE__ */ ot(
|
|
1506
|
+
return it(B, null), B;
|
|
1507
|
+
a === void 0 && (a = Wi(i ? e : "<!>" + e), r || (a = /** @type {Node} */
|
|
1508
|
+
/* @__PURE__ */ ot(a)));
|
|
1509
1509
|
var o = (
|
|
1510
1510
|
/** @type {TemplateNode} */
|
|
1511
|
-
n ||
|
|
1511
|
+
n || da ? document.importNode(a, !0) : a.cloneNode(!0)
|
|
1512
1512
|
);
|
|
1513
1513
|
if (r) {
|
|
1514
1514
|
var l = (
|
|
@@ -1518,29 +1518,29 @@ function U(e, t) {
|
|
|
1518
1518
|
/** @type {TemplateNode} */
|
|
1519
1519
|
o.lastChild
|
|
1520
1520
|
);
|
|
1521
|
-
|
|
1521
|
+
it(l, u);
|
|
1522
1522
|
} else
|
|
1523
|
-
|
|
1523
|
+
it(o, o);
|
|
1524
1524
|
return o;
|
|
1525
1525
|
};
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function Ki(e = "") {
|
|
1528
1528
|
if (!F) {
|
|
1529
|
-
var t =
|
|
1530
|
-
return
|
|
1529
|
+
var t = ze(e + "");
|
|
1530
|
+
return it(t, t), t;
|
|
1531
1531
|
}
|
|
1532
1532
|
var r = B;
|
|
1533
|
-
return r.nodeType !== gn && (r.before(r =
|
|
1533
|
+
return r.nodeType !== gn && (r.before(r = ze()), $e(r)), it(r, r), r;
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function kt() {
|
|
1536
1536
|
if (F)
|
|
1537
|
-
return
|
|
1538
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), r =
|
|
1539
|
-
return e.append(t, r),
|
|
1537
|
+
return it(B, null), B;
|
|
1538
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), r = ze();
|
|
1539
|
+
return e.append(t, r), it(t, r), e;
|
|
1540
1540
|
}
|
|
1541
1541
|
function q(e, t) {
|
|
1542
1542
|
if (F) {
|
|
1543
|
-
z.nodes_end = B,
|
|
1543
|
+
z.nodes_end = B, Sr();
|
|
1544
1544
|
return;
|
|
1545
1545
|
}
|
|
1546
1546
|
e !== null && e.before(
|
|
@@ -1548,103 +1548,103 @@ function q(e, t) {
|
|
|
1548
1548
|
t
|
|
1549
1549
|
);
|
|
1550
1550
|
}
|
|
1551
|
-
const
|
|
1552
|
-
function
|
|
1553
|
-
return
|
|
1551
|
+
const Gi = ["touchstart", "touchmove"];
|
|
1552
|
+
function Xi(e) {
|
|
1553
|
+
return Gi.includes(e);
|
|
1554
1554
|
}
|
|
1555
1555
|
function fe(e, t) {
|
|
1556
1556
|
var r = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1557
1557
|
r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = r + "");
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1560
|
-
return
|
|
1559
|
+
function Ca(e, t) {
|
|
1560
|
+
return Ma(e, t);
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Qi(e, t) {
|
|
1563
1563
|
Qr(), t.intro = t.intro ?? !1;
|
|
1564
|
-
const r = t.target, n = F,
|
|
1564
|
+
const r = t.target, n = F, a = B;
|
|
1565
1565
|
try {
|
|
1566
|
-
for (var
|
|
1566
|
+
for (var i = (
|
|
1567
1567
|
/** @type {TemplateNode} */
|
|
1568
1568
|
/* @__PURE__ */ ot(r)
|
|
1569
|
-
);
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
/* @__PURE__ */ We(
|
|
1573
|
-
if (!
|
|
1574
|
-
throw
|
|
1575
|
-
He(!0),
|
|
1569
|
+
); i && (i.nodeType !== er || /** @type {Comment} */
|
|
1570
|
+
i.data !== Bn); )
|
|
1571
|
+
i = /** @type {TemplateNode} */
|
|
1572
|
+
/* @__PURE__ */ We(i);
|
|
1573
|
+
if (!i)
|
|
1574
|
+
throw Mt;
|
|
1575
|
+
He(!0), $e(
|
|
1576
1576
|
/** @type {Comment} */
|
|
1577
|
-
|
|
1578
|
-
),
|
|
1579
|
-
const o =
|
|
1577
|
+
i
|
|
1578
|
+
), Sr();
|
|
1579
|
+
const o = Ma(e, { ...t, anchor: i });
|
|
1580
1580
|
if (B === null || B.nodeType !== er || /** @type {Comment} */
|
|
1581
1581
|
B.data !== ln)
|
|
1582
|
-
throw
|
|
1582
|
+
throw Tr(), Mt;
|
|
1583
1583
|
return He(!1), /** @type {Exports} */
|
|
1584
1584
|
o;
|
|
1585
1585
|
} catch (o) {
|
|
1586
1586
|
if (o instanceof Error && o.message.split(`
|
|
1587
1587
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1588
1588
|
throw o;
|
|
1589
|
-
return o !==
|
|
1589
|
+
return o !== Mt && console.warn("Failed to hydrate: ", o), t.recover === !1 && pi(), Qr(), yn(r), He(!1), Ca(e, t);
|
|
1590
1590
|
} finally {
|
|
1591
|
-
He(n),
|
|
1591
|
+
He(n), $e(a);
|
|
1592
1592
|
}
|
|
1593
1593
|
}
|
|
1594
|
-
const
|
|
1595
|
-
function
|
|
1594
|
+
const Ct = /* @__PURE__ */ new Map();
|
|
1595
|
+
function Ma(e, { target: t, anchor: r, props: n = {}, events: a, context: i, intro: o = !0 }) {
|
|
1596
1596
|
Qr();
|
|
1597
|
-
var l = /* @__PURE__ */ new Set(), u = (
|
|
1598
|
-
for (var f = 0; f <
|
|
1599
|
-
var c =
|
|
1597
|
+
var l = /* @__PURE__ */ new Set(), u = (m) => {
|
|
1598
|
+
for (var f = 0; f < m.length; f++) {
|
|
1599
|
+
var c = m[f];
|
|
1600
1600
|
if (!l.has(c)) {
|
|
1601
1601
|
l.add(c);
|
|
1602
|
-
var p =
|
|
1603
|
-
t.addEventListener(c,
|
|
1604
|
-
var b =
|
|
1605
|
-
b === void 0 ? (document.addEventListener(c,
|
|
1602
|
+
var p = Xi(c);
|
|
1603
|
+
t.addEventListener(c, Gt, { passive: p });
|
|
1604
|
+
var b = Ct.get(c);
|
|
1605
|
+
b === void 0 ? (document.addEventListener(c, Gt, { passive: p }), Ct.set(c, 1)) : Ct.set(c, b + 1);
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
1608
|
};
|
|
1609
|
-
u(dn(
|
|
1610
|
-
var d = void 0, v =
|
|
1611
|
-
var
|
|
1612
|
-
return
|
|
1613
|
-
if (
|
|
1614
|
-
|
|
1609
|
+
u(dn(Ia)), Zr.add(u);
|
|
1610
|
+
var d = void 0, v = Ri(() => {
|
|
1611
|
+
var m = r ?? t.appendChild(ze());
|
|
1612
|
+
return Ut(() => {
|
|
1613
|
+
if (i) {
|
|
1614
|
+
Et({});
|
|
1615
1615
|
var f = (
|
|
1616
1616
|
/** @type {ComponentContext} */
|
|
1617
|
-
|
|
1617
|
+
Se
|
|
1618
1618
|
);
|
|
1619
|
-
f.c =
|
|
1619
|
+
f.c = i;
|
|
1620
1620
|
}
|
|
1621
|
-
|
|
1621
|
+
a && (n.$$events = a), F && it(
|
|
1622
1622
|
/** @type {TemplateNode} */
|
|
1623
|
-
|
|
1623
|
+
m,
|
|
1624
1624
|
null
|
|
1625
|
-
), d = e(
|
|
1625
|
+
), d = e(m, n) || {}, F && (z.nodes_end = B), i && $t();
|
|
1626
1626
|
}), () => {
|
|
1627
1627
|
for (var f of l) {
|
|
1628
|
-
t.removeEventListener(f,
|
|
1628
|
+
t.removeEventListener(f, Gt);
|
|
1629
1629
|
var c = (
|
|
1630
1630
|
/** @type {number} */
|
|
1631
|
-
|
|
1631
|
+
Ct.get(f)
|
|
1632
1632
|
);
|
|
1633
|
-
--c === 0 ? (document.removeEventListener(f,
|
|
1633
|
+
--c === 0 ? (document.removeEventListener(f, Gt), Ct.delete(f)) : Ct.set(f, c);
|
|
1634
1634
|
}
|
|
1635
|
-
Zr.delete(u),
|
|
1635
|
+
Zr.delete(u), m !== r && m.parentNode?.removeChild(m);
|
|
1636
1636
|
};
|
|
1637
1637
|
});
|
|
1638
1638
|
return en.set(d, v), d;
|
|
1639
1639
|
}
|
|
1640
1640
|
let en = /* @__PURE__ */ new WeakMap();
|
|
1641
|
-
function
|
|
1641
|
+
function Zi(e, t) {
|
|
1642
1642
|
const r = en.get(e);
|
|
1643
1643
|
return r ? (en.delete(e), r(t)) : Promise.resolve();
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1646
|
-
|
|
1647
|
-
const t =
|
|
1645
|
+
function Er(e) {
|
|
1646
|
+
Se === null && li(), _a(() => {
|
|
1647
|
+
const t = Mr(e);
|
|
1648
1648
|
if (typeof t == "function") return (
|
|
1649
1649
|
/** @type {() => void} */
|
|
1650
1650
|
t
|
|
@@ -1652,17 +1652,17 @@ function $r(e) {
|
|
|
1652
1652
|
});
|
|
1653
1653
|
}
|
|
1654
1654
|
function Y(e, t, r = !1) {
|
|
1655
|
-
F &&
|
|
1656
|
-
var n = e,
|
|
1655
|
+
F && Sr();
|
|
1656
|
+
var n = e, a = null, i = null, o = re, l = r ? pn : 0, u = !1;
|
|
1657
1657
|
const d = (c, p = !0) => {
|
|
1658
1658
|
u = !0, f(p, c);
|
|
1659
1659
|
};
|
|
1660
1660
|
var v = null;
|
|
1661
|
-
function
|
|
1661
|
+
function m() {
|
|
1662
1662
|
v !== null && (v.lastChild.remove(), n.before(v), v = null);
|
|
1663
|
-
var c = o ?
|
|
1663
|
+
var c = o ? a : i, p = o ? i : a;
|
|
1664
1664
|
c && En(c), p && wn(p, () => {
|
|
1665
|
-
o ?
|
|
1665
|
+
o ? i = null : a = null;
|
|
1666
1666
|
});
|
|
1667
1667
|
}
|
|
1668
1668
|
const f = (c, p) => {
|
|
@@ -1670,20 +1670,20 @@ function Y(e, t, r = !1) {
|
|
|
1670
1670
|
let b = !1;
|
|
1671
1671
|
if (F) {
|
|
1672
1672
|
const R = Wn(n) === sn;
|
|
1673
|
-
!!o === R && (n = Kr(),
|
|
1673
|
+
!!o === R && (n = Kr(), $e(n), He(!1), b = !0);
|
|
1674
1674
|
}
|
|
1675
|
-
var w =
|
|
1676
|
-
if (w && (v = document.createDocumentFragment(), v.append($ =
|
|
1675
|
+
var w = va(), $ = n;
|
|
1676
|
+
if (w && (v = document.createDocumentFragment(), v.append($ = ze())), o ? a ?? (a = p && Ut(() => p($))) : i ?? (i = p && Ut(() => p($))), w) {
|
|
1677
1677
|
var y = (
|
|
1678
1678
|
/** @type {Batch} */
|
|
1679
1679
|
W
|
|
1680
|
-
), S = o ?
|
|
1681
|
-
S && y.skipped_effects.delete(S), O && y.skipped_effects.add(O), y.add_callback(
|
|
1680
|
+
), S = o ? a : i, O = o ? i : a;
|
|
1681
|
+
S && y.skipped_effects.delete(S), O && y.skipped_effects.add(O), y.add_callback(m);
|
|
1682
1682
|
} else
|
|
1683
|
-
|
|
1683
|
+
m();
|
|
1684
1684
|
b && He(!0);
|
|
1685
1685
|
};
|
|
1686
|
-
|
|
1686
|
+
ma(() => {
|
|
1687
1687
|
u = !1, t(d), u || f(null, null);
|
|
1688
1688
|
}, l), F && (n = B);
|
|
1689
1689
|
}
|
|
@@ -1691,9 +1691,9 @@ function tn(e, t) {
|
|
|
1691
1691
|
return t;
|
|
1692
1692
|
}
|
|
1693
1693
|
function eo(e, t, r) {
|
|
1694
|
-
for (var n = e.items,
|
|
1695
|
-
xn(t[o].e,
|
|
1696
|
-
var l =
|
|
1694
|
+
for (var n = e.items, a = [], i = t.length, o = 0; o < i; o++)
|
|
1695
|
+
xn(t[o].e, a, !0);
|
|
1696
|
+
var l = i > 0 && a.length === 0 && r !== null;
|
|
1697
1697
|
if (l) {
|
|
1698
1698
|
var u = (
|
|
1699
1699
|
/** @type {Element} */
|
|
@@ -1703,29 +1703,29 @@ function eo(e, t, r) {
|
|
|
1703
1703
|
yn(u), u.append(
|
|
1704
1704
|
/** @type {Element} */
|
|
1705
1705
|
r
|
|
1706
|
-
), n.clear(),
|
|
1706
|
+
), n.clear(), qe(e, t[0].prev, t[i - 1].next);
|
|
1707
1707
|
}
|
|
1708
|
-
|
|
1709
|
-
for (var d = 0; d <
|
|
1708
|
+
wa(a, () => {
|
|
1709
|
+
for (var d = 0; d < i; d++) {
|
|
1710
1710
|
var v = t[d];
|
|
1711
|
-
l || (n.delete(v.k),
|
|
1711
|
+
l || (n.delete(v.k), qe(e, v.prev, v.next)), De(v.e, !l);
|
|
1712
1712
|
}
|
|
1713
1713
|
});
|
|
1714
1714
|
}
|
|
1715
|
-
function rn(e, t, r, n,
|
|
1715
|
+
function rn(e, t, r, n, a, i = null) {
|
|
1716
1716
|
var o = e, l = { flags: t, items: /* @__PURE__ */ new Map(), first: null };
|
|
1717
1717
|
{
|
|
1718
1718
|
var u = (
|
|
1719
1719
|
/** @type {Element} */
|
|
1720
1720
|
e
|
|
1721
1721
|
);
|
|
1722
|
-
o = F ?
|
|
1722
|
+
o = F ? $e(
|
|
1723
1723
|
/** @type {Comment | Text} */
|
|
1724
1724
|
/* @__PURE__ */ ot(u)
|
|
1725
|
-
) : u.appendChild(
|
|
1725
|
+
) : u.appendChild(ze());
|
|
1726
1726
|
}
|
|
1727
|
-
F &&
|
|
1728
|
-
var d = null, v = !1,
|
|
1727
|
+
F && Sr();
|
|
1728
|
+
var d = null, v = !1, m = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ ra(() => {
|
|
1729
1729
|
var w = r();
|
|
1730
1730
|
return un(w) ? w : w == null ? [] : dn(w);
|
|
1731
1731
|
}), c, p;
|
|
@@ -1734,17 +1734,17 @@ function rn(e, t, r, n, i, a = null) {
|
|
|
1734
1734
|
p,
|
|
1735
1735
|
c,
|
|
1736
1736
|
l,
|
|
1737
|
-
|
|
1737
|
+
m,
|
|
1738
1738
|
o,
|
|
1739
|
-
|
|
1739
|
+
a,
|
|
1740
1740
|
t,
|
|
1741
1741
|
n,
|
|
1742
1742
|
r
|
|
1743
|
-
),
|
|
1743
|
+
), i !== null && (c.length === 0 ? d ? En(d) : d = Ut(() => i(o)) : d !== null && wn(d, () => {
|
|
1744
1744
|
d = null;
|
|
1745
1745
|
}));
|
|
1746
1746
|
}
|
|
1747
|
-
|
|
1747
|
+
ma(() => {
|
|
1748
1748
|
p ?? (p = /** @type {Effect} */
|
|
1749
1749
|
z), c = /** @type {V[]} */
|
|
1750
1750
|
s(f);
|
|
@@ -1755,7 +1755,7 @@ function rn(e, t, r, n, i, a = null) {
|
|
|
1755
1755
|
let $ = !1;
|
|
1756
1756
|
if (F) {
|
|
1757
1757
|
var y = Wn(o) === sn;
|
|
1758
|
-
y !== (w === 0) && (o = Kr(),
|
|
1758
|
+
y !== (w === 0) && (o = Kr(), $e(o), He(!1), $ = !0);
|
|
1759
1759
|
}
|
|
1760
1760
|
if (F) {
|
|
1761
1761
|
for (var S = null, O, R = 0; R < w; R++) {
|
|
@@ -1765,45 +1765,45 @@ function rn(e, t, r, n, i, a = null) {
|
|
|
1765
1765
|
B, $ = !0, He(!1);
|
|
1766
1766
|
break;
|
|
1767
1767
|
}
|
|
1768
|
-
var k = c[R],
|
|
1768
|
+
var k = c[R], C = n(k, R);
|
|
1769
1769
|
O = nn(
|
|
1770
1770
|
B,
|
|
1771
1771
|
l,
|
|
1772
1772
|
S,
|
|
1773
1773
|
null,
|
|
1774
1774
|
k,
|
|
1775
|
-
|
|
1775
|
+
C,
|
|
1776
1776
|
R,
|
|
1777
|
-
|
|
1777
|
+
a,
|
|
1778
1778
|
t,
|
|
1779
1779
|
r
|
|
1780
|
-
), l.items.set(
|
|
1780
|
+
), l.items.set(C, O), S = O;
|
|
1781
1781
|
}
|
|
1782
|
-
w > 0 &&
|
|
1782
|
+
w > 0 && $e(Kr());
|
|
1783
1783
|
}
|
|
1784
1784
|
if (F)
|
|
1785
|
-
w === 0 &&
|
|
1786
|
-
else if (
|
|
1785
|
+
w === 0 && i && (d = Ut(() => i(o)));
|
|
1786
|
+
else if (va()) {
|
|
1787
1787
|
var X = /* @__PURE__ */ new Set(), L = (
|
|
1788
1788
|
/** @type {Batch} */
|
|
1789
1789
|
W
|
|
1790
1790
|
);
|
|
1791
1791
|
for (R = 0; R < w; R += 1) {
|
|
1792
|
-
k = c[R],
|
|
1793
|
-
var K = l.items.get(
|
|
1794
|
-
K ?
|
|
1792
|
+
k = c[R], C = n(k, R);
|
|
1793
|
+
var K = l.items.get(C) ?? m.get(C);
|
|
1794
|
+
K ? qa(K, k, R) : (O = nn(
|
|
1795
1795
|
null,
|
|
1796
1796
|
l,
|
|
1797
1797
|
null,
|
|
1798
1798
|
null,
|
|
1799
1799
|
k,
|
|
1800
|
-
|
|
1800
|
+
C,
|
|
1801
1801
|
R,
|
|
1802
|
-
|
|
1802
|
+
a,
|
|
1803
1803
|
t,
|
|
1804
1804
|
r,
|
|
1805
1805
|
!0
|
|
1806
|
-
),
|
|
1806
|
+
), m.set(C, O)), X.add(C);
|
|
1807
1807
|
}
|
|
1808
1808
|
for (const [le, ue] of l.items)
|
|
1809
1809
|
X.has(le) || L.skipped_effects.add(ue.e);
|
|
@@ -1813,29 +1813,29 @@ function rn(e, t, r, n, i, a = null) {
|
|
|
1813
1813
|
$ && He(!0), s(f);
|
|
1814
1814
|
}), F && (o = B);
|
|
1815
1815
|
}
|
|
1816
|
-
function to(e, t, r, n,
|
|
1817
|
-
var d = t.length, v = r.items,
|
|
1816
|
+
function to(e, t, r, n, a, i, o, l, u) {
|
|
1817
|
+
var d = t.length, v = r.items, m = r.first, f = m, c, p = null, b = [], w = [], $, y, S, O;
|
|
1818
1818
|
for (O = 0; O < d; O += 1) {
|
|
1819
1819
|
if ($ = t[O], y = l($, O), S = v.get(y), S === void 0) {
|
|
1820
1820
|
var R = n.get(y);
|
|
1821
1821
|
if (R !== void 0) {
|
|
1822
1822
|
n.delete(y), v.set(y, R);
|
|
1823
1823
|
var k = p ? p.next : f;
|
|
1824
|
-
|
|
1824
|
+
qe(r, p, R), qe(r, R, k), Hr(R, k, a), p = R;
|
|
1825
1825
|
} else {
|
|
1826
|
-
var
|
|
1826
|
+
var C = f ? (
|
|
1827
1827
|
/** @type {TemplateNode} */
|
|
1828
1828
|
f.e.nodes_start
|
|
1829
|
-
) :
|
|
1829
|
+
) : a;
|
|
1830
1830
|
p = nn(
|
|
1831
|
-
|
|
1831
|
+
C,
|
|
1832
1832
|
r,
|
|
1833
1833
|
p,
|
|
1834
1834
|
p === null ? r.first : p.next,
|
|
1835
1835
|
$,
|
|
1836
1836
|
y,
|
|
1837
1837
|
O,
|
|
1838
|
-
|
|
1838
|
+
i,
|
|
1839
1839
|
o,
|
|
1840
1840
|
u
|
|
1841
1841
|
);
|
|
@@ -1843,23 +1843,23 @@ function to(e, t, r, n, i, a, o, l, u) {
|
|
|
1843
1843
|
v.set(y, p), b = [], w = [], f = p.next;
|
|
1844
1844
|
continue;
|
|
1845
1845
|
}
|
|
1846
|
-
if (
|
|
1846
|
+
if (qa(S, $, O), (S.e.f & Ie) !== 0 && En(S.e), S !== f) {
|
|
1847
1847
|
if (c !== void 0 && c.has(S)) {
|
|
1848
1848
|
if (b.length < w.length) {
|
|
1849
1849
|
var X = w[0], L;
|
|
1850
1850
|
p = X.prev;
|
|
1851
1851
|
var K = b[0], le = b[b.length - 1];
|
|
1852
1852
|
for (L = 0; L < b.length; L += 1)
|
|
1853
|
-
Hr(b[L], X,
|
|
1853
|
+
Hr(b[L], X, a);
|
|
1854
1854
|
for (L = 0; L < w.length; L += 1)
|
|
1855
1855
|
c.delete(w[L]);
|
|
1856
|
-
|
|
1856
|
+
qe(r, K.prev, le.next), qe(r, p, K), qe(r, le, X), f = X, p = le, O -= 1, b = [], w = [];
|
|
1857
1857
|
} else
|
|
1858
|
-
c.delete(S), Hr(S, f,
|
|
1858
|
+
c.delete(S), Hr(S, f, a), qe(r, S.prev, S.next), qe(r, S, p === null ? r.first : p.next), qe(r, p, S), p = S;
|
|
1859
1859
|
continue;
|
|
1860
1860
|
}
|
|
1861
1861
|
for (b = [], w = []; f !== null && f.k !== y; )
|
|
1862
|
-
(f.e.f &
|
|
1862
|
+
(f.e.f & Ie) === 0 && (c ?? (c = /* @__PURE__ */ new Set())).add(f), w.push(f), f = f.next;
|
|
1863
1863
|
if (f === null)
|
|
1864
1864
|
continue;
|
|
1865
1865
|
S = f;
|
|
@@ -1868,26 +1868,26 @@ function to(e, t, r, n, i, a, o, l, u) {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
if (f !== null || c !== void 0) {
|
|
1870
1870
|
for (var ue = c === void 0 ? [] : dn(c); f !== null; )
|
|
1871
|
-
(f.e.f &
|
|
1872
|
-
var
|
|
1873
|
-
if (
|
|
1874
|
-
var j = d === 0 ?
|
|
1871
|
+
(f.e.f & Ie) === 0 && ue.push(f), f = f.next;
|
|
1872
|
+
var Fe = ue.length;
|
|
1873
|
+
if (Fe > 0) {
|
|
1874
|
+
var j = d === 0 ? a : null;
|
|
1875
1875
|
eo(r, ue, j);
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
1878
|
e.first = r.first && r.first.e, e.last = p && p.e;
|
|
1879
|
-
for (var
|
|
1880
|
-
|
|
1879
|
+
for (var Q of n.values())
|
|
1880
|
+
De(Q.e);
|
|
1881
1881
|
n.clear();
|
|
1882
1882
|
}
|
|
1883
|
-
function
|
|
1884
|
-
|
|
1883
|
+
function qa(e, t, r, n) {
|
|
1884
|
+
wr(e.v, t), e.i = r;
|
|
1885
1885
|
}
|
|
1886
|
-
function nn(e, t, r, n,
|
|
1887
|
-
var
|
|
1886
|
+
function nn(e, t, r, n, a, i, o, l, u, d, v) {
|
|
1887
|
+
var m = (u & Ua) !== 0, f = (u & Ha) === 0, c = m ? f ? /* @__PURE__ */ la(a, !1, !1) : tr(a) : a, p = (u & Va) === 0 ? o : tr(o), b = {
|
|
1888
1888
|
i: p,
|
|
1889
1889
|
v: c,
|
|
1890
|
-
k:
|
|
1890
|
+
k: i,
|
|
1891
1891
|
a: null,
|
|
1892
1892
|
// @ts-expect-error
|
|
1893
1893
|
e: null,
|
|
@@ -1897,9 +1897,9 @@ function nn(e, t, r, n, i, a, o, l, u, d, v) {
|
|
|
1897
1897
|
try {
|
|
1898
1898
|
if (e === null) {
|
|
1899
1899
|
var w = document.createDocumentFragment();
|
|
1900
|
-
w.append(e =
|
|
1900
|
+
w.append(e = ze());
|
|
1901
1901
|
}
|
|
1902
|
-
return b.e =
|
|
1902
|
+
return b.e = Ut(() => l(
|
|
1903
1903
|
/** @type {Node} */
|
|
1904
1904
|
e,
|
|
1905
1905
|
c,
|
|
@@ -1913,25 +1913,25 @@ function Hr(e, t, r) {
|
|
|
1913
1913
|
for (var n = e.next ? (
|
|
1914
1914
|
/** @type {TemplateNode} */
|
|
1915
1915
|
e.next.e.nodes_start
|
|
1916
|
-
) : r,
|
|
1916
|
+
) : r, a = t ? (
|
|
1917
1917
|
/** @type {TemplateNode} */
|
|
1918
1918
|
t.e.nodes_start
|
|
1919
|
-
) : r,
|
|
1919
|
+
) : r, i = (
|
|
1920
1920
|
/** @type {TemplateNode} */
|
|
1921
1921
|
e.e.nodes_start
|
|
1922
|
-
);
|
|
1922
|
+
); i !== null && i !== n; ) {
|
|
1923
1923
|
var o = (
|
|
1924
1924
|
/** @type {TemplateNode} */
|
|
1925
|
-
/* @__PURE__ */ We(
|
|
1925
|
+
/* @__PURE__ */ We(i)
|
|
1926
1926
|
);
|
|
1927
|
-
|
|
1927
|
+
a.before(i), i = o;
|
|
1928
1928
|
}
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1930
|
+
function qe(e, t, r) {
|
|
1931
1931
|
t === null ? e.first = r : (t.next = r, t.e.next = r && r.e), r !== null && (r.prev = t, r.e.prev = t && t.e);
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1934
|
-
|
|
1933
|
+
function qr(e, t) {
|
|
1934
|
+
Li(() => {
|
|
1935
1935
|
var r = e.getRootNode(), n = (
|
|
1936
1936
|
/** @type {ShadowRoot} */
|
|
1937
1937
|
r.host ? (
|
|
@@ -1944,8 +1944,8 @@ function Or(e, t) {
|
|
|
1944
1944
|
)
|
|
1945
1945
|
);
|
|
1946
1946
|
if (!n.querySelector("#" + t.hash)) {
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1947
|
+
const a = document.createElement("style");
|
|
1948
|
+
a.id = t.hash, a.textContent = t.code, n.appendChild(a);
|
|
1949
1949
|
}
|
|
1950
1950
|
});
|
|
1951
1951
|
}
|
|
@@ -1954,12 +1954,12 @@ const Rn = [...`
|
|
|
1954
1954
|
function ro(e, t, r) {
|
|
1955
1955
|
var n = e == null ? "" : "" + e;
|
|
1956
1956
|
if (t && (n = n ? n + " " + t : t), r) {
|
|
1957
|
-
for (var
|
|
1958
|
-
if (r[
|
|
1959
|
-
n = n ? n + " " +
|
|
1957
|
+
for (var a in r)
|
|
1958
|
+
if (r[a])
|
|
1959
|
+
n = n ? n + " " + a : a;
|
|
1960
1960
|
else if (n.length)
|
|
1961
|
-
for (var
|
|
1962
|
-
var l = o +
|
|
1961
|
+
for (var i = a.length, o = 0; (o = n.indexOf(a, o)) >= 0; ) {
|
|
1962
|
+
var l = o + i;
|
|
1963
1963
|
(o === 0 || Rn.includes(n[o - 1])) && (l === n.length || Rn.includes(n[l])) ? n = (o === 0 ? "" : n.substring(0, o)) + n.substring(l + 1) : o = l;
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
@@ -1968,27 +1968,27 @@ function ro(e, t, r) {
|
|
|
1968
1968
|
function no(e, t) {
|
|
1969
1969
|
return e == null ? null : String(e);
|
|
1970
1970
|
}
|
|
1971
|
-
function
|
|
1971
|
+
function Xt(e, t, r, n, a, i) {
|
|
1972
1972
|
var o = e.__className;
|
|
1973
1973
|
if (F || o !== r || o === void 0) {
|
|
1974
|
-
var l = ro(r, n,
|
|
1974
|
+
var l = ro(r, n, i);
|
|
1975
1975
|
(!F || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = r;
|
|
1976
|
-
} else if (
|
|
1977
|
-
for (var u in
|
|
1978
|
-
var d = !!
|
|
1979
|
-
(
|
|
1976
|
+
} else if (i && a !== i)
|
|
1977
|
+
for (var u in i) {
|
|
1978
|
+
var d = !!i[u];
|
|
1979
|
+
(a == null || d !== !!a[u]) && e.classList.toggle(u, d);
|
|
1980
1980
|
}
|
|
1981
|
-
return
|
|
1981
|
+
return i;
|
|
1982
1982
|
}
|
|
1983
1983
|
function Ln(e, t, r, n) {
|
|
1984
|
-
var
|
|
1985
|
-
if (F ||
|
|
1986
|
-
var
|
|
1987
|
-
(!F ||
|
|
1984
|
+
var a = e.__style;
|
|
1985
|
+
if (F || a !== t) {
|
|
1986
|
+
var i = no(t);
|
|
1987
|
+
(!F || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
|
|
1988
1988
|
}
|
|
1989
1989
|
return n;
|
|
1990
1990
|
}
|
|
1991
|
-
const
|
|
1991
|
+
const ao = Symbol("is custom element"), io = Symbol("is html");
|
|
1992
1992
|
function an(e) {
|
|
1993
1993
|
if (F) {
|
|
1994
1994
|
var t = !1, r = () => {
|
|
@@ -1998,25 +1998,25 @@ function an(e) {
|
|
|
1998
1998
|
Zt(e, "value", null), e.value = n;
|
|
1999
1999
|
}
|
|
2000
2000
|
if (e.hasAttribute("checked")) {
|
|
2001
|
-
var
|
|
2002
|
-
Zt(e, "checked", null), e.checked =
|
|
2001
|
+
var a = e.checked;
|
|
2002
|
+
Zt(e, "checked", null), e.checked = a;
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
2005
|
};
|
|
2006
|
-
e.__on_r = r, $
|
|
2006
|
+
e.__on_r = r, $i(r), pa();
|
|
2007
2007
|
}
|
|
2008
2008
|
}
|
|
2009
2009
|
function Zt(e, t, r, n) {
|
|
2010
|
-
var
|
|
2011
|
-
F && (
|
|
2010
|
+
var a = oo(e);
|
|
2011
|
+
F && (a[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || a[t] !== (a[t] = r) && (t === "loading" && (e[oi] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && so(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2012
2012
|
}
|
|
2013
2013
|
function oo(e) {
|
|
2014
2014
|
return (
|
|
2015
2015
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2016
2016
|
// @ts-expect-error
|
|
2017
2017
|
e.__attributes ?? (e.__attributes = {
|
|
2018
|
-
[
|
|
2019
|
-
[
|
|
2018
|
+
[ao]: e.nodeName.includes("-"),
|
|
2019
|
+
[io]: e.namespaceURI === Qa
|
|
2020
2020
|
})
|
|
2021
2021
|
);
|
|
2022
2022
|
}
|
|
@@ -2025,47 +2025,47 @@ function so(e) {
|
|
|
2025
2025
|
var t = e.getAttribute("is") || e.nodeName, r = Fn.get(t);
|
|
2026
2026
|
if (r) return r;
|
|
2027
2027
|
Fn.set(t, r = []);
|
|
2028
|
-
for (var n,
|
|
2029
|
-
n =
|
|
2028
|
+
for (var n, a = e, i = Element.prototype; i !== a; ) {
|
|
2029
|
+
n = ei(a);
|
|
2030
2030
|
for (var o in n)
|
|
2031
2031
|
n[o].set && r.push(o);
|
|
2032
|
-
|
|
2032
|
+
a = Vn(a);
|
|
2033
2033
|
}
|
|
2034
2034
|
return r;
|
|
2035
2035
|
}
|
|
2036
2036
|
function on(e, t, r = t) {
|
|
2037
2037
|
var n = /* @__PURE__ */ new WeakSet();
|
|
2038
|
-
|
|
2039
|
-
var
|
|
2040
|
-
if (
|
|
2038
|
+
ha(e, "input", async (a) => {
|
|
2039
|
+
var i = a ? e.defaultValue : e.value;
|
|
2040
|
+
if (i = Jr(e) ? Yr(i) : i, r(i), W !== null && n.add(W), await Hi(), i !== (i = t())) {
|
|
2041
2041
|
var o = e.selectionStart, l = e.selectionEnd;
|
|
2042
|
-
e.value =
|
|
2042
|
+
e.value = i ?? "", l !== null && (e.selectionStart = o, e.selectionEnd = Math.min(l, e.value.length));
|
|
2043
2043
|
}
|
|
2044
2044
|
}), // If we are hydrating and the value has since changed,
|
|
2045
2045
|
// then use the updated value from the input instead.
|
|
2046
2046
|
(F && e.defaultValue !== e.value || // If defaultValue is set, then value == defaultValue
|
|
2047
2047
|
// TODO Svelte 6: remove input.value check and set to empty string?
|
|
2048
|
-
|
|
2049
|
-
var
|
|
2048
|
+
Mr(t) == null && e.value) && (r(Jr(e) ? Yr(e.value) : e.value), W !== null && n.add(W)), kn(() => {
|
|
2049
|
+
var a = t();
|
|
2050
2050
|
if (e === document.activeElement) {
|
|
2051
|
-
var
|
|
2051
|
+
var i = (
|
|
2052
2052
|
/** @type {Batch} */
|
|
2053
|
-
|
|
2053
|
+
_r ?? W
|
|
2054
2054
|
);
|
|
2055
|
-
if (n.has(
|
|
2055
|
+
if (n.has(i))
|
|
2056
2056
|
return;
|
|
2057
2057
|
}
|
|
2058
|
-
Jr(e) &&
|
|
2058
|
+
Jr(e) && a === Yr(e.value) || e.type === "date" && !a && !e.value || a !== e.value && (e.value = a ?? "");
|
|
2059
2059
|
});
|
|
2060
2060
|
}
|
|
2061
2061
|
function lo(e, t, r = t) {
|
|
2062
|
-
|
|
2063
|
-
var
|
|
2064
|
-
r(
|
|
2062
|
+
ha(e, "change", (n) => {
|
|
2063
|
+
var a = n ? e.defaultChecked : e.checked;
|
|
2064
|
+
r(a);
|
|
2065
2065
|
}), // If we are hydrating and the value has since changed,
|
|
2066
2066
|
// then use the update value from the input instead.
|
|
2067
2067
|
(F && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
|
|
2068
|
-
|
|
2068
|
+
Mr(t) == null) && r(e.checked), kn(() => {
|
|
2069
2069
|
var n = t();
|
|
2070
2070
|
e.checked = !!n;
|
|
2071
2071
|
});
|
|
@@ -2077,36 +2077,36 @@ function Jr(e) {
|
|
|
2077
2077
|
function Yr(e) {
|
|
2078
2078
|
return e === "" ? null : +e;
|
|
2079
2079
|
}
|
|
2080
|
-
let
|
|
2080
|
+
let vr = !1;
|
|
2081
2081
|
function uo(e) {
|
|
2082
|
-
var t =
|
|
2082
|
+
var t = vr;
|
|
2083
2083
|
try {
|
|
2084
|
-
return
|
|
2084
|
+
return vr = !1, [e(), vr];
|
|
2085
2085
|
} finally {
|
|
2086
|
-
|
|
2086
|
+
vr = t;
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
2089
|
function ve(e, t, r, n) {
|
|
2090
|
-
var
|
|
2090
|
+
var a = (r & Wa) !== 0, i = (r & Ka) !== 0, o = (
|
|
2091
2091
|
/** @type {V} */
|
|
2092
2092
|
n
|
|
2093
|
-
), l = !0, u = () => (l && (l = !1, o =
|
|
2093
|
+
), l = !0, u = () => (l && (l = !1, o = i ? Mr(
|
|
2094
2094
|
/** @type {() => V} */
|
|
2095
2095
|
n
|
|
2096
2096
|
) : (
|
|
2097
2097
|
/** @type {V} */
|
|
2098
2098
|
n
|
|
2099
2099
|
)), o), d;
|
|
2100
|
-
if (
|
|
2101
|
-
var v =
|
|
2102
|
-
d =
|
|
2100
|
+
if (a) {
|
|
2101
|
+
var v = hr in e || Yn in e;
|
|
2102
|
+
d = mt(e, t)?.set ?? (v && t in e ? (y) => e[t] = y : void 0);
|
|
2103
2103
|
}
|
|
2104
|
-
var
|
|
2105
|
-
|
|
2104
|
+
var m, f = !1;
|
|
2105
|
+
a ? [m, f] = uo(() => (
|
|
2106
2106
|
/** @type {V} */
|
|
2107
2107
|
e[t]
|
|
2108
|
-
)) :
|
|
2109
|
-
e[t],
|
|
2108
|
+
)) : m = /** @type {V} */
|
|
2109
|
+
e[t], m === void 0 && n !== void 0 && (m = u(), d && (hi(), d(m)));
|
|
2110
2110
|
var c;
|
|
2111
2111
|
if (c = () => {
|
|
2112
2112
|
var y = (
|
|
@@ -2114,7 +2114,7 @@ function ve(e, t, r, n) {
|
|
|
2114
2114
|
e[t]
|
|
2115
2115
|
);
|
|
2116
2116
|
return y === void 0 ? u() : (l = !0, y);
|
|
2117
|
-
}, (r &
|
|
2117
|
+
}, (r & Ya) === 0)
|
|
2118
2118
|
return c;
|
|
2119
2119
|
if (d) {
|
|
2120
2120
|
var p = e.$$legacy;
|
|
@@ -2125,8 +2125,8 @@ function ve(e, t, r, n) {
|
|
|
2125
2125
|
})
|
|
2126
2126
|
);
|
|
2127
2127
|
}
|
|
2128
|
-
var b = !1, w = ((r &
|
|
2129
|
-
|
|
2128
|
+
var b = !1, w = ((r & Ja) !== 0 ? Ar : ra)(() => (b = !1, c()));
|
|
2129
|
+
a && s(w);
|
|
2130
2130
|
var $ = (
|
|
2131
2131
|
/** @type {Effect} */
|
|
2132
2132
|
z
|
|
@@ -2135,17 +2135,17 @@ function ve(e, t, r, n) {
|
|
|
2135
2135
|
/** @type {() => V} */
|
|
2136
2136
|
(function(y, S) {
|
|
2137
2137
|
if (arguments.length > 0) {
|
|
2138
|
-
const O = S ? s(w) :
|
|
2138
|
+
const O = S ? s(w) : a ? rt(y) : y;
|
|
2139
2139
|
return h(w, O), b = !0, o !== void 0 && (o = O), y;
|
|
2140
2140
|
}
|
|
2141
|
-
return
|
|
2141
|
+
return Tt && b || ($.f & xt) !== 0 ? w.v : s(w);
|
|
2142
2142
|
})
|
|
2143
2143
|
);
|
|
2144
2144
|
}
|
|
2145
2145
|
function co(e) {
|
|
2146
2146
|
return new fo(e);
|
|
2147
2147
|
}
|
|
2148
|
-
var Ve,
|
|
2148
|
+
var Ve, we;
|
|
2149
2149
|
class fo {
|
|
2150
2150
|
/**
|
|
2151
2151
|
* @param {ComponentConstructorOptions & {
|
|
@@ -2154,56 +2154,56 @@ class fo {
|
|
|
2154
2154
|
*/
|
|
2155
2155
|
constructor(t) {
|
|
2156
2156
|
/** @type {any} */
|
|
2157
|
-
|
|
2157
|
+
ae(this, Ve);
|
|
2158
2158
|
/** @type {Record<string, any>} */
|
|
2159
|
-
|
|
2160
|
-
var r = /* @__PURE__ */ new Map(), n = (
|
|
2161
|
-
var l = /* @__PURE__ */
|
|
2162
|
-
return r.set(
|
|
2159
|
+
ae(this, we);
|
|
2160
|
+
var r = /* @__PURE__ */ new Map(), n = (i, o) => {
|
|
2161
|
+
var l = /* @__PURE__ */ la(o, !1, !1);
|
|
2162
|
+
return r.set(i, l), l;
|
|
2163
2163
|
};
|
|
2164
|
-
const
|
|
2164
|
+
const a = new Proxy(
|
|
2165
2165
|
{ ...t.props || {}, $$events: {} },
|
|
2166
2166
|
{
|
|
2167
|
-
get(
|
|
2168
|
-
return s(r.get(o) ?? n(o, Reflect.get(
|
|
2167
|
+
get(i, o) {
|
|
2168
|
+
return s(r.get(o) ?? n(o, Reflect.get(i, o)));
|
|
2169
2169
|
},
|
|
2170
|
-
has(
|
|
2171
|
-
return o === Yn ? !0 : (s(r.get(o) ?? n(o, Reflect.get(
|
|
2170
|
+
has(i, o) {
|
|
2171
|
+
return o === Yn ? !0 : (s(r.get(o) ?? n(o, Reflect.get(i, o))), Reflect.has(i, o));
|
|
2172
2172
|
},
|
|
2173
|
-
set(
|
|
2174
|
-
return h(r.get(o) ?? n(o, l), l), Reflect.set(
|
|
2173
|
+
set(i, o, l) {
|
|
2174
|
+
return h(r.get(o) ?? n(o, l), l), Reflect.set(i, o, l);
|
|
2175
2175
|
}
|
|
2176
2176
|
}
|
|
2177
2177
|
);
|
|
2178
|
-
ce(this,
|
|
2178
|
+
ce(this, we, (t.hydrate ? Qi : Ca)(t.component, {
|
|
2179
2179
|
target: t.target,
|
|
2180
2180
|
anchor: t.anchor,
|
|
2181
|
-
props:
|
|
2181
|
+
props: a,
|
|
2182
2182
|
context: t.context,
|
|
2183
2183
|
intro: t.intro ?? !1,
|
|
2184
2184
|
recover: t.recover
|
|
2185
|
-
})), (!t?.props?.$$host || t.sync === !1) &&
|
|
2186
|
-
for (const
|
|
2187
|
-
|
|
2185
|
+
})), (!t?.props?.$$host || t.sync === !1) && ie(), ce(this, Ve, a.$$events);
|
|
2186
|
+
for (const i of Object.keys(I(this, we)))
|
|
2187
|
+
i === "$set" || i === "$destroy" || i === "$on" || Lt(this, i, {
|
|
2188
2188
|
get() {
|
|
2189
|
-
return
|
|
2189
|
+
return I(this, we)[i];
|
|
2190
2190
|
},
|
|
2191
2191
|
/** @param {any} value */
|
|
2192
2192
|
set(o) {
|
|
2193
|
-
|
|
2193
|
+
I(this, we)[i] = o;
|
|
2194
2194
|
},
|
|
2195
2195
|
enumerable: !0
|
|
2196
2196
|
});
|
|
2197
|
-
|
|
2198
|
-
(
|
|
2199
|
-
Object.assign(
|
|
2200
|
-
},
|
|
2201
|
-
|
|
2197
|
+
I(this, we).$set = /** @param {Record<string, any>} next */
|
|
2198
|
+
(i) => {
|
|
2199
|
+
Object.assign(a, i);
|
|
2200
|
+
}, I(this, we).$destroy = () => {
|
|
2201
|
+
Zi(I(this, we));
|
|
2202
2202
|
};
|
|
2203
2203
|
}
|
|
2204
2204
|
/** @param {Record<string, any>} props */
|
|
2205
2205
|
$set(t) {
|
|
2206
|
-
|
|
2206
|
+
I(this, we).$set(t);
|
|
2207
2207
|
}
|
|
2208
2208
|
/**
|
|
2209
2209
|
* @param {string} event
|
|
@@ -2211,22 +2211,22 @@ class fo {
|
|
|
2211
2211
|
* @returns {any}
|
|
2212
2212
|
*/
|
|
2213
2213
|
$on(t, r) {
|
|
2214
|
-
|
|
2215
|
-
const n = (...
|
|
2216
|
-
return
|
|
2217
|
-
|
|
2214
|
+
I(this, Ve)[t] = I(this, Ve)[t] || [];
|
|
2215
|
+
const n = (...a) => r.call(this, ...a);
|
|
2216
|
+
return I(this, Ve)[t].push(n), () => {
|
|
2217
|
+
I(this, Ve)[t] = I(this, Ve)[t].filter(
|
|
2218
2218
|
/** @param {any} fn */
|
|
2219
|
-
(
|
|
2219
|
+
(a) => a !== n
|
|
2220
2220
|
);
|
|
2221
2221
|
};
|
|
2222
2222
|
}
|
|
2223
2223
|
$destroy() {
|
|
2224
|
-
|
|
2224
|
+
I(this, we).$destroy();
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
|
-
Ve = new WeakMap(),
|
|
2228
|
-
let
|
|
2229
|
-
typeof HTMLElement == "function" && (
|
|
2227
|
+
Ve = new WeakMap(), we = new WeakMap();
|
|
2228
|
+
let Oa;
|
|
2229
|
+
typeof HTMLElement == "function" && (Oa = class extends HTMLElement {
|
|
2230
2230
|
/**
|
|
2231
2231
|
* @param {*} $$componentCtor
|
|
2232
2232
|
* @param {*} $$slots
|
|
@@ -2263,8 +2263,8 @@ typeof HTMLElement == "function" && (Oi = class extends HTMLElement {
|
|
|
2263
2263
|
*/
|
|
2264
2264
|
addEventListener(t, r, n) {
|
|
2265
2265
|
if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(r), this.$$c) {
|
|
2266
|
-
const
|
|
2267
|
-
this.$$l_u.set(r,
|
|
2266
|
+
const a = this.$$c.$on(t, r);
|
|
2267
|
+
this.$$l_u.set(r, a);
|
|
2268
2268
|
}
|
|
2269
2269
|
super.addEventListener(t, r, n);
|
|
2270
2270
|
}
|
|
@@ -2275,29 +2275,29 @@ typeof HTMLElement == "function" && (Oi = class extends HTMLElement {
|
|
|
2275
2275
|
*/
|
|
2276
2276
|
removeEventListener(t, r, n) {
|
|
2277
2277
|
if (super.removeEventListener(t, r, n), this.$$c) {
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2278
|
+
const a = this.$$l_u.get(r);
|
|
2279
|
+
a && (a(), this.$$l_u.delete(r));
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
2282
|
async connectedCallback() {
|
|
2283
2283
|
if (this.$$cn = !0, !this.$$c) {
|
|
2284
|
-
let t = function(
|
|
2285
|
-
return (
|
|
2284
|
+
let t = function(a) {
|
|
2285
|
+
return (i) => {
|
|
2286
2286
|
const o = document.createElement("slot");
|
|
2287
|
-
|
|
2287
|
+
a !== "default" && (o.name = a), q(i, o);
|
|
2288
2288
|
};
|
|
2289
2289
|
};
|
|
2290
2290
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2291
2291
|
return;
|
|
2292
2292
|
const r = {}, n = vo(this);
|
|
2293
|
-
for (const
|
|
2294
|
-
|
|
2295
|
-
for (const
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2293
|
+
for (const a of this.$$s)
|
|
2294
|
+
a in n && (a === "default" && !this.$$d.children ? (this.$$d.children = t(a), r.default = !0) : r[a] = t(a));
|
|
2295
|
+
for (const a of this.attributes) {
|
|
2296
|
+
const i = this.$$g_p(a.name);
|
|
2297
|
+
i in this.$$d || (this.$$d[i] = mr(i, a.value, this.$$p_d, "toProp"));
|
|
2298
2298
|
}
|
|
2299
|
-
for (const
|
|
2300
|
-
!(
|
|
2299
|
+
for (const a in this.$$p_d)
|
|
2300
|
+
!(a in this.$$d) && this[a] !== void 0 && (this.$$d[a] = this[a], delete this[a]);
|
|
2301
2301
|
this.$$c = co({
|
|
2302
2302
|
component: this.$$ctor,
|
|
2303
2303
|
target: this.shadowRoot || this,
|
|
@@ -2306,27 +2306,27 @@ typeof HTMLElement == "function" && (Oi = class extends HTMLElement {
|
|
|
2306
2306
|
$$slots: r,
|
|
2307
2307
|
$$host: this
|
|
2308
2308
|
}
|
|
2309
|
-
}), this.$$me =
|
|
2309
|
+
}), this.$$me = Di(() => {
|
|
2310
2310
|
kn(() => {
|
|
2311
2311
|
this.$$r = !0;
|
|
2312
|
-
for (const
|
|
2313
|
-
if (!this.$$p_d[
|
|
2314
|
-
this.$$d[
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2317
|
-
this.$$d[
|
|
2312
|
+
for (const a of br(this.$$c)) {
|
|
2313
|
+
if (!this.$$p_d[a]?.reflect) continue;
|
|
2314
|
+
this.$$d[a] = this.$$c[a];
|
|
2315
|
+
const i = mr(
|
|
2316
|
+
a,
|
|
2317
|
+
this.$$d[a],
|
|
2318
2318
|
this.$$p_d,
|
|
2319
2319
|
"toAttribute"
|
|
2320
2320
|
);
|
|
2321
|
-
|
|
2321
|
+
i == null ? this.removeAttribute(this.$$p_d[a].attribute || a) : this.setAttribute(this.$$p_d[a].attribute || a, i);
|
|
2322
2322
|
}
|
|
2323
2323
|
this.$$r = !1;
|
|
2324
2324
|
});
|
|
2325
2325
|
});
|
|
2326
|
-
for (const
|
|
2327
|
-
for (const
|
|
2328
|
-
const o = this.$$c.$on(
|
|
2329
|
-
this.$$l_u.set(
|
|
2326
|
+
for (const a in this.$$l)
|
|
2327
|
+
for (const i of this.$$l[a]) {
|
|
2328
|
+
const o = this.$$c.$on(a, i);
|
|
2329
|
+
this.$$l_u.set(i, o);
|
|
2330
2330
|
}
|
|
2331
2331
|
this.$$l = {};
|
|
2332
2332
|
}
|
|
@@ -2339,7 +2339,7 @@ typeof HTMLElement == "function" && (Oi = class extends HTMLElement {
|
|
|
2339
2339
|
* @param {string} newValue
|
|
2340
2340
|
*/
|
|
2341
2341
|
attributeChangedCallback(t, r, n) {
|
|
2342
|
-
this.$$r || (t = this.$$g_p(t), this.$$d[t] =
|
|
2342
|
+
this.$$r || (t = this.$$g_p(t), this.$$d[t] = mr(t, n, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
|
|
2343
2343
|
}
|
|
2344
2344
|
disconnectedCallback() {
|
|
2345
2345
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2350,17 +2350,17 @@ typeof HTMLElement == "function" && (Oi = class extends HTMLElement {
|
|
|
2350
2350
|
* @param {string} attribute_name
|
|
2351
2351
|
*/
|
|
2352
2352
|
$$g_p(t) {
|
|
2353
|
-
return
|
|
2353
|
+
return br(this.$$p_d).find(
|
|
2354
2354
|
(r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
|
|
2355
2355
|
) || t;
|
|
2356
2356
|
}
|
|
2357
2357
|
});
|
|
2358
|
-
function
|
|
2359
|
-
const
|
|
2360
|
-
if (t =
|
|
2358
|
+
function mr(e, t, r, n) {
|
|
2359
|
+
const a = r[e]?.type;
|
|
2360
|
+
if (t = a === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e])
|
|
2361
2361
|
return t;
|
|
2362
2362
|
if (n === "toAttribute")
|
|
2363
|
-
switch (
|
|
2363
|
+
switch (a) {
|
|
2364
2364
|
case "Object":
|
|
2365
2365
|
case "Array":
|
|
2366
2366
|
return t == null ? null : JSON.stringify(t);
|
|
@@ -2372,7 +2372,7 @@ function br(e, t, r, n) {
|
|
|
2372
2372
|
return t;
|
|
2373
2373
|
}
|
|
2374
2374
|
else
|
|
2375
|
-
switch (
|
|
2375
|
+
switch (a) {
|
|
2376
2376
|
case "Object":
|
|
2377
2377
|
case "Array":
|
|
2378
2378
|
return t && JSON.parse(t);
|
|
@@ -2394,33 +2394,33 @@ function vo(e) {
|
|
|
2394
2394
|
] = !0;
|
|
2395
2395
|
}), t;
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2398
|
-
let o = class extends
|
|
2397
|
+
function Jt(e, t, r, n, a, i) {
|
|
2398
|
+
let o = class extends Oa {
|
|
2399
2399
|
constructor() {
|
|
2400
|
-
super(e, r,
|
|
2400
|
+
super(e, r, a), this.$$p_d = t;
|
|
2401
2401
|
}
|
|
2402
2402
|
static get observedAttributes() {
|
|
2403
|
-
return
|
|
2403
|
+
return br(t).map(
|
|
2404
2404
|
(l) => (t[l].attribute || l).toLowerCase()
|
|
2405
2405
|
);
|
|
2406
2406
|
}
|
|
2407
2407
|
};
|
|
2408
|
-
return
|
|
2409
|
-
|
|
2408
|
+
return br(t).forEach((l) => {
|
|
2409
|
+
Lt(o.prototype, l, {
|
|
2410
2410
|
get() {
|
|
2411
2411
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2412
2412
|
},
|
|
2413
2413
|
set(u) {
|
|
2414
|
-
u =
|
|
2414
|
+
u = mr(l, u, t), this.$$d[l] = u;
|
|
2415
2415
|
var d = this.$$c;
|
|
2416
2416
|
if (d) {
|
|
2417
|
-
var v =
|
|
2417
|
+
var v = mt(d, l)?.get;
|
|
2418
2418
|
v ? d[l] = u : d.$set({ [l]: u });
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
2421
2421
|
});
|
|
2422
2422
|
}), n.forEach((l) => {
|
|
2423
|
-
|
|
2423
|
+
Lt(o.prototype, l, {
|
|
2424
2424
|
get() {
|
|
2425
2425
|
return this.$$c?.[l];
|
|
2426
2426
|
}
|
|
@@ -2481,21 +2481,21 @@ const ur = (e) => {
|
|
|
2481
2481
|
throw new Error(`Error fetching user level: ${r.statusText}`);
|
|
2482
2482
|
let n = await r.json();
|
|
2483
2483
|
console.log("User level data:", n);
|
|
2484
|
-
let
|
|
2485
|
-
return console.log("Highest user level:",
|
|
2484
|
+
let a = n.result.reduce((i, o) => Math.max(i, o.level), 0);
|
|
2485
|
+
return console.log("Highest user level:", a), a;
|
|
2486
2486
|
}, V = {
|
|
2487
2487
|
getUrl: po,
|
|
2488
2488
|
getToken: ho,
|
|
2489
2489
|
getEnvironmentId: _o
|
|
2490
2490
|
};
|
|
2491
2491
|
class dt {
|
|
2492
|
-
constructor(t, r, n,
|
|
2492
|
+
constructor(t, r, n, a, i) {
|
|
2493
2493
|
G(this, "_id");
|
|
2494
2494
|
G(this, "name");
|
|
2495
2495
|
G(this, "status");
|
|
2496
2496
|
G(this, "ai_output");
|
|
2497
2497
|
G(this, "contiene_allegato");
|
|
2498
|
-
this._id = t, this.name = r, this.status = n, this.ai_output =
|
|
2498
|
+
this._id = t, this.name = r, this.status = n, this.ai_output = a, this.contiene_allegato = i;
|
|
2499
2499
|
}
|
|
2500
2500
|
toJSON() {
|
|
2501
2501
|
return {
|
|
@@ -2525,7 +2525,7 @@ const mo = async (e) => {
|
|
|
2525
2525
|
})).json()).result.map((r) => dt.fromJSON(r)), yo = async (e, t, r) => {
|
|
2526
2526
|
const n = new FormData();
|
|
2527
2527
|
n.append("name", e), n.append("file", t), n.append("contiene_allegato", r ? "true" : "false");
|
|
2528
|
-
const
|
|
2528
|
+
const a = await fetch(`${V.getUrl()}/`, {
|
|
2529
2529
|
method: "POST",
|
|
2530
2530
|
headers: {
|
|
2531
2531
|
envid: V.getEnvironmentId(),
|
|
@@ -2533,10 +2533,10 @@ const mo = async (e) => {
|
|
|
2533
2533
|
},
|
|
2534
2534
|
body: n
|
|
2535
2535
|
});
|
|
2536
|
-
if (!
|
|
2537
|
-
throw new Error(`Error creating audit: ${
|
|
2538
|
-
const
|
|
2539
|
-
return dt.fromJSON(
|
|
2536
|
+
if (!a.ok)
|
|
2537
|
+
throw new Error(`Error creating audit: ${a.statusText}`);
|
|
2538
|
+
const i = await a.json();
|
|
2539
|
+
return dt.fromJSON(i.result);
|
|
2540
2540
|
}, ko = async (e) => {
|
|
2541
2541
|
const t = await fetch(`${V.getUrl()}/${e._id}`, {
|
|
2542
2542
|
method: "PUT",
|
|
@@ -2561,7 +2561,7 @@ const mo = async (e) => {
|
|
|
2561
2561
|
});
|
|
2562
2562
|
if (!t.ok)
|
|
2563
2563
|
throw new Error(`Error deleting audit: ${t.statusText}`);
|
|
2564
|
-
},
|
|
2564
|
+
}, Pe = {
|
|
2565
2565
|
get: mo,
|
|
2566
2566
|
getAll: bo,
|
|
2567
2567
|
create: yo,
|
|
@@ -2578,29 +2578,29 @@ const Io = {
|
|
|
2578
2578
|
@media (max-width: 768px) {.audit-list.svelte-k2fv35 {grid-template-columns:1fr;gap:1.5rem;}\r
|
|
2579
2579
|
}`
|
|
2580
2580
|
};
|
|
2581
|
-
function
|
|
2582
|
-
|
|
2583
|
-
let r = /* @__PURE__ */ D(rt([])), n = /* @__PURE__ */ D(!0),
|
|
2584
|
-
|
|
2585
|
-
h(r, await
|
|
2581
|
+
function Pa(e, t) {
|
|
2582
|
+
Et(t, !0), qr(e, Io);
|
|
2583
|
+
let r = /* @__PURE__ */ D(rt([])), n = /* @__PURE__ */ D(!0), a = ve(t, "onSelectAudit", 7);
|
|
2584
|
+
Er(async () => {
|
|
2585
|
+
h(r, await Pe.getAll(), !0), h(n, !1);
|
|
2586
2586
|
});
|
|
2587
|
-
async function
|
|
2588
|
-
f.stopPropagation(), confirm("Sei sicuro di voler eliminare questo audit?") && (await
|
|
2587
|
+
async function i(m, f) {
|
|
2588
|
+
f.stopPropagation(), confirm("Sei sicuro di voler eliminare questo audit?") && (await Pe.delete(m), h(r, s(r).filter((c) => c._id !== m), !0));
|
|
2589
2589
|
}
|
|
2590
2590
|
var o = {
|
|
2591
2591
|
get onSelectAudit() {
|
|
2592
|
-
return
|
|
2592
|
+
return a();
|
|
2593
2593
|
},
|
|
2594
|
-
set onSelectAudit(
|
|
2595
|
-
|
|
2594
|
+
set onSelectAudit(m) {
|
|
2595
|
+
a(m), ie();
|
|
2596
2596
|
}
|
|
2597
|
-
}, l =
|
|
2597
|
+
}, l = kt(), u = Ne(l);
|
|
2598
2598
|
{
|
|
2599
|
-
var d = (
|
|
2599
|
+
var d = (m) => {
|
|
2600
2600
|
var f = xo();
|
|
2601
|
-
q(
|
|
2602
|
-
}, v = (
|
|
2603
|
-
var f =
|
|
2601
|
+
q(m, f);
|
|
2602
|
+
}, v = (m) => {
|
|
2603
|
+
var f = kt(), c = Ne(f);
|
|
2604
2604
|
{
|
|
2605
2605
|
var p = (w) => {
|
|
2606
2606
|
var $ = Eo();
|
|
@@ -2609,11 +2609,11 @@ function Pi(e, t) {
|
|
|
2609
2609
|
var $ = No();
|
|
2610
2610
|
rn($, 21, () => s(r), tn, (y, S) => {
|
|
2611
2611
|
var O = Ao();
|
|
2612
|
-
O.__click = [$o,
|
|
2613
|
-
var R =
|
|
2614
|
-
x(k),
|
|
2615
|
-
var X =
|
|
2616
|
-
X.__click = [So,
|
|
2612
|
+
O.__click = [$o, a, S], O.__keydown = [To, a, S];
|
|
2613
|
+
var R = N(E(O), 2), k = E(R), C = E(k, !0);
|
|
2614
|
+
x(k), qt(2), x(R);
|
|
2615
|
+
var X = N(R, 2);
|
|
2616
|
+
X.__click = [So, i, S], x(O), xe(() => fe(C, s(S).name)), q(y, O);
|
|
2617
2617
|
}), x($), q(w, $);
|
|
2618
2618
|
};
|
|
2619
2619
|
Y(
|
|
@@ -2624,16 +2624,16 @@ function Pi(e, t) {
|
|
|
2624
2624
|
!0
|
|
2625
2625
|
);
|
|
2626
2626
|
}
|
|
2627
|
-
q(
|
|
2627
|
+
q(m, f);
|
|
2628
2628
|
};
|
|
2629
|
-
Y(u, (
|
|
2630
|
-
s(n) ?
|
|
2629
|
+
Y(u, (m) => {
|
|
2630
|
+
s(n) ? m(d) : m(v, !1);
|
|
2631
2631
|
});
|
|
2632
2632
|
}
|
|
2633
|
-
return q(e, l),
|
|
2633
|
+
return q(e, l), $t(o);
|
|
2634
2634
|
}
|
|
2635
2635
|
lr(["click", "keydown"]);
|
|
2636
|
-
|
|
2636
|
+
Jt(Pa, { onSelectAudit: {} }, [], [], !0);
|
|
2637
2637
|
var Co = (e, t) => e.key === "Escape" && t()(), Mo = (e) => e.stopPropagation(), qo = (e) => e.stopPropagation(), Oo = /* @__PURE__ */ U('<textarea rows="6" class="modal-textarea svelte-1w4pq25"></textarea>'), Po = /* @__PURE__ */ U('<input type="text" class="modal-input svelte-1w4pq25"/>'), zo = /* @__PURE__ */ U('<span class="spinner svelte-1w4pq25"></span> Salvataggio...', 1), Do = /* @__PURE__ */ U('<div class="modal-overlay svelte-1w4pq25" role="button" tabindex="0"><div class="modal-content svelte-1w4pq25" role="dialog" tabindex="-1"><div class="modal-header svelte-1w4pq25"><h2 class="svelte-1w4pq25"> </h2> <button class="modal-close svelte-1w4pq25">×</button></div> <div class="modal-body svelte-1w4pq25"><!></div> <div class="modal-footer svelte-1w4pq25"><button class="btn btn-secondary svelte-1w4pq25">Annulla</button> <button class="btn btn-primary svelte-1w4pq25"><!></button></div></div></div>');
|
|
2638
2638
|
const Ro = {
|
|
2639
2639
|
hash: "svelte-1w4pq25",
|
|
@@ -2648,115 +2648,115 @@ const Ro = {
|
|
|
2648
2648
|
}\r
|
|
2649
2649
|
}.btn.svelte-1w4pq25:disabled {opacity:0.6;cursor:not-allowed;}`
|
|
2650
2650
|
};
|
|
2651
|
-
function
|
|
2652
|
-
|
|
2653
|
-
let r = ve(t, "isSaving", 15), n = ve(t, "showModal", 15),
|
|
2651
|
+
function za(e, t) {
|
|
2652
|
+
Et(t, !0), qr(e, Ro);
|
|
2653
|
+
let r = ve(t, "isSaving", 15), n = ve(t, "showModal", 15), a = ve(t, "closeModal", 7), i = ve(t, "modalTitle", 15), o = ve(t, "modalField", 15), l = ve(t, "modalValue", 15), u = ve(t, "saveEdit", 7);
|
|
2654
2654
|
var d = {
|
|
2655
2655
|
get isSaving() {
|
|
2656
2656
|
return r();
|
|
2657
2657
|
},
|
|
2658
2658
|
set isSaving(c) {
|
|
2659
|
-
r(c),
|
|
2659
|
+
r(c), ie();
|
|
2660
2660
|
},
|
|
2661
2661
|
get showModal() {
|
|
2662
2662
|
return n();
|
|
2663
2663
|
},
|
|
2664
2664
|
set showModal(c) {
|
|
2665
|
-
n(c),
|
|
2665
|
+
n(c), ie();
|
|
2666
2666
|
},
|
|
2667
2667
|
get closeModal() {
|
|
2668
|
-
return
|
|
2668
|
+
return a();
|
|
2669
2669
|
},
|
|
2670
2670
|
set closeModal(c) {
|
|
2671
|
-
|
|
2671
|
+
a(c), ie();
|
|
2672
2672
|
},
|
|
2673
2673
|
get modalTitle() {
|
|
2674
|
-
return
|
|
2674
|
+
return i();
|
|
2675
2675
|
},
|
|
2676
2676
|
set modalTitle(c) {
|
|
2677
|
-
|
|
2677
|
+
i(c), ie();
|
|
2678
2678
|
},
|
|
2679
2679
|
get modalField() {
|
|
2680
2680
|
return o();
|
|
2681
2681
|
},
|
|
2682
2682
|
set modalField(c) {
|
|
2683
|
-
o(c),
|
|
2683
|
+
o(c), ie();
|
|
2684
2684
|
},
|
|
2685
2685
|
get modalValue() {
|
|
2686
2686
|
return l();
|
|
2687
2687
|
},
|
|
2688
2688
|
set modalValue(c) {
|
|
2689
|
-
l(c),
|
|
2689
|
+
l(c), ie();
|
|
2690
2690
|
},
|
|
2691
2691
|
get saveEdit() {
|
|
2692
2692
|
return u();
|
|
2693
2693
|
},
|
|
2694
2694
|
set saveEdit(c) {
|
|
2695
|
-
u(c),
|
|
2695
|
+
u(c), ie();
|
|
2696
2696
|
}
|
|
2697
|
-
}, v =
|
|
2697
|
+
}, v = kt(), m = Ne(v);
|
|
2698
2698
|
{
|
|
2699
2699
|
var f = (c) => {
|
|
2700
2700
|
var p = Do();
|
|
2701
2701
|
p.__click = function(...j) {
|
|
2702
|
-
|
|
2703
|
-
}, p.__keydown = [Co,
|
|
2702
|
+
a()?.apply(this, j);
|
|
2703
|
+
}, p.__keydown = [Co, a];
|
|
2704
2704
|
var b = E(p);
|
|
2705
2705
|
b.__click = [Mo], b.__keydown = [qo];
|
|
2706
2706
|
var w = E(b), $ = E(w), y = E($, !0);
|
|
2707
2707
|
x($);
|
|
2708
|
-
var S =
|
|
2708
|
+
var S = N($, 2);
|
|
2709
2709
|
S.__click = function(...j) {
|
|
2710
|
-
|
|
2710
|
+
a()?.apply(this, j);
|
|
2711
2711
|
}, x(w);
|
|
2712
|
-
var O =
|
|
2712
|
+
var O = N(w, 2), R = E(O);
|
|
2713
2713
|
{
|
|
2714
2714
|
var k = (j) => {
|
|
2715
|
-
var
|
|
2716
|
-
|
|
2717
|
-
},
|
|
2718
|
-
var
|
|
2719
|
-
an(
|
|
2715
|
+
var Q = Oo();
|
|
2716
|
+
qi(Q), on(Q, l), q(j, Q);
|
|
2717
|
+
}, C = (j) => {
|
|
2718
|
+
var Q = Po();
|
|
2719
|
+
an(Q), on(Q, l), q(j, Q);
|
|
2720
2720
|
};
|
|
2721
2721
|
Y(R, (j) => {
|
|
2722
|
-
o() === "explanation" || o() === "question" ? j(k) : j(
|
|
2722
|
+
o() === "explanation" || o() === "question" ? j(k) : j(C, !1);
|
|
2723
2723
|
});
|
|
2724
2724
|
}
|
|
2725
2725
|
x(O);
|
|
2726
|
-
var X =
|
|
2726
|
+
var X = N(O, 2), L = E(X);
|
|
2727
2727
|
L.__click = function(...j) {
|
|
2728
|
-
|
|
2728
|
+
a()?.apply(this, j);
|
|
2729
2729
|
};
|
|
2730
|
-
var K =
|
|
2730
|
+
var K = N(L, 2);
|
|
2731
2731
|
K.__click = function(...j) {
|
|
2732
2732
|
u()?.apply(this, j);
|
|
2733
2733
|
};
|
|
2734
2734
|
var le = E(K);
|
|
2735
2735
|
{
|
|
2736
2736
|
var ue = (j) => {
|
|
2737
|
-
var
|
|
2738
|
-
|
|
2739
|
-
},
|
|
2740
|
-
var
|
|
2741
|
-
q(j,
|
|
2737
|
+
var Q = zo();
|
|
2738
|
+
qt(), q(j, Q);
|
|
2739
|
+
}, Fe = (j) => {
|
|
2740
|
+
var Q = Ki("Salva");
|
|
2741
|
+
q(j, Q);
|
|
2742
2742
|
};
|
|
2743
2743
|
Y(le, (j) => {
|
|
2744
|
-
r() ? j(ue) : j(
|
|
2744
|
+
r() ? j(ue) : j(Fe, !1);
|
|
2745
2745
|
});
|
|
2746
2746
|
}
|
|
2747
|
-
x(K), x(X), x(b), x(p),
|
|
2748
|
-
fe(y,
|
|
2747
|
+
x(K), x(X), x(b), x(p), xe(() => {
|
|
2748
|
+
fe(y, i()), L.disabled = r(), K.disabled = r();
|
|
2749
2749
|
}), q(c, p);
|
|
2750
2750
|
};
|
|
2751
|
-
Y(
|
|
2751
|
+
Y(m, (c) => {
|
|
2752
2752
|
n() && c(f);
|
|
2753
2753
|
});
|
|
2754
2754
|
}
|
|
2755
|
-
return q(e, v),
|
|
2755
|
+
return q(e, v), $t(d);
|
|
2756
2756
|
}
|
|
2757
2757
|
lr(["click", "keydown"]);
|
|
2758
|
-
|
|
2759
|
-
|
|
2758
|
+
Jt(
|
|
2759
|
+
za,
|
|
2760
2760
|
{
|
|
2761
2761
|
isSaving: {},
|
|
2762
2762
|
showModal: {},
|
|
@@ -2770,17 +2770,17 @@ Yt(
|
|
|
2770
2770
|
[],
|
|
2771
2771
|
!0
|
|
2772
2772
|
);
|
|
2773
|
-
async function
|
|
2773
|
+
async function Or(e, t = 2) {
|
|
2774
2774
|
let r;
|
|
2775
2775
|
for (let n = 0; n <= t; n++)
|
|
2776
2776
|
try {
|
|
2777
2777
|
return await e();
|
|
2778
|
-
} catch (
|
|
2779
|
-
r =
|
|
2778
|
+
} catch (a) {
|
|
2779
|
+
r = a, n < t && await new Promise((i) => setTimeout(i, 1e3));
|
|
2780
2780
|
}
|
|
2781
2781
|
throw r;
|
|
2782
2782
|
}
|
|
2783
|
-
const Lo = async (e) =>
|
|
2783
|
+
const Lo = async (e) => Or(async () => {
|
|
2784
2784
|
let t = V.getEnvironmentId(), r = `https://${ur(t)}.aksiliasuite.com/api/v1/normative`;
|
|
2785
2785
|
t == "aks_svi" && (r = "http://mike.aksiliasuite.com/api/v1/normative");
|
|
2786
2786
|
const n = await fetch(r, {
|
|
@@ -2796,9 +2796,9 @@ const Lo = async (e) => Pr(async () => {
|
|
|
2796
2796
|
if (!n.ok)
|
|
2797
2797
|
throw new Error(`HTTP error! status: ${n.status}`);
|
|
2798
2798
|
return (await n.json()).result[0].record_id;
|
|
2799
|
-
}), Fo = async (e, t, r, n,
|
|
2800
|
-
let
|
|
2801
|
-
|
|
2799
|
+
}), Fo = async (e, t, r, n, a) => Or(async () => {
|
|
2800
|
+
let i = V.getEnvironmentId(), o = `https://${ur(i)}.aksiliasuite.com/api/v1/normative_categorie`;
|
|
2801
|
+
i == "aks_svi" && (o = "http://mike.aksiliasuite.com/api/v1/normative_categorie");
|
|
2802
2802
|
const l = await fetch(o, {
|
|
2803
2803
|
method: "POST",
|
|
2804
2804
|
headers: {
|
|
@@ -2811,16 +2811,16 @@ const Lo = async (e) => Pr(async () => {
|
|
|
2811
2811
|
nome: r,
|
|
2812
2812
|
isContenitore: n,
|
|
2813
2813
|
// Contenitore di domande
|
|
2814
|
-
punto_norma:
|
|
2814
|
+
punto_norma: a
|
|
2815
2815
|
})
|
|
2816
2816
|
});
|
|
2817
2817
|
if (!l.ok)
|
|
2818
2818
|
throw new Error(`HTTP error! status: ${l.status}`);
|
|
2819
2819
|
return (await l.json()).result[0].record_id;
|
|
2820
|
-
}), jo = async (e, t) =>
|
|
2820
|
+
}), jo = async (e, t) => Or(async () => {
|
|
2821
2821
|
let r = V.getEnvironmentId(), n = `https://${ur(r)}.aksiliasuite.com/api/v1/domande`;
|
|
2822
2822
|
r == "aks_svi" && (n = "http://mike.aksiliasuite.com/api/v1/domande");
|
|
2823
|
-
const
|
|
2823
|
+
const a = await fetch(n, {
|
|
2824
2824
|
method: "POST",
|
|
2825
2825
|
headers: {
|
|
2826
2826
|
"Content-Type": "application/json",
|
|
@@ -2833,13 +2833,13 @@ const Lo = async (e) => Pr(async () => {
|
|
|
2833
2833
|
// Tipo domanda standard
|
|
2834
2834
|
})
|
|
2835
2835
|
});
|
|
2836
|
-
if (!
|
|
2837
|
-
throw new Error(`HTTP error! status: ${
|
|
2838
|
-
return (await
|
|
2839
|
-
}), Bo = async (e, t, r, n) =>
|
|
2840
|
-
let
|
|
2841
|
-
|
|
2842
|
-
const o = await fetch(
|
|
2836
|
+
if (!a.ok)
|
|
2837
|
+
throw new Error(`HTTP error! status: ${a.status}`);
|
|
2838
|
+
return (await a.json()).result[0].record_id;
|
|
2839
|
+
}), Bo = async (e, t, r, n) => Or(async () => {
|
|
2840
|
+
let a = V.getEnvironmentId(), i = `https://${ur(a)}.aksiliasuite.com/api/v1/normative_categorie_domande`;
|
|
2841
|
+
a == "aks_svi" && (i = "http://mike.aksiliasuite.com/api/v1/normative_categorie_domande");
|
|
2842
|
+
const o = await fetch(i, {
|
|
2843
2843
|
method: "POST",
|
|
2844
2844
|
headers: {
|
|
2845
2845
|
"Content-Type": "application/json",
|
|
@@ -2855,7 +2855,7 @@ const Lo = async (e) => Pr(async () => {
|
|
|
2855
2855
|
if (!o.ok)
|
|
2856
2856
|
throw new Error(`HTTP error! status: ${o.status}`);
|
|
2857
2857
|
return (await o.json()).result[0].record_id;
|
|
2858
|
-
}),
|
|
2858
|
+
}), pr = {
|
|
2859
2859
|
addNormativaSuite: Lo,
|
|
2860
2860
|
addCategoriaSuite: Fo,
|
|
2861
2861
|
addDomandaSuite: jo,
|
|
@@ -2863,36 +2863,36 @@ const Lo = async (e) => Pr(async () => {
|
|
|
2863
2863
|
};
|
|
2864
2864
|
function Uo(e) {
|
|
2865
2865
|
const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
2866
|
-
function n(
|
|
2867
|
-
if (r.has(
|
|
2868
|
-
return r.get(
|
|
2869
|
-
if (
|
|
2870
|
-
return r.set(
|
|
2871
|
-
const
|
|
2872
|
-
if (!
|
|
2873
|
-
return r.set(
|
|
2874
|
-
const o = n(
|
|
2875
|
-
return r.set(
|
|
2876
|
-
}
|
|
2877
|
-
return e.forEach((
|
|
2878
|
-
const
|
|
2879
|
-
t.has(
|
|
2866
|
+
function n(a) {
|
|
2867
|
+
if (r.has(a.id))
|
|
2868
|
+
return r.get(a.id);
|
|
2869
|
+
if (a.parent_id === null)
|
|
2870
|
+
return r.set(a.id, 0), 0;
|
|
2871
|
+
const i = e.find((l) => l.id === a.parent_id);
|
|
2872
|
+
if (!i)
|
|
2873
|
+
return r.set(a.id, 0), 0;
|
|
2874
|
+
const o = n(i) + 1;
|
|
2875
|
+
return r.set(a.id, o), o;
|
|
2876
|
+
}
|
|
2877
|
+
return e.forEach((a) => n(a)), e.forEach((a) => {
|
|
2878
|
+
const i = r.get(a.id);
|
|
2879
|
+
t.has(i) || t.set(i, []), t.get(i).push(a);
|
|
2880
2880
|
}), t;
|
|
2881
2881
|
}
|
|
2882
2882
|
async function Vo(e, t) {
|
|
2883
2883
|
const r = e.ai_output.length + 1, n = { current: 0, total: r };
|
|
2884
2884
|
t && t(0, r);
|
|
2885
|
-
const
|
|
2885
|
+
const a = await pr.addNormativaSuite(e.name);
|
|
2886
2886
|
n.current++, t && t(n.current, n.total);
|
|
2887
|
-
const
|
|
2887
|
+
const i = Uo(e.ai_output), o = Math.max(...Array.from(i.keys())), l = /* @__PURE__ */ new Map();
|
|
2888
2888
|
for (let u = 0; u <= o; u++) {
|
|
2889
|
-
const d =
|
|
2889
|
+
const d = i.get(u) || [], v = d.filter((f) => f.type === "category"), m = d.filter((f) => f.type === "item");
|
|
2890
2890
|
for (const f of v) {
|
|
2891
2891
|
const c = e.ai_output.filter(($) => $.parent_id === f.id);
|
|
2892
2892
|
if (c.length === 0)
|
|
2893
2893
|
throw new Error(`A category with no child its not allowed. Category ID: ${f.id}`);
|
|
2894
|
-
const p = c[0].type === "item", b = f.parent_id === null ? 0 : l.get(f.parent_id) || 0, w = await
|
|
2895
|
-
|
|
2894
|
+
const p = c[0].type === "item", b = f.parent_id === null ? 0 : l.get(f.parent_id) || 0, w = await pr.addCategoriaSuite(
|
|
2895
|
+
a,
|
|
2896
2896
|
b,
|
|
2897
2897
|
f.category,
|
|
2898
2898
|
p,
|
|
@@ -2900,13 +2900,13 @@ async function Vo(e, t) {
|
|
|
2900
2900
|
);
|
|
2901
2901
|
l.set(f.id, w), n.current++, t && t(n.current, n.total);
|
|
2902
2902
|
}
|
|
2903
|
-
for (const f of
|
|
2904
|
-
const c = await
|
|
2903
|
+
for (const f of m) {
|
|
2904
|
+
const c = await pr.addDomandaSuite(
|
|
2905
2905
|
f.question,
|
|
2906
2906
|
f.spiegazione
|
|
2907
2907
|
), p = f.parent_id === null ? 0 : l.get(f.parent_id) || 0;
|
|
2908
|
-
await
|
|
2909
|
-
|
|
2908
|
+
await pr.addLinkDomadaCategoria(
|
|
2909
|
+
a,
|
|
2910
2910
|
c,
|
|
2911
2911
|
p,
|
|
2912
2912
|
f.punto_norma
|
|
@@ -2914,11 +2914,11 @@ async function Vo(e, t) {
|
|
|
2914
2914
|
}
|
|
2915
2915
|
}
|
|
2916
2916
|
}
|
|
2917
|
-
async function Ho(e, t, r, n,
|
|
2917
|
+
async function Ho(e, t, r, n, a, i) {
|
|
2918
2918
|
if (!(!t() || s(r))) {
|
|
2919
2919
|
h(r, !0);
|
|
2920
2920
|
try {
|
|
2921
|
-
h(n, await
|
|
2921
|
+
h(n, await Pe.get(t()), !0), s(n) && h(a, i(s(n).ai_output), !0);
|
|
2922
2922
|
} catch (o) {
|
|
2923
2923
|
console.error("Errore durante il refresh:", o), alert("Errore durante il refresh dell'audit");
|
|
2924
2924
|
} finally {
|
|
@@ -2926,7 +2926,7 @@ async function Ho(e, t, r, n, i, a) {
|
|
|
2926
2926
|
}
|
|
2927
2927
|
}
|
|
2928
2928
|
}
|
|
2929
|
-
async function Jo(e, t, r, n,
|
|
2929
|
+
async function Jo(e, t, r, n, a, i) {
|
|
2930
2930
|
if (!s(t)) return;
|
|
2931
2931
|
let o = r(!0);
|
|
2932
2932
|
if (console.log("Categorie vuote trovate:", o), o !== void 0) {
|
|
@@ -2936,9 +2936,9 @@ async function Jo(e, t, r, n, i, a) {
|
|
|
2936
2936
|
}
|
|
2937
2937
|
if (confirm("Sei sicuro di voler inviare il template di questo audit alla Suite? Una volta inviato, non potrai più modificarlo."))
|
|
2938
2938
|
try {
|
|
2939
|
-
h(n, !0), h(
|
|
2940
|
-
h(
|
|
2941
|
-
}), s(t).status = 3, await
|
|
2939
|
+
h(n, !0), h(a, 0), h(i, 0), await Vo(s(t), (l, u) => {
|
|
2940
|
+
h(a, l, !0), h(i, u, !0);
|
|
2941
|
+
}), s(t).status = 3, await Pe.update(s(t)), h(t, dt.fromJSON(s(
|
|
2942
2942
|
t
|
|
2943
2943
|
// Trigger reactivity
|
|
2944
2944
|
).toJSON()), !0), alert("Template inviato con successo alla Suite!");
|
|
@@ -2965,7 +2965,7 @@ var Yo = (
|
|
|
2965
2965
|
e.stopPropagation(), t("category", r().entry);
|
|
2966
2966
|
}, Zo = (e, t, r) => t(r().entry.id), es = /* @__PURE__ */ U('<button class="add-btn svelte-ie6pne" title="Aggiungi domanda" aria-label="Aggiungi domanda"><i class="fa-solid fa-plus svelte-ie6pne"></i></button>'), ts = (e, t, r) => {
|
|
2967
2967
|
e.stopPropagation(), t(r());
|
|
2968
|
-
}, rs = /* @__PURE__ */ U('<button class="edit-btn edit-btn-inline svelte-ie6pne" title="Modifica categoria" aria-label="Modifica categoria"><i class="fa-solid fa-pen-to-square svelte-ie6pne"></i></button> <!> <button class="delete-btn delete-btn-inline svelte-ie6pne" title="Elimina categoria e tutti i figli" aria-label="Elimina categoria"><i class="fa-solid fa-trash svelte-ie6pne"></i></button>', 1), ns = /* @__PURE__ */ U('<div class="category-children svelte-ie6pne"></div>'),
|
|
2968
|
+
}, rs = /* @__PURE__ */ U('<button class="edit-btn edit-btn-inline svelte-ie6pne" title="Modifica categoria" aria-label="Modifica categoria"><i class="fa-solid fa-pen-to-square svelte-ie6pne"></i></button> <!> <button class="delete-btn delete-btn-inline svelte-ie6pne" title="Elimina categoria e tutti i figli" aria-label="Elimina categoria"><i class="fa-solid fa-trash svelte-ie6pne"></i></button>', 1), ns = /* @__PURE__ */ U('<div class="category-children svelte-ie6pne"></div>'), as = /* @__PURE__ */ U('<div class="category-node svelte-ie6pne"><div class="category-header-wrapper svelte-ie6pne"><div role="button" tabindex="0"><!> <span role="button" tabindex="0"> </span> <span class="category-name svelte-ie6pne"> </span> <!></div></div> <!></div>'), is = (e, t, r, n) => {
|
|
2969
2969
|
s(t) || (e.stopPropagation(), r("puntoNorma", n().entry));
|
|
2970
2970
|
}, os = (e, t, r, n) => {
|
|
2971
2971
|
!s(t) && (e.key === "Enter" || e.key === " ") && (e.stopPropagation(), r("puntoNorma", n().entry));
|
|
@@ -3000,115 +3000,115 @@ const xs = {
|
|
|
3000
3000
|
\r
|
|
3001
3001
|
/* Progress Modal */.progress-modal-overlay.svelte-ie6pne {position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000;}.progress-modal.svelte-ie6pne {background:white;border-radius:8px;padding:2rem;min-width:400px;box-shadow:0 4px 6px rgba(0, 0, 0, 0.1);}.progress-modal.svelte-ie6pne h3:where(.svelte-ie6pne) {margin:0 0 1rem 0;color:#333;font-size:1.5rem;}.progress-modal.svelte-ie6pne p:where(.svelte-ie6pne) {margin:0.5rem 0;color:#666;}.progress-bar-container.svelte-ie6pne {width:100%;height:30px;background-color:#e9ecef;border-radius:15px;overflow:hidden;margin:1rem 0;}.progress-bar.svelte-ie6pne {height:100%;background:linear-gradient(90deg, #0d6efd 0%, #0b5ed7 100%);transition:width 0.3s ease;display:flex;align-items:center;justify-content:center;color:white;font-weight:bold;}.progress-percentage.svelte-ie6pne {text-align:center;font-size:1.2rem;font-weight:bold;color:#0d6efd;}`
|
|
3002
3002
|
};
|
|
3003
|
-
function
|
|
3004
|
-
|
|
3005
|
-
const r = (
|
|
3006
|
-
var ee =
|
|
3003
|
+
function Da(e, t) {
|
|
3004
|
+
Et(t, !0), qr(e, xs);
|
|
3005
|
+
const r = (_, g = Br, A = Br, T = Br) => {
|
|
3006
|
+
var ee = kt(), te = Ne(ee);
|
|
3007
3007
|
{
|
|
3008
|
-
var
|
|
3008
|
+
var je = (Ke) => {
|
|
3009
3009
|
var Ge = vs(), Dr = E(Ge);
|
|
3010
3010
|
{
|
|
3011
|
-
var
|
|
3012
|
-
const Ue = /* @__PURE__ */ Nn(() => s(k).ai_output.find((
|
|
3013
|
-
var
|
|
3014
|
-
|
|
3015
|
-
var
|
|
3011
|
+
var cr = (Be) => {
|
|
3012
|
+
const Ue = /* @__PURE__ */ Nn(() => s(k).ai_output.find((Z) => Z.parent_id === g().entry.id) !== void 0);
|
|
3013
|
+
var Me = as(), he = E(Me), Ae = E(he);
|
|
3014
|
+
Ae.__click = [Yo, j, g], Ae.__keydown = [Wo];
|
|
3015
|
+
var Nt = E(Ae);
|
|
3016
3016
|
{
|
|
3017
|
-
var Xe = (
|
|
3017
|
+
var Xe = (Z) => {
|
|
3018
3018
|
var H = Ko(), ne = E(H, !0);
|
|
3019
|
-
x(H),
|
|
3019
|
+
x(H), xe(() => fe(ne, g().expanded ? "▼" : "▶")), q(Z, H);
|
|
3020
3020
|
};
|
|
3021
|
-
Y(
|
|
3022
|
-
s(Ue) &&
|
|
3021
|
+
Y(Nt, (Z) => {
|
|
3022
|
+
s(Ue) && Z(Xe);
|
|
3023
3023
|
});
|
|
3024
3024
|
}
|
|
3025
|
-
var
|
|
3026
|
-
let
|
|
3027
|
-
|
|
3028
|
-
var
|
|
3029
|
-
x(
|
|
3030
|
-
var M =
|
|
3025
|
+
var be = N(Nt, 2);
|
|
3026
|
+
let It;
|
|
3027
|
+
be.__click = [Go, L, b, g], be.__keydown = [Xo, L, b, g];
|
|
3028
|
+
var ct = E(be, !0);
|
|
3029
|
+
x(be);
|
|
3030
|
+
var M = N(be, 2), J = E(M, !0);
|
|
3031
3031
|
x(M);
|
|
3032
|
-
var
|
|
3032
|
+
var _e = N(M, 2);
|
|
3033
3033
|
{
|
|
3034
|
-
var
|
|
3035
|
-
var H = rs(), ne =
|
|
3034
|
+
var ye = (Z) => {
|
|
3035
|
+
var H = rs(), ne = Ne(H);
|
|
3036
3036
|
ne.__click = [Qo, b, g];
|
|
3037
|
-
var
|
|
3037
|
+
var vt = N(ne, 2);
|
|
3038
3038
|
{
|
|
3039
3039
|
var Lr = (Fr) => {
|
|
3040
3040
|
var $n = es();
|
|
3041
|
-
$n.__click = [Zo,
|
|
3041
|
+
$n.__click = [Zo, Pr, g], q(Fr, $n);
|
|
3042
3042
|
};
|
|
3043
|
-
Y(
|
|
3043
|
+
Y(vt, (Fr) => {
|
|
3044
3044
|
s(Ue) || Fr(Lr);
|
|
3045
3045
|
});
|
|
3046
3046
|
}
|
|
3047
|
-
var
|
|
3048
|
-
|
|
3047
|
+
var Fa = N(vt, 2);
|
|
3048
|
+
Fa.__click = [ts, y, g], q(Z, H);
|
|
3049
3049
|
};
|
|
3050
|
-
Y(
|
|
3051
|
-
!s(L) && s(k) &&
|
|
3050
|
+
Y(_e, (Z) => {
|
|
3051
|
+
!s(L) && s(k) && Z(ye);
|
|
3052
3052
|
});
|
|
3053
3053
|
}
|
|
3054
|
-
x(
|
|
3055
|
-
var
|
|
3054
|
+
x(Ae), x(he);
|
|
3055
|
+
var ft = N(he, 2);
|
|
3056
3056
|
{
|
|
3057
|
-
var Qe = (
|
|
3057
|
+
var Qe = (Z) => {
|
|
3058
3058
|
var H = ns();
|
|
3059
|
-
rn(H, 21, () => g().children, tn, (ne,
|
|
3060
|
-
r(ne, () => s(
|
|
3061
|
-
}), x(H), q(
|
|
3059
|
+
rn(H, 21, () => g().children, tn, (ne, vt) => {
|
|
3060
|
+
r(ne, () => s(vt), () => A() + 1, g);
|
|
3061
|
+
}), x(H), q(Z, H);
|
|
3062
3062
|
};
|
|
3063
|
-
Y(
|
|
3064
|
-
g().expanded && g().children.length > 0 &&
|
|
3063
|
+
Y(ft, (Z) => {
|
|
3064
|
+
g().expanded && g().children.length > 0 && Z(Qe);
|
|
3065
3065
|
});
|
|
3066
3066
|
}
|
|
3067
|
-
x(
|
|
3068
|
-
(
|
|
3069
|
-
|
|
3067
|
+
x(Me), xe(
|
|
3068
|
+
(Z, H) => {
|
|
3069
|
+
Xt(Ae, 1, "category-header" + (s(Ue) ? "" : " no-children"), "svelte-ie6pne"), Zt(Ae, "aria-label", g().expanded ? "Comprimi categoria" : "Espandi categoria"), It = Xt(be, 1, "punto-norma svelte-ie6pne", null, It, Z), Zt(be, "title", s(L) ? "" : "Clicca per modificare"), fe(ct, H), fe(J, g().entry.category);
|
|
3070
3070
|
},
|
|
3071
3071
|
[
|
|
3072
3072
|
() => ({ editable: !s(L) }),
|
|
3073
3073
|
() => le(g().entry, T())
|
|
3074
3074
|
]
|
|
3075
|
-
), q(Be,
|
|
3075
|
+
), q(Be, Me);
|
|
3076
3076
|
}, Rr = (Be) => {
|
|
3077
|
-
var Ue = fs(),
|
|
3078
|
-
let
|
|
3079
|
-
|
|
3080
|
-
var
|
|
3081
|
-
x(
|
|
3082
|
-
var Xe =
|
|
3077
|
+
var Ue = fs(), Me = E(Ue), he = E(Me);
|
|
3078
|
+
let Ae;
|
|
3079
|
+
he.__click = [is, L, b, g], he.__keydown = [os, L, b, g];
|
|
3080
|
+
var Nt = E(he, !0);
|
|
3081
|
+
x(he);
|
|
3082
|
+
var Xe = N(he, 2), be = E(Xe);
|
|
3083
3083
|
{
|
|
3084
|
-
var
|
|
3085
|
-
var ne = us(),
|
|
3086
|
-
|
|
3087
|
-
var Lr =
|
|
3084
|
+
var It = (H) => {
|
|
3085
|
+
var ne = us(), vt = Ne(ne);
|
|
3086
|
+
vt.__click = [ss, b, g];
|
|
3087
|
+
var Lr = N(vt, 2);
|
|
3088
3088
|
Lr.__click = [ls, S, g], q(H, ne);
|
|
3089
3089
|
};
|
|
3090
|
-
Y(
|
|
3091
|
-
s(L) || H(
|
|
3090
|
+
Y(be, (H) => {
|
|
3091
|
+
s(L) || H(It);
|
|
3092
3092
|
});
|
|
3093
3093
|
}
|
|
3094
|
-
|
|
3095
|
-
var
|
|
3096
|
-
x(
|
|
3097
|
-
var J =
|
|
3094
|
+
qt(2), x(Xe);
|
|
3095
|
+
var ct = N(Xe, 2), M = E(ct, !0);
|
|
3096
|
+
x(ct), x(Me);
|
|
3097
|
+
var J = N(Me, 2), _e = E(J), ye = E(_e);
|
|
3098
3098
|
{
|
|
3099
|
-
var
|
|
3099
|
+
var ft = (H) => {
|
|
3100
3100
|
var ne = cs();
|
|
3101
3101
|
ne.__click = [ds, b, g], q(H, ne);
|
|
3102
3102
|
};
|
|
3103
|
-
Y(
|
|
3104
|
-
s(L) || H(
|
|
3103
|
+
Y(ye, (H) => {
|
|
3104
|
+
s(L) || H(ft);
|
|
3105
3105
|
});
|
|
3106
3106
|
}
|
|
3107
|
-
|
|
3108
|
-
var Qe =
|
|
3109
|
-
x(Qe), x(J), x(Ue),
|
|
3107
|
+
qt(2), x(_e);
|
|
3108
|
+
var Qe = N(_e, 2), Z = E(Qe, !0);
|
|
3109
|
+
x(Qe), x(J), x(Ue), xe(
|
|
3110
3110
|
(H, ne) => {
|
|
3111
|
-
|
|
3111
|
+
Ae = Xt(he, 1, "punto-norma-item svelte-ie6pne", null, Ae, H), Zt(he, "title", s(L) ? "" : "Clicca per modificare"), fe(Nt, ne), fe(M, g().entry.question), fe(Z, g().entry.spiegazione);
|
|
3112
3112
|
},
|
|
3113
3113
|
[
|
|
3114
3114
|
() => ({ editable: !s(L) }),
|
|
@@ -3117,20 +3117,20 @@ function Di(e, t) {
|
|
|
3117
3117
|
), q(Be, Ue);
|
|
3118
3118
|
};
|
|
3119
3119
|
Y(Dr, (Be) => {
|
|
3120
|
-
g().entry.type === "category" ? Be(
|
|
3120
|
+
g().entry.type === "category" ? Be(cr) : Be(Rr, !1);
|
|
3121
3121
|
});
|
|
3122
3122
|
}
|
|
3123
|
-
x(Ge),
|
|
3123
|
+
x(Ge), xe(() => Ln(Ge, `margin-left: ${A() * 2}rem;`)), q(Ke, Ge);
|
|
3124
3124
|
};
|
|
3125
|
-
Y(te, (
|
|
3126
|
-
s(k) &&
|
|
3125
|
+
Y(te, (Ke) => {
|
|
3126
|
+
s(k) && Ke(je);
|
|
3127
3127
|
});
|
|
3128
3128
|
}
|
|
3129
|
-
q(
|
|
3129
|
+
q(_, ee);
|
|
3130
3130
|
};
|
|
3131
|
-
let n = ve(t, "auditId", 15),
|
|
3132
|
-
function b(
|
|
3133
|
-
switch (h(d,
|
|
3131
|
+
let n = ve(t, "auditId", 15), a = ve(t, "onBack", 7), i = /* @__PURE__ */ D(!1), o = /* @__PURE__ */ D(!1), l = /* @__PURE__ */ D(""), u = /* @__PURE__ */ D(""), d = /* @__PURE__ */ D(null), v = /* @__PURE__ */ D(null), m = /* @__PURE__ */ D(!1), f = /* @__PURE__ */ D(0), c = /* @__PURE__ */ D(0), p = /* @__PURE__ */ Nn(() => s(c) > 0 ? Math.round(s(f) / s(c) * 100) : 0);
|
|
3132
|
+
function b(_, g) {
|
|
3133
|
+
switch (h(d, _, !0), h(v, g || null, !0), _) {
|
|
3134
3134
|
case "assessmentName":
|
|
3135
3135
|
h(l, "Modifica Nome Assessment"), h(u, s(k)?.name || "", !0);
|
|
3136
3136
|
break;
|
|
@@ -3152,35 +3152,35 @@ function Di(e, t) {
|
|
|
3152
3152
|
function w() {
|
|
3153
3153
|
h(o, !1), h(d, null), h(v, null), h(u, "");
|
|
3154
3154
|
}
|
|
3155
|
-
function $(
|
|
3156
|
-
const g = [
|
|
3157
|
-
for (const
|
|
3158
|
-
g.push(...$(
|
|
3155
|
+
function $(_) {
|
|
3156
|
+
const g = [_.entry.id];
|
|
3157
|
+
for (const A of _.children)
|
|
3158
|
+
g.push(...$(A));
|
|
3159
3159
|
return g;
|
|
3160
3160
|
}
|
|
3161
|
-
async function y(
|
|
3161
|
+
async function y(_) {
|
|
3162
3162
|
if (!s(k)) return;
|
|
3163
|
-
const
|
|
3164
|
-
if (confirm(
|
|
3163
|
+
const A = `Sei sicuro di voler eliminare la categoria "${_.entry.category}" e tutti i suoi elementi figlio?`;
|
|
3164
|
+
if (confirm(A))
|
|
3165
3165
|
try {
|
|
3166
|
-
const T =
|
|
3167
|
-
s(k).ai_output = s(k).ai_output.filter((te) => !ee.includes(te.id)), console.log(s(k).ai_output), await
|
|
3166
|
+
const T = Yt(s(C)), ee = $(_);
|
|
3167
|
+
s(k).ai_output = s(k).ai_output.filter((te) => !ee.includes(te.id)), console.log(s(k).ai_output), await Pe.update(s(k)), h(C, K(s(k).ai_output), !0), Wt(s(C), T), console.log(`Eliminata categoria e ${ee.length - 1} elementi figlio`);
|
|
3168
3168
|
} catch (T) {
|
|
3169
3169
|
console.error("Errore durante l'eliminazione:", T), alert("Errore durante l'eliminazione della categoria");
|
|
3170
3170
|
}
|
|
3171
3171
|
}
|
|
3172
|
-
async function S(
|
|
3172
|
+
async function S(_) {
|
|
3173
3173
|
if (!(!s(k) || !confirm("Sei sicuro di voler eliminare questa domanda?")))
|
|
3174
3174
|
try {
|
|
3175
|
-
const
|
|
3176
|
-
s(k).ai_output = s(k).ai_output.filter((T) => T.id !==
|
|
3177
|
-
} catch (
|
|
3178
|
-
console.error("Errore durante l'eliminazione:",
|
|
3175
|
+
const A = Yt(s(C));
|
|
3176
|
+
s(k).ai_output = s(k).ai_output.filter((T) => T.id !== _.id), await Pe.update(s(k)), h(C, K(s(k).ai_output), !0), Wt(s(C), A), console.log(`Eliminata domanda con ID: ${_.id}`);
|
|
3177
|
+
} catch (A) {
|
|
3178
|
+
console.error("Errore durante l'eliminazione:", A), alert("Errore durante l'eliminazione della domanda");
|
|
3179
3179
|
}
|
|
3180
3180
|
}
|
|
3181
3181
|
async function O() {
|
|
3182
3182
|
if (!(!s(d) || !s(k))) {
|
|
3183
|
-
switch (h(
|
|
3183
|
+
switch (h(i, !0), s(d)) {
|
|
3184
3184
|
case "assessmentName":
|
|
3185
3185
|
s(k).name = s(u), h(k, dt.fromJSON(s(
|
|
3186
3186
|
k
|
|
@@ -3190,9 +3190,9 @@ function Di(e, t) {
|
|
|
3190
3190
|
case "category":
|
|
3191
3191
|
if (s(v) && s(v).id) {
|
|
3192
3192
|
s(v).category = s(u);
|
|
3193
|
-
const
|
|
3194
|
-
|
|
3195
|
-
|
|
3193
|
+
const _ = s(k).ai_output.find((g) => g.id === s(v).id);
|
|
3194
|
+
_ && _.type === "category" && (_.category = s(u)), h(C, [...s(
|
|
3195
|
+
C
|
|
3196
3196
|
// Trigger reactivity
|
|
3197
3197
|
)], !0);
|
|
3198
3198
|
}
|
|
@@ -3200,9 +3200,9 @@ function Di(e, t) {
|
|
|
3200
3200
|
case "question":
|
|
3201
3201
|
if (s(v) && s(v).id) {
|
|
3202
3202
|
s(v).question = s(u);
|
|
3203
|
-
const
|
|
3204
|
-
|
|
3205
|
-
|
|
3203
|
+
const _ = s(k).ai_output.find((g) => g.id === s(v).id);
|
|
3204
|
+
_ && _.type === "item" && (_.question = s(u)), h(C, [...s(
|
|
3205
|
+
C
|
|
3206
3206
|
// Trigger reactivity
|
|
3207
3207
|
)], !0);
|
|
3208
3208
|
}
|
|
@@ -3210,9 +3210,9 @@ function Di(e, t) {
|
|
|
3210
3210
|
case "explanation":
|
|
3211
3211
|
if (s(v) && s(v).id) {
|
|
3212
3212
|
s(v).spiegazione = s(u);
|
|
3213
|
-
const
|
|
3214
|
-
|
|
3215
|
-
|
|
3213
|
+
const _ = s(k).ai_output.find((g) => g.id === s(v).id);
|
|
3214
|
+
_ && _.type === "item" && (_.spiegazione = s(u)), h(C, [...s(
|
|
3215
|
+
C
|
|
3216
3216
|
// Trigger reactivity
|
|
3217
3217
|
)], !0);
|
|
3218
3218
|
}
|
|
@@ -3220,82 +3220,82 @@ function Di(e, t) {
|
|
|
3220
3220
|
case "puntoNorma":
|
|
3221
3221
|
if (s(v) && s(v).id) {
|
|
3222
3222
|
s(v).punto_norma = s(u);
|
|
3223
|
-
const
|
|
3224
|
-
|
|
3225
|
-
|
|
3223
|
+
const _ = s(k).ai_output.find((g) => g.id === s(v).id);
|
|
3224
|
+
_ && (_.punto_norma = s(u)), h(C, [...s(
|
|
3225
|
+
C
|
|
3226
3226
|
// Trigger reactivity
|
|
3227
3227
|
)], !0);
|
|
3228
3228
|
}
|
|
3229
3229
|
break;
|
|
3230
3230
|
}
|
|
3231
3231
|
try {
|
|
3232
|
-
await
|
|
3233
|
-
} catch (
|
|
3234
|
-
console.error("Errore durante il salvataggio:",
|
|
3232
|
+
await Pe.update(s(k));
|
|
3233
|
+
} catch (_) {
|
|
3234
|
+
console.error("Errore durante il salvataggio:", _), alert("Errore durante il salvataggio delle modifiche");
|
|
3235
3235
|
return;
|
|
3236
3236
|
} finally {
|
|
3237
|
-
h(
|
|
3237
|
+
h(i, !1);
|
|
3238
3238
|
}
|
|
3239
3239
|
w();
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
3242
|
-
let R = /* @__PURE__ */ D(!0), k = /* @__PURE__ */ D(null),
|
|
3243
|
-
|
|
3242
|
+
let R = /* @__PURE__ */ D(!0), k = /* @__PURE__ */ D(null), C = /* @__PURE__ */ D(rt([])), X = /* @__PURE__ */ D(!1), L = /* @__PURE__ */ D(!1);
|
|
3243
|
+
_a(() => {
|
|
3244
3244
|
h(L, s(k) !== null && s(k).status !== 2, !0);
|
|
3245
3245
|
});
|
|
3246
|
-
function K(
|
|
3247
|
-
const g = /* @__PURE__ */ new Map(),
|
|
3248
|
-
return
|
|
3246
|
+
function K(_) {
|
|
3247
|
+
const g = /* @__PURE__ */ new Map(), A = [];
|
|
3248
|
+
return _.forEach((T) => {
|
|
3249
3249
|
g.set(T.id, { entry: T, children: [], expanded: !1 });
|
|
3250
|
-
}),
|
|
3250
|
+
}), _.forEach((T) => {
|
|
3251
3251
|
const ee = g.get(T.id);
|
|
3252
3252
|
if (T.parent_id === null)
|
|
3253
|
-
|
|
3253
|
+
A.push(ee);
|
|
3254
3254
|
else {
|
|
3255
3255
|
const te = g.get(T.parent_id);
|
|
3256
3256
|
te && te.children.push(ee);
|
|
3257
3257
|
}
|
|
3258
3258
|
}), g.forEach((T) => {
|
|
3259
3259
|
T.children.sort((ee, te) => ee.entry.ordine_categoria - te.entry.ordine_categoria);
|
|
3260
|
-
}),
|
|
3260
|
+
}), A;
|
|
3261
3261
|
}
|
|
3262
|
-
function le(
|
|
3263
|
-
return
|
|
3262
|
+
function le(_, g) {
|
|
3263
|
+
return _.punto_norma && _.punto_norma.trim() !== "" ? _.punto_norma : g ? `${ue(g)}.${_.ordine_categoria}` : `${_.ordine_categoria}`;
|
|
3264
3264
|
}
|
|
3265
|
-
function ue(
|
|
3266
|
-
const g =
|
|
3267
|
-
return le(
|
|
3265
|
+
function ue(_) {
|
|
3266
|
+
const g = Fe(_, s(C));
|
|
3267
|
+
return le(_.entry, g);
|
|
3268
3268
|
}
|
|
3269
|
-
function
|
|
3270
|
-
for (const
|
|
3271
|
-
if (
|
|
3272
|
-
return
|
|
3273
|
-
const T =
|
|
3269
|
+
function Fe(_, g) {
|
|
3270
|
+
for (const A of g) {
|
|
3271
|
+
if (A.children.includes(_))
|
|
3272
|
+
return A;
|
|
3273
|
+
const T = Fe(_, A.children);
|
|
3274
3274
|
if (T) return T;
|
|
3275
3275
|
}
|
|
3276
3276
|
}
|
|
3277
|
-
function j(
|
|
3278
|
-
|
|
3279
|
-
|
|
3277
|
+
function j(_) {
|
|
3278
|
+
_.expanded = !_.expanded, h(C, [...s(
|
|
3279
|
+
C
|
|
3280
3280
|
// Trigger reactivity
|
|
3281
3281
|
)], !0);
|
|
3282
3282
|
}
|
|
3283
|
-
function
|
|
3283
|
+
function Q(_ = !1) {
|
|
3284
3284
|
if (!s(k)) return;
|
|
3285
|
-
const g = [],
|
|
3285
|
+
const g = [], A = /* @__PURE__ */ new Map();
|
|
3286
3286
|
if (s(k).ai_output.forEach((T) => {
|
|
3287
|
-
T.type === "category" &&
|
|
3287
|
+
T.type === "category" && A.set(T.id, 0);
|
|
3288
3288
|
}), s(k).ai_output.forEach((T) => {
|
|
3289
|
-
T.parent_id !== null &&
|
|
3289
|
+
T.parent_id !== null && A.has(T.parent_id) && A.set(T.parent_id, (A.get(T.parent_id) || 0) + 1);
|
|
3290
3290
|
}), s(k).ai_output.forEach((T) => {
|
|
3291
|
-
if (T.type === "category" && (
|
|
3292
|
-
const te =
|
|
3291
|
+
if (T.type === "category" && (A.get(T.id) || 0) === 0) {
|
|
3292
|
+
const te = St(T.id, s(C));
|
|
3293
3293
|
if (te) {
|
|
3294
|
-
const
|
|
3295
|
-
g.push(`${
|
|
3294
|
+
const je = ue(te);
|
|
3295
|
+
g.push(`${je} - ${T.category}`);
|
|
3296
3296
|
}
|
|
3297
3297
|
}
|
|
3298
|
-
}),
|
|
3298
|
+
}), _)
|
|
3299
3299
|
return g.length;
|
|
3300
3300
|
if (g.length === 0)
|
|
3301
3301
|
alert("✓ Nessuna categoria vuota trovata. Il template è corretto.");
|
|
@@ -3307,83 +3307,83 @@ ${g.join(`
|
|
|
3307
3307
|
alert(T);
|
|
3308
3308
|
}
|
|
3309
3309
|
}
|
|
3310
|
-
function
|
|
3311
|
-
for (const
|
|
3312
|
-
if (
|
|
3313
|
-
return
|
|
3314
|
-
const T =
|
|
3310
|
+
function St(_, g) {
|
|
3311
|
+
for (const A of g) {
|
|
3312
|
+
if (A.entry.id === _)
|
|
3313
|
+
return A;
|
|
3314
|
+
const T = St(_, A.children);
|
|
3315
3315
|
if (T) return T;
|
|
3316
3316
|
}
|
|
3317
3317
|
}
|
|
3318
|
-
async function
|
|
3318
|
+
async function Pr(_) {
|
|
3319
3319
|
if (!s(k)) return;
|
|
3320
3320
|
const g = {
|
|
3321
3321
|
id: crypto.randomUUID(),
|
|
3322
3322
|
type: "item",
|
|
3323
|
-
parent_id:
|
|
3323
|
+
parent_id: _,
|
|
3324
3324
|
ordine_categoria: 1,
|
|
3325
3325
|
question: "Nuova domanda",
|
|
3326
3326
|
spiegazione: "Spiegazione della domanda",
|
|
3327
3327
|
punto_norma: "",
|
|
3328
3328
|
status: "new"
|
|
3329
|
-
},
|
|
3330
|
-
s(k).ai_output.push(g), h(
|
|
3329
|
+
}, A = Yt(s(C));
|
|
3330
|
+
s(k).ai_output.push(g), h(C, K(s(k).ai_output), !0), Wt(s(C), A), await Pe.update(s(k));
|
|
3331
3331
|
}
|
|
3332
|
-
function
|
|
3332
|
+
function Yt(_) {
|
|
3333
3333
|
const g = /* @__PURE__ */ new Set();
|
|
3334
|
-
function
|
|
3335
|
-
T.expanded && g.add(T.entry.id), T.children.forEach(
|
|
3334
|
+
function A(T) {
|
|
3335
|
+
T.expanded && g.add(T.entry.id), T.children.forEach(A);
|
|
3336
3336
|
}
|
|
3337
|
-
return
|
|
3337
|
+
return _.forEach(A), g;
|
|
3338
3338
|
}
|
|
3339
|
-
function
|
|
3340
|
-
function
|
|
3341
|
-
g.has(T.entry.id) && (T.expanded = !0), T.children.forEach(
|
|
3339
|
+
function Wt(_, g) {
|
|
3340
|
+
function A(T) {
|
|
3341
|
+
g.has(T.entry.id) && (T.expanded = !0), T.children.forEach(A);
|
|
3342
3342
|
}
|
|
3343
|
-
|
|
3343
|
+
_.forEach(A);
|
|
3344
3344
|
}
|
|
3345
|
-
|
|
3346
|
-
h(k, await
|
|
3345
|
+
Er(async () => {
|
|
3346
|
+
h(k, await Pe.get(n()), !0), s(k) && h(C, K(s(k).ai_output), !0), h(R, !1);
|
|
3347
3347
|
});
|
|
3348
|
-
var
|
|
3348
|
+
var dr = {
|
|
3349
3349
|
get auditId() {
|
|
3350
3350
|
return n();
|
|
3351
3351
|
},
|
|
3352
|
-
set auditId(
|
|
3353
|
-
n(
|
|
3352
|
+
set auditId(_) {
|
|
3353
|
+
n(_), ie();
|
|
3354
3354
|
},
|
|
3355
3355
|
get onBack() {
|
|
3356
|
-
return
|
|
3356
|
+
return a();
|
|
3357
3357
|
},
|
|
3358
|
-
set onBack(
|
|
3359
|
-
|
|
3358
|
+
set onBack(_) {
|
|
3359
|
+
a(_), ie();
|
|
3360
3360
|
}
|
|
3361
|
-
},
|
|
3361
|
+
}, At = kt(), Kt = Ne(At);
|
|
3362
3362
|
{
|
|
3363
|
-
var
|
|
3363
|
+
var zr = (_) => {
|
|
3364
3364
|
var g = ps();
|
|
3365
|
-
q(
|
|
3366
|
-
},
|
|
3367
|
-
var g =
|
|
3365
|
+
q(_, g);
|
|
3366
|
+
}, de = (_) => {
|
|
3367
|
+
var g = kt(), A = Ne(g);
|
|
3368
3368
|
{
|
|
3369
3369
|
var T = (ee) => {
|
|
3370
|
-
var te = ws(),
|
|
3371
|
-
|
|
3372
|
-
|
|
3370
|
+
var te = ws(), je = E(te), Ke = E(je);
|
|
3371
|
+
Ke.__click = function(...M) {
|
|
3372
|
+
a()?.apply(this, M);
|
|
3373
3373
|
};
|
|
3374
|
-
var Ge =
|
|
3374
|
+
var Ge = N(Ke, 2), Dr = E(Ge, !0);
|
|
3375
3375
|
x(Ge);
|
|
3376
|
-
var
|
|
3376
|
+
var cr = N(Ge, 2);
|
|
3377
3377
|
{
|
|
3378
3378
|
var Rr = (M) => {
|
|
3379
3379
|
var J = _s();
|
|
3380
3380
|
J.__click = [hs, b], q(M, J);
|
|
3381
3381
|
};
|
|
3382
|
-
Y(
|
|
3382
|
+
Y(cr, (M) => {
|
|
3383
3383
|
s(L) || M(Rr);
|
|
3384
3384
|
});
|
|
3385
3385
|
}
|
|
3386
|
-
var Be =
|
|
3386
|
+
var Be = N(cr, 2);
|
|
3387
3387
|
{
|
|
3388
3388
|
var Ue = (M) => {
|
|
3389
3389
|
var J = gs();
|
|
@@ -3393,60 +3393,60 @@ ${g.join(`
|
|
|
3393
3393
|
s(k).status < 2 && M(Ue);
|
|
3394
3394
|
});
|
|
3395
3395
|
}
|
|
3396
|
-
var
|
|
3396
|
+
var Me = N(Be, 2);
|
|
3397
3397
|
{
|
|
3398
|
-
var
|
|
3398
|
+
var he = (M) => {
|
|
3399
3399
|
var J = ms();
|
|
3400
3400
|
J.__click = [
|
|
3401
3401
|
Ho,
|
|
3402
3402
|
n,
|
|
3403
3403
|
X,
|
|
3404
3404
|
k,
|
|
3405
|
-
|
|
3405
|
+
C,
|
|
3406
3406
|
K
|
|
3407
3407
|
];
|
|
3408
|
-
var
|
|
3409
|
-
let
|
|
3410
|
-
|
|
3411
|
-
(
|
|
3412
|
-
J.disabled = s(X),
|
|
3408
|
+
var _e = E(J);
|
|
3409
|
+
let ye;
|
|
3410
|
+
qt(), x(J), xe(
|
|
3411
|
+
(ft) => {
|
|
3412
|
+
J.disabled = s(X), ye = Xt(_e, 1, "fa-solid fa-refresh svelte-ie6pne", null, ye, ft);
|
|
3413
3413
|
},
|
|
3414
3414
|
[() => ({ spinning: s(X) })]
|
|
3415
3415
|
), q(M, J);
|
|
3416
3416
|
};
|
|
3417
|
-
Y(
|
|
3418
|
-
s(k).status <= 2 && M(
|
|
3417
|
+
Y(Me, (M) => {
|
|
3418
|
+
s(k).status <= 2 && M(he);
|
|
3419
3419
|
});
|
|
3420
3420
|
}
|
|
3421
|
-
var
|
|
3421
|
+
var Ae = N(Me, 2);
|
|
3422
3422
|
{
|
|
3423
|
-
var
|
|
3424
|
-
var J = ys(),
|
|
3425
|
-
|
|
3426
|
-
var
|
|
3427
|
-
|
|
3423
|
+
var Nt = (M) => {
|
|
3424
|
+
var J = ys(), _e = Ne(J);
|
|
3425
|
+
_e.__click = [bs, Q];
|
|
3426
|
+
var ye = N(_e, 2);
|
|
3427
|
+
ye.__click = [
|
|
3428
3428
|
Jo,
|
|
3429
3429
|
k,
|
|
3430
|
-
|
|
3431
|
-
|
|
3430
|
+
Q,
|
|
3431
|
+
m,
|
|
3432
3432
|
f,
|
|
3433
3433
|
c
|
|
3434
3434
|
], q(M, J);
|
|
3435
3435
|
};
|
|
3436
|
-
Y(
|
|
3437
|
-
s(k).status === 2 && M(
|
|
3436
|
+
Y(Ae, (M) => {
|
|
3437
|
+
s(k).status === 2 && M(Nt);
|
|
3438
3438
|
});
|
|
3439
3439
|
}
|
|
3440
|
-
x(
|
|
3441
|
-
var Xe =
|
|
3442
|
-
|
|
3440
|
+
x(je);
|
|
3441
|
+
var Xe = N(je, 2);
|
|
3442
|
+
za(Xe, {
|
|
3443
3443
|
saveEdit: O,
|
|
3444
3444
|
closeModal: w,
|
|
3445
3445
|
get isSaving() {
|
|
3446
|
-
return s(
|
|
3446
|
+
return s(i);
|
|
3447
3447
|
},
|
|
3448
3448
|
set isSaving(M) {
|
|
3449
|
-
h(
|
|
3449
|
+
h(i, M, !0);
|
|
3450
3450
|
},
|
|
3451
3451
|
get showModal() {
|
|
3452
3452
|
return s(o);
|
|
@@ -3473,46 +3473,46 @@ ${g.join(`
|
|
|
3473
3473
|
h(d, M, !0);
|
|
3474
3474
|
}
|
|
3475
3475
|
});
|
|
3476
|
-
var
|
|
3476
|
+
var be = N(Xe, 2);
|
|
3477
3477
|
{
|
|
3478
|
-
var
|
|
3479
|
-
var J = ks(),
|
|
3480
|
-
x(
|
|
3481
|
-
var Qe =
|
|
3478
|
+
var It = (M) => {
|
|
3479
|
+
var J = ks(), _e = E(J), ye = N(E(_e), 2), ft = E(ye);
|
|
3480
|
+
x(ye);
|
|
3481
|
+
var Qe = N(ye, 2), Z = E(Qe);
|
|
3482
3482
|
x(Qe);
|
|
3483
|
-
var H =
|
|
3484
|
-
x(H), x(
|
|
3485
|
-
fe(
|
|
3483
|
+
var H = N(Qe, 2), ne = E(H);
|
|
3484
|
+
x(H), x(_e), x(J), xe(() => {
|
|
3485
|
+
fe(ft, `Invio in corso... ${s(f) ?? ""} / ${s(c) ?? ""}`), Ln(Z, `width: ${s(p) ?? ""}%`), fe(ne, `${s(p) ?? ""}%`);
|
|
3486
3486
|
}), q(M, J);
|
|
3487
3487
|
};
|
|
3488
|
-
Y(
|
|
3489
|
-
s(
|
|
3488
|
+
Y(be, (M) => {
|
|
3489
|
+
s(m) && M(It);
|
|
3490
3490
|
});
|
|
3491
3491
|
}
|
|
3492
|
-
var
|
|
3493
|
-
rn(
|
|
3492
|
+
var ct = N(be, 2);
|
|
3493
|
+
rn(ct, 21, () => s(C), tn, (M, J) => {
|
|
3494
3494
|
r(M, () => s(J), () => 0, () => {
|
|
3495
3495
|
});
|
|
3496
|
-
}), x(
|
|
3496
|
+
}), x(ct), x(te), xe(() => fe(Dr, s(k).name)), q(ee, te);
|
|
3497
3497
|
};
|
|
3498
3498
|
Y(
|
|
3499
|
-
|
|
3499
|
+
A,
|
|
3500
3500
|
(ee) => {
|
|
3501
3501
|
s(k) && ee(T);
|
|
3502
3502
|
},
|
|
3503
3503
|
!0
|
|
3504
3504
|
);
|
|
3505
3505
|
}
|
|
3506
|
-
q(
|
|
3506
|
+
q(_, g);
|
|
3507
3507
|
};
|
|
3508
|
-
Y(
|
|
3509
|
-
s(R) ?
|
|
3508
|
+
Y(Kt, (_) => {
|
|
3509
|
+
s(R) ? _(zr) : _(de, !1);
|
|
3510
3510
|
});
|
|
3511
3511
|
}
|
|
3512
|
-
return q(e,
|
|
3512
|
+
return q(e, At), $t(dr);
|
|
3513
3513
|
}
|
|
3514
3514
|
lr(["click", "keydown"]);
|
|
3515
|
-
|
|
3515
|
+
Jt(Da, { auditId: {}, onBack: {} }, [], [], !0);
|
|
3516
3516
|
function Es(e, t, r) {
|
|
3517
3517
|
const n = e.target;
|
|
3518
3518
|
n.files && n.files[0] && (h(t, n.files[0], !0), s(r).trim() === "" && h(r, s(t).name, !0));
|
|
@@ -3520,7 +3520,9 @@ function Es(e, t, r) {
|
|
|
3520
3520
|
function $s(e, t) {
|
|
3521
3521
|
h(t, null);
|
|
3522
3522
|
}
|
|
3523
|
-
var Ts = /* @__PURE__ */ U('<div><div class="drop-zone-content svelte-r8ykeg"><div class="upload-icon svelte-r8ykeg"><i class="fa-solid fa-file-upload"></i></div> <p class="svelte-r8ykeg">Trascina il file qui o</p> <label for="fileInput" class="file-button svelte-r8ykeg">Seleziona File</label> <input id="fileInput" type="file" style="display: none;"/></div></div>'), Ss = /* @__PURE__ */ U('<div class="selected-file svelte-r8ykeg"><div class="file-info svelte-r8ykeg"><span class="file-name svelte-r8ykeg"> </span> <span class="file-size svelte-r8ykeg"> </span></div> <button type="button" class="remove-file-button svelte-r8ykeg" title="Rimuovi file">✕</button></div>'), As = /* @__PURE__ */ U(
|
|
3523
|
+
var Ts = /* @__PURE__ */ U('<div><div class="drop-zone-content svelte-r8ykeg"><div class="upload-icon svelte-r8ykeg"><i class="fa-solid fa-file-upload"></i></div> <p class="svelte-r8ykeg">Trascina il file qui o</p> <label for="fileInput" class="file-button svelte-r8ykeg">Seleziona File</label> <input id="fileInput" type="file" style="display: none;"/></div></div>'), Ss = /* @__PURE__ */ U('<div class="selected-file svelte-r8ykeg"><div class="file-info svelte-r8ykeg"><span class="file-name svelte-r8ykeg"> </span> <span class="file-size svelte-r8ykeg"> </span></div> <button type="button" class="remove-file-button svelte-r8ykeg" title="Rimuovi file">✕</button></div>'), As = /* @__PURE__ */ U(`<div class="modal-backdrop svelte-r8ykeg"><div class="modal-dialog svelte-r8ykeg" role="dialog" aria-labelledby="modal-title"><div class="modal-content svelte-r8ykeg"><div class="modal-header svelte-r8ykeg"><h2 id="modal-title" class="svelte-r8ykeg">Aggiungi Template</h2> <button type="button" class="close-button svelte-r8ykeg" aria-label="Chiudi modale"><i class="fa-solid fa-xmark"></i></button></div> <div class="modal-body svelte-r8ykeg"><form><div class="form-group svelte-r8ykeg"><div class="input-with-button svelte-r8ykeg"><label for="name" class="svelte-r8ykeg">Nome *</label></div> <input id="name" type="text" required placeholder="Inserisci Nome" class="svelte-r8ykeg"/></div> <div class="form-group svelte-r8ykeg"><label for="contieneAllegato" class="svelte-r8ykeg">Contiene Allegato *</label> <div class="checkbox-container svelte-r8ykeg"><div class="checkbox-wrapper svelte-r8ykeg"><input id="contieneAllegato" type="checkbox" class="svelte-r8ykeg"/> <label for="contieneAllegato" class="checkbox-label svelte-r8ykeg"><span class="checkbox-text svelte-r8ykeg">Flaggare solo se il file caricato
|
|
3524
|
+
contiene una sezione "allegato"
|
|
3525
|
+
dedicata solo alle domande.</span></label></div></div></div> <div class="form-group svelte-r8ykeg"><label for="fileInput" class="svelte-r8ykeg">File *</label> <!></div> <div class="modal-footer svelte-r8ykeg"><button type="button" class="cancel-button svelte-r8ykeg">Annulla</button> <button type="submit" class="submit-button svelte-r8ykeg"> </button></div></form></div></div></div></div>`);
|
|
3524
3526
|
const Ns = {
|
|
3525
3527
|
hash: "svelte-r8ykeg",
|
|
3526
3528
|
code: `.modal-backdrop.svelte-r8ykeg {position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000;backdrop-filter:blur(2px);}.modal-dialog.svelte-r8ykeg {width:90%;max-width:500px;max-height:90vh;overflow-y:auto;}.modal-content.svelte-r8ykeg {background:white;border-radius:8px;box-shadow:0 10px 30px rgba(0, 0, 0, 0.3);overflow:hidden;}.modal-header.svelte-r8ykeg {padding:16px 20px;border-bottom:1px solid #dee2e6;display:flex;justify-content:space-between;align-items:center;background:#f8f9fa;}.modal-header.svelte-r8ykeg h2:where(.svelte-r8ykeg) {margin:0;color:#2c3e50;font-size:1.25rem;font-weight:600;}.close-button.svelte-r8ykeg {background:none;border:none;font-size:24px;color:#6c757d;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color 0.2s;}.close-button.svelte-r8ykeg:hover {background-color:#e9ecef;color:#495057;}.modal-body.svelte-r8ykeg {padding:20px;}.form-group.svelte-r8ykeg {margin-bottom:16px;}.form-group.svelte-r8ykeg label:where(.svelte-r8ykeg) {display:block;margin-bottom:4px;font-weight:500;color:#495057;font-size:0.9rem;}.input-with-button.svelte-r8ykeg {display:flex;justify-content:space-between;align-items:center;margin-bottom:4px;}.input-with-button.svelte-r8ykeg label:where(.svelte-r8ykeg) {margin-bottom:0;flex:1;}.input-with-button.svelte-r8ykeg + input:where(.svelte-r8ykeg) {width:100%;padding:8px 12px;border:1px solid #ced4da;border-radius:4px;font-size:0.95rem;transition:border-color 0.2s,\r
|
|
@@ -3528,28 +3530,29 @@ const Ns = {
|
|
|
3528
3530
|
background-color 0.2s;}.file-drop-zone.svelte-r8ykeg:hover,\r
|
|
3529
3531
|
.file-drop-zone.dragging.svelte-r8ykeg {border-color:#007bff;background-color:#f8f9ff;}.drop-zone-content.svelte-r8ykeg {display:flex;flex-direction:column;align-items:center;gap:8px;}.upload-icon.svelte-r8ykeg {font-size:32px;opacity:0.6;}.drop-zone-content.svelte-r8ykeg p:where(.svelte-r8ykeg) {margin:0;color:#6c757d;font-size:0.9rem;}.file-button.svelte-r8ykeg {background:#007bff;color:white !important;padding:6px 12px;border-radius:4px;cursor:pointer;font-size:0.85rem;transition:background-color 0.2s;}.file-button.svelte-r8ykeg:hover {background:#0056b3;}.selected-file.svelte-r8ykeg {display:flex;align-items:center;justify-content:space-between;padding:10px;background:#f8f9fa;border:1px solid #dee2e6;border-radius:4px;}.file-info.svelte-r8ykeg {display:flex;flex-direction:column;gap:4px;}.file-name.svelte-r8ykeg {font-weight:500;color:#495057;}.file-size.svelte-r8ykeg {font-size:0.85rem;color:#6c757d;}.remove-file-button.svelte-r8ykeg {background:#dc3545;color:white;border:none;border-radius:50%;width:24px;height:24px;cursor:pointer;font-size:14px;display:flex;align-items:center;justify-content:center;transition:background-color 0.2s;}.remove-file-button.svelte-r8ykeg:hover {background:#c82333;}.modal-footer.svelte-r8ykeg {display:flex;gap:10px;justify-content:flex-end;padding-top:16px;border-top:1px solid #dee2e6;margin-top:16px;}.cancel-button.svelte-r8ykeg,\r
|
|
3530
3532
|
.submit-button.svelte-r8ykeg {padding:8px 16px;border:none;border-radius:4px;font-size:0.9rem;cursor:pointer;transition:background-color 0.2s;}.cancel-button.svelte-r8ykeg {background:#6c757d;color:white;}.cancel-button.svelte-r8ykeg:hover:not(:disabled) {background:#545b62;}.submit-button.svelte-r8ykeg {background:#28a745;color:white;}.submit-button.svelte-r8ykeg:hover:not(:disabled) {background:#218838;}.submit-button.svelte-r8ykeg:disabled,\r
|
|
3531
|
-
.cancel-button.svelte-r8ykeg:disabled {opacity:0.6;cursor:not-allowed;}
|
|
3533
|
+
.cancel-button.svelte-r8ykeg:disabled {opacity:0.6;cursor:not-allowed;}.checkbox-container.svelte-r8ykeg {background:#f8f9fa;border:1px solid #dee2e6;border-radius:6px;padding:12px 14px;transition:border-color 0.2s,\r
|
|
3534
|
+
background-color 0.2s;}.checkbox-container.svelte-r8ykeg:hover {background:#e9ecef;border-color:#ced4da;}.checkbox-wrapper.svelte-r8ykeg {display:flex;align-items:flex-start;gap:10px;}.checkbox-wrapper.svelte-r8ykeg input[type="checkbox"]:where(.svelte-r8ykeg) {margin-top:2px;width:18px;height:18px;cursor:pointer;accent-color:#007bff;flex-shrink:0;}.checkbox-label.svelte-r8ykeg {cursor:pointer;margin:0;flex:1;}.checkbox-text.svelte-r8ykeg {color:#6c757d;font-size:0.9rem;line-height:1.5;font-style:italic;}`
|
|
3532
3535
|
};
|
|
3533
|
-
function
|
|
3534
|
-
|
|
3535
|
-
let r = ve(t, "isOpen", 15), n = ve(t, "handleAuditAdded", 7),
|
|
3536
|
+
function Ra(e, t) {
|
|
3537
|
+
Et(t, !0), qr(e, Ns);
|
|
3538
|
+
let r = ve(t, "isOpen", 15), n = ve(t, "handleAuditAdded", 7), a = /* @__PURE__ */ D(""), i = /* @__PURE__ */ D(null), o = /* @__PURE__ */ D(!1), l = /* @__PURE__ */ D(!1), u = /* @__PURE__ */ D(!1);
|
|
3536
3539
|
function d(y) {
|
|
3537
3540
|
y.preventDefault(), h(l, !0);
|
|
3538
3541
|
}
|
|
3539
3542
|
function v(y) {
|
|
3540
3543
|
y.preventDefault(), h(l, !1);
|
|
3541
3544
|
}
|
|
3542
|
-
function
|
|
3543
|
-
y.preventDefault(), h(l, !1), y.dataTransfer?.files && y.dataTransfer.files[0] && (h(
|
|
3545
|
+
function m(y) {
|
|
3546
|
+
y.preventDefault(), h(l, !1), y.dataTransfer?.files && y.dataTransfer.files[0] && (h(i, y.dataTransfer.files[0], !0), s(a).trim() === "" && h(a, s(i).name, !0));
|
|
3544
3547
|
}
|
|
3545
3548
|
async function f(y) {
|
|
3546
|
-
if (y.preventDefault(), !s(
|
|
3549
|
+
if (y.preventDefault(), !s(a).trim() || !s(i)) {
|
|
3547
3550
|
alert("Compila tutti i campi richiesti e seleziona un file");
|
|
3548
3551
|
return;
|
|
3549
3552
|
}
|
|
3550
3553
|
h(u, !0);
|
|
3551
3554
|
try {
|
|
3552
|
-
let S = await
|
|
3555
|
+
let S = await Pe.create(s(a).trim(), s(i), s(o));
|
|
3553
3556
|
n()(S._id), c();
|
|
3554
3557
|
} catch (S) {
|
|
3555
3558
|
console.error("Errore durante l'aggiunta del template:", S), alert("Errore durante l'aggiunta del template");
|
|
@@ -3558,109 +3561,109 @@ function Ri(e, t) {
|
|
|
3558
3561
|
}
|
|
3559
3562
|
}
|
|
3560
3563
|
function c() {
|
|
3561
|
-
r(!1), h(
|
|
3564
|
+
r(!1), h(a, ""), h(i, null), h(l, !1), h(u, !1);
|
|
3562
3565
|
}
|
|
3563
3566
|
var p = {
|
|
3564
3567
|
get isOpen() {
|
|
3565
3568
|
return r();
|
|
3566
3569
|
},
|
|
3567
3570
|
set isOpen(y) {
|
|
3568
|
-
r(y),
|
|
3571
|
+
r(y), ie();
|
|
3569
3572
|
},
|
|
3570
3573
|
get handleAuditAdded() {
|
|
3571
3574
|
return n();
|
|
3572
3575
|
},
|
|
3573
3576
|
set handleAuditAdded(y) {
|
|
3574
|
-
n(y),
|
|
3577
|
+
n(y), ie();
|
|
3575
3578
|
}
|
|
3576
|
-
}, b =
|
|
3579
|
+
}, b = kt(), w = Ne(b);
|
|
3577
3580
|
{
|
|
3578
3581
|
var $ = (y) => {
|
|
3579
|
-
var S = As(), O = E(S), R = E(O), k = E(R),
|
|
3580
|
-
|
|
3581
|
-
var X =
|
|
3582
|
+
var S = As(), O = E(S), R = E(O), k = E(R), C = N(E(k), 2);
|
|
3583
|
+
C.__click = c, x(k);
|
|
3584
|
+
var X = N(k, 2), L = E(X), K = E(L), le = N(E(K), 2);
|
|
3582
3585
|
an(le), x(K);
|
|
3583
|
-
var ue =
|
|
3584
|
-
an(
|
|
3585
|
-
var
|
|
3586
|
+
var ue = N(K, 2), Fe = N(E(ue), 2), j = E(Fe), Q = E(j);
|
|
3587
|
+
an(Q), qt(2), x(j), x(Fe), x(ue);
|
|
3588
|
+
var St = N(ue, 2), Pr = N(E(St), 2);
|
|
3586
3589
|
{
|
|
3587
|
-
var
|
|
3588
|
-
var
|
|
3589
|
-
|
|
3590
|
-
},
|
|
3591
|
-
var
|
|
3592
|
-
x(
|
|
3593
|
-
var
|
|
3594
|
-
x(
|
|
3595
|
-
var
|
|
3596
|
-
|
|
3597
|
-
(
|
|
3598
|
-
fe(
|
|
3590
|
+
var Yt = (de) => {
|
|
3591
|
+
var _ = Ts(), g = E(_), A = N(E(g), 6);
|
|
3592
|
+
A.__change = [Es, i, a], x(g), x(_), xe(() => Xt(_, 1, `file-drop-zone ${s(l) ? "dragging" : ""}`, "svelte-r8ykeg")), fr("dragover", _, d), fr("dragleave", _, v), fr("drop", _, m), q(de, _);
|
|
3593
|
+
}, Wt = (de) => {
|
|
3594
|
+
var _ = Ss(), g = E(_), A = E(g), T = E(A);
|
|
3595
|
+
x(A);
|
|
3596
|
+
var ee = N(A, 2), te = E(ee);
|
|
3597
|
+
x(ee), x(g);
|
|
3598
|
+
var je = N(g, 2);
|
|
3599
|
+
je.__click = [$s, i], x(_), xe(
|
|
3600
|
+
(Ke) => {
|
|
3601
|
+
fe(T, `📄 ${s(i).name ?? ""}`), fe(te, `(${Ke ?? ""} KB)`);
|
|
3599
3602
|
},
|
|
3600
|
-
[() => Math.round(s(
|
|
3601
|
-
), q(de,
|
|
3603
|
+
[() => Math.round(s(i).size / 1024)]
|
|
3604
|
+
), q(de, _);
|
|
3602
3605
|
};
|
|
3603
|
-
Y(
|
|
3604
|
-
s(
|
|
3606
|
+
Y(Pr, (de) => {
|
|
3607
|
+
s(i) ? de(Wt, !1) : de(Yt);
|
|
3605
3608
|
});
|
|
3606
3609
|
}
|
|
3607
|
-
x(
|
|
3608
|
-
var
|
|
3609
|
-
|
|
3610
|
-
var
|
|
3611
|
-
x(
|
|
3610
|
+
x(St);
|
|
3611
|
+
var dr = N(St, 2), At = E(dr);
|
|
3612
|
+
At.__click = c;
|
|
3613
|
+
var Kt = N(At, 2), zr = E(Kt, !0);
|
|
3614
|
+
x(Kt), x(dr), x(L), x(X), x(R), x(O), x(S), xe(
|
|
3612
3615
|
(de) => {
|
|
3613
|
-
|
|
3616
|
+
At.disabled = s(u), Kt.disabled = de, fe(zr, s(u) ? "Caricamento..." : "Aggiungi Template");
|
|
3614
3617
|
},
|
|
3615
3618
|
[
|
|
3616
|
-
() => s(u) || !s(
|
|
3619
|
+
() => s(u) || !s(a).trim() || !s(i)
|
|
3617
3620
|
]
|
|
3618
|
-
),
|
|
3621
|
+
), fr("submit", L, f), on(le, () => s(a), (de) => h(a, de)), lo(Q, () => s(o), (de) => h(o, de)), q(y, S);
|
|
3619
3622
|
};
|
|
3620
3623
|
Y(w, (y) => {
|
|
3621
3624
|
r() && y($);
|
|
3622
3625
|
});
|
|
3623
3626
|
}
|
|
3624
|
-
return q(e, b),
|
|
3627
|
+
return q(e, b), $t(p);
|
|
3625
3628
|
}
|
|
3626
3629
|
lr(["click", "change"]);
|
|
3627
|
-
|
|
3630
|
+
Jt(Ra, { isOpen: {}, handleAuditAdded: {} }, [], [], !0);
|
|
3628
3631
|
var Is = (e, t) => h(t, !0), Cs = /* @__PURE__ */ U('<div class="row"><div class="col"><nav aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item active" aria-current="page">AKS Audit Handler</li></ol></nav></div> <div class="col-auto"><button class="btn aks-md-btn-rounded btn-primary" type="submit" id="akj-btn_create_assessment" data-bs-toggle="modal" data-bs-target="#aggiungiAssessmentModal"><i class="fa-solid fa-plus"></i><span class="d-none d-md-inline ps-2">Nuovo Template</span></button></div></div> <!> <!>', 1);
|
|
3629
|
-
function
|
|
3630
|
-
|
|
3632
|
+
function La(e, t) {
|
|
3633
|
+
Et(t, !0);
|
|
3631
3634
|
let r = /* @__PURE__ */ D(0), n = /* @__PURE__ */ D(null);
|
|
3632
|
-
|
|
3635
|
+
Er(() => {
|
|
3633
3636
|
new URLSearchParams(window.location.search).get("tab_selected") == "viewer" && h(r, 0);
|
|
3634
3637
|
});
|
|
3635
|
-
let
|
|
3638
|
+
let a = /* @__PURE__ */ D(0), i = /* @__PURE__ */ D(!1), o = /* @__PURE__ */ D(!1);
|
|
3636
3639
|
const l = ($) => {
|
|
3637
3640
|
h(n, $, !0), h(o, !1);
|
|
3638
3641
|
};
|
|
3639
|
-
|
|
3640
|
-
h(
|
|
3642
|
+
Er(async () => {
|
|
3643
|
+
h(i, !0), h(a, await go(), !0), h(i, !1);
|
|
3641
3644
|
});
|
|
3642
|
-
var u = Cs(), d =
|
|
3643
|
-
|
|
3644
|
-
var f =
|
|
3645
|
+
var u = Cs(), d = Ne(u), v = N(E(d), 2), m = E(v);
|
|
3646
|
+
m.__click = [Is, o], x(v), x(d);
|
|
3647
|
+
var f = N(d, 2);
|
|
3645
3648
|
{
|
|
3646
3649
|
var c = ($) => {
|
|
3647
|
-
|
|
3650
|
+
Da($, {
|
|
3648
3651
|
get auditId() {
|
|
3649
3652
|
return s(n);
|
|
3650
3653
|
},
|
|
3651
3654
|
onBack: () => h(n, null)
|
|
3652
3655
|
});
|
|
3653
3656
|
}, p = ($) => {
|
|
3654
|
-
|
|
3657
|
+
Pa($, { onSelectAudit: (y) => h(n, y, !0) });
|
|
3655
3658
|
};
|
|
3656
3659
|
Y(f, ($) => {
|
|
3657
3660
|
s(n) ? $(c) : $(p, !1);
|
|
3658
3661
|
});
|
|
3659
3662
|
}
|
|
3660
|
-
var b =
|
|
3663
|
+
var b = N(f, 2);
|
|
3661
3664
|
{
|
|
3662
3665
|
var w = ($) => {
|
|
3663
|
-
|
|
3666
|
+
Ra($, {
|
|
3664
3667
|
handleAuditAdded: l,
|
|
3665
3668
|
get isOpen() {
|
|
3666
3669
|
return s(o);
|
|
@@ -3674,33 +3677,33 @@ function Li(e, t) {
|
|
|
3674
3677
|
s(o) && $(w);
|
|
3675
3678
|
});
|
|
3676
3679
|
}
|
|
3677
|
-
q(e, u),
|
|
3680
|
+
q(e, u), $t();
|
|
3678
3681
|
}
|
|
3679
3682
|
lr(["click"]);
|
|
3680
|
-
|
|
3683
|
+
Jt(La, {}, [], [], !0);
|
|
3681
3684
|
function Ms(e, t) {
|
|
3682
|
-
|
|
3685
|
+
Et(t, !0);
|
|
3683
3686
|
let r = ve(t, "envId", 23, () => {
|
|
3684
3687
|
}), n = ve(t, "token", 23, () => {
|
|
3685
3688
|
});
|
|
3686
3689
|
document.cookie = `akb-audit-handler-envid=${r()}`, document.cookie = `akb-audit-handler-token=${n()}`;
|
|
3687
|
-
var
|
|
3690
|
+
var a = {
|
|
3688
3691
|
get envId() {
|
|
3689
3692
|
return r();
|
|
3690
3693
|
},
|
|
3691
|
-
set envId(
|
|
3692
|
-
r(
|
|
3694
|
+
set envId(i = void 0) {
|
|
3695
|
+
r(i), ie();
|
|
3693
3696
|
},
|
|
3694
3697
|
get token() {
|
|
3695
3698
|
return n();
|
|
3696
3699
|
},
|
|
3697
|
-
set token(
|
|
3698
|
-
n(
|
|
3700
|
+
set token(i = void 0) {
|
|
3701
|
+
n(i), ie();
|
|
3699
3702
|
}
|
|
3700
3703
|
};
|
|
3701
|
-
return
|
|
3704
|
+
return La(e, {}), $t(a);
|
|
3702
3705
|
}
|
|
3703
|
-
customElements.define("akb-audit-handler-component",
|
|
3706
|
+
customElements.define("akb-audit-handler-component", Jt(
|
|
3704
3707
|
Ms,
|
|
3705
3708
|
{
|
|
3706
3709
|
token: { attribute: "aks-token", reflect: !0, type: "String" },
|