@reevit/svelte 0.3.9 → 0.4.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/bridges/loaders.d.ts +1 -0
- package/dist/bridges/loaders.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1102 -1097
- package/dist/styles.css +1 -1
- package/dist/svelte.css +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
import { createEventDispatcher as
|
|
2
|
-
import { createInitialState as
|
|
3
|
-
import { ReevitAPIClient as
|
|
4
|
-
const
|
|
5
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(
|
|
6
|
-
let
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
var
|
|
13
|
-
const
|
|
1
|
+
import { createEventDispatcher as $t, onMount as mr, onDestroy as _r } from "svelte";
|
|
2
|
+
import { createInitialState as yr, ReevitAPIClient as br, generateReference as wr, detectCountryFromCurrency as gr, reevitReducer as Er, formatAmount as _n, cn as Re, validatePhone as zt, detectNetwork as Pr, createThemeVariables as Sr } from "@reevit/core";
|
|
3
|
+
import { ReevitAPIClient as Aa, cn as Oa, createInitialState as Na, createReevitClient as Da, detectCountryFromCurrency as Fa, detectNetwork as La, formatAmount as Ua, formatPhone as ja, reevitReducer as za, validatePhone as Ha } from "@reevit/core";
|
|
4
|
+
const kr = "5";
|
|
5
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(kr);
|
|
6
|
+
let ut = !1, Ir = !1;
|
|
7
|
+
function Cr() {
|
|
8
|
+
ut = !0;
|
|
9
|
+
}
|
|
10
|
+
Cr();
|
|
11
|
+
const Rr = 1, xr = 2, Mr = 16, Tr = 1, Ar = 2, Or = 4, Nr = 8, Dr = 16, Fr = 2, Y = /* @__PURE__ */ Symbol(), Vt = !1;
|
|
12
|
+
var xn = Array.isArray, Lr = Array.prototype.indexOf, en = Array.from, Mn = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, Ur = Object.getOwnPropertyDescriptors, jr = Object.prototype, zr = Array.prototype, Tn = Object.getPrototypeOf;
|
|
13
|
+
const Bt = () => {
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function Hr(e) {
|
|
16
16
|
return e();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Yt(e) {
|
|
19
19
|
for (var t = 0; t < e.length; t++)
|
|
20
20
|
e[t]();
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function An() {
|
|
23
23
|
var e, t, n = new Promise((r, a) => {
|
|
24
24
|
e = r, t = a;
|
|
25
25
|
});
|
|
26
26
|
return { promise: n, resolve: e, reject: t };
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const B = 2, On = 4, Ct = 8, qr = 1 << 24, Ee = 16, Pe = 32, Qe = 64, tn = 128, se = 512, K = 1024, J = 2048, oe = 4096, X = 8192, be = 16384, nn = 32768, rt = 65536, yn = 1 << 17, Nn = 1 << 18, Rt = 1 << 19, Dn = 1 << 20, xe = 1 << 25, ze = 32768, Wt = 1 << 21, rn = 1 << 22, Me = 1 << 23, Ze = /* @__PURE__ */ Symbol("$state"), Kr = /* @__PURE__ */ Symbol("legacy props"), We = new class extends Error {
|
|
29
29
|
name = "StaleReactionError";
|
|
30
30
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
31
31
|
}();
|
|
32
|
-
function
|
|
32
|
+
function Vr() {
|
|
33
33
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Br(e) {
|
|
36
36
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Yr() {
|
|
39
39
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Wr(e) {
|
|
42
42
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Gr() {
|
|
45
45
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Zr(e) {
|
|
48
48
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Jr() {
|
|
51
51
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function Qr() {
|
|
54
54
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Xr() {
|
|
57
57
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function Fn(e) {
|
|
60
60
|
return e === this.v;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function $r(e, t) {
|
|
63
63
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
65
|
+
function Ln(e) {
|
|
66
|
+
return !$r(e, this.v);
|
|
67
67
|
}
|
|
68
|
-
let
|
|
69
|
-
function
|
|
70
|
-
|
|
68
|
+
let q = null;
|
|
69
|
+
function bt(e) {
|
|
70
|
+
q = e;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
|
|
74
|
-
p:
|
|
72
|
+
function an(e, t = !1, n) {
|
|
73
|
+
q = {
|
|
74
|
+
p: q,
|
|
75
75
|
i: !1,
|
|
76
76
|
c: null,
|
|
77
77
|
e: null,
|
|
78
78
|
s: e,
|
|
79
79
|
x: null,
|
|
80
|
-
l:
|
|
80
|
+
l: ut && !t ? { s: null, u: null, $: [] } : null
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function sn(e) {
|
|
84
84
|
var t = (
|
|
85
85
|
/** @type {ComponentContext} */
|
|
86
|
-
|
|
86
|
+
q
|
|
87
87
|
), n = t.e;
|
|
88
88
|
if (n !== null) {
|
|
89
89
|
t.e = null;
|
|
90
90
|
for (var r of n)
|
|
91
|
-
|
|
91
|
+
Zn(r);
|
|
92
92
|
}
|
|
93
|
-
return t.i = !0,
|
|
93
|
+
return t.i = !0, q = t.p, /** @type {T} */
|
|
94
94
|
{};
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
return !
|
|
96
|
+
function ct() {
|
|
97
|
+
return !ut || q !== null && q.l === null;
|
|
98
98
|
}
|
|
99
|
-
let
|
|
100
|
-
function
|
|
101
|
-
var e =
|
|
102
|
-
|
|
99
|
+
let De = [];
|
|
100
|
+
function Un() {
|
|
101
|
+
var e = De;
|
|
102
|
+
De = [], Yt(e);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
if (
|
|
106
|
-
var t =
|
|
104
|
+
function jn(e) {
|
|
105
|
+
if (De.length === 0 && !nt) {
|
|
106
|
+
var t = De;
|
|
107
107
|
queueMicrotask(() => {
|
|
108
|
-
t ===
|
|
108
|
+
t === De && Un();
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
De.push(e);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
for (;
|
|
115
|
-
|
|
113
|
+
function ei() {
|
|
114
|
+
for (; De.length > 0; )
|
|
115
|
+
Un();
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
var t =
|
|
117
|
+
function ti(e) {
|
|
118
|
+
var t = I;
|
|
119
119
|
if (t === null)
|
|
120
|
-
return
|
|
121
|
-
if ((t.f &
|
|
122
|
-
if ((t.f &
|
|
120
|
+
return P.f |= Me, e;
|
|
121
|
+
if ((t.f & nn) === 0) {
|
|
122
|
+
if ((t.f & tn) === 0)
|
|
123
123
|
throw e;
|
|
124
124
|
t.b.error(e);
|
|
125
125
|
} else
|
|
126
|
-
|
|
126
|
+
wt(e, t);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function wt(e, t) {
|
|
129
129
|
for (; t !== null; ) {
|
|
130
|
-
if ((t.f &
|
|
130
|
+
if ((t.f & tn) !== 0)
|
|
131
131
|
try {
|
|
132
132
|
t.b.error(e);
|
|
133
133
|
return;
|
|
@@ -139,8 +139,8 @@ function bt(e, t) {
|
|
|
139
139
|
throw e;
|
|
140
140
|
}
|
|
141
141
|
const vt = /* @__PURE__ */ new Set();
|
|
142
|
-
let
|
|
143
|
-
class
|
|
142
|
+
let S = null, yt = null, ae = null, re = [], xt = null, Gt = !1, nt = !1;
|
|
143
|
+
class it {
|
|
144
144
|
committed = !1;
|
|
145
145
|
/**
|
|
146
146
|
* The current values of any sources that are updated in this batch
|
|
@@ -204,7 +204,7 @@ class nt {
|
|
|
204
204
|
* @param {Effect[]} root_effects
|
|
205
205
|
*/
|
|
206
206
|
process(t) {
|
|
207
|
-
|
|
207
|
+
re = [], yt = null, this.apply();
|
|
208
208
|
var n = {
|
|
209
209
|
parent: null,
|
|
210
210
|
effect: null,
|
|
@@ -213,7 +213,7 @@ class nt {
|
|
|
213
213
|
};
|
|
214
214
|
for (const r of t)
|
|
215
215
|
this.#l(r, n);
|
|
216
|
-
this.is_fork || this.#c(), this.is_deferred() ? (this.#o(n.effects), this.#o(n.render_effects)) : (
|
|
216
|
+
this.is_fork || this.#c(), this.is_deferred() ? (this.#o(n.effects), this.#o(n.render_effects)) : (yt = this, S = null, bn(n.render_effects), bn(n.effects), yt = null, this.#a?.resolve()), ae = null;
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
219
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -222,16 +222,16 @@ class nt {
|
|
|
222
222
|
* @param {EffectTarget} target
|
|
223
223
|
*/
|
|
224
224
|
#l(t, n) {
|
|
225
|
-
t.f ^=
|
|
225
|
+
t.f ^= K;
|
|
226
226
|
for (var r = t.first; r !== null; ) {
|
|
227
|
-
var a = r.f, i = (a & (
|
|
228
|
-
if ((r.f &
|
|
227
|
+
var a = r.f, i = (a & (Pe | Qe)) !== 0, l = i && (a & K) !== 0, s = l || (a & X) !== 0 || this.skipped_effects.has(r);
|
|
228
|
+
if ((r.f & tn) !== 0 && r.b?.is_pending() && (n = {
|
|
229
229
|
parent: n,
|
|
230
230
|
effect: r,
|
|
231
231
|
effects: [],
|
|
232
232
|
render_effects: []
|
|
233
233
|
}), !s && r.fn !== null) {
|
|
234
|
-
i ? r.f ^=
|
|
234
|
+
i ? r.f ^= K : (a & On) !== 0 ? n.effects.push(r) : Xe(r) && ((r.f & Ee) !== 0 && this.#i.add(r), Je(r));
|
|
235
235
|
var u = r.first;
|
|
236
236
|
if (u !== null) {
|
|
237
237
|
r = u;
|
|
@@ -249,7 +249,7 @@ class nt {
|
|
|
249
249
|
*/
|
|
250
250
|
#o(t) {
|
|
251
251
|
for (const n of t)
|
|
252
|
-
(n.f &
|
|
252
|
+
(n.f & J) !== 0 ? this.#i.add(n) : (n.f & oe) !== 0 && this.#s.add(n), this.#u(n.deps), V(n, K);
|
|
253
253
|
}
|
|
254
254
|
/**
|
|
255
255
|
* @param {Value[] | null} deps
|
|
@@ -257,7 +257,7 @@ class nt {
|
|
|
257
257
|
#u(t) {
|
|
258
258
|
if (t !== null)
|
|
259
259
|
for (const n of t)
|
|
260
|
-
(n.f &
|
|
260
|
+
(n.f & B) === 0 || (n.f & ze) === 0 || (n.f ^= ze, this.#u(
|
|
261
261
|
/** @type {Derived} */
|
|
262
262
|
n.deps
|
|
263
263
|
));
|
|
@@ -269,17 +269,17 @@ class nt {
|
|
|
269
269
|
* @param {any} value
|
|
270
270
|
*/
|
|
271
271
|
capture(t, n) {
|
|
272
|
-
this.previous.has(t) || this.previous.set(t, n), (t.f &
|
|
272
|
+
this.previous.has(t) || this.previous.set(t, n), (t.f & Me) === 0 && (this.current.set(t, t.v), ae?.set(t, t.v));
|
|
273
273
|
}
|
|
274
274
|
activate() {
|
|
275
|
-
|
|
275
|
+
S = this, this.apply();
|
|
276
276
|
}
|
|
277
277
|
deactivate() {
|
|
278
|
-
|
|
278
|
+
S === this && (S = null, ae = null);
|
|
279
279
|
}
|
|
280
280
|
flush() {
|
|
281
|
-
if (this.activate(),
|
|
282
|
-
if (
|
|
281
|
+
if (this.activate(), re.length > 0) {
|
|
282
|
+
if (zn(), S !== null && S !== this)
|
|
283
283
|
return;
|
|
284
284
|
} else this.#e === 0 && this.process([]);
|
|
285
285
|
this.deactivate();
|
|
@@ -298,7 +298,7 @@ class nt {
|
|
|
298
298
|
#f() {
|
|
299
299
|
if (vt.size > 1) {
|
|
300
300
|
this.previous.clear();
|
|
301
|
-
var t =
|
|
301
|
+
var t = ae, n = !0, r = {
|
|
302
302
|
parent: null,
|
|
303
303
|
effect: null,
|
|
304
304
|
effects: [],
|
|
@@ -322,21 +322,21 @@ class nt {
|
|
|
322
322
|
continue;
|
|
323
323
|
const s = [...i.current.keys()].filter((u) => !this.current.has(u));
|
|
324
324
|
if (s.length > 0) {
|
|
325
|
-
var a =
|
|
326
|
-
|
|
325
|
+
var a = re;
|
|
326
|
+
re = [];
|
|
327
327
|
const u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
328
328
|
for (const c of l)
|
|
329
|
-
|
|
330
|
-
if (
|
|
331
|
-
|
|
332
|
-
for (const c of
|
|
329
|
+
Hn(c, s, u, o);
|
|
330
|
+
if (re.length > 0) {
|
|
331
|
+
S = i, i.apply();
|
|
332
|
+
for (const c of re)
|
|
333
333
|
i.#l(c, r);
|
|
334
334
|
i.deactivate();
|
|
335
335
|
}
|
|
336
|
-
|
|
336
|
+
re = a;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
S = null, ae = t;
|
|
340
340
|
}
|
|
341
341
|
this.committed = !0, vt.delete(this);
|
|
342
342
|
}
|
|
@@ -356,9 +356,9 @@ class nt {
|
|
|
356
356
|
}
|
|
357
357
|
revive() {
|
|
358
358
|
for (const t of this.#i)
|
|
359
|
-
this.#s.delete(t),
|
|
359
|
+
this.#s.delete(t), V(t, J), He(t);
|
|
360
360
|
for (const t of this.#s)
|
|
361
|
-
|
|
361
|
+
V(t, oe), He(t);
|
|
362
362
|
this.flush();
|
|
363
363
|
}
|
|
364
364
|
/** @param {() => void} fn */
|
|
@@ -370,112 +370,112 @@ class nt {
|
|
|
370
370
|
this.#n.add(t);
|
|
371
371
|
}
|
|
372
372
|
settled() {
|
|
373
|
-
return (this.#a ??=
|
|
373
|
+
return (this.#a ??= An()).promise;
|
|
374
374
|
}
|
|
375
375
|
static ensure() {
|
|
376
|
-
if (
|
|
377
|
-
const t =
|
|
378
|
-
vt.add(
|
|
379
|
-
|
|
376
|
+
if (S === null) {
|
|
377
|
+
const t = S = new it();
|
|
378
|
+
vt.add(S), nt || it.enqueue(() => {
|
|
379
|
+
S === t && t.flush();
|
|
380
380
|
});
|
|
381
381
|
}
|
|
382
|
-
return
|
|
382
|
+
return S;
|
|
383
383
|
}
|
|
384
384
|
/** @param {() => void} task */
|
|
385
385
|
static enqueue(t) {
|
|
386
|
-
|
|
386
|
+
jn(t);
|
|
387
387
|
}
|
|
388
388
|
apply() {
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
var t =
|
|
393
|
-
|
|
391
|
+
function ni(e) {
|
|
392
|
+
var t = nt;
|
|
393
|
+
nt = !0;
|
|
394
394
|
try {
|
|
395
395
|
for (var n; ; ) {
|
|
396
|
-
if (
|
|
397
|
-
return
|
|
396
|
+
if (ei(), re.length === 0 && (S?.flush(), re.length === 0))
|
|
397
|
+
return xt = null, /** @type {T} */
|
|
398
398
|
n;
|
|
399
|
-
|
|
399
|
+
zn();
|
|
400
400
|
}
|
|
401
401
|
} finally {
|
|
402
|
-
|
|
402
|
+
nt = t;
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
var e =
|
|
407
|
-
|
|
405
|
+
function zn() {
|
|
406
|
+
var e = Ue;
|
|
407
|
+
Gt = !0;
|
|
408
408
|
var t = null;
|
|
409
409
|
try {
|
|
410
410
|
var n = 0;
|
|
411
|
-
for (Pt(!0);
|
|
412
|
-
var r =
|
|
411
|
+
for (Pt(!0); re.length > 0; ) {
|
|
412
|
+
var r = it.ensure();
|
|
413
413
|
if (n++ > 1e3) {
|
|
414
414
|
var a, i;
|
|
415
|
-
|
|
415
|
+
ri();
|
|
416
416
|
}
|
|
417
|
-
r.process(
|
|
417
|
+
r.process(re), Te.clear();
|
|
418
418
|
}
|
|
419
419
|
} finally {
|
|
420
|
-
|
|
420
|
+
Gt = !1, Pt(e), xt = null;
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function ri() {
|
|
424
424
|
try {
|
|
425
|
-
|
|
425
|
+
Gr();
|
|
426
426
|
} catch (e) {
|
|
427
|
-
|
|
427
|
+
wt(e, xt);
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
let
|
|
431
|
-
function
|
|
430
|
+
let ye = null;
|
|
431
|
+
function bn(e) {
|
|
432
432
|
var t = e.length;
|
|
433
433
|
if (t !== 0) {
|
|
434
434
|
for (var n = 0; n < t; ) {
|
|
435
435
|
var r = e[n++];
|
|
436
|
-
if ((r.f & (
|
|
437
|
-
|
|
438
|
-
for (const a of
|
|
439
|
-
if ((a.f & (
|
|
436
|
+
if ((r.f & (be | X)) === 0 && Xe(r) && (ye = /* @__PURE__ */ new Set(), Je(r), r.deps === null && r.first === null && r.nodes === null && (r.teardown === null && r.ac === null ? $n(r) : r.fn = null), ye?.size > 0)) {
|
|
437
|
+
Te.clear();
|
|
438
|
+
for (const a of ye) {
|
|
439
|
+
if ((a.f & (be | X)) !== 0) continue;
|
|
440
440
|
const i = [a];
|
|
441
441
|
let l = a.parent;
|
|
442
442
|
for (; l !== null; )
|
|
443
|
-
|
|
443
|
+
ye.has(l) && (ye.delete(l), i.push(l)), l = l.parent;
|
|
444
444
|
for (let s = i.length - 1; s >= 0; s--) {
|
|
445
445
|
const u = i[s];
|
|
446
|
-
(u.f & (
|
|
446
|
+
(u.f & (be | X)) === 0 && Je(u);
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
|
|
449
|
+
ye.clear();
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
|
|
452
|
+
ye = null;
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Hn(e, t, n, r) {
|
|
456
456
|
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
457
457
|
for (const a of e.reactions) {
|
|
458
458
|
const i = a.f;
|
|
459
|
-
(i &
|
|
459
|
+
(i & B) !== 0 ? Hn(
|
|
460
460
|
/** @type {Derived} */
|
|
461
461
|
a,
|
|
462
462
|
t,
|
|
463
463
|
n,
|
|
464
464
|
r
|
|
465
|
-
) : (i & (
|
|
465
|
+
) : (i & (rn | Ee)) !== 0 && (i & J) === 0 && qn(a, t, r) && (V(a, J), He(
|
|
466
466
|
/** @type {Effect} */
|
|
467
467
|
a
|
|
468
468
|
));
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function qn(e, t, n) {
|
|
472
472
|
const r = n.get(e);
|
|
473
473
|
if (r !== void 0) return r;
|
|
474
474
|
if (e.deps !== null)
|
|
475
475
|
for (const a of e.deps) {
|
|
476
476
|
if (t.includes(a))
|
|
477
477
|
return !0;
|
|
478
|
-
if ((a.f &
|
|
478
|
+
if ((a.f & B) !== 0 && qn(
|
|
479
479
|
/** @type {Derived} */
|
|
480
480
|
a,
|
|
481
481
|
t,
|
|
@@ -489,40 +489,40 @@ function Vn(e, t, n) {
|
|
|
489
489
|
}
|
|
490
490
|
return n.set(e, !1), !1;
|
|
491
491
|
}
|
|
492
|
-
function
|
|
493
|
-
for (var t =
|
|
492
|
+
function He(e) {
|
|
493
|
+
for (var t = xt = e; t.parent !== null; ) {
|
|
494
494
|
t = t.parent;
|
|
495
495
|
var n = t.f;
|
|
496
|
-
if (
|
|
496
|
+
if (Gt && t === I && (n & Ee) !== 0 && (n & Nn) === 0)
|
|
497
497
|
return;
|
|
498
|
-
if ((n & (
|
|
499
|
-
if ((n &
|
|
500
|
-
t.f ^=
|
|
498
|
+
if ((n & (Qe | Pe)) !== 0) {
|
|
499
|
+
if ((n & K) === 0) return;
|
|
500
|
+
t.f ^= K;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
|
|
503
|
+
re.push(t);
|
|
504
504
|
}
|
|
505
|
-
function
|
|
506
|
-
const a =
|
|
505
|
+
function ii(e, t, n, r) {
|
|
506
|
+
const a = ct() ? Mt : on;
|
|
507
507
|
if (n.length === 0 && e.length === 0) {
|
|
508
508
|
r(t.map(a));
|
|
509
509
|
return;
|
|
510
510
|
}
|
|
511
|
-
var i =
|
|
511
|
+
var i = S, l = (
|
|
512
512
|
/** @type {Effect} */
|
|
513
|
-
|
|
514
|
-
), s =
|
|
513
|
+
I
|
|
514
|
+
), s = ai();
|
|
515
515
|
function u() {
|
|
516
|
-
Promise.all(n.map((o) => /* @__PURE__ */
|
|
516
|
+
Promise.all(n.map((o) => /* @__PURE__ */ si(o))).then((o) => {
|
|
517
517
|
s();
|
|
518
518
|
try {
|
|
519
519
|
r([...t.map(a), ...o]);
|
|
520
520
|
} catch (c) {
|
|
521
|
-
(l.f &
|
|
521
|
+
(l.f & be) === 0 && wt(c, l);
|
|
522
522
|
}
|
|
523
|
-
i?.deactivate(),
|
|
523
|
+
i?.deactivate(), gt();
|
|
524
524
|
}).catch((o) => {
|
|
525
|
-
|
|
525
|
+
wt(o, l);
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
528
|
e.length > 0 ? Promise.all(e).then(() => {
|
|
@@ -530,50 +530,50 @@ function fi(e, t, n, r) {
|
|
|
530
530
|
try {
|
|
531
531
|
return u();
|
|
532
532
|
} finally {
|
|
533
|
-
i?.deactivate(),
|
|
533
|
+
i?.deactivate(), gt();
|
|
534
534
|
}
|
|
535
535
|
}) : u();
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
var e =
|
|
537
|
+
function ai() {
|
|
538
|
+
var e = I, t = P, n = q, r = S;
|
|
539
539
|
return function(i = !0) {
|
|
540
|
-
|
|
540
|
+
Ae(e), pe(t), bt(n), i && r?.activate();
|
|
541
541
|
};
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
|
|
543
|
+
function gt() {
|
|
544
|
+
Ae(null), pe(null), bt(null);
|
|
545
545
|
}
|
|
546
546
|
// @__NO_SIDE_EFFECTS__
|
|
547
|
-
function
|
|
548
|
-
var t =
|
|
547
|
+
function Mt(e) {
|
|
548
|
+
var t = B | J, n = P !== null && (P.f & B) !== 0 ? (
|
|
549
549
|
/** @type {Derived} */
|
|
550
|
-
|
|
550
|
+
P
|
|
551
551
|
) : null;
|
|
552
|
-
return
|
|
553
|
-
ctx:
|
|
552
|
+
return I !== null && (I.f |= Rt), {
|
|
553
|
+
ctx: q,
|
|
554
554
|
deps: null,
|
|
555
555
|
effects: null,
|
|
556
|
-
equals:
|
|
556
|
+
equals: Fn,
|
|
557
557
|
f: t,
|
|
558
558
|
fn: e,
|
|
559
559
|
reactions: null,
|
|
560
560
|
rv: 0,
|
|
561
561
|
v: (
|
|
562
562
|
/** @type {V} */
|
|
563
|
-
|
|
563
|
+
Y
|
|
564
564
|
),
|
|
565
565
|
wv: 0,
|
|
566
|
-
parent: n ??
|
|
566
|
+
parent: n ?? I,
|
|
567
567
|
ac: null
|
|
568
568
|
};
|
|
569
569
|
}
|
|
570
570
|
// @__NO_SIDE_EFFECTS__
|
|
571
|
-
function
|
|
571
|
+
function si(e, t) {
|
|
572
572
|
let n = (
|
|
573
573
|
/** @type {Effect | null} */
|
|
574
|
-
|
|
574
|
+
I
|
|
575
575
|
);
|
|
576
|
-
n === null &&
|
|
576
|
+
n === null && Vr();
|
|
577
577
|
var r = (
|
|
578
578
|
/** @type {Boundary} */
|
|
579
579
|
n.b
|
|
@@ -581,36 +581,36 @@ function vi(e, t) {
|
|
|
581
581
|
/** @type {Promise<V>} */
|
|
582
582
|
/** @type {unknown} */
|
|
583
583
|
void 0
|
|
584
|
-
), i =
|
|
584
|
+
), i = at(
|
|
585
585
|
/** @type {V} */
|
|
586
|
-
|
|
587
|
-
), l = !
|
|
588
|
-
return
|
|
589
|
-
var u =
|
|
586
|
+
Y
|
|
587
|
+
), l = !P, s = /* @__PURE__ */ new Map();
|
|
588
|
+
return _i(() => {
|
|
589
|
+
var u = An();
|
|
590
590
|
a = u.promise;
|
|
591
591
|
try {
|
|
592
592
|
Promise.resolve(e()).then(u.resolve, u.reject).then(() => {
|
|
593
|
-
o ===
|
|
593
|
+
o === S && o.committed && o.deactivate(), gt();
|
|
594
594
|
});
|
|
595
595
|
} catch (p) {
|
|
596
|
-
u.reject(p),
|
|
596
|
+
u.reject(p), gt();
|
|
597
597
|
}
|
|
598
598
|
var o = (
|
|
599
599
|
/** @type {Batch} */
|
|
600
|
-
|
|
600
|
+
S
|
|
601
601
|
);
|
|
602
602
|
if (l) {
|
|
603
603
|
var c = !r.is_pending();
|
|
604
|
-
r.update_pending_count(1), o.increment(c), s.get(o)?.reject(
|
|
604
|
+
r.update_pending_count(1), o.increment(c), s.get(o)?.reject(We), s.delete(o), s.set(o, u);
|
|
605
605
|
}
|
|
606
606
|
const d = (p, h = void 0) => {
|
|
607
607
|
if (o.activate(), h)
|
|
608
|
-
h !==
|
|
608
|
+
h !== We && (i.f |= Me, st(i, h));
|
|
609
609
|
else {
|
|
610
|
-
(i.f &
|
|
611
|
-
for (const [v,
|
|
610
|
+
(i.f & Me) !== 0 && (i.f ^= Me), st(i, p);
|
|
611
|
+
for (const [v, w] of s) {
|
|
612
612
|
if (s.delete(v), v === o) break;
|
|
613
|
-
|
|
613
|
+
w.reject(We);
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
l && (r.update_pending_count(-1), o.decrement(c));
|
|
@@ -618,7 +618,7 @@ function vi(e, t) {
|
|
|
618
618
|
u.promise.then(d, (p) => d(null, p || "unknown"));
|
|
619
619
|
}), cn(() => {
|
|
620
620
|
for (const u of s.values())
|
|
621
|
-
u.reject(
|
|
621
|
+
u.reject(We);
|
|
622
622
|
}), new Promise((u) => {
|
|
623
623
|
function o(c) {
|
|
624
624
|
function d() {
|
|
@@ -630,25 +630,25 @@ function vi(e, t) {
|
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
632
|
// @__NO_SIDE_EFFECTS__
|
|
633
|
-
function
|
|
634
|
-
const t = /* @__PURE__ */
|
|
635
|
-
return t.equals =
|
|
633
|
+
function on(e) {
|
|
634
|
+
const t = /* @__PURE__ */ Mt(e);
|
|
635
|
+
return t.equals = Ln, t;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function Kn(e) {
|
|
638
638
|
var t = e.effects;
|
|
639
639
|
if (t !== null) {
|
|
640
640
|
e.effects = null;
|
|
641
641
|
for (var n = 0; n < t.length; n += 1)
|
|
642
|
-
|
|
642
|
+
we(
|
|
643
643
|
/** @type {Effect} */
|
|
644
644
|
t[n]
|
|
645
645
|
);
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function oi(e) {
|
|
649
649
|
for (var t = e.parent; t !== null; ) {
|
|
650
|
-
if ((t.f &
|
|
651
|
-
return (t.f &
|
|
650
|
+
if ((t.f & B) === 0)
|
|
651
|
+
return (t.f & be) === 0 ? (
|
|
652
652
|
/** @type {Effect} */
|
|
653
653
|
t
|
|
654
654
|
) : null;
|
|
@@ -656,124 +656,124 @@ function pi(e) {
|
|
|
656
656
|
}
|
|
657
657
|
return null;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
var t, n =
|
|
661
|
-
|
|
659
|
+
function ln(e) {
|
|
660
|
+
var t, n = I;
|
|
661
|
+
Ae(oi(e));
|
|
662
662
|
try {
|
|
663
|
-
e.f &= ~
|
|
663
|
+
e.f &= ~ze, Kn(e), t = ar(e);
|
|
664
664
|
} finally {
|
|
665
|
-
|
|
665
|
+
Ae(n);
|
|
666
666
|
}
|
|
667
667
|
return t;
|
|
668
668
|
}
|
|
669
|
-
function
|
|
670
|
-
var t =
|
|
671
|
-
if (e.equals(t) || (
|
|
672
|
-
if (
|
|
673
|
-
(Et() ||
|
|
669
|
+
function Vn(e) {
|
|
670
|
+
var t = ln(e);
|
|
671
|
+
if (e.equals(t) || (S?.is_fork || (e.v = t), e.wv = rr()), !qe)
|
|
672
|
+
if (ae !== null)
|
|
673
|
+
(Et() || S?.is_fork) && ae.set(e, t);
|
|
674
674
|
else {
|
|
675
|
-
var n = (e.f &
|
|
676
|
-
|
|
675
|
+
var n = (e.f & se) === 0 ? oe : K;
|
|
676
|
+
V(e, n);
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
let
|
|
680
|
-
const
|
|
681
|
-
let
|
|
682
|
-
function
|
|
679
|
+
let Zt = /* @__PURE__ */ new Set();
|
|
680
|
+
const Te = /* @__PURE__ */ new Map();
|
|
681
|
+
let Bn = !1;
|
|
682
|
+
function at(e, t) {
|
|
683
683
|
var n = {
|
|
684
684
|
f: 0,
|
|
685
685
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
686
686
|
v: e,
|
|
687
687
|
reactions: null,
|
|
688
|
-
equals:
|
|
688
|
+
equals: Fn,
|
|
689
689
|
rv: 0,
|
|
690
690
|
wv: 0
|
|
691
691
|
};
|
|
692
692
|
return n;
|
|
693
693
|
}
|
|
694
694
|
// @__NO_SIDE_EFFECTS__
|
|
695
|
-
function
|
|
696
|
-
const n =
|
|
697
|
-
return
|
|
695
|
+
function Ie(e, t) {
|
|
696
|
+
const n = at(e);
|
|
697
|
+
return gi(n), n;
|
|
698
698
|
}
|
|
699
699
|
// @__NO_SIDE_EFFECTS__
|
|
700
|
-
function
|
|
701
|
-
const r =
|
|
702
|
-
return t || (r.equals =
|
|
700
|
+
function ie(e, t = !1, n = !0) {
|
|
701
|
+
const r = at(e);
|
|
702
|
+
return t || (r.equals = Ln), ut && n && q !== null && q.l !== null && (q.l.s ??= []).push(r), r;
|
|
703
703
|
}
|
|
704
704
|
function L(e, t, n = !1) {
|
|
705
|
-
|
|
705
|
+
P !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
706
706
|
// to ensure we error if state is set inside an inspect effect
|
|
707
|
-
(!
|
|
708
|
-
let r = n ?
|
|
709
|
-
return
|
|
707
|
+
(!ve || (P.f & yn) !== 0) && ct() && (P.f & (B | Ee | rn | yn)) !== 0 && !ge?.includes(e) && Xr();
|
|
708
|
+
let r = n ? Ge(t) : t;
|
|
709
|
+
return st(e, r);
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function st(e, t) {
|
|
712
712
|
if (!e.equals(t)) {
|
|
713
713
|
var n = e.v;
|
|
714
|
-
|
|
715
|
-
var r =
|
|
716
|
-
r.capture(e, n), (e.f &
|
|
714
|
+
qe ? Te.set(e, t) : Te.set(e, n), e.v = t;
|
|
715
|
+
var r = it.ensure();
|
|
716
|
+
r.capture(e, n), (e.f & B) !== 0 && ((e.f & J) !== 0 && ln(
|
|
717
717
|
/** @type {Derived} */
|
|
718
718
|
e
|
|
719
|
-
),
|
|
719
|
+
), V(e, (e.f & se) !== 0 ? K : oe)), e.wv = rr(), Yn(e, J), ct() && I !== null && (I.f & K) !== 0 && (I.f & (Pe | Qe)) === 0 && (te === null ? Ei([e]) : te.push(e)), !r.is_fork && Zt.size > 0 && !Bn && li();
|
|
720
720
|
}
|
|
721
721
|
return t;
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
|
|
725
|
-
var e =
|
|
723
|
+
function li() {
|
|
724
|
+
Bn = !1;
|
|
725
|
+
var e = Ue;
|
|
726
726
|
Pt(!0);
|
|
727
|
-
const t = Array.from(
|
|
727
|
+
const t = Array.from(Zt);
|
|
728
728
|
try {
|
|
729
729
|
for (const n of t)
|
|
730
|
-
(n.f &
|
|
730
|
+
(n.f & K) !== 0 && V(n, oe), Xe(n) && Je(n);
|
|
731
731
|
} finally {
|
|
732
732
|
Pt(e);
|
|
733
733
|
}
|
|
734
|
-
|
|
734
|
+
Zt.clear();
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function Ht(e) {
|
|
737
737
|
L(e, e.v + 1);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Yn(e, t) {
|
|
740
740
|
var n = e.reactions;
|
|
741
741
|
if (n !== null)
|
|
742
|
-
for (var r =
|
|
742
|
+
for (var r = ct(), a = n.length, i = 0; i < a; i++) {
|
|
743
743
|
var l = n[i], s = l.f;
|
|
744
|
-
if (!(!r && l ===
|
|
745
|
-
var u = (s &
|
|
746
|
-
if (u &&
|
|
744
|
+
if (!(!r && l === I)) {
|
|
745
|
+
var u = (s & J) === 0;
|
|
746
|
+
if (u && V(l, t), (s & B) !== 0) {
|
|
747
747
|
var o = (
|
|
748
748
|
/** @type {Derived} */
|
|
749
749
|
l
|
|
750
750
|
);
|
|
751
|
-
|
|
752
|
-
} else u && ((s &
|
|
751
|
+
ae?.delete(o), (s & ze) === 0 && (s & se && (l.f |= ze), Yn(o, oe));
|
|
752
|
+
} else u && ((s & Ee) !== 0 && ye !== null && ye.add(
|
|
753
753
|
/** @type {Effect} */
|
|
754
754
|
l
|
|
755
|
-
),
|
|
755
|
+
), He(
|
|
756
756
|
/** @type {Effect} */
|
|
757
757
|
l
|
|
758
758
|
));
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
if (typeof e != "object" || e === null ||
|
|
762
|
+
function Ge(e) {
|
|
763
|
+
if (typeof e != "object" || e === null || Ze in e)
|
|
764
764
|
return e;
|
|
765
|
-
const t =
|
|
766
|
-
if (t !==
|
|
765
|
+
const t = Tn(e);
|
|
766
|
+
if (t !== jr && t !== zr)
|
|
767
767
|
return e;
|
|
768
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
769
|
-
if (
|
|
768
|
+
var n = /* @__PURE__ */ new Map(), r = xn(e), a = /* @__PURE__ */ Ie(0), i = je, l = (s) => {
|
|
769
|
+
if (je === i)
|
|
770
770
|
return s();
|
|
771
|
-
var u =
|
|
772
|
-
|
|
771
|
+
var u = P, o = je;
|
|
772
|
+
pe(null), Pn(i);
|
|
773
773
|
var c = s();
|
|
774
|
-
return
|
|
774
|
+
return pe(u), Pn(o), c;
|
|
775
775
|
};
|
|
776
|
-
return r && n.set("length", /* @__PURE__ */
|
|
776
|
+
return r && n.set("length", /* @__PURE__ */ Ie(
|
|
777
777
|
/** @type {any[]} */
|
|
778
778
|
e.length
|
|
779
779
|
)), new Proxy(
|
|
@@ -781,10 +781,10 @@ function Ke(e) {
|
|
|
781
781
|
e,
|
|
782
782
|
{
|
|
783
783
|
defineProperty(s, u, o) {
|
|
784
|
-
(!("value" in o) || o.configurable === !1 || o.enumerable === !1 || o.writable === !1) &&
|
|
784
|
+
(!("value" in o) || o.configurable === !1 || o.enumerable === !1 || o.writable === !1) && Jr();
|
|
785
785
|
var c = n.get(u);
|
|
786
786
|
return c === void 0 ? c = l(() => {
|
|
787
|
-
var d = /* @__PURE__ */
|
|
787
|
+
var d = /* @__PURE__ */ Ie(o.value);
|
|
788
788
|
return n.set(u, d), d;
|
|
789
789
|
}) : L(c, o.value, !0), !0;
|
|
790
790
|
},
|
|
@@ -792,23 +792,23 @@ function Ke(e) {
|
|
|
792
792
|
var o = n.get(u);
|
|
793
793
|
if (o === void 0) {
|
|
794
794
|
if (u in s) {
|
|
795
|
-
const c = l(() => /* @__PURE__ */
|
|
796
|
-
n.set(u, c),
|
|
795
|
+
const c = l(() => /* @__PURE__ */ Ie(Y));
|
|
796
|
+
n.set(u, c), Ht(a);
|
|
797
797
|
}
|
|
798
798
|
} else
|
|
799
|
-
L(o,
|
|
799
|
+
L(o, Y), Ht(a);
|
|
800
800
|
return !0;
|
|
801
801
|
},
|
|
802
802
|
get(s, u, o) {
|
|
803
|
-
if (u ===
|
|
803
|
+
if (u === Ze)
|
|
804
804
|
return e;
|
|
805
805
|
var c = n.get(u), d = u in s;
|
|
806
|
-
if (c === void 0 && (!d ||
|
|
807
|
-
var h =
|
|
806
|
+
if (c === void 0 && (!d || _t(s, u)?.writable) && (c = l(() => {
|
|
807
|
+
var h = Ge(d ? s[u] : Y), v = /* @__PURE__ */ Ie(h);
|
|
808
808
|
return v;
|
|
809
809
|
}), n.set(u, c)), c !== void 0) {
|
|
810
810
|
var p = f(c);
|
|
811
|
-
return p ===
|
|
811
|
+
return p === Y ? void 0 : p;
|
|
812
812
|
}
|
|
813
813
|
return Reflect.get(s, u, o);
|
|
814
814
|
},
|
|
@@ -819,7 +819,7 @@ function Ke(e) {
|
|
|
819
819
|
c && (o.value = f(c));
|
|
820
820
|
} else if (o === void 0) {
|
|
821
821
|
var d = n.get(u), p = d?.v;
|
|
822
|
-
if (d !== void 0 && p !==
|
|
822
|
+
if (d !== void 0 && p !== Y)
|
|
823
823
|
return {
|
|
824
824
|
enumerable: !0,
|
|
825
825
|
configurable: !0,
|
|
@@ -830,16 +830,16 @@ function Ke(e) {
|
|
|
830
830
|
return o;
|
|
831
831
|
},
|
|
832
832
|
has(s, u) {
|
|
833
|
-
if (u ===
|
|
833
|
+
if (u === Ze)
|
|
834
834
|
return !0;
|
|
835
|
-
var o = n.get(u), c = o !== void 0 && o.v !==
|
|
836
|
-
if (o !== void 0 ||
|
|
835
|
+
var o = n.get(u), c = o !== void 0 && o.v !== Y || Reflect.has(s, u);
|
|
836
|
+
if (o !== void 0 || I !== null && (!c || _t(s, u)?.writable)) {
|
|
837
837
|
o === void 0 && (o = l(() => {
|
|
838
|
-
var p = c ?
|
|
838
|
+
var p = c ? Ge(s[u]) : Y, h = /* @__PURE__ */ Ie(p);
|
|
839
839
|
return h;
|
|
840
840
|
}), n.set(u, o));
|
|
841
841
|
var d = f(o);
|
|
842
|
-
if (d ===
|
|
842
|
+
if (d === Y)
|
|
843
843
|
return !1;
|
|
844
844
|
}
|
|
845
845
|
return c;
|
|
@@ -850,25 +850,25 @@ function Ke(e) {
|
|
|
850
850
|
for (var h = o; h < /** @type {Source<number>} */
|
|
851
851
|
d.v; h += 1) {
|
|
852
852
|
var v = n.get(h + "");
|
|
853
|
-
v !== void 0 ? L(v,
|
|
853
|
+
v !== void 0 ? L(v, Y) : h in s && (v = l(() => /* @__PURE__ */ Ie(Y)), n.set(h + "", v));
|
|
854
854
|
}
|
|
855
855
|
if (d === void 0)
|
|
856
|
-
(!p ||
|
|
856
|
+
(!p || _t(s, u)?.writable) && (d = l(() => /* @__PURE__ */ Ie(void 0)), L(d, Ge(o)), n.set(u, d));
|
|
857
857
|
else {
|
|
858
|
-
p = d.v !==
|
|
859
|
-
var
|
|
860
|
-
L(d,
|
|
858
|
+
p = d.v !== Y;
|
|
859
|
+
var w = l(() => Ge(o));
|
|
860
|
+
L(d, w);
|
|
861
861
|
}
|
|
862
|
-
var
|
|
863
|
-
if (
|
|
862
|
+
var b = Reflect.getOwnPropertyDescriptor(s, u);
|
|
863
|
+
if (b?.set && b.set.call(c, o), !p) {
|
|
864
864
|
if (r && typeof u == "string") {
|
|
865
|
-
var
|
|
865
|
+
var y = (
|
|
866
866
|
/** @type {Source<number>} */
|
|
867
867
|
n.get("length")
|
|
868
868
|
), _ = Number(u);
|
|
869
|
-
Number.isInteger(_) && _ >=
|
|
869
|
+
Number.isInteger(_) && _ >= y.v && L(y, _ + 1);
|
|
870
870
|
}
|
|
871
|
-
|
|
871
|
+
Ht(a);
|
|
872
872
|
}
|
|
873
873
|
return !0;
|
|
874
874
|
},
|
|
@@ -876,61 +876,61 @@ function Ke(e) {
|
|
|
876
876
|
f(a);
|
|
877
877
|
var u = Reflect.ownKeys(s).filter((d) => {
|
|
878
878
|
var p = n.get(d);
|
|
879
|
-
return p === void 0 || p.v !==
|
|
879
|
+
return p === void 0 || p.v !== Y;
|
|
880
880
|
});
|
|
881
881
|
for (var [o, c] of n)
|
|
882
|
-
c.v !==
|
|
882
|
+
c.v !== Y && !(o in s) && u.push(o);
|
|
883
883
|
return u;
|
|
884
884
|
},
|
|
885
885
|
setPrototypeOf() {
|
|
886
|
-
|
|
886
|
+
Qr();
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
889
|
);
|
|
890
890
|
}
|
|
891
|
-
var
|
|
892
|
-
function
|
|
891
|
+
var ui, ci, fi;
|
|
892
|
+
function Le(e = "") {
|
|
893
893
|
return document.createTextNode(e);
|
|
894
894
|
}
|
|
895
895
|
// @__NO_SIDE_EFFECTS__
|
|
896
|
-
function
|
|
896
|
+
function un(e) {
|
|
897
897
|
return (
|
|
898
898
|
/** @type {TemplateNode | null} */
|
|
899
|
-
|
|
899
|
+
ci.call(e)
|
|
900
900
|
);
|
|
901
901
|
}
|
|
902
902
|
// @__NO_SIDE_EFFECTS__
|
|
903
|
-
function
|
|
903
|
+
function ft(e) {
|
|
904
904
|
return (
|
|
905
905
|
/** @type {TemplateNode | null} */
|
|
906
|
-
|
|
906
|
+
fi.call(e)
|
|
907
907
|
);
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
return /* @__PURE__ */
|
|
909
|
+
function T(e, t) {
|
|
910
|
+
return /* @__PURE__ */ un(e);
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function pt(e, t = !1) {
|
|
913
913
|
{
|
|
914
|
-
var n = /* @__PURE__ */
|
|
915
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */
|
|
914
|
+
var n = /* @__PURE__ */ un(e);
|
|
915
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ ft(n) : n;
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function j(e, t = 1, n = !1) {
|
|
919
919
|
let r = e;
|
|
920
920
|
for (; t--; )
|
|
921
921
|
r = /** @type {TemplateNode} */
|
|
922
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ ft(r);
|
|
923
923
|
return r;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function di(e) {
|
|
926
926
|
e.textContent = "";
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function Wn() {
|
|
929
929
|
return !1;
|
|
930
930
|
}
|
|
931
|
-
let
|
|
932
|
-
function
|
|
933
|
-
|
|
931
|
+
let wn = !1;
|
|
932
|
+
function vi() {
|
|
933
|
+
wn || (wn = !0, document.addEventListener(
|
|
934
934
|
"reset",
|
|
935
935
|
(e) => {
|
|
936
936
|
Promise.resolve().then(() => {
|
|
@@ -947,37 +947,37 @@ function wi() {
|
|
|
947
947
|
{ capture: !0 }
|
|
948
948
|
));
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
var t =
|
|
952
|
-
|
|
950
|
+
function Tt(e) {
|
|
951
|
+
var t = P, n = I;
|
|
952
|
+
pe(null), Ae(null);
|
|
953
953
|
try {
|
|
954
954
|
return e();
|
|
955
955
|
} finally {
|
|
956
|
-
|
|
956
|
+
pe(t), Ae(n);
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
function
|
|
960
|
-
e.addEventListener(t, () =>
|
|
959
|
+
function pi(e, t, n, r = n) {
|
|
960
|
+
e.addEventListener(t, () => Tt(n));
|
|
961
961
|
const a = e.__on_r;
|
|
962
962
|
a ? e.__on_r = () => {
|
|
963
963
|
a(), r(!0);
|
|
964
|
-
} : e.__on_r = () => r(!0),
|
|
964
|
+
} : e.__on_r = () => r(!0), vi();
|
|
965
965
|
}
|
|
966
|
-
function
|
|
967
|
-
|
|
966
|
+
function Gn(e) {
|
|
967
|
+
I === null && (P === null && Wr(), Yr()), qe && Br();
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function hi(e, t) {
|
|
970
970
|
var n = t.last;
|
|
971
971
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
972
972
|
}
|
|
973
|
-
function
|
|
974
|
-
var r =
|
|
975
|
-
r !== null && (r.f &
|
|
973
|
+
function Oe(e, t, n) {
|
|
974
|
+
var r = I;
|
|
975
|
+
r !== null && (r.f & X) !== 0 && (e |= X);
|
|
976
976
|
var a = {
|
|
977
|
-
ctx:
|
|
977
|
+
ctx: q,
|
|
978
978
|
deps: null,
|
|
979
979
|
nodes: null,
|
|
980
|
-
f: e |
|
|
980
|
+
f: e | J | se,
|
|
981
981
|
first: null,
|
|
982
982
|
fn: t,
|
|
983
983
|
last: null,
|
|
@@ -991,149 +991,149 @@ function ke(e, t, n) {
|
|
|
991
991
|
};
|
|
992
992
|
if (n)
|
|
993
993
|
try {
|
|
994
|
-
|
|
994
|
+
Je(a), a.f |= nn;
|
|
995
995
|
} catch (s) {
|
|
996
|
-
throw
|
|
996
|
+
throw we(a), s;
|
|
997
997
|
}
|
|
998
|
-
else t !== null &&
|
|
998
|
+
else t !== null && He(a);
|
|
999
999
|
var i = a;
|
|
1000
1000
|
if (n && i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
1001
|
-
(i.f &
|
|
1001
|
+
(i.f & Rt) === 0 && (i = i.first, (e & Ee) !== 0 && (e & rt) !== 0 && i !== null && (i.f |= rt)), i !== null && (i.parent = r, r !== null && hi(i, r), P !== null && (P.f & B) !== 0 && (e & Qe) === 0)) {
|
|
1002
1002
|
var l = (
|
|
1003
1003
|
/** @type {Derived} */
|
|
1004
|
-
|
|
1004
|
+
P
|
|
1005
1005
|
);
|
|
1006
1006
|
(l.effects ??= []).push(i);
|
|
1007
1007
|
}
|
|
1008
1008
|
return a;
|
|
1009
1009
|
}
|
|
1010
1010
|
function Et() {
|
|
1011
|
-
return
|
|
1011
|
+
return P !== null && !ve;
|
|
1012
1012
|
}
|
|
1013
1013
|
function cn(e) {
|
|
1014
|
-
const t =
|
|
1015
|
-
return
|
|
1014
|
+
const t = Oe(Ct, null, !1);
|
|
1015
|
+
return V(t, K), t.teardown = e, t;
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
|
|
1017
|
+
function gn(e) {
|
|
1018
|
+
Gn();
|
|
1019
1019
|
var t = (
|
|
1020
1020
|
/** @type {Effect} */
|
|
1021
|
-
|
|
1022
|
-
), n = !
|
|
1021
|
+
I.f
|
|
1022
|
+
), n = !P && (t & Pe) !== 0 && (t & nn) === 0;
|
|
1023
1023
|
if (n) {
|
|
1024
1024
|
var r = (
|
|
1025
1025
|
/** @type {ComponentContext} */
|
|
1026
|
-
|
|
1026
|
+
q
|
|
1027
1027
|
);
|
|
1028
1028
|
(r.e ??= []).push(e);
|
|
1029
1029
|
} else
|
|
1030
|
-
return
|
|
1030
|
+
return Zn(e);
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1033
|
-
return
|
|
1032
|
+
function Zn(e) {
|
|
1033
|
+
return Oe(On | Dn, e, !1);
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1036
|
-
return
|
|
1035
|
+
function mi(e) {
|
|
1036
|
+
return Gn(), Oe(Ct | Dn, e, !0);
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function ce(e, t) {
|
|
1039
1039
|
var n = (
|
|
1040
1040
|
/** @type {ComponentContextLegacy} */
|
|
1041
|
-
|
|
1041
|
+
q
|
|
1042
1042
|
), r = { effect: null, ran: !1, deps: e };
|
|
1043
1043
|
n.l.$.push(r), r.effect = dn(() => {
|
|
1044
|
-
e(), !r.ran && (r.ran = !0,
|
|
1044
|
+
e(), !r.ran && (r.ran = !0, A(t));
|
|
1045
1045
|
});
|
|
1046
1046
|
}
|
|
1047
1047
|
function fn() {
|
|
1048
1048
|
var e = (
|
|
1049
1049
|
/** @type {ComponentContextLegacy} */
|
|
1050
|
-
|
|
1050
|
+
q
|
|
1051
1051
|
);
|
|
1052
1052
|
dn(() => {
|
|
1053
1053
|
for (var t of e.l.$) {
|
|
1054
1054
|
t.deps();
|
|
1055
1055
|
var n = t.effect;
|
|
1056
|
-
(n.f &
|
|
1056
|
+
(n.f & K) !== 0 && V(n, oe), Xe(n) && Je(n), t.ran = !1;
|
|
1057
1057
|
}
|
|
1058
1058
|
});
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
return
|
|
1060
|
+
function _i(e) {
|
|
1061
|
+
return Oe(rn | Rt, e, !0);
|
|
1062
1062
|
}
|
|
1063
1063
|
function dn(e, t = 0) {
|
|
1064
|
-
return
|
|
1064
|
+
return Oe(Ct | t, e, !0);
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1068
|
-
|
|
1066
|
+
function de(e, t = [], n = [], r = []) {
|
|
1067
|
+
ii(r, t, n, (a) => {
|
|
1068
|
+
Oe(Ct, () => e(...a.map(f)), !0);
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1072
|
-
var n =
|
|
1071
|
+
function Jn(e, t = 0) {
|
|
1072
|
+
var n = Oe(Ee | t, e, !0);
|
|
1073
1073
|
return n;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1076
|
-
return
|
|
1075
|
+
function ot(e) {
|
|
1076
|
+
return Oe(Pe | Rt, e, !0);
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1078
|
+
function Qn(e) {
|
|
1079
1079
|
var t = e.teardown;
|
|
1080
1080
|
if (t !== null) {
|
|
1081
|
-
const n =
|
|
1082
|
-
|
|
1081
|
+
const n = qe, r = P;
|
|
1082
|
+
En(!0), pe(null);
|
|
1083
1083
|
try {
|
|
1084
1084
|
t.call(null);
|
|
1085
1085
|
} finally {
|
|
1086
|
-
|
|
1086
|
+
En(n), pe(r);
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function Xn(e, t = !1) {
|
|
1091
1091
|
var n = e.first;
|
|
1092
1092
|
for (e.first = e.last = null; n !== null; ) {
|
|
1093
1093
|
const a = n.ac;
|
|
1094
|
-
a !== null &&
|
|
1095
|
-
a.abort(
|
|
1094
|
+
a !== null && Tt(() => {
|
|
1095
|
+
a.abort(We);
|
|
1096
1096
|
});
|
|
1097
1097
|
var r = n.next;
|
|
1098
|
-
(n.f &
|
|
1098
|
+
(n.f & Qe) !== 0 ? n.parent = null : we(n, t), n = r;
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function yi(e) {
|
|
1102
1102
|
for (var t = e.first; t !== null; ) {
|
|
1103
1103
|
var n = t.next;
|
|
1104
|
-
(t.f &
|
|
1104
|
+
(t.f & Pe) === 0 && we(t), t = n;
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function we(e, t = !0) {
|
|
1108
1108
|
var n = !1;
|
|
1109
|
-
(t || (e.f &
|
|
1109
|
+
(t || (e.f & Nn) !== 0) && e.nodes !== null && e.nodes.end !== null && (bi(
|
|
1110
1110
|
e.nodes.start,
|
|
1111
1111
|
/** @type {TemplateNode} */
|
|
1112
1112
|
e.nodes.end
|
|
1113
|
-
), n = !0),
|
|
1113
|
+
), n = !0), Xn(e, t && !n), St(e, 0), V(e, be);
|
|
1114
1114
|
var r = e.nodes && e.nodes.t;
|
|
1115
1115
|
if (r !== null)
|
|
1116
1116
|
for (const i of r)
|
|
1117
1117
|
i.stop();
|
|
1118
|
-
|
|
1118
|
+
Qn(e);
|
|
1119
1119
|
var a = e.parent;
|
|
1120
|
-
a !== null && a.first !== null &&
|
|
1120
|
+
a !== null && a.first !== null && $n(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function bi(e, t) {
|
|
1123
1123
|
for (; e !== null; ) {
|
|
1124
|
-
var n = e === t ? null : /* @__PURE__ */
|
|
1124
|
+
var n = e === t ? null : /* @__PURE__ */ ft(e);
|
|
1125
1125
|
e.remove(), e = n;
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function $n(e) {
|
|
1129
1129
|
var t = e.parent, n = e.prev, r = e.next;
|
|
1130
1130
|
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1131
1131
|
}
|
|
1132
1132
|
function vn(e, t, n = !0) {
|
|
1133
1133
|
var r = [];
|
|
1134
|
-
|
|
1134
|
+
er(e, r, !0);
|
|
1135
1135
|
var a = () => {
|
|
1136
|
-
n &&
|
|
1136
|
+
n && we(e), t && t();
|
|
1137
1137
|
}, i = r.length;
|
|
1138
1138
|
if (i > 0) {
|
|
1139
1139
|
var l = () => --i || a();
|
|
@@ -1142,31 +1142,31 @@ function vn(e, t, n = !0) {
|
|
|
1142
1142
|
} else
|
|
1143
1143
|
a();
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
if ((e.f &
|
|
1147
|
-
e.f ^=
|
|
1145
|
+
function er(e, t, n) {
|
|
1146
|
+
if ((e.f & X) === 0) {
|
|
1147
|
+
e.f ^= X;
|
|
1148
1148
|
var r = e.nodes && e.nodes.t;
|
|
1149
1149
|
if (r !== null)
|
|
1150
1150
|
for (const s of r)
|
|
1151
1151
|
(s.is_global || n) && t.push(s);
|
|
1152
1152
|
for (var a = e.first; a !== null; ) {
|
|
1153
|
-
var i = a.next, l = (a.f &
|
|
1153
|
+
var i = a.next, l = (a.f & rt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1154
1154
|
// it means the parent block effect was pruned. In that case,
|
|
1155
1155
|
// transparency information was transferred to the branch effect.
|
|
1156
|
-
(a.f &
|
|
1157
|
-
|
|
1156
|
+
(a.f & Pe) !== 0 && (e.f & Ee) !== 0;
|
|
1157
|
+
er(a, t, l ? n : !1), a = i;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
function pn(e) {
|
|
1162
|
-
|
|
1162
|
+
tr(e, !0);
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
if ((e.f &
|
|
1166
|
-
e.f ^=
|
|
1164
|
+
function tr(e, t) {
|
|
1165
|
+
if ((e.f & X) !== 0) {
|
|
1166
|
+
e.f ^= X, (e.f & K) === 0 && (V(e, J), He(e));
|
|
1167
1167
|
for (var n = e.first; n !== null; ) {
|
|
1168
|
-
var r = n.next, a = (n.f &
|
|
1169
|
-
|
|
1168
|
+
var r = n.next, a = (n.f & rt) !== 0 || (n.f & Pe) !== 0;
|
|
1169
|
+
tr(n, a ? t : !1), n = r;
|
|
1170
1170
|
}
|
|
1171
1171
|
var i = e.nodes && e.nodes.t;
|
|
1172
1172
|
if (i !== null)
|
|
@@ -1174,136 +1174,136 @@ function rr(e, t) {
|
|
|
1174
1174
|
(l.is_global || t) && l.in();
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1177
|
+
function wi(e, t) {
|
|
1178
1178
|
if (e.nodes)
|
|
1179
1179
|
for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
|
|
1180
|
-
var a = n === r ? null : /* @__PURE__ */
|
|
1180
|
+
var a = n === r ? null : /* @__PURE__ */ ft(n);
|
|
1181
1181
|
t.append(n), n = a;
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
|
-
let
|
|
1184
|
+
let Ue = !1;
|
|
1185
1185
|
function Pt(e) {
|
|
1186
|
-
|
|
1186
|
+
Ue = e;
|
|
1187
1187
|
}
|
|
1188
|
-
let
|
|
1189
|
-
function
|
|
1190
|
-
|
|
1188
|
+
let qe = !1;
|
|
1189
|
+
function En(e) {
|
|
1190
|
+
qe = e;
|
|
1191
1191
|
}
|
|
1192
|
-
let
|
|
1193
|
-
function
|
|
1194
|
-
|
|
1192
|
+
let P = null, ve = !1;
|
|
1193
|
+
function pe(e) {
|
|
1194
|
+
P = e;
|
|
1195
1195
|
}
|
|
1196
|
-
let
|
|
1197
|
-
function
|
|
1198
|
-
|
|
1196
|
+
let I = null;
|
|
1197
|
+
function Ae(e) {
|
|
1198
|
+
I = e;
|
|
1199
1199
|
}
|
|
1200
|
-
let
|
|
1201
|
-
function
|
|
1202
|
-
|
|
1200
|
+
let ge = null;
|
|
1201
|
+
function gi(e) {
|
|
1202
|
+
P !== null && (ge === null ? ge = [e] : ge.push(e));
|
|
1203
1203
|
}
|
|
1204
|
-
let
|
|
1205
|
-
function
|
|
1206
|
-
|
|
1204
|
+
let G = null, Q = 0, te = null;
|
|
1205
|
+
function Ei(e) {
|
|
1206
|
+
te = e;
|
|
1207
1207
|
}
|
|
1208
|
-
let
|
|
1209
|
-
function
|
|
1210
|
-
|
|
1208
|
+
let nr = 1, lt = 0, je = lt;
|
|
1209
|
+
function Pn(e) {
|
|
1210
|
+
je = e;
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1213
|
-
return ++
|
|
1212
|
+
function rr() {
|
|
1213
|
+
return ++nr;
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function Xe(e) {
|
|
1216
1216
|
var t = e.f;
|
|
1217
|
-
if ((t &
|
|
1217
|
+
if ((t & J) !== 0)
|
|
1218
1218
|
return !0;
|
|
1219
|
-
if (t &
|
|
1219
|
+
if (t & B && (e.f &= ~ze), (t & oe) !== 0) {
|
|
1220
1220
|
var n = e.deps;
|
|
1221
1221
|
if (n !== null)
|
|
1222
1222
|
for (var r = n.length, a = 0; a < r; a++) {
|
|
1223
1223
|
var i = n[a];
|
|
1224
|
-
if (
|
|
1224
|
+
if (Xe(
|
|
1225
1225
|
/** @type {Derived} */
|
|
1226
1226
|
i
|
|
1227
|
-
) &&
|
|
1227
|
+
) && Vn(
|
|
1228
1228
|
/** @type {Derived} */
|
|
1229
1229
|
i
|
|
1230
1230
|
), i.wv > e.wv)
|
|
1231
1231
|
return !0;
|
|
1232
1232
|
}
|
|
1233
|
-
(t &
|
|
1233
|
+
(t & se) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1234
1234
|
// traversal of the graph in the other batches still happens
|
|
1235
|
-
|
|
1235
|
+
ae === null && V(e, K);
|
|
1236
1236
|
}
|
|
1237
1237
|
return !1;
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function ir(e, t, n = !0) {
|
|
1240
1240
|
var r = e.reactions;
|
|
1241
|
-
if (r !== null && !
|
|
1241
|
+
if (r !== null && !ge?.includes(e))
|
|
1242
1242
|
for (var a = 0; a < r.length; a++) {
|
|
1243
1243
|
var i = r[a];
|
|
1244
|
-
(i.f &
|
|
1244
|
+
(i.f & B) !== 0 ? ir(
|
|
1245
1245
|
/** @type {Derived} */
|
|
1246
1246
|
i,
|
|
1247
1247
|
t,
|
|
1248
1248
|
!1
|
|
1249
|
-
) : t === i && (n ?
|
|
1249
|
+
) : t === i && (n ? V(i, J) : (i.f & K) !== 0 && V(i, oe), He(
|
|
1250
1250
|
/** @type {Effect} */
|
|
1251
1251
|
i
|
|
1252
1252
|
));
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1256
|
-
var t =
|
|
1257
|
-
|
|
1258
|
-
null,
|
|
1259
|
-
e.ac.abort(
|
|
1255
|
+
function ar(e) {
|
|
1256
|
+
var t = G, n = Q, r = te, a = P, i = ge, l = q, s = ve, u = je, o = e.f;
|
|
1257
|
+
G = /** @type {null | Value[]} */
|
|
1258
|
+
null, Q = 0, te = null, P = (o & (Pe | Qe)) === 0 ? e : null, ge = null, bt(e.ctx), ve = !1, je = ++lt, e.ac !== null && (Tt(() => {
|
|
1259
|
+
e.ac.abort(We);
|
|
1260
1260
|
}), e.ac = null);
|
|
1261
1261
|
try {
|
|
1262
|
-
e.f |=
|
|
1262
|
+
e.f |= Wt;
|
|
1263
1263
|
var c = (
|
|
1264
1264
|
/** @type {Function} */
|
|
1265
1265
|
e.fn
|
|
1266
1266
|
), d = c(), p = e.deps;
|
|
1267
|
-
if (
|
|
1267
|
+
if (G !== null) {
|
|
1268
1268
|
var h;
|
|
1269
|
-
if (St(e,
|
|
1270
|
-
for (p.length =
|
|
1271
|
-
p[
|
|
1269
|
+
if (St(e, Q), p !== null && Q > 0)
|
|
1270
|
+
for (p.length = Q + G.length, h = 0; h < G.length; h++)
|
|
1271
|
+
p[Q + h] = G[h];
|
|
1272
1272
|
else
|
|
1273
|
-
e.deps = p =
|
|
1274
|
-
if (Et() && (e.f &
|
|
1275
|
-
for (h =
|
|
1273
|
+
e.deps = p = G;
|
|
1274
|
+
if (Et() && (e.f & se) !== 0)
|
|
1275
|
+
for (h = Q; h < p.length; h++)
|
|
1276
1276
|
(p[h].reactions ??= []).push(e);
|
|
1277
|
-
} else p !== null &&
|
|
1278
|
-
if (
|
|
1277
|
+
} else p !== null && Q < p.length && (St(e, Q), p.length = Q);
|
|
1278
|
+
if (ct() && te !== null && !ve && p !== null && (e.f & (B | oe | J)) === 0)
|
|
1279
1279
|
for (h = 0; h < /** @type {Source[]} */
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1280
|
+
te.length; h++)
|
|
1281
|
+
ir(
|
|
1282
|
+
te[h],
|
|
1283
1283
|
/** @type {Effect} */
|
|
1284
1284
|
e
|
|
1285
1285
|
);
|
|
1286
|
-
return a !== null && a !== e && (
|
|
1287
|
-
|
|
1286
|
+
return a !== null && a !== e && (lt++, te !== null && (r === null ? r = te : r.push(.../** @type {Source[]} */
|
|
1287
|
+
te))), (e.f & Me) !== 0 && (e.f ^= Me), d;
|
|
1288
1288
|
} catch (v) {
|
|
1289
|
-
return
|
|
1289
|
+
return ti(v);
|
|
1290
1290
|
} finally {
|
|
1291
|
-
e.f ^=
|
|
1291
|
+
e.f ^= Wt, G = t, Q = n, te = r, P = a, ge = i, bt(l), ve = s, je = u;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function Pi(e, t) {
|
|
1295
1295
|
let n = t.reactions;
|
|
1296
1296
|
if (n !== null) {
|
|
1297
|
-
var r =
|
|
1297
|
+
var r = Lr.call(n, e);
|
|
1298
1298
|
if (r !== -1) {
|
|
1299
1299
|
var a = n.length - 1;
|
|
1300
1300
|
a === 0 ? n = t.reactions = null : (n[r] = n[a], n.pop());
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
n === null && (t.f &
|
|
1303
|
+
n === null && (t.f & B) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1304
1304
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1305
1305
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1306
|
-
(
|
|
1306
|
+
(G === null || !G.includes(t)) && (V(t, oe), (t.f & se) !== 0 && (t.f ^= se, t.f &= ~ze), Kn(
|
|
1307
1307
|
/** @type {Derived} **/
|
|
1308
1308
|
t
|
|
1309
1309
|
), St(
|
|
@@ -1316,117 +1316,117 @@ function St(e, t) {
|
|
|
1316
1316
|
var n = e.deps;
|
|
1317
1317
|
if (n !== null)
|
|
1318
1318
|
for (var r = t; r < n.length; r++)
|
|
1319
|
-
|
|
1319
|
+
Pi(e, n[r]);
|
|
1320
1320
|
}
|
|
1321
|
-
function
|
|
1321
|
+
function Je(e) {
|
|
1322
1322
|
var t = e.f;
|
|
1323
|
-
if ((t &
|
|
1324
|
-
|
|
1325
|
-
var n =
|
|
1326
|
-
|
|
1323
|
+
if ((t & be) === 0) {
|
|
1324
|
+
V(e, K);
|
|
1325
|
+
var n = I, r = Ue;
|
|
1326
|
+
I = e, Ue = !0;
|
|
1327
1327
|
try {
|
|
1328
|
-
(t & (
|
|
1329
|
-
var a =
|
|
1330
|
-
e.teardown = typeof a == "function" ? a : null, e.wv =
|
|
1328
|
+
(t & (Ee | qr)) !== 0 ? yi(e) : Xn(e), Qn(e);
|
|
1329
|
+
var a = ar(e);
|
|
1330
|
+
e.teardown = typeof a == "function" ? a : null, e.wv = nr;
|
|
1331
1331
|
var i;
|
|
1332
|
-
|
|
1332
|
+
Vt && Ir && (e.f & J) !== 0 && e.deps;
|
|
1333
1333
|
} finally {
|
|
1334
|
-
|
|
1334
|
+
Ue = r, I = n;
|
|
1335
1335
|
}
|
|
1336
1336
|
}
|
|
1337
1337
|
}
|
|
1338
|
-
async function
|
|
1339
|
-
await Promise.resolve(),
|
|
1338
|
+
async function Si() {
|
|
1339
|
+
await Promise.resolve(), ni();
|
|
1340
1340
|
}
|
|
1341
1341
|
function f(e) {
|
|
1342
|
-
var t = e.f, n = (t &
|
|
1343
|
-
if (
|
|
1344
|
-
var r =
|
|
1345
|
-
if (!r && !
|
|
1346
|
-
var a =
|
|
1347
|
-
if ((
|
|
1348
|
-
e.rv <
|
|
1342
|
+
var t = e.f, n = (t & B) !== 0;
|
|
1343
|
+
if (P !== null && !ve) {
|
|
1344
|
+
var r = I !== null && (I.f & be) !== 0;
|
|
1345
|
+
if (!r && !ge?.includes(e)) {
|
|
1346
|
+
var a = P.deps;
|
|
1347
|
+
if ((P.f & Wt) !== 0)
|
|
1348
|
+
e.rv < lt && (e.rv = lt, G === null && a !== null && a[Q] === e ? Q++ : G === null ? G = [e] : G.includes(e) || G.push(e));
|
|
1349
1349
|
else {
|
|
1350
|
-
(
|
|
1350
|
+
(P.deps ??= []).push(e);
|
|
1351
1351
|
var i = e.reactions;
|
|
1352
|
-
i === null ? e.reactions = [
|
|
1352
|
+
i === null ? e.reactions = [P] : i.includes(P) || i.push(P);
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
|
-
if (
|
|
1357
|
-
if (
|
|
1358
|
-
return
|
|
1356
|
+
if (qe) {
|
|
1357
|
+
if (Te.has(e))
|
|
1358
|
+
return Te.get(e);
|
|
1359
1359
|
if (n) {
|
|
1360
1360
|
var l = (
|
|
1361
1361
|
/** @type {Derived} */
|
|
1362
1362
|
e
|
|
1363
1363
|
), s = l.v;
|
|
1364
|
-
return ((l.f &
|
|
1364
|
+
return ((l.f & K) === 0 && l.reactions !== null || or(l)) && (s = ln(l)), Te.set(l, s), s;
|
|
1365
1365
|
}
|
|
1366
|
-
} else n && (!
|
|
1367
|
-
e,
|
|
1368
|
-
if (
|
|
1369
|
-
return
|
|
1370
|
-
if ((e.f &
|
|
1366
|
+
} else n && (!ae?.has(e) || S?.is_fork && !Et()) && (l = /** @type {Derived} */
|
|
1367
|
+
e, Xe(l) && Vn(l), Ue && Et() && (l.f & se) === 0 && sr(l));
|
|
1368
|
+
if (ae?.has(e))
|
|
1369
|
+
return ae.get(e);
|
|
1370
|
+
if ((e.f & Me) !== 0)
|
|
1371
1371
|
throw e.v;
|
|
1372
1372
|
return e.v;
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function sr(e) {
|
|
1375
1375
|
if (e.deps !== null) {
|
|
1376
|
-
e.f ^=
|
|
1376
|
+
e.f ^= se;
|
|
1377
1377
|
for (const t of e.deps)
|
|
1378
|
-
(t.reactions ??= []).push(e), (t.f &
|
|
1378
|
+
(t.reactions ??= []).push(e), (t.f & B) !== 0 && (t.f & se) === 0 && sr(
|
|
1379
1379
|
/** @type {Derived} */
|
|
1380
1380
|
t
|
|
1381
1381
|
);
|
|
1382
1382
|
}
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
if (e.v ===
|
|
1384
|
+
function or(e) {
|
|
1385
|
+
if (e.v === Y) return !0;
|
|
1386
1386
|
if (e.deps === null) return !1;
|
|
1387
1387
|
for (const t of e.deps)
|
|
1388
|
-
if (
|
|
1388
|
+
if (Te.has(t) || (t.f & B) !== 0 && or(
|
|
1389
1389
|
/** @type {Derived} */
|
|
1390
1390
|
t
|
|
1391
1391
|
))
|
|
1392
1392
|
return !0;
|
|
1393
1393
|
return !1;
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1396
|
-
var t =
|
|
1395
|
+
function A(e) {
|
|
1396
|
+
var t = ve;
|
|
1397
1397
|
try {
|
|
1398
|
-
return
|
|
1398
|
+
return ve = !0, e();
|
|
1399
1399
|
} finally {
|
|
1400
|
-
|
|
1400
|
+
ve = t;
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
|
-
const
|
|
1404
|
-
function
|
|
1405
|
-
e.f = e.f &
|
|
1403
|
+
const ki = -7169;
|
|
1404
|
+
function V(e, t) {
|
|
1405
|
+
e.f = e.f & ki | t;
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function W(e) {
|
|
1408
1408
|
if (!(typeof e != "object" || !e || e instanceof EventTarget)) {
|
|
1409
|
-
if (
|
|
1410
|
-
|
|
1409
|
+
if (Ze in e)
|
|
1410
|
+
Jt(e);
|
|
1411
1411
|
else if (!Array.isArray(e))
|
|
1412
1412
|
for (let t in e) {
|
|
1413
1413
|
const n = e[t];
|
|
1414
|
-
typeof n == "object" && n &&
|
|
1414
|
+
typeof n == "object" && n && Ze in n && Jt(n);
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function Jt(e, t = /* @__PURE__ */ new Set()) {
|
|
1419
1419
|
if (typeof e == "object" && e !== null && // We don't want to traverse DOM elements
|
|
1420
1420
|
!(e instanceof EventTarget) && !t.has(e)) {
|
|
1421
1421
|
t.add(e), e instanceof Date && e.getTime();
|
|
1422
1422
|
for (let r in e)
|
|
1423
1423
|
try {
|
|
1424
|
-
|
|
1424
|
+
Jt(e[r], t);
|
|
1425
1425
|
} catch {
|
|
1426
1426
|
}
|
|
1427
|
-
const n =
|
|
1427
|
+
const n = Tn(e);
|
|
1428
1428
|
if (n !== Object.prototype && n !== Array.prototype && n !== Map.prototype && n !== Set.prototype && n !== Date.prototype) {
|
|
1429
|
-
const r =
|
|
1429
|
+
const r = Ur(n);
|
|
1430
1430
|
for (let a in r) {
|
|
1431
1431
|
const i = r[a].get;
|
|
1432
1432
|
if (i)
|
|
@@ -1438,17 +1438,17 @@ function Xt(e, t = /* @__PURE__ */ new Set()) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1441
|
+
function Ii(e, t, n, r = {}) {
|
|
1442
1442
|
function a(i) {
|
|
1443
|
-
if (r.capture ||
|
|
1444
|
-
return
|
|
1443
|
+
if (r.capture || Ci.call(t, i), !i.cancelBubble)
|
|
1444
|
+
return Tt(() => n?.call(this, i));
|
|
1445
1445
|
}
|
|
1446
|
-
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ?
|
|
1446
|
+
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? jn(() => {
|
|
1447
1447
|
t.addEventListener(e, a, r);
|
|
1448
1448
|
}) : t.addEventListener(e, a, r), a;
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1451
|
-
var i = { capture: r, passive: a }, l =
|
|
1450
|
+
function fe(e, t, n, r, a) {
|
|
1451
|
+
var i = { capture: r, passive: a }, l = Ii(e, t, n, i);
|
|
1452
1452
|
(t === document.body || // @ts-ignore
|
|
1453
1453
|
t === window || // @ts-ignore
|
|
1454
1454
|
t === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
|
|
@@ -1456,8 +1456,8 @@ function se(e, t, n, r, a) {
|
|
|
1456
1456
|
t.removeEventListener(e, l, i);
|
|
1457
1457
|
});
|
|
1458
1458
|
}
|
|
1459
|
-
let
|
|
1460
|
-
function
|
|
1459
|
+
let Sn = null;
|
|
1460
|
+
function Ci(e) {
|
|
1461
1461
|
var t = this, n = (
|
|
1462
1462
|
/** @type {Node} */
|
|
1463
1463
|
t.ownerDocument
|
|
@@ -1465,8 +1465,8 @@ function Oi(e) {
|
|
|
1465
1465
|
/** @type {null | Element} */
|
|
1466
1466
|
a[0] || e.target
|
|
1467
1467
|
);
|
|
1468
|
-
|
|
1469
|
-
var l = 0, s =
|
|
1468
|
+
Sn = e;
|
|
1469
|
+
var l = 0, s = Sn === e && e.__root;
|
|
1470
1470
|
if (s) {
|
|
1471
1471
|
var u = a.indexOf(s);
|
|
1472
1472
|
if (u !== -1 && (t === document || t === /** @type {any} */
|
|
@@ -1481,99 +1481,88 @@ function Oi(e) {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
if (i = /** @type {Element} */
|
|
1483
1483
|
a[l] || e.target, i !== t) {
|
|
1484
|
-
|
|
1484
|
+
Mn(e, "currentTarget", {
|
|
1485
1485
|
configurable: !0,
|
|
1486
1486
|
get() {
|
|
1487
1487
|
return i || n;
|
|
1488
1488
|
}
|
|
1489
1489
|
});
|
|
1490
|
-
var c =
|
|
1491
|
-
|
|
1490
|
+
var c = P, d = I;
|
|
1491
|
+
pe(null), Ae(null);
|
|
1492
1492
|
try {
|
|
1493
1493
|
for (var p, h = []; i !== null; ) {
|
|
1494
1494
|
var v = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1495
1495
|
i.host || null;
|
|
1496
1496
|
try {
|
|
1497
|
-
var
|
|
1498
|
-
|
|
1497
|
+
var w = i["__" + r];
|
|
1498
|
+
w != null && (!/** @type {any} */
|
|
1499
1499
|
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1500
1500
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1501
|
-
e.target === i) &&
|
|
1502
|
-
} catch (
|
|
1503
|
-
p ? h.push(
|
|
1501
|
+
e.target === i) && w.call(i, e);
|
|
1502
|
+
} catch (b) {
|
|
1503
|
+
p ? h.push(b) : p = b;
|
|
1504
1504
|
}
|
|
1505
1505
|
if (e.cancelBubble || v === t || v === null)
|
|
1506
1506
|
break;
|
|
1507
1507
|
i = v;
|
|
1508
1508
|
}
|
|
1509
1509
|
if (p) {
|
|
1510
|
-
for (let
|
|
1510
|
+
for (let b of h)
|
|
1511
1511
|
queueMicrotask(() => {
|
|
1512
|
-
throw
|
|
1512
|
+
throw b;
|
|
1513
1513
|
});
|
|
1514
1514
|
throw p;
|
|
1515
1515
|
}
|
|
1516
1516
|
} finally {
|
|
1517
|
-
e.__root = t, delete e.currentTarget,
|
|
1517
|
+
e.__root = t, delete e.currentTarget, pe(c), Ae(d);
|
|
1518
1518
|
}
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
function
|
|
1521
|
+
function Ri(e) {
|
|
1522
1522
|
var t = document.createElement("template");
|
|
1523
1523
|
return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function hn(e, t) {
|
|
1526
1526
|
var n = (
|
|
1527
1527
|
/** @type {Effect} */
|
|
1528
|
-
|
|
1528
|
+
I
|
|
1529
1529
|
);
|
|
1530
1530
|
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1531
1531
|
}
|
|
1532
1532
|
// @__NO_SIDE_EFFECTS__
|
|
1533
|
-
function
|
|
1534
|
-
var n = (t &
|
|
1533
|
+
function z(e, t) {
|
|
1534
|
+
var n = (t & Fr) !== 0, r, a = !e.startsWith("<!>");
|
|
1535
1535
|
return () => {
|
|
1536
|
-
|
|
1537
|
-
/* @__PURE__ */
|
|
1538
|
-
var
|
|
1536
|
+
r === void 0 && (r = Ri(a ? e : "<!>" + e), r = /** @type {TemplateNode} */
|
|
1537
|
+
/* @__PURE__ */ un(r));
|
|
1538
|
+
var i = (
|
|
1539
1539
|
/** @type {TemplateNode} */
|
|
1540
|
-
|
|
1540
|
+
n || ui ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1541
1541
|
);
|
|
1542
|
-
|
|
1543
|
-
var s = (
|
|
1544
|
-
/** @type {TemplateNode} */
|
|
1545
|
-
/* @__PURE__ */ gt(l)
|
|
1546
|
-
), u = (
|
|
1547
|
-
/** @type {TemplateNode} */
|
|
1548
|
-
l.lastChild
|
|
1549
|
-
);
|
|
1550
|
-
It(s, u);
|
|
1551
|
-
} else
|
|
1552
|
-
It(l, l);
|
|
1553
|
-
return l;
|
|
1542
|
+
return hn(i, i), i;
|
|
1554
1543
|
};
|
|
1555
1544
|
}
|
|
1556
|
-
function
|
|
1545
|
+
function xi(e = "") {
|
|
1557
1546
|
{
|
|
1558
|
-
var t =
|
|
1559
|
-
return
|
|
1547
|
+
var t = Le(e + "");
|
|
1548
|
+
return hn(t, t), t;
|
|
1560
1549
|
}
|
|
1561
1550
|
}
|
|
1562
|
-
function
|
|
1563
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), n =
|
|
1564
|
-
return e.append(t, n),
|
|
1551
|
+
function ht() {
|
|
1552
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = Le();
|
|
1553
|
+
return e.append(t, n), hn(t, n), e;
|
|
1565
1554
|
}
|
|
1566
|
-
function
|
|
1555
|
+
function D(e, t) {
|
|
1567
1556
|
e !== null && e.before(
|
|
1568
1557
|
/** @type {Node} */
|
|
1569
1558
|
t
|
|
1570
1559
|
);
|
|
1571
1560
|
}
|
|
1572
|
-
function
|
|
1561
|
+
function Fe(e, t) {
|
|
1573
1562
|
var n = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1574
1563
|
n !== (e.__t ??= e.nodeValue) && (e.__t = n, e.nodeValue = n + "");
|
|
1575
1564
|
}
|
|
1576
|
-
class
|
|
1565
|
+
class Mi {
|
|
1577
1566
|
/** @type {TemplateNode} */
|
|
1578
1567
|
anchor;
|
|
1579
1568
|
/** @type {Map<Batch, Key>} */
|
|
@@ -1619,7 +1608,7 @@ class Li {
|
|
|
1619
1608
|
#i = () => {
|
|
1620
1609
|
var t = (
|
|
1621
1610
|
/** @type {Batch} */
|
|
1622
|
-
|
|
1611
|
+
S
|
|
1623
1612
|
);
|
|
1624
1613
|
if (this.#t.has(t)) {
|
|
1625
1614
|
var n = (
|
|
@@ -1636,16 +1625,16 @@ class Li {
|
|
|
1636
1625
|
if (this.#t.delete(i), i === t)
|
|
1637
1626
|
break;
|
|
1638
1627
|
const s = this.#e.get(l);
|
|
1639
|
-
s && (
|
|
1628
|
+
s && (we(s.effect), this.#e.delete(l));
|
|
1640
1629
|
}
|
|
1641
1630
|
for (const [i, l] of this.#n) {
|
|
1642
1631
|
if (i === n || this.#r.has(i)) continue;
|
|
1643
1632
|
const s = () => {
|
|
1644
1633
|
if (Array.from(this.#t.values()).includes(i)) {
|
|
1645
1634
|
var o = document.createDocumentFragment();
|
|
1646
|
-
|
|
1635
|
+
wi(l, o), o.append(Le()), this.#e.set(i, { effect: l, fragment: o });
|
|
1647
1636
|
} else
|
|
1648
|
-
|
|
1637
|
+
we(l);
|
|
1649
1638
|
this.#r.delete(i), this.#n.delete(i);
|
|
1650
1639
|
};
|
|
1651
1640
|
this.#a || !r ? (this.#r.add(i), vn(l, s, !1)) : s();
|
|
@@ -1659,7 +1648,7 @@ class Li {
|
|
|
1659
1648
|
this.#t.delete(t);
|
|
1660
1649
|
const n = Array.from(this.#t.values());
|
|
1661
1650
|
for (const [r, a] of this.#e)
|
|
1662
|
-
n.includes(r) || (
|
|
1651
|
+
n.includes(r) || (we(a.effect), this.#e.delete(r));
|
|
1663
1652
|
};
|
|
1664
1653
|
/**
|
|
1665
1654
|
*
|
|
@@ -1669,19 +1658,19 @@ class Li {
|
|
|
1669
1658
|
ensure(t, n) {
|
|
1670
1659
|
var r = (
|
|
1671
1660
|
/** @type {Batch} */
|
|
1672
|
-
|
|
1673
|
-
), a =
|
|
1661
|
+
S
|
|
1662
|
+
), a = Wn();
|
|
1674
1663
|
if (n && !this.#n.has(t) && !this.#e.has(t))
|
|
1675
1664
|
if (a) {
|
|
1676
|
-
var i = document.createDocumentFragment(), l =
|
|
1665
|
+
var i = document.createDocumentFragment(), l = Le();
|
|
1677
1666
|
i.append(l), this.#e.set(t, {
|
|
1678
|
-
effect:
|
|
1667
|
+
effect: ot(() => n(l)),
|
|
1679
1668
|
fragment: i
|
|
1680
1669
|
});
|
|
1681
1670
|
} else
|
|
1682
1671
|
this.#n.set(
|
|
1683
1672
|
t,
|
|
1684
|
-
|
|
1673
|
+
ot(() => n(this.anchor))
|
|
1685
1674
|
);
|
|
1686
1675
|
if (this.#t.set(r, t), a) {
|
|
1687
1676
|
for (const [s, u] of this.#n)
|
|
@@ -1693,19 +1682,19 @@ class Li {
|
|
|
1693
1682
|
this.#i();
|
|
1694
1683
|
}
|
|
1695
1684
|
}
|
|
1696
|
-
function
|
|
1697
|
-
var r = new
|
|
1685
|
+
function ne(e, t, n = !1) {
|
|
1686
|
+
var r = new Mi(e), a = n ? rt : 0;
|
|
1698
1687
|
function i(l, s) {
|
|
1699
1688
|
r.ensure(l, s);
|
|
1700
1689
|
}
|
|
1701
|
-
|
|
1690
|
+
Jn(() => {
|
|
1702
1691
|
var l = !1;
|
|
1703
1692
|
t((s, u = !0) => {
|
|
1704
1693
|
l = !0, i(u, s);
|
|
1705
1694
|
}), l || i(!1, null);
|
|
1706
1695
|
}, a);
|
|
1707
1696
|
}
|
|
1708
|
-
function
|
|
1697
|
+
function Ti(e, t, n) {
|
|
1709
1698
|
for (var r = [], a = t.length, i, l = t.length, s = 0; s < a; s++) {
|
|
1710
1699
|
let d = t[s];
|
|
1711
1700
|
vn(
|
|
@@ -1717,7 +1706,7 @@ function Ui(e, t, n) {
|
|
|
1717
1706
|
/** @type {Set<EachOutroGroup>} */
|
|
1718
1707
|
e.outrogroups
|
|
1719
1708
|
);
|
|
1720
|
-
|
|
1709
|
+
Qt(en(i.done)), p.delete(i), p.size === 0 && (e.outrogroups = null);
|
|
1721
1710
|
}
|
|
1722
1711
|
} else
|
|
1723
1712
|
l -= 1;
|
|
@@ -1735,97 +1724,97 @@ function Ui(e, t, n) {
|
|
|
1735
1724
|
/** @type {Element} */
|
|
1736
1725
|
o.parentNode
|
|
1737
1726
|
);
|
|
1738
|
-
|
|
1727
|
+
di(c), c.append(o), e.items.clear();
|
|
1739
1728
|
}
|
|
1740
|
-
|
|
1729
|
+
Qt(t, !u);
|
|
1741
1730
|
} else
|
|
1742
1731
|
i = {
|
|
1743
1732
|
pending: new Set(t),
|
|
1744
1733
|
done: /* @__PURE__ */ new Set()
|
|
1745
1734
|
}, (e.outrogroups ??= /* @__PURE__ */ new Set()).add(i);
|
|
1746
1735
|
}
|
|
1747
|
-
function
|
|
1736
|
+
function Qt(e, t = !0) {
|
|
1748
1737
|
for (var n = 0; n < e.length; n++)
|
|
1749
|
-
|
|
1738
|
+
we(e[n], t);
|
|
1750
1739
|
}
|
|
1751
|
-
var
|
|
1752
|
-
function
|
|
1740
|
+
var kn;
|
|
1741
|
+
function lr(e, t, n, r, a, i = null) {
|
|
1753
1742
|
var l = e, s = /* @__PURE__ */ new Map();
|
|
1754
1743
|
{
|
|
1755
1744
|
var u = (
|
|
1756
1745
|
/** @type {Element} */
|
|
1757
1746
|
e
|
|
1758
1747
|
);
|
|
1759
|
-
l = u.appendChild(
|
|
1748
|
+
l = u.appendChild(Le());
|
|
1760
1749
|
}
|
|
1761
|
-
var o = null, c = /* @__PURE__ */
|
|
1762
|
-
var
|
|
1763
|
-
return
|
|
1750
|
+
var o = null, c = /* @__PURE__ */ on(() => {
|
|
1751
|
+
var b = n();
|
|
1752
|
+
return xn(b) ? b : b == null ? [] : en(b);
|
|
1764
1753
|
}), d, p = !0;
|
|
1765
1754
|
function h() {
|
|
1766
|
-
|
|
1755
|
+
w.fallback = o, Ai(w, d, l, t, r), o !== null && (d.length === 0 ? (o.f & xe) === 0 ? pn(o) : (o.f ^= xe, tt(o, null, l)) : vn(o, () => {
|
|
1767
1756
|
o = null;
|
|
1768
1757
|
}));
|
|
1769
1758
|
}
|
|
1770
|
-
var v =
|
|
1759
|
+
var v = Jn(() => {
|
|
1771
1760
|
d = /** @type {V[]} */
|
|
1772
1761
|
f(c);
|
|
1773
|
-
for (var
|
|
1762
|
+
for (var b = d.length, y = /* @__PURE__ */ new Set(), _ = (
|
|
1774
1763
|
/** @type {Batch} */
|
|
1775
|
-
|
|
1776
|
-
),
|
|
1777
|
-
var m = d[
|
|
1778
|
-
|
|
1764
|
+
S
|
|
1765
|
+
), E = Wn(), C = 0; C < b; C += 1) {
|
|
1766
|
+
var m = d[C], k = r(m, C), R = p ? null : s.get(k);
|
|
1767
|
+
R ? (R.v && st(R.v, m), R.i && st(R.i, C), E && _.skipped_effects.delete(R.e)) : (R = Oi(
|
|
1779
1768
|
s,
|
|
1780
|
-
p ? l :
|
|
1769
|
+
p ? l : kn ??= Le(),
|
|
1781
1770
|
m,
|
|
1782
|
-
|
|
1783
|
-
|
|
1771
|
+
k,
|
|
1772
|
+
C,
|
|
1784
1773
|
a,
|
|
1785
1774
|
t,
|
|
1786
1775
|
n
|
|
1787
|
-
), p || (
|
|
1776
|
+
), p || (R.e.f |= xe), s.set(k, R)), y.add(k);
|
|
1788
1777
|
}
|
|
1789
|
-
if (
|
|
1790
|
-
if (
|
|
1791
|
-
for (const [
|
|
1792
|
-
|
|
1778
|
+
if (b === 0 && i && !o && (p ? o = ot(() => i(l)) : (o = ot(() => i(kn ??= Le())), o.f |= xe)), !p)
|
|
1779
|
+
if (E) {
|
|
1780
|
+
for (const [g, he] of s)
|
|
1781
|
+
y.has(g) || _.skipped_effects.add(he.e);
|
|
1793
1782
|
_.oncommit(h), _.ondiscard(() => {
|
|
1794
1783
|
});
|
|
1795
1784
|
} else
|
|
1796
1785
|
h();
|
|
1797
1786
|
f(c);
|
|
1798
|
-
}),
|
|
1787
|
+
}), w = { effect: v, items: s, outrogroups: null, fallback: o };
|
|
1799
1788
|
p = !1;
|
|
1800
1789
|
}
|
|
1801
|
-
function
|
|
1802
|
-
var i = t.length, l = e.items, s = e.effect.first, u, o = null, c = [], d = [], p, h, v,
|
|
1803
|
-
for (
|
|
1804
|
-
if (p = t[
|
|
1790
|
+
function Ai(e, t, n, r, a) {
|
|
1791
|
+
var i = t.length, l = e.items, s = e.effect.first, u, o = null, c = [], d = [], p, h, v, w;
|
|
1792
|
+
for (w = 0; w < i; w += 1) {
|
|
1793
|
+
if (p = t[w], h = a(p, w), v = /** @type {EachItem} */
|
|
1805
1794
|
l.get(h).e, e.outrogroups !== null)
|
|
1806
|
-
for (const
|
|
1807
|
-
|
|
1808
|
-
if ((v.f &
|
|
1809
|
-
if (v.f ^=
|
|
1810
|
-
|
|
1795
|
+
for (const g of e.outrogroups)
|
|
1796
|
+
g.pending.delete(v), g.done.delete(v);
|
|
1797
|
+
if ((v.f & xe) !== 0)
|
|
1798
|
+
if (v.f ^= xe, v === s)
|
|
1799
|
+
tt(v, null, n);
|
|
1811
1800
|
else {
|
|
1812
|
-
var
|
|
1813
|
-
v === e.effect.last && (e.effect.last = v.prev), v.prev && (v.prev.next = v.next), v.next && (v.next.prev = v.prev),
|
|
1801
|
+
var b = o ? o.next : s;
|
|
1802
|
+
v === e.effect.last && (e.effect.last = v.prev), v.prev && (v.prev.next = v.next), v.next && (v.next.prev = v.prev), Ce(e, o, v), Ce(e, v, b), tt(v, b, n), o = v, c = [], d = [], s = o.next;
|
|
1814
1803
|
continue;
|
|
1815
1804
|
}
|
|
1816
|
-
if ((v.f &
|
|
1805
|
+
if ((v.f & X) !== 0 && pn(v), v !== s) {
|
|
1817
1806
|
if (u !== void 0 && u.has(v)) {
|
|
1818
1807
|
if (c.length < d.length) {
|
|
1819
|
-
var
|
|
1820
|
-
o =
|
|
1821
|
-
var
|
|
1808
|
+
var y = d[0], _;
|
|
1809
|
+
o = y.prev;
|
|
1810
|
+
var E = c[0], C = c[c.length - 1];
|
|
1822
1811
|
for (_ = 0; _ < c.length; _ += 1)
|
|
1823
|
-
|
|
1812
|
+
tt(c[_], y, n);
|
|
1824
1813
|
for (_ = 0; _ < d.length; _ += 1)
|
|
1825
1814
|
u.delete(d[_]);
|
|
1826
|
-
|
|
1815
|
+
Ce(e, E.prev, C.next), Ce(e, o, E), Ce(e, C, y), s = y, o = C, w -= 1, c = [], d = [];
|
|
1827
1816
|
} else
|
|
1828
|
-
u.delete(v),
|
|
1817
|
+
u.delete(v), tt(v, s, n), Ce(e, v.prev, v.next), Ce(e, v, o === null ? e.effect.first : o.next), Ce(e, o, v), o = v;
|
|
1829
1818
|
continue;
|
|
1830
1819
|
}
|
|
1831
1820
|
for (c = [], d = []; s !== null && s !== v; )
|
|
@@ -1833,103 +1822,103 @@ function ji(e, t, n, r, a) {
|
|
|
1833
1822
|
if (s === null)
|
|
1834
1823
|
continue;
|
|
1835
1824
|
}
|
|
1836
|
-
(v.f &
|
|
1825
|
+
(v.f & xe) === 0 && c.push(v), o = v, s = v.next;
|
|
1837
1826
|
}
|
|
1838
1827
|
if (e.outrogroups !== null) {
|
|
1839
|
-
for (const
|
|
1840
|
-
|
|
1828
|
+
for (const g of e.outrogroups)
|
|
1829
|
+
g.pending.size === 0 && (Qt(en(g.done)), e.outrogroups?.delete(g));
|
|
1841
1830
|
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
1842
1831
|
}
|
|
1843
1832
|
if (s !== null || u !== void 0) {
|
|
1844
1833
|
var m = [];
|
|
1845
1834
|
if (u !== void 0)
|
|
1846
1835
|
for (v of u)
|
|
1847
|
-
(v.f &
|
|
1836
|
+
(v.f & X) === 0 && m.push(v);
|
|
1848
1837
|
for (; s !== null; )
|
|
1849
|
-
(s.f &
|
|
1850
|
-
var
|
|
1851
|
-
if (
|
|
1852
|
-
var
|
|
1853
|
-
|
|
1838
|
+
(s.f & X) === 0 && s !== e.fallback && m.push(s), s = s.next;
|
|
1839
|
+
var k = m.length;
|
|
1840
|
+
if (k > 0) {
|
|
1841
|
+
var R = i === 0 ? n : null;
|
|
1842
|
+
Ti(e, m, R);
|
|
1854
1843
|
}
|
|
1855
1844
|
}
|
|
1856
1845
|
}
|
|
1857
|
-
function
|
|
1858
|
-
var u = (l &
|
|
1846
|
+
function Oi(e, t, n, r, a, i, l, s) {
|
|
1847
|
+
var u = (l & Rr) !== 0 ? (l & Mr) === 0 ? /* @__PURE__ */ ie(n, !1, !1) : at(n) : null, o = (l & xr) !== 0 ? at(a) : null;
|
|
1859
1848
|
return {
|
|
1860
1849
|
v: u,
|
|
1861
1850
|
i: o,
|
|
1862
|
-
e:
|
|
1851
|
+
e: ot(() => (i(t, u ?? n, o ?? a, s), () => {
|
|
1863
1852
|
e.delete(r);
|
|
1864
1853
|
}))
|
|
1865
1854
|
};
|
|
1866
1855
|
}
|
|
1867
|
-
function
|
|
1856
|
+
function tt(e, t, n) {
|
|
1868
1857
|
if (e.nodes)
|
|
1869
|
-
for (var r = e.nodes.start, a = e.nodes.end, i = t && (t.f &
|
|
1858
|
+
for (var r = e.nodes.start, a = e.nodes.end, i = t && (t.f & xe) === 0 ? (
|
|
1870
1859
|
/** @type {EffectNodes} */
|
|
1871
1860
|
t.nodes.start
|
|
1872
1861
|
) : n; r !== null; ) {
|
|
1873
1862
|
var l = (
|
|
1874
1863
|
/** @type {TemplateNode} */
|
|
1875
|
-
/* @__PURE__ */
|
|
1864
|
+
/* @__PURE__ */ ft(r)
|
|
1876
1865
|
);
|
|
1877
1866
|
if (i.before(r), r === a)
|
|
1878
1867
|
return;
|
|
1879
1868
|
r = l;
|
|
1880
1869
|
}
|
|
1881
1870
|
}
|
|
1882
|
-
function
|
|
1871
|
+
function Ce(e, t, n) {
|
|
1883
1872
|
t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
|
|
1884
1873
|
}
|
|
1885
|
-
function
|
|
1874
|
+
function In(e, t, n, r, a) {
|
|
1886
1875
|
var i = t.$$slots?.[n], l = !1;
|
|
1887
1876
|
i === !0 && (i = t[n === "default" ? "children" : n], l = !0), i === void 0 ? a !== null && a(e) : i(e, l ? () => r : r);
|
|
1888
1877
|
}
|
|
1889
|
-
function
|
|
1878
|
+
function ur(e) {
|
|
1890
1879
|
var t, n, r = "";
|
|
1891
1880
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
1892
1881
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1893
1882
|
var a = e.length;
|
|
1894
|
-
for (t = 0; t < a; t++) e[t] && (n =
|
|
1883
|
+
for (t = 0; t < a; t++) e[t] && (n = ur(e[t])) && (r && (r += " "), r += n);
|
|
1895
1884
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
1896
1885
|
return r;
|
|
1897
1886
|
}
|
|
1898
|
-
function
|
|
1899
|
-
for (var e, t, n = 0, r = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t =
|
|
1887
|
+
function Ni() {
|
|
1888
|
+
for (var e, t, n = 0, r = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = ur(e)) && (r && (r += " "), r += t);
|
|
1900
1889
|
return r;
|
|
1901
1890
|
}
|
|
1902
1891
|
function kt(e) {
|
|
1903
|
-
return typeof e == "object" ?
|
|
1892
|
+
return typeof e == "object" ? Ni(e) : e ?? "";
|
|
1904
1893
|
}
|
|
1905
|
-
function
|
|
1894
|
+
function Di(e, t, n) {
|
|
1906
1895
|
var r = e == null ? "" : "" + e;
|
|
1907
1896
|
return r === "" ? null : r;
|
|
1908
1897
|
}
|
|
1909
|
-
function
|
|
1898
|
+
function Fi(e, t) {
|
|
1910
1899
|
return e == null ? null : String(e);
|
|
1911
1900
|
}
|
|
1912
|
-
function
|
|
1901
|
+
function It(e, t, n, r, a, i) {
|
|
1913
1902
|
var l = e.__className;
|
|
1914
1903
|
if (l !== n || l === void 0) {
|
|
1915
|
-
var s =
|
|
1904
|
+
var s = Di(n);
|
|
1916
1905
|
s == null ? e.removeAttribute("class") : e.className = s, e.__className = n;
|
|
1917
1906
|
}
|
|
1918
1907
|
return i;
|
|
1919
1908
|
}
|
|
1920
|
-
function
|
|
1909
|
+
function cr(e, t, n, r) {
|
|
1921
1910
|
var a = e.__style;
|
|
1922
1911
|
if (a !== t) {
|
|
1923
|
-
var i =
|
|
1912
|
+
var i = Fi(t);
|
|
1924
1913
|
i == null ? e.removeAttribute("style") : e.style.cssText = i, e.__style = t;
|
|
1925
1914
|
}
|
|
1926
1915
|
return r;
|
|
1927
1916
|
}
|
|
1928
|
-
function
|
|
1917
|
+
function Li(e, t, n = t) {
|
|
1929
1918
|
var r = /* @__PURE__ */ new WeakSet();
|
|
1930
|
-
|
|
1919
|
+
pi(e, "input", async (a) => {
|
|
1931
1920
|
var i = a ? e.defaultValue : e.value;
|
|
1932
|
-
if (i =
|
|
1921
|
+
if (i = qt(e) ? Kt(i) : i, n(i), S !== null && r.add(S), await Si(), i !== (i = t())) {
|
|
1933
1922
|
var l = e.selectionStart, s = e.selectionEnd, u = e.value.length;
|
|
1934
1923
|
if (e.value = i ?? "", s !== null) {
|
|
1935
1924
|
var o = e.value.length;
|
|
@@ -1940,36 +1929,27 @@ function Vi(e, t, n = t) {
|
|
|
1940
1929
|
// then use the updated value from the input instead.
|
|
1941
1930
|
// If defaultValue is set, then value == defaultValue
|
|
1942
1931
|
// TODO Svelte 6: remove input.value check and set to empty string?
|
|
1943
|
-
|
|
1932
|
+
A(t) == null && e.value && (n(qt(e) ? Kt(e.value) : e.value), S !== null && r.add(S)), dn(() => {
|
|
1944
1933
|
var a = t();
|
|
1945
1934
|
if (e === document.activeElement) {
|
|
1946
1935
|
var i = (
|
|
1947
1936
|
/** @type {Batch} */
|
|
1948
|
-
|
|
1937
|
+
yt ?? S
|
|
1949
1938
|
);
|
|
1950
1939
|
if (r.has(i))
|
|
1951
1940
|
return;
|
|
1952
1941
|
}
|
|
1953
|
-
|
|
1942
|
+
qt(e) && a === Kt(e.value) || e.type === "date" && !a && !e.value || a !== e.value && (e.value = a ?? "");
|
|
1954
1943
|
});
|
|
1955
1944
|
}
|
|
1956
|
-
function
|
|
1945
|
+
function qt(e) {
|
|
1957
1946
|
var t = e.type;
|
|
1958
1947
|
return t === "number" || t === "range";
|
|
1959
1948
|
}
|
|
1960
|
-
function
|
|
1949
|
+
function Kt(e) {
|
|
1961
1950
|
return e === "" ? null : +e;
|
|
1962
1951
|
}
|
|
1963
|
-
function
|
|
1964
|
-
return function(...t) {
|
|
1965
|
-
var n = (
|
|
1966
|
-
/** @type {Event} */
|
|
1967
|
-
t[0]
|
|
1968
|
-
);
|
|
1969
|
-
n.target === this && e?.apply(this, t);
|
|
1970
|
-
};
|
|
1971
|
-
}
|
|
1972
|
-
function Yi(e) {
|
|
1952
|
+
function Ui(e) {
|
|
1973
1953
|
return function(...t) {
|
|
1974
1954
|
var n = (
|
|
1975
1955
|
/** @type {Event} */
|
|
@@ -1978,19 +1958,19 @@ function Yi(e) {
|
|
|
1978
1958
|
return n.preventDefault(), e?.apply(this, t);
|
|
1979
1959
|
};
|
|
1980
1960
|
}
|
|
1981
|
-
function
|
|
1961
|
+
function mn(e = !1) {
|
|
1982
1962
|
const t = (
|
|
1983
1963
|
/** @type {ComponentContextLegacy} */
|
|
1984
|
-
|
|
1964
|
+
q
|
|
1985
1965
|
), n = t.l.u;
|
|
1986
1966
|
if (!n) return;
|
|
1987
|
-
let r = () =>
|
|
1967
|
+
let r = () => W(t.s);
|
|
1988
1968
|
if (e) {
|
|
1989
1969
|
let a = 0, i = (
|
|
1990
1970
|
/** @type {Record<string, any>} */
|
|
1991
1971
|
{}
|
|
1992
1972
|
);
|
|
1993
|
-
const l = /* @__PURE__ */
|
|
1973
|
+
const l = /* @__PURE__ */ Mt(() => {
|
|
1994
1974
|
let s = !1;
|
|
1995
1975
|
const u = t.s;
|
|
1996
1976
|
for (const o in u)
|
|
@@ -1999,27 +1979,27 @@ function hn(e = !1) {
|
|
|
1999
1979
|
});
|
|
2000
1980
|
r = () => f(l);
|
|
2001
1981
|
}
|
|
2002
|
-
n.b.length &&
|
|
2003
|
-
|
|
2004
|
-
}),
|
|
2005
|
-
const a =
|
|
1982
|
+
n.b.length && mi(() => {
|
|
1983
|
+
Cn(t, r), Yt(n.b);
|
|
1984
|
+
}), gn(() => {
|
|
1985
|
+
const a = A(() => n.m.map(Hr));
|
|
2006
1986
|
return () => {
|
|
2007
1987
|
for (const i of a)
|
|
2008
1988
|
typeof i == "function" && i();
|
|
2009
1989
|
};
|
|
2010
|
-
}), n.a.length &&
|
|
2011
|
-
|
|
1990
|
+
}), n.a.length && gn(() => {
|
|
1991
|
+
Cn(t, r), Yt(n.a);
|
|
2012
1992
|
});
|
|
2013
1993
|
}
|
|
2014
|
-
function
|
|
1994
|
+
function Cn(e, t) {
|
|
2015
1995
|
if (e.l.s)
|
|
2016
1996
|
for (const n of e.l.s) f(n);
|
|
2017
1997
|
t();
|
|
2018
1998
|
}
|
|
2019
|
-
function
|
|
1999
|
+
function fr(e, t, n) {
|
|
2020
2000
|
if (e == null)
|
|
2021
|
-
return t(void 0),
|
|
2022
|
-
const r =
|
|
2001
|
+
return t(void 0), Bt;
|
|
2002
|
+
const r = A(
|
|
2023
2003
|
() => e.subscribe(
|
|
2024
2004
|
t,
|
|
2025
2005
|
// @ts-expect-error
|
|
@@ -2028,35 +2008,35 @@ function vr(e, t, n) {
|
|
|
2028
2008
|
);
|
|
2029
2009
|
return r.unsubscribe ? () => r.unsubscribe() : r;
|
|
2030
2010
|
}
|
|
2031
|
-
function
|
|
2011
|
+
function ji(e) {
|
|
2032
2012
|
let t;
|
|
2033
|
-
return
|
|
2013
|
+
return fr(e, (n) => t = n)(), t;
|
|
2034
2014
|
}
|
|
2035
|
-
let
|
|
2036
|
-
function
|
|
2015
|
+
let mt = !1, Xt = /* @__PURE__ */ Symbol();
|
|
2016
|
+
function zi(e, t, n) {
|
|
2037
2017
|
const r = n[t] ??= {
|
|
2038
2018
|
store: null,
|
|
2039
|
-
source: /* @__PURE__ */
|
|
2040
|
-
unsubscribe:
|
|
2019
|
+
source: /* @__PURE__ */ ie(void 0),
|
|
2020
|
+
unsubscribe: Bt
|
|
2041
2021
|
};
|
|
2042
|
-
if (r.store !== e && !(
|
|
2022
|
+
if (r.store !== e && !(Xt in n))
|
|
2043
2023
|
if (r.unsubscribe(), r.store = e ?? null, e == null)
|
|
2044
|
-
r.source.v = void 0, r.unsubscribe =
|
|
2024
|
+
r.source.v = void 0, r.unsubscribe = Bt;
|
|
2045
2025
|
else {
|
|
2046
2026
|
var a = !0;
|
|
2047
|
-
r.unsubscribe =
|
|
2027
|
+
r.unsubscribe = fr(e, (i) => {
|
|
2048
2028
|
a ? r.source.v = i : L(r.source, i);
|
|
2049
2029
|
}), a = !1;
|
|
2050
2030
|
}
|
|
2051
|
-
return e &&
|
|
2031
|
+
return e && Xt in n ? ji(e) : f(r.source);
|
|
2052
2032
|
}
|
|
2053
|
-
function
|
|
2033
|
+
function Hi() {
|
|
2054
2034
|
const e = {};
|
|
2055
2035
|
function t() {
|
|
2056
2036
|
cn(() => {
|
|
2057
2037
|
for (var n in e)
|
|
2058
2038
|
e[n].unsubscribe();
|
|
2059
|
-
|
|
2039
|
+
Mn(e, Xt, {
|
|
2060
2040
|
enumerable: !1,
|
|
2061
2041
|
value: !0
|
|
2062
2042
|
});
|
|
@@ -2064,19 +2044,19 @@ function Zi() {
|
|
|
2064
2044
|
}
|
|
2065
2045
|
return [e, t];
|
|
2066
2046
|
}
|
|
2067
|
-
function
|
|
2068
|
-
var t =
|
|
2047
|
+
function qi(e) {
|
|
2048
|
+
var t = mt;
|
|
2069
2049
|
try {
|
|
2070
|
-
return
|
|
2050
|
+
return mt = !1, [e(), mt];
|
|
2071
2051
|
} finally {
|
|
2072
|
-
|
|
2052
|
+
mt = t;
|
|
2073
2053
|
}
|
|
2074
2054
|
}
|
|
2075
|
-
function
|
|
2076
|
-
var a = !
|
|
2055
|
+
function U(e, t, n, r) {
|
|
2056
|
+
var a = !ut || (n & Ar) !== 0, i = (n & Nr) !== 0, l = (n & Dr) !== 0, s = (
|
|
2077
2057
|
/** @type {V} */
|
|
2078
2058
|
r
|
|
2079
|
-
), u = !0, o = () => (u && (u = !1, s = l ?
|
|
2059
|
+
), u = !0, o = () => (u && (u = !1, s = l ? A(
|
|
2080
2060
|
/** @type {() => V} */
|
|
2081
2061
|
r
|
|
2082
2062
|
) : (
|
|
@@ -2084,62 +2064,62 @@ function D(e, t, n, r) {
|
|
|
2084
2064
|
r
|
|
2085
2065
|
)), s), c;
|
|
2086
2066
|
if (i) {
|
|
2087
|
-
var d =
|
|
2088
|
-
c =
|
|
2067
|
+
var d = Ze in e || Kr in e;
|
|
2068
|
+
c = _t(e, t)?.set ?? (d && t in e ? (E) => e[t] = E : void 0);
|
|
2089
2069
|
}
|
|
2090
2070
|
var p, h = !1;
|
|
2091
|
-
i ? [p, h] =
|
|
2071
|
+
i ? [p, h] = qi(() => (
|
|
2092
2072
|
/** @type {V} */
|
|
2093
2073
|
e[t]
|
|
2094
2074
|
)) : p = /** @type {V} */
|
|
2095
|
-
e[t], p === void 0 && r !== void 0 && (p = o(), c && (a &&
|
|
2075
|
+
e[t], p === void 0 && r !== void 0 && (p = o(), c && (a && Zr(), c(p)));
|
|
2096
2076
|
var v;
|
|
2097
2077
|
if (a ? v = () => {
|
|
2098
|
-
var
|
|
2078
|
+
var E = (
|
|
2099
2079
|
/** @type {V} */
|
|
2100
2080
|
e[t]
|
|
2101
2081
|
);
|
|
2102
|
-
return
|
|
2082
|
+
return E === void 0 ? o() : (u = !0, E);
|
|
2103
2083
|
} : v = () => {
|
|
2104
|
-
var
|
|
2084
|
+
var E = (
|
|
2105
2085
|
/** @type {V} */
|
|
2106
2086
|
e[t]
|
|
2107
2087
|
);
|
|
2108
|
-
return
|
|
2109
|
-
void 0),
|
|
2110
|
-
}, a && (n &
|
|
2088
|
+
return E !== void 0 && (s = /** @type {V} */
|
|
2089
|
+
void 0), E === void 0 ? s : E;
|
|
2090
|
+
}, a && (n & Or) === 0)
|
|
2111
2091
|
return v;
|
|
2112
2092
|
if (c) {
|
|
2113
|
-
var
|
|
2093
|
+
var w = e.$$legacy;
|
|
2114
2094
|
return (
|
|
2115
2095
|
/** @type {() => V} */
|
|
2116
|
-
(function(
|
|
2117
|
-
return arguments.length > 0 ? ((!a || !
|
|
2096
|
+
(function(E, C) {
|
|
2097
|
+
return arguments.length > 0 ? ((!a || !C || w || h) && c(C ? v() : E), E) : v();
|
|
2118
2098
|
})
|
|
2119
2099
|
);
|
|
2120
2100
|
}
|
|
2121
|
-
var
|
|
2122
|
-
i && f(
|
|
2101
|
+
var b = !1, y = ((n & Tr) !== 0 ? Mt : on)(() => (b = !1, v()));
|
|
2102
|
+
i && f(y);
|
|
2123
2103
|
var _ = (
|
|
2124
2104
|
/** @type {Effect} */
|
|
2125
|
-
|
|
2105
|
+
I
|
|
2126
2106
|
);
|
|
2127
2107
|
return (
|
|
2128
2108
|
/** @type {() => V} */
|
|
2129
|
-
(function(
|
|
2109
|
+
(function(E, C) {
|
|
2130
2110
|
if (arguments.length > 0) {
|
|
2131
|
-
const m =
|
|
2132
|
-
return L(
|
|
2111
|
+
const m = C ? f(y) : a && i ? Ge(E) : E;
|
|
2112
|
+
return L(y, m), b = !0, s !== void 0 && (s = m), E;
|
|
2133
2113
|
}
|
|
2134
|
-
return
|
|
2114
|
+
return qe && b || (_.f & be) !== 0 ? y.v : f(y);
|
|
2135
2115
|
})
|
|
2136
2116
|
);
|
|
2137
2117
|
}
|
|
2138
|
-
function
|
|
2118
|
+
function Ki(e) {
|
|
2139
2119
|
const t = e.toLowerCase();
|
|
2140
2120
|
return t.includes("paystack") ? "paystack" : t.includes("hubtel") ? "hubtel" : t.includes("flutterwave") ? "flutterwave" : t.includes("stripe") ? "stripe" : t.includes("monnify") ? "monnify" : t.includes("mpesa") || t.includes("m-pesa") ? "mpesa" : "paystack";
|
|
2141
2121
|
}
|
|
2142
|
-
function
|
|
2122
|
+
function Vi(e, t) {
|
|
2143
2123
|
return {
|
|
2144
2124
|
id: e.id,
|
|
2145
2125
|
clientSecret: e.client_secret,
|
|
@@ -2148,7 +2128,7 @@ function Xi(e, t) {
|
|
|
2148
2128
|
amount: e.amount,
|
|
2149
2129
|
currency: e.currency,
|
|
2150
2130
|
status: e.status,
|
|
2151
|
-
recommendedPsp:
|
|
2131
|
+
recommendedPsp: Ki(e.provider),
|
|
2152
2132
|
availableMethods: t.paymentMethods || ["card", "mobile_money"],
|
|
2153
2133
|
reference: e.reference || t.reference,
|
|
2154
2134
|
connectionId: e.connection_id,
|
|
@@ -2159,100 +2139,100 @@ function Xi(e, t) {
|
|
|
2159
2139
|
metadata: t.metadata
|
|
2160
2140
|
};
|
|
2161
2141
|
}
|
|
2162
|
-
function
|
|
2142
|
+
function Bi(e) {
|
|
2163
2143
|
const { config: t, onSuccess: n, onError: r, onClose: a, onStateChange: i, apiBaseUrl: l } = e;
|
|
2164
|
-
let s =
|
|
2144
|
+
let s = yr();
|
|
2165
2145
|
t.initialPaymentIntent && (s = {
|
|
2166
2146
|
...s,
|
|
2167
2147
|
status: "ready",
|
|
2168
2148
|
paymentIntent: t.initialPaymentIntent,
|
|
2169
2149
|
selectedMethod: t.initialPaymentIntent.availableMethods?.length === 1 ? t.initialPaymentIntent.availableMethods[0] : null
|
|
2170
2150
|
});
|
|
2171
|
-
const u = /* @__PURE__ */ new Set(), o = new
|
|
2151
|
+
const u = /* @__PURE__ */ new Set(), o = new br({
|
|
2172
2152
|
publicKey: t.publicKey,
|
|
2173
2153
|
baseUrl: l
|
|
2174
2154
|
}), c = () => {
|
|
2175
|
-
u.forEach((
|
|
2176
|
-
}, d = (
|
|
2177
|
-
const
|
|
2178
|
-
s =
|
|
2179
|
-
}, p = (
|
|
2155
|
+
u.forEach((x) => x(s));
|
|
2156
|
+
}, d = (x) => {
|
|
2157
|
+
const O = s.status;
|
|
2158
|
+
s = Er(s, x), c(), s.status !== O && i?.(s.status);
|
|
2159
|
+
}, p = (x) => (u.add(x), x(s), () => u.delete(x)), h = async (x) => {
|
|
2180
2160
|
d({ type: "INIT_START" });
|
|
2181
2161
|
try {
|
|
2182
|
-
const
|
|
2183
|
-
{ ...t, reference:
|
|
2184
|
-
|
|
2185
|
-
|
|
2162
|
+
const O = t.reference || wr(), Z = gr(t.currency), N = x || t.paymentMethods?.[0] || "card", { data: M, error: F } = await o.createPaymentIntent(
|
|
2163
|
+
{ ...t, reference: O },
|
|
2164
|
+
N,
|
|
2165
|
+
Z
|
|
2186
2166
|
);
|
|
2187
|
-
if (
|
|
2188
|
-
d({ type: "INIT_ERROR", payload:
|
|
2167
|
+
if (F) {
|
|
2168
|
+
d({ type: "INIT_ERROR", payload: F }), r?.(F);
|
|
2189
2169
|
return;
|
|
2190
2170
|
}
|
|
2191
|
-
if (!
|
|
2192
|
-
const
|
|
2171
|
+
if (!M) {
|
|
2172
|
+
const le = {
|
|
2193
2173
|
code: "INIT_FAILED",
|
|
2194
2174
|
message: "No data received from API",
|
|
2195
2175
|
recoverable: !0
|
|
2196
2176
|
};
|
|
2197
|
-
d({ type: "INIT_ERROR", payload:
|
|
2177
|
+
d({ type: "INIT_ERROR", payload: le }), r?.(le);
|
|
2198
2178
|
return;
|
|
2199
2179
|
}
|
|
2200
|
-
const
|
|
2201
|
-
d({ type: "INIT_SUCCESS", payload:
|
|
2202
|
-
} catch (
|
|
2203
|
-
const
|
|
2180
|
+
const $ = Vi(M, { ...t, reference: O });
|
|
2181
|
+
d({ type: "INIT_SUCCESS", payload: $ });
|
|
2182
|
+
} catch (O) {
|
|
2183
|
+
const Z = {
|
|
2204
2184
|
code: "INIT_FAILED",
|
|
2205
|
-
message:
|
|
2185
|
+
message: O instanceof Error ? O.message : "Failed to initialize checkout",
|
|
2206
2186
|
recoverable: !0,
|
|
2207
|
-
originalError:
|
|
2187
|
+
originalError: O
|
|
2208
2188
|
};
|
|
2209
|
-
d({ type: "INIT_ERROR", payload:
|
|
2189
|
+
d({ type: "INIT_ERROR", payload: Z }), r?.(Z);
|
|
2210
2190
|
}
|
|
2211
|
-
}, v = (
|
|
2212
|
-
d({ type: "SELECT_METHOD", payload:
|
|
2213
|
-
},
|
|
2191
|
+
}, v = (x) => {
|
|
2192
|
+
d({ type: "SELECT_METHOD", payload: x });
|
|
2193
|
+
}, w = async (x) => {
|
|
2214
2194
|
if (!(!s.paymentIntent || !s.selectedMethod)) {
|
|
2215
2195
|
d({ type: "PROCESS_START" });
|
|
2216
2196
|
try {
|
|
2217
|
-
let
|
|
2197
|
+
let O;
|
|
2218
2198
|
if (s.paymentIntent.clientSecret) {
|
|
2219
|
-
const { data:
|
|
2199
|
+
const { data: N, error: M } = await o.confirmPaymentIntent(
|
|
2220
2200
|
s.paymentIntent.id,
|
|
2221
2201
|
s.paymentIntent.clientSecret
|
|
2222
2202
|
);
|
|
2223
|
-
if (
|
|
2224
|
-
d({ type: "PROCESS_ERROR", payload:
|
|
2203
|
+
if (M) {
|
|
2204
|
+
d({ type: "PROCESS_ERROR", payload: M }), r?.(M);
|
|
2225
2205
|
return;
|
|
2226
2206
|
}
|
|
2227
|
-
|
|
2207
|
+
O = N;
|
|
2228
2208
|
} else {
|
|
2229
|
-
const { data:
|
|
2230
|
-
if (
|
|
2231
|
-
d({ type: "PROCESS_ERROR", payload:
|
|
2209
|
+
const { data: N, error: M } = await o.confirmPayment(s.paymentIntent.id);
|
|
2210
|
+
if (M) {
|
|
2211
|
+
d({ type: "PROCESS_ERROR", payload: M }), r?.(M);
|
|
2232
2212
|
return;
|
|
2233
2213
|
}
|
|
2234
|
-
|
|
2214
|
+
O = N;
|
|
2235
2215
|
}
|
|
2236
|
-
const
|
|
2216
|
+
const Z = {
|
|
2237
2217
|
paymentId: s.paymentIntent.id,
|
|
2238
|
-
reference:
|
|
2218
|
+
reference: x.reference || s.paymentIntent.reference || s.paymentIntent.metadata?.reference || "",
|
|
2239
2219
|
amount: s.paymentIntent.amount,
|
|
2240
2220
|
currency: s.paymentIntent.currency,
|
|
2241
2221
|
paymentMethod: s.selectedMethod,
|
|
2242
2222
|
psp: s.paymentIntent.recommendedPsp,
|
|
2243
|
-
pspReference:
|
|
2223
|
+
pspReference: x.pspReference || O?.provider_ref_id || "",
|
|
2244
2224
|
status: "success",
|
|
2245
|
-
metadata:
|
|
2225
|
+
metadata: x
|
|
2246
2226
|
};
|
|
2247
|
-
d({ type: "PROCESS_SUCCESS", payload:
|
|
2248
|
-
} catch (
|
|
2249
|
-
const
|
|
2227
|
+
d({ type: "PROCESS_SUCCESS", payload: Z }), n?.(Z);
|
|
2228
|
+
} catch (O) {
|
|
2229
|
+
const Z = {
|
|
2250
2230
|
code: "PAYMENT_FAILED",
|
|
2251
|
-
message:
|
|
2231
|
+
message: O instanceof Error ? O.message : "Payment failed",
|
|
2252
2232
|
recoverable: !0,
|
|
2253
|
-
originalError:
|
|
2233
|
+
originalError: O
|
|
2254
2234
|
};
|
|
2255
|
-
d({ type: "PROCESS_ERROR", payload:
|
|
2235
|
+
d({ type: "PROCESS_ERROR", payload: Z }), r?.(Z);
|
|
2256
2236
|
}
|
|
2257
2237
|
}
|
|
2258
2238
|
};
|
|
@@ -2262,12 +2242,12 @@ function $i(e) {
|
|
|
2262
2242
|
// Actions
|
|
2263
2243
|
initialize: h,
|
|
2264
2244
|
selectMethod: v,
|
|
2265
|
-
processPayment:
|
|
2266
|
-
handlePspSuccess: async (
|
|
2267
|
-
await
|
|
2245
|
+
processPayment: w,
|
|
2246
|
+
handlePspSuccess: async (x) => {
|
|
2247
|
+
await w(x);
|
|
2268
2248
|
},
|
|
2269
|
-
handlePspError: (
|
|
2270
|
-
d({ type: "PROCESS_ERROR", payload:
|
|
2249
|
+
handlePspError: (x) => {
|
|
2250
|
+
d({ type: "PROCESS_ERROR", payload: x }), r?.(x);
|
|
2271
2251
|
},
|
|
2272
2252
|
reset: () => {
|
|
2273
2253
|
d({ type: "RESET" });
|
|
@@ -2292,12 +2272,12 @@ function $i(e) {
|
|
|
2292
2272
|
canRetry: () => s.error?.recoverable ?? !1
|
|
2293
2273
|
};
|
|
2294
2274
|
}
|
|
2295
|
-
var
|
|
2296
|
-
function
|
|
2297
|
-
|
|
2298
|
-
const n = /* @__PURE__ */
|
|
2299
|
-
let r =
|
|
2300
|
-
const u =
|
|
2275
|
+
var Yi = /* @__PURE__ */ z('<div class="reevit-radio-inner"></div>'), Wi = /* @__PURE__ */ z('<button type="button"><span class="reevit-method-icon"> </span> <div class="reevit-method-info"><span class="reevit-method-name"> </span> <span class="reevit-method-description"> </span></div> <div class="reevit-method-radio"><!></div></button>'), Gi = /* @__PURE__ */ z('<div class="reevit-method-selector"><h3 class="reevit-section-title">Select Payment Method</h3> <p class="reevit-amount-display"> </p> <div class="reevit-methods-grid"></div></div>');
|
|
2276
|
+
function Zi(e, t) {
|
|
2277
|
+
an(t, !1);
|
|
2278
|
+
const n = /* @__PURE__ */ ie();
|
|
2279
|
+
let r = U(t, "methods", 8), a = U(t, "selected", 8), i = U(t, "amount", 8), l = U(t, "currency", 8), s = U(t, "provider", 8, void 0);
|
|
2280
|
+
const u = $t(), o = {
|
|
2301
2281
|
hubtel: "Hubtel",
|
|
2302
2282
|
paystack: "Paystack",
|
|
2303
2283
|
flutterwave: "Flutterwave",
|
|
@@ -2305,24 +2285,24 @@ function ra(e, t) {
|
|
|
2305
2285
|
mpesa: "M-Pesa",
|
|
2306
2286
|
stripe: "Stripe"
|
|
2307
2287
|
};
|
|
2308
|
-
function c(
|
|
2309
|
-
return s()?.toLowerCase().includes("hubtel") &&
|
|
2288
|
+
function c(y) {
|
|
2289
|
+
return s()?.toLowerCase().includes("hubtel") && y === "mobile_money" ? `Pay with ${o[s().toLowerCase()] || "Hubtel"}` : {
|
|
2310
2290
|
card: "Card",
|
|
2311
2291
|
mobile_money: "Mobile Money",
|
|
2312
2292
|
bank_transfer: "Bank Transfer"
|
|
2313
|
-
}[
|
|
2293
|
+
}[y];
|
|
2314
2294
|
}
|
|
2315
|
-
function d(
|
|
2295
|
+
function d(y) {
|
|
2316
2296
|
return s()?.toLowerCase().includes("hubtel") ? "Card, Mobile Money, and Bank Transfer" : {
|
|
2317
2297
|
card: "Visa, Mastercard, Maestro",
|
|
2318
2298
|
mobile_money: "MTN, Vodafone, AirtelTigo",
|
|
2319
2299
|
bank_transfer: "Transfer directly from your bank"
|
|
2320
|
-
}[
|
|
2300
|
+
}[y];
|
|
2321
2301
|
}
|
|
2322
|
-
function p(
|
|
2323
|
-
u("select",
|
|
2302
|
+
function p(y) {
|
|
2303
|
+
u("select", y);
|
|
2324
2304
|
}
|
|
2325
|
-
|
|
2305
|
+
ce(() => W(r()), () => {
|
|
2326
2306
|
L(n, [
|
|
2327
2307
|
{
|
|
2328
2308
|
id: "card",
|
|
@@ -2342,40 +2322,40 @@ function ra(e, t) {
|
|
|
2342
2322
|
description: d("bank_transfer"),
|
|
2343
2323
|
icon: "🏦"
|
|
2344
2324
|
}
|
|
2345
|
-
].filter((
|
|
2346
|
-
}), fn(),
|
|
2347
|
-
var h =
|
|
2348
|
-
|
|
2349
|
-
var
|
|
2325
|
+
].filter((y) => r().includes(y.id)));
|
|
2326
|
+
}), fn(), mn();
|
|
2327
|
+
var h = Gi(), v = j(T(h), 2), w = T(v), b = j(v, 2);
|
|
2328
|
+
lr(b, 5, () => f(n), (y) => y.id, (y, _) => {
|
|
2329
|
+
var E = Wi(), C = T(E), m = T(C), k = j(C, 2), R = T(k), g = T(R), he = j(R, 2), me = T(he), Ke = j(k, 2), Ve = T(Ke);
|
|
2350
2330
|
{
|
|
2351
|
-
var
|
|
2352
|
-
var
|
|
2353
|
-
|
|
2331
|
+
var x = (O) => {
|
|
2332
|
+
var Z = Yi();
|
|
2333
|
+
D(O, Z);
|
|
2354
2334
|
};
|
|
2355
|
-
|
|
2356
|
-
|
|
2335
|
+
ne(Ve, (O) => {
|
|
2336
|
+
W(a()), f(_), A(() => a() === f(_).id) && O(x);
|
|
2357
2337
|
});
|
|
2358
2338
|
}
|
|
2359
|
-
|
|
2360
|
-
(
|
|
2361
|
-
|
|
2339
|
+
de(
|
|
2340
|
+
(O) => {
|
|
2341
|
+
It(E, 1, O), Fe(m, (f(_), A(() => f(_).icon))), Fe(g, (f(_), A(() => f(_).name))), Fe(me, (f(_), A(() => f(_).description)));
|
|
2362
2342
|
},
|
|
2363
2343
|
[
|
|
2364
|
-
() => kt((
|
|
2344
|
+
() => kt((W(Re), W(a()), f(_), A(() => Re("reevit-method-card", a() === f(_).id && "reevit-method-card--selected"))))
|
|
2365
2345
|
]
|
|
2366
|
-
),
|
|
2367
|
-
}),
|
|
2368
|
-
() => (
|
|
2369
|
-
]),
|
|
2370
|
-
}
|
|
2371
|
-
var
|
|
2372
|
-
function
|
|
2373
|
-
|
|
2374
|
-
let n =
|
|
2375
|
-
const a =
|
|
2376
|
-
let i = /* @__PURE__ */
|
|
2346
|
+
), fe("click", E, () => p(f(_).id)), D(y, E);
|
|
2347
|
+
}), de((y) => Fe(w, `Pay ${y ?? ""}`), [
|
|
2348
|
+
() => (W(_n), W(i()), W(l()), A(() => _n(i(), l())))
|
|
2349
|
+
]), D(e, h), sn();
|
|
2350
|
+
}
|
|
2351
|
+
var Ji = /* @__PURE__ */ z('<button type="button"><div class="reevit-network-dot"></div> </button>'), Qi = /* @__PURE__ */ z('<p class="reevit-error-message"> </p>'), Xi = /* @__PURE__ */ z('<span class="reevit-spinner"></span>'), $i = /* @__PURE__ */ z("<span>Continue</span>"), ea = /* @__PURE__ */ z('<form class="reevit-momo-form"><div class="reevit-form-group"><label class="reevit-label" for="reevit-phone">Phone Number</label> <input id="reevit-phone" type="tel" placeholder="e.g. 024 123 4567" autocomplete="tel"/></div> <div class="reevit-network-selector"><label class="reevit-label" for="reevit-network-grid">Select Network</label> <div id="reevit-network-grid" class="reevit-networks-grid"></div></div> <!> <button type="submit" class="reevit-submit-btn"><!></button> <p class="reevit-secure-text">🔒 Secure mobile money payment via Reevit</p></form>');
|
|
2352
|
+
function ta(e, t) {
|
|
2353
|
+
an(t, !1);
|
|
2354
|
+
let n = U(t, "initialPhone", 8, ""), r = U(t, "loading", 8, !1);
|
|
2355
|
+
const a = $t();
|
|
2356
|
+
let i = /* @__PURE__ */ ie(n()), l = /* @__PURE__ */ ie(null), s = /* @__PURE__ */ ie(null);
|
|
2377
2357
|
function u() {
|
|
2378
|
-
if (!
|
|
2358
|
+
if (!zt(f(i))) {
|
|
2379
2359
|
L(s, "Please enter a valid phone number");
|
|
2380
2360
|
return;
|
|
2381
2361
|
}
|
|
@@ -2390,55 +2370,55 @@ function ua(e, t) {
|
|
|
2390
2370
|
{ id: "vodafone", name: "Vodafone", color: "#E60000" },
|
|
2391
2371
|
{ id: "airteltigo", name: "AirtelTigo", color: "#005596" }
|
|
2392
2372
|
];
|
|
2393
|
-
|
|
2394
|
-
const m =
|
|
2373
|
+
ce(() => (f(i), f(s)), () => {
|
|
2374
|
+
const m = Pr(f(i));
|
|
2395
2375
|
m && L(l, m), f(s) && L(s, null);
|
|
2396
|
-
}), fn(),
|
|
2397
|
-
var c =
|
|
2398
|
-
|
|
2399
|
-
var
|
|
2400
|
-
|
|
2401
|
-
(
|
|
2402
|
-
|
|
2376
|
+
}), fn(), mn();
|
|
2377
|
+
var c = ea(), d = T(c), p = j(T(d), 2), h = j(d, 2), v = j(T(h), 2);
|
|
2378
|
+
lr(v, 5, () => o, (m) => m.id, (m, k) => {
|
|
2379
|
+
var R = Ji(), g = T(R), he = j(g);
|
|
2380
|
+
de(
|
|
2381
|
+
(me) => {
|
|
2382
|
+
It(R, 1, me), R.disabled = r(), cr(g, `background-color: ${f(k), A(() => f(k).color) ?? ""}`), Fe(he, ` ${f(k), A(() => f(k).name) ?? ""}`);
|
|
2403
2383
|
},
|
|
2404
2384
|
[
|
|
2405
|
-
() => kt((
|
|
2385
|
+
() => kt((W(Re), f(l), f(k), A(() => Re("reevit-network-btn", f(l) === f(k).id && "reevit-network-btn--selected"))))
|
|
2406
2386
|
]
|
|
2407
|
-
),
|
|
2387
|
+
), fe("click", R, () => L(l, f(k).id)), D(m, R);
|
|
2408
2388
|
});
|
|
2409
|
-
var
|
|
2389
|
+
var w = j(h, 2);
|
|
2410
2390
|
{
|
|
2411
|
-
var
|
|
2412
|
-
var
|
|
2413
|
-
|
|
2391
|
+
var b = (m) => {
|
|
2392
|
+
var k = Qi(), R = T(k);
|
|
2393
|
+
de(() => Fe(R, f(s))), D(m, k);
|
|
2414
2394
|
};
|
|
2415
|
-
|
|
2416
|
-
f(s) && m(
|
|
2395
|
+
ne(w, (m) => {
|
|
2396
|
+
f(s) && m(b);
|
|
2417
2397
|
});
|
|
2418
2398
|
}
|
|
2419
|
-
var
|
|
2399
|
+
var y = j(w, 2), _ = T(y);
|
|
2420
2400
|
{
|
|
2421
|
-
var
|
|
2422
|
-
var
|
|
2423
|
-
|
|
2424
|
-
},
|
|
2425
|
-
var
|
|
2426
|
-
|
|
2401
|
+
var E = (m) => {
|
|
2402
|
+
var k = Xi();
|
|
2403
|
+
D(m, k);
|
|
2404
|
+
}, C = (m) => {
|
|
2405
|
+
var k = $i();
|
|
2406
|
+
D(m, k);
|
|
2427
2407
|
};
|
|
2428
|
-
|
|
2429
|
-
r() ? m(
|
|
2408
|
+
ne(_, (m) => {
|
|
2409
|
+
r() ? m(E) : m(C, !1);
|
|
2430
2410
|
});
|
|
2431
2411
|
}
|
|
2432
|
-
|
|
2412
|
+
de(
|
|
2433
2413
|
(m) => {
|
|
2434
|
-
|
|
2414
|
+
It(p, 1, m), p.disabled = r(), y.disabled = r() || !f(i);
|
|
2435
2415
|
},
|
|
2436
2416
|
[
|
|
2437
|
-
() => kt((
|
|
2417
|
+
() => kt((W(Re), f(s), W(zt), f(i), A(() => Re("reevit-input", f(s) && !zt(f(i)) && "reevit-input--error"))))
|
|
2438
2418
|
]
|
|
2439
|
-
),
|
|
2419
|
+
), Li(p, () => f(i), (m) => L(i, m)), fe("submit", c, Ui(u)), D(e, c), sn();
|
|
2440
2420
|
}
|
|
2441
|
-
class
|
|
2421
|
+
class na {
|
|
2442
2422
|
constructor(t) {
|
|
2443
2423
|
this.baseUrl = "https://unified-pay.hubtel.com", this.messageHandler = null, this.stylesInjected = !1, t && (this.baseUrl = t);
|
|
2444
2424
|
}
|
|
@@ -2650,9 +2630,9 @@ class ca {
|
|
|
2650
2630
|
`, document.head.appendChild(t), this.stylesInjected = !0;
|
|
2651
2631
|
}
|
|
2652
2632
|
}
|
|
2653
|
-
const
|
|
2654
|
-
function
|
|
2655
|
-
const n =
|
|
2633
|
+
const Rn = /* @__PURE__ */ new Map();
|
|
2634
|
+
function At(e, t) {
|
|
2635
|
+
const n = Rn.get(t);
|
|
2656
2636
|
if (n) return n;
|
|
2657
2637
|
const r = new Promise((a, i) => {
|
|
2658
2638
|
if (document.getElementById(t)) {
|
|
@@ -2662,25 +2642,25 @@ function Ot(e, t) {
|
|
|
2662
2642
|
const l = document.createElement("script");
|
|
2663
2643
|
l.id = t, l.src = e, l.async = !0, l.onload = () => a(), l.onerror = () => i(new Error(`Failed to load ${t} script`)), document.head.appendChild(l);
|
|
2664
2644
|
});
|
|
2665
|
-
return
|
|
2645
|
+
return Rn.set(t, r), r;
|
|
2666
2646
|
}
|
|
2667
|
-
function
|
|
2668
|
-
return
|
|
2647
|
+
function ra() {
|
|
2648
|
+
return At("https://js.paystack.co/v1/inline.js", "paystack-script");
|
|
2669
2649
|
}
|
|
2670
|
-
function
|
|
2650
|
+
function Ca() {
|
|
2671
2651
|
return Promise.resolve();
|
|
2672
2652
|
}
|
|
2673
|
-
function
|
|
2674
|
-
return
|
|
2653
|
+
function ia() {
|
|
2654
|
+
return At("https://checkout.flutterwave.com/v3.js", "flutterwave-script");
|
|
2675
2655
|
}
|
|
2676
|
-
function
|
|
2677
|
-
return
|
|
2656
|
+
function aa() {
|
|
2657
|
+
return At("https://js.stripe.com/v3/", "stripe-script");
|
|
2678
2658
|
}
|
|
2679
|
-
function
|
|
2680
|
-
return
|
|
2659
|
+
function sa() {
|
|
2660
|
+
return At("https://sdk.monnify.com/plugin/monnify.js", "monnify-script");
|
|
2681
2661
|
}
|
|
2682
|
-
async function
|
|
2683
|
-
if (await
|
|
2662
|
+
async function oa(e) {
|
|
2663
|
+
if (await ra(), !window.PaystackPop)
|
|
2684
2664
|
throw new Error("Paystack script not loaded");
|
|
2685
2665
|
window.PaystackPop.setup({
|
|
2686
2666
|
key: e.key,
|
|
@@ -2693,24 +2673,24 @@ async function ha(e) {
|
|
|
2693
2673
|
onClose: e.onClose
|
|
2694
2674
|
}).openIframe();
|
|
2695
2675
|
}
|
|
2696
|
-
async function
|
|
2697
|
-
const t = new
|
|
2676
|
+
async function la(e) {
|
|
2677
|
+
const t = new na(), n = {
|
|
2698
2678
|
amount: e.amount,
|
|
2699
2679
|
purchaseDescription: e.purchaseDescription,
|
|
2700
2680
|
customerPhoneNumber: e.customerPhone || "",
|
|
2701
2681
|
clientReference: `hubtel_${Date.now()}`
|
|
2702
|
-
}, r = {
|
|
2682
|
+
}, r = e.hubtelSessionToken || e.basicAuth || "", a = {
|
|
2703
2683
|
branding: "enabled",
|
|
2704
2684
|
callbackUrl: e.callbackUrl || (typeof window < "u" ? window.location.href : ""),
|
|
2705
2685
|
merchantAccount: typeof e.clientId == "string" ? parseInt(e.clientId, 10) : e.clientId,
|
|
2706
|
-
basicAuth:
|
|
2686
|
+
basicAuth: r
|
|
2707
2687
|
};
|
|
2708
2688
|
t.openModal({
|
|
2709
2689
|
purchaseInfo: n,
|
|
2710
|
-
config:
|
|
2690
|
+
config: a,
|
|
2711
2691
|
callBacks: {
|
|
2712
|
-
onPaymentSuccess: (
|
|
2713
|
-
e.onSuccess(
|
|
2692
|
+
onPaymentSuccess: (i) => {
|
|
2693
|
+
e.onSuccess(i), t.closePopUp();
|
|
2714
2694
|
},
|
|
2715
2695
|
onPaymentFailure: () => {
|
|
2716
2696
|
e.onClose();
|
|
@@ -2721,8 +2701,8 @@ async function ma(e) {
|
|
|
2721
2701
|
}
|
|
2722
2702
|
});
|
|
2723
2703
|
}
|
|
2724
|
-
async function
|
|
2725
|
-
if (await
|
|
2704
|
+
async function ua(e) {
|
|
2705
|
+
if (await ia(), !window.FlutterwaveCheckout)
|
|
2726
2706
|
throw new Error("Flutterwave script not loaded");
|
|
2727
2707
|
window.FlutterwaveCheckout({
|
|
2728
2708
|
public_key: e.public_key,
|
|
@@ -2736,13 +2716,13 @@ async function _a(e) {
|
|
|
2736
2716
|
onclose: e.onclose
|
|
2737
2717
|
});
|
|
2738
2718
|
}
|
|
2739
|
-
async function
|
|
2740
|
-
if (await
|
|
2719
|
+
async function ca(e) {
|
|
2720
|
+
if (await aa(), !window.Stripe)
|
|
2741
2721
|
throw new Error("Stripe.js not loaded");
|
|
2742
2722
|
return window.Stripe(e);
|
|
2743
2723
|
}
|
|
2744
|
-
async function
|
|
2745
|
-
const n = await (await
|
|
2724
|
+
async function Ra(e) {
|
|
2725
|
+
const n = await (await ca(e.publishableKey)).confirmPayment({
|
|
2746
2726
|
elements: e.elements,
|
|
2747
2727
|
clientSecret: e.clientSecret,
|
|
2748
2728
|
redirect: "if_required"
|
|
@@ -2752,8 +2732,8 @@ async function La(e) {
|
|
|
2752
2732
|
status: n.paymentIntent.status
|
|
2753
2733
|
});
|
|
2754
2734
|
}
|
|
2755
|
-
async function
|
|
2756
|
-
if (await
|
|
2735
|
+
async function fa(e) {
|
|
2736
|
+
if (await sa(), !window.MonnifySDK)
|
|
2757
2737
|
throw new Error("Monnify SDK not loaded");
|
|
2758
2738
|
window.MonnifySDK.initialize({
|
|
2759
2739
|
amount: e.amount,
|
|
@@ -2777,7 +2757,7 @@ async function ba(e) {
|
|
|
2777
2757
|
onClose: e.onClose
|
|
2778
2758
|
});
|
|
2779
2759
|
}
|
|
2780
|
-
async function
|
|
2760
|
+
async function da(e, t) {
|
|
2781
2761
|
e.onInitiated();
|
|
2782
2762
|
try {
|
|
2783
2763
|
const n = await fetch(t, {
|
|
@@ -2805,324 +2785,349 @@ async function wa(e, t) {
|
|
|
2805
2785
|
return e.onError({ message: r }), { status: "failed", message: r };
|
|
2806
2786
|
}
|
|
2807
2787
|
}
|
|
2808
|
-
var
|
|
2809
|
-
function
|
|
2810
|
-
|
|
2811
|
-
const n = () =>
|
|
2812
|
-
let
|
|
2813
|
-
const
|
|
2788
|
+
var va = /* @__PURE__ */ z('<span class="reevit-spinner"></span>'), pa = /* @__PURE__ */ z('<button type="button" class="reevit-pay-button"><!></button>'), ha = /* @__PURE__ */ z('<div class="reevit-loading-state"><div class="reevit-spinner reevit-spinner--large"></div> <p>Initializing payment...</p></div>'), ma = /* @__PURE__ */ z('<div class="reevit-error-state"><div class="reevit-error-icon">⚠️</div> <h3>Payment Failed</h3> <p> </p> <button class="reevit-retry-btn">Retry</button></div>'), _a = /* @__PURE__ */ z('<div class="reevit-success-state"><div class="reevit-success-icon">✅</div> <h3>Payment Successful</h3> <p>Thank you for your payment.</p> <button class="reevit-done-btn">Done</button></div>'), ya = /* @__PURE__ */ z('<div class="reevit-method-form-container"><!></div>'), ba = /* @__PURE__ */ z('<span class="reevit-spinner"></span>'), wa = /* @__PURE__ */ z("<span>Proceed to Card Payment</span>"), ga = /* @__PURE__ */ z('<div class="reevit-card-info"><p class="reevit-info-text">You will be redirected to our secure payment partner to complete your card payment.</p> <button class="reevit-submit-btn"><!></button></div>'), Ea = /* @__PURE__ */ z('<div class="reevit-modal-overlay" role="button" tabindex="0"><div><button class="reevit-modal-close" aria-label="Close">×</button> <div class="reevit-modal-header"><img src="https://i.imgur.com/bzUR5Lm.png" alt="Reevit" class="reevit-modal__logo"/></div> <div class="reevit-modal-body"><!> <!> <!></div> <div class="reevit-modal-footer"><div class="reevit-trust-badges"><span>PCI DSS Compliant</span> <span>•</span> <span>SSL Secure</span></div></div></div></div>'), Pa = /* @__PURE__ */ z('<div class="reevit-sdk-container"><!> <!></div>');
|
|
2789
|
+
function xa(e, t) {
|
|
2790
|
+
an(t, !1);
|
|
2791
|
+
const n = () => zi(g, "$store", r), [r, a] = Hi(), i = /* @__PURE__ */ ie(), l = /* @__PURE__ */ ie(), s = /* @__PURE__ */ ie(), u = /* @__PURE__ */ ie(), o = /* @__PURE__ */ ie(), c = /* @__PURE__ */ ie(), d = $t();
|
|
2792
|
+
let p = U(t, "publicKey", 8), h = U(t, "amount", 8), v = U(t, "currency", 8), w = U(t, "email", 8, void 0), b = U(t, "phone", 8, void 0), y = U(t, "reference", 8, void 0), _ = U(t, "metadata", 8, void 0), E = U(t, "paymentMethods", 24, () => ["card", "mobile_money"]), C = U(t, "theme", 24, () => ({})), m = U(t, "isOpen", 12, !1), k = U(t, "apiBaseUrl", 8, void 0), R = U(t, "initialPaymentIntent", 8, void 0);
|
|
2793
|
+
const g = Bi({
|
|
2814
2794
|
config: {
|
|
2815
|
-
publicKey:
|
|
2816
|
-
amount:
|
|
2817
|
-
currency:
|
|
2818
|
-
email:
|
|
2819
|
-
phone:
|
|
2820
|
-
reference:
|
|
2821
|
-
metadata:
|
|
2822
|
-
paymentMethods:
|
|
2823
|
-
initialPaymentIntent:
|
|
2795
|
+
publicKey: p(),
|
|
2796
|
+
amount: h(),
|
|
2797
|
+
currency: v(),
|
|
2798
|
+
email: w(),
|
|
2799
|
+
phone: b(),
|
|
2800
|
+
reference: y(),
|
|
2801
|
+
metadata: _(),
|
|
2802
|
+
paymentMethods: E(),
|
|
2803
|
+
initialPaymentIntent: R()
|
|
2824
2804
|
},
|
|
2825
|
-
apiBaseUrl:
|
|
2826
|
-
onSuccess: (
|
|
2827
|
-
onError: (
|
|
2805
|
+
apiBaseUrl: k(),
|
|
2806
|
+
onSuccess: (N) => d("success", N),
|
|
2807
|
+
onError: (N) => d("error", N),
|
|
2828
2808
|
onClose: () => {
|
|
2829
|
-
|
|
2809
|
+
m(!1), d("close");
|
|
2830
2810
|
}
|
|
2831
2811
|
});
|
|
2832
|
-
function
|
|
2833
|
-
|
|
2812
|
+
function he() {
|
|
2813
|
+
m(!0);
|
|
2834
2814
|
}
|
|
2835
|
-
function
|
|
2836
|
-
|
|
2815
|
+
function me() {
|
|
2816
|
+
m(!1), g.close();
|
|
2837
2817
|
}
|
|
2838
|
-
async function
|
|
2818
|
+
async function Ke(N) {
|
|
2839
2819
|
if (!f(i).paymentIntent) return;
|
|
2840
|
-
const
|
|
2820
|
+
const M = f(i).paymentIntent.recommendedPsp;
|
|
2841
2821
|
try {
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
amount: c(),
|
|
2881
|
-
currency: d(),
|
|
2882
|
-
reference: f(i).paymentIntent.reference || f(i).paymentIntent.id,
|
|
2883
|
-
customerName: E()?.customer_name || p() || "",
|
|
2884
|
-
customerEmail: p() || "",
|
|
2885
|
-
customerPhone: b?.phone || h(),
|
|
2886
|
-
metadata: E(),
|
|
2887
|
-
onSuccess: (k) => m.handlePspSuccess(k),
|
|
2888
|
-
onClose: () => {
|
|
2889
|
-
}
|
|
2890
|
-
});
|
|
2891
|
-
else if (y === "mpesa") {
|
|
2892
|
-
const k = `${g() || "https://api.reevit.io"}/v1/payments/${f(i).paymentIntent.id}/mpesa`;
|
|
2893
|
-
await wa(
|
|
2894
|
-
{
|
|
2895
|
-
phoneNumber: b?.phone || h() || "",
|
|
2896
|
-
amount: c(),
|
|
2897
|
-
reference: f(i).paymentIntent.reference || f(i).paymentIntent.id,
|
|
2898
|
-
description: `Payment ${f(i).paymentIntent.reference || ""}`,
|
|
2899
|
-
onInitiated: () => {
|
|
2822
|
+
switch (M) {
|
|
2823
|
+
case "paystack": {
|
|
2824
|
+
await oa({
|
|
2825
|
+
key: p(),
|
|
2826
|
+
email: w() ?? "",
|
|
2827
|
+
amount: h(),
|
|
2828
|
+
currency: v(),
|
|
2829
|
+
ref: f(i).paymentIntent.id,
|
|
2830
|
+
onSuccess: (F) => g.handlePspSuccess(F),
|
|
2831
|
+
onClose: () => {
|
|
2832
|
+
}
|
|
2833
|
+
});
|
|
2834
|
+
break;
|
|
2835
|
+
}
|
|
2836
|
+
case "hubtel": {
|
|
2837
|
+
const F = f(i).paymentIntent.pspCredentials?.merchantAccount;
|
|
2838
|
+
await la({
|
|
2839
|
+
clientId: typeof F == "string" ? F : p(),
|
|
2840
|
+
purchaseDescription: `Payment for ${h()} ${v()}`,
|
|
2841
|
+
amount: h(),
|
|
2842
|
+
customerPhone: N?.phone ?? b() ?? "",
|
|
2843
|
+
customerEmail: w() ?? "",
|
|
2844
|
+
hubtelSessionToken: f(i).paymentIntent.id,
|
|
2845
|
+
onSuccess: ($) => g.handlePspSuccess($),
|
|
2846
|
+
onClose: () => {
|
|
2847
|
+
}
|
|
2848
|
+
});
|
|
2849
|
+
break;
|
|
2850
|
+
}
|
|
2851
|
+
case "flutterwave": {
|
|
2852
|
+
await ua({
|
|
2853
|
+
public_key: p(),
|
|
2854
|
+
tx_ref: f(i).paymentIntent.id,
|
|
2855
|
+
amount: h(),
|
|
2856
|
+
currency: v(),
|
|
2857
|
+
customer: {
|
|
2858
|
+
email: w() ?? "",
|
|
2859
|
+
phone_number: N?.phone ?? b() ?? ""
|
|
2900
2860
|
},
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2861
|
+
callback: (F) => g.handlePspSuccess(F),
|
|
2862
|
+
onclose: () => {
|
|
2863
|
+
}
|
|
2864
|
+
});
|
|
2865
|
+
break;
|
|
2866
|
+
}
|
|
2867
|
+
case "monnify": {
|
|
2868
|
+
const F = _()?.contract_code;
|
|
2869
|
+
await fa({
|
|
2870
|
+
apiKey: f(i).paymentIntent.pspPublicKey ?? p(),
|
|
2871
|
+
contractCode: typeof F == "string" ? F : p(),
|
|
2872
|
+
amount: h(),
|
|
2873
|
+
currency: v(),
|
|
2874
|
+
reference: f(i).paymentIntent.reference ?? f(i).paymentIntent.id,
|
|
2875
|
+
customerName: _()?.customer_name ?? w() ?? "",
|
|
2876
|
+
customerEmail: w() ?? "",
|
|
2877
|
+
customerPhone: N?.phone ?? b() ?? "",
|
|
2878
|
+
metadata: _(),
|
|
2879
|
+
onSuccess: ($) => g.handlePspSuccess($),
|
|
2880
|
+
onClose: () => {
|
|
2881
|
+
}
|
|
2882
|
+
});
|
|
2883
|
+
break;
|
|
2884
|
+
}
|
|
2885
|
+
case "mpesa": {
|
|
2886
|
+
const $ = `${k() ?? "https://api.reevit.io"}/v1/payments/${f(i).paymentIntent.id}/mpesa`;
|
|
2887
|
+
await da(
|
|
2888
|
+
{
|
|
2889
|
+
phoneNumber: N?.phone ?? b() ?? "",
|
|
2890
|
+
amount: h(),
|
|
2891
|
+
reference: f(i).paymentIntent.reference ?? f(i).paymentIntent.id,
|
|
2892
|
+
description: `Payment ${f(i).paymentIntent.reference ?? ""}`,
|
|
2893
|
+
onInitiated: () => {
|
|
2894
|
+
},
|
|
2895
|
+
onSuccess: (le) => g.handlePspSuccess(le),
|
|
2896
|
+
onError: (le) => g.handlePspError({ code: "MPESA_ERROR", message: le.message })
|
|
2897
|
+
},
|
|
2898
|
+
$
|
|
2899
|
+
);
|
|
2900
|
+
break;
|
|
2901
|
+
}
|
|
2902
|
+
case "stripe": {
|
|
2903
|
+
g.handlePspError({
|
|
2904
|
+
code: "STRIPE_NOT_IMPLEMENTED",
|
|
2905
|
+
message: "Stripe integration requires custom Elements setup. Please use the React SDK or implement custom Stripe Elements."
|
|
2906
|
+
});
|
|
2907
|
+
break;
|
|
2908
|
+
}
|
|
2909
|
+
default:
|
|
2910
|
+
g.handlePspError({
|
|
2911
|
+
code: "UNSUPPORTED_PSP",
|
|
2912
|
+
message: `Payment provider "${M}" is not supported in this checkout.`
|
|
2913
|
+
});
|
|
2914
|
+
}
|
|
2915
|
+
} catch (F) {
|
|
2916
|
+
g.handlePspError({
|
|
2915
2917
|
code: "BRIDGE_ERROR",
|
|
2916
|
-
message:
|
|
2918
|
+
message: F instanceof Error ? F.message : "Failed to open payment gateway"
|
|
2917
2919
|
});
|
|
2918
2920
|
}
|
|
2919
2921
|
}
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
}),
|
|
2922
|
+
mr(() => {
|
|
2923
|
+
m() && g.initialize();
|
|
2924
|
+
}), _r(() => {
|
|
2923
2925
|
typeof document < "u" && (document.body.style.overflow = "");
|
|
2924
|
-
}),
|
|
2926
|
+
}), ce(() => n(), () => {
|
|
2925
2927
|
L(i, n());
|
|
2926
|
-
}),
|
|
2927
|
-
L(l,
|
|
2928
|
-
}),
|
|
2929
|
-
L(s, f(i).paymentIntent?.recommendedPsp
|
|
2930
|
-
}),
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
}
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2928
|
+
}), ce(() => W(C()), () => {
|
|
2929
|
+
L(l, Sr(C()));
|
|
2930
|
+
}), ce(() => f(i), () => {
|
|
2931
|
+
L(s, f(i).paymentIntent?.recommendedPsp ?? "paystack");
|
|
2932
|
+
}), ce(() => {
|
|
2933
|
+
}, () => {
|
|
2934
|
+
L(u, g.isLoading());
|
|
2935
|
+
}), ce(() => {
|
|
2936
|
+
}, () => {
|
|
2937
|
+
L(o, g.getStatus() === "processing");
|
|
2938
|
+
}), ce(() => {
|
|
2939
|
+
}, () => {
|
|
2940
|
+
L(c, g.getStatus() === "method_selected");
|
|
2941
|
+
}), ce(() => (W(m()), f(i)), () => {
|
|
2942
|
+
m() && f(i).paymentIntent && f(i).selectedMethod && f(i).selectedMethod === "card" && Ke(null);
|
|
2943
|
+
}), ce(() => (W(m()), f(i)), () => {
|
|
2944
|
+
m() ? (document.body.style.overflow = "hidden", !f(i).paymentIntent && f(i).status === "idle" && g.initialize()) : typeof document < "u" && (document.body.style.overflow = "");
|
|
2945
|
+
}), fn(), mn();
|
|
2946
|
+
var Ve = Pa(), x = T(Ve);
|
|
2947
|
+
In(
|
|
2948
|
+
x,
|
|
2938
2949
|
t,
|
|
2939
2950
|
"default",
|
|
2940
2951
|
{
|
|
2941
|
-
handleOpen:
|
|
2952
|
+
handleOpen: he,
|
|
2942
2953
|
get isLoading() {
|
|
2943
|
-
return f(
|
|
2954
|
+
return f(u);
|
|
2944
2955
|
}
|
|
2945
2956
|
},
|
|
2946
|
-
(
|
|
2947
|
-
var
|
|
2957
|
+
(N) => {
|
|
2958
|
+
var M = pa(), F = T(M);
|
|
2948
2959
|
{
|
|
2949
|
-
var
|
|
2950
|
-
var
|
|
2951
|
-
|
|
2952
|
-
},
|
|
2953
|
-
var
|
|
2954
|
-
|
|
2955
|
-
var
|
|
2956
|
-
|
|
2957
|
-
}),
|
|
2960
|
+
var $ = (_e) => {
|
|
2961
|
+
var Be = va();
|
|
2962
|
+
D(_e, Be);
|
|
2963
|
+
}, le = (_e) => {
|
|
2964
|
+
var Be = ht(), Ot = pt(Be);
|
|
2965
|
+
In(Ot, t, "button-text", {}, (dt) => {
|
|
2966
|
+
var Nt = xi("Pay Now");
|
|
2967
|
+
D(dt, Nt);
|
|
2968
|
+
}), D(_e, Be);
|
|
2958
2969
|
};
|
|
2959
|
-
|
|
2960
|
-
f(
|
|
2970
|
+
ne(F, (_e) => {
|
|
2971
|
+
f(u) ? _e($) : _e(le, !1);
|
|
2961
2972
|
});
|
|
2962
2973
|
}
|
|
2963
|
-
|
|
2974
|
+
de(() => M.disabled = f(u)), fe("click", M, he), D(N, M);
|
|
2964
2975
|
}
|
|
2965
2976
|
);
|
|
2966
|
-
var
|
|
2977
|
+
var O = j(x, 2);
|
|
2967
2978
|
{
|
|
2968
|
-
var
|
|
2969
|
-
var
|
|
2979
|
+
var Z = (N) => {
|
|
2980
|
+
var M = Ea(), F = T(M), $ = T(F), le = j($, 4), _e = T(le);
|
|
2970
2981
|
{
|
|
2971
|
-
var
|
|
2972
|
-
var
|
|
2973
|
-
|
|
2974
|
-
},
|
|
2975
|
-
var
|
|
2982
|
+
var Be = (H) => {
|
|
2983
|
+
var ue = ha();
|
|
2984
|
+
D(H, ue);
|
|
2985
|
+
}, Ot = (H) => {
|
|
2986
|
+
var ue = ht(), Ne = pt(ue);
|
|
2976
2987
|
{
|
|
2977
|
-
var
|
|
2978
|
-
var
|
|
2979
|
-
|
|
2980
|
-
},
|
|
2981
|
-
var
|
|
2988
|
+
var $e = (Se) => {
|
|
2989
|
+
var ee = ma(), ke = j(T(ee), 4), Ft = T(ke), Lt = j(ke, 2);
|
|
2990
|
+
de(() => Fe(Ft, (f(i), A(() => f(i).error.message)))), fe("click", Lt, () => g.initialize()), D(Se, ee);
|
|
2991
|
+
}, Dt = (Se) => {
|
|
2992
|
+
var ee = ht(), ke = pt(ee);
|
|
2982
2993
|
{
|
|
2983
|
-
var
|
|
2984
|
-
var
|
|
2985
|
-
|
|
2986
|
-
},
|
|
2987
|
-
var
|
|
2994
|
+
var Ft = (Ye) => {
|
|
2995
|
+
var et = _a(), Ut = j(T(et), 6);
|
|
2996
|
+
fe("click", Ut, me), D(Ye, et);
|
|
2997
|
+
}, Lt = (Ye) => {
|
|
2998
|
+
var et = ht(), Ut = pt(et);
|
|
2988
2999
|
{
|
|
2989
|
-
var
|
|
2990
|
-
|
|
2991
|
-
ra(_n, {
|
|
3000
|
+
var pr = (jt) => {
|
|
3001
|
+
Zi(jt, {
|
|
2992
3002
|
get methods() {
|
|
2993
|
-
return
|
|
3003
|
+
return E();
|
|
2994
3004
|
},
|
|
2995
3005
|
get selected() {
|
|
2996
|
-
return f(i),
|
|
3006
|
+
return f(i), A(() => f(i).selectedMethod);
|
|
2997
3007
|
},
|
|
2998
3008
|
get amount() {
|
|
2999
|
-
return
|
|
3009
|
+
return h();
|
|
3000
3010
|
},
|
|
3001
3011
|
get currency() {
|
|
3002
|
-
return
|
|
3012
|
+
return v();
|
|
3003
3013
|
},
|
|
3004
3014
|
get provider() {
|
|
3005
3015
|
return f(s);
|
|
3006
3016
|
},
|
|
3007
|
-
$$events: { select: (
|
|
3017
|
+
$$events: { select: (hr) => g.selectMethod(hr.detail) }
|
|
3008
3018
|
});
|
|
3009
|
-
var yn = F(_n, 2);
|
|
3010
|
-
{
|
|
3011
|
-
var yr = (ce) => {
|
|
3012
|
-
var Je = ka(), Qe = A(Je);
|
|
3013
|
-
{
|
|
3014
|
-
let jt = /* @__PURE__ */ At(() => (f(i), P(() => f(i).status === "processing")));
|
|
3015
|
-
ua(Qe, {
|
|
3016
|
-
get initialPhone() {
|
|
3017
|
-
return h();
|
|
3018
|
-
},
|
|
3019
|
-
get loading() {
|
|
3020
|
-
return f(jt);
|
|
3021
|
-
},
|
|
3022
|
-
$$events: { submit: (zt) => U(zt.detail) }
|
|
3023
|
-
});
|
|
3024
|
-
}
|
|
3025
|
-
T(ce, Je);
|
|
3026
|
-
};
|
|
3027
|
-
ee(yn, (ce) => {
|
|
3028
|
-
f(i), P(() => f(i).status === "method_selected" && f(i).selectedMethod === "mobile_money") && ce(yr);
|
|
3029
|
-
});
|
|
3030
|
-
}
|
|
3031
|
-
var br = F(yn, 2);
|
|
3032
|
-
{
|
|
3033
|
-
var wr = (ce) => {
|
|
3034
|
-
var Je = xa(), Qe = F(A(Je), 2), jt = A(Qe);
|
|
3035
|
-
{
|
|
3036
|
-
var zt = (He) => {
|
|
3037
|
-
var Ht = Ca();
|
|
3038
|
-
T(He, Ht);
|
|
3039
|
-
}, gr = (He) => {
|
|
3040
|
-
var Ht = Ra();
|
|
3041
|
-
T(He, Ht);
|
|
3042
|
-
};
|
|
3043
|
-
ee(jt, (He) => {
|
|
3044
|
-
f(i), P(() => f(i).status === "processing") ? He(zt) : He(gr, !1);
|
|
3045
|
-
});
|
|
3046
|
-
}
|
|
3047
|
-
oe(() => Qe.disabled = (f(i), P(() => f(i).status === "processing"))), se("click", Qe, () => U(null)), T(ce, Je);
|
|
3048
|
-
};
|
|
3049
|
-
ee(br, (ce) => {
|
|
3050
|
-
f(i), P(() => f(i).status === "method_selected" && f(i).selectedMethod === "card") && ce(wr);
|
|
3051
|
-
});
|
|
3052
|
-
}
|
|
3053
|
-
T(Ut, mn);
|
|
3054
3019
|
};
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
(
|
|
3058
|
-
f(i),
|
|
3020
|
+
ne(
|
|
3021
|
+
Ut,
|
|
3022
|
+
(jt) => {
|
|
3023
|
+
f(i), f(c), A(() => f(i).status === "ready" || f(c)) && jt(pr);
|
|
3059
3024
|
},
|
|
3060
3025
|
!0
|
|
3061
3026
|
);
|
|
3062
3027
|
}
|
|
3063
|
-
|
|
3028
|
+
D(Ye, et);
|
|
3064
3029
|
};
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
(
|
|
3068
|
-
f(i),
|
|
3030
|
+
ne(
|
|
3031
|
+
ke,
|
|
3032
|
+
(Ye) => {
|
|
3033
|
+
f(i), A(() => f(i).status === "success") ? Ye(Ft) : Ye(Lt, !1);
|
|
3069
3034
|
},
|
|
3070
3035
|
!0
|
|
3071
3036
|
);
|
|
3072
3037
|
}
|
|
3073
|
-
|
|
3038
|
+
D(Se, ee);
|
|
3074
3039
|
};
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
(
|
|
3078
|
-
f(i),
|
|
3040
|
+
ne(
|
|
3041
|
+
Ne,
|
|
3042
|
+
(Se) => {
|
|
3043
|
+
f(i), A(() => f(i).status === "failed" && f(i).error) ? Se($e) : Se(Dt, !1);
|
|
3079
3044
|
},
|
|
3080
3045
|
!0
|
|
3081
3046
|
);
|
|
3082
3047
|
}
|
|
3083
|
-
|
|
3048
|
+
D(H, ue);
|
|
3049
|
+
};
|
|
3050
|
+
ne(_e, (H) => {
|
|
3051
|
+
f(i), A(() => f(i).status === "loading") ? H(Be) : H(Ot, !1);
|
|
3052
|
+
});
|
|
3053
|
+
}
|
|
3054
|
+
var dt = j(_e, 2);
|
|
3055
|
+
{
|
|
3056
|
+
var Nt = (H) => {
|
|
3057
|
+
var ue = ya(), Ne = T(ue);
|
|
3058
|
+
ta(Ne, {
|
|
3059
|
+
get initialPhone() {
|
|
3060
|
+
return b();
|
|
3061
|
+
},
|
|
3062
|
+
get loading() {
|
|
3063
|
+
return f(o);
|
|
3064
|
+
},
|
|
3065
|
+
$$events: { submit: ($e) => Ke($e.detail) }
|
|
3066
|
+
}), D(H, ue);
|
|
3067
|
+
};
|
|
3068
|
+
ne(dt, (H) => {
|
|
3069
|
+
f(c), f(i), A(() => f(c) && f(i).selectedMethod === "mobile_money") && H(Nt);
|
|
3070
|
+
});
|
|
3071
|
+
}
|
|
3072
|
+
var dr = j(dt, 2);
|
|
3073
|
+
{
|
|
3074
|
+
var vr = (H) => {
|
|
3075
|
+
var ue = ga(), Ne = j(T(ue), 2), $e = T(Ne);
|
|
3076
|
+
{
|
|
3077
|
+
var Dt = (ee) => {
|
|
3078
|
+
var ke = ba();
|
|
3079
|
+
D(ee, ke);
|
|
3080
|
+
}, Se = (ee) => {
|
|
3081
|
+
var ke = wa();
|
|
3082
|
+
D(ee, ke);
|
|
3083
|
+
};
|
|
3084
|
+
ne($e, (ee) => {
|
|
3085
|
+
f(o) ? ee(Dt) : ee(Se, !1);
|
|
3086
|
+
});
|
|
3087
|
+
}
|
|
3088
|
+
de(() => Ne.disabled = f(o)), fe("click", Ne, () => Ke(null)), D(H, ue);
|
|
3084
3089
|
};
|
|
3085
|
-
|
|
3086
|
-
f(i),
|
|
3090
|
+
ne(dr, (H) => {
|
|
3091
|
+
f(c), f(i), A(() => f(c) && f(i).selectedMethod === "card") && H(vr);
|
|
3087
3092
|
});
|
|
3088
3093
|
}
|
|
3089
|
-
|
|
3090
|
-
() => kt((
|
|
3091
|
-
]),
|
|
3094
|
+
de((H) => It(F, 1, H), [
|
|
3095
|
+
() => kt((W(Re), W(C()), A(() => Re("reevit-modal-content", C().darkMode && "reevit-modal--dark"))))
|
|
3096
|
+
]), fe("click", $, me), fe("click", M, me), fe("keydown", M, (H) => H.key === "Escape" && me()), D(N, M);
|
|
3092
3097
|
};
|
|
3093
|
-
|
|
3094
|
-
|
|
3098
|
+
ne(O, (N) => {
|
|
3099
|
+
m() && N(Z);
|
|
3095
3100
|
});
|
|
3096
3101
|
}
|
|
3097
|
-
|
|
3098
|
-
() => (f(l),
|
|
3099
|
-
]),
|
|
3102
|
+
de((N) => cr(Ve, N), [
|
|
3103
|
+
() => (f(l), A(() => Object.entries(f(l)).map(([N, M]) => `${N}:${M}`).join(";")))
|
|
3104
|
+
]), D(e, Ve), sn(), a();
|
|
3100
3105
|
}
|
|
3101
3106
|
export {
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3107
|
+
ta as MobileMoneyForm,
|
|
3108
|
+
Zi as PaymentMethodSelector,
|
|
3109
|
+
Aa as ReevitAPIClient,
|
|
3110
|
+
xa as ReevitCheckout,
|
|
3111
|
+
Oa as cn,
|
|
3112
|
+
Ra as confirmStripePayment,
|
|
3113
|
+
Na as createInitialState,
|
|
3114
|
+
Da as createReevitClient,
|
|
3115
|
+
Bi as createReevitStore,
|
|
3116
|
+
ca as createStripeInstance,
|
|
3117
|
+
Fa as detectCountryFromCurrency,
|
|
3118
|
+
La as detectNetwork,
|
|
3119
|
+
Ua as formatAmount,
|
|
3120
|
+
ja as formatPhone,
|
|
3121
|
+
da as initiateMPesaSTKPush,
|
|
3122
|
+
ia as loadFlutterwaveScript,
|
|
3123
|
+
Ca as loadHubtelScript,
|
|
3124
|
+
sa as loadMonnifyScript,
|
|
3125
|
+
ra as loadPaystackScript,
|
|
3126
|
+
aa as loadStripeScript,
|
|
3127
|
+
ua as openFlutterwaveModal,
|
|
3128
|
+
la as openHubtelPopup,
|
|
3129
|
+
fa as openMonnifyModal,
|
|
3130
|
+
oa as openPaystackPopup,
|
|
3131
|
+
za as reevitReducer,
|
|
3132
|
+
Ha as validatePhone
|
|
3128
3133
|
};
|