@revenuecat/purchases-ui-js 3.9.1 → 3.9.2
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/components/button/ButtonNode.svelte +1 -1
- package/dist/components/input-text/InputText.svelte +164 -0
- package/dist/components/input-text/InputText.svelte.d.ts +4 -0
- package/dist/components/paywall/Node.svelte +2 -0
- package/dist/components/paywall/Paywall.svelte +3 -0
- package/dist/components/paywall/Paywall.svelte.d.ts +1 -0
- package/dist/components/text/TextNode.svelte +12 -12
- package/dist/components/workflows/Screen.svelte +3 -0
- package/dist/components/workflows/Screen.svelte.d.ts +1 -0
- package/dist/stores/paywall.d.ts +1 -0
- package/dist/types/component.d.ts +2 -1
- package/dist/types/components/input-text.d.ts +33 -0
- package/dist/types/components/input-text.js +1 -0
- package/dist/web-components/index.js +1250 -1058
- package/package.json +16 -16
|
@@ -1,432 +1,548 @@
|
|
|
1
1
|
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
2
|
-
const
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
const hn = 1, pn = 2, _n = 4, vn = 8, gn = 16, bn = 2, x = Symbol(), kt = "http://www.w3.org/1999/xhtml", mn = !1;
|
|
3
|
+
var yn = Array.isArray, wn = Array.prototype.indexOf, de = Array.prototype.includes, Fe = Object.getOwnPropertyDescriptor, Tt = Object.getOwnPropertyDescriptors, Sn = Object.prototype, En = Array.prototype, Ge = Object.getPrototypeOf;
|
|
4
|
+
const Ke = () => {
|
|
5
5
|
};
|
|
6
|
-
function
|
|
6
|
+
function xn(e) {
|
|
7
7
|
for (var t = 0; t < e.length; t++)
|
|
8
8
|
e[t]();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function At() {
|
|
11
11
|
var e, t, n = new Promise((r, i) => {
|
|
12
12
|
e = r, t = i;
|
|
13
13
|
});
|
|
14
14
|
return { promise: n, resolve: e, reject: t };
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const S = 2, we = 4, Ze = 8, Ft = 1 << 24, ne = 16, Y = 32, he = 64, kn = 128, L = 512, w = 1024, T = 2048, V = 4096, U = 8192, C = 16384, be = 32768, ct = 1 << 25, pe = 65536, dt = 1 << 17, Tn = 1 << 18, Pe = 1 << 19, An = 1 << 20, se = 65536, $e = 1 << 21, Je = 1 << 22, J = 1 << 23, ce = Symbol("$state"), Fn = Symbol("legacy props"), On = Symbol(""), X = new class extends Error {
|
|
17
17
|
name = "StaleReactionError";
|
|
18
18
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
19
19
|
}();
|
|
20
|
-
function
|
|
20
|
+
function In() {
|
|
21
21
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Ln() {
|
|
24
24
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Mn(e) {
|
|
27
27
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Dn() {
|
|
30
30
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Rn() {
|
|
33
33
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Nn() {
|
|
36
36
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Ot(e) {
|
|
39
39
|
return e === this.v;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Pn(e, t) {
|
|
42
42
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return !
|
|
44
|
+
function Cn(e) {
|
|
45
|
+
return !Pn(e, this.v);
|
|
46
46
|
}
|
|
47
|
-
let
|
|
48
|
-
function
|
|
49
|
-
|
|
47
|
+
let Ce = !1, Bn = !1;
|
|
48
|
+
function zn() {
|
|
49
|
+
Ce = !0;
|
|
50
50
|
}
|
|
51
|
-
let
|
|
52
|
-
function
|
|
53
|
-
|
|
51
|
+
let B = null;
|
|
52
|
+
function Le(e) {
|
|
53
|
+
B = e;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
57
|
-
p:
|
|
55
|
+
function jn(e, t = !1, n) {
|
|
56
|
+
B = {
|
|
57
|
+
p: B,
|
|
58
58
|
i: !1,
|
|
59
59
|
c: null,
|
|
60
60
|
e: null,
|
|
61
61
|
s: e,
|
|
62
62
|
x: null,
|
|
63
|
-
|
|
63
|
+
r: (
|
|
64
|
+
/** @type {Effect} */
|
|
65
|
+
v
|
|
66
|
+
),
|
|
67
|
+
l: Ce && !t ? { s: null, u: null, $: [] } : null
|
|
64
68
|
};
|
|
65
69
|
}
|
|
66
|
-
function
|
|
70
|
+
function Hn(e) {
|
|
67
71
|
var t = (
|
|
68
72
|
/** @type {ComponentContext} */
|
|
69
|
-
|
|
73
|
+
B
|
|
70
74
|
), n = t.e;
|
|
71
75
|
if (n !== null) {
|
|
72
76
|
t.e = null;
|
|
73
77
|
for (var r of n)
|
|
74
|
-
|
|
78
|
+
ur(r);
|
|
75
79
|
}
|
|
76
|
-
return t.i = !0,
|
|
80
|
+
return t.i = !0, B = t.p, /** @type {T} */
|
|
77
81
|
{};
|
|
78
82
|
}
|
|
79
|
-
function
|
|
80
|
-
return !
|
|
83
|
+
function xe() {
|
|
84
|
+
return !Ce || B !== null && B.l === null;
|
|
81
85
|
}
|
|
82
|
-
let
|
|
83
|
-
function
|
|
84
|
-
var e =
|
|
85
|
-
|
|
86
|
+
let oe = [];
|
|
87
|
+
function $n() {
|
|
88
|
+
var e = oe;
|
|
89
|
+
oe = [], xn(e);
|
|
86
90
|
}
|
|
87
|
-
function
|
|
88
|
-
if (
|
|
89
|
-
var t =
|
|
91
|
+
function ht(e) {
|
|
92
|
+
if (oe.length === 0) {
|
|
93
|
+
var t = oe;
|
|
90
94
|
queueMicrotask(() => {
|
|
91
|
-
t ===
|
|
95
|
+
t === oe && $n();
|
|
92
96
|
});
|
|
93
97
|
}
|
|
94
|
-
|
|
98
|
+
oe.push(e);
|
|
95
99
|
}
|
|
96
|
-
function
|
|
100
|
+
function Un(e) {
|
|
97
101
|
var t = v;
|
|
98
102
|
if (t === null)
|
|
99
|
-
return p.f |=
|
|
100
|
-
if ((t.f &
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
t.b.error(e);
|
|
104
|
-
} else
|
|
105
|
-
Ie(e, t);
|
|
103
|
+
return p.f |= J, e;
|
|
104
|
+
if ((t.f & be) === 0 && (t.f & we) === 0)
|
|
105
|
+
throw e;
|
|
106
|
+
Me(e, t);
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
+
function Me(e, t) {
|
|
108
109
|
for (; t !== null; ) {
|
|
109
|
-
if ((t.f &
|
|
110
|
+
if ((t.f & kn) !== 0) {
|
|
111
|
+
if ((t.f & be) === 0)
|
|
112
|
+
throw e;
|
|
110
113
|
try {
|
|
111
114
|
t.b.error(e);
|
|
112
115
|
return;
|
|
113
116
|
} catch (n) {
|
|
114
117
|
e = n;
|
|
115
118
|
}
|
|
119
|
+
}
|
|
116
120
|
t = t.parent;
|
|
117
121
|
}
|
|
118
122
|
throw e;
|
|
119
123
|
}
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
const Vn = -7169;
|
|
125
|
+
function y(e, t) {
|
|
126
|
+
e.f = e.f & Vn | t;
|
|
127
|
+
}
|
|
128
|
+
function Qe(e) {
|
|
129
|
+
(e.f & L) !== 0 || e.deps === null ? y(e, w) : y(e, V);
|
|
130
|
+
}
|
|
131
|
+
function It(e) {
|
|
132
|
+
if (e !== null)
|
|
133
|
+
for (const t of e)
|
|
134
|
+
(t.f & S) === 0 || (t.f & se) === 0 || (t.f ^= se, It(
|
|
135
|
+
/** @type {Derived} */
|
|
136
|
+
t.deps
|
|
137
|
+
));
|
|
138
|
+
}
|
|
139
|
+
function Wn(e, t, n) {
|
|
140
|
+
(e.f & T) !== 0 ? t.add(e) : (e.f & V) !== 0 && n.add(e), It(e.deps), y(e, w);
|
|
141
|
+
}
|
|
142
|
+
let Ae = !1;
|
|
143
|
+
function Xn(e) {
|
|
144
|
+
var t = Ae;
|
|
145
|
+
try {
|
|
146
|
+
return Ae = !1, [e(), Ae];
|
|
147
|
+
} finally {
|
|
148
|
+
Ae = t;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const G = /* @__PURE__ */ new Set();
|
|
152
|
+
let b = null, N = null, Ue = null, ze = !1, fe = null, Oe = null;
|
|
153
|
+
var pt = 0;
|
|
154
|
+
let Yn = 1;
|
|
155
|
+
class _e {
|
|
156
|
+
id = Yn++;
|
|
124
157
|
/**
|
|
125
|
-
* The current values of any
|
|
158
|
+
* The current values of any signals that are updated in this batch.
|
|
159
|
+
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
|
|
126
160
|
* They keys of this map are identical to `this.#previous`
|
|
127
|
-
* @type {Map<
|
|
161
|
+
* @type {Map<Value, [any, boolean]>}
|
|
128
162
|
*/
|
|
129
163
|
current = /* @__PURE__ */ new Map();
|
|
130
164
|
/**
|
|
131
|
-
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
165
|
+
* The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
|
|
132
166
|
* They keys of this map are identical to `this.#current`
|
|
133
|
-
* @type {Map<
|
|
167
|
+
* @type {Map<Value, any>}
|
|
134
168
|
*/
|
|
135
169
|
previous = /* @__PURE__ */ new Map();
|
|
136
170
|
/**
|
|
137
171
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
138
172
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
139
|
-
* @type {Set<() => void>}
|
|
173
|
+
* @type {Set<(batch: Batch) => void>}
|
|
140
174
|
*/
|
|
141
|
-
#
|
|
175
|
+
#n = /* @__PURE__ */ new Set();
|
|
142
176
|
/**
|
|
143
177
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
144
178
|
* @type {Set<(batch: Batch) => void>}
|
|
145
179
|
*/
|
|
146
|
-
#
|
|
180
|
+
#i = /* @__PURE__ */ new Set();
|
|
147
181
|
/**
|
|
148
|
-
*
|
|
182
|
+
* Async effects that are currently in flight
|
|
183
|
+
* @type {Map<Effect, number>}
|
|
149
184
|
*/
|
|
150
|
-
#e =
|
|
185
|
+
#e = /* @__PURE__ */ new Map();
|
|
151
186
|
/**
|
|
152
|
-
*
|
|
187
|
+
* Async effects that are currently in flight, _not_ inside a pending boundary
|
|
188
|
+
* @type {Map<Effect, number>}
|
|
153
189
|
*/
|
|
154
|
-
#r =
|
|
190
|
+
#r = /* @__PURE__ */ new Map();
|
|
155
191
|
/**
|
|
156
192
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
157
193
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
158
194
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
159
195
|
*/
|
|
160
|
-
#
|
|
196
|
+
#o = null;
|
|
161
197
|
/**
|
|
162
|
-
*
|
|
198
|
+
* The root effects that need to be flushed
|
|
163
199
|
* @type {Effect[]}
|
|
164
200
|
*/
|
|
165
|
-
#
|
|
201
|
+
#t = [];
|
|
166
202
|
/**
|
|
167
|
-
* Deferred effects that are
|
|
168
|
-
* @type {Effect
|
|
203
|
+
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
204
|
+
* @type {Set<Effect>}
|
|
169
205
|
*/
|
|
170
|
-
#
|
|
206
|
+
#l = /* @__PURE__ */ new Set();
|
|
171
207
|
/**
|
|
172
|
-
*
|
|
173
|
-
* is committed — we skip over these during `process`
|
|
208
|
+
* Deferred effects that are MAYBE_DIRTY
|
|
174
209
|
* @type {Set<Effect>}
|
|
175
210
|
*/
|
|
176
|
-
|
|
211
|
+
#a = /* @__PURE__ */ new Set();
|
|
212
|
+
/**
|
|
213
|
+
* A map of branches that still exist, but will be destroyed when this batch
|
|
214
|
+
* is committed — we skip over these during `process`.
|
|
215
|
+
* The value contains child effects that were dirty/maybe_dirty before being reset,
|
|
216
|
+
* so they can be rescheduled if the branch survives.
|
|
217
|
+
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
218
|
+
*/
|
|
219
|
+
#s = /* @__PURE__ */ new Map();
|
|
177
220
|
is_fork = !1;
|
|
221
|
+
#u = !1;
|
|
222
|
+
/** @type {Set<Batch>} */
|
|
223
|
+
#f = /* @__PURE__ */ new Set();
|
|
224
|
+
#c() {
|
|
225
|
+
return this.is_fork || this.#r.size > 0;
|
|
226
|
+
}
|
|
227
|
+
#_() {
|
|
228
|
+
for (const r of this.#f)
|
|
229
|
+
for (const i of r.#r.keys()) {
|
|
230
|
+
for (var t = !1, n = i; n.parent !== null; ) {
|
|
231
|
+
if (this.#s.has(n)) {
|
|
232
|
+
t = !0;
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
n = n.parent;
|
|
236
|
+
}
|
|
237
|
+
if (!t)
|
|
238
|
+
return !0;
|
|
239
|
+
}
|
|
240
|
+
return !1;
|
|
241
|
+
}
|
|
178
242
|
/**
|
|
179
|
-
*
|
|
180
|
-
* @param {Effect
|
|
243
|
+
* Add an effect to the #skipped_branches map and reset its children
|
|
244
|
+
* @param {Effect} effect
|
|
181
245
|
*/
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
246
|
+
skip_effect(t) {
|
|
247
|
+
this.#s.has(t) || this.#s.set(t, { d: [], m: [] });
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Remove an effect from the #skipped_branches map and reschedule
|
|
251
|
+
* any tracked dirty/maybe_dirty child effects
|
|
252
|
+
* @param {Effect} effect
|
|
253
|
+
*/
|
|
254
|
+
unskip_effect(t) {
|
|
255
|
+
var n = this.#s.get(t);
|
|
256
|
+
if (n) {
|
|
257
|
+
this.#s.delete(t);
|
|
258
|
+
for (var r of n.d)
|
|
259
|
+
y(r, T), this.schedule(r);
|
|
260
|
+
for (r of n.m)
|
|
261
|
+
y(r, V), this.schedule(r);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
#d() {
|
|
265
|
+
if (pt++ > 1e3 && (G.delete(this), qn()), !this.#c()) {
|
|
266
|
+
for (const l of this.#l)
|
|
267
|
+
this.#a.delete(l), y(l, T), this.schedule(l);
|
|
268
|
+
for (const l of this.#a)
|
|
269
|
+
y(l, V), this.schedule(l);
|
|
270
|
+
}
|
|
271
|
+
const t = this.#t;
|
|
272
|
+
this.#t = [], this.apply();
|
|
273
|
+
var n = fe = [], r = [], i = Oe = [];
|
|
274
|
+
for (const l of t)
|
|
275
|
+
try {
|
|
276
|
+
this.#h(l, n, r);
|
|
277
|
+
} catch (o) {
|
|
278
|
+
throw Rt(l), o;
|
|
279
|
+
}
|
|
280
|
+
if (b = null, i.length > 0) {
|
|
281
|
+
var s = _e.ensure();
|
|
282
|
+
for (const l of i)
|
|
283
|
+
s.schedule(l);
|
|
284
|
+
}
|
|
285
|
+
if (fe = null, Oe = null, this.#c() || this.#_()) {
|
|
286
|
+
this.#p(r), this.#p(n);
|
|
287
|
+
for (const [l, o] of this.#s)
|
|
288
|
+
Dt(l, o);
|
|
289
|
+
} else {
|
|
290
|
+
this.#e.size === 0 && G.delete(this), this.#l.clear(), this.#a.clear();
|
|
291
|
+
for (const l of this.#n) l(this);
|
|
292
|
+
this.#n.clear(), _t(r), _t(n), this.#o?.resolve();
|
|
293
|
+
}
|
|
294
|
+
var a = (
|
|
295
|
+
/** @type {Batch | null} */
|
|
296
|
+
/** @type {unknown} */
|
|
297
|
+
b
|
|
298
|
+
);
|
|
299
|
+
if (this.#t.length > 0) {
|
|
300
|
+
const l = a ??= this;
|
|
301
|
+
l.#t.push(...this.#t.filter((o) => !l.#t.includes(o)));
|
|
302
|
+
}
|
|
303
|
+
a !== null && (G.add(a), a.#d()), G.has(this) || this.#v();
|
|
194
304
|
}
|
|
195
305
|
/**
|
|
196
306
|
* Traverse the effect tree, executing effects or stashing
|
|
197
307
|
* them for later execution as appropriate
|
|
198
308
|
* @param {Effect} root
|
|
199
|
-
* @param {
|
|
309
|
+
* @param {Effect[]} effects
|
|
310
|
+
* @param {Effect[]} render_effects
|
|
200
311
|
*/
|
|
201
|
-
#
|
|
202
|
-
t.f ^=
|
|
203
|
-
for (var
|
|
204
|
-
var
|
|
205
|
-
if (
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
block_effects: []
|
|
211
|
-
}), !a && r.fn !== null) {
|
|
212
|
-
s ? r.f ^= E : (i & wt) !== 0 ? n.effects.push(r) : we(r) && ((r.f & V) !== 0 && n.block_effects.push(r), be(r));
|
|
213
|
-
var o = r.first;
|
|
214
|
-
if (o !== null) {
|
|
215
|
-
r = o;
|
|
312
|
+
#h(t, n, r) {
|
|
313
|
+
t.f ^= w;
|
|
314
|
+
for (var i = t.first; i !== null; ) {
|
|
315
|
+
var s = i.f, a = (s & (Y | he)) !== 0, l = a && (s & w) !== 0, o = l || (s & U) !== 0 || this.#s.has(i);
|
|
316
|
+
if (!o && i.fn !== null) {
|
|
317
|
+
a ? i.f ^= w : (s & we) !== 0 ? n.push(i) : ke(i) && ((s & ne) !== 0 && this.#a.add(i), ge(i));
|
|
318
|
+
var f = i.first;
|
|
319
|
+
if (f !== null) {
|
|
320
|
+
i = f;
|
|
216
321
|
continue;
|
|
217
322
|
}
|
|
218
323
|
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
324
|
+
for (; i !== null; ) {
|
|
325
|
+
var u = i.next;
|
|
326
|
+
if (u !== null) {
|
|
327
|
+
i = u;
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
i = i.parent;
|
|
331
|
+
}
|
|
223
332
|
}
|
|
224
333
|
}
|
|
225
334
|
/**
|
|
226
335
|
* @param {Effect[]} effects
|
|
227
336
|
*/
|
|
228
|
-
#
|
|
229
|
-
for (
|
|
230
|
-
(
|
|
337
|
+
#p(t) {
|
|
338
|
+
for (var n = 0; n < t.length; n += 1)
|
|
339
|
+
Wn(t[n], this.#l, this.#a);
|
|
231
340
|
}
|
|
232
341
|
/**
|
|
233
342
|
* Associate a change to a given source with the current
|
|
234
343
|
* batch, noting its previous and current values
|
|
235
|
-
* @param {
|
|
236
|
-
* @param {any}
|
|
344
|
+
* @param {Value} source
|
|
345
|
+
* @param {any} old_value
|
|
346
|
+
* @param {boolean} [is_derived]
|
|
237
347
|
*/
|
|
238
|
-
capture(t, n) {
|
|
239
|
-
this.previous.has(t)
|
|
348
|
+
capture(t, n, r = !1) {
|
|
349
|
+
n !== x && !this.previous.has(t) && this.previous.set(t, n), (t.f & J) === 0 && (this.current.set(t, [t.v, r]), N?.set(t, t.v));
|
|
240
350
|
}
|
|
241
351
|
activate() {
|
|
242
|
-
|
|
352
|
+
b = this;
|
|
243
353
|
}
|
|
244
354
|
deactivate() {
|
|
245
|
-
|
|
355
|
+
b = null, N = null;
|
|
246
356
|
}
|
|
247
357
|
flush() {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
358
|
+
try {
|
|
359
|
+
ze = !0, b = this, this.#d();
|
|
360
|
+
} finally {
|
|
361
|
+
pt = 0, Ue = null, fe = null, Oe = null, ze = !1, b = null, N = null, Q.clear();
|
|
362
|
+
}
|
|
253
363
|
}
|
|
254
364
|
discard() {
|
|
255
|
-
for (const t of this.#
|
|
256
|
-
this.#
|
|
257
|
-
}
|
|
258
|
-
#
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
this
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
effects: [],
|
|
272
|
-
render_effects: [],
|
|
273
|
-
block_effects: []
|
|
274
|
-
};
|
|
275
|
-
for (const i of xe) {
|
|
276
|
-
if (i === this) {
|
|
277
|
-
n = !1;
|
|
278
|
-
continue;
|
|
365
|
+
for (const t of this.#i) t(this);
|
|
366
|
+
this.#i.clear(), G.delete(this);
|
|
367
|
+
}
|
|
368
|
+
#v() {
|
|
369
|
+
for (const f of G) {
|
|
370
|
+
var t = f.id < this.id, n = [];
|
|
371
|
+
for (const [u, [d, c]] of this.current) {
|
|
372
|
+
if (f.current.has(u)) {
|
|
373
|
+
var r = (
|
|
374
|
+
/** @type {[any, boolean]} */
|
|
375
|
+
f.current.get(u)[0]
|
|
376
|
+
);
|
|
377
|
+
if (t && d !== r)
|
|
378
|
+
f.current.set(u, [d, c]);
|
|
379
|
+
else
|
|
380
|
+
continue;
|
|
279
381
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
Tt(f, l, a, o);
|
|
296
|
-
if (K.length > 0) {
|
|
297
|
-
m = i, i.apply();
|
|
298
|
-
for (const f of K)
|
|
299
|
-
i.#o(f, r);
|
|
300
|
-
K = [], i.deactivate();
|
|
301
|
-
}
|
|
382
|
+
n.push(u);
|
|
383
|
+
}
|
|
384
|
+
var i = [...f.current.keys()].filter((u) => !this.current.has(u));
|
|
385
|
+
if (i.length === 0)
|
|
386
|
+
t && f.discard();
|
|
387
|
+
else if (n.length > 0) {
|
|
388
|
+
f.activate();
|
|
389
|
+
var s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map();
|
|
390
|
+
for (var l of n)
|
|
391
|
+
Lt(l, i, s, a);
|
|
392
|
+
if (f.#t.length > 0) {
|
|
393
|
+
f.apply();
|
|
394
|
+
for (var o of f.#t)
|
|
395
|
+
f.#h(o, [], []);
|
|
396
|
+
f.#t = [];
|
|
302
397
|
}
|
|
398
|
+
f.deactivate();
|
|
303
399
|
}
|
|
304
|
-
m = null, L = t;
|
|
305
400
|
}
|
|
306
|
-
|
|
401
|
+
for (const f of G)
|
|
402
|
+
f.#f.has(this) && (f.#f.delete(this), f.#f.size === 0 && !f.#c() && (f.activate(), f.#d()));
|
|
307
403
|
}
|
|
308
404
|
/**
|
|
309
|
-
*
|
|
310
405
|
* @param {boolean} blocking
|
|
406
|
+
* @param {Effect} effect
|
|
311
407
|
*/
|
|
312
|
-
increment(t) {
|
|
313
|
-
|
|
408
|
+
increment(t, n) {
|
|
409
|
+
let r = this.#e.get(n) ?? 0;
|
|
410
|
+
if (this.#e.set(n, r + 1), t) {
|
|
411
|
+
let i = this.#r.get(n) ?? 0;
|
|
412
|
+
this.#r.set(n, i + 1);
|
|
413
|
+
}
|
|
314
414
|
}
|
|
315
415
|
/**
|
|
316
|
-
*
|
|
317
416
|
* @param {boolean} blocking
|
|
417
|
+
* @param {Effect} effect
|
|
418
|
+
* @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)
|
|
318
419
|
*/
|
|
319
|
-
decrement(t) {
|
|
320
|
-
|
|
420
|
+
decrement(t, n, r) {
|
|
421
|
+
let i = this.#e.get(n) ?? 0;
|
|
422
|
+
if (i === 1 ? this.#e.delete(n) : this.#e.set(n, i - 1), t) {
|
|
423
|
+
let s = this.#r.get(n) ?? 0;
|
|
424
|
+
s === 1 ? this.#r.delete(n) : this.#r.set(n, s - 1);
|
|
425
|
+
}
|
|
426
|
+
this.#u || r || (this.#u = !0, ht(() => {
|
|
427
|
+
this.#u = !1, this.flush();
|
|
428
|
+
}));
|
|
321
429
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
430
|
+
/**
|
|
431
|
+
* @param {Set<Effect>} dirty_effects
|
|
432
|
+
* @param {Set<Effect>} maybe_dirty_effects
|
|
433
|
+
*/
|
|
434
|
+
transfer_effects(t, n) {
|
|
435
|
+
for (const r of t)
|
|
436
|
+
this.#l.add(r);
|
|
437
|
+
for (const r of n)
|
|
438
|
+
this.#a.add(r);
|
|
439
|
+
t.clear(), n.clear();
|
|
328
440
|
}
|
|
329
|
-
/** @param {() => void} fn */
|
|
441
|
+
/** @param {(batch: Batch) => void} fn */
|
|
330
442
|
oncommit(t) {
|
|
331
|
-
this.#
|
|
443
|
+
this.#n.add(t);
|
|
332
444
|
}
|
|
333
445
|
/** @param {(batch: Batch) => void} fn */
|
|
334
446
|
ondiscard(t) {
|
|
335
|
-
this.#
|
|
447
|
+
this.#i.add(t);
|
|
336
448
|
}
|
|
337
449
|
settled() {
|
|
338
|
-
return (this.#
|
|
450
|
+
return (this.#o ??= At()).promise;
|
|
339
451
|
}
|
|
340
452
|
static ensure() {
|
|
341
|
-
if (
|
|
342
|
-
const t =
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
});
|
|
453
|
+
if (b === null) {
|
|
454
|
+
const t = b = new _e();
|
|
455
|
+
ze || (G.add(b), ht(() => {
|
|
456
|
+
b === t && t.flush();
|
|
457
|
+
}));
|
|
346
458
|
}
|
|
347
|
-
return
|
|
348
|
-
}
|
|
349
|
-
/** @param {() => void} task */
|
|
350
|
-
static enqueue(t) {
|
|
351
|
-
Rn(t);
|
|
459
|
+
return b;
|
|
352
460
|
}
|
|
353
461
|
apply() {
|
|
462
|
+
{
|
|
463
|
+
N = null;
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
354
466
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
467
|
+
/**
|
|
468
|
+
*
|
|
469
|
+
* @param {Effect} effect
|
|
470
|
+
*/
|
|
471
|
+
schedule(t) {
|
|
472
|
+
if (Ue = t, t.b?.is_pending && (t.f & (we | Ze | Ft)) !== 0 && (t.f & be) === 0) {
|
|
473
|
+
t.b.defer_effect(t);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
for (var n = t; n.parent !== null; ) {
|
|
477
|
+
n = n.parent;
|
|
478
|
+
var r = n.f;
|
|
479
|
+
if (fe !== null && n === v && (p === null || (p.f & S) === 0))
|
|
480
|
+
return;
|
|
481
|
+
if ((r & (he | Y)) !== 0) {
|
|
482
|
+
if ((r & w) === 0)
|
|
483
|
+
return;
|
|
484
|
+
n.f ^= w;
|
|
366
485
|
}
|
|
367
|
-
n.process(K), J.clear();
|
|
368
486
|
}
|
|
369
|
-
|
|
370
|
-
$e = !1, ft(e), Ke = null;
|
|
487
|
+
this.#t.push(n);
|
|
371
488
|
}
|
|
372
489
|
}
|
|
373
|
-
function
|
|
490
|
+
function qn() {
|
|
374
491
|
try {
|
|
375
|
-
|
|
492
|
+
Ln();
|
|
376
493
|
} catch (e) {
|
|
377
|
-
|
|
494
|
+
Me(e, Ue);
|
|
378
495
|
}
|
|
379
496
|
}
|
|
380
|
-
let
|
|
381
|
-
function
|
|
497
|
+
let W = null;
|
|
498
|
+
function _t(e) {
|
|
382
499
|
var t = e.length;
|
|
383
500
|
if (t !== 0) {
|
|
384
501
|
for (var n = 0; n < t; ) {
|
|
385
502
|
var r = e[n++];
|
|
386
|
-
if ((r.f & (
|
|
387
|
-
|
|
388
|
-
for (const i of
|
|
389
|
-
if ((i.f & (
|
|
503
|
+
if ((r.f & (C | U)) === 0 && ke(r) && (W = /* @__PURE__ */ new Set(), ge(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Yt(r), W?.size > 0)) {
|
|
504
|
+
Q.clear();
|
|
505
|
+
for (const i of W) {
|
|
506
|
+
if ((i.f & (C | U)) !== 0) continue;
|
|
390
507
|
const s = [i];
|
|
391
|
-
let
|
|
392
|
-
for (;
|
|
393
|
-
|
|
394
|
-
for (let
|
|
395
|
-
const o = s[
|
|
396
|
-
(o.f & (
|
|
508
|
+
let a = i.parent;
|
|
509
|
+
for (; a !== null; )
|
|
510
|
+
W.has(a) && (W.delete(a), s.push(a)), a = a.parent;
|
|
511
|
+
for (let l = s.length - 1; l >= 0; l--) {
|
|
512
|
+
const o = s[l];
|
|
513
|
+
(o.f & (C | U)) === 0 && ge(o);
|
|
397
514
|
}
|
|
398
515
|
}
|
|
399
|
-
|
|
516
|
+
W.clear();
|
|
400
517
|
}
|
|
401
518
|
}
|
|
402
|
-
|
|
519
|
+
W = null;
|
|
403
520
|
}
|
|
404
521
|
}
|
|
405
|
-
function
|
|
522
|
+
function Lt(e, t, n, r) {
|
|
406
523
|
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
407
524
|
for (const i of e.reactions) {
|
|
408
525
|
const s = i.f;
|
|
409
|
-
(s &
|
|
526
|
+
(s & S) !== 0 ? Lt(
|
|
410
527
|
/** @type {Derived} */
|
|
411
528
|
i,
|
|
412
529
|
t,
|
|
413
530
|
n,
|
|
414
531
|
r
|
|
415
|
-
) : (s & (
|
|
416
|
-
At(i, t, r) && (x(i, A), ie(
|
|
532
|
+
) : (s & (Je | ne)) !== 0 && (s & T) === 0 && Mt(i, t, r) && (y(i, T), et(
|
|
417
533
|
/** @type {Effect} */
|
|
418
534
|
i
|
|
419
535
|
));
|
|
420
536
|
}
|
|
421
537
|
}
|
|
422
|
-
function
|
|
538
|
+
function Mt(e, t, n) {
|
|
423
539
|
const r = n.get(e);
|
|
424
540
|
if (r !== void 0) return r;
|
|
425
541
|
if (e.deps !== null)
|
|
426
542
|
for (const i of e.deps) {
|
|
427
|
-
if (
|
|
543
|
+
if (de.call(t, i))
|
|
428
544
|
return !0;
|
|
429
|
-
if ((i.f &
|
|
545
|
+
if ((i.f & S) !== 0 && Mt(
|
|
430
546
|
/** @type {Derived} */
|
|
431
547
|
i,
|
|
432
548
|
t,
|
|
@@ -440,78 +556,101 @@ function At(e, t, n) {
|
|
|
440
556
|
}
|
|
441
557
|
return n.set(e, !1), !1;
|
|
442
558
|
}
|
|
443
|
-
function
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
t.f ^= E;
|
|
452
|
-
}
|
|
559
|
+
function et(e) {
|
|
560
|
+
b.schedule(e);
|
|
561
|
+
}
|
|
562
|
+
function Dt(e, t) {
|
|
563
|
+
if (!((e.f & Y) !== 0 && (e.f & w) !== 0)) {
|
|
564
|
+
(e.f & T) !== 0 ? t.d.push(e) : (e.f & V) !== 0 && t.m.push(e), y(e, w);
|
|
565
|
+
for (var n = e.first; n !== null; )
|
|
566
|
+
Dt(n, t), n = n.next;
|
|
453
567
|
}
|
|
454
|
-
K.push(t);
|
|
455
568
|
}
|
|
456
|
-
function
|
|
457
|
-
|
|
458
|
-
|
|
569
|
+
function Rt(e) {
|
|
570
|
+
y(e, w);
|
|
571
|
+
for (var t = e.first; t !== null; )
|
|
572
|
+
Rt(t), t = t.next;
|
|
573
|
+
}
|
|
574
|
+
function Gn(e, t, n, r) {
|
|
575
|
+
const i = xe() ? Be : Pt;
|
|
576
|
+
var s = e.filter((c) => !c.settled);
|
|
577
|
+
if (n.length === 0 && s.length === 0) {
|
|
459
578
|
r(t.map(i));
|
|
460
579
|
return;
|
|
461
580
|
}
|
|
462
|
-
var
|
|
581
|
+
var a = (
|
|
463
582
|
/** @type {Effect} */
|
|
464
583
|
v
|
|
465
|
-
),
|
|
466
|
-
function
|
|
467
|
-
|
|
468
|
-
a();
|
|
469
|
-
try {
|
|
470
|
-
r([...t.map(i), ...f]);
|
|
471
|
-
} catch (u) {
|
|
472
|
-
(l.f & H) === 0 && Ie(u, l);
|
|
473
|
-
}
|
|
474
|
-
s?.deactivate(), Le();
|
|
475
|
-
}).catch((f) => {
|
|
476
|
-
Ie(f, l);
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
e.length > 0 ? Promise.all(e).then(() => {
|
|
480
|
-
a();
|
|
584
|
+
), l = Kn(), o = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((c) => c.promise)) : null;
|
|
585
|
+
function f(c) {
|
|
586
|
+
l();
|
|
481
587
|
try {
|
|
482
|
-
|
|
483
|
-
}
|
|
484
|
-
|
|
588
|
+
r(c);
|
|
589
|
+
} catch (_) {
|
|
590
|
+
(a.f & C) === 0 && Me(_, a);
|
|
485
591
|
}
|
|
486
|
-
|
|
592
|
+
De();
|
|
593
|
+
}
|
|
594
|
+
if (n.length === 0) {
|
|
595
|
+
o.then(() => f(t.map(i)));
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
var u = Nt();
|
|
599
|
+
function d() {
|
|
600
|
+
Promise.all(n.map((c) => /* @__PURE__ */ Zn(c))).then((c) => f([...t.map(i), ...c])).catch((c) => Me(c, a)).finally(() => u());
|
|
601
|
+
}
|
|
602
|
+
o ? o.then(() => {
|
|
603
|
+
l(), d(), De();
|
|
604
|
+
}) : d();
|
|
487
605
|
}
|
|
488
|
-
function
|
|
489
|
-
var e =
|
|
606
|
+
function Kn() {
|
|
607
|
+
var e = (
|
|
608
|
+
/** @type {Effect} */
|
|
609
|
+
v
|
|
610
|
+
), t = p, n = B, r = (
|
|
611
|
+
/** @type {Batch} */
|
|
612
|
+
b
|
|
613
|
+
);
|
|
490
614
|
return function(s = !0) {
|
|
491
|
-
|
|
615
|
+
ve(e), te(t), Le(n), s && (e.f & C) === 0 && (r?.activate(), r?.apply());
|
|
492
616
|
};
|
|
493
617
|
}
|
|
494
|
-
function
|
|
495
|
-
|
|
618
|
+
function De(e = !0) {
|
|
619
|
+
ve(null), te(null), Le(null), e && b?.deactivate();
|
|
620
|
+
}
|
|
621
|
+
function Nt() {
|
|
622
|
+
var e = (
|
|
623
|
+
/** @type {Effect} */
|
|
624
|
+
v
|
|
625
|
+
), t = (
|
|
626
|
+
/** @type {Boundary} */
|
|
627
|
+
e.b
|
|
628
|
+
), n = (
|
|
629
|
+
/** @type {Batch} */
|
|
630
|
+
b
|
|
631
|
+
), r = t.is_rendered();
|
|
632
|
+
return t.update_pending_count(1, n), n.increment(r, e), (i = !1) => {
|
|
633
|
+
t.update_pending_count(-1, n), n.decrement(r, e, i);
|
|
634
|
+
};
|
|
496
635
|
}
|
|
497
636
|
// @__NO_SIDE_EFFECTS__
|
|
498
|
-
function
|
|
499
|
-
var t =
|
|
637
|
+
function Be(e) {
|
|
638
|
+
var t = S | T, n = p !== null && (p.f & S) !== 0 ? (
|
|
500
639
|
/** @type {Derived} */
|
|
501
640
|
p
|
|
502
641
|
) : null;
|
|
503
|
-
return v
|
|
504
|
-
ctx:
|
|
642
|
+
return v !== null && (v.f |= Pe), {
|
|
643
|
+
ctx: B,
|
|
505
644
|
deps: null,
|
|
506
645
|
effects: null,
|
|
507
|
-
equals:
|
|
646
|
+
equals: Ot,
|
|
508
647
|
f: t,
|
|
509
648
|
fn: e,
|
|
510
649
|
reactions: null,
|
|
511
650
|
rv: 0,
|
|
512
651
|
v: (
|
|
513
652
|
/** @type {V} */
|
|
514
|
-
|
|
653
|
+
x
|
|
515
654
|
),
|
|
516
655
|
wv: 0,
|
|
517
656
|
parent: n ?? v,
|
|
@@ -519,788 +658,814 @@ function Ce(e) {
|
|
|
519
658
|
};
|
|
520
659
|
}
|
|
521
660
|
// @__NO_SIDE_EFFECTS__
|
|
522
|
-
function
|
|
523
|
-
let
|
|
661
|
+
function Zn(e, t, n) {
|
|
662
|
+
let r = (
|
|
524
663
|
/** @type {Effect | null} */
|
|
525
664
|
v
|
|
526
665
|
);
|
|
527
|
-
|
|
528
|
-
var
|
|
529
|
-
/** @type {Boundary} */
|
|
530
|
-
n.b
|
|
531
|
-
), i = (
|
|
666
|
+
r === null && In();
|
|
667
|
+
var i = (
|
|
532
668
|
/** @type {Promise<V>} */
|
|
533
669
|
/** @type {unknown} */
|
|
534
670
|
void 0
|
|
535
|
-
), s =
|
|
671
|
+
), s = jt(
|
|
536
672
|
/** @type {V} */
|
|
537
|
-
|
|
538
|
-
),
|
|
539
|
-
return
|
|
540
|
-
var o =
|
|
541
|
-
|
|
673
|
+
x
|
|
674
|
+
), a = !p, l = /* @__PURE__ */ new Map();
|
|
675
|
+
return cr(() => {
|
|
676
|
+
var o = (
|
|
677
|
+
/** @type {Effect} */
|
|
678
|
+
v
|
|
679
|
+
), f = At();
|
|
680
|
+
i = f.promise;
|
|
542
681
|
try {
|
|
543
|
-
Promise.resolve(e()).then(
|
|
544
|
-
f === m && f.committed && f.deactivate(), Le();
|
|
545
|
-
});
|
|
682
|
+
Promise.resolve(e()).then(f.resolve, f.reject).finally(De);
|
|
546
683
|
} catch (_) {
|
|
547
|
-
|
|
684
|
+
f.reject(_), De();
|
|
548
685
|
}
|
|
549
|
-
var
|
|
686
|
+
var u = (
|
|
550
687
|
/** @type {Batch} */
|
|
551
|
-
|
|
688
|
+
b
|
|
552
689
|
);
|
|
553
|
-
if (
|
|
554
|
-
|
|
555
|
-
|
|
690
|
+
if (a) {
|
|
691
|
+
if ((o.f & be) !== 0)
|
|
692
|
+
var d = Nt();
|
|
693
|
+
if (
|
|
694
|
+
/** @type {Boundary} */
|
|
695
|
+
r.b.is_rendered()
|
|
696
|
+
)
|
|
697
|
+
l.get(u)?.reject(X), l.delete(u);
|
|
698
|
+
else {
|
|
699
|
+
for (const _ of l.values())
|
|
700
|
+
_.reject(X);
|
|
701
|
+
l.clear();
|
|
702
|
+
}
|
|
703
|
+
l.set(u, f);
|
|
556
704
|
}
|
|
557
705
|
const c = (_, h = void 0) => {
|
|
558
|
-
if (
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
706
|
+
if (d) {
|
|
707
|
+
var g = h === X;
|
|
708
|
+
d(g);
|
|
709
|
+
}
|
|
710
|
+
if (!(h === X || (o.f & C) !== 0)) {
|
|
711
|
+
if (u.activate(), h)
|
|
712
|
+
s.f |= J, We(s, h);
|
|
713
|
+
else {
|
|
714
|
+
(s.f & J) !== 0 && (s.f ^= J), We(s, _);
|
|
715
|
+
for (const [D, R] of l) {
|
|
716
|
+
if (l.delete(D), D === u) break;
|
|
717
|
+
R.reject(X);
|
|
718
|
+
}
|
|
565
719
|
}
|
|
720
|
+
u.deactivate();
|
|
566
721
|
}
|
|
567
|
-
l && (r.update_pending_count(-1), f.decrement(u));
|
|
568
722
|
};
|
|
569
|
-
|
|
570
|
-
}),
|
|
571
|
-
for (const o of
|
|
572
|
-
o.reject(
|
|
723
|
+
f.promise.then(c, (_) => c(null, _ || "unknown"));
|
|
724
|
+
}), fr(() => {
|
|
725
|
+
for (const o of l.values())
|
|
726
|
+
o.reject(X);
|
|
573
727
|
}), new Promise((o) => {
|
|
574
728
|
function f(u) {
|
|
575
|
-
function
|
|
729
|
+
function d() {
|
|
576
730
|
u === i ? o(s) : f(i);
|
|
577
731
|
}
|
|
578
|
-
u.then(
|
|
732
|
+
u.then(d, d);
|
|
579
733
|
}
|
|
580
734
|
f(i);
|
|
581
735
|
});
|
|
582
736
|
}
|
|
583
737
|
// @__NO_SIDE_EFFECTS__
|
|
584
|
-
function
|
|
585
|
-
const t = /* @__PURE__ */
|
|
586
|
-
return
|
|
738
|
+
function ae(e) {
|
|
739
|
+
const t = /* @__PURE__ */ Be(e);
|
|
740
|
+
return Kt(t), t;
|
|
587
741
|
}
|
|
588
742
|
// @__NO_SIDE_EFFECTS__
|
|
589
|
-
function
|
|
590
|
-
const t = /* @__PURE__ */
|
|
591
|
-
return t.equals =
|
|
743
|
+
function Pt(e) {
|
|
744
|
+
const t = /* @__PURE__ */ Be(e);
|
|
745
|
+
return t.equals = Cn, t;
|
|
592
746
|
}
|
|
593
|
-
function
|
|
747
|
+
function Jn(e) {
|
|
594
748
|
var t = e.effects;
|
|
595
749
|
if (t !== null) {
|
|
596
750
|
e.effects = null;
|
|
597
751
|
for (var n = 0; n < t.length; n += 1)
|
|
598
|
-
|
|
752
|
+
ee(
|
|
599
753
|
/** @type {Effect} */
|
|
600
754
|
t[n]
|
|
601
755
|
);
|
|
602
756
|
}
|
|
603
757
|
}
|
|
604
|
-
function
|
|
758
|
+
function Qn(e) {
|
|
605
759
|
for (var t = e.parent; t !== null; ) {
|
|
606
|
-
if ((t.f &
|
|
607
|
-
return (
|
|
760
|
+
if ((t.f & S) === 0)
|
|
761
|
+
return (t.f & C) === 0 ? (
|
|
608
762
|
/** @type {Effect} */
|
|
609
763
|
t
|
|
610
|
-
);
|
|
764
|
+
) : null;
|
|
611
765
|
t = t.parent;
|
|
612
766
|
}
|
|
613
767
|
return null;
|
|
614
768
|
}
|
|
615
|
-
function
|
|
769
|
+
function tt(e) {
|
|
616
770
|
var t, n = v;
|
|
617
|
-
|
|
771
|
+
ve(Qn(e));
|
|
618
772
|
try {
|
|
619
|
-
e.f &= ~
|
|
773
|
+
e.f &= ~se, Jn(e), t = en(e);
|
|
620
774
|
} finally {
|
|
621
|
-
|
|
775
|
+
ve(n);
|
|
622
776
|
}
|
|
623
777
|
return t;
|
|
624
778
|
}
|
|
625
|
-
function
|
|
626
|
-
var t =
|
|
627
|
-
if (e.equals(
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
x(e, n);
|
|
633
|
-
}
|
|
779
|
+
function Ct(e) {
|
|
780
|
+
var t = e.v, n = tt(e);
|
|
781
|
+
if (!e.equals(n) && (e.wv = Jt(), (!b?.is_fork || e.deps === null) && (e.v = n, b?.capture(e, t, !0), e.deps === null))) {
|
|
782
|
+
y(e, w);
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
le || (N !== null ? (Vt() || b?.is_fork) && N.set(e, n) : Qe(e));
|
|
634
786
|
}
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
787
|
+
function er(e) {
|
|
788
|
+
if (e.effects !== null)
|
|
789
|
+
for (const t of e.effects)
|
|
790
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(X), t.teardown = Ke, t.ac = null, Se(t, 0), st(t));
|
|
791
|
+
}
|
|
792
|
+
function Bt(e) {
|
|
793
|
+
if (e.effects !== null)
|
|
794
|
+
for (const t of e.effects)
|
|
795
|
+
t.teardown && ge(t);
|
|
796
|
+
}
|
|
797
|
+
let Ve = /* @__PURE__ */ new Set();
|
|
798
|
+
const Q = /* @__PURE__ */ new Map();
|
|
799
|
+
let zt = !1;
|
|
800
|
+
function jt(e, t) {
|
|
639
801
|
var n = {
|
|
640
802
|
f: 0,
|
|
641
803
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
642
804
|
v: e,
|
|
643
805
|
reactions: null,
|
|
644
|
-
equals:
|
|
806
|
+
equals: Ot,
|
|
645
807
|
rv: 0,
|
|
646
808
|
wv: 0
|
|
647
809
|
};
|
|
648
810
|
return n;
|
|
649
811
|
}
|
|
650
812
|
// @__NO_SIDE_EFFECTS__
|
|
651
|
-
function
|
|
652
|
-
const n =
|
|
653
|
-
return
|
|
813
|
+
function K(e, t) {
|
|
814
|
+
const n = jt(e);
|
|
815
|
+
return Kt(n), n;
|
|
654
816
|
}
|
|
655
|
-
function
|
|
817
|
+
function Z(e, t, n = !1) {
|
|
656
818
|
p !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
657
819
|
// to ensure we error if state is set inside an inspect effect
|
|
658
|
-
(!
|
|
659
|
-
let r = n ?
|
|
660
|
-
return
|
|
820
|
+
(!P || (p.f & dt) !== 0) && xe() && (p.f & (S | ne | Je | dt)) !== 0 && (M === null || !de.call(M, e)) && Nn();
|
|
821
|
+
let r = n ? ue(t) : t;
|
|
822
|
+
return We(e, r, Oe);
|
|
661
823
|
}
|
|
662
|
-
function
|
|
824
|
+
function We(e, t, n = null) {
|
|
663
825
|
if (!e.equals(t)) {
|
|
664
|
-
var
|
|
665
|
-
|
|
666
|
-
var
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
826
|
+
var r = e.v;
|
|
827
|
+
le ? Q.set(e, t) : Q.set(e, r), e.v = t;
|
|
828
|
+
var i = _e.ensure();
|
|
829
|
+
if (i.capture(e, r), (e.f & S) !== 0) {
|
|
830
|
+
const s = (
|
|
831
|
+
/** @type {Derived} */
|
|
832
|
+
e
|
|
833
|
+
);
|
|
834
|
+
(e.f & T) !== 0 && tt(s), N === null && Qe(s);
|
|
835
|
+
}
|
|
836
|
+
e.wv = Jt(), Ht(e, T, n), xe() && v !== null && (v.f & w) !== 0 && (v.f & (Y | he)) === 0 && (O === null ? gr([e]) : O.push(e)), !i.is_fork && Ve.size > 0 && !zt && tr();
|
|
671
837
|
}
|
|
672
838
|
return t;
|
|
673
839
|
}
|
|
674
|
-
function
|
|
675
|
-
|
|
676
|
-
const e
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
He.clear();
|
|
840
|
+
function tr() {
|
|
841
|
+
zt = !1;
|
|
842
|
+
for (const e of Ve)
|
|
843
|
+
(e.f & w) !== 0 && y(e, V), ke(e) && ge(e);
|
|
844
|
+
Ve.clear();
|
|
680
845
|
}
|
|
681
|
-
function
|
|
682
|
-
|
|
846
|
+
function je(e) {
|
|
847
|
+
Z(e, e.v + 1);
|
|
683
848
|
}
|
|
684
|
-
function
|
|
685
|
-
var
|
|
686
|
-
if (
|
|
687
|
-
for (var
|
|
688
|
-
var l =
|
|
689
|
-
if (!(!
|
|
690
|
-
var
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
849
|
+
function Ht(e, t, n) {
|
|
850
|
+
var r = e.reactions;
|
|
851
|
+
if (r !== null)
|
|
852
|
+
for (var i = xe(), s = r.length, a = 0; a < s; a++) {
|
|
853
|
+
var l = r[a], o = l.f;
|
|
854
|
+
if (!(!i && l === v)) {
|
|
855
|
+
var f = (o & T) === 0;
|
|
856
|
+
if (f && y(l, t), (o & S) !== 0) {
|
|
857
|
+
var u = (
|
|
858
|
+
/** @type {Derived} */
|
|
859
|
+
l
|
|
860
|
+
);
|
|
861
|
+
N?.delete(u), (o & se) === 0 && (o & L && (l.f |= se), Ht(u, V, n));
|
|
862
|
+
} else if (f) {
|
|
863
|
+
var d = (
|
|
864
|
+
/** @type {Effect} */
|
|
865
|
+
l
|
|
866
|
+
);
|
|
867
|
+
(o & ne) !== 0 && W !== null && W.add(d), n !== null ? n.push(d) : et(d);
|
|
868
|
+
}
|
|
702
869
|
}
|
|
703
870
|
}
|
|
704
871
|
}
|
|
705
|
-
function
|
|
706
|
-
if (typeof e != "object" || e === null ||
|
|
872
|
+
function ue(e) {
|
|
873
|
+
if (typeof e != "object" || e === null || ce in e)
|
|
707
874
|
return e;
|
|
708
|
-
const t =
|
|
709
|
-
if (t !==
|
|
875
|
+
const t = Ge(e);
|
|
876
|
+
if (t !== Sn && t !== En)
|
|
710
877
|
return e;
|
|
711
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
712
|
-
if (
|
|
713
|
-
return
|
|
714
|
-
var o = p, f =
|
|
715
|
-
|
|
716
|
-
var u =
|
|
717
|
-
return
|
|
878
|
+
var n = /* @__PURE__ */ new Map(), r = yn(e), i = /* @__PURE__ */ K(0), s = ie, a = (l) => {
|
|
879
|
+
if (ie === s)
|
|
880
|
+
return l();
|
|
881
|
+
var o = p, f = ie;
|
|
882
|
+
te(null), bt(s);
|
|
883
|
+
var u = l();
|
|
884
|
+
return te(o), bt(f), u;
|
|
718
885
|
};
|
|
719
|
-
return r && n.set("length", /* @__PURE__ */
|
|
886
|
+
return r && n.set("length", /* @__PURE__ */ K(
|
|
720
887
|
/** @type {any[]} */
|
|
721
888
|
e.length
|
|
722
889
|
)), new Proxy(
|
|
723
890
|
/** @type {any} */
|
|
724
891
|
e,
|
|
725
892
|
{
|
|
726
|
-
defineProperty(
|
|
727
|
-
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) &&
|
|
893
|
+
defineProperty(l, o, f) {
|
|
894
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Dn();
|
|
728
895
|
var u = n.get(o);
|
|
729
|
-
return u === void 0 ?
|
|
730
|
-
var
|
|
731
|
-
return n.set(o,
|
|
732
|
-
}) :
|
|
896
|
+
return u === void 0 ? a(() => {
|
|
897
|
+
var d = /* @__PURE__ */ K(f.value);
|
|
898
|
+
return n.set(o, d), d;
|
|
899
|
+
}) : Z(u, f.value, !0), !0;
|
|
733
900
|
},
|
|
734
|
-
deleteProperty(
|
|
901
|
+
deleteProperty(l, o) {
|
|
735
902
|
var f = n.get(o);
|
|
736
903
|
if (f === void 0) {
|
|
737
|
-
if (o in
|
|
738
|
-
const u =
|
|
739
|
-
n.set(o, u),
|
|
904
|
+
if (o in l) {
|
|
905
|
+
const u = a(() => /* @__PURE__ */ K(x));
|
|
906
|
+
n.set(o, u), je(i);
|
|
740
907
|
}
|
|
741
908
|
} else
|
|
742
|
-
|
|
909
|
+
Z(f, x), je(i);
|
|
743
910
|
return !0;
|
|
744
911
|
},
|
|
745
|
-
get(
|
|
746
|
-
if (o ===
|
|
912
|
+
get(l, o, f) {
|
|
913
|
+
if (o === ce)
|
|
747
914
|
return e;
|
|
748
|
-
var u = n.get(o),
|
|
749
|
-
if (u === void 0 && (!
|
|
750
|
-
var
|
|
751
|
-
return
|
|
915
|
+
var u = n.get(o), d = o in l;
|
|
916
|
+
if (u === void 0 && (!d || Fe(l, o)?.writable) && (u = a(() => {
|
|
917
|
+
var _ = ue(d ? l[o] : x), h = /* @__PURE__ */ K(_);
|
|
918
|
+
return h;
|
|
752
919
|
}), n.set(o, u)), u !== void 0) {
|
|
753
|
-
var
|
|
754
|
-
return
|
|
920
|
+
var c = k(u);
|
|
921
|
+
return c === x ? void 0 : c;
|
|
755
922
|
}
|
|
756
|
-
return Reflect.get(
|
|
923
|
+
return Reflect.get(l, o, f);
|
|
757
924
|
},
|
|
758
|
-
getOwnPropertyDescriptor(
|
|
759
|
-
var f = Reflect.getOwnPropertyDescriptor(
|
|
925
|
+
getOwnPropertyDescriptor(l, o) {
|
|
926
|
+
var f = Reflect.getOwnPropertyDescriptor(l, o);
|
|
760
927
|
if (f && "value" in f) {
|
|
761
928
|
var u = n.get(o);
|
|
762
|
-
u && (f.value =
|
|
929
|
+
u && (f.value = k(u));
|
|
763
930
|
} else if (f === void 0) {
|
|
764
|
-
var
|
|
765
|
-
if (
|
|
931
|
+
var d = n.get(o), c = d?.v;
|
|
932
|
+
if (d !== void 0 && c !== x)
|
|
766
933
|
return {
|
|
767
934
|
enumerable: !0,
|
|
768
935
|
configurable: !0,
|
|
769
|
-
value:
|
|
936
|
+
value: c,
|
|
770
937
|
writable: !0
|
|
771
938
|
};
|
|
772
939
|
}
|
|
773
940
|
return f;
|
|
774
941
|
},
|
|
775
|
-
has(
|
|
776
|
-
if (o ===
|
|
942
|
+
has(l, o) {
|
|
943
|
+
if (o === ce)
|
|
777
944
|
return !0;
|
|
778
|
-
var f = n.get(o), u = f !== void 0 && f.v !==
|
|
779
|
-
if (f !== void 0 || v !== null && (!u ||
|
|
780
|
-
f === void 0 && (f =
|
|
781
|
-
var
|
|
782
|
-
return
|
|
945
|
+
var f = n.get(o), u = f !== void 0 && f.v !== x || Reflect.has(l, o);
|
|
946
|
+
if (f !== void 0 || v !== null && (!u || Fe(l, o)?.writable)) {
|
|
947
|
+
f === void 0 && (f = a(() => {
|
|
948
|
+
var c = u ? ue(l[o]) : x, _ = /* @__PURE__ */ K(c);
|
|
949
|
+
return _;
|
|
783
950
|
}), n.set(o, f));
|
|
784
|
-
var
|
|
785
|
-
if (
|
|
951
|
+
var d = k(f);
|
|
952
|
+
if (d === x)
|
|
786
953
|
return !1;
|
|
787
954
|
}
|
|
788
955
|
return u;
|
|
789
956
|
},
|
|
790
|
-
set(
|
|
791
|
-
var
|
|
957
|
+
set(l, o, f, u) {
|
|
958
|
+
var d = n.get(o), c = o in l;
|
|
792
959
|
if (r && o === "length")
|
|
793
|
-
for (var
|
|
794
|
-
|
|
795
|
-
var
|
|
796
|
-
|
|
960
|
+
for (var _ = f; _ < /** @type {Source<number>} */
|
|
961
|
+
d.v; _ += 1) {
|
|
962
|
+
var h = n.get(_ + "");
|
|
963
|
+
h !== void 0 ? Z(h, x) : _ in l && (h = a(() => /* @__PURE__ */ K(x)), n.set(_ + "", h));
|
|
797
964
|
}
|
|
798
|
-
if (
|
|
799
|
-
(!
|
|
965
|
+
if (d === void 0)
|
|
966
|
+
(!c || Fe(l, o)?.writable) && (d = a(() => /* @__PURE__ */ K(void 0)), Z(d, ue(f)), n.set(o, d));
|
|
800
967
|
else {
|
|
801
|
-
|
|
802
|
-
var
|
|
803
|
-
|
|
968
|
+
c = d.v !== x;
|
|
969
|
+
var g = a(() => ue(f));
|
|
970
|
+
Z(d, g);
|
|
804
971
|
}
|
|
805
|
-
var
|
|
806
|
-
if (
|
|
972
|
+
var D = Reflect.getOwnPropertyDescriptor(l, o);
|
|
973
|
+
if (D?.set && D.set.call(u, f), !c) {
|
|
807
974
|
if (r && typeof o == "string") {
|
|
808
|
-
var
|
|
975
|
+
var R = (
|
|
809
976
|
/** @type {Source<number>} */
|
|
810
977
|
n.get("length")
|
|
811
978
|
), q = Number(o);
|
|
812
|
-
Number.isInteger(q) && q >=
|
|
979
|
+
Number.isInteger(q) && q >= R.v && Z(R, q + 1);
|
|
813
980
|
}
|
|
814
|
-
|
|
981
|
+
je(i);
|
|
815
982
|
}
|
|
816
983
|
return !0;
|
|
817
984
|
},
|
|
818
|
-
ownKeys(
|
|
819
|
-
|
|
820
|
-
var o = Reflect.ownKeys(
|
|
821
|
-
var
|
|
822
|
-
return
|
|
985
|
+
ownKeys(l) {
|
|
986
|
+
k(i);
|
|
987
|
+
var o = Reflect.ownKeys(l).filter((d) => {
|
|
988
|
+
var c = n.get(d);
|
|
989
|
+
return c === void 0 || c.v !== x;
|
|
823
990
|
});
|
|
824
991
|
for (var [f, u] of n)
|
|
825
|
-
u.v !==
|
|
992
|
+
u.v !== x && !(f in l) && o.push(f);
|
|
826
993
|
return o;
|
|
827
994
|
},
|
|
828
995
|
setPrototypeOf() {
|
|
829
|
-
|
|
996
|
+
Rn();
|
|
830
997
|
}
|
|
831
998
|
}
|
|
832
999
|
);
|
|
833
1000
|
}
|
|
834
|
-
var
|
|
835
|
-
function
|
|
1001
|
+
var nr, rr, ir;
|
|
1002
|
+
function Xe(e = "") {
|
|
836
1003
|
return document.createTextNode(e);
|
|
837
1004
|
}
|
|
838
1005
|
// @__NO_SIDE_EFFECTS__
|
|
839
|
-
function
|
|
840
|
-
return
|
|
1006
|
+
function nt(e) {
|
|
1007
|
+
return (
|
|
1008
|
+
/** @type {TemplateNode | null} */
|
|
1009
|
+
rr.call(e)
|
|
1010
|
+
);
|
|
841
1011
|
}
|
|
842
1012
|
// @__NO_SIDE_EFFECTS__
|
|
843
|
-
function
|
|
844
|
-
return
|
|
1013
|
+
function rt(e) {
|
|
1014
|
+
return (
|
|
1015
|
+
/** @type {TemplateNode | null} */
|
|
1016
|
+
ir.call(e)
|
|
1017
|
+
);
|
|
845
1018
|
}
|
|
846
|
-
function
|
|
847
|
-
return /* @__PURE__ */
|
|
1019
|
+
function $t(e, t) {
|
|
1020
|
+
return /* @__PURE__ */ nt(e);
|
|
848
1021
|
}
|
|
849
|
-
function
|
|
1022
|
+
function sr(e, t = !1) {
|
|
850
1023
|
{
|
|
851
|
-
var n = (
|
|
852
|
-
|
|
853
|
-
/* @__PURE__ */ Je(
|
|
854
|
-
/** @type {Node} */
|
|
855
|
-
e
|
|
856
|
-
)
|
|
857
|
-
);
|
|
858
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Qe(n) : n;
|
|
1024
|
+
var n = /* @__PURE__ */ nt(e);
|
|
1025
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ rt(n) : n;
|
|
859
1026
|
}
|
|
860
1027
|
}
|
|
861
|
-
function
|
|
1028
|
+
function lr() {
|
|
862
1029
|
return !1;
|
|
863
1030
|
}
|
|
864
|
-
function
|
|
1031
|
+
function ar(e, t, n) {
|
|
1032
|
+
return (
|
|
1033
|
+
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1034
|
+
document.createElementNS(kt, e, void 0)
|
|
1035
|
+
);
|
|
1036
|
+
}
|
|
1037
|
+
function Ut(e) {
|
|
865
1038
|
var t = p, n = v;
|
|
866
|
-
|
|
1039
|
+
te(null), ve(null);
|
|
867
1040
|
try {
|
|
868
1041
|
return e();
|
|
869
1042
|
} finally {
|
|
870
|
-
|
|
1043
|
+
te(t), ve(n);
|
|
871
1044
|
}
|
|
872
1045
|
}
|
|
873
|
-
function
|
|
1046
|
+
function or(e, t) {
|
|
874
1047
|
var n = t.last;
|
|
875
1048
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
876
1049
|
}
|
|
877
|
-
function
|
|
878
|
-
var
|
|
879
|
-
|
|
880
|
-
var
|
|
881
|
-
ctx:
|
|
1050
|
+
function me(e, t) {
|
|
1051
|
+
var n = v;
|
|
1052
|
+
n !== null && (n.f & U) !== 0 && (e |= U);
|
|
1053
|
+
var r = {
|
|
1054
|
+
ctx: B,
|
|
882
1055
|
deps: null,
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
f: e | A,
|
|
1056
|
+
nodes: null,
|
|
1057
|
+
f: e | T | L,
|
|
886
1058
|
first: null,
|
|
887
1059
|
fn: t,
|
|
888
1060
|
last: null,
|
|
889
1061
|
next: null,
|
|
890
|
-
parent:
|
|
891
|
-
b:
|
|
1062
|
+
parent: n,
|
|
1063
|
+
b: n && n.b,
|
|
892
1064
|
prev: null,
|
|
893
1065
|
teardown: null,
|
|
894
|
-
transitions: null,
|
|
895
1066
|
wv: 0,
|
|
896
1067
|
ac: null
|
|
897
|
-
};
|
|
898
|
-
if (
|
|
1068
|
+
}, i = r;
|
|
1069
|
+
if ((e & we) !== 0)
|
|
1070
|
+
fe !== null ? fe.push(r) : _e.ensure().schedule(r);
|
|
1071
|
+
else if (t !== null) {
|
|
899
1072
|
try {
|
|
900
|
-
|
|
901
|
-
} catch (
|
|
902
|
-
throw
|
|
903
|
-
}
|
|
904
|
-
else t !== null && ie(s);
|
|
905
|
-
if (r) {
|
|
906
|
-
var l = s;
|
|
907
|
-
if (n && l.deps === null && l.teardown === null && l.nodes_start === null && l.first === l.last && // either `null`, or a singular child
|
|
908
|
-
(l.f & Ne) === 0 && (l = l.first, (e & V) !== 0 && (e & ce) !== 0 && l !== null && (l.f |= ce)), l !== null && (l.parent = i, i !== null && qn(l, i), p !== null && (p.f & k) !== 0 && (e & _e) === 0)) {
|
|
909
|
-
var a = (
|
|
910
|
-
/** @type {Derived} */
|
|
911
|
-
p
|
|
912
|
-
);
|
|
913
|
-
(a.effects ??= []).push(l);
|
|
1073
|
+
ge(r);
|
|
1074
|
+
} catch (a) {
|
|
1075
|
+
throw ee(r), a;
|
|
914
1076
|
}
|
|
1077
|
+
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
1078
|
+
(i.f & Pe) === 0 && (i = i.first, (e & ne) !== 0 && (e & pe) !== 0 && i !== null && (i.f |= pe));
|
|
915
1079
|
}
|
|
916
|
-
|
|
1080
|
+
if (i !== null && (i.parent = n, n !== null && or(i, n), p !== null && (p.f & S) !== 0 && (e & he) === 0)) {
|
|
1081
|
+
var s = (
|
|
1082
|
+
/** @type {Derived} */
|
|
1083
|
+
p
|
|
1084
|
+
);
|
|
1085
|
+
(s.effects ??= []).push(i);
|
|
1086
|
+
}
|
|
1087
|
+
return r;
|
|
917
1088
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
920
|
-
|
|
1089
|
+
function Vt() {
|
|
1090
|
+
return p !== null && !P;
|
|
1091
|
+
}
|
|
1092
|
+
function fr(e) {
|
|
1093
|
+
const t = me(Ze, null);
|
|
1094
|
+
return y(t, w), t.teardown = e, t;
|
|
921
1095
|
}
|
|
922
|
-
function
|
|
923
|
-
return
|
|
1096
|
+
function ur(e) {
|
|
1097
|
+
return me(we | An, e);
|
|
924
1098
|
}
|
|
925
|
-
function
|
|
926
|
-
return
|
|
1099
|
+
function cr(e) {
|
|
1100
|
+
return me(Je | Pe, e);
|
|
927
1101
|
}
|
|
928
|
-
function
|
|
929
|
-
|
|
930
|
-
|
|
1102
|
+
function it(e, t = [], n = [], r = []) {
|
|
1103
|
+
Gn(r, t, n, (i) => {
|
|
1104
|
+
me(Ze, () => e(...i.map(k)));
|
|
931
1105
|
});
|
|
932
1106
|
}
|
|
933
|
-
function
|
|
934
|
-
var n =
|
|
1107
|
+
function Wt(e, t = 0) {
|
|
1108
|
+
var n = me(ne | t, e);
|
|
935
1109
|
return n;
|
|
936
1110
|
}
|
|
937
|
-
function
|
|
938
|
-
return
|
|
1111
|
+
function vt(e) {
|
|
1112
|
+
return me(Y | Pe, e);
|
|
939
1113
|
}
|
|
940
|
-
function
|
|
1114
|
+
function Xt(e) {
|
|
941
1115
|
var t = e.teardown;
|
|
942
1116
|
if (t !== null) {
|
|
943
|
-
const n =
|
|
944
|
-
|
|
1117
|
+
const n = le, r = p;
|
|
1118
|
+
gt(!0), te(null);
|
|
945
1119
|
try {
|
|
946
1120
|
t.call(null);
|
|
947
1121
|
} finally {
|
|
948
|
-
|
|
1122
|
+
gt(n), te(r);
|
|
949
1123
|
}
|
|
950
1124
|
}
|
|
951
1125
|
}
|
|
952
|
-
function
|
|
1126
|
+
function st(e, t = !1) {
|
|
953
1127
|
var n = e.first;
|
|
954
1128
|
for (e.first = e.last = null; n !== null; ) {
|
|
955
1129
|
const i = n.ac;
|
|
956
|
-
i !== null &&
|
|
957
|
-
i.abort(
|
|
1130
|
+
i !== null && Ut(() => {
|
|
1131
|
+
i.abort(X);
|
|
958
1132
|
});
|
|
959
1133
|
var r = n.next;
|
|
960
|
-
(n.f &
|
|
1134
|
+
(n.f & he) !== 0 ? n.parent = null : ee(n, t), n = r;
|
|
961
1135
|
}
|
|
962
1136
|
}
|
|
963
|
-
function
|
|
1137
|
+
function dr(e) {
|
|
964
1138
|
for (var t = e.first; t !== null; ) {
|
|
965
1139
|
var n = t.next;
|
|
966
|
-
(t.f &
|
|
1140
|
+
(t.f & Y) === 0 && ee(t), t = n;
|
|
967
1141
|
}
|
|
968
1142
|
}
|
|
969
|
-
function
|
|
1143
|
+
function ee(e, t = !0) {
|
|
970
1144
|
var n = !1;
|
|
971
|
-
(t || (e.f &
|
|
972
|
-
e.
|
|
1145
|
+
(t || (e.f & Tn) !== 0) && e.nodes !== null && e.nodes.end !== null && (hr(
|
|
1146
|
+
e.nodes.start,
|
|
973
1147
|
/** @type {TemplateNode} */
|
|
974
|
-
e.
|
|
975
|
-
), n = !0),
|
|
976
|
-
var r = e.
|
|
1148
|
+
e.nodes.end
|
|
1149
|
+
), n = !0), y(e, ct), st(e, t && !n), Se(e, 0);
|
|
1150
|
+
var r = e.nodes && e.nodes.t;
|
|
977
1151
|
if (r !== null)
|
|
978
1152
|
for (const s of r)
|
|
979
1153
|
s.stop();
|
|
980
|
-
|
|
1154
|
+
Xt(e), e.f ^= ct, e.f |= C;
|
|
981
1155
|
var i = e.parent;
|
|
982
|
-
i !== null && i.first !== null &&
|
|
1156
|
+
i !== null && i.first !== null && Yt(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
983
1157
|
}
|
|
984
|
-
function
|
|
1158
|
+
function hr(e, t) {
|
|
985
1159
|
for (; e !== null; ) {
|
|
986
|
-
var n = e === t ? null : (
|
|
987
|
-
/** @type {TemplateNode} */
|
|
988
|
-
/* @__PURE__ */ Qe(e)
|
|
989
|
-
);
|
|
1160
|
+
var n = e === t ? null : /* @__PURE__ */ rt(e);
|
|
990
1161
|
e.remove(), e = n;
|
|
991
1162
|
}
|
|
992
1163
|
}
|
|
993
|
-
function
|
|
1164
|
+
function Yt(e) {
|
|
994
1165
|
var t = e.parent, n = e.prev, r = e.next;
|
|
995
1166
|
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
996
1167
|
}
|
|
997
|
-
function
|
|
1168
|
+
function pr(e, t, n = !0) {
|
|
998
1169
|
var r = [];
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
for (var i of e)
|
|
1008
|
-
i.out(r);
|
|
1170
|
+
qt(e, r, !0);
|
|
1171
|
+
var i = () => {
|
|
1172
|
+
n && ee(e), t && t();
|
|
1173
|
+
}, s = r.length;
|
|
1174
|
+
if (s > 0) {
|
|
1175
|
+
var a = () => --s || i();
|
|
1176
|
+
for (var l of r)
|
|
1177
|
+
l.out(a);
|
|
1009
1178
|
} else
|
|
1010
|
-
|
|
1011
|
-
}
|
|
1012
|
-
function
|
|
1013
|
-
if ((e.f &
|
|
1014
|
-
|
|
1015
|
-
|
|
1179
|
+
i();
|
|
1180
|
+
}
|
|
1181
|
+
function qt(e, t, n) {
|
|
1182
|
+
if ((e.f & U) === 0) {
|
|
1183
|
+
e.f ^= U;
|
|
1184
|
+
var r = e.nodes && e.nodes.t;
|
|
1185
|
+
if (r !== null)
|
|
1186
|
+
for (const l of r)
|
|
1016
1187
|
(l.is_global || n) && t.push(l);
|
|
1017
|
-
for (var
|
|
1018
|
-
var
|
|
1188
|
+
for (var i = e.first; i !== null; ) {
|
|
1189
|
+
var s = i.next, a = (i.f & pe) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1019
1190
|
// it means the parent block effect was pruned. In that case,
|
|
1020
1191
|
// transparency information was transferred to the branch effect.
|
|
1021
|
-
(
|
|
1022
|
-
|
|
1192
|
+
(i.f & Y) !== 0 && (e.f & ne) !== 0;
|
|
1193
|
+
qt(i, t, a ? n : !1), i = s;
|
|
1023
1194
|
}
|
|
1024
1195
|
}
|
|
1025
1196
|
}
|
|
1026
|
-
function
|
|
1027
|
-
|
|
1197
|
+
function _r(e) {
|
|
1198
|
+
Gt(e, !0);
|
|
1028
1199
|
}
|
|
1029
|
-
function
|
|
1030
|
-
if ((e.f &
|
|
1031
|
-
e.f ^=
|
|
1200
|
+
function Gt(e, t) {
|
|
1201
|
+
if ((e.f & U) !== 0) {
|
|
1202
|
+
e.f ^= U, (e.f & w) === 0 && (y(e, T), _e.ensure().schedule(e));
|
|
1032
1203
|
for (var n = e.first; n !== null; ) {
|
|
1033
|
-
var r = n.next, i = (n.f &
|
|
1034
|
-
|
|
1204
|
+
var r = n.next, i = (n.f & pe) !== 0 || (n.f & Y) !== 0;
|
|
1205
|
+
Gt(n, i ? t : !1), n = r;
|
|
1035
1206
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1207
|
+
var s = e.nodes && e.nodes.t;
|
|
1208
|
+
if (s !== null)
|
|
1209
|
+
for (const a of s)
|
|
1210
|
+
(a.is_global || t) && a.in();
|
|
1039
1211
|
}
|
|
1040
1212
|
}
|
|
1041
|
-
function
|
|
1042
|
-
|
|
1043
|
-
var
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
t.append(n), n = i;
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
let ue = !1;
|
|
1051
|
-
function ft(e) {
|
|
1052
|
-
ue = e;
|
|
1213
|
+
function vr(e, t) {
|
|
1214
|
+
if (e.nodes)
|
|
1215
|
+
for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
|
|
1216
|
+
var i = n === r ? null : /* @__PURE__ */ rt(n);
|
|
1217
|
+
t.append(n), n = i;
|
|
1218
|
+
}
|
|
1053
1219
|
}
|
|
1054
|
-
let
|
|
1055
|
-
function
|
|
1056
|
-
|
|
1220
|
+
let Ie = !1, le = !1;
|
|
1221
|
+
function gt(e) {
|
|
1222
|
+
le = e;
|
|
1057
1223
|
}
|
|
1058
|
-
let p = null,
|
|
1059
|
-
function
|
|
1224
|
+
let p = null, P = !1;
|
|
1225
|
+
function te(e) {
|
|
1060
1226
|
p = e;
|
|
1061
1227
|
}
|
|
1062
1228
|
let v = null;
|
|
1063
|
-
function
|
|
1229
|
+
function ve(e) {
|
|
1064
1230
|
v = e;
|
|
1065
1231
|
}
|
|
1066
|
-
let
|
|
1067
|
-
function
|
|
1068
|
-
p !== null && (
|
|
1232
|
+
let M = null;
|
|
1233
|
+
function Kt(e) {
|
|
1234
|
+
p !== null && (M === null ? M = [e] : M.push(e));
|
|
1069
1235
|
}
|
|
1070
|
-
let
|
|
1071
|
-
function
|
|
1236
|
+
let A = null, F = 0, O = null;
|
|
1237
|
+
function gr(e) {
|
|
1072
1238
|
O = e;
|
|
1073
1239
|
}
|
|
1074
|
-
let
|
|
1075
|
-
function
|
|
1076
|
-
|
|
1240
|
+
let Zt = 1, re = 0, ie = re;
|
|
1241
|
+
function bt(e) {
|
|
1242
|
+
ie = e;
|
|
1077
1243
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
return ++Ut;
|
|
1244
|
+
function Jt() {
|
|
1245
|
+
return ++Zt;
|
|
1081
1246
|
}
|
|
1082
|
-
function
|
|
1247
|
+
function ke(e) {
|
|
1083
1248
|
var t = e.f;
|
|
1084
|
-
if ((t &
|
|
1249
|
+
if ((t & T) !== 0)
|
|
1085
1250
|
return !0;
|
|
1086
|
-
if ((t &
|
|
1087
|
-
var n =
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
if (s = n[i], we(
|
|
1101
|
-
/** @type {Derived} */
|
|
1102
|
-
s
|
|
1103
|
-
) && It(
|
|
1104
|
-
/** @type {Derived} */
|
|
1105
|
-
s
|
|
1106
|
-
), s.wv > e.wv)
|
|
1107
|
-
return !0;
|
|
1251
|
+
if (t & S && (e.f &= ~se), (t & V) !== 0) {
|
|
1252
|
+
for (var n = (
|
|
1253
|
+
/** @type {Value[]} */
|
|
1254
|
+
e.deps
|
|
1255
|
+
), r = n.length, i = 0; i < r; i++) {
|
|
1256
|
+
var s = n[i];
|
|
1257
|
+
if (ke(
|
|
1258
|
+
/** @type {Derived} */
|
|
1259
|
+
s
|
|
1260
|
+
) && Ct(
|
|
1261
|
+
/** @type {Derived} */
|
|
1262
|
+
s
|
|
1263
|
+
), s.wv > e.wv)
|
|
1264
|
+
return !0;
|
|
1108
1265
|
}
|
|
1109
|
-
(
|
|
1266
|
+
(t & L) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1267
|
+
// traversal of the graph in the other batches still happens
|
|
1268
|
+
N === null && y(e, w);
|
|
1110
1269
|
}
|
|
1111
1270
|
return !1;
|
|
1112
1271
|
}
|
|
1113
|
-
function
|
|
1272
|
+
function Qt(e, t, n = !0) {
|
|
1114
1273
|
var r = e.reactions;
|
|
1115
|
-
if (r !== null && !
|
|
1274
|
+
if (r !== null && !(M !== null && de.call(M, e)))
|
|
1116
1275
|
for (var i = 0; i < r.length; i++) {
|
|
1117
1276
|
var s = r[i];
|
|
1118
|
-
(s.f &
|
|
1277
|
+
(s.f & S) !== 0 ? Qt(
|
|
1119
1278
|
/** @type {Derived} */
|
|
1120
1279
|
s,
|
|
1121
1280
|
t,
|
|
1122
1281
|
!1
|
|
1123
|
-
) : t === s && (n ?
|
|
1282
|
+
) : t === s && (n ? y(s, T) : (s.f & w) !== 0 && y(s, V), et(
|
|
1124
1283
|
/** @type {Effect} */
|
|
1125
1284
|
s
|
|
1126
1285
|
));
|
|
1127
1286
|
}
|
|
1128
1287
|
}
|
|
1129
|
-
function
|
|
1130
|
-
var t =
|
|
1131
|
-
|
|
1132
|
-
null, F = 0, O = null,
|
|
1133
|
-
e.ac.abort(
|
|
1288
|
+
function en(e) {
|
|
1289
|
+
var t = A, n = F, r = O, i = p, s = M, a = B, l = P, o = ie, f = e.f;
|
|
1290
|
+
A = /** @type {null | Value[]} */
|
|
1291
|
+
null, F = 0, O = null, p = (f & (Y | he)) === 0 ? e : null, M = null, Le(e.ctx), P = !1, ie = ++re, e.ac !== null && (Ut(() => {
|
|
1292
|
+
e.ac.abort(X);
|
|
1134
1293
|
}), e.ac = null);
|
|
1135
1294
|
try {
|
|
1136
|
-
e.f |=
|
|
1137
|
-
var
|
|
1295
|
+
e.f |= $e;
|
|
1296
|
+
var u = (
|
|
1138
1297
|
/** @type {Function} */
|
|
1139
1298
|
e.fn
|
|
1140
|
-
),
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1299
|
+
), d = u();
|
|
1300
|
+
e.f |= be;
|
|
1301
|
+
var c = e.deps, _ = b?.is_fork;
|
|
1302
|
+
if (A !== null) {
|
|
1303
|
+
var h;
|
|
1304
|
+
if (_ || Se(e, F), c !== null && F > 0)
|
|
1305
|
+
for (c.length = F + A.length, h = 0; h < A.length; h++)
|
|
1306
|
+
c[F + h] = A[h];
|
|
1146
1307
|
else
|
|
1147
|
-
e.deps =
|
|
1148
|
-
if (
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
Wt(
|
|
1158
|
-
O[d],
|
|
1308
|
+
e.deps = c = A;
|
|
1309
|
+
if (Vt() && (e.f & L) !== 0)
|
|
1310
|
+
for (h = F; h < c.length; h++)
|
|
1311
|
+
(c[h].reactions ??= []).push(e);
|
|
1312
|
+
} else !_ && c !== null && F < c.length && (Se(e, F), c.length = F);
|
|
1313
|
+
if (xe() && O !== null && !P && c !== null && (e.f & (S | V | T)) === 0)
|
|
1314
|
+
for (h = 0; h < /** @type {Source[]} */
|
|
1315
|
+
O.length; h++)
|
|
1316
|
+
Qt(
|
|
1317
|
+
O[h],
|
|
1159
1318
|
/** @type {Effect} */
|
|
1160
1319
|
e
|
|
1161
1320
|
);
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1321
|
+
if (i !== null && i !== e) {
|
|
1322
|
+
if (re++, i.deps !== null)
|
|
1323
|
+
for (let g = 0; g < n; g += 1)
|
|
1324
|
+
i.deps[g].rv = re;
|
|
1325
|
+
if (t !== null)
|
|
1326
|
+
for (const g of t)
|
|
1327
|
+
g.rv = re;
|
|
1328
|
+
O !== null && (r === null ? r = O : r.push(.../** @type {Source[]} */
|
|
1329
|
+
O));
|
|
1330
|
+
}
|
|
1331
|
+
return (e.f & J) !== 0 && (e.f ^= J), d;
|
|
1332
|
+
} catch (g) {
|
|
1333
|
+
return Un(g);
|
|
1166
1334
|
} finally {
|
|
1167
|
-
e.f ^=
|
|
1335
|
+
e.f ^= $e, A = t, F = n, O = r, p = i, M = s, Le(a), P = l, ie = o;
|
|
1168
1336
|
}
|
|
1169
1337
|
}
|
|
1170
|
-
function
|
|
1338
|
+
function br(e, t) {
|
|
1171
1339
|
let n = t.reactions;
|
|
1172
1340
|
if (n !== null) {
|
|
1173
|
-
var r =
|
|
1341
|
+
var r = wn.call(n, e);
|
|
1174
1342
|
if (r !== -1) {
|
|
1175
1343
|
var i = n.length - 1;
|
|
1176
1344
|
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
1177
1345
|
}
|
|
1178
1346
|
}
|
|
1179
|
-
n === null && (t.f &
|
|
1347
|
+
if (n === null && (t.f & S) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1180
1348
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1181
1349
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1182
|
-
(
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
));
|
|
1350
|
+
(A === null || !de.call(A, t))) {
|
|
1351
|
+
var s = (
|
|
1352
|
+
/** @type {Derived} */
|
|
1353
|
+
t
|
|
1354
|
+
);
|
|
1355
|
+
(s.f & L) !== 0 && (s.f ^= L, s.f &= ~se), Qe(s), er(s), Se(s, 0);
|
|
1356
|
+
}
|
|
1190
1357
|
}
|
|
1191
|
-
function
|
|
1358
|
+
function Se(e, t) {
|
|
1192
1359
|
var n = e.deps;
|
|
1193
1360
|
if (n !== null)
|
|
1194
1361
|
for (var r = t; r < n.length; r++)
|
|
1195
|
-
|
|
1362
|
+
br(e, n[r]);
|
|
1196
1363
|
}
|
|
1197
|
-
function
|
|
1364
|
+
function ge(e) {
|
|
1198
1365
|
var t = e.f;
|
|
1199
|
-
if ((t &
|
|
1200
|
-
|
|
1201
|
-
var n = v, r =
|
|
1202
|
-
v = e,
|
|
1366
|
+
if ((t & C) === 0) {
|
|
1367
|
+
y(e, w);
|
|
1368
|
+
var n = v, r = Ie;
|
|
1369
|
+
v = e, Ie = !0;
|
|
1203
1370
|
try {
|
|
1204
|
-
(t &
|
|
1205
|
-
var i =
|
|
1206
|
-
e.teardown = typeof i == "function" ? i : null, e.wv =
|
|
1371
|
+
(t & (ne | Ft)) !== 0 ? dr(e) : st(e), Xt(e);
|
|
1372
|
+
var i = en(e);
|
|
1373
|
+
e.teardown = typeof i == "function" ? i : null, e.wv = Zt;
|
|
1207
1374
|
var s;
|
|
1208
|
-
|
|
1375
|
+
mn && Bn && (e.f & T) !== 0 && e.deps;
|
|
1209
1376
|
} finally {
|
|
1210
|
-
|
|
1377
|
+
Ie = r, v = n;
|
|
1211
1378
|
}
|
|
1212
1379
|
}
|
|
1213
1380
|
}
|
|
1214
|
-
function
|
|
1215
|
-
var t = e.f, n = (t &
|
|
1216
|
-
if (p !== null && !
|
|
1217
|
-
var r = v !== null && (v.f &
|
|
1218
|
-
if (!r && !
|
|
1381
|
+
function k(e) {
|
|
1382
|
+
var t = e.f, n = (t & S) !== 0;
|
|
1383
|
+
if (p !== null && !P) {
|
|
1384
|
+
var r = v !== null && (v.f & C) !== 0;
|
|
1385
|
+
if (!r && (M === null || !de.call(M, e))) {
|
|
1219
1386
|
var i = p.deps;
|
|
1220
|
-
if ((p.f &
|
|
1221
|
-
e.rv <
|
|
1387
|
+
if ((p.f & $e) !== 0)
|
|
1388
|
+
e.rv < re && (e.rv = re, A === null && i !== null && i[F] === e ? F++ : A === null ? A = [e] : A.push(e));
|
|
1222
1389
|
else {
|
|
1223
1390
|
(p.deps ??= []).push(e);
|
|
1224
1391
|
var s = e.reactions;
|
|
1225
|
-
s === null ? e.reactions = [p] :
|
|
1392
|
+
s === null ? e.reactions = [p] : de.call(s, p) || s.push(p);
|
|
1226
1393
|
}
|
|
1227
1394
|
}
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1395
|
+
}
|
|
1396
|
+
if (le && Q.has(e))
|
|
1397
|
+
return Q.get(e);
|
|
1398
|
+
if (n) {
|
|
1399
|
+
var a = (
|
|
1232
1400
|
/** @type {Derived} */
|
|
1233
1401
|
e
|
|
1234
|
-
)
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
if (J.has(e))
|
|
1239
|
-
return J.get(e);
|
|
1240
|
-
if (n) {
|
|
1241
|
-
l = /** @type {Derived} */
|
|
1242
|
-
e;
|
|
1243
|
-
var o = l.v;
|
|
1244
|
-
return ((l.f & E) === 0 && l.reactions !== null || qt(l)) && (o = Ze(l)), J.set(l, o), o;
|
|
1402
|
+
);
|
|
1403
|
+
if (le) {
|
|
1404
|
+
var l = a.v;
|
|
1405
|
+
return ((a.f & w) === 0 && a.reactions !== null || nn(a)) && (l = tt(a)), Q.set(a, l), l;
|
|
1245
1406
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
if (L?.has(e))
|
|
1253
|
-
return L.get(e);
|
|
1254
|
-
if ((e.f & ne) !== 0)
|
|
1407
|
+
var o = (a.f & L) === 0 && !P && p !== null && (Ie || (p.f & L) !== 0), f = (a.f & be) === 0;
|
|
1408
|
+
ke(a) && (o && (a.f |= L), Ct(a)), o && !f && (Bt(a), tn(a));
|
|
1409
|
+
}
|
|
1410
|
+
if (N?.has(e))
|
|
1411
|
+
return N.get(e);
|
|
1412
|
+
if ((e.f & J) !== 0)
|
|
1255
1413
|
throw e.v;
|
|
1256
1414
|
return e.v;
|
|
1257
1415
|
}
|
|
1258
|
-
function
|
|
1259
|
-
if (e.
|
|
1416
|
+
function tn(e) {
|
|
1417
|
+
if (e.f |= L, e.deps !== null)
|
|
1418
|
+
for (const t of e.deps)
|
|
1419
|
+
(t.reactions ??= []).push(e), (t.f & S) !== 0 && (t.f & L) === 0 && (Bt(
|
|
1420
|
+
/** @type {Derived} */
|
|
1421
|
+
t
|
|
1422
|
+
), tn(
|
|
1423
|
+
/** @type {Derived} */
|
|
1424
|
+
t
|
|
1425
|
+
));
|
|
1426
|
+
}
|
|
1427
|
+
function nn(e) {
|
|
1428
|
+
if (e.v === x) return !0;
|
|
1260
1429
|
if (e.deps === null) return !1;
|
|
1261
1430
|
for (const t of e.deps)
|
|
1262
|
-
if (
|
|
1431
|
+
if (Q.has(t) || (t.f & S) !== 0 && nn(
|
|
1263
1432
|
/** @type {Derived} */
|
|
1264
1433
|
t
|
|
1265
1434
|
))
|
|
1266
1435
|
return !0;
|
|
1267
1436
|
return !1;
|
|
1268
1437
|
}
|
|
1269
|
-
function
|
|
1270
|
-
var t =
|
|
1438
|
+
function Ye(e) {
|
|
1439
|
+
var t = P;
|
|
1271
1440
|
try {
|
|
1272
|
-
return
|
|
1441
|
+
return P = !0, e();
|
|
1273
1442
|
} finally {
|
|
1274
|
-
|
|
1443
|
+
P = t;
|
|
1275
1444
|
}
|
|
1276
1445
|
}
|
|
1277
|
-
|
|
1278
|
-
function x(e, t) {
|
|
1279
|
-
e.f = e.f & sr | t;
|
|
1280
|
-
}
|
|
1281
|
-
function dt(e) {
|
|
1446
|
+
function mt(e) {
|
|
1282
1447
|
if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
|
|
1283
|
-
if (
|
|
1284
|
-
|
|
1448
|
+
if (ce in e)
|
|
1449
|
+
qe(e);
|
|
1285
1450
|
else if (!Array.isArray(e))
|
|
1286
1451
|
for (let t in e) {
|
|
1287
1452
|
const n = e[t];
|
|
1288
|
-
typeof n == "object" && n &&
|
|
1453
|
+
typeof n == "object" && n && ce in n && qe(n);
|
|
1289
1454
|
}
|
|
1290
1455
|
}
|
|
1291
1456
|
}
|
|
1292
|
-
function
|
|
1457
|
+
function qe(e, t = /* @__PURE__ */ new Set()) {
|
|
1293
1458
|
if (typeof e == "object" && e !== null && // We don't want to traverse DOM elements
|
|
1294
1459
|
!(e instanceof EventTarget) && !t.has(e)) {
|
|
1295
1460
|
t.add(e), e instanceof Date && e.getTime();
|
|
1296
1461
|
for (let r in e)
|
|
1297
1462
|
try {
|
|
1298
|
-
|
|
1463
|
+
qe(e[r], t);
|
|
1299
1464
|
} catch {
|
|
1300
1465
|
}
|
|
1301
|
-
const n =
|
|
1466
|
+
const n = Ge(e);
|
|
1302
1467
|
if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
|
|
1303
|
-
const r =
|
|
1468
|
+
const r = Tt(n);
|
|
1304
1469
|
for (let i in r) {
|
|
1305
1470
|
const s = r[i].get;
|
|
1306
1471
|
if (s)
|
|
@@ -1312,40 +1477,56 @@ function Xe(e, t = /* @__PURE__ */ new Set()) {
|
|
|
1312
1477
|
}
|
|
1313
1478
|
}
|
|
1314
1479
|
}
|
|
1315
|
-
const
|
|
1316
|
-
function
|
|
1480
|
+
const mr = Symbol("events"), yr = /* @__PURE__ */ new Set(), wr = /* @__PURE__ */ new Set();
|
|
1481
|
+
function Sr(e, t, n) {
|
|
1482
|
+
(t[mr] ??= {})[e] = n;
|
|
1483
|
+
}
|
|
1484
|
+
function Er(e) {
|
|
1317
1485
|
for (var t = 0; t < e.length; t++)
|
|
1318
|
-
|
|
1319
|
-
for (var n of
|
|
1486
|
+
yr.add(e[t]);
|
|
1487
|
+
for (var n of wr)
|
|
1320
1488
|
n(e);
|
|
1321
1489
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1490
|
+
const xr = (
|
|
1491
|
+
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1492
|
+
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1493
|
+
/** @param {string} html */
|
|
1494
|
+
createHTML: (e) => e
|
|
1495
|
+
})
|
|
1496
|
+
);
|
|
1497
|
+
function kr(e) {
|
|
1498
|
+
return (
|
|
1499
|
+
/** @type {string} */
|
|
1500
|
+
xr?.createHTML(e) ?? e
|
|
1501
|
+
);
|
|
1325
1502
|
}
|
|
1326
|
-
function
|
|
1503
|
+
function Tr(e) {
|
|
1504
|
+
var t = ar("template");
|
|
1505
|
+
return t.innerHTML = kr(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1506
|
+
}
|
|
1507
|
+
function rn(e, t) {
|
|
1327
1508
|
var n = (
|
|
1328
1509
|
/** @type {Effect} */
|
|
1329
1510
|
v
|
|
1330
1511
|
);
|
|
1331
|
-
n.
|
|
1512
|
+
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1332
1513
|
}
|
|
1333
1514
|
// @__NO_SIDE_EFFECTS__
|
|
1334
|
-
function
|
|
1335
|
-
var n = (t &
|
|
1515
|
+
function lt(e, t) {
|
|
1516
|
+
var n = (t & bn) !== 0, r, i = !e.startsWith("<!>");
|
|
1336
1517
|
return () => {
|
|
1337
|
-
r === void 0 && (r =
|
|
1338
|
-
/* @__PURE__ */
|
|
1518
|
+
r === void 0 && (r = Tr(i ? e : "<!>" + e), r = /** @type {TemplateNode} */
|
|
1519
|
+
/* @__PURE__ */ nt(r));
|
|
1339
1520
|
var s = (
|
|
1340
1521
|
/** @type {TemplateNode} */
|
|
1341
|
-
n ||
|
|
1522
|
+
n || nr ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1342
1523
|
);
|
|
1343
|
-
return
|
|
1524
|
+
return rn(s, s), s;
|
|
1344
1525
|
};
|
|
1345
1526
|
}
|
|
1346
|
-
function
|
|
1347
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), n =
|
|
1348
|
-
return e.append(t, n),
|
|
1527
|
+
function Ar() {
|
|
1528
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = Xe();
|
|
1529
|
+
return e.append(t, n), rn(t, n), e;
|
|
1349
1530
|
}
|
|
1350
1531
|
function Re(e, t) {
|
|
1351
1532
|
e !== null && e.before(
|
|
@@ -1353,60 +1534,81 @@ function Re(e, t) {
|
|
|
1353
1534
|
t
|
|
1354
1535
|
);
|
|
1355
1536
|
}
|
|
1356
|
-
class
|
|
1537
|
+
class sn {
|
|
1357
1538
|
/** @type {TemplateNode} */
|
|
1358
1539
|
anchor;
|
|
1359
1540
|
/** @type {Map<Batch, Key>} */
|
|
1360
|
-
#t = /* @__PURE__ */ new Map();
|
|
1361
|
-
/** @type {Map<Key, Effect>} */
|
|
1362
1541
|
#n = /* @__PURE__ */ new Map();
|
|
1363
|
-
/**
|
|
1542
|
+
/**
|
|
1543
|
+
* Map of keys to effects that are currently rendered in the DOM.
|
|
1544
|
+
* These effects are visible and actively part of the document tree.
|
|
1545
|
+
* Example:
|
|
1546
|
+
* ```
|
|
1547
|
+
* {#if condition}
|
|
1548
|
+
* foo
|
|
1549
|
+
* {:else}
|
|
1550
|
+
* bar
|
|
1551
|
+
* {/if}
|
|
1552
|
+
* ```
|
|
1553
|
+
* Can result in the entries `true->Effect` and `false->Effect`
|
|
1554
|
+
* @type {Map<Key, Effect>}
|
|
1555
|
+
*/
|
|
1556
|
+
#i = /* @__PURE__ */ new Map();
|
|
1557
|
+
/**
|
|
1558
|
+
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
1559
|
+
* in the DOM, because their insertion is deferred.
|
|
1560
|
+
* @type {Map<Key, Branch>}
|
|
1561
|
+
*/
|
|
1364
1562
|
#e = /* @__PURE__ */ new Map();
|
|
1563
|
+
/**
|
|
1564
|
+
* Keys of effects that are currently outroing
|
|
1565
|
+
* @type {Set<Key>}
|
|
1566
|
+
*/
|
|
1567
|
+
#r = /* @__PURE__ */ new Set();
|
|
1365
1568
|
/**
|
|
1366
1569
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
1367
1570
|
* This is necessary for `<svelte:element>`
|
|
1368
1571
|
*/
|
|
1369
|
-
#
|
|
1572
|
+
#o = !0;
|
|
1370
1573
|
/**
|
|
1371
1574
|
* @param {TemplateNode} anchor
|
|
1372
1575
|
* @param {boolean} transition
|
|
1373
1576
|
*/
|
|
1374
1577
|
constructor(t, n = !0) {
|
|
1375
|
-
this.anchor = t, this.#
|
|
1578
|
+
this.anchor = t, this.#o = n;
|
|
1376
1579
|
}
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
)
|
|
1382
|
-
if (this.#t.has(t)) {
|
|
1580
|
+
/**
|
|
1581
|
+
* @param {Batch} batch
|
|
1582
|
+
*/
|
|
1583
|
+
#t = (t) => {
|
|
1584
|
+
if (this.#n.has(t)) {
|
|
1383
1585
|
var n = (
|
|
1384
1586
|
/** @type {Key} */
|
|
1385
|
-
this.#
|
|
1386
|
-
), r = this.#
|
|
1587
|
+
this.#n.get(t)
|
|
1588
|
+
), r = this.#i.get(n);
|
|
1387
1589
|
if (r)
|
|
1388
|
-
|
|
1590
|
+
_r(r), this.#r.delete(n);
|
|
1389
1591
|
else {
|
|
1390
1592
|
var i = this.#e.get(n);
|
|
1391
|
-
i && (this.#
|
|
1593
|
+
i && (this.#i.set(n, i.effect), this.#e.delete(n), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
|
|
1392
1594
|
}
|
|
1393
|
-
for (const [s,
|
|
1394
|
-
if (this.#
|
|
1595
|
+
for (const [s, a] of this.#n) {
|
|
1596
|
+
if (this.#n.delete(s), s === t)
|
|
1395
1597
|
break;
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1598
|
+
const l = this.#e.get(a);
|
|
1599
|
+
l && (ee(l.effect), this.#e.delete(a));
|
|
1398
1600
|
}
|
|
1399
|
-
for (const [s,
|
|
1400
|
-
if (s === n) continue;
|
|
1401
|
-
const
|
|
1402
|
-
if (Array.from(this.#
|
|
1601
|
+
for (const [s, a] of this.#i) {
|
|
1602
|
+
if (s === n || this.#r.has(s)) continue;
|
|
1603
|
+
const l = () => {
|
|
1604
|
+
if (Array.from(this.#n.values()).includes(s)) {
|
|
1403
1605
|
var f = document.createDocumentFragment();
|
|
1404
|
-
|
|
1606
|
+
vr(a, f), f.append(Xe()), this.#e.set(s, { effect: a, fragment: f });
|
|
1405
1607
|
} else
|
|
1406
|
-
|
|
1407
|
-
this.#
|
|
1608
|
+
ee(a);
|
|
1609
|
+
this.#r.delete(s), this.#i.delete(s);
|
|
1408
1610
|
};
|
|
1409
|
-
this.#
|
|
1611
|
+
this.#o || !r ? (this.#r.add(s), pr(a, l, !1)) : l();
|
|
1410
1612
|
}
|
|
1411
1613
|
}
|
|
1412
1614
|
};
|
|
@@ -1414,10 +1616,10 @@ class Gt {
|
|
|
1414
1616
|
* @param {Batch} batch
|
|
1415
1617
|
*/
|
|
1416
1618
|
#l = (t) => {
|
|
1417
|
-
this.#
|
|
1418
|
-
const n = Array.from(this.#
|
|
1619
|
+
this.#n.delete(t);
|
|
1620
|
+
const n = Array.from(this.#n.values());
|
|
1419
1621
|
for (const [r, i] of this.#e)
|
|
1420
|
-
n.includes(r) || (
|
|
1622
|
+
n.includes(r) || (ee(i.effect), this.#e.delete(r));
|
|
1421
1623
|
};
|
|
1422
1624
|
/**
|
|
1423
1625
|
*
|
|
@@ -1427,179 +1629,171 @@ class Gt {
|
|
|
1427
1629
|
ensure(t, n) {
|
|
1428
1630
|
var r = (
|
|
1429
1631
|
/** @type {Batch} */
|
|
1430
|
-
|
|
1431
|
-
), i =
|
|
1432
|
-
if (n && !this.#
|
|
1632
|
+
b
|
|
1633
|
+
), i = lr();
|
|
1634
|
+
if (n && !this.#i.has(t) && !this.#e.has(t))
|
|
1433
1635
|
if (i) {
|
|
1434
|
-
var s = document.createDocumentFragment(),
|
|
1435
|
-
s.append(
|
|
1436
|
-
effect:
|
|
1636
|
+
var s = document.createDocumentFragment(), a = Xe();
|
|
1637
|
+
s.append(a), this.#e.set(t, {
|
|
1638
|
+
effect: vt(() => n(a)),
|
|
1437
1639
|
fragment: s
|
|
1438
1640
|
});
|
|
1439
1641
|
} else
|
|
1440
|
-
this.#
|
|
1642
|
+
this.#i.set(
|
|
1441
1643
|
t,
|
|
1442
|
-
|
|
1644
|
+
vt(() => n(this.anchor))
|
|
1443
1645
|
);
|
|
1444
|
-
if (this.#
|
|
1445
|
-
for (const [
|
|
1446
|
-
|
|
1447
|
-
for (const [
|
|
1448
|
-
|
|
1449
|
-
r.oncommit(this.#
|
|
1646
|
+
if (this.#n.set(r, t), i) {
|
|
1647
|
+
for (const [l, o] of this.#i)
|
|
1648
|
+
l === t ? r.unskip_effect(o) : r.skip_effect(o);
|
|
1649
|
+
for (const [l, o] of this.#e)
|
|
1650
|
+
l === t ? r.unskip_effect(o.effect) : r.skip_effect(o.effect);
|
|
1651
|
+
r.oncommit(this.#t), r.ondiscard(this.#l);
|
|
1450
1652
|
} else
|
|
1451
|
-
this.#
|
|
1653
|
+
this.#t(r);
|
|
1452
1654
|
}
|
|
1453
1655
|
}
|
|
1454
|
-
function
|
|
1455
|
-
var r = new
|
|
1456
|
-
|
|
1656
|
+
function ln(e, t, ...n) {
|
|
1657
|
+
var r = new sn(e);
|
|
1658
|
+
Wt(() => {
|
|
1457
1659
|
const i = t() ?? null;
|
|
1458
1660
|
r.ensure(i, i && ((s) => i(s, ...n)));
|
|
1459
|
-
},
|
|
1460
|
-
}
|
|
1461
|
-
function
|
|
1462
|
-
var r = new
|
|
1463
|
-
function s(
|
|
1464
|
-
r.ensure(
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
var
|
|
1468
|
-
t((
|
|
1469
|
-
|
|
1470
|
-
}),
|
|
1661
|
+
}, pe);
|
|
1662
|
+
}
|
|
1663
|
+
function Fr(e, t, n = !1) {
|
|
1664
|
+
var r = new sn(e), i = n ? pe : 0;
|
|
1665
|
+
function s(a, l) {
|
|
1666
|
+
r.ensure(a, l);
|
|
1667
|
+
}
|
|
1668
|
+
Wt(() => {
|
|
1669
|
+
var a = !1;
|
|
1670
|
+
t((l, o = 0) => {
|
|
1671
|
+
a = !0, s(o, l);
|
|
1672
|
+
}), a || s(-1, null);
|
|
1471
1673
|
}, i);
|
|
1472
1674
|
}
|
|
1473
|
-
function
|
|
1675
|
+
function Or(e, t, n) {
|
|
1474
1676
|
var r = e == null ? "" : "" + e;
|
|
1475
1677
|
return t && (r = r ? r + " " + t : t), r === "" ? null : r;
|
|
1476
1678
|
}
|
|
1477
|
-
function
|
|
1679
|
+
function Ir(e, t) {
|
|
1478
1680
|
return e == null ? null : String(e);
|
|
1479
1681
|
}
|
|
1480
|
-
function
|
|
1481
|
-
var
|
|
1482
|
-
if (
|
|
1483
|
-
var
|
|
1484
|
-
|
|
1682
|
+
function an(e, t, n, r, i, s) {
|
|
1683
|
+
var a = e.__className;
|
|
1684
|
+
if (a !== n || a === void 0) {
|
|
1685
|
+
var l = Or(n, r);
|
|
1686
|
+
l == null ? e.removeAttribute("class") : e.className = l, e.__className = n;
|
|
1485
1687
|
}
|
|
1486
1688
|
return s;
|
|
1487
1689
|
}
|
|
1488
|
-
function
|
|
1690
|
+
function on(e, t, n, r) {
|
|
1489
1691
|
var i = e.__style;
|
|
1490
1692
|
if (i !== t) {
|
|
1491
|
-
var s =
|
|
1693
|
+
var s = Ir(t);
|
|
1492
1694
|
s == null ? e.removeAttribute("style") : e.style.cssText = s, e.__style = t;
|
|
1493
1695
|
}
|
|
1494
1696
|
return r;
|
|
1495
1697
|
}
|
|
1496
|
-
const
|
|
1497
|
-
function
|
|
1498
|
-
var i =
|
|
1499
|
-
i[t] !== (i[t] = n) && (t === "loading" && (e[
|
|
1698
|
+
const Lr = Symbol("is custom element"), Mr = Symbol("is html");
|
|
1699
|
+
function yt(e, t, n, r) {
|
|
1700
|
+
var i = Dr(e);
|
|
1701
|
+
i[t] !== (i[t] = n) && (t === "loading" && (e[On] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && Rr(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
1500
1702
|
}
|
|
1501
|
-
function
|
|
1703
|
+
function Dr(e) {
|
|
1502
1704
|
return (
|
|
1503
1705
|
/** @type {Record<string | symbol, unknown>} **/
|
|
1504
1706
|
// @ts-expect-error
|
|
1505
1707
|
e.__attributes ??= {
|
|
1506
|
-
[
|
|
1507
|
-
[
|
|
1708
|
+
[Lr]: e.nodeName.includes("-"),
|
|
1709
|
+
[Mr]: e.namespaceURI === kt
|
|
1508
1710
|
}
|
|
1509
1711
|
);
|
|
1510
1712
|
}
|
|
1511
|
-
var
|
|
1512
|
-
function
|
|
1513
|
-
var t = e.getAttribute("is") || e.nodeName, n =
|
|
1713
|
+
var wt = /* @__PURE__ */ new Map();
|
|
1714
|
+
function Rr(e) {
|
|
1715
|
+
var t = e.getAttribute("is") || e.nodeName, n = wt.get(t);
|
|
1514
1716
|
if (n) return n;
|
|
1515
|
-
|
|
1717
|
+
wt.set(t, n = []);
|
|
1516
1718
|
for (var r, i = e, s = Element.prototype; s !== i; ) {
|
|
1517
|
-
r =
|
|
1518
|
-
for (var
|
|
1519
|
-
r[
|
|
1520
|
-
i =
|
|
1719
|
+
r = Tt(i);
|
|
1720
|
+
for (var a in r)
|
|
1721
|
+
r[a].set && n.push(a);
|
|
1722
|
+
i = Ge(i);
|
|
1521
1723
|
}
|
|
1522
1724
|
return n;
|
|
1523
1725
|
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
var t = ke;
|
|
1527
|
-
try {
|
|
1528
|
-
return ke = !1, [e(), ke];
|
|
1529
|
-
} finally {
|
|
1530
|
-
ke = t;
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
function ve(e, t, n, r) {
|
|
1534
|
-
var i = !Pe || (n & sn) !== 0, s = (n & an) !== 0, l = (n & on) !== 0, a = (
|
|
1726
|
+
function ye(e, t, n, r) {
|
|
1727
|
+
var i = !Ce || (n & pn) !== 0, s = (n & vn) !== 0, a = (n & gn) !== 0, l = (
|
|
1535
1728
|
/** @type {V} */
|
|
1536
1729
|
r
|
|
1537
|
-
), o = !0, f = () => (o && (o = !1,
|
|
1730
|
+
), o = !0, f = () => (o && (o = !1, l = a ? Ye(
|
|
1538
1731
|
/** @type {() => V} */
|
|
1539
1732
|
r
|
|
1540
1733
|
) : (
|
|
1541
1734
|
/** @type {V} */
|
|
1542
1735
|
r
|
|
1543
|
-
)),
|
|
1736
|
+
)), l);
|
|
1737
|
+
let u;
|
|
1544
1738
|
if (s) {
|
|
1545
|
-
var
|
|
1546
|
-
u =
|
|
1739
|
+
var d = ce in e || Fn in e;
|
|
1740
|
+
u = Fe(e, t)?.set ?? (d && t in e ? (E) => e[t] = E : void 0);
|
|
1547
1741
|
}
|
|
1548
|
-
var
|
|
1549
|
-
s ? [
|
|
1742
|
+
var c, _ = !1;
|
|
1743
|
+
s ? [c, _] = Xn(() => (
|
|
1550
1744
|
/** @type {V} */
|
|
1551
1745
|
e[t]
|
|
1552
|
-
)) :
|
|
1553
|
-
e[t],
|
|
1554
|
-
var
|
|
1555
|
-
if (i ?
|
|
1556
|
-
var
|
|
1746
|
+
)) : c = /** @type {V} */
|
|
1747
|
+
e[t], c === void 0 && r !== void 0 && (c = f(), u && (i && Mn(), u(c)));
|
|
1748
|
+
var h;
|
|
1749
|
+
if (i ? h = () => {
|
|
1750
|
+
var E = (
|
|
1557
1751
|
/** @type {V} */
|
|
1558
1752
|
e[t]
|
|
1559
1753
|
);
|
|
1560
|
-
return
|
|
1561
|
-
} :
|
|
1562
|
-
var
|
|
1754
|
+
return E === void 0 ? f() : (o = !0, E);
|
|
1755
|
+
} : h = () => {
|
|
1756
|
+
var E = (
|
|
1563
1757
|
/** @type {V} */
|
|
1564
1758
|
e[t]
|
|
1565
1759
|
);
|
|
1566
|
-
return
|
|
1567
|
-
void 0),
|
|
1568
|
-
}, i && (n &
|
|
1569
|
-
return
|
|
1760
|
+
return E !== void 0 && (l = /** @type {V} */
|
|
1761
|
+
void 0), E === void 0 ? l : E;
|
|
1762
|
+
}, i && (n & _n) === 0)
|
|
1763
|
+
return h;
|
|
1570
1764
|
if (u) {
|
|
1571
|
-
var
|
|
1765
|
+
var g = e.$$legacy;
|
|
1572
1766
|
return (
|
|
1573
1767
|
/** @type {() => V} */
|
|
1574
|
-
(function(
|
|
1575
|
-
return arguments.length > 0 ? ((!i || !
|
|
1768
|
+
(function(E, Te) {
|
|
1769
|
+
return arguments.length > 0 ? ((!i || !Te || g || _) && u(Te ? h() : E), E) : h();
|
|
1576
1770
|
})
|
|
1577
1771
|
);
|
|
1578
1772
|
}
|
|
1579
|
-
var
|
|
1580
|
-
s &&
|
|
1773
|
+
var D = !1, R = ((n & hn) !== 0 ? Be : Pt)(() => (D = !1, h()));
|
|
1774
|
+
s && k(R);
|
|
1581
1775
|
var q = (
|
|
1582
1776
|
/** @type {Effect} */
|
|
1583
1777
|
v
|
|
1584
1778
|
);
|
|
1585
1779
|
return (
|
|
1586
1780
|
/** @type {() => V} */
|
|
1587
|
-
(function(
|
|
1781
|
+
(function(E, Te) {
|
|
1588
1782
|
if (arguments.length > 0) {
|
|
1589
|
-
const
|
|
1590
|
-
return
|
|
1783
|
+
const ut = Te ? k(R) : i && s ? ue(E) : E;
|
|
1784
|
+
return Z(R, ut), D = !0, l !== void 0 && (l = ut), E;
|
|
1591
1785
|
}
|
|
1592
|
-
return
|
|
1786
|
+
return le && D || (q.f & C) !== 0 ? R.v : k(R);
|
|
1593
1787
|
})
|
|
1594
1788
|
);
|
|
1595
1789
|
}
|
|
1596
|
-
var
|
|
1597
|
-
function
|
|
1598
|
-
const n =
|
|
1599
|
-
var r =
|
|
1600
|
-
|
|
1790
|
+
var Nr = /* @__PURE__ */ lt("<span><!></span>");
|
|
1791
|
+
function Pr(e, t) {
|
|
1792
|
+
const n = ye(t, "size", 3, "body-base");
|
|
1793
|
+
var r = Nr(), i = $t(r);
|
|
1794
|
+
ln(i, () => t.children ?? Ke), it(() => an(r, 1, `rcb-typography rcb-typography-${n() ?? ""}`, "svelte-jt3g5k")), Re(e, r);
|
|
1601
1795
|
}
|
|
1602
|
-
const
|
|
1796
|
+
const Cr = {
|
|
1603
1797
|
outerPadding: {
|
|
1604
1798
|
mobile: "clamp(1.3125rem, 5.6vw, 1.5rem)",
|
|
1605
1799
|
desktop: "clamp(1.5rem, 9.44vw, 5rem)"
|
|
@@ -1640,7 +1834,7 @@ const Sr = {
|
|
|
1640
1834
|
mobile: "0.70rem",
|
|
1641
1835
|
desktop: "1rem"
|
|
1642
1836
|
}
|
|
1643
|
-
},
|
|
1837
|
+
}, St = "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif", z = {
|
|
1644
1838
|
regular: "400",
|
|
1645
1839
|
medium: "500",
|
|
1646
1840
|
semibold: "600"
|
|
@@ -1653,151 +1847,151 @@ const Sr = {
|
|
|
1653
1847
|
28: "28px",
|
|
1654
1848
|
32: "32px",
|
|
1655
1849
|
36: "36px"
|
|
1656
|
-
},
|
|
1850
|
+
}, j = {
|
|
1657
1851
|
120: "120%",
|
|
1658
1852
|
130: "130%",
|
|
1659
1853
|
140: "140%"
|
|
1660
|
-
},
|
|
1854
|
+
}, H = {
|
|
1661
1855
|
tight: "0.20%",
|
|
1662
1856
|
regular: "0"
|
|
1663
|
-
},
|
|
1857
|
+
}, m = {
|
|
1664
1858
|
heading2xl: {
|
|
1665
1859
|
fontSize: I[28],
|
|
1666
|
-
lineHeight:
|
|
1667
|
-
fontWeight:
|
|
1668
|
-
letterSpacing:
|
|
1860
|
+
lineHeight: j[120],
|
|
1861
|
+
fontWeight: z.semibold,
|
|
1862
|
+
letterSpacing: H.tight
|
|
1669
1863
|
},
|
|
1670
1864
|
headingXl: {
|
|
1671
1865
|
fontSize: I[24],
|
|
1672
|
-
lineHeight:
|
|
1673
|
-
fontWeight:
|
|
1674
|
-
letterSpacing:
|
|
1866
|
+
lineHeight: j[130],
|
|
1867
|
+
fontWeight: z.semibold,
|
|
1868
|
+
letterSpacing: H.regular
|
|
1675
1869
|
},
|
|
1676
1870
|
headingLg: {
|
|
1677
1871
|
fontSize: "20px",
|
|
1678
|
-
lineHeight:
|
|
1679
|
-
fontWeight:
|
|
1680
|
-
letterSpacing:
|
|
1872
|
+
lineHeight: j[130],
|
|
1873
|
+
fontWeight: z.semibold,
|
|
1874
|
+
letterSpacing: H.regular
|
|
1681
1875
|
},
|
|
1682
1876
|
headingMd: {
|
|
1683
1877
|
fontSize: "16px",
|
|
1684
|
-
lineHeight:
|
|
1685
|
-
fontWeight:
|
|
1686
|
-
letterSpacing:
|
|
1878
|
+
lineHeight: j[140],
|
|
1879
|
+
fontWeight: z.medium,
|
|
1880
|
+
letterSpacing: H.regular
|
|
1687
1881
|
},
|
|
1688
1882
|
bodyBase: {
|
|
1689
1883
|
fontSize: I[16],
|
|
1690
|
-
lineHeight:
|
|
1691
|
-
fontWeight:
|
|
1692
|
-
letterSpacing:
|
|
1884
|
+
lineHeight: j[140],
|
|
1885
|
+
fontWeight: z.regular,
|
|
1886
|
+
letterSpacing: H.regular
|
|
1693
1887
|
},
|
|
1694
1888
|
bodySmall: {
|
|
1695
1889
|
fontSize: I[14],
|
|
1696
|
-
lineHeight:
|
|
1697
|
-
fontWeight:
|
|
1698
|
-
letterSpacing:
|
|
1890
|
+
lineHeight: j[140],
|
|
1891
|
+
fontWeight: z.regular,
|
|
1892
|
+
letterSpacing: H.regular
|
|
1699
1893
|
},
|
|
1700
1894
|
labelButton: {
|
|
1701
1895
|
fontSize: I[16],
|
|
1702
|
-
lineHeight:
|
|
1703
|
-
fontWeight:
|
|
1704
|
-
letterSpacing:
|
|
1896
|
+
lineHeight: j[140],
|
|
1897
|
+
fontWeight: z.regular,
|
|
1898
|
+
letterSpacing: H.tight
|
|
1705
1899
|
},
|
|
1706
1900
|
labelDefault: {
|
|
1707
1901
|
fontSize: I[14],
|
|
1708
|
-
lineHeight:
|
|
1709
|
-
fontWeight:
|
|
1710
|
-
letterSpacing:
|
|
1902
|
+
lineHeight: j[140],
|
|
1903
|
+
fontWeight: z.regular,
|
|
1904
|
+
letterSpacing: H.tight
|
|
1711
1905
|
},
|
|
1712
1906
|
captionDefault: {
|
|
1713
1907
|
fontSize: I[12],
|
|
1714
|
-
lineHeight:
|
|
1715
|
-
fontWeight:
|
|
1716
|
-
letterSpacing:
|
|
1908
|
+
lineHeight: j[140],
|
|
1909
|
+
fontWeight: z.regular,
|
|
1910
|
+
letterSpacing: H.regular
|
|
1717
1911
|
},
|
|
1718
1912
|
captionLink: {
|
|
1719
1913
|
fontSize: I[12],
|
|
1720
|
-
lineHeight:
|
|
1721
|
-
fontWeight:
|
|
1722
|
-
letterSpacing:
|
|
1914
|
+
lineHeight: j[140],
|
|
1915
|
+
fontWeight: z.regular,
|
|
1916
|
+
letterSpacing: H.regular
|
|
1723
1917
|
}
|
|
1724
|
-
},
|
|
1918
|
+
}, $ = {
|
|
1725
1919
|
heading2xl: {
|
|
1726
|
-
...
|
|
1920
|
+
...m.heading2xl,
|
|
1727
1921
|
fontSize: I[36]
|
|
1728
1922
|
},
|
|
1729
1923
|
headingXl: {
|
|
1730
|
-
...
|
|
1924
|
+
...m.headingXl,
|
|
1731
1925
|
fontSize: I[32]
|
|
1732
1926
|
},
|
|
1733
1927
|
headingLg: {
|
|
1734
|
-
...
|
|
1928
|
+
...m.headingLg,
|
|
1735
1929
|
fontSize: I[24]
|
|
1736
1930
|
},
|
|
1737
1931
|
headingMd: {
|
|
1738
|
-
...
|
|
1932
|
+
...m.headingMd,
|
|
1739
1933
|
fontSize: I[18]
|
|
1740
1934
|
},
|
|
1741
1935
|
bodyBase: {
|
|
1742
|
-
...
|
|
1936
|
+
...m.bodyBase
|
|
1743
1937
|
},
|
|
1744
1938
|
bodySmall: {
|
|
1745
|
-
...
|
|
1939
|
+
...m.bodySmall
|
|
1746
1940
|
},
|
|
1747
1941
|
labelButton: {
|
|
1748
|
-
...
|
|
1942
|
+
...m.labelButton
|
|
1749
1943
|
},
|
|
1750
1944
|
labelDefault: {
|
|
1751
|
-
...
|
|
1945
|
+
...m.labelDefault
|
|
1752
1946
|
},
|
|
1753
1947
|
captionDefault: {
|
|
1754
|
-
...
|
|
1948
|
+
...m.captionDefault
|
|
1755
1949
|
},
|
|
1756
1950
|
captionLink: {
|
|
1757
|
-
...
|
|
1951
|
+
...m.captionLink
|
|
1758
1952
|
}
|
|
1759
|
-
},
|
|
1953
|
+
}, Br = {
|
|
1760
1954
|
heading2xl: {
|
|
1761
|
-
mobile:
|
|
1762
|
-
desktop:
|
|
1955
|
+
mobile: m.heading2xl,
|
|
1956
|
+
desktop: $.heading2xl
|
|
1763
1957
|
},
|
|
1764
1958
|
headingXl: {
|
|
1765
|
-
desktop:
|
|
1766
|
-
mobile:
|
|
1959
|
+
desktop: $.headingXl,
|
|
1960
|
+
mobile: m.headingXl
|
|
1767
1961
|
},
|
|
1768
1962
|
headingLg: {
|
|
1769
|
-
desktop:
|
|
1770
|
-
mobile:
|
|
1963
|
+
desktop: $.headingLg,
|
|
1964
|
+
mobile: m.headingLg
|
|
1771
1965
|
},
|
|
1772
1966
|
headingMd: {
|
|
1773
|
-
desktop:
|
|
1774
|
-
mobile:
|
|
1967
|
+
desktop: $.headingMd,
|
|
1968
|
+
mobile: m.headingMd
|
|
1775
1969
|
},
|
|
1776
1970
|
bodyBase: {
|
|
1777
|
-
desktop:
|
|
1778
|
-
mobile:
|
|
1971
|
+
desktop: $.bodyBase,
|
|
1972
|
+
mobile: m.bodyBase
|
|
1779
1973
|
},
|
|
1780
1974
|
bodySmall: {
|
|
1781
|
-
desktop:
|
|
1782
|
-
mobile:
|
|
1975
|
+
desktop: $.bodySmall,
|
|
1976
|
+
mobile: m.bodySmall
|
|
1783
1977
|
},
|
|
1784
1978
|
labelButton: {
|
|
1785
|
-
desktop:
|
|
1786
|
-
mobile:
|
|
1979
|
+
desktop: $.labelButton,
|
|
1980
|
+
mobile: m.labelButton
|
|
1787
1981
|
},
|
|
1788
1982
|
labelDefault: {
|
|
1789
|
-
desktop:
|
|
1790
|
-
mobile:
|
|
1983
|
+
desktop: $.labelDefault,
|
|
1984
|
+
mobile: m.labelDefault
|
|
1791
1985
|
},
|
|
1792
1986
|
captionDefault: {
|
|
1793
|
-
desktop:
|
|
1794
|
-
mobile:
|
|
1987
|
+
desktop: $.captionDefault,
|
|
1988
|
+
mobile: m.captionDefault
|
|
1795
1989
|
},
|
|
1796
1990
|
captionLink: {
|
|
1797
|
-
desktop:
|
|
1798
|
-
mobile:
|
|
1991
|
+
desktop: $.captionLink,
|
|
1992
|
+
mobile: m.captionLink
|
|
1799
1993
|
}
|
|
1800
|
-
},
|
|
1994
|
+
}, zr = {
|
|
1801
1995
|
error: "#B0171F",
|
|
1802
1996
|
warning: "#f4e971",
|
|
1803
1997
|
focus: "#1148B8",
|
|
@@ -1813,7 +2007,7 @@ const Sr = {
|
|
|
1813
2007
|
"grey-ui-light": "rgba(0,0,0,0.1)",
|
|
1814
2008
|
"input-background": "white",
|
|
1815
2009
|
background: "white"
|
|
1816
|
-
},
|
|
2010
|
+
}, jr = {
|
|
1817
2011
|
error: "#B0171F",
|
|
1818
2012
|
warning: "#f4e971",
|
|
1819
2013
|
focus: "#1148B8",
|
|
@@ -1829,29 +2023,29 @@ const Sr = {
|
|
|
1829
2023
|
"grey-ui-light": "rgba(0,0,0,0.1)",
|
|
1830
2024
|
"input-background": "white",
|
|
1831
2025
|
background: "#EFF3FA"
|
|
1832
|
-
},
|
|
2026
|
+
}, fn = {
|
|
1833
2027
|
error: "color_error",
|
|
1834
2028
|
focus: "color_accent",
|
|
1835
2029
|
accent: "color_accent",
|
|
1836
2030
|
primary: "color_buttons_primary"
|
|
1837
|
-
},
|
|
1838
|
-
...
|
|
2031
|
+
}, Hr = {
|
|
2032
|
+
...fn,
|
|
1839
2033
|
"input-background": "color_form_bg",
|
|
1840
2034
|
background: "color_form_bg"
|
|
1841
|
-
},
|
|
1842
|
-
...
|
|
2035
|
+
}, $r = {
|
|
2036
|
+
...fn,
|
|
1843
2037
|
"input-background": "color_product_info_bg",
|
|
1844
2038
|
background: "color_product_info_bg"
|
|
1845
|
-
},
|
|
2039
|
+
}, un = {
|
|
1846
2040
|
"input-border-radius": "4px",
|
|
1847
2041
|
"input-button-border-radius": "8px"
|
|
1848
|
-
},
|
|
2042
|
+
}, Ur = {
|
|
1849
2043
|
"input-border-radius": "0px",
|
|
1850
2044
|
"input-button-border-radius": "0px"
|
|
1851
|
-
},
|
|
2045
|
+
}, Vr = {
|
|
1852
2046
|
"input-border-radius": "12px",
|
|
1853
2047
|
"input-button-border-radius": "9999px"
|
|
1854
|
-
},
|
|
2048
|
+
}, Et = un, Ee = (e) => e.length == 7 ? {
|
|
1855
2049
|
r: parseInt(e.slice(1, 3), 16),
|
|
1856
2050
|
g: parseInt(e.slice(3, 5), 16),
|
|
1857
2051
|
b: parseInt(e.slice(5, 7), 16)
|
|
@@ -1859,16 +2053,16 @@ const Sr = {
|
|
|
1859
2053
|
r: parseInt(e[1], 16),
|
|
1860
2054
|
g: parseInt(e[2], 16),
|
|
1861
2055
|
b: parseInt(e[3], 16)
|
|
1862
|
-
} : null,
|
|
2056
|
+
} : null, at = ({
|
|
1863
2057
|
r: e,
|
|
1864
2058
|
g: t,
|
|
1865
2059
|
b: n,
|
|
1866
2060
|
luminanceThreshold: r
|
|
1867
2061
|
}) => {
|
|
1868
|
-
const i = (
|
|
2062
|
+
const i = (a) => (a = a / 255, a <= 0.03928 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4));
|
|
1869
2063
|
return 0.2126 * i(e) + 0.7152 * i(t) + 0.0722 * i(n) > r;
|
|
1870
|
-
},
|
|
1871
|
-
const n =
|
|
2064
|
+
}, ot = 0.37, Wr = (e, t = ot) => {
|
|
2065
|
+
const n = at({ ...e, luminanceThreshold: t }) ? "0,0,0" : "255,255,255";
|
|
1872
2066
|
return {
|
|
1873
2067
|
"grey-text-dark": `rgb(${n})`,
|
|
1874
2068
|
"grey-text-light": `rgba(${n},0.70)`,
|
|
@@ -1876,24 +2070,24 @@ const Sr = {
|
|
|
1876
2070
|
"grey-ui-light": `rgba(${n},0.1)`
|
|
1877
2071
|
};
|
|
1878
2072
|
};
|
|
1879
|
-
function
|
|
1880
|
-
const r =
|
|
1881
|
-
return `#${
|
|
2073
|
+
function Xr(e, t, n) {
|
|
2074
|
+
const r = Ee(e) || { r: 0, g: 0, b: 0 }, i = Ee(t) || { r: 255, g: 255, b: 255 }, s = Math.round(i.r * n + r.r * (1 - n)), a = Math.round(i.g * n + r.g * (1 - n)), l = Math.round(i.b * n + r.b * (1 - n));
|
|
2075
|
+
return `#${He(s)}${He(a)}${He(l)}`;
|
|
1882
2076
|
}
|
|
1883
|
-
function
|
|
2077
|
+
function xt(e, t) {
|
|
1884
2078
|
const n = { r: 255, g: 255, b: 255 }, r = Math.max(0, Math.min(1, t));
|
|
1885
|
-
let i = e, s =
|
|
2079
|
+
let i = e, s = Ee(e) || n;
|
|
1886
2080
|
(isNaN(s.r) || isNaN(s.g) || isNaN(s.b)) && (s = n, i = "#FFFFFF");
|
|
1887
|
-
const
|
|
2081
|
+
const l = at({
|
|
1888
2082
|
...s,
|
|
1889
|
-
luminanceThreshold:
|
|
2083
|
+
luminanceThreshold: ot
|
|
1890
2084
|
}) ? "#000000" : "#FFFFFF";
|
|
1891
|
-
return
|
|
2085
|
+
return Xr(i, l, r);
|
|
1892
2086
|
}
|
|
1893
|
-
function
|
|
2087
|
+
function He(e) {
|
|
1894
2088
|
return e.toString(16).padStart(2, "0").toUpperCase();
|
|
1895
2089
|
}
|
|
1896
|
-
const
|
|
2090
|
+
const Yr = (e, t, n, r = ot) => {
|
|
1897
2091
|
const i = {
|
|
1898
2092
|
"grey-text-dark": n["grey-text-dark"],
|
|
1899
2093
|
"grey-text-light": n["grey-text-light"],
|
|
@@ -1902,28 +2096,28 @@ const Lr = (e, t, n, r = rt) => {
|
|
|
1902
2096
|
"primary-text": n["primary-text"]
|
|
1903
2097
|
};
|
|
1904
2098
|
if (e?.startsWith("#")) {
|
|
1905
|
-
const s =
|
|
1906
|
-
s !== null && Object.assign(i,
|
|
2099
|
+
const s = Ee(e);
|
|
2100
|
+
s !== null && Object.assign(i, Wr(s));
|
|
1907
2101
|
}
|
|
1908
2102
|
if (t?.startsWith("#")) {
|
|
1909
|
-
const s =
|
|
1910
|
-
s !== null && (i["primary-text"] =
|
|
2103
|
+
const s = Ee(t);
|
|
2104
|
+
s !== null && (i["primary-text"] = at({ ...s, luminanceThreshold: r }) ? "black" : "white");
|
|
1911
2105
|
}
|
|
1912
2106
|
return i;
|
|
1913
|
-
},
|
|
1914
|
-
"primary-hover":
|
|
1915
|
-
"primary-pressed":
|
|
1916
|
-
}),
|
|
2107
|
+
}, qr = (e) => ({
|
|
2108
|
+
"primary-hover": xt(e, 0.1),
|
|
2109
|
+
"primary-pressed": xt(e, 0.15)
|
|
2110
|
+
}), Gr = (e, t) => e || t, Kr = (e, t, n) => {
|
|
1917
2111
|
const r = Object.entries(e).map(([i, s]) => [
|
|
1918
2112
|
i,
|
|
1919
|
-
|
|
2113
|
+
Gr(
|
|
1920
2114
|
n ? n[s] : null,
|
|
1921
2115
|
t[i]
|
|
1922
2116
|
)
|
|
1923
2117
|
]);
|
|
1924
2118
|
return Object.fromEntries(r);
|
|
1925
|
-
},
|
|
1926
|
-
const r =
|
|
2119
|
+
}, cn = (e, t, n) => {
|
|
2120
|
+
const r = Kr(
|
|
1927
2121
|
e,
|
|
1928
2122
|
t,
|
|
1929
2123
|
n
|
|
@@ -1931,139 +2125,137 @@ const Lr = (e, t, n, r = rt) => {
|
|
|
1931
2125
|
return n ? {
|
|
1932
2126
|
...t,
|
|
1933
2127
|
...r,
|
|
1934
|
-
...
|
|
2128
|
+
...Yr(
|
|
1935
2129
|
r.background,
|
|
1936
2130
|
r.primary,
|
|
1937
2131
|
t
|
|
1938
2132
|
),
|
|
1939
|
-
...
|
|
2133
|
+
...qr(r.primary)
|
|
1940
2134
|
} : { ...t };
|
|
1941
|
-
},
|
|
1942
|
-
|
|
1943
|
-
|
|
2135
|
+
}, Zr = (e) => cn(
|
|
2136
|
+
$r,
|
|
2137
|
+
jr,
|
|
1944
2138
|
e
|
|
1945
|
-
),
|
|
1946
|
-
|
|
1947
|
-
|
|
2139
|
+
), dn = (e) => cn(
|
|
2140
|
+
Hr,
|
|
2141
|
+
zr,
|
|
1948
2142
|
e
|
|
1949
|
-
),
|
|
2143
|
+
), ft = (e) => {
|
|
1950
2144
|
if (!e)
|
|
1951
|
-
return
|
|
2145
|
+
return Et;
|
|
1952
2146
|
switch (e.shapes) {
|
|
1953
2147
|
case "rounded":
|
|
1954
|
-
return
|
|
2148
|
+
return un;
|
|
1955
2149
|
case "rectangle":
|
|
1956
|
-
return
|
|
2150
|
+
return Ur;
|
|
1957
2151
|
case "pill":
|
|
1958
|
-
return
|
|
2152
|
+
return Vr;
|
|
1959
2153
|
default:
|
|
1960
|
-
return
|
|
2154
|
+
return Et;
|
|
1961
2155
|
}
|
|
1962
|
-
},
|
|
1963
|
-
const t =
|
|
2156
|
+
}, Ne = (e = "", t) => t.map(([n, r]) => `--rc-${e}-${n}: ${r}`).join("; "), Jr = (e) => {
|
|
2157
|
+
const t = Ne(
|
|
1964
2158
|
"color",
|
|
1965
|
-
Object.entries(
|
|
1966
|
-
), n =
|
|
2159
|
+
Object.entries(Zr(e))
|
|
2160
|
+
), n = Ne(
|
|
1967
2161
|
"shape",
|
|
1968
|
-
Object.entries(
|
|
2162
|
+
Object.entries(ft(e))
|
|
1969
2163
|
);
|
|
1970
2164
|
return [t, n].join("; ");
|
|
1971
|
-
},
|
|
1972
|
-
const t =
|
|
2165
|
+
}, Qr = (e) => {
|
|
2166
|
+
const t = Ne(
|
|
1973
2167
|
"color",
|
|
1974
|
-
Object.entries(
|
|
1975
|
-
), n =
|
|
2168
|
+
Object.entries(dn(e))
|
|
2169
|
+
), n = Ne(
|
|
1976
2170
|
"shape",
|
|
1977
|
-
Object.entries(
|
|
2171
|
+
Object.entries(ft(e))
|
|
1978
2172
|
);
|
|
1979
2173
|
return [t, n].join("; ");
|
|
1980
|
-
},
|
|
1981
|
-
`--rc-${e}-${n}-desktop: normal normal ${r.fontWeight} ${r.fontSize}/${r.lineHeight} ${
|
|
1982
|
-
`--rc-${e}-${n}-mobile: normal normal ${i.fontWeight} ${i.fontSize}/${i.lineHeight} ${
|
|
2174
|
+
}, ei = (e = "", t) => Object.entries(t).flatMap(([n, { desktop: r, mobile: i }]) => [
|
|
2175
|
+
`--rc-${e}-${n}-desktop: normal normal ${r.fontWeight} ${r.fontSize}/${r.lineHeight} ${St}`,
|
|
2176
|
+
`--rc-${e}-${n}-mobile: normal normal ${i.fontWeight} ${i.fontSize}/${i.lineHeight} ${St}`,
|
|
1983
2177
|
`--rc-${e}-${n}-desktop-font-size: ${r.fontSize}`,
|
|
1984
2178
|
`--rc-${e}-${n}-mobile-font-size: ${i.fontSize}`
|
|
1985
|
-
]).join("; "),
|
|
2179
|
+
]).join("; "), ti = (e = "", t) => Object.entries(t).map(
|
|
1986
2180
|
([n, { mobile: r, desktop: i }]) => `--rc-${e}-${n}-mobile: ${r}; --rc-${e}-${n}-desktop: ${i};`
|
|
1987
2181
|
).join(" ");
|
|
1988
|
-
class
|
|
2182
|
+
class ni {
|
|
1989
2183
|
brandingAppearance;
|
|
1990
2184
|
constructor(t) {
|
|
1991
2185
|
t ? this.brandingAppearance = t : this.brandingAppearance = void 0;
|
|
1992
2186
|
}
|
|
1993
2187
|
get shape() {
|
|
1994
|
-
return
|
|
2188
|
+
return ft(this.brandingAppearance);
|
|
1995
2189
|
}
|
|
1996
2190
|
get formColors() {
|
|
1997
|
-
return
|
|
2191
|
+
return dn(this.brandingAppearance);
|
|
1998
2192
|
}
|
|
1999
2193
|
get formStyleVars() {
|
|
2000
|
-
return
|
|
2194
|
+
return Qr(this.brandingAppearance);
|
|
2001
2195
|
}
|
|
2002
2196
|
get productInfoStyleVars() {
|
|
2003
|
-
return
|
|
2197
|
+
return Jr(this.brandingAppearance);
|
|
2004
2198
|
}
|
|
2005
2199
|
get spacing() {
|
|
2006
|
-
return
|
|
2200
|
+
return Cr;
|
|
2007
2201
|
}
|
|
2008
2202
|
get textStyles() {
|
|
2009
|
-
return
|
|
2203
|
+
return Br;
|
|
2010
2204
|
}
|
|
2011
2205
|
get textStyleVars() {
|
|
2012
|
-
return
|
|
2206
|
+
return ei("text", this.textStyles);
|
|
2013
2207
|
}
|
|
2014
2208
|
get spacingStyleVars() {
|
|
2015
|
-
return
|
|
2209
|
+
return ti("spacing", this.spacing);
|
|
2016
2210
|
}
|
|
2017
2211
|
}
|
|
2018
|
-
|
|
2019
|
-
var
|
|
2020
|
-
function
|
|
2021
|
-
let n =
|
|
2212
|
+
zn();
|
|
2213
|
+
var ri = /* @__PURE__ */ lt('<div class="rcb-processing svelte-1i80tfc"></div>');
|
|
2214
|
+
function ii(e, t) {
|
|
2215
|
+
let n = ye(t, "size", 8, "medium");
|
|
2022
2216
|
const r = {
|
|
2023
2217
|
small: { width: "8px", offset: "10px" },
|
|
2024
2218
|
medium: { width: "12px", offset: "20px" },
|
|
2025
2219
|
large: { width: "16px", offset: "30px" }
|
|
2026
2220
|
};
|
|
2027
|
-
var i =
|
|
2028
|
-
|
|
2221
|
+
var i = ri();
|
|
2222
|
+
it(() => on(i, `--shadow-offset: ${mt(n()), Ye(() => r[n()].offset) ?? ""}; --width: ${mt(n()), Ye(() => r[n()].width) ?? ""};`)), Re(e, i);
|
|
2029
2223
|
}
|
|
2030
|
-
var
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2033
|
-
const n =
|
|
2224
|
+
var si = /* @__PURE__ */ lt("<button><!></button>");
|
|
2225
|
+
function ai(e, t) {
|
|
2226
|
+
jn(t, !0);
|
|
2227
|
+
const n = ye(t, "intent", 3, "primary"), r = ye(t, "disabled", 3, !1), i = ye(t, "loading", 3, !1), s = /* @__PURE__ */ ae(() => new ni(t.brandingAppearance)), a = /* @__PURE__ */ ae(() => k(s).textStyleVars), l = /* @__PURE__ */ ae(() => k(s).spacingStyleVars), o = /* @__PURE__ */ ae(() => k(s).productInfoStyleVars), f = /* @__PURE__ */ ae(() => k(s).formStyleVars), u = /* @__PURE__ */ ae(() => [
|
|
2034
2228
|
t.styleOverrides,
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2229
|
+
k(a),
|
|
2230
|
+
k(l),
|
|
2231
|
+
k(o),
|
|
2232
|
+
k(f)
|
|
2039
2233
|
].join("; "));
|
|
2040
|
-
var c =
|
|
2041
|
-
c.__click = function(...S) {
|
|
2042
|
-
t.onclick?.apply(this, S);
|
|
2043
|
-
};
|
|
2044
|
-
var _ = Mt(c);
|
|
2234
|
+
var d = si(), c = $t(d);
|
|
2045
2235
|
{
|
|
2046
|
-
var
|
|
2047
|
-
|
|
2048
|
-
},
|
|
2049
|
-
|
|
2236
|
+
var _ = (g) => {
|
|
2237
|
+
ii(g, { size: "small" });
|
|
2238
|
+
}, h = (g) => {
|
|
2239
|
+
Pr(g, {
|
|
2050
2240
|
size: "body-base",
|
|
2051
|
-
children: (
|
|
2052
|
-
var q =
|
|
2053
|
-
|
|
2241
|
+
children: (D, R) => {
|
|
2242
|
+
var q = Ar(), E = sr(q);
|
|
2243
|
+
ln(E, () => t.children ?? Ke), Re(D, q);
|
|
2054
2244
|
},
|
|
2055
2245
|
$$slots: { default: !0 }
|
|
2056
2246
|
});
|
|
2057
2247
|
};
|
|
2058
|
-
|
|
2059
|
-
i() ?
|
|
2248
|
+
Fr(c, (g) => {
|
|
2249
|
+
i() ? g(_) : g(h, -1);
|
|
2060
2250
|
});
|
|
2061
2251
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
}),
|
|
2252
|
+
it(() => {
|
|
2253
|
+
an(d, 1, `intent-${n()}`, "svelte-hnboq0"), d.disabled = r(), yt(d, "data-testid", t.testId), yt(d, "type", t.type), on(d, k(u));
|
|
2254
|
+
}), Sr("click", d, function(...g) {
|
|
2255
|
+
t.onclick?.apply(this, g);
|
|
2256
|
+
}), Re(e, d), Hn();
|
|
2065
2257
|
}
|
|
2066
|
-
|
|
2258
|
+
Er(["click"]);
|
|
2067
2259
|
export {
|
|
2068
|
-
|
|
2260
|
+
ai as Button
|
|
2069
2261
|
};
|