@chaibuilder/sdk 2.5.8 → 2.6.0
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/dist/{code-editor-0HrsuGAE.js → code-editor-CAnkmeVK.js} +1 -1
- package/dist/{code-editor-67qfXwGU.cjs → code-editor-D5TOcelm.cjs} +1 -1
- package/dist/core.cjs +4 -4
- package/dist/core.d.ts +0 -2
- package/dist/core.js +743 -722
- package/dist/{css-import-modal-CcUf6F6T.js → css-import-modal-Ds-qmte_.js} +99 -90
- package/dist/{css-import-modal-CdOK43Be.cjs → css-import-modal-w1WZrKpm.cjs} +2 -2
- package/dist/{toggle-BgZfmuec.cjs → toggle-CCqv4Cah.cjs} +1 -1
- package/dist/{toggle-CyXEVUOu.js → toggle-DXTcRcvD.js} +60 -60
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +123 -119
- package/package.json +2 -2
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { a1 as
|
|
4
|
-
import * as
|
|
1
|
+
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import { a1 as V, a3 as T, a6 as N, a9 as R, a4 as E, v as y, au as I, b1 as D, a5 as A } from "./toggle-DXTcRcvD.js";
|
|
4
|
+
import * as b from "culori";
|
|
5
5
|
import { getAllRegisteredFonts as P } from "@chaibuilder/runtime";
|
|
6
6
|
import { useTranslation as H } from "react-i18next";
|
|
7
|
-
const
|
|
7
|
+
const d = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", L = (o) => `hsl(${d(o.h)} ${d(o.s * 100)}% ${d(o.l * 100)}%)`, M = (o, e = "hsl", s = "4") => {
|
|
8
8
|
try {
|
|
9
|
-
const r =
|
|
9
|
+
const r = b.parse(o);
|
|
10
10
|
if (!r) throw new Error("Invalid color input");
|
|
11
11
|
switch (e) {
|
|
12
12
|
case "hsl": {
|
|
13
|
-
const t =
|
|
14
|
-
return s === "4" ? L(t) : `${
|
|
13
|
+
const t = b.converter("hsl")(r);
|
|
14
|
+
return s === "4" ? L(t) : `${d(t.h)} ${d(t.s * 100)}% ${d(t.l * 100)}%`;
|
|
15
15
|
}
|
|
16
16
|
case "rgb":
|
|
17
|
-
return
|
|
17
|
+
return b.formatRgb(r);
|
|
18
18
|
case "oklch": {
|
|
19
|
-
const t =
|
|
20
|
-
return `oklch(${
|
|
19
|
+
const t = b.converter("oklch")(r);
|
|
20
|
+
return `oklch(${d(t.l)} ${d(t.c)} ${d(t.h)})`;
|
|
21
21
|
}
|
|
22
22
|
case "hex":
|
|
23
|
-
return
|
|
23
|
+
return b.formatHex(r);
|
|
24
24
|
default:
|
|
25
25
|
return o;
|
|
26
26
|
}
|
|
27
27
|
} catch (r) {
|
|
28
28
|
return console.error(`Failed to convert color: ${o}`, r), o;
|
|
29
29
|
}
|
|
30
|
-
}, S = (o) => M(o, "hex"),
|
|
30
|
+
}, S = (o) => M(o, "hex"), z = (o) => {
|
|
31
31
|
const e = {
|
|
32
32
|
fontFamily: {
|
|
33
33
|
heading: "",
|
|
@@ -37,16 +37,16 @@ const f = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", L = (o) => `hsl(${f(o
|
|
|
37
37
|
colors: {}
|
|
38
38
|
};
|
|
39
39
|
try {
|
|
40
|
-
const s =
|
|
40
|
+
const s = w(o);
|
|
41
41
|
if (!s.isValid)
|
|
42
|
-
return console.warn("CSS validation failed:", s.error),
|
|
43
|
-
const r = v(o, ":root"), t = v(o, ".dark"),
|
|
42
|
+
return console.warn("CSS validation failed:", s.error), $();
|
|
43
|
+
const r = v(o, ":root"), t = v(o, ".dark"), i = u(r, "--font-sans") || u(r, "--font-family") || u(r, "--font-heading") || u(r, "--font-body"), n = B(i);
|
|
44
44
|
e.fontFamily = {
|
|
45
45
|
heading: n,
|
|
46
46
|
body: n
|
|
47
47
|
};
|
|
48
|
-
const
|
|
49
|
-
e.borderRadius =
|
|
48
|
+
const f = u(r, "--radius") || u(r, "--border-radius") || "0.5rem";
|
|
49
|
+
e.borderRadius = _(f), [
|
|
50
50
|
"background",
|
|
51
51
|
"foreground",
|
|
52
52
|
"primary",
|
|
@@ -66,27 +66,27 @@ const f = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", L = (o) => `hsl(${f(o
|
|
|
66
66
|
"card-foreground",
|
|
67
67
|
"popover",
|
|
68
68
|
"popover-foreground"
|
|
69
|
-
].forEach((
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
e.colors[
|
|
69
|
+
].forEach((l) => {
|
|
70
|
+
const p = u(r, `--${l}`), g = u(t, `--${l}`);
|
|
71
|
+
if (p || g) {
|
|
72
|
+
const c = p ? k(p) : "#000000", C = g ? k(g) : c;
|
|
73
|
+
e.colors[l] = [c, C];
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
} catch (s) {
|
|
77
|
-
return console.error("Error parsing CSS to ChaiThemeValues:", s),
|
|
77
|
+
return console.error("Error parsing CSS to ChaiThemeValues:", s), $();
|
|
78
78
|
}
|
|
79
79
|
return e;
|
|
80
80
|
}, v = (o, e) => {
|
|
81
81
|
var r, t;
|
|
82
|
-
const s = new RegExp(`${
|
|
82
|
+
const s = new RegExp(`${F(e)}\\s*{([^}]+)}`);
|
|
83
83
|
return ((t = (r = o.match(s)) == null ? void 0 : r[1]) == null ? void 0 : t.trim()) || null;
|
|
84
84
|
}, u = (o, e) => {
|
|
85
85
|
var t;
|
|
86
86
|
if (!o) return null;
|
|
87
|
-
const s = new RegExp(`${
|
|
87
|
+
const s = new RegExp(`${F(e)}\\s*:\\s*([^;]+)`), r = o.match(s);
|
|
88
88
|
return ((t = r == null ? void 0 : r[1]) == null ? void 0 : t.trim()) || null;
|
|
89
|
-
},
|
|
89
|
+
}, k = (o) => {
|
|
90
90
|
if (!o || typeof o != "string")
|
|
91
91
|
return "#000000";
|
|
92
92
|
try {
|
|
@@ -102,31 +102,31 @@ const f = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", L = (o) => `hsl(${f(o
|
|
|
102
102
|
return S(e) || "#000000";
|
|
103
103
|
const s = e.match(/^(\d+\.?\d*)\s+(\d+\.?\d*)%\s+(\d+\.?\d*)%$/);
|
|
104
104
|
if (s) {
|
|
105
|
-
const [r, t,
|
|
106
|
-
return S(
|
|
105
|
+
const [r, t, i, n] = s, f = `hsl(${t} ${i}% ${n}%)`;
|
|
106
|
+
return S(f) || "#000000";
|
|
107
107
|
}
|
|
108
108
|
if (/^[\d.]+[\s,]+[\d.]+[\s,]+[\d.]+(?:[\s,/]+[\d.]+)?$/.test(e)) {
|
|
109
109
|
const r = e.split(/[\s,]+/).filter(Boolean);
|
|
110
110
|
if (r.length >= 3) {
|
|
111
|
-
const
|
|
112
|
-
return S(
|
|
111
|
+
const i = r.some((n) => n.includes("%")) ? `hsl(${r[0]} ${r[1]} ${r[2]})` : `rgb(${r[0]}, ${r[1]}, ${r[2]})`;
|
|
112
|
+
return S(i) || "#000000";
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
return S(e) || "#000000";
|
|
116
116
|
} catch (e) {
|
|
117
117
|
return console.warn("Failed to process color:", o, e), "#000000";
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
}, B = (o) => {
|
|
120
120
|
const e = P();
|
|
121
121
|
if (!o)
|
|
122
122
|
return "ui-sans-serif, system-ui, sans-serif";
|
|
123
123
|
try {
|
|
124
|
-
const r = o.replace(/["']/g, "").trim().split(",")[0].trim(), t = e.find((
|
|
124
|
+
const r = o.replace(/["']/g, "").trim().split(",")[0].trim(), t = e.find((i) => i.family.toLowerCase() === r.toLowerCase());
|
|
125
125
|
return (t == null ? void 0 : t.family) || "ui-sans-serif, system-ui, sans-serif";
|
|
126
126
|
} catch (s) {
|
|
127
127
|
return console.warn("Error processing font family:", o, s), "ui-sans-serif, system-ui, sans-serif";
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, _ = (o) => {
|
|
130
130
|
if (!o)
|
|
131
131
|
return "8px";
|
|
132
132
|
try {
|
|
@@ -148,7 +148,7 @@ const f = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", L = (o) => `hsl(${f(o
|
|
|
148
148
|
} catch (e) {
|
|
149
149
|
return console.warn("Error converting border radius to px:", o, e), "8px";
|
|
150
150
|
}
|
|
151
|
-
},
|
|
151
|
+
}, $ = () => ({
|
|
152
152
|
fontFamily: {
|
|
153
153
|
heading: "ui-sans-serif, system-ui, sans-serif",
|
|
154
154
|
body: "ui-sans-serif, system-ui, sans-serif"
|
|
@@ -175,9 +175,9 @@ const f = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", L = (o) => `hsl(${f(o
|
|
|
175
175
|
popover: ["#ffffff", "#0f172a"],
|
|
176
176
|
"popover-foreground": ["#000000", "#f8fafc"]
|
|
177
177
|
}
|
|
178
|
-
}),
|
|
178
|
+
}), F = (o) => o.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), q = (o) => ["background", "foreground", "primary", "primary-foreground"].every(
|
|
179
179
|
(r) => o.colors[r] && Array.isArray(o.colors[r]) && o.colors[r].length >= 2
|
|
180
|
-
) && !!o.fontFamily.heading && !!o.fontFamily.body && !!o.borderRadius,
|
|
180
|
+
) && !!o.fontFamily.heading && !!o.fontFamily.body && !!o.borderRadius, w = (o) => {
|
|
181
181
|
if (!o || typeof o != "string")
|
|
182
182
|
return { isValid: !1, error: "Please enter valid CSS content" };
|
|
183
183
|
const e = o.trim();
|
|
@@ -203,7 +203,7 @@ const f = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", L = (o) => `hsl(${f(o
|
|
|
203
203
|
} catch (s) {
|
|
204
204
|
return console.error("CSS validation error:", s), { isValid: !1, error: "Failed to parse CSS. Please check your syntax." };
|
|
205
205
|
}
|
|
206
|
-
},
|
|
206
|
+
}, W = `:root {
|
|
207
207
|
--background: 0 0% 100%;
|
|
208
208
|
--foreground: oklch(0.52 0.13 144.17);
|
|
209
209
|
--primary: #3e2723;
|
|
@@ -215,82 +215,91 @@ const f = (o) => o ? o % 1 === 0 ? o : o.toFixed(4) : "0", L = (o) => `hsl(${f(o
|
|
|
215
215
|
--foreground: hsl(37.50 36.36% 95.69%);
|
|
216
216
|
--primary: rgb(46, 125, 50);
|
|
217
217
|
--primary-foreground: #ffffff;
|
|
218
|
-
}`,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
onImport: s
|
|
222
|
-
}) => {
|
|
223
|
-
const [r, t] = C.useState(""), [a, n] = C.useState(null), [d, m] = C.useState(!1), { t: i } = H(), h = async () => {
|
|
224
|
-
m(!0), n(null);
|
|
218
|
+
}`, Z = ({ open: o, onOpenChange: e, onImport: s }) => {
|
|
219
|
+
const [r, t] = x.useState(""), [i, n] = x.useState(null), [f, h] = x.useState(!1), { t: l } = H(), p = async () => {
|
|
220
|
+
h(!0), n(null);
|
|
225
221
|
try {
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
n(
|
|
222
|
+
const c = w(r);
|
|
223
|
+
if (!c.isValid) {
|
|
224
|
+
n(c.error || "Invalid CSS format"), setTimeout(() => {
|
|
229
225
|
n(null);
|
|
230
|
-
}, 5e3),
|
|
226
|
+
}, 5e3), h(!1);
|
|
231
227
|
return;
|
|
232
228
|
}
|
|
233
|
-
const
|
|
234
|
-
if (!
|
|
235
|
-
n(
|
|
229
|
+
const C = z(r);
|
|
230
|
+
if (!q(C)) {
|
|
231
|
+
n(
|
|
232
|
+
"The CSS doesn't contain enough theme information. Please ensure it includes at least background, foreground, primary, and primary-foreground colors."
|
|
233
|
+
), setTimeout(() => {
|
|
236
234
|
n(null);
|
|
237
|
-
}, 5e3),
|
|
235
|
+
}, 5e3), h(!1);
|
|
238
236
|
return;
|
|
239
237
|
}
|
|
240
|
-
s(
|
|
241
|
-
} catch (
|
|
242
|
-
console.error("Error importing CSS:",
|
|
238
|
+
s(C), t(""), n(null), e(!1);
|
|
239
|
+
} catch (c) {
|
|
240
|
+
console.error("Error importing CSS:", c), n("Failed to parse CSS. Please check your syntax and try again."), setTimeout(() => {
|
|
243
241
|
n(null);
|
|
244
242
|
}, 5e3);
|
|
245
243
|
} finally {
|
|
246
|
-
|
|
244
|
+
h(!1);
|
|
247
245
|
}
|
|
248
|
-
},
|
|
246
|
+
}, g = () => {
|
|
249
247
|
t(""), n(null), e(!1);
|
|
250
248
|
};
|
|
251
|
-
return /* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ a(V, { open: o, onOpenChange: e, children: /* @__PURE__ */ m(T, { className: "flex max-h-[80vh] max-w-2xl flex-col", children: [
|
|
250
|
+
/* @__PURE__ */ m(N, { children: [
|
|
251
|
+
/* @__PURE__ */ a(R, { children: l("Import CSS Theme") }),
|
|
252
|
+
/* @__PURE__ */ m(E, { className: "space-y-2", children: [
|
|
253
|
+
/* @__PURE__ */ a("p", { children: l(
|
|
254
|
+
"Paste your CSS variables to import a custom theme. The CSS should contain :root and .dark blocks with CSS custom properties."
|
|
255
|
+
) }),
|
|
256
|
+
/* @__PURE__ */ m("div", { className: "flex items-center", children: [
|
|
257
|
+
/* @__PURE__ */ a("p", { className: "font-bold", children: "Get theme resources:" }),
|
|
258
|
+
/* @__PURE__ */ a(y, { variant: "link", size: "sm", onClick: () => window.open("https://tweakcn.com/", "_blank"), children: "TweakCN" }),
|
|
259
|
+
/* @__PURE__ */ a(
|
|
260
|
+
y,
|
|
261
|
+
{
|
|
262
|
+
variant: "link",
|
|
263
|
+
size: "sm",
|
|
264
|
+
onClick: () => window.open("https://ui.shadcn.com/themes#themes", "_blank"),
|
|
265
|
+
children: "shadcn/ui Themes"
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ a(
|
|
269
|
+
y,
|
|
270
|
+
{
|
|
271
|
+
variant: "link",
|
|
272
|
+
size: "sm",
|
|
273
|
+
onClick: () => window.open("https://zippystarter.com/tools/shadcn-ui-theme-generator", "_blank"),
|
|
274
|
+
children: "ZippyStarter"
|
|
275
|
+
}
|
|
276
|
+
)
|
|
277
|
+
] })
|
|
278
|
+
] })
|
|
255
279
|
] }),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ m("div", { className: "flex-1 space-y-4 overflow-hidden", children: [
|
|
281
|
+
/* @__PURE__ */ m("div", { className: "space-y-2", children: [
|
|
282
|
+
/* @__PURE__ */ a(I, { htmlFor: "css-input", children: l("CSS Variables") }),
|
|
283
|
+
/* @__PURE__ */ a(
|
|
260
284
|
D,
|
|
261
285
|
{
|
|
262
286
|
id: "css-input",
|
|
263
|
-
placeholder:
|
|
287
|
+
placeholder: W,
|
|
264
288
|
value: r,
|
|
265
|
-
onChange: (
|
|
266
|
-
className: "min-h-[300px] font-mono text-sm
|
|
267
|
-
disabled:
|
|
289
|
+
onChange: (c) => t(c.target.value),
|
|
290
|
+
className: "min-h-[300px] resize-none font-mono text-sm",
|
|
291
|
+
disabled: f
|
|
268
292
|
}
|
|
269
293
|
)
|
|
270
294
|
] }),
|
|
271
|
-
|
|
295
|
+
i && /* @__PURE__ */ a("div", { className: "rounded-md border border-red-200 bg-red-50 p-3", children: /* @__PURE__ */ a("p", { className: "text-sm text-red-600", children: i }) })
|
|
272
296
|
] }),
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
|
|
276
|
-
{
|
|
277
|
-
variant: "outline",
|
|
278
|
-
onClick: p,
|
|
279
|
-
disabled: d,
|
|
280
|
-
children: i("Cancel")
|
|
281
|
-
}
|
|
282
|
-
),
|
|
283
|
-
/* @__PURE__ */ c(
|
|
284
|
-
x,
|
|
285
|
-
{
|
|
286
|
-
onClick: h,
|
|
287
|
-
disabled: !r.trim() || d,
|
|
288
|
-
children: i(d ? "Importing..." : "Import Theme")
|
|
289
|
-
}
|
|
290
|
-
)
|
|
297
|
+
/* @__PURE__ */ m(A, { className: "gap-2", children: [
|
|
298
|
+
/* @__PURE__ */ a(y, { variant: "outline", onClick: g, disabled: f, children: l("Cancel") }),
|
|
299
|
+
/* @__PURE__ */ a(y, { onClick: p, disabled: !r.trim() || f, children: l(f ? "Importing..." : "Import Theme") })
|
|
291
300
|
] })
|
|
292
301
|
] }) });
|
|
293
302
|
};
|
|
294
303
|
export {
|
|
295
|
-
|
|
304
|
+
Z as CssImportModal
|
|
296
305
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),w=require("react"),i=require("./toggle-CCqv4Cah.cjs"),T=require("culori"),V=require("@chaibuilder/runtime"),N=require("react-i18next");function $(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const S=$(w),y=$(T),f=e=>e?e%1===0?e:e.toFixed(4):"0",R=e=>`hsl(${f(e.h)} ${f(e.s*100)}% ${f(e.l*100)}%)`,E=(e,o="hsl",t="4")=>{try{const r=y.parse(e);if(!r)throw new Error("Invalid color input");switch(o){case"hsl":{const s=y.converter("hsl")(r);return t==="4"?R(s):`${f(s.h)} ${f(s.s*100)}% ${f(s.l*100)}%`}case"rgb":return y.formatRgb(r);case"oklch":{const s=y.converter("oklch")(r);return`oklch(${f(s.l)} ${f(s.c)} ${f(s.h)})`}case"hex":return y.formatHex(r);default:return e}}catch(r){return console.error(`Failed to convert color: ${e}`,r),e}},b=e=>E(e,"hex"),I=e=>{const o={fontFamily:{heading:"",body:""},borderRadius:"",colors:{}};try{const t=F(e);if(!t.isValid)return console.warn("CSS validation failed:",t.error),k();const r=C(e,":root"),s=C(e,".dark"),c=m(r,"--font-sans")||m(r,"--font-family")||m(r,"--font-heading")||m(r,"--font-body"),a=D(c);o.fontFamily={heading:a,body:a};const u=m(r,"--radius")||m(r,"--border-radius")||"0.5rem";o.borderRadius=P(u),["background","foreground","primary","primary-foreground","secondary","secondary-foreground","muted","muted-foreground","accent","accent-foreground","destructive","destructive-foreground","border","input","ring","card","card-foreground","popover","popover-foreground"].forEach(l=>{const p=m(r,`--${l}`),g=m(s,`--${l}`);if(p||g){const d=p?v(p):"#000000",x=g?v(g):d;o.colors[l]=[d,x]}})}catch(t){return console.error("Error parsing CSS to ChaiThemeValues:",t),k()}return o},C=(e,o)=>{var r,s;const t=new RegExp(`${j(o)}\\s*{([^}]+)}`);return((s=(r=e.match(t))==null?void 0:r[1])==null?void 0:s.trim())||null},m=(e,o)=>{var s;if(!e)return null;const t=new RegExp(`${j(o)}\\s*:\\s*([^;]+)`),r=e.match(t);return((s=r==null?void 0:r[1])==null?void 0:s.trim())||null},v=e=>{if(!e||typeof e!="string")return"#000000";try{const o=e.replace(/var\([^)]+\)/g,"").trim();if(!o)return"#000000";if(/^[a-z]+$/i.test(o))return b(o)||"#000000";if(/^#?([0-9A-F]{3,4}|[0-9A-F]{6}|[0-9A-F]{8})$/i.test(o.replace(/#/g,""))){const r=o.startsWith("#")?o:`#${o}`;return r.length<=5?`#${r.slice(1).split("").map(s=>s+s).join("")}`.slice(0,7):r.length>7?r.slice(0,7):r}if(/^(rgb|hsl|oklch)a?\(/i.test(o))return b(o)||"#000000";const t=o.match(/^(\d+\.?\d*)\s+(\d+\.?\d*)%\s+(\d+\.?\d*)%$/);if(t){const[r,s,c,a]=t,u=`hsl(${s} ${c}% ${a}%)`;return b(u)||"#000000"}if(/^[\d.]+[\s,]+[\d.]+[\s,]+[\d.]+(?:[\s,/]+[\d.]+)?$/.test(o)){const r=o.split(/[\s,]+/).filter(Boolean);if(r.length>=3){const c=r.some(a=>a.includes("%"))?`hsl(${r[0]} ${r[1]} ${r[2]})`:`rgb(${r[0]}, ${r[1]}, ${r[2]})`;return b(c)||"#000000"}}return b(o)||"#000000"}catch(o){return console.warn("Failed to process color:",e,o),"#000000"}},D=e=>{const o=V.getAllRegisteredFonts();if(!e)return"ui-sans-serif, system-ui, sans-serif";try{const r=e.replace(/["']/g,"").trim().split(",")[0].trim(),s=o.find(c=>c.family.toLowerCase()===r.toLowerCase());return(s==null?void 0:s.family)||"ui-sans-serif, system-ui, sans-serif"}catch(t){return console.warn("Error processing font family:",e,t),"ui-sans-serif, system-ui, sans-serif"}},P=e=>{if(!e)return"8px";try{const o=e.trim();if(o.endsWith("px"))return o;if(o.endsWith("rem")){const r=parseFloat(o.replace("rem",""));if(!isNaN(r))return`${Math.round(r*16)}px`}if(o.endsWith("em")){const r=parseFloat(o.replace("em",""));if(!isNaN(r))return`${Math.round(r*16)}px`}const t=parseFloat(o);return isNaN(t)?"8px":`${Math.round(t)}px`}catch(o){return console.warn("Error converting border radius to px:",e,o),"8px"}},k=()=>({fontFamily:{heading:"ui-sans-serif, system-ui, sans-serif",body:"ui-sans-serif, system-ui, sans-serif"},borderRadius:"8px",colors:{background:["#ffffff","#000000"],foreground:["#000000","#ffffff"],primary:["#3b82f6","#60a5fa"],"primary-foreground":["#ffffff","#1e293b"],secondary:["#f1f5f9","#334155"],"secondary-foreground":["#0f172a","#f8fafc"],muted:["#f8fafc","#1e293b"],"muted-foreground":["#64748b","#94a3b8"],accent:["#f1f5f9","#334155"],"accent-foreground":["#0f172a","#f8fafc"],destructive:["#ef4444","#f87171"],"destructive-foreground":["#ffffff","#1e293b"],border:["#e2e8f0","#475569"],input:["#e2e8f0","#475569"],ring:["#3b82f6","#60a5fa"],card:["#ffffff","#0f172a"],"card-foreground":["#000000","#f8fafc"],popover:["#ffffff","#0f172a"],"popover-foreground":["#000000","#f8fafc"]}}),j=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),q=e=>["background","foreground","primary","primary-foreground"].every(r=>e.colors[r]&&Array.isArray(e.colors[r])&&e.colors[r].length>=2)&&!!e.fontFamily.heading&&!!e.fontFamily.body&&!!e.borderRadius,F=e=>{if(!e||typeof e!="string")return{isValid:!1,error:"Please enter valid CSS content"};const o=e.trim();if(!o)return{isValid:!1,error:"Please enter CSS content"};try{if(!o.includes("{")||!o.includes("}"))return{isValid:!1,error:"Invalid CSS format. CSS should contain proper block structure with { }"};const t=(o.match(/{/g)||[]).length,r=(o.match(/}/g)||[]).length;return t!==r?{isValid:!1,error:"Invalid CSS format. Unmatched braces detected"}:!o.includes("--")||!o.includes(":")?{isValid:!1,error:"Invalid CSS format. CSS should contain variable definitions like --primary: #color"}:!o.includes(":root")&&!o.includes(".dark")?{isValid:!1,error:"CSS should contain at least :root or .dark selector with theme variables"}:{isValid:!0}}catch(t){return console.error("CSS validation error:",t),{isValid:!1,error:"Failed to parse CSS. Please check your syntax."}}},M=`:root {
|
|
2
2
|
--background: 0 0% 100%;
|
|
3
3
|
--foreground: oklch(0.52 0.13 144.17);
|
|
4
4
|
--primary: #3e2723;
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
--foreground: hsl(37.50 36.36% 95.69%);
|
|
11
11
|
--primary: rgb(46, 125, 50);
|
|
12
12
|
--primary-foreground: #ffffff;
|
|
13
|
-
}`,
|
|
13
|
+
}`,_=({open:e,onOpenChange:o,onImport:t})=>{const[r,s]=S.useState(""),[c,a]=S.useState(null),[u,h]=S.useState(!1),{t:l}=N.useTranslation(),p=async()=>{h(!0),a(null);try{const d=F(r);if(!d.isValid){a(d.error||"Invalid CSS format"),setTimeout(()=>{a(null)},5e3),h(!1);return}const x=I(r);if(!q(x)){a("The CSS doesn't contain enough theme information. Please ensure it includes at least background, foreground, primary, and primary-foreground colors."),setTimeout(()=>{a(null)},5e3),h(!1);return}t(x),s(""),a(null),o(!1)}catch(d){console.error("Error importing CSS:",d),a("Failed to parse CSS. Please check your syntax and try again."),setTimeout(()=>{a(null)},5e3)}finally{h(!1)}},g=()=>{s(""),a(null),o(!1)};return n.jsx(i.Dialog,{open:e,onOpenChange:o,children:n.jsxs(i.DialogContent,{className:"flex max-h-[80vh] max-w-2xl flex-col",children:[n.jsxs(i.DialogHeader,{children:[n.jsx(i.DialogTitle,{children:l("Import CSS Theme")}),n.jsxs(i.DialogDescription,{className:"space-y-2",children:[n.jsx("p",{children:l("Paste your CSS variables to import a custom theme. The CSS should contain :root and .dark blocks with CSS custom properties.")}),n.jsxs("div",{className:"flex items-center",children:[n.jsx("p",{className:"font-bold",children:"Get theme resources:"}),n.jsx(i.Button,{variant:"link",size:"sm",onClick:()=>window.open("https://tweakcn.com/","_blank"),children:"TweakCN"}),n.jsx(i.Button,{variant:"link",size:"sm",onClick:()=>window.open("https://ui.shadcn.com/themes#themes","_blank"),children:"shadcn/ui Themes"}),n.jsx(i.Button,{variant:"link",size:"sm",onClick:()=>window.open("https://zippystarter.com/tools/shadcn-ui-theme-generator","_blank"),children:"ZippyStarter"})]})]})]}),n.jsxs("div",{className:"flex-1 space-y-4 overflow-hidden",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(i.Label,{htmlFor:"css-input",children:l("CSS Variables")}),n.jsx(i.Textarea,{id:"css-input",placeholder:M,value:r,onChange:d=>s(d.target.value),className:"min-h-[300px] resize-none font-mono text-sm",disabled:u})]}),c&&n.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 p-3",children:n.jsx("p",{className:"text-sm text-red-600",children:c})})]}),n.jsxs(i.DialogFooter,{className:"gap-2",children:[n.jsx(i.Button,{variant:"outline",onClick:g,disabled:u,children:l("Cancel")}),n.jsx(i.Button,{onClick:p,disabled:!r.trim()||u,children:l(u?"Importing...":"Import Theme")})]})]})})};exports.CssImportModal=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),ft=require("@radix-ui/react-dropdown-menu"),f=require("lucide-react"),gt=require("react"),N=require("class-variance-authority"),g=require("cmdk"),xt=require("@radix-ui/react-dialog"),bt=require("@radix-ui/react-popover"),ht=require("@radix-ui/react-tooltip"),vt=require("@radix-ui/react-accordion"),yt=require("@radix-ui/react-hover-card"),Nt=require("@radix-ui/react-label"),wt=require("@radix-ui/react-scroll-area"),Ct=require("@radix-ui/react-tabs"),jt=require("@radix-ui/react-slider"),St=require("@radix-ui/react-select"),Rt=require("@radix-ui/react-separator"),Dt=require("@radix-ui/react-switch"),Tt=require("@radix-ui/react-alert-dialog"),kt=require("@radix-ui/react-slot"),_t=require("@radix-ui/react-avatar"),At=require("@radix-ui/react-context-menu"),Mt=require("@radix-ui/react-toggle"),Pt=require("clsx"),It=require("tailwind-merge");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const d=p(ft),s=p(gt),i=p(xt),v=p(bt),y=p(ht),b=p(vt),j=p(yt),z=p(Nt),x=p(wt),h=p(Ct),C=p(jt),c=p(St),q=p(Rt),R=p(Dt),u=p(Tt),w=p(_t),l=p(At),L=p(Mt);function r(...e){return It.twMerge(Pt.clsx(e))}const S=N.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),H=s.forwardRef(({className:e,variant:t,size:a,asChild:n=!1,...m},pt)=>{const ut=n?kt.Slot:"button";return o.jsx(ut,{className:r(S({variant:t,size:a,className:e})),ref:pt,...m})});H.displayName="Button";const zt=d.Root,qt=d.Trigger,Lt=d.Group,Ht=d.Portal,Vt=d.Sub,Gt=d.RadioGroup,V=s.forwardRef(({className:e,inset:t,children:a,...n},m)=>o.jsxs(d.SubTrigger,{ref:m,className:r("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[a,o.jsx(f.ChevronRight,{className:"ml-auto"})]}));V.displayName=d.SubTrigger.displayName;const G=s.forwardRef(({className:e,...t},a)=>o.jsx(d.SubContent,{ref:a,className:r("z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));G.displayName=d.SubContent.displayName;const O=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(d.Portal,{children:o.jsx(d.Content,{ref:n,sideOffset:t,className:r("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","origin-[--radix-dropdown-menu-content-transform-origin] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));O.displayName=d.Content.displayName;const F=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(d.Item,{ref:n,className:r("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));F.displayName=d.Item.displayName;const B=s.forwardRef(({className:e,children:t,checked:a,...n},m)=>o.jsxs(d.CheckboxItem,{ref:m,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d.ItemIndicator,{children:o.jsx(f.Check,{className:"h-4 w-4"})})}),t]}));B.displayName=d.CheckboxItem.displayName;const U=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(d.RadioItem,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d.ItemIndicator,{children:o.jsx(f.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));U.displayName=d.RadioItem.displayName;const E=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(d.Label,{ref:n,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));E.displayName=d.Label.displayName;const X=s.forwardRef(({className:e,...t},a)=>o.jsx(d.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));X.displayName=d.Separator.displayName;const J=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest opacity-60",e),...t});J.displayName="DropdownMenuShortcut";function Ot({className:e,...t}){return o.jsx("div",{className:r("animate-pulse rounded-md bg-primary/10",e),...t})}const Ft=N.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),K=s.forwardRef(({className:e,variant:t,...a},n)=>o.jsx("div",{ref:n,role:"alert",className:r(Ft({variant:t}),e),...a}));K.displayName="Alert";const Q=s.forwardRef(({className:e,...t},a)=>o.jsx("h5",{ref:a,className:r("mb-1 font-medium leading-none tracking-tight",e),...t}));Q.displayName="AlertTitle";const W=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm [&_p]:leading-relaxed",e),...t}));W.displayName="AlertDescription";const Y=s.forwardRef(({className:e,type:t,...a},n)=>o.jsx("input",{type:t,className:r("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...a}));Y.displayName="Input";const Z=i.Root,Bt=i.Trigger,$=i.Portal,Ut=i.Close,D=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Overlay,{ref:a,className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));D.displayName=i.Overlay.displayName;const T=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs($,{children:[o.jsx(D,{}),o.jsxs(i.Content,{ref:n,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,o.jsxs(i.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(f.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));T.displayName=i.Content.displayName;const ee=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ee.displayName="DialogHeader";const te=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});te.displayName="DialogFooter";const ae=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));ae.displayName=i.Title.displayName;const oe=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));oe.displayName=i.Description.displayName;const k=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command,{ref:a,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));k.displayName=g.Command.displayName;const Et=({children:e,...t})=>o.jsx(Z,{...t,children:o.jsx(T,{className:"overflow-hidden p-0",children:o.jsx(k,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),re=s.forwardRef(({className:e,...t},a)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(f.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(g.Command.Input,{ref:a,className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));re.displayName=g.Command.Input.displayName;const se=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.List,{ref:a,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));se.displayName=g.Command.List.displayName;const ne=s.forwardRef((e,t)=>o.jsx(g.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ne.displayName=g.Command.Empty.displayName;const ie=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Group,{ref:a,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ie.displayName=g.Command.Group.displayName;const de=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Separator,{ref:a,className:r("-mx-1 h-px bg-border",e),...t}));de.displayName=g.Command.Separator.displayName;const le=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Item,{ref:a,className:r("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));le.displayName=g.Command.Item.displayName;const ce=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ce.displayName="CommandShortcut";const Xt=v.Root,Jt=v.Trigger,Kt=v.Anchor,me=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},m)=>o.jsx(v.Portal,{children:o.jsx(v.Content,{ref:m,align:t,sideOffset:a,className:r("z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));me.displayName=v.Content.displayName;const Qt=y.Provider,Wt=y.Root,Yt=y.Trigger,pe=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(y.Portal,{children:o.jsx(y.Content,{ref:n,sideOffset:t,className:r("z-50 origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));pe.displayName=y.Content.displayName;const ue=N.cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Zt({className:e,variant:t,...a}){return o.jsx("div",{className:r(ue({variant:t}),e),...a})}const $t=b.Root,fe=s.forwardRef(({className:e,...t},a)=>o.jsx(b.Item,{ref:a,className:r("border-b",e),...t}));fe.displayName="AccordionItem";const ge=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(b.Header,{className:"flex",children:o.jsxs(b.Trigger,{ref:n,className:r("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...a,children:[t,o.jsx(f.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));ge.displayName=b.Trigger.displayName;const xe=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(b.Content,{ref:n,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...a,children:o.jsx("div",{className:r("pb-4 pt-0",e),children:t})}));xe.displayName=b.Content.displayName;const ea=j.Root,ta=j.Trigger,be=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},m)=>o.jsx(j.Content,{ref:m,align:t,sideOffset:a,className:r("z-50 w-64 origin-[--radix-hover-card-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));be.displayName=j.Content.displayName;const he=s.forwardRef(({className:e,...t},a)=>o.jsx("textarea",{className:r("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...t}));he.displayName="Textarea";const ve=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ve.displayName="Card";const ye=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex flex-col space-y-1.5 p-6",e),...t}));ye.displayName="CardHeader";const Ne=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("font-semibold leading-none tracking-tight",e),...t}));Ne.displayName="CardTitle";const we=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm text-muted-foreground",e),...t}));we.displayName="CardDescription";const Ce=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("p-6 pt-0",e),...t}));Ce.displayName="CardContent";const je=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex items-center p-6 pt-0",e),...t}));je.displayName="CardFooter";const aa=N.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Se=s.forwardRef(({className:e,...t},a)=>o.jsx(z.Root,{ref:a,className:r(aa(),e),...t}));Se.displayName=z.Root.displayName;const Re=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(x.Root,{ref:n,className:r("relative overflow-hidden",e),...a,children:[o.jsx(x.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(_,{}),o.jsx(x.Corner,{})]}));Re.displayName=x.Root.displayName;const _=s.forwardRef(({className:e,orientation:t="vertical",...a},n)=>o.jsx(x.ScrollAreaScrollbar,{ref:n,orientation:t,className:r("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:o.jsx(x.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));_.displayName=x.ScrollAreaScrollbar.displayName;const oa=h.Root,De=s.forwardRef(({className:e,...t},a)=>o.jsx(h.List,{ref:a,className:r("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));De.displayName=h.List.displayName;const Te=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Trigger,{ref:a,className:r("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Te.displayName=h.Trigger.displayName;const ke=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Content,{ref:a,className:r("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ke.displayName=h.Content.displayName;const _e=s.forwardRef(({className:e,...t},a)=>o.jsxs(C.Root,{ref:a,className:r("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(C.Track,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral-300",children:o.jsx(C.Range,{className:"absolute h-full bg-neutral-900"})}),o.jsx(C.Thumb,{className:"block h-4 w-4 rounded-full border border-neutral-900 bg-neutral-900 shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-900 disabled:pointer-events-none disabled:opacity-50"})]}));_e.displayName=C.Root.displayName;const ra=c.Root,sa=c.Group,na=c.Value,Ae=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(c.Trigger,{ref:n,className:r("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1",e),...a,children:[t,o.jsx(c.Icon,{asChild:!0,children:o.jsx(f.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ae.displayName=c.Trigger.displayName;const A=s.forwardRef(({className:e,...t},a)=>o.jsx(c.ScrollUpButton,{ref:a,className:r("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(f.ChevronUp,{className:"h-4 w-4"})}));A.displayName=c.ScrollUpButton.displayName;const M=s.forwardRef(({className:e,...t},a)=>o.jsx(c.ScrollDownButton,{ref:a,className:r("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(f.ChevronDown,{className:"h-4 w-4"})}));M.displayName=c.ScrollDownButton.displayName;const Me=s.forwardRef(({className:e,children:t,position:a="popper",...n},m)=>o.jsx(c.Portal,{children:o.jsxs(c.Content,{ref:m,className:r("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[o.jsx(A,{}),o.jsx(c.Viewport,{className:r("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(M,{})]})}));Me.displayName=c.Content.displayName;const Pe=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Label,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",e),...t}));Pe.displayName=c.Label.displayName;const Ie=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(c.Item,{ref:n,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(c.ItemIndicator,{children:o.jsx(f.Check,{className:"h-4 w-4"})})}),o.jsx(c.ItemText,{children:t})]}));Ie.displayName=c.Item.displayName;const ze=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));ze.displayName=c.Separator.displayName;const qe=s.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...n},m)=>o.jsx(q.Root,{ref:m,decorative:a,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));qe.displayName=q.Root.displayName;const Le=s.forwardRef(({className:e,...t},a)=>o.jsx(R.Root,{className:r("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:o.jsx(R.Thumb,{className:r("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Le.displayName=R.Root.displayName;const ia=u.Root,da=u.Trigger,He=u.Portal,P=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Overlay,{className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));P.displayName=u.Overlay.displayName;const Ve=s.forwardRef(({className:e,...t},a)=>o.jsxs(He,{children:[o.jsx(P,{}),o.jsx(u.Content,{ref:a,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Ve.displayName=u.Content.displayName;const Ge=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ge.displayName="AlertDialogHeader";const Oe=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Oe.displayName="AlertDialogFooter";const Fe=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Title,{ref:a,className:r("text-lg font-semibold",e),...t}));Fe.displayName=u.Title.displayName;const Be=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));Be.displayName=u.Description.displayName;const Ue=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Action,{ref:a,className:r(S(),e),...t}));Ue.displayName=u.Action.displayName;const Ee=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Cancel,{ref:a,className:r(S({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ee.displayName=u.Cancel.displayName;const Xe=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Root,{ref:a,className:r("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Xe.displayName=w.Root.displayName;const Je=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Image,{ref:a,className:r("aspect-square h-full w-full",e),...t}));Je.displayName=w.Image.displayName;const Ke=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Fallback,{ref:a,className:r("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ke.displayName=w.Fallback.displayName;const la=i.Root,ca=i.Trigger,ma=i.Close,Qe=i.Portal,I=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Overlay,{className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));I.displayName=i.Overlay.displayName;const pa=N.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),We=s.forwardRef(({side:e="right",className:t,children:a,...n},m)=>o.jsxs(Qe,{children:[o.jsx(I,{}),o.jsxs(i.Content,{ref:m,className:r(pa({side:e}),t),...n,children:[o.jsxs(i.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(f.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));We.displayName=i.Content.displayName;const Ye=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ye.displayName="SheetHeader";const Ze=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ze.displayName="SheetFooter";const $e=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold text-foreground",e),...t}));$e.displayName=i.Title.displayName;const et=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));et.displayName=i.Description.displayName;const ua=l.Root,fa=l.Trigger,ga=l.Group,xa=l.Portal,ba=l.Sub,ha=l.RadioGroup,tt=s.forwardRef(({className:e,inset:t,children:a,...n},m)=>o.jsxs(l.SubTrigger,{ref:m,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...n,children:[a,o.jsx(f.ChevronRight,{className:"ml-auto h-4 w-4"})]}));tt.displayName=l.SubTrigger.displayName;const at=s.forwardRef(({className:e,...t},a)=>o.jsx(l.SubContent,{ref:a,className:r("z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));at.displayName=l.SubContent.displayName;const ot=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Portal,{children:o.jsx(l.Content,{ref:a,className:r("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));ot.displayName=l.Content.displayName;const rt=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(l.Item,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...a}));rt.displayName=l.Item.displayName;const st=s.forwardRef(({className:e,children:t,checked:a,...n},m)=>o.jsxs(l.CheckboxItem,{ref:m,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(l.ItemIndicator,{children:o.jsx(f.Check,{className:"h-4 w-4"})})}),t]}));st.displayName=l.CheckboxItem.displayName;const nt=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(l.RadioItem,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(l.ItemIndicator,{children:o.jsx(f.Circle,{className:"h-4 w-4 fill-current"})})}),t]}));nt.displayName=l.RadioItem.displayName;const it=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(l.Label,{ref:n,className:r("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...a}));it.displayName=l.Label.displayName;const dt=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-border",e),...t}));dt.displayName=l.Separator.displayName;const lt=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});lt.displayName="ContextMenuShortcut";const ct=N.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),mt=s.forwardRef(({className:e,variant:t,size:a,...n},m)=>o.jsx(L.Root,{ref:m,className:r(ct({variant:t,size:a,className:e})),...n}));mt.displayName=L.Root.displayName;exports.Accordion=$t;exports.AccordionContent=xe;exports.AccordionItem=fe;exports.AccordionTrigger=ge;exports.Alert=K;exports.AlertDescription=W;exports.AlertDialog=ia;exports.AlertDialogAction=Ue;exports.AlertDialogCancel=Ee;exports.AlertDialogContent=Ve;exports.AlertDialogDescription=Be;exports.AlertDialogFooter=Oe;exports.AlertDialogHeader=Ge;exports.AlertDialogOverlay=P;exports.AlertDialogPortal=He;exports.AlertDialogTitle=Fe;exports.AlertDialogTrigger=da;exports.AlertTitle=Q;exports.Avatar=Xe;exports.AvatarFallback=Ke;exports.AvatarImage=Je;exports.Badge=Zt;exports.Button=H;exports.Card=ve;exports.CardContent=Ce;exports.CardDescription=we;exports.CardFooter=je;exports.CardHeader=ye;exports.CardTitle=Ne;exports.Command=k;exports.CommandDialog=Et;exports.CommandEmpty=ne;exports.CommandGroup=ie;exports.CommandInput=re;exports.CommandItem=le;exports.CommandList=se;exports.CommandSeparator=de;exports.CommandShortcut=ce;exports.ContextMenu=ua;exports.ContextMenuCheckboxItem=st;exports.ContextMenuContent=ot;exports.ContextMenuGroup=ga;exports.ContextMenuItem=rt;exports.ContextMenuLabel=it;exports.ContextMenuPortal=xa;exports.ContextMenuRadioGroup=ha;exports.ContextMenuRadioItem=nt;exports.ContextMenuSeparator=dt;exports.ContextMenuShortcut=lt;exports.ContextMenuSub=ba;exports.ContextMenuSubContent=at;exports.ContextMenuSubTrigger=tt;exports.ContextMenuTrigger=fa;exports.Dialog=Z;exports.DialogClose=Ut;exports.DialogContent=T;exports.DialogDescription=oe;exports.DialogFooter=te;exports.DialogHeader=ee;exports.DialogOverlay=D;exports.DialogPortal=$;exports.DialogTitle=ae;exports.DialogTrigger=Bt;exports.DropdownMenu=zt;exports.DropdownMenuCheckboxItem=B;exports.DropdownMenuContent=O;exports.DropdownMenuGroup=Lt;exports.DropdownMenuItem=F;exports.DropdownMenuLabel=E;exports.DropdownMenuPortal=Ht;exports.DropdownMenuRadioGroup=Gt;exports.DropdownMenuRadioItem=U;exports.DropdownMenuSeparator=X;exports.DropdownMenuShortcut=J;exports.DropdownMenuSub=Vt;exports.DropdownMenuSubContent=G;exports.DropdownMenuSubTrigger=V;exports.DropdownMenuTrigger=qt;exports.HoverCard=ea;exports.HoverCardContent=be;exports.HoverCardTrigger=ta;exports.Input=Y;exports.Label=Se;exports.Popover=Xt;exports.PopoverAnchor=Kt;exports.PopoverContent=me;exports.PopoverTrigger=Jt;exports.ScrollArea=Re;exports.ScrollBar=_;exports.Select=ra;exports.SelectContent=Me;exports.SelectGroup=sa;exports.SelectItem=Ie;exports.SelectLabel=Pe;exports.SelectScrollDownButton=M;exports.SelectScrollUpButton=A;exports.SelectSeparator=ze;exports.SelectTrigger=Ae;exports.SelectValue=na;exports.Separator=qe;exports.Sheet=la;exports.SheetClose=ma;exports.SheetContent=We;exports.SheetDescription=et;exports.SheetFooter=Ze;exports.SheetHeader=Ye;exports.SheetOverlay=I;exports.SheetPortal=Qe;exports.SheetTitle=$e;exports.SheetTrigger=ca;exports.Skeleton=Ot;exports.Slider=_e;exports.Switch=Le;exports.Tabs=oa;exports.TabsContent=ke;exports.TabsList=De;exports.TabsTrigger=Te;exports.Textarea=he;exports.Toggle=mt;exports.Tooltip=Wt;exports.TooltipContent=pe;exports.TooltipProvider=Qt;exports.TooltipTrigger=Yt;exports.badgeVariants=ue;exports.buttonVariants=S;exports.cn=r;exports.toggleVariants=ct;
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),ft=require("@radix-ui/react-dropdown-menu"),f=require("lucide-react"),gt=require("react"),N=require("class-variance-authority"),g=require("cmdk"),xt=require("@radix-ui/react-dialog"),bt=require("@radix-ui/react-popover"),ht=require("@radix-ui/react-tooltip"),vt=require("@radix-ui/react-accordion"),yt=require("@radix-ui/react-hover-card"),Nt=require("@radix-ui/react-label"),wt=require("@radix-ui/react-scroll-area"),Ct=require("@radix-ui/react-tabs"),jt=require("@radix-ui/react-slider"),St=require("@radix-ui/react-select"),Rt=require("@radix-ui/react-separator"),Dt=require("@radix-ui/react-switch"),Tt=require("@radix-ui/react-avatar"),kt=require("@radix-ui/react-alert-dialog"),_t=require("@radix-ui/react-slot"),At=require("@radix-ui/react-context-menu"),Mt=require("@radix-ui/react-toggle"),Pt=require("clsx"),It=require("tailwind-merge");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const d=p(ft),s=p(gt),i=p(xt),v=p(bt),y=p(ht),b=p(vt),j=p(yt),z=p(Nt),x=p(wt),h=p(Ct),C=p(jt),c=p(St),q=p(Rt),R=p(Dt),w=p(Tt),u=p(kt),l=p(At),L=p(Mt);function r(...e){return It.twMerge(Pt.clsx(e))}const S=N.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),H=s.forwardRef(({className:e,variant:t,size:a,asChild:n=!1,...m},pt)=>{const ut=n?_t.Slot:"button";return o.jsx(ut,{className:r(S({variant:t,size:a,className:e})),ref:pt,...m})});H.displayName="Button";const zt=d.Root,qt=d.Trigger,Lt=d.Group,Ht=d.Portal,Vt=d.Sub,Gt=d.RadioGroup,V=s.forwardRef(({className:e,inset:t,children:a,...n},m)=>o.jsxs(d.SubTrigger,{ref:m,className:r("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[a,o.jsx(f.ChevronRight,{className:"ml-auto"})]}));V.displayName=d.SubTrigger.displayName;const G=s.forwardRef(({className:e,...t},a)=>o.jsx(d.SubContent,{ref:a,className:r("z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));G.displayName=d.SubContent.displayName;const O=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(d.Portal,{children:o.jsx(d.Content,{ref:n,sideOffset:t,className:r("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","origin-[--radix-dropdown-menu-content-transform-origin] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));O.displayName=d.Content.displayName;const F=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(d.Item,{ref:n,className:r("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));F.displayName=d.Item.displayName;const B=s.forwardRef(({className:e,children:t,checked:a,...n},m)=>o.jsxs(d.CheckboxItem,{ref:m,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d.ItemIndicator,{children:o.jsx(f.Check,{className:"h-4 w-4"})})}),t]}));B.displayName=d.CheckboxItem.displayName;const U=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(d.RadioItem,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(d.ItemIndicator,{children:o.jsx(f.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));U.displayName=d.RadioItem.displayName;const E=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(d.Label,{ref:n,className:r("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));E.displayName=d.Label.displayName;const X=s.forwardRef(({className:e,...t},a)=>o.jsx(d.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));X.displayName=d.Separator.displayName;const J=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest opacity-60",e),...t});J.displayName="DropdownMenuShortcut";function Ot({className:e,...t}){return o.jsx("div",{className:r("animate-pulse rounded-md bg-primary/10",e),...t})}const Ft=N.cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),K=s.forwardRef(({className:e,variant:t,...a},n)=>o.jsx("div",{ref:n,role:"alert",className:r(Ft({variant:t}),e),...a}));K.displayName="Alert";const Q=s.forwardRef(({className:e,...t},a)=>o.jsx("h5",{ref:a,className:r("mb-1 font-medium leading-none tracking-tight",e),...t}));Q.displayName="AlertTitle";const W=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm [&_p]:leading-relaxed",e),...t}));W.displayName="AlertDescription";const Y=s.forwardRef(({className:e,type:t,...a},n)=>o.jsx("input",{type:t,className:r("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...a}));Y.displayName="Input";const Z=i.Root,Bt=i.Trigger,$=i.Portal,Ut=i.Close,D=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Overlay,{ref:a,className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));D.displayName=i.Overlay.displayName;const T=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs($,{children:[o.jsx(D,{}),o.jsxs(i.Content,{ref:n,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,o.jsxs(i.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(f.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));T.displayName=i.Content.displayName;const ee=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ee.displayName="DialogHeader";const te=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});te.displayName="DialogFooter";const ae=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));ae.displayName=i.Title.displayName;const oe=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));oe.displayName=i.Description.displayName;const k=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command,{ref:a,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));k.displayName=g.Command.displayName;const Et=({children:e,...t})=>o.jsx(Z,{...t,children:o.jsx(T,{className:"overflow-hidden p-0",children:o.jsx(k,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),re=s.forwardRef(({className:e,...t},a)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(f.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(g.Command.Input,{ref:a,className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));re.displayName=g.Command.Input.displayName;const se=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.List,{ref:a,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));se.displayName=g.Command.List.displayName;const ne=s.forwardRef((e,t)=>o.jsx(g.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ne.displayName=g.Command.Empty.displayName;const ie=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Group,{ref:a,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ie.displayName=g.Command.Group.displayName;const de=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Separator,{ref:a,className:r("-mx-1 h-px bg-border",e),...t}));de.displayName=g.Command.Separator.displayName;const le=s.forwardRef(({className:e,...t},a)=>o.jsx(g.Command.Item,{ref:a,className:r("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));le.displayName=g.Command.Item.displayName;const ce=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ce.displayName="CommandShortcut";const Xt=v.Root,Jt=v.Trigger,Kt=v.Anchor,me=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},m)=>o.jsx(v.Portal,{children:o.jsx(v.Content,{ref:m,align:t,sideOffset:a,className:r("z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));me.displayName=v.Content.displayName;const Qt=y.Provider,Wt=y.Root,Yt=y.Trigger,pe=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(y.Portal,{children:o.jsx(y.Content,{ref:n,sideOffset:t,className:r("z-50 origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));pe.displayName=y.Content.displayName;const ue=N.cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Zt({className:e,variant:t,...a}){return o.jsx("div",{className:r(ue({variant:t}),e),...a})}const $t=b.Root,fe=s.forwardRef(({className:e,...t},a)=>o.jsx(b.Item,{ref:a,className:r("border-b",e),...t}));fe.displayName="AccordionItem";const ge=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(b.Header,{className:"flex",children:o.jsxs(b.Trigger,{ref:n,className:r("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...a,children:[t,o.jsx(f.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));ge.displayName=b.Trigger.displayName;const xe=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(b.Content,{ref:n,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...a,children:o.jsx("div",{className:r("pb-4 pt-0",e),children:t})}));xe.displayName=b.Content.displayName;const ea=j.Root,ta=j.Trigger,be=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},m)=>o.jsx(j.Content,{ref:m,align:t,sideOffset:a,className:r("z-50 w-64 origin-[--radix-hover-card-content-transform-origin] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));be.displayName=j.Content.displayName;const he=s.forwardRef(({className:e,...t},a)=>o.jsx("textarea",{className:r("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...t}));he.displayName="Textarea";const ve=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ve.displayName="Card";const ye=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex flex-col space-y-1.5 p-6",e),...t}));ye.displayName="CardHeader";const Ne=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("font-semibold leading-none tracking-tight",e),...t}));Ne.displayName="CardTitle";const we=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm text-muted-foreground",e),...t}));we.displayName="CardDescription";const Ce=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("p-6 pt-0",e),...t}));Ce.displayName="CardContent";const je=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex items-center p-6 pt-0",e),...t}));je.displayName="CardFooter";const aa=N.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Se=s.forwardRef(({className:e,...t},a)=>o.jsx(z.Root,{ref:a,className:r(aa(),e),...t}));Se.displayName=z.Root.displayName;const Re=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(x.Root,{ref:n,className:r("relative overflow-hidden",e),...a,children:[o.jsx(x.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(_,{}),o.jsx(x.Corner,{})]}));Re.displayName=x.Root.displayName;const _=s.forwardRef(({className:e,orientation:t="vertical",...a},n)=>o.jsx(x.ScrollAreaScrollbar,{ref:n,orientation:t,className:r("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:o.jsx(x.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));_.displayName=x.ScrollAreaScrollbar.displayName;const oa=h.Root,De=s.forwardRef(({className:e,...t},a)=>o.jsx(h.List,{ref:a,className:r("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));De.displayName=h.List.displayName;const Te=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Trigger,{ref:a,className:r("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Te.displayName=h.Trigger.displayName;const ke=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Content,{ref:a,className:r("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ke.displayName=h.Content.displayName;const _e=s.forwardRef(({className:e,...t},a)=>o.jsxs(C.Root,{ref:a,className:r("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(C.Track,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral-300",children:o.jsx(C.Range,{className:"absolute h-full bg-neutral-900"})}),o.jsx(C.Thumb,{className:"block h-4 w-4 rounded-full border border-neutral-900 bg-neutral-900 shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-900 disabled:pointer-events-none disabled:opacity-50"})]}));_e.displayName=C.Root.displayName;const ra=c.Root,sa=c.Group,na=c.Value,Ae=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(c.Trigger,{ref:n,className:r("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1",e),...a,children:[t,o.jsx(c.Icon,{asChild:!0,children:o.jsx(f.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ae.displayName=c.Trigger.displayName;const A=s.forwardRef(({className:e,...t},a)=>o.jsx(c.ScrollUpButton,{ref:a,className:r("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(f.ChevronUp,{className:"h-4 w-4"})}));A.displayName=c.ScrollUpButton.displayName;const M=s.forwardRef(({className:e,...t},a)=>o.jsx(c.ScrollDownButton,{ref:a,className:r("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(f.ChevronDown,{className:"h-4 w-4"})}));M.displayName=c.ScrollDownButton.displayName;const Me=s.forwardRef(({className:e,children:t,position:a="popper",...n},m)=>o.jsx(c.Portal,{children:o.jsxs(c.Content,{ref:m,className:r("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:a,...n,children:[o.jsx(A,{}),o.jsx(c.Viewport,{className:r("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(M,{})]})}));Me.displayName=c.Content.displayName;const Pe=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Label,{ref:a,className:r("px-2 py-1.5 text-sm font-semibold",e),...t}));Pe.displayName=c.Label.displayName;const Ie=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(c.Item,{ref:n,className:r("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(c.ItemIndicator,{children:o.jsx(f.Check,{className:"h-4 w-4"})})}),o.jsx(c.ItemText,{children:t})]}));Ie.displayName=c.Item.displayName;const ze=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));ze.displayName=c.Separator.displayName;const qe=s.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...n},m)=>o.jsx(q.Root,{ref:m,decorative:a,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));qe.displayName=q.Root.displayName;const Le=s.forwardRef(({className:e,...t},a)=>o.jsx(R.Root,{className:r("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:a,children:o.jsx(R.Thumb,{className:r("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Le.displayName=R.Root.displayName;const He=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Root,{ref:a,className:r("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));He.displayName=w.Root.displayName;const Ve=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Image,{ref:a,className:r("aspect-square h-full w-full",e),...t}));Ve.displayName=w.Image.displayName;const Ge=s.forwardRef(({className:e,...t},a)=>o.jsx(w.Fallback,{ref:a,className:r("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ge.displayName=w.Fallback.displayName;const ia=u.Root,da=u.Trigger,Oe=u.Portal,P=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Overlay,{className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));P.displayName=u.Overlay.displayName;const Fe=s.forwardRef(({className:e,...t},a)=>o.jsxs(Oe,{children:[o.jsx(P,{}),o.jsx(u.Content,{ref:a,className:r("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Fe.displayName=u.Content.displayName;const Be=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});Be.displayName="AlertDialogHeader";const Ue=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ue.displayName="AlertDialogFooter";const Ee=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Title,{ref:a,className:r("text-lg font-semibold",e),...t}));Ee.displayName=u.Title.displayName;const Xe=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));Xe.displayName=u.Description.displayName;const Je=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Action,{ref:a,className:r(S(),e),...t}));Je.displayName=u.Action.displayName;const Ke=s.forwardRef(({className:e,...t},a)=>o.jsx(u.Cancel,{ref:a,className:r(S({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ke.displayName=u.Cancel.displayName;const la=i.Root,ca=i.Trigger,ma=i.Close,Qe=i.Portal,I=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Overlay,{className:r("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:a}));I.displayName=i.Overlay.displayName;const pa=N.cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),We=s.forwardRef(({side:e="right",className:t,children:a,...n},m)=>o.jsxs(Qe,{children:[o.jsx(I,{}),o.jsxs(i.Content,{ref:m,className:r(pa({side:e}),t),...n,children:[o.jsxs(i.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(f.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));We.displayName=i.Content.displayName;const Ye=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ye.displayName="SheetHeader";const Ze=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ze.displayName="SheetFooter";const $e=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold text-foreground",e),...t}));$e.displayName=i.Title.displayName;const et=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));et.displayName=i.Description.displayName;const ua=l.Root,fa=l.Trigger,ga=l.Group,xa=l.Portal,ba=l.Sub,ha=l.RadioGroup,tt=s.forwardRef(({className:e,inset:t,children:a,...n},m)=>o.jsxs(l.SubTrigger,{ref:m,className:r("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...n,children:[a,o.jsx(f.ChevronRight,{className:"ml-auto h-4 w-4"})]}));tt.displayName=l.SubTrigger.displayName;const at=s.forwardRef(({className:e,...t},a)=>o.jsx(l.SubContent,{ref:a,className:r("z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));at.displayName=l.SubContent.displayName;const ot=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Portal,{children:o.jsx(l.Content,{ref:a,className:r("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));ot.displayName=l.Content.displayName;const rt=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(l.Item,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...a}));rt.displayName=l.Item.displayName;const st=s.forwardRef(({className:e,children:t,checked:a,...n},m)=>o.jsxs(l.CheckboxItem,{ref:m,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(l.ItemIndicator,{children:o.jsx(f.Check,{className:"h-4 w-4"})})}),t]}));st.displayName=l.CheckboxItem.displayName;const nt=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(l.RadioItem,{ref:n,className:r("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(l.ItemIndicator,{children:o.jsx(f.Circle,{className:"h-4 w-4 fill-current"})})}),t]}));nt.displayName=l.RadioItem.displayName;const it=s.forwardRef(({className:e,inset:t,...a},n)=>o.jsx(l.Label,{ref:n,className:r("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...a}));it.displayName=l.Label.displayName;const dt=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-border",e),...t}));dt.displayName=l.Separator.displayName;const lt=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});lt.displayName="ContextMenuShortcut";const ct=N.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),mt=s.forwardRef(({className:e,variant:t,size:a,...n},m)=>o.jsx(L.Root,{ref:m,className:r(ct({variant:t,size:a,className:e})),...n}));mt.displayName=L.Root.displayName;exports.Accordion=$t;exports.AccordionContent=xe;exports.AccordionItem=fe;exports.AccordionTrigger=ge;exports.Alert=K;exports.AlertDescription=W;exports.AlertDialog=ia;exports.AlertDialogAction=Je;exports.AlertDialogCancel=Ke;exports.AlertDialogContent=Fe;exports.AlertDialogDescription=Xe;exports.AlertDialogFooter=Ue;exports.AlertDialogHeader=Be;exports.AlertDialogOverlay=P;exports.AlertDialogPortal=Oe;exports.AlertDialogTitle=Ee;exports.AlertDialogTrigger=da;exports.AlertTitle=Q;exports.Avatar=He;exports.AvatarFallback=Ge;exports.AvatarImage=Ve;exports.Badge=Zt;exports.Button=H;exports.Card=ve;exports.CardContent=Ce;exports.CardDescription=we;exports.CardFooter=je;exports.CardHeader=ye;exports.CardTitle=Ne;exports.Command=k;exports.CommandDialog=Et;exports.CommandEmpty=ne;exports.CommandGroup=ie;exports.CommandInput=re;exports.CommandItem=le;exports.CommandList=se;exports.CommandSeparator=de;exports.CommandShortcut=ce;exports.ContextMenu=ua;exports.ContextMenuCheckboxItem=st;exports.ContextMenuContent=ot;exports.ContextMenuGroup=ga;exports.ContextMenuItem=rt;exports.ContextMenuLabel=it;exports.ContextMenuPortal=xa;exports.ContextMenuRadioGroup=ha;exports.ContextMenuRadioItem=nt;exports.ContextMenuSeparator=dt;exports.ContextMenuShortcut=lt;exports.ContextMenuSub=ba;exports.ContextMenuSubContent=at;exports.ContextMenuSubTrigger=tt;exports.ContextMenuTrigger=fa;exports.Dialog=Z;exports.DialogClose=Ut;exports.DialogContent=T;exports.DialogDescription=oe;exports.DialogFooter=te;exports.DialogHeader=ee;exports.DialogOverlay=D;exports.DialogPortal=$;exports.DialogTitle=ae;exports.DialogTrigger=Bt;exports.DropdownMenu=zt;exports.DropdownMenuCheckboxItem=B;exports.DropdownMenuContent=O;exports.DropdownMenuGroup=Lt;exports.DropdownMenuItem=F;exports.DropdownMenuLabel=E;exports.DropdownMenuPortal=Ht;exports.DropdownMenuRadioGroup=Gt;exports.DropdownMenuRadioItem=U;exports.DropdownMenuSeparator=X;exports.DropdownMenuShortcut=J;exports.DropdownMenuSub=Vt;exports.DropdownMenuSubContent=G;exports.DropdownMenuSubTrigger=V;exports.DropdownMenuTrigger=qt;exports.HoverCard=ea;exports.HoverCardContent=be;exports.HoverCardTrigger=ta;exports.Input=Y;exports.Label=Se;exports.Popover=Xt;exports.PopoverAnchor=Kt;exports.PopoverContent=me;exports.PopoverTrigger=Jt;exports.ScrollArea=Re;exports.ScrollBar=_;exports.Select=ra;exports.SelectContent=Me;exports.SelectGroup=sa;exports.SelectItem=Ie;exports.SelectLabel=Pe;exports.SelectScrollDownButton=M;exports.SelectScrollUpButton=A;exports.SelectSeparator=ze;exports.SelectTrigger=Ae;exports.SelectValue=na;exports.Separator=qe;exports.Sheet=la;exports.SheetClose=ma;exports.SheetContent=We;exports.SheetDescription=et;exports.SheetFooter=Ze;exports.SheetHeader=Ye;exports.SheetOverlay=I;exports.SheetPortal=Qe;exports.SheetTitle=$e;exports.SheetTrigger=ca;exports.Skeleton=Ot;exports.Slider=_e;exports.Switch=Le;exports.Tabs=oa;exports.TabsContent=ke;exports.TabsList=De;exports.TabsTrigger=Te;exports.Textarea=he;exports.Toggle=mt;exports.Tooltip=Wt;exports.TooltipContent=pe;exports.TooltipProvider=Qt;exports.TooltipTrigger=Yt;exports.badgeVariants=ue;exports.buttonVariants=S;exports.cn=r;exports.toggleVariants=ct;
|