@levo-so/site-runtime 0.3.0 → 0.3.7

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 (33) hide show
  1. package/{DateTimeWidget-C1jHOtz7.js → DateTimeWidget-Cctsvcrs.js} +2 -2
  2. package/Dialog-DVB4WpBS.js +130 -0
  3. package/{KBChatWidget-D7F9LRwI.js → KBChatWidget-Cnq0DCOQ.js} +383 -435
  4. package/LevoProvider-nmIbMlsk.js +20 -0
  5. package/{PhoneWidget-_nw97rkI.js → PhoneWidget-J3VTMWJH.js} +2 -2
  6. package/{PopupRenderer-Bncp54gB-DuCULkBK.js → PopupBody-DZVwDLkg-yrot8Uqb.js} +201 -910
  7. package/PopupRenderer-BjW1jg70-Biwj2bIc.js +387 -0
  8. package/{RichTextWidget-D-mGlES0.js → RichTextWidget-BOrVIR2j.js} +10 -9
  9. package/{VerifyButton-BkP98H17.js → VerifyButton-CA1GtEZJ.js} +20 -19
  10. package/{theme.cssm-2YTdd8Yh.js → createThemeExtension-DhGk81nV.js} +2 -2
  11. package/{dist-DBbiX2ST.js → dist-C8gLeklT.js} +601 -598
  12. package/{dist-CJknSbJK.js → dist-Cb6sb7nO.js} +21 -22
  13. package/{inlineCollectionTheme-D2w17LHX.js → generateRadiusScale-54mE9ikx.js} +4 -19
  14. package/index.d.ts +42 -3
  15. package/index.js +724 -694
  16. package/{inlineBaseTheme-DS-AfUHi.js → inlineBaseTheme-B6E9zzyp.js} +2 -2
  17. package/inlineCollectionTheme-DYYMrmcE.js +19 -0
  18. package/{kbChat-AUJxjURc.js → kbChat-DIb4AS7E.js} +31 -26
  19. package/{nodeAlignment-Cn6xNtOP.js → nodeAlignment-D70kOcui.js} +13 -13
  20. package/package.json +9 -9
  21. package/pillChrome-BAu5AfCT.js +30 -0
  22. package/popupState-JmpeKzgM-qhNTV79U.js +229 -0
  23. package/popups.js +1 -1
  24. package/react-6kO0cqgr.js +74 -0
  25. package/rteTheme.cssm-xg0gJ28J.js +4 -0
  26. package/styles.css +1 -1
  27. package/theme.cssm-mkQwezuj.js +4 -0
  28. package/usePopupRedirect-BThP_YPW-DoixMAB9.js +80 -0
  29. package/Dialog-CzVhHLEY.js +0 -145
  30. package/pillChrome-AhXOWXIb.js +0 -20
  31. /package/{CollectionField-CzS-34zx.js → CollectionField-C59pmeQw.js} +0 -0
  32. /package/{Popover-q5dL7y0W.js → Popover-C7zZHBIc.js} +0 -0
  33. /package/{es-iCqKQf1c.js → es-CztjLuNy.js} +0 -0
@@ -0,0 +1,387 @@
1
+ import { i as e } from "./LevoProvider-nmIbMlsk.js";
2
+ import { n as t } from "./ThemeProvider-BQmIB5tr.js";
3
+ import { t as n } from "./theme.cssm-mkQwezuj.js";
4
+ import { a as r, c as i, l as a, o, s, u as c } from "./Dialog-DVB4WpBS.js";
5
+ import { d as l, f as u, l as d, n as f, o as p } from "./popupState-JmpeKzgM-qhNTV79U.js";
6
+ import { n as m, r as h, t as g } from "./react-6kO0cqgr.js";
7
+ import { _, c as ee, d as v, f as y, g as b, h as x, m as S, n as C, o as w, p as T, s as E, t as te, u as D } from "./usePopupRedirect-BThP_YPW-DoixMAB9.js";
8
+ import { t as O } from "./rteTheme.cssm-xg0gJ28J.js";
9
+ import { Suspense as k, lazy as A, useEffect as j, useRef as M } from "react";
10
+ import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
11
+ import { c as I } from "react/compiler-runtime";
12
+ import L from "clsx";
13
+ import { IconX as R } from "@tabler/icons-react";
14
+ import { $activity as z, $isIdentityContextReady as ne, $pageLifecycle as B, $scrollBehavior as V, $session as re, getTabCount as ie } from "@levo-so/insights/stores";
15
+ //#region ../../libraries/levocn/dist/theme/utils/googleFonts.js
16
+ var H = "wght@300;400;500;600;700;900", U = (e) => !!e && e !== "inherit" && !e.includes(",") && !e.includes("var("), W = (...e) => {
17
+ let t = Array.from(new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(U)));
18
+ return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.map((e) => `family=${e.replace(/ /g, "+")}:${H}`).join("&")}&display=swap`;
19
+ }, G = (e) => {
20
+ if (document.querySelector(`link[rel="preconnect"][href="${e}"]`)) return;
21
+ let t = document.createElement("link");
22
+ t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
23
+ }, K = (e) => {
24
+ let t = `family=${e.replace(/ /g, "+")}:`;
25
+ return Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href*=\"fonts.googleapis.com\"]")).some((e) => e.href.includes(t));
26
+ }, q = (...e) => {
27
+ let t = I(5), n = e, r;
28
+ t[0] === n ? r = t[1] : (r = n.filter(J).map(Y).join("|"), t[0] = n, t[1] = r);
29
+ let i = r, a, o;
30
+ t[2] === i ? (a = t[3], o = t[4]) : (a = () => {
31
+ let e = W(...(i ? i.split("|") : []).filter(ae));
32
+ if (!e) return;
33
+ G("https://fonts.googleapis.com"), G("https://fonts.gstatic.com");
34
+ let t = document.createElement("link");
35
+ t.rel = "stylesheet", t.href = e, t.crossOrigin = "anonymous", t.setAttribute("data-levo-fonts", e), document.head.appendChild(t);
36
+ }, o = [i], t[2] = i, t[3] = a, t[4] = o), j(a, o);
37
+ };
38
+ function J(e) {
39
+ return typeof e == "string" && e.trim() !== "";
40
+ }
41
+ function Y(e) {
42
+ return e.trim();
43
+ }
44
+ function ae(e) {
45
+ return !K(e);
46
+ }
47
+ //#endregion
48
+ //#region ../../libraries/popups/dist/PopupDialog-ofRpHB1v.js
49
+ var oe = (e) => (e ?? "16:9").replace(":", " / "), se = (e) => {
50
+ if (e.content.coverImage?.srcset) return Object.entries(e.content.coverImage.srcset).filter(([e]) => e !== "path").map(([e, t]) => `${t} ${e}`).join(", ");
51
+ }, ce = (e) => {
52
+ let t = I(18), { popup: n, disableInteraction: r, children: i } = e, { content: a } = n, o = b(n), s = !!o && !r, c;
53
+ t[0] !== a.coverImage || t[1] !== a.coverImageFocus || t[2] !== n ? (c = a.coverImage && /* @__PURE__ */ P("img", {
54
+ src: a.coverImage.location,
55
+ srcSet: se(n),
56
+ alt: "",
57
+ className: "_1gklkndl",
58
+ style: a.coverImageFocus ? { objectPosition: a.coverImageFocus.replace("-", " ") } : void 0
59
+ }), t[0] = a.coverImage, t[1] = a.coverImageFocus, t[2] = n, t[3] = c) : c = t[3];
60
+ let l = c, u;
61
+ t[4] === a.coverImageRatio ? u = t[5] : (u = oe(a.coverImageRatio), t[4] = a.coverImageRatio, t[5] = u);
62
+ let d;
63
+ t[6] === u ? d = t[7] : (d = { aspectRatio: u }, t[6] = u, t[7] = d);
64
+ let f = d, p;
65
+ t[8] !== a.action || t[9] !== a.coverImage || t[10] !== s || t[11] !== l || t[12] !== f || t[13] !== o ? (p = a.coverImage && (s ? /* @__PURE__ */ P("button", {
66
+ type: "button",
67
+ className: L("_1gklkndj", "_1gklkndk"),
68
+ style: f,
69
+ onClick: o ?? void 0,
70
+ "aria-label": a.action?.type === "redirect" ? a.action.label : void 0,
71
+ children: l
72
+ }) : /* @__PURE__ */ P("div", {
73
+ className: "_1gklkndj",
74
+ style: f,
75
+ children: l
76
+ })), t[8] = a.action, t[9] = a.coverImage, t[10] = s, t[11] = l, t[12] = f, t[13] = o, t[14] = p) : p = t[14];
77
+ let m;
78
+ return t[15] !== i || t[16] !== p ? (m = /* @__PURE__ */ F("div", {
79
+ className: y,
80
+ children: [p, i]
81
+ }), t[15] = i, t[16] = p, t[17] = m) : m = t[17], m;
82
+ }, le = (e) => {
83
+ let r = I(19), i, a, o, s, c;
84
+ r[0] === e ? (i = r[1], a = r[2], o = r[3], s = r[4], c = r[5]) : ({children: i, popupTheme: a, siteTheme: s, style: c, ...o} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = o, r[4] = s, r[5] = c);
85
+ let l;
86
+ r[6] !== a || r[7] !== s ? (l = a ?? (s ? h(s) : null), r[6] = a, r[7] = s, r[8] = l) : l = r[8];
87
+ let u = l;
88
+ q(u?.fonts?.heading, u?.fonts?.body);
89
+ let d;
90
+ r[9] === Symbol.for("react.memo_cache_sentinel") ? (d = L(n, O), r[9] = d) : d = r[9];
91
+ let f;
92
+ r[10] === u ? f = r[11] : (f = m(u), r[10] = u, r[11] = f);
93
+ let p;
94
+ r[12] !== c || r[13] !== f ? (p = {
95
+ ...f,
96
+ ...c
97
+ }, r[12] = c, r[13] = f, r[14] = p) : p = r[14];
98
+ let g;
99
+ return r[15] !== i || r[16] !== o || r[17] !== p ? (g = /* @__PURE__ */ P(t, {
100
+ className: d,
101
+ cssReset: !0,
102
+ style: p,
103
+ ...o,
104
+ children: i
105
+ }), r[15] = i, r[16] = o, r[17] = p, r[18] = g) : g = r[18], g;
106
+ }, X = A(() => import("./PopupBody-DZVwDLkg-yrot8Uqb.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), ue = (e) => {
107
+ let t = I(7), { size: n } = e, r = n ?? "medium", i;
108
+ t[0] === r ? i = t[1] : (i = v({ size: r }), t[0] = r, t[1] = i);
109
+ let a, o, s;
110
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ P("div", { className: S }), o = /* @__PURE__ */ P("div", { className: w }), s = /* @__PURE__ */ P("div", { className: C }), t[2] = a, t[3] = o, t[4] = s) : (a = t[2], o = t[3], s = t[4]);
111
+ let c;
112
+ return t[5] === i ? c = t[6] : (c = /* @__PURE__ */ F("div", {
113
+ className: i,
114
+ children: [
115
+ a,
116
+ o,
117
+ s
118
+ ]
119
+ }), t[5] = i, t[6] = c), c;
120
+ }, Z = () => {
121
+ let e = I(10), { popup: t } = x(), n;
122
+ e[0] === t.content.size ? n = e[1] : (n = /* @__PURE__ */ P(ue, { size: t.content.size }), e[0] = t.content.size, e[1] = n);
123
+ let r;
124
+ e[2] === t ? r = e[3] : (r = /* @__PURE__ */ P(X, { popup: t }), e[2] = t, e[3] = r);
125
+ let i;
126
+ e[4] !== n || e[5] !== r ? (i = /* @__PURE__ */ P(k, {
127
+ fallback: n,
128
+ children: r
129
+ }), e[4] = n, e[5] = r, e[6] = i) : i = e[6];
130
+ let a;
131
+ return e[7] !== t || e[8] !== i ? (a = /* @__PURE__ */ P(ce, {
132
+ popup: t,
133
+ children: i
134
+ }), e[7] = t, e[8] = i, e[9] = a) : a = e[9], a;
135
+ }, de = (e) => e.content.position || "top-right", fe = (e) => {
136
+ switch (e) {
137
+ case "close-press": return "close_button";
138
+ case "outside-press": return "outside_click";
139
+ case "escape-key": return "escape_key";
140
+ default: return "programmatic";
141
+ }
142
+ }, pe = () => {
143
+ let e = I(32), { popup: t, callbacks: n } = x(), { placement: d, id: f } = t, p = g(l).active_popup_id === f, m = M(!1), h, _;
144
+ e[0] !== n || e[1] !== p || e[2] !== t ? (h = () => {
145
+ p && !m.current && (m.current = !0, n?.onPopupOpen?.(t, { trigger_type: u() })), p || (m.current = !1);
146
+ }, _ = [
147
+ p,
148
+ t,
149
+ n
150
+ ], e[0] = n, e[1] = p, e[2] = t, e[3] = h, e[4] = _) : (h = e[3], _ = e[4]), j(h, _);
151
+ let v = te(), y, b, S, C, w, E, O, k;
152
+ if (e[5] !== v || e[6] !== p || e[7] !== d || e[8] !== t) {
153
+ let n = de(t), l = d === "popup", u = d === "slide_in";
154
+ b = o, w = p, e[17] === v ? E = e[18] : (E = (e, t) => !e && v(fe(t?.reason)), e[17] = v, e[18] = E), O = l, k = !l, y = i, e[19] === l ? S = e[20] : (S = l && /* @__PURE__ */ P(a, {}), e[19] = l, e[20] = S), C = l ? /* @__PURE__ */ P(c, {
155
+ className: ee,
156
+ children: /* @__PURE__ */ F(s.Popup, {
157
+ className: D({ placement: d }),
158
+ children: [/* @__PURE__ */ P(r, {
159
+ variant: "ghost",
160
+ size: "icon-xs",
161
+ className: T,
162
+ "aria-label": "Close popup",
163
+ children: /* @__PURE__ */ P(R, { size: 16 })
164
+ }), /* @__PURE__ */ P(Z, {})]
165
+ })
166
+ }) : /* @__PURE__ */ F(s.Popup, {
167
+ className: L(D({
168
+ placement: d,
169
+ position: n
170
+ }), u && "_1gklkndd"),
171
+ children: [/* @__PURE__ */ P(r, {
172
+ variant: "ghost",
173
+ size: "icon-xs",
174
+ className: T,
175
+ "aria-label": "Close popup",
176
+ children: /* @__PURE__ */ P(R, { size: 16 })
177
+ }), /* @__PURE__ */ P(Z, {})]
178
+ }), e[5] = v, e[6] = p, e[7] = d, e[8] = t, e[9] = y, e[10] = b, e[11] = S, e[12] = C, e[13] = w, e[14] = E, e[15] = O, e[16] = k;
179
+ } else y = e[9], b = e[10], S = e[11], C = e[12], w = e[13], E = e[14], O = e[15], k = e[16];
180
+ let A;
181
+ e[21] !== y || e[22] !== S || e[23] !== C ? (A = /* @__PURE__ */ F(y, { children: [S, C] }), e[21] = y, e[22] = S, e[23] = C, e[24] = A) : A = e[24];
182
+ let N;
183
+ return e[25] !== b || e[26] !== w || e[27] !== E || e[28] !== O || e[29] !== k || e[30] !== A ? (N = /* @__PURE__ */ P(b, {
184
+ open: w,
185
+ onOpenChange: E,
186
+ modal: O,
187
+ disablePointerDismissal: k,
188
+ children: A
189
+ }), e[25] = b, e[26] = w, e[27] = E, e[28] = O, e[29] = k, e[30] = A, e[31] = N) : N = e[31], N;
190
+ }, me = 3e4, he = 5e3, ge = 5e3, _e = 100, ve = .5, ye = 5, be = (e) => {
191
+ if (typeof document > "u") return () => {};
192
+ let t = !1, n = Date.now(), r = [], i = 0, a = null, o = () => Date.now() - n >= me, s = () => {
193
+ t || (t = !0, c(), e());
194
+ }, c = () => {
195
+ a &&= (clearTimeout(a), null);
196
+ }, l = () => {
197
+ if (r.length < 2) return 0;
198
+ let e = r[0], t = r[r.length - 1], n = t.t - e.t;
199
+ return n === 0 ? 0 : (e.y - t.y) / n;
200
+ }, u = () => r.reduce((e, t) => t.y > e ? t.y : e, 0), d = (e) => {
201
+ r.push({
202
+ y: e.clientY,
203
+ t: Date.now()
204
+ }), r.length > ye && r.shift();
205
+ }, f = (e) => {
206
+ t || !o() || e.clientY > 0 || u() < _e || Date.now() - i < ge || l() < ve || (c(), a = setTimeout(s, he));
207
+ }, p = () => {
208
+ c();
209
+ }, m = () => {
210
+ i = Date.now();
211
+ }, h = B.listen((e) => {
212
+ o() && (e === "hidden" || e === "frozen") && s();
213
+ });
214
+ return document.addEventListener("mousemove", d, { passive: !0 }), document.addEventListener("mouseleave", f), document.addEventListener("mouseenter", p), window.addEventListener("scroll", m, { passive: !0 }), () => {
215
+ c(), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", f), document.removeEventListener("mouseenter", p), window.removeEventListener("scroll", m), h();
216
+ };
217
+ }, xe = (e, t) => {
218
+ if (!e) return null;
219
+ let n = setTimeout(() => f(t, { trigger_type: "time_on_page" }), e);
220
+ return () => clearTimeout(n);
221
+ }, Se = (e, t) => {
222
+ if (e === void 0) return null;
223
+ let n = !1;
224
+ return V.listen((r) => {
225
+ n || r.depth >= e && (n = !0, f(t, { trigger_type: "scroll_depth" }));
226
+ });
227
+ }, Ce = (e) => {
228
+ let t = !1;
229
+ return z.listen((n) => {
230
+ t || n.status === "idle" && (t = !0, f(e, { trigger_type: "inactivity" }));
231
+ });
232
+ }, we = (e, t) => {
233
+ let n = I(11), r = t === void 0 ? !0 : t, { triggers: i, id: a } = e, o = g(ne), s;
234
+ n[0] === Symbol.for("react.memo_cache_sentinel") ? (s = [], n[0] = s) : s = n[0];
235
+ let c = M(s), l;
236
+ n[1] !== r || n[2] !== o || n[3] !== e || n[4] !== i ? (l = () => {
237
+ if (!r || !o || !i) return;
238
+ let t = [];
239
+ if (i.time_on_page.enabled) {
240
+ let n = xe(i.time_on_page.delay_ms, e);
241
+ n && t.push(n);
242
+ }
243
+ if (i.scroll_depth.enabled) {
244
+ let n = Se(i.scroll_depth.percent, e);
245
+ n && t.push(n);
246
+ }
247
+ return i.exit_intent.enabled && t.push(be(() => f(e, { trigger_type: "exit_intent" }))), i.inactivity.enabled && t.push(Ce(e)), c.current = t, () => {
248
+ t.forEach(Te), c.current = [];
249
+ };
250
+ }, n[1] = r, n[2] = o, n[3] = e, n[4] = i, n[5] = l) : l = n[5];
251
+ let u;
252
+ n[6] !== r || n[7] !== o || n[8] !== a || n[9] !== i ? (u = [
253
+ r,
254
+ o,
255
+ a,
256
+ i
257
+ ], n[6] = r, n[7] = o, n[8] = a, n[9] = i, n[10] = u) : u = n[10], j(l, u);
258
+ };
259
+ function Te(e) {
260
+ return e();
261
+ }
262
+ var Q = (e, t) => {
263
+ switch (e.match_type) {
264
+ case "is_all_pages": return !0;
265
+ case "is": return e.page_id ? t.pageId === e.page_id ? e.value == null || e.value === t.path : !1 : e.value != null && e.value === t.path;
266
+ case "contains": return e.value != null && t.path.includes(e.value);
267
+ case "begins_with": return e.value != null && t.path.startsWith(e.value);
268
+ default: return !1;
269
+ }
270
+ }, $ = (e, t) => {
271
+ switch (e.match_type) {
272
+ case "exact": return t === e.value;
273
+ case "contains": return t.includes(e.value);
274
+ case "domain": try {
275
+ let n = new URL(t).hostname, r = e.value.toLowerCase();
276
+ return n === r || n.endsWith(`.${r}`);
277
+ } catch {
278
+ return !1;
279
+ }
280
+ default: return !1;
281
+ }
282
+ }, Ee = (e, t, n) => {
283
+ let r = e.pages?.exclude ?? [];
284
+ if (r.length > 0 && r.some((e) => Q(e, t))) return !1;
285
+ let i = e.pages?.include ?? [];
286
+ if (i.length > 0 && !i.some((e) => Q(e, t))) return !1;
287
+ let a = e.referrer?.include ?? [];
288
+ if (a.length > 0 && (!n || !a.some((e) => $(e, n)))) return !1;
289
+ let o = e.referrer?.exclude ?? [];
290
+ return !(o.length > 0 && n && o.some((e) => $(e, n)));
291
+ }, De = (e) => {
292
+ let t = I(4), { pageId: n } = e, { popup: r } = x(), i;
293
+ bb0: {
294
+ if (!r.target) {
295
+ i = !0;
296
+ break bb0;
297
+ }
298
+ if (typeof window > "u") {
299
+ i = !1;
300
+ break bb0;
301
+ }
302
+ let e;
303
+ if (t[0] !== n || t[1] !== r.target) {
304
+ let i = re.get().identity?.referrer?.raw || document.referrer || null, a = new URL(window.location.href, window.location.origin);
305
+ e = Ee(r.target, {
306
+ pageId: n,
307
+ path: a.pathname
308
+ }, i), t[0] = n, t[1] = r.target, t[2] = e;
309
+ } else e = t[2];
310
+ i = e;
311
+ }
312
+ let a = i;
313
+ if (we(r, a), !a) return null;
314
+ let o;
315
+ return t[3] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ P(pe, {}), t[3] = o) : o = t[3], o;
316
+ }, Oe = () => {
317
+ let e = V.get(), t = z.get();
318
+ return {
319
+ trigger_scroll_depth: e.depth,
320
+ trigger_scroll_speed: e.speedCategory,
321
+ trigger_scroll_direction: e.direction,
322
+ trigger_activity_status: t.status,
323
+ trigger_activity_seconds: t.seconds,
324
+ trigger_tab_count: ie()
325
+ };
326
+ }, ke = (t) => {
327
+ let n = I(16), { popups: r, pageId: i } = t, a = e(), o, s;
328
+ n[0] === r ? (o = n[1], s = n[2]) : (o = () => {
329
+ p(r), d(!1);
330
+ }, s = [r], n[0] = r, n[1] = o, n[2] = s), j(o, s);
331
+ let c;
332
+ n[3] === a ? c = n[4] : (c = (e, t) => {
333
+ !a || typeof a.track != "function" || a?.track(e, t);
334
+ }, n[3] = a, n[4] = c);
335
+ let l = c, u = Ae, f;
336
+ n[5] === l ? f = n[6] : (f = {
337
+ onPopupOpen: (e, t) => {
338
+ l("popup.view", {
339
+ ...u(e),
340
+ trigger_type: t.trigger_type,
341
+ language: e.language,
342
+ ...Oe()
343
+ });
344
+ },
345
+ onPopupClose: (e, t) => {
346
+ l("popup.close", {
347
+ ...u(e),
348
+ trigger_type: t.trigger_type,
349
+ dismiss_reason: t.dismiss_reason,
350
+ time_shown_ms: t.time_shown_ms
351
+ });
352
+ },
353
+ onAction: (e, t) => {
354
+ l("popup.action", {
355
+ ...u(e),
356
+ ...t
357
+ });
358
+ }
359
+ }, n[5] = l, n[6] = f);
360
+ let m = f, h;
361
+ if (n[7] !== m || n[8] !== i || n[9] !== r) {
362
+ let e;
363
+ n[11] !== m || n[12] !== i ? (e = (e) => /* @__PURE__ */ P(le, {
364
+ popupTheme: e.theme,
365
+ siteTheme: e.site?.theme,
366
+ children: /* @__PURE__ */ P(E, {
367
+ popup: e,
368
+ callbacks: m,
369
+ children: /* @__PURE__ */ P(De, { pageId: i })
370
+ })
371
+ }, e.id), n[11] = m, n[12] = i, n[13] = e) : e = n[13], h = r.map(e), n[7] = m, n[8] = i, n[9] = r, n[10] = h;
372
+ } else h = n[10];
373
+ let g;
374
+ return n[14] === h ? g = n[15] : (g = /* @__PURE__ */ P(N, { children: h }), n[14] = h, n[15] = g), g;
375
+ };
376
+ function Ae(e) {
377
+ return {
378
+ resource: "builder.popup",
379
+ identifier: e.id,
380
+ popup_title: e.title,
381
+ placement: e.placement,
382
+ popup_action_kind: e.content.action?.type || "none"
383
+ };
384
+ }
385
+ var je = /* @__PURE__ */ _({ PopupRenderer: () => ke });
386
+ //#endregion
387
+ export { je as t };
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import { n as e, r as t } from "./ThemeProvider-BQmIB5tr.js";
3
- import { t as n } from "./theme.cssm-2YTdd8Yh.js";
4
- import { n as r, r as i, t as a } from "./CollectionField-CzS-34zx.js";
3
+ import { t as n } from "./theme.cssm-mkQwezuj.js";
4
+ import { n as r, r as i, t as a } from "./CollectionField-C59pmeQw.js";
5
5
  import { i as o, n as s, r as c, t as l } from "./Tooltip-BIgrpetu.js";
6
- import { i as u, n as d, r as f, t as p } from "./nodeAlignment-Cn6xNtOP.js";
7
- import { a as m, i as h, n as g, o as _, r as v } from "./Popover-q5dL7y0W.js";
6
+ import { n as u, r as d, t as f } from "./nodeAlignment-D70kOcui.js";
7
+ import { t as p } from "./rteTheme.cssm-xg0gJ28J.js";
8
+ import { a as m, i as h, n as g, o as _, r as v } from "./Popover-C7zZHBIc.js";
8
9
  import { forwardRef as y, useEffect as b, useState as x } from "react";
9
10
  import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
10
11
  import { useController as ee } from "react-hook-form";
@@ -22,7 +23,7 @@ import { EditorContent as he, EditorContext as ge, useCurrentEditor as _e, useEd
22
23
  //#region ../../libraries/editor-core/dist/theme/RteThemeProvider.js
23
24
  var ye = (t) => {
24
25
  let r = T(7), { children: i, theme: a } = t, o = a?.className, s;
25
- r[0] === o ? s = r[1] : (s = te(n, f, o), r[0] = o, r[1] = s);
26
+ r[0] === o ? s = r[1] : (s = te(n, p, o), r[0] = o, r[1] = s);
26
27
  let c = a?.style, l = a?.portalToThemeRoot, u;
27
28
  return r[2] !== i || r[3] !== s || r[4] !== c || r[5] !== l ? (u = /* @__PURE__ */ C(e, {
28
29
  className: s,
@@ -46,7 +47,7 @@ var ye = (t) => {
46
47
  pe,
47
48
  Y,
48
49
  J,
49
- p,
50
+ f,
50
51
  Z.configure({ types: [
51
52
  "paragraph",
52
53
  "heading",
@@ -656,8 +657,8 @@ function rt(e) {
656
657
  }
657
658
  //#endregion
658
659
  //#region ../../libraries/react-collection/dist/widgets/richTextWidget/RichTextWidget.cssm.js
659
- var it = "_1vx76w30", at = "_1vx76w33", ot = "_1vx76w34", st = { style: d({ baseSpacing: ".875rem" }) }, ct = (e) => {
660
- let t = T(58), { field: n } = e, [s, c] = x(!1), { key: l, label: d, helper_text: f, readonly: p, placeholder: m } = n, h = l === void 0 ? "" : l, g = d === void 0 ? "" : d, _ = f === void 0 ? "" : f, v = p === void 0 ? !1 : p, y;
660
+ var it = "_1vx76w30", at = "_1vx76w33", ot = "_1vx76w34", st = { style: u({ baseSpacing: ".875rem" }) }, ct = (e) => {
661
+ let t = T(58), { field: n } = e, [s, c] = x(!1), { key: l, label: u, helper_text: f, readonly: p, placeholder: m } = n, h = l === void 0 ? "" : l, g = u === void 0 ? "" : u, _ = f === void 0 ? "" : f, v = p === void 0 ? !1 : p, y;
661
662
  t[0] === n ? y = t[1] : (y = i(n), t[0] = n, t[1] = y);
662
663
  let S;
663
664
  t[2] !== h || t[3] !== y ? (S = {
@@ -671,7 +672,7 @@ var it = "_1vx76w30", at = "_1vx76w33", ot = "_1vx76w34", st = { style: d({ base
671
672
  autocomplete: "off",
672
673
  autocorrect: "off",
673
674
  autocapitalize: "off",
674
- class: u
675
+ class: d
675
676
  } }, t[7] = ae) : ae = t[7];
676
677
  let N;
677
678
  t[8] === O ? N = t[9] : (N = (e) => {
@@ -1,7 +1,8 @@
1
1
  "use client";
2
- import { d as e, i as t, n, o as r, t as i } from "./Dialog-CzVhHLEY.js";
3
- import { r as a } from "./ThemeProvider-BQmIB5tr.js";
4
- import { t as o } from "./CollectionInput-B1qV4QEH.js";
2
+ import { t as e } from "./LevoProvider-nmIbMlsk.js";
3
+ import { r as t } from "./ThemeProvider-BQmIB5tr.js";
4
+ import { t as n } from "./CollectionInput-B1qV4QEH.js";
5
+ import { i as r, n as i, o as a, t as o } from "./Dialog-DVB4WpBS.js";
5
6
  import { useEffect as s, useState as c } from "react";
6
7
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
7
8
  import { toast as f } from "sonner";
@@ -44,14 +45,14 @@ var _ = (e, t = "Error", n = {}) => {
44
45
  }, 1e3)), () => clearInterval(e);
45
46
  }, [l, N]), s(() => {
46
47
  l && (b(""), P(30), A(!1), M(!1));
47
- }, [l]), /* @__PURE__ */ u(r, {
48
+ }, [l]), /* @__PURE__ */ u(a, {
48
49
  open: l,
49
50
  onOpenChange: (e) => {
50
51
  e || f();
51
52
  },
52
- children: /* @__PURE__ */ d(n, {
53
+ children: /* @__PURE__ */ d(i, {
53
54
  className: x,
54
- children: [/* @__PURE__ */ u(i, { children: /* @__PURE__ */ u(t, { children: `Verify ${m === "email" ? "Email" : "Phone"}` }) }), /* @__PURE__ */ d("div", {
55
+ children: [/* @__PURE__ */ u(o, { children: /* @__PURE__ */ u(r, { children: `Verify ${m === "email" ? "Email" : "Phone"}` }) }), /* @__PURE__ */ d("div", {
55
56
  className: S,
56
57
  children: [
57
58
  /* @__PURE__ */ d("div", {
@@ -70,7 +71,7 @@ var _ = (e, t = "Error", n = {}) => {
70
71
  }),
71
72
  /* @__PURE__ */ u("div", {
72
73
  className: T,
73
- children: /* @__PURE__ */ u(o, {
74
+ children: /* @__PURE__ */ u(n, {
74
75
  value: y,
75
76
  onChange: (e) => {
76
77
  b(e.target.value.replace(/\D/g, "").slice(0, 4));
@@ -82,7 +83,7 @@ var _ = (e, t = "Error", n = {}) => {
82
83
  }),
83
84
  /* @__PURE__ */ d("div", {
84
85
  className: E,
85
- children: [/* @__PURE__ */ u(a, {
86
+ children: [/* @__PURE__ */ u(t, {
86
87
  onClick: async () => {
87
88
  if (!(!y || y.length !== 4)) {
88
89
  A(!0);
@@ -135,16 +136,16 @@ var _ = (e, t = "Error", n = {}) => {
135
136
  })]
136
137
  })
137
138
  });
138
- }, A = "jfrbe10", j = "jfrbe11", M = "jfrbe12", N = ({ value: t, type: n, isVerified: r, onVerifySuccess: i, onStateChange: o }) => {
139
+ }, A = "jfrbe10", j = "jfrbe11", M = "jfrbe12", N = ({ value: n, type: r, isVerified: i, onVerifySuccess: a, onStateChange: o }) => {
139
140
  let { membership: s } = e(), [f, p] = c(!1), [m, g] = c(!1), v = (e) => {
140
141
  o && o(e);
141
142
  }, y = async () => {
142
- let e = t?.trim()?.toLowerCase();
143
+ let e = n?.trim()?.toLowerCase();
143
144
  if (!e) {
144
- _(`Please enter a ${n}`);
145
+ _(`Please enter a ${r}`);
145
146
  return;
146
147
  }
147
- if (n === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
148
+ if (r === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)) {
148
149
  _("Please enter a valid email address");
149
150
  return;
150
151
  }
@@ -152,7 +153,7 @@ var _ = (e, t = "Error", n = {}) => {
152
153
  try {
153
154
  await s?.requestOtp({
154
155
  content: e,
155
- medium: n === "phone" ? "whatsapp" : "email"
156
+ medium: r === "phone" ? "whatsapp" : "email"
156
157
  }), p(!0);
157
158
  } catch (e) {
158
159
  let t = e;
@@ -163,27 +164,27 @@ var _ = (e, t = "Error", n = {}) => {
163
164
  }, x = () => {
164
165
  p(!1), v(!1);
165
166
  };
166
- return r ? /* @__PURE__ */ d("div", {
167
+ return i ? /* @__PURE__ */ d("div", {
167
168
  className: A,
168
169
  children: [/* @__PURE__ */ u(h, { className: M }), /* @__PURE__ */ u("span", {
169
170
  className: j,
170
171
  children: "Verified"
171
172
  })]
172
- }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(a, {
173
+ }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(t, {
173
174
  size: "default",
174
175
  variant: "ghost",
175
176
  onClick: y,
176
177
  onMouseDown: (e) => e.preventDefault(),
177
- disabled: !t || m,
178
+ disabled: !n || m,
178
179
  type: "button",
179
180
  children: m ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(b, { size: 14 }), "Sending..."] }) : "Verify"
180
181
  }), f && /* @__PURE__ */ u(k, {
181
182
  isOpen: f,
182
183
  onClose: x,
183
- value: t?.trim()?.toLowerCase() || "",
184
- type: n,
184
+ value: n?.trim()?.toLowerCase() || "",
185
+ type: r,
185
186
  onVerifySuccess: (e) => {
186
- i(e), x();
187
+ a(e), x();
187
188
  }
188
189
  })] });
189
190
  };
@@ -10,6 +10,6 @@ var t = (e, n) => {
10
10
  } else typeof o == "string" && (r[o] = String(a));
11
11
  }
12
12
  return r;
13
- }, n = (n) => (r) => r ? e(t(n, r)) : {}, r = "_1bi3v3x0";
13
+ }, n = (n) => (r) => r ? e(t(n, r)) : {};
14
14
  //#endregion
15
- export { n, r as t };
15
+ export { n as t };