@levo-so/site-runtime 0.3.18 → 0.3.19
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/CollectionField-C-6a1ud4.js +270 -0
- package/DateTimeWidget-U3lD0q1q.js +255 -0
- package/{Dialog-D-vRkU9N.js → Dialog-dT7y641z.js} +1 -1
- package/{KBChatWidget-BMuZ-VI3.js → KBChatWidget-GRi6sLpp.js} +222 -222
- package/{LevoProvider-BkbKrvrI.js → LevoProvider-Bsjkcwc8.js} +8 -8
- package/PhoneWidget-DQQa4bL6.js +99 -0
- package/{Popover-Cr0-X_ch.js → Popover-C29yJ7rz.js} +1 -1
- package/{PopupBody-BI-MJqmd-a-l3CaKZ.js → PopupBody-BI-MJqmd-DgTQEzda.js} +23 -23
- package/{PopupRenderer-D66Gx63H-DpcNpbtU.js → PopupRenderer-D66Gx63H-Cd9xJv33.js} +47 -47
- package/{RichTextWidget-C1QECDcg.js → RichTextWidget-DfakML79.js} +127 -127
- package/{RteThemeProvider-CMbSaFRQ.js → RteThemeProvider-BQmfSXSl.js} +1 -1
- package/{ThemeProvider-DlFehjh1.js → ThemeProvider-DutrjSTF.js} +30 -30
- package/{Tooltip-BKQ5rIDh.js → Tooltip-CQB0LyxK.js} +1 -1
- package/{VerifyButton-D0cj9Z5Q.js → VerifyButton-BUT70lgz.js} +38 -38
- package/blog-content.js +67 -67
- package/{dist-_lwl0kZw.js → dist-6AIgW_iB.js} +10 -10
- package/{dist-IxiGbP-3.js → dist-CEdznbFW.js} +1139 -1254
- package/index.d.ts +2 -6
- package/index.js +407 -411
- package/{kbChat-DtZ4vuCZ.js → kbChat-a2dXSeRc.js} +26 -26
- package/package.json +3 -3
- package/popups.js +1 -1
- package/{usePopupRedirect-CAAdcpaW-BDa44PXN.js → usePopupRedirect-CAAdcpaW-Ddjyf4KK.js} +14 -14
- package/CollectionField-DCAXOmBN.js +0 -270
- package/DateTimeWidget-I0LvR-tO.js +0 -255
- package/PhoneWidget-DPECohGT.js +0 -99
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { C as e, a as t, c as n, f as r, g as i, h as a, l as o, m as s, n as c, o as l, p as u, r as d, t as f, u as p } from "./pillChrome-CEpWGNZB.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
4
|
+
import { useEffect as g, useRef as _, useState as v } from "react";
|
|
5
5
|
import { ArrowUp as y, Sparkles as b } from "lucide-react";
|
|
6
6
|
//#region ../../libraries/ai-chat/src/useActiveAgent.ts
|
|
7
7
|
var x = (t) => e("active_agent", t), S = (e) => {
|
|
@@ -21,16 +21,16 @@ var x = (t) => e("active_agent", t), S = (e) => {
|
|
|
21
21
|
t === null ? window.sessionStorage.removeItem(n) : window.sessionStorage.setItem(n, JSON.stringify(t));
|
|
22
22
|
} catch {}
|
|
23
23
|
}, w = ({ url: e, workspaceId: t, headers: n, path: r }) => {
|
|
24
|
-
let [i, a] =
|
|
25
|
-
|
|
24
|
+
let [i, a] = v({ status: "loading" });
|
|
25
|
+
g(() => {
|
|
26
26
|
let e = S(t);
|
|
27
27
|
a(e ? {
|
|
28
28
|
status: "ready",
|
|
29
29
|
agent: e
|
|
30
30
|
} : (e) => e.status === "ready" ? { status: "loading" } : e);
|
|
31
31
|
}, [t]);
|
|
32
|
-
let o =
|
|
33
|
-
return o.current = n,
|
|
32
|
+
let o = _(n);
|
|
33
|
+
return o.current = n, g(() => {
|
|
34
34
|
if (!t || !e) return;
|
|
35
35
|
let n = r ? `${e}${e.includes("?") ? "&" : "?"}path=${encodeURIComponent(r)}` : e, i = new AbortController();
|
|
36
36
|
return (async () => {
|
|
@@ -64,13 +64,13 @@ var x = (t) => e("active_agent", t), S = (e) => {
|
|
|
64
64
|
e,
|
|
65
65
|
r
|
|
66
66
|
]), i;
|
|
67
|
-
}, T = (...e) => e.filter(Boolean).join(" "), E = () => import("./KBChatWidget-
|
|
68
|
-
let [t, n] =
|
|
69
|
-
return t ? /* @__PURE__ */
|
|
67
|
+
}, T = (...e) => e.filter(Boolean).join(" "), E = () => import("./KBChatWidget-GRi6sLpp.js"), D = (e) => {
|
|
68
|
+
let [t, n] = v(null), [r, i] = v(!1), [a, o] = v("");
|
|
69
|
+
return t ? /* @__PURE__ */ m(t, {
|
|
70
70
|
initialOpen: !0,
|
|
71
71
|
initialDraft: a,
|
|
72
72
|
...e
|
|
73
|
-
}) : /* @__PURE__ */
|
|
73
|
+
}) : /* @__PURE__ */ m(k, {
|
|
74
74
|
siteName: e.siteName,
|
|
75
75
|
draft: a,
|
|
76
76
|
loading: r,
|
|
@@ -84,31 +84,31 @@ var x = (t) => e("active_agent", t), S = (e) => {
|
|
|
84
84
|
E().catch(() => {});
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
-
}, O = () => /* @__PURE__ */
|
|
87
|
+
}, O = () => /* @__PURE__ */ m("span", {
|
|
88
88
|
"aria-hidden": !0,
|
|
89
89
|
className: "h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
90
|
-
}), k = ({ siteName: e, draft: i, loading:
|
|
91
|
-
let w =
|
|
92
|
-
return /* @__PURE__ */
|
|
90
|
+
}), k = ({ siteName: e, draft: i, loading: g, onDraftChange: x, onActivate: S, onPrefetch: C }) => {
|
|
91
|
+
let w = _(null), E = _(null), D = a(e), [k, A] = v(!1);
|
|
92
|
+
return /* @__PURE__ */ m("div", {
|
|
93
93
|
onPointerEnter: C,
|
|
94
94
|
className: T("ai-chat-launcher fixed bottom-8 left-1/2 z-[60] -translate-x-1/2", u),
|
|
95
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ m("div", {
|
|
96
96
|
className: T(c, n, "ai-chat-intro-morph"),
|
|
97
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ h("div", {
|
|
98
98
|
ref: E,
|
|
99
99
|
className: T(p, k && "ai-chat-pill-surface--stacked"),
|
|
100
100
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ m("button", {
|
|
102
102
|
type: "button",
|
|
103
103
|
onClick: S,
|
|
104
104
|
onFocus: C,
|
|
105
105
|
"aria-label": "Open AI chat",
|
|
106
106
|
className: o,
|
|
107
|
-
children:
|
|
107
|
+
children: g ? /* @__PURE__ */ m(O, {}) : /* @__PURE__ */ m(b, { className: "h-5 w-5" })
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ h("div", {
|
|
110
110
|
className: d,
|
|
111
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ m("textarea", {
|
|
112
112
|
ref: w,
|
|
113
113
|
rows: 1,
|
|
114
114
|
autoComplete: "off",
|
|
@@ -123,21 +123,21 @@ var x = (t) => e("active_agent", t), S = (e) => {
|
|
|
123
123
|
x(t.value), E.current && A(s(E.current, t));
|
|
124
124
|
},
|
|
125
125
|
className: r
|
|
126
|
-
}), !i && /* @__PURE__ */
|
|
126
|
+
}), !i && /* @__PURE__ */ m("span", {
|
|
127
127
|
className: T("ai-chat-pill-label pointer-events-none absolute inset-y-0 left-0 flex max-w-full items-center truncate bg-clip-text font-semibold text-[15px] text-transparent", "ai-chat-intro-label"),
|
|
128
128
|
"aria-hidden": !0,
|
|
129
129
|
children: D
|
|
130
130
|
})]
|
|
131
131
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ m("div", {
|
|
133
133
|
className: f,
|
|
134
|
-
children: /* @__PURE__ */
|
|
134
|
+
children: /* @__PURE__ */ m("button", {
|
|
135
135
|
type: "button",
|
|
136
136
|
onClick: S,
|
|
137
137
|
"aria-label": "Open AI chat",
|
|
138
138
|
className: t,
|
|
139
139
|
style: l,
|
|
140
|
-
children:
|
|
140
|
+
children: g ? /* @__PURE__ */ m(O, {}) : /* @__PURE__ */ m(y, { className: "h-5 w-5 stroke-[2.5px]" })
|
|
141
141
|
})
|
|
142
142
|
})
|
|
143
143
|
]
|
|
@@ -154,9 +154,9 @@ var x = (t) => e("active_agent", t), S = (e) => {
|
|
|
154
154
|
} : i(o),
|
|
155
155
|
path: l
|
|
156
156
|
});
|
|
157
|
-
return u.status === "ready" ? /* @__PURE__ */
|
|
157
|
+
return u.status === "ready" ? /* @__PURE__ */ m("div", {
|
|
158
158
|
"data-ai-chat-root": !0,
|
|
159
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ m(D, {
|
|
160
160
|
workspaceId: e,
|
|
161
161
|
siteName: t,
|
|
162
162
|
siteLogo: n,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levo-so/site-runtime",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.19",
|
|
4
4
|
"description": "Runtime for Levo Studio v3 sites — the editor preview inspector, page head metadata, and the Levo data client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@assistant-ui/store": "0.3.13",
|
|
83
83
|
"@assistant-ui/tap": "0.9.17",
|
|
84
84
|
"remark-gfm": "4.0.1",
|
|
85
|
-
"@levo-so/core": "0.3.
|
|
86
|
-
"@levo-so/insights": "0.3.
|
|
85
|
+
"@levo-so/core": "0.3.19",
|
|
86
|
+
"@levo-so/insights": "0.3.19",
|
|
87
87
|
"@stripe/react-stripe-js": "3.1.1",
|
|
88
88
|
"@stripe/stripe-js": "5.5.0",
|
|
89
89
|
"react-razorpay": "3.0.1"
|
package/popups.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as e, f as t, r as n, s as r } from "./popupState-JmpeKzgM-D_77LiAa.js";
|
|
2
2
|
import { c as i } from "react/compiler-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
import { createRuntimeFn as o } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
5
|
+
import { createContext as s, useContext as c } from "react";
|
|
6
6
|
//#region ../../libraries/popups/dist/rolldown-runtime-CAFD8bLK.js
|
|
7
7
|
var l = Object.defineProperty, u = (e, t) => {
|
|
8
8
|
let n = {};
|
|
@@ -11,7 +11,7 @@ var l = Object.defineProperty, u = (e, t) => {
|
|
|
11
11
|
enumerable: !0
|
|
12
12
|
});
|
|
13
13
|
return t || l(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
14
|
-
}, d =
|
|
14
|
+
}, d = o({
|
|
15
15
|
defaultClassName: "_1gklknd4",
|
|
16
16
|
variantClassNames: {
|
|
17
17
|
placement: {
|
|
@@ -27,7 +27,7 @@ var l = Object.defineProperty, u = (e, t) => {
|
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: { placement: "popup" },
|
|
29
29
|
compoundVariants: []
|
|
30
|
-
}), f = "_1gklkndb", p = "_1gklkndc", m =
|
|
30
|
+
}), f = "_1gklkndb", p = "_1gklkndc", m = o({
|
|
31
31
|
defaultClassName: "_1gklknde",
|
|
32
32
|
variantClassNames: { size: {
|
|
33
33
|
small: "_1gklkndf",
|
|
@@ -37,24 +37,24 @@ var l = Object.defineProperty, u = (e, t) => {
|
|
|
37
37
|
} },
|
|
38
38
|
defaultVariants: { size: "medium" },
|
|
39
39
|
compoundVariants: []
|
|
40
|
-
}), h = "_1gklkndn", g =
|
|
41
|
-
let t = i(8), { popup: n, callbacks: r, client:
|
|
42
|
-
t[0] !== r || t[1] !==
|
|
40
|
+
}), h = "_1gklkndn", g = s(null), _ = (e) => {
|
|
41
|
+
let t = i(8), { popup: n, callbacks: r, client: o, preview: s, children: c } = e, l;
|
|
42
|
+
t[0] !== r || t[1] !== o || t[2] !== n || t[3] !== s ? (l = {
|
|
43
43
|
popup: n,
|
|
44
44
|
callbacks: r,
|
|
45
|
-
client:
|
|
46
|
-
preview:
|
|
47
|
-
}, t[0] = r, t[1] =
|
|
45
|
+
client: o,
|
|
46
|
+
preview: s
|
|
47
|
+
}, t[0] = r, t[1] = o, t[2] = n, t[3] = s, t[4] = l) : l = t[4];
|
|
48
48
|
let u;
|
|
49
|
-
return t[5] !== c || t[6] !== l ? (u = /* @__PURE__ */
|
|
49
|
+
return t[5] !== c || t[6] !== l ? (u = /* @__PURE__ */ a(g.Provider, {
|
|
50
50
|
value: l,
|
|
51
51
|
children: c
|
|
52
52
|
}), t[5] = c, t[6] = l, t[7] = u) : u = t[7], u;
|
|
53
53
|
}, v = () => {
|
|
54
|
-
let e =
|
|
54
|
+
let e = c(g);
|
|
55
55
|
if (!e) throw Error("usePopupContext must be used within a PopupProvider");
|
|
56
56
|
return e;
|
|
57
|
-
}, y = () =>
|
|
57
|
+
}, y = () => c(g), b = () => {
|
|
58
58
|
let a = i(2), o = y(), s;
|
|
59
59
|
return a[0] === o ? s = a[1] : (s = (i) => {
|
|
60
60
|
let a = i === void 0 ? "programmatic" : i;
|
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { FieldInterfaces as e } from "@levo-so/core";
|
|
2
|
-
import { c as t } from "react/compiler-runtime";
|
|
3
|
-
import { isValidPhoneNumber as n } from "react-phone-number-input";
|
|
4
|
-
import * as r from "yup";
|
|
5
|
-
import i, { clsx as a } from "clsx";
|
|
6
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
-
import { createRuntimeFn as c } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
8
|
-
import { Separator as l } from "@base-ui/react/separator";
|
|
9
|
-
//#region ../../libraries/react-collection/dist/components/collectionField/CollectionField.cssm.js
|
|
10
|
-
var u = "_1ompjs11", d = "_1d7f2b80", f = (e) => {
|
|
11
|
-
let n = t(8), r, a;
|
|
12
|
-
n[0] === e ? (r = n[1], a = n[2]) : ({className: r, ...a} = e, n[0] = e, n[1] = r, n[2] = a);
|
|
13
|
-
let s;
|
|
14
|
-
n[3] === r ? s = n[4] : (s = i(d, r), n[3] = r, n[4] = s);
|
|
15
|
-
let c;
|
|
16
|
-
return n[5] !== a || n[6] !== s ? (c = /* @__PURE__ */ o("label", {
|
|
17
|
-
"data-slot": "label",
|
|
18
|
-
className: s,
|
|
19
|
-
...a
|
|
20
|
-
}), n[5] = a, n[6] = s, n[7] = c) : c = n[7], c;
|
|
21
|
-
};
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region ../../libraries/react-collection/dist/components/collectionLabel/CollectionLabel.js
|
|
24
|
-
function p(e) {
|
|
25
|
-
let n = t(6), { label: r, isRequired: i, htmlFor: a } = e;
|
|
26
|
-
if (!r) return null;
|
|
27
|
-
let c;
|
|
28
|
-
n[0] === i ? c = n[1] : (c = i && /* @__PURE__ */ o("span", {
|
|
29
|
-
className: "_1ompjs10",
|
|
30
|
-
children: "*"
|
|
31
|
-
}), n[0] = i, n[1] = c);
|
|
32
|
-
let l;
|
|
33
|
-
return n[2] !== a || n[3] !== r || n[4] !== c ? (l = /* @__PURE__ */ s(f, {
|
|
34
|
-
htmlFor: a,
|
|
35
|
-
className: u,
|
|
36
|
-
children: [r, c]
|
|
37
|
-
}), n[2] = a, n[3] = r, n[4] = c, n[5] = l) : l = n[5], l;
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region ../../libraries/react-collection/dist/utils/getFieldValidations.js
|
|
41
|
-
var m = (t, i) => {
|
|
42
|
-
let a = (t?.label || t?.key || "")?.replace(/_/g, " ");
|
|
43
|
-
if (a?.endsWith("Id") && (a = a?.replace("Id", "")), a.includes(".")) {
|
|
44
|
-
let [e] = a.split(".");
|
|
45
|
-
e && (a = e);
|
|
46
|
-
}
|
|
47
|
-
let o = (e) => {
|
|
48
|
-
let n = e;
|
|
49
|
-
return t.max !== void 0 && t.max !== null && t.max !== "" && (n = n.max(Number(t.max), `The ${a} value is too large (max ${t.max})`)), t.min !== void 0 && t.min !== null && t.min !== "" && (n = n.min(Number(t.min), `The ${a} value is too small (min ${t.min})`)), n;
|
|
50
|
-
}, s;
|
|
51
|
-
switch (t.field_interface) {
|
|
52
|
-
case e.NumberWidget:
|
|
53
|
-
s = o(r.number());
|
|
54
|
-
break;
|
|
55
|
-
case e.ArrayWidget:
|
|
56
|
-
s = o(r.array().typeError("The field must be an array"));
|
|
57
|
-
break;
|
|
58
|
-
case e.RecordWidget:
|
|
59
|
-
s = r.object();
|
|
60
|
-
break;
|
|
61
|
-
case e.EmailWidget:
|
|
62
|
-
s = o(r.string().email("The email address is not valid"));
|
|
63
|
-
break;
|
|
64
|
-
case e.PhoneWidget:
|
|
65
|
-
s = o(r.string().test("phone", "The phone number has incorrect format", (e) => {
|
|
66
|
-
if (e) try {
|
|
67
|
-
return n(e);
|
|
68
|
-
} catch {
|
|
69
|
-
return !1;
|
|
70
|
-
}
|
|
71
|
-
return !0;
|
|
72
|
-
}));
|
|
73
|
-
break;
|
|
74
|
-
case e.URLWidget:
|
|
75
|
-
s = o(r.string().matches(/^(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+(?:\.[a-zA-Z]{2,})+(?:\/[^\s?#]*)?(?:\?[^\s]*)?$/, "The URL is not valid"));
|
|
76
|
-
break;
|
|
77
|
-
case e.ImageUploadWidget:
|
|
78
|
-
case e.FileUploadWidget:
|
|
79
|
-
case e.GeocoderWidget:
|
|
80
|
-
s = r.object();
|
|
81
|
-
break;
|
|
82
|
-
case e.MultiImageUploadWidget:
|
|
83
|
-
case e.MultiFileUploadWidget:
|
|
84
|
-
case e.MultiGeocoderWidget:
|
|
85
|
-
s = r.array().of(r.object());
|
|
86
|
-
break;
|
|
87
|
-
case e.JSONWidget:
|
|
88
|
-
case e.DropdownWidget:
|
|
89
|
-
s = r.string();
|
|
90
|
-
break;
|
|
91
|
-
case e.MultiTextWidget:
|
|
92
|
-
case e.MultiDropdownWidget:
|
|
93
|
-
case e.CheckboxWidget:
|
|
94
|
-
s = r.array().of(r.string());
|
|
95
|
-
break;
|
|
96
|
-
case e.ToggleCheckboxWidget:
|
|
97
|
-
s = r.boolean();
|
|
98
|
-
break;
|
|
99
|
-
case e.CollectionWidget:
|
|
100
|
-
s = t.options.current_have_many_connected ? r.array() : r.object();
|
|
101
|
-
break;
|
|
102
|
-
default:
|
|
103
|
-
s = o(r.string());
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
if (t.options?.validationsPresets && Array.isArray(t.options.validationsPresets)) {
|
|
107
|
-
let n = t.options.validationsPresets;
|
|
108
|
-
(t.field_interface === e.TextWidget || t.field_interface === e.TextareaWidget) && (n.includes("exclude_special_chars") && (s = s.matches(/^[a-zA-Z0-9\s]*$/, "Special characters are not allowed")), n.includes("exclude_numbers") && (s = s.matches(/^[^0-9]*$/, "Numbers are not allowed")));
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
required: {
|
|
112
|
-
value: !!t?.required,
|
|
113
|
-
message: `The ${a} field is required`
|
|
114
|
-
},
|
|
115
|
-
validate: (e) => {
|
|
116
|
-
if (t?.options?.disableValidation || e === "" || e == null) return !0;
|
|
117
|
-
try {
|
|
118
|
-
return s.validateSync(e), i ? i(e) : !0;
|
|
119
|
-
} catch (e) {
|
|
120
|
-
return e instanceof r.ValidationError ? e.message : !0;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}, h = c({
|
|
125
|
-
defaultClassName: "_11sljvf3",
|
|
126
|
-
variantClassNames: { orientation: {
|
|
127
|
-
vertical: "_11sljvf4",
|
|
128
|
-
horizontal: "_11sljvf5"
|
|
129
|
-
} },
|
|
130
|
-
defaultVariants: { orientation: "vertical" },
|
|
131
|
-
compoundVariants: []
|
|
132
|
-
}), g = "_11sljvf9", _ = "_11sljvfc", v = "_11sljvfd", y = c({
|
|
133
|
-
defaultClassName: "d292um0",
|
|
134
|
-
variantClassNames: { orientation: {
|
|
135
|
-
horizontal: "d292um1",
|
|
136
|
-
vertical: "d292um2"
|
|
137
|
-
} },
|
|
138
|
-
defaultVariants: {},
|
|
139
|
-
compoundVariants: []
|
|
140
|
-
});
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region ../../libraries/levocn/dist/ui/separator/Separator.js
|
|
143
|
-
function b(e) {
|
|
144
|
-
let n = t(11), r, a, s;
|
|
145
|
-
n[0] === e ? (r = n[1], a = n[2], s = n[3]) : ({className: r, orientation: s, ...a} = e, n[0] = e, n[1] = r, n[2] = a, n[3] = s);
|
|
146
|
-
let c = s === void 0 ? "horizontal" : s, u;
|
|
147
|
-
n[4] !== r || n[5] !== c ? (u = i(y({ orientation: c }), r), n[4] = r, n[5] = c, n[6] = u) : u = n[6];
|
|
148
|
-
let d;
|
|
149
|
-
return n[7] !== c || n[8] !== a || n[9] !== u ? (d = /* @__PURE__ */ o(l, {
|
|
150
|
-
"data-slot": "separator",
|
|
151
|
-
orientation: c,
|
|
152
|
-
className: u,
|
|
153
|
-
...a
|
|
154
|
-
}), n[7] = c, n[8] = a, n[9] = u, n[10] = d) : d = n[10], d;
|
|
155
|
-
}
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region ../../libraries/levocn/dist/ui/field/Field.js
|
|
158
|
-
function x(e) {
|
|
159
|
-
let n = t(11), r, i, s;
|
|
160
|
-
n[0] === e ? (r = n[1], i = n[2], s = n[3]) : ({className: r, orientation: s, ...i} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = s);
|
|
161
|
-
let c = s === void 0 ? "vertical" : s, l;
|
|
162
|
-
n[4] !== r || n[5] !== c ? (l = a(h({ orientation: c }), r), n[4] = r, n[5] = c, n[6] = l) : l = n[6];
|
|
163
|
-
let u;
|
|
164
|
-
return n[7] !== c || n[8] !== i || n[9] !== l ? (u = /* @__PURE__ */ o("div", {
|
|
165
|
-
role: "group",
|
|
166
|
-
"data-slot": "field",
|
|
167
|
-
"data-orientation": c,
|
|
168
|
-
className: l,
|
|
169
|
-
...i
|
|
170
|
-
}), n[7] = c, n[8] = i, n[9] = l, n[10] = u) : u = n[10], u;
|
|
171
|
-
}
|
|
172
|
-
function S(e) {
|
|
173
|
-
let n = t(8), r, i;
|
|
174
|
-
n[0] === e ? (r = n[1], i = n[2]) : ({className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
|
|
175
|
-
let s;
|
|
176
|
-
n[3] === r ? s = n[4] : (s = a(g, r), n[3] = r, n[4] = s);
|
|
177
|
-
let c;
|
|
178
|
-
return n[5] !== i || n[6] !== s ? (c = /* @__PURE__ */ o("p", {
|
|
179
|
-
"data-slot": "field-description",
|
|
180
|
-
className: s,
|
|
181
|
-
...i
|
|
182
|
-
}), n[5] = i, n[6] = s, n[7] = c) : c = n[7], c;
|
|
183
|
-
}
|
|
184
|
-
function C(e) {
|
|
185
|
-
let n = t(15), r, i, s, c;
|
|
186
|
-
n[0] === e ? (r = n[1], i = n[2], s = n[3], c = n[4]) : ({className: i, children: r, errors: s, ...c} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = s, n[4] = c);
|
|
187
|
-
let l;
|
|
188
|
-
bb0: {
|
|
189
|
-
if (r) {
|
|
190
|
-
l = r;
|
|
191
|
-
break bb0;
|
|
192
|
-
}
|
|
193
|
-
if (!s?.length) {
|
|
194
|
-
l = null;
|
|
195
|
-
break bb0;
|
|
196
|
-
}
|
|
197
|
-
let e;
|
|
198
|
-
n[5] === s ? e = n[6] : (e = [...new Map(s.map(T)).values()], n[5] = s, n[6] = e);
|
|
199
|
-
let t = e;
|
|
200
|
-
if (t.length === 1) {
|
|
201
|
-
l = t[0]?.message;
|
|
202
|
-
break bb0;
|
|
203
|
-
}
|
|
204
|
-
let i;
|
|
205
|
-
n[7] === t ? i = n[8] : (i = /* @__PURE__ */ o("ul", {
|
|
206
|
-
className: v,
|
|
207
|
-
children: t.map(w)
|
|
208
|
-
}), n[7] = t, n[8] = i), l = i;
|
|
209
|
-
}
|
|
210
|
-
let u = l;
|
|
211
|
-
if (!u) return null;
|
|
212
|
-
let d;
|
|
213
|
-
n[9] === i ? d = n[10] : (d = a(_, i), n[9] = i, n[10] = d);
|
|
214
|
-
let f;
|
|
215
|
-
return n[11] !== u || n[12] !== c || n[13] !== d ? (f = /* @__PURE__ */ o("div", {
|
|
216
|
-
role: "alert",
|
|
217
|
-
"data-slot": "field-error",
|
|
218
|
-
className: d,
|
|
219
|
-
...c,
|
|
220
|
-
children: u
|
|
221
|
-
}), n[11] = u, n[12] = c, n[13] = d, n[14] = f) : f = n[14], f;
|
|
222
|
-
}
|
|
223
|
-
function w(e, t) {
|
|
224
|
-
return e?.message && /* @__PURE__ */ o("li", { children: e.message }, t);
|
|
225
|
-
}
|
|
226
|
-
function T(e) {
|
|
227
|
-
return [e?.message, e];
|
|
228
|
-
}
|
|
229
|
-
//#endregion
|
|
230
|
-
//#region ../../libraries/react-collection/dist/components/collectionField/CollectionField.js
|
|
231
|
-
function E(e) {
|
|
232
|
-
let n = t(21), { label: r, error: a, helperText: c, topHelperText: l, isRequired: u, readOnly: d, htmlFor: f, className: m, children: h, ref: g } = e, _ = d && "_1ompjs14", v;
|
|
233
|
-
n[0] !== m || n[1] !== _ ? (v = i(_, m), n[0] = m, n[1] = _, n[2] = v) : v = n[2];
|
|
234
|
-
let y;
|
|
235
|
-
n[3] !== f || n[4] !== u || n[5] !== r ? (y = /* @__PURE__ */ o(p, {
|
|
236
|
-
label: r,
|
|
237
|
-
isRequired: u,
|
|
238
|
-
htmlFor: f
|
|
239
|
-
}), n[3] = f, n[4] = u, n[5] = r, n[6] = y) : y = n[6];
|
|
240
|
-
let b;
|
|
241
|
-
n[7] === l ? b = n[8] : (b = !!l && /* @__PURE__ */ o(S, {
|
|
242
|
-
className: "_1ompjs12",
|
|
243
|
-
children: l
|
|
244
|
-
}), n[7] = l, n[8] = b);
|
|
245
|
-
let w;
|
|
246
|
-
n[9] === a ? w = n[10] : (w = !!a && /* @__PURE__ */ o(C, {
|
|
247
|
-
className: "_1ompjs13",
|
|
248
|
-
children: a
|
|
249
|
-
}), n[9] = a, n[10] = w);
|
|
250
|
-
let T;
|
|
251
|
-
n[11] === c ? T = n[12] : (T = !!c && /* @__PURE__ */ o(S, {
|
|
252
|
-
className: "_1ompjs12",
|
|
253
|
-
children: c
|
|
254
|
-
}), n[11] = c, n[12] = T);
|
|
255
|
-
let E;
|
|
256
|
-
return n[13] !== h || n[14] !== g || n[15] !== v || n[16] !== y || n[17] !== b || n[18] !== w || n[19] !== T ? (E = /* @__PURE__ */ s(x, {
|
|
257
|
-
ref: g,
|
|
258
|
-
orientation: "vertical",
|
|
259
|
-
className: v,
|
|
260
|
-
children: [
|
|
261
|
-
y,
|
|
262
|
-
b,
|
|
263
|
-
h,
|
|
264
|
-
w,
|
|
265
|
-
T
|
|
266
|
-
]
|
|
267
|
-
}), n[13] = h, n[14] = g, n[15] = v, n[16] = y, n[17] = b, n[18] = w, n[19] = T, n[20] = E) : E = n[20], E;
|
|
268
|
-
}
|
|
269
|
-
//#endregion
|
|
270
|
-
export { f as a, p as i, b as n, m as r, E as t };
|