@chaibuilder/sdk 1.2.89 → 1.2.91

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/ui.js CHANGED
@@ -2,11 +2,10 @@ import { j as o } from "./jsx-runtime-Sp0orL4X.js";
2
2
  import * as n from "react";
3
3
  import * as m from "@radix-ui/react-toggle";
4
4
  import { cva as c } from "class-variance-authority";
5
- import { ag as r } from "./context-menu-DeUUflYX.js";
6
- import { H as ye, K as Ne, I as ve, J as we, $ as Se, a7 as Me, a6 as je, a0 as De, a4 as Te, a5 as Re, a1 as Ie, a2 as Ae, a3 as ke, ad as Pe, B as ze, f as Ge, i as Le, h as Ve, k as He, g as Fe, aj as Be, t as Ee, at as Oe, w as qe, x as _e, u as Je, y as Ke, v as Qe, av as Ue, au as We, C as Xe, aw as Ye, b as Ze, aB as $e, c as ea, ay as aa, aC as ta, aG as oa, ax as sa, az as ra, aA as na, aD as ia, aE as da, aF as la, a as ca, D as ma, m as pa, p as ua, q as fa, n as ga, o as xa, l as ba, Q as ha, a8 as Ca, U as ya, Y as Na, Z as va, W as wa, am as Sa, aq as Ma, al as ja, X as Da, _ as Ta, an as Ra, ao as Ia, ap as Aa, R as ka, a9 as Pa, ab as za, aa as Ga, N as La, L as Va, P as Ha, s as Fa, r as Ba, V as Ea, ak as Oa, ac as qa, S as _a, G as Ja, z as Ka, F as Qa, A as Ua, E as Wa, j as Xa, af as Ya, T as Za, e as $a, O as et, ae as at, d as tt, ai as ot, ah as st, ar as rt, as as nt, M as it } from "./context-menu-DeUUflYX.js";
5
+ import { al as r } from "./context-menu-9cWJcKdh.js";
6
+ import { H as ye, K as Ne, I as ve, J as we, $ as Se, a7 as Me, a6 as je, a0 as De, a4 as Te, a5 as Re, a1 as Ie, a2 as Ae, a3 as ke, ad as Pe, B as ze, f as Ge, i as Le, h as He, k as Ve, g as Fe, ao as Be, t as Oe, aB as Ee, w as qe, x as Je, u as Ke, y as _e, v as Qe, aD as Ue, aC as We, C as Xe, aE as Ye, b as Ze, aJ as $e, c as ea, aG as aa, aK as ta, aO as oa, aF as sa, aH as ra, aI as na, aL as ia, aM as da, aN as la, a as ca, D as ma, m as pa, p as ua, q as fa, n as ga, o as xa, l as ba, Q as ha, a8 as Ca, U as ya, Y as Na, Z as va, W as wa, au as Sa, ay as Ma, at as ja, X as Da, _ as Ta, av as Ra, aw as Ia, ax as Aa, R as ka, a9 as Pa, ab as za, aa as Ga, N as La, L as Ha, P as Va, s as Fa, r as Ba, V as Oa, ap as Ea, ae as qa, ah as Ja, aq as Ka, ai as _a, ar as Qa, as as Ua, af as Wa, ag as Xa, ac as Ya, S as Za, G as $a, z as et, F as at, A as tt, E as ot, j as st, ak as rt, T as nt, e as it, O as dt, aj as lt, d as ct, an as mt, am as pt, az as ut, aA as ft, M as gt } from "./context-menu-9cWJcKdh.js";
7
7
  import { ChevronRightIcon as g, CheckIcon as x, DotFilledIcon as b, Cross2Icon as h } from "@radix-ui/react-icons";
8
8
  import * as s from "@radix-ui/react-menubar";
9
- import { S as lt, d as ct, a as mt, f as pt, e as ut, g as ft, c as gt, b as xt } from "./select-nNzJ_AuC.js";
10
9
  import * as d from "@radix-ui/react-dialog";
11
10
  import "@radix-ui/react-switch";
12
11
  import "@radix-ui/react-accordion";
@@ -18,6 +17,7 @@ import "@radix-ui/react-tabs";
18
17
  import "@radix-ui/react-tooltip";
19
18
  import "@radix-ui/react-popover";
20
19
  import "@radix-ui/react-hover-card";
20
+ import "@radix-ui/react-select";
21
21
  import "@radix-ui/react-dropdown-menu";
22
22
  import "@radix-ui/react-separator";
23
23
  import "@radix-ui/react-toast";
@@ -25,7 +25,6 @@ import "cmdk";
25
25
  import "@radix-ui/react-context-menu";
26
26
  import "clsx";
27
27
  import "tailwind-merge";
28
- import "@radix-ui/react-select";
29
28
  const C = c(
30
29
  "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground 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=on]:bg-accent data-[state=on]:text-accent-foreground",
31
30
  {
@@ -223,7 +222,7 @@ const L = c(
223
222
  side: "right"
224
223
  }
225
224
  }
226
- ), V = n.forwardRef(
225
+ ), H = n.forwardRef(
227
226
  ({ side: e = "right", className: a, children: t, ...i }, l) => /* @__PURE__ */ o.jsxs(p, { children: [
228
227
  /* @__PURE__ */ o.jsx(u, {}),
229
228
  /* @__PURE__ */ o.jsxs(d.Content, { ref: l, className: r(L({ side: e }), a), ...i, children: [
@@ -235,15 +234,15 @@ const L = c(
235
234
  ] })
236
235
  ] })
237
236
  );
238
- V.displayName = d.Content.displayName;
239
- const H = ({ className: e, ...a }) => /* @__PURE__ */ o.jsx("div", { className: r("flex flex-col space-y-2 text-center sm:text-left", e), ...a });
240
- H.displayName = "SheetHeader";
237
+ H.displayName = d.Content.displayName;
238
+ const V = ({ className: e, ...a }) => /* @__PURE__ */ o.jsx("div", { className: r("flex flex-col space-y-2 text-center sm:text-left", e), ...a });
239
+ V.displayName = "SheetHeader";
241
240
  const F = ({ className: e, ...a }) => /* @__PURE__ */ o.jsx("div", { className: r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...a });
242
241
  F.displayName = "SheetFooter";
243
242
  const B = n.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(d.Title, { ref: t, className: r("text-lg font-semibold text-foreground", e), ...a }));
244
243
  B.displayName = d.Title.displayName;
245
- const E = n.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(d.Description, { ref: t, className: r("text-sm text-muted-foreground", e), ...a }));
246
- E.displayName = d.Description.displayName;
244
+ const O = n.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o.jsx(d.Description, { ref: t, className: r("text-sm text-muted-foreground", e), ...a }));
245
+ O.displayName = d.Description.displayName;
247
246
  export {
248
247
  ye as Accordion,
249
248
  Ne as AccordionContent,
@@ -265,16 +264,16 @@ export {
265
264
  ze as Button,
266
265
  Ge as Card,
267
266
  Le as CardContent,
268
- Ve as CardDescription,
269
- He as CardFooter,
267
+ He as CardDescription,
268
+ Ve as CardFooter,
270
269
  Fe as CardHeader,
271
270
  Be as CardTitle,
272
- Ee as Command,
273
- Oe as CommandDialog,
271
+ Oe as Command,
272
+ Ee as CommandDialog,
274
273
  qe as CommandEmpty,
275
- _e as CommandGroup,
276
- Je as CommandInput,
277
- Ke as CommandItem,
274
+ Je as CommandGroup,
275
+ Ke as CommandInput,
276
+ _e as CommandItem,
278
277
  Qe as CommandList,
279
278
  Ue as CommandSeparator,
280
279
  We as CommandShortcut,
@@ -319,7 +318,7 @@ export {
319
318
  za as HoverCardContent,
320
319
  Ga as HoverCardTrigger,
321
320
  La as Input,
322
- Va as Label,
321
+ Ha as Label,
323
322
  M as Menubar,
324
323
  A as MenubarCheckboxItem,
325
324
  R as MenubarContent,
@@ -336,46 +335,46 @@ export {
336
335
  T as MenubarSubContent,
337
336
  D as MenubarSubTrigger,
338
337
  j as MenubarTrigger,
339
- Ha as Popover,
338
+ Va as Popover,
340
339
  Fa as PopoverContent,
341
340
  Ba as PopoverTrigger,
342
- Ea as ScrollArea,
343
- Oa as ScrollBar,
344
- lt as Select,
345
- ct as SelectContent,
346
- mt as SelectGroup,
347
- pt as SelectItem,
348
- ut as SelectLabel,
349
- ft as SelectSeparator,
350
- gt as SelectTrigger,
351
- xt as SelectValue,
352
- qa as Separator,
341
+ Oa as ScrollArea,
342
+ Ea as ScrollBar,
343
+ qa as Select,
344
+ Ja as SelectContent,
345
+ Ka as SelectGroup,
346
+ _a as SelectItem,
347
+ Qa as SelectLabel,
348
+ Ua as SelectSeparator,
349
+ Wa as SelectTrigger,
350
+ Xa as SelectValue,
351
+ Ya as Separator,
353
352
  ge as Sheet,
354
353
  be as SheetClose,
355
- V as SheetContent,
356
- E as SheetDescription,
354
+ H as SheetContent,
355
+ O as SheetDescription,
357
356
  F as SheetFooter,
358
- H as SheetHeader,
357
+ V as SheetHeader,
359
358
  B as SheetTitle,
360
359
  xe as SheetTrigger,
361
- _a as Skeleton,
362
- Ja as Switch,
363
- Ka as Tabs,
364
- Qa as TabsContent,
365
- Ua as TabsList,
366
- Wa as TabsTrigger,
367
- Xa as Textarea,
368
- Ya as Toaster,
360
+ Za as Skeleton,
361
+ $a as Switch,
362
+ et as Tabs,
363
+ at as TabsContent,
364
+ tt as TabsList,
365
+ ot as TabsTrigger,
366
+ st as Textarea,
367
+ rt as Toaster,
369
368
  y as Toggle,
370
- Za as Tooltip,
371
- $a as TooltipContent,
372
- et as TooltipPortal,
373
- at as TooltipProvider,
374
- tt as TooltipTrigger,
375
- ot as badgeVariants,
376
- st as buttonVariants,
377
- rt as reducer,
378
- nt as toast,
369
+ nt as Tooltip,
370
+ it as TooltipContent,
371
+ dt as TooltipPortal,
372
+ lt as TooltipProvider,
373
+ ct as TooltipTrigger,
374
+ mt as badgeVariants,
375
+ pt as buttonVariants,
376
+ ut as reducer,
377
+ ft as toast,
379
378
  C as toggleVariants,
380
- it as useToast
379
+ gt as useToast
381
380
  };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author": "Suraj Air",
6
6
  "license": "BSD-3-Clause",
7
7
  "homepage": "https://chaibuilder.com",
8
- "version": "1.2.89",
8
+ "version": "1.2.91",
9
9
  "type": "module",
10
10
  "repository": {
11
11
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "e2e": "playwright test",
28
28
  "e2e:report": "playwright show-report",
29
29
  "e2e:ui": "playwright test --ui",
30
- "docs": "typedoc --plugin typedoc-github-theme",
30
+ "docs": "typedoc --plugin typedoc-plugin-clarity",
31
31
  "prepare": "husky"
32
32
  },
33
33
  "exports": {
@@ -180,6 +180,7 @@
180
180
  "ts-node": "^10.9.2",
181
181
  "typedoc": "^0.26.7",
182
182
  "typedoc-github-theme": "^0.1.2",
183
+ "typedoc-plugin-clarity": "^1.6.0",
183
184
  "typescript": "^5.2.2",
184
185
  "vite": "^5.0.12",
185
186
  "vite-plugin-dts": "^3.6.3",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),b=require("@monaco-editor/react"),k=require("./context-menu--DZnHfxj.cjs"),C=require("react-i18next"),u=require("react"),n=require("./index-dsyGOJ1S.cjs"),E=require("@radix-ui/react-icons"),R=require("@react-hookz/web");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("lodash-es");require("jotai");require("./iconBase-vJD0OXxU.cjs");require("@chaibuilder/runtime");require("./plugin-_F-KZp1i.cjs");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const a=s=>{const i=document.createElement("div");return i.innerHTML=s,i.innerHTML};function g(){const{t:s}=C.useTranslation(),[i,d]=u.useState(!1),[l,q]=u.useState(""),[r,o]=n.useCodeEditor(),[c]=n.useSelectedBlockIds(),x=n.useUpdateBlocksProps(),m=n.useUpdateBlocksPropsRealtime(),p=R.useThrottledCallback(t=>{const h=a(t);m([r.blockId],{[r.blockProp]:h})},[],300),j=u.useCallback(()=>{if(i){const t=a(l);x([r.blockId],{[r.blockProp]:t})}},[i,l]);u.useEffect(()=>{c.includes(r==null?void 0:r.blockId)||(j(),o(null))},[c]);const f=()=>{o(null)};return e.jsxRuntimeExports.jsxs("div",{className:"h-full rounded-t-lg border-t-4 border-black bg-black text-white",children:[e.jsxRuntimeExports.jsx("button",{onClick:f,className:"fixed inset-0 z-[100000] cursor-default bg-gray-400/20"}),e.jsxRuntimeExports.jsxs("div",{className:"relative z-[100001] h-full w-full flex-col gap-y-1",children:[e.jsxRuntimeExports.jsxs("div",{className:"-mt-1 flex items-center justify-between px-2 py-2",children:[e.jsxRuntimeExports.jsxs("h3",{className:"space-x-3 text-sm font-semibold",children:[e.jsxRuntimeExports.jsx("span",{children:s("HTML Code Editor |")}),e.jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-400",children:s("Scripts will be only executed in preview and live mode.")})]}),e.jsxRuntimeExports.jsx("div",{className:"flex gap-x-2",children:e.jsxRuntimeExports.jsx(k.Button,{onClick:()=>o(null),size:"sm",variant:"destructive",className:"h-6 w-fit",children:e.jsxRuntimeExports.jsx(E.Cross2Icon,{})})})]}),e.jsxRuntimeExports.jsx(b,{onMount:t=>{t.setValue(r.initialCode)},onChange:t=>{d(!0),q(t),p(t)},height:"100%",defaultLanguage:"html",theme:"vs-dark",defaultValue:"",options:{minimap:{enabled:!1}}})]})]})}exports.default=g;
@@ -1,144 +0,0 @@
1
- import { j as e } from "./jsx-runtime-Sp0orL4X.js";
2
- import l, { Suspense as m } from "react";
3
- import { FontFamilyIcon as d, EyeOpenIcon as u } from "@radix-ui/react-icons";
4
- import { S as h, c as j, b as g, d as f, a as v, e as b, f as n } from "./select-nNzJ_AuC.js";
5
- import { d as a, e as N, F as S, f as w } from "./index-dee0FZm6.js";
6
- import { B as c, S as p, ac as y } from "./context-menu-DeUUflYX.js";
7
- import { useTranslation as x } from "react-i18next";
8
- import { c as C } from "./iconBase-zweRWSz0.js";
9
- import "@radix-ui/react-select";
10
- import "lodash-es";
11
- import "jotai";
12
- import "@chaibuilder/runtime";
13
- import "./plugin-sJ3Hzvpv.js";
14
- import "@react-hookz/web";
15
- import "tree-model";
16
- import "react-quill";
17
- import "./STRINGS-TDN5UhWi.js";
18
- import "flagged";
19
- import "react-hotkeys-hook";
20
- import "@floating-ui/dom";
21
- import "@floating-ui/react-dom";
22
- import "react-event-hook";
23
- import "@tailwindcss/typography";
24
- import "@tailwindcss/forms";
25
- import "@tailwindcss/aspect-ratio";
26
- import "tailwindcss-palette-generator";
27
- import "tailwind-merge";
28
- import "react-wrap-balancer";
29
- import "react-dom";
30
- import "prop-types";
31
- import "react-error-boundary";
32
- import "re-resizable";
33
- import "lucide-react";
34
- import "@rjsf/validator-ajv8";
35
- import "@rjsf/core";
36
- import "react-arborist";
37
- import "himalaya";
38
- import "react-icons-picker";
39
- import "react-autosuggest";
40
- import "fuse.js";
41
- import "clsx";
42
- import "i18next";
43
- import "@radix-ui/react-scroll-area";
44
- import "framer-motion";
45
- import "@radix-ui/react-switch";
46
- import "@radix-ui/react-accordion";
47
- import "class-variance-authority";
48
- import "@radix-ui/react-alert-dialog";
49
- import "@radix-ui/react-slot";
50
- import "@radix-ui/react-label";
51
- import "@radix-ui/react-tabs";
52
- import "@radix-ui/react-tooltip";
53
- import "@radix-ui/react-popover";
54
- import "@radix-ui/react-hover-card";
55
- import "@radix-ui/react-dropdown-menu";
56
- import "@radix-ui/react-separator";
57
- import "@radix-ui/react-toast";
58
- import "cmdk";
59
- import "@radix-ui/react-dialog";
60
- import "@radix-ui/react-context-menu";
61
- const k = () => a("languages", ["en"]), A = () => k().length === 1 ? null : /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(h, { children: [
62
- /* @__PURE__ */ e.jsx(j, { className: "w-[150px] border-0", children: /* @__PURE__ */ e.jsx(
63
- g,
64
- {
65
- placeholder: /* @__PURE__ */ e.jsxs("span", { className: "flex items-center", children: [
66
- /* @__PURE__ */ e.jsx(d, { className: "h-4 w-4" }),
67
- " English(US)"
68
- ] })
69
- }
70
- ) }),
71
- /* @__PURE__ */ e.jsx(f, { children: /* @__PURE__ */ e.jsxs(v, { children: [
72
- /* @__PURE__ */ e.jsx(b, { children: "Fruits" }),
73
- /* @__PURE__ */ e.jsx(n, { value: "apple", children: "Apple" }),
74
- /* @__PURE__ */ e.jsx(n, { value: "banana", children: "Banana" }),
75
- /* @__PURE__ */ e.jsx(n, { value: "blueberry", children: "Blueberry" }),
76
- /* @__PURE__ */ e.jsx(n, { value: "grapes", children: "Grapes" }),
77
- /* @__PURE__ */ e.jsx(n, { value: "pineapple", children: "Pineapple" })
78
- ] }) })
79
- ] }) }), B = () => {
80
- const { savePage: i, saveState: t } = N(), { t: s } = x(), o = /* @__PURE__ */ e.jsxs(
81
- c,
82
- {
83
- disabled: t === "SAVING",
84
- onClick: (r) => {
85
- r.preventDefault(), i();
86
- },
87
- className: C(
88
- "flex h-auto w-fit items-center gap-x-2 p-1 px-2",
89
- // UNSAVED sate
90
- "bg-gray-200 text-gray-500 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400",
91
- {
92
- "animate-pulse bg-gray-300 text-gray-900": t === "SAVING",
93
- "bg-green-500 text-white hover:bg-green-600 hover:text-white dark:bg-green-600 dark:text-white": t === "SAVED"
94
- }
95
- ),
96
- size: "sm",
97
- variant: "outline",
98
- children: [
99
- /* @__PURE__ */ e.jsx(S, { className: "text-sm text-white" }),
100
- /* @__PURE__ */ e.jsx("span", { className: "text-sm", children: s(t === "SAVING" ? "saving" : t === "SAVED" ? "saved" : "unsaved") })
101
- ]
102
- }
103
- );
104
- return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: o });
105
- }, P = function() {
106
- const t = a("previewComponent"), [, s] = w(), { t: o } = x();
107
- return t ? /* @__PURE__ */ e.jsxs(
108
- c,
109
- {
110
- onClick: (r) => {
111
- r.preventDefault(), s(!0);
112
- },
113
- className: "flex h-auto w-fit items-center gap-x-2 p-1 px-2",
114
- size: "sm",
115
- variant: "outline",
116
- children: [
117
- /* @__PURE__ */ e.jsx(u, { className: "text-xs" }),
118
- /* @__PURE__ */ e.jsx("span", { className: "text-sm", children: o("preview") })
119
- ]
120
- }
121
- ) : null;
122
- }, Le = () => {
123
- const i = a("topBarComponents.left", []), t = a("topBarComponents.center", []), s = a("topBarComponents.right", []), o = a("editable", !0);
124
- return /* @__PURE__ */ e.jsxs("div", { className: "flex h-14 items-center justify-between px-2", children: [
125
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-2 font-bold", children: l.Children.toArray(
126
- i.map((r) => /* @__PURE__ */ e.jsx(m, { fallback: /* @__PURE__ */ e.jsx(p, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(r, {}) }))
127
- ) }) }),
128
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center space-x-2", children: l.Children.toArray(
129
- t.map((r) => /* @__PURE__ */ e.jsx(m, { fallback: /* @__PURE__ */ e.jsx(p, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(r, {}) }))
130
- ) }),
131
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-1", children: [
132
- /* @__PURE__ */ e.jsx(A, {}),
133
- /* @__PURE__ */ e.jsx(P, {}),
134
- /* @__PURE__ */ e.jsx(y, { orientation: "vertical" }),
135
- o ? /* @__PURE__ */ e.jsx(B, {}) : null,
136
- l.Children.toArray(
137
- s.map((r) => /* @__PURE__ */ e.jsx(m, { fallback: /* @__PURE__ */ e.jsx(p, { className: "h-10" }), children: /* @__PURE__ */ e.jsx(r, {}) }))
138
- )
139
- ] })
140
- ] });
141
- };
142
- export {
143
- Le as default
144
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),u=require("react"),o=require("@radix-ui/react-icons"),r=require("./select-Siy0CQZ0.cjs"),i=require("./index-dsyGOJ1S.cjs"),x=require("./context-menu--DZnHfxj.cjs"),c=require("react-i18next"),p=require("./iconBase-vJD0OXxU.cjs");require("@radix-ui/react-select");require("lodash-es");require("jotai");require("@chaibuilder/runtime");require("./plugin-_F-KZp1i.cjs");require("@react-hookz/web");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("tailwind-merge");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("lucide-react");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("clsx");require("i18next");require("@radix-ui/react-scroll-area");require("framer-motion");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");const m=()=>i.useBuilderProp("languages",["en"]),j=()=>m().length===1?null:e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:e.jsxRuntimeExports.jsxs(r.Select,{children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[150px] border-0",children:e.jsxRuntimeExports.jsx(r.SelectValue,{placeholder:e.jsxRuntimeExports.jsxs("span",{className:"flex items-center",children:[e.jsxRuntimeExports.jsx(o.FontFamilyIcon,{className:"h-4 w-4"})," English(US)"]})})}),e.jsxRuntimeExports.jsx(r.SelectContent,{children:e.jsxRuntimeExports.jsxs(r.SelectGroup,{children:[e.jsxRuntimeExports.jsx(r.SelectLabel,{children:"Fruits"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"apple",children:"Apple"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"banana",children:"Banana"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"blueberry",children:"Blueberry"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"grapes",children:"Grapes"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"pineapple",children:"Pineapple"})]})})]})}),q=()=>{const{savePage:a,saveState:s}=i.useSavePage(),{t:n}=c.useTranslation(),l=e.jsxRuntimeExports.jsxs(x.Button,{disabled:s==="SAVING",onClick:t=>{t.preventDefault(),a()},className:p.cn("flex h-auto w-fit items-center gap-x-2 p-1 px-2","bg-gray-200 text-gray-500 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400",{"animate-pulse bg-gray-300 text-gray-900":s==="SAVING","bg-green-500 text-white hover:bg-green-600 hover:text-white dark:bg-green-600 dark:text-white":s==="SAVED"}),size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(i.FaCheck,{className:"text-sm text-white"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:n(s==="SAVING"?"saving":s==="SAVED"?"saved":"unsaved")})]});return e.jsxRuntimeExports.jsx("div",{className:"flex items-center",children:l})},d=function(){const s=i.useBuilderProp("previewComponent"),[,n]=i.usePreviewMode(),{t:l}=c.useTranslation();return s?e.jsxRuntimeExports.jsxs(x.Button,{onClick:t=>{t.preventDefault(),n(!0)},className:"flex h-auto w-fit items-center gap-x-2 p-1 px-2",size:"sm",variant:"outline",children:[e.jsxRuntimeExports.jsx(o.EyeOpenIcon,{className:"text-xs"}),e.jsxRuntimeExports.jsx("span",{className:"text-sm",children:l("preview")})]}):null},h=()=>{const a=i.useBuilderProp("topBarComponents.left",[]),s=i.useBuilderProp("topBarComponents.center",[]),n=i.useBuilderProp("topBarComponents.right",[]),l=i.useBuilderProp("editable",!0);return e.jsxRuntimeExports.jsxs("div",{className:"flex h-14 items-center justify-between px-2",children:[e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2 font-bold",children:u.Children.toArray(a.map(t=>e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx(x.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))})}),e.jsxRuntimeExports.jsx("div",{className:"flex items-center space-x-2",children:u.Children.toArray(s.map(t=>e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx(x.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxRuntimeExports.jsx(j,{}),e.jsxRuntimeExports.jsx(d,{}),e.jsxRuntimeExports.jsx(x.Separator,{orientation:"vertical"}),l?e.jsxRuntimeExports.jsx(q,{}):null,u.Children.toArray(n.map(t=>e.jsxRuntimeExports.jsx(u.Suspense,{fallback:e.jsxRuntimeExports.jsx(x.Skeleton,{className:"h-10"}),children:e.jsxRuntimeExports.jsx(t,{})})))]})]})};exports.default=h;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),n=require("react"),p=require("lodash-es"),A=require("unsplash-js"),f=require("./context-menu--DZnHfxj.cjs"),_=require("react-i18next"),g=require("./index-dsyGOJ1S.cjs"),T=require("@react-hookz/web"),B=require("lucide-react");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("jotai");require("./iconBase-vJD0OXxU.cjs");require("@chaibuilder/runtime");require("./plugin-_F-KZp1i.cjs");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const v=async(h,j)=>new Promise((i,a)=>{A.createApi({accessKey:j}).search.getPhotos(h).then(l=>{i(l)}).catch(l=>a(l))}),D=({isModalView:h,onSelect:j})=>{const i=g.useBuilderProp("unsplashAccessKey",""),[a,q]=n.useState([]),[l,b]=n.useState(0),[o,w]=n.useState(),[u,k]=n.useState(),[C,y]=n.useState(0),[d,P]=T.useDebouncedState("",1e3),[m,c]=n.useState(!1),{t:E}=_.useTranslation(),I=async r=>{if(p.isEmpty(d))return;let t=l+1;r&&(r.preventDefault(),t=1),c(!0),b(t);const x={query:d,page:t};o&&(x.orientation=o),u&&(x.color=u),v(x,i).then(s=>{var R,N,S;q(t===1?((R=s==null?void 0:s.response)==null?void 0:R.results)||[]:[...a,...((N=s==null?void 0:s.response)==null?void 0:N.results)||[]]),y((S=s==null?void 0:s.response)==null?void 0:S.total_pages),c(!1)}).catch(()=>{c(!1)})};return n.useEffect(()=>{if(!p.isEmpty(d)&&i){c(!0);const r={query:d,page:1};o&&(r.orientation=o),u&&(r.color=u),b(1),v(r,i).then(t=>{var x,s;q(((x=t==null?void 0:t.response)==null?void 0:x.results)||[]),y((s=t==null?void 0:t.response)==null?void 0:s.total_pages),c(!1)}).catch(()=>{c(!1)})}},[o,u,d,i]),p.isEmpty(i)?e.jsxRuntimeExports.jsx("div",{className:"flex h-full flex-col items-center justify-center",children:e.jsxRuntimeExports.jsxs("p",{className:"max-w-3xl text-center text-gray-500",children:["To enable Unsplash, kindly provide your",e.jsxRuntimeExports.jsx("a",{href:"https://unsplash.com/documentation#public-authentication",className:"px-1 underline hover:text-blue-400",target:"_blank",rel:"noopener noreferrer",children:"Unsplash Access Key"})]})}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs("form",{className:"flex items-center gap-x-2 rounded-md border border-border bg-background p-px",children:[e.jsxRuntimeExports.jsx(f.Input,{type:"text",name:"query",className:"text-foreground",placeholder:'Try "dog" or "apple"',onChange:r=>P(r.target.value)}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(g.ChaiSelect,{className:"w-40",placeholder:E("Orientation"),options:[{value:"",label:"All"},{value:"landscape",label:"Landscape"},{value:"portrait",label:"Portrait"},{value:"squarish",label:"Square"}],defaultValue:o,onValueChange:r=>w(r)})}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(g.ChaiSelect,{placeholder:E("Color"),options:[{value:"",label:"All"},{value:"black_and_white",label:"Black and White"},{value:"black",label:"Black"},{value:"white",label:"White"},{value:"night",label:"Night"},{value:"warm",label:"Warm"},{value:"cool",label:"Cool"},{value:"sepia",label:"Sepia"}],defaultValue:u,onValueChange:r=>k(r)})})]}),e.jsxRuntimeExports.jsxs(f.ScrollArea,{className:`h-full ${h&&!p.isEmpty(a)?"-mx-2 flex flex-wrap px-2":"-mx-2 flex flex-col pb-8 pt-2"}`,children:[p.isEmpty(a)&&!m&&e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center py-6",children:[e.jsxRuntimeExports.jsx("div",{className:"font-medium",children:"No Data"}),e.jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-500",children:"Enter query and press enter"})]}),h?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:a.map(r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>j(r.urls.regular),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:r.alt_description,src:r.urls.small})})},r.id))}):a.map(r=>e.jsxRuntimeExports.jsx("div",{className:"w-full px-2 py-1",children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:r.alt_description,src:r.urls.small})})},r.id)),m&&e.jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-center py-8",children:[e.jsxRuntimeExports.jsx(B.Loader,{className:"h-6 w-6 animate-spin"}),"  Loading..."]}),!p.isEmpty(a)&&l<C&&!m&&e.jsxRuntimeExports.jsx(f.Button,{size:"sm",variant:"link",className:"w-full",onClick:()=>I(void 0),disabled:m,children:m?"":"Load More"})]})]})};exports.default=D;exports.fetchImage=v;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-JYMCiFoE.cjs"),i=require("react"),n=require("lodash-es"),E=require("jotai"),I=require("./context-menu--DZnHfxj.cjs"),w=require("react-i18next"),g=require("./index-dsyGOJ1S.cjs"),b=require("lucide-react");require("@radix-ui/react-switch");require("@radix-ui/react-accordion");require("@radix-ui/react-icons");require("class-variance-authority");require("@radix-ui/react-alert-dialog");require("@radix-ui/react-slot");require("@radix-ui/react-label");require("@radix-ui/react-scroll-area");require("@radix-ui/react-tabs");require("@radix-ui/react-tooltip");require("@radix-ui/react-popover");require("@radix-ui/react-hover-card");require("@radix-ui/react-dropdown-menu");require("@radix-ui/react-separator");require("@radix-ui/react-toast");require("cmdk");require("@radix-ui/react-dialog");require("@radix-ui/react-context-menu");require("clsx");require("tailwind-merge");require("./iconBase-vJD0OXxU.cjs");require("@chaibuilder/runtime");require("./plugin-_F-KZp1i.cjs");require("@react-hookz/web");require("tree-model");require("react-quill");require("./STRINGS-Yl7cSWDc.cjs");require("flagged");require("react-hotkeys-hook");require("@floating-ui/dom");require("@floating-ui/react-dom");require("react-event-hook");require("@tailwindcss/typography");require("@tailwindcss/forms");require("@tailwindcss/aspect-ratio");require("tailwindcss-palette-generator");require("react-wrap-balancer");require("react-dom");require("prop-types");require("react-error-boundary");require("re-resizable");require("@rjsf/validator-ajv8");require("@rjsf/core");require("react-arborist");require("himalaya");require("react-icons-picker");require("react-autosuggest");require("fuse.js");require("i18next");require("framer-motion");const k=E.atom([]),S=({isModalView:a,onSelect:o})=>{const{t:s}=w.useTranslation(),d=g.useBuilderProp("uploadMediaCallback"),x=g.useBuilderProp("fetchMediaCallback"),[u,c]=E.useAtom(k),[R,p]=i.useState(!1),[j,q]=i.useState(!1),[,y]=i.useState(),[h,m]=i.useState("");i.useEffect(()=>{(async()=>{if(!x)return;q(!0);const r=await x();c(r||[]),q(!1)})()},[]);const N=r=>{var t,l;if(m(""),r&&((l=(t=r==null?void 0:r.target)==null?void 0:t.files)==null?void 0:l.length)>0){const f=r.target.files[0];f.type.startsWith("image")?v(f):m(s("Please select an image"))}},v=async r=>{if(d){p(!0);try{const{url:t}=await d(r);o(t),y(void 0);const l=await x();c(l)}catch(t){c([]),m((t==null?void 0:t.message)||"Something went wrong.")}p(!1)}};return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("label",{htmlFor:a?"upload-in-modal":"upload-in-panel",children:[e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center rounded-lg",children:e.jsxRuntimeExports.jsxs("label",{htmlFor:"image-upload",className:"flex w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed border-border",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center pb-6 pt-5",children:[e.jsxRuntimeExports.jsx(b.Upload,{className:"mb-3 h-10 w-10 text-gray-400"}),e.jsxRuntimeExports.jsx("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:e.jsxRuntimeExports.jsx("span",{className:"font-semibold",children:s("Click to upload")})}),e.jsxRuntimeExports.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:s("SVG, PNG, JPG or GIF (Max. 2mb)")})]}),R?e.jsxRuntimeExports.jsxs("div",{className:"flex h-full w-full items-center justify-center",children:[e.jsxRuntimeExports.jsx(b.Loader,{className:"h-6 w-6 animate-spin"}),e.jsxRuntimeExports.jsx("span",{className:"ml-2 text-sm text-gray-500",children:s("Uploading...")})]}):null,h&&e.jsxRuntimeExports.jsx("p",{className:"pb-2 text-xs text-red-500",children:h||s("Something went wrong")})]})}),e.jsxRuntimeExports.jsx("input",{type:"file",id:"image-upload",accept:"image/*",hidden:!0,onChange:N})]}),e.jsxRuntimeExports.jsxs(I.ScrollArea,{className:`-mx-2 flex h-full flex-col pb-8 pt-2 ${a?"px-2":""} pt-2`,children:[n.isEmpty(u)&&j&&e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center justify-center py-6",children:e.jsxRuntimeExports.jsx("div",{className:"animate-pulse font-medium",children:s("Fetching...")})}),n.isEmpty(u)&&!j&&e.jsxRuntimeExports.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsxRuntimeExports.jsx("div",{className:"mb-4 h-12 rounded-full p-6"}),e.jsxRuntimeExports.jsx("h3",{className:"mb-2 text-sm font-semibold",children:s("No images found")}),e.jsxRuntimeExports.jsx("p",{className:"mb-4 max-w-sm text-muted-foreground",children:s("It looks like you haven't uploaded any images yet. Start by clicking the upload button above.")})]}),a?e.jsxRuntimeExports.jsx("div",{className:"h-full columns-5 py-2",children:n.map(u,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"my-1 flex",onClick:()=>o(r.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto flex-1 cursor-pointer rounded-md transition duration-300 ease-in-out hover:scale-105",alt:r.name,src:r.thumbUrl})})},r.id))}):n.map(u,r=>e.jsxRuntimeExports.jsx("div",{role:"button",tabIndex:0,className:"px-2 py-1",onClick:()=>o(r.url),children:e.jsxRuntimeExports.jsx("div",{className:"relative overflow-hidden rounded-md bg-cover bg-no-repeat",children:e.jsxRuntimeExports.jsx("img",{className:"h-auto w-full cursor-pointer transition duration-300 ease-in-out hover:scale-105",alt:r.name,src:r.url})})},r.id))]})]})};exports.default=S;
@@ -1 +0,0 @@
1
- "use strict";const a=require("./jsx-runtime-JYMCiFoE.cjs"),ot=require("@radix-ui/react-switch"),at=require("react"),st=require("@radix-ui/react-accordion"),f=require("@radix-ui/react-icons"),w=require("class-variance-authority"),rt=require("@radix-ui/react-alert-dialog"),nt=require("@radix-ui/react-slot"),it=require("@radix-ui/react-label"),dt=require("@radix-ui/react-scroll-area"),lt=require("@radix-ui/react-tabs"),mt=require("@radix-ui/react-tooltip"),ct=require("@radix-ui/react-popover"),pt=require("@radix-ui/react-hover-card"),ut=require("@radix-ui/react-dropdown-menu"),xt=require("@radix-ui/react-separator"),ft=require("@radix-ui/react-toast"),p=require("cmdk"),gt=require("@radix-ui/react-dialog"),bt=require("@radix-ui/react-context-menu"),jt=require("clsx"),yt=require("tailwind-merge");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const M=c(ot),r=c(at),b=c(st),m=c(rt),P=c(it),g=c(dt),j=c(lt),y=c(mt),N=c(ct),C=c(pt),i=c(ut),z=c(xt),x=c(ft),u=c(gt),d=c(bt),s=(...e)=>yt.twMerge(jt.clsx(e)),O=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(M.Root,{className:s("peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",e),...t,ref:o,children:a.jsxRuntimeExports.jsx(M.Thumb,{className:s("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950")})}));O.displayName=M.Root.displayName;const E=w.cva("inline-flex items-center justify-center 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",{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"}}),L=r.forwardRef(({className:e,variant:t,size:o,asChild:n=!1,...l},T)=>{const tt=n?nt.Slot:"button";return a.jsxRuntimeExports.jsx(tt,{className:s(E({variant:t,size:o,className:e})),ref:T,...l})});L.displayName="Button";const vt=b.Root,q=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(b.Item,{ref:o,className:s("border-b",e),...t}));q.displayName="AccordionItem";const H=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsx(b.Header,{className:"flex",children:a.jsxRuntimeExports.jsxs(b.Trigger,{ref:n,className:s("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o,children:[t,o.hideArrow?null:a.jsxRuntimeExports.jsx(f.ChevronDownIcon,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));H.displayName=b.Trigger.displayName;const V=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsx(b.Content,{ref:n,className:s("text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:a.jsxRuntimeExports.jsx("div",{className:"pb-4 pt-0",children:t})}));V.displayName=b.Content.displayName;const G=w.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"}}),Nt=({className:e,variant:t,...o})=>a.jsxRuntimeExports.jsx("div",{className:s(G({variant:t}),e),...o}),ht=m.Root,Rt=m.Trigger,F=({className:e,...t})=>a.jsxRuntimeExports.jsx(m.Portal,{className:s(e),...t});F.displayName=m.Portal.displayName;const B=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Overlay,{className:s("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm 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:o}));B.displayName=m.Overlay.displayName;const U=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsxs(F,{children:[a.jsxRuntimeExports.jsx(B,{}),a.jsxRuntimeExports.jsx(m.Content,{ref:o,className:s("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 md:w-full",e),...t})]}));U.displayName=m.Content.displayName;const Q=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col space-y-2 text-center sm:text-left",e),...t});Q.displayName="AlertDialogHeader";const X=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});X.displayName="AlertDialogFooter";const Y=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Title,{ref:o,className:s("text-lg font-semibold",e),...t}));Y.displayName=m.Title.displayName;const J=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));J.displayName=m.Description.displayName;const K=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Action,{ref:o,className:s(E(),e),...t}));K.displayName=m.Action.displayName;const W=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(m.Cancel,{ref:o,className:s(E({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));W.displayName=m.Cancel.displayName;const Z=u.Root,wt=u.Trigger,$=({className:e,...t})=>a.jsxRuntimeExports.jsx(u.Portal,{className:s(e),...t});$.displayName=u.Portal.displayName;const ee=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Overlay,{ref:o,className:s("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ee.displayName=u.Overlay.displayName;const k=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs($,{children:[a.jsxRuntimeExports.jsx(ee,{}),a.jsxRuntimeExports.jsxs(u.Content,{ref:n,className:s("fixed left-[50%] top-[50%] z-[999] 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 md:w-full",e),...o,children:[t,a.jsxRuntimeExports.jsxs(u.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:[a.jsxRuntimeExports.jsx(f.Cross2Icon,{className:"h-4 w-4"}),a.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));k.displayName=u.Content.displayName;const te=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});te.displayName="DialogHeader";const oe=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});oe.displayName="DialogFooter";const ae=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Title,{ref:o,className:s("text-lg font-semibold leading-none tracking-tight",e),...t}));ae.displayName=u.Title.displayName;const se=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(u.Description,{ref:o,className:s("text-sm text-muted-foreground",e),...t}));se.displayName=u.Description.displayName;const re=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("rounded-xl border bg-card text-card-foreground shadow",e),...t}));re.displayName="Card";const ne=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("flex flex-col space-y-1.5 p-6",e),...t}));ne.displayName="CardHeader";const ie=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("h3",{ref:o,className:s("font-semibold leading-none tracking-tight",e),...t}));ie.displayName="CardTitle";const de=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("p",{ref:o,className:s("text-sm text-muted-foreground",e),...t}));de.displayName="CardDescription";const le=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s("p-6 pt-0",e),...t}));le.displayName="CardContent";const me=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("div",{ref:o,className:s(" flex items-center p-6 pt-0",e),...t}));me.displayName="CardFooter";const ce=r.forwardRef(({className:e,type:t,...o},n)=>a.jsxRuntimeExports.jsx("input",{type:t,className:s("flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...o,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));ce.displayName="Input";const Ct=w.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(P.Root,{ref:o,className:s(Ct(),e),...t}));pe.displayName=P.Root.displayName;const ue=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx("textarea",{className:s("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm 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",e),ref:o,...t,autoCapitalize:"off",autoCorrect:"off",spellCheck:"false"}));ue.displayName="Textarea";const xe=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(g.Root,{ref:n,className:s("relative overflow-hidden",e),...o,children:[a.jsxRuntimeExports.jsx(g.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsxRuntimeExports.jsx(A,{}),a.jsxRuntimeExports.jsx(g.Corner,{})]}));xe.displayName=g.Root.displayName;const A=r.forwardRef(({className:e,orientation:t="vertical",...o},n)=>a.jsxRuntimeExports.jsx(g.ScrollAreaScrollbar,{ref:n,orientation:t,className:s("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 border-t border-t-transparent p-[1px]",e),...o,children:a.jsxRuntimeExports.jsx(g.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));A.displayName=g.ScrollAreaScrollbar.displayName;const Et=j.Root,fe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(j.List,{ref:o,className:s("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));fe.displayName=j.List.displayName;const ge=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(j.Trigger,{ref:o,className:s("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}));ge.displayName=j.Trigger.displayName;const be=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(j.Content,{ref:o,className:s("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));be.displayName=j.Content.displayName;const Tt=y.Portal,Dt=y.Provider,St=y.Root,Mt=y.Trigger,je=r.forwardRef(({className:e,sideOffset:t=4,...o},n)=>a.jsxRuntimeExports.jsx(y.Content,{ref:n,sideOffset:t,className:s("z-50 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),...o}));je.displayName=y.Content.displayName;const kt=N.Root,At=N.Trigger,ye=r.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},l)=>a.jsxRuntimeExports.jsx(N.Portal,{children:a.jsxRuntimeExports.jsx(N.Content,{ref:l,align:t,sideOffset:o,className:s("z-50 w-72 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})}));ye.displayName=N.Content.displayName;const It=C.Root,_t=C.Trigger,ve=r.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},l)=>a.jsxRuntimeExports.jsx(C.Content,{ref:l,align:t,sideOffset:o,className:s("z-50 w-64 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}));ve.displayName=C.Content.displayName;const Pt=i.Root,zt=i.Trigger,Ot=i.Group,Lt=i.Portal,qt=i.Sub,Ht=i.RadioGroup,Ne=r.forwardRef(({className:e,inset:t,children:o,...n},l)=>a.jsxRuntimeExports.jsxs(i.SubTrigger,{ref:l,className:s("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[o,a.jsxRuntimeExports.jsx(f.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Ne.displayName=i.SubTrigger.displayName;const he=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(i.SubContent,{ref:o,className:s("z-50 min-w-[8rem] 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}));he.displayName=i.SubContent.displayName;const Re=r.forwardRef(({className:e,sideOffset:t=4,...o},n)=>a.jsxRuntimeExports.jsx(i.Portal,{children:a.jsxRuntimeExports.jsx(i.Content,{ref:n,sideOffset:t,className:s("z-50 min-w-[8rem] overflow-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),...o})}));Re.displayName=i.Content.displayName;const we=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(i.Item,{ref:n,className:s("relative flex cursor-default select-none items-center 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",t&&"pl-8",e),...o}));we.displayName=i.Item.displayName;const Ce=r.forwardRef(({className:e,children:t,checked:o,...n},l)=>a.jsxRuntimeExports.jsxs(i.CheckboxItem,{ref:l,className:s("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:o,...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(i.ItemIndicator,{children:a.jsxRuntimeExports.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),t]}));Ce.displayName=i.CheckboxItem.displayName;const Ee=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(i.RadioItem,{ref:n,className:s("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),...o,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(i.ItemIndicator,{children:a.jsxRuntimeExports.jsx(f.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ee.displayName=i.RadioItem.displayName;const Te=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(i.Label,{ref:n,className:s("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Te.displayName=i.Label.displayName;const De=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(i.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-muted",e),...t}));De.displayName=i.Separator.displayName;const Se=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest opacity-60",e),...t});Se.displayName="DropdownMenuShortcut";const Me=r.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},l)=>a.jsxRuntimeExports.jsx(z.Root,{ref:l,decorative:o,orientation:t,className:s("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Me.displayName=z.Root.displayName;const Vt=1,Gt=1e6;let D=0;function Ft(){return D=(D+1)%Number.MAX_VALUE,D.toString()}const S=new Map,_=e=>{if(S.has(e))return;const t=setTimeout(()=>{S.delete(e),v({type:"REMOVE_TOAST",toastId:e})},Gt);S.set(e,t)},ke=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Vt)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=t;return o?_(o):e.toasts.forEach(n=>{_(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===o||o===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)}}},h=[];let R={toasts:[]};function v(e){R=ke(R,e),h.forEach(t=>{t(R)})}function Ae({...e}){const t=Ft(),o=l=>v({type:"UPDATE_TOAST",toast:{...l,id:t}}),n=()=>v({type:"DISMISS_TOAST",toastId:t});return v({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:l=>{l||n()}}}),{id:t,dismiss:n,update:o}}function Ie(){const[e,t]=r.useState(R);return r.useEffect(()=>(h.push(t),()=>{const o=h.indexOf(t);o>-1&&h.splice(o,1)}),[e]),{...e,toast:Ae,dismiss:o=>v({type:"DISMISS_TOAST",toastId:o})}}const Bt=x.Provider,_e=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Viewport,{ref:o,className:s("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));_e.displayName=x.Viewport.displayName;const Ut=w.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Pe=r.forwardRef(({className:e,variant:t,...o},n)=>a.jsxRuntimeExports.jsx(x.Root,{ref:n,className:s(Ut({variant:t}),e),...o}));Pe.displayName=x.Root.displayName;const Qt=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Action,{ref:o,className:s("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Qt.displayName=x.Action.displayName;const ze=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Close,{ref:o,className:s("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsxRuntimeExports.jsx(f.Cross2Icon,{className:"h-4 w-4"})}));ze.displayName=x.Close.displayName;const Oe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Title,{ref:o,className:s("text-sm font-semibold [&+div]:text-xs",e),...t}));Oe.displayName=x.Title.displayName;const Le=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(x.Description,{ref:o,className:s("text-sm opacity-90",e),...t}));Le.displayName=x.Description.displayName;function Xt(){const{toasts:e}=Ie();return a.jsxRuntimeExports.jsxs(Bt,{children:[e.map(({id:t,title:o,description:n,action:l,...T})=>a.jsxRuntimeExports.jsxs(Pe,{...T,children:[a.jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[o&&a.jsxRuntimeExports.jsx(Oe,{children:o}),n&&a.jsxRuntimeExports.jsx(Le,{children:n})]}),l,a.jsxRuntimeExports.jsx(ze,{})]},t)),a.jsxRuntimeExports.jsx(_e,{})]})}const Yt=({className:e,...t})=>a.jsxRuntimeExports.jsx("div",{className:s("animate-pulse rounded-md bg-primary/10",e),...t}),I=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Command,{ref:o,className:s("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));I.displayName=p.Command.displayName;const Jt=({children:e,...t})=>a.jsxRuntimeExports.jsx(Z,{...t,children:a.jsxRuntimeExports.jsx(k,{className:"overflow-hidden p-0",children:a.jsxRuntimeExports.jsx(I,{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})})}),qe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[a.jsxRuntimeExports.jsx(f.MagnifyingGlassIcon,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),a.jsxRuntimeExports.jsx(p.Command.Input,{ref:o,className:s("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})]}));qe.displayName=p.Command.Input.displayName;const He=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Command.List,{ref:o,className:s("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));He.displayName=p.Command.List.displayName;const Ve=r.forwardRef((e,t)=>a.jsxRuntimeExports.jsx(p.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ve.displayName=p.Command.Empty.displayName;const Ge=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Command.Group,{ref:o,className:s("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}));Ge.displayName=p.Command.Group.displayName;const Fe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Command.Separator,{ref:o,className:s("-mx-1 h-px bg-border",e),...t}));Fe.displayName=p.Command.Separator.displayName;const Be=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(p.Command.Item,{ref:o,className:s("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Be.displayName=p.Command.Item.displayName;const Ue=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ue.displayName="CommandShortcut";const Kt=d.Root,Wt=d.Trigger,Zt=d.Group,$t=d.Portal,eo=d.Sub,to=d.RadioGroup,Qe=r.forwardRef(({className:e,inset:t,children:o,...n},l)=>a.jsxRuntimeExports.jsxs(d.SubTrigger,{ref:l,className:s("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:[o,a.jsxRuntimeExports.jsx(f.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]}));Qe.displayName=d.SubTrigger.displayName;const Xe=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(d.SubContent,{ref:o,className:s("z-50 min-w-[8rem] 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}));Xe.displayName=d.SubContent.displayName;const Ye=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(d.Portal,{children:a.jsxRuntimeExports.jsx(d.Content,{ref:o,className:s("z-50 min-w-[8rem] overflow-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})}));Ye.displayName=d.Content.displayName;const Je=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(d.Item,{ref:n,className:s("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),...o}));Je.displayName=d.Item.displayName;const Ke=r.forwardRef(({className:e,children:t,checked:o,...n},l)=>a.jsxRuntimeExports.jsxs(d.CheckboxItem,{ref:l,className:s("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:o,...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(d.ItemIndicator,{children:a.jsxRuntimeExports.jsx(f.CheckIcon,{className:"h-4 w-4"})})}),t]}));Ke.displayName=d.CheckboxItem.displayName;const We=r.forwardRef(({className:e,children:t,...o},n)=>a.jsxRuntimeExports.jsxs(d.RadioItem,{ref:n,className:s("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),...o,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(d.ItemIndicator,{children:a.jsxRuntimeExports.jsx(f.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));We.displayName=d.RadioItem.displayName;const Ze=r.forwardRef(({className:e,inset:t,...o},n)=>a.jsxRuntimeExports.jsx(d.Label,{ref:n,className:s("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...o}));Ze.displayName=d.Label.displayName;const $e=r.forwardRef(({className:e,...t},o)=>a.jsxRuntimeExports.jsx(d.Separator,{ref:o,className:s("-mx-1 my-1 h-px bg-border",e),...t}));$e.displayName=d.Separator.displayName;const et=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:s("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});et.displayName="ContextMenuShortcut";exports.Accordion=vt;exports.AccordionContent=V;exports.AccordionItem=q;exports.AccordionTrigger=H;exports.AlertDialog=ht;exports.AlertDialogAction=K;exports.AlertDialogCancel=W;exports.AlertDialogContent=U;exports.AlertDialogDescription=J;exports.AlertDialogFooter=X;exports.AlertDialogHeader=Q;exports.AlertDialogTitle=Y;exports.AlertDialogTrigger=Rt;exports.Badge=Nt;exports.Button=L;exports.Card=re;exports.CardContent=le;exports.CardDescription=de;exports.CardFooter=me;exports.CardHeader=ne;exports.CardTitle=ie;exports.Command=I;exports.CommandDialog=Jt;exports.CommandEmpty=Ve;exports.CommandGroup=Ge;exports.CommandInput=qe;exports.CommandItem=Be;exports.CommandList=He;exports.CommandSeparator=Fe;exports.CommandShortcut=Ue;exports.ContextMenu=Kt;exports.ContextMenuCheckboxItem=Ke;exports.ContextMenuContent=Ye;exports.ContextMenuGroup=Zt;exports.ContextMenuItem=Je;exports.ContextMenuLabel=Ze;exports.ContextMenuPortal=$t;exports.ContextMenuRadioGroup=to;exports.ContextMenuRadioItem=We;exports.ContextMenuSeparator=$e;exports.ContextMenuShortcut=et;exports.ContextMenuSub=eo;exports.ContextMenuSubContent=Xe;exports.ContextMenuSubTrigger=Qe;exports.ContextMenuTrigger=Wt;exports.Dialog=Z;exports.DialogContent=k;exports.DialogDescription=se;exports.DialogFooter=oe;exports.DialogHeader=te;exports.DialogTitle=ae;exports.DialogTrigger=wt;exports.DropdownMenu=Pt;exports.DropdownMenuCheckboxItem=Ce;exports.DropdownMenuContent=Re;exports.DropdownMenuGroup=Ot;exports.DropdownMenuItem=we;exports.DropdownMenuLabel=Te;exports.DropdownMenuPortal=Lt;exports.DropdownMenuRadioGroup=Ht;exports.DropdownMenuRadioItem=Ee;exports.DropdownMenuSeparator=De;exports.DropdownMenuShortcut=Se;exports.DropdownMenuSub=qt;exports.DropdownMenuSubContent=he;exports.DropdownMenuSubTrigger=Ne;exports.DropdownMenuTrigger=zt;exports.HoverCard=It;exports.HoverCardContent=ve;exports.HoverCardTrigger=_t;exports.Input=ce;exports.Label=pe;exports.Popover=kt;exports.PopoverContent=ye;exports.PopoverTrigger=At;exports.ScrollArea=xe;exports.ScrollBar=A;exports.Separator=Me;exports.Skeleton=Yt;exports.Switch=O;exports.Tabs=Et;exports.TabsContent=be;exports.TabsList=fe;exports.TabsTrigger=ge;exports.Textarea=ue;exports.Toaster=Xt;exports.Tooltip=St;exports.TooltipContent=je;exports.TooltipPortal=Tt;exports.TooltipProvider=Dt;exports.TooltipTrigger=Mt;exports.badgeVariants=G;exports.buttonVariants=E;exports.cn=s;exports.reducer=ke;exports.toast=Ae;exports.useToast=Ie;
@@ -1 +0,0 @@
1
- "use strict";const r=require("./jsx-runtime-JYMCiFoE.cjs"),g=require("react"),c=require("@radix-ui/react-icons"),j=require("@radix-ui/react-select"),n=require("./context-menu--DZnHfxj.cjs");function l(a){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(s,t,o.get?o:{enumerable:!0,get:()=>a[t]})}}return s.default=a,Object.freeze(s)}const i=l(g),e=l(j),b=e.Root,h=e.Group,S=e.Value,d=i.forwardRef(({className:a,children:s,...t},o)=>r.jsxRuntimeExports.jsxs(e.Trigger,{ref:o,className:n.cn("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...t,children:[s,r.jsxRuntimeExports.jsx(e.Icon,{asChild:!0,children:r.jsxRuntimeExports.jsx(c.CaretSortIcon,{className:"h-4 w-4 opacity-50"})})]}));d.displayName=e.Trigger.displayName;const m=i.forwardRef(({className:a,children:s,position:t="popper",...o},f)=>r.jsxRuntimeExports.jsx(e.Portal,{children:r.jsxRuntimeExports.jsx(e.Content,{ref:f,className:n.cn("relative z-50 min-w-[8rem] overflow-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",t==="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",a),position:t,...o,children:r.jsxRuntimeExports.jsx(e.Viewport,{className:n.cn("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s})})}));m.displayName=e.Content.displayName;const p=i.forwardRef(({className:a,...s},t)=>r.jsxRuntimeExports.jsx(e.Label,{ref:t,className:n.cn("px-2 py-1.5 text-sm font-semibold",a),...s}));p.displayName=e.Label.displayName;const u=i.forwardRef(({className:a,children:s,...t},o)=>r.jsxRuntimeExports.jsxs(e.Item,{ref:o,className:n.cn("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",a),...t,children:[r.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsxRuntimeExports.jsx(e.ItemIndicator,{children:r.jsxRuntimeExports.jsx(c.CheckIcon,{className:"h-4 w-4"})})}),r.jsxRuntimeExports.jsx(e.ItemText,{children:s})]}));u.displayName=e.Item.displayName;const x=i.forwardRef(({className:a,...s},t)=>r.jsxRuntimeExports.jsx(e.Separator,{ref:t,className:n.cn("-mx-1 my-1 h-px bg-muted",a),...s}));x.displayName=e.Separator.displayName;exports.Select=b;exports.SelectContent=m;exports.SelectGroup=h;exports.SelectItem=u;exports.SelectLabel=p;exports.SelectSeparator=x;exports.SelectTrigger=d;exports.SelectValue=S;
@@ -1,75 +0,0 @@
1
- import { j as t } from "./jsx-runtime-Sp0orL4X.js";
2
- import * as i from "react";
3
- import { CaretSortIcon as n, CheckIcon as c } from "@radix-ui/react-icons";
4
- import * as e from "@radix-ui/react-select";
5
- import { ag as r } from "./context-menu-DeUUflYX.js";
6
- const y = e.Root, w = e.Group, N = e.Value, m = i.forwardRef(({ className: s, children: o, ...a }, d) => /* @__PURE__ */ t.jsxs(
7
- e.Trigger,
8
- {
9
- ref: d,
10
- className: r(
11
- "flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
12
- s
13
- ),
14
- ...a,
15
- children: [
16
- o,
17
- /* @__PURE__ */ t.jsx(e.Icon, { asChild: !0, children: /* @__PURE__ */ t.jsx(n, { className: "h-4 w-4 opacity-50" }) })
18
- ]
19
- }
20
- ));
21
- m.displayName = e.Trigger.displayName;
22
- const p = i.forwardRef(({ className: s, children: o, position: a = "popper", ...d }, l) => /* @__PURE__ */ t.jsx(e.Portal, { children: /* @__PURE__ */ t.jsx(
23
- e.Content,
24
- {
25
- ref: l,
26
- className: r(
27
- "relative z-50 min-w-[8rem] overflow-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",
28
- 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",
29
- s
30
- ),
31
- position: a,
32
- ...d,
33
- children: /* @__PURE__ */ t.jsx(
34
- e.Viewport,
35
- {
36
- className: r(
37
- "p-1",
38
- a === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
39
- ),
40
- children: o
41
- }
42
- )
43
- }
44
- ) }));
45
- p.displayName = e.Content.displayName;
46
- const f = i.forwardRef(({ className: s, ...o }, a) => /* @__PURE__ */ t.jsx(e.Label, { ref: a, className: r("px-2 py-1.5 text-sm font-semibold", s), ...o }));
47
- f.displayName = e.Label.displayName;
48
- const u = i.forwardRef(({ className: s, children: o, ...a }, d) => /* @__PURE__ */ t.jsxs(
49
- e.Item,
50
- {
51
- ref: d,
52
- className: r(
53
- "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",
54
- s
55
- ),
56
- ...a,
57
- children: [
58
- /* @__PURE__ */ t.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t.jsx(e.ItemIndicator, { children: /* @__PURE__ */ t.jsx(c, { className: "h-4 w-4" }) }) }),
59
- /* @__PURE__ */ t.jsx(e.ItemText, { children: o })
60
- ]
61
- }
62
- ));
63
- u.displayName = e.Item.displayName;
64
- const x = i.forwardRef(({ className: s, ...o }, a) => /* @__PURE__ */ t.jsx(e.Separator, { ref: a, className: r("-mx-1 my-1 h-px bg-muted", s), ...o }));
65
- x.displayName = e.Separator.displayName;
66
- export {
67
- y as S,
68
- w as a,
69
- N as b,
70
- m as c,
71
- p as d,
72
- f as e,
73
- u as f,
74
- x as g
75
- };