@tech_carthagos/page-builder 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +143 -0
  2. package/dist/CraftEditor-C46pwgRX.cjs +72 -0
  3. package/dist/CraftEditor-D3fFhzFW.js +1797 -0
  4. package/dist/index-Pbjx1e0F.js +15751 -0
  5. package/dist/index-kL2awzbZ.cjs +189 -0
  6. package/dist/index.cjs +1 -0
  7. package/dist/index.js +17 -0
  8. package/dist-types/CraftEditor.d.ts +7 -0
  9. package/dist-types/CraftEditor.d.ts.map +1 -0
  10. package/dist-types/PageBuilder.d.ts +19 -0
  11. package/dist-types/PageBuilder.d.ts.map +1 -0
  12. package/dist-types/PreviewModal.d.ts +7 -0
  13. package/dist-types/PreviewModal.d.ts.map +1 -0
  14. package/dist-types/contexts/ApiConfigContext.d.ts +8 -0
  15. package/dist-types/contexts/ApiConfigContext.d.ts.map +1 -0
  16. package/dist-types/contexts/DeviceSizeContext.d.ts +8 -0
  17. package/dist-types/contexts/DeviceSizeContext.d.ts.map +1 -0
  18. package/dist-types/contexts/EventDataContext.d.ts +6 -0
  19. package/dist-types/contexts/EventDataContext.d.ts.map +1 -0
  20. package/dist-types/editor/LayersPanel.d.ts +2 -0
  21. package/dist-types/editor/LayersPanel.d.ts.map +1 -0
  22. package/dist-types/editor/RichTextInput.d.ts +6 -0
  23. package/dist-types/editor/RichTextInput.d.ts.map +1 -0
  24. package/dist-types/editor/SettingsPanel.d.ts +2 -0
  25. package/dist-types/editor/SettingsPanel.d.ts.map +1 -0
  26. package/dist-types/editor/SettingsUI.d.ts +68 -0
  27. package/dist-types/editor/SettingsUI.d.ts.map +1 -0
  28. package/dist-types/editor/TemplateVariablesHelper.d.ts +4 -0
  29. package/dist-types/editor/TemplateVariablesHelper.d.ts.map +1 -0
  30. package/dist-types/editor/Toolbox.d.ts +2 -0
  31. package/dist-types/editor/Toolbox.d.ts.map +1 -0
  32. package/dist-types/editor/Topbar.d.ts +35 -0
  33. package/dist-types/editor/Topbar.d.ts.map +1 -0
  34. package/dist-types/index.d.ts +8 -0
  35. package/dist-types/index.d.ts.map +1 -0
  36. package/dist-types/lib/api.d.ts +20 -0
  37. package/dist-types/lib/api.d.ts.map +1 -0
  38. package/dist-types/lib/utils.d.ts +4 -0
  39. package/dist-types/lib/utils.d.ts.map +1 -0
  40. package/dist-types/types.d.ts +30 -0
  41. package/dist-types/types.d.ts.map +1 -0
  42. package/dist-types/ui/button.d.ts +12 -0
  43. package/dist-types/ui/button.d.ts.map +1 -0
  44. package/dist-types/ui/card.d.ts +9 -0
  45. package/dist-types/ui/card.d.ts.map +1 -0
  46. package/dist-types/ui/checkbox.d.ts +5 -0
  47. package/dist-types/ui/checkbox.d.ts.map +1 -0
  48. package/dist-types/ui/scroll-area.d.ts +6 -0
  49. package/dist-types/ui/scroll-area.d.ts.map +1 -0
  50. package/dist-types/ui/skeleton.d.ts +3 -0
  51. package/dist-types/ui/skeleton.d.ts.map +1 -0
  52. package/dist-types/ui/toggle-group.d.ts +13 -0
  53. package/dist-types/ui/toggle-group.d.ts.map +1 -0
  54. package/dist-types/ui/toggle.d.ts +13 -0
  55. package/dist-types/ui/toggle.d.ts.map +1 -0
  56. package/dist-types/ui/tooltip.d.ts +8 -0
  57. package/dist-types/ui/tooltip.d.ts.map +1 -0
  58. package/dist-types/user/Button.d.ts +57 -0
  59. package/dist-types/user/Button.d.ts.map +1 -0
  60. package/dist-types/user/Columns.d.ts +50 -0
  61. package/dist-types/user/Columns.d.ts.map +1 -0
  62. package/dist-types/user/Container.d.ts +72 -0
  63. package/dist-types/user/Container.d.ts.map +1 -0
  64. package/dist-types/user/Divider.d.ts +37 -0
  65. package/dist-types/user/Divider.d.ts.map +1 -0
  66. package/dist-types/user/Heading.d.ts +63 -0
  67. package/dist-types/user/Heading.d.ts.map +1 -0
  68. package/dist-types/user/Image.d.ts +45 -0
  69. package/dist-types/user/Image.d.ts.map +1 -0
  70. package/dist-types/user/Link.d.ts +47 -0
  71. package/dist-types/user/Link.d.ts.map +1 -0
  72. package/dist-types/user/Spacer.d.ts +21 -0
  73. package/dist-types/user/Spacer.d.ts.map +1 -0
  74. package/dist-types/user/TermsDownload.d.ts +5 -0
  75. package/dist-types/user/TermsDownload.d.ts.map +1 -0
  76. package/dist-types/user/Text.d.ts +66 -0
  77. package/dist-types/user/Text.d.ts.map +1 -0
  78. package/dist-types/user/Video.d.ts +41 -0
  79. package/dist-types/user/Video.d.ts.map +1 -0
  80. package/dist-types/user/index.d.ts +12 -0
  81. package/dist-types/user/index.d.ts.map +1 -0
  82. package/dist-types/utils/cn.d.ts +4 -0
  83. package/dist-types/utils/cn.d.ts.map +1 -0
  84. package/dist-types/utils/templateEngine.d.ts +27 -0
  85. package/dist-types/utils/templateEngine.d.ts.map +1 -0
  86. package/package.json +53 -0
@@ -0,0 +1,1797 @@
1
+ import { jsxs as z, jsx as s, Fragment as St } from "react/jsx-runtime";
2
+ import * as h from "react";
3
+ import m, { useState as Ee, forwardRef as Mr, isValidElement as Ue } from "react";
4
+ import { c as W, P as Te, B as Ae, L as Ct, F as _r, k as be, C as ye, a as Et, H as Ze, T as De, b as Tt, d as Nt, I as Rt, V as Pt, D as kt, S as It, u as oe, e as ze, f as te, g as Oe, h as $, i as ie, j as Lr, l as Ne, m as zr, n as Or, o as Br, p as Fr, q as Be, r as Hr, s as Vr, M as Gr, t as jr, v as Yr, w as $r, x as Wr, y as Ur, z as Xr, A as Kr, E as qr, G as Zr, J as Jr, K as Xe, N as Ke, O as Qr } from "./index-Pbjx1e0F.js";
5
+ import eo from "react-dom";
6
+ /**
7
+ * @license lucide-react v0.462.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */
12
+ const At = W("Columns2", [
13
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
14
+ ["path", { d: "M12 3v18", key: "108xh3" }]
15
+ ]);
16
+ /**
17
+ * @license lucide-react v0.462.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */
22
+ const to = W("GripVertical", [
23
+ ["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
24
+ ["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
25
+ ["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
26
+ ["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
27
+ ["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
28
+ ["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
29
+ ]);
30
+ /**
31
+ * @license lucide-react v0.462.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */
36
+ const Dt = W("Heading", [
37
+ ["path", { d: "M6 12h12", key: "8npq4p" }],
38
+ ["path", { d: "M6 20V4", key: "1w1bmo" }],
39
+ ["path", { d: "M18 20V4", key: "o2hl4u" }]
40
+ ]);
41
+ /**
42
+ * @license lucide-react v0.462.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */
47
+ const Mt = W("Image", [
48
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
49
+ ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
50
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
51
+ ]);
52
+ /**
53
+ * @license lucide-react v0.462.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */
58
+ const _t = W("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
59
+ /**
60
+ * @license lucide-react v0.462.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */
65
+ const Lt = W("MousePointer", [
66
+ ["path", { d: "M12.586 12.586 19 19", key: "ea5xo7" }],
67
+ [
68
+ "path",
69
+ {
70
+ d: "M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",
71
+ key: "277e5u"
72
+ }
73
+ ]
74
+ ]);
75
+ /**
76
+ * @license lucide-react v0.462.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */
81
+ const zt = W("MoveVertical", [
82
+ ["path", { d: "M12 2v20", key: "t6zp3m" }],
83
+ ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
84
+ ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
85
+ ]);
86
+ /**
87
+ * @license lucide-react v0.462.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */
92
+ const ro = W("Redo2", [
93
+ ["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
94
+ ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
95
+ ]);
96
+ /**
97
+ * @license lucide-react v0.462.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */
102
+ const oo = W("Save", [
103
+ [
104
+ "path",
105
+ {
106
+ d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
107
+ key: "1c8476"
108
+ }
109
+ ],
110
+ ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
111
+ ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
112
+ ]);
113
+ /**
114
+ * @license lucide-react v0.462.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */
119
+ const Je = W("Square", [
120
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
121
+ ]);
122
+ /**
123
+ * @license lucide-react v0.462.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */
128
+ const no = W("Trash2", [
129
+ ["path", { d: "M3 6h18", key: "d0wm0j" }],
130
+ ["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
131
+ ["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
132
+ ["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
133
+ ["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
134
+ ]);
135
+ /**
136
+ * @license lucide-react v0.462.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */
141
+ const Ot = W("Type", [
142
+ ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
143
+ ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
144
+ ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
145
+ ]);
146
+ /**
147
+ * @license lucide-react v0.462.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */
152
+ const ao = W("Undo2", [
153
+ ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
154
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
155
+ ]);
156
+ /**
157
+ * @license lucide-react v0.462.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */
162
+ const so = W("Video", [
163
+ [
164
+ "path",
165
+ {
166
+ d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
167
+ key: "ftymec"
168
+ }
169
+ ],
170
+ ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
171
+ ]), lo = () => {
172
+ const { connectors: e } = Te(), t = [
173
+ {
174
+ name: "Container",
175
+ icon: Je,
176
+ element: /* @__PURE__ */ s(be, { is: ye, canvas: !0 })
177
+ },
178
+ {
179
+ name: "Columns",
180
+ icon: At,
181
+ element: /* @__PURE__ */ z(be, { is: Et, canvas: !0, children: [
182
+ /* @__PURE__ */ s(be, { is: ye, canvas: !0 }),
183
+ /* @__PURE__ */ s(be, { is: ye, canvas: !0 })
184
+ ] })
185
+ }
186
+ ], r = [
187
+ {
188
+ name: "Heading",
189
+ icon: Dt,
190
+ element: /* @__PURE__ */ s(Ze, {})
191
+ },
192
+ {
193
+ name: "Text",
194
+ icon: Ot,
195
+ element: /* @__PURE__ */ s(De, {})
196
+ },
197
+ {
198
+ name: "Button",
199
+ icon: Lt,
200
+ element: /* @__PURE__ */ s(Tt, {})
201
+ },
202
+ {
203
+ name: "Link",
204
+ icon: Ct,
205
+ element: /* @__PURE__ */ s(Nt, {})
206
+ }
207
+ ], o = [
208
+ {
209
+ name: "Image",
210
+ icon: Mt,
211
+ element: /* @__PURE__ */ s(Rt, {})
212
+ },
213
+ {
214
+ name: "Video",
215
+ icon: _r,
216
+ element: /* @__PURE__ */ s(Pt, {})
217
+ }
218
+ ], n = [
219
+ {
220
+ name: "Divider",
221
+ icon: _t,
222
+ element: /* @__PURE__ */ s(kt, {})
223
+ },
224
+ {
225
+ name: "Spacer",
226
+ icon: zt,
227
+ element: /* @__PURE__ */ s(It, {})
228
+ }
229
+ ], l = (i, d) => /* @__PURE__ */ z("div", { className: "space-y-2", children: [
230
+ /* @__PURE__ */ s("span", { className: "text-xs text-muted-foreground/70", children: i }),
231
+ /* @__PURE__ */ s("div", { className: "grid grid-cols-2 gap-1.5", children: d.map((c) => /* @__PURE__ */ z(
232
+ Ae,
233
+ {
234
+ variant: "outline",
235
+ size: "sm",
236
+ className: "flex flex-col items-center justify-center h-14 cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground",
237
+ ref: (u) => u && e.create(u, c.element),
238
+ children: [
239
+ /* @__PURE__ */ s(c.icon, { className: "h-4 w-4 mb-1" }),
240
+ /* @__PURE__ */ s("span", { className: "text-[10px]", children: c.name })
241
+ ]
242
+ },
243
+ c.name
244
+ )) })
245
+ ] });
246
+ return /* @__PURE__ */ z("div", { className: "space-y-4", children: [
247
+ /* @__PURE__ */ s("h3", { className: "text-sm font-medium text-muted-foreground", children: "Components" }),
248
+ l("Layout", t),
249
+ l("Basic", r),
250
+ l("Media", o),
251
+ l("Utility", n)
252
+ ] });
253
+ };
254
+ var io = h.createContext(void 0);
255
+ function tt(e) {
256
+ const t = h.useContext(io);
257
+ return e || t || "ltr";
258
+ }
259
+ function co(e, [t, r]) {
260
+ return Math.min(r, Math.max(t, e));
261
+ }
262
+ function uo(e, t) {
263
+ return h.useReducer((r, o) => t[r][o] ?? r, e);
264
+ }
265
+ var rt = "ScrollArea", [Bt] = ze(rt), [fo, K] = Bt(rt), Ft = h.forwardRef(
266
+ (e, t) => {
267
+ const {
268
+ __scopeScrollArea: r,
269
+ type: o = "hover",
270
+ dir: n,
271
+ scrollHideDelay: l = 600,
272
+ ...i
273
+ } = e, [d, c] = h.useState(null), [u, f] = h.useState(null), [p, g] = h.useState(null), [a, N] = h.useState(null), [b, v] = h.useState(null), [E, C] = h.useState(0), [x, R] = h.useState(0), [B, I] = h.useState(!1), [F, A] = h.useState(!1), P = oe(t, (H) => c(H)), O = tt(n);
274
+ return /* @__PURE__ */ s(
275
+ fo,
276
+ {
277
+ scope: r,
278
+ type: o,
279
+ dir: O,
280
+ scrollHideDelay: l,
281
+ scrollArea: d,
282
+ viewport: u,
283
+ onViewportChange: f,
284
+ content: p,
285
+ onContentChange: g,
286
+ scrollbarX: a,
287
+ onScrollbarXChange: N,
288
+ scrollbarXEnabled: B,
289
+ onScrollbarXEnabledChange: I,
290
+ scrollbarY: b,
291
+ onScrollbarYChange: v,
292
+ scrollbarYEnabled: F,
293
+ onScrollbarYEnabledChange: A,
294
+ onCornerWidthChange: C,
295
+ onCornerHeightChange: R,
296
+ children: /* @__PURE__ */ s(
297
+ te.div,
298
+ {
299
+ dir: O,
300
+ ...i,
301
+ ref: P,
302
+ style: {
303
+ position: "relative",
304
+ // Pass corner sizes as CSS vars to reduce re-renders of context consumers
305
+ "--radix-scroll-area-corner-width": E + "px",
306
+ "--radix-scroll-area-corner-height": x + "px",
307
+ ...e.style
308
+ }
309
+ }
310
+ )
311
+ }
312
+ );
313
+ }
314
+ );
315
+ Ft.displayName = rt;
316
+ var Ht = "ScrollAreaViewport", Vt = h.forwardRef(
317
+ (e, t) => {
318
+ const { __scopeScrollArea: r, children: o, nonce: n, ...l } = e, i = K(Ht, r), d = h.useRef(null), c = oe(t, d, i.onViewportChange);
319
+ return /* @__PURE__ */ z(St, { children: [
320
+ /* @__PURE__ */ s(
321
+ "style",
322
+ {
323
+ dangerouslySetInnerHTML: {
324
+ __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
325
+ },
326
+ nonce: n
327
+ }
328
+ ),
329
+ /* @__PURE__ */ s(
330
+ te.div,
331
+ {
332
+ "data-radix-scroll-area-viewport": "",
333
+ ...l,
334
+ ref: c,
335
+ style: {
336
+ /**
337
+ * We don't support `visible` because the intention is to have at least one scrollbar
338
+ * if this component is used and `visible` will behave like `auto` in that case
339
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
340
+ *
341
+ * We don't handle `auto` because the intention is for the native implementation
342
+ * to be hidden if using this component. We just want to ensure the node is scrollable
343
+ * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
344
+ * the browser from having to work out whether to render native scrollbars or not,
345
+ * we tell it to with the intention of hiding them in CSS.
346
+ */
347
+ overflowX: i.scrollbarXEnabled ? "scroll" : "hidden",
348
+ overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
349
+ ...e.style
350
+ },
351
+ children: /* @__PURE__ */ s("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: o })
352
+ }
353
+ )
354
+ ] });
355
+ }
356
+ );
357
+ Vt.displayName = Ht;
358
+ var re = "ScrollAreaScrollbar", ot = h.forwardRef(
359
+ (e, t) => {
360
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), { onScrollbarXEnabledChange: l, onScrollbarYEnabledChange: i } = n, d = e.orientation === "horizontal";
361
+ return h.useEffect(() => (d ? l(!0) : i(!0), () => {
362
+ d ? l(!1) : i(!1);
363
+ }), [d, l, i]), n.type === "hover" ? /* @__PURE__ */ s(mo, { ...o, ref: t, forceMount: r }) : n.type === "scroll" ? /* @__PURE__ */ s(ho, { ...o, ref: t, forceMount: r }) : n.type === "auto" ? /* @__PURE__ */ s(Gt, { ...o, ref: t, forceMount: r }) : n.type === "always" ? /* @__PURE__ */ s(nt, { ...o, ref: t }) : null;
364
+ }
365
+ );
366
+ ot.displayName = re;
367
+ var mo = h.forwardRef((e, t) => {
368
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), [l, i] = h.useState(!1);
369
+ return h.useEffect(() => {
370
+ const d = n.scrollArea;
371
+ let c = 0;
372
+ if (d) {
373
+ const u = () => {
374
+ window.clearTimeout(c), i(!0);
375
+ }, f = () => {
376
+ c = window.setTimeout(() => i(!1), n.scrollHideDelay);
377
+ };
378
+ return d.addEventListener("pointerenter", u), d.addEventListener("pointerleave", f), () => {
379
+ window.clearTimeout(c), d.removeEventListener("pointerenter", u), d.removeEventListener("pointerleave", f);
380
+ };
381
+ }
382
+ }, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ s(Oe, { present: r || l, children: /* @__PURE__ */ s(
383
+ Gt,
384
+ {
385
+ "data-state": l ? "visible" : "hidden",
386
+ ...o,
387
+ ref: t
388
+ }
389
+ ) });
390
+ }), ho = h.forwardRef((e, t) => {
391
+ const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), l = e.orientation === "horizontal", i = He(() => c("SCROLL_END"), 100), [d, c] = uo("hidden", {
392
+ hidden: {
393
+ SCROLL: "scrolling"
394
+ },
395
+ scrolling: {
396
+ SCROLL_END: "idle",
397
+ POINTER_ENTER: "interacting"
398
+ },
399
+ interacting: {
400
+ SCROLL: "interacting",
401
+ POINTER_LEAVE: "idle"
402
+ },
403
+ idle: {
404
+ HIDE: "hidden",
405
+ SCROLL: "scrolling",
406
+ POINTER_ENTER: "interacting"
407
+ }
408
+ });
409
+ return h.useEffect(() => {
410
+ if (d === "idle") {
411
+ const u = window.setTimeout(() => c("HIDE"), n.scrollHideDelay);
412
+ return () => window.clearTimeout(u);
413
+ }
414
+ }, [d, n.scrollHideDelay, c]), h.useEffect(() => {
415
+ const u = n.viewport, f = l ? "scrollLeft" : "scrollTop";
416
+ if (u) {
417
+ let p = u[f];
418
+ const g = () => {
419
+ const a = u[f];
420
+ p !== a && (c("SCROLL"), i()), p = a;
421
+ };
422
+ return u.addEventListener("scroll", g), () => u.removeEventListener("scroll", g);
423
+ }
424
+ }, [n.viewport, l, c, i]), /* @__PURE__ */ s(Oe, { present: r || d !== "hidden", children: /* @__PURE__ */ s(
425
+ nt,
426
+ {
427
+ "data-state": d === "hidden" ? "hidden" : "visible",
428
+ ...o,
429
+ ref: t,
430
+ onPointerEnter: $(e.onPointerEnter, () => c("POINTER_ENTER")),
431
+ onPointerLeave: $(e.onPointerLeave, () => c("POINTER_LEAVE"))
432
+ }
433
+ ) });
434
+ }), Gt = h.forwardRef((e, t) => {
435
+ const r = K(re, e.__scopeScrollArea), { forceMount: o, ...n } = e, [l, i] = h.useState(!1), d = e.orientation === "horizontal", c = He(() => {
436
+ if (r.viewport) {
437
+ const u = r.viewport.offsetWidth < r.viewport.scrollWidth, f = r.viewport.offsetHeight < r.viewport.scrollHeight;
438
+ i(d ? u : f);
439
+ }
440
+ }, 10);
441
+ return we(r.viewport, c), we(r.content, c), /* @__PURE__ */ s(Oe, { present: o || l, children: /* @__PURE__ */ s(
442
+ nt,
443
+ {
444
+ "data-state": l ? "visible" : "hidden",
445
+ ...n,
446
+ ref: t
447
+ }
448
+ ) });
449
+ }), nt = h.forwardRef((e, t) => {
450
+ const { orientation: r = "vertical", ...o } = e, n = K(re, e.__scopeScrollArea), l = h.useRef(null), i = h.useRef(0), [d, c] = h.useState({
451
+ content: 0,
452
+ viewport: 0,
453
+ scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
454
+ }), u = Ut(d.viewport, d.content), f = {
455
+ ...o,
456
+ sizes: d,
457
+ onSizesChange: c,
458
+ hasThumb: u > 0 && u < 1,
459
+ onThumbChange: (g) => l.current = g,
460
+ onThumbPointerUp: () => i.current = 0,
461
+ onThumbPointerDown: (g) => i.current = g
462
+ };
463
+ function p(g, a) {
464
+ return wo(g, i.current, d, a);
465
+ }
466
+ return r === "horizontal" ? /* @__PURE__ */ s(
467
+ po,
468
+ {
469
+ ...f,
470
+ ref: t,
471
+ onThumbPositionChange: () => {
472
+ if (n.viewport && l.current) {
473
+ const g = n.viewport.scrollLeft, a = vt(g, d, n.dir);
474
+ l.current.style.transform = `translate3d(${a}px, 0, 0)`;
475
+ }
476
+ },
477
+ onWheelScroll: (g) => {
478
+ n.viewport && (n.viewport.scrollLeft = g);
479
+ },
480
+ onDragScroll: (g) => {
481
+ n.viewport && (n.viewport.scrollLeft = p(g, n.dir));
482
+ }
483
+ }
484
+ ) : r === "vertical" ? /* @__PURE__ */ s(
485
+ go,
486
+ {
487
+ ...f,
488
+ ref: t,
489
+ onThumbPositionChange: () => {
490
+ if (n.viewport && l.current) {
491
+ const g = n.viewport.scrollTop, a = vt(g, d);
492
+ l.current.style.transform = `translate3d(0, ${a}px, 0)`;
493
+ }
494
+ },
495
+ onWheelScroll: (g) => {
496
+ n.viewport && (n.viewport.scrollTop = g);
497
+ },
498
+ onDragScroll: (g) => {
499
+ n.viewport && (n.viewport.scrollTop = p(g));
500
+ }
501
+ }
502
+ ) : null;
503
+ }), po = h.forwardRef((e, t) => {
504
+ const { sizes: r, onSizesChange: o, ...n } = e, l = K(re, e.__scopeScrollArea), [i, d] = h.useState(), c = h.useRef(null), u = oe(t, c, l.onScrollbarXChange);
505
+ return h.useEffect(() => {
506
+ c.current && d(getComputedStyle(c.current));
507
+ }, [c]), /* @__PURE__ */ s(
508
+ Yt,
509
+ {
510
+ "data-orientation": "horizontal",
511
+ ...n,
512
+ ref: u,
513
+ sizes: r,
514
+ style: {
515
+ bottom: 0,
516
+ left: l.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
517
+ right: l.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
518
+ "--radix-scroll-area-thumb-width": Fe(r) + "px",
519
+ ...e.style
520
+ },
521
+ onThumbPointerDown: (f) => e.onThumbPointerDown(f.x),
522
+ onDragScroll: (f) => e.onDragScroll(f.x),
523
+ onWheelScroll: (f, p) => {
524
+ if (l.viewport) {
525
+ const g = l.viewport.scrollLeft + f.deltaX;
526
+ e.onWheelScroll(g), Kt(g, p) && f.preventDefault();
527
+ }
528
+ },
529
+ onResize: () => {
530
+ c.current && l.viewport && i && o({
531
+ content: l.viewport.scrollWidth,
532
+ viewport: l.viewport.offsetWidth,
533
+ scrollbar: {
534
+ size: c.current.clientWidth,
535
+ paddingStart: _e(i.paddingLeft),
536
+ paddingEnd: _e(i.paddingRight)
537
+ }
538
+ });
539
+ }
540
+ }
541
+ );
542
+ }), go = h.forwardRef((e, t) => {
543
+ const { sizes: r, onSizesChange: o, ...n } = e, l = K(re, e.__scopeScrollArea), [i, d] = h.useState(), c = h.useRef(null), u = oe(t, c, l.onScrollbarYChange);
544
+ return h.useEffect(() => {
545
+ c.current && d(getComputedStyle(c.current));
546
+ }, [c]), /* @__PURE__ */ s(
547
+ Yt,
548
+ {
549
+ "data-orientation": "vertical",
550
+ ...n,
551
+ ref: u,
552
+ sizes: r,
553
+ style: {
554
+ top: 0,
555
+ right: l.dir === "ltr" ? 0 : void 0,
556
+ left: l.dir === "rtl" ? 0 : void 0,
557
+ bottom: "var(--radix-scroll-area-corner-height)",
558
+ "--radix-scroll-area-thumb-height": Fe(r) + "px",
559
+ ...e.style
560
+ },
561
+ onThumbPointerDown: (f) => e.onThumbPointerDown(f.y),
562
+ onDragScroll: (f) => e.onDragScroll(f.y),
563
+ onWheelScroll: (f, p) => {
564
+ if (l.viewport) {
565
+ const g = l.viewport.scrollTop + f.deltaY;
566
+ e.onWheelScroll(g), Kt(g, p) && f.preventDefault();
567
+ }
568
+ },
569
+ onResize: () => {
570
+ c.current && l.viewport && i && o({
571
+ content: l.viewport.scrollHeight,
572
+ viewport: l.viewport.offsetHeight,
573
+ scrollbar: {
574
+ size: c.current.clientHeight,
575
+ paddingStart: _e(i.paddingTop),
576
+ paddingEnd: _e(i.paddingBottom)
577
+ }
578
+ });
579
+ }
580
+ }
581
+ );
582
+ }), [vo, jt] = Bt(re), Yt = h.forwardRef((e, t) => {
583
+ const {
584
+ __scopeScrollArea: r,
585
+ sizes: o,
586
+ hasThumb: n,
587
+ onThumbChange: l,
588
+ onThumbPointerUp: i,
589
+ onThumbPointerDown: d,
590
+ onThumbPositionChange: c,
591
+ onDragScroll: u,
592
+ onWheelScroll: f,
593
+ onResize: p,
594
+ ...g
595
+ } = e, a = K(re, r), [N, b] = h.useState(null), v = oe(t, (P) => b(P)), E = h.useRef(null), C = h.useRef(""), x = a.viewport, R = o.content - o.viewport, B = ie(f), I = ie(c), F = He(p, 10);
596
+ function A(P) {
597
+ if (E.current) {
598
+ const O = P.clientX - E.current.left, H = P.clientY - E.current.top;
599
+ u({ x: O, y: H });
600
+ }
601
+ }
602
+ return h.useEffect(() => {
603
+ const P = (O) => {
604
+ const H = O.target;
605
+ (N == null ? void 0 : N.contains(H)) && B(O, R);
606
+ };
607
+ return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
608
+ }, [x, N, R, B]), h.useEffect(I, [o, I]), we(N, F), we(a.content, F), /* @__PURE__ */ s(
609
+ vo,
610
+ {
611
+ scope: r,
612
+ scrollbar: N,
613
+ hasThumb: n,
614
+ onThumbChange: ie(l),
615
+ onThumbPointerUp: ie(i),
616
+ onThumbPositionChange: I,
617
+ onThumbPointerDown: ie(d),
618
+ children: /* @__PURE__ */ s(
619
+ te.div,
620
+ {
621
+ ...g,
622
+ ref: v,
623
+ style: { position: "absolute", ...g.style },
624
+ onPointerDown: $(e.onPointerDown, (P) => {
625
+ P.button === 0 && (P.target.setPointerCapture(P.pointerId), E.current = N.getBoundingClientRect(), C.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", a.viewport && (a.viewport.style.scrollBehavior = "auto"), A(P));
626
+ }),
627
+ onPointerMove: $(e.onPointerMove, A),
628
+ onPointerUp: $(e.onPointerUp, (P) => {
629
+ const O = P.target;
630
+ O.hasPointerCapture(P.pointerId) && O.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = C.current, a.viewport && (a.viewport.style.scrollBehavior = ""), E.current = null;
631
+ })
632
+ }
633
+ )
634
+ }
635
+ );
636
+ }), Me = "ScrollAreaThumb", $t = h.forwardRef(
637
+ (e, t) => {
638
+ const { forceMount: r, ...o } = e, n = jt(Me, e.__scopeScrollArea);
639
+ return /* @__PURE__ */ s(Oe, { present: r || n.hasThumb, children: /* @__PURE__ */ s(bo, { ref: t, ...o }) });
640
+ }
641
+ ), bo = h.forwardRef(
642
+ (e, t) => {
643
+ const { __scopeScrollArea: r, style: o, ...n } = e, l = K(Me, r), i = jt(Me, r), { onThumbPositionChange: d } = i, c = oe(
644
+ t,
645
+ (p) => i.onThumbChange(p)
646
+ ), u = h.useRef(void 0), f = He(() => {
647
+ u.current && (u.current(), u.current = void 0);
648
+ }, 100);
649
+ return h.useEffect(() => {
650
+ const p = l.viewport;
651
+ if (p) {
652
+ const g = () => {
653
+ if (f(), !u.current) {
654
+ const a = xo(p, d);
655
+ u.current = a, d();
656
+ }
657
+ };
658
+ return d(), p.addEventListener("scroll", g), () => p.removeEventListener("scroll", g);
659
+ }
660
+ }, [l.viewport, f, d]), /* @__PURE__ */ s(
661
+ te.div,
662
+ {
663
+ "data-state": i.hasThumb ? "visible" : "hidden",
664
+ ...n,
665
+ ref: c,
666
+ style: {
667
+ width: "var(--radix-scroll-area-thumb-width)",
668
+ height: "var(--radix-scroll-area-thumb-height)",
669
+ ...o
670
+ },
671
+ onPointerDownCapture: $(e.onPointerDownCapture, (p) => {
672
+ const a = p.target.getBoundingClientRect(), N = p.clientX - a.left, b = p.clientY - a.top;
673
+ i.onThumbPointerDown({ x: N, y: b });
674
+ }),
675
+ onPointerUp: $(e.onPointerUp, i.onThumbPointerUp)
676
+ }
677
+ );
678
+ }
679
+ );
680
+ $t.displayName = Me;
681
+ var at = "ScrollAreaCorner", Wt = h.forwardRef(
682
+ (e, t) => {
683
+ const r = K(at, e.__scopeScrollArea), o = !!(r.scrollbarX && r.scrollbarY);
684
+ return r.type !== "scroll" && o ? /* @__PURE__ */ s(yo, { ...e, ref: t }) : null;
685
+ }
686
+ );
687
+ Wt.displayName = at;
688
+ var yo = h.forwardRef((e, t) => {
689
+ const { __scopeScrollArea: r, ...o } = e, n = K(at, r), [l, i] = h.useState(0), [d, c] = h.useState(0), u = !!(l && d);
690
+ return we(n.scrollbarX, () => {
691
+ var p;
692
+ const f = ((p = n.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
693
+ n.onCornerHeightChange(f), c(f);
694
+ }), we(n.scrollbarY, () => {
695
+ var p;
696
+ const f = ((p = n.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
697
+ n.onCornerWidthChange(f), i(f);
698
+ }), u ? /* @__PURE__ */ s(
699
+ te.div,
700
+ {
701
+ ...o,
702
+ ref: t,
703
+ style: {
704
+ width: l,
705
+ height: d,
706
+ position: "absolute",
707
+ right: n.dir === "ltr" ? 0 : void 0,
708
+ left: n.dir === "rtl" ? 0 : void 0,
709
+ bottom: 0,
710
+ ...e.style
711
+ }
712
+ }
713
+ ) : null;
714
+ });
715
+ function _e(e) {
716
+ return e ? parseInt(e, 10) : 0;
717
+ }
718
+ function Ut(e, t) {
719
+ const r = e / t;
720
+ return isNaN(r) ? 0 : r;
721
+ }
722
+ function Fe(e) {
723
+ const t = Ut(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - r) * t;
724
+ return Math.max(o, 18);
725
+ }
726
+ function wo(e, t, r, o = "ltr") {
727
+ const n = Fe(r), l = n / 2, i = t || l, d = n - i, c = r.scrollbar.paddingStart + i, u = r.scrollbar.size - r.scrollbar.paddingEnd - d, f = r.content - r.viewport, p = o === "ltr" ? [0, f] : [f * -1, 0];
728
+ return Xt([c, u], p)(e);
729
+ }
730
+ function vt(e, t, r = "ltr") {
731
+ const o = Fe(t), n = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, l = t.scrollbar.size - n, i = t.content - t.viewport, d = l - o, c = r === "ltr" ? [0, i] : [i * -1, 0], u = co(e, c);
732
+ return Xt([0, i], [0, d])(u);
733
+ }
734
+ function Xt(e, t) {
735
+ return (r) => {
736
+ if (e[0] === e[1] || t[0] === t[1]) return t[0];
737
+ const o = (t[1] - t[0]) / (e[1] - e[0]);
738
+ return t[0] + o * (r - e[0]);
739
+ };
740
+ }
741
+ function Kt(e, t) {
742
+ return e > 0 && e < t;
743
+ }
744
+ var xo = (e, t = () => {
745
+ }) => {
746
+ let r = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
747
+ return function n() {
748
+ const l = { left: e.scrollLeft, top: e.scrollTop }, i = r.left !== l.left, d = r.top !== l.top;
749
+ (i || d) && t(), r = l, o = window.requestAnimationFrame(n);
750
+ }(), () => window.cancelAnimationFrame(o);
751
+ };
752
+ function He(e, t) {
753
+ const r = ie(e), o = h.useRef(0);
754
+ return h.useEffect(() => () => window.clearTimeout(o.current), []), h.useCallback(() => {
755
+ window.clearTimeout(o.current), o.current = window.setTimeout(r, t);
756
+ }, [r, t]);
757
+ }
758
+ function we(e, t) {
759
+ const r = ie(t);
760
+ Lr(() => {
761
+ let o = 0;
762
+ if (e) {
763
+ const n = new ResizeObserver(() => {
764
+ cancelAnimationFrame(o), o = window.requestAnimationFrame(r);
765
+ });
766
+ return n.observe(e), () => {
767
+ window.cancelAnimationFrame(o), n.unobserve(e);
768
+ };
769
+ }
770
+ }, [e, r]);
771
+ }
772
+ var qt = Ft, So = Vt, Co = Wt;
773
+ const st = h.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ z(qt, { ref: o, className: Ne("relative overflow-hidden", e), ...r, children: [
774
+ /* @__PURE__ */ s(So, { className: "h-full w-full rounded-[inherit]", children: t }),
775
+ /* @__PURE__ */ s(Zt, {}),
776
+ /* @__PURE__ */ s(Co, {})
777
+ ] }));
778
+ st.displayName = qt.displayName;
779
+ const Zt = h.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ s(
780
+ ot,
781
+ {
782
+ ref: o,
783
+ orientation: t,
784
+ className: Ne(
785
+ "flex touch-none select-none transition-colors",
786
+ t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
787
+ t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
788
+ e
789
+ ),
790
+ ...r,
791
+ children: /* @__PURE__ */ s($t, { className: "relative flex-1 rounded-full bg-border" })
792
+ }
793
+ ));
794
+ Zt.displayName = ot.displayName;
795
+ const Eo = () => {
796
+ const { selected: e, actions: t } = Te((r) => {
797
+ var l, i, d, c, u, f, p;
798
+ const o = r.events.selected ? Array.from(r.events.selected)[0] : null;
799
+ let n;
800
+ return o && (n = {
801
+ id: o,
802
+ name: ((i = (l = r.nodes[o]) == null ? void 0 : l.data) == null ? void 0 : i.displayName) || ((c = (d = r.nodes[o]) == null ? void 0 : d.data) == null ? void 0 : c.name),
803
+ settings: (f = (u = r.nodes[o]) == null ? void 0 : u.related) == null ? void 0 : f.settings,
804
+ isDeletable: ((p = r.nodes[o]) == null ? void 0 : p.id) !== "ROOT"
805
+ }), { selected: n };
806
+ });
807
+ return /* @__PURE__ */ s("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ z(St, { children: [
808
+ /* @__PURE__ */ z("div", { className: "flex items-center justify-between pb-3 border-b border-border mb-3", children: [
809
+ /* @__PURE__ */ z("div", { children: [
810
+ /* @__PURE__ */ s("span", { className: "text-xs text-muted-foreground", children: "Selected" }),
811
+ /* @__PURE__ */ s("h3", { className: "text-sm font-semibold", children: e.name })
812
+ ] }),
813
+ e.isDeletable && /* @__PURE__ */ s(
814
+ "button",
815
+ {
816
+ onClick: () => t.delete(e.id),
817
+ className: "p-1.5 rounded hover:bg-destructive/10 text-destructive transition-colors",
818
+ title: "Delete element",
819
+ children: /* @__PURE__ */ s(no, { className: "h-4 w-4" })
820
+ }
821
+ )
822
+ ] }),
823
+ /* @__PURE__ */ s(st, { className: "flex-1 -mr-4 pr-4", children: e.settings && m.createElement(e.settings) })
824
+ ] }) : /* @__PURE__ */ s("div", { className: "text-center py-8", children: /* @__PURE__ */ s("p", { className: "text-sm text-muted-foreground", children: "Select an element to edit its properties" }) }) });
825
+ }, To = (e) => {
826
+ switch (e) {
827
+ case "Container":
828
+ return Je;
829
+ case "Text":
830
+ return Ot;
831
+ case "Heading":
832
+ return Dt;
833
+ case "Button":
834
+ return Lt;
835
+ case "Image":
836
+ return Mt;
837
+ case "Divider":
838
+ return _t;
839
+ case "Spacer":
840
+ return zt;
841
+ case "Video":
842
+ return so;
843
+ case "Columns":
844
+ return At;
845
+ case "Link":
846
+ return Ct;
847
+ default:
848
+ return Je;
849
+ }
850
+ }, Jt = ({ nodeId: e, depth: t = 0, onDragStart: r, onDragOver: o, onDrop: n, draggedId: l }) => {
851
+ const { node: i, actions: d, selectedNodeId: c, childNodes: u, parentId: f } = Te((S, de) => {
852
+ var ue, w;
853
+ const G = S.nodes[e], ne = ((ue = G == null ? void 0 : G.data) == null ? void 0 : ue.nodes) || [], V = S.events.selected ? Array.from(S.events.selected)[0] : null, q = (w = G == null ? void 0 : G.data) == null ? void 0 : w.parent;
854
+ return {
855
+ node: G,
856
+ childNodes: ne,
857
+ selectedNodeId: V,
858
+ parentId: q
859
+ };
860
+ }), [p, g] = Ee(!0), [a, N] = Ee(!1);
861
+ if (!i) return null;
862
+ const b = i.data.displayName || i.data.name || "Unknown", v = u.length > 0, E = c === e, C = e === "ROOT", x = To(b), R = l === e, B = i.data.isCanvas, I = (S) => {
863
+ S.stopPropagation(), C || d.selectNode(e);
864
+ }, F = (S) => {
865
+ S.stopPropagation(), g(!p);
866
+ }, A = (S) => {
867
+ if (C) {
868
+ S.preventDefault();
869
+ return;
870
+ }
871
+ S.stopPropagation(), r(e, f);
872
+ }, P = (S) => {
873
+ S.preventDefault(), S.stopPropagation(), l && l !== e && B && N(!0);
874
+ }, O = (S) => {
875
+ S.stopPropagation(), N(!1);
876
+ }, H = (S) => {
877
+ S.preventDefault(), S.stopPropagation(), N(!1), l && l !== e && n(e);
878
+ };
879
+ return /* @__PURE__ */ z("div", { className: "select-none", children: [
880
+ /* @__PURE__ */ z(
881
+ "div",
882
+ {
883
+ className: `flex items-center gap-1 py-1 px-1 rounded cursor-pointer text-sm transition-colors ${E ? "bg-primary/10 text-primary" : "hover:bg-secondary/50"} ${R ? "opacity-50" : ""} ${a ? "bg-primary/20 ring-1 ring-primary" : ""}`,
884
+ style: { paddingLeft: `${t * 12 + 4}px` },
885
+ onClick: I,
886
+ draggable: !C,
887
+ onDragStart: A,
888
+ onDragOver: P,
889
+ onDragLeave: O,
890
+ onDrop: H,
891
+ children: [
892
+ !C && /* @__PURE__ */ s(to, { className: "h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing" }),
893
+ v ? /* @__PURE__ */ s("button", { onClick: F, className: "p-0.5 hover:bg-secondary rounded", children: p ? /* @__PURE__ */ s(zr, { className: "h-3 w-3" }) : /* @__PURE__ */ s(Or, { className: "h-3 w-3" }) }) : /* @__PURE__ */ s("span", { className: "w-4" }),
894
+ /* @__PURE__ */ s(x, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
895
+ /* @__PURE__ */ s("span", { className: `truncate ${C ? "font-medium" : ""}`, children: C ? "Root" : b })
896
+ ]
897
+ }
898
+ ),
899
+ v && p && /* @__PURE__ */ s("div", { children: u.map((S) => /* @__PURE__ */ s(
900
+ Jt,
901
+ {
902
+ nodeId: S,
903
+ depth: t + 1,
904
+ onDragStart: r,
905
+ onDragOver: o,
906
+ onDrop: n,
907
+ draggedId: l
908
+ },
909
+ S
910
+ )) })
911
+ ] });
912
+ }, No = () => {
913
+ const [e, t] = Ee(null), [r, o] = Ee(null), { nodeIds: n, actions: l } = Te((u) => ({
914
+ nodeIds: Object.keys(u.nodes)
915
+ })), i = (u, f) => {
916
+ t(u), o(f);
917
+ }, d = (u) => {
918
+ if (e && u && e !== u)
919
+ try {
920
+ l.move(e, u, 0);
921
+ } catch (f) {
922
+ console.log("Cannot move node:", f);
923
+ }
924
+ t(null), o(null);
925
+ };
926
+ return /* @__PURE__ */ z("div", { className: "space-y-2", onDragEnd: () => {
927
+ t(null), o(null);
928
+ }, children: [
929
+ /* @__PURE__ */ s("h3", { className: "text-sm font-medium text-muted-foreground", children: "Layers" }),
930
+ /* @__PURE__ */ s("div", { className: "border border-border rounded-lg p-2 max-h-[250px] overflow-y-auto bg-background", children: n.includes("ROOT") && /* @__PURE__ */ s(
931
+ Jt,
932
+ {
933
+ nodeId: "ROOT",
934
+ onDragStart: i,
935
+ onDrop: d,
936
+ draggedId: e
937
+ }
938
+ ) }),
939
+ /* @__PURE__ */ s("p", { className: "text-xs text-muted-foreground", children: "Drag to containers to reorder" })
940
+ ] });
941
+ };
942
+ // @__NO_SIDE_EFFECTS__
943
+ function bt(e) {
944
+ const t = /* @__PURE__ */ Ro(e), r = h.forwardRef((o, n) => {
945
+ const { children: l, ...i } = o, d = h.Children.toArray(l), c = d.find(ko);
946
+ if (c) {
947
+ const u = c.props.children, f = d.map((p) => p === c ? h.Children.count(u) > 1 ? h.Children.only(null) : h.isValidElement(u) ? u.props.children : null : p);
948
+ return /* @__PURE__ */ s(t, { ...i, ref: n, children: h.isValidElement(u) ? h.cloneElement(u, void 0, f) : null });
949
+ }
950
+ return /* @__PURE__ */ s(t, { ...i, ref: n, children: l });
951
+ });
952
+ return r.displayName = `${e}.Slot`, r;
953
+ }
954
+ // @__NO_SIDE_EFFECTS__
955
+ function Ro(e) {
956
+ const t = h.forwardRef((r, o) => {
957
+ const { children: n, ...l } = r;
958
+ if (h.isValidElement(n)) {
959
+ const i = Ao(n), d = Io(l, n.props);
960
+ return n.type !== h.Fragment && (d.ref = o ? Br(o, i) : i), h.cloneElement(n, d);
961
+ }
962
+ return h.Children.count(n) > 1 ? h.Children.only(null) : null;
963
+ });
964
+ return t.displayName = `${e}.SlotClone`, t;
965
+ }
966
+ var Po = Symbol("radix.slottable");
967
+ function ko(e) {
968
+ return h.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Po;
969
+ }
970
+ function Io(e, t) {
971
+ const r = { ...t };
972
+ for (const o in t) {
973
+ const n = e[o], l = t[o];
974
+ /^on[A-Z]/.test(o) ? n && l ? r[o] = (...d) => {
975
+ const c = l(...d);
976
+ return n(...d), c;
977
+ } : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...l } : o === "className" && (r[o] = [n, l].filter(Boolean).join(" "));
978
+ }
979
+ return { ...e, ...r };
980
+ }
981
+ function Ao(e) {
982
+ var o, n;
983
+ let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
984
+ return r ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
985
+ }
986
+ function Do(e) {
987
+ const t = e + "CollectionProvider", [r, o] = ze(t), [n, l] = r(
988
+ t,
989
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
990
+ ), i = (b) => {
991
+ const { scope: v, children: E } = b, C = m.useRef(null), x = m.useRef(/* @__PURE__ */ new Map()).current;
992
+ return /* @__PURE__ */ s(n, { scope: v, itemMap: x, collectionRef: C, children: E });
993
+ };
994
+ i.displayName = t;
995
+ const d = e + "CollectionSlot", c = /* @__PURE__ */ bt(d), u = m.forwardRef(
996
+ (b, v) => {
997
+ const { scope: E, children: C } = b, x = l(d, E), R = oe(v, x.collectionRef);
998
+ return /* @__PURE__ */ s(c, { ref: R, children: C });
999
+ }
1000
+ );
1001
+ u.displayName = d;
1002
+ const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ bt(f), a = m.forwardRef(
1003
+ (b, v) => {
1004
+ const { scope: E, children: C, ...x } = b, R = m.useRef(null), B = oe(v, R), I = l(f, E);
1005
+ return m.useEffect(() => (I.itemMap.set(R, { ref: R, ...x }), () => void I.itemMap.delete(R))), /* @__PURE__ */ s(g, { [p]: "", ref: B, children: C });
1006
+ }
1007
+ );
1008
+ a.displayName = f;
1009
+ function N(b) {
1010
+ const v = l(e + "CollectionConsumer", b);
1011
+ return m.useCallback(() => {
1012
+ const C = v.collectionRef.current;
1013
+ if (!C) return [];
1014
+ const x = Array.from(C.querySelectorAll(`[${p}]`));
1015
+ return Array.from(v.itemMap.values()).sort(
1016
+ (I, F) => x.indexOf(I.ref.current) - x.indexOf(F.ref.current)
1017
+ );
1018
+ }, [v.collectionRef, v.itemMap]);
1019
+ }
1020
+ return [
1021
+ { Provider: i, Slot: u, ItemSlot: a },
1022
+ N,
1023
+ o
1024
+ ];
1025
+ }
1026
+ var qe = "rovingFocusGroup.onEntryFocus", Mo = { bubbles: !1, cancelable: !0 }, Re = "RovingFocusGroup", [Qe, Qt, _o] = Do(Re), [Lo, er] = ze(
1027
+ Re,
1028
+ [_o]
1029
+ ), [zo, Oo] = Lo(Re), tr = h.forwardRef(
1030
+ (e, t) => /* @__PURE__ */ s(Qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ s(Qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ s(Bo, { ...e, ref: t }) }) })
1031
+ );
1032
+ tr.displayName = Re;
1033
+ var Bo = h.forwardRef((e, t) => {
1034
+ const {
1035
+ __scopeRovingFocusGroup: r,
1036
+ orientation: o,
1037
+ loop: n = !1,
1038
+ dir: l,
1039
+ currentTabStopId: i,
1040
+ defaultCurrentTabStopId: d,
1041
+ onCurrentTabStopIdChange: c,
1042
+ onEntryFocus: u,
1043
+ preventScrollOnEntryFocus: f = !1,
1044
+ ...p
1045
+ } = e, g = h.useRef(null), a = oe(t, g), N = tt(l), [b, v] = Be({
1046
+ prop: i,
1047
+ defaultProp: d ?? null,
1048
+ onChange: c,
1049
+ caller: Re
1050
+ }), [E, C] = h.useState(!1), x = ie(u), R = Qt(r), B = h.useRef(!1), [I, F] = h.useState(0);
1051
+ return h.useEffect(() => {
1052
+ const A = g.current;
1053
+ if (A)
1054
+ return A.addEventListener(qe, x), () => A.removeEventListener(qe, x);
1055
+ }, [x]), /* @__PURE__ */ s(
1056
+ zo,
1057
+ {
1058
+ scope: r,
1059
+ orientation: o,
1060
+ dir: N,
1061
+ loop: n,
1062
+ currentTabStopId: b,
1063
+ onItemFocus: h.useCallback(
1064
+ (A) => v(A),
1065
+ [v]
1066
+ ),
1067
+ onItemShiftTab: h.useCallback(() => C(!0), []),
1068
+ onFocusableItemAdd: h.useCallback(
1069
+ () => F((A) => A + 1),
1070
+ []
1071
+ ),
1072
+ onFocusableItemRemove: h.useCallback(
1073
+ () => F((A) => A - 1),
1074
+ []
1075
+ ),
1076
+ children: /* @__PURE__ */ s(
1077
+ te.div,
1078
+ {
1079
+ tabIndex: E || I === 0 ? -1 : 0,
1080
+ "data-orientation": o,
1081
+ ...p,
1082
+ ref: a,
1083
+ style: { outline: "none", ...e.style },
1084
+ onMouseDown: $(e.onMouseDown, () => {
1085
+ B.current = !0;
1086
+ }),
1087
+ onFocus: $(e.onFocus, (A) => {
1088
+ const P = !B.current;
1089
+ if (A.target === A.currentTarget && P && !E) {
1090
+ const O = new CustomEvent(qe, Mo);
1091
+ if (A.currentTarget.dispatchEvent(O), !O.defaultPrevented) {
1092
+ const H = R().filter((V) => V.focusable), S = H.find((V) => V.active), de = H.find((V) => V.id === b), ne = [S, de, ...H].filter(
1093
+ Boolean
1094
+ ).map((V) => V.ref.current);
1095
+ nr(ne, f);
1096
+ }
1097
+ }
1098
+ B.current = !1;
1099
+ }),
1100
+ onBlur: $(e.onBlur, () => C(!1))
1101
+ }
1102
+ )
1103
+ }
1104
+ );
1105
+ }), rr = "RovingFocusGroupItem", or = h.forwardRef(
1106
+ (e, t) => {
1107
+ const {
1108
+ __scopeRovingFocusGroup: r,
1109
+ focusable: o = !0,
1110
+ active: n = !1,
1111
+ tabStopId: l,
1112
+ children: i,
1113
+ ...d
1114
+ } = e, c = Fr(), u = l || c, f = Oo(rr, r), p = f.currentTabStopId === u, g = Qt(r), { onFocusableItemAdd: a, onFocusableItemRemove: N, currentTabStopId: b } = f;
1115
+ return h.useEffect(() => {
1116
+ if (o)
1117
+ return a(), () => N();
1118
+ }, [o, a, N]), /* @__PURE__ */ s(
1119
+ Qe.ItemSlot,
1120
+ {
1121
+ scope: r,
1122
+ id: u,
1123
+ focusable: o,
1124
+ active: n,
1125
+ children: /* @__PURE__ */ s(
1126
+ te.span,
1127
+ {
1128
+ tabIndex: p ? 0 : -1,
1129
+ "data-orientation": f.orientation,
1130
+ ...d,
1131
+ ref: t,
1132
+ onMouseDown: $(e.onMouseDown, (v) => {
1133
+ o ? f.onItemFocus(u) : v.preventDefault();
1134
+ }),
1135
+ onFocus: $(e.onFocus, () => f.onItemFocus(u)),
1136
+ onKeyDown: $(e.onKeyDown, (v) => {
1137
+ if (v.key === "Tab" && v.shiftKey) {
1138
+ f.onItemShiftTab();
1139
+ return;
1140
+ }
1141
+ if (v.target !== v.currentTarget) return;
1142
+ const E = Vo(v, f.orientation, f.dir);
1143
+ if (E !== void 0) {
1144
+ if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
1145
+ v.preventDefault();
1146
+ let x = g().filter((R) => R.focusable).map((R) => R.ref.current);
1147
+ if (E === "last") x.reverse();
1148
+ else if (E === "prev" || E === "next") {
1149
+ E === "prev" && x.reverse();
1150
+ const R = x.indexOf(v.currentTarget);
1151
+ x = f.loop ? Go(x, R + 1) : x.slice(R + 1);
1152
+ }
1153
+ setTimeout(() => nr(x));
1154
+ }
1155
+ }),
1156
+ children: typeof i == "function" ? i({ isCurrentTabStop: p, hasTabStop: b != null }) : i
1157
+ }
1158
+ )
1159
+ }
1160
+ );
1161
+ }
1162
+ );
1163
+ or.displayName = rr;
1164
+ var Fo = {
1165
+ ArrowLeft: "prev",
1166
+ ArrowUp: "prev",
1167
+ ArrowRight: "next",
1168
+ ArrowDown: "next",
1169
+ PageUp: "first",
1170
+ Home: "first",
1171
+ PageDown: "last",
1172
+ End: "last"
1173
+ };
1174
+ function Ho(e, t) {
1175
+ return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
1176
+ }
1177
+ function Vo(e, t, r) {
1178
+ const o = Ho(e.key, r);
1179
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
1180
+ return Fo[o];
1181
+ }
1182
+ function nr(e, t = !1) {
1183
+ const r = document.activeElement;
1184
+ for (const o of e)
1185
+ if (o === r || (o.focus({ preventScroll: t }), document.activeElement !== r)) return;
1186
+ }
1187
+ function Go(e, t) {
1188
+ return e.map((r, o) => e[(t + o) % e.length]);
1189
+ }
1190
+ var jo = tr, Yo = or, ar = "Toggle", lt = h.forwardRef((e, t) => {
1191
+ const { pressed: r, defaultPressed: o, onPressedChange: n, ...l } = e, [i, d] = Be({
1192
+ prop: r,
1193
+ onChange: n,
1194
+ defaultProp: o ?? !1,
1195
+ caller: ar
1196
+ });
1197
+ return /* @__PURE__ */ s(
1198
+ te.button,
1199
+ {
1200
+ type: "button",
1201
+ "aria-pressed": i,
1202
+ "data-state": i ? "on" : "off",
1203
+ "data-disabled": e.disabled ? "" : void 0,
1204
+ ...l,
1205
+ ref: t,
1206
+ onClick: $(e.onClick, () => {
1207
+ e.disabled || d(!i);
1208
+ })
1209
+ }
1210
+ );
1211
+ });
1212
+ lt.displayName = ar;
1213
+ var sr = lt, ce = "ToggleGroup", [lr] = ze(ce, [
1214
+ er
1215
+ ]), ir = er(), it = m.forwardRef((e, t) => {
1216
+ const { type: r, ...o } = e;
1217
+ if (r === "single")
1218
+ return /* @__PURE__ */ s($o, { ...o, ref: t });
1219
+ if (r === "multiple")
1220
+ return /* @__PURE__ */ s(Wo, { ...o, ref: t });
1221
+ throw new Error(`Missing prop \`type\` expected on \`${ce}\``);
1222
+ });
1223
+ it.displayName = ce;
1224
+ var [cr, dr] = lr(ce), $o = m.forwardRef((e, t) => {
1225
+ const {
1226
+ value: r,
1227
+ defaultValue: o,
1228
+ onValueChange: n = () => {
1229
+ },
1230
+ ...l
1231
+ } = e, [i, d] = Be({
1232
+ prop: r,
1233
+ defaultProp: o ?? "",
1234
+ onChange: n,
1235
+ caller: ce
1236
+ });
1237
+ return /* @__PURE__ */ s(
1238
+ cr,
1239
+ {
1240
+ scope: e.__scopeToggleGroup,
1241
+ type: "single",
1242
+ value: m.useMemo(() => i ? [i] : [], [i]),
1243
+ onItemActivate: d,
1244
+ onItemDeactivate: m.useCallback(() => d(""), [d]),
1245
+ children: /* @__PURE__ */ s(ur, { ...l, ref: t })
1246
+ }
1247
+ );
1248
+ }), Wo = m.forwardRef((e, t) => {
1249
+ const {
1250
+ value: r,
1251
+ defaultValue: o,
1252
+ onValueChange: n = () => {
1253
+ },
1254
+ ...l
1255
+ } = e, [i, d] = Be({
1256
+ prop: r,
1257
+ defaultProp: o ?? [],
1258
+ onChange: n,
1259
+ caller: ce
1260
+ }), c = m.useCallback(
1261
+ (f) => d((p = []) => [...p, f]),
1262
+ [d]
1263
+ ), u = m.useCallback(
1264
+ (f) => d((p = []) => p.filter((g) => g !== f)),
1265
+ [d]
1266
+ );
1267
+ return /* @__PURE__ */ s(
1268
+ cr,
1269
+ {
1270
+ scope: e.__scopeToggleGroup,
1271
+ type: "multiple",
1272
+ value: i,
1273
+ onItemActivate: c,
1274
+ onItemDeactivate: u,
1275
+ children: /* @__PURE__ */ s(ur, { ...l, ref: t })
1276
+ }
1277
+ );
1278
+ });
1279
+ it.displayName = ce;
1280
+ var [Uo, Xo] = lr(ce), ur = m.forwardRef(
1281
+ (e, t) => {
1282
+ const {
1283
+ __scopeToggleGroup: r,
1284
+ disabled: o = !1,
1285
+ rovingFocus: n = !0,
1286
+ orientation: l,
1287
+ dir: i,
1288
+ loop: d = !0,
1289
+ ...c
1290
+ } = e, u = ir(r), f = tt(i), p = { role: "group", dir: f, ...c };
1291
+ return /* @__PURE__ */ s(Uo, { scope: r, rovingFocus: n, disabled: o, children: n ? /* @__PURE__ */ s(
1292
+ jo,
1293
+ {
1294
+ asChild: !0,
1295
+ ...u,
1296
+ orientation: l,
1297
+ dir: f,
1298
+ loop: d,
1299
+ children: /* @__PURE__ */ s(te.div, { ...p, ref: t })
1300
+ }
1301
+ ) : /* @__PURE__ */ s(te.div, { ...p, ref: t }) });
1302
+ }
1303
+ ), Le = "ToggleGroupItem", fr = m.forwardRef(
1304
+ (e, t) => {
1305
+ const r = dr(Le, e.__scopeToggleGroup), o = Xo(Le, e.__scopeToggleGroup), n = ir(e.__scopeToggleGroup), l = r.value.includes(e.value), i = o.disabled || e.disabled, d = { ...e, pressed: l, disabled: i }, c = m.useRef(null);
1306
+ return o.rovingFocus ? /* @__PURE__ */ s(
1307
+ Yo,
1308
+ {
1309
+ asChild: !0,
1310
+ ...n,
1311
+ focusable: !i,
1312
+ active: l,
1313
+ ref: c,
1314
+ children: /* @__PURE__ */ s(yt, { ...d, ref: t })
1315
+ }
1316
+ ) : /* @__PURE__ */ s(yt, { ...d, ref: t });
1317
+ }
1318
+ );
1319
+ fr.displayName = Le;
1320
+ var yt = m.forwardRef(
1321
+ (e, t) => {
1322
+ const { __scopeToggleGroup: r, value: o, ...n } = e, l = dr(Le, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, d = l.type === "single" ? i : void 0;
1323
+ return /* @__PURE__ */ s(
1324
+ lt,
1325
+ {
1326
+ ...d,
1327
+ ...n,
1328
+ ref: t,
1329
+ onPressedChange: (c) => {
1330
+ c ? l.onItemActivate(o) : l.onItemDeactivate(o);
1331
+ }
1332
+ }
1333
+ );
1334
+ }
1335
+ ), mr = it, hr = fr;
1336
+ const pr = Hr(
1337
+ "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",
1338
+ {
1339
+ variants: {
1340
+ variant: {
1341
+ default: "bg-transparent",
1342
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
1343
+ },
1344
+ size: {
1345
+ default: "h-10 px-3",
1346
+ sm: "h-9 px-2.5",
1347
+ lg: "h-11 px-5"
1348
+ }
1349
+ },
1350
+ defaultVariants: {
1351
+ variant: "default",
1352
+ size: "default"
1353
+ }
1354
+ }
1355
+ ), Ko = h.forwardRef(({ className: e, variant: t, size: r, ...o }, n) => /* @__PURE__ */ s(sr, { ref: n, className: Ne(pr({ variant: t, size: r, className: e })), ...o }));
1356
+ Ko.displayName = sr.displayName;
1357
+ const gr = h.createContext({
1358
+ size: "default",
1359
+ variant: "default"
1360
+ }), vr = h.forwardRef(({ className: e, variant: t, size: r, children: o, ...n }, l) => /* @__PURE__ */ s(mr, { ref: l, className: Ne("flex items-center justify-center gap-1", e), ...n, children: /* @__PURE__ */ s(gr.Provider, { value: { variant: t, size: r }, children: o }) }));
1361
+ vr.displayName = mr.displayName;
1362
+ const br = h.forwardRef(({ className: e, children: t, variant: r, size: o, ...n }, l) => {
1363
+ const i = h.useContext(gr);
1364
+ return /* @__PURE__ */ s(
1365
+ hr,
1366
+ {
1367
+ ref: l,
1368
+ className: Ne(
1369
+ pr({
1370
+ variant: i.variant || r,
1371
+ size: i.size || o
1372
+ }),
1373
+ e
1374
+ ),
1375
+ ...n,
1376
+ children: t
1377
+ }
1378
+ );
1379
+ });
1380
+ br.displayName = hr.displayName;
1381
+ var qo = (e) => {
1382
+ switch (e) {
1383
+ case "success":
1384
+ return Qo;
1385
+ case "info":
1386
+ return tn;
1387
+ case "warning":
1388
+ return en;
1389
+ case "error":
1390
+ return rn;
1391
+ default:
1392
+ return null;
1393
+ }
1394
+ }, Zo = Array(12).fill(0), Jo = ({ visible: e, className: t }) => m.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, m.createElement("div", { className: "sonner-spinner" }, Zo.map((r, o) => m.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${o}` })))), Qo = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), en = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), tn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), rn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), on = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, m.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), m.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), nn = () => {
1395
+ let [e, t] = m.useState(document.hidden);
1396
+ return m.useEffect(() => {
1397
+ let r = () => {
1398
+ t(document.hidden);
1399
+ };
1400
+ return document.addEventListener("visibilitychange", r), () => window.removeEventListener("visibilitychange", r);
1401
+ }, []), e;
1402
+ }, et = 1, an = class {
1403
+ constructor() {
1404
+ this.subscribe = (e) => (this.subscribers.push(e), () => {
1405
+ let t = this.subscribers.indexOf(e);
1406
+ this.subscribers.splice(t, 1);
1407
+ }), this.publish = (e) => {
1408
+ this.subscribers.forEach((t) => t(e));
1409
+ }, this.addToast = (e) => {
1410
+ this.publish(e), this.toasts = [...this.toasts, e];
1411
+ }, this.create = (e) => {
1412
+ var t;
1413
+ let { message: r, ...o } = e, n = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : et++, l = this.toasts.find((d) => d.id === n), i = e.dismissible === void 0 ? !0 : e.dismissible;
1414
+ return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), l ? this.toasts = this.toasts.map((d) => d.id === n ? (this.publish({ ...d, ...e, id: n, title: r }), { ...d, ...e, id: n, dismissible: i, title: r }) : d) : this.addToast({ title: r, ...o, dismissible: i, id: n }), n;
1415
+ }, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
1416
+ this.subscribers.forEach((r) => r({ id: t.id, dismiss: !0 }));
1417
+ }), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
1418
+ if (!t) return;
1419
+ let r;
1420
+ t.loading !== void 0 && (r = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
1421
+ let o = e instanceof Promise ? e : e(), n = r !== void 0, l, i = o.then(async (c) => {
1422
+ if (l = ["resolve", c], m.isValidElement(c)) n = !1, this.create({ id: r, type: "default", message: c });
1423
+ else if (ln(c) && !c.ok) {
1424
+ n = !1;
1425
+ let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${c.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${c.status}`) : t.description;
1426
+ this.create({ id: r, type: "error", message: u, description: f });
1427
+ } else if (t.success !== void 0) {
1428
+ n = !1;
1429
+ let u = typeof t.success == "function" ? await t.success(c) : t.success, f = typeof t.description == "function" ? await t.description(c) : t.description;
1430
+ this.create({ id: r, type: "success", message: u, description: f });
1431
+ }
1432
+ }).catch(async (c) => {
1433
+ if (l = ["reject", c], t.error !== void 0) {
1434
+ n = !1;
1435
+ let u = typeof t.error == "function" ? await t.error(c) : t.error, f = typeof t.description == "function" ? await t.description(c) : t.description;
1436
+ this.create({ id: r, type: "error", message: u, description: f });
1437
+ }
1438
+ }).finally(() => {
1439
+ var c;
1440
+ n && (this.dismiss(r), r = void 0), (c = t.finally) == null || c.call(t);
1441
+ }), d = () => new Promise((c, u) => i.then(() => l[0] === "reject" ? u(l[1]) : c(l[1])).catch(u));
1442
+ return typeof r != "string" && typeof r != "number" ? { unwrap: d } : Object.assign(r, { unwrap: d });
1443
+ }, this.custom = (e, t) => {
1444
+ let r = (t == null ? void 0 : t.id) || et++;
1445
+ return this.create({ jsx: e(r), id: r, ...t }), r;
1446
+ }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
1447
+ }
1448
+ }, Y = new an(), sn = (e, t) => {
1449
+ let r = (t == null ? void 0 : t.id) || et++;
1450
+ return Y.addToast({ title: e, ...t, id: r }), r;
1451
+ }, ln = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", cn = sn, dn = () => Y.toasts, un = () => Y.getActiveToasts(), fn = Object.assign(cn, { success: Y.success, info: Y.info, warning: Y.warning, error: Y.error, custom: Y.custom, message: Y.message, promise: Y.promise, dismiss: Y.dismiss, loading: Y.loading }, { getHistory: dn, getToasts: un });
1452
+ function mn(e, { insertAt: t } = {}) {
1453
+ if (typeof document > "u") return;
1454
+ let r = document.head || document.getElementsByTagName("head")[0], o = document.createElement("style");
1455
+ o.type = "text/css", t === "top" && r.firstChild ? r.insertBefore(o, r.firstChild) : r.appendChild(o), o.styleSheet ? o.styleSheet.cssText = e : o.appendChild(document.createTextNode(e));
1456
+ }
1457
+ mn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
1458
+ `);
1459
+ function Ie(e) {
1460
+ return e.label !== void 0;
1461
+ }
1462
+ var hn = 3, pn = "32px", gn = "16px", wt = 4e3, vn = 356, bn = 14, yn = 20, wn = 200;
1463
+ function ee(...e) {
1464
+ return e.filter(Boolean).join(" ");
1465
+ }
1466
+ function xn(e) {
1467
+ let [t, r] = e.split("-"), o = [];
1468
+ return t && o.push(t), r && o.push(r), o;
1469
+ }
1470
+ var Sn = (e) => {
1471
+ var t, r, o, n, l, i, d, c, u, f, p;
1472
+ let { invert: g, toast: a, unstyled: N, interacting: b, setHeights: v, visibleToasts: E, heights: C, index: x, toasts: R, expanded: B, removeToast: I, defaultRichColors: F, closeButton: A, style: P, cancelButtonStyle: O, actionButtonStyle: H, className: S = "", descriptionClassName: de = "", duration: G, position: ne, gap: V, loadingIcon: q, expandByDefault: ue, classNames: w, icons: U, closeButtonAriaLabel: Ve = "Close toast", pauseWhenPageIsHidden: k } = e, [D, _] = m.useState(null), [j, he] = m.useState(null), [L, Ge] = m.useState(!1), [xe, Pe] = m.useState(!1), [Se, je] = m.useState(!1), [ct, wr] = m.useState(!1), [xr, dt] = m.useState(!1), [Sr, Ye] = m.useState(0), [Cr, ut] = m.useState(0), Ce = m.useRef(a.duration || G || wt), ft = m.useRef(null), fe = m.useRef(null), Er = x === 0, Tr = x + 1 <= E, X = a.type, pe = a.dismissible !== !1, Nr = a.className || "", Rr = a.descriptionClassName || "", ke = m.useMemo(() => C.findIndex((y) => y.toastId === a.id) || 0, [C, a.id]), Pr = m.useMemo(() => {
1473
+ var y;
1474
+ return (y = a.closeButton) != null ? y : A;
1475
+ }, [a.closeButton, A]), mt = m.useMemo(() => a.duration || G || wt, [a.duration, G]), $e = m.useRef(0), ge = m.useRef(0), ht = m.useRef(0), ve = m.useRef(null), [kr, Ir] = ne.split("-"), pt = m.useMemo(() => C.reduce((y, T, M) => M >= ke ? y : y + T.height, 0), [C, ke]), gt = nn(), Ar = a.invert || g, We = X === "loading";
1476
+ ge.current = m.useMemo(() => ke * V + pt, [ke, pt]), m.useEffect(() => {
1477
+ Ce.current = mt;
1478
+ }, [mt]), m.useEffect(() => {
1479
+ Ge(!0);
1480
+ }, []), m.useEffect(() => {
1481
+ let y = fe.current;
1482
+ if (y) {
1483
+ let T = y.getBoundingClientRect().height;
1484
+ return ut(T), v((M) => [{ toastId: a.id, height: T, position: a.position }, ...M]), () => v((M) => M.filter((Z) => Z.toastId !== a.id));
1485
+ }
1486
+ }, [v, a.id]), m.useLayoutEffect(() => {
1487
+ if (!L) return;
1488
+ let y = fe.current, T = y.style.height;
1489
+ y.style.height = "auto";
1490
+ let M = y.getBoundingClientRect().height;
1491
+ y.style.height = T, ut(M), v((Z) => Z.find((J) => J.toastId === a.id) ? Z.map((J) => J.toastId === a.id ? { ...J, height: M } : J) : [{ toastId: a.id, height: M, position: a.position }, ...Z]);
1492
+ }, [L, a.title, a.description, v, a.id]);
1493
+ let ae = m.useCallback(() => {
1494
+ Pe(!0), Ye(ge.current), v((y) => y.filter((T) => T.toastId !== a.id)), setTimeout(() => {
1495
+ I(a);
1496
+ }, wn);
1497
+ }, [a, I, v, ge]);
1498
+ m.useEffect(() => {
1499
+ if (a.promise && X === "loading" || a.duration === 1 / 0 || a.type === "loading") return;
1500
+ let y;
1501
+ return B || b || k && gt ? (() => {
1502
+ if (ht.current < $e.current) {
1503
+ let T = (/* @__PURE__ */ new Date()).getTime() - $e.current;
1504
+ Ce.current = Ce.current - T;
1505
+ }
1506
+ ht.current = (/* @__PURE__ */ new Date()).getTime();
1507
+ })() : Ce.current !== 1 / 0 && ($e.current = (/* @__PURE__ */ new Date()).getTime(), y = setTimeout(() => {
1508
+ var T;
1509
+ (T = a.onAutoClose) == null || T.call(a, a), ae();
1510
+ }, Ce.current)), () => clearTimeout(y);
1511
+ }, [B, b, a, X, k, gt, ae]), m.useEffect(() => {
1512
+ a.delete && ae();
1513
+ }, [ae, a.delete]);
1514
+ function Dr() {
1515
+ var y, T, M;
1516
+ return U != null && U.loading ? m.createElement("div", { className: ee(w == null ? void 0 : w.loader, (y = a == null ? void 0 : a.classNames) == null ? void 0 : y.loader, "sonner-loader"), "data-visible": X === "loading" }, U.loading) : q ? m.createElement("div", { className: ee(w == null ? void 0 : w.loader, (T = a == null ? void 0 : a.classNames) == null ? void 0 : T.loader, "sonner-loader"), "data-visible": X === "loading" }, q) : m.createElement(Jo, { className: ee(w == null ? void 0 : w.loader, (M = a == null ? void 0 : a.classNames) == null ? void 0 : M.loader), visible: X === "loading" });
1517
+ }
1518
+ return m.createElement("li", { tabIndex: 0, ref: fe, className: ee(S, Nr, w == null ? void 0 : w.toast, (t = a == null ? void 0 : a.classNames) == null ? void 0 : t.toast, w == null ? void 0 : w.default, w == null ? void 0 : w[X], (r = a == null ? void 0 : a.classNames) == null ? void 0 : r[X]), "data-sonner-toast": "", "data-rich-colors": (o = a.richColors) != null ? o : F, "data-styled": !(a.jsx || a.unstyled || N), "data-mounted": L, "data-promise": !!a.promise, "data-swiped": xr, "data-removed": xe, "data-visible": Tr, "data-y-position": kr, "data-x-position": Ir, "data-index": x, "data-front": Er, "data-swiping": Se, "data-dismissible": pe, "data-type": X, "data-invert": Ar, "data-swipe-out": ct, "data-swipe-direction": j, "data-expanded": !!(B || ue && L), style: { "--index": x, "--toasts-before": x, "--z-index": R.length - x, "--offset": `${xe ? Sr : ge.current}px`, "--initial-height": ue ? "auto" : `${Cr}px`, ...P, ...a.style }, onDragEnd: () => {
1519
+ je(!1), _(null), ve.current = null;
1520
+ }, onPointerDown: (y) => {
1521
+ We || !pe || (ft.current = /* @__PURE__ */ new Date(), Ye(ge.current), y.target.setPointerCapture(y.pointerId), y.target.tagName !== "BUTTON" && (je(!0), ve.current = { x: y.clientX, y: y.clientY }));
1522
+ }, onPointerUp: () => {
1523
+ var y, T, M, Z;
1524
+ if (ct || !pe) return;
1525
+ ve.current = null;
1526
+ let J = Number(((y = fe.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((T = fe.current) == null ? void 0 : T.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), me = (/* @__PURE__ */ new Date()).getTime() - ((M = ft.current) == null ? void 0 : M.getTime()), Q = D === "x" ? J : se, le = Math.abs(Q) / me;
1527
+ if (Math.abs(Q) >= yn || le > 0.11) {
1528
+ Ye(ge.current), (Z = a.onDismiss) == null || Z.call(a, a), he(D === "x" ? J > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(), wr(!0), dt(!1);
1529
+ return;
1530
+ }
1531
+ je(!1), _(null);
1532
+ }, onPointerMove: (y) => {
1533
+ var T, M, Z, J;
1534
+ if (!ve.current || !pe || ((T = window.getSelection()) == null ? void 0 : T.toString().length) > 0) return;
1535
+ let se = y.clientY - ve.current.y, me = y.clientX - ve.current.x, Q = (M = e.swipeDirections) != null ? M : xn(ne);
1536
+ !D && (Math.abs(me) > 1 || Math.abs(se) > 1) && _(Math.abs(me) > Math.abs(se) ? "x" : "y");
1537
+ let le = { x: 0, y: 0 };
1538
+ D === "y" ? (Q.includes("top") || Q.includes("bottom")) && (Q.includes("top") && se < 0 || Q.includes("bottom") && se > 0) && (le.y = se) : D === "x" && (Q.includes("left") || Q.includes("right")) && (Q.includes("left") && me < 0 || Q.includes("right") && me > 0) && (le.x = me), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) && dt(!0), (Z = fe.current) == null || Z.style.setProperty("--swipe-amount-x", `${le.x}px`), (J = fe.current) == null || J.style.setProperty("--swipe-amount-y", `${le.y}px`);
1539
+ } }, Pr && !a.jsx ? m.createElement("button", { "aria-label": Ve, "data-disabled": We, "data-close-button": !0, onClick: We || !pe ? () => {
1540
+ } : () => {
1541
+ var y;
1542
+ ae(), (y = a.onDismiss) == null || y.call(a, a);
1543
+ }, className: ee(w == null ? void 0 : w.closeButton, (n = a == null ? void 0 : a.classNames) == null ? void 0 : n.closeButton) }, (l = U == null ? void 0 : U.close) != null ? l : on) : null, a.jsx || Ue(a.title) ? a.jsx ? a.jsx : typeof a.title == "function" ? a.title() : a.title : m.createElement(m.Fragment, null, X || a.icon || a.promise ? m.createElement("div", { "data-icon": "", className: ee(w == null ? void 0 : w.icon, (i = a == null ? void 0 : a.classNames) == null ? void 0 : i.icon) }, a.promise || a.type === "loading" && !a.icon ? a.icon || Dr() : null, a.type !== "loading" ? a.icon || (U == null ? void 0 : U[X]) || qo(X) : null) : null, m.createElement("div", { "data-content": "", className: ee(w == null ? void 0 : w.content, (d = a == null ? void 0 : a.classNames) == null ? void 0 : d.content) }, m.createElement("div", { "data-title": "", className: ee(w == null ? void 0 : w.title, (c = a == null ? void 0 : a.classNames) == null ? void 0 : c.title) }, typeof a.title == "function" ? a.title() : a.title), a.description ? m.createElement("div", { "data-description": "", className: ee(de, Rr, w == null ? void 0 : w.description, (u = a == null ? void 0 : a.classNames) == null ? void 0 : u.description) }, typeof a.description == "function" ? a.description() : a.description) : null), Ue(a.cancel) ? a.cancel : a.cancel && Ie(a.cancel) ? m.createElement("button", { "data-button": !0, "data-cancel": !0, style: a.cancelButtonStyle || O, onClick: (y) => {
1544
+ var T, M;
1545
+ Ie(a.cancel) && pe && ((M = (T = a.cancel).onClick) == null || M.call(T, y), ae());
1546
+ }, className: ee(w == null ? void 0 : w.cancelButton, (f = a == null ? void 0 : a.classNames) == null ? void 0 : f.cancelButton) }, a.cancel.label) : null, Ue(a.action) ? a.action : a.action && Ie(a.action) ? m.createElement("button", { "data-button": !0, "data-action": !0, style: a.actionButtonStyle || H, onClick: (y) => {
1547
+ var T, M;
1548
+ Ie(a.action) && ((M = (T = a.action).onClick) == null || M.call(T, y), !y.defaultPrevented && ae());
1549
+ }, className: ee(w == null ? void 0 : w.actionButton, (p = a == null ? void 0 : a.classNames) == null ? void 0 : p.actionButton) }, a.action.label) : null));
1550
+ };
1551
+ function xt() {
1552
+ if (typeof window > "u" || typeof document > "u") return "ltr";
1553
+ let e = document.documentElement.getAttribute("dir");
1554
+ return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
1555
+ }
1556
+ function Cn(e, t) {
1557
+ let r = {};
1558
+ return [e, t].forEach((o, n) => {
1559
+ let l = n === 1, i = l ? "--mobile-offset" : "--offset", d = l ? gn : pn;
1560
+ function c(u) {
1561
+ ["top", "right", "bottom", "left"].forEach((f) => {
1562
+ r[`${i}-${f}`] = typeof u == "number" ? `${u}px` : u;
1563
+ });
1564
+ }
1565
+ typeof o == "number" || typeof o == "string" ? c(o) : typeof o == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
1566
+ o[u] === void 0 ? r[`${i}-${u}`] = d : r[`${i}-${u}`] = typeof o[u] == "number" ? `${o[u]}px` : o[u];
1567
+ }) : c(d);
1568
+ }), r;
1569
+ }
1570
+ Mr(function(e, t) {
1571
+ let { invert: r, position: o = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: l, closeButton: i, className: d, offset: c, mobileOffset: u, theme: f = "light", richColors: p, duration: g, style: a, visibleToasts: N = hn, toastOptions: b, dir: v = xt(), gap: E = bn, loadingIcon: C, icons: x, containerAriaLabel: R = "Notifications", pauseWhenPageIsHidden: B } = e, [I, F] = m.useState([]), A = m.useMemo(() => Array.from(new Set([o].concat(I.filter((k) => k.position).map((k) => k.position)))), [I, o]), [P, O] = m.useState([]), [H, S] = m.useState(!1), [de, G] = m.useState(!1), [ne, V] = m.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), q = m.useRef(null), ue = n.join("+").replace(/Key/g, "").replace(/Digit/g, ""), w = m.useRef(null), U = m.useRef(!1), Ve = m.useCallback((k) => {
1572
+ F((D) => {
1573
+ var _;
1574
+ return (_ = D.find((j) => j.id === k.id)) != null && _.delete || Y.dismiss(k.id), D.filter(({ id: j }) => j !== k.id);
1575
+ });
1576
+ }, []);
1577
+ return m.useEffect(() => Y.subscribe((k) => {
1578
+ if (k.dismiss) {
1579
+ F((D) => D.map((_) => _.id === k.id ? { ..._, delete: !0 } : _));
1580
+ return;
1581
+ }
1582
+ setTimeout(() => {
1583
+ eo.flushSync(() => {
1584
+ F((D) => {
1585
+ let _ = D.findIndex((j) => j.id === k.id);
1586
+ return _ !== -1 ? [...D.slice(0, _), { ...D[_], ...k }, ...D.slice(_ + 1)] : [k, ...D];
1587
+ });
1588
+ });
1589
+ });
1590
+ }), []), m.useEffect(() => {
1591
+ if (f !== "system") {
1592
+ V(f);
1593
+ return;
1594
+ }
1595
+ if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? V("dark") : V("light")), typeof window > "u") return;
1596
+ let k = window.matchMedia("(prefers-color-scheme: dark)");
1597
+ try {
1598
+ k.addEventListener("change", ({ matches: D }) => {
1599
+ V(D ? "dark" : "light");
1600
+ });
1601
+ } catch {
1602
+ k.addListener(({ matches: _ }) => {
1603
+ try {
1604
+ V(_ ? "dark" : "light");
1605
+ } catch (j) {
1606
+ console.error(j);
1607
+ }
1608
+ });
1609
+ }
1610
+ }, [f]), m.useEffect(() => {
1611
+ I.length <= 1 && S(!1);
1612
+ }, [I]), m.useEffect(() => {
1613
+ let k = (D) => {
1614
+ var _, j;
1615
+ n.every((he) => D[he] || D.code === he) && (S(!0), (_ = q.current) == null || _.focus()), D.code === "Escape" && (document.activeElement === q.current || (j = q.current) != null && j.contains(document.activeElement)) && S(!1);
1616
+ };
1617
+ return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
1618
+ }, [n]), m.useEffect(() => {
1619
+ if (q.current) return () => {
1620
+ w.current && (w.current.focus({ preventScroll: !0 }), w.current = null, U.current = !1);
1621
+ };
1622
+ }, [q.current]), m.createElement("section", { ref: t, "aria-label": `${R} ${ue}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, A.map((k, D) => {
1623
+ var _;
1624
+ let [j, he] = k.split("-");
1625
+ return I.length ? m.createElement("ol", { key: k, dir: v === "auto" ? xt() : v, tabIndex: -1, ref: q, className: d, "data-sonner-toaster": !0, "data-theme": ne, "data-y-position": j, "data-lifted": H && I.length > 1 && !l, "data-x-position": he, style: { "--front-toast-height": `${((_ = P[0]) == null ? void 0 : _.height) || 0}px`, "--width": `${vn}px`, "--gap": `${E}px`, ...a, ...Cn(c, u) }, onBlur: (L) => {
1626
+ U.current && !L.currentTarget.contains(L.relatedTarget) && (U.current = !1, w.current && (w.current.focus({ preventScroll: !0 }), w.current = null));
1627
+ }, onFocus: (L) => {
1628
+ L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || U.current || (U.current = !0, w.current = L.relatedTarget);
1629
+ }, onMouseEnter: () => S(!0), onMouseMove: () => S(!0), onMouseLeave: () => {
1630
+ de || S(!1);
1631
+ }, onDragEnd: () => S(!1), onPointerDown: (L) => {
1632
+ L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || G(!0);
1633
+ }, onPointerUp: () => G(!1) }, I.filter((L) => !L.position && D === 0 || L.position === k).map((L, Ge) => {
1634
+ var xe, Pe;
1635
+ return m.createElement(Sn, { key: L.id, icons: x, index: Ge, toast: L, defaultRichColors: p, duration: (xe = b == null ? void 0 : b.duration) != null ? xe : g, className: b == null ? void 0 : b.className, descriptionClassName: b == null ? void 0 : b.descriptionClassName, invert: r, visibleToasts: N, closeButton: (Pe = b == null ? void 0 : b.closeButton) != null ? Pe : i, interacting: de, position: k, style: b == null ? void 0 : b.style, unstyled: b == null ? void 0 : b.unstyled, classNames: b == null ? void 0 : b.classNames, cancelButtonStyle: b == null ? void 0 : b.cancelButtonStyle, actionButtonStyle: b == null ? void 0 : b.actionButtonStyle, removeToast: Ve, toasts: I.filter((Se) => Se.position == L.position), heights: P.filter((Se) => Se.position == L.position), setHeights: O, expandByDefault: l, gap: E, loadingIcon: C, expanded: H, pauseWhenPageIsHidden: B, swipeDirections: e.swipeDirections });
1636
+ })) : null;
1637
+ }));
1638
+ });
1639
+ const yr = {
1640
+ mobile: { width: 375, icon: Yr, label: "Mobile (375px)" },
1641
+ tablet: { width: 768, icon: jr, label: "Tablet (768px)" },
1642
+ small: { width: 1024, icon: Gr, label: "Small Desktop (1024px)" },
1643
+ desktop: { width: "100%", icon: Vr, label: "Desktop (Full)" }
1644
+ }, En = ({ onSave: e, deviceSize: t, onDeviceSizeChange: r }) => {
1645
+ const { actions: o, query: n, canUndo: l, canRedo: i } = Te((c, u) => ({
1646
+ canUndo: u.history.canUndo(),
1647
+ canRedo: u.history.canRedo()
1648
+ })), d = () => {
1649
+ const c = n.serialize();
1650
+ e == null || e(c), fn.success("Page saved successfully");
1651
+ };
1652
+ return /* @__PURE__ */ z("div", { className: "flex items-center gap-4", children: [
1653
+ /* @__PURE__ */ s($r, { children: /* @__PURE__ */ s(
1654
+ vr,
1655
+ {
1656
+ type: "single",
1657
+ value: t,
1658
+ onValueChange: (c) => c && r(c),
1659
+ className: "bg-muted rounded-md p-1",
1660
+ children: Object.entries(yr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ z(Wr, { children: [
1661
+ /* @__PURE__ */ s(Ur, { asChild: !0, children: /* @__PURE__ */ s(
1662
+ br,
1663
+ {
1664
+ value: c,
1665
+ size: "sm",
1666
+ className: "data-[state=on]:bg-background data-[state=on]:shadow-sm",
1667
+ children: /* @__PURE__ */ s(u, { className: "h-4 w-4" })
1668
+ }
1669
+ ) }),
1670
+ /* @__PURE__ */ s(Xr, { side: "bottom", children: /* @__PURE__ */ s("p", { children: f }) })
1671
+ ] }, c))
1672
+ }
1673
+ ) }),
1674
+ /* @__PURE__ */ s("div", { className: "h-6 w-px bg-border" }),
1675
+ /* @__PURE__ */ z("div", { className: "flex items-center gap-2", children: [
1676
+ /* @__PURE__ */ s(
1677
+ Ae,
1678
+ {
1679
+ variant: "outline",
1680
+ size: "sm",
1681
+ onClick: () => o.history.undo(),
1682
+ disabled: !l,
1683
+ children: /* @__PURE__ */ s(ao, { className: "h-4 w-4" })
1684
+ }
1685
+ ),
1686
+ /* @__PURE__ */ s(
1687
+ Ae,
1688
+ {
1689
+ variant: "outline",
1690
+ size: "sm",
1691
+ onClick: () => o.history.redo(),
1692
+ disabled: !i,
1693
+ children: /* @__PURE__ */ s(ro, { className: "h-4 w-4" })
1694
+ }
1695
+ ),
1696
+ /* @__PURE__ */ z(Ae, { size: "sm", onClick: d, children: [
1697
+ /* @__PURE__ */ s(oo, { className: "h-4 w-4 mr-2" }),
1698
+ "Save"
1699
+ ] })
1700
+ ] })
1701
+ ] });
1702
+ }, kn = ({ initialData: e, onSave: t, onStateChange: r }) => {
1703
+ var c;
1704
+ const o = Kr(), [n, l] = Ee("desktop"), i = ((c = yr[n]) == null ? void 0 : c.width) || "100%", d = (u) => {
1705
+ if (r)
1706
+ try {
1707
+ const f = u.serialize();
1708
+ r(f);
1709
+ } catch {
1710
+ }
1711
+ };
1712
+ return /* @__PURE__ */ s(
1713
+ qr,
1714
+ {
1715
+ resolver: {
1716
+ Container: ye,
1717
+ Text: De,
1718
+ ButtonComponent: Tt,
1719
+ Heading: Ze,
1720
+ Image: Rt,
1721
+ Divider: kt,
1722
+ Spacer: It,
1723
+ Video: Pt,
1724
+ Columns: Et,
1725
+ Link: Nt
1726
+ },
1727
+ enabled: !0,
1728
+ onNodesChange: (u) => d(u),
1729
+ children: /* @__PURE__ */ s(Zr, { value: n, children: /* @__PURE__ */ s(Jr, { value: o, children: /* @__PURE__ */ z("div", { className: "flex flex-col h-full", children: [
1730
+ /* @__PURE__ */ z("div", { className: "flex items-center justify-between pb-4 border-b border-border", children: [
1731
+ /* @__PURE__ */ s("h2", { className: "text-lg font-semibold", children: "Page Builder" }),
1732
+ /* @__PURE__ */ s(
1733
+ En,
1734
+ {
1735
+ onSave: t,
1736
+ deviceSize: n,
1737
+ onDeviceSizeChange: l
1738
+ }
1739
+ )
1740
+ ] }),
1741
+ /* @__PURE__ */ z("div", { className: "flex gap-4 mt-4 flex-1 min-h-0", children: [
1742
+ /* @__PURE__ */ s(Xe, { className: "w-56 shrink-0", children: /* @__PURE__ */ z(Ke, { className: "p-4 space-y-6", children: [
1743
+ /* @__PURE__ */ s(lo, {}),
1744
+ /* @__PURE__ */ s(No, {})
1745
+ ] }) }),
1746
+ /* @__PURE__ */ s(Xe, { className: "flex-1 overflow-hidden bg-muted/30 flex flex-col", children: /* @__PURE__ */ s(Ke, { className: "p-4 flex-1 flex justify-center overflow-hidden", children: /* @__PURE__ */ s(st, { className: "h-full w-full", children: /* @__PURE__ */ s("div", { className: "flex justify-center min-h-full", children: /* @__PURE__ */ s(
1747
+ "div",
1748
+ {
1749
+ className: "bg-white rounded-lg min-h-full p-4 border border-dashed border-border transition-all duration-300 shadow-sm",
1750
+ style: {
1751
+ width: typeof i == "number" ? `${i}px` : i,
1752
+ maxWidth: "100%"
1753
+ },
1754
+ children: /* @__PURE__ */ s(Qr, { children: /* @__PURE__ */ z(be, { is: ye, canvas: !0, children: [
1755
+ /* @__PURE__ */ s(
1756
+ Ze,
1757
+ {
1758
+ text: "Welcome to your event!",
1759
+ level: 1,
1760
+ textAlign: "center"
1761
+ }
1762
+ ),
1763
+ /* @__PURE__ */ s(
1764
+ De,
1765
+ {
1766
+ text: "Start building your landing page by dragging components from the left panel.",
1767
+ textAlign: "center"
1768
+ }
1769
+ ),
1770
+ /* @__PURE__ */ s(
1771
+ be,
1772
+ {
1773
+ is: ye,
1774
+ canvas: !0,
1775
+ padding: 24,
1776
+ background: "#f4f4f5",
1777
+ children: /* @__PURE__ */ s(
1778
+ De,
1779
+ {
1780
+ text: "Drag components here",
1781
+ textAlign: "center"
1782
+ }
1783
+ )
1784
+ }
1785
+ )
1786
+ ] }) })
1787
+ }
1788
+ ) }) }) }) }),
1789
+ /* @__PURE__ */ s(Xe, { className: "w-72 shrink-0 flex flex-col", children: /* @__PURE__ */ s(Ke, { className: "p-4 flex-1 overflow-hidden", children: /* @__PURE__ */ s(Eo, {}) }) })
1790
+ ] })
1791
+ ] }) }) })
1792
+ }
1793
+ );
1794
+ };
1795
+ export {
1796
+ kn as default
1797
+ };