@levo-so/studio 0.1.108 → 0.1.110

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.
Files changed (42) hide show
  1. package/{BillingStep-CJqmdIz2.js → BillingStep-CY2MHQ-L.js} +1 -1
  2. package/{Button-DujHjtOV.js → Button-DjphTnCg.js} +545 -97
  3. package/{CollectionField-BPl8E9MW.js → CollectionField-DrJuHNsg.js} +38 -38
  4. package/{DateTimeWidget-CbpvxQ9s.js → DateTimeWidget-BVHZh4EV.js} +13 -13
  5. package/{EntryCard-Drnobf4s.js → EntryCard-BYONyIm5.js} +7 -4
  6. package/{LoginCard-B9HKjZEk.js → LoginCard-CrtSHdaR.js} +3 -3
  7. package/{LoginForm-DpgxFh89.js → LoginForm-DeYsk4kd.js} +18 -18
  8. package/{LoginModal-CaqsScly.js → LoginModal-BbDfB4S9.js} +3 -3
  9. package/{MessageCard-DojQRKnf.js → MessageCard-x6jPClGi.js} +2 -2
  10. package/{MessageFooter-C4qC8cem.js → MessageFooter-CHuPnL_D.js} +1 -1
  11. package/{ModalManager-CaBZKQR2.js → ModalManager-DQVNPEuG.js} +1 -1
  12. package/{PendingApprovalCard-CrdOrMRu.js → PendingApprovalCard-CsnyrSsa.js} +3 -3
  13. package/{PhoneWidget-BxW2gL28.js → PhoneWidget-BaDSMSW5.js} +5 -5
  14. package/{PopupRenderer-CV5HY1dP-hICGc5AG.js → PopupRenderer-Dd9zoNIY-Cx663DmW.js} +346 -315
  15. package/ProfileCard-Dg5TY1Mw.js +102 -0
  16. package/{RichTextWidget-DCzgJ9EA.js → RichTextWidget-yaDCZwIo.js} +10 -10
  17. package/{RteThemeProvider-Cfepkyer.js → RteThemeProvider-LFGzAYi1.js} +2 -2
  18. package/{Toolbar-B5UZer_x.js → Toolbar-D3PnF7Ud.js} +4 -4
  19. package/{VerifyButton-DFAg6STD.js → VerifyButton-6BIXAEGp.js} +1 -1
  20. package/{bookingCard-BgApvrcj.js → bookingCard-D40dbgvH.js} +3 -3
  21. package/collection.d.ts +14 -6
  22. package/collection.js +6 -7
  23. package/dist-bHoi1bCB.js +3795 -0
  24. package/index.d.ts +312 -18
  25. package/index.js +2709 -2177
  26. package/{inlineCollectionTheme-WpCvMKrW.js → inlineCollectionTheme-D2w17LHX.js} +1 -1
  27. package/{inlineRteTheme-Ajq9PNpQ.js → inlineRteTheme-abXxag3B.js} +1 -1
  28. package/{nodeAlignment-DKCIjzlR.js → nodeAlignment-BC_Uferw.js} +5 -5
  29. package/package.json +5 -5
  30. package/studio.css +1 -1
  31. package/{utils-CUqS5dMC.js → utils-C_tr8kXV.js} +1 -1
  32. package/CollectionFormBuilder-BvFtiZeH.js +0 -3668
  33. package/dist-DZbXWctg.js +0 -97
  34. /package/{CollectionInput-DcNJT5Pg.js → CollectionInput-CG-Pu_51.js} +0 -0
  35. /package/{Popover-DOvRAGzc.js → Popover-DnZY1k6o.js} +0 -0
  36. /package/{StripePaymentModal-Do1xHctU.js → StripePaymentModal-BsYNQ4MB.js} +0 -0
  37. /package/{Tooltip-CJINDx93.js → Tooltip-DreKXbTO.js} +0 -0
  38. /package/{authentication-ClOFcry8.js → authentication-TdyaDNTn.js} +0 -0
  39. /package/{card-E2LKF9nT.js → card-D5fPArfa.js} +0 -0
  40. /package/{dialog-DoxC50i0.js → dialog-LRLdr3kq.js} +0 -0
  41. /package/{theme.cssm-BXDp-ojp.js → theme.cssm-2YTdd8Yh.js} +0 -0
  42. /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 { c as e, i as t, n, o as r, s as i, t as a, u as o } from "./PopupRenderer-CV5HY1dP-hICGc5AG.js";
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-CaBZKQR2.js";
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,82 +13,505 @@ 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 { LoaderCircle as D } from "lucide-react";
17
- import * as O from "motion/react-m";
18
- import re from "next/link";
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 ie = async (e, t) => {
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
- }, ae = _(() => import("./PopupRenderer-CV5HY1dP-hICGc5AG.js").then((e) => e.a).then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), k = (t) => {
24
- let n = l(9), { siteId: r, pageId: i } = t, { fetch: a, logger: o } = f(), [s, c] = S(null), d = x(!1), p, h;
25
- if (n[0] !== a || n[1] !== o || n[2] !== r ? (p = () => {
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
- let t = () => {
28
- d.current || (d.current = !0, ie(a, r ? { site_id: r } : void 0).then((t) => {
29
- e(t), c(t);
30
- }).catch((t) => {
31
- o?.error("Failed to fetch popups", { exception: t }), e([]), c([]);
32
- }).finally(A));
29
+ let e = () => {
30
+ d.current || (d.current = !0, ce(i, n ? { site_id: n } : void 0).then((e) => {
31
+ o(e), c(e);
32
+ }).catch((e) => {
33
+ a?.error("Failed to fetch popups", { exception: e }), o([]), c([]);
34
+ }).finally(de));
33
35
  };
34
36
  if (u.get()) {
35
- t();
37
+ e();
36
38
  return;
37
39
  }
38
- let n = u.listen((e) => {
39
- e && (n(), t());
40
+ let t = u.listen((n) => {
41
+ n && (t(), e());
40
42
  });
41
- return () => n();
43
+ return () => t();
42
44
  }, h = [
45
+ i,
43
46
  a,
44
- o,
45
- r
46
- ], n[0] = a, n[1] = o, n[2] = r, n[3] = p, n[4] = h) : (p = n[3], h = n[4]), y(p, h), !s || s.length === 0) return null;
47
+ n
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
- n[5] === Symbol.for("react.memo_cache_sentinel") ? (g = {
50
+ t[5] === Symbol.for("react.memo_cache_sentinel") ? (g = {
49
51
  position: "relative",
50
52
  zIndex: 99999
51
- }, n[5] = g) : g = n[5];
53
+ }, t[5] = g) : g = t[5];
52
54
  let _;
53
- return n[6] !== i || n[7] !== s ? (_ = /* @__PURE__ */ w("div", {
55
+ return t[6] !== r || t[7] !== s ? (_ = /* @__PURE__ */ w("div", {
54
56
  style: g,
55
- children: /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(ae, {
57
+ children: /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(le, {
56
58
  popups: s,
57
- pageId: i
59
+ pageId: r
58
60
  }) })
59
- }), n[6] = i, n[7] = s, n[8] = _) : _ = n[8], _;
61
+ }), t[6] = r, t[7] = s, t[8] = _) : _ = t[8], _;
60
62
  };
61
- function A() {
62
- return i(!1);
63
+ function de() {
64
+ return n(!1);
63
65
  }
64
- var j = () => {
65
- let e = l(3), t = E(a), r = E(n), i = M, o = N, s;
66
- return e[0] !== r || e[1] !== t ? (s = {
67
- popups: t,
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,
68
70
  isLoading: r,
69
71
  openPopup: i,
70
72
  closePopup: o
71
- }, e[0] = r, e[1] = t, e[2] = s) : s = e[2], s;
73
+ }, e[0] = r, e[1] = n, e[2] = s) : s = e[2], s;
72
74
  };
73
- function M(e) {
74
- let n = a.get().find((t) => t.id === e);
75
- n && t(n, {
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 N() {
81
- let e = r.get().active_popup_id;
82
- e && o(e);
82
+ function pe() {
83
+ let t = r.get().active_popup_id;
84
+ t && e(t);
85
+ }
86
+ //#endregion
87
+ //#region src/utils/getKeysWithValue.ts
88
+ function me(e, t) {
89
+ let n = (e, r) => {
90
+ let i = {};
91
+ if (typeof e != "object" || !e) return i;
92
+ let a = Array.isArray(e) ? e[0] : e;
93
+ if (!a || typeof a != "object") return i;
94
+ for (let e of Object.keys(a)) {
95
+ let o = a[e];
96
+ if (i[e] = o, typeof o != "object" || !o || t !== void 0 && r >= t) continue;
97
+ let s = Array.isArray(o) ? o[0] : o;
98
+ if (!s || typeof s != "object") continue;
99
+ let c = n(s, r + 1);
100
+ for (let t of Object.keys(c)) i[`${e}.${t}`] = c[t];
101
+ }
102
+ return i;
103
+ };
104
+ return n(e, 0);
83
105
  }
84
106
  //#endregion
85
- //#region src/providers/BlockContext.tsx
86
- var P = h({
107
+ //#region src/utils/variableExpression.ts
108
+ var O = (e, t) => {
109
+ let n = [], r = "", i = !1, a = !1;
110
+ for (let o of e) {
111
+ if (a) {
112
+ r += o, a = !1;
113
+ continue;
114
+ }
115
+ if (o === "\\") {
116
+ a = !0, r += o;
117
+ continue;
118
+ }
119
+ if (o === "\"") {
120
+ i = !i, r += o;
121
+ continue;
122
+ }
123
+ if (!i && o === t) {
124
+ n.push(r), r = "";
125
+ continue;
126
+ }
127
+ r += o;
128
+ }
129
+ return n.push(r), n;
130
+ }, he = (e) => {
131
+ let t = e.trim();
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;
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());
135
+ return {
136
+ name: t[0] ?? "",
137
+ args: t.slice(1).map(he)
138
+ };
139
+ }, ve = (e) => {
140
+ let t = O(e, "|").map((e) => e.trim());
141
+ return {
142
+ path: t[0] ?? "",
143
+ transforms: t.slice(1).filter(Boolean).map(_e)
144
+ };
145
+ }, ye = (e) => {
146
+ let t = [e.path];
147
+ for (let n of e.transforms) t.push([n.name, ...n.args.map(ge)].join(":"));
148
+ return t.join(" | ");
149
+ }, k = (e) => e == null || e === "", A = [
150
+ "date",
151
+ "time",
152
+ "datetime",
153
+ "relative"
154
+ ], j = {
155
+ date: [
156
+ "full",
157
+ "day",
158
+ "month",
159
+ "year",
160
+ "day-month",
161
+ "month-year"
162
+ ],
163
+ time: ["clock"],
164
+ datetime: ["full", "compact"],
165
+ relative: ["auto"]
166
+ }, M = [
167
+ "S",
168
+ "M",
169
+ "L",
170
+ "XL"
171
+ ], be = [
172
+ {
173
+ value: "auto",
174
+ label: "Auto"
175
+ },
176
+ {
177
+ value: "en-US",
178
+ label: "English (US)"
179
+ },
180
+ {
181
+ value: "en-GB",
182
+ label: "English (UK)"
183
+ },
184
+ {
185
+ value: "fr-FR",
186
+ label: "French"
187
+ },
188
+ {
189
+ value: "de-DE",
190
+ label: "German"
191
+ },
192
+ {
193
+ value: "es-ES",
194
+ label: "Spanish"
195
+ },
196
+ {
197
+ value: "hi-IN",
198
+ label: "Hindi"
199
+ },
200
+ {
201
+ value: "ja-JP",
202
+ label: "Japanese"
203
+ },
204
+ {
205
+ value: "zh-CN",
206
+ label: "Chinese"
207
+ }
208
+ ], N = [
209
+ "auto",
210
+ "12",
211
+ "24"
212
+ ], xe = {
213
+ display: "date",
214
+ format: "full",
215
+ style: "M",
216
+ locale: "auto",
217
+ hour12: "auto"
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) => {
219
+ let [t, n, r, i, a] = e;
220
+ if (!Se(t)) return null;
221
+ let o = j[t];
222
+ return {
223
+ display: t,
224
+ format: typeof n == "string" && o.includes(n) ? n : o[0] ?? "full",
225
+ style: Ce(r) ? r : "M",
226
+ locale: typeof i == "string" && i ? i : "auto",
227
+ hour12: we(a) ? a : "auto"
228
+ };
229
+ }, Te = (e) => {
230
+ let t = [
231
+ e.display,
232
+ e.format,
233
+ e.style,
234
+ e.locale,
235
+ e.hour12
236
+ ];
237
+ for (; t.length > 1 && t[t.length - 1] === "auto";) t.pop();
238
+ return t;
239
+ }, Ee = (e) => {
240
+ if (!(!e || e === "auto")) try {
241
+ return Intl.DateTimeFormat.supportedLocalesOf([e]).length ? e : void 0;
242
+ } catch {
243
+ return;
244
+ }
245
+ }, De = (e) => e === "12" ? !0 : e === "24" ? !1 : void 0, Oe = (e, t) => {
246
+ if (e === "relative") return [
247
+ "S",
248
+ "M",
249
+ "L"
250
+ ];
251
+ if (e === "time") return [
252
+ "M",
253
+ "L",
254
+ "XL"
255
+ ];
256
+ if (e === "datetime") return t === "compact" ? [
257
+ "M",
258
+ "L",
259
+ "XL"
260
+ ] : [
261
+ "S",
262
+ "M",
263
+ "L",
264
+ "XL"
265
+ ];
266
+ switch (t) {
267
+ case "full": return [
268
+ "S",
269
+ "M",
270
+ "L",
271
+ "XL"
272
+ ];
273
+ case "day":
274
+ case "month":
275
+ case "day-month":
276
+ case "month-year": return [
277
+ "S",
278
+ "M",
279
+ "L"
280
+ ];
281
+ case "year": return ["S", "M"];
282
+ default: return [
283
+ "S",
284
+ "M",
285
+ "L",
286
+ "XL"
287
+ ];
288
+ }
289
+ }, ke = (e, t) => {
290
+ if (t.includes(e)) return e;
291
+ let n = M.indexOf(e), r = t[0] ?? "M", i = Math.abs(M.indexOf(r) - n);
292
+ for (let e of t) {
293
+ let t = Math.abs(M.indexOf(e) - n);
294
+ t < i && (r = e, i = t);
295
+ }
296
+ return r;
297
+ }, Ae = {
298
+ S: "narrow",
299
+ M: "short",
300
+ L: "long",
301
+ XL: "long"
302
+ }, F = {
303
+ S: "short",
304
+ M: "medium",
305
+ L: "long",
306
+ XL: "full"
307
+ }, je = (e, t) => {
308
+ let n = Ee(t.locale), r = (t) => new Intl.DateTimeFormat(n, t).format(e);
309
+ if (t.display === "relative") {
310
+ let r = new Intl.RelativeTimeFormat(n, {
311
+ numeric: "auto",
312
+ style: t.style === "S" ? "narrow" : t.style === "M" ? "short" : "long"
313
+ }), i = e.getTime() - Date.now(), a = Math.abs(i), o = 6e4, s = 60 * o, c = 24 * s;
314
+ 7 * c, 30 * c;
315
+ let l = [
316
+ [365 * c, "year"],
317
+ [2592e6, "month"],
318
+ [6048e5, "week"],
319
+ [c, "day"],
320
+ [s, "hour"],
321
+ [o, "minute"]
322
+ ];
323
+ for (let [e, t] of l) if (a >= e) return r.format(Math.round(i / e), t);
324
+ return r.format(Math.round(i / 1e3), "second");
325
+ }
326
+ let i = De(t.hour12);
327
+ if (t.display === "time") return r({
328
+ hour: "numeric",
329
+ minute: "2-digit",
330
+ second: t.style === "L" || t.style === "XL" ? "2-digit" : void 0,
331
+ timeZoneName: t.style === "XL" ? "short" : void 0,
332
+ hour12: i
333
+ });
334
+ if (t.display === "datetime") return r({
335
+ dateStyle: t.format === "compact" ? "medium" : F[t.style],
336
+ timeStyle: t.style === "S" || t.style === "M" ? "short" : t.style === "L" ? "medium" : "full",
337
+ hour12: i
338
+ });
339
+ switch (t.format) {
340
+ case "full": return r({ dateStyle: F[t.style] });
341
+ case "day": return r({ weekday: Ae[t.style] });
342
+ case "month": return t.style === "S" ? r({ month: "numeric" }) : r({ month: t.style === "M" ? "short" : "long" });
343
+ case "year": return r({ year: t.style === "S" ? "2-digit" : "numeric" });
344
+ case "day-month": return t.style === "S" ? r({
345
+ day: "numeric",
346
+ month: "numeric"
347
+ }) : r({
348
+ day: "numeric",
349
+ month: t.style === "M" ? "short" : "long"
350
+ });
351
+ case "month-year": return t.style === "S" ? r({
352
+ month: "numeric",
353
+ year: "2-digit"
354
+ }) : r({
355
+ month: t.style === "M" ? "short" : "long",
356
+ year: "numeric"
357
+ });
358
+ default: return r({ dateStyle: "medium" });
359
+ }
360
+ }, Me = (e, t) => {
361
+ let n = [
362
+ "January",
363
+ "February",
364
+ "March",
365
+ "April",
366
+ "May",
367
+ "June",
368
+ "July",
369
+ "August",
370
+ "September",
371
+ "October",
372
+ "November",
373
+ "December"
374
+ ], r = n.map((e) => e.slice(0, 3)), i = (e, t = 2) => String(e).padStart(t, "0"), a = e.getHours() % 12 || 12, o = e.getHours() >= 12 ? "pm" : "am", s = {
375
+ YYYY: String(e.getFullYear()),
376
+ MMMM: n[e.getMonth()] ?? "",
377
+ MMM: r[e.getMonth()] ?? "",
378
+ MM: i(e.getMonth() + 1),
379
+ DD: i(e.getDate()),
380
+ D: String(e.getDate()),
381
+ HH: i(e.getHours()),
382
+ hh: i(a),
383
+ h: String(a),
384
+ mm: i(e.getMinutes()),
385
+ a: o
386
+ };
387
+ return t.replace(/YYYY|MMMM|MMM|MM|DD|D|HH|hh|h|mm|\ba\b/g, (e) => s[e] ?? e);
388
+ }, Ne = (e, t) => {
389
+ if (k(e)) return "";
390
+ let n = new Date(e);
391
+ if (Number.isNaN(n.getTime())) return String(e);
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);
396
+ if (t) return t;
397
+ try {
398
+ return t = new Intl.NumberFormat(void 0, {
399
+ style: "currency",
400
+ currency: e
401
+ }), I.set(e, t), t;
402
+ } catch {
403
+ return null;
404
+ }
405
+ }, Fe = (e, t = "USD") => {
406
+ let n = Number(e);
407
+ if (Number.isNaN(n)) return String(e ?? "");
408
+ let r = Pe(t);
409
+ return r ? r.format(n) : `${t} ${n.toFixed(2)}`;
410
+ }, Ie = (e, t = 0) => {
411
+ let n = Number(e);
412
+ return Number.isNaN(n) ? String(e ?? "") : n.toLocaleString(void 0, {
413
+ minimumFractionDigits: Number(t),
414
+ maximumFractionDigits: Number(t)
415
+ });
416
+ }, Le = (e) => e.replace(/\w\S*/g, (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()), L = {
417
+ default: {
418
+ label: "Fallback",
419
+ apply: (e, [t]) => k(e) ? t : e
420
+ },
421
+ prefix: {
422
+ label: "Prefix",
423
+ apply: (e, [t]) => k(e) ? e : `${t}${e}`
424
+ },
425
+ suffix: {
426
+ label: "Suffix",
427
+ apply: (e, [t]) => k(e) ? e : `${e}${t}`
428
+ },
429
+ upper: {
430
+ label: "Uppercase",
431
+ apply: (e) => typeof e == "string" ? e.toUpperCase() : e
432
+ },
433
+ lower: {
434
+ label: "Lowercase",
435
+ apply: (e) => typeof e == "string" ? e.toLowerCase() : e
436
+ },
437
+ title: {
438
+ label: "Title case",
439
+ apply: (e) => typeof e == "string" ? Le(e) : e
440
+ },
441
+ date: {
442
+ label: "Date",
443
+ apply: (e, t) => Ne(e, t)
444
+ },
445
+ number: {
446
+ label: "Number",
447
+ apply: (e, [t]) => Ie(e, Number(t ?? 0))
448
+ },
449
+ currency: {
450
+ label: "Currency",
451
+ apply: (e, [t]) => Fe(e, t ?? "USD")
452
+ },
453
+ text: {
454
+ label: "Static text",
455
+ apply: (e, [t]) => t
456
+ }
457
+ }, R = (e, t) => {
458
+ if (e === t) return !0;
459
+ let n = typeof e == "string" ? Number(e) : e, r = typeof t == "string" ? Number(t) : t;
460
+ return typeof n == "number" && typeof r == "number" && !Number.isNaN(n) && !Number.isNaN(r) ? n === r : e == t;
461
+ }, Re = (e, t) => {
462
+ let [n, r] = t;
463
+ switch (n) {
464
+ case "truthy": return !!e;
465
+ case "falsy": return !e;
466
+ case "eq": return R(e, r);
467
+ case "neq": return !R(e, r);
468
+ case "gt": return Number(e) > Number(r);
469
+ case "gte": return Number(e) >= Number(r);
470
+ case "lt": return Number(e) < Number(r);
471
+ case "lte": return Number(e) <= Number(r);
472
+ case "contains": return Array.isArray(e) ? e.some((e) => R(e, r)) : typeof e == "string" ? e.includes(String(r)) : !1;
473
+ default: return !0;
474
+ }
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;
477
+ if (o) {
478
+ let e = a?.args[1];
479
+ if (e === void 0) return {
480
+ output: "",
481
+ rawValue: r,
482
+ pathExists: n,
483
+ conditionFailed: !0
484
+ };
485
+ if (e !== null) return {
486
+ output: String(e),
487
+ rawValue: r,
488
+ pathExists: n,
489
+ conditionFailed: !0
490
+ };
491
+ }
492
+ let s = r;
493
+ if (!o && a) {
494
+ let e = a.args[0];
495
+ e != null && (s = e);
496
+ }
497
+ for (let t of e.transforms) {
498
+ if (t.name === "if" || t.name === "text") continue;
499
+ let e = L[t.name];
500
+ e && (s = e.apply(s, t.args));
501
+ }
502
+ let c;
503
+ return c = s == null ? "" : Array.isArray(s) ? s.length === 0 ? "" : s.join(", ") : String(s), {
504
+ output: c,
505
+ rawValue: r,
506
+ pathExists: n,
507
+ conditionFailed: !1
508
+ };
509
+ }, Be = /\{([^{}]+)\}/g, Ve = /^\{([^{}]+)\}$/, z = h({
87
510
  isStudio: !1,
88
511
  renderMode: "live",
89
512
  workspace_id: "",
90
513
  pageSource: []
91
- }), oe = ({ children: e, value: t }) => {
514
+ }), He = ({ children: e, value: t }) => {
92
515
  let [n, r] = S(t.parsedBlockData);
93
516
  y(() => {
94
517
  r((e) => t.parsedBlockData === e ? e : t.parsedBlockData);
@@ -103,7 +526,9 @@ var P = h({
103
526
  isStudio: t.renderMode?.startsWith("studio.") ?? !1,
104
527
  renderMode: t.renderMode,
105
528
  workspace_id: t.workspace_id,
106
- pageSource: t.pageSource
529
+ pageSource: t.pageSource,
530
+ localizedPages: t.localizedPages,
531
+ language: t.language
107
532
  }), [
108
533
  n,
109
534
  r,
@@ -113,13 +538,21 @@ var P = h({
113
538
  t.blockContext,
114
539
  t.renderMode,
115
540
  t.workspace_id,
116
- t.pageSource
541
+ t.pageSource,
542
+ t.localizedPages,
543
+ t.language
117
544
  ]);
118
- return /* @__PURE__ */ w(P.Provider, {
545
+ return /* @__PURE__ */ w(z.Provider, {
119
546
  value: i,
120
547
  children: e
121
548
  });
122
- }, F = () => ee(P), I = {
549
+ }, B = () => ee(z), Ue = () => {
550
+ let { localizedPages: e, language: t } = B();
551
+ return {
552
+ localizedPages: e ?? [],
553
+ currentLanguage: t
554
+ };
555
+ }, V = {
123
556
  opacity: 1,
124
557
  scale: 1,
125
558
  rotate: 0,
@@ -129,7 +562,7 @@ var P = h({
129
562
  y: 0,
130
563
  skewX: 0,
131
564
  skewY: 0
132
- }, L = {
565
+ }, H = {
133
566
  opacity: 0,
134
567
  scale: 1,
135
568
  rotate: 0,
@@ -139,25 +572,40 @@ var P = h({
139
572
  y: 0,
140
573
  skewX: 0,
141
574
  skewY: 0
142
- }, R = {
575
+ }, We = {
143
576
  type: "spring",
144
577
  duration: .5,
145
578
  delay: 0,
146
579
  bounce: .25,
147
580
  ease: "easeOut"
148
- }, se = {
581
+ }, Ge = {
149
582
  once: !0,
150
583
  amount: "some",
151
584
  margin: "0px 0px -150px 0px"
152
- }, z = (e, t) => {
585
+ }, U = (e, t) => {
153
586
  if (!(!e || !t)) for (let n of e) {
154
587
  if (n.key === t) return n;
155
588
  if (n.fields?.length) {
156
- let e = z(n.fields, t);
589
+ let e = U(n.fields, t);
157
590
  if (e) return e;
158
591
  }
159
592
  }
160
- }, B = (e, t) => {
593
+ }, Ke = (e, t) => {
594
+ let n = t.toLowerCase().trim(), r = [], i = (e, t, a) => {
595
+ if (t.children?.length) {
596
+ for (let n of t.children) i(e, n, [...a, t.label]);
597
+ return;
598
+ }
599
+ let o = `${e} ${a.join(" ")} ${t.label} ${t.preview ?? ""}`.toLowerCase();
600
+ (!n || o.includes(n)) && r.push({
601
+ group: e,
602
+ parent: a.length ? a.join(" › ") : void 0,
603
+ item: t
604
+ });
605
+ };
606
+ for (let t of e) for (let e of t.items) i(t.name, e, []);
607
+ return r;
608
+ }, W = (e, t) => {
161
609
  if (!(!e || !t)) return t.split(".").reduce((e, t) => {
162
610
  if (e == null) return;
163
611
  let n = /^\d+$/.test(t), r = e;
@@ -167,7 +615,7 @@ var P = h({
167
615
  }
168
616
  return r?.[t];
169
617
  }, e);
170
- }, V = (e) => !!e && typeof e == "object" && "selectedVariants" in e, H = (e) => e?.replaceAll(".", "-").replace(/[^a-zA-Z0-9_-]/g, ""), U = (e) => {
618
+ }, G = (e) => !!e && typeof e == "object" && "selectedVariants" in e, K = (e) => e?.replaceAll(".", "-").replace(/[^a-zA-Z0-9_-]/g, ""), q = (e) => {
171
619
  let t = e.split(".");
172
620
  for (let e = t.length - 2; e >= 1; e--) if (t[e] && /^\d+$/.test(t[e])) {
173
621
  let n = t[e - 1], r = parseInt(t[e], 10), i = t.slice(e + 1).join("."), a = [];
@@ -189,15 +637,15 @@ var P = h({
189
637
  };
190
638
  }
191
639
  return { isGroupItem: !1 };
192
- }, W = (e) => {
640
+ }, J = (e) => {
193
641
  let t = [];
194
- return V(e) && Object.entries(e.selectedVariants).forEach(([e, n]) => {
642
+ return G(e) && Object.entries(e.selectedVariants).forEach(([e, n]) => {
195
643
  typeof n == "string" && t.push(`levo-variant-${e}-${n}`);
196
644
  }), t;
197
- }, G = (e, t, n) => b(() => {
198
- let r = W(n), i = `levo-${t}-${H(e)}`, a = U(e);
645
+ }, Y = (e, t, n) => b(() => {
646
+ let r = J(n), i = `levo-${t}-${K(e)}`, a = q(e);
199
647
  return a.isGroupItem && a.sharedPath ? [
200
- `levo-${t}-${H(a.sharedPath)}`,
648
+ `levo-${t}-${K(a.sharedPath)}`,
201
649
  i,
202
650
  ...r
203
651
  ].filter(Boolean).join(" ") : [i, ...r].join(" ");
@@ -205,7 +653,7 @@ var P = h({
205
653
  n?.selectedVariants,
206
654
  e,
207
655
  t
208
- ]), K = (e, t, n, r, i, a) => b(() => {
656
+ ]), X = (e, t, n, r, i, a) => b(() => {
209
657
  let { className: o, style: s, config: c, styles: l, content: u, ...d } = e;
210
658
  return {
211
659
  ...d,
@@ -230,7 +678,7 @@ var P = h({
230
678
  r,
231
679
  i,
232
680
  a
233
- ]), ce = {
681
+ ]), qe = {
234
682
  id: "7074716021398640563",
235
683
  workspace_id: "WZZKMUBH",
236
684
  name: "Booster Applications",
@@ -939,13 +1387,13 @@ var P = h({
939
1387
  }
940
1388
  ]
941
1389
  }]
942
- }, q = ({ children: e, ...t }) => {
943
- let { isStudio: n } = F();
944
- return n ? e : /* @__PURE__ */ w(re, {
1390
+ }, Je = ({ children: e, ...t }) => {
1391
+ let { isStudio: n } = B();
1392
+ return n ? e : /* @__PURE__ */ w(oe, {
945
1393
  ...t,
946
1394
  children: e
947
1395
  });
948
- }, le = (e) => {
1396
+ }, Ye = (e) => {
949
1397
  if (e?.action) switch (e.action.type) {
950
1398
  case "external_link": {
951
1399
  let t = e.action.value;
@@ -956,8 +1404,8 @@ var P = h({
956
1404
  case "phone": return `tel:${e.action.value}`;
957
1405
  default: return;
958
1406
  }
959
- }, J = ({ children: e, config: t }) => {
960
- let { openModal: n } = c(), { isLoggedIn: r } = s(), { openPopup: i } = j(), a = t?.action?.alt;
1407
+ }, Xe = ({ children: e, config: t }) => {
1408
+ let { openModal: n } = c(), { isLoggedIn: r } = s(), { openPopup: i } = D(), a = t?.action?.alt;
961
1409
  if (t?.action?.type === "popup") {
962
1410
  let n = t.action.value, r = () => {
963
1411
  n && i(n);
@@ -975,7 +1423,7 @@ var P = h({
975
1423
  });
976
1424
  }
977
1425
  if (t?.action?.type === "login") {
978
- if (r) return /* @__PURE__ */ w(q, {
1426
+ if (r) return /* @__PURE__ */ w(Je, {
979
1427
  href: t?.action?.value || "",
980
1428
  style: { display: "contents" },
981
1429
  "aria-label": a || void 0,
@@ -996,8 +1444,8 @@ var P = h({
996
1444
  children: e
997
1445
  });
998
1446
  }
999
- let o = le(t), l = t?.action?.options?.openInNewTab ? "_blank" : void 0;
1000
- return o ? /* @__PURE__ */ w(q, {
1447
+ let o = Ye(t), l = t?.action?.options?.openInNewTab ? "_blank" : void 0;
1448
+ return o ? /* @__PURE__ */ w(Je, {
1001
1449
  href: o,
1002
1450
  style: { display: "contents" },
1003
1451
  ...l && {
@@ -1007,10 +1455,10 @@ var P = h({
1007
1455
  ...a && { "aria-label": a },
1008
1456
  children: e
1009
1457
  }) : e;
1010
- }, Y = {
1458
+ }, Ze = {
1011
1459
  once: !0,
1012
1460
  margin: "0px 0px -150px 0px"
1013
- }, ue = ({ children: e, MotionComponent: t, motionProps: n, scroll: r, entry: i, whileHover: a, exit: o }) => {
1461
+ }, Qe = ({ children: e, MotionComponent: t, motionProps: n, scroll: r, entry: i, whileHover: a, exit: o }) => {
1014
1462
  let s = x(null);
1015
1463
  if (y(() => {
1016
1464
  if (!r) return;
@@ -1051,13 +1499,13 @@ var P = h({
1051
1499
  });
1052
1500
  }
1053
1501
  let c = i ? {
1054
- ...I,
1502
+ ...V,
1055
1503
  ...i.to,
1056
1504
  transition: i.transition
1057
1505
  } : void 0, l = i ? {
1058
- once: i.viewport?.once ?? Y.once,
1506
+ once: i.viewport?.once ?? Ze.once,
1059
1507
  amount: i.viewport?.amount,
1060
- margin: i.viewport?.margin ?? Y.margin
1508
+ margin: i.viewport?.margin ?? Ze.margin
1061
1509
  } : void 0;
1062
1510
  return /* @__PURE__ */ w(t, {
1063
1511
  ...n,
@@ -1068,9 +1516,9 @@ var P = h({
1068
1516
  exit: o,
1069
1517
  children: e
1070
1518
  });
1071
- }, X = (e) => {
1072
- let t = O.create(e), n = ({ elementKey: n, children: r, ...i }) => {
1073
- let { parsedBlockData: a, renderMode: o } = F(), { config: s, styles: c, content: l, id: u } = a || {}, d = s ? B(s, n) : void 0, f = c ? B(c, n) : void 0, p = l ? B(l, n) : void 0, m = b(() => {
1519
+ }, Z = (e) => {
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(() => {
1074
1522
  let e = d || {}, t = i.config || {}, n = e.selectedVariants || {}, r = t.selectedVariants || {};
1075
1523
  return {
1076
1524
  ...e,
@@ -1080,13 +1528,13 @@ var P = h({
1080
1528
  ...r
1081
1529
  }
1082
1530
  };
1083
- }, [d, i.config]), h = K(i, n, m, f, p, G(n, u || "", m)), g = h.config?.animation, _ = b(() => g?.scroll ? {
1531
+ }, [d, i.config]), h = X(i, n, m, f, p, Y(n, u || "", m)), g = h.config?.animation, _ = b(() => g?.scroll ? {
1084
1532
  from: {
1085
- ...L,
1533
+ ...H,
1086
1534
  ...g.scroll.from
1087
1535
  },
1088
1536
  to: {
1089
- ...I,
1537
+ ...V,
1090
1538
  ...g.scroll.to
1091
1539
  },
1092
1540
  offset: g.scroll.offset ?? {
@@ -1095,19 +1543,19 @@ var P = h({
1095
1543
  }
1096
1544
  } : void 0, [g?.scroll]), v = b(() => g?.entry ? {
1097
1545
  from: {
1098
- ...L,
1546
+ ...H,
1099
1547
  ...g.entry.from
1100
1548
  },
1101
1549
  to: {
1102
- ...I,
1550
+ ...V,
1103
1551
  ...g.entry.to
1104
1552
  },
1105
1553
  transition: g.entry.transition,
1106
1554
  viewport: g.entry.viewport
1107
1555
  } : void 0, [g?.entry]);
1108
- return !a || h.config?.enabled === !1 ? null : g && Object.keys(g).length > 0 && o !== "studio.block" ? /* @__PURE__ */ w(J, {
1556
+ return !a || h.config?.enabled === !1 ? null : g && Object.keys(g).length > 0 && o !== "studio.block" ? /* @__PURE__ */ w(Xe, {
1109
1557
  config: h?.config || {},
1110
- children: /* @__PURE__ */ w(ue, {
1558
+ children: /* @__PURE__ */ w(Qe, {
1111
1559
  MotionComponent: t,
1112
1560
  motionProps: h,
1113
1561
  scroll: _,
@@ -1116,7 +1564,7 @@ var P = h({
1116
1564
  exit: g.exit,
1117
1565
  children: r
1118
1566
  })
1119
- }) : /* @__PURE__ */ w(J, {
1567
+ }) : /* @__PURE__ */ w(Xe, {
1120
1568
  config: h?.config || {},
1121
1569
  children: /* @__PURE__ */ w(e, {
1122
1570
  ...h,
@@ -1125,7 +1573,7 @@ var P = h({
1125
1573
  });
1126
1574
  };
1127
1575
  return n.displayName = `withBlockProps(${e.displayName || e.name || "Component"})`, v(n);
1128
- }, Z = g(({ className: e, config: t, content: n, elementKey: r, generatedClassName: i, styles: a, noElementKey: o, ...s }, c) => {
1576
+ }, $e = g(({ className: e, config: t, content: n, elementKey: r, generatedClassName: i, styles: a, noElementKey: o, ...s }, c) => {
1129
1577
  if (!n) return /* @__PURE__ */ w("span", {
1130
1578
  ref: c,
1131
1579
  style: { display: "none" }
@@ -1181,9 +1629,9 @@ var P = h({
1181
1629
  });
1182
1630
  }
1183
1631
  });
1184
- Z.displayName = "BaseIcon";
1185
- var Q = X(Z), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, children: r, config: i = {}, styles: a, content: o, elementKey: s, generatedClassName: c, ...l }, u) => {
1186
- 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, {
1187
1635
  noElementKey: !0,
1188
1636
  elementKey: `${s}_${t}Icon`
1189
1637
  }) : null;
@@ -1194,13 +1642,13 @@ var Q = X(Z), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, ch
1194
1642
  className: d("inline-flex items-center justify-center", e, c),
1195
1643
  ref: u,
1196
1644
  ...l,
1197
- children: t ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(D, { className: d("h-4 w-4 animate-spin", n ? "mr-2" : "") }), n] }) : /* @__PURE__ */ T(C, { children: [
1198
- m(p?.button_icons?.left, "left"),
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"),
1199
1647
  /* @__PURE__ */ w("span", {
1200
1648
  className: "button-content",
1201
- children: f
1649
+ children: m
1202
1650
  }),
1203
- m(p?.button_icons?.right, "right")
1651
+ h(p?.button_icons?.right, "right")
1204
1652
  ] })
1205
1653
  }) : /* @__PURE__ */ w("span", {
1206
1654
  ref: u,
@@ -1208,6 +1656,6 @@ var Q = X(Z), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, ch
1208
1656
  });
1209
1657
  });
1210
1658
  $.displayName = "BaseButton";
1211
- var de = X($);
1659
+ var et = Z($);
1212
1660
  //#endregion
1213
- export { I as _, ce as a, k as b, V as c, K as d, G as f, se as g, R as h, X as i, U as l, L as m, de as n, W as o, z as p, Q as r, B as s, $ as t, H as u, oe as v, F as y };
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 };