@chaibuilder/sdk 1.2.43 → 1.2.44

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