@levo-so/site-runtime 0.3.19 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BillingStep-ByiYjJ0S.js +251 -0
- package/BookingCard-DdwLHVGw.js +816 -0
- package/CollectionLabel-CmUFfc_7.js +35 -0
- package/DateTimeWidget-Bk2tk_CT.js +254 -0
- package/{KBChatWidget-GRi6sLpp.js → KBChatWidget-BXRRgelS.js} +223 -223
- package/PhoneWidget-FWE3jD_L.js +97 -0
- package/{Popover-C29yJ7rz.js → Popover-MSrVDAzg.js} +7 -7
- package/PopupBody-DWM55Zh5-B3ysApDM.js +158 -0
- package/PopupDialog-DwAAJ8JS-DkxjZaJL.js +260 -0
- package/PopupRenderer-BVtV4b9I-Dot4Syse.js +207 -0
- package/{RichTextWidget-DfakML79.js → RichTextWidget-KnIKESAD.js} +189 -190
- package/{RteThemeProvider-BQmfSXSl.js → RteThemeProvider-DtTXGcCT.js} +2 -3
- package/Sonner-BsE4Y_t4.js +21 -0
- package/blog-content.js +71 -72
- package/dist-BVFCdirT.js +4471 -0
- package/dist-DEXGyFeH.js +376 -0
- package/index.d.ts +21 -11
- package/index.js +1702 -1390
- package/{themeVars.cssm-ByhhC2Jm.js → inlineBaseTheme-DcNdMEYp.js} +35 -5
- package/{inlineCollectionTheme-CWcMCUti.js → inlineCollectionTheme-DjXuH3bK.js} +1 -1
- package/{inlineRteTheme-CRPtkNXy.js → inlineRteTheme-BYGIJM7P.js} +1 -1
- package/{kbChat-a2dXSeRc.js → kbChat-eFsau7hG.js} +27 -27
- package/package.json +23 -23
- package/{pillChrome-CEpWGNZB.js → pillChrome-Dy3ApFI5.js} +5 -5
- package/popups.js +1 -1
- package/{react-Cj_U6VZQ.js → react-CENbCy5d.js} +6 -5
- package/script.esm-D4nvz3-k.js +62 -0
- package/script.esm-uVCZU25S.js +62 -0
- package/start.js +1 -1
- package/styles.css +1 -1
- package/theme.cssm-iXnQwMCp.js +238 -0
- package/CollectionField-C-6a1ud4.js +0 -270
- package/CollectionInput-BJ__qcbk.js +0 -147
- package/DateTimeWidget-U3lD0q1q.js +0 -255
- package/Dialog-dT7y641z.js +0 -130
- package/LevoProvider-Bsjkcwc8.js +0 -20
- package/PhoneWidget-DQQa4bL6.js +0 -99
- package/PopupBody-BI-MJqmd-DgTQEzda.js +0 -159
- package/PopupRenderer-D66Gx63H-Cd9xJv33.js +0 -388
- package/ThemeProvider-DutrjSTF.js +0 -116
- package/Tooltip-CQB0LyxK.js +0 -67
- package/VerifyButton-BUT70lgz.js +0 -192
- package/createThemeExtension-4AUn51iJ.js +0 -15
- package/dist-6AIgW_iB.js +0 -79
- package/dist-CEdznbFW.js +0 -3668
- package/inlineBaseTheme-BB9e6h5f.js +0 -9
- package/popupState-JmpeKzgM-D_77LiAa.js +0 -229
- package/react-B9yvlbH0.js +0 -74
- package/theme.cssm-DUzmx76l.js +0 -4
- package/usePopupRedirect-CAAdcpaW-Ddjyf4KK.js +0 -82
- /package/{content.cssm-XdMsTGIB.js → content.cssm-D_LSloGW.js} +0 -0
- /package/{es-ByBbirnH.js → es-CK20DkgT.js} +0 -0
- /package/{rolldown-runtime-CAFD8bLK.js → rolldown-runtime-Dy4uBu1J.js} +0 -0
- /package/{routes-CyKmkoRM.js → routes-DO1BLfh9.js} +0 -0
- /package/{rteTheme.cssm-W4gTOijw.js → rteTheme.cssm-BRxusHY4.js} +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { h as e, o as t, p as ee, s as n } from "./dist-BVFCdirT.js";
|
|
3
|
+
import { c as te } from "react/compiler-runtime";
|
|
4
|
+
import { useState as r } from "react";
|
|
5
|
+
import { useController as i } from "react-hook-form";
|
|
6
|
+
import a, { isSupportedCountry as ne } from "react-phone-number-input";
|
|
7
|
+
import { jsx as o, jsxs as re } from "react/jsx-runtime";
|
|
8
|
+
import { IconPencil as ie } from "@tabler/icons-react";
|
|
9
|
+
//#region ../../libraries/react-collection/dist/widgets/phoneWidget/PhoneWidget.cssm.js
|
|
10
|
+
var ae = "_89f1hw0", s = "_89f1hw1", c = "_89f1hw2", oe = "_89f1hw4", l = (l) => {
|
|
11
|
+
let u = te(51), { field: d, settings: se } = l, { key: f, label: p, helper_text: m, readonly: h, options: g } = d, _ = f === void 0 ? "" : f, v = p === void 0 ? "" : p, y = m === void 0 ? "" : m, b = h === void 0 ? !1 : h, x = _, S = !!g?.verification && !!se?.enableVerification, [C, w] = r(null), [T, E] = r(!1), D;
|
|
12
|
+
u[0] !== T || u[1] !== S || u[2] !== C ? (D = (e) => T ? !0 : S && (!C || C !== e) ? "Phone verification required" : !0, u[0] = T, u[1] = S, u[2] = C, u[3] = D) : D = u[3];
|
|
13
|
+
let O;
|
|
14
|
+
u[4] !== d || u[5] !== D ? (O = e(d, D), u[4] = d, u[5] = D, u[6] = O) : O = u[6];
|
|
15
|
+
let k = O, A;
|
|
16
|
+
u[7] !== x || u[8] !== k ? (A = {
|
|
17
|
+
name: x,
|
|
18
|
+
rules: k
|
|
19
|
+
}, u[7] = x, u[8] = k, u[9] = A) : A = u[9];
|
|
20
|
+
let { field: j, fieldState: M } = i(A), N, P, F, I;
|
|
21
|
+
u[10] === j ? (N = u[11], P = u[12], F = u[13], I = u[14]) : ({value: I, onBlur: N, onChange: P, ...F} = j, u[10] = j, u[11] = N, u[12] = P, u[13] = F, u[14] = I);
|
|
22
|
+
let { error: ce } = M, L = !!d?.required, R = ce?.message, z = !!C && !!I && C === I, B;
|
|
23
|
+
u[15] === g?.country ? B = u[16] : (B = () => {
|
|
24
|
+
let e = g?.country;
|
|
25
|
+
if (e && typeof e == "string") {
|
|
26
|
+
let t = e?.toUpperCase();
|
|
27
|
+
if (ne(t)) return t;
|
|
28
|
+
}
|
|
29
|
+
return "IN";
|
|
30
|
+
}, u[15] = g?.country, u[16] = B);
|
|
31
|
+
let V = B, H;
|
|
32
|
+
u[17] === P ? H = u[18] : (H = (e) => {
|
|
33
|
+
w(e), P(e);
|
|
34
|
+
}, u[17] = P, u[18] = H);
|
|
35
|
+
let U = H, W = I ?? "", G;
|
|
36
|
+
u[19] === V ? G = u[20] : (G = V(), u[19] = V, u[20] = G);
|
|
37
|
+
let K;
|
|
38
|
+
u[21] === P ? K = u[22] : (K = (e) => {
|
|
39
|
+
P?.(e ?? "");
|
|
40
|
+
}, u[21] = P, u[22] = K);
|
|
41
|
+
let q;
|
|
42
|
+
u[23] === N ? q = u[24] : (q = () => {
|
|
43
|
+
N?.();
|
|
44
|
+
}, u[23] = N, u[24] = q);
|
|
45
|
+
let J = b || z, Y;
|
|
46
|
+
u[25] === z ? Y = u[26] : (Y = z ? /* @__PURE__ */ o("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
onClick: () => w(null),
|
|
49
|
+
className: oe,
|
|
50
|
+
title: "Change phone number",
|
|
51
|
+
children: /* @__PURE__ */ o(ie, { size: 14 })
|
|
52
|
+
}) : null, u[25] = z, u[26] = Y);
|
|
53
|
+
let X;
|
|
54
|
+
u[27] !== F || u[28] !== W || u[29] !== G || u[30] !== K || u[31] !== q || u[32] !== J || u[33] !== Y ? (X = /* @__PURE__ */ o("div", {
|
|
55
|
+
className: c,
|
|
56
|
+
children: /* @__PURE__ */ o(a, {
|
|
57
|
+
value: W,
|
|
58
|
+
international: !0,
|
|
59
|
+
inputComponent: n,
|
|
60
|
+
defaultCountry: G,
|
|
61
|
+
onChange: K,
|
|
62
|
+
onBlur: q,
|
|
63
|
+
className: ae,
|
|
64
|
+
readOnly: J,
|
|
65
|
+
rightIcon: Y,
|
|
66
|
+
...F
|
|
67
|
+
})
|
|
68
|
+
}), u[27] = F, u[28] = W, u[29] = G, u[30] = K, u[31] = q, u[32] = J, u[33] = Y, u[34] = X) : X = u[34];
|
|
69
|
+
let Z;
|
|
70
|
+
u[35] !== U || u[36] !== z || u[37] !== S || u[38] !== I ? (Z = S && /* @__PURE__ */ o("div", {
|
|
71
|
+
className: "_89f1hw3",
|
|
72
|
+
children: /* @__PURE__ */ o(t, {
|
|
73
|
+
value: I,
|
|
74
|
+
type: "phone",
|
|
75
|
+
isVerified: z,
|
|
76
|
+
onVerifySuccess: U,
|
|
77
|
+
onStateChange: E
|
|
78
|
+
})
|
|
79
|
+
}), u[35] = U, u[36] = z, u[37] = S, u[38] = I, u[39] = Z) : Z = u[39];
|
|
80
|
+
let Q;
|
|
81
|
+
u[40] !== X || u[41] !== Z ? (Q = /* @__PURE__ */ re("div", {
|
|
82
|
+
className: s,
|
|
83
|
+
children: [X, Z]
|
|
84
|
+
}), u[40] = X, u[41] = Z, u[42] = Q) : Q = u[42];
|
|
85
|
+
let $;
|
|
86
|
+
return u[43] !== R || u[44] !== y || u[45] !== L || u[46] !== v || u[47] !== x || u[48] !== b || u[49] !== Q ? ($ = /* @__PURE__ */ o(ee, {
|
|
87
|
+
error: R,
|
|
88
|
+
helperText: y,
|
|
89
|
+
readOnly: b,
|
|
90
|
+
label: v,
|
|
91
|
+
htmlFor: x,
|
|
92
|
+
isRequired: L,
|
|
93
|
+
children: Q
|
|
94
|
+
}), u[43] = R, u[44] = y, u[45] = L, u[46] = v, u[47] = x, u[48] = b, u[49] = Q, u[50] = $) : $ = u[50], $;
|
|
95
|
+
};
|
|
96
|
+
//#endregion
|
|
97
|
+
export { l as PhoneWidget, l as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as e, h as t } from "./theme.cssm-iXnQwMCp.js";
|
|
2
2
|
import { c as n } from "react/compiler-runtime";
|
|
3
3
|
import r from "clsx";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
@@ -9,10 +9,10 @@ var o = "_1tn9uzj0", s = "_1tn9uzj4", c = (e) => {
|
|
|
9
9
|
t[0] === e ? r = t[1] : ({...r} = e, t[0] = e, t[1] = r);
|
|
10
10
|
let o;
|
|
11
11
|
return t[2] === r ? o = t[3] : (o = /* @__PURE__ */ i(a.Root, { ...r }), t[2] = r, t[3] = o), o;
|
|
12
|
-
}, l = (
|
|
12
|
+
}, l = (t) => {
|
|
13
13
|
let r = n(5), o;
|
|
14
|
-
r[0] ===
|
|
15
|
-
let { portalRef: s } =
|
|
14
|
+
r[0] === t ? o = r[1] : ({...o} = t, r[0] = t, r[1] = o);
|
|
15
|
+
let { portalRef: s } = e(), c;
|
|
16
16
|
return r[2] !== s || r[3] !== o ? (c = /* @__PURE__ */ i(a.Portal, {
|
|
17
17
|
container: s,
|
|
18
18
|
...o
|
|
@@ -39,11 +39,11 @@ var o = "_1tn9uzj0", s = "_1tn9uzj4", c = (e) => {
|
|
|
39
39
|
className: l,
|
|
40
40
|
...c
|
|
41
41
|
}), t[5] = c, t[6] = l, t[7] = u) : u = t[7], u;
|
|
42
|
-
}, f = (
|
|
42
|
+
}, f = (e) => {
|
|
43
43
|
let o = n(12), s, c, l, u;
|
|
44
|
-
o[0] ===
|
|
44
|
+
o[0] === e ? (s = o[1], c = o[2], l = o[3], u = o[4]) : ({className: s, variant: u, size: l, ...c} = e, o[0] = e, o[1] = s, o[2] = c, o[3] = l, o[4] = u);
|
|
45
45
|
let d;
|
|
46
|
-
o[5] !== s || o[6] !== l || o[7] !== u ? (d = r(
|
|
46
|
+
o[5] !== s || o[6] !== l || o[7] !== u ? (d = r(t({
|
|
47
47
|
variant: u,
|
|
48
48
|
size: l
|
|
49
49
|
}), s), o[5] = s, o[6] = l, o[7] = u, o[8] = d) : d = o[8];
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { a as e, i as t, m as n, n as r } from "./theme.cssm-iXnQwMCp.js";
|
|
2
|
+
import { a as i, i as a, l as o, n as s, o as c, r as l, u } from "./PopupDialog-DwAAJ8JS-DkxjZaJL.js";
|
|
3
|
+
import { o as d } from "./inlineBaseTheme-DcNdMEYp.js";
|
|
4
|
+
import { t as f } from "./inlineCollectionTheme-DjXuH3bK.js";
|
|
5
|
+
import { _ as p, a as m, c as h, d as g, f as _, g as v, h as y, i as b, l as x, m as S, n as C, o as w, p as T, r as E, s as D, t as O, u as k, v as A } from "./react-CENbCy5d.js";
|
|
6
|
+
import { n as j, t as M } from "./content.cssm-D_LSloGW.js";
|
|
7
|
+
import { t as N } from "./inlineRteTheme-BYGIJM7P.js";
|
|
8
|
+
import { c as ee } from "react/compiler-runtime";
|
|
9
|
+
import { Suspense as P, lazy as F, useMemo as I, useState as L } from "react";
|
|
10
|
+
import R from "clsx";
|
|
11
|
+
import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
12
|
+
import { IconCheck as H, IconCopy as U } from "@tabler/icons-react";
|
|
13
|
+
import { Link as W } from "@tiptap/extension-link";
|
|
14
|
+
import { Document as G } from "@tiptap/extension-document";
|
|
15
|
+
import { TextStyle as K } from "@tiptap/extension-text-style";
|
|
16
|
+
import { Subscript as q } from "@tiptap/extension-subscript";
|
|
17
|
+
import { Superscript as J } from "@tiptap/extension-superscript";
|
|
18
|
+
import { Typography as Y } from "@tiptap/extension-typography";
|
|
19
|
+
import { UniqueID as X } from "@tiptap/extension-unique-id";
|
|
20
|
+
//#region ../../libraries/popups/dist/PopupBody-DWM55Zh5.js
|
|
21
|
+
var Z = [
|
|
22
|
+
G,
|
|
23
|
+
w,
|
|
24
|
+
b,
|
|
25
|
+
g,
|
|
26
|
+
v,
|
|
27
|
+
x,
|
|
28
|
+
m,
|
|
29
|
+
S,
|
|
30
|
+
y,
|
|
31
|
+
D,
|
|
32
|
+
h,
|
|
33
|
+
_,
|
|
34
|
+
E,
|
|
35
|
+
W.configure({ openOnClick: !1 }),
|
|
36
|
+
K,
|
|
37
|
+
p,
|
|
38
|
+
Y,
|
|
39
|
+
J,
|
|
40
|
+
q,
|
|
41
|
+
T,
|
|
42
|
+
k.configure({ multicolor: !0 }),
|
|
43
|
+
A,
|
|
44
|
+
j,
|
|
45
|
+
X.configure({ types: [
|
|
46
|
+
"paragraph",
|
|
47
|
+
"heading",
|
|
48
|
+
"bulletList",
|
|
49
|
+
"orderedList"
|
|
50
|
+
] })
|
|
51
|
+
], Q = (e) => C(e, Z), te = ({ content: e, className: t, ref: n, ...r }) => {
|
|
52
|
+
let i = I(() => e ? typeof e == "string" ? e ? Q(e) : null : e.json && Object.keys(e.json).length > 0 ? e.json : e.html ? Q(e.html) : null : null, [e]), a = I(() => i ? O({
|
|
53
|
+
content: i,
|
|
54
|
+
extensions: Z
|
|
55
|
+
}) : null, [i]);
|
|
56
|
+
return a ? /* @__PURE__ */ B("div", {
|
|
57
|
+
ref: n,
|
|
58
|
+
className: R(M, t),
|
|
59
|
+
...r,
|
|
60
|
+
children: a
|
|
61
|
+
}) : null;
|
|
62
|
+
}, $ = /* @__PURE__ */ u({ PopupBody: () => oe }), ne = F(() => import("./dist-BVFCdirT.js").then((e) => e.t).then((e) => ({ default: e.CollectionFormBuilder }))), re = N({ baseSpacing: ".625rem" }), ie = { style: f({ form: { gap: "1rem" } }) }, ae = {
|
|
63
|
+
left: s,
|
|
64
|
+
center: a,
|
|
65
|
+
right: o
|
|
66
|
+
}, oe = (a) => {
|
|
67
|
+
let o = ee(33), { disableInteraction: s } = a, { popup: u, callbacks: f, client: p, preview: m } = l(), h = f?.onAction, g = i(u), { content: _ } = u, [v, y] = L(!1), b;
|
|
68
|
+
o[0] !== _.action || o[1] !== h || o[2] !== u ? (b = () => {
|
|
69
|
+
if (_.action?.type !== "redirect" || !_.action.copyValue) return;
|
|
70
|
+
let e = _.action.copyValue;
|
|
71
|
+
navigator.clipboard.writeText(e).then(() => {
|
|
72
|
+
y(!0), setTimeout(() => y(!1), 2e3), h?.(u, {
|
|
73
|
+
action_type: "copy",
|
|
74
|
+
copy_value: e
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}, o[0] = _.action, o[1] = h, o[2] = u, o[3] = b) : b = o[3];
|
|
78
|
+
let x = b, S = _.align ?? "left", C = _.size ?? "medium", w;
|
|
79
|
+
o[4] === C ? w = o[5] : (w = c({ size: C }), o[4] = C, o[5] = w);
|
|
80
|
+
let T;
|
|
81
|
+
o[6] === s ? T = o[7] : (T = s ? { pointerEvents: "none" } : void 0, o[6] = s, o[7] = T);
|
|
82
|
+
let E;
|
|
83
|
+
o[8] !== S || o[9] !== _.description || o[10] !== _.heading ? (E = (_.heading || _.description) && /* @__PURE__ */ V(r, {
|
|
84
|
+
className: "zv6sjd4",
|
|
85
|
+
style: { textAlign: S },
|
|
86
|
+
children: [_.heading && /* @__PURE__ */ B(e, { children: _.heading }), _.description && /* @__PURE__ */ B(t, { children: _.description })]
|
|
87
|
+
}), o[8] = S, o[9] = _.description, o[10] = _.heading, o[11] = E) : E = o[11];
|
|
88
|
+
let D;
|
|
89
|
+
o[12] === _.body ? D = o[13] : (D = (_.body?.html || _.body?.json) && /* @__PURE__ */ B(te, {
|
|
90
|
+
className: "zv6sjd5",
|
|
91
|
+
style: re,
|
|
92
|
+
content: _.body
|
|
93
|
+
}), o[12] = _.body, o[13] = D);
|
|
94
|
+
let O;
|
|
95
|
+
o[14] !== S || o[15] !== p || o[16] !== _.action || o[17] !== h || o[18] !== u || o[19] !== m ? (O = _.action?.type === "form" && p && /* @__PURE__ */ B("div", {
|
|
96
|
+
className: "zv6sjd7",
|
|
97
|
+
children: /* @__PURE__ */ B(P, { children: /* @__PURE__ */ B(d, {
|
|
98
|
+
client: p,
|
|
99
|
+
children: /* @__PURE__ */ B(ne, {
|
|
100
|
+
collection_id: _.action.collectionKey,
|
|
101
|
+
formVariant: _.action.formVariant,
|
|
102
|
+
theme: ie,
|
|
103
|
+
uiConfig: {
|
|
104
|
+
hideFormHeading: !0,
|
|
105
|
+
hideSectionHeadings: !0
|
|
106
|
+
},
|
|
107
|
+
successConfig: _.action.successRedirectUrl ? { action: {
|
|
108
|
+
type: "redirect",
|
|
109
|
+
value: _.action.successRedirectUrl
|
|
110
|
+
} } : void 0,
|
|
111
|
+
submitButtonConfig: {
|
|
112
|
+
show: !0,
|
|
113
|
+
text: _.action.label || "Submit",
|
|
114
|
+
styles: _.action.fullWidth && (_.action.formVariant ?? "default") === "default" ? "zv6sjdb" : ae[S]
|
|
115
|
+
},
|
|
116
|
+
workspace_id: p.workspace,
|
|
117
|
+
containerStyles: "zv6sjd6",
|
|
118
|
+
preview: m,
|
|
119
|
+
onSuccess: () => {
|
|
120
|
+
_.action?.type === "form" && h?.(u, {
|
|
121
|
+
action_type: "form_submit",
|
|
122
|
+
collection_key: _.action.collectionKey
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
}) })
|
|
127
|
+
}), o[14] = S, o[15] = p, o[16] = _.action, o[17] = h, o[18] = u, o[19] = m, o[20] = O) : O = o[20];
|
|
128
|
+
let k;
|
|
129
|
+
o[21] !== _.action || o[22] !== v || o[23] !== x || o[24] !== g ? (k = _.action?.type === "redirect" && /* @__PURE__ */ V(z, { children: [_.action.copyValue && /* @__PURE__ */ V("button", {
|
|
130
|
+
type: "button",
|
|
131
|
+
className: "zv6sjdd",
|
|
132
|
+
onClick: x,
|
|
133
|
+
children: [/* @__PURE__ */ B("span", {
|
|
134
|
+
className: "zv6sjde",
|
|
135
|
+
children: _.action.copyValue
|
|
136
|
+
}), B(v ? H : U, {
|
|
137
|
+
size: 18,
|
|
138
|
+
className: "zv6sjdf"
|
|
139
|
+
})]
|
|
140
|
+
}), /* @__PURE__ */ B(n, {
|
|
141
|
+
className: "zv6sjdc",
|
|
142
|
+
onClick: () => g?.(),
|
|
143
|
+
children: _.action.label || "Button"
|
|
144
|
+
})] }), o[21] = _.action, o[22] = v, o[23] = x, o[24] = g, o[25] = k) : k = o[25];
|
|
145
|
+
let A;
|
|
146
|
+
return o[26] !== w || o[27] !== T || o[28] !== E || o[29] !== D || o[30] !== O || o[31] !== k ? (A = /* @__PURE__ */ V("div", {
|
|
147
|
+
className: w,
|
|
148
|
+
style: T,
|
|
149
|
+
children: [
|
|
150
|
+
E,
|
|
151
|
+
D,
|
|
152
|
+
O,
|
|
153
|
+
k
|
|
154
|
+
]
|
|
155
|
+
}), o[26] = w, o[27] = T, o[28] = E, o[29] = D, o[30] = O, o[31] = k, o[32] = A) : A = o[32], A;
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
export { $ as n };
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { c as e, d as t, l as n, o as r, p as i, s as a, t as o, u as s } from "./theme.cssm-iXnQwMCp.js";
|
|
2
|
+
import { a as c, c as l, f as u, i as d, o as f, p, r as m, s as h } from "./dist-DEXGyFeH.js";
|
|
3
|
+
import { t as g } from "./rteTheme.cssm-BRxusHY4.js";
|
|
4
|
+
import { c as _ } from "react/compiler-runtime";
|
|
5
|
+
import { Suspense as v, createContext as y, lazy as b, useContext as x, useEffect as S, useRef as C } from "react";
|
|
6
|
+
import w from "clsx";
|
|
7
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
8
|
+
import { createRuntimeFn as D } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
9
|
+
import { IconX as O } from "@tabler/icons-react";
|
|
10
|
+
//#region ../../libraries/levocn/dist/theme/utils/googleFonts.js
|
|
11
|
+
var k = "wght@300;400;500;600;700;900", A = (e) => !!e && e !== "inherit" && !e.includes(",") && !e.includes("var("), j = (...e) => {
|
|
12
|
+
let t = Array.from(new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(A)));
|
|
13
|
+
return t.length === 0 ? null : `https://fonts.googleapis.com/css2?${t.map((e) => `family=${e.replace(/ /g, "+")}:${k}`).join("&")}&display=swap`;
|
|
14
|
+
}, M = (e) => {
|
|
15
|
+
if (document.querySelector(`link[rel="preconnect"][href="${e}"]`)) return;
|
|
16
|
+
let t = document.createElement("link");
|
|
17
|
+
t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
|
|
18
|
+
}, N = (e) => {
|
|
19
|
+
let t = `family=${e.replace(/ /g, "+")}:`;
|
|
20
|
+
return Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href*=\"fonts.googleapis.com\"]")).some((e) => e.href.includes(t));
|
|
21
|
+
}, P = (...e) => {
|
|
22
|
+
let t = _(5), n = e, r;
|
|
23
|
+
t[0] === n ? r = t[1] : (r = n.filter(F).map(I).join("|"), t[0] = n, t[1] = r);
|
|
24
|
+
let i = r, a, o;
|
|
25
|
+
t[2] === i ? (a = t[3], o = t[4]) : (a = () => {
|
|
26
|
+
let e = j(...(i ? i.split("|") : []).filter(L));
|
|
27
|
+
if (!e) return;
|
|
28
|
+
M("https://fonts.googleapis.com"), M("https://fonts.gstatic.com");
|
|
29
|
+
let t = document.createElement("link");
|
|
30
|
+
t.rel = "stylesheet", t.href = e, t.crossOrigin = "anonymous", t.setAttribute("data-levo-fonts", e), document.head.appendChild(t);
|
|
31
|
+
}, o = [i], t[2] = i, t[3] = a, t[4] = o), S(a, o);
|
|
32
|
+
};
|
|
33
|
+
function F(e) {
|
|
34
|
+
return typeof e == "string" && e.trim() !== "";
|
|
35
|
+
}
|
|
36
|
+
function I(e) {
|
|
37
|
+
return e.trim();
|
|
38
|
+
}
|
|
39
|
+
function L(e) {
|
|
40
|
+
return !N(e);
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region ../../libraries/popups/dist/rolldown-runtime-Dy4uBu1J.js
|
|
44
|
+
var R = Object.defineProperty, z = (e, t) => {
|
|
45
|
+
let n = {};
|
|
46
|
+
for (var r in e) R(n, r, {
|
|
47
|
+
get: e[r],
|
|
48
|
+
enumerable: !0
|
|
49
|
+
});
|
|
50
|
+
return t || R(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
51
|
+
}, B = D({
|
|
52
|
+
defaultClassName: "_1gklknd4",
|
|
53
|
+
variantClassNames: {
|
|
54
|
+
placement: {
|
|
55
|
+
popup: "_1gklknd5",
|
|
56
|
+
slide_in: "_1gklknd6"
|
|
57
|
+
},
|
|
58
|
+
position: {
|
|
59
|
+
"top-left": "_1gklknd7",
|
|
60
|
+
"top-right": "_1gklknd8",
|
|
61
|
+
"bottom-left": "_1gklknd9",
|
|
62
|
+
"bottom-right": "_1gklknda"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: { placement: "popup" },
|
|
66
|
+
compoundVariants: []
|
|
67
|
+
}), V = "_1gklkndb", H = "_1gklkndc", U = D({
|
|
68
|
+
defaultClassName: "_1gklknde",
|
|
69
|
+
variantClassNames: { size: {
|
|
70
|
+
small: "_1gklkndf",
|
|
71
|
+
medium: "_1gklkndg",
|
|
72
|
+
large: "_1gklkndh",
|
|
73
|
+
xlarge: "_1gklkndi"
|
|
74
|
+
} },
|
|
75
|
+
defaultVariants: { size: "medium" },
|
|
76
|
+
compoundVariants: []
|
|
77
|
+
}), W = "_1gklkndn", G = y(null), K = (e) => {
|
|
78
|
+
let t = _(8), { popup: n, callbacks: r, client: i, preview: a, children: o } = e, s;
|
|
79
|
+
t[0] !== r || t[1] !== i || t[2] !== n || t[3] !== a ? (s = {
|
|
80
|
+
popup: n,
|
|
81
|
+
callbacks: r,
|
|
82
|
+
client: i,
|
|
83
|
+
preview: a
|
|
84
|
+
}, t[0] = r, t[1] = i, t[2] = n, t[3] = a, t[4] = s) : s = t[4];
|
|
85
|
+
let c;
|
|
86
|
+
return t[5] !== o || t[6] !== s ? (c = /* @__PURE__ */ T(G.Provider, {
|
|
87
|
+
value: s,
|
|
88
|
+
children: o
|
|
89
|
+
}), t[5] = o, t[6] = s, t[7] = c) : c = t[7], c;
|
|
90
|
+
}, q = () => {
|
|
91
|
+
let e = x(G);
|
|
92
|
+
if (!e) throw Error("usePopupContext must be used within a PopupProvider");
|
|
93
|
+
return e;
|
|
94
|
+
}, J = () => x(G), Y = () => {
|
|
95
|
+
let e = _(2), t = J(), n;
|
|
96
|
+
return e[0] === t ? n = e[1] : (n = (e) => {
|
|
97
|
+
let n = e === void 0 ? "programmatic" : e;
|
|
98
|
+
if (!t || l().active_popup_id !== t.popup.id) return;
|
|
99
|
+
let r = u();
|
|
100
|
+
t.callbacks?.onPopupClose?.(t.popup, {
|
|
101
|
+
trigger_type: p(),
|
|
102
|
+
dismiss_reason: n,
|
|
103
|
+
time_shown_ms: r ? Date.now() - r : null
|
|
104
|
+
}), d(t.popup.id);
|
|
105
|
+
}, e[0] = t, e[1] = n), n;
|
|
106
|
+
}, X = "zv6sjd1", Z = "zv6sjd2 zv6sjd1", ee = "zv6sjd3", te = "zv6sjd8", ne = "zv6sjd9", re = "zv6sjda", Q = (e) => {
|
|
107
|
+
let t = _(6), n = J(), r = n?.callbacks?.onAction, i = Y(), { action: a } = e.content, o;
|
|
108
|
+
t[0] !== a || t[1] !== i || t[2] !== n || t[3] !== r || t[4] !== e ? (o = () => {
|
|
109
|
+
a?.type === "redirect" && (!n || n.preview || (r?.(e, {
|
|
110
|
+
action_type: "redirect",
|
|
111
|
+
redirect_url: a.url,
|
|
112
|
+
open_in_new_tab: !!a.openInNewTab
|
|
113
|
+
}), i("cta_click"), a.openInNewTab ? window.open(a.url, "_blank", "noopener,noreferrer") : window.location.href = a.url));
|
|
114
|
+
}, t[0] = a, t[1] = i, t[2] = n, t[3] = r, t[4] = e, t[5] = o) : o = t[5];
|
|
115
|
+
let s = o;
|
|
116
|
+
return a?.type === "redirect" && a.url ? s : null;
|
|
117
|
+
}, ie = (e) => (e ?? "16:9").replace(":", " / "), ae = (e) => {
|
|
118
|
+
if (e.content.coverImage?.srcset) return Object.entries(e.content.coverImage.srcset).filter(([e]) => e !== "path").map(([e, t]) => `${t} ${e}`).join(", ");
|
|
119
|
+
}, oe = (e) => {
|
|
120
|
+
let t = _(18), { popup: n, disableInteraction: r, children: i } = e, { content: a } = n, o = Q(n), s = !!o && !r, c;
|
|
121
|
+
t[0] !== a.coverImage || t[1] !== a.coverImageFocus || t[2] !== n ? (c = a.coverImage && /* @__PURE__ */ T("img", {
|
|
122
|
+
src: a.coverImage.location,
|
|
123
|
+
srcSet: ae(n),
|
|
124
|
+
alt: "",
|
|
125
|
+
className: "_1gklkndl",
|
|
126
|
+
style: a.coverImageFocus ? { objectPosition: a.coverImageFocus.replace("-", " ") } : void 0
|
|
127
|
+
}), t[0] = a.coverImage, t[1] = a.coverImageFocus, t[2] = n, t[3] = c) : c = t[3];
|
|
128
|
+
let l = c, u;
|
|
129
|
+
t[4] === a.coverImageRatio ? u = t[5] : (u = ie(a.coverImageRatio), t[4] = a.coverImageRatio, t[5] = u);
|
|
130
|
+
let d;
|
|
131
|
+
t[6] === u ? d = t[7] : (d = { aspectRatio: u }, t[6] = u, t[7] = d);
|
|
132
|
+
let f = d, p;
|
|
133
|
+
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__ */ T("button", {
|
|
134
|
+
type: "button",
|
|
135
|
+
className: w("_1gklkndj", "_1gklkndk"),
|
|
136
|
+
style: f,
|
|
137
|
+
onClick: o ?? void 0,
|
|
138
|
+
"aria-label": a.action?.type === "redirect" ? a.action.label : void 0,
|
|
139
|
+
children: l
|
|
140
|
+
}) : /* @__PURE__ */ T("div", {
|
|
141
|
+
className: "_1gklkndj",
|
|
142
|
+
style: f,
|
|
143
|
+
children: l
|
|
144
|
+
})), 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];
|
|
145
|
+
let m;
|
|
146
|
+
return t[15] !== i || t[16] !== p ? (m = /* @__PURE__ */ E("div", {
|
|
147
|
+
className: V,
|
|
148
|
+
children: [p, i]
|
|
149
|
+
}), t[15] = i, t[16] = p, t[17] = m) : m = t[17], m;
|
|
150
|
+
}, se = (e) => {
|
|
151
|
+
let t = _(19), n, r, a, s, l;
|
|
152
|
+
t[0] === e ? (n = t[1], r = t[2], a = t[3], s = t[4], l = t[5]) : ({children: n, popupTheme: r, siteTheme: s, style: l, ...a} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = a, t[4] = s, t[5] = l);
|
|
153
|
+
let u;
|
|
154
|
+
t[6] !== r || t[7] !== s ? (u = r ?? (s ? f(s) : null), t[6] = r, t[7] = s, t[8] = u) : u = t[8];
|
|
155
|
+
let d = u;
|
|
156
|
+
P(d?.fonts?.heading, d?.fonts?.body);
|
|
157
|
+
let p;
|
|
158
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (p = w(o, g), t[9] = p) : p = t[9];
|
|
159
|
+
let m;
|
|
160
|
+
t[10] === d ? m = t[11] : (m = c(d), t[10] = d, t[11] = m);
|
|
161
|
+
let h;
|
|
162
|
+
t[12] !== l || t[13] !== m ? (h = {
|
|
163
|
+
...m,
|
|
164
|
+
...l
|
|
165
|
+
}, t[12] = l, t[13] = m, t[14] = h) : h = t[14];
|
|
166
|
+
let v;
|
|
167
|
+
return t[15] !== n || t[16] !== a || t[17] !== h ? (v = /* @__PURE__ */ T(i, {
|
|
168
|
+
className: p,
|
|
169
|
+
cssReset: !0,
|
|
170
|
+
style: h,
|
|
171
|
+
...a,
|
|
172
|
+
children: n
|
|
173
|
+
}), t[15] = n, t[16] = a, t[17] = h, t[18] = v) : v = t[18], v;
|
|
174
|
+
}, ce = b(() => import("./PopupBody-DWM55Zh5-B3ysApDM.js").then((e) => e.n).then((e) => ({ default: e.PopupBody }))), le = (e) => {
|
|
175
|
+
let t = _(7), { size: n } = e, r = n ?? "medium", i;
|
|
176
|
+
t[0] === r ? i = t[1] : (i = U({ size: r }), t[0] = r, t[1] = i);
|
|
177
|
+
let a, o, s;
|
|
178
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ T("div", { className: X }), o = /* @__PURE__ */ T("div", { className: Z }), s = /* @__PURE__ */ T("div", { className: ee }), t[2] = a, t[3] = o, t[4] = s) : (a = t[2], o = t[3], s = t[4]);
|
|
179
|
+
let c;
|
|
180
|
+
return t[5] === i ? c = t[6] : (c = /* @__PURE__ */ E("div", {
|
|
181
|
+
className: i,
|
|
182
|
+
children: [
|
|
183
|
+
a,
|
|
184
|
+
o,
|
|
185
|
+
s
|
|
186
|
+
]
|
|
187
|
+
}), t[5] = i, t[6] = c), c;
|
|
188
|
+
}, $ = () => {
|
|
189
|
+
let e = _(8), { popup: t } = q(), n;
|
|
190
|
+
e[0] === t.content.size ? n = e[1] : (n = /* @__PURE__ */ T(le, { size: t.content.size }), e[0] = t.content.size, e[1] = n);
|
|
191
|
+
let r;
|
|
192
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ T(ce, {}), e[2] = r) : r = e[2];
|
|
193
|
+
let i;
|
|
194
|
+
e[3] === n ? i = e[4] : (i = /* @__PURE__ */ T(v, {
|
|
195
|
+
fallback: n,
|
|
196
|
+
children: r
|
|
197
|
+
}), e[3] = n, e[4] = i);
|
|
198
|
+
let a;
|
|
199
|
+
return e[5] !== t || e[6] !== i ? (a = /* @__PURE__ */ T(oe, {
|
|
200
|
+
popup: t,
|
|
201
|
+
children: i
|
|
202
|
+
}), e[5] = t, e[6] = i, e[7] = a) : a = e[7], a;
|
|
203
|
+
}, ue = (e) => e.content.position || "top-right", de = (e) => {
|
|
204
|
+
switch (e) {
|
|
205
|
+
case "close-press": return "close_button";
|
|
206
|
+
case "outside-press": return "outside_click";
|
|
207
|
+
case "escape-key": return "escape_key";
|
|
208
|
+
default: return "programmatic";
|
|
209
|
+
}
|
|
210
|
+
}, fe = () => {
|
|
211
|
+
let i = _(32), { popup: o, callbacks: c } = q(), { placement: l, id: u } = o, d = m(h).active_popup_id === u, f = C(!1), g, v;
|
|
212
|
+
i[0] !== c || i[1] !== d || i[2] !== o ? (g = () => {
|
|
213
|
+
d && !f.current && (f.current = !0, c?.onPopupOpen?.(o, { trigger_type: p() })), d || (f.current = !1);
|
|
214
|
+
}, v = [
|
|
215
|
+
d,
|
|
216
|
+
o,
|
|
217
|
+
c
|
|
218
|
+
], i[0] = c, i[1] = d, i[2] = o, i[3] = g, i[4] = v) : (g = i[3], v = i[4]), S(g, v);
|
|
219
|
+
let y = Y(), b, x, D, k, A, j, M, N;
|
|
220
|
+
if (i[5] !== y || i[6] !== d || i[7] !== l || i[8] !== o) {
|
|
221
|
+
let c = ue(o), u = l === "popup", f = l === "slide_in";
|
|
222
|
+
x = a, A = d, i[17] === y ? j = i[18] : (j = (e, t) => !e && y(de(t?.reason)), i[17] = y, i[18] = j), M = u, N = !u, b = n, i[19] === u ? D = i[20] : (D = u && /* @__PURE__ */ T(s, {}), i[19] = u, i[20] = D), k = u ? /* @__PURE__ */ T(t, {
|
|
223
|
+
className: H,
|
|
224
|
+
children: /* @__PURE__ */ E(e.Popup, {
|
|
225
|
+
className: B({ placement: l }),
|
|
226
|
+
children: [/* @__PURE__ */ T(r, {
|
|
227
|
+
variant: "ghost",
|
|
228
|
+
size: "icon-xs",
|
|
229
|
+
className: W,
|
|
230
|
+
"aria-label": "Close popup",
|
|
231
|
+
children: /* @__PURE__ */ T(O, { size: 16 })
|
|
232
|
+
}), /* @__PURE__ */ T($, {})]
|
|
233
|
+
})
|
|
234
|
+
}) : /* @__PURE__ */ E(e.Popup, {
|
|
235
|
+
className: w(B({
|
|
236
|
+
placement: l,
|
|
237
|
+
position: c
|
|
238
|
+
}), f && "_1gklkndd"),
|
|
239
|
+
children: [/* @__PURE__ */ T(r, {
|
|
240
|
+
variant: "ghost",
|
|
241
|
+
size: "icon-xs",
|
|
242
|
+
className: W,
|
|
243
|
+
"aria-label": "Close popup",
|
|
244
|
+
children: /* @__PURE__ */ T(O, { size: 16 })
|
|
245
|
+
}), /* @__PURE__ */ T($, {})]
|
|
246
|
+
}), i[5] = y, i[6] = d, i[7] = l, i[8] = o, i[9] = b, i[10] = x, i[11] = D, i[12] = k, i[13] = A, i[14] = j, i[15] = M, i[16] = N;
|
|
247
|
+
} else b = i[9], x = i[10], D = i[11], k = i[12], A = i[13], j = i[14], M = i[15], N = i[16];
|
|
248
|
+
let P;
|
|
249
|
+
i[21] !== b || i[22] !== D || i[23] !== k ? (P = /* @__PURE__ */ E(b, { children: [D, k] }), i[21] = b, i[22] = D, i[23] = k, i[24] = P) : P = i[24];
|
|
250
|
+
let F;
|
|
251
|
+
return i[25] !== x || i[26] !== A || i[27] !== j || i[28] !== M || i[29] !== N || i[30] !== P ? (F = /* @__PURE__ */ T(x, {
|
|
252
|
+
open: A,
|
|
253
|
+
onOpenChange: j,
|
|
254
|
+
modal: M,
|
|
255
|
+
disablePointerDismissal: N,
|
|
256
|
+
children: P
|
|
257
|
+
}), i[25] = x, i[26] = A, i[27] = j, i[28] = M, i[29] = N, i[30] = P, i[31] = F) : F = i[31], F;
|
|
258
|
+
};
|
|
259
|
+
//#endregion
|
|
260
|
+
export { Q as a, fe as c, ne as i, re as l, te as n, U as o, q as r, se as s, K as t, z as u };
|