@chaibuilder/sdk 1.2.59 → 1.2.60

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 (64) hide show
  1. package/dist/{AddBlocks-MH_fqSRf.cjs → AddBlocks-BtMNa99n.cjs} +1 -1
  2. package/dist/{AddBlocks-05ZH2Suu.js → AddBlocks-L-3Io1jR.js} +6 -6
  3. package/dist/CanvasArea-KBfW2Hh3.js +978 -0
  4. package/dist/CanvasArea-ZNRxUJR7.cjs +59 -0
  5. package/dist/{CodeEditor-vECReGwz.cjs → CodeEditor-NuzOGqRn.cjs} +1 -1
  6. package/dist/{CodeEditor-zYBqhBv3.js → CodeEditor-cY6z8D4N.js} +1 -1
  7. package/dist/{CurrentPage-cOvRmEIZ.js → CurrentPage-XXy2OzNq.js} +3 -3
  8. package/dist/{CurrentPage-pwDwQsWa.cjs → CurrentPage-ccOL3l6S.cjs} +1 -1
  9. package/dist/ListTree-8jpTvI-s.cjs +1 -0
  10. package/dist/{ListTree-0iy8aBgI.js → ListTree-yoltG7gq.js} +2 -2
  11. package/dist/{PagesPanel-A3du_vDn.js → PagesPanel-XUtE4Aou.js} +4 -4
  12. package/dist/{PagesPanel-bfNUqq2a.cjs → PagesPanel-t3NlycIl.cjs} +1 -1
  13. package/dist/{ProjectPanel-92EtwSrh.js → ProjectPanel-3zkDX3az.js} +4 -4
  14. package/dist/{ProjectPanel-QMaTK2Jx.cjs → ProjectPanel-UClucyIl.cjs} +1 -1
  15. package/dist/{Settings-3ZuMFtd6.js → Settings-C9AegLbF.js} +2 -2
  16. package/dist/{Settings-8_Twq9DO.cjs → Settings-GVs7UvAX.cjs} +1 -1
  17. package/dist/{SidePanels-C8RdCe7y.cjs → SidePanels--qxWuuF-.cjs} +1 -1
  18. package/dist/{SidePanels-XUVc9jMH.js → SidePanels-Y3z3wyQx.js} +3 -3
  19. package/dist/{ThemeConfiguration-PvMN3j6h.cjs → ThemeConfiguration-03I3INEI.cjs} +1 -1
  20. package/dist/{ThemeConfiguration-ab7lbA2y.js → ThemeConfiguration-e_4e_ZcS.js} +1 -1
  21. package/dist/{Topbar-EkBS5_nt.cjs → Topbar-Yrhyc6IQ.cjs} +1 -1
  22. package/dist/{Topbar-VdVqOT-8.js → Topbar-lnCz7TLm.js} +2 -2
  23. package/dist/{UILibrariesPanel-CaGLzB9c.cjs → UILibrariesPanel-LGbh-IZP.cjs} +1 -1
  24. package/dist/{UILibrariesPanel-raxCToMd.js → UILibrariesPanel-PP4QDQRZ.js} +4 -4
  25. package/dist/{UnsplashImages-cah1BRL_.cjs → UnsplashImages-5JbDig-S.cjs} +1 -1
  26. package/dist/{UnsplashImages-alt_doTy.js → UnsplashImages-Y0TGxNbH.js} +1 -1
  27. package/dist/UploadImages-Dh35M55S.js +134 -0
  28. package/dist/UploadImages-f6wPPJxc.cjs +1 -0
  29. package/dist/{add-page-modal-VmIvQ5ug.cjs → add-page-modal-j2foeVKa.cjs} +1 -1
  30. package/dist/{add-page-modal-OH7DL-Yz.js → add-page-modal-sKH5SHMa.js} +4 -4
  31. package/dist/{confirm-alert-rYsxlfR4.cjs → confirm-alert-C3wsf6lk.cjs} +1 -1
  32. package/dist/{confirm-alert-m85JJlQi.js → confirm-alert-pGxJwZ2Q.js} +1 -1
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +2 -2
  35. package/dist/{delete-page-modal--g92Sj1h.js → delete-page-modal-4Tp_VPx1.js} +3 -3
  36. package/dist/{delete-page-modal-uSFaC2aS.cjs → delete-page-modal-XObwAnNB.cjs} +1 -1
  37. package/dist/email.cjs +1 -1
  38. package/dist/email.js +2 -2
  39. package/dist/{form-G3PqS2Gc.cjs → form-D9cWMUJ4.cjs} +1 -1
  40. package/dist/{form-MSL4CDff.js → form-pya-o19L.js} +1 -1
  41. package/dist/{index-yVCgnTlS.js → index-1teL5Lld.js} +3 -3
  42. package/dist/{index-4C2qT6ju.cjs → index-849lneVZ.cjs} +1 -1
  43. package/dist/{index-Phf9F3An.cjs → index-8Fxmy4tt.cjs} +42 -42
  44. package/dist/{index-uLn8W3eR.js → index-TzLilp-0.js} +99 -100
  45. package/dist/{index--t_K8Sw6.js → index-ZZTdYO7r.js} +17 -13
  46. package/dist/{index-0FIxW0gR.cjs → index-cH1CfTbV.cjs} +1 -1
  47. package/dist/{page-viewer-hBsE440V.js → page-viewer-Q-eOjWmS.js} +7 -7
  48. package/dist/{page-viewer-yIl2jRO8.cjs → page-viewer-tNzhbu_E.cjs} +1 -1
  49. package/dist/{project-general-setting-NFCzMKqN.cjs → project-general-setting-9fI_iZ_Q.cjs} +1 -1
  50. package/dist/{project-general-setting-9AGMKDNq.js → project-general-setting-uDDo2ktT.js} +4 -4
  51. package/dist/{project-seo-setting-3kFJ77jY.js → project-seo-setting-PXJe5SSV.js} +2 -2
  52. package/dist/{project-seo-setting-C3ilIIeM.cjs → project-seo-setting-rjrO9KDR.cjs} +1 -1
  53. package/dist/{single-page-detail-5qDQmlL-.js → single-page-detail-0ipAHwTX.js} +11 -11
  54. package/dist/{single-page-detail-wwJYm5lF.cjs → single-page-detail-s_kkO9Zj.cjs} +1 -1
  55. package/dist/studio.cjs +1 -1
  56. package/dist/studio.js +3 -3
  57. package/dist/ui.cjs +1 -1
  58. package/dist/ui.js +42 -42
  59. package/package.json +1 -1
  60. package/dist/CanvasArea-NLbaLcFM.cjs +0 -59
  61. package/dist/CanvasArea-akw7npWW.js +0 -1259
  62. package/dist/ListTree-Njsk1AzL.cjs +0 -1
  63. package/dist/UploadImages-5dRETWCo.cjs +0 -1
  64. package/dist/UploadImages-JqVL_aQd.js +0 -140
@@ -1,1259 +0,0 @@
1
- var Oe = Object.defineProperty;
2
- var ze = (n, s, e) => s in n ? Oe(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
3
- var M = (n, s, e) => (ze(n, typeof s != "symbol" ? s + "" : s, e), e);
4
- import { j as r } from "./jsx-runtime-WbnYoNE9.js";
5
- import S, { createElement as ce, useCallback as q, useState as _, useEffect as j, Component as ye, Children as Ue, Suspense as V, useRef as de, useMemo as We } from "react";
6
- import { map as z, includes as pe, toUpper as Z, round as qe, throttle as ke, has as K, isEmpty as I, first as Y, omit as we, pick as Ke, get as f, isString as oe, memoize as Ye, each as Xe, find as Ge, filter as je, isNull as Qe } from "lodash-es";
7
- import { ResetIcon as ue, SunIcon as Ze, MobileIcon as he, LaptopIcon as Je, DesktopIcon as Ve, DotsVerticalIcon as et, EraserIcon as tt, ZoomInIcon as st, DragHandleDots2Icon as ot, ArrowUpIcon as nt, CopyIcon as rt, TrashIcon as it } from "@radix-ui/react-icons";
8
- import { v as Ce, B as X, aa as _e, aR as Be, aS as lt, aT as at, aU as ct, a4 as G, as as dt, h as U, E as pt, F as ut, G as ht, H as mt, I as gt, aV as ft, aW as Ae, r as A, at as L, A as xt, a as vt, b as $t, c as bt, d as yt, e as kt, f as wt, g as jt, P as Ct, U as _t, aX as Bt, a5 as De, aQ as W, aY as At, a2 as Dt, ad as F, aZ as Se, am as St, a_ as P, a$ as It, D as ne, t as Ie, q as Ee, s as Te, Q as Et, b0 as Tt, b1 as Nt, b2 as Mt, X as Lt, b3 as Ft, b4 as Rt, b5 as Ht, b6 as Pt, ai as Ot, b7 as zt, S as ee, $ as Ut } from "./index-uLn8W3eR.js";
9
- import { a as Wt, u as qt, B as Kt, E as Yt } from "./index--t_K8Sw6.js";
10
- import { useTranslation as re } from "react-i18next";
11
- import { useAtom as b } from "jotai";
12
- import { SparklesIcon as Xt } from "lucide-react";
13
- import me from "react-dom";
14
- import w from "prop-types";
15
- import { Quill as Gt } from "react-quill";
16
- import { d as ie, a as Ne } from "./atoms-ZOWyNoiC.js";
17
- import { flip as Qt } from "@floating-ui/dom";
18
- import { useFloating as Zt, shift as Jt } from "@floating-ui/react-dom";
19
- import { useResizeObserver as Vt } from "@react-hookz/web";
20
- import { useFeature as es } from "flagged";
21
- import ts from "@tailwindcss/typography";
22
- import ss from "@tailwindcss/forms";
23
- import os from "@tailwindcss/aspect-ratio";
24
- import ns from "tailwindcss-palette-generator";
25
- import { twMerge as rs } from "tailwind-merge";
26
- import { S as ge, a as Me } from "./MODIFIERS-fd5XOmum.js";
27
- import { getBlockComponent as is } from "@chaibuilder/runtime";
28
- import { includes as fe } from "lodash";
29
- import { Provider as ls } from "react-wrap-balancer";
30
- import { Resizable as as } from "re-resizable";
31
- import "./_commonjsHelpers-UyOWmZb0.js";
32
- import "@radix-ui/react-toggle";
33
- import "class-variance-authority";
34
- import "./utils-VpVqnC9m.js";
35
- import "clsx";
36
- import "@radix-ui/react-switch";
37
- import "@radix-ui/react-slot";
38
- import "@radix-ui/react-accordion";
39
- import "@radix-ui/react-alert-dialog";
40
- import "@radix-ui/react-dialog";
41
- import "@radix-ui/react-label";
42
- import "@radix-ui/react-scroll-area";
43
- import "@radix-ui/react-tabs";
44
- import "@radix-ui/react-tooltip";
45
- import "@radix-ui/react-popover";
46
- import "@radix-ui/react-menubar";
47
- import "@radix-ui/react-hover-card";
48
- import "@radix-ui/react-select";
49
- import "@radix-ui/react-dropdown-menu";
50
- import "@radix-ui/react-separator";
51
- import "@radix-ui/react-toast";
52
- import "cmdk";
53
- import "@radix-ui/react-context-menu";
54
- import "react-icons-picker";
55
- import "./Functions-7jnEwJyw.js";
56
- import "tree-model";
57
- import "i18next";
58
- import "react-hotkeys-hook";
59
- import "./index-VBXQixVm.js";
60
- const cs = () => {
61
- const { hasUndo: n, hasRedo: s, undo: e, redo: t } = Ce();
62
- return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
63
- /* @__PURE__ */ r.jsx(X, { disabled: !n(), size: "sm", onClick: e, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(ue, {}) }),
64
- /* @__PURE__ */ r.jsx(X, { disabled: !s(), onClick: t, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(ue, { className: "rotate-180 scale-y-[-1] transform" }) })
65
- ] });
66
- };
67
- function ds() {
68
- const [n, s] = _e();
69
- return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
70
- /* @__PURE__ */ r.jsx(Ze, { className: "size-4 shrink-0" }),
71
- /* @__PURE__ */ r.jsx(
72
- Be,
73
- {
74
- id: "dark-mode-switch",
75
- checked: n,
76
- onCheckedChange: () => {
77
- s(!n);
78
- },
79
- className: `${n ? "bg-violet-600" : "bg-violet-300"} relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,
80
- children: /* @__PURE__ */ r.jsx(
81
- "span",
82
- {
83
- "aria-hidden": "true",
84
- className: `${n ? "translate-x-5" : "translate-x-0"} pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`
85
- }
86
- )
87
- }
88
- ),
89
- /* @__PURE__ */ r.jsx(Wt, { className: "size-4 ml-3 shrink-0" })
90
- ] });
91
- }
92
- const xe = ({ landscape: n = !1 }) => /* @__PURE__ */ r.jsxs(
93
- "svg",
94
- {
95
- className: n ? "rotate-90" : "",
96
- xmlns: "http://www.w3.org/2000/svg",
97
- viewBox: "0 0 13 13",
98
- xmlSpace: "preserve",
99
- width: 13,
100
- height: 13,
101
- children: [
102
- /* @__PURE__ */ r.jsx("g", { strokeWidth: 0 }),
103
- /* @__PURE__ */ r.jsx("g", { strokeLinecap: "round", strokeLinejoin: "round" }),
104
- /* @__PURE__ */ r.jsx(
105
- "path",
106
- {
107
- d: "M10.65 0H2.349a.851.851 0 0 0-.851.852v11.299c0 .47.382.852.851.852h8.3a.851.851 0 0 0 .851-.852V.852A.851.851 0 0 0 10.65 0zM6.599 12.466a.367.367 0 1 1 0-.735.367.367 0 0 1 0 .735zm3.9-1.267H2.5V1h8.001v10.199z",
108
- style: {
109
- fill: "#000"
110
- }
111
- }
112
- )
113
- ]
114
- }
115
- ), ps = [
116
- {
117
- title: "mobile_xs_title",
118
- content: "mobile_xs_content",
119
- breakpoint: "xs",
120
- icon: /* @__PURE__ */ r.jsx(he, {}),
121
- width: 400
122
- },
123
- {
124
- title: "mobile_sm_title",
125
- content: "mobile_sm_content",
126
- breakpoint: "sm",
127
- icon: /* @__PURE__ */ r.jsx(he, { className: "rotate-90" }),
128
- width: 640
129
- },
130
- {
131
- title: "tablet_md_title",
132
- content: "tablet_md_content",
133
- breakpoint: "md",
134
- icon: /* @__PURE__ */ r.jsx(xe, {}),
135
- width: 800
136
- },
137
- {
138
- title: "tablet_lg_title",
139
- content: "tablet_lg_content",
140
- breakpoint: "lg",
141
- icon: /* @__PURE__ */ r.jsx(xe, { landscape: !0 }),
142
- width: 1024
143
- },
144
- {
145
- title: "desktop_xl_title",
146
- content: "desktop_xl_content",
147
- breakpoint: "xl",
148
- icon: /* @__PURE__ */ r.jsx(Je, {}),
149
- width: 1420
150
- },
151
- {
152
- title: "large_desktop_2xl_title",
153
- content: "large_desktop_2xl_content",
154
- breakpoint: "2xl",
155
- icon: /* @__PURE__ */ r.jsx(Ve, {}),
156
- width: 1920
157
- }
158
- ], ve = ({
159
- title: n,
160
- content: s,
161
- currentBreakpoint: e,
162
- breakpoint: t,
163
- width: o,
164
- icon: a,
165
- onClick: l
166
- }) => {
167
- const { t: i } = re();
168
- return /* @__PURE__ */ r.jsxs(lt, { children: [
169
- /* @__PURE__ */ r.jsx(at, { asChild: !0, children: /* @__PURE__ */ r.jsx(
170
- X,
171
- {
172
- onClick: () => l(o),
173
- size: "sm",
174
- variant: t === e ? "secondary" : "ghost",
175
- children: a
176
- }
177
- ) }),
178
- /* @__PURE__ */ r.jsx(ct, { className: "w-52 border-border", children: /* @__PURE__ */ r.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ r.jsxs("div", { className: "space-y-1", children: [
179
- /* @__PURE__ */ r.jsx("h4", { className: "text-sm font-semibold", children: i(n) }),
180
- /* @__PURE__ */ r.jsx("p", { className: "text-xs", children: i(s) })
181
- ] }) }) })
182
- ] });
183
- }, us = () => {
184
- const [, n, s] = G(), [e, t] = dt(), { t: o } = re(), a = U("breakpoints", ps), l = (i) => {
185
- e.includes(i) ? e.length > 2 && t(e.filter((c) => c !== i)) : t((c) => [...c, i]);
186
- };
187
- return a.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: z(a, (i) => /* @__PURE__ */ ce(ve, { ...i, onClick: s, key: i.breakpoint, currentBreakpoint: n })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
188
- z(
189
- a.filter((i) => pe(e, Z(i.breakpoint))),
190
- (i) => /* @__PURE__ */ ce(ve, { ...i, onClick: s, key: i.breakpoint, currentBreakpoint: n })
191
- ),
192
- /* @__PURE__ */ r.jsxs(pt, { children: [
193
- /* @__PURE__ */ r.jsx(ut, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(et, { className: "scale-90 transform" }) }) }),
194
- /* @__PURE__ */ r.jsxs(ht, { className: "w-56 border-border text-xs", children: [
195
- /* @__PURE__ */ r.jsx(mt, { children: o("Breakpoints") }),
196
- /* @__PURE__ */ r.jsx(gt, {}),
197
- z(a, (i) => /* @__PURE__ */ r.jsx(
198
- ft,
199
- {
200
- disabled: i.breakpoint === "xs",
201
- onCheckedChange: () => l(Z(i.breakpoint)),
202
- checked: pe(e, Z(i.breakpoint)),
203
- children: o(i.title)
204
- },
205
- i.breakpoint
206
- ))
207
- ] })
208
- ] })
209
- ] });
210
- }, hs = () => {
211
- const { t: n } = re(), { setNewBlocks: s } = Ae(), [, e] = A(), [, t] = L(), o = q(() => {
212
- s([]), e([]), t([]);
213
- }, [s]);
214
- return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(xt, { children: [
215
- /* @__PURE__ */ r.jsx(vt, { asChild: !0, children: /* @__PURE__ */ r.jsxs(X, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
216
- /* @__PURE__ */ r.jsx(tt, {}),
217
- " ",
218
- n("clear")
219
- ] }) }),
220
- /* @__PURE__ */ r.jsxs($t, { className: "border-border", children: [
221
- /* @__PURE__ */ r.jsxs(bt, { children: [
222
- /* @__PURE__ */ r.jsx(yt, { children: n("clear_canvas_title") }),
223
- /* @__PURE__ */ r.jsx(kt, { children: n("clear_canvas_description") })
224
- ] }),
225
- /* @__PURE__ */ r.jsxs(wt, { children: [
226
- /* @__PURE__ */ r.jsx(jt, { children: n("cancel") }),
227
- /* @__PURE__ */ r.jsx(Ct, { onClick: o, children: n("yes") })
228
- ] })
229
- ] })
230
- ] }) });
231
- }, ms = () => {
232
- const [n, s] = b(_t);
233
- return U("askAiCallBack", null) ? /* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-2", children: [
234
- /* @__PURE__ */ r.jsxs(Bt, { htmlFor: "ai-assistant", className: "flex items-center gap-x-1 text-sm text-yellow-600", children: [
235
- /* @__PURE__ */ r.jsx(Xt, { className: "w-4" }),
236
- "AI Assistant"
237
- ] }),
238
- /* @__PURE__ */ r.jsx(
239
- Be,
240
- {
241
- className: "scale-90",
242
- checked: n,
243
- onCheckedChange: (t) => {
244
- s(t);
245
- },
246
- id: "ai-assitantt"
247
- }
248
- )
249
- ] }) : null;
250
- }, gs = () => {
251
- const n = U("darkMode", !0), [s] = De();
252
- return /* @__PURE__ */ r.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
253
- /* @__PURE__ */ r.jsxs("div", { className: "flex h-full space-x-2", children: [
254
- /* @__PURE__ */ r.jsx(us, {}),
255
- /* @__PURE__ */ r.jsx(W, { orientation: "vertical" }),
256
- n ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
257
- /* @__PURE__ */ r.jsx(ds, {}),
258
- /* @__PURE__ */ r.jsx(W, { orientation: "vertical" })
259
- ] }) : null,
260
- /* @__PURE__ */ r.jsxs("div", { className: "flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400", children: [
261
- /* @__PURE__ */ r.jsx(st, { className: "h-3.5 w-3.5 flex-shrink-0" }),
262
- " ",
263
- /* @__PURE__ */ r.jsxs("div", { className: "text-xs leading-3", children: [
264
- qe(s, 0),
265
- "%"
266
- ] })
267
- ] }),
268
- /* @__PURE__ */ r.jsx(W, { orientation: "vertical" }),
269
- /* @__PURE__ */ r.jsx(cs, {})
270
- ] }),
271
- /* @__PURE__ */ r.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
272
- /* @__PURE__ */ r.jsx(hs, {}),
273
- /* @__PURE__ */ r.jsx(W, { orientation: "vertical" }),
274
- /* @__PURE__ */ r.jsx(ms, {})
275
- ] })
276
- ] });
277
- }, fs = `<!doctype html>
278
- <html lang="en" dir="__HTML_DIR__" class="scroll-smooth h-full overflow-y-auto">
279
- <head>
280
- <meta charset="UTF-8">
281
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
282
- <script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"><\/script>
283
- <style>
284
- html { height: 100%; overflow:auto; }
285
- body { height: 100%; }
286
- .air-highlight{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}
287
- .air-highlight-multi{ outline: 1px solid #29e503 !important; outline-offset: -1px;}
288
- body{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none;
289
- -moz-user-select: none;-ms-user-select: none; user-select: none; }
290
- html{
291
- -ms-overflow-style: none; /* IE and Edge */
292
- scrollbar-width: none; /* Firefox */
293
- }
294
- /** IMPORTANT: Make fields content editable in SAFARI */
295
- [contenteditable] {-webkit-user-select: text;user-select: text;}
296
-
297
- html::-webkit-scrollbar { width: 0 !important }
298
- .aspect-auto{aspect-ratio: auto;}
299
- .aspect-square{aspect-ratio: 1/1;}
300
- .aspect-video{aspect-ratio: 16/9;}
301
- .dragging [data-dnd="leaf"] { pointer-events: none; } .dragging [data-dnd="leaf"] * { pointer-events: none; }
302
- .dragging [data-dnd="ignore"], .dragging [data-dnd="ignore"] * { pointer-events: none; }
303
- a{ pointer-events: none !important; }
304
- [contenteditable="true"], [contenteditable="true"] * { cursor: text !important; }
305
- [contenteditable="true"] {
306
- outline: none;
307
- box-shadow: 0 0 0px 4px rgba(36, 150, 255, 0.2);
308
- -webkit-user-select: text;
309
- -moz-user-select: text;
310
- user-select: text;
311
- }
312
- .frame-root .frame-content { height: 100%; }
313
- [data-drop="yes"] { outline: 2px dashed orange !important; outline-offset: -2px }
314
- [data-dnd="yes"] { pointer-events: auto !important}
315
- [data-dnd="no"] { pointer-events: none !important; }
316
- [data-dnd-dragged="yes"] { opacity: 0.6; pointer-events: none; }
317
- [data-dnd-dragged="no"] { opacity: 1; pointer-events: auto !important; }
318
- [force-show] { display: block !important; }
319
- </style>
320
- <style id="hidden-blocks"></style>
321
- <style id="selected-block"></style>
322
- <style id="selected-styling-block"></style>
323
- <style id="highlighted-block"></style>
324
- <style id="dragged-block"></style>
325
-
326
- </head>
327
- <body class="font-body antialiased h-full">
328
- <div class="frame-root h-full"></div>
329
- <script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
330
- </body>
331
- </html>`, xs = (n) => {
332
- const [s] = G(), [, e] = De(), [t, o] = _({}), a = q(() => {
333
- const { width: l, height: i } = n;
334
- if (l < s) {
335
- const c = parseFloat((l / s).toFixed(2).toString());
336
- let h = {};
337
- const m = i * c;
338
- i && (h = {
339
- // Eureka! This is the formula to calculate the height of the scaled element. Thank you ChatGPT 4
340
- height: 100 + (i - m) / m * 100 + "%"
341
- }), o({
342
- position: "relative",
343
- top: 0,
344
- transform: `scale(${c})`,
345
- transformOrigin: "top left",
346
- ...h,
347
- maxWidth: "none"
348
- }), e(c * 100);
349
- } else
350
- o({}), e(100);
351
- }, [s, n, e]);
352
- return j(() => {
353
- a();
354
- }, [s, n, e, a]), t;
355
- };
356
- let Le, Fe;
357
- typeof document < "u" && (Le = document);
358
- typeof window < "u" && (Fe = window);
359
- const Re = S.createContext({ document: Le, window: Fe }), Q = () => S.useContext(Re), { Provider: vs, Consumer: Jo } = Re;
360
- class He extends ye {
361
- componentDidMount() {
362
- this.props.contentDidMount();
363
- }
364
- componentDidUpdate() {
365
- this.props.contentDidUpdate();
366
- }
367
- render() {
368
- return Ue.only(this.props.children);
369
- }
370
- }
371
- M(He, "propTypes", {
372
- children: w.element.isRequired,
373
- contentDidMount: w.func.isRequired,
374
- contentDidUpdate: w.func.isRequired
375
- });
376
- class te extends ye {
377
- constructor(e, t) {
378
- super(e, t);
379
- M(this, "setRef", (e) => {
380
- this.nodeRef.current = e;
381
- const { forwardedRef: t } = this.props;
382
- typeof t == "function" ? t(e) : t && (t.current = e);
383
- });
384
- M(this, "handleLoad", () => {
385
- clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
386
- });
387
- // In certain situations on a cold cache DOMContentLoaded never gets called
388
- // fallback to an interval to check if that's the case
389
- M(this, "loadCheck", () => setInterval(() => {
390
- this.handleLoad();
391
- }, 500));
392
- this._isMounted = !1, this.nodeRef = S.createRef(), this.state = { iframeLoaded: !1 };
393
- }
394
- componentDidMount() {
395
- this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
396
- }
397
- componentWillUnmount() {
398
- this._isMounted = !1, this.nodeRef.current.removeEventListener("DOMContentLoaded", this.handleLoad);
399
- }
400
- getDoc() {
401
- return this.nodeRef.current ? this.nodeRef.current.contentDocument : null;
402
- }
403
- getMountTarget() {
404
- const e = this.getDoc();
405
- return this.props.mountTarget ? e.querySelector(this.props.mountTarget) : e.body.children[0];
406
- }
407
- renderFrameContents() {
408
- if (!this._isMounted)
409
- return null;
410
- const e = this.getDoc();
411
- if (!e)
412
- return null;
413
- const t = this.props.contentDidMount, o = this.props.contentDidUpdate, a = e.defaultView || e.parentView, l = /* @__PURE__ */ r.jsx(He, { contentDidMount: t, contentDidUpdate: o, children: /* @__PURE__ */ r.jsx(vs, { value: { document: e, window: a }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), i = this.getMountTarget();
414
- return [me.createPortal(this.props.head, this.getDoc().head), me.createPortal(l, i)];
415
- }
416
- render() {
417
- const e = {
418
- ...this.props,
419
- srcDoc: this.props.initialContent,
420
- children: void 0
421
- // The iframe isn't ready so we drop children from props here. #12, #17
422
- };
423
- return delete e.head, delete e.initialContent, delete e.mountTarget, delete e.contentDidMount, delete e.contentDidUpdate, delete e.forwardedRef, /* @__PURE__ */ r.jsx("iframe", { ...e, ref: this.setRef, onLoad: this.handleLoad, children: this.state.iframeLoaded && this.renderFrameContents() });
424
- }
425
- }
426
- // React warns when you render directly into the body since browser extensions
427
- // also inject into the body and can mess up React. For this reason
428
- // initialContent is expected to have a div inside of the body
429
- // element that we render react into.
430
- M(te, "propTypes", {
431
- style: w.object,
432
- // eslint-disable-line
433
- head: w.node,
434
- initialContent: w.string,
435
- mountTarget: w.string,
436
- contentDidMount: w.func,
437
- contentDidUpdate: w.func,
438
- children: w.oneOfType([w.element, w.arrayOf(w.element)])
439
- }), M(te, "defaultProps", {
440
- style: {},
441
- head: null,
442
- children: void 0,
443
- mountTarget: void 0,
444
- contentDidMount: () => {
445
- },
446
- contentDidUpdate: () => {
447
- },
448
- initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
449
- });
450
- const $s = S.forwardRef((n, s) => /* @__PURE__ */ r.jsx(te, { ...n, forwardedRef: s }));
451
- function le(n) {
452
- const s = window.getComputedStyle(n), e = s.display;
453
- if (e === "flex" || e === "inline-flex") {
454
- const t = s.flexDirection;
455
- return t === "column" || t === "column-reverse" ? "vertical" : "horizontal";
456
- } else if (e === "grid") {
457
- const t = s.gridAutoFlow, o = s.gridTemplateRows, a = s.gridTemplateColumns;
458
- return t.includes("column") || o.split(" ").length > a.split(" ").length ? "vertical" : "horizontal";
459
- } else if (e === "block" || e === "inline-block")
460
- return "vertical";
461
- return "horizontal";
462
- }
463
- let y = null, B = [], H = null, J = null;
464
- const $e = (n, s, e) => {
465
- if (!y || !n)
466
- return;
467
- const t = y == null ? void 0 : y.getElementById("placeholder"), o = B.map(([c]) => c), a = o.reduce(
468
- (c, h) => Math.abs(h - e) < Math.abs(c - e) ? h : c,
469
- 0
470
- ), l = o.indexOf(a);
471
- if (!B[l])
472
- return;
473
- const i = B[l];
474
- t.style.width = s === "vertical" ? i[2] + "px" : "2px", t.style.height = s === "vertical" ? "2px" : i[2] + "px", t.style.display = "block", s === "vertical" ? (t.style.top = i[0] + "px", t.style.left = i[1] + "px") : (t.style.top = i[1] + "px", t.style.left = i[0] + "px");
475
- };
476
- function bs(n, s) {
477
- let e = 0, t = 1 / 0;
478
- return s.forEach((o, a) => {
479
- const l = Math.abs(o[0] - n);
480
- l < t && (t = l, e = a);
481
- }), e;
482
- }
483
- const ys = (n) => {
484
- const e = le(n) === "horizontal";
485
- B = [], Array.from(n.children).forEach((t, o) => {
486
- if (t.classList.contains("pointer-events-none"))
487
- return;
488
- const a = e ? t.offsetLeft : t.offsetTop, l = e ? [t.offsetTop, t.clientHeight] : [t.offsetLeft, t.clientWidth];
489
- if (B.push([a, l[0], l[1]]), o === n.children.length - 1) {
490
- const i = e ? t.offsetLeft + t.clientWidth : t.offsetTop + t.clientHeight;
491
- B.push([i, l[0], l[1]]);
492
- }
493
- });
494
- }, ks = ke((n) => {
495
- var o;
496
- const s = n.target, e = le(s), t = (o = y == null ? void 0 : y.defaultView) == null ? void 0 : o.scrollY;
497
- e === "vertical" ? $e(s, e, n.clientY + t) : $e(s, e, n.clientX);
498
- }, 0);
499
- function be() {
500
- const n = y == null ? void 0 : y.getElementById("placeholder");
501
- n.style.display = "none", ws("pointer-none"), js();
502
- }
503
- function ws(n) {
504
- (y == null ? void 0 : y.querySelectorAll(`.${n}`)).forEach((e) => {
505
- e.classList.remove(n);
506
- });
507
- }
508
- function js() {
509
- const n = y == null ? void 0 : y.querySelector('[data-drop="yes"]');
510
- n && n.removeAttribute("data-drop");
511
- }
512
- const Cs = () => {
513
- const { document: n } = Q(), [s, e] = b(At), { addCoreBlock: t } = Dt(), [, o] = F(), [, a] = A(), { moveBlocks: l } = Ae(), [, i] = b(Se), [c, h] = b(ie), [, m] = b(Ne), d = () => {
514
- be(), e(!1), i(""), h(null), m(null), B = [];
515
- };
516
- return y = n, {
517
- isDragging: s,
518
- onDragOver: (p) => {
519
- p.preventDefault(), p.stopPropagation(), ks(p);
520
- },
521
- onDrop: (p) => {
522
- var D;
523
- H == null || H.classList.remove("drop-target");
524
- const x = H, g = le(x) === "vertical" ? p.clientY + ((D = y == null ? void 0 : y.defaultView) == null ? void 0 : D.scrollY) : p.clientX;
525
- J = bs(g, B);
526
- const u = c, k = x.getAttribute("data-block-id");
527
- if (u === H) {
528
- d();
529
- return;
530
- }
531
- if (!K(u, "_id")) {
532
- t(u, k === "canvas" ? null : k, J), setTimeout(d, 300);
533
- return;
534
- }
535
- let C = x.getAttribute("data-block-id");
536
- C === null && (C = p.target.parentElement.getAttribute("data-block-id")), l([u._id], C, J), d(), setTimeout(be, 300);
537
- },
538
- onDragEnter: (p) => {
539
- const x = p, $ = x.target;
540
- H = $;
541
- const g = $.getAttribute("data-block-id");
542
- m(g), x.stopPropagation(), x.preventDefault(), B = [], ys($), $.classList.add("drop-target"), e(!0), o(""), a([]);
543
- }
544
- };
545
- };
546
- function ae(n) {
547
- return n.getAttribute("data-block-id") ? n : n.closest("[data-block-id]");
548
- }
549
- function _s(n) {
550
- n.container.innerHTML = "", n.container.parentNode.removeChild(n.container);
551
- var s = document.querySelector(".ql-toolbar");
552
- s && s.parentNode.removeChild(s), n = null;
553
- }
554
- const Bs = () => {
555
- const n = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], s = St(), [, e] = F(), [t, o] = b(P);
556
- return (a) => {
557
- var d;
558
- if (t)
559
- return;
560
- const l = ae(a.target), i = l.getAttribute("data-block-type");
561
- if (!i || !n.includes(i))
562
- return;
563
- const c = l.cloneNode(!0);
564
- l.style.display = "none", Array.from(c.attributes).forEach((p) => {
565
- p.name !== "class" && c.removeAttribute(p.name);
566
- }), i === "Text" && (c.style.display = "inline-block"), l.parentNode.insertBefore(c, l.nextSibling);
567
- const h = new Gt(c, { placeholder: "Type here..." });
568
- function m() {
569
- const p = h.getText(0, h.getLength());
570
- s([l.getAttribute("data-block-id")], { content: p }), l.removeAttribute("style"), c.removeEventListener("blur", m, !0), _s(h), o(""), e("");
571
- }
572
- c.addEventListener("blur", m, !0), c.addEventListener("keydown", (p) => {
573
- (p.key === "Enter" || p.key === "Escape") && m();
574
- }), h.focus(), (d = c.querySelector(".ql-clipboard")) == null || d.remove(), o(l.getAttribute("data-block-id"));
575
- };
576
- }, As = () => {
577
- const [, n] = L(), [s, e] = A(), [, t] = F(), [o] = b(P), [a] = b(It);
578
- return (l) => {
579
- if (o)
580
- return;
581
- l.stopPropagation();
582
- const i = ae(l.target);
583
- if (i != null && i.getAttribute("data-block-id") && (i == null ? void 0 : i.getAttribute("data-block-id")) === "container") {
584
- e([]), n([]), t("");
585
- return;
586
- }
587
- if (i != null && i.getAttribute("data-block-parent")) {
588
- const c = i.getAttribute("data-style-prop"), h = i.getAttribute("data-style-id"), m = i.getAttribute("data-block-parent");
589
- s.includes(m) || a == null || a.closeAll(), n([{ id: h, prop: c, blockId: m }]), e([m]);
590
- } else if (i != null && i.getAttribute("data-block-id")) {
591
- let c = i.getAttribute("data-block-id");
592
- s.includes(c) || a == null || a.closeAll(), e([c]);
593
- }
594
- t("");
595
- };
596
- }, Ds = ke((n, s) => {
597
- const e = ae(n.target);
598
- e != null && e.getAttribute("data-style-id") && s(e.getAttribute("data-style-id"));
599
- }, 100), Ss = () => {
600
- const [, n] = F(), [s] = b(P);
601
- return (e) => {
602
- s || Ds(e, n);
603
- };
604
- }, Is = ({ children: n }) => {
605
- const { document: s } = Q(), [e] = A(), [t, o] = L();
606
- j(() => {
607
- setTimeout(() => {
608
- if (!I(t))
609
- return;
610
- const h = Pe(s, Y(e));
611
- if (h) {
612
- const m = h.getAttribute("data-style-prop");
613
- if (m) {
614
- const d = h.getAttribute("data-style-id"), p = h.getAttribute("data-block-parent");
615
- o([{ id: d, prop: m, blockId: p }]);
616
- }
617
- }
618
- }, 100);
619
- }, [s, e, o, t]);
620
- const a = Bs(), l = As(), i = Ss(), c = Cs();
621
- return /* @__PURE__ */ r.jsx(
622
- "div",
623
- {
624
- "data-block-id": "canvas",
625
- id: "canvas",
626
- onClick: l,
627
- onDoubleClick: a,
628
- onMouseMove: i,
629
- ...we(c, "isDragging"),
630
- className: "relative mb-5 h-full max-w-full " + (c.isDragging ? "dragging" : ""),
631
- children: n
632
- }
633
- );
634
- }, Pe = (n, s) => n.querySelector(`[data-block-id="${s}"]`), Es = () => {
635
- const { window: n } = Q(), [s, e] = A(), [t] = ne(), [, o] = L(), { undo: a, redo: l } = Ce(), i = Ie(), [, c] = Ee(), h = Te(), { savePage: m } = Et(), [d] = b(P), [, p] = b(Tt), x = (g) => {
636
- g.key === "Enter" && (g.preventDefault(), s.length === 1 && p(Y(s)));
637
- }, $ = (g) => {
638
- const u = t.find((k) => k._id === g);
639
- return u ? u._parent : null;
640
- };
641
- return j(() => {
642
- const g = (u) => {
643
- if (u.key === "Escape") {
644
- e([]), o([]);
645
- return;
646
- }
647
- if (x(u), !d && (u.key === "Delete" || u.key === "Backspace") && (u.preventDefault(), h(s)), u.ctrlKey || u.metaKey) {
648
- if (u.key === "ArrowUp") {
649
- u.preventDefault();
650
- const k = s.length > 0 ? $(s[0]) : null;
651
- k && e([k]);
652
- }
653
- if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(u.key)) {
654
- if (d && ["x", "z", "v"].includes(u.key))
655
- return !0;
656
- u.preventDefault();
657
- }
658
- u.key === "s" && (u.stopPropagation(), u.preventDefault(), m()), u.key === "z" && a(), u.key === "y" && l(), u.key === "d" && i(s);
659
- }
660
- };
661
- return n.removeEventListener("keydown", g), n.addEventListener("keydown", g), () => {
662
- n.removeEventListener("keydown", g);
663
- };
664
- }, [s, e, a, h, c, l, i, d, m, n]), null;
665
- }, Ts = ({ block: n, label: s }) => {
666
- const [, e] = A(), [, t] = F(), [, o] = b(ie), a = es("dnd");
667
- return /* @__PURE__ */ r.jsxs(
668
- "div",
669
- {
670
- className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
671
- draggable: a ? "true" : "false",
672
- onDragStart: (l) => {
673
- l.dataTransfer.setData("text/plain", JSON.stringify(Ke(n, ["_id", "_type", "_name"]))), o(n), setTimeout(() => {
674
- e([]), t(null);
675
- }, 200);
676
- },
677
- children: [
678
- /* @__PURE__ */ r.jsx(ot, {}),
679
- s
680
- ]
681
- }
682
- );
683
- }, Ns = ({ selectedBlockElement: n, block: s }) => {
684
- const e = Te(), t = Ie(), [, o] = A(), [, a] = L(), [l] = b(P), { floatingStyles: i, refs: c, update: h } = Zt({
685
- placement: "top-start",
686
- middleware: [Jt(), Qt()],
687
- elements: {
688
- reference: n
689
- }
690
- });
691
- Vt(n, () => h(), n !== null);
692
- const m = f(s, "_parent", null), d = I(f(s, "_name", "")) ? f(s, "_type", "") : f(s, "_name", "");
693
- return !n || !s || l ? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(
694
- "div",
695
- {
696
- role: "button",
697
- tabIndex: 0,
698
- ref: c.setFloating,
699
- style: i,
700
- onClick: (p) => {
701
- p.stopPropagation(), p.preventDefault();
702
- },
703
- onKeyDown: (p) => p.stopPropagation(),
704
- className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
705
- children: [
706
- /* @__PURE__ */ r.jsx(Ts, { label: d, block: s }),
707
- /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1", children: [
708
- m && /* @__PURE__ */ r.jsx(
709
- nt,
710
- {
711
- className: "hover:scale-105",
712
- onClick: () => {
713
- a([]), o([m]);
714
- }
715
- }
716
- ),
717
- Nt(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(rt, { className: "hover:scale-105", onClick: () => t([s == null ? void 0 : s._id]) }) : null,
718
- Mt(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(it, { className: "hover:scale-105", onClick: () => e([s == null ? void 0 : s._id]) }) : null
719
- ] })
720
- ]
721
- }
722
- ) });
723
- }, Ms = ({ addVariant: n, e: s }) => {
724
- n("hs-dropdown-open", [
725
- ({ modifySelectors: e, separator: t }) => {
726
- e(({ className: o }) => `.hs-dropdown.open > .${s(`hs-dropdown-open${t}${o}`)}`);
727
- },
728
- ({ modifySelectors: e, separator: t }) => {
729
- e(({ className: o }) => `.hs-dropdown.open .hs-dropdown-toggle .${s(`hs-dropdown-open${t}${o}`)}`);
730
- },
731
- ({ modifySelectors: e, separator: t }) => {
732
- e(({ className: o }) => `.hs-dropdown.open > .hs-dropdown-menu > .${s(`hs-dropdown-open${t}${o}`)}`);
733
- }
734
- ]), n("hs-removing", ({ modifySelectors: e, separator: t }) => {
735
- e(({ className: o }) => `.hs-removing.${s(`hs-removing${t}${o}`)}`);
736
- }), n("hs-tooltip-shown", ({ modifySelectors: e, separator: t }) => {
737
- e(({ className: o }) => `.hs-tooltip.show .${s(`hs-tooltip-shown${t}${o}`)}`);
738
- }), n("hs-accordion-active", [
739
- ({ modifySelectors: e, separator: t }) => {
740
- e(({ className: o }) => `.hs-accordion.active.${s(`hs-accordion-active${t}${o}`)}`);
741
- },
742
- ({ modifySelectors: e, separator: t }) => {
743
- e(({ className: o }) => `.hs-accordion.active > .${s(`hs-accordion-active${t}${o}`)}`);
744
- },
745
- ({ modifySelectors: e, separator: t }) => {
746
- e(({ className: o }) => `.hs-accordion.active > .hs-accordion-toggle .${s(`hs-accordion-active${t}${o}`)}`);
747
- },
748
- ({ modifySelectors: e, separator: t }) => {
749
- e(({ className: o }) => `.hs-accordion.active > .hs-accordion-heading > .hs-accordion-toggle .${s(
750
- `hs-accordion-active${t}${o}`
751
- )}`);
752
- },
753
- ({ modifySelectors: e, separator: t }) => {
754
- e(({ className: o }) => `.hs-accordion.active > .hs-accordion-toggle.${s(`hs-accordion-active${t}${o}`)}`);
755
- },
756
- ({ modifySelectors: e, separator: t }) => {
757
- e(({ className: o }) => `.hs-accordion.active > .hs-accordion-heading > .hs-accordion-toggle.${s(
758
- `hs-accordion-active${t}${o}`
759
- )}`);
760
- }
761
- ]), n("hs-accordion-selected", ({ modifySelectors: e, separator: t }) => {
762
- e(({ className: o }) => `.hs-accordion .selected.${s(`hs-accordion-selected${t}${o}`)}`);
763
- }), n("hs-collapse-open", [
764
- ({ modifySelectors: e, separator: t }) => {
765
- e(({ className: o }) => `.hs-collapse.open .${s(`hs-collapse-open${t}${o}`)}`);
766
- },
767
- ({ modifySelectors: e, separator: t }) => {
768
- e(({ className: o }) => `.hs-collapse.open.${s(`hs-collapse-open${t}${o}`)}`);
769
- },
770
- ({ modifySelectors: e, separator: t }) => {
771
- e(({ className: o }) => `.hs-collapse-toggle.open .${s(`hs-collapse-open${t}${o}`)}`);
772
- },
773
- ({ modifySelectors: e, separator: t }) => {
774
- e(({ className: o }) => `.hs-collapse-toggle.open.${s(`hs-collapse-open${t}${o}`)}`);
775
- }
776
- ]), n("hs-tab-active", [
777
- ({ modifySelectors: e, separator: t }) => {
778
- e(({ className: o }) => `[data-hs-tab].active.${s(`hs-tab-active${t}${o}`)}`);
779
- },
780
- ({ modifySelectors: e, separator: t }) => {
781
- e(({ className: o }) => `[data-hs-tab].active .${s(`hs-tab-active${t}${o}`)}`);
782
- }
783
- ]), n("hs-overlay-open", [
784
- ({ modifySelectors: e, separator: t }) => {
785
- e(({ className: o }) => `.open.${s(`hs-overlay-open${t}${o}`)}`);
786
- },
787
- ({ modifySelectors: e, separator: t }) => {
788
- e(({ className: o }) => `.open .${s(`hs-overlay-open${t}${o}`)}`);
789
- }
790
- ]), n("hs-overlay-layout-open", [
791
- ({ modifySelectors: e, separator: t }) => {
792
- e(({ className: o }) => `.hs-overlay-body-open.${s(`hs-overlay-layout-open${t}${o}`)}`);
793
- },
794
- ({ modifySelectors: e, separator: t }) => {
795
- e(({ className: o }) => `.hs-overlay-body-open .${s(`hs-overlay-layout-open${t}${o}`)}`);
796
- }
797
- ]), n("hs-overlay-backdrop-open", [
798
- ({ modifySelectors: e, separator: t }) => {
799
- e(({ className: o }) => `.hs-overlay-backdrop.${s(`hs-overlay-backdrop-open${t}${o}`)}`);
800
- },
801
- ({ modifySelectors: e, separator: t }) => {
802
- e(({ className: o }) => `.hs-overlay-backdrop .${s(`hs-overlay-backdrop-open${t}${o}`)}`);
803
- }
804
- ]), n("hs-scrollspy-active", ({ modifySelectors: e, separator: t }) => {
805
- e(({ className: o }) => `.active.${s(`hs-scrollspy-active${t}${o}`)}`);
806
- }), n("hs-carousel-active", [
807
- ({ modifySelectors: e, separator: t }) => {
808
- e(({ className: o }) => `.active.${s(`hs-carousel-active${t}${o}`)}`);
809
- },
810
- ({ modifySelectors: e, separator: t }) => {
811
- e(({ className: o }) => `.active .${s(`hs-carousel-active${t}${o}`)}`);
812
- }
813
- ]), n("hs-carousel-disabled", [
814
- ({ modifySelectors: e, separator: t }) => {
815
- e(({ className: o }) => `.disabled.${s(`hs-carousel${t}disabled${t}${o}`)}`);
816
- },
817
- ({ modifySelectors: e, separator: t }) => {
818
- e(({ className: o }) => `.disabled .${s(`hs-carousel${t}disabled${t}${o}`)}`);
819
- }
820
- ]), n("hs-selected", [
821
- ({ modifySelectors: e, separator: t }) => {
822
- e(({ className: o }) => `.selected.${s(`hs-selected${t}${o}`)}`);
823
- },
824
- ({ modifySelectors: e, separator: t }) => {
825
- e(({ className: o }) => `.selected .${s(`hs-selected${t}${o}`)}`);
826
- }
827
- ]), n("hs-select-disabled", [
828
- ({ modifySelectors: e, separator: t }) => {
829
- e(({ className: o }) => `.disabled.${s(`hs-select-disabled${t}${o}`)}`);
830
- },
831
- ({ modifySelectors: e, separator: t }) => {
832
- e(({ className: o }) => `.disabled .${s(`hs-select-disabled${t}${o}`)}`);
833
- }
834
- ]), n("hs-select-active", [
835
- ({ modifySelectors: e, separator: t }) => {
836
- e(({ className: o }) => `.active.${s(`hs-select-active${t}${o}`)}`);
837
- },
838
- ({ modifySelectors: e, separator: t }) => {
839
- e(({ className: o }) => `.active .${s(`hs-select-active${t}${o}`)}`);
840
- }
841
- ]), n("hs-input-number-disabled", [
842
- ({ modifySelectors: e, separator: t }) => {
843
- e(({ className: o }) => `.disabled.${s(`hs-input-number-disabled${t}${o}`)}`);
844
- },
845
- ({ modifySelectors: e, separator: t }) => {
846
- e(({ className: o }) => `.disabled .${s(`hs-input-number-disabled${t}${o}`)}`);
847
- }
848
- ]), n("hs-pin-input-active", [
849
- ({ modifySelectors: e, separator: t }) => {
850
- e(({ className: o }) => `.active.${s(`hs-pin-input-active${t}${o}`)}`);
851
- },
852
- ({ modifySelectors: e, separator: t }) => {
853
- e(({ className: o }) => `.active .${s(`hs-pin-input-active${t}${o}`)}`);
854
- }
855
- ]), n("hs-select-opened", [
856
- ({ modifySelectors: e, separator: t }) => {
857
- e(({ className: o }) => `.opened.${s(`hs-select-opened${t}${o}`)}`);
858
- }
859
- ]), n("hs-password-active", [
860
- ({ modifySelectors: e, separator: t }) => {
861
- e(({ className: o }) => `.active.${s(`hs-password-active${t}${o}`)}`);
862
- },
863
- ({ modifySelectors: e, separator: t }) => {
864
- e(({ className: o }) => `.active .${s(`hs-password-active${t}${o}`)}`);
865
- }
866
- ]), n("hs-stepper-active", [
867
- ({ modifySelectors: e, separator: t }) => {
868
- e(({ className: o }) => `.active.${s(`hs-stepper-active${t}${o}`)}`);
869
- },
870
- ({ modifySelectors: e, separator: t }) => {
871
- e(({ className: o }) => `.active .${s(`hs-stepper-active${t}${o}`)}`);
872
- }
873
- ]), n("hs-stepper-success", [
874
- ({ modifySelectors: e, separator: t }) => {
875
- e(({ className: o }) => `.success.${s(`hs-stepper-success${t}${o}`)}`);
876
- },
877
- ({ modifySelectors: e, separator: t }) => {
878
- e(({ className: o }) => `.success .${s(`hs-stepper-success${t}${o}`)}`);
879
- }
880
- ]), n("hs-stepper-completed", [
881
- ({ modifySelectors: e, separator: t }) => {
882
- e(({ className: o }) => `.completed.${s(`hs-stepper-completed${t}${o}`)}`);
883
- },
884
- ({ modifySelectors: e, separator: t }) => {
885
- e(({ className: o }) => `.completed .${s(`hs-stepper-completed${t}${o}`)}`);
886
- }
887
- ]), n("hs-stepper-error", [
888
- ({ modifySelectors: e, separator: t }) => {
889
- e(({ className: o }) => `.error.${s(`hs-stepper-error${t}${o}`)}`);
890
- },
891
- ({ modifySelectors: e, separator: t }) => {
892
- e(({ className: o }) => `.error .${s(`hs-stepper-error${t}${o}`)}`);
893
- }
894
- ]), n("hs-stepper-processed", [
895
- ({ modifySelectors: e, separator: t }) => {
896
- e(({ className: o }) => `.processed.${s(`hs-stepper-processed${t}${o}`)}`);
897
- },
898
- ({ modifySelectors: e, separator: t }) => {
899
- e(({ className: o }) => `.processed .${s(`hs-stepper-processed${t}${o}`)}`);
900
- }
901
- ]), n("hs-stepper-disabled", [
902
- ({ modifySelectors: e, separator: t }) => {
903
- e(({ className: o }) => `.disabled.${s(`hs-stepper-disabled${t}${o}`)}`);
904
- },
905
- ({ modifySelectors: e, separator: t }) => {
906
- e(({ className: o }) => `.disabled .${s(`hs-stepper-disabled${t}${o}`)}`);
907
- }
908
- ]), n("hs-stepper-skipped", [
909
- ({ modifySelectors: e, separator: t }) => {
910
- e(({ className: o }) => `.skipped.${s(`hs-stepper-skipped${t}${o}`)}`);
911
- },
912
- ({ modifySelectors: e, separator: t }) => {
913
- e(({ className: o }) => `.skipped .${s(`hs-stepper-skipped${t}${o}`)}`);
914
- }
915
- ]), n("hs-strong-password", [
916
- ({ modifySelectors: e, separator: t }) => {
917
- e(({ className: o }) => `.passed.${s(`hs-strong-password${t}${o}`)}`);
918
- },
919
- ({ modifySelectors: e, separator: t }) => {
920
- e(({ className: o }) => `.passed .${s(`hs-strong-password${t}${o}`)}`);
921
- }
922
- ]), n("hs-strong-password-accepted", [
923
- ({ modifySelectors: e, separator: t }) => {
924
- e(({ className: o }) => `.accepted.${s(`hs-strong-password-accepted${t}${o}`)}`);
925
- },
926
- ({ modifySelectors: e, separator: t }) => {
927
- e(({ className: o }) => `.accepted .${s(`hs-strong-password-accepted${t}${o}`)}`);
928
- }
929
- ]), n("hs-strong-password-active", [
930
- ({ modifySelectors: e, separator: t }) => {
931
- e(({ className: o }) => `.active.${s(`hs-strong-password-active${t}${o}`)}`);
932
- }
933
- ]), n("hs-combo-box-active", [
934
- ({ modifySelectors: e, separator: t }) => {
935
- e(({ className: o }) => `.active .${s(`hs-combo-box-active${t}${o}`)}`);
936
- },
937
- ({ modifySelectors: e, separator: t }) => {
938
- e(({ className: o }) => `.active.${s(`hs-combo-box-active${t}${o}`)}`);
939
- }
940
- ]), n("hs-combo-box-selected", [
941
- ({ modifySelectors: e, separator: t }) => {
942
- e(({ className: o }) => `.selected .${s(`hs-combo-box-selected${t}${o}`)}`);
943
- },
944
- ({ modifySelectors: e, separator: t }) => {
945
- e(({ className: o }) => `.selected.${s(`hs-combo-box-selected${t}${o}`)}`);
946
- }
947
- ]), n("hs-combo-box-tab-active", [
948
- ({ modifySelectors: e, separator: t }) => {
949
- e(({ className: o }) => `.active.${s(`hs-combo-box-tab-active${t}${o}`)}`);
950
- }
951
- ]), n("hs-apexcharts-tooltip-dark", [
952
- ({ modifySelectors: e, separator: t }) => {
953
- e(({ className: o }) => `.dark.${s(`hs-apexcharts-tooltip-dark${t}${o}`)}`);
954
- }
955
- ]), n("hs-success", [
956
- ({ modifySelectors: e, separator: t }) => {
957
- e(({ className: o }) => `.success .${s(`hs-success${t}${o}`)}`);
958
- },
959
- ({ modifySelectors: e, separator: t }) => {
960
- e(({ className: o }) => `.success.${s(`hs-success${t}${o}`)}`);
961
- }
962
- ]), n("hs-error", [
963
- ({ modifySelectors: e, separator: t }) => {
964
- e(({ className: o }) => `.error .${s(`hs-error${t}${o}`)}`);
965
- },
966
- ({ modifySelectors: e, separator: t }) => {
967
- e(({ className: o }) => `.error.${s(`hs-error${t}${o}`)}`);
968
- }
969
- ]), n("hs-default-mode-active", ({ modifySelectors: e, separator: t }) => {
970
- e(({ className: o }) => `.default .${s(`hs-default-mode-active${t}${o}`)}`);
971
- }), n("hs-dark-mode-active", ({ modifySelectors: e, separator: t }) => {
972
- e(({ className: o }) => `.dark .${s(`hs-dark-mode-active${t}${o}`)}`);
973
- }), n("hs-auto-mode-active", ({ modifySelectors: e, separator: t }) => {
974
- e(({ className: o }) => `.auto .${s(`hs-auto-mode-active${t}${o}`)}`);
975
- });
976
- }, Ls = ({ model: n }) => {
977
- const [s] = Lt(), [e] = A(), [t] = _e(), [o] = F(), [a] = L(), [l] = b(Se), { document: i, window: c } = Q(), [h] = _(i == null ? void 0 : i.getElementById("highlighted-block")), [m] = _(
978
- i == null ? void 0 : i.getElementById("selected-block")
979
- ), [d] = _(
980
- i == null ? void 0 : i.getElementById("selected-styling-block")
981
- ), [p] = _(i == null ? void 0 : i.getElementById("dragged-block"));
982
- j(() => {
983
- t ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
984
- }, [t, i]);
985
- const x = f(s, "headingFont", "DM Sans"), $ = f(s, "bodyFont", "DM Sans");
986
- return j(() => {
987
- const g = f(s, "primaryColor", "#000"), u = f(s, "secondaryColor", "#FFF"), k = f(s, "bodyBgLightColor", "#fff"), C = f(s, "bodyBgDarkColor", "#000"), D = f(s, "bodyTextDarkColor", "#000"), E = f(s, "bodyTextLightColor", "#fff"), R = ns([
988
- { color: g, name: "primary" },
989
- { color: u, name: "secondary" }
990
- ]), O = {
991
- "bg-light": k,
992
- "bg-dark": C,
993
- "text-dark": D,
994
- "text-light": E
995
- }, v = f(s, "roundedCorners", "0");
996
- !c || !c.tailwind || (c.tailwind.config = {
997
- darkMode: "class",
998
- theme: {
999
- extend: {
1000
- container: {
1001
- center: !0,
1002
- padding: "1rem",
1003
- screens: {
1004
- "2xl": "1400px"
1005
- }
1006
- },
1007
- fontFamily: {
1008
- heading: [x],
1009
- body: [$]
1010
- },
1011
- borderRadius: {
1012
- DEFAULT: `${v || "0"}px`
1013
- },
1014
- colors: { ...O, ...R }
1015
- }
1016
- },
1017
- plugins: [ts, ss, os, c.tailwind.plugin.withOptions(() => Ms)]
1018
- });
1019
- }, [s, c, x, $]), j(() => {
1020
- m && (m.textContent = `${z(e, (g) => `[data-block-id="${g}"]`).join(",")}{
1021
- outline: 1px solid ${e.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1022
- }`);
1023
- }, [e, m]), j(() => {
1024
- if (!l) {
1025
- p.textContent = "";
1026
- return;
1027
- }
1028
- p.textContent = `[data-block-id="${l}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
1029
- }, [l]), j(() => {
1030
- h && (h.textContent = o ? `[data-style-id="${o}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
1031
- }, [o, e, h]), j(() => {
1032
- d && (d.textContent = `${z(a, ({ id: g }) => `[data-style-id="${g}"]`).join(",")}{
1033
- outline: 1px solid #42a1fc !important; outline-offset: -1px;
1034
- }`);
1035
- }, [a, d]), j(() => {
1036
- const g = f(s, "bodyTextLightColor", "#64748b"), u = f(s, "bodyTextDarkColor", "#94a3b8"), k = f(s, "bodyBgLightColor", "#FFFFFF"), C = f(s, "bodyBgDarkColor", "#0f172a");
1037
- i.body.className = `font-body antialiased text-[${g}] bg-[${k}] dark:text-[${u}] dark:bg-[${C}]`;
1038
- }, [s, i, n]), n === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1039
- x && /* @__PURE__ */ r.jsx(
1040
- "link",
1041
- {
1042
- id: "heading-font",
1043
- rel: "stylesheet",
1044
- type: "text/css",
1045
- href: `https://fonts.googleapis.com/css2?family=${x.replace(
1046
- / /g,
1047
- "+"
1048
- )}:wght@300;400;500;600;700;800;900&display=swap`,
1049
- media: "all"
1050
- }
1051
- ),
1052
- $ && x !== $ && /* @__PURE__ */ r.jsx(
1053
- "link",
1054
- {
1055
- id: "body-font",
1056
- rel: "stylesheet",
1057
- type: "text/css",
1058
- href: `https://fonts.googleapis.com/css2?family=${$.replace(
1059
- / /g,
1060
- "+"
1061
- )}:wght@300;400;500;600;700;800;900&display=swap`,
1062
- media: "all"
1063
- }
1064
- ),
1065
- x && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${x}",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";}` })
1066
- ] }) : null;
1067
- }, Fs = () => b(Ft), Rs = (n, s) => {
1068
- const e = ["xs", "sm", "md", "lg", "xl", "2xl"], t = e.indexOf(s), o = n.split(" ");
1069
- let a = new Array(e.length).fill(!1);
1070
- for (const l of o) {
1071
- let [i, c] = l.split(":");
1072
- c || (c = i, i = "xs");
1073
- const h = e.indexOf(i);
1074
- if (h <= t) {
1075
- const m = ["block", "flex", "inline", "inline-block", "inline-flex", "grid", "table"], d = ["hidden"];
1076
- if (m.includes(c))
1077
- for (let p = h; p < e.length; p++)
1078
- a[p] = !0;
1079
- else if (d.includes(c))
1080
- for (let p = h; p < e.length; p++)
1081
- a[p] = !1;
1082
- }
1083
- }
1084
- return a[t];
1085
- }, Hs = (n) => {
1086
- const s = {};
1087
- return Object.keys(n).forEach((e) => {
1088
- oe(n[e]) && n[e].startsWith(ge) && (s[e] = n[e].replace(ge, "").split(","));
1089
- }), s;
1090
- }, Ps = Ye((n) => {
1091
- const s = n.replace(Me, "").split(",");
1092
- return rs(s[0], s[1]);
1093
- });
1094
- function Os(n, s) {
1095
- return f(n, `${s}_attrs`, {});
1096
- }
1097
- function zs(n, s) {
1098
- const e = {};
1099
- return Object.keys(n).forEach((t) => {
1100
- if (oe(n[t]) && n[t].startsWith(Me)) {
1101
- const o = Ps(n[t]), a = Os(n, t);
1102
- e[t] = {
1103
- className: o,
1104
- "data-style-prop": t,
1105
- "data-block-parent": n._id,
1106
- "data-style-id": `${t}-${n._id}`,
1107
- ...a
1108
- };
1109
- const l = K(a, "x-show") || K(a, "x-if");
1110
- l && (e.__isHidden = l && !Rs(o, s));
1111
- }
1112
- }), e;
1113
- }
1114
- function Us(n, s) {
1115
- const e = f(n, "_bindings", {});
1116
- return I(e) ? { ...n } : (Xe(e, (t, o) => {
1117
- oe(t) && f(s, t, null) && (n[o] = f(s, t, null));
1118
- }), n);
1119
- }
1120
- function se({ blocks: n }) {
1121
- const [s] = ne(), [e] = b(Rt), [t] = b(ie), [o] = b(Ne), [, a] = G(), [l] = Fs(), i = q((d) => zs(d, a), [a]), [c] = qt(), [h] = b(P), m = q(
1122
- (d) => d.reduce((p, x) => {
1123
- const $ = f(l, x, {});
1124
- return { ...p, ...$ };
1125
- }, {}),
1126
- [l, s]
1127
- );
1128
- return /* @__PURE__ */ r.jsx(r.Fragment, { children: S.Children.toArray(
1129
- n.map((d, p) => {
1130
- if (h === d._id)
1131
- return null;
1132
- const x = Hs(d), $ = {};
1133
- I(x) || Object.keys(x).forEach((R) => {
1134
- $[R] = S.Children.toArray(
1135
- x[R].map((O) => /* @__PURE__ */ r.jsx(se, { blocks: [Ge(s, { _id: O })] }))
1136
- );
1137
- });
1138
- const g = je(s, { _parent: d._id });
1139
- $.children = g.length ? /* @__PURE__ */ r.jsx(se, { blocks: g }) : null;
1140
- const u = is(d._type), k = f(u, "builderComponent", f(u, "component", null));
1141
- if (Qe(k))
1142
- return /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${d == null ? void 0 : d._type} not registered -->` });
1143
- const C = K(u, "getBlockStateFrom") ? u == null ? void 0 : u.getBlockStateFrom(d, s) : [], D = m(C), E = i(d);
1144
- return f(E, "__isHidden", !1) && !fe(e, d._id) ? null : /* @__PURE__ */ r.jsx(V, { children: S.createElement(k, {
1145
- blockProps: {
1146
- ...fe(e, d._id) ? { "force-show": "" } : {},
1147
- "data-block-id": d._id,
1148
- "data-block-type": d._type,
1149
- ...t ? (
1150
- // @ts-ignore
1151
- {
1152
- "data-dnd": Ht(d._type, t == null ? void 0 : t._type) ? "yes" : "no",
1153
- "data-dnd-dragged": t._id === d._id ? "yes" : "no"
1154
- }
1155
- ) : {},
1156
- ...o === d._id ? { "data-drop": "yes" } : {}
1157
- },
1158
- index: p,
1159
- ...Us(d, c),
1160
- ...we(E, ["__isHidden"]),
1161
- ...$,
1162
- inBuilder: !0,
1163
- blockState: D
1164
- }) });
1165
- })
1166
- ) });
1167
- }
1168
- const Ws = () => {
1169
- const [n] = ne(), s = I(n) ? null : /* @__PURE__ */ r.jsx(Kt, { children: /* @__PURE__ */ r.jsx(se, { blocks: je(n, (e) => I(e._parent)) }) });
1170
- return /* @__PURE__ */ r.jsx(r.Fragment, { children: s });
1171
- }, qs = (n, s) => n.querySelector(`[data-style-id="${s}"]`), Ks = () => {
1172
- const [n] = b(Pt), [s] = Ee(), [e] = G(), [, t] = A(), o = Ot(), [, a] = F(), l = de(null), i = de(null), [c, h] = _({ width: 0, height: 0 }), m = xs(c), [d, p] = _(0), [x, $] = _([]), [, g] = _([]), [, u] = b(zt), [k, C] = L(), D = U("loading", !1), E = U("htmlDir", "ltr");
1173
- j(() => {
1174
- const { clientWidth: v, clientHeight: T } = i.current;
1175
- h({ width: v, height: T }), d === 0 && p(v);
1176
- }, [i, e, d]);
1177
- const R = (v, T = 0) => {
1178
- const { top: N } = v.getBoundingClientRect();
1179
- return N + T >= 0 && N - T <= window.innerHeight;
1180
- };
1181
- j(() => {
1182
- var v, T;
1183
- if (o && o.type !== "Multiple" && l.current) {
1184
- const N = Pe(l.current.contentDocument, o._id);
1185
- N && (R(N) || (T = (v = l.current) == null ? void 0 : v.contentWindow) == null || T.scrollTo({ top: N.offsetTop, behavior: "smooth" }), $([N]));
1186
- }
1187
- }, [o]), j(() => {
1188
- if (!I(k) && l.current) {
1189
- const v = qs(
1190
- l.current.contentDocument,
1191
- Y(k).id
1192
- );
1193
- g(v ? [v] : [null]);
1194
- } else
1195
- g([null]);
1196
- }, [k]);
1197
- const O = We(() => {
1198
- let v = fs;
1199
- return v = v.replace("__HTML_DIR__", E), n === "offline" && (v = v.replace(
1200
- "https://old.chaibuilder.com/offline/tailwind.cdn.js",
1201
- "/offline/tailwind.cdn.js"
1202
- ), v = v.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), v = v.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), v;
1203
- }, [n]);
1204
- return /* @__PURE__ */ r.jsx(
1205
- "div",
1206
- {
1207
- onClick: () => {
1208
- t([]), C([]);
1209
- },
1210
- onMouseLeave: () => setTimeout(() => a(""), 300),
1211
- className: "relative mx-auto h-full w-full overflow-hidden",
1212
- style: d > 0 && !I(m) ? { width: s ? "100%" : d } : {},
1213
- ref: i,
1214
- children: /* @__PURE__ */ r.jsxs(
1215
- $s,
1216
- {
1217
- contentDidMount: () => u(l.current),
1218
- ref: l,
1219
- id: "canvas-iframe",
1220
- style: { width: `${e}px`, ...m },
1221
- className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
1222
- initialContent: O,
1223
- children: [
1224
- /* @__PURE__ */ r.jsx(Es, {}),
1225
- /* @__PURE__ */ r.jsx(
1226
- Ns,
1227
- {
1228
- block: o,
1229
- selectedBlockElement: Y(x)
1230
- }
1231
- ),
1232
- /* @__PURE__ */ r.jsx(Ls, { model: "page" }),
1233
- /* @__PURE__ */ r.jsx(ls, { children: /* @__PURE__ */ r.jsx(Is, { children: D ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(ee, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(Ws, {}) }) }),
1234
- /* @__PURE__ */ r.jsx("br", {}),
1235
- /* @__PURE__ */ r.jsx(
1236
- "div",
1237
- {
1238
- id: "placeholder",
1239
- className: "pointer-events-none absolute z-[99999] max-w-full bg-green-500 transition-transform"
1240
- }
1241
- )
1242
- ]
1243
- }
1244
- )
1245
- }
1246
- );
1247
- }, Ys = S.lazy(() => import("./CodeEditor-zYBqhBv3.js")), Vo = () => {
1248
- const [n] = Ut();
1249
- return /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1250
- /* @__PURE__ */ r.jsx(gs, {}),
1251
- /* @__PURE__ */ r.jsxs("div", { className: "relative flex h-full flex-col overflow-hidden bg-slate-800/90 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px] px-2", children: [
1252
- /* @__PURE__ */ r.jsx(V, { fallback: /* @__PURE__ */ r.jsx(ee, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Yt, { children: /* @__PURE__ */ r.jsx(Ks, {}) }) }),
1253
- n ? /* @__PURE__ */ r.jsx(V, { fallback: /* @__PURE__ */ r.jsx(ee, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(as, { enable: { top: !0, bottom: !1 }, className: "max-h-[400px] min-h-[200px]", children: /* @__PURE__ */ r.jsx(Ys, {}) }) }) : null
1254
- ] })
1255
- ] });
1256
- };
1257
- export {
1258
- Vo as default
1259
- };