@chaibuilder/sdk 1.0.23 → 1.1.0

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