@levo-so/studio 0.1.107 → 0.1.109

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 (43) hide show
  1. package/{BillingStep-CJqmdIz2.js → BillingStep-DZeqbtfs.js} +1 -1
  2. package/{Button-DujHjtOV.js → Button-BMUB23Y7.js} +527 -91
  3. package/CollectionField-xa-jed3_.js +232 -0
  4. package/{DateTimeWidget-CbpvxQ9s.js → DateTimeWidget-DWbn_kXp.js} +4 -3
  5. package/{EntryCard-Drnobf4s.js → EntryCard-BNZ-0_Kv.js} +7 -4
  6. package/{LoginCard-B9HKjZEk.js → LoginCard-B1XlZfEU.js} +3 -3
  7. package/{LoginForm-DpgxFh89.js → LoginForm-NmDPe72V.js} +17 -17
  8. package/{LoginModal-CaqsScly.js → LoginModal-CVd08mNx.js} +2 -2
  9. package/{MessageCard-DojQRKnf.js → MessageCard-C2fU_Bo_.js} +2 -2
  10. package/{ModalManager-CaBZKQR2.js → ModalManager-Dqq7D60M.js} +1 -1
  11. package/{PendingApprovalCard-CrdOrMRu.js → PendingApprovalCard-CXOEpAbg.js} +3 -3
  12. package/{PhoneWidget-BxW2gL28.js → PhoneWidget-CtNIit2w.js} +4 -3
  13. package/{PopupRenderer-CV5HY1dP-hICGc5AG.js → PopupRenderer-SSn97BLs-DQfvcymq.js} +256 -260
  14. package/ProfileCard-CzL5uB2z.js +102 -0
  15. package/{RichTextWidget-DCzgJ9EA.js → RichTextWidget-DkRrKQqN.js} +4 -3
  16. package/{Toolbar-B5UZer_x.js → Toolbar-C3WDkSnO.js} +4 -4
  17. package/{VerifyButton-DFAg6STD.js → VerifyButton-TNkt-SDu.js} +1 -1
  18. package/{bookingCard-BgApvrcj.js → bookingCard-61Yx6JO-.js} +2 -2
  19. package/collection.d.ts +14 -6
  20. package/collection.js +8 -7
  21. package/dist-Cfv-YjpI.js +3469 -0
  22. package/getFieldValidations-CSkSV2hW.js +90 -0
  23. package/index.d.ts +235 -16
  24. package/index.js +1743 -1405
  25. package/{nodeAlignment-DKCIjzlR.js → nodeAlignment-BC_Uferw.js} +5 -5
  26. package/package.json +4 -4
  27. package/studio.css +1 -1
  28. package/{utils-CUqS5dMC.js → utils-BJLmuC5w.js} +1 -1
  29. package/widgets-K6ECnoJJ.js +335 -0
  30. package/CollectionField-BPl8E9MW.js +0 -318
  31. package/CollectionFormBuilder-BvFtiZeH.js +0 -3668
  32. package/dist-DZbXWctg.js +0 -97
  33. /package/{Beams-DboMUgCv.js → Beams-WJN38XSv.js} +0 -0
  34. /package/{CollectionInput-DcNJT5Pg.js → CollectionInput-CpNGIXJx.js} +0 -0
  35. /package/{Dots-a8xSboDv.js → Dots-DggLz5I7.js} +0 -0
  36. /package/{Gradient-NacpoDCM.js → Gradient-BSWJAu0a.js} +0 -0
  37. /package/{Grid-BJQvxnks.js → Grid-BFKl0MUt.js} +0 -0
  38. /package/{MessageFooter-C4qC8cem.js → MessageFooter-4qIEK91O.js} +0 -0
  39. /package/{Popover-DOvRAGzc.js → Popover-O1poOHk2.js} +0 -0
  40. /package/{Tooltip-CJINDx93.js → Tooltip-NEMQqPyr.js} +0 -0
  41. /package/{Waves-DUuT_IFr.js → Waves-BPEgTYoO.js} +0 -0
  42. /package/{authentication-ClOFcry8.js → authentication-hnV1BI8s.js} +0 -0
  43. /package/{card-E2LKF9nT.js → card-5ooLmYSr.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 { c as e, h as t, i as n, n as r, o as i, r as a, u as o } from "./PopupRenderer-SSn97BLs-DQfvcymq.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-Dqq7D60M.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,503 @@ 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 { LoaderCircle as re } from "lucide-react";
17
+ import * as ie from "motion/react-m";
18
+ import ae from "next/link";
19
19
  //#region ../../libraries/popups/dist/index.js
20
- var ie = async (e, t) => {
20
+ var oe = async (e, t) => {
21
21
  let n = {};
22
22
  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 = () => {
23
+ }, se = _(() => import("./PopupRenderer-SSn97BLs-DQfvcymq.js").then((e) => e.s).then((e) => e.t).then((e) => ({ default: e.PopupRenderer }))), ce = (e) => {
24
+ let t = l(9), { siteId: n, pageId: r } = e, { fetch: i, logger: o } = f(), [s, c] = S(null), d = x(!1), p, h;
25
+ if (t[0] !== i || t[1] !== o || t[2] !== n ? (p = () => {
26
26
  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));
27
+ let e = () => {
28
+ d.current || (d.current = !0, oe(i, n ? { site_id: n } : void 0).then((e) => {
29
+ a(e), c(e);
30
+ }).catch((e) => {
31
+ o?.error("Failed to fetch popups", { exception: e }), a([]), c([]);
32
+ }).finally(le));
33
33
  };
34
34
  if (u.get()) {
35
- t();
35
+ e();
36
36
  return;
37
37
  }
38
- let n = u.listen((e) => {
39
- e && (n(), t());
38
+ let t = u.listen((n) => {
39
+ n && (t(), e());
40
40
  });
41
- return () => n();
41
+ return () => t();
42
42
  }, h = [
43
- a,
43
+ i,
44
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;
45
+ n
46
+ ], t[0] = i, t[1] = o, 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
47
  let g;
48
- n[5] === Symbol.for("react.memo_cache_sentinel") ? (g = {
48
+ t[5] === Symbol.for("react.memo_cache_sentinel") ? (g = {
49
49
  position: "relative",
50
50
  zIndex: 99999
51
- }, n[5] = g) : g = n[5];
51
+ }, t[5] = g) : g = t[5];
52
52
  let _;
53
- return n[6] !== i || n[7] !== s ? (_ = /* @__PURE__ */ w("div", {
53
+ return t[6] !== r || t[7] !== s ? (_ = /* @__PURE__ */ w("div", {
54
54
  style: g,
55
- children: /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(ae, {
55
+ children: /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(se, {
56
56
  popups: s,
57
- pageId: i
57
+ pageId: r
58
58
  }) })
59
- }), n[6] = i, n[7] = s, n[8] = _) : _ = n[8], _;
59
+ }), t[6] = r, t[7] = s, t[8] = _) : _ = t[8], _;
60
60
  };
61
- function A() {
62
- return i(!1);
61
+ function le() {
62
+ return n(!1);
63
63
  }
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,
68
- isLoading: r,
69
- openPopup: i,
64
+ var ue = () => {
65
+ let n = l(3), r = E(t), i = E(e), a = de, o = fe, s;
66
+ return n[0] !== i || n[1] !== r ? (s = {
67
+ popups: r,
68
+ isLoading: i,
69
+ openPopup: a,
70
70
  closePopup: o
71
- }, e[0] = r, e[1] = t, e[2] = s) : s = e[2], s;
71
+ }, n[0] = i, n[1] = r, n[2] = s) : s = n[2], s;
72
72
  };
73
- function M(e) {
74
- let n = a.get().find((t) => t.id === e);
75
- n && t(n, {
73
+ function de(e) {
74
+ let n = t.get().find((t) => t.id === e);
75
+ n && i(n, {
76
76
  force: !0,
77
77
  trigger_type: "manual"
78
78
  });
79
79
  }
80
- function N() {
80
+ function fe() {
81
81
  let e = r.get().active_popup_id;
82
82
  e && o(e);
83
83
  }
84
84
  //#endregion
85
- //#region src/providers/BlockContext.tsx
86
- var P = h({
85
+ //#region src/utils/getKeysWithValue.ts
86
+ function pe(e, t) {
87
+ let n = (e, r) => {
88
+ let i = {};
89
+ if (typeof e != "object" || !e) return i;
90
+ let a = Array.isArray(e) ? e[0] : e;
91
+ if (!a || typeof a != "object") return i;
92
+ for (let e of Object.keys(a)) {
93
+ let o = a[e];
94
+ if (i[e] = o, typeof o != "object" || !o || t !== void 0 && r >= t) continue;
95
+ let s = Array.isArray(o) ? o[0] : o;
96
+ if (!s || typeof s != "object") continue;
97
+ let c = n(s, r + 1);
98
+ for (let t of Object.keys(c)) i[`${e}.${t}`] = c[t];
99
+ }
100
+ return i;
101
+ };
102
+ return n(e, 0);
103
+ }
104
+ //#endregion
105
+ //#region src/utils/variableExpression.ts
106
+ var D = (e, t) => {
107
+ let n = [], r = "", i = !1, a = !1;
108
+ for (let o of e) {
109
+ if (a) {
110
+ r += o, a = !1;
111
+ continue;
112
+ }
113
+ if (o === "\\") {
114
+ a = !0, r += o;
115
+ continue;
116
+ }
117
+ if (o === "\"") {
118
+ i = !i, r += o;
119
+ continue;
120
+ }
121
+ if (!i && o === t) {
122
+ n.push(r), r = "";
123
+ continue;
124
+ }
125
+ r += o;
126
+ }
127
+ return n.push(r), n;
128
+ }, me = (e) => {
129
+ let t = e.trim();
130
+ 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
+ }, he = (e) => e === null ? "null" : typeof e == "number" || typeof e == "boolean" ? String(e) : /^[a-zA-Z_][\w-]*$/.test(e) ? e : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"`, ge = (e) => {
132
+ let t = D(e, ":").map((e) => e.trim());
133
+ return {
134
+ name: t[0] ?? "",
135
+ args: t.slice(1).map(me)
136
+ };
137
+ }, _e = (e) => {
138
+ let t = D(e, "|").map((e) => e.trim());
139
+ return {
140
+ path: t[0] ?? "",
141
+ transforms: t.slice(1).filter(Boolean).map(ge)
142
+ };
143
+ }, ve = (e) => {
144
+ let t = [e.path];
145
+ for (let n of e.transforms) t.push([n.name, ...n.args.map(he)].join(":"));
146
+ return t.join(" | ");
147
+ }, O = (e) => e == null || e === "", k = [
148
+ "date",
149
+ "time",
150
+ "datetime",
151
+ "relative"
152
+ ], A = {
153
+ date: [
154
+ "full",
155
+ "day",
156
+ "month",
157
+ "year",
158
+ "day-month",
159
+ "month-year"
160
+ ],
161
+ time: ["clock"],
162
+ datetime: ["full", "compact"],
163
+ relative: ["auto"]
164
+ }, j = [
165
+ "S",
166
+ "M",
167
+ "L",
168
+ "XL"
169
+ ], ye = [
170
+ {
171
+ value: "auto",
172
+ label: "Auto"
173
+ },
174
+ {
175
+ value: "en-US",
176
+ label: "English (US)"
177
+ },
178
+ {
179
+ value: "en-GB",
180
+ label: "English (UK)"
181
+ },
182
+ {
183
+ value: "fr-FR",
184
+ label: "French"
185
+ },
186
+ {
187
+ value: "de-DE",
188
+ label: "German"
189
+ },
190
+ {
191
+ value: "es-ES",
192
+ label: "Spanish"
193
+ },
194
+ {
195
+ value: "hi-IN",
196
+ label: "Hindi"
197
+ },
198
+ {
199
+ value: "ja-JP",
200
+ label: "Japanese"
201
+ },
202
+ {
203
+ value: "zh-CN",
204
+ label: "Chinese"
205
+ }
206
+ ], M = [
207
+ "auto",
208
+ "12",
209
+ "24"
210
+ ], be = {
211
+ display: "date",
212
+ format: "full",
213
+ style: "M",
214
+ locale: "auto",
215
+ hour12: "auto"
216
+ }, xe = (e) => typeof e == "string" && k.includes(e), Se = (e) => typeof e == "string" && j.includes(e), Ce = (e) => typeof e == "string" && M.includes(e), N = (e) => {
217
+ let [t, n, r, i, a] = e;
218
+ if (!xe(t)) return null;
219
+ let o = A[t];
220
+ return {
221
+ display: t,
222
+ format: typeof n == "string" && o.includes(n) ? n : o[0] ?? "full",
223
+ style: Se(r) ? r : "M",
224
+ locale: typeof i == "string" && i ? i : "auto",
225
+ hour12: Ce(a) ? a : "auto"
226
+ };
227
+ }, we = (e) => {
228
+ let t = [
229
+ e.display,
230
+ e.format,
231
+ e.style,
232
+ e.locale,
233
+ e.hour12
234
+ ];
235
+ for (; t.length > 1 && t[t.length - 1] === "auto";) t.pop();
236
+ return t;
237
+ }, Te = (e) => {
238
+ if (!(!e || e === "auto")) try {
239
+ return Intl.DateTimeFormat.supportedLocalesOf([e]).length ? e : void 0;
240
+ } catch {
241
+ return;
242
+ }
243
+ }, Ee = (e) => e === "12" ? !0 : e === "24" ? !1 : void 0, De = (e, t) => {
244
+ if (e === "relative") return [
245
+ "S",
246
+ "M",
247
+ "L"
248
+ ];
249
+ if (e === "time") return [
250
+ "M",
251
+ "L",
252
+ "XL"
253
+ ];
254
+ if (e === "datetime") return t === "compact" ? [
255
+ "M",
256
+ "L",
257
+ "XL"
258
+ ] : [
259
+ "S",
260
+ "M",
261
+ "L",
262
+ "XL"
263
+ ];
264
+ switch (t) {
265
+ case "full": return [
266
+ "S",
267
+ "M",
268
+ "L",
269
+ "XL"
270
+ ];
271
+ case "day":
272
+ case "month":
273
+ case "day-month":
274
+ case "month-year": return [
275
+ "S",
276
+ "M",
277
+ "L"
278
+ ];
279
+ case "year": return ["S", "M"];
280
+ default: return [
281
+ "S",
282
+ "M",
283
+ "L",
284
+ "XL"
285
+ ];
286
+ }
287
+ }, Oe = (e, t) => {
288
+ if (t.includes(e)) return e;
289
+ let n = j.indexOf(e), r = t[0] ?? "M", i = Math.abs(j.indexOf(r) - n);
290
+ for (let e of t) {
291
+ let t = Math.abs(j.indexOf(e) - n);
292
+ t < i && (r = e, i = t);
293
+ }
294
+ return r;
295
+ }, ke = {
296
+ S: "narrow",
297
+ M: "short",
298
+ L: "long",
299
+ XL: "long"
300
+ }, P = {
301
+ S: "short",
302
+ M: "medium",
303
+ L: "long",
304
+ XL: "full"
305
+ }, Ae = (e, t) => {
306
+ let n = Te(t.locale), r = (t) => new Intl.DateTimeFormat(n, t).format(e);
307
+ if (t.display === "relative") {
308
+ let r = new Intl.RelativeTimeFormat(n, {
309
+ numeric: "auto",
310
+ style: t.style === "S" ? "narrow" : t.style === "M" ? "short" : "long"
311
+ }), i = e.getTime() - Date.now(), a = Math.abs(i), o = 6e4, s = 60 * o, c = 24 * s;
312
+ 7 * c, 30 * c;
313
+ let l = [
314
+ [365 * c, "year"],
315
+ [2592e6, "month"],
316
+ [6048e5, "week"],
317
+ [c, "day"],
318
+ [s, "hour"],
319
+ [o, "minute"]
320
+ ];
321
+ for (let [e, t] of l) if (a >= e) return r.format(Math.round(i / e), t);
322
+ return r.format(Math.round(i / 1e3), "second");
323
+ }
324
+ let i = Ee(t.hour12);
325
+ if (t.display === "time") return r({
326
+ hour: "numeric",
327
+ minute: "2-digit",
328
+ second: t.style === "L" || t.style === "XL" ? "2-digit" : void 0,
329
+ timeZoneName: t.style === "XL" ? "short" : void 0,
330
+ hour12: i
331
+ });
332
+ if (t.display === "datetime") return r({
333
+ dateStyle: t.format === "compact" ? "medium" : P[t.style],
334
+ timeStyle: t.style === "S" || t.style === "M" ? "short" : t.style === "L" ? "medium" : "full",
335
+ hour12: i
336
+ });
337
+ switch (t.format) {
338
+ case "full": return r({ dateStyle: P[t.style] });
339
+ case "day": return r({ weekday: ke[t.style] });
340
+ case "month": return t.style === "S" ? r({ month: "numeric" }) : r({ month: t.style === "M" ? "short" : "long" });
341
+ case "year": return r({ year: t.style === "S" ? "2-digit" : "numeric" });
342
+ case "day-month": return t.style === "S" ? r({
343
+ day: "numeric",
344
+ month: "numeric"
345
+ }) : r({
346
+ day: "numeric",
347
+ month: t.style === "M" ? "short" : "long"
348
+ });
349
+ case "month-year": return t.style === "S" ? r({
350
+ month: "numeric",
351
+ year: "2-digit"
352
+ }) : r({
353
+ month: t.style === "M" ? "short" : "long",
354
+ year: "numeric"
355
+ });
356
+ default: return r({ dateStyle: "medium" });
357
+ }
358
+ }, je = (e, t) => {
359
+ let n = [
360
+ "January",
361
+ "February",
362
+ "March",
363
+ "April",
364
+ "May",
365
+ "June",
366
+ "July",
367
+ "August",
368
+ "September",
369
+ "October",
370
+ "November",
371
+ "December"
372
+ ], 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 = {
373
+ YYYY: String(e.getFullYear()),
374
+ MMMM: n[e.getMonth()] ?? "",
375
+ MMM: r[e.getMonth()] ?? "",
376
+ MM: i(e.getMonth() + 1),
377
+ DD: i(e.getDate()),
378
+ D: String(e.getDate()),
379
+ HH: i(e.getHours()),
380
+ hh: i(a),
381
+ h: String(a),
382
+ mm: i(e.getMinutes()),
383
+ a: o
384
+ };
385
+ return t.replace(/YYYY|MMMM|MMM|MM|DD|D|HH|hh|h|mm|\ba\b/g, (e) => s[e] ?? e);
386
+ }, Me = (e, t) => {
387
+ if (O(e)) return "";
388
+ let n = new Date(e);
389
+ if (Number.isNaN(n.getTime())) return String(e);
390
+ let r = N(t);
391
+ return r ? Ae(n, r) : je(n, typeof t[0] == "string" ? t[0] : "MMM D, YYYY");
392
+ }, F = /* @__PURE__ */ new Map(), Ne = (e) => {
393
+ let t = F.get(e);
394
+ if (t) return t;
395
+ try {
396
+ return t = new Intl.NumberFormat(void 0, {
397
+ style: "currency",
398
+ currency: e
399
+ }), F.set(e, t), t;
400
+ } catch {
401
+ return null;
402
+ }
403
+ }, Pe = (e, t = "USD") => {
404
+ let n = Number(e);
405
+ if (Number.isNaN(n)) return String(e ?? "");
406
+ let r = Ne(t);
407
+ return r ? r.format(n) : `${t} ${n.toFixed(2)}`;
408
+ }, Fe = (e, t = 0) => {
409
+ let n = Number(e);
410
+ return Number.isNaN(n) ? String(e ?? "") : n.toLocaleString(void 0, {
411
+ minimumFractionDigits: Number(t),
412
+ maximumFractionDigits: Number(t)
413
+ });
414
+ }, Ie = (e) => e.replace(/\w\S*/g, (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()), I = {
415
+ default: {
416
+ label: "Fallback",
417
+ apply: (e, [t]) => O(e) ? t : e
418
+ },
419
+ prefix: {
420
+ label: "Prefix",
421
+ apply: (e, [t]) => O(e) ? e : `${t}${e}`
422
+ },
423
+ suffix: {
424
+ label: "Suffix",
425
+ apply: (e, [t]) => O(e) ? e : `${e}${t}`
426
+ },
427
+ upper: {
428
+ label: "Uppercase",
429
+ apply: (e) => typeof e == "string" ? e.toUpperCase() : e
430
+ },
431
+ lower: {
432
+ label: "Lowercase",
433
+ apply: (e) => typeof e == "string" ? e.toLowerCase() : e
434
+ },
435
+ title: {
436
+ label: "Title case",
437
+ apply: (e) => typeof e == "string" ? Ie(e) : e
438
+ },
439
+ date: {
440
+ label: "Date",
441
+ apply: (e, t) => Me(e, t)
442
+ },
443
+ number: {
444
+ label: "Number",
445
+ apply: (e, [t]) => Fe(e, Number(t ?? 0))
446
+ },
447
+ currency: {
448
+ label: "Currency",
449
+ apply: (e, [t]) => Pe(e, t ?? "USD")
450
+ },
451
+ text: {
452
+ label: "Static text",
453
+ apply: (e, [t]) => t
454
+ }
455
+ }, L = (e, t) => {
456
+ if (e === t) return !0;
457
+ let n = typeof e == "string" ? Number(e) : e, r = typeof t == "string" ? Number(t) : t;
458
+ return typeof n == "number" && typeof r == "number" && !Number.isNaN(n) && !Number.isNaN(r) ? n === r : e == t;
459
+ }, Le = (e, t) => {
460
+ let [n, r] = t;
461
+ switch (n) {
462
+ case "truthy": return !!e;
463
+ case "falsy": return !e;
464
+ case "eq": return L(e, r);
465
+ case "neq": return !L(e, r);
466
+ case "gt": return Number(e) > Number(r);
467
+ case "gte": return Number(e) >= Number(r);
468
+ case "lt": return Number(e) < Number(r);
469
+ case "lte": return Number(e) <= Number(r);
470
+ case "contains": return Array.isArray(e) ? e.some((e) => L(e, r)) : typeof e == "string" ? e.includes(String(r)) : !1;
471
+ default: return !0;
472
+ }
473
+ }, Re = (e, t) => {
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 ? !Le(r, i.args) : !1;
475
+ if (o) {
476
+ let e = a?.args[1];
477
+ if (e === void 0) return {
478
+ output: "",
479
+ rawValue: r,
480
+ pathExists: n,
481
+ conditionFailed: !0
482
+ };
483
+ if (e !== null) return {
484
+ output: String(e),
485
+ rawValue: r,
486
+ pathExists: n,
487
+ conditionFailed: !0
488
+ };
489
+ }
490
+ let s = r;
491
+ if (!o && a) {
492
+ let e = a.args[0];
493
+ e != null && (s = e);
494
+ }
495
+ for (let t of e.transforms) {
496
+ if (t.name === "if" || t.name === "text") continue;
497
+ let e = I[t.name];
498
+ e && (s = e.apply(s, t.args));
499
+ }
500
+ let c;
501
+ return c = s == null ? "" : Array.isArray(s) ? s.length === 0 ? "" : s.join(", ") : String(s), {
502
+ output: c,
503
+ rawValue: r,
504
+ pathExists: n,
505
+ conditionFailed: !1
506
+ };
507
+ }, ze = /\{([^{}]+)\}/g, Be = /^\{([^{}]+)\}$/, R = h({
87
508
  isStudio: !1,
88
509
  renderMode: "live",
89
510
  workspace_id: "",
90
511
  pageSource: []
91
- }), oe = ({ children: e, value: t }) => {
512
+ }), Ve = ({ children: e, value: t }) => {
92
513
  let [n, r] = S(t.parsedBlockData);
93
514
  y(() => {
94
515
  r((e) => t.parsedBlockData === e ? e : t.parsedBlockData);
@@ -115,11 +536,11 @@ var P = h({
115
536
  t.workspace_id,
116
537
  t.pageSource
117
538
  ]);
118
- return /* @__PURE__ */ w(P.Provider, {
539
+ return /* @__PURE__ */ w(R.Provider, {
119
540
  value: i,
120
541
  children: e
121
542
  });
122
- }, F = () => ee(P), I = {
543
+ }, z = () => ee(R), B = {
123
544
  opacity: 1,
124
545
  scale: 1,
125
546
  rotate: 0,
@@ -129,7 +550,7 @@ var P = h({
129
550
  y: 0,
130
551
  skewX: 0,
131
552
  skewY: 0
132
- }, L = {
553
+ }, V = {
133
554
  opacity: 0,
134
555
  scale: 1,
135
556
  rotate: 0,
@@ -139,25 +560,40 @@ var P = h({
139
560
  y: 0,
140
561
  skewX: 0,
141
562
  skewY: 0
142
- }, R = {
563
+ }, He = {
143
564
  type: "spring",
144
565
  duration: .5,
145
566
  delay: 0,
146
567
  bounce: .25,
147
568
  ease: "easeOut"
148
- }, se = {
569
+ }, Ue = {
149
570
  once: !0,
150
571
  amount: "some",
151
572
  margin: "0px 0px -150px 0px"
152
- }, z = (e, t) => {
573
+ }, H = (e, t) => {
153
574
  if (!(!e || !t)) for (let n of e) {
154
575
  if (n.key === t) return n;
155
576
  if (n.fields?.length) {
156
- let e = z(n.fields, t);
577
+ let e = H(n.fields, t);
157
578
  if (e) return e;
158
579
  }
159
580
  }
160
- }, B = (e, t) => {
581
+ }, We = (e, t) => {
582
+ let n = t.toLowerCase().trim(), r = [], i = (e, t, a) => {
583
+ if (t.children?.length) {
584
+ for (let n of t.children) i(e, n, [...a, t.label]);
585
+ return;
586
+ }
587
+ let o = `${e} ${a.join(" ")} ${t.label} ${t.preview ?? ""}`.toLowerCase();
588
+ (!n || o.includes(n)) && r.push({
589
+ group: e,
590
+ parent: a.length ? a.join(" › ") : void 0,
591
+ item: t
592
+ });
593
+ };
594
+ for (let t of e) for (let e of t.items) i(t.name, e, []);
595
+ return r;
596
+ }, U = (e, t) => {
161
597
  if (!(!e || !t)) return t.split(".").reduce((e, t) => {
162
598
  if (e == null) return;
163
599
  let n = /^\d+$/.test(t), r = e;
@@ -167,7 +603,7 @@ var P = h({
167
603
  }
168
604
  return r?.[t];
169
605
  }, e);
170
- }, V = (e) => !!e && typeof e == "object" && "selectedVariants" in e, H = (e) => e?.replaceAll(".", "-").replace(/[^a-zA-Z0-9_-]/g, ""), U = (e) => {
606
+ }, W = (e) => !!e && typeof e == "object" && "selectedVariants" in e, G = (e) => e?.replaceAll(".", "-").replace(/[^a-zA-Z0-9_-]/g, ""), K = (e) => {
171
607
  let t = e.split(".");
172
608
  for (let e = t.length - 2; e >= 1; e--) if (t[e] && /^\d+$/.test(t[e])) {
173
609
  let n = t[e - 1], r = parseInt(t[e], 10), i = t.slice(e + 1).join("."), a = [];
@@ -189,15 +625,15 @@ var P = h({
189
625
  };
190
626
  }
191
627
  return { isGroupItem: !1 };
192
- }, W = (e) => {
628
+ }, q = (e) => {
193
629
  let t = [];
194
- return V(e) && Object.entries(e.selectedVariants).forEach(([e, n]) => {
630
+ return W(e) && Object.entries(e.selectedVariants).forEach(([e, n]) => {
195
631
  typeof n == "string" && t.push(`levo-variant-${e}-${n}`);
196
632
  }), t;
197
- }, G = (e, t, n) => b(() => {
198
- let r = W(n), i = `levo-${t}-${H(e)}`, a = U(e);
633
+ }, J = (e, t, n) => b(() => {
634
+ let r = q(n), i = `levo-${t}-${G(e)}`, a = K(e);
199
635
  return a.isGroupItem && a.sharedPath ? [
200
- `levo-${t}-${H(a.sharedPath)}`,
636
+ `levo-${t}-${G(a.sharedPath)}`,
201
637
  i,
202
638
  ...r
203
639
  ].filter(Boolean).join(" ") : [i, ...r].join(" ");
@@ -205,7 +641,7 @@ var P = h({
205
641
  n?.selectedVariants,
206
642
  e,
207
643
  t
208
- ]), K = (e, t, n, r, i, a) => b(() => {
644
+ ]), Y = (e, t, n, r, i, a) => b(() => {
209
645
  let { className: o, style: s, config: c, styles: l, content: u, ...d } = e;
210
646
  return {
211
647
  ...d,
@@ -230,7 +666,7 @@ var P = h({
230
666
  r,
231
667
  i,
232
668
  a
233
- ]), ce = {
669
+ ]), Ge = {
234
670
  id: "7074716021398640563",
235
671
  workspace_id: "WZZKMUBH",
236
672
  name: "Booster Applications",
@@ -939,13 +1375,13 @@ var P = h({
939
1375
  }
940
1376
  ]
941
1377
  }]
942
- }, q = ({ children: e, ...t }) => {
943
- let { isStudio: n } = F();
944
- return n ? e : /* @__PURE__ */ w(re, {
1378
+ }, X = ({ children: e, ...t }) => {
1379
+ let { isStudio: n } = z();
1380
+ return n ? e : /* @__PURE__ */ w(ae, {
945
1381
  ...t,
946
1382
  children: e
947
1383
  });
948
- }, le = (e) => {
1384
+ }, Ke = (e) => {
949
1385
  if (e?.action) switch (e.action.type) {
950
1386
  case "external_link": {
951
1387
  let t = e.action.value;
@@ -956,8 +1392,8 @@ var P = h({
956
1392
  case "phone": return `tel:${e.action.value}`;
957
1393
  default: return;
958
1394
  }
959
- }, J = ({ children: e, config: t }) => {
960
- let { openModal: n } = c(), { isLoggedIn: r } = s(), { openPopup: i } = j(), a = t?.action?.alt;
1395
+ }, qe = ({ children: e, config: t }) => {
1396
+ let { openModal: n } = c(), { isLoggedIn: r } = s(), { openPopup: i } = ue(), a = t?.action?.alt;
961
1397
  if (t?.action?.type === "popup") {
962
1398
  let n = t.action.value, r = () => {
963
1399
  n && i(n);
@@ -975,7 +1411,7 @@ var P = h({
975
1411
  });
976
1412
  }
977
1413
  if (t?.action?.type === "login") {
978
- if (r) return /* @__PURE__ */ w(q, {
1414
+ if (r) return /* @__PURE__ */ w(X, {
979
1415
  href: t?.action?.value || "",
980
1416
  style: { display: "contents" },
981
1417
  "aria-label": a || void 0,
@@ -996,8 +1432,8 @@ var P = h({
996
1432
  children: e
997
1433
  });
998
1434
  }
999
- let o = le(t), l = t?.action?.options?.openInNewTab ? "_blank" : void 0;
1000
- return o ? /* @__PURE__ */ w(q, {
1435
+ let o = Ke(t), l = t?.action?.options?.openInNewTab ? "_blank" : void 0;
1436
+ return o ? /* @__PURE__ */ w(X, {
1001
1437
  href: o,
1002
1438
  style: { display: "contents" },
1003
1439
  ...l && {
@@ -1007,10 +1443,10 @@ var P = h({
1007
1443
  ...a && { "aria-label": a },
1008
1444
  children: e
1009
1445
  }) : e;
1010
- }, Y = {
1446
+ }, Je = {
1011
1447
  once: !0,
1012
1448
  margin: "0px 0px -150px 0px"
1013
- }, ue = ({ children: e, MotionComponent: t, motionProps: n, scroll: r, entry: i, whileHover: a, exit: o }) => {
1449
+ }, Ye = ({ children: e, MotionComponent: t, motionProps: n, scroll: r, entry: i, whileHover: a, exit: o }) => {
1014
1450
  let s = x(null);
1015
1451
  if (y(() => {
1016
1452
  if (!r) return;
@@ -1051,13 +1487,13 @@ var P = h({
1051
1487
  });
1052
1488
  }
1053
1489
  let c = i ? {
1054
- ...I,
1490
+ ...B,
1055
1491
  ...i.to,
1056
1492
  transition: i.transition
1057
1493
  } : void 0, l = i ? {
1058
- once: i.viewport?.once ?? Y.once,
1494
+ once: i.viewport?.once ?? Je.once,
1059
1495
  amount: i.viewport?.amount,
1060
- margin: i.viewport?.margin ?? Y.margin
1496
+ margin: i.viewport?.margin ?? Je.margin
1061
1497
  } : void 0;
1062
1498
  return /* @__PURE__ */ w(t, {
1063
1499
  ...n,
@@ -1068,9 +1504,9 @@ var P = h({
1068
1504
  exit: o,
1069
1505
  children: e
1070
1506
  });
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(() => {
1507
+ }, Z = (e) => {
1508
+ let t = ie.create(e), n = ({ elementKey: n, children: r, ...i }) => {
1509
+ let { parsedBlockData: a, renderMode: o } = z(), { config: s, styles: c, content: l, id: u } = a || {}, d = s ? U(s, n) : void 0, f = c ? U(c, n) : void 0, p = l ? U(l, n) : void 0, m = b(() => {
1074
1510
  let e = d || {}, t = i.config || {}, n = e.selectedVariants || {}, r = t.selectedVariants || {};
1075
1511
  return {
1076
1512
  ...e,
@@ -1080,13 +1516,13 @@ var P = h({
1080
1516
  ...r
1081
1517
  }
1082
1518
  };
1083
- }, [d, i.config]), h = K(i, n, m, f, p, G(n, u || "", m)), g = h.config?.animation, _ = b(() => g?.scroll ? {
1519
+ }, [d, i.config]), h = Y(i, n, m, f, p, J(n, u || "", m)), g = h.config?.animation, _ = b(() => g?.scroll ? {
1084
1520
  from: {
1085
- ...L,
1521
+ ...V,
1086
1522
  ...g.scroll.from
1087
1523
  },
1088
1524
  to: {
1089
- ...I,
1525
+ ...B,
1090
1526
  ...g.scroll.to
1091
1527
  },
1092
1528
  offset: g.scroll.offset ?? {
@@ -1095,19 +1531,19 @@ var P = h({
1095
1531
  }
1096
1532
  } : void 0, [g?.scroll]), v = b(() => g?.entry ? {
1097
1533
  from: {
1098
- ...L,
1534
+ ...V,
1099
1535
  ...g.entry.from
1100
1536
  },
1101
1537
  to: {
1102
- ...I,
1538
+ ...B,
1103
1539
  ...g.entry.to
1104
1540
  },
1105
1541
  transition: g.entry.transition,
1106
1542
  viewport: g.entry.viewport
1107
1543
  } : void 0, [g?.entry]);
1108
- return !a || h.config?.enabled === !1 ? null : g && Object.keys(g).length > 0 && o !== "studio.block" ? /* @__PURE__ */ w(J, {
1544
+ return !a || h.config?.enabled === !1 ? null : g && Object.keys(g).length > 0 && o !== "studio.block" ? /* @__PURE__ */ w(qe, {
1109
1545
  config: h?.config || {},
1110
- children: /* @__PURE__ */ w(ue, {
1546
+ children: /* @__PURE__ */ w(Ye, {
1111
1547
  MotionComponent: t,
1112
1548
  motionProps: h,
1113
1549
  scroll: _,
@@ -1116,7 +1552,7 @@ var P = h({
1116
1552
  exit: g.exit,
1117
1553
  children: r
1118
1554
  })
1119
- }) : /* @__PURE__ */ w(J, {
1555
+ }) : /* @__PURE__ */ w(qe, {
1120
1556
  config: h?.config || {},
1121
1557
  children: /* @__PURE__ */ w(e, {
1122
1558
  ...h,
@@ -1125,7 +1561,7 @@ var P = h({
1125
1561
  });
1126
1562
  };
1127
1563
  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) => {
1564
+ }, Xe = g(({ className: e, config: t, content: n, elementKey: r, generatedClassName: i, styles: a, noElementKey: o, ...s }, c) => {
1129
1565
  if (!n) return /* @__PURE__ */ w("span", {
1130
1566
  ref: c,
1131
1567
  style: { display: "none" }
@@ -1181,8 +1617,8 @@ var P = h({
1181
1617
  });
1182
1618
  }
1183
1619
  });
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) => {
1620
+ Xe.displayName = "BaseIcon";
1621
+ var Q = Z(Xe), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, children: r, config: i = {}, styles: a, content: o, elementKey: s, generatedClassName: c, ...l }, u) => {
1186
1622
  let f = r ?? o, p = i, m = (e, t) => e?.enabled ? /* @__PURE__ */ w(Q, {
1187
1623
  noElementKey: !0,
1188
1624
  elementKey: `${s}_${t}Icon`
@@ -1194,7 +1630,7 @@ var Q = X(Z), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, ch
1194
1630
  className: d("inline-flex items-center justify-center", e, c),
1195
1631
  ref: u,
1196
1632
  ...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: [
1633
+ children: t ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(re, { className: d("h-4 w-4 animate-spin", n ? "mr-2" : "") }), n] }) : /* @__PURE__ */ T(C, { children: [
1198
1634
  m(p?.button_icons?.left, "left"),
1199
1635
  /* @__PURE__ */ w("span", {
1200
1636
  className: "button-content",
@@ -1208,6 +1644,6 @@ var Q = X(Z), $ = p.forwardRef(({ className: e, isLoading: t, loadingText: n, ch
1208
1644
  });
1209
1645
  });
1210
1646
  $.displayName = "BaseButton";
1211
- var de = X($);
1647
+ var Ze = Z($);
1212
1648
  //#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 };
1649
+ export { we as A, M as C, Be as D, be as E, De as F, ve as I, pe as L, N as M, _e as N, ze as O, Oe as P, ce as R, A as S, j as T, Ue as _, Ge as a, z as b, W as c, Y as d, J as f, He as g, V as h, Z as i, Re as j, I as k, K as l, H as m, Ze as n, q as o, We as p, Q as r, U as s, $ as t, G as u, B as v, ye as w, k as x, Ve as y };