@chaibuilder/sdk 1.2.19 → 1.2.21

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 (94) hide show
  1. package/dist/AddBlocks-157fSrJX.cjs +1 -0
  2. package/dist/{AddBlocks-gcTaEIKO.js → AddBlocks-WgpssWmQ.js} +25 -27
  3. package/dist/{BrandingOptions-bfiFY0VR.js → BrandingOptions-4961TxX2.js} +13 -15
  4. package/dist/BrandingOptions-nwXR9TMl.cjs +1 -0
  5. package/dist/CanvasArea-_BFTu_8b.js +908 -0
  6. package/dist/CanvasArea-eOKWgAXR.cjs +55 -0
  7. package/dist/{CurrentPage-0Ap2N0uc.js → CurrentPage-VAuh7F6E.js} +13 -16
  8. package/dist/CurrentPage-iB6nD9Rr.cjs +1 -0
  9. package/dist/ListTree-dvxHTXs4.js +167 -0
  10. package/dist/ListTree-gTmusfso.cjs +1 -0
  11. package/dist/Outline-g8XFGm2t.cjs +1 -0
  12. package/dist/Outline-jTFv40r5.js +294 -0
  13. package/dist/PagesPanel-Wx9JG5qR.cjs +1 -0
  14. package/dist/{PagesPanel-Pk-C1956.js → PagesPanel-oky0X1Ww.js} +5 -8
  15. package/dist/ProjectPanel-64Xg3Y_p.cjs +1 -0
  16. package/dist/{ProjectPanel-_KQBhuPO.js → ProjectPanel-WjVBiB-e.js} +15 -18
  17. package/dist/Settings-Tlqq4mqN.cjs +1 -0
  18. package/dist/{Settings-XtAatoiu.js → Settings-mNRbprbx.js} +761 -709
  19. package/dist/SidePanels-ZF4Q2R29.cjs +1 -0
  20. package/dist/{SidePanels-O52zKXbH.js → SidePanels-pQImwDI6.js} +7 -10
  21. package/dist/Topbar-NMvzqQHW.cjs +1 -0
  22. package/dist/{Topbar-oTx7a12r.js → Topbar-Ny9T-7Zb.js} +3 -5
  23. package/dist/TypeIcon-ElNNPazl.cjs +1 -0
  24. package/dist/TypeIcon-qO96rNbV.js +69 -0
  25. package/dist/UnsplashImages-6tZv1q2_.cjs +1 -0
  26. package/dist/{UnsplashImages-5A21uzMK.js → UnsplashImages-Y8RGFVSh.js} +13 -15
  27. package/dist/UploadImages-VLlVg9Ur.cjs +1 -0
  28. package/dist/{UploadImages-V_54lCAO.js → UploadImages-dd8LfyFr.js} +8 -10
  29. package/dist/{add-page-modal-dKQLw7RQ.js → add-page-modal-1mGGtAB_.js} +16 -19
  30. package/dist/add-page-modal-xCUKJiZv.cjs +1 -0
  31. package/dist/confirm-alert-f26zJ7Js.cjs +1 -0
  32. package/dist/{confirm-alert-8GP3bKH_.js → confirm-alert-sc8RaWvD.js} +3 -5
  33. package/dist/{controls-Dy1qa8Dc.cjs → controls-KK2oLIa8.cjs} +1 -1
  34. package/dist/{controls-XPXGHKht.js → controls-OfJWSEqC.js} +29 -28
  35. package/dist/core.cjs +1 -1
  36. package/dist/core.d.ts +1 -1
  37. package/dist/core.js +45 -48
  38. package/dist/delete-page-modal-Qa0YqBRl.cjs +1 -0
  39. package/dist/{delete-page-modal-Zb5ld6O-.js → delete-page-modal-yAJNstCa.js} +8 -11
  40. package/dist/email-blocks.cjs +1 -1
  41. package/dist/email-blocks.js +5 -5
  42. package/dist/email.cjs +1 -1
  43. package/dist/email.d.ts +1 -0
  44. package/dist/email.js +4 -7
  45. package/dist/{form-yyU2x7So.js → form-Nj6Kdn3g.js} +1 -1
  46. package/dist/{form-o6_55v8F.cjs → form-n1Q6u16z.cjs} +1 -1
  47. package/dist/index-9PHdn80L.cjs +1 -0
  48. package/dist/{index-JdnF6lYP.cjs → index-9YNkdni8.cjs} +51 -51
  49. package/dist/{index-WP7IRkij.js → index-IPJAbzzO.js} +1178 -1133
  50. package/dist/{index-BMZLAJUV.cjs → index-PlZjGTTr.cjs} +1 -1
  51. package/dist/{index-lFcrvDFC.js → index-iQEapw2W.js} +3 -3
  52. package/dist/{index-yILWlilS.js → index-kAjyc_KA.js} +8306 -8170
  53. package/dist/{page-viewer-3QXwPGpg.js → page-viewer-SU_BqZDK.js} +9 -12
  54. package/dist/page-viewer-ZA-sJD82.cjs +1 -0
  55. package/dist/project-general-setting-GuQyvAHS.cjs +1 -0
  56. package/dist/{project-general-setting-UalRmyHm.js → project-general-setting-eEmhoFvb.js} +7 -10
  57. package/dist/project-seo-setting-3-vBkx2v.cjs +1 -0
  58. package/dist/{project-seo-setting-8FsvPSPl.js → project-seo-setting-NNvAGt4T.js} +5 -7
  59. package/dist/single-page-detail-Z677SWqt.cjs +1 -0
  60. package/dist/{single-page-detail-GaB85dNv.js → single-page-detail-nxWIy6e7.js} +36 -39
  61. package/dist/studio.cjs +1 -1
  62. package/dist/studio.d.ts +1 -0
  63. package/dist/studio.js +4 -7
  64. package/dist/ui.cjs +1 -1
  65. package/dist/ui.js +138 -140
  66. package/dist/{useAddBlockByDrop-BIK2fdgj.js → useAddBlockByDrop-V8xo-PNQ.js} +1 -1
  67. package/dist/{useAddBlockByDrop-6EbioQV4.cjs → useAddBlockByDrop-qRHgy8_0.cjs} +1 -1
  68. package/dist/web-blocks.cjs +1 -1
  69. package/dist/web-blocks.js +1 -1
  70. package/package.json +26 -38
  71. package/dist/AddBlocks-KeHVFaIr.cjs +0 -1
  72. package/dist/BrandingOptions-I2I8w6E9.cjs +0 -1
  73. package/dist/CanvasArea-JfHkTnQD.cjs +0 -60
  74. package/dist/CanvasArea-xvMCbQDL.js +0 -1404
  75. package/dist/CurrentPage-vj52UxMA.cjs +0 -1
  76. package/dist/ListTree-Vq0_s1wC.cjs +0 -1
  77. package/dist/ListTree-k-QMO740.js +0 -96
  78. package/dist/Outline-HI6-c9nf.js +0 -359
  79. package/dist/Outline-fAflJ_lN.cjs +0 -1
  80. package/dist/PagesPanel-ug8Tmva6.cjs +0 -1
  81. package/dist/ProjectPanel-o8-6cPX-.cjs +0 -1
  82. package/dist/Settings-Cc9eV4VG.cjs +0 -1
  83. package/dist/SidePanels-ugRobm34.cjs +0 -1
  84. package/dist/Topbar-e5MGWX9n.cjs +0 -1
  85. package/dist/UnsplashImages-KSbKGs91.cjs +0 -1
  86. package/dist/UploadImages-V42YSRVO.cjs +0 -1
  87. package/dist/add-page-modal-xMedOdsp.cjs +0 -1
  88. package/dist/confirm-alert-KtW-4OjG.cjs +0 -1
  89. package/dist/delete-page-modal-lebJCBBe.cjs +0 -1
  90. package/dist/index-thKfFhmr.cjs +0 -1
  91. package/dist/page-viewer-DTIblLiz.cjs +0 -1
  92. package/dist/project-general-setting-g7WhM3hc.cjs +0 -1
  93. package/dist/project-seo-setting-xoeLQVj3.cjs +0 -1
  94. package/dist/single-page-detail-XdBysrE_.cjs +0 -1
@@ -1,1404 +0,0 @@
1
- var kt = Object.defineProperty;
2
- var jt = (e, t, n) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var Y = (e, t, n) => (jt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { j as r } from "./jsx-runtime-WbnYoNE9.js";
5
- import K, { createElement as _e, useCallback as ke, useState as $, useEffect as R, Component as Ye, Children as Tt, Suspense as Ke, useRef as Be, useMemo as Ct } from "react";
6
- import { map as re, includes as Oe, toUpper as pe, round as Et, throttle as Je, noop as te, isEmpty as z, first as ae, omit as It, pick as St, get as D, isString as je, memoize as Dt, each as _t, find as Bt, filter as Ve, isNull as Ot, has as At } from "lodash-es";
7
- import { ResetIcon as Ae, MobileIcon as Re, LaptopIcon as Rt, DesktopIcon as Pt, DotsVerticalIcon as Mt, EraserIcon as Lt, ZoomInIcon as Nt, DragHandleDots2Icon as Ft, ArrowUpIcon as $t, CopyIcon as Wt, TrashIcon as qt } from "@radix-ui/react-icons";
8
- import { v as Qe, B as le, V as Ze, aB as Ht, aC as Ut, aD as zt, aE as Yt, aF as Kt, N as Te, ab as Jt, h as Ce, aG as Vt, aH as Qt, aI as Zt, aJ as Gt, aK as Xt, aL as en, aM as tn, r as W, ac as J, A as nn, a as rn, b as on, c as sn, d as an, e as ln, f as cn, g as dn, ai as un, O as Ge, aA as ie, aN as pn, Y as G, a5 as fn, aO as X, E as Ee, t as Xe, q as et, s as tt, z as hn, aP as gn, aQ as nt, aR as mn, aS as yn, F as vn, aT as xn, a1 as bn, aU as wn, S as rt } from "./index-WP7IRkij.js";
9
- import { useTranslation as de } from "react-i18next";
10
- import { useAtom as M } from "jotai";
11
- import Pe from "react-dom";
12
- import { g as kn } from "./_commonjsHelpers-UyOWmZb0.js";
13
- import { r as ot, u as jn, B as Tn, E as Cn } from "./index-yILWlilS.js";
14
- import { Quill as En } from "react-quill";
15
- import { u as In } from "./useAddBlockByDrop-BIK2fdgj.js";
16
- import { useFeature as st } from "flagged";
17
- import { flip as Sn } from "@floating-ui/dom";
18
- import { useFloating as Dn, shift as _n } from "@floating-ui/react-dom";
19
- import { useResizeObserver as Bn } from "@react-hookz/web";
20
- import { tailwindcssPaletteGenerator as On } from "@bobthered/tailwindcss-palette-generator";
21
- import { Provider as An } from "react-wrap-balancer";
22
- import { twMerge as Rn } from "tailwind-merge";
23
- import { S as Me, a as it } from "./MODIFIERS-WQdaNvb8.js";
24
- import { getBlockComponent as Pn } from "@chaibuilder/runtime";
25
- import "./Functions-7jnEwJyw.js";
26
- import "clsx";
27
- import "flat-to-nested";
28
- import "@radix-ui/react-toggle";
29
- import "class-variance-authority";
30
- import "./Class-3k8xjeiM.js";
31
- import "@radix-ui/react-switch";
32
- import "@radix-ui/react-slot";
33
- import "@radix-ui/react-accordion";
34
- import "@radix-ui/react-alert-dialog";
35
- import "@radix-ui/react-dialog";
36
- import "@radix-ui/react-label";
37
- import "@radix-ui/react-scroll-area";
38
- import "@radix-ui/react-tabs";
39
- import "@radix-ui/react-tooltip";
40
- import "@radix-ui/react-popover";
41
- import "@radix-ui/react-menubar";
42
- import "@radix-ui/react-hover-card";
43
- import "@radix-ui/react-select";
44
- import "@radix-ui/react-dropdown-menu";
45
- import "@radix-ui/react-separator";
46
- import "@radix-ui/react-toast";
47
- import "cmdk";
48
- import "@radix-ui/react-context-menu";
49
- import "react-icons-picker";
50
- import "lodash";
51
- import "i18next";
52
- import "react-textarea-autosize";
53
- import "react-dnd";
54
- import "@minoru/react-dnd-treeview";
55
- import "react-hotkeys-hook";
56
- const Mn = () => {
57
- const { hasUndo: e, hasRedo: t, undo: n, redo: s } = Qe();
58
- return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
59
- /* @__PURE__ */ r.jsx(le, { disabled: !e(), size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Ae, {}) }),
60
- /* @__PURE__ */ r.jsx(le, { disabled: !t(), onClick: s, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Ae, { className: "rotate-180 scale-y-[-1] transform" }) })
61
- ] });
62
- };
63
- function Ln() {
64
- const [e, t] = Ze(), { t: n } = de();
65
- return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
66
- /* @__PURE__ */ r.jsx(Ht, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
67
- /* @__PURE__ */ r.jsxs(
68
- Ut,
69
- {
70
- id: "dark-mode-switch",
71
- checked: e,
72
- onCheckedChange: () => {
73
- t(!e);
74
- },
75
- className: `${e ? "bg-violet-600" : "bg-violet-300"}
76
- 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`,
77
- children: [
78
- /* @__PURE__ */ r.jsx("span", { className: "sr-only", children: n("use_setting") }),
79
- /* @__PURE__ */ r.jsx(
80
- "span",
81
- {
82
- "aria-hidden": "true",
83
- className: `${e ? "translate-x-5" : "translate-x-0"}
84
- 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
- )
90
- ] });
91
- }
92
- const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
93
- "svg",
94
- {
95
- className: e ? "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
- ), Nn = [
116
- {
117
- title: "mobile_xs_title",
118
- content: "mobile_xs_content",
119
- breakpoint: "xs",
120
- icon: /* @__PURE__ */ r.jsx(Re, {}),
121
- width: 400
122
- },
123
- {
124
- title: "mobile_sm_title",
125
- content: "mobile_sm_content",
126
- breakpoint: "sm",
127
- icon: /* @__PURE__ */ r.jsx(Re, { 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(Le, {}),
135
- width: 800
136
- },
137
- {
138
- title: "tablet_lg_title",
139
- content: "tablet_lg_content",
140
- breakpoint: "lg",
141
- icon: /* @__PURE__ */ r.jsx(Le, { 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(Rt, {}),
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(Pt, {}),
156
- width: 1920
157
- }
158
- ], Ne = ({
159
- title: e,
160
- content: t,
161
- currentBreakpoint: n,
162
- breakpoint: s,
163
- width: i,
164
- icon: l,
165
- onClick: d
166
- }) => {
167
- const { t: o } = de();
168
- return /* @__PURE__ */ r.jsxs(zt, { children: [
169
- /* @__PURE__ */ r.jsx(Yt, { asChild: !0, children: /* @__PURE__ */ r.jsx(
170
- le,
171
- {
172
- onClick: () => d(i),
173
- size: "sm",
174
- variant: s === n ? "secondary" : "ghost",
175
- children: l
176
- }
177
- ) }),
178
- /* @__PURE__ */ r.jsx(Kt, { 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: o(e) }),
180
- /* @__PURE__ */ r.jsx("p", { className: "text-xs", children: o(t) })
181
- ] }) }) })
182
- ] });
183
- }, Fn = () => {
184
- const [, e, t] = Te(), [n, s] = Jt(), { t: i } = de(), l = Ce("breakpoints", Nn), d = (o) => {
185
- n.includes(o) ? n.length > 2 && s(n.filter((c) => c !== o)) : s((c) => [...c, o]);
186
- };
187
- return l.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: re(l, (o) => /* @__PURE__ */ _e(Ne, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
188
- re(
189
- l.filter((o) => Oe(n, pe(o.breakpoint))),
190
- (o) => /* @__PURE__ */ _e(Ne, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })
191
- ),
192
- /* @__PURE__ */ r.jsxs(Vt, { children: [
193
- /* @__PURE__ */ r.jsx(Qt, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(Mt, { className: "scale-90 transform" }) }) }),
194
- /* @__PURE__ */ r.jsxs(Zt, { className: "w-56 border-border text-xs", children: [
195
- /* @__PURE__ */ r.jsx(Gt, { children: i("Breakpoints") }),
196
- /* @__PURE__ */ r.jsx(Xt, {}),
197
- re(l, (o) => /* @__PURE__ */ r.jsx(
198
- en,
199
- {
200
- disabled: o.breakpoint === "xs",
201
- onCheckedChange: () => d(pe(o.breakpoint)),
202
- checked: Oe(n, pe(o.breakpoint)),
203
- children: i(o.title)
204
- },
205
- o.breakpoint
206
- ))
207
- ] })
208
- ] })
209
- ] });
210
- }, $n = () => {
211
- const { t: e } = de(), { setNewBlocks: t } = tn(), [, n] = W(), [, s] = J(), i = ke(() => {
212
- t([]), n([]), s([]);
213
- }, [t]);
214
- return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(nn, { children: [
215
- /* @__PURE__ */ r.jsx(rn, { asChild: !0, children: /* @__PURE__ */ r.jsxs(le, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
216
- /* @__PURE__ */ r.jsx(Lt, {}),
217
- " ",
218
- e("clear")
219
- ] }) }),
220
- /* @__PURE__ */ r.jsxs(on, { className: "border-border", children: [
221
- /* @__PURE__ */ r.jsxs(sn, { children: [
222
- /* @__PURE__ */ r.jsx(an, { children: e("clear_canvas_title") }),
223
- /* @__PURE__ */ r.jsx(ln, { children: e("clear_canvas_description") })
224
- ] }),
225
- /* @__PURE__ */ r.jsxs(cn, { children: [
226
- /* @__PURE__ */ r.jsx(dn, { children: e("cancel") }),
227
- /* @__PURE__ */ r.jsx(un, { onClick: i, children: e("yes") })
228
- ] })
229
- ] })
230
- ] }) });
231
- }, Wn = () => {
232
- const e = Ce("darkMode", !1), [t] = Ge();
233
- return /* @__PURE__ */ r.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
234
- /* @__PURE__ */ r.jsxs("div", { className: "flex h-full space-x-2", children: [
235
- e ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
236
- /* @__PURE__ */ r.jsx(Ln, {}),
237
- /* @__PURE__ */ r.jsx(ie, { orientation: "vertical" })
238
- ] }) : null,
239
- /* @__PURE__ */ r.jsx(Fn, {}),
240
- /* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
241
- /* @__PURE__ */ r.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
242
- /* @__PURE__ */ r.jsx(Nt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
243
- " ",
244
- /* @__PURE__ */ r.jsxs("div", { className: "text-xs leading-3", children: [
245
- Et(t, 0),
246
- "%"
247
- ] })
248
- ] }),
249
- /* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
250
- /* @__PURE__ */ r.jsx(Mn, {})
251
- ] }),
252
- /* @__PURE__ */ r.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
253
- /* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
254
- /* @__PURE__ */ r.jsx($n, {})
255
- ] })
256
- ] });
257
- }, qn = `<!doctype html>
258
- <html class="scroll-smooth h-full overflow-y-auto">
259
- <head>
260
- <meta charset="UTF-8">
261
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
262
- <script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"><\/script>
263
- <style>
264
- html { height: 100%; overflow:auto; }
265
- body { height: 100%; }
266
- .air-highlight{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}
267
- .air-highlight-multi{ outline: 1px solid #29e503 !important; outline-offset: -1px;}
268
- body{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none;
269
- -moz-user-select: none;-ms-user-select: none; user-select: none; }
270
- html{
271
- -ms-overflow-style: none; /* IE and Edge */
272
- scrollbar-width: none; /* Firefox */
273
- }
274
- /** IMPORTANT: Make fields content editable in SAFARI */
275
- [contenteditable] {-webkit-user-select: text;user-select: text;}
276
-
277
- html::-webkit-scrollbar { width: 0 !important }
278
- .aspect-auto{aspect-ratio: auto;}
279
- .aspect-square{aspect-ratio: 1/1;}
280
- .aspect-video{aspect-ratio: 16/9;}
281
- .dragging [data-dnd="leaf"] { pointer-events: none; } .dragging [data-dnd="leaf"] * { pointer-events: none; }
282
- .dragging [data-dnd="ignore"], .dragging [data-dnd="ignore"] * { pointer-events: none; }
283
- a{ pointer-events: none !important; }
284
- [contenteditable="true"], [contenteditable="true"] * { cursor: text !important; }
285
- [contenteditable="true"] {
286
- outline: none;
287
- box-shadow: 0 0 0px 4px rgba(36, 150, 255, 0.2);
288
- -webkit-user-select: text;
289
- -moz-user-select: text;
290
- user-select: text;
291
- }
292
- .frame-root .frame-content { height: 100%; }
293
- </style>
294
- <style id="hidden-blocks"></style>
295
- <style id="selected-block"></style>
296
- <style id="selected-styling-block"></style>
297
- <style id="highlighted-block"></style>
298
- <style id="dragged-block"></style>
299
-
300
- </head>
301
- <body class="font-body antialiased h-full">
302
- <div class="frame-root h-full"></div>
303
- <script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
304
- </body>
305
- </html>`, Hn = (e) => {
306
- const [t] = Te(), [, n] = Ge(), [s, i] = $({}), l = ke(() => {
307
- const { width: d, height: o } = e;
308
- if (d < t) {
309
- const c = parseFloat((d / t).toFixed(2).toString());
310
- let p = {};
311
- const f = o * c;
312
- o && (p = {
313
- // Eureka! This is the formula to calculate the height of the scaled element. Thank you ChatGPT 4
314
- height: 100 + (o - f) / f * 100 + "%"
315
- }), i({
316
- position: "relative",
317
- top: 0,
318
- transform: `scale(${c})`,
319
- transformOrigin: "top left",
320
- ...p,
321
- maxWidth: "none"
322
- }), n(c * 100);
323
- } else
324
- i({}), n(100);
325
- }, [t, e, n]);
326
- return R(() => {
327
- l();
328
- }, [t, e, n, l]), s;
329
- };
330
- var ce = { exports: {} };
331
- /*
332
- object-assign
333
- (c) Sindre Sorhus
334
- @license MIT
335
- */
336
- var fe, Fe;
337
- function Un() {
338
- if (Fe)
339
- return fe;
340
- Fe = 1;
341
- var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
342
- function s(l) {
343
- if (l == null)
344
- throw new TypeError("Object.assign cannot be called with null or undefined");
345
- return Object(l);
346
- }
347
- function i() {
348
- try {
349
- if (!Object.assign)
350
- return !1;
351
- var l = new String("abc");
352
- if (l[5] = "de", Object.getOwnPropertyNames(l)[0] === "5")
353
- return !1;
354
- for (var d = {}, o = 0; o < 10; o++)
355
- d["_" + String.fromCharCode(o)] = o;
356
- var c = Object.getOwnPropertyNames(d).map(function(f) {
357
- return d[f];
358
- });
359
- if (c.join("") !== "0123456789")
360
- return !1;
361
- var p = {};
362
- return "abcdefghijklmnopqrst".split("").forEach(function(f) {
363
- p[f] = f;
364
- }), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
365
- } catch {
366
- return !1;
367
- }
368
- }
369
- return fe = i() ? Object.assign : function(l, d) {
370
- for (var o, c = s(l), p, f = 1; f < arguments.length; f++) {
371
- o = Object(arguments[f]);
372
- for (var h in o)
373
- t.call(o, h) && (c[h] = o[h]);
374
- if (e) {
375
- p = e(o);
376
- for (var v = 0; v < p.length; v++)
377
- n.call(o, p[v]) && (c[p[v]] = o[p[v]]);
378
- }
379
- }
380
- return c;
381
- }, fe;
382
- }
383
- var he, $e;
384
- function Ie() {
385
- if ($e)
386
- return he;
387
- $e = 1;
388
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
389
- return he = e, he;
390
- }
391
- var ge, We;
392
- function at() {
393
- return We || (We = 1, ge = Function.call.bind(Object.prototype.hasOwnProperty)), ge;
394
- }
395
- var me, qe;
396
- function zn() {
397
- if (qe)
398
- return me;
399
- qe = 1;
400
- var e = function() {
401
- };
402
- if (process.env.NODE_ENV !== "production") {
403
- var t = Ie(), n = {}, s = at();
404
- e = function(l) {
405
- var d = "Warning: " + l;
406
- typeof console < "u" && console.error(d);
407
- try {
408
- throw new Error(d);
409
- } catch {
410
- }
411
- };
412
- }
413
- function i(l, d, o, c, p) {
414
- if (process.env.NODE_ENV !== "production") {
415
- for (var f in l)
416
- if (s(l, f)) {
417
- var h;
418
- try {
419
- if (typeof l[f] != "function") {
420
- var v = Error(
421
- (c || "React class") + ": " + o + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
422
- );
423
- throw v.name = "Invariant Violation", v;
424
- }
425
- h = l[f](d, f, c, o, null, t);
426
- } catch (O) {
427
- h = O;
428
- }
429
- if (h && !(h instanceof Error) && e(
430
- (c || "React class") + ": type specification of " + o + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
431
- ), h instanceof Error && !(h.message in n)) {
432
- n[h.message] = !0;
433
- var S = p ? p() : "";
434
- e(
435
- "Failed " + o + " type: " + h.message + (S ?? "")
436
- );
437
- }
438
- }
439
- }
440
- }
441
- return i.resetWarningCache = function() {
442
- process.env.NODE_ENV !== "production" && (n = {});
443
- }, me = i, me;
444
- }
445
- var ye, He;
446
- function Yn() {
447
- if (He)
448
- return ye;
449
- He = 1;
450
- var e = ot, t = Un(), n = Ie(), s = at(), i = zn(), l = function() {
451
- };
452
- process.env.NODE_ENV !== "production" && (l = function(o) {
453
- var c = "Warning: " + o;
454
- typeof console < "u" && console.error(c);
455
- try {
456
- throw new Error(c);
457
- } catch {
458
- }
459
- });
460
- function d() {
461
- return null;
462
- }
463
- return ye = function(o, c) {
464
- var p = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
465
- function h(a) {
466
- var u = a && (p && a[p] || a[f]);
467
- if (typeof u == "function")
468
- return u;
469
- }
470
- var v = "<<anonymous>>", S = {
471
- array: I("array"),
472
- bigint: I("bigint"),
473
- bool: I("boolean"),
474
- func: I("function"),
475
- number: I("number"),
476
- object: I("object"),
477
- string: I("string"),
478
- symbol: I("symbol"),
479
- any: q(),
480
- arrayOf: V,
481
- element: Q(),
482
- elementType: L(),
483
- instanceOf: _,
484
- node: mt(),
485
- objectOf: F,
486
- oneOf: N,
487
- oneOfType: gt,
488
- shape: yt,
489
- exact: vt
490
- };
491
- function O(a, u) {
492
- return a === u ? a !== 0 || 1 / a === 1 / u : a !== a && u !== u;
493
- }
494
- function m(a, u) {
495
- this.message = a, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
496
- }
497
- m.prototype = Error.prototype;
498
- function g(a) {
499
- if (process.env.NODE_ENV !== "production")
500
- var u = {}, k = 0;
501
- function b(j, x, w, T, E, C, P) {
502
- if (T = T || v, C = C || w, P !== n) {
503
- if (c) {
504
- var B = new Error(
505
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
506
- );
507
- throw B.name = "Invariant Violation", B;
508
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
509
- var Z = T + ":" + w;
510
- !u[Z] && // Avoid spamming the console because they are often not actionable except for lib authors
511
- k < 3 && (l(
512
- "You are manually calling a React.PropTypes validation function for the `" + C + "` prop on `" + T + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
513
- ), u[Z] = !0, k++);
514
- }
515
- }
516
- return x[w] == null ? j ? x[w] === null ? new m("The " + E + " `" + C + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new m("The " + E + " `" + C + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : a(x, w, T, E, C);
517
- }
518
- var y = b.bind(null, !1);
519
- return y.isRequired = b.bind(null, !0), y;
520
- }
521
- function I(a) {
522
- function u(k, b, y, j, x, w) {
523
- var T = k[b], E = H(T);
524
- if (E !== a) {
525
- var C = ee(T);
526
- return new m(
527
- "Invalid " + j + " `" + x + "` of type " + ("`" + C + "` supplied to `" + y + "`, expected ") + ("`" + a + "`."),
528
- { expectedType: a }
529
- );
530
- }
531
- return null;
532
- }
533
- return g(u);
534
- }
535
- function q() {
536
- return g(d);
537
- }
538
- function V(a) {
539
- function u(k, b, y, j, x) {
540
- if (typeof a != "function")
541
- return new m("Property `" + x + "` of component `" + y + "` has invalid PropType notation inside arrayOf.");
542
- var w = k[b];
543
- if (!Array.isArray(w)) {
544
- var T = H(w);
545
- return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected an array."));
546
- }
547
- for (var E = 0; E < w.length; E++) {
548
- var C = a(w, E, y, j, x + "[" + E + "]", n);
549
- if (C instanceof Error)
550
- return C;
551
- }
552
- return null;
553
- }
554
- return g(u);
555
- }
556
- function Q() {
557
- function a(u, k, b, y, j) {
558
- var x = u[k];
559
- if (!o(x)) {
560
- var w = H(x);
561
- return new m("Invalid " + y + " `" + j + "` of type " + ("`" + w + "` supplied to `" + b + "`, expected a single ReactElement."));
562
- }
563
- return null;
564
- }
565
- return g(a);
566
- }
567
- function L() {
568
- function a(u, k, b, y, j) {
569
- var x = u[k];
570
- if (!e.isValidElementType(x)) {
571
- var w = H(x);
572
- return new m("Invalid " + y + " `" + j + "` of type " + ("`" + w + "` supplied to `" + b + "`, expected a single ReactElement type."));
573
- }
574
- return null;
575
- }
576
- return g(a);
577
- }
578
- function _(a) {
579
- function u(k, b, y, j, x) {
580
- if (!(k[b] instanceof a)) {
581
- var w = a.name || v, T = wt(k[b]);
582
- return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected ") + ("instance of `" + w + "`."));
583
- }
584
- return null;
585
- }
586
- return g(u);
587
- }
588
- function N(a) {
589
- if (!Array.isArray(a))
590
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? l(
591
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
592
- ) : l("Invalid argument supplied to oneOf, expected an array.")), d;
593
- function u(k, b, y, j, x) {
594
- for (var w = k[b], T = 0; T < a.length; T++)
595
- if (O(w, a[T]))
596
- return null;
597
- var E = JSON.stringify(a, function(P, B) {
598
- var Z = ee(B);
599
- return Z === "symbol" ? String(B) : B;
600
- });
601
- return new m("Invalid " + j + " `" + x + "` of value `" + String(w) + "` " + ("supplied to `" + y + "`, expected one of " + E + "."));
602
- }
603
- return g(u);
604
- }
605
- function F(a) {
606
- function u(k, b, y, j, x) {
607
- if (typeof a != "function")
608
- return new m("Property `" + x + "` of component `" + y + "` has invalid PropType notation inside objectOf.");
609
- var w = k[b], T = H(w);
610
- if (T !== "object")
611
- return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected an object."));
612
- for (var E in w)
613
- if (s(w, E)) {
614
- var C = a(w, E, y, j, x + "." + E, n);
615
- if (C instanceof Error)
616
- return C;
617
- }
618
- return null;
619
- }
620
- return g(u);
621
- }
622
- function gt(a) {
623
- if (!Array.isArray(a))
624
- return process.env.NODE_ENV !== "production" && l("Invalid argument supplied to oneOfType, expected an instance of array."), d;
625
- for (var u = 0; u < a.length; u++) {
626
- var k = a[u];
627
- if (typeof k != "function")
628
- return l(
629
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + bt(k) + " at index " + u + "."
630
- ), d;
631
- }
632
- function b(y, j, x, w, T) {
633
- for (var E = [], C = 0; C < a.length; C++) {
634
- var P = a[C], B = P(y, j, x, w, T, n);
635
- if (B == null)
636
- return null;
637
- B.data && s(B.data, "expectedType") && E.push(B.data.expectedType);
638
- }
639
- var Z = E.length > 0 ? ", expected one of type [" + E.join(", ") + "]" : "";
640
- return new m("Invalid " + w + " `" + T + "` supplied to " + ("`" + x + "`" + Z + "."));
641
- }
642
- return g(b);
643
- }
644
- function mt() {
645
- function a(u, k, b, y, j) {
646
- return se(u[k]) ? null : new m("Invalid " + y + " `" + j + "` supplied to " + ("`" + b + "`, expected a ReactNode."));
647
- }
648
- return g(a);
649
- }
650
- function De(a, u, k, b, y) {
651
- return new m(
652
- (a || "React class") + ": " + u + " type `" + k + "." + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + y + "`."
653
- );
654
- }
655
- function yt(a) {
656
- function u(k, b, y, j, x) {
657
- var w = k[b], T = H(w);
658
- if (T !== "object")
659
- return new m("Invalid " + j + " `" + x + "` of type `" + T + "` " + ("supplied to `" + y + "`, expected `object`."));
660
- for (var E in a) {
661
- var C = a[E];
662
- if (typeof C != "function")
663
- return De(y, j, x, E, ee(C));
664
- var P = C(w, E, y, j, x + "." + E, n);
665
- if (P)
666
- return P;
667
- }
668
- return null;
669
- }
670
- return g(u);
671
- }
672
- function vt(a) {
673
- function u(k, b, y, j, x) {
674
- var w = k[b], T = H(w);
675
- if (T !== "object")
676
- return new m("Invalid " + j + " `" + x + "` of type `" + T + "` " + ("supplied to `" + y + "`, expected `object`."));
677
- var E = t({}, k[b], a);
678
- for (var C in E) {
679
- var P = a[C];
680
- if (s(a, C) && typeof P != "function")
681
- return De(y, j, x, C, ee(P));
682
- if (!P)
683
- return new m(
684
- "Invalid " + j + " `" + x + "` key `" + C + "` supplied to `" + y + "`.\nBad object: " + JSON.stringify(k[b], null, " ") + `
685
- Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
686
- );
687
- var B = P(w, C, y, j, x + "." + C, n);
688
- if (B)
689
- return B;
690
- }
691
- return null;
692
- }
693
- return g(u);
694
- }
695
- function se(a) {
696
- switch (typeof a) {
697
- case "number":
698
- case "string":
699
- case "undefined":
700
- return !0;
701
- case "boolean":
702
- return !a;
703
- case "object":
704
- if (Array.isArray(a))
705
- return a.every(se);
706
- if (a === null || o(a))
707
- return !0;
708
- var u = h(a);
709
- if (u) {
710
- var k = u.call(a), b;
711
- if (u !== a.entries) {
712
- for (; !(b = k.next()).done; )
713
- if (!se(b.value))
714
- return !1;
715
- } else
716
- for (; !(b = k.next()).done; ) {
717
- var y = b.value;
718
- if (y && !se(y[1]))
719
- return !1;
720
- }
721
- } else
722
- return !1;
723
- return !0;
724
- default:
725
- return !1;
726
- }
727
- }
728
- function xt(a, u) {
729
- return a === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
730
- }
731
- function H(a) {
732
- var u = typeof a;
733
- return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : xt(u, a) ? "symbol" : u;
734
- }
735
- function ee(a) {
736
- if (typeof a > "u" || a === null)
737
- return "" + a;
738
- var u = H(a);
739
- if (u === "object") {
740
- if (a instanceof Date)
741
- return "date";
742
- if (a instanceof RegExp)
743
- return "regexp";
744
- }
745
- return u;
746
- }
747
- function bt(a) {
748
- var u = ee(a);
749
- switch (u) {
750
- case "array":
751
- case "object":
752
- return "an " + u;
753
- case "boolean":
754
- case "date":
755
- case "regexp":
756
- return "a " + u;
757
- default:
758
- return u;
759
- }
760
- }
761
- function wt(a) {
762
- return !a.constructor || !a.constructor.name ? v : a.constructor.name;
763
- }
764
- return S.checkPropTypes = i, S.resetWarningCache = i.resetWarningCache, S.PropTypes = S, S;
765
- }, ye;
766
- }
767
- var ve, Ue;
768
- function Kn() {
769
- if (Ue)
770
- return ve;
771
- Ue = 1;
772
- var e = Ie();
773
- function t() {
774
- }
775
- function n() {
776
- }
777
- return n.resetWarningCache = t, ve = function() {
778
- function s(d, o, c, p, f, h) {
779
- if (h !== e) {
780
- var v = new Error(
781
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
782
- );
783
- throw v.name = "Invariant Violation", v;
784
- }
785
- }
786
- s.isRequired = s;
787
- function i() {
788
- return s;
789
- }
790
- var l = {
791
- array: s,
792
- bigint: s,
793
- bool: s,
794
- func: s,
795
- number: s,
796
- object: s,
797
- string: s,
798
- symbol: s,
799
- any: s,
800
- arrayOf: i,
801
- element: s,
802
- elementType: s,
803
- instanceOf: i,
804
- node: s,
805
- objectOf: i,
806
- oneOf: i,
807
- oneOfType: i,
808
- shape: i,
809
- exact: i,
810
- checkPropTypes: n,
811
- resetWarningCache: t
812
- };
813
- return l.PropTypes = l, l;
814
- }, ve;
815
- }
816
- var ko = ce.exports;
817
- if (process.env.NODE_ENV !== "production") {
818
- var Jn = ot, Vn = !0;
819
- ce.exports = Yn()(Jn.isElement, Vn);
820
- } else
821
- ce.exports = Kn()();
822
- var Qn = ce.exports;
823
- const A = /* @__PURE__ */ kn(Qn);
824
- let lt, ct;
825
- typeof document < "u" && (lt = document);
826
- typeof window < "u" && (ct = window);
827
- const dt = K.createContext({ document: lt, window: ct }), ue = () => K.useContext(dt), { Provider: Zn, Consumer: jo } = dt;
828
- class ut extends Ye {
829
- componentDidMount() {
830
- this.props.contentDidMount();
831
- }
832
- componentDidUpdate() {
833
- this.props.contentDidUpdate();
834
- }
835
- render() {
836
- return Tt.only(this.props.children);
837
- }
838
- }
839
- Y(ut, "propTypes", {
840
- children: A.element.isRequired,
841
- contentDidMount: A.func.isRequired,
842
- contentDidUpdate: A.func.isRequired
843
- });
844
- class be extends Ye {
845
- constructor(n, s) {
846
- super(n, s);
847
- Y(this, "setRef", (n) => {
848
- this.nodeRef.current = n;
849
- const { forwardedRef: s } = this.props;
850
- typeof s == "function" ? s(n) : s && (s.current = n);
851
- });
852
- Y(this, "handleLoad", () => {
853
- clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
854
- });
855
- // In certain situations on a cold cache DOMContentLoaded never gets called
856
- // fallback to an interval to check if that's the case
857
- Y(this, "loadCheck", () => setInterval(() => {
858
- this.handleLoad();
859
- }, 500));
860
- this._isMounted = !1, this.nodeRef = K.createRef(), this.state = { iframeLoaded: !1 };
861
- }
862
- componentDidMount() {
863
- this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
864
- }
865
- componentWillUnmount() {
866
- this._isMounted = !1, this.nodeRef.current.removeEventListener("DOMContentLoaded", this.handleLoad);
867
- }
868
- getDoc() {
869
- return this.nodeRef.current ? this.nodeRef.current.contentDocument : null;
870
- }
871
- getMountTarget() {
872
- const n = this.getDoc();
873
- return this.props.mountTarget ? n.querySelector(this.props.mountTarget) : n.body.children[0];
874
- }
875
- renderFrameContents() {
876
- if (!this._isMounted)
877
- return null;
878
- const n = this.getDoc();
879
- if (!n)
880
- return null;
881
- const s = this.props.contentDidMount, i = this.props.contentDidUpdate, l = n.defaultView || n.parentView, d = /* @__PURE__ */ r.jsx(ut, { contentDidMount: s, contentDidUpdate: i, children: /* @__PURE__ */ r.jsx(Zn, { value: { document: n, window: l }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), o = this.getMountTarget();
882
- return [Pe.createPortal(this.props.head, this.getDoc().head), Pe.createPortal(d, o)];
883
- }
884
- render() {
885
- const n = {
886
- ...this.props,
887
- srcDoc: this.props.initialContent,
888
- children: void 0
889
- // The iframe isn't ready so we drop children from props here. #12, #17
890
- };
891
- return delete n.head, delete n.initialContent, delete n.mountTarget, delete n.contentDidMount, delete n.contentDidUpdate, delete n.forwardedRef, /* @__PURE__ */ r.jsx("iframe", { ...n, ref: this.setRef, onLoad: this.handleLoad, children: this.state.iframeLoaded && this.renderFrameContents() });
892
- }
893
- }
894
- // React warns when you render directly into the body since browser extensions
895
- // also inject into the body and can mess up React. For this reason
896
- // initialContent is expected to have a div inside of the body
897
- // element that we render react into.
898
- Y(be, "propTypes", {
899
- style: A.object,
900
- // eslint-disable-line
901
- head: A.node,
902
- initialContent: A.string,
903
- mountTarget: A.string,
904
- contentDidMount: A.func,
905
- contentDidUpdate: A.func,
906
- children: A.oneOfType([A.element, A.arrayOf(A.element)])
907
- }), Y(be, "defaultProps", {
908
- style: {},
909
- head: null,
910
- children: void 0,
911
- mountTarget: void 0,
912
- contentDidMount: () => {
913
- },
914
- contentDidUpdate: () => {
915
- },
916
- initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
917
- });
918
- const Gn = K.forwardRef((e, t) => /* @__PURE__ */ r.jsx(be, { ...e, forwardedRef: t }));
919
- let U = null, oe = [], ne = null, pt = null;
920
- function Xn(e) {
921
- const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10), s = parseInt(t.paddingTop, 10), i = parseInt(t.paddingRight, 10), l = parseInt(t.paddingBottom, 10);
922
- return { paddingLeft: n, paddingTop: s, paddingRight: i, paddingBottom: l };
923
- }
924
- const ze = (e, t, n) => {
925
- if (!U)
926
- return;
927
- const s = e.getBoundingClientRect(), i = U == null ? void 0 : U.getElementById("placeholder"), { paddingLeft: l, paddingTop: d, paddingRight: o, paddingBottom: c } = Xn(e);
928
- i.style.width = t === "vertical" ? s.width - l - o + "px" : "2px", i.style.height = t === "vertical" ? "2px" : s.height - d - c + "px", i.style.display = "block";
929
- const p = oe.reduce(
930
- (f, h) => Math.abs(h - n) < Math.abs(f - n) ? h : f
931
- );
932
- pt = oe.indexOf(p), t === "vertical" ? (i.style.top = e.offsetTop + p + "px", i.style.left = e.offsetLeft + l + "px") : (i.style.top = e.offsetTop + d + "px", i.style.left = e.offsetLeft + p + "px");
933
- }, er = (e) => {
934
- const t = ft(e), n = window.getComputedStyle(e), s = t === "horizontal", i = parseInt(n.paddingLeft), l = parseInt(n.paddingTop);
935
- let d = s ? i : l;
936
- oe = [d], Array.from(e.children).forEach((o) => {
937
- const c = window.getComputedStyle(o), p = parseInt(
938
- s ? c.marginLeft + c.marginRight : c.marginTop + c.marginBottom
939
- ), f = s ? o.offsetWidth : o.offsetHeight;
940
- oe.push(d + f + p), d += f + p;
941
- });
942
- };
943
- function ft(e) {
944
- const t = window.getComputedStyle(e).display, n = window.getComputedStyle(e).flexDirection;
945
- if (t === "flex")
946
- return n === "column" || n === "column-reverse" ? "vertical" : "horizontal";
947
- if (t === "grid") {
948
- const s = window.getComputedStyle(e).gridTemplateRows, i = window.getComputedStyle(e).gridTemplateColumns;
949
- if (s.includes("auto"))
950
- return "vertical";
951
- if (i.includes("auto"))
952
- return "horizontal";
953
- }
954
- return t === "block" ? "vertical" : "horizontal";
955
- }
956
- const tr = Je((e) => {
957
- const t = e.target, n = ft(t);
958
- if (n === "vertical") {
959
- const s = e.clientY - t.offsetTop;
960
- ze(t, n, s);
961
- } else {
962
- const s = e.clientX - t.offsetLeft;
963
- ze(t, n, s);
964
- }
965
- }, 200), nr = (e) => {
966
- e.preventDefault(), e.stopPropagation(), tr(e);
967
- };
968
- function xe() {
969
- const e = U == null ? void 0 : U.getElementById("placeholder");
970
- e.style.display = "none";
971
- }
972
- const rr = () => {
973
- const { document: e } = ue(), [t, n] = M(pn), s = In(), i = st("dnd"), [, l] = G(), [, d] = W();
974
- return U = e, {
975
- isDragging: t,
976
- "data-dnd": "branch",
977
- onDragOver: i ? nr : te,
978
- onDrop: i ? (o) => {
979
- ne == null || ne.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
980
- const c = JSON.parse(o.dataTransfer.getData("text/plain"));
981
- let p = o.target.getAttribute("data-block-id");
982
- p === null && (p = o.target.parentElement.getAttribute("data-block-id")), s({ block: c, dropTargetId: p || null, relativeIndex: pt }), n(!1), xe(), setTimeout(() => {
983
- xe();
984
- }, 300);
985
- } : te,
986
- onDragEnter: i ? (o) => {
987
- const c = o;
988
- ne = c.target, c.stopPropagation(), c.preventDefault(), oe = [];
989
- const p = c.target;
990
- er(p), p.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), n(!0), l(""), d([]);
991
- } : te,
992
- onDragLeave: i ? (o) => {
993
- const c = o;
994
- ne = null, c.stopPropagation(), c.preventDefault(), c.target.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
995
- } : te,
996
- onMouseOut: i ? () => {
997
- n(!1), xe();
998
- } : te
999
- };
1000
- };
1001
- function Se(e) {
1002
- return e.getAttribute("data-block-id") ? e : e.closest("[data-block-id]");
1003
- }
1004
- function or(e) {
1005
- e.container.innerHTML = "", e.container.parentNode.removeChild(e.container);
1006
- var t = document.querySelector(".ql-toolbar");
1007
- t && t.parentNode.removeChild(t), e = null;
1008
- }
1009
- const sr = () => {
1010
- const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = fn(), [, n] = G(), [s, i] = M(X);
1011
- return (l) => {
1012
- var h;
1013
- if (s)
1014
- return;
1015
- const d = Se(l.target), o = d.getAttribute("data-block-type");
1016
- if (!o || !e.includes(o))
1017
- return;
1018
- const c = d.cloneNode(!0);
1019
- d.style.display = "none", Array.from(c.attributes).forEach((v) => {
1020
- v.name !== "class" && c.removeAttribute(v.name);
1021
- }), o === "Text" && (c.style.display = "inline-block"), d.parentNode.insertBefore(c, d.nextSibling);
1022
- const p = new En(c, { placeholder: "Type here..." });
1023
- function f() {
1024
- const v = p.getText(0, p.getLength());
1025
- t([d.getAttribute("data-block-id")], { content: v }), d.removeAttribute("style"), c.removeEventListener("blur", f, !0), or(p), i(""), n("");
1026
- }
1027
- c.addEventListener("blur", f, !0), p.focus(), (h = c.querySelector(".ql-clipboard")) == null || h.remove(), i(d.getAttribute("data-block-id"));
1028
- };
1029
- }, ir = () => {
1030
- const [, e] = J(), [, t] = W(), [n] = M(X);
1031
- return (s) => {
1032
- if (n)
1033
- return;
1034
- s.stopPropagation();
1035
- const i = Se(s.target);
1036
- if (i != null && i.getAttribute("data-block-parent")) {
1037
- const l = i.getAttribute("data-style-prop"), d = i.getAttribute("data-style-id"), o = i.getAttribute("data-block-parent");
1038
- e([{ id: d, prop: l, blockId: o }]), t([o]);
1039
- } else
1040
- i != null && i.getAttribute("data-block-id") && t([i.getAttribute("data-block-id")]);
1041
- };
1042
- }, ar = Je((e, t) => {
1043
- const n = Se(e.target);
1044
- n != null && n.getAttribute("data-style-id") && t(n.getAttribute("data-style-id"));
1045
- }, 100), lr = () => {
1046
- const [, e] = G(), [t] = M(X);
1047
- return (n) => {
1048
- t || ar(n, e);
1049
- };
1050
- }, cr = ({ children: e }) => {
1051
- const { document: t } = ue(), [n] = W(), [s, i] = J();
1052
- R(() => {
1053
- setTimeout(() => {
1054
- if (!z(s))
1055
- return;
1056
- const p = ht(t, ae(n));
1057
- if (p) {
1058
- const f = p.getAttribute("data-style-prop");
1059
- if (f) {
1060
- const h = p.getAttribute("data-style-id"), v = p.getAttribute("data-block-parent");
1061
- i([{ id: h, prop: f, blockId: v }]);
1062
- }
1063
- }
1064
- }, 100);
1065
- }, [t, n, i, s]);
1066
- const l = sr(), d = ir(), o = lr(), c = rr();
1067
- return /* @__PURE__ */ r.jsx(
1068
- "div",
1069
- {
1070
- "data-block-id": "container",
1071
- id: "canvas",
1072
- onClick: d,
1073
- onDoubleClick: l,
1074
- onMouseMove: o,
1075
- ...It(c, "isDragging"),
1076
- className: "relative mb-5 h-full max-w-full " + (c.isDragging ? "dragging" : ""),
1077
- children: e
1078
- }
1079
- );
1080
- }, ht = (e, t) => e.querySelector(`[data-block-id="${t}"]`), dr = () => {
1081
- const { window: e } = ue(), [t, n] = W(), [s] = Ee(), [, i] = J(), { undo: l, redo: d } = Qe(), o = Xe(), [, c] = et(), p = tt(), { savePage: f } = hn(), [h] = M(X), [, v] = M(gn), S = (m) => {
1082
- m.key === "Enter" && (m.preventDefault(), t.length === 1 && v(ae(t)));
1083
- }, O = (m) => {
1084
- const g = s.find((I) => I._id === m);
1085
- return g ? g._parent : null;
1086
- };
1087
- return R(() => {
1088
- const m = (g) => {
1089
- if (g.key === "Escape") {
1090
- n([]), i([]);
1091
- return;
1092
- }
1093
- if (S(g), !h && (g.key === "Delete" || g.key === "Backspace") && (g.preventDefault(), p(t)), g.ctrlKey || g.metaKey) {
1094
- if (g.key === "ArrowUp") {
1095
- g.preventDefault();
1096
- const I = t.length > 0 ? O(t[0]) : null;
1097
- I && n([I]);
1098
- }
1099
- if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(g.key)) {
1100
- if (h && ["x", "z", "v"].includes(g.key))
1101
- return !0;
1102
- g.preventDefault();
1103
- }
1104
- g.key === "s" && (g.stopPropagation(), g.preventDefault(), f()), g.key === "z" && l(), g.key === "y" && d(), g.key === "d" && o(t);
1105
- }
1106
- };
1107
- return e.removeEventListener("keydown", m), e.addEventListener("keydown", m), () => {
1108
- e.removeEventListener("keydown", m);
1109
- };
1110
- }, [t, n, l, p, c, d, o, h, f, e]), null;
1111
- }, ur = ({ block: e, label: t }) => {
1112
- const [, n] = W(), [, s] = G(), [, i] = M(nt), l = st("dnd");
1113
- return /* @__PURE__ */ r.jsxs(
1114
- "div",
1115
- {
1116
- className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
1117
- draggable: l ? "true" : "false",
1118
- onDragStart: (d) => {
1119
- d.dataTransfer.setData("text/plain", JSON.stringify(St(e, ["_id", "_type"]))), i(e._id), setTimeout(() => {
1120
- n([]), s(null);
1121
- }, 200);
1122
- },
1123
- children: [
1124
- /* @__PURE__ */ r.jsx(Ft, {}),
1125
- t
1126
- ]
1127
- }
1128
- );
1129
- }, pr = ({ selectedBlockElement: e, block: t }) => {
1130
- const n = tt(), s = Xe(), [, i] = W(), [, l] = J(), [d] = M(X), { floatingStyles: o, refs: c, update: p } = Dn({
1131
- placement: "top-start",
1132
- middleware: [_n(), Sn()],
1133
- elements: {
1134
- reference: e
1135
- }
1136
- });
1137
- Bn(e, () => p(), e !== null);
1138
- const f = D(t, "_parent", null), h = z(D(t, "_name", "")) ? D(t, "_type", "") : D(t, "_name", "");
1139
- return !e || !t || d ? null : /* @__PURE__ */ r.jsxs(
1140
- "div",
1141
- {
1142
- role: "button",
1143
- tabIndex: 0,
1144
- ref: c.setFloating,
1145
- style: o,
1146
- onClick: (v) => {
1147
- v.stopPropagation(), v.preventDefault();
1148
- },
1149
- onKeyDown: (v) => v.stopPropagation(),
1150
- className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
1151
- children: [
1152
- /* @__PURE__ */ r.jsx(ur, { label: h, block: t }),
1153
- /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1", children: [
1154
- f && /* @__PURE__ */ r.jsx(
1155
- $t,
1156
- {
1157
- className: "hover:scale-105",
1158
- onClick: () => {
1159
- l([]), i([f]);
1160
- }
1161
- }
1162
- ),
1163
- mn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Wt, { className: "hover:scale-105", onClick: () => s([t == null ? void 0 : t._id]) }) : null,
1164
- yn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(qt, { className: "hover:scale-105", onClick: () => n([t == null ? void 0 : t._id]) }) : null
1165
- ] })
1166
- ]
1167
- }
1168
- );
1169
- }, fr = ({ model: e }) => {
1170
- const [t] = vn(), [n] = W(), [s] = Ze(), [i] = G(), [l] = J(), [d] = M(nt), { document: o, window: c } = ue(), [p] = $(o == null ? void 0 : o.getElementById("highlighted-block")), [f] = $(
1171
- o == null ? void 0 : o.getElementById("selected-block")
1172
- ), [h] = $(
1173
- o == null ? void 0 : o.getElementById("selected-styling-block")
1174
- ), [v] = $(o == null ? void 0 : o.getElementById("dragged-block"));
1175
- R(() => {
1176
- s ? o == null || o.documentElement.classList.add("dark") : o == null || o.documentElement.classList.remove("dark");
1177
- }, [s, o]);
1178
- const S = D(t, "headingFont", "DM Sans"), O = D(t, "bodyFont", "DM Sans");
1179
- return R(() => {
1180
- const m = D(t, "primaryColor", "#000"), g = D(t, "secondaryColor", "#FFF"), I = On({
1181
- colors: [m, g],
1182
- names: ["primary", "secondary"]
1183
- });
1184
- I.primary.DEFAULT = m, I.secondary.DEFAULT = g;
1185
- const q = D(t, "roundedCorners", "0");
1186
- !c || !c.tailwind || (c.tailwind.config = {
1187
- darkMode: "class",
1188
- theme: {
1189
- fontFamily: {
1190
- heading: [S],
1191
- body: [O]
1192
- },
1193
- extend: {
1194
- borderRadius: {
1195
- global: `${q || "0"}px`
1196
- },
1197
- colors: I
1198
- }
1199
- },
1200
- plugins: [
1201
- // @ts-ignore
1202
- c.tailwind.plugin.withOptions(({ prefix: V = "ui" } = {}) => ({ addVariant: Q }) => {
1203
- for (const L of ["open", "checked", "selected", "active", "disabled"])
1204
- Q(`${V}-${L}`, [
1205
- `&[data-headlessui-state~="${L}"]`,
1206
- `:where([data-headlessui-state~="${L}"]) &`
1207
- ]), Q(`${V}-not-${L}`, [
1208
- `&[data-headlessui-state]:not([data-headlessui-state~="${L}"])`,
1209
- `:where([data-headlessui-state]:not([data-headlessui-state~="${L}"])) &:not([data-headlessui-state])`
1210
- ]);
1211
- })
1212
- ]
1213
- });
1214
- }, [t, c, S, O]), R(() => {
1215
- f && (f.textContent = `${re(n, (m) => `[data-block-id="${m}"]`).join(",")}{
1216
- outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1217
- }`);
1218
- }, [n, f]), R(() => {
1219
- if (!d) {
1220
- v.textContent = "";
1221
- return;
1222
- }
1223
- v.textContent = `[data-block-id="${d}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
1224
- }, [d]), R(() => {
1225
- p && (p.textContent = i ? `[data-style-id="${i}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
1226
- }, [i, n, p]), R(() => {
1227
- h && (h.textContent = `${re(l, ({ id: m }) => `[data-style-id="${m}"]`).join(",")}{
1228
- outline: 1px solid #42a1fc !important; outline-offset: -1px;
1229
- }`);
1230
- }, [l, h]), R(() => {
1231
- const m = D(t, "bodyTextLightColor", "#64748b"), g = D(t, "bodyTextDarkColor", "#94a3b8"), I = D(t, "bodyBgLightColor", "#FFFFFF"), q = D(t, "bodyBgDarkColor", "#0f172a");
1232
- o.body.className = `font-body antialiased text-[${m}] bg-[${I}] dark:text-[${g}] dark:bg-[${q}]`;
1233
- }, [t, o, e]), e === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1234
- S && /* @__PURE__ */ r.jsx(
1235
- "link",
1236
- {
1237
- id: "heading-font",
1238
- rel: "stylesheet",
1239
- type: "text/css",
1240
- href: `https://fonts.googleapis.com/css2?family=${S.replace(
1241
- / /g,
1242
- "+"
1243
- )}:wght@300;400;500;600;700;800;900&display=swap`,
1244
- media: "all"
1245
- }
1246
- ),
1247
- O && S !== O && /* @__PURE__ */ r.jsx(
1248
- "link",
1249
- {
1250
- id: "body-font",
1251
- rel: "stylesheet",
1252
- type: "text/css",
1253
- href: `https://fonts.googleapis.com/css2?family=${O.replace(
1254
- / /g,
1255
- "+"
1256
- )}:wght@300;400;500;600;700;800;900&display=swap`,
1257
- media: "all"
1258
- }
1259
- ),
1260
- S && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${S}",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";}` })
1261
- ] }) : null;
1262
- }, hr = (e) => {
1263
- const t = {};
1264
- return Object.keys(e).forEach((n) => {
1265
- je(e[n]) && e[n].startsWith(Me) && (t[n] = e[n].replace(Me, "").split(","));
1266
- }), t;
1267
- }, gr = Dt((e) => {
1268
- const t = e.replace(it, "").split(",");
1269
- return Rn(t[0], t[1]);
1270
- });
1271
- function mr(e, t) {
1272
- return D(e, `${t}_attrs`, {});
1273
- }
1274
- function yr(e) {
1275
- const t = {};
1276
- return Object.keys(e).forEach((n) => {
1277
- if (je(e[n]) && e[n].startsWith(it)) {
1278
- const s = gr(e[n]);
1279
- t[n] = {
1280
- className: s,
1281
- "data-style-prop": n,
1282
- "data-block-parent": e._id,
1283
- "data-style-id": `${n}-${e._id}`,
1284
- ...mr(e, n)
1285
- };
1286
- }
1287
- }), t;
1288
- }
1289
- function vr(e, t) {
1290
- const n = D(e, "_bindings", {});
1291
- return z(n) ? { ...e } : (_t(n, (s, i) => {
1292
- je(s) && D(t, s, null) && (e[i] = D(t, s, null));
1293
- }), e);
1294
- }
1295
- function we({ blocks: e }) {
1296
- const [t] = Ee(), n = ke((l) => yr(l), []), [s] = jn(), [i] = M(X);
1297
- return /* @__PURE__ */ r.jsx(r.Fragment, { children: K.Children.toArray(
1298
- e.map((l, d) => {
1299
- if (i === l._id)
1300
- return null;
1301
- const o = hr(l), c = {};
1302
- z(o) || Object.keys(o).forEach((v) => {
1303
- c[v] = K.Children.toArray(
1304
- o[v].map((S) => /* @__PURE__ */ r.jsx(we, { blocks: [Bt(t, { _id: S })] }))
1305
- );
1306
- });
1307
- const p = Ve(t, { _parent: l._id });
1308
- c.children = p.length ? /* @__PURE__ */ r.jsx(we, { blocks: p }) : null;
1309
- const f = Pn(l._type), h = D(f, "builderComponent", D(f, "component", null));
1310
- return Ot(h) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${l == null ? void 0 : l._type} not registered -->` }) : /* @__PURE__ */ r.jsx(Ke, { children: K.createElement(h, {
1311
- blockProps: {
1312
- "data-block-id": l._id,
1313
- "data-block-type": l._type,
1314
- "data-dnd": At(f, "canAcceptBlock") ? "branch" : "leaf"
1315
- },
1316
- inBuilder: !0,
1317
- index: d,
1318
- ...vr(l, s),
1319
- ...n(l),
1320
- ...c
1321
- }) });
1322
- })
1323
- ) });
1324
- }
1325
- const xr = () => {
1326
- const [e] = Ee(), t = z(e) ? null : /* @__PURE__ */ r.jsx(Tn, { children: /* @__PURE__ */ r.jsx(we, { blocks: Ve(e, (n) => z(n._parent)) }) });
1327
- return /* @__PURE__ */ r.jsx(An, { children: t });
1328
- }, br = (e, t) => e.querySelector(`[data-style-id="${t}"]`), wr = () => {
1329
- const [e] = M(xn), [t] = et(), [n] = Te(), [, s] = W(), i = bn(), [, l] = G(), d = Be(null), o = Be(null), [c, p] = $({ width: 0, height: 0 }), f = Hn(c), [h, v] = $(0), [S, O] = $([]), [, m] = $([]), [, g] = M(wn), [I, q] = J(), V = Ce("loading", !1);
1330
- R(() => {
1331
- const { clientWidth: _, clientHeight: N } = o.current;
1332
- p({ width: _, height: N }), h === 0 && v(_);
1333
- }, [o, n, h]);
1334
- const Q = (_, N = 0) => {
1335
- const { top: F } = _.getBoundingClientRect();
1336
- return F + N >= 0 && F - N <= window.innerHeight;
1337
- };
1338
- R(() => {
1339
- var _, N;
1340
- if (i && i.type !== "Multiple" && d.current) {
1341
- const F = ht(d.current.contentDocument, i._id);
1342
- F && (Q(F) || (N = (_ = d.current) == null ? void 0 : _.contentWindow) == null || N.scrollTo({ top: F.offsetTop, behavior: "smooth" }), O([F]));
1343
- }
1344
- }, [i]), R(() => {
1345
- if (!z(I) && d.current) {
1346
- const _ = br(
1347
- d.current.contentDocument,
1348
- ae(I).id
1349
- );
1350
- m(_ ? [_] : [null]);
1351
- } else
1352
- m([null]);
1353
- }, [I]);
1354
- const L = Ct(() => {
1355
- let _ = qn;
1356
- return e === "offline" && (_ = _.replace(
1357
- "https://old.chaibuilder.com/offline/tailwind.cdn.js",
1358
- "/offline/tailwind.cdn.js"
1359
- ), _ = _.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), _ = _.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), _;
1360
- }, [e]);
1361
- return /* @__PURE__ */ r.jsx(
1362
- "div",
1363
- {
1364
- onClick: () => {
1365
- s([]), q([]);
1366
- },
1367
- onMouseLeave: () => setTimeout(() => l(""), 300),
1368
- className: "relative mx-auto h-full w-full overflow-hidden",
1369
- style: h > 0 && !z(f) ? { width: t ? "100%" : h } : {},
1370
- ref: o,
1371
- children: /* @__PURE__ */ r.jsxs(
1372
- Gn,
1373
- {
1374
- contentDidMount: () => g(d.current),
1375
- ref: d,
1376
- id: "canvas-iframe",
1377
- style: { width: `${n}px`, ...f },
1378
- className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
1379
- initialContent: L,
1380
- children: [
1381
- /* @__PURE__ */ r.jsx(dr, {}),
1382
- /* @__PURE__ */ r.jsx(
1383
- pr,
1384
- {
1385
- block: i,
1386
- selectedBlockElement: ae(S)
1387
- }
1388
- ),
1389
- /* @__PURE__ */ r.jsx(fr, { model: "page" }),
1390
- /* @__PURE__ */ r.jsx(cr, { children: V ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(xr, {}) }),
1391
- /* @__PURE__ */ r.jsx("br", {}),
1392
- /* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute z-[99999] max-w-full bg-green-500 transition-transform" })
1393
- ]
1394
- }
1395
- )
1396
- }
1397
- );
1398
- }, To = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1399
- /* @__PURE__ */ r.jsx(Wn, {}),
1400
- /* @__PURE__ */ r.jsx("div", { className: "relative h-full 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: /* @__PURE__ */ r.jsx(Ke, { fallback: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Cn, { children: /* @__PURE__ */ r.jsx(wr, {}) }) }) })
1401
- ] });
1402
- export {
1403
- To as default
1404
- };