@chaibuilder/sdk 2.2.16 → 2.2.18
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/apply-binding-Z9D6RXG4.js +267 -0
- package/dist/apply-binding-k6PclyA3.cjs +1 -0
- package/dist/{code-editor-Dkq7gsQH.cjs → code-editor-DydX0A0c.cjs} +1 -1
- package/dist/{code-editor-QVi542cK.js → code-editor-r_v4m0s7.js} +1 -1
- package/dist/core.cjs +6 -6
- package/dist/core.js +1949 -2021
- package/dist/render.cjs +2 -2
- package/dist/render.js +75 -63
- package/dist/{sooner-AJ7QkeLS.cjs → sooner-CPeN3CGR.cjs} +1 -1
- package/dist/{sooner-DGhT8-JI.js → sooner-H65duPYc.js} +89 -89
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/package.json +1 -1
- package/dist/new-blocks-render-helpers-DfAVXxr2.js +0 -126
- package/dist/new-blocks-render-helpers-DvF4dnjH.cjs +0 -1
package/dist/render.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./plugin-C01tjI6V.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./plugin-C01tjI6V.cjs"),g=require("./apply-binding-k6PclyA3.cjs"),a=require("lodash-es"),x=require("@tailwindcss/aspect-ratio"),I=require("@tailwindcss/forms"),q=require("@tailwindcss/typography");require("tailwindcss-animate");const E=require("./get-chai-builder-theme-CeaKvOZ8.cjs"),F=require("@mhsdesign/jit-browser-tailwindcss"),L=require("@tailwindcss/container-queries"),m=require("react/jsx-runtime"),p=require("react"),R=require("@chaibuilder/runtime");function j(e,t){const n=e.filter(({_type:i})=>i==="GlobalBlock"||i==="PartialBlock");for(let i=0;i<n.length;i++){const s=n[i],l=a.get(s,"partialBlockId",a.get(s,"globalBlock",""));if(l==="")continue;let r=a.cloneDeep(a.get(t,l,[]));s._parent&&(r==null?void 0:r.length)>0&&(r=r.map(c=>(a.isEmpty(c._parent)&&(c._parent=s._parent),c)));const o=e.indexOf(s);e.splice(o,1,...r)}return e}const D=e=>{if(!e)return[];try{return JSON.parse(M(e)).filter(n=>!n._type.startsWith("@chai"))}catch{return[{_type:"Paragraph",_id:"error",content:"Invalid JSON. Please check the JSON string."}]}};function M(e){const t=/(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;return e.replace(t,n=>{const i=decodeURIComponent(n),s=i.indexOf("public");return s!==-1?i.substring(s+6):i})}async function O(e,t,n=[],i="",s){return await F.createTailwindcss({tailwindConfig:{darkMode:"class",safelist:n,theme:{extend:E.getChaiBuilderTheme(e)},plugins:[I,q,x,L,f.chaiBuilderPlugin],corePlugins:{preflight:s},...i?{prefix:`${i}`}:{}}}).generateStylesFromContent(` ${s?"@tailwind base;":""}
|
|
2
2
|
@tailwind components;
|
|
3
|
-
@tailwind utilities;`,t)}const
|
|
3
|
+
@tailwind utilities;`,t)}const $=(e,t,n)=>{const i=JSON.stringify(e).replace(/#styles:([^"]*)/g,(s,l)=>`#styles:${l.replace(/,/g," ")}`.replace(/#styles:/g,""));return O(t,[i],[],"",n)},A=async(e,t=f.defaultThemeOptions,n=!1)=>await $(e,t,n);async function N(e){const t=await e.dataProvider({pageProps:e.pageProps,block:e.block,lang:e.lang,draft:e.draft,inBuilder:!1});return a.has(t,"$metadata")&&a.isFunction(e.dataProviderMetadataCallback)&&e.dataProviderMetadataCallback(e.block,t.$metadata),e.children({...a.omit(t,"$metadata")})}const J=()=>m.jsx("div",{}),K=e=>{const{block:t,lang:n,fallbackLang:i,children:s,externalData:l,blocks:r,draft:o,pageProps:c,dataProviderMetadataCallback:h}=e,d=R.getRegisteredChaiBlock(t._type),k=a.get(d,"component",null),y=a.get(e.repeaterData,"index",-1),_=a.get(e.repeaterData,"dataKey",""),b=n===i?"":n,u=g.applyBindingToBlockProps(g.applyLanguage(t,b,d),l,{index:y,key:_}),w=g.getBlockTagAttributes(t,!1),C=V(r,t._id,g.getBlockRuntimeProps(t._type)),S=a.has(d,"dataProvider")&&a.isFunction(d.dataProvider),P={blockProps:{},inBuilder:!1,lang:n||i,...u,...w,...C};if(a.isNull(k))return null;if(S){const v=a.get(d,"suspenseFallback",J);return m.jsx(p.Suspense,{fallback:p.createElement(v),children:m.jsx(N,{lang:n,pageProps:c,block:t,dataProvider:d.dataProvider,...h?{dataProviderMetadataCallback:h}:{},draft:o,children:T=>p.createElement(k,{...P,...T,children:s({_id:t._id,_type:t._type,...a.isArray(u.repeaterItems)?{repeaterItems:g.applyLimit(u.repeaterItems,t),repeaterItemsBinding:u.repeaterItemsBinding}:{}})})})})}return m.jsx(p.Suspense,{children:p.createElement(k,{...P,children:s({_id:t._id,_type:t._type,...a.isArray(u.repeaterItems)?{repeaterItems:g.applyLimit(u.repeaterItems,t),repeaterItemsBinding:u.repeaterItemsBinding}:{}})})})},B=e=>{const{blocks:t,parent:n,repeaterData:i}=e;let s=a.uniqBy(a.filter(t,r=>a.has(r,"_id")&&(a.isEmpty(n)?!r._parent:r._parent===n)),"_id");const l=r=>a.filter(t,o=>o._parent===r).length>0;return a.map(s,r=>r?p.createElement(K,{...e,key:r._id,block:r},({_id:o,_type:c,repeaterItems:h,repeaterItemsBinding:d})=>c==="Repeater"?a.isArray(h)&&h.map((k,y)=>p.createElement(B,{...e,parent:r._id,key:`${r._id}-${y}`,repeaterData:{index:y,dataKey:d}})):l(o)?m.jsx(B,{...e,parent:r._id,repeaterData:i}):null):null)},V=(e,t,n)=>a.isEmpty(n)?{}:Object.entries(n).reduce((i,[s,l])=>{const r=[];let o=a.find(e,{_id:t});for(;o;)r.push(o),o=a.find(e,{_id:o._parent});const c=a.find(r,{_type:l.block});return c&&(i[s]=a.get(c,a.get(l,"prop"),null)),i},{});function U(e){if(a.has(e,"metadata")&&console.warn(" metadata is deprecated and will be removed in upcoming version, use pageProps instead"),a.isEmpty(e.lang)&&!a.isEmpty(e.fallbackLang))throw new Error("lang prop is required when fallbackLang is provided");if(a.isEmpty(e.blocks))return null;const t=e.lang??"en",n=e.fallbackLang??t;return m.jsx(B,{...e,lang:t,fallbackLang:n})}exports.getChaiThemeCssVariables=f.getChaiThemeCssVariables;exports.getThemeFontsCSSImport=f.getThemeFontsCSSImport;exports.getThemeFontsLinkMarkup=f.getThemeFontsLinkMarkup;exports.applyChaiDataBinding=g.applyChaiDataBinding;exports.RenderChaiBlocks=U;exports.convertToBlocks=D;exports.getMergedPartialBlocks=j;exports.getStylesForBlocks=A;
|
package/dist/render.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as F, c as O } from "./plugin-fnBB3TCm.js";
|
|
2
|
-
import { a as Ce, b as ve, e as
|
|
3
|
-
import { a as
|
|
4
|
-
import { e as Ie } from "./
|
|
5
|
-
import { get as
|
|
2
|
+
import { a as Ce, b as ve, e as Se } from "./plugin-fnBB3TCm.js";
|
|
3
|
+
import { a as $, b as M, g as A, c as N, d as w } from "./apply-binding-Z9D6RXG4.js";
|
|
4
|
+
import { e as Ie } from "./apply-binding-Z9D6RXG4.js";
|
|
5
|
+
import { get as c, cloneDeep as J, isEmpty as g, has as y, isFunction as S, omit as E, isNull as K, isArray as B, uniqBy as j, filter as C, map as q, find as _ } from "lodash-es";
|
|
6
6
|
import U from "@tailwindcss/aspect-ratio";
|
|
7
7
|
import V from "@tailwindcss/forms";
|
|
8
8
|
import G from "@tailwindcss/typography";
|
|
@@ -10,22 +10,22 @@ import "tailwindcss-animate";
|
|
|
10
10
|
import { g as W } from "./get-chai-builder-theme-ByeXCyGx.js";
|
|
11
11
|
import { createTailwindcss as z } from "@mhsdesign/jit-browser-tailwindcss";
|
|
12
12
|
import H from "@tailwindcss/container-queries";
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { Suspense as v, createElement as
|
|
13
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
14
|
+
import { Suspense as v, createElement as f } from "react";
|
|
15
15
|
import { getRegisteredChaiBlock as Q } from "@chaibuilder/runtime";
|
|
16
|
-
function
|
|
17
|
-
const a = e.filter(({ _type:
|
|
18
|
-
for (let
|
|
19
|
-
const i = a[
|
|
16
|
+
function ye(e, t) {
|
|
17
|
+
const a = e.filter(({ _type: n }) => n === "GlobalBlock" || n === "PartialBlock");
|
|
18
|
+
for (let n = 0; n < a.length; n++) {
|
|
19
|
+
const i = a[n], l = c(i, "partialBlockId", c(i, "globalBlock", ""));
|
|
20
20
|
if (l === "") continue;
|
|
21
|
-
|
|
22
|
-
i._parent && (
|
|
21
|
+
let r = J(c(t, l, []));
|
|
22
|
+
i._parent && (r == null ? void 0 : r.length) > 0 && (r = r.map((s) => (g(s._parent) && (s._parent = i._parent), s)));
|
|
23
23
|
const o = e.indexOf(i);
|
|
24
|
-
e.splice(o, 1, ...
|
|
24
|
+
e.splice(o, 1, ...r);
|
|
25
25
|
}
|
|
26
26
|
return e;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const _e = (e) => {
|
|
29
29
|
if (!e) return [];
|
|
30
30
|
try {
|
|
31
31
|
return JSON.parse(X(e)).filter((a) => !a._type.startsWith("@chai"));
|
|
@@ -36,11 +36,11 @@ const ye = (e) => {
|
|
|
36
36
|
function X(e) {
|
|
37
37
|
const t = /(asset:\/\/|https:\/\/asset\.localhost\/)(?:localhost\/)?[^"']+/g;
|
|
38
38
|
return e.replace(t, (a) => {
|
|
39
|
-
const
|
|
40
|
-
return i !== -1 ?
|
|
39
|
+
const n = decodeURIComponent(a), i = n.indexOf("public");
|
|
40
|
+
return i !== -1 ? n.substring(i + 6) : n;
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
async function Y(e, t, a = [],
|
|
43
|
+
async function Y(e, t, a = [], n = "", i) {
|
|
44
44
|
return await z({
|
|
45
45
|
tailwindConfig: {
|
|
46
46
|
darkMode: "class",
|
|
@@ -48,7 +48,7 @@ async function Y(e, t, a = [], r = "", i) {
|
|
|
48
48
|
theme: { extend: W(e) },
|
|
49
49
|
plugins: [V, G, U, H, O],
|
|
50
50
|
corePlugins: { preflight: i },
|
|
51
|
-
...
|
|
51
|
+
...n ? { prefix: `${n}` } : {}
|
|
52
52
|
}
|
|
53
53
|
}).generateStylesFromContent(
|
|
54
54
|
` ${i ? "@tailwind base;" : ""}
|
|
@@ -58,8 +58,8 @@ async function Y(e, t, a = [], r = "", i) {
|
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
const Z = (e, t, a) => {
|
|
61
|
-
const
|
|
62
|
-
return Y(t, [
|
|
61
|
+
const n = JSON.stringify(e).replace(/#styles:([^"]*)/g, (i, l) => `#styles:${l.replace(/,/g, " ")}`.replace(/#styles:/g, ""));
|
|
62
|
+
return Y(t, [n], [], "", a);
|
|
63
63
|
}, Be = async (e, t = F, a = !1) => await Z(e, t, a);
|
|
64
64
|
async function ee(e) {
|
|
65
65
|
const t = await e.dataProvider({
|
|
@@ -69,91 +69,103 @@ async function ee(e) {
|
|
|
69
69
|
draft: e.draft,
|
|
70
70
|
inBuilder: !1
|
|
71
71
|
});
|
|
72
|
-
return
|
|
72
|
+
return y(t, "$metadata") && S(e.dataProviderMetadataCallback) && e.dataProviderMetadataCallback(e.block, t.$metadata), e.children({
|
|
73
73
|
...E(t, "$metadata")
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
const te = () => /* @__PURE__ */
|
|
77
|
-
const { block: t, lang: a, fallbackLang:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
const te = () => /* @__PURE__ */ u("div", {}), ae = (e) => {
|
|
77
|
+
const { block: t, lang: a, fallbackLang: n, children: i, externalData: l, blocks: r, draft: o, pageProps: s, dataProviderMetadataCallback: m } = e, d = Q(t._type), h = c(d, "component", null), k = c(e.repeaterData, "index", -1), x = c(e.repeaterData, "dataKey", ""), p = $(
|
|
78
|
+
M(t, a === n ? "" : a, d),
|
|
79
|
+
l,
|
|
80
|
+
{
|
|
81
|
+
index: k,
|
|
82
|
+
key: x
|
|
83
|
+
}
|
|
84
|
+
), I = A(t, !1), T = re(r, t._id, N(t._type)), L = y(d, "dataProvider") && S(d.dataProvider), P = {
|
|
81
85
|
blockProps: {},
|
|
82
86
|
inBuilder: !1,
|
|
83
|
-
lang: a ||
|
|
84
|
-
...
|
|
87
|
+
lang: a || n,
|
|
88
|
+
...p,
|
|
85
89
|
...I,
|
|
86
|
-
...
|
|
90
|
+
...T
|
|
87
91
|
};
|
|
88
|
-
if (K(
|
|
89
|
-
if (
|
|
90
|
-
const D =
|
|
91
|
-
return /* @__PURE__ */
|
|
92
|
+
if (K(h)) return null;
|
|
93
|
+
if (L) {
|
|
94
|
+
const D = c(d, "suspenseFallback", te);
|
|
95
|
+
return /* @__PURE__ */ u(v, { fallback: f(D), children: /* @__PURE__ */ u(
|
|
92
96
|
ee,
|
|
93
97
|
{
|
|
94
98
|
lang: a,
|
|
95
|
-
pageProps:
|
|
99
|
+
pageProps: s,
|
|
96
100
|
block: t,
|
|
97
|
-
dataProvider:
|
|
98
|
-
...
|
|
101
|
+
dataProvider: d.dataProvider,
|
|
102
|
+
...m ? { dataProviderMetadataCallback: m } : {},
|
|
99
103
|
draft: o,
|
|
100
|
-
children: (R) => h
|
|
104
|
+
children: (R) => f(h, {
|
|
101
105
|
...P,
|
|
102
106
|
...R,
|
|
103
107
|
children: i({
|
|
104
108
|
_id: t._id,
|
|
105
109
|
_type: t._type,
|
|
106
|
-
...B(
|
|
107
|
-
repeaterItems: w(
|
|
108
|
-
repeaterItemsBinding:
|
|
110
|
+
...B(p.repeaterItems) ? {
|
|
111
|
+
repeaterItems: w(p.repeaterItems, t),
|
|
112
|
+
repeaterItemsBinding: p.repeaterItemsBinding
|
|
109
113
|
} : {}
|
|
110
114
|
})
|
|
111
115
|
})
|
|
112
116
|
}
|
|
113
117
|
) });
|
|
114
118
|
}
|
|
115
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ u(v, { children: f(h, {
|
|
116
120
|
...P,
|
|
117
121
|
children: i({
|
|
118
122
|
_id: t._id,
|
|
119
123
|
_type: t._type,
|
|
120
|
-
...B(
|
|
121
|
-
repeaterItems: w(
|
|
122
|
-
repeaterItemsBinding:
|
|
124
|
+
...B(p.repeaterItems) ? {
|
|
125
|
+
repeaterItems: w(p.repeaterItems, t),
|
|
126
|
+
repeaterItemsBinding: p.repeaterItemsBinding
|
|
123
127
|
} : {}
|
|
124
128
|
})
|
|
125
129
|
}) });
|
|
126
|
-
},
|
|
127
|
-
const { blocks: t, parent: a, repeaterData:
|
|
130
|
+
}, b = (e) => {
|
|
131
|
+
const { blocks: t, parent: a, repeaterData: n } = e;
|
|
128
132
|
let i = j(
|
|
129
|
-
C(t, (
|
|
133
|
+
C(t, (r) => y(r, "_id") && (g(a) ? !r._parent : r._parent === a)),
|
|
130
134
|
"_id"
|
|
131
135
|
);
|
|
132
|
-
const l = (
|
|
133
|
-
return q(i, (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
const l = (r) => C(t, (o) => o._parent === r).length > 0;
|
|
137
|
+
return q(i, (r) => r ? /* @__PURE__ */ f(ae, { ...e, key: r._id, block: r }, ({ _id: o, _type: s, repeaterItems: m, repeaterItemsBinding: d }) => s === "Repeater" ? B(m) && m.map((h, k) => /* @__PURE__ */ f(
|
|
138
|
+
b,
|
|
139
|
+
{
|
|
140
|
+
...e,
|
|
141
|
+
parent: r._id,
|
|
142
|
+
key: `${r._id}-${k}`,
|
|
143
|
+
repeaterData: { index: k, dataKey: d }
|
|
144
|
+
}
|
|
145
|
+
)) : l(o) ? /* @__PURE__ */ u(b, { ...e, parent: r._id, repeaterData: n }) : null) : null);
|
|
146
|
+
}, re = (e, t, a) => g(a) ? {} : Object.entries(a).reduce((n, [i, l]) => {
|
|
147
|
+
const r = [];
|
|
148
|
+
let o = _(e, { _id: t });
|
|
137
149
|
for (; o; )
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
return
|
|
150
|
+
r.push(o), o = _(e, { _id: o._parent });
|
|
151
|
+
const s = _(r, { _type: l.block });
|
|
152
|
+
return s && (n[i] = c(s, c(l, "prop"), null)), n;
|
|
141
153
|
}, {});
|
|
142
|
-
function
|
|
143
|
-
if (
|
|
154
|
+
function be(e) {
|
|
155
|
+
if (y(e, "metadata") && console.warn(" metadata is deprecated and will be removed in upcoming version, use pageProps instead"), g(e.lang) && !g(e.fallbackLang))
|
|
144
156
|
throw new Error("lang prop is required when fallbackLang is provided");
|
|
145
|
-
if (
|
|
157
|
+
if (g(e.blocks))
|
|
146
158
|
return null;
|
|
147
159
|
const t = e.lang ?? "en", a = e.fallbackLang ?? t;
|
|
148
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ u(b, { ...e, lang: t, fallbackLang: a });
|
|
149
161
|
}
|
|
150
162
|
export {
|
|
151
|
-
|
|
163
|
+
be as RenderChaiBlocks,
|
|
152
164
|
Ie as applyChaiDataBinding,
|
|
153
|
-
|
|
165
|
+
_e as convertToBlocks,
|
|
154
166
|
Ce as getChaiThemeCssVariables,
|
|
155
|
-
|
|
167
|
+
ye as getMergedPartialBlocks,
|
|
156
168
|
Be as getStylesForBlocks,
|
|
157
169
|
ve as getThemeFontsCSSImport,
|
|
158
|
-
|
|
170
|
+
Se as getThemeFontsLinkMarkup
|
|
159
171
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),Xe=require("@radix-ui/react-dropdown-menu"),g=require("lucide-react"),Je=require("react"),c=require("cmdk"),Ke=require("@radix-ui/react-dialog"),Qe=require("@radix-ui/react-popover"),Ue=require("@radix-ui/react-tooltip"),y=require("class-variance-authority"),We=require("@radix-ui/react-accordion"),Ye=require("@radix-ui/react-hover-card"),Ze=require("@radix-ui/react-label"),$e=require("@radix-ui/react-scroll-area"),et=require("@radix-ui/react-tabs"),tt=require("@radix-ui/react-alert-dialog"),at=require("@radix-ui/react-slot"),ot=require("@radix-ui/react-switch"),rt=require("@radix-ui/react-avatar"),st=require("@radix-ui/react-separator"),nt=require("clsx"),it=require("tailwind-merge"),dt=require("next-themes"),lt=require("sonner");function m(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=m(Xe),s=m(Je),i=m(Ke),b=m(Qe),v=m(Ue),f=m(We),N=m(Ye),A=m(Ze),u=m($e),x=m(et),l=m(tt),C=m(ot),h=m(rt),_=m(st);function r(...e){return it.twMerge(nt.clsx(e))}const w=y.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"}}),P=s.forwardRef(({className:e,variant:t,size:a,asChild:n=!1,...p},Be)=>{const Ee=n?at.Slot:"button";return o.jsx(Ee,{className:r(w({variant:t,size:a,className:e})),ref:Be,...p})});P.displayName="Button";const ct=d.Root,mt=d.Trigger,pt=d.Group,ut=d.Portal,ft=d.Sub,gt=d.RadioGroup,M=s.forwardRef(({className:e,inset:t,children:a,...n},p)=>o.jsxs(d.SubTrigger,{ref:p,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(g.ChevronRight,{className:"ml-auto"})]}));M.displayName=d.SubTrigger.displayName;const z=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}));z.displayName=d.SubContent.displayName;const I=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})}));I.displayName=d.Content.displayName;const q=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}));q.displayName=d.Item.displayName;const H=s.forwardRef(({className:e,children:t,checked:a,...n},p)=>o.jsxs(d.CheckboxItem,{ref:p,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(g.Check,{className:"h-4 w-4"})})}),t]}));H.displayName=d.CheckboxItem.displayName;const O=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(g.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));O.displayName=d.RadioItem.displayName;const F=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}));F.displayName=d.Label.displayName;const L=s.forwardRef(({className:e,...t},a)=>o.jsx(d.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));L.displayName=d.Separator.displayName;const V=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest opacity-60",e),...t});V.displayName="DropdownMenuShortcut";function xt({className:e,...t}){return o.jsx("div",{className:r("animate-pulse rounded-md bg-primary/10",e),...t})}const G=i.Root,bt=i.Trigger,B=i.Portal,vt=i.Close,j=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}));j.displayName=i.Overlay.displayName;const D=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(B,{children:[o.jsx(j,{}),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(g.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));D.displayName=i.Content.displayName;const E=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});E.displayName="DialogHeader";const X=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});X.displayName="DialogFooter";const J=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));J.displayName=i.Title.displayName;const K=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));K.displayName=i.Description.displayName;const R=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Command,{ref:a,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));R.displayName=c.Command.displayName;const ht=({children:e,...t})=>o.jsx(G,{...t,children:o.jsx(D,{className:"overflow-hidden p-0",children:o.jsx(R,{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})})}),Q=s.forwardRef(({className:e,...t},a)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(g.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(c.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})]}));Q.displayName=c.Command.Input.displayName;const U=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Command.List,{ref:a,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));U.displayName=c.Command.List.displayName;const W=s.forwardRef((e,t)=>o.jsx(c.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));W.displayName=c.Command.Empty.displayName;const Y=s.forwardRef(({className:e,...t},a)=>o.jsx(c.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}));Y.displayName=c.Command.Group.displayName;const Z=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Command.Separator,{ref:a,className:r("-mx-1 h-px bg-border",e),...t}));Z.displayName=c.Command.Separator.displayName;const $=s.forwardRef(({className:e,...t},a)=>o.jsx(c.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}));$.displayName=c.Command.Item.displayName;const ee=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ee.displayName="CommandShortcut";const yt=b.Root,Nt=b.Trigger,wt=b.Anchor,te=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},p)=>o.jsx(b.Portal,{children:o.jsx(b.Content,{ref:p,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})}));te.displayName=b.Content.displayName;const Ct=v.Provider,jt=v.Root,Dt=v.Trigger,ae=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(v.Portal,{children:o.jsx(v.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})}));ae.displayName=v.Content.displayName;const oe=y.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 Rt({className:e,variant:t,...a}){return o.jsx("div",{className:r(oe({variant:t}),e),...a})}const Tt=y.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"}}),re=s.forwardRef(({className:e,variant:t,...a},n)=>o.jsx("div",{ref:n,role:"alert",className:r(Tt({variant:t}),e),...a}));re.displayName="Alert";const se=s.forwardRef(({className:e,...t},a)=>o.jsx("h5",{ref:a,className:r("mb-1 font-medium leading-none tracking-tight",e),...t}));se.displayName="AlertTitle";const ne=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm [&_p]:leading-relaxed",e),...t}));ne.displayName="AlertDescription";const ie=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}));ie.displayName="Input";const St=f.Root,de=s.forwardRef(({className:e,...t},a)=>o.jsx(f.Item,{ref:a,className:r("border-b",e),...t}));de.displayName="AccordionItem";const le=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(f.Header,{className:"flex",children:o.jsxs(f.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(g.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));le.displayName=f.Trigger.displayName;const ce=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(f.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})}));ce.displayName=f.Content.displayName;const kt=N.Root,At=N.Trigger,me=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},p)=>o.jsx(N.Content,{ref:p,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}));me.displayName=N.Content.displayName;const pe=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}));pe.displayName="Textarea";const ue=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ue.displayName="Card";const fe=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex flex-col space-y-1.5 p-6",e),...t}));fe.displayName="CardHeader";const ge=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("font-semibold leading-none tracking-tight",e),...t}));ge.displayName="CardTitle";const xe=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm text-muted-foreground",e),...t}));xe.displayName="CardDescription";const be=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("p-6 pt-0",e),...t}));be.displayName="CardContent";const ve=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex items-center p-6 pt-0",e),...t}));ve.displayName="CardFooter";const _t=y.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),he=s.forwardRef(({className:e,...t},a)=>o.jsx(A.Root,{ref:a,className:r(_t(),e),...t}));he.displayName=A.Root.displayName;const ye=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(u.Root,{ref:n,className:r("relative overflow-hidden",e),...a,children:[o.jsx(u.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(T,{}),o.jsx(u.Corner,{})]}));ye.displayName=u.Root.displayName;const T=s.forwardRef(({className:e,orientation:t="vertical",...a},n)=>o.jsx(u.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(u.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));T.displayName=u.ScrollAreaScrollbar.displayName;const Pt=x.Root,Ne=s.forwardRef(({className:e,...t},a)=>o.jsx(x.List,{ref:a,className:r("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Ne.displayName=x.List.displayName;const we=s.forwardRef(({className:e,...t},a)=>o.jsx(x.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}));we.displayName=x.Trigger.displayName;const Ce=s.forwardRef(({className:e,...t},a)=>o.jsx(x.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}));Ce.displayName=x.Content.displayName;const Mt=l.Root,zt=l.Trigger,je=l.Portal,S=s.forwardRef(({className:e,...t},a)=>o.jsx(l.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}));S.displayName=l.Overlay.displayName;const De=s.forwardRef(({className:e,...t},a)=>o.jsxs(je,{children:[o.jsx(S,{}),o.jsx(l.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})]}));De.displayName=l.Content.displayName;const Re=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});Re.displayName="AlertDialogHeader";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="AlertDialogFooter";const Se=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Title,{ref:a,className:r("text-lg font-semibold",e),...t}));Se.displayName=l.Title.displayName;const ke=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));ke.displayName=l.Description.displayName;const Ae=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Action,{ref:a,className:r(w(),e),...t}));Ae.displayName=l.Action.displayName;const _e=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Cancel,{ref:a,className:r(w({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));_e.displayName=l.Cancel.displayName;const Pe=s.forwardRef(({className:e,...t},a)=>o.jsx(C.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(C.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")})}));Pe.displayName=C.Root.displayName;const Me=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Root,{ref:a,className:r("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Me.displayName=h.Root.displayName;const ze=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Image,{ref:a,className:r("aspect-square h-full w-full",e),...t}));ze.displayName=h.Image.displayName;const Ie=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Fallback,{ref:a,className:r("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ie.displayName=h.Fallback.displayName;const qe=s.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...n},p)=>o.jsx(_.Root,{ref:p,decorative:a,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));qe.displayName=_.Root.displayName;const It=i.Root,qt=i.Trigger,Ht=i.Close,He=i.Portal,k=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}));k.displayName=i.Overlay.displayName;const Ot=y.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"}}),Oe=s.forwardRef(({side:e="right",className:t,children:a,...n},p)=>o.jsxs(He,{children:[o.jsx(k,{}),o.jsxs(i.Content,{ref:p,className:r(Ot({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(g.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));Oe.displayName=i.Content.displayName;const Fe=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});Fe.displayName="SheetHeader";const Le=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Le.displayName="SheetFooter";const Ve=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold text-foreground",e),...t}));Ve.displayName=i.Title.displayName;const Ge=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));Ge.displayName=i.Description.displayName;const Ft=({...e})=>{const{theme:t="system"}=dt.useTheme();return o.jsx(lt.Toaster,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};exports.Accordion=St;exports.AccordionContent=ce;exports.AccordionItem=de;exports.AccordionTrigger=le;exports.Alert=re;exports.AlertDescription=ne;exports.AlertDialog=Mt;exports.AlertDialogAction=Ae;exports.AlertDialogCancel=_e;exports.AlertDialogContent=De;exports.AlertDialogDescription=ke;exports.AlertDialogFooter=Te;exports.AlertDialogHeader=Re;exports.AlertDialogOverlay=S;exports.AlertDialogPortal=je;exports.AlertDialogTitle=Se;exports.AlertDialogTrigger=zt;exports.AlertTitle=se;exports.Avatar=Me;exports.AvatarFallback=Ie;exports.AvatarImage=ze;exports.Badge=Rt;exports.Button=P;exports.Card=ue;exports.CardContent=be;exports.CardDescription=xe;exports.CardFooter=ve;exports.CardHeader=fe;exports.CardTitle=ge;exports.Command=R;exports.CommandDialog=ht;exports.CommandEmpty=W;exports.CommandGroup=Y;exports.CommandInput=Q;exports.CommandItem=$;exports.CommandList=U;exports.CommandSeparator=Z;exports.CommandShortcut=ee;exports.Dialog=G;exports.DialogClose=vt;exports.DialogContent=D;exports.DialogDescription=K;exports.DialogFooter=X;exports.DialogHeader=E;exports.DialogOverlay=j;exports.DialogPortal=B;exports.DialogTitle=J;exports.DialogTrigger=bt;exports.DropdownMenu=ct;exports.DropdownMenuCheckboxItem=H;exports.DropdownMenuContent=I;exports.DropdownMenuGroup=pt;exports.DropdownMenuItem=q;exports.DropdownMenuLabel=F;exports.DropdownMenuPortal=ut;exports.DropdownMenuRadioGroup=gt;exports.DropdownMenuRadioItem=O;exports.DropdownMenuSeparator=L;exports.DropdownMenuShortcut=V;exports.DropdownMenuSub=ft;exports.DropdownMenuSubContent=z;exports.DropdownMenuSubTrigger=M;exports.DropdownMenuTrigger=mt;exports.HoverCard=kt;exports.HoverCardContent=me;exports.HoverCardTrigger=At;exports.Input=ie;exports.Label=he;exports.Popover=yt;exports.PopoverAnchor=wt;exports.PopoverContent=te;exports.PopoverTrigger=Nt;exports.ScrollArea=ye;exports.ScrollBar=T;exports.Separator=qe;exports.Sheet=It;exports.SheetClose=Ht;exports.SheetContent=Oe;exports.SheetDescription=Ge;exports.SheetFooter=Le;exports.SheetHeader=Fe;exports.SheetOverlay=k;exports.SheetPortal=He;exports.SheetTitle=Ve;exports.SheetTrigger=qt;exports.Skeleton=xt;exports.Switch=Pe;exports.Tabs=Pt;exports.TabsContent=Ce;exports.TabsList=Ne;exports.TabsTrigger=we;exports.Textarea=pe;exports.Toaster=Ft;exports.Tooltip=jt;exports.TooltipContent=ae;exports.TooltipProvider=Ct;exports.TooltipTrigger=Dt;exports.badgeVariants=oe;exports.buttonVariants=w;exports.cn=r;
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),Xe=require("@radix-ui/react-dropdown-menu"),g=require("lucide-react"),Je=require("react"),y=require("class-variance-authority"),c=require("cmdk"),Ke=require("@radix-ui/react-dialog"),Qe=require("@radix-ui/react-popover"),Ue=require("@radix-ui/react-tooltip"),We=require("@radix-ui/react-accordion"),Ye=require("@radix-ui/react-hover-card"),Ze=require("@radix-ui/react-label"),$e=require("@radix-ui/react-scroll-area"),et=require("@radix-ui/react-tabs"),tt=require("@radix-ui/react-alert-dialog"),at=require("@radix-ui/react-slot"),ot=require("@radix-ui/react-switch"),rt=require("@radix-ui/react-avatar"),st=require("@radix-ui/react-separator"),nt=require("clsx"),it=require("tailwind-merge"),dt=require("next-themes"),lt=require("sonner");function m(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=m(Xe),s=m(Je),i=m(Ke),b=m(Qe),v=m(Ue),f=m(We),N=m(Ye),A=m(Ze),u=m($e),x=m(et),l=m(tt),C=m(ot),h=m(rt),_=m(st);function r(...e){return it.twMerge(nt.clsx(e))}const w=y.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"}}),P=s.forwardRef(({className:e,variant:t,size:a,asChild:n=!1,...p},Be)=>{const Ee=n?at.Slot:"button";return o.jsx(Ee,{className:r(w({variant:t,size:a,className:e})),ref:Be,...p})});P.displayName="Button";const ct=d.Root,mt=d.Trigger,pt=d.Group,ut=d.Portal,ft=d.Sub,gt=d.RadioGroup,M=s.forwardRef(({className:e,inset:t,children:a,...n},p)=>o.jsxs(d.SubTrigger,{ref:p,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(g.ChevronRight,{className:"ml-auto"})]}));M.displayName=d.SubTrigger.displayName;const z=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}));z.displayName=d.SubContent.displayName;const I=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})}));I.displayName=d.Content.displayName;const q=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}));q.displayName=d.Item.displayName;const H=s.forwardRef(({className:e,children:t,checked:a,...n},p)=>o.jsxs(d.CheckboxItem,{ref:p,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(g.Check,{className:"h-4 w-4"})})}),t]}));H.displayName=d.CheckboxItem.displayName;const O=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(g.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));O.displayName=d.RadioItem.displayName;const F=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}));F.displayName=d.Label.displayName;const L=s.forwardRef(({className:e,...t},a)=>o.jsx(d.Separator,{ref:a,className:r("-mx-1 my-1 h-px bg-muted",e),...t}));L.displayName=d.Separator.displayName;const V=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest opacity-60",e),...t});V.displayName="DropdownMenuShortcut";function xt({className:e,...t}){return o.jsx("div",{className:r("animate-pulse rounded-md bg-primary/10",e),...t})}const bt=y.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"}}),G=s.forwardRef(({className:e,variant:t,...a},n)=>o.jsx("div",{ref:n,role:"alert",className:r(bt({variant:t}),e),...a}));G.displayName="Alert";const B=s.forwardRef(({className:e,...t},a)=>o.jsx("h5",{ref:a,className:r("mb-1 font-medium leading-none tracking-tight",e),...t}));B.displayName="AlertTitle";const E=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm [&_p]:leading-relaxed",e),...t}));E.displayName="AlertDescription";const X=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}));X.displayName="Input";const J=i.Root,vt=i.Trigger,K=i.Portal,ht=i.Close,j=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}));j.displayName=i.Overlay.displayName;const D=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(K,{children:[o.jsx(j,{}),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(g.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));D.displayName=i.Content.displayName;const Q=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Q.displayName="DialogHeader";const U=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});U.displayName="DialogFooter";const W=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold leading-none tracking-tight",e),...t}));W.displayName=i.Title.displayName;const Y=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));Y.displayName=i.Description.displayName;const R=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Command,{ref:a,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));R.displayName=c.Command.displayName;const yt=({children:e,...t})=>o.jsx(J,{...t,children:o.jsx(D,{className:"overflow-hidden p-0",children:o.jsx(R,{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})})}),Z=s.forwardRef(({className:e,...t},a)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(g.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(c.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})]}));Z.displayName=c.Command.Input.displayName;const $=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Command.List,{ref:a,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));$.displayName=c.Command.List.displayName;const ee=s.forwardRef((e,t)=>o.jsx(c.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ee.displayName=c.Command.Empty.displayName;const te=s.forwardRef(({className:e,...t},a)=>o.jsx(c.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}));te.displayName=c.Command.Group.displayName;const ae=s.forwardRef(({className:e,...t},a)=>o.jsx(c.Command.Separator,{ref:a,className:r("-mx-1 h-px bg-border",e),...t}));ae.displayName=c.Command.Separator.displayName;const oe=s.forwardRef(({className:e,...t},a)=>o.jsx(c.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}));oe.displayName=c.Command.Item.displayName;const re=({className:e,...t})=>o.jsx("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});re.displayName="CommandShortcut";const Nt=b.Root,wt=b.Trigger,Ct=b.Anchor,se=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},p)=>o.jsx(b.Portal,{children:o.jsx(b.Content,{ref:p,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})}));se.displayName=b.Content.displayName;const jt=v.Provider,Dt=v.Root,Rt=v.Trigger,ne=s.forwardRef(({className:e,sideOffset:t=4,...a},n)=>o.jsx(v.Portal,{children:o.jsx(v.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})}));ne.displayName=v.Content.displayName;const ie=y.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 Tt({className:e,variant:t,...a}){return o.jsx("div",{className:r(ie({variant:t}),e),...a})}const St=f.Root,de=s.forwardRef(({className:e,...t},a)=>o.jsx(f.Item,{ref:a,className:r("border-b",e),...t}));de.displayName="AccordionItem";const le=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(f.Header,{className:"flex",children:o.jsxs(f.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(g.ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));le.displayName=f.Trigger.displayName;const ce=s.forwardRef(({className:e,children:t,...a},n)=>o.jsx(f.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})}));ce.displayName=f.Content.displayName;const kt=N.Root,At=N.Trigger,me=s.forwardRef(({className:e,align:t="center",sideOffset:a=4,...n},p)=>o.jsx(N.Content,{ref:p,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}));me.displayName=N.Content.displayName;const pe=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}));pe.displayName="Textarea";const ue=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ue.displayName="Card";const fe=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex flex-col space-y-1.5 p-6",e),...t}));fe.displayName="CardHeader";const ge=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("font-semibold leading-none tracking-tight",e),...t}));ge.displayName="CardTitle";const xe=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("text-sm text-muted-foreground",e),...t}));xe.displayName="CardDescription";const be=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("p-6 pt-0",e),...t}));be.displayName="CardContent";const ve=s.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:r("flex items-center p-6 pt-0",e),...t}));ve.displayName="CardFooter";const _t=y.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),he=s.forwardRef(({className:e,...t},a)=>o.jsx(A.Root,{ref:a,className:r(_t(),e),...t}));he.displayName=A.Root.displayName;const ye=s.forwardRef(({className:e,children:t,...a},n)=>o.jsxs(u.Root,{ref:n,className:r("relative overflow-hidden",e),...a,children:[o.jsx(u.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),o.jsx(T,{}),o.jsx(u.Corner,{})]}));ye.displayName=u.Root.displayName;const T=s.forwardRef(({className:e,orientation:t="vertical",...a},n)=>o.jsx(u.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(u.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));T.displayName=u.ScrollAreaScrollbar.displayName;const Pt=x.Root,Ne=s.forwardRef(({className:e,...t},a)=>o.jsx(x.List,{ref:a,className:r("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Ne.displayName=x.List.displayName;const we=s.forwardRef(({className:e,...t},a)=>o.jsx(x.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}));we.displayName=x.Trigger.displayName;const Ce=s.forwardRef(({className:e,...t},a)=>o.jsx(x.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}));Ce.displayName=x.Content.displayName;const Mt=l.Root,zt=l.Trigger,je=l.Portal,S=s.forwardRef(({className:e,...t},a)=>o.jsx(l.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}));S.displayName=l.Overlay.displayName;const De=s.forwardRef(({className:e,...t},a)=>o.jsxs(je,{children:[o.jsx(S,{}),o.jsx(l.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})]}));De.displayName=l.Content.displayName;const Re=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});Re.displayName="AlertDialogHeader";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="AlertDialogFooter";const Se=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Title,{ref:a,className:r("text-lg font-semibold",e),...t}));Se.displayName=l.Title.displayName;const ke=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));ke.displayName=l.Description.displayName;const Ae=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Action,{ref:a,className:r(w(),e),...t}));Ae.displayName=l.Action.displayName;const _e=s.forwardRef(({className:e,...t},a)=>o.jsx(l.Cancel,{ref:a,className:r(w({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));_e.displayName=l.Cancel.displayName;const Pe=s.forwardRef(({className:e,...t},a)=>o.jsx(C.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(C.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")})}));Pe.displayName=C.Root.displayName;const Me=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Root,{ref:a,className:r("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Me.displayName=h.Root.displayName;const ze=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Image,{ref:a,className:r("aspect-square h-full w-full",e),...t}));ze.displayName=h.Image.displayName;const Ie=s.forwardRef(({className:e,...t},a)=>o.jsx(h.Fallback,{ref:a,className:r("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ie.displayName=h.Fallback.displayName;const qe=s.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...n},p)=>o.jsx(_.Root,{ref:p,decorative:a,orientation:t,className:r("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));qe.displayName=_.Root.displayName;const It=i.Root,qt=i.Trigger,Ht=i.Close,He=i.Portal,k=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}));k.displayName=i.Overlay.displayName;const Ot=y.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"}}),Oe=s.forwardRef(({side:e="right",className:t,children:a,...n},p)=>o.jsxs(He,{children:[o.jsx(k,{}),o.jsxs(i.Content,{ref:p,className:r(Ot({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(g.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));Oe.displayName=i.Content.displayName;const Fe=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col space-y-2 text-center sm:text-left",e),...t});Fe.displayName="SheetHeader";const Le=({className:e,...t})=>o.jsx("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Le.displayName="SheetFooter";const Ve=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Title,{ref:a,className:r("text-lg font-semibold text-foreground",e),...t}));Ve.displayName=i.Title.displayName;const Ge=s.forwardRef(({className:e,...t},a)=>o.jsx(i.Description,{ref:a,className:r("text-sm text-muted-foreground",e),...t}));Ge.displayName=i.Description.displayName;const Ft=({...e})=>{const{theme:t="system"}=dt.useTheme();return o.jsx(lt.Toaster,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};exports.Accordion=St;exports.AccordionContent=ce;exports.AccordionItem=de;exports.AccordionTrigger=le;exports.Alert=G;exports.AlertDescription=E;exports.AlertDialog=Mt;exports.AlertDialogAction=Ae;exports.AlertDialogCancel=_e;exports.AlertDialogContent=De;exports.AlertDialogDescription=ke;exports.AlertDialogFooter=Te;exports.AlertDialogHeader=Re;exports.AlertDialogOverlay=S;exports.AlertDialogPortal=je;exports.AlertDialogTitle=Se;exports.AlertDialogTrigger=zt;exports.AlertTitle=B;exports.Avatar=Me;exports.AvatarFallback=Ie;exports.AvatarImage=ze;exports.Badge=Tt;exports.Button=P;exports.Card=ue;exports.CardContent=be;exports.CardDescription=xe;exports.CardFooter=ve;exports.CardHeader=fe;exports.CardTitle=ge;exports.Command=R;exports.CommandDialog=yt;exports.CommandEmpty=ee;exports.CommandGroup=te;exports.CommandInput=Z;exports.CommandItem=oe;exports.CommandList=$;exports.CommandSeparator=ae;exports.CommandShortcut=re;exports.Dialog=J;exports.DialogClose=ht;exports.DialogContent=D;exports.DialogDescription=Y;exports.DialogFooter=U;exports.DialogHeader=Q;exports.DialogOverlay=j;exports.DialogPortal=K;exports.DialogTitle=W;exports.DialogTrigger=vt;exports.DropdownMenu=ct;exports.DropdownMenuCheckboxItem=H;exports.DropdownMenuContent=I;exports.DropdownMenuGroup=pt;exports.DropdownMenuItem=q;exports.DropdownMenuLabel=F;exports.DropdownMenuPortal=ut;exports.DropdownMenuRadioGroup=gt;exports.DropdownMenuRadioItem=O;exports.DropdownMenuSeparator=L;exports.DropdownMenuShortcut=V;exports.DropdownMenuSub=ft;exports.DropdownMenuSubContent=z;exports.DropdownMenuSubTrigger=M;exports.DropdownMenuTrigger=mt;exports.HoverCard=kt;exports.HoverCardContent=me;exports.HoverCardTrigger=At;exports.Input=X;exports.Label=he;exports.Popover=Nt;exports.PopoverAnchor=Ct;exports.PopoverContent=se;exports.PopoverTrigger=wt;exports.ScrollArea=ye;exports.ScrollBar=T;exports.Separator=qe;exports.Sheet=It;exports.SheetClose=Ht;exports.SheetContent=Oe;exports.SheetDescription=Ge;exports.SheetFooter=Le;exports.SheetHeader=Fe;exports.SheetOverlay=k;exports.SheetPortal=He;exports.SheetTitle=Ve;exports.SheetTrigger=qt;exports.Skeleton=xt;exports.Switch=Pe;exports.Tabs=Pt;exports.TabsContent=Ce;exports.TabsList=Ne;exports.TabsTrigger=we;exports.Textarea=pe;exports.Toaster=Ft;exports.Tooltip=Dt;exports.TooltipContent=ne;exports.TooltipProvider=jt;exports.TooltipTrigger=Rt;exports.badgeVariants=ie;exports.buttonVariants=w;exports.cn=r;
|