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