@credenza3/passport-sui 0.1.5 → 0.1.6
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/App-CzJCZTZI.js +644 -0
- package/dist/App-CzJCZTZI.js.map +1 -0
- package/dist/Button-DdkN4ygx.js +69 -0
- package/dist/{Button-BsbTG8lO.js.map → Button-DdkN4ygx.js.map} +1 -1
- package/dist/{ButtonBack-DD2NyWwM.js → ButtonBack-DOt6efWB.js} +10 -8
- package/dist/{ButtonBack-DD2NyWwM.js.map → ButtonBack-DOt6efWB.js.map} +1 -1
- package/dist/ButtonLink-C3suV3YT.js +58 -0
- package/dist/{ButtonLink-Cs59sxMy.js.map → ButtonLink-C3suV3YT.js.map} +1 -1
- package/dist/ConfirmAccount-B0QimErt.js +210 -0
- package/dist/{ConfirmAccount-Lf9S0MhU.js.map → ConfirmAccount-B0QimErt.js.map} +1 -1
- package/dist/ContentHeader-DWeKFCbL.js +36 -0
- package/dist/{ContentHeader-CLn8GOLm.js.map → ContentHeader-DWeKFCbL.js.map} +1 -1
- package/dist/{Error-CxVJQIoH.js → Error-6xg8-wZJ.js} +101 -90
- package/dist/{Error-CxVJQIoH.js.map → Error-6xg8-wZJ.js.map} +1 -1
- package/dist/Input-CoBmMhni.js +62 -0
- package/dist/{Input-C-MLGjCj.js.map → Input-CoBmMhni.js.map} +1 -1
- package/dist/Label-B8iJ43l6.js +27 -0
- package/dist/{Label-Djj4wtpJ.js.map → Label-B8iJ43l6.js.map} +1 -1
- package/dist/Login-DsclMbeX.js +264 -0
- package/dist/Login-DsclMbeX.js.map +1 -0
- package/dist/Logout-ClD-Lgcx.js +96 -0
- package/dist/{Logout-S51UB3vm.js.map → Logout-ClD-Lgcx.js.map} +1 -1
- package/dist/Nav-DGxksgRd.js +669 -0
- package/dist/{Nav-DMRn61kA.js.map → Nav-DGxksgRd.js.map} +1 -1
- package/dist/{PassportId-B6Vps9D-.js → PassportId-5U1tRgrN.js} +298 -314
- package/dist/PassportId-5U1tRgrN.js.map +1 -0
- package/dist/Payment-DXvVU-Oe.js +989 -0
- package/dist/Payment-DXvVU-Oe.js.map +1 -0
- package/dist/PaymentResult-BDKwT5Sg.js +302 -0
- package/dist/{PaymentResult-GtndDFgP.js.map → PaymentResult-BDKwT5Sg.js.map} +1 -1
- package/dist/{Profile-DtWPPnzN.js → Profile-euztX9tl.js} +162 -151
- package/dist/{Profile-DtWPPnzN.js.map → Profile-euztX9tl.js.map} +1 -1
- package/dist/ProgressVideo-D4DPjIEy.js +126 -0
- package/dist/{ProgressVideo-CKJpaKXT.js.map → ProgressVideo-D4DPjIEy.js.map} +1 -1
- package/dist/{ProgressVideo.service-CuYcBU3B.js → ProgressVideo.service-BK7Nt-Vk.js} +2 -2
- package/dist/{ProgressVideo.service-CuYcBU3B.js.map → ProgressVideo.service-BK7Nt-Vk.js.map} +1 -1
- package/dist/RichAlert-D10QwVqC.js +139 -0
- package/dist/{RichAlert-5BL3Ix5z.js.map → RichAlert-D10QwVqC.js.map} +1 -1
- package/dist/{Scanner-BmtAhTU8.js → Scanner-8y4vkfL1.js} +46 -46
- package/dist/{Scanner-BmtAhTU8.js.map → Scanner-8y4vkfL1.js.map} +1 -1
- package/dist/SendTokens-DSJTklJ_.js +351 -0
- package/dist/SendTokens-DSJTklJ_.js.map +1 -0
- package/dist/Sign-CnrilrlB.js +108 -0
- package/dist/{Sign-BGfwNmPK.js.map → Sign-CnrilrlB.js.map} +1 -1
- package/dist/{Stripe.service-DVO5PxAg.js → Stripe.service-DZue_N62.js} +15 -16
- package/dist/{Stripe.service-DVO5PxAg.js.map → Stripe.service-DZue_N62.js.map} +1 -1
- package/dist/UpdateProfile-DVYtN4B3.js +522 -0
- package/dist/UpdateProfile-DVYtN4B3.js.map +1 -0
- package/dist/UserInfo-D8COK5lo.js +151 -0
- package/dist/{UserInfo-DWIc3eJd.js.map → UserInfo-D8COK5lo.js.map} +1 -1
- package/dist/Wallet-C--KgjFi.js +258 -0
- package/dist/{Wallet-D2UW1K77.js.map → Wallet-C--KgjFi.js.map} +1 -1
- package/dist/each-C50_uszW.js +202 -0
- package/dist/each-C50_uszW.js.map +1 -0
- package/dist/event-modifiers-DpFXHa6q.js.map +1 -1
- package/dist/html-DTfBoa9t.js +53 -0
- package/dist/html-DTfBoa9t.js.map +1 -0
- package/dist/index-DmO4Bf6j.js +43222 -0
- package/dist/index-DmO4Bf6j.js.map +1 -0
- package/dist/{index-client-C2b3pj6G.js → index-client-BARQdFBp.js} +5 -5
- package/dist/index-client-BARQdFBp.js.map +1 -0
- package/dist/{input-DSquQZrj.js → input-wkVwDWFH.js} +3 -3
- package/dist/{input-DSquQZrj.js.map → input-wkVwDWFH.js.map} +1 -1
- package/dist/legacy-BgObIK2n.js +1038 -0
- package/dist/legacy-BgObIK2n.js.map +1 -0
- package/dist/main-CJLmsNB-.js.map +1 -1
- package/dist/passport.es.js +3 -3
- package/dist/passport.umd.js +837 -231
- package/dist/passport.umd.js.map +1 -1
- package/dist/{socket-io-DC-dPxeO.js → socket-io-BNYia6TN.js} +2 -2
- package/dist/{socket-io-DC-dPxeO.js.map → socket-io-BNYia6TN.js.map} +1 -1
- package/dist/types/Passport.d.ts +1 -0
- package/dist/types/passport/auth.d.ts +2 -4
- package/package.json +23 -23
- package/dist/App-BAFJP3YE.js +0 -629
- package/dist/App-BAFJP3YE.js.map +0 -1
- package/dist/Button-BsbTG8lO.js +0 -69
- package/dist/ButtonLink-Cs59sxMy.js +0 -58
- package/dist/ConfirmAccount-Lf9S0MhU.js +0 -208
- package/dist/ContentHeader-CLn8GOLm.js +0 -36
- package/dist/Input-C-MLGjCj.js +0 -68
- package/dist/Label-Djj4wtpJ.js +0 -27
- package/dist/Login-C7pe83sW.js +0 -314
- package/dist/Login-C7pe83sW.js.map +0 -1
- package/dist/Logout-S51UB3vm.js +0 -84
- package/dist/Nav-DMRn61kA.js +0 -644
- package/dist/PassportId-B6Vps9D-.js.map +0 -1
- package/dist/Payment-BaiScVf4.js +0 -975
- package/dist/Payment-BaiScVf4.js.map +0 -1
- package/dist/PaymentResult-GtndDFgP.js +0 -285
- package/dist/ProgressVideo-CKJpaKXT.js +0 -121
- package/dist/RichAlert-5BL3Ix5z.js +0 -121
- package/dist/SendTokens-BUM-slmS.js +0 -333
- package/dist/SendTokens-BUM-slmS.js.map +0 -1
- package/dist/Sign-BGfwNmPK.js +0 -87
- package/dist/UpdateProfile-BlHz4MuU.js +0 -508
- package/dist/UpdateProfile-BlHz4MuU.js.map +0 -1
- package/dist/UserInfo-DWIc3eJd.js +0 -135
- package/dist/Wallet-D2UW1K77.js +0 -242
- package/dist/each-Dqze57Ms.js +0 -205
- package/dist/each-Dqze57Ms.js.map +0 -1
- package/dist/html-0_BSI5XK.js +0 -35
- package/dist/html-0_BSI5XK.js.map +0 -1
- package/dist/index-DfsKJkF5.js +0 -51
- package/dist/index-DfsKJkF5.js.map +0 -1
- package/dist/index-DjqVR0UB.js +0 -33828
- package/dist/index-DjqVR0UB.js.map +0 -1
- package/dist/index-client-C2b3pj6G.js.map +0 -1
- package/dist/legacy-CqcDNlD_.js +0 -956
- package/dist/legacy-CqcDNlD_.js.map +0 -1
- package/dist/types/app/pages/login/authMethods.helper.d.ts +0 -1
package/dist/Wallet-D2UW1K77.js
DELETED
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { c as O, p as k, g as z, t as M, k as j, v as W, e as q, b as P, i as F, d as E, u as N, w as Q } from "./legacy-CqcDNlD_.js";
|
|
2
|
-
import { v as A, m as I, B as V, D as b, C as S, F as H, G, J as u, A as U, u as B, I as y, z as X, w as $, x as ee, y as te, L as D, M as ae, Z as re, R as J, P as K, O as se, a_ as ne } from "./index-DjqVR0UB.js";
|
|
3
|
-
import { a as oe } from "./index-client-C2b3pj6G.js";
|
|
4
|
-
import { C as le } from "./ContentHeader-CLn8GOLm.js";
|
|
5
|
-
import { B as L } from "./Button-BsbTG8lO.js";
|
|
6
|
-
import { e as ce, i as ue } from "./each-Dqze57Ms.js";
|
|
7
|
-
import { b as ie } from "./input-DSquQZrj.js";
|
|
8
|
-
import { a as de } from "./index-DfsKJkF5.js";
|
|
9
|
-
var ve = M("<button> </button>"), fe = M('<div class="crtw-text-xs crtw-text-gray-400 crtw-mt-1"> </div>'), me = M('<input class="crtw-appearance-none focus:crtw-outline-0 crtw-w-full crtw-h-9 crtw-mt-4 crtw-px-5 crtw-text-base crtw-border crtw-border-gray-300 crtw-rounded focus:crtw-border-blue-800 hover:crtw-bg-gray-100" type="number" min="1" max="100"> <!>', 1), pe = M('<div><div class="crtw-flex crtw-flex-col">Select amount <div class="crtw-inline-flex crtw-w-full" role="group"></div> <!></div></div>');
|
|
10
|
-
function R(m, s) {
|
|
11
|
-
if (new.target) return O({ component: R, ...m });
|
|
12
|
-
A(s, !1);
|
|
13
|
-
let n = k(s, "selected", 12, void 0), o = k(s, "minStoredValueToPurchase", 12, 0), i = k(s, "maxStoredValueToPurchase", 12, 100), g = I(!1), p = I(n());
|
|
14
|
-
const _ = [
|
|
15
|
-
{ value: "10", name: "10" },
|
|
16
|
-
{ value: "25", name: "25" },
|
|
17
|
-
{ value: "50", name: "50" },
|
|
18
|
-
{ value: "CUSTOM", name: "Custom" }
|
|
19
|
-
], C = (e) => {
|
|
20
|
-
if (y(p, e), e === "CUSTOM") {
|
|
21
|
-
y(g, !0), n("");
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
y(g, !1), n(e);
|
|
25
|
-
}, T = (e) => {
|
|
26
|
-
const t = e.target;
|
|
27
|
-
if (t.value = t.value.replace(/[,.-]/g, ""), +t.value > i()) {
|
|
28
|
-
n(i().toString());
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
n(t.value);
|
|
32
|
-
};
|
|
33
|
-
z();
|
|
34
|
-
var l = pe(), w = V(l), d = b(V(w));
|
|
35
|
-
ce(d, 5, () => _, ue, (e, t) => {
|
|
36
|
-
var a = ve();
|
|
37
|
-
let r;
|
|
38
|
-
var f = V(a, !0);
|
|
39
|
-
S(a), H(
|
|
40
|
-
(c) => {
|
|
41
|
-
r = j(a, 1, "crtw-w-full crtw-h-[30px] crtw-text-sm crtw-border hover:crtw-bg-gray-100 hover:crtw-text-blue-800 first:crtw-rounded-l last:crtw-rounded-r", null, r, c), W(f, u(t).name);
|
|
42
|
-
},
|
|
43
|
-
[
|
|
44
|
-
() => ({
|
|
45
|
-
"crtw-border-blue-800": u(t).value === u(p),
|
|
46
|
-
"crtw-z-10": u(t).value === u(p)
|
|
47
|
-
})
|
|
48
|
-
],
|
|
49
|
-
G
|
|
50
|
-
), q("click", a, () => C(u(t).value)), P(e, a);
|
|
51
|
-
}), S(d);
|
|
52
|
-
var v = b(d, 2);
|
|
53
|
-
{
|
|
54
|
-
var x = (e) => {
|
|
55
|
-
var t = me(), a = X(t);
|
|
56
|
-
Q(a);
|
|
57
|
-
var r = b(a, 2);
|
|
58
|
-
{
|
|
59
|
-
var f = (c) => {
|
|
60
|
-
var h = fe(), Z = V(h);
|
|
61
|
-
S(h), H(() => W(Z, `Minimum purchase amount is ${o() ?? ""}`)), P(c, h);
|
|
62
|
-
};
|
|
63
|
-
F(r, (c) => {
|
|
64
|
-
o() && c(f);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
ie(a, n), q("input", a, T), P(e, t);
|
|
68
|
-
};
|
|
69
|
-
F(v, (e) => {
|
|
70
|
-
u(g) && e(x);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return S(w), S(l), P(m, l), U({
|
|
74
|
-
get selected() {
|
|
75
|
-
return n();
|
|
76
|
-
},
|
|
77
|
-
set selected(e) {
|
|
78
|
-
n(e), B();
|
|
79
|
-
},
|
|
80
|
-
get minStoredValueToPurchase() {
|
|
81
|
-
return o();
|
|
82
|
-
},
|
|
83
|
-
set minStoredValueToPurchase(e) {
|
|
84
|
-
o(e), B();
|
|
85
|
-
},
|
|
86
|
-
get maxStoredValueToPurchase() {
|
|
87
|
-
return i();
|
|
88
|
-
},
|
|
89
|
-
set maxStoredValueToPurchase(e) {
|
|
90
|
-
i(e), B();
|
|
91
|
-
},
|
|
92
|
-
$set: N,
|
|
93
|
-
$on: (e, t) => E(s, e, t)
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
var we = M('<div class="crtw-w-full crtw-px-2.5"><!> <!> <div class="crtw-h-4"></div> <!> <div class="crtw-m-3.5"></div> <!></div>');
|
|
97
|
-
function Y(m, s) {
|
|
98
|
-
if (new.target) return O({ component: Y, ...m });
|
|
99
|
-
A(s, !1);
|
|
100
|
-
const n = I();
|
|
101
|
-
let o = k(s, "selected", 12), i = k(s, "options", 12), {
|
|
102
|
-
title: g,
|
|
103
|
-
description: p,
|
|
104
|
-
onSendClick: _,
|
|
105
|
-
sendValueButtonText: C,
|
|
106
|
-
onPaymentClick: T,
|
|
107
|
-
minStoredValueToPurchase: l = 0,
|
|
108
|
-
maxStoredValueToPurchase: w = 100
|
|
109
|
-
} = i();
|
|
110
|
-
$(() => ee(i()), () => {
|
|
111
|
-
y(n, i().isSendValueDisabled);
|
|
112
|
-
}), te(), z();
|
|
113
|
-
var d = we(), v = V(d);
|
|
114
|
-
le(v, { text: g, description: p });
|
|
115
|
-
var x = b(v, 2);
|
|
116
|
-
R(x, {
|
|
117
|
-
minStoredValueToPurchase: l,
|
|
118
|
-
maxStoredValueToPurchase: w,
|
|
119
|
-
get selected() {
|
|
120
|
-
return o();
|
|
121
|
-
},
|
|
122
|
-
set selected(r) {
|
|
123
|
-
o(r);
|
|
124
|
-
},
|
|
125
|
-
$$legacy: !0
|
|
126
|
-
});
|
|
127
|
-
var e = b(x, 4);
|
|
128
|
-
const t = G(() => !o() || !!l && +o() < l);
|
|
129
|
-
L(e, {
|
|
130
|
-
text: "Confirm purchase",
|
|
131
|
-
get disabled() {
|
|
132
|
-
return u(t);
|
|
133
|
-
},
|
|
134
|
-
onClick: T
|
|
135
|
-
});
|
|
136
|
-
var a = b(e, 4);
|
|
137
|
-
return L(a, {
|
|
138
|
-
onClick: _,
|
|
139
|
-
text: C,
|
|
140
|
-
get disabled() {
|
|
141
|
-
return u(n);
|
|
142
|
-
}
|
|
143
|
-
}), S(d), P(m, d), U({
|
|
144
|
-
get selected() {
|
|
145
|
-
return o();
|
|
146
|
-
},
|
|
147
|
-
set selected(r) {
|
|
148
|
-
o(r), B();
|
|
149
|
-
},
|
|
150
|
-
get options() {
|
|
151
|
-
return i();
|
|
152
|
-
},
|
|
153
|
-
set options(r) {
|
|
154
|
-
i(r), B();
|
|
155
|
-
},
|
|
156
|
-
$set: N,
|
|
157
|
-
$on: (r, f) => E(s, r, f)
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function ge(m, s) {
|
|
161
|
-
if (new.target) return O({ component: ge, ...m });
|
|
162
|
-
A(s, !1);
|
|
163
|
-
var n = this && this.__awaiter || function(l, w, d, v) {
|
|
164
|
-
function x(e) {
|
|
165
|
-
return e instanceof d ? e : new d(function(t) {
|
|
166
|
-
t(e);
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
return new (d || (d = Promise))(function(e, t) {
|
|
170
|
-
function a(c) {
|
|
171
|
-
try {
|
|
172
|
-
f(v.next(c));
|
|
173
|
-
} catch (h) {
|
|
174
|
-
t(h);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function r(c) {
|
|
178
|
-
try {
|
|
179
|
-
f(v.throw(c));
|
|
180
|
-
} catch (h) {
|
|
181
|
-
t(h);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
function f(c) {
|
|
185
|
-
c.done ? e(c.value) : x(c.value).then(a, r);
|
|
186
|
-
}
|
|
187
|
-
f((v = v.apply(l, w || [])).next());
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
const { getBalance: o } = D(ae), {
|
|
191
|
-
maxStoredValueToPurchase: i,
|
|
192
|
-
minStoredValueToPurchase: g
|
|
193
|
-
} = de(D(re).clientId);
|
|
194
|
-
let p = I("");
|
|
195
|
-
oe(() => n(void 0, void 0, void 0, function* () {
|
|
196
|
-
y(p, yield o());
|
|
197
|
-
}));
|
|
198
|
-
let _ = I("10");
|
|
199
|
-
const C = () => {
|
|
200
|
-
se.set({
|
|
201
|
-
subtitle: "Purchase stored value",
|
|
202
|
-
payments: { credenzaStoredValue: { disabled: !0 } },
|
|
203
|
-
assets: [
|
|
204
|
-
{
|
|
205
|
-
packageId: D(ne),
|
|
206
|
-
type: "cred",
|
|
207
|
-
amount: +u(_)
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
}), J.set(K.PAYMENT);
|
|
211
|
-
};
|
|
212
|
-
z();
|
|
213
|
-
const T = G(() => ({
|
|
214
|
-
title: "buy stored value",
|
|
215
|
-
description: "Buy/Send stored value for purchases throughout this website.",
|
|
216
|
-
onSendClick: () => J.set(K.SEND_TOKENS),
|
|
217
|
-
sendValueButtonText: "Send stored value",
|
|
218
|
-
isSendValueDisabled: !u(p),
|
|
219
|
-
onPaymentClick: C,
|
|
220
|
-
maxStoredValueToPurchase: i,
|
|
221
|
-
minStoredValueToPurchase: g
|
|
222
|
-
}));
|
|
223
|
-
return Y(m, {
|
|
224
|
-
get options() {
|
|
225
|
-
return u(T);
|
|
226
|
-
},
|
|
227
|
-
get selected() {
|
|
228
|
-
return u(_);
|
|
229
|
-
},
|
|
230
|
-
set selected(l) {
|
|
231
|
-
y(_, l);
|
|
232
|
-
},
|
|
233
|
-
$$legacy: !0
|
|
234
|
-
}), U({
|
|
235
|
-
$set: N,
|
|
236
|
-
$on: (l, w) => E(s, l, w)
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
export {
|
|
240
|
-
ge as default
|
|
241
|
-
};
|
|
242
|
-
//# sourceMappingURL=Wallet-D2UW1K77.js.map
|
package/dist/each-Dqze57Ms.js
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { s as S, h as x, a4 as ee, a3 as ae, a as re, b as ne, J as B, G as fe, H as ie, r as G, d as k, g as w, ac as le, o as F, p as K, t as se, bj as P, ag as Q, a2 as ue, m as te, f as J, bk as D, q as ve, $ as U, bl as M, bm as de, bn as q, e as $, bo as _e, af as oe, bp as ce, aX as he, bq as Ee, aa as pe } from "./index-DjqVR0UB.js";
|
|
2
|
-
function Ie(l, e) {
|
|
3
|
-
return e;
|
|
4
|
-
}
|
|
5
|
-
function be(l, e, a, u) {
|
|
6
|
-
for (var v = [], _ = e.length, t = 0; t < _; t++)
|
|
7
|
-
_e(e[t].e, v, !0);
|
|
8
|
-
var o = _ > 0 && v.length === 0 && a !== null;
|
|
9
|
-
if (o) {
|
|
10
|
-
var b = (
|
|
11
|
-
/** @type {Element} */
|
|
12
|
-
/** @type {Element} */
|
|
13
|
-
a.parentNode
|
|
14
|
-
);
|
|
15
|
-
oe(b), b.append(
|
|
16
|
-
/** @type {Element} */
|
|
17
|
-
a
|
|
18
|
-
), u.clear(), I(l, e[0].prev, e[_ - 1].next);
|
|
19
|
-
}
|
|
20
|
-
ce(v, () => {
|
|
21
|
-
for (var h = 0; h < _; h++) {
|
|
22
|
-
var d = e[h];
|
|
23
|
-
o || (u.delete(d.k), I(l, d.prev, d.next)), he(d.e, !o);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function xe(l, e, a, u, v, _ = null) {
|
|
28
|
-
var t = l, o = { flags: e, items: /* @__PURE__ */ new Map(), first: null }, b = (e & P) !== 0;
|
|
29
|
-
if (b) {
|
|
30
|
-
var h = (
|
|
31
|
-
/** @type {Element} */
|
|
32
|
-
l
|
|
33
|
-
);
|
|
34
|
-
t = x ? S(
|
|
35
|
-
/** @type {Comment | Text} */
|
|
36
|
-
ee(h)
|
|
37
|
-
) : h.appendChild(ae());
|
|
38
|
-
}
|
|
39
|
-
x && re();
|
|
40
|
-
var d = null, C = !1, f = fe(() => {
|
|
41
|
-
var s = a();
|
|
42
|
-
return ue(s) ? s : s == null ? [] : Q(s);
|
|
43
|
-
});
|
|
44
|
-
ne(() => {
|
|
45
|
-
var s = B(f), r = s.length;
|
|
46
|
-
if (C && r === 0)
|
|
47
|
-
return;
|
|
48
|
-
C = r === 0;
|
|
49
|
-
let T = !1;
|
|
50
|
-
if (x) {
|
|
51
|
-
var E = (
|
|
52
|
-
/** @type {Comment} */
|
|
53
|
-
t.data === ie
|
|
54
|
-
);
|
|
55
|
-
E !== (r === 0) && (t = G(), S(t), k(!1), T = !0);
|
|
56
|
-
}
|
|
57
|
-
if (x) {
|
|
58
|
-
for (var p = null, A, c = 0; c < r; c++) {
|
|
59
|
-
if (w.nodeType === 8 && /** @type {Comment} */
|
|
60
|
-
w.data === le) {
|
|
61
|
-
t = /** @type {Comment} */
|
|
62
|
-
w, T = !0, k(!1);
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
var n = s[c], i = u(n, c);
|
|
66
|
-
A = W(
|
|
67
|
-
w,
|
|
68
|
-
o,
|
|
69
|
-
p,
|
|
70
|
-
null,
|
|
71
|
-
n,
|
|
72
|
-
i,
|
|
73
|
-
c,
|
|
74
|
-
v,
|
|
75
|
-
e,
|
|
76
|
-
a
|
|
77
|
-
), o.items.set(i, A), p = A;
|
|
78
|
-
}
|
|
79
|
-
r > 0 && S(G());
|
|
80
|
-
}
|
|
81
|
-
x || Ae(s, o, t, v, e, u, a), _ !== null && (r === 0 ? d ? F(d) : d = K(() => _(t)) : d !== null && se(d, () => {
|
|
82
|
-
d = null;
|
|
83
|
-
})), T && k(!0), B(f);
|
|
84
|
-
}), x && (t = w);
|
|
85
|
-
}
|
|
86
|
-
function Ae(l, e, a, u, v, _, t) {
|
|
87
|
-
var L, O, V, X;
|
|
88
|
-
var o = (v & de) !== 0, b = (v & (q | M)) !== 0, h = l.length, d = e.items, C = e.first, f = C, s, r = null, T, E = [], p = [], A, c, n, i;
|
|
89
|
-
if (o)
|
|
90
|
-
for (i = 0; i < h; i += 1)
|
|
91
|
-
A = l[i], c = _(A, i), n = d.get(c), n !== void 0 && ((L = n.a) == null || L.measure(), (T ?? (T = /* @__PURE__ */ new Set())).add(n));
|
|
92
|
-
for (i = 0; i < h; i += 1) {
|
|
93
|
-
if (A = l[i], c = _(A, i), n = d.get(c), n === void 0) {
|
|
94
|
-
var Z = f ? (
|
|
95
|
-
/** @type {TemplateNode} */
|
|
96
|
-
f.e.nodes_start
|
|
97
|
-
) : a;
|
|
98
|
-
r = W(
|
|
99
|
-
Z,
|
|
100
|
-
e,
|
|
101
|
-
r,
|
|
102
|
-
r === null ? e.first : r.next,
|
|
103
|
-
A,
|
|
104
|
-
c,
|
|
105
|
-
i,
|
|
106
|
-
u,
|
|
107
|
-
v,
|
|
108
|
-
t
|
|
109
|
-
), d.set(c, r), E = [], p = [], f = r.next;
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
if (b && Te(n, A, i, v), (n.e.f & D) !== 0 && (F(n.e), o && ((O = n.a) == null || O.unfix(), (T ?? (T = /* @__PURE__ */ new Set())).delete(n))), n !== f) {
|
|
113
|
-
if (s !== void 0 && s.has(n)) {
|
|
114
|
-
if (E.length < p.length) {
|
|
115
|
-
var H = p[0], m;
|
|
116
|
-
r = H.prev;
|
|
117
|
-
var y = E[0], N = E[E.length - 1];
|
|
118
|
-
for (m = 0; m < E.length; m += 1)
|
|
119
|
-
z(E[m], H, a);
|
|
120
|
-
for (m = 0; m < p.length; m += 1)
|
|
121
|
-
s.delete(p[m]);
|
|
122
|
-
I(e, y.prev, N.next), I(e, r, y), I(e, N, H), f = H, r = N, i -= 1, E = [], p = [];
|
|
123
|
-
} else
|
|
124
|
-
s.delete(n), z(n, f, a), I(e, n.prev, n.next), I(e, n, r === null ? e.first : r.next), I(e, r, n), r = n;
|
|
125
|
-
continue;
|
|
126
|
-
}
|
|
127
|
-
for (E = [], p = []; f !== null && f.k !== c; )
|
|
128
|
-
(f.e.f & D) === 0 && (s ?? (s = /* @__PURE__ */ new Set())).add(f), p.push(f), f = f.next;
|
|
129
|
-
if (f === null)
|
|
130
|
-
continue;
|
|
131
|
-
n = f;
|
|
132
|
-
}
|
|
133
|
-
E.push(n), r = n, f = n.next;
|
|
134
|
-
}
|
|
135
|
-
if (f !== null || s !== void 0) {
|
|
136
|
-
for (var g = s === void 0 ? [] : Q(s); f !== null; )
|
|
137
|
-
(f.e.f & D) === 0 && g.push(f), f = f.next;
|
|
138
|
-
var R = g.length;
|
|
139
|
-
if (R > 0) {
|
|
140
|
-
var j = (v & P) !== 0 && h === 0 ? a : null;
|
|
141
|
-
if (o) {
|
|
142
|
-
for (i = 0; i < R; i += 1)
|
|
143
|
-
(V = g[i].a) == null || V.measure();
|
|
144
|
-
for (i = 0; i < R; i += 1)
|
|
145
|
-
(X = g[i].a) == null || X.fix();
|
|
146
|
-
}
|
|
147
|
-
be(e, g, j, d);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
o && ve(() => {
|
|
151
|
-
var Y;
|
|
152
|
-
if (T !== void 0)
|
|
153
|
-
for (n of T)
|
|
154
|
-
(Y = n.a) == null || Y.apply();
|
|
155
|
-
}), U.first = e.first && e.first.e, U.last = r && r.e;
|
|
156
|
-
}
|
|
157
|
-
function Te(l, e, a, u) {
|
|
158
|
-
(u & q) !== 0 && $(l.v, e), (u & M) !== 0 ? $(
|
|
159
|
-
/** @type {Value<number>} */
|
|
160
|
-
l.i,
|
|
161
|
-
a
|
|
162
|
-
) : l.i = a;
|
|
163
|
-
}
|
|
164
|
-
function W(l, e, a, u, v, _, t, o, b, h) {
|
|
165
|
-
var d = (b & q) !== 0, C = (b & Ee) === 0, f = d ? C ? te(v) : J(v) : v, s = (b & M) === 0 ? t : J(t), r = {
|
|
166
|
-
i: s,
|
|
167
|
-
v: f,
|
|
168
|
-
k: _,
|
|
169
|
-
a: null,
|
|
170
|
-
// @ts-expect-error
|
|
171
|
-
e: null,
|
|
172
|
-
prev: a,
|
|
173
|
-
next: u
|
|
174
|
-
};
|
|
175
|
-
try {
|
|
176
|
-
return r.e = K(() => o(l, f, s, h), x), r.e.prev = a && a.e, r.e.next = u && u.e, a === null ? e.first = r : (a.next = r, a.e.next = r.e), u !== null && (u.prev = r, u.e.prev = r.e), r;
|
|
177
|
-
} finally {
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
function z(l, e, a) {
|
|
181
|
-
for (var u = l.next ? (
|
|
182
|
-
/** @type {TemplateNode} */
|
|
183
|
-
l.next.e.nodes_start
|
|
184
|
-
) : a, v = e ? (
|
|
185
|
-
/** @type {TemplateNode} */
|
|
186
|
-
e.e.nodes_start
|
|
187
|
-
) : a, _ = (
|
|
188
|
-
/** @type {TemplateNode} */
|
|
189
|
-
l.e.nodes_start
|
|
190
|
-
); _ !== u; ) {
|
|
191
|
-
var t = (
|
|
192
|
-
/** @type {TemplateNode} */
|
|
193
|
-
pe(_)
|
|
194
|
-
);
|
|
195
|
-
v.before(_), _ = t;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
function I(l, e, a) {
|
|
199
|
-
e === null ? l.first = a : (e.next = a, e.e.next = a && a.e), a !== null && (a.prev = e, a.e.prev = e && e.e);
|
|
200
|
-
}
|
|
201
|
-
export {
|
|
202
|
-
xe as e,
|
|
203
|
-
Ie as i
|
|
204
|
-
};
|
|
205
|
-
//# sourceMappingURL=each-Dqze57Ms.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"each-Dqze57Ms.js","sources":["../../../node_modules/.pnpm/svelte@5.27.0/node_modules/svelte/src/internal/client/dom/blocks/each.js"],"sourcesContent":["/** @import { EachItem, EachState, Effect, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */\nimport {\n\tEACH_INDEX_REACTIVE,\n\tEACH_IS_ANIMATED,\n\tEACH_IS_CONTROLLED,\n\tEACH_ITEM_IMMUTABLE,\n\tEACH_ITEM_REACTIVE,\n\tHYDRATION_END,\n\tHYDRATION_START_ELSE\n} from '../../../../constants.js';\nimport {\n\thydrate_next,\n\thydrate_node,\n\thydrating,\n\tremove_nodes,\n\tset_hydrate_node,\n\tset_hydrating\n} from '../hydration.js';\nimport {\n\tclear_text_content,\n\tcreate_text,\n\tget_first_child,\n\tget_next_sibling\n} from '../operations.js';\nimport {\n\tblock,\n\tbranch,\n\tdestroy_effect,\n\trun_out_transitions,\n\tpause_children,\n\tpause_effect,\n\tresume_effect\n} from '../../reactivity/effects.js';\nimport { source, mutable_source, internal_set } from '../../reactivity/sources.js';\nimport { array_from, is_array } from '../../../shared/utils.js';\nimport { INERT } from '../../constants.js';\nimport { queue_micro_task } from '../task.js';\nimport { active_effect, active_reaction, get } from '../../runtime.js';\nimport { DEV } from 'esm-env';\nimport { derived_safe_equal } from '../../reactivity/deriveds.js';\n\n/**\n * The row of a keyed each block that is currently updating. We track this\n * so that `animate:` directives have something to attach themselves to\n * @type {EachItem | null}\n */\nexport let current_each_item = null;\n\n/** @param {EachItem | null} item */\nexport function set_current_each_item(item) {\n\tcurrent_each_item = item;\n}\n\n/**\n * @param {any} _\n * @param {number} i\n */\nexport function index(_, i) {\n\treturn i;\n}\n\n/**\n * Pause multiple effects simultaneously, and coordinate their\n * subsequent destruction. Used in each blocks\n * @param {EachState} state\n * @param {EachItem[]} items\n * @param {null | Node} controlled_anchor\n * @param {Map<any, EachItem>} items_map\n */\nfunction pause_effects(state, items, controlled_anchor, items_map) {\n\t/** @type {TransitionManager[]} */\n\tvar transitions = [];\n\tvar length = items.length;\n\n\tfor (var i = 0; i < length; i++) {\n\t\tpause_children(items[i].e, transitions, true);\n\t}\n\n\tvar is_controlled = length > 0 && transitions.length === 0 && controlled_anchor !== null;\n\t// If we have a controlled anchor, it means that the each block is inside a single\n\t// DOM element, so we can apply a fast-path for clearing the contents of the element.\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (\n\t\t\t/** @type {Element} */ (controlled_anchor).parentNode\n\t\t);\n\t\tclear_text_content(parent_node);\n\t\tparent_node.append(/** @type {Element} */ (controlled_anchor));\n\t\titems_map.clear();\n\t\tlink(state, items[0].prev, items[length - 1].next);\n\t}\n\n\trun_out_transitions(transitions, () => {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tvar item = items[i];\n\t\t\tif (!is_controlled) {\n\t\t\t\titems_map.delete(item.k);\n\t\t\t\tlink(state, item.prev, item.next);\n\t\t\t}\n\t\t\tdestroy_effect(item.e, !is_controlled);\n\t\t}\n\t});\n}\n\n/**\n * @template V\n * @param {Element | Comment} node The next sibling node, or the parent node if this is a 'controlled' block\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @param {(value: V, index: number) => any} get_key\n * @param {(anchor: Node, item: MaybeSource<V>, index: MaybeSource<number>) => void} render_fn\n * @param {null | ((anchor: Node) => void)} fallback_fn\n * @returns {void}\n */\nexport function each(node, flags, get_collection, get_key, render_fn, fallback_fn = null) {\n\tvar anchor = node;\n\n\t/** @type {EachState} */\n\tvar state = { flags, items: new Map(), first: null };\n\n\tvar is_controlled = (flags & EACH_IS_CONTROLLED) !== 0;\n\n\tif (is_controlled) {\n\t\tvar parent_node = /** @type {Element} */ (node);\n\n\t\tanchor = hydrating\n\t\t\t? set_hydrate_node(/** @type {Comment | Text} */ (get_first_child(parent_node)))\n\t\t\t: parent_node.appendChild(create_text());\n\t}\n\n\tif (hydrating) {\n\t\thydrate_next();\n\t}\n\n\t/** @type {Effect | null} */\n\tvar fallback = null;\n\n\tvar was_empty = false;\n\n\t// TODO: ideally we could use derived for runes mode but because of the ability\n\t// to use a store which can be mutated, we can't do that here as mutating a store\n\t// will still result in the collection array being the same from the store\n\tvar each_array = derived_safe_equal(() => {\n\t\tvar collection = get_collection();\n\n\t\treturn is_array(collection) ? collection : collection == null ? [] : array_from(collection);\n\t});\n\n\tblock(() => {\n\t\tvar array = get(each_array);\n\t\tvar length = array.length;\n\n\t\tif (was_empty && length === 0) {\n\t\t\t// ignore updates if the array is empty,\n\t\t\t// and it already was empty on previous run\n\t\t\treturn;\n\t\t}\n\t\twas_empty = length === 0;\n\n\t\t/** `true` if there was a hydration mismatch. Needs to be a `let` or else it isn't treeshaken out */\n\t\tlet mismatch = false;\n\n\t\tif (hydrating) {\n\t\t\tvar is_else = /** @type {Comment} */ (anchor).data === HYDRATION_START_ELSE;\n\n\t\t\tif (is_else !== (length === 0)) {\n\t\t\t\t// hydration mismatch — remove the server-rendered DOM and start over\n\t\t\t\tanchor = remove_nodes();\n\n\t\t\t\tset_hydrate_node(anchor);\n\t\t\t\tset_hydrating(false);\n\t\t\t\tmismatch = true;\n\t\t\t}\n\t\t}\n\n\t\t// this is separate to the previous block because `hydrating` might change\n\t\tif (hydrating) {\n\t\t\t/** @type {EachItem | null} */\n\t\t\tvar prev = null;\n\n\t\t\t/** @type {EachItem} */\n\t\t\tvar item;\n\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\tif (\n\t\t\t\t\thydrate_node.nodeType === 8 &&\n\t\t\t\t\t/** @type {Comment} */ (hydrate_node).data === HYDRATION_END\n\t\t\t\t) {\n\t\t\t\t\t// The server rendered fewer items than expected,\n\t\t\t\t\t// so break out and continue appending non-hydrated items\n\t\t\t\t\tanchor = /** @type {Comment} */ (hydrate_node);\n\t\t\t\t\tmismatch = true;\n\t\t\t\t\tset_hydrating(false);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tvar value = array[i];\n\t\t\t\tvar key = get_key(value, i);\n\t\t\t\titem = create_item(\n\t\t\t\t\thydrate_node,\n\t\t\t\t\tstate,\n\t\t\t\t\tprev,\n\t\t\t\t\tnull,\n\t\t\t\t\tvalue,\n\t\t\t\t\tkey,\n\t\t\t\t\ti,\n\t\t\t\t\trender_fn,\n\t\t\t\t\tflags,\n\t\t\t\t\tget_collection\n\t\t\t\t);\n\t\t\t\tstate.items.set(key, item);\n\n\t\t\t\tprev = item;\n\t\t\t}\n\n\t\t\t// remove excess nodes\n\t\t\tif (length > 0) {\n\t\t\t\tset_hydrate_node(remove_nodes());\n\t\t\t}\n\t\t}\n\n\t\tif (!hydrating) {\n\t\t\treconcile(array, state, anchor, render_fn, flags, get_key, get_collection);\n\t\t}\n\n\t\tif (fallback_fn !== null) {\n\t\t\tif (length === 0) {\n\t\t\t\tif (fallback) {\n\t\t\t\t\tresume_effect(fallback);\n\t\t\t\t} else {\n\t\t\t\t\tfallback = branch(() => fallback_fn(anchor));\n\t\t\t\t}\n\t\t\t} else if (fallback !== null) {\n\t\t\t\tpause_effect(fallback, () => {\n\t\t\t\t\tfallback = null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (mismatch) {\n\t\t\t// continue in hydration mode\n\t\t\tset_hydrating(true);\n\t\t}\n\n\t\t// When we mount the each block for the first time, the collection won't be\n\t\t// connected to this effect as the effect hasn't finished running yet and its deps\n\t\t// won't be assigned. However, it's possible that when reconciling the each block\n\t\t// that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the\n\t\t// collection again can provide consistency to the reactive graph again as the deriveds\n\t\t// will now be `CLEAN`.\n\t\tget(each_array);\n\t});\n\n\tif (hydrating) {\n\t\tanchor = hydrate_node;\n\t}\n}\n\n/**\n * Add, remove, or reorder items output by an each block as its input changes\n * @template V\n * @param {Array<V>} array\n * @param {EachState} state\n * @param {Element | Comment | Text} anchor\n * @param {(anchor: Node, item: MaybeSource<V>, index: number | Source<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {(value: V, index: number) => any} get_key\n * @param {() => V[]} get_collection\n * @returns {void}\n */\nfunction reconcile(array, state, anchor, render_fn, flags, get_key, get_collection) {\n\tvar is_animated = (flags & EACH_IS_ANIMATED) !== 0;\n\tvar should_update = (flags & (EACH_ITEM_REACTIVE | EACH_INDEX_REACTIVE)) !== 0;\n\n\tvar length = array.length;\n\tvar items = state.items;\n\tvar first = state.first;\n\tvar current = first;\n\n\t/** @type {undefined | Set<EachItem>} */\n\tvar seen;\n\n\t/** @type {EachItem | null} */\n\tvar prev = null;\n\n\t/** @type {undefined | Set<EachItem>} */\n\tvar to_animate;\n\n\t/** @type {EachItem[]} */\n\tvar matched = [];\n\n\t/** @type {EachItem[]} */\n\tvar stashed = [];\n\n\t/** @type {V} */\n\tvar value;\n\n\t/** @type {any} */\n\tvar key;\n\n\t/** @type {EachItem | undefined} */\n\tvar item;\n\n\t/** @type {number} */\n\tvar i;\n\n\tif (is_animated) {\n\t\tfor (i = 0; i < length; i += 1) {\n\t\t\tvalue = array[i];\n\t\t\tkey = get_key(value, i);\n\t\t\titem = items.get(key);\n\n\t\t\tif (item !== undefined) {\n\t\t\t\titem.a?.measure();\n\t\t\t\t(to_animate ??= new Set()).add(item);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i = 0; i < length; i += 1) {\n\t\tvalue = array[i];\n\t\tkey = get_key(value, i);\n\t\titem = items.get(key);\n\n\t\tif (item === undefined) {\n\t\t\tvar child_anchor = current ? /** @type {TemplateNode} */ (current.e.nodes_start) : anchor;\n\n\t\t\tprev = create_item(\n\t\t\t\tchild_anchor,\n\t\t\t\tstate,\n\t\t\t\tprev,\n\t\t\t\tprev === null ? state.first : prev.next,\n\t\t\t\tvalue,\n\t\t\t\tkey,\n\t\t\t\ti,\n\t\t\t\trender_fn,\n\t\t\t\tflags,\n\t\t\t\tget_collection\n\t\t\t);\n\n\t\t\titems.set(key, prev);\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\tcurrent = prev.next;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (should_update) {\n\t\t\tupdate_item(item, value, i, flags);\n\t\t}\n\n\t\tif ((item.e.f & INERT) !== 0) {\n\t\t\tresume_effect(item.e);\n\t\t\tif (is_animated) {\n\t\t\t\titem.a?.unfix();\n\t\t\t\t(to_animate ??= new Set()).delete(item);\n\t\t\t}\n\t\t}\n\n\t\tif (item !== current) {\n\t\t\tif (seen !== undefined && seen.has(item)) {\n\t\t\t\tif (matched.length < stashed.length) {\n\t\t\t\t\t// more efficient to move later items to the front\n\t\t\t\t\tvar start = stashed[0];\n\t\t\t\t\tvar j;\n\n\t\t\t\t\tprev = start.prev;\n\n\t\t\t\t\tvar a = matched[0];\n\t\t\t\t\tvar b = matched[matched.length - 1];\n\n\t\t\t\t\tfor (j = 0; j < matched.length; j += 1) {\n\t\t\t\t\t\tmove(matched[j], start, anchor);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (j = 0; j < stashed.length; j += 1) {\n\t\t\t\t\t\tseen.delete(stashed[j]);\n\t\t\t\t\t}\n\n\t\t\t\t\tlink(state, a.prev, b.next);\n\t\t\t\t\tlink(state, prev, a);\n\t\t\t\t\tlink(state, b, start);\n\n\t\t\t\t\tcurrent = start;\n\t\t\t\t\tprev = b;\n\t\t\t\t\ti -= 1;\n\n\t\t\t\t\tmatched = [];\n\t\t\t\t\tstashed = [];\n\t\t\t\t} else {\n\t\t\t\t\t// more efficient to move earlier items to the back\n\t\t\t\t\tseen.delete(item);\n\t\t\t\t\tmove(item, current, anchor);\n\n\t\t\t\t\tlink(state, item.prev, item.next);\n\t\t\t\t\tlink(state, item, prev === null ? state.first : prev.next);\n\t\t\t\t\tlink(state, prev, item);\n\n\t\t\t\t\tprev = item;\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tmatched = [];\n\t\t\tstashed = [];\n\n\t\t\twhile (current !== null && current.k !== key) {\n\t\t\t\t// If the each block isn't inert and an item has an effect that is already inert,\n\t\t\t\t// skip over adding it to our seen Set as the item is already being handled\n\t\t\t\tif ((current.e.f & INERT) === 0) {\n\t\t\t\t\t(seen ??= new Set()).add(current);\n\t\t\t\t}\n\t\t\t\tstashed.push(current);\n\t\t\t\tcurrent = current.next;\n\t\t\t}\n\n\t\t\tif (current === null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\titem = current;\n\t\t}\n\n\t\tmatched.push(item);\n\t\tprev = item;\n\t\tcurrent = item.next;\n\t}\n\n\tif (current !== null || seen !== undefined) {\n\t\tvar to_destroy = seen === undefined ? [] : array_from(seen);\n\n\t\twhile (current !== null) {\n\t\t\t// If the each block isn't inert, then inert effects are currently outroing and will be removed once the transition is finished\n\t\t\tif ((current.e.f & INERT) === 0) {\n\t\t\t\tto_destroy.push(current);\n\t\t\t}\n\t\t\tcurrent = current.next;\n\t\t}\n\n\t\tvar destroy_length = to_destroy.length;\n\n\t\tif (destroy_length > 0) {\n\t\t\tvar controlled_anchor = (flags & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;\n\n\t\t\tif (is_animated) {\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].a?.measure();\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < destroy_length; i += 1) {\n\t\t\t\t\tto_destroy[i].a?.fix();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpause_effects(state, to_destroy, controlled_anchor, items);\n\t\t}\n\t}\n\n\tif (is_animated) {\n\t\tqueue_micro_task(() => {\n\t\t\tif (to_animate === undefined) return;\n\t\t\tfor (item of to_animate) {\n\t\t\t\titem.a?.apply();\n\t\t\t}\n\t\t});\n\t}\n\n\t/** @type {Effect} */ (active_effect).first = state.first && state.first.e;\n\t/** @type {Effect} */ (active_effect).last = prev && prev.e;\n}\n\n/**\n * @param {EachItem} item\n * @param {any} value\n * @param {number} index\n * @param {number} type\n * @returns {void}\n */\nfunction update_item(item, value, index, type) {\n\tif ((type & EACH_ITEM_REACTIVE) !== 0) {\n\t\tinternal_set(item.v, value);\n\t}\n\n\tif ((type & EACH_INDEX_REACTIVE) !== 0) {\n\t\tinternal_set(/** @type {Value<number>} */ (item.i), index);\n\t} else {\n\t\titem.i = index;\n\t}\n}\n\n/**\n * @template V\n * @param {Node} anchor\n * @param {EachState} state\n * @param {EachItem | null} prev\n * @param {EachItem | null} next\n * @param {V} value\n * @param {unknown} key\n * @param {number} index\n * @param {(anchor: Node, item: V | Source<V>, index: number | Value<number>, collection: () => V[]) => void} render_fn\n * @param {number} flags\n * @param {() => V[]} get_collection\n * @returns {EachItem}\n */\nfunction create_item(\n\tanchor,\n\tstate,\n\tprev,\n\tnext,\n\tvalue,\n\tkey,\n\tindex,\n\trender_fn,\n\tflags,\n\tget_collection\n) {\n\tvar previous_each_item = current_each_item;\n\tvar reactive = (flags & EACH_ITEM_REACTIVE) !== 0;\n\tvar mutable = (flags & EACH_ITEM_IMMUTABLE) === 0;\n\n\tvar v = reactive ? (mutable ? mutable_source(value) : source(value)) : value;\n\tvar i = (flags & EACH_INDEX_REACTIVE) === 0 ? index : source(index);\n\n\tif (DEV && reactive) {\n\t\t// For tracing purposes, we need to link the source signal we create with the\n\t\t// collection + index so that tracing works as intended\n\t\t/** @type {Value} */ (v).debug = () => {\n\t\t\tvar collection_index = typeof i === 'number' ? index : i.v;\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-expressions\n\t\t\tget_collection()[collection_index];\n\t\t};\n\t}\n\n\t/** @type {EachItem} */\n\tvar item = {\n\t\ti,\n\t\tv,\n\t\tk: key,\n\t\ta: null,\n\t\t// @ts-expect-error\n\t\te: null,\n\t\tprev,\n\t\tnext\n\t};\n\n\tcurrent_each_item = item;\n\n\ttry {\n\t\titem.e = branch(() => render_fn(anchor, v, i, get_collection), hydrating);\n\n\t\titem.e.prev = prev && prev.e;\n\t\titem.e.next = next && next.e;\n\n\t\tif (prev === null) {\n\t\t\tstate.first = item;\n\t\t} else {\n\t\t\tprev.next = item;\n\t\t\tprev.e.next = item.e;\n\t\t}\n\n\t\tif (next !== null) {\n\t\t\tnext.prev = item;\n\t\t\tnext.e.prev = item.e;\n\t\t}\n\n\t\treturn item;\n\t} finally {\n\t\tcurrent_each_item = previous_each_item;\n\t}\n}\n\n/**\n * @param {EachItem} item\n * @param {EachItem | null} next\n * @param {Text | Element | Comment} anchor\n */\nfunction move(item, next, anchor) {\n\tvar end = item.next ? /** @type {TemplateNode} */ (item.next.e.nodes_start) : anchor;\n\n\tvar dest = next ? /** @type {TemplateNode} */ (next.e.nodes_start) : anchor;\n\tvar node = /** @type {TemplateNode} */ (item.e.nodes_start);\n\n\twhile (node !== end) {\n\t\tvar next_node = /** @type {TemplateNode} */ (get_next_sibling(node));\n\t\tdest.before(node);\n\t\tnode = next_node;\n\t}\n}\n\n/**\n * @param {EachState} state\n * @param {EachItem | null} prev\n * @param {EachItem | null} next\n */\nfunction link(state, prev, next) {\n\tif (prev === null) {\n\t\tstate.first = next;\n\t} else {\n\t\tprev.next = next;\n\t\tprev.e.next = next && next.e;\n\t}\n\n\tif (next !== null) {\n\t\tnext.prev = prev;\n\t\tnext.e.prev = prev && prev.e;\n\t}\n}\n"],"names":["index","_","i","pause_effects","state","items","controlled_anchor","items_map","transitions","length","pause_children","is_controlled","parent_node","clear_text_content","link","run_out_transitions","item","destroy_effect","each","node","flags","get_collection","get_key","render_fn","fallback_fn","anchor","EACH_IS_CONTROLLED","hydrating","set_hydrate_node","get_first_child","create_text","hydrate_next","fallback","was_empty","each_array","derived_safe_equal","collection","is_array","array_from","block","array","get","mismatch","is_else","HYDRATION_START_ELSE","remove_nodes","set_hydrating","prev","hydrate_node","HYDRATION_END","value","key","create_item","reconcile","resume_effect","branch","pause_effect","is_animated","EACH_IS_ANIMATED","should_update","EACH_ITEM_REACTIVE","EACH_INDEX_REACTIVE","first","current","seen","to_animate","matched","stashed","_a","child_anchor","update_item","INERT","_b","start","j","a","b","move","to_destroy","destroy_length","_c","_d","queue_micro_task","active_effect","type","internal_set","next","reactive","mutable","EACH_ITEM_IMMUTABLE","v","mutable_source","source","end","dest","next_node","get_next_sibling"],"mappings":";AAyDO,SAASA,GAAMC,GAAGC,GAAG;AAC3B,SAAOA;AACR;AAUA,SAASC,GAAcC,GAAOC,GAAOC,GAAmBC,GAAW;AAKlE,WAHIC,IAAc,CAAE,GAChBC,IAASJ,EAAM,QAEVH,IAAI,GAAGA,IAAIO,GAAQP;AAC3B,IAAAQ,GAAeL,EAAMH,CAAC,EAAE,GAAGM,GAAa,EAAI;AAG7C,MAAIG,IAAgBF,IAAS,KAAKD,EAAY,WAAW,KAAKF,MAAsB;AAGpF,MAAIK,GAAe;AAClB,QAAIC;AAAA;AAAA;AAAA,MACqBN,EAAmB;AA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T;AACA;AAOA,SAASjF,EAAKV,GAAO2C,GAAMuC,GAAM;AAChC,EAAIvC,MAAS,OACZ3C,EAAM,QAAQkF,KAEdvC,EAAK,OAAOuC,GACZvC,EAAK,EAAE,OAAOuC,KAAQA,EAAK,IAGxBA,MAAS,SACZA,EAAK,OAAOvC,GACZuC,EAAK,EAAE,OAAOvC,KAAQA,EAAK;AAE7B;","x_google_ignoreList":[0]}
|
package/dist/html-0_BSI5XK.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { b as m, h as d, a as f, p as c, g as n, aa as g, ad as u, ab as v, s as y, a4 as b, aX as p } from "./index-DjqVR0UB.js";
|
|
2
|
-
import { z as h, A as R } from "./legacy-CqcDNlD_.js";
|
|
3
|
-
function z(o, _, w, k, A) {
|
|
4
|
-
var i = o, r = "", e;
|
|
5
|
-
m(() => {
|
|
6
|
-
if (r === (r = _() ?? "")) {
|
|
7
|
-
d && f();
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
e !== void 0 && (p(e), e = void 0), r !== "" && (e = c(() => {
|
|
11
|
-
if (d) {
|
|
12
|
-
n.data;
|
|
13
|
-
for (var a = f(), t = a; a !== null && (a.nodeType !== 8 || /** @type {Comment} */
|
|
14
|
-
a.data !== ""); )
|
|
15
|
-
t = a, a = /** @type {TemplateNode} */
|
|
16
|
-
g(a);
|
|
17
|
-
if (a === null)
|
|
18
|
-
throw u(), v;
|
|
19
|
-
h(n, t), i = y(a);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
var l = r + "", s = R(l);
|
|
23
|
-
h(
|
|
24
|
-
/** @type {TemplateNode} */
|
|
25
|
-
b(s),
|
|
26
|
-
/** @type {TemplateNode} */
|
|
27
|
-
s.lastChild
|
|
28
|
-
), i.before(s);
|
|
29
|
-
}));
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
z as h
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=html-0_BSI5XK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html-0_BSI5XK.js","sources":["../../../node_modules/.pnpm/svelte@5.27.0/node_modules/svelte/src/internal/client/dom/blocks/html.js"],"sourcesContent":["/** @import { Effect, TemplateNode } from '#client' */\nimport { FILENAME, HYDRATION_ERROR } from '../../../../constants.js';\nimport { block, branch, destroy_effect } from '../../reactivity/effects.js';\nimport { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';\nimport { create_fragment_from_html } from '../reconciler.js';\nimport { assign_nodes } from '../template.js';\nimport * as w from '../../warnings.js';\nimport { hash, sanitize_location } from '../../../../utils.js';\nimport { DEV } from 'esm-env';\nimport { dev_current_component_function } from '../../context.js';\nimport { get_first_child, get_next_sibling } from '../operations.js';\n\n/**\n * @param {Element} element\n * @param {string | null} server_hash\n * @param {string} value\n */\nfunction check_hash(element, server_hash, value) {\n\tif (!server_hash || server_hash === hash(String(value ?? ''))) return;\n\n\tlet location;\n\n\t// @ts-expect-error\n\tconst loc = element.__svelte_meta?.loc;\n\tif (loc) {\n\t\tlocation = `near ${loc.file}:${loc.line}:${loc.column}`;\n\t} else if (dev_current_component_function?.[FILENAME]) {\n\t\tlocation = `in ${dev_current_component_function[FILENAME]}`;\n\t}\n\n\tw.hydration_html_changed(sanitize_location(location));\n}\n\n/**\n * @param {Element | Text | Comment} node\n * @param {() => string} get_value\n * @param {boolean} svg\n * @param {boolean} mathml\n * @param {boolean} [skip_warning]\n * @returns {void}\n */\nexport function html(node, get_value, svg, mathml, skip_warning) {\n\tvar anchor = node;\n\n\tvar value = '';\n\n\t/** @type {Effect | undefined} */\n\tvar effect;\n\n\tblock(() => {\n\t\tif (value === (value = get_value() ?? '')) {\n\t\t\tif (hydrating) {\n\t\t\t\thydrate_next();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (effect !== undefined) {\n\t\t\tdestroy_effect(effect);\n\t\t\teffect = undefined;\n\t\t}\n\n\t\tif (value === '') return;\n\n\t\teffect = branch(() => {\n\t\t\tif (hydrating) {\n\t\t\t\t// We're deliberately not trying to repair mismatches between server and client,\n\t\t\t\t// as it's costly and error-prone (and it's an edge case to have a mismatch anyway)\n\t\t\t\tvar hash = /** @type {Comment} */ (hydrate_node).data;\n\t\t\t\tvar next = hydrate_next();\n\t\t\t\tvar last = next;\n\n\t\t\t\twhile (\n\t\t\t\t\tnext !== null &&\n\t\t\t\t\t(next.nodeType !== 8 || /** @type {Comment} */ (next).data !== '')\n\t\t\t\t) {\n\t\t\t\t\tlast = next;\n\t\t\t\t\tnext = /** @type {TemplateNode} */ (get_next_sibling(next));\n\t\t\t\t}\n\n\t\t\t\tif (next === null) {\n\t\t\t\t\tw.hydration_mismatch();\n\t\t\t\t\tthrow HYDRATION_ERROR;\n\t\t\t\t}\n\n\t\t\t\tif (DEV && !skip_warning) {\n\t\t\t\t\tcheck_hash(/** @type {Element} */ (next.parentNode), hash, value);\n\t\t\t\t}\n\n\t\t\t\tassign_nodes(hydrate_node, last);\n\t\t\t\tanchor = set_hydrate_node(next);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar html = value + '';\n\t\t\tif (svg) html = `<svg>${html}</svg>`;\n\t\t\telse if (mathml) html = `<math>${html}</math>`;\n\n\t\t\t// Don't use create_fragment_with_script_from_html here because that would mean script tags are executed.\n\t\t\t// @html is basically `.innerHTML = ...` and that doesn't execute scripts either due to security reasons.\n\t\t\t/** @type {DocumentFragment | Element} */\n\t\t\tvar node = create_fragment_from_html(html);\n\n\t\t\tif (svg || mathml) {\n\t\t\t\tnode = /** @type {Element} */ (get_first_child(node));\n\t\t\t}\n\n\t\t\tassign_nodes(\n\t\t\t\t/** @type {TemplateNode} */ (get_first_child(node)),\n\t\t\t\t/** @type {TemplateNode} */ (node.lastChild)\n\t\t\t);\n\n\t\t\tif (svg || mathml) {\n\t\t\t\twhile (get_first_child(node)) {\n\t\t\t\t\tanchor.before(/** @type {Node} */ (get_first_child(node)));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tanchor.before(node);\n\t\t\t}\n\t\t});\n\t});\n}\n"],"names":["html","node","get_value","svg","mathml","skip_warning","anchor","value","effect","block","hydrating","hydrate_next","destroy_effect","branch","hydrate_node","next","last","get_next_sibling","w.hydration_mismatch","HYDRATION_ERROR","assign_nodes","set_hydrate_node","create_fragment_from_html","get_first_child"],"mappings":";;AAyCO,SAASA,EAAKC,GAAMC,GAAWC,GAAKC,GAAQC,GAAc;AAChE,MAAIC,IAASL,GAETM,IAAQ,IAGRC;AAEJ,EAAAC,EAAM,MAAM;AACX,QAAIF,OAAWA,IAAQL,EAAW,KAAI,KAAK;AAC1C,MAAIQ,KACHC,EAAc;AAEf;AAAA,IACH;AAOE,IALIH,MAAW,WACdI,EAAeJ,CAAM,GACrBA,IAAS,SAGND,MAAU,OAEdC,IAASK,EAAO,MAAM;AACrB,UAAIH,GAAW;AAGoB,QAACI,EAAc;AAIjD,iBAHIC,IAAOJ,EAAc,GACrBK,IAAOD,GAGVA,MAAS,SACRA,EAAK,aAAa;AAAA,QAA6BA,EAAM,SAAS;AAE/D,UAAAC,IAAOD,GACPA;AAAA,UAAoCE,EAAiBF,CAAI;AAG1D,YAAIA,MAAS;AACZG,gBAAAA,EAAsB,GAChBC;AAOP,QAAAC,EAAaN,GAAcE,CAAI,GAC/BV,IAASe,EAAiBN,CAAI;AAC9B;AAAA,MACJ;AAEG,UAAIf,IAAOO,IAAQ,IAOfN,IAAOqB,EAA0BtB,CAAI;AAMzC,MAAAoB;AAAA;AAAA,QAC8BG,EAAgBtB,CAAI;AAAA;AAAA,QACpBA,EAAK;AAAA,MAClC,GAOAK,EAAO,OAAOL,CAAI;AAAA,IAEtB,CAAG;AAAA,EACH,CAAE;AACF;","x_google_ignoreList":[0]}
|
package/dist/index-DfsKJkF5.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { aM as n, aN as e } from "./index-DjqVR0UB.js";
|
|
2
|
-
const c = (o) => {
|
|
3
|
-
switch (o) {
|
|
4
|
-
case "6756b6f8c7d313c0d6ca03f0":
|
|
5
|
-
case "65a510cd9415d41b1aa933dc":
|
|
6
|
-
return {
|
|
7
|
-
currencySymbol: "GH₵",
|
|
8
|
-
name: "OH",
|
|
9
|
-
minStoredValueToPurchase: 10,
|
|
10
|
-
maxStoredValueToPurchase: 5e3
|
|
11
|
-
};
|
|
12
|
-
default:
|
|
13
|
-
return {
|
|
14
|
-
currencySymbol: "$",
|
|
15
|
-
name: "DEFAULT",
|
|
16
|
-
minStoredValueToPurchase: 0,
|
|
17
|
-
maxStoredValueToPurchase: 100
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}, S = (o) => ({
|
|
21
|
-
credentials: {
|
|
22
|
-
oauthType: e.CREDENTIALS,
|
|
23
|
-
text: "email and password",
|
|
24
|
-
condition: o.includes(e.CREDENTIALS)
|
|
25
|
-
},
|
|
26
|
-
email: {
|
|
27
|
-
oauthType: e.PASSWORDLESS,
|
|
28
|
-
passwordlessType: n.EMAIL,
|
|
29
|
-
text: "email only",
|
|
30
|
-
condition: o.includes(e.PASSWORDLESS)
|
|
31
|
-
},
|
|
32
|
-
google: {
|
|
33
|
-
oauthType: e.GOOGLE,
|
|
34
|
-
condition: o.includes(e.GOOGLE)
|
|
35
|
-
},
|
|
36
|
-
ticketmaster: {
|
|
37
|
-
oauthType: e.TICKETMASTER,
|
|
38
|
-
condition: o.includes(e.TICKETMASTER)
|
|
39
|
-
},
|
|
40
|
-
phone: {
|
|
41
|
-
oauthType: e.PASSWORDLESS,
|
|
42
|
-
passwordlessType: n.PHONE,
|
|
43
|
-
text: "phone only",
|
|
44
|
-
condition: o.includes(e.PASSWORDLESS)
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
c as a,
|
|
49
|
-
S as g
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=index-DfsKJkF5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DfsKJkF5.js","sources":["../../utils/lib/clients/index.ts"],"sourcesContent":["import {\n OAUTH_LOGIN_TYPE,\n OAUTH_PASSWORDLESS_TYPES,\n} from \"@packages/utils/enums\";\nimport { clientPublicStore } from \"@packages/stores\";\n\nexport const getClientConfigByClientId = (\n clientId: string\n): {\n currencySymbol: string;\n name: string;\n minStoredValueToPurchase: number;\n maxStoredValueToPurchase: number;\n} => {\n switch (clientId) {\n case \"6756b6f8c7d313c0d6ca03f0\":\n case \"65a510cd9415d41b1aa933dc\":\n return {\n currencySymbol: \"GH₵\",\n name: \"OH\",\n minStoredValueToPurchase: 10,\n maxStoredValueToPurchase: 5000,\n };\n default:\n return {\n currencySymbol: \"$\",\n name: \"DEFAULT\",\n minStoredValueToPurchase: 0,\n maxStoredValueToPurchase: 100,\n };\n }\n};\n\n// export const getClientLoginMethods = async (\n// apiUrl: string,\n// clientId: string\n// ): Promise<string[]> => {\n// const result = await fetch(\n// `${apiUrl}/clients/${clientId}/available-login-types`,\n// {\n// method: \"get\",\n// headers: {\n// \"Content-Type\": \"application/json\",\n// },\n// }\n// );\n\n// const json = await result.json();\n// if (!result.ok) throw new Error(json.error);\n\n// return json;\n// };\n\nexport const getClientSettings = async (\n apiUrl: string,\n clientId: string\n): Promise<string[]> => {\n const result = await fetch(\n `${apiUrl}/clients/${clientId}/public`,\n {\n method: \"get\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n }\n );\n\n const json = await result.json();\n if (!result.ok) throw new Error(json.error);\n json.ui_settings = json.ui_settings || { stored_value_alias: \"stored value\" };\n\n clientPublicStore.set(json);\n return json;\n};\n\nexport const getBasicAuthMethodsConfigs = (availableMethods: string[]) => {\n return {\n credentials: {\n oauthType: OAUTH_LOGIN_TYPE.CREDENTIALS,\n text: \"email and password\",\n condition: availableMethods.includes(OAUTH_LOGIN_TYPE.CREDENTIALS),\n },\n email: {\n oauthType: OAUTH_LOGIN_TYPE.PASSWORDLESS,\n passwordlessType: OAUTH_PASSWORDLESS_TYPES.EMAIL,\n text: \"email only\",\n condition: availableMethods.includes(OAUTH_LOGIN_TYPE.PASSWORDLESS),\n },\n google: {\n oauthType: OAUTH_LOGIN_TYPE.GOOGLE,\n condition: availableMethods.includes(OAUTH_LOGIN_TYPE.GOOGLE),\n },\n ticketmaster: {\n oauthType: OAUTH_LOGIN_TYPE.TICKETMASTER,\n condition: availableMethods.includes(OAUTH_LOGIN_TYPE.TICKETMASTER),\n },\n phone: {\n oauthType: OAUTH_LOGIN_TYPE.PASSWORDLESS,\n passwordlessType: OAUTH_PASSWORDLESS_TYPES.PHONE,\n text: \"phone only\",\n condition: availableMethods.includes(OAUTH_LOGIN_TYPE.PASSWORDLESS),\n },\n };\n};\n"],"names":["getClientConfigByClientId","clientId","getBasicAuthMethodsConfigs","availableMethods","OAUTH_LOGIN_TYPE","OAUTH_PASSWORDLESS_TYPES"],"mappings":";AAMa,MAAAA,IAA4B,CACvCC,MAMG;AACH,UAAQA,GAAU;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,QACL,gBAAgB;AAAA,QAChB,MAAM;AAAA,QACN,0BAA0B;AAAA,QAC1B,0BAA0B;AAAA,MAC5B;AAAA,IACF;AACS,aAAA;AAAA,QACL,gBAAgB;AAAA,QAChB,MAAM;AAAA,QACN,0BAA0B;AAAA,QAC1B,0BAA0B;AAAA,MAC5B;AAAA,EAAA;AAEN,GA4CaC,IAA6B,CAACC,OAClC;AAAA,EACL,aAAa;AAAA,IACX,WAAWC,EAAiB;AAAA,IAC5B,MAAM;AAAA,IACN,WAAWD,EAAiB,SAASC,EAAiB,WAAW;AAAA,EACnE;AAAA,EACA,OAAO;AAAA,IACL,WAAWA,EAAiB;AAAA,IAC5B,kBAAkBC,EAAyB;AAAA,IAC3C,MAAM;AAAA,IACN,WAAWF,EAAiB,SAASC,EAAiB,YAAY;AAAA,EACpE;AAAA,EACA,QAAQ;AAAA,IACN,WAAWA,EAAiB;AAAA,IAC5B,WAAWD,EAAiB,SAASC,EAAiB,MAAM;AAAA,EAC9D;AAAA,EACA,cAAc;AAAA,IACZ,WAAWA,EAAiB;AAAA,IAC5B,WAAWD,EAAiB,SAASC,EAAiB,YAAY;AAAA,EACpE;AAAA,EACA,OAAO;AAAA,IACL,WAAWA,EAAiB;AAAA,IAC5B,kBAAkBC,EAAyB;AAAA,IAC3C,MAAM;AAAA,IACN,WAAWF,EAAiB,SAASC,EAAiB,YAAY;AAAA,EAAA;AAEtE;"}
|