@shimmer-from-structure/svelte 2.0.0 → 2.1.1
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/dist/index.esm.js +70 -1821
- package/dist/index.js +13 -13
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,1773 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function Zt(e) {
|
|
17
|
-
for (var n = 0; n < e.length; n++)
|
|
18
|
-
e[n]();
|
|
19
|
-
}
|
|
20
|
-
function Xn() {
|
|
21
|
-
var e, n, t = new Promise((r, i) => {
|
|
22
|
-
e = r, n = i;
|
|
23
|
-
});
|
|
24
|
-
return { promise: t, resolve: e, reject: n };
|
|
25
|
-
}
|
|
26
|
-
const S = 2, $e = 4, fn = 8, Wn = 1 << 24, ie = 16, $ = 32, Oe = 64, Zn = 128, H = 512, A = 1024, N = 2048, ce = 4096, B = 8192, se = 16384, kn = 32768, Ne = 65536, Pn = 1 << 17, Jn = 1 << 18, sn = 1 << 19, Jt = 1 << 20, fe = 1 << 25, ge = 32768, _n = 1 << 21, Cn = 1 << 22, ue = 1 << 23, Je = Symbol("$state"), ke = new class extends Error {
|
|
27
|
-
constructor() {
|
|
28
|
-
super(...arguments);
|
|
29
|
-
ee(this, "name", "StaleReactionError");
|
|
30
|
-
ee(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
31
|
-
}
|
|
32
|
-
}();
|
|
33
|
-
function Qt() {
|
|
34
|
-
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
35
|
-
}
|
|
36
|
-
function $t(e) {
|
|
37
|
-
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
38
|
-
}
|
|
39
|
-
function er() {
|
|
40
|
-
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
41
|
-
}
|
|
42
|
-
function nr(e) {
|
|
43
|
-
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
44
|
-
}
|
|
45
|
-
function tr() {
|
|
46
|
-
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
47
|
-
}
|
|
48
|
-
function rr() {
|
|
49
|
-
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
50
|
-
}
|
|
51
|
-
function ir() {
|
|
52
|
-
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
53
|
-
}
|
|
54
|
-
function lr() {
|
|
55
|
-
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
56
|
-
}
|
|
57
|
-
function Qn(e) {
|
|
58
|
-
return e === this.v;
|
|
59
|
-
}
|
|
60
|
-
function fr(e, n) {
|
|
61
|
-
return e != e ? n == n : e !== n || e !== null && typeof e == "object" || typeof e == "function";
|
|
62
|
-
}
|
|
63
|
-
function $n(e) {
|
|
64
|
-
return !fr(e, this.v);
|
|
65
|
-
}
|
|
66
|
-
let sr = !1, J = null;
|
|
67
|
-
function en(e) {
|
|
68
|
-
J = e;
|
|
69
|
-
}
|
|
70
|
-
function ur(e, n = !1, t) {
|
|
71
|
-
J = {
|
|
72
|
-
p: J,
|
|
73
|
-
i: !1,
|
|
74
|
-
c: null,
|
|
75
|
-
e: null,
|
|
76
|
-
s: e,
|
|
77
|
-
x: null,
|
|
78
|
-
l: null
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function or(e) {
|
|
82
|
-
var n = (
|
|
83
|
-
/** @type {ComponentContext} */
|
|
84
|
-
J
|
|
85
|
-
), t = n.e;
|
|
86
|
-
if (t !== null) {
|
|
87
|
-
n.e = null;
|
|
88
|
-
for (var r of t)
|
|
89
|
-
vt(r);
|
|
90
|
-
}
|
|
91
|
-
return e !== void 0 && (n.x = e), n.i = !0, J = n.p, e ?? /** @type {T} */
|
|
92
|
-
{};
|
|
93
|
-
}
|
|
94
|
-
function et() {
|
|
95
|
-
return !0;
|
|
96
|
-
}
|
|
97
|
-
let Ce = [];
|
|
98
|
-
function ar() {
|
|
99
|
-
var e = Ce;
|
|
100
|
-
Ce = [], Zt(e);
|
|
101
|
-
}
|
|
102
|
-
function pn(e) {
|
|
103
|
-
if (Ce.length === 0) {
|
|
104
|
-
var n = Ce;
|
|
105
|
-
queueMicrotask(() => {
|
|
106
|
-
n === Ce && ar();
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
Ce.push(e);
|
|
110
|
-
}
|
|
111
|
-
function cr(e) {
|
|
112
|
-
var n = E;
|
|
113
|
-
if (n === null)
|
|
114
|
-
return p.f |= ue, e;
|
|
115
|
-
if (n.f & kn)
|
|
116
|
-
nn(e, n);
|
|
117
|
-
else {
|
|
118
|
-
if (!(n.f & Zn))
|
|
119
|
-
throw e;
|
|
120
|
-
n.b.error(e);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function nn(e, n) {
|
|
124
|
-
for (; n !== null; ) {
|
|
125
|
-
if (n.f & Zn)
|
|
126
|
-
try {
|
|
127
|
-
n.b.error(e);
|
|
128
|
-
return;
|
|
129
|
-
} catch (t) {
|
|
130
|
-
e = t;
|
|
131
|
-
}
|
|
132
|
-
n = n.parent;
|
|
133
|
-
}
|
|
134
|
-
throw e;
|
|
135
|
-
}
|
|
136
|
-
const vr = -7169;
|
|
137
|
-
function F(e, n) {
|
|
138
|
-
e.f = e.f & vr | n;
|
|
139
|
-
}
|
|
140
|
-
function Rn(e) {
|
|
141
|
-
e.f & H || e.deps === null ? F(e, A) : F(e, ce);
|
|
142
|
-
}
|
|
143
|
-
function nt(e) {
|
|
144
|
-
if (e !== null)
|
|
145
|
-
for (const n of e)
|
|
146
|
-
!(n.f & S) || !(n.f & ge) || (n.f ^= ge, nt(
|
|
147
|
-
/** @type {Derived} */
|
|
148
|
-
n.deps
|
|
149
|
-
));
|
|
150
|
-
}
|
|
151
|
-
function dr(e, n, t) {
|
|
152
|
-
e.f & N ? n.add(e) : e.f & ce && t.add(e), nt(e.deps), F(e, A);
|
|
153
|
-
}
|
|
154
|
-
const Xe = /* @__PURE__ */ new Set();
|
|
155
|
-
let w = null, R = null, V = [], Sn = null, mn = !1;
|
|
156
|
-
var Te, Ae, he, Fe, Ye, ze, _e, De, Q, gn, wn, tt;
|
|
157
|
-
const In = class In {
|
|
158
|
-
constructor() {
|
|
159
|
-
k(this, Q);
|
|
160
|
-
ee(this, "committed", !1);
|
|
161
|
-
/**
|
|
162
|
-
* The current values of any sources that are updated in this batch
|
|
163
|
-
* They keys of this map are identical to `this.#previous`
|
|
164
|
-
* @type {Map<Source, any>}
|
|
165
|
-
*/
|
|
166
|
-
ee(this, "current", /* @__PURE__ */ new Map());
|
|
167
|
-
/**
|
|
168
|
-
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
169
|
-
* They keys of this map are identical to `this.#current`
|
|
170
|
-
* @type {Map<Source, any>}
|
|
171
|
-
*/
|
|
172
|
-
ee(this, "previous", /* @__PURE__ */ new Map());
|
|
173
|
-
/**
|
|
174
|
-
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
175
|
-
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
176
|
-
* @type {Set<() => void>}
|
|
177
|
-
*/
|
|
178
|
-
k(this, Te, /* @__PURE__ */ new Set());
|
|
179
|
-
/**
|
|
180
|
-
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
181
|
-
* @type {Set<(batch: Batch) => void>}
|
|
182
|
-
*/
|
|
183
|
-
k(this, Ae, /* @__PURE__ */ new Set());
|
|
184
|
-
/**
|
|
185
|
-
* The number of async effects that are currently in flight
|
|
186
|
-
*/
|
|
187
|
-
k(this, he, 0);
|
|
188
|
-
/**
|
|
189
|
-
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
190
|
-
*/
|
|
191
|
-
k(this, Fe, 0);
|
|
192
|
-
/**
|
|
193
|
-
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
194
|
-
* TODO replace with Promise.withResolvers once supported widely enough
|
|
195
|
-
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
196
|
-
*/
|
|
197
|
-
k(this, Ye, null);
|
|
198
|
-
/**
|
|
199
|
-
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
200
|
-
* @type {Set<Effect>}
|
|
201
|
-
*/
|
|
202
|
-
k(this, ze, /* @__PURE__ */ new Set());
|
|
203
|
-
/**
|
|
204
|
-
* Deferred effects that are MAYBE_DIRTY
|
|
205
|
-
* @type {Set<Effect>}
|
|
206
|
-
*/
|
|
207
|
-
k(this, _e, /* @__PURE__ */ new Set());
|
|
208
|
-
/**
|
|
209
|
-
* A set of branches that still exist, but will be destroyed when this batch
|
|
210
|
-
* is committed — we skip over these during `process`
|
|
211
|
-
* @type {Set<Effect>}
|
|
212
|
-
*/
|
|
213
|
-
ee(this, "skipped_effects", /* @__PURE__ */ new Set());
|
|
214
|
-
ee(this, "is_fork", !1);
|
|
215
|
-
k(this, De, !1);
|
|
216
|
-
}
|
|
217
|
-
is_deferred() {
|
|
218
|
-
return this.is_fork || h(this, Fe) > 0;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
*
|
|
222
|
-
* @param {Effect[]} root_effects
|
|
223
|
-
*/
|
|
224
|
-
process(n) {
|
|
225
|
-
var i;
|
|
226
|
-
V = [], this.apply();
|
|
227
|
-
var t = [], r = [];
|
|
228
|
-
for (const l of n)
|
|
229
|
-
be(this, Q, gn).call(this, l, t, r);
|
|
230
|
-
if (this.is_deferred())
|
|
231
|
-
be(this, Q, wn).call(this, r), be(this, Q, wn).call(this, t);
|
|
232
|
-
else {
|
|
233
|
-
for (const l of h(this, Te)) l();
|
|
234
|
-
h(this, Te).clear(), h(this, he) === 0 && be(this, Q, tt).call(this), w = null, Bn(r), Bn(t), (i = h(this, Ye)) == null || i.resolve();
|
|
235
|
-
}
|
|
236
|
-
R = null;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Associate a change to a given source with the current
|
|
240
|
-
* batch, noting its previous and current values
|
|
241
|
-
* @param {Source} source
|
|
242
|
-
* @param {any} value
|
|
243
|
-
*/
|
|
244
|
-
capture(n, t) {
|
|
245
|
-
t !== C && !this.previous.has(n) && this.previous.set(n, t), n.f & ue || (this.current.set(n, n.v), R == null || R.set(n, n.v));
|
|
246
|
-
}
|
|
247
|
-
activate() {
|
|
248
|
-
w = this, this.apply();
|
|
249
|
-
}
|
|
250
|
-
deactivate() {
|
|
251
|
-
w === this && (w = null, R = null);
|
|
252
|
-
}
|
|
253
|
-
flush() {
|
|
254
|
-
if (this.activate(), V.length > 0) {
|
|
255
|
-
if (hr(), w !== null && w !== this)
|
|
256
|
-
return;
|
|
257
|
-
} else h(this, he) === 0 && this.process([]);
|
|
258
|
-
this.deactivate();
|
|
259
|
-
}
|
|
260
|
-
discard() {
|
|
261
|
-
for (const n of h(this, Ae)) n(this);
|
|
262
|
-
h(this, Ae).clear();
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
*
|
|
266
|
-
* @param {boolean} blocking
|
|
267
|
-
*/
|
|
268
|
-
increment(n) {
|
|
269
|
-
ne(this, he, h(this, he) + 1), n && ne(this, Fe, h(this, Fe) + 1);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
273
|
-
* @param {boolean} blocking
|
|
274
|
-
*/
|
|
275
|
-
decrement(n) {
|
|
276
|
-
ne(this, he, h(this, he) - 1), n && ne(this, Fe, h(this, Fe) - 1), !h(this, De) && (ne(this, De, !0), pn(() => {
|
|
277
|
-
ne(this, De, !1), this.is_deferred() ? V.length > 0 && this.flush() : this.revive();
|
|
278
|
-
}));
|
|
279
|
-
}
|
|
280
|
-
revive() {
|
|
281
|
-
for (const n of h(this, ze))
|
|
282
|
-
h(this, _e).delete(n), F(n, N), we(n);
|
|
283
|
-
for (const n of h(this, _e))
|
|
284
|
-
F(n, ce), we(n);
|
|
285
|
-
this.flush();
|
|
286
|
-
}
|
|
287
|
-
/** @param {() => void} fn */
|
|
288
|
-
oncommit(n) {
|
|
289
|
-
h(this, Te).add(n);
|
|
290
|
-
}
|
|
291
|
-
/** @param {(batch: Batch) => void} fn */
|
|
292
|
-
ondiscard(n) {
|
|
293
|
-
h(this, Ae).add(n);
|
|
294
|
-
}
|
|
295
|
-
settled() {
|
|
296
|
-
return (h(this, Ye) ?? ne(this, Ye, Xn())).promise;
|
|
297
|
-
}
|
|
298
|
-
static ensure() {
|
|
299
|
-
if (w === null) {
|
|
300
|
-
const n = w = new In();
|
|
301
|
-
Xe.add(w), pn(() => {
|
|
302
|
-
w === n && n.flush();
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
return w;
|
|
306
|
-
}
|
|
307
|
-
apply() {
|
|
308
|
-
}
|
|
309
|
-
};
|
|
310
|
-
Te = new WeakMap(), Ae = new WeakMap(), he = new WeakMap(), Fe = new WeakMap(), Ye = new WeakMap(), ze = new WeakMap(), _e = new WeakMap(), De = new WeakMap(), Q = new WeakSet(), /**
|
|
311
|
-
* Traverse the effect tree, executing effects or stashing
|
|
312
|
-
* them for later execution as appropriate
|
|
313
|
-
* @param {Effect} root
|
|
314
|
-
* @param {Effect[]} effects
|
|
315
|
-
* @param {Effect[]} render_effects
|
|
316
|
-
*/
|
|
317
|
-
gn = function(n, t, r) {
|
|
318
|
-
n.f ^= A;
|
|
319
|
-
for (var i = n.first, l = null; i !== null; ) {
|
|
320
|
-
var u = i.f, f = (u & ($ | Oe)) !== 0, o = f && (u & A) !== 0, s = o || (u & B) !== 0 || this.skipped_effects.has(i);
|
|
321
|
-
if (!s && i.fn !== null) {
|
|
322
|
-
f ? i.f ^= A : l !== null && u & ($e | fn | Wn) ? l.b.defer_effect(i) : u & $e ? t.push(i) : Ge(i) && (u & ie && h(this, _e).add(i), He(i));
|
|
323
|
-
var a = i.first;
|
|
324
|
-
if (a !== null) {
|
|
325
|
-
i = a;
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
var v = i.parent;
|
|
330
|
-
for (i = i.next; i === null && v !== null; )
|
|
331
|
-
v === l && (l = null), i = v.next, v = v.parent;
|
|
332
|
-
}
|
|
333
|
-
}, /**
|
|
334
|
-
* @param {Effect[]} effects
|
|
335
|
-
*/
|
|
336
|
-
wn = function(n) {
|
|
337
|
-
for (var t = 0; t < n.length; t += 1)
|
|
338
|
-
dr(n[t], h(this, ze), h(this, _e));
|
|
339
|
-
}, tt = function() {
|
|
340
|
-
var i;
|
|
341
|
-
if (Xe.size > 1) {
|
|
342
|
-
this.previous.clear();
|
|
343
|
-
var n = R, t = !0;
|
|
344
|
-
for (const l of Xe) {
|
|
345
|
-
if (l === this) {
|
|
346
|
-
t = !1;
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
const u = [];
|
|
350
|
-
for (const [o, s] of this.current) {
|
|
351
|
-
if (l.current.has(o))
|
|
352
|
-
if (t && s !== l.current.get(o))
|
|
353
|
-
l.current.set(o, s);
|
|
354
|
-
else
|
|
355
|
-
continue;
|
|
356
|
-
u.push(o);
|
|
357
|
-
}
|
|
358
|
-
if (u.length === 0)
|
|
359
|
-
continue;
|
|
360
|
-
const f = [...l.current.keys()].filter((o) => !this.current.has(o));
|
|
361
|
-
if (f.length > 0) {
|
|
362
|
-
var r = V;
|
|
363
|
-
V = [];
|
|
364
|
-
const o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map();
|
|
365
|
-
for (const a of u)
|
|
366
|
-
rt(a, f, o, s);
|
|
367
|
-
if (V.length > 0) {
|
|
368
|
-
w = l, l.apply();
|
|
369
|
-
for (const a of V)
|
|
370
|
-
be(i = l, Q, gn).call(i, a, [], []);
|
|
371
|
-
l.deactivate();
|
|
372
|
-
}
|
|
373
|
-
V = r;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
w = null, R = n;
|
|
377
|
-
}
|
|
378
|
-
this.committed = !0, Xe.delete(this);
|
|
379
|
-
};
|
|
380
|
-
let tn = In;
|
|
381
|
-
function hr() {
|
|
382
|
-
mn = !0;
|
|
383
|
-
var e = null;
|
|
384
|
-
try {
|
|
385
|
-
for (var n = 0; V.length > 0; ) {
|
|
386
|
-
var t = tn.ensure();
|
|
387
|
-
if (n++ > 1e3) {
|
|
388
|
-
var r, i;
|
|
389
|
-
_r();
|
|
390
|
-
}
|
|
391
|
-
t.process(V), oe.clear();
|
|
392
|
-
}
|
|
393
|
-
} finally {
|
|
394
|
-
mn = !1, Sn = null;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function _r() {
|
|
398
|
-
try {
|
|
399
|
-
tr();
|
|
400
|
-
} catch (e) {
|
|
401
|
-
nn(e, Sn);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
let z = null;
|
|
405
|
-
function Bn(e) {
|
|
406
|
-
var n = e.length;
|
|
407
|
-
if (n !== 0) {
|
|
408
|
-
for (var t = 0; t < n; ) {
|
|
409
|
-
var r = e[t++];
|
|
410
|
-
if (!(r.f & (se | B)) && Ge(r) && (z = /* @__PURE__ */ new Set(), He(r), r.deps === null && r.first === null && r.nodes === null && (r.teardown === null && r.ac === null ? pt(r) : r.fn = null), (z == null ? void 0 : z.size) > 0)) {
|
|
411
|
-
oe.clear();
|
|
412
|
-
for (const i of z) {
|
|
413
|
-
if (i.f & (se | B)) continue;
|
|
414
|
-
const l = [i];
|
|
415
|
-
let u = i.parent;
|
|
416
|
-
for (; u !== null; )
|
|
417
|
-
z.has(u) && (z.delete(u), l.push(u)), u = u.parent;
|
|
418
|
-
for (let f = l.length - 1; f >= 0; f--) {
|
|
419
|
-
const o = l[f];
|
|
420
|
-
o.f & (se | B) || He(o);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
z.clear();
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
z = null;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
function rt(e, n, t, r) {
|
|
430
|
-
if (!t.has(e) && (t.add(e), e.reactions !== null))
|
|
431
|
-
for (const i of e.reactions) {
|
|
432
|
-
const l = i.f;
|
|
433
|
-
l & S ? rt(
|
|
434
|
-
/** @type {Derived} */
|
|
435
|
-
i,
|
|
436
|
-
n,
|
|
437
|
-
t,
|
|
438
|
-
r
|
|
439
|
-
) : l & (Cn | ie) && !(l & N) && it(i, n, r) && (F(i, N), we(
|
|
440
|
-
/** @type {Effect} */
|
|
441
|
-
i
|
|
442
|
-
));
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
function it(e, n, t) {
|
|
446
|
-
const r = t.get(e);
|
|
447
|
-
if (r !== void 0) return r;
|
|
448
|
-
if (e.deps !== null)
|
|
449
|
-
for (const i of e.deps) {
|
|
450
|
-
if (Me.call(n, i))
|
|
451
|
-
return !0;
|
|
452
|
-
if (i.f & S && it(
|
|
453
|
-
/** @type {Derived} */
|
|
454
|
-
i,
|
|
455
|
-
n,
|
|
456
|
-
t
|
|
457
|
-
))
|
|
458
|
-
return t.set(
|
|
459
|
-
/** @type {Derived} */
|
|
460
|
-
i,
|
|
461
|
-
!0
|
|
462
|
-
), !0;
|
|
463
|
-
}
|
|
464
|
-
return t.set(e, !1), !1;
|
|
465
|
-
}
|
|
466
|
-
function we(e) {
|
|
467
|
-
for (var n = Sn = e; n.parent !== null; ) {
|
|
468
|
-
n = n.parent;
|
|
469
|
-
var t = n.f;
|
|
470
|
-
if (mn && n === E && t & ie && !(t & Jn))
|
|
471
|
-
return;
|
|
472
|
-
if (t & (Oe | $)) {
|
|
473
|
-
if (!(t & A)) return;
|
|
474
|
-
n.f ^= A;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
V.push(n);
|
|
478
|
-
}
|
|
479
|
-
function pr(e, n, t, r) {
|
|
480
|
-
const i = Tn;
|
|
481
|
-
var l = e.filter((d) => !d.settled);
|
|
482
|
-
if (t.length === 0 && l.length === 0) {
|
|
483
|
-
r(n.map(i));
|
|
484
|
-
return;
|
|
485
|
-
}
|
|
486
|
-
var u = w, f = (
|
|
487
|
-
/** @type {Effect} */
|
|
488
|
-
E
|
|
489
|
-
), o = mr(), s = l.length === 1 ? l[0].promise : l.length > 1 ? Promise.all(l.map((d) => d.promise)) : null;
|
|
490
|
-
function a(d) {
|
|
491
|
-
o();
|
|
492
|
-
try {
|
|
493
|
-
r(d);
|
|
494
|
-
} catch (_) {
|
|
495
|
-
f.f & se || nn(_, f);
|
|
496
|
-
}
|
|
497
|
-
u == null || u.deactivate(), En();
|
|
498
|
-
}
|
|
499
|
-
if (t.length === 0) {
|
|
500
|
-
s.then(() => a(n.map(i)));
|
|
501
|
-
return;
|
|
502
|
-
}
|
|
503
|
-
function v() {
|
|
504
|
-
o(), Promise.all(t.map((d) => /* @__PURE__ */ gr(d))).then((d) => a([...n.map(i), ...d])).catch((d) => nn(d, f));
|
|
505
|
-
}
|
|
506
|
-
s ? s.then(v) : v();
|
|
507
|
-
}
|
|
508
|
-
function mr() {
|
|
509
|
-
var e = E, n = p, t = J, r = w;
|
|
510
|
-
return function(l = !0) {
|
|
511
|
-
Ie(e), ae(n), en(t), l && (r == null || r.activate());
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
function En() {
|
|
515
|
-
Ie(null), ae(null), en(null);
|
|
516
|
-
}
|
|
517
|
-
// @__NO_SIDE_EFFECTS__
|
|
518
|
-
function Tn(e) {
|
|
519
|
-
var n = S | N, t = p !== null && p.f & S ? (
|
|
520
|
-
/** @type {Derived} */
|
|
521
|
-
p
|
|
522
|
-
) : null;
|
|
523
|
-
return E !== null && (E.f |= sn), {
|
|
524
|
-
ctx: J,
|
|
525
|
-
deps: null,
|
|
526
|
-
effects: null,
|
|
527
|
-
equals: Qn,
|
|
528
|
-
f: n,
|
|
529
|
-
fn: e,
|
|
530
|
-
reactions: null,
|
|
531
|
-
rv: 0,
|
|
532
|
-
v: (
|
|
533
|
-
/** @type {V} */
|
|
534
|
-
C
|
|
535
|
-
),
|
|
536
|
-
wv: 0,
|
|
537
|
-
parent: t ?? E,
|
|
538
|
-
ac: null
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
// @__NO_SIDE_EFFECTS__
|
|
542
|
-
function gr(e, n, t) {
|
|
543
|
-
let r = (
|
|
544
|
-
/** @type {Effect | null} */
|
|
545
|
-
E
|
|
546
|
-
);
|
|
547
|
-
r === null && Qt();
|
|
548
|
-
var i = (
|
|
549
|
-
/** @type {Boundary} */
|
|
550
|
-
r.b
|
|
551
|
-
), l = (
|
|
552
|
-
/** @type {Promise<V>} */
|
|
553
|
-
/** @type {unknown} */
|
|
554
|
-
void 0
|
|
555
|
-
), u = qe(
|
|
556
|
-
/** @type {V} */
|
|
557
|
-
C
|
|
558
|
-
), f = !p, o = /* @__PURE__ */ new Map();
|
|
559
|
-
return Mr(() => {
|
|
560
|
-
var _;
|
|
561
|
-
var s = Xn();
|
|
562
|
-
l = s.promise;
|
|
563
|
-
try {
|
|
564
|
-
Promise.resolve(e()).then(s.resolve, s.reject).then(() => {
|
|
565
|
-
a === w && a.committed && a.deactivate(), En();
|
|
566
|
-
});
|
|
567
|
-
} catch (c) {
|
|
568
|
-
s.reject(c), En();
|
|
569
|
-
}
|
|
570
|
-
var a = (
|
|
571
|
-
/** @type {Batch} */
|
|
572
|
-
w
|
|
573
|
-
);
|
|
574
|
-
if (f) {
|
|
575
|
-
var v = i.is_rendered();
|
|
576
|
-
i.update_pending_count(1), a.increment(v), (_ = o.get(a)) == null || _.reject(ke), o.delete(a), o.set(a, s);
|
|
577
|
-
}
|
|
578
|
-
const d = (c, m = void 0) => {
|
|
579
|
-
if (a.activate(), m)
|
|
580
|
-
m !== ke && (u.f |= ue, Le(u, m));
|
|
581
|
-
else {
|
|
582
|
-
u.f & ue && (u.f ^= ue), Le(u, c);
|
|
583
|
-
for (const [y, D] of o) {
|
|
584
|
-
if (o.delete(y), y === a) break;
|
|
585
|
-
D.reject(ke);
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
f && (i.update_pending_count(-1), a.decrement(v));
|
|
589
|
-
};
|
|
590
|
-
s.promise.then(d, (c) => d(null, c || "unknown"));
|
|
591
|
-
}), Fr(() => {
|
|
592
|
-
for (const s of o.values())
|
|
593
|
-
s.reject(ke);
|
|
594
|
-
}), new Promise((s) => {
|
|
595
|
-
function a(v) {
|
|
596
|
-
function d() {
|
|
597
|
-
v === l ? s(u) : a(l);
|
|
598
|
-
}
|
|
599
|
-
v.then(d, d);
|
|
600
|
-
}
|
|
601
|
-
a(l);
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
// @__NO_SIDE_EFFECTS__
|
|
605
|
-
function We(e) {
|
|
606
|
-
const n = /* @__PURE__ */ Tn(e);
|
|
607
|
-
return wt(n), n;
|
|
608
|
-
}
|
|
609
|
-
// @__NO_SIDE_EFFECTS__
|
|
610
|
-
function wr(e) {
|
|
611
|
-
const n = /* @__PURE__ */ Tn(e);
|
|
612
|
-
return n.equals = $n, n;
|
|
613
|
-
}
|
|
614
|
-
function lt(e) {
|
|
615
|
-
var n = e.effects;
|
|
616
|
-
if (n !== null) {
|
|
617
|
-
e.effects = null;
|
|
618
|
-
for (var t = 0; t < n.length; t += 1)
|
|
619
|
-
re(
|
|
620
|
-
/** @type {Effect} */
|
|
621
|
-
n[t]
|
|
622
|
-
);
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
function Er(e) {
|
|
626
|
-
for (var n = e.parent; n !== null; ) {
|
|
627
|
-
if (!(n.f & S))
|
|
628
|
-
return n.f & se ? null : (
|
|
629
|
-
/** @type {Effect} */
|
|
630
|
-
n
|
|
631
|
-
);
|
|
632
|
-
n = n.parent;
|
|
633
|
-
}
|
|
634
|
-
return null;
|
|
635
|
-
}
|
|
636
|
-
function An(e) {
|
|
637
|
-
var n, t = E;
|
|
638
|
-
Ie(Er(e));
|
|
639
|
-
try {
|
|
640
|
-
e.f &= ~ge, lt(e), n = xt(e);
|
|
641
|
-
} finally {
|
|
642
|
-
Ie(t);
|
|
643
|
-
}
|
|
644
|
-
return n;
|
|
645
|
-
}
|
|
646
|
-
function ft(e) {
|
|
647
|
-
var n = An(e);
|
|
648
|
-
if (!e.equals(n) && (e.wv = yt(), (!(w != null && w.is_fork) || e.deps === null) && (e.v = n, e.deps === null))) {
|
|
649
|
-
F(e, A);
|
|
650
|
-
return;
|
|
651
|
-
}
|
|
652
|
-
Ee || (R !== null ? (ct() || w != null && w.is_fork) && R.set(e, n) : Rn(e));
|
|
653
|
-
}
|
|
654
|
-
let yn = /* @__PURE__ */ new Set();
|
|
655
|
-
const oe = /* @__PURE__ */ new Map();
|
|
656
|
-
let st = !1;
|
|
657
|
-
function qe(e, n) {
|
|
658
|
-
var t = {
|
|
659
|
-
f: 0,
|
|
660
|
-
// TODO ideally we could skip this altogether, but it causes type errors
|
|
661
|
-
v: e,
|
|
662
|
-
reactions: null,
|
|
663
|
-
equals: Qn,
|
|
664
|
-
rv: 0,
|
|
665
|
-
wv: 0
|
|
666
|
-
};
|
|
667
|
-
return t;
|
|
668
|
-
}
|
|
669
|
-
// @__NO_SIDE_EFFECTS__
|
|
670
|
-
function W(e, n) {
|
|
671
|
-
const t = qe(e);
|
|
672
|
-
return wt(t), t;
|
|
673
|
-
}
|
|
674
|
-
// @__NO_SIDE_EFFECTS__
|
|
675
|
-
function yr(e, n = !1, t = !0) {
|
|
676
|
-
const r = qe(e);
|
|
677
|
-
return n || (r.equals = $n), r;
|
|
678
|
-
}
|
|
679
|
-
function te(e, n, t = !1) {
|
|
680
|
-
p !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
681
|
-
// to ensure we error if state is set inside an inspect effect
|
|
682
|
-
(!K || p.f & Pn) && et() && p.f & (S | ie | Cn | Pn) && (Y === null || !Me.call(Y, e)) && lr();
|
|
683
|
-
let r = t ? Re(n) : n;
|
|
684
|
-
return Le(e, r);
|
|
685
|
-
}
|
|
686
|
-
function Le(e, n) {
|
|
687
|
-
if (!e.equals(n)) {
|
|
688
|
-
var t = e.v;
|
|
689
|
-
Ee ? oe.set(e, n) : oe.set(e, t), e.v = n;
|
|
690
|
-
var r = tn.ensure();
|
|
691
|
-
if (r.capture(e, t), e.f & S) {
|
|
692
|
-
const i = (
|
|
693
|
-
/** @type {Derived} */
|
|
694
|
-
e
|
|
695
|
-
);
|
|
696
|
-
e.f & N && An(i), Rn(i);
|
|
697
|
-
}
|
|
698
|
-
e.wv = yt(), ut(e, N), E !== null && E.f & A && !(E.f & ($ | Oe)) && (U === null ? qr([e]) : U.push(e)), !r.is_fork && yn.size > 0 && !st && br();
|
|
699
|
-
}
|
|
700
|
-
return n;
|
|
701
|
-
}
|
|
702
|
-
function br() {
|
|
703
|
-
st = !1;
|
|
704
|
-
for (const e of yn)
|
|
705
|
-
e.f & A && F(e, ce), Ge(e) && He(e);
|
|
706
|
-
yn.clear();
|
|
707
|
-
}
|
|
708
|
-
function vn(e) {
|
|
709
|
-
te(e, e.v + 1);
|
|
710
|
-
}
|
|
711
|
-
function ut(e, n) {
|
|
712
|
-
var t = e.reactions;
|
|
713
|
-
if (t !== null)
|
|
714
|
-
for (var r = t.length, i = 0; i < r; i++) {
|
|
715
|
-
var l = t[i], u = l.f, f = (u & N) === 0;
|
|
716
|
-
if (f && F(l, n), u & S) {
|
|
717
|
-
var o = (
|
|
718
|
-
/** @type {Derived} */
|
|
719
|
-
l
|
|
720
|
-
);
|
|
721
|
-
R == null || R.delete(o), u & ge || (u & H && (l.f |= ge), ut(o, ce));
|
|
722
|
-
} else f && (u & ie && z !== null && z.add(
|
|
723
|
-
/** @type {Effect} */
|
|
724
|
-
l
|
|
725
|
-
), we(
|
|
726
|
-
/** @type {Effect} */
|
|
727
|
-
l
|
|
728
|
-
));
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
function Re(e) {
|
|
732
|
-
if (typeof e != "object" || e === null || Je in e)
|
|
733
|
-
return e;
|
|
734
|
-
const n = Wt(e);
|
|
735
|
-
if (n !== Gt && n !== Xt)
|
|
736
|
-
return e;
|
|
737
|
-
var t = /* @__PURE__ */ new Map(), r = Gn(e), i = /* @__PURE__ */ W(0), l = me, u = (f) => {
|
|
738
|
-
if (me === l)
|
|
739
|
-
return f();
|
|
740
|
-
var o = p, s = me;
|
|
741
|
-
ae(null), Un(l);
|
|
742
|
-
var a = f();
|
|
743
|
-
return ae(o), Un(s), a;
|
|
744
|
-
};
|
|
745
|
-
return r && t.set("length", /* @__PURE__ */ W(
|
|
746
|
-
/** @type {any[]} */
|
|
747
|
-
e.length
|
|
748
|
-
)), new Proxy(
|
|
749
|
-
/** @type {any} */
|
|
750
|
-
e,
|
|
751
|
-
{
|
|
752
|
-
defineProperty(f, o, s) {
|
|
753
|
-
(!("value" in s) || s.configurable === !1 || s.enumerable === !1 || s.writable === !1) && rr();
|
|
754
|
-
var a = t.get(o);
|
|
755
|
-
return a === void 0 ? a = u(() => {
|
|
756
|
-
var v = /* @__PURE__ */ W(s.value);
|
|
757
|
-
return t.set(o, v), v;
|
|
758
|
-
}) : te(a, s.value, !0), !0;
|
|
759
|
-
},
|
|
760
|
-
deleteProperty(f, o) {
|
|
761
|
-
var s = t.get(o);
|
|
762
|
-
if (s === void 0) {
|
|
763
|
-
if (o in f) {
|
|
764
|
-
const a = u(() => /* @__PURE__ */ W(C));
|
|
765
|
-
t.set(o, a), vn(i);
|
|
766
|
-
}
|
|
767
|
-
} else
|
|
768
|
-
te(s, C), vn(i);
|
|
769
|
-
return !0;
|
|
770
|
-
},
|
|
771
|
-
get(f, o, s) {
|
|
772
|
-
var _;
|
|
773
|
-
if (o === Je)
|
|
774
|
-
return e;
|
|
775
|
-
var a = t.get(o), v = o in f;
|
|
776
|
-
if (a === void 0 && (!v || (_ = cn(f, o)) != null && _.writable) && (a = u(() => {
|
|
777
|
-
var c = Re(v ? f[o] : C), m = /* @__PURE__ */ W(c);
|
|
778
|
-
return m;
|
|
779
|
-
}), t.set(o, a)), a !== void 0) {
|
|
780
|
-
var d = g(a);
|
|
781
|
-
return d === C ? void 0 : d;
|
|
782
|
-
}
|
|
783
|
-
return Reflect.get(f, o, s);
|
|
784
|
-
},
|
|
785
|
-
getOwnPropertyDescriptor(f, o) {
|
|
786
|
-
var s = Reflect.getOwnPropertyDescriptor(f, o);
|
|
787
|
-
if (s && "value" in s) {
|
|
788
|
-
var a = t.get(o);
|
|
789
|
-
a && (s.value = g(a));
|
|
790
|
-
} else if (s === void 0) {
|
|
791
|
-
var v = t.get(o), d = v == null ? void 0 : v.v;
|
|
792
|
-
if (v !== void 0 && d !== C)
|
|
793
|
-
return {
|
|
794
|
-
enumerable: !0,
|
|
795
|
-
configurable: !0,
|
|
796
|
-
value: d,
|
|
797
|
-
writable: !0
|
|
798
|
-
};
|
|
799
|
-
}
|
|
800
|
-
return s;
|
|
801
|
-
},
|
|
802
|
-
has(f, o) {
|
|
803
|
-
var d;
|
|
804
|
-
if (o === Je)
|
|
805
|
-
return !0;
|
|
806
|
-
var s = t.get(o), a = s !== void 0 && s.v !== C || Reflect.has(f, o);
|
|
807
|
-
if (s !== void 0 || E !== null && (!a || (d = cn(f, o)) != null && d.writable)) {
|
|
808
|
-
s === void 0 && (s = u(() => {
|
|
809
|
-
var _ = a ? Re(f[o]) : C, c = /* @__PURE__ */ W(_);
|
|
810
|
-
return c;
|
|
811
|
-
}), t.set(o, s));
|
|
812
|
-
var v = g(s);
|
|
813
|
-
if (v === C)
|
|
814
|
-
return !1;
|
|
815
|
-
}
|
|
816
|
-
return a;
|
|
817
|
-
},
|
|
818
|
-
set(f, o, s, a) {
|
|
819
|
-
var G;
|
|
820
|
-
var v = t.get(o), d = o in f;
|
|
821
|
-
if (r && o === "length")
|
|
822
|
-
for (var _ = s; _ < /** @type {Source<number>} */
|
|
823
|
-
v.v; _ += 1) {
|
|
824
|
-
var c = t.get(_ + "");
|
|
825
|
-
c !== void 0 ? te(c, C) : _ in f && (c = u(() => /* @__PURE__ */ W(C)), t.set(_ + "", c));
|
|
826
|
-
}
|
|
827
|
-
if (v === void 0)
|
|
828
|
-
(!d || (G = cn(f, o)) != null && G.writable) && (v = u(() => /* @__PURE__ */ W(void 0)), te(v, Re(s)), t.set(o, v));
|
|
829
|
-
else {
|
|
830
|
-
d = v.v !== C;
|
|
831
|
-
var m = u(() => Re(s));
|
|
832
|
-
te(v, m);
|
|
833
|
-
}
|
|
834
|
-
var y = Reflect.getOwnPropertyDescriptor(f, o);
|
|
835
|
-
if (y != null && y.set && y.set.call(a, s), !d) {
|
|
836
|
-
if (r && typeof o == "string") {
|
|
837
|
-
var D = (
|
|
838
|
-
/** @type {Source<number>} */
|
|
839
|
-
t.get("length")
|
|
840
|
-
), b = Number(o);
|
|
841
|
-
Number.isInteger(b) && b >= D.v && te(D, b + 1);
|
|
842
|
-
}
|
|
843
|
-
vn(i);
|
|
844
|
-
}
|
|
845
|
-
return !0;
|
|
846
|
-
},
|
|
847
|
-
ownKeys(f) {
|
|
848
|
-
g(i);
|
|
849
|
-
var o = Reflect.ownKeys(f).filter((v) => {
|
|
850
|
-
var d = t.get(v);
|
|
851
|
-
return d === void 0 || d.v !== C;
|
|
852
|
-
});
|
|
853
|
-
for (var [s, a] of t)
|
|
854
|
-
a.v !== C && !(s in f) && o.push(s);
|
|
855
|
-
return o;
|
|
856
|
-
},
|
|
857
|
-
setPrototypeOf() {
|
|
858
|
-
ir();
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
);
|
|
862
|
-
}
|
|
863
|
-
var xr, kr, Cr;
|
|
864
|
-
function Se(e = "") {
|
|
865
|
-
return document.createTextNode(e);
|
|
866
|
-
}
|
|
867
|
-
// @__NO_SIDE_EFFECTS__
|
|
868
|
-
function Fn(e) {
|
|
869
|
-
return (
|
|
870
|
-
/** @type {TemplateNode | null} */
|
|
871
|
-
kr.call(e)
|
|
872
|
-
);
|
|
873
|
-
}
|
|
874
|
-
// @__NO_SIDE_EFFECTS__
|
|
875
|
-
function Ke(e) {
|
|
876
|
-
return (
|
|
877
|
-
/** @type {TemplateNode | null} */
|
|
878
|
-
Cr.call(e)
|
|
879
|
-
);
|
|
880
|
-
}
|
|
881
|
-
function dn(e, n) {
|
|
882
|
-
return /* @__PURE__ */ Fn(e);
|
|
883
|
-
}
|
|
884
|
-
function qn(e, n = !1) {
|
|
885
|
-
{
|
|
886
|
-
var t = /* @__PURE__ */ Fn(e);
|
|
887
|
-
return t instanceof Comment && t.data === "" ? /* @__PURE__ */ Ke(t) : t;
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
function Rr(e, n = 1, t = !1) {
|
|
891
|
-
let r = e;
|
|
892
|
-
for (; n--; )
|
|
893
|
-
r = /** @type {TemplateNode} */
|
|
894
|
-
/* @__PURE__ */ Ke(r);
|
|
895
|
-
return r;
|
|
896
|
-
}
|
|
897
|
-
function Sr(e) {
|
|
898
|
-
e.textContent = "";
|
|
899
|
-
}
|
|
900
|
-
function ot() {
|
|
901
|
-
return !1;
|
|
902
|
-
}
|
|
903
|
-
function at(e) {
|
|
904
|
-
var n = p, t = E;
|
|
905
|
-
ae(null), Ie(null);
|
|
906
|
-
try {
|
|
907
|
-
return e();
|
|
908
|
-
} finally {
|
|
909
|
-
ae(n), Ie(t);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
function Tr(e) {
|
|
913
|
-
E === null && (p === null && nr(), er()), Ee && $t();
|
|
914
|
-
}
|
|
915
|
-
function Ar(e, n) {
|
|
916
|
-
var t = n.last;
|
|
917
|
-
t === null ? n.last = n.first = e : (t.next = e, e.prev = t, n.last = e);
|
|
918
|
-
}
|
|
919
|
-
function ve(e, n, t) {
|
|
920
|
-
var r = E;
|
|
921
|
-
r !== null && r.f & B && (e |= B);
|
|
922
|
-
var i = {
|
|
923
|
-
ctx: J,
|
|
924
|
-
deps: null,
|
|
925
|
-
nodes: null,
|
|
926
|
-
f: e | N | H,
|
|
927
|
-
first: null,
|
|
928
|
-
fn: n,
|
|
929
|
-
last: null,
|
|
930
|
-
next: null,
|
|
931
|
-
parent: r,
|
|
932
|
-
b: r && r.b,
|
|
933
|
-
prev: null,
|
|
934
|
-
teardown: null,
|
|
935
|
-
wv: 0,
|
|
936
|
-
ac: null
|
|
937
|
-
};
|
|
938
|
-
if (t)
|
|
939
|
-
try {
|
|
940
|
-
He(i), i.f |= kn;
|
|
941
|
-
} catch (f) {
|
|
942
|
-
throw re(i), f;
|
|
943
|
-
}
|
|
944
|
-
else n !== null && we(i);
|
|
945
|
-
var l = i;
|
|
946
|
-
if (t && l.deps === null && l.teardown === null && l.nodes === null && l.first === l.last && // either `null`, or a singular child
|
|
947
|
-
!(l.f & sn) && (l = l.first, e & ie && e & Ne && l !== null && (l.f |= Ne)), l !== null && (l.parent = r, r !== null && Ar(l, r), p !== null && p.f & S && !(e & Oe))) {
|
|
948
|
-
var u = (
|
|
949
|
-
/** @type {Derived} */
|
|
950
|
-
p
|
|
951
|
-
);
|
|
952
|
-
(u.effects ?? (u.effects = [])).push(l);
|
|
953
|
-
}
|
|
954
|
-
return i;
|
|
955
|
-
}
|
|
956
|
-
function ct() {
|
|
957
|
-
return p !== null && !K;
|
|
958
|
-
}
|
|
959
|
-
function Fr(e) {
|
|
960
|
-
const n = ve(fn, null, !1);
|
|
961
|
-
return F(n, A), n.teardown = e, n;
|
|
962
|
-
}
|
|
963
|
-
function Dr(e) {
|
|
964
|
-
Tr();
|
|
965
|
-
var n = (
|
|
966
|
-
/** @type {Effect} */
|
|
967
|
-
E.f
|
|
968
|
-
), t = !p && (n & $) !== 0 && (n & kn) === 0;
|
|
969
|
-
if (t) {
|
|
970
|
-
var r = (
|
|
971
|
-
/** @type {ComponentContext} */
|
|
972
|
-
J
|
|
973
|
-
);
|
|
974
|
-
(r.e ?? (r.e = [])).push(e);
|
|
975
|
-
} else
|
|
976
|
-
return vt(e);
|
|
977
|
-
}
|
|
978
|
-
function vt(e) {
|
|
979
|
-
return ve($e | Jt, e, !1);
|
|
980
|
-
}
|
|
981
|
-
function dt(e) {
|
|
982
|
-
return ve($e, e, !1);
|
|
983
|
-
}
|
|
984
|
-
function Mr(e) {
|
|
985
|
-
return ve(Cn | sn, e, !0);
|
|
986
|
-
}
|
|
987
|
-
function Nr(e, n = 0) {
|
|
988
|
-
return ve(fn | n, e, !0);
|
|
989
|
-
}
|
|
990
|
-
function Ir(e, n = [], t = [], r = []) {
|
|
991
|
-
pr(r, n, t, (i) => {
|
|
992
|
-
ve(fn, () => e(...i.map(g)), !0);
|
|
993
|
-
});
|
|
994
|
-
}
|
|
995
|
-
function Dn(e, n = 0) {
|
|
996
|
-
var t = ve(ie | n, e, !0);
|
|
997
|
-
return t;
|
|
998
|
-
}
|
|
999
|
-
function Ue(e) {
|
|
1000
|
-
return ve($ | sn, e, !0);
|
|
1001
|
-
}
|
|
1002
|
-
function ht(e) {
|
|
1003
|
-
var n = e.teardown;
|
|
1004
|
-
if (n !== null) {
|
|
1005
|
-
const t = Ee, r = p;
|
|
1006
|
-
Ln(!0), ae(null);
|
|
1007
|
-
try {
|
|
1008
|
-
n.call(null);
|
|
1009
|
-
} finally {
|
|
1010
|
-
Ln(t), ae(r);
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
function _t(e, n = !1) {
|
|
1015
|
-
var t = e.first;
|
|
1016
|
-
for (e.first = e.last = null; t !== null; ) {
|
|
1017
|
-
const i = t.ac;
|
|
1018
|
-
i !== null && at(() => {
|
|
1019
|
-
i.abort(ke);
|
|
1020
|
-
});
|
|
1021
|
-
var r = t.next;
|
|
1022
|
-
t.f & Oe ? t.parent = null : re(t, n), t = r;
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
function Or(e) {
|
|
1026
|
-
for (var n = e.first; n !== null; ) {
|
|
1027
|
-
var t = n.next;
|
|
1028
|
-
n.f & $ || re(n), n = t;
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
function re(e, n = !0) {
|
|
1032
|
-
var t = !1;
|
|
1033
|
-
(n || e.f & Jn) && e.nodes !== null && e.nodes.end !== null && (Pr(
|
|
1034
|
-
e.nodes.start,
|
|
1035
|
-
/** @type {TemplateNode} */
|
|
1036
|
-
e.nodes.end
|
|
1037
|
-
), t = !0), _t(e, n && !t), rn(e, 0), F(e, se);
|
|
1038
|
-
var r = e.nodes && e.nodes.t;
|
|
1039
|
-
if (r !== null)
|
|
1040
|
-
for (const l of r)
|
|
1041
|
-
l.stop();
|
|
1042
|
-
ht(e);
|
|
1043
|
-
var i = e.parent;
|
|
1044
|
-
i !== null && i.first !== null && pt(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1045
|
-
}
|
|
1046
|
-
function Pr(e, n) {
|
|
1047
|
-
for (; e !== null; ) {
|
|
1048
|
-
var t = e === n ? null : /* @__PURE__ */ Ke(e);
|
|
1049
|
-
e.remove(), e = t;
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
function pt(e) {
|
|
1053
|
-
var n = e.parent, t = e.prev, r = e.next;
|
|
1054
|
-
t !== null && (t.next = r), r !== null && (r.prev = t), n !== null && (n.first === e && (n.first = r), n.last === e && (n.last = t));
|
|
1055
|
-
}
|
|
1056
|
-
function Mn(e, n, t = !0) {
|
|
1057
|
-
var r = [];
|
|
1058
|
-
mt(e, r, !0);
|
|
1059
|
-
var i = () => {
|
|
1060
|
-
t && re(e), n && n();
|
|
1061
|
-
}, l = r.length;
|
|
1062
|
-
if (l > 0) {
|
|
1063
|
-
var u = () => --l || i();
|
|
1064
|
-
for (var f of r)
|
|
1065
|
-
f.out(u);
|
|
1066
|
-
} else
|
|
1067
|
-
i();
|
|
1068
|
-
}
|
|
1069
|
-
function mt(e, n, t) {
|
|
1070
|
-
if (!(e.f & B)) {
|
|
1071
|
-
e.f ^= B;
|
|
1072
|
-
var r = e.nodes && e.nodes.t;
|
|
1073
|
-
if (r !== null)
|
|
1074
|
-
for (const f of r)
|
|
1075
|
-
(f.is_global || t) && n.push(f);
|
|
1076
|
-
for (var i = e.first; i !== null; ) {
|
|
1077
|
-
var l = i.next, u = (i.f & Ne) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1078
|
-
// it means the parent block effect was pruned. In that case,
|
|
1079
|
-
// transparency information was transferred to the branch effect.
|
|
1080
|
-
(i.f & $) !== 0 && (e.f & ie) !== 0;
|
|
1081
|
-
mt(i, n, u ? t : !1), i = l;
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
function Nn(e) {
|
|
1086
|
-
gt(e, !0);
|
|
1087
|
-
}
|
|
1088
|
-
function gt(e, n) {
|
|
1089
|
-
if (e.f & B) {
|
|
1090
|
-
e.f ^= B, e.f & A || (F(e, N), we(e));
|
|
1091
|
-
for (var t = e.first; t !== null; ) {
|
|
1092
|
-
var r = t.next, i = (t.f & Ne) !== 0 || (t.f & $) !== 0;
|
|
1093
|
-
gt(t, i ? n : !1), t = r;
|
|
1094
|
-
}
|
|
1095
|
-
var l = e.nodes && e.nodes.t;
|
|
1096
|
-
if (l !== null)
|
|
1097
|
-
for (const u of l)
|
|
1098
|
-
(u.is_global || n) && u.in();
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
function Br(e, n) {
|
|
1102
|
-
if (e.nodes)
|
|
1103
|
-
for (var t = e.nodes.start, r = e.nodes.end; t !== null; ) {
|
|
1104
|
-
var i = t === r ? null : /* @__PURE__ */ Ke(t);
|
|
1105
|
-
n.append(t), t = i;
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1108
|
-
let Qe = !1, Ee = !1;
|
|
1109
|
-
function Ln(e) {
|
|
1110
|
-
Ee = e;
|
|
1111
|
-
}
|
|
1112
|
-
let p = null, K = !1;
|
|
1113
|
-
function ae(e) {
|
|
1114
|
-
p = e;
|
|
1115
|
-
}
|
|
1116
|
-
let E = null;
|
|
1117
|
-
function Ie(e) {
|
|
1118
|
-
E = e;
|
|
1119
|
-
}
|
|
1120
|
-
let Y = null;
|
|
1121
|
-
function wt(e) {
|
|
1122
|
-
p !== null && (Y === null ? Y = [e] : Y.push(e));
|
|
1123
|
-
}
|
|
1124
|
-
let M = null, O = 0, U = null;
|
|
1125
|
-
function qr(e) {
|
|
1126
|
-
U = e;
|
|
1127
|
-
}
|
|
1128
|
-
let Et = 1, de = 0, me = de;
|
|
1129
|
-
function Un(e) {
|
|
1130
|
-
me = e;
|
|
1131
|
-
}
|
|
1132
|
-
function yt() {
|
|
1133
|
-
return ++Et;
|
|
1134
|
-
}
|
|
1135
|
-
function Ge(e) {
|
|
1136
|
-
var n = e.f;
|
|
1137
|
-
if (n & N)
|
|
1138
|
-
return !0;
|
|
1139
|
-
if (n & S && (e.f &= ~ge), n & ce) {
|
|
1140
|
-
for (var t = (
|
|
1141
|
-
/** @type {Value[]} */
|
|
1142
|
-
e.deps
|
|
1143
|
-
), r = t.length, i = 0; i < r; i++) {
|
|
1144
|
-
var l = t[i];
|
|
1145
|
-
if (Ge(
|
|
1146
|
-
/** @type {Derived} */
|
|
1147
|
-
l
|
|
1148
|
-
) && ft(
|
|
1149
|
-
/** @type {Derived} */
|
|
1150
|
-
l
|
|
1151
|
-
), l.wv > e.wv)
|
|
1152
|
-
return !0;
|
|
1153
|
-
}
|
|
1154
|
-
n & H && // During time traveling we don't want to reset the status so that
|
|
1155
|
-
// traversal of the graph in the other batches still happens
|
|
1156
|
-
R === null && F(e, A);
|
|
1157
|
-
}
|
|
1158
|
-
return !1;
|
|
1159
|
-
}
|
|
1160
|
-
function bt(e, n, t = !0) {
|
|
1161
|
-
var r = e.reactions;
|
|
1162
|
-
if (r !== null && !(Y !== null && Me.call(Y, e)))
|
|
1163
|
-
for (var i = 0; i < r.length; i++) {
|
|
1164
|
-
var l = r[i];
|
|
1165
|
-
l.f & S ? bt(
|
|
1166
|
-
/** @type {Derived} */
|
|
1167
|
-
l,
|
|
1168
|
-
n,
|
|
1169
|
-
!1
|
|
1170
|
-
) : n === l && (t ? F(l, N) : l.f & A && F(l, ce), we(
|
|
1171
|
-
/** @type {Effect} */
|
|
1172
|
-
l
|
|
1173
|
-
));
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
function xt(e) {
|
|
1177
|
-
var c;
|
|
1178
|
-
var n = M, t = O, r = U, i = p, l = Y, u = J, f = K, o = me, s = e.f;
|
|
1179
|
-
M = /** @type {null | Value[]} */
|
|
1180
|
-
null, O = 0, U = null, p = s & ($ | Oe) ? null : e, Y = null, en(e.ctx), K = !1, me = ++de, e.ac !== null && (at(() => {
|
|
1181
|
-
e.ac.abort(ke);
|
|
1182
|
-
}), e.ac = null);
|
|
1183
|
-
try {
|
|
1184
|
-
e.f |= _n;
|
|
1185
|
-
var a = (
|
|
1186
|
-
/** @type {Function} */
|
|
1187
|
-
e.fn
|
|
1188
|
-
), v = a(), d = e.deps;
|
|
1189
|
-
if (M !== null) {
|
|
1190
|
-
var _;
|
|
1191
|
-
if (rn(e, O), d !== null && O > 0)
|
|
1192
|
-
for (d.length = O + M.length, _ = 0; _ < M.length; _++)
|
|
1193
|
-
d[O + _] = M[_];
|
|
1194
|
-
else
|
|
1195
|
-
e.deps = d = M;
|
|
1196
|
-
if (ct() && e.f & H)
|
|
1197
|
-
for (_ = O; _ < d.length; _++)
|
|
1198
|
-
((c = d[_]).reactions ?? (c.reactions = [])).push(e);
|
|
1199
|
-
} else d !== null && O < d.length && (rn(e, O), d.length = O);
|
|
1200
|
-
if (et() && U !== null && !K && d !== null && !(e.f & (S | ce | N)))
|
|
1201
|
-
for (_ = 0; _ < /** @type {Source[]} */
|
|
1202
|
-
U.length; _++)
|
|
1203
|
-
bt(
|
|
1204
|
-
U[_],
|
|
1205
|
-
/** @type {Effect} */
|
|
1206
|
-
e
|
|
1207
|
-
);
|
|
1208
|
-
if (i !== null && i !== e) {
|
|
1209
|
-
if (de++, i.deps !== null)
|
|
1210
|
-
for (let m = 0; m < t; m += 1)
|
|
1211
|
-
i.deps[m].rv = de;
|
|
1212
|
-
if (n !== null)
|
|
1213
|
-
for (const m of n)
|
|
1214
|
-
m.rv = de;
|
|
1215
|
-
U !== null && (r === null ? r = U : r.push(.../** @type {Source[]} */
|
|
1216
|
-
U));
|
|
1217
|
-
}
|
|
1218
|
-
return e.f & ue && (e.f ^= ue), v;
|
|
1219
|
-
} catch (m) {
|
|
1220
|
-
return cr(m);
|
|
1221
|
-
} finally {
|
|
1222
|
-
e.f ^= _n, M = n, O = t, U = r, p = i, Y = l, en(u), K = f, me = o;
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
function Lr(e, n) {
|
|
1226
|
-
let t = n.reactions;
|
|
1227
|
-
if (t !== null) {
|
|
1228
|
-
var r = Kt.call(t, e);
|
|
1229
|
-
if (r !== -1) {
|
|
1230
|
-
var i = t.length - 1;
|
|
1231
|
-
i === 0 ? t = n.reactions = null : (t[r] = t[i], t.pop());
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
if (t === null && n.f & S && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1235
|
-
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1236
|
-
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1237
|
-
(M === null || !Me.call(M, n))) {
|
|
1238
|
-
var l = (
|
|
1239
|
-
/** @type {Derived} */
|
|
1240
|
-
n
|
|
1241
|
-
);
|
|
1242
|
-
l.f & H && (l.f ^= H, l.f &= ~ge), Rn(l), lt(l), rn(l, 0);
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
function rn(e, n) {
|
|
1246
|
-
var t = e.deps;
|
|
1247
|
-
if (t !== null)
|
|
1248
|
-
for (var r = n; r < t.length; r++)
|
|
1249
|
-
Lr(e, t[r]);
|
|
1250
|
-
}
|
|
1251
|
-
function He(e) {
|
|
1252
|
-
var n = e.f;
|
|
1253
|
-
if (!(n & se)) {
|
|
1254
|
-
F(e, A);
|
|
1255
|
-
var t = E, r = Qe;
|
|
1256
|
-
E = e, Qe = !0;
|
|
1257
|
-
try {
|
|
1258
|
-
n & (ie | Wn) ? Or(e) : _t(e), ht(e);
|
|
1259
|
-
var i = xt(e);
|
|
1260
|
-
e.teardown = typeof i == "function" ? i : null, e.wv = Et;
|
|
1261
|
-
var l;
|
|
1262
|
-
hn && sr && e.f & N && e.deps;
|
|
1263
|
-
} finally {
|
|
1264
|
-
Qe = r, E = t;
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
function g(e) {
|
|
1269
|
-
var n = e.f, t = (n & S) !== 0;
|
|
1270
|
-
if (p !== null && !K) {
|
|
1271
|
-
var r = E !== null && (E.f & se) !== 0;
|
|
1272
|
-
if (!r && (Y === null || !Me.call(Y, e))) {
|
|
1273
|
-
var i = p.deps;
|
|
1274
|
-
if (p.f & _n)
|
|
1275
|
-
e.rv < de && (e.rv = de, M === null && i !== null && i[O] === e ? O++ : M === null ? M = [e] : M.push(e));
|
|
1276
|
-
else {
|
|
1277
|
-
(p.deps ?? (p.deps = [])).push(e);
|
|
1278
|
-
var l = e.reactions;
|
|
1279
|
-
l === null ? e.reactions = [p] : Me.call(l, p) || l.push(p);
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
if (Ee && oe.has(e))
|
|
1284
|
-
return oe.get(e);
|
|
1285
|
-
if (t) {
|
|
1286
|
-
var u = (
|
|
1287
|
-
/** @type {Derived} */
|
|
1288
|
-
e
|
|
1289
|
-
);
|
|
1290
|
-
if (Ee) {
|
|
1291
|
-
var f = u.v;
|
|
1292
|
-
return (!(u.f & A) && u.reactions !== null || Ct(u)) && (f = An(u)), oe.set(u, f), f;
|
|
1293
|
-
}
|
|
1294
|
-
var o = (u.f & H) === 0 && !K && p !== null && (Qe || (p.f & H) !== 0), s = u.deps === null;
|
|
1295
|
-
Ge(u) && (o && (u.f |= H), ft(u)), o && !s && kt(u);
|
|
1296
|
-
}
|
|
1297
|
-
if (R != null && R.has(e))
|
|
1298
|
-
return R.get(e);
|
|
1299
|
-
if (e.f & ue)
|
|
1300
|
-
throw e.v;
|
|
1301
|
-
return e.v;
|
|
1302
|
-
}
|
|
1303
|
-
function kt(e) {
|
|
1304
|
-
if (e.deps !== null) {
|
|
1305
|
-
e.f |= H;
|
|
1306
|
-
for (const n of e.deps)
|
|
1307
|
-
(n.reactions ?? (n.reactions = [])).push(e), n.f & S && !(n.f & H) && kt(
|
|
1308
|
-
/** @type {Derived} */
|
|
1309
|
-
n
|
|
1310
|
-
);
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
function Ct(e) {
|
|
1314
|
-
if (e.v === C) return !0;
|
|
1315
|
-
if (e.deps === null) return !1;
|
|
1316
|
-
for (const n of e.deps)
|
|
1317
|
-
if (oe.has(n) || n.f & S && Ct(
|
|
1318
|
-
/** @type {Derived} */
|
|
1319
|
-
n
|
|
1320
|
-
))
|
|
1321
|
-
return !0;
|
|
1322
|
-
return !1;
|
|
1323
|
-
}
|
|
1324
|
-
function Ur(e) {
|
|
1325
|
-
var n = K;
|
|
1326
|
-
try {
|
|
1327
|
-
return K = !0, e();
|
|
1328
|
-
} finally {
|
|
1329
|
-
K = n;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
function Hr(e) {
|
|
1333
|
-
var n = document.createElement("template");
|
|
1334
|
-
return n.innerHTML = e.replaceAll("<!>", "<!---->"), n.content;
|
|
1335
|
-
}
|
|
1336
|
-
function Rt(e, n) {
|
|
1337
|
-
var t = (
|
|
1338
|
-
/** @type {Effect} */
|
|
1339
|
-
E
|
|
1340
|
-
);
|
|
1341
|
-
t.nodes === null && (t.nodes = { start: e, end: n, a: null, t: null });
|
|
1342
|
-
}
|
|
1343
|
-
// @__NO_SIDE_EFFECTS__
|
|
1344
|
-
function St(e, n) {
|
|
1345
|
-
var t = (n & jt) !== 0, r, i = !e.startsWith("<!>");
|
|
1346
|
-
return () => {
|
|
1347
|
-
r === void 0 && (r = Hr(i ? e : "<!>" + e), r = /** @type {TemplateNode} */
|
|
1348
|
-
/* @__PURE__ */ Fn(r));
|
|
1349
|
-
var l = (
|
|
1350
|
-
/** @type {TemplateNode} */
|
|
1351
|
-
t || xr ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1352
|
-
);
|
|
1353
|
-
return Rt(l, l), l;
|
|
1354
|
-
};
|
|
1355
|
-
}
|
|
1356
|
-
function Hn() {
|
|
1357
|
-
var e = document.createDocumentFragment(), n = document.createComment(""), t = Se();
|
|
1358
|
-
return e.append(n, t), Rt(n, t), e;
|
|
1359
|
-
}
|
|
1360
|
-
function Ze(e, n) {
|
|
1361
|
-
e !== null && e.before(
|
|
1362
|
-
/** @type {Node} */
|
|
1363
|
-
n
|
|
1364
|
-
);
|
|
1365
|
-
}
|
|
1366
|
-
var j, Z, P, pe, Ve, je, ln;
|
|
1367
|
-
class Tt {
|
|
1368
|
-
/**
|
|
1369
|
-
* @param {TemplateNode} anchor
|
|
1370
|
-
* @param {boolean} transition
|
|
1371
|
-
*/
|
|
1372
|
-
constructor(n, t = !0) {
|
|
1373
|
-
/** @type {TemplateNode} */
|
|
1374
|
-
ee(this, "anchor");
|
|
1375
|
-
/** @type {Map<Batch, Key>} */
|
|
1376
|
-
k(this, j, /* @__PURE__ */ new Map());
|
|
1377
|
-
/**
|
|
1378
|
-
* Map of keys to effects that are currently rendered in the DOM.
|
|
1379
|
-
* These effects are visible and actively part of the document tree.
|
|
1380
|
-
* Example:
|
|
1381
|
-
* ```
|
|
1382
|
-
* {#if condition}
|
|
1383
|
-
* foo
|
|
1384
|
-
* {:else}
|
|
1385
|
-
* bar
|
|
1386
|
-
* {/if}
|
|
1387
|
-
* ```
|
|
1388
|
-
* Can result in the entries `true->Effect` and `false->Effect`
|
|
1389
|
-
* @type {Map<Key, Effect>}
|
|
1390
|
-
*/
|
|
1391
|
-
k(this, Z, /* @__PURE__ */ new Map());
|
|
1392
|
-
/**
|
|
1393
|
-
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
1394
|
-
* in the DOM, because their insertion is deferred.
|
|
1395
|
-
* @type {Map<Key, Branch>}
|
|
1396
|
-
*/
|
|
1397
|
-
k(this, P, /* @__PURE__ */ new Map());
|
|
1398
|
-
/**
|
|
1399
|
-
* Keys of effects that are currently outroing
|
|
1400
|
-
* @type {Set<Key>}
|
|
1401
|
-
*/
|
|
1402
|
-
k(this, pe, /* @__PURE__ */ new Set());
|
|
1403
|
-
/**
|
|
1404
|
-
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
1405
|
-
* This is necessary for `<svelte:element>`
|
|
1406
|
-
*/
|
|
1407
|
-
k(this, Ve, !0);
|
|
1408
|
-
k(this, je, () => {
|
|
1409
|
-
var n = (
|
|
1410
|
-
/** @type {Batch} */
|
|
1411
|
-
w
|
|
1412
|
-
);
|
|
1413
|
-
if (h(this, j).has(n)) {
|
|
1414
|
-
var t = (
|
|
1415
|
-
/** @type {Key} */
|
|
1416
|
-
h(this, j).get(n)
|
|
1417
|
-
), r = h(this, Z).get(t);
|
|
1418
|
-
if (r)
|
|
1419
|
-
Nn(r), h(this, pe).delete(t);
|
|
1420
|
-
else {
|
|
1421
|
-
var i = h(this, P).get(t);
|
|
1422
|
-
i && (h(this, Z).set(t, i.effect), h(this, P).delete(t), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
|
|
1423
|
-
}
|
|
1424
|
-
for (const [l, u] of h(this, j)) {
|
|
1425
|
-
if (h(this, j).delete(l), l === n)
|
|
1426
|
-
break;
|
|
1427
|
-
const f = h(this, P).get(u);
|
|
1428
|
-
f && (re(f.effect), h(this, P).delete(u));
|
|
1429
|
-
}
|
|
1430
|
-
for (const [l, u] of h(this, Z)) {
|
|
1431
|
-
if (l === t || h(this, pe).has(l)) continue;
|
|
1432
|
-
const f = () => {
|
|
1433
|
-
if (Array.from(h(this, j).values()).includes(l)) {
|
|
1434
|
-
var s = document.createDocumentFragment();
|
|
1435
|
-
Br(u, s), s.append(Se()), h(this, P).set(l, { effect: u, fragment: s });
|
|
1436
|
-
} else
|
|
1437
|
-
re(u);
|
|
1438
|
-
h(this, pe).delete(l), h(this, Z).delete(l);
|
|
1439
|
-
};
|
|
1440
|
-
h(this, Ve) || !r ? (h(this, pe).add(l), Mn(u, f, !1)) : f();
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
});
|
|
1444
|
-
/**
|
|
1445
|
-
* @param {Batch} batch
|
|
1446
|
-
*/
|
|
1447
|
-
k(this, ln, (n) => {
|
|
1448
|
-
h(this, j).delete(n);
|
|
1449
|
-
const t = Array.from(h(this, j).values());
|
|
1450
|
-
for (const [r, i] of h(this, P))
|
|
1451
|
-
t.includes(r) || (re(i.effect), h(this, P).delete(r));
|
|
1452
|
-
});
|
|
1453
|
-
this.anchor = n, ne(this, Ve, t);
|
|
1454
|
-
}
|
|
1455
|
-
/**
|
|
1456
|
-
*
|
|
1457
|
-
* @param {any} key
|
|
1458
|
-
* @param {null | ((target: TemplateNode) => void)} fn
|
|
1459
|
-
*/
|
|
1460
|
-
ensure(n, t) {
|
|
1461
|
-
var r = (
|
|
1462
|
-
/** @type {Batch} */
|
|
1463
|
-
w
|
|
1464
|
-
), i = ot();
|
|
1465
|
-
if (t && !h(this, Z).has(n) && !h(this, P).has(n))
|
|
1466
|
-
if (i) {
|
|
1467
|
-
var l = document.createDocumentFragment(), u = Se();
|
|
1468
|
-
l.append(u), h(this, P).set(n, {
|
|
1469
|
-
effect: Ue(() => t(u)),
|
|
1470
|
-
fragment: l
|
|
1471
|
-
});
|
|
1472
|
-
} else
|
|
1473
|
-
h(this, Z).set(
|
|
1474
|
-
n,
|
|
1475
|
-
Ue(() => t(this.anchor))
|
|
1476
|
-
);
|
|
1477
|
-
if (h(this, j).set(r, n), i) {
|
|
1478
|
-
for (const [f, o] of h(this, Z))
|
|
1479
|
-
f === n ? r.skipped_effects.delete(o) : r.skipped_effects.add(o);
|
|
1480
|
-
for (const [f, o] of h(this, P))
|
|
1481
|
-
f === n ? r.skipped_effects.delete(o.effect) : r.skipped_effects.add(o.effect);
|
|
1482
|
-
r.oncommit(h(this, je)), r.ondiscard(h(this, ln));
|
|
1483
|
-
} else
|
|
1484
|
-
h(this, je).call(this);
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
j = new WeakMap(), Z = new WeakMap(), P = new WeakMap(), pe = new WeakMap(), Ve = new WeakMap(), je = new WeakMap(), ln = new WeakMap();
|
|
1488
|
-
function Yn(e, n, ...t) {
|
|
1489
|
-
var r = new Tt(e);
|
|
1490
|
-
Dn(() => {
|
|
1491
|
-
const i = n() ?? null;
|
|
1492
|
-
r.ensure(i, i && ((l) => i(l, ...t)));
|
|
1493
|
-
}, Ne);
|
|
1494
|
-
}
|
|
1495
|
-
function Yr(e, n, t = !1) {
|
|
1496
|
-
var r = new Tt(e), i = t ? Ne : 0;
|
|
1497
|
-
function l(u, f) {
|
|
1498
|
-
r.ensure(u, f);
|
|
1499
|
-
}
|
|
1500
|
-
Dn(() => {
|
|
1501
|
-
var u = !1;
|
|
1502
|
-
n((f, o = !0) => {
|
|
1503
|
-
u = !0, l(o, f);
|
|
1504
|
-
}), u || l(!1, null);
|
|
1505
|
-
}, i);
|
|
1506
|
-
}
|
|
1507
|
-
function zr(e, n) {
|
|
1508
|
-
return n;
|
|
1509
|
-
}
|
|
1510
|
-
function Vr(e, n, t) {
|
|
1511
|
-
for (var r = [], i = n.length, l, u = n.length, f = 0; f < i; f++) {
|
|
1512
|
-
let v = n[f];
|
|
1513
|
-
Mn(
|
|
1514
|
-
v,
|
|
1515
|
-
() => {
|
|
1516
|
-
if (l) {
|
|
1517
|
-
if (l.pending.delete(v), l.done.add(v), l.pending.size === 0) {
|
|
1518
|
-
var d = (
|
|
1519
|
-
/** @type {Set<EachOutroGroup>} */
|
|
1520
|
-
e.outrogroups
|
|
1521
|
-
);
|
|
1522
|
-
bn(xn(l.done)), d.delete(l), d.size === 0 && (e.outrogroups = null);
|
|
1523
|
-
}
|
|
1524
|
-
} else
|
|
1525
|
-
u -= 1;
|
|
1526
|
-
},
|
|
1527
|
-
!1
|
|
1528
|
-
);
|
|
1529
|
-
}
|
|
1530
|
-
if (u === 0) {
|
|
1531
|
-
var o = r.length === 0 && t !== null;
|
|
1532
|
-
if (o) {
|
|
1533
|
-
var s = (
|
|
1534
|
-
/** @type {Element} */
|
|
1535
|
-
t
|
|
1536
|
-
), a = (
|
|
1537
|
-
/** @type {Element} */
|
|
1538
|
-
s.parentNode
|
|
1539
|
-
);
|
|
1540
|
-
Sr(a), a.append(s), e.items.clear();
|
|
1541
|
-
}
|
|
1542
|
-
bn(n, !o);
|
|
1543
|
-
} else
|
|
1544
|
-
l = {
|
|
1545
|
-
pending: new Set(n),
|
|
1546
|
-
done: /* @__PURE__ */ new Set()
|
|
1547
|
-
}, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(l);
|
|
1548
|
-
}
|
|
1549
|
-
function bn(e, n = !0) {
|
|
1550
|
-
for (var t = 0; t < e.length; t++)
|
|
1551
|
-
re(e[t], n);
|
|
1552
|
-
}
|
|
1553
|
-
var zn;
|
|
1554
|
-
function jr(e, n, t, r, i, l = null) {
|
|
1555
|
-
var u = e, f = /* @__PURE__ */ new Map();
|
|
1556
|
-
{
|
|
1557
|
-
var o = (
|
|
1558
|
-
/** @type {Element} */
|
|
1559
|
-
e
|
|
1560
|
-
);
|
|
1561
|
-
u = o.appendChild(Se());
|
|
1562
|
-
}
|
|
1563
|
-
var s = null, a = /* @__PURE__ */ wr(() => {
|
|
1564
|
-
var y = t();
|
|
1565
|
-
return Gn(y) ? y : y == null ? [] : xn(y);
|
|
1566
|
-
}), v, d = !0;
|
|
1567
|
-
function _() {
|
|
1568
|
-
m.fallback = s, Kr(m, v, u, n, r), s !== null && (v.length === 0 ? s.f & fe ? (s.f ^= fe, Be(s, null, u)) : Nn(s) : Mn(s, () => {
|
|
1569
|
-
s = null;
|
|
1570
|
-
}));
|
|
1571
|
-
}
|
|
1572
|
-
var c = Dn(() => {
|
|
1573
|
-
v = /** @type {V[]} */
|
|
1574
|
-
g(a);
|
|
1575
|
-
for (var y = v.length, D = /* @__PURE__ */ new Set(), b = (
|
|
1576
|
-
/** @type {Batch} */
|
|
1577
|
-
w
|
|
1578
|
-
), G = ot(), q = 0; q < y; q += 1) {
|
|
1579
|
-
var X = v[q], T = r(X, q), x = d ? null : f.get(T);
|
|
1580
|
-
x ? (x.v && Le(x.v, X), x.i && Le(x.i, q), G && b.skipped_effects.delete(x.e)) : (x = Gr(
|
|
1581
|
-
f,
|
|
1582
|
-
d ? u : zn ?? (zn = Se()),
|
|
1583
|
-
X,
|
|
1584
|
-
T,
|
|
1585
|
-
q,
|
|
1586
|
-
i,
|
|
1587
|
-
n,
|
|
1588
|
-
t
|
|
1589
|
-
), d || (x.e.f |= fe), f.set(T, x)), D.add(T);
|
|
1590
|
-
}
|
|
1591
|
-
if (y === 0 && l && !s && (d ? s = Ue(() => l(u)) : (s = Ue(() => l(zn ?? (zn = Se()))), s.f |= fe)), !d)
|
|
1592
|
-
if (G) {
|
|
1593
|
-
for (const [I, L] of f)
|
|
1594
|
-
D.has(I) || b.skipped_effects.add(L.e);
|
|
1595
|
-
b.oncommit(_), b.ondiscard(() => {
|
|
1596
|
-
});
|
|
1597
|
-
} else
|
|
1598
|
-
_();
|
|
1599
|
-
g(a);
|
|
1600
|
-
}), m = { effect: c, items: f, outrogroups: null, fallback: s };
|
|
1601
|
-
d = !1;
|
|
1602
|
-
}
|
|
1603
|
-
function Pe(e) {
|
|
1604
|
-
for (; e !== null && !(e.f & $); )
|
|
1605
|
-
e = e.next;
|
|
1606
|
-
return e;
|
|
1607
|
-
}
|
|
1608
|
-
function Kr(e, n, t, r, i) {
|
|
1609
|
-
var I;
|
|
1610
|
-
var l = n.length, u = e.items, f = Pe(e.effect.first), o, s = null, a = [], v = [], d, _, c, m;
|
|
1611
|
-
for (m = 0; m < l; m += 1) {
|
|
1612
|
-
if (d = n[m], _ = i(d, m), c = /** @type {EachItem} */
|
|
1613
|
-
u.get(_).e, e.outrogroups !== null)
|
|
1614
|
-
for (const L of e.outrogroups)
|
|
1615
|
-
L.pending.delete(c), L.done.delete(c);
|
|
1616
|
-
if (c.f & fe)
|
|
1617
|
-
if (c.f ^= fe, c === f)
|
|
1618
|
-
Be(c, null, t);
|
|
1619
|
-
else {
|
|
1620
|
-
var y = s ? s.next : f;
|
|
1621
|
-
c === e.effect.last && (e.effect.last = c.prev), c.prev && (c.prev.next = c.next), c.next && (c.next.prev = c.prev), le(e, s, c), le(e, c, y), Be(c, y, t), s = c, a = [], v = [], f = Pe(s.next);
|
|
1622
|
-
continue;
|
|
1623
|
-
}
|
|
1624
|
-
if (c.f & B && Nn(c), c !== f) {
|
|
1625
|
-
if (o !== void 0 && o.has(c)) {
|
|
1626
|
-
if (a.length < v.length) {
|
|
1627
|
-
var D = v[0], b;
|
|
1628
|
-
s = D.prev;
|
|
1629
|
-
var G = a[0], q = a[a.length - 1];
|
|
1630
|
-
for (b = 0; b < a.length; b += 1)
|
|
1631
|
-
Be(a[b], D, t);
|
|
1632
|
-
for (b = 0; b < v.length; b += 1)
|
|
1633
|
-
o.delete(v[b]);
|
|
1634
|
-
le(e, G.prev, q.next), le(e, s, G), le(e, q, D), f = D, s = q, m -= 1, a = [], v = [];
|
|
1635
|
-
} else
|
|
1636
|
-
o.delete(c), Be(c, f, t), le(e, c.prev, c.next), le(e, c, s === null ? e.effect.first : s.next), le(e, s, c), s = c;
|
|
1637
|
-
continue;
|
|
1638
|
-
}
|
|
1639
|
-
for (a = [], v = []; f !== null && f !== c; )
|
|
1640
|
-
(o ?? (o = /* @__PURE__ */ new Set())).add(f), v.push(f), f = Pe(f.next);
|
|
1641
|
-
if (f === null)
|
|
1642
|
-
continue;
|
|
1643
|
-
}
|
|
1644
|
-
c.f & fe || a.push(c), s = c, f = Pe(c.next);
|
|
1645
|
-
}
|
|
1646
|
-
if (e.outrogroups !== null) {
|
|
1647
|
-
for (const L of e.outrogroups)
|
|
1648
|
-
L.pending.size === 0 && (bn(xn(L.done)), (I = e.outrogroups) == null || I.delete(L));
|
|
1649
|
-
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
1650
|
-
}
|
|
1651
|
-
if (f !== null || o !== void 0) {
|
|
1652
|
-
var X = [];
|
|
1653
|
-
if (o !== void 0)
|
|
1654
|
-
for (c of o)
|
|
1655
|
-
c.f & B || X.push(c);
|
|
1656
|
-
for (; f !== null; )
|
|
1657
|
-
!(f.f & B) && f !== e.fallback && X.push(f), f = Pe(f.next);
|
|
1658
|
-
var T = X.length;
|
|
1659
|
-
if (T > 0) {
|
|
1660
|
-
var x = l === 0 ? t : null;
|
|
1661
|
-
Vr(e, X, x);
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
function Gr(e, n, t, r, i, l, u, f) {
|
|
1666
|
-
var o = u & Yt ? u & Vt ? qe(t) : /* @__PURE__ */ yr(t, !1, !1) : null, s = u & zt ? qe(i) : null;
|
|
1667
|
-
return {
|
|
1668
|
-
v: o,
|
|
1669
|
-
i: s,
|
|
1670
|
-
e: Ue(() => (l(n, o ?? t, s ?? i, f), () => {
|
|
1671
|
-
e.delete(r);
|
|
1672
|
-
}))
|
|
1673
|
-
};
|
|
1674
|
-
}
|
|
1675
|
-
function Be(e, n, t) {
|
|
1676
|
-
if (e.nodes)
|
|
1677
|
-
for (var r = e.nodes.start, i = e.nodes.end, l = n && !(n.f & fe) ? (
|
|
1678
|
-
/** @type {EffectNodes} */
|
|
1679
|
-
n.nodes.start
|
|
1680
|
-
) : t; r !== null; ) {
|
|
1681
|
-
var u = (
|
|
1682
|
-
/** @type {TemplateNode} */
|
|
1683
|
-
/* @__PURE__ */ Ke(r)
|
|
1684
|
-
);
|
|
1685
|
-
if (l.before(r), r === i)
|
|
1686
|
-
return;
|
|
1687
|
-
r = u;
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
function le(e, n, t) {
|
|
1691
|
-
n === null ? e.effect.first = t : n.next = t, t === null ? e.effect.last = n : t.prev = n;
|
|
1692
|
-
}
|
|
1693
|
-
function Xr(e, n) {
|
|
1694
|
-
dt(() => {
|
|
1695
|
-
var t = e.getRootNode(), r = (
|
|
1696
|
-
/** @type {ShadowRoot} */
|
|
1697
|
-
t.host ? (
|
|
1698
|
-
/** @type {ShadowRoot} */
|
|
1699
|
-
t
|
|
1700
|
-
) : (
|
|
1701
|
-
/** @type {Document} */
|
|
1702
|
-
t.head ?? /** @type {Document} */
|
|
1703
|
-
t.ownerDocument.head
|
|
1704
|
-
)
|
|
1705
|
-
);
|
|
1706
|
-
if (!r.querySelector("#" + n.hash)) {
|
|
1707
|
-
const i = document.createElement("style");
|
|
1708
|
-
i.id = n.hash, i.textContent = n.code, r.appendChild(i);
|
|
1709
|
-
}
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
function Wr(e, n) {
|
|
1713
|
-
return e == null ? null : String(e);
|
|
1714
|
-
}
|
|
1715
|
-
function Vn(e, n, t, r) {
|
|
1716
|
-
var i = e.__style;
|
|
1717
|
-
if (i !== n) {
|
|
1718
|
-
var l = Wr(n);
|
|
1719
|
-
l == null ? e.removeAttribute("style") : e.style.cssText = l, e.__style = n;
|
|
1720
|
-
}
|
|
1721
|
-
return r;
|
|
1722
|
-
}
|
|
1723
|
-
function jn(e, n) {
|
|
1724
|
-
return e === n || (e == null ? void 0 : e[Je]) === n;
|
|
1725
|
-
}
|
|
1726
|
-
function Zr(e = {}, n, t, r) {
|
|
1727
|
-
return dt(() => {
|
|
1728
|
-
var i, l;
|
|
1729
|
-
return Nr(() => {
|
|
1730
|
-
i = l, l = [], Ur(() => {
|
|
1731
|
-
e !== t(...l) && (n(e, ...l), i && jn(t(...i), e) && n(null, ...i));
|
|
1732
|
-
});
|
|
1733
|
-
}), () => {
|
|
1734
|
-
pn(() => {
|
|
1735
|
-
l && jn(t(...l), e) && n(null, ...l);
|
|
1736
|
-
});
|
|
1737
|
-
};
|
|
1738
|
-
}), e;
|
|
1739
|
-
}
|
|
1740
|
-
function xe(e, n, t, r) {
|
|
1741
|
-
var i = (
|
|
1742
|
-
/** @type {V} */
|
|
1743
|
-
r
|
|
1744
|
-
), l = !0, u = () => (l && (l = !1, i = /** @type {V} */
|
|
1745
|
-
r), i), f;
|
|
1746
|
-
f = /** @type {V} */
|
|
1747
|
-
e[n], f === void 0 && r !== void 0 && (f = u());
|
|
1748
|
-
var o;
|
|
1749
|
-
return o = () => {
|
|
1750
|
-
var s = (
|
|
1751
|
-
/** @type {V} */
|
|
1752
|
-
e[n]
|
|
1753
|
-
);
|
|
1754
|
-
return s === void 0 ? u() : (l = !0, s);
|
|
1755
|
-
}, o;
|
|
1756
|
-
}
|
|
1757
|
-
const At = Symbol("SHIMMER_CONFIG");
|
|
1758
|
-
function Ft() {
|
|
1759
|
-
return Ot(At) || Lt;
|
|
1760
|
-
}
|
|
1761
|
-
function ii(e = {}) {
|
|
1762
|
-
const n = Ft(), t = {
|
|
1763
|
-
shimmerColor: e.shimmerColor ?? n.shimmerColor,
|
|
1764
|
-
backgroundColor: e.backgroundColor ?? n.backgroundColor,
|
|
1765
|
-
duration: e.duration ?? n.duration,
|
|
1766
|
-
fallbackBorderRadius: e.fallbackBorderRadius ?? n.fallbackBorderRadius
|
|
1
|
+
import "svelte/internal/disclose-version";
|
|
2
|
+
import * as e from "svelte/internal/client";
|
|
3
|
+
import { getContext as G, setContext as H, onMount as L, tick as N } from "svelte";
|
|
4
|
+
import { shimmerDefaults as X, extractElementInfo as A } from "@shimmer-from-structure/core";
|
|
5
|
+
import { shimmerDefaults as V } from "@shimmer-from-structure/core";
|
|
6
|
+
const b = Symbol("SHIMMER_CONFIG");
|
|
7
|
+
function C() {
|
|
8
|
+
return G(b) || X;
|
|
9
|
+
}
|
|
10
|
+
function J(a = {}) {
|
|
11
|
+
const t = C(), d = {
|
|
12
|
+
shimmerColor: a.shimmerColor ?? t.shimmerColor,
|
|
13
|
+
backgroundColor: a.backgroundColor ?? t.backgroundColor,
|
|
14
|
+
duration: a.duration ?? t.duration,
|
|
15
|
+
fallbackBorderRadius: a.fallbackBorderRadius ?? t.fallbackBorderRadius
|
|
1767
16
|
};
|
|
1768
|
-
|
|
17
|
+
H(b, d);
|
|
1769
18
|
}
|
|
1770
|
-
var
|
|
19
|
+
var K = e.from_html('<div class="svelte-euvo5u"><div class="svelte-euvo5u"></div></div>'), P = e.from_html(`<div style="position: relative;" class="svelte-euvo5u"><div class="shimmer-measure-container svelte-euvo5u" style="pointer-events: none;" aria-hidden="true"><!></div> <div style="
|
|
1771
20
|
position: absolute;
|
|
1772
21
|
top: 0;
|
|
1773
22
|
left: 0;
|
|
@@ -1776,7 +25,7 @@ var Jr = /* @__PURE__ */ St('<div class="svelte-euvo5u"><div class="svelte-euvo5
|
|
|
1776
25
|
overflow: hidden;
|
|
1777
26
|
pointer-events: none;
|
|
1778
27
|
" class="svelte-euvo5u"></div></div>`);
|
|
1779
|
-
const
|
|
28
|
+
const Y = {
|
|
1780
29
|
hash: "svelte-euvo5u",
|
|
1781
30
|
code: `.shimmer-measure-container.svelte-euvo5u * {color:transparent !important;}.shimmer-measure-container.svelte-euvo5u img,
|
|
1782
31
|
.shimmer-measure-container.svelte-euvo5u svg,
|
|
@@ -1790,84 +39,84 @@ const $r = {
|
|
|
1790
39
|
}
|
|
1791
40
|
}`
|
|
1792
41
|
};
|
|
1793
|
-
function
|
|
1794
|
-
|
|
1795
|
-
let
|
|
1796
|
-
|
|
1797
|
-
let
|
|
1798
|
-
const
|
|
1799
|
-
let
|
|
1800
|
-
async function
|
|
1801
|
-
if (!
|
|
1802
|
-
|
|
1803
|
-
const
|
|
1804
|
-
Array.from(
|
|
1805
|
-
|
|
1806
|
-
}),
|
|
42
|
+
function Q(a, t) {
|
|
43
|
+
e.push(t, !0), e.append_styles(a, Y);
|
|
44
|
+
let d = e.prop(t, "loading", 3, !0), _ = e.prop(t, "shimmerColor", 3, void 0), k = e.prop(t, "backgroundColor", 3, void 0), x = e.prop(t, "duration", 3, void 0), R = e.prop(t, "fallbackBorderRadius", 3, void 0);
|
|
45
|
+
e.prop(t, "templateProps", 3, void 0);
|
|
46
|
+
let o = e.state(void 0), h = e.state(e.proxy([]));
|
|
47
|
+
const u = C(), y = e.derived(() => _() ?? u.shimmerColor), B = e.derived(() => k() ?? u.backgroundColor), w = e.derived(() => x() ?? u.duration), E = e.derived(() => R() ?? u.fallbackBorderRadius);
|
|
48
|
+
let r;
|
|
49
|
+
async function c() {
|
|
50
|
+
if (!d() || !e.get(o)) return;
|
|
51
|
+
r == null || r.disconnect(), await N();
|
|
52
|
+
const i = e.get(o), s = i.getBoundingClientRect(), n = [];
|
|
53
|
+
Array.from(i.children).forEach((v) => {
|
|
54
|
+
n.push(...A(v, s));
|
|
55
|
+
}), e.set(h, n, !0), e.get(o) && r && r.observe(e.get(o), {
|
|
1807
56
|
childList: !0,
|
|
1808
57
|
subtree: !0,
|
|
1809
58
|
characterData: !0,
|
|
1810
59
|
attributes: !1
|
|
1811
60
|
});
|
|
1812
61
|
}
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
}),
|
|
1816
|
-
|
|
1817
|
-
}),
|
|
62
|
+
e.user_effect(() => {
|
|
63
|
+
d() && e.get(o) && c();
|
|
64
|
+
}), L(() => (c(), e.get(o) && (r = new MutationObserver(() => {
|
|
65
|
+
d() && c();
|
|
66
|
+
}), r.observe(e.get(o), {
|
|
1818
67
|
childList: !0,
|
|
1819
68
|
subtree: !0,
|
|
1820
69
|
characterData: !0,
|
|
1821
70
|
attributes: !1
|
|
1822
71
|
// Don't observe attribute changes (style updates)
|
|
1823
72
|
})), () => {
|
|
1824
|
-
|
|
73
|
+
r == null || r.disconnect();
|
|
1825
74
|
}));
|
|
1826
|
-
function
|
|
1827
|
-
|
|
75
|
+
function S() {
|
|
76
|
+
c();
|
|
1828
77
|
}
|
|
1829
|
-
var
|
|
78
|
+
var M = { remeasure: S }, g = e.comment(), D = e.first_child(g);
|
|
1830
79
|
{
|
|
1831
|
-
var
|
|
1832
|
-
var
|
|
1833
|
-
|
|
1834
|
-
},
|
|
1835
|
-
var
|
|
1836
|
-
|
|
1837
|
-
var
|
|
1838
|
-
|
|
1839
|
-
var
|
|
1840
|
-
|
|
1841
|
-
|
|
80
|
+
var I = (i) => {
|
|
81
|
+
var s = e.comment(), n = e.first_child(s);
|
|
82
|
+
e.snippet(n, () => t.children), e.append(i, s);
|
|
83
|
+
}, F = (i) => {
|
|
84
|
+
var s = P(), n = e.child(s), v = e.child(n);
|
|
85
|
+
e.snippet(v, () => t.children), e.reset(n), e.bind_this(n, (f) => e.set(o, f), () => e.get(o));
|
|
86
|
+
var p = e.sibling(n, 2);
|
|
87
|
+
e.each(p, 21, () => e.get(h), e.index, (f, l) => {
|
|
88
|
+
var m = K(), O = e.child(m);
|
|
89
|
+
e.reset(m), e.template_effect(() => {
|
|
90
|
+
e.set_style(m, `
|
|
1842
91
|
position: absolute;
|
|
1843
|
-
left: ${
|
|
1844
|
-
top: ${
|
|
1845
|
-
width: ${
|
|
1846
|
-
height: ${
|
|
1847
|
-
background-color: ${
|
|
1848
|
-
border-radius: ${(
|
|
92
|
+
left: ${e.get(l).x ?? ""}px;
|
|
93
|
+
top: ${e.get(l).y ?? ""}px;
|
|
94
|
+
width: ${e.get(l).width ?? ""}px;
|
|
95
|
+
height: ${e.get(l).height ?? ""}px;
|
|
96
|
+
background-color: ${e.get(B) ?? ""};
|
|
97
|
+
border-radius: ${(e.get(l).borderRadius === "0px" ? e.get(E) + "px" : e.get(l).borderRadius) ?? ""};
|
|
1849
98
|
overflow: hidden;
|
|
1850
|
-
`),
|
|
99
|
+
`), e.set_style(O, `
|
|
1851
100
|
position: absolute;
|
|
1852
101
|
top: 0;
|
|
1853
102
|
left: 0;
|
|
1854
103
|
width: 100%;
|
|
1855
104
|
height: 100%;
|
|
1856
|
-
background: linear-gradient(90deg, transparent, ${
|
|
1857
|
-
animation: shimmer-animation ${
|
|
105
|
+
background: linear-gradient(90deg, transparent, ${e.get(y) ?? ""}, transparent);
|
|
106
|
+
animation: shimmer-animation ${e.get(w) ?? ""}s infinite;
|
|
1858
107
|
`);
|
|
1859
|
-
}),
|
|
1860
|
-
}),
|
|
108
|
+
}), e.append(f, m);
|
|
109
|
+
}), e.reset(p), e.reset(s), e.append(i, s);
|
|
1861
110
|
};
|
|
1862
|
-
|
|
1863
|
-
|
|
111
|
+
e.if(D, (i) => {
|
|
112
|
+
d() ? i(F, !1) : i(I);
|
|
1864
113
|
});
|
|
1865
114
|
}
|
|
1866
|
-
return
|
|
115
|
+
return e.append(a, g), e.pop(M);
|
|
1867
116
|
}
|
|
1868
117
|
export {
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
118
|
+
Q as Shimmer,
|
|
119
|
+
C as getShimmerConfig,
|
|
120
|
+
J as setShimmerConfig,
|
|
121
|
+
V as shimmerDefaults
|
|
1873
122
|
};
|