@levo-so/studio 0.1.109 → 0.1.111
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/{BillingStep-DZeqbtfs.js → BillingStep-CY2MHQ-L.js} +1 -1
- package/{Button-BMUB23Y7.js → Button-DjphTnCg.js} +160 -148
- package/CollectionField-DrJuHNsg.js +318 -0
- package/{DateTimeWidget-DWbn_kXp.js → DateTimeWidget-BVHZh4EV.js} +13 -14
- package/{EntryCard-BNZ-0_Kv.js → EntryCard-BYONyIm5.js} +3 -3
- package/{LoginCard-B1XlZfEU.js → LoginCard-CrtSHdaR.js} +3 -3
- package/{LoginForm-NmDPe72V.js → LoginForm-DeYsk4kd.js} +2 -2
- package/{LoginModal-CVd08mNx.js → LoginModal-BbDfB4S9.js} +3 -3
- package/{MessageCard-C2fU_Bo_.js → MessageCard-x6jPClGi.js} +2 -2
- package/{MessageFooter-4qIEK91O.js → MessageFooter-CHuPnL_D.js} +1 -1
- package/{ModalManager-Dqq7D60M.js → ModalManager-DQVNPEuG.js} +1 -1
- package/{PendingApprovalCard-CXOEpAbg.js → PendingApprovalCard-CsnyrSsa.js} +3 -3
- package/{PhoneWidget-CtNIit2w.js → PhoneWidget-BaDSMSW5.js} +5 -6
- package/{PopupRenderer-SSn97BLs-DQfvcymq.js → PopupRenderer-Dd9zoNIY-Cx663DmW.js} +258 -223
- package/{ProfileCard-CzL5uB2z.js → ProfileCard-Dg5TY1Mw.js} +3 -3
- package/{RichTextWidget-DkRrKQqN.js → RichTextWidget-yaDCZwIo.js} +10 -11
- package/{RteThemeProvider-Cfepkyer.js → RteThemeProvider-LFGzAYi1.js} +2 -2
- package/{Toolbar-C3WDkSnO.js → Toolbar-D3PnF7Ud.js} +3 -3
- package/{VerifyButton-TNkt-SDu.js → VerifyButton-6BIXAEGp.js} +1 -1
- package/{bookingCard-61Yx6JO-.js → bookingCard-D40dbgvH.js} +3 -3
- package/collection.js +6 -8
- package/dist-bHoi1bCB.js +3795 -0
- package/index.d.ts +77 -2
- package/index.js +2391 -2197
- package/{inlineCollectionTheme-WpCvMKrW.js → inlineCollectionTheme-D2w17LHX.js} +1 -1
- package/{inlineRteTheme-Ajq9PNpQ.js → inlineRteTheme-abXxag3B.js} +1 -1
- package/package.json +5 -5
- package/studio.css +1 -1
- package/{utils-BJLmuC5w.js → utils-C_tr8kXV.js} +1 -1
- package/CollectionField-xa-jed3_.js +0 -232
- package/dist-Cfv-YjpI.js +0 -3469
- package/getFieldValidations-CSkSV2hW.js +0 -90
- package/widgets-K6ECnoJJ.js +0 -335
- /package/{Beams-WJN38XSv.js → Beams-DboMUgCv.js} +0 -0
- /package/{CollectionInput-CpNGIXJx.js → CollectionInput-CG-Pu_51.js} +0 -0
- /package/{Dots-DggLz5I7.js → Dots-a8xSboDv.js} +0 -0
- /package/{Gradient-BSWJAu0a.js → Gradient-NacpoDCM.js} +0 -0
- /package/{Grid-BFKl0MUt.js → Grid-BJQvxnks.js} +0 -0
- /package/{Popover-O1poOHk2.js → Popover-DnZY1k6o.js} +0 -0
- /package/{StripePaymentModal-Do1xHctU.js → StripePaymentModal-BsYNQ4MB.js} +0 -0
- /package/{Tooltip-NEMQqPyr.js → Tooltip-DreKXbTO.js} +0 -0
- /package/{Waves-BPEgTYoO.js → Waves-DUuT_IFr.js} +0 -0
- /package/{authentication-hnV1BI8s.js → authentication-TdyaDNTn.js} +0 -0
- /package/{card-5ooLmYSr.js → card-D5fPArfa.js} +0 -0
- /package/{dialog-DoxC50i0.js → dialog-LRLdr3kq.js} +0 -0
- /package/{theme.cssm-BXDp-ojp.js → theme.cssm-2YTdd8Yh.js} +0 -0
- /package/{useLogin-D4A5iRey.js → useLogin-B2HHZxTi.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./Dialog-IrII0ugb.js";
|
|
3
|
-
import {
|
|
3
|
+
import { d as e, i as t, l as n, n as r, o as i, r as a, u as o } from "./PopupRenderer-Dd9zoNIY-Cx663DmW.js";
|
|
4
4
|
import { n as s } from "./AuthProvider-C6bvedwF.js";
|
|
5
|
-
import { n as c } from "./ModalManager-
|
|
5
|
+
import { n as c } from "./ModalManager-DQVNPEuG.js";
|
|
6
6
|
import { c as l } from "react/compiler-runtime";
|
|
7
7
|
import { $isIdentityContextReady as u } from "@levo-so/insights/stores";
|
|
8
8
|
import { cn as d, useLevo as f } from "@levo-so/react";
|
|
@@ -13,23 +13,25 @@ import "clsx";
|
|
|
13
13
|
import "@tabler/icons-react";
|
|
14
14
|
import { useStore as E } from "@nanostores/react";
|
|
15
15
|
import { animate as te, scroll as ne } from "motion/react";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import ae from "
|
|
16
|
+
import re from "html-react-parser";
|
|
17
|
+
import { LoaderCircle as ie } from "lucide-react";
|
|
18
|
+
import * as ae from "motion/react-m";
|
|
19
|
+
import oe from "next/link";
|
|
20
|
+
import se from "isomorphic-dompurify";
|
|
19
21
|
//#region ../../libraries/popups/dist/index.js
|
|
20
|
-
var
|
|
22
|
+
var ce = async (e, t) => {
|
|
21
23
|
let n = {};
|
|
22
24
|
return t?.site_id && (n.site_id = t.site_id), t?.locale && (n.locale = t.locale), t?.country && (n.country = t.country), (await e.url("/v1/studio/popup/list-active").query(n).get().json())?.content?.data ?? [];
|
|
23
|
-
},
|
|
24
|
-
let t = l(9), { siteId: n, pageId: r } = e, { fetch: i, logger:
|
|
25
|
-
if (t[0] !== i || t[1] !==
|
|
25
|
+
}, le = _(() => import("./PopupRenderer-Dd9zoNIY-Cx663DmW.js").then((e) => e.s).then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), ue = (e) => {
|
|
26
|
+
let t = l(9), { siteId: n, pageId: r } = e, { fetch: i, logger: a } = f(), [s, c] = S(null), d = x(!1), p, h;
|
|
27
|
+
if (t[0] !== i || t[1] !== a || t[2] !== n ? (p = () => {
|
|
26
28
|
if (d.current) return;
|
|
27
29
|
let e = () => {
|
|
28
|
-
d.current || (d.current = !0,
|
|
29
|
-
|
|
30
|
+
d.current || (d.current = !0, ce(i, n ? { site_id: n } : void 0).then((e) => {
|
|
31
|
+
o(e), c(e);
|
|
30
32
|
}).catch((e) => {
|
|
31
|
-
|
|
32
|
-
}).finally(
|
|
33
|
+
a?.error("Failed to fetch popups", { exception: e }), o([]), c([]);
|
|
34
|
+
}).finally(de));
|
|
33
35
|
};
|
|
34
36
|
if (u.get()) {
|
|
35
37
|
e();
|
|
@@ -41,9 +43,9 @@ var oe = async (e, t) => {
|
|
|
41
43
|
return () => t();
|
|
42
44
|
}, h = [
|
|
43
45
|
i,
|
|
44
|
-
|
|
46
|
+
a,
|
|
45
47
|
n
|
|
46
|
-
], t[0] = i, t[1] =
|
|
48
|
+
], t[0] = i, t[1] = a, t[2] = n, t[3] = p, t[4] = h) : (p = t[3], h = t[4]), y(p, h), !s || s.length === 0) return null;
|
|
47
49
|
let g;
|
|
48
50
|
t[5] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
49
51
|
position: "relative",
|
|
@@ -52,38 +54,38 @@ var oe = async (e, t) => {
|
|
|
52
54
|
let _;
|
|
53
55
|
return t[6] !== r || t[7] !== s ? (_ = /* @__PURE__ */ w("div", {
|
|
54
56
|
style: g,
|
|
55
|
-
children: /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(
|
|
57
|
+
children: /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(le, {
|
|
56
58
|
popups: s,
|
|
57
59
|
pageId: r
|
|
58
60
|
}) })
|
|
59
61
|
}), t[6] = r, t[7] = s, t[8] = _) : _ = t[8], _;
|
|
60
62
|
};
|
|
61
|
-
function
|
|
63
|
+
function de() {
|
|
62
64
|
return n(!1);
|
|
63
65
|
}
|
|
64
|
-
var
|
|
65
|
-
let
|
|
66
|
-
return
|
|
67
|
-
popups:
|
|
68
|
-
isLoading:
|
|
69
|
-
openPopup:
|
|
66
|
+
var D = () => {
|
|
67
|
+
let e = l(3), n = E(a), r = E(t), i = fe, o = pe, s;
|
|
68
|
+
return e[0] !== r || e[1] !== n ? (s = {
|
|
69
|
+
popups: n,
|
|
70
|
+
isLoading: r,
|
|
71
|
+
openPopup: i,
|
|
70
72
|
closePopup: o
|
|
71
|
-
},
|
|
73
|
+
}, e[0] = r, e[1] = n, e[2] = s) : s = e[2], s;
|
|
72
74
|
};
|
|
73
|
-
function
|
|
74
|
-
let
|
|
75
|
-
|
|
75
|
+
function fe(e) {
|
|
76
|
+
let t = a.get().find((t) => t.id === e);
|
|
77
|
+
t && i(t, {
|
|
76
78
|
force: !0,
|
|
77
79
|
trigger_type: "manual"
|
|
78
80
|
});
|
|
79
81
|
}
|
|
80
|
-
function
|
|
81
|
-
let
|
|
82
|
-
|
|
82
|
+
function pe() {
|
|
83
|
+
let t = r.get().active_popup_id;
|
|
84
|
+
t && e(t);
|
|
83
85
|
}
|
|
84
86
|
//#endregion
|
|
85
87
|
//#region src/utils/getKeysWithValue.ts
|
|
86
|
-
function
|
|
88
|
+
function me(e, t) {
|
|
87
89
|
let n = (e, r) => {
|
|
88
90
|
let i = {};
|
|
89
91
|
if (typeof e != "object" || !e) return i;
|
|
@@ -103,7 +105,7 @@ function pe(e, t) {
|
|
|
103
105
|
}
|
|
104
106
|
//#endregion
|
|
105
107
|
//#region src/utils/variableExpression.ts
|
|
106
|
-
var
|
|
108
|
+
var O = (e, t) => {
|
|
107
109
|
let n = [], r = "", i = !1, a = !1;
|
|
108
110
|
for (let o of e) {
|
|
109
111
|
if (a) {
|
|
@@ -125,31 +127,31 @@ var D = (e, t) => {
|
|
|
125
127
|
r += o;
|
|
126
128
|
}
|
|
127
129
|
return n.push(r), n;
|
|
128
|
-
},
|
|
130
|
+
}, he = (e) => {
|
|
129
131
|
let t = e.trim();
|
|
130
132
|
return t.startsWith("\"") && t.endsWith("\"") ? t.slice(1, -1).replace(/\\"/g, "\"").replace(/\\\\/g, "\\") : t === "true" ? !0 : t === "false" ? !1 : t === "null" ? null : /^-?\d+(\.\d+)?$/.test(t) ? Number(t) : t;
|
|
131
|
-
},
|
|
132
|
-
let t =
|
|
133
|
+
}, ge = (e) => e === null ? "null" : typeof e == "number" || typeof e == "boolean" ? String(e) : /^[a-zA-Z_][\w-]*$/.test(e) ? e : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`, _e = (e) => {
|
|
134
|
+
let t = O(e, ":").map((e) => e.trim());
|
|
133
135
|
return {
|
|
134
136
|
name: t[0] ?? "",
|
|
135
|
-
args: t.slice(1).map(
|
|
137
|
+
args: t.slice(1).map(he)
|
|
136
138
|
};
|
|
137
|
-
},
|
|
138
|
-
let t =
|
|
139
|
+
}, ve = (e) => {
|
|
140
|
+
let t = O(e, "|").map((e) => e.trim());
|
|
139
141
|
return {
|
|
140
142
|
path: t[0] ?? "",
|
|
141
|
-
transforms: t.slice(1).filter(Boolean).map(
|
|
143
|
+
transforms: t.slice(1).filter(Boolean).map(_e)
|
|
142
144
|
};
|
|
143
|
-
},
|
|
145
|
+
}, ye = (e) => {
|
|
144
146
|
let t = [e.path];
|
|
145
|
-
for (let n of e.transforms) t.push([n.name, ...n.args.map(
|
|
147
|
+
for (let n of e.transforms) t.push([n.name, ...n.args.map(ge)].join(":"));
|
|
146
148
|
return t.join(" | ");
|
|
147
|
-
},
|
|
149
|
+
}, k = (e) => e == null || e === "", A = [
|
|
148
150
|
"date",
|
|
149
151
|
"time",
|
|
150
152
|
"datetime",
|
|
151
153
|
"relative"
|
|
152
|
-
],
|
|
154
|
+
], j = {
|
|
153
155
|
date: [
|
|
154
156
|
"full",
|
|
155
157
|
"day",
|
|
@@ -161,12 +163,12 @@ var D = (e, t) => {
|
|
|
161
163
|
time: ["clock"],
|
|
162
164
|
datetime: ["full", "compact"],
|
|
163
165
|
relative: ["auto"]
|
|
164
|
-
},
|
|
166
|
+
}, M = [
|
|
165
167
|
"S",
|
|
166
168
|
"M",
|
|
167
169
|
"L",
|
|
168
170
|
"XL"
|
|
169
|
-
],
|
|
171
|
+
], be = [
|
|
170
172
|
{
|
|
171
173
|
value: "auto",
|
|
172
174
|
label: "Auto"
|
|
@@ -203,28 +205,28 @@ var D = (e, t) => {
|
|
|
203
205
|
value: "zh-CN",
|
|
204
206
|
label: "Chinese"
|
|
205
207
|
}
|
|
206
|
-
],
|
|
208
|
+
], N = [
|
|
207
209
|
"auto",
|
|
208
210
|
"12",
|
|
209
211
|
"24"
|
|
210
|
-
],
|
|
212
|
+
], xe = {
|
|
211
213
|
display: "date",
|
|
212
214
|
format: "full",
|
|
213
215
|
style: "M",
|
|
214
216
|
locale: "auto",
|
|
215
217
|
hour12: "auto"
|
|
216
|
-
},
|
|
218
|
+
}, Se = (e) => typeof e == "string" && A.includes(e), Ce = (e) => typeof e == "string" && M.includes(e), we = (e) => typeof e == "string" && N.includes(e), P = (e) => {
|
|
217
219
|
let [t, n, r, i, a] = e;
|
|
218
|
-
if (!
|
|
219
|
-
let o =
|
|
220
|
+
if (!Se(t)) return null;
|
|
221
|
+
let o = j[t];
|
|
220
222
|
return {
|
|
221
223
|
display: t,
|
|
222
224
|
format: typeof n == "string" && o.includes(n) ? n : o[0] ?? "full",
|
|
223
|
-
style:
|
|
225
|
+
style: Ce(r) ? r : "M",
|
|
224
226
|
locale: typeof i == "string" && i ? i : "auto",
|
|
225
|
-
hour12:
|
|
227
|
+
hour12: we(a) ? a : "auto"
|
|
226
228
|
};
|
|
227
|
-
},
|
|
229
|
+
}, Te = (e) => {
|
|
228
230
|
let t = [
|
|
229
231
|
e.display,
|
|
230
232
|
e.format,
|
|
@@ -234,13 +236,13 @@ var D = (e, t) => {
|
|
|
234
236
|
];
|
|
235
237
|
for (; t.length > 1 && t[t.length - 1] === "auto";) t.pop();
|
|
236
238
|
return t;
|
|
237
|
-
},
|
|
239
|
+
}, Ee = (e) => {
|
|
238
240
|
if (!(!e || e === "auto")) try {
|
|
239
241
|
return Intl.DateTimeFormat.supportedLocalesOf([e]).length ? e : void 0;
|
|
240
242
|
} catch {
|
|
241
243
|
return;
|
|
242
244
|
}
|
|
243
|
-
},
|
|
245
|
+
}, De = (e) => e === "12" ? !0 : e === "24" ? !1 : void 0, Oe = (e, t) => {
|
|
244
246
|
if (e === "relative") return [
|
|
245
247
|
"S",
|
|
246
248
|
"M",
|
|
@@ -284,26 +286,26 @@ var D = (e, t) => {
|
|
|
284
286
|
"XL"
|
|
285
287
|
];
|
|
286
288
|
}
|
|
287
|
-
},
|
|
289
|
+
}, ke = (e, t) => {
|
|
288
290
|
if (t.includes(e)) return e;
|
|
289
|
-
let n =
|
|
291
|
+
let n = M.indexOf(e), r = t[0] ?? "M", i = Math.abs(M.indexOf(r) - n);
|
|
290
292
|
for (let e of t) {
|
|
291
|
-
let t = Math.abs(
|
|
293
|
+
let t = Math.abs(M.indexOf(e) - n);
|
|
292
294
|
t < i && (r = e, i = t);
|
|
293
295
|
}
|
|
294
296
|
return r;
|
|
295
|
-
},
|
|
297
|
+
}, Ae = {
|
|
296
298
|
S: "narrow",
|
|
297
299
|
M: "short",
|
|
298
300
|
L: "long",
|
|
299
301
|
XL: "long"
|
|
300
|
-
},
|
|
302
|
+
}, F = {
|
|
301
303
|
S: "short",
|
|
302
304
|
M: "medium",
|
|
303
305
|
L: "long",
|
|
304
306
|
XL: "full"
|
|
305
|
-
},
|
|
306
|
-
let n =
|
|
307
|
+
}, je = (e, t) => {
|
|
308
|
+
let n = Ee(t.locale), r = (t) => new Intl.DateTimeFormat(n, t).format(e);
|
|
307
309
|
if (t.display === "relative") {
|
|
308
310
|
let r = new Intl.RelativeTimeFormat(n, {
|
|
309
311
|
numeric: "auto",
|
|
@@ -321,7 +323,7 @@ var D = (e, t) => {
|
|
|
321
323
|
for (let [e, t] of l) if (a >= e) return r.format(Math.round(i / e), t);
|
|
322
324
|
return r.format(Math.round(i / 1e3), "second");
|
|
323
325
|
}
|
|
324
|
-
let i =
|
|
326
|
+
let i = De(t.hour12);
|
|
325
327
|
if (t.display === "time") return r({
|
|
326
328
|
hour: "numeric",
|
|
327
329
|
minute: "2-digit",
|
|
@@ -330,13 +332,13 @@ var D = (e, t) => {
|
|
|
330
332
|
hour12: i
|
|
331
333
|
});
|
|
332
334
|
if (t.display === "datetime") return r({
|
|
333
|
-
dateStyle: t.format === "compact" ? "medium" :
|
|
335
|
+
dateStyle: t.format === "compact" ? "medium" : F[t.style],
|
|
334
336
|
timeStyle: t.style === "S" || t.style === "M" ? "short" : t.style === "L" ? "medium" : "full",
|
|
335
337
|
hour12: i
|
|
336
338
|
});
|
|
337
339
|
switch (t.format) {
|
|
338
|
-
case "full": return r({ dateStyle:
|
|
339
|
-
case "day": return r({ weekday:
|
|
340
|
+
case "full": return r({ dateStyle: F[t.style] });
|
|
341
|
+
case "day": return r({ weekday: Ae[t.style] });
|
|
340
342
|
case "month": return t.style === "S" ? r({ month: "numeric" }) : r({ month: t.style === "M" ? "short" : "long" });
|
|
341
343
|
case "year": return r({ year: t.style === "S" ? "2-digit" : "numeric" });
|
|
342
344
|
case "day-month": return t.style === "S" ? r({
|
|
@@ -355,7 +357,7 @@ var D = (e, t) => {
|
|
|
355
357
|
});
|
|
356
358
|
default: return r({ dateStyle: "medium" });
|
|
357
359
|
}
|
|
358
|
-
},
|
|
360
|
+
}, Me = (e, t) => {
|
|
359
361
|
let n = [
|
|
360
362
|
"January",
|
|
361
363
|
"February",
|
|
@@ -383,46 +385,46 @@ var D = (e, t) => {
|
|
|
383
385
|
a: o
|
|
384
386
|
};
|
|
385
387
|
return t.replace(/YYYY|MMMM|MMM|MM|DD|D|HH|hh|h|mm|\ba\b/g, (e) => s[e] ?? e);
|
|
386
|
-
},
|
|
387
|
-
if (
|
|
388
|
+
}, Ne = (e, t) => {
|
|
389
|
+
if (k(e)) return "";
|
|
388
390
|
let n = new Date(e);
|
|
389
391
|
if (Number.isNaN(n.getTime())) return String(e);
|
|
390
|
-
let r =
|
|
391
|
-
return r ?
|
|
392
|
-
},
|
|
393
|
-
let t =
|
|
392
|
+
let r = P(t);
|
|
393
|
+
return r ? je(n, r) : Me(n, typeof t[0] == "string" ? t[0] : "MMM D, YYYY");
|
|
394
|
+
}, I = /* @__PURE__ */ new Map(), Pe = (e) => {
|
|
395
|
+
let t = I.get(e);
|
|
394
396
|
if (t) return t;
|
|
395
397
|
try {
|
|
396
398
|
return t = new Intl.NumberFormat(void 0, {
|
|
397
399
|
style: "currency",
|
|
398
400
|
currency: e
|
|
399
|
-
}),
|
|
401
|
+
}), I.set(e, t), t;
|
|
400
402
|
} catch {
|
|
401
403
|
return null;
|
|
402
404
|
}
|
|
403
|
-
},
|
|
405
|
+
}, Fe = (e, t = "USD") => {
|
|
404
406
|
let n = Number(e);
|
|
405
407
|
if (Number.isNaN(n)) return String(e ?? "");
|
|
406
|
-
let r =
|
|
408
|
+
let r = Pe(t);
|
|
407
409
|
return r ? r.format(n) : `${t} ${n.toFixed(2)}`;
|
|
408
|
-
},
|
|
410
|
+
}, Ie = (e, t = 0) => {
|
|
409
411
|
let n = Number(e);
|
|
410
412
|
return Number.isNaN(n) ? String(e ?? "") : n.toLocaleString(void 0, {
|
|
411
413
|
minimumFractionDigits: Number(t),
|
|
412
414
|
maximumFractionDigits: Number(t)
|
|
413
415
|
});
|
|
414
|
-
},
|
|
416
|
+
}, Le = (e) => e.replace(/\w\S*/g, (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()), L = {
|
|
415
417
|
default: {
|
|
416
418
|
label: "Fallback",
|
|
417
|
-
apply: (e, [t]) =>
|
|
419
|
+
apply: (e, [t]) => k(e) ? t : e
|
|
418
420
|
},
|
|
419
421
|
prefix: {
|
|
420
422
|
label: "Prefix",
|
|
421
|
-
apply: (e, [t]) =>
|
|
423
|
+
apply: (e, [t]) => k(e) ? e : `${t}${e}`
|
|
422
424
|
},
|
|
423
425
|
suffix: {
|
|
424
426
|
label: "Suffix",
|
|
425
|
-
apply: (e, [t]) =>
|
|
427
|
+
apply: (e, [t]) => k(e) ? e : `${e}${t}`
|
|
426
428
|
},
|
|
427
429
|
upper: {
|
|
428
430
|
label: "Uppercase",
|
|
@@ -434,44 +436,44 @@ var D = (e, t) => {
|
|
|
434
436
|
},
|
|
435
437
|
title: {
|
|
436
438
|
label: "Title case",
|
|
437
|
-
apply: (e) => typeof e == "string" ?
|
|
439
|
+
apply: (e) => typeof e == "string" ? Le(e) : e
|
|
438
440
|
},
|
|
439
441
|
date: {
|
|
440
442
|
label: "Date",
|
|
441
|
-
apply: (e, t) =>
|
|
443
|
+
apply: (e, t) => Ne(e, t)
|
|
442
444
|
},
|
|
443
445
|
number: {
|
|
444
446
|
label: "Number",
|
|
445
|
-
apply: (e, [t]) =>
|
|
447
|
+
apply: (e, [t]) => Ie(e, Number(t ?? 0))
|
|
446
448
|
},
|
|
447
449
|
currency: {
|
|
448
450
|
label: "Currency",
|
|
449
|
-
apply: (e, [t]) =>
|
|
451
|
+
apply: (e, [t]) => Fe(e, t ?? "USD")
|
|
450
452
|
},
|
|
451
453
|
text: {
|
|
452
454
|
label: "Static text",
|
|
453
455
|
apply: (e, [t]) => t
|
|
454
456
|
}
|
|
455
|
-
},
|
|
457
|
+
}, R = (e, t) => {
|
|
456
458
|
if (e === t) return !0;
|
|
457
459
|
let n = typeof e == "string" ? Number(e) : e, r = typeof t == "string" ? Number(t) : t;
|
|
458
460
|
return typeof n == "number" && typeof r == "number" && !Number.isNaN(n) && !Number.isNaN(r) ? n === r : e == t;
|
|
459
|
-
},
|
|
461
|
+
}, Re = (e, t) => {
|
|
460
462
|
let [n, r] = t;
|
|
461
463
|
switch (n) {
|
|
462
464
|
case "truthy": return !!e;
|
|
463
465
|
case "falsy": return !e;
|
|
464
|
-
case "eq": return
|
|
465
|
-
case "neq": return !
|
|
466
|
+
case "eq": return R(e, r);
|
|
467
|
+
case "neq": return !R(e, r);
|
|
466
468
|
case "gt": return Number(e) > Number(r);
|
|
467
469
|
case "gte": return Number(e) >= Number(r);
|
|
468
470
|
case "lt": return Number(e) < Number(r);
|
|
469
471
|
case "lte": return Number(e) <= Number(r);
|
|
470
|
-
case "contains": return Array.isArray(e) ? e.some((e) =>
|
|
472
|
+
case "contains": return Array.isArray(e) ? e.some((e) => R(e, r)) : typeof e == "string" ? e.includes(String(r)) : !1;
|
|
471
473
|
default: return !0;
|
|
472
474
|
}
|
|
473
|
-
},
|
|
474
|
-
let n = Object.hasOwn(t, e.path), r = t[e.path], i = e.transforms.find((e) => e.name === "if"), a = e.transforms.find((e) => e.name === "text"), o = i ? !
|
|
475
|
+
}, ze = (e, t) => {
|
|
476
|
+
let n = Object.hasOwn(t, e.path), r = t[e.path], i = e.transforms.find((e) => e.name === "if"), a = e.transforms.find((e) => e.name === "text"), o = i ? !Re(r, i.args) : !1;
|
|
475
477
|
if (o) {
|
|
476
478
|
let e = a?.args[1];
|
|
477
479
|
if (e === void 0) return {
|
|
@@ -494,7 +496,7 @@ var D = (e, t) => {
|
|
|
494
496
|
}
|
|
495
497
|
for (let t of e.transforms) {
|
|
496
498
|
if (t.name === "if" || t.name === "text") continue;
|
|
497
|
-
let e =
|
|
499
|
+
let e = L[t.name];
|
|
498
500
|
e && (s = e.apply(s, t.args));
|
|
499
501
|
}
|
|
500
502
|
let c;
|
|
@@ -504,12 +506,12 @@ var D = (e, t) => {
|
|
|
504
506
|
pathExists: n,
|
|
505
507
|
conditionFailed: !1
|
|
506
508
|
};
|
|
507
|
-
},
|
|
509
|
+
}, Be = /\{([^{}]+)\}/g, Ve = /^\{([^{}]+)\}$/, z = h({
|
|
508
510
|
isStudio: !1,
|
|
509
511
|
renderMode: "live",
|
|
510
512
|
workspace_id: "",
|
|
511
513
|
pageSource: []
|
|
512
|
-
}),
|
|
514
|
+
}), He = ({ children: e, value: t }) => {
|
|
513
515
|
let [n, r] = S(t.parsedBlockData);
|
|
514
516
|
y(() => {
|
|
515
517
|
r((e) => t.parsedBlockData === e ? e : t.parsedBlockData);
|
|
@@ -524,7 +526,9 @@ var D = (e, t) => {
|
|
|
524
526
|
isStudio: t.renderMode?.startsWith("studio.") ?? !1,
|
|
525
527
|
renderMode: t.renderMode,
|
|
526
528
|
workspace_id: t.workspace_id,
|
|
527
|
-
pageSource: t.pageSource
|
|
529
|
+
pageSource: t.pageSource,
|
|
530
|
+
localizedPages: t.localizedPages,
|
|
531
|
+
language: t.language
|
|
528
532
|
}), [
|
|
529
533
|
n,
|
|
530
534
|
r,
|
|
@@ -534,13 +538,21 @@ var D = (e, t) => {
|
|
|
534
538
|
t.blockContext,
|
|
535
539
|
t.renderMode,
|
|
536
540
|
t.workspace_id,
|
|
537
|
-
t.pageSource
|
|
541
|
+
t.pageSource,
|
|
542
|
+
t.localizedPages,
|
|
543
|
+
t.language
|
|
538
544
|
]);
|
|
539
|
-
return /* @__PURE__ */ w(
|
|
545
|
+
return /* @__PURE__ */ w(z.Provider, {
|
|
540
546
|
value: i,
|
|
541
547
|
children: e
|
|
542
548
|
});
|
|
543
|
-
},
|
|
549
|
+
}, B = () => ee(z), Ue = () => {
|
|
550
|
+
let { localizedPages: e, language: t } = B();
|
|
551
|
+
return {
|
|
552
|
+
localizedPages: e ?? [],
|
|
553
|
+
currentLanguage: t
|
|
554
|
+
};
|
|
555
|
+
}, V = {
|
|
544
556
|
opacity: 1,
|
|
545
557
|
scale: 1,
|
|
546
558
|
rotate: 0,
|
|
@@ -550,7 +562,7 @@ var D = (e, t) => {
|
|
|
550
562
|
y: 0,
|
|
551
563
|
skewX: 0,
|
|
552
564
|
skewY: 0
|
|
553
|
-
},
|
|
565
|
+
}, H = {
|
|
554
566
|
opacity: 0,
|
|
555
567
|
scale: 1,
|
|
556
568
|
rotate: 0,
|
|
@@ -560,25 +572,25 @@ var D = (e, t) => {
|
|
|
560
572
|
y: 0,
|
|
561
573
|
skewX: 0,
|
|
562
574
|
skewY: 0
|
|
563
|
-
},
|
|
575
|
+
}, We = {
|
|
564
576
|
type: "spring",
|
|
565
577
|
duration: .5,
|
|
566
578
|
delay: 0,
|
|
567
579
|
bounce: .25,
|
|
568
580
|
ease: "easeOut"
|
|
569
|
-
},
|
|
581
|
+
}, Ge = {
|
|
570
582
|
once: !0,
|
|
571
583
|
amount: "some",
|
|
572
584
|
margin: "0px 0px -150px 0px"
|
|
573
|
-
},
|
|
585
|
+
}, U = (e, t) => {
|
|
574
586
|
if (!(!e || !t)) for (let n of e) {
|
|
575
587
|
if (n.key === t) return n;
|
|
576
588
|
if (n.fields?.length) {
|
|
577
|
-
let e =
|
|
589
|
+
let e = U(n.fields, t);
|
|
578
590
|
if (e) return e;
|
|
579
591
|
}
|
|
580
592
|
}
|
|
581
|
-
},
|
|
593
|
+
}, Ke = (e, t) => {
|
|
582
594
|
let n = t.toLowerCase().trim(), r = [], i = (e, t, a) => {
|
|
583
595
|
if (t.children?.length) {
|
|
584
596
|
for (let n of t.children) i(e, n, [...a, t.label]);
|
|
@@ -593,7 +605,7 @@ var D = (e, t) => {
|
|
|
593
605
|
};
|
|
594
606
|
for (let t of e) for (let e of t.items) i(t.name, e, []);
|
|
595
607
|
return r;
|
|
596
|
-
},
|
|
608
|
+
}, W = (e, t) => {
|
|
597
609
|
if (!(!e || !t)) return t.split(".").reduce((e, t) => {
|
|
598
610
|
if (e == null) return;
|
|
599
611
|
let n = /^\d+$/.test(t), r = e;
|
|
@@ -603,7 +615,7 @@ var D = (e, t) => {
|
|
|
603
615
|
}
|
|
604
616
|
return r?.[t];
|
|
605
617
|
}, e);
|
|
606
|
-
},
|
|
618
|
+
}, G = (e) => !!e && typeof e == "object" && "selectedVariants" in e, K = (e) => e?.replaceAll(".", "-").replace(/[^a-zA-Z0-9_-]/g, ""), q = (e) => {
|
|
607
619
|
let t = e.split(".");
|
|
608
620
|
for (let e = t.length - 2; e >= 1; e--) if (t[e] && /^\d+$/.test(t[e])) {
|
|
609
621
|
let n = t[e - 1], r = parseInt(t[e], 10), i = t.slice(e + 1).join("."), a = [];
|
|
@@ -625,15 +637,15 @@ var D = (e, t) => {
|
|
|
625
637
|
};
|
|
626
638
|
}
|
|
627
639
|
return { isGroupItem: !1 };
|
|
628
|
-
},
|
|
640
|
+
}, J = (e) => {
|
|
629
641
|
let t = [];
|
|
630
|
-
return
|
|
642
|
+
return G(e) && Object.entries(e.selectedVariants).forEach(([e, n]) => {
|
|
631
643
|
typeof n == "string" && t.push(`levo-variant-${e}-${n}`);
|
|
632
644
|
}), t;
|
|
633
|
-
},
|
|
634
|
-
let r =
|
|
645
|
+
}, Y = (e, t, n) => b(() => {
|
|
646
|
+
let r = J(n), i = `levo-${t}-${K(e)}`, a = q(e);
|
|
635
647
|
return a.isGroupItem && a.sharedPath ? [
|
|
636
|
-
`levo-${t}-${
|
|
648
|
+
`levo-${t}-${K(a.sharedPath)}`,
|
|
637
649
|
i,
|
|
638
650
|
...r
|
|
639
651
|
].filter(Boolean).join(" ") : [i, ...r].join(" ");
|
|
@@ -641,7 +653,7 @@ var D = (e, t) => {
|
|
|
641
653
|
n?.selectedVariants,
|
|
642
654
|
e,
|
|
643
655
|
t
|
|
644
|
-
]),
|
|
656
|
+
]), X = (e, t, n, r, i, a) => b(() => {
|
|
645
657
|
let { className: o, style: s, config: c, styles: l, content: u, ...d } = e;
|
|
646
658
|
return {
|
|
647
659
|
...d,
|
|
@@ -666,7 +678,7 @@ var D = (e, t) => {
|
|
|
666
678
|
r,
|
|
667
679
|
i,
|
|
668
680
|
a
|
|
669
|
-
]),
|
|
681
|
+
]), qe = {
|
|
670
682
|
id: "7074716021398640563",
|
|
671
683
|
workspace_id: "WZZKMUBH",
|
|
672
684
|
name: "Booster Applications",
|
|
@@ -1375,13 +1387,13 @@ var D = (e, t) => {
|
|
|
1375
1387
|
}
|
|
1376
1388
|
]
|
|
1377
1389
|
}]
|
|
1378
|
-
},
|
|
1379
|
-
let { isStudio: n } =
|
|
1380
|
-
return n ? e : /* @__PURE__ */ w(
|
|
1390
|
+
}, Je = ({ children: e, ...t }) => {
|
|
1391
|
+
let { isStudio: n } = B();
|
|
1392
|
+
return n ? e : /* @__PURE__ */ w(oe, {
|
|
1381
1393
|
...t,
|
|
1382
1394
|
children: e
|
|
1383
1395
|
});
|
|
1384
|
-
},
|
|
1396
|
+
}, Ye = (e) => {
|
|
1385
1397
|
if (e?.action) switch (e.action.type) {
|
|
1386
1398
|
case "external_link": {
|
|
1387
1399
|
let t = e.action.value;
|
|
@@ -1392,8 +1404,8 @@ var D = (e, t) => {
|
|
|
1392
1404
|
case "phone": return `tel:${e.action.value}`;
|
|
1393
1405
|
default: return;
|
|
1394
1406
|
}
|
|
1395
|
-
},
|
|
1396
|
-
let { openModal: n } = c(), { isLoggedIn: r } = s(), { openPopup: i } =
|
|
1407
|
+
}, Xe = ({ children: e, config: t }) => {
|
|
1408
|
+
let { openModal: n } = c(), { isLoggedIn: r } = s(), { openPopup: i } = D(), a = t?.action?.alt;
|
|
1397
1409
|
if (t?.action?.type === "popup") {
|
|
1398
1410
|
let n = t.action.value, r = () => {
|
|
1399
1411
|
n && i(n);
|
|
@@ -1411,7 +1423,7 @@ var D = (e, t) => {
|
|
|
1411
1423
|
});
|
|
1412
1424
|
}
|
|
1413
1425
|
if (t?.action?.type === "login") {
|
|
1414
|
-
if (r) return /* @__PURE__ */ w(
|
|
1426
|
+
if (r) return /* @__PURE__ */ w(Je, {
|
|
1415
1427
|
href: t?.action?.value || "",
|
|
1416
1428
|
style: { display: "contents" },
|
|
1417
1429
|
"aria-label": a || void 0,
|
|
@@ -1432,8 +1444,8 @@ var D = (e, t) => {
|
|
|
1432
1444
|
children: e
|
|
1433
1445
|
});
|
|
1434
1446
|
}
|
|
1435
|
-
let o =
|
|
1436
|
-
return o ? /* @__PURE__ */ w(
|
|
1447
|
+
let o = Ye(t), l = t?.action?.options?.openInNewTab ? "_blank" : void 0;
|
|
1448
|
+
return o ? /* @__PURE__ */ w(Je, {
|
|
1437
1449
|
href: o,
|
|
1438
1450
|
style: { display: "contents" },
|
|
1439
1451
|
...l && {
|
|
@@ -1443,10 +1455,10 @@ var D = (e, t) => {
|
|
|
1443
1455
|
...a && { "aria-label": a },
|
|
1444
1456
|
children: e
|
|
1445
1457
|
}) : e;
|
|
1446
|
-
},
|
|
1458
|
+
}, Ze = {
|
|
1447
1459
|
once: !0,
|
|
1448
1460
|
margin: "0px 0px -150px 0px"
|
|
1449
|
-
},
|
|
1461
|
+
}, Qe = ({ children: e, MotionComponent: t, motionProps: n, scroll: r, entry: i, whileHover: a, exit: o }) => {
|
|
1450
1462
|
let s = x(null);
|
|
1451
1463
|
if (y(() => {
|
|
1452
1464
|
if (!r) return;
|
|
@@ -1487,13 +1499,13 @@ var D = (e, t) => {
|
|
|
1487
1499
|
});
|
|
1488
1500
|
}
|
|
1489
1501
|
let c = i ? {
|
|
1490
|
-
...
|
|
1502
|
+
...V,
|
|
1491
1503
|
...i.to,
|
|
1492
1504
|
transition: i.transition
|
|
1493
1505
|
} : void 0, l = i ? {
|
|
1494
|
-
once: i.viewport?.once ??
|
|
1506
|
+
once: i.viewport?.once ?? Ze.once,
|
|
1495
1507
|
amount: i.viewport?.amount,
|
|
1496
|
-
margin: i.viewport?.margin ??
|
|
1508
|
+
margin: i.viewport?.margin ?? Ze.margin
|
|
1497
1509
|
} : void 0;
|
|
1498
1510
|
return /* @__PURE__ */ w(t, {
|
|
1499
1511
|
...n,
|
|
@@ -1505,8 +1517,8 @@ var D = (e, t) => {
|
|
|
1505
1517
|
children: e
|
|
1506
1518
|
});
|
|
1507
1519
|
}, Z = (e) => {
|
|
1508
|
-
let t =
|
|
1509
|
-
let { parsedBlockData: a, renderMode: o } =
|
|
1520
|
+
let t = ae.create(e), n = ({ elementKey: n, children: r, ...i }) => {
|
|
1521
|
+
let { parsedBlockData: a, renderMode: o } = B(), { config: s, styles: c, content: l, id: u } = a || {}, d = s ? W(s, n) : void 0, f = c ? W(c, n) : void 0, p = l ? W(l, n) : void 0, m = b(() => {
|
|
1510
1522
|
let e = d || {}, t = i.config || {}, n = e.selectedVariants || {}, r = t.selectedVariants || {};
|
|
1511
1523
|
return {
|
|
1512
1524
|
...e,
|
|
@@ -1516,13 +1528,13 @@ var D = (e, t) => {
|
|
|
1516
1528
|
...r
|
|
1517
1529
|
}
|
|
1518
1530
|
};
|
|
1519
|
-
}, [d, i.config]), h =
|
|
1531
|
+
}, [d, i.config]), h = X(i, n, m, f, p, Y(n, u || "", m)), g = h.config?.animation, _ = b(() => g?.scroll ? {
|
|
1520
1532
|
from: {
|
|
1521
|
-
...
|
|
1533
|
+
...H,
|
|
1522
1534
|
...g.scroll.from
|
|
1523
1535
|
},
|
|
1524
1536
|
to: {
|
|
1525
|
-
...
|
|
1537
|
+
...V,
|
|
1526
1538
|
...g.scroll.to
|
|
1527
1539
|
},
|
|
1528
1540
|
offset: g.scroll.offset ?? {
|
|
@@ -1531,19 +1543,19 @@ var D = (e, t) => {
|
|
|
1531
1543
|
}
|
|
1532
1544
|
} : void 0, [g?.scroll]), v = b(() => g?.entry ? {
|
|
1533
1545
|
from: {
|
|
1534
|
-
...
|
|
1546
|
+
...H,
|
|
1535
1547
|
...g.entry.from
|
|
1536
1548
|
},
|
|
1537
1549
|
to: {
|
|
1538
|
-
...
|
|
1550
|
+
...V,
|
|
1539
1551
|
...g.entry.to
|
|
1540
1552
|
},
|
|
1541
1553
|
transition: g.entry.transition,
|
|
1542
1554
|
viewport: g.entry.viewport
|
|
1543
1555
|
} : void 0, [g?.entry]);
|
|
1544
|
-
return !a || h.config?.enabled === !1 ? null : g && Object.keys(g).length > 0 && o !== "studio.block" ? /* @__PURE__ */ w(
|
|
1556
|
+
return !a || h.config?.enabled === !1 ? null : g && Object.keys(g).length > 0 && o !== "studio.block" ? /* @__PURE__ */ w(Xe, {
|
|
1545
1557
|
config: h?.config || {},
|
|
1546
|
-
children: /* @__PURE__ */ w(
|
|
1558
|
+
children: /* @__PURE__ */ w(Qe, {
|
|
1547
1559
|
MotionComponent: t,
|
|
1548
1560
|
motionProps: h,
|
|
1549
1561
|
scroll: _,
|
|
@@ -1552,7 +1564,7 @@ var D = (e, t) => {
|
|
|
1552
1564
|
exit: g.exit,
|
|
1553
1565
|
children: r
|
|
1554
1566
|
})
|
|
1555
|
-
}) : /* @__PURE__ */ w(
|
|
1567
|
+
}) : /* @__PURE__ */ w(Xe, {
|
|
1556
1568
|
config: h?.config || {},
|
|
1557
1569
|
children: /* @__PURE__ */ w(e, {
|
|
1558
1570
|
...h,
|
|
@@ -1561,7 +1573,7 @@ var D = (e, t) => {
|
|
|
1561
1573
|
});
|
|
1562
1574
|
};
|
|
1563
1575
|
return n.displayName = `withBlockProps(${e.displayName || e.name || "Component"})`, v(n);
|
|
1564
|
-
},
|
|
1576
|
+
}, $e = g(({ className: e, config: t, content: n, elementKey: r, generatedClassName: i, styles: a, noElementKey: o, ...s }, c) => {
|
|
1565
1577
|
if (!n) return /* @__PURE__ */ w("span", {
|
|
1566
1578
|
ref: c,
|
|
1567
1579
|
style: { display: "none" }
|
|
@@ -1617,9 +1629,9 @@ var D = (e, t) => {
|
|
|
1617
1629
|
});
|
|
1618
1630
|
}
|
|
1619
1631
|
});
|
|
1620
|
-
|
|
1621
|
-
var Q = Z(
|
|
1622
|
-
let f = r ?? o, p = i, m = (e, t) => e?.enabled ? /* @__PURE__ */ w(Q, {
|
|
1632
|
+
$e.displayName = "BaseIcon";
|
|
1633
|
+
var Q = Z($e), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, children: r, config: i = {}, styles: a, content: o, elementKey: s, generatedClassName: c, ...l }, u) => {
|
|
1634
|
+
let f = r ?? o, p = i, m = typeof f == "string" ? re(se.sanitize(f)) : f, h = (e, t) => e?.enabled ? /* @__PURE__ */ w(Q, {
|
|
1623
1635
|
noElementKey: !0,
|
|
1624
1636
|
elementKey: `${s}_${t}Icon`
|
|
1625
1637
|
}) : null;
|
|
@@ -1630,13 +1642,13 @@ var Q = Z(Xe), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, c
|
|
|
1630
1642
|
className: d("inline-flex items-center justify-center", e, c),
|
|
1631
1643
|
ref: u,
|
|
1632
1644
|
...l,
|
|
1633
|
-
children: t ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(
|
|
1634
|
-
|
|
1645
|
+
children: t ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ie, { className: d("h-4 w-4 animate-spin", n ? "mr-2" : "") }), n] }) : /* @__PURE__ */ T(C, { children: [
|
|
1646
|
+
h(p?.button_icons?.left, "left"),
|
|
1635
1647
|
/* @__PURE__ */ w("span", {
|
|
1636
1648
|
className: "button-content",
|
|
1637
|
-
children:
|
|
1649
|
+
children: m
|
|
1638
1650
|
}),
|
|
1639
|
-
|
|
1651
|
+
h(p?.button_icons?.right, "right")
|
|
1640
1652
|
] })
|
|
1641
1653
|
}) : /* @__PURE__ */ w("span", {
|
|
1642
1654
|
ref: u,
|
|
@@ -1644,6 +1656,6 @@ var Q = Z(Xe), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, c
|
|
|
1644
1656
|
});
|
|
1645
1657
|
});
|
|
1646
1658
|
$.displayName = "BaseButton";
|
|
1647
|
-
var
|
|
1659
|
+
var et = Z($);
|
|
1648
1660
|
//#endregion
|
|
1649
|
-
export {
|
|
1661
|
+
export { L as A, ue as B, j as C, xe as D, M as E, ke as F, Oe as I, ye as L, ze as M, P as N, Ve as O, ve as P, me as R, A as S, be as T, Ge as _, qe as a, B as b, G as c, X as d, Y as f, We as g, H as h, Z as i, Te as j, Be as k, q as l, U as m, et as n, J as o, Ke as p, Q as r, W as s, $ as t, K as u, V as v, N as w, Ue as x, He as y, D as z };
|