monto-email-builder 1.2.4 → 1.2.5

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.
package/dist/index.js CHANGED
@@ -1,54 +1,93 @@
1
- var Al = Object.defineProperty;
2
- var Tl = (e, t, n) => t in e ? Al(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var gn = (e, t, n) => Tl(e, typeof t != "symbol" ? t + "" : t, n);
1
+ var Tl = Object.defineProperty;
2
+ var _l = (e, t, n) => t in e ? Tl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var gn = (e, t, n) => _l(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { jsx as o, jsxs as w, Fragment as an } from "react/jsx-runtime";
5
- import mt, { createContext as ho, useContext as hr, useState as z, useEffect as Ce, useRef as Me, useMemo as ct, useCallback as en, Fragment as _l, useLayoutEffect as Qn, memo as Bl, forwardRef as Ol, useImperativeHandle as Ml } from "react";
6
- import { Box as se, Typography as ke, Stack as Z, Button as Oe, InputLabel as At, Menu as br, ButtonBase as Fn, ToggleButtonGroup as bo, TextField as dt, ToggleButton as le, MenuItem as on, Slider as Nl, Dialog as Cr, DialogTitle as yr, DialogContent as xr, DialogActions as Sr, CircularProgress as jn, FormControlLabel as vr, Switch as Rl, IconButton as $e, Divider as rn, Popover as ao, Select as wr, Checkbox as Pl, Accordion as Fl, AccordionSummary as zl, AccordionDetails as Ll, Paper as Co, Drawer as Ir, Tabs as kr, Tab as Zt, Link as Wl, Fade as Hl, Tooltip as Ze, Alert as Vl, useTheme as Dr, ThemeProvider as Ul, CssBaseline as $l } from "@mui/material";
7
- import { renderToStaticMarkup as yo, Reader as jl } from "monto-email-core";
8
- import { create as Kl } from "zustand";
9
- import { g as Er, s as Ar, t as ql } from "./chunks/chunk-_7XTjFEi.js";
5
+ import mt, { createContext as ho, useContext as hr, useState as z, useEffect as Ce, useRef as Oe, useMemo as ct, useCallback as en, Fragment as Bl, useLayoutEffect as Qn, memo as Ml, forwardRef as Ol, useImperativeHandle as Nl } from "react";
6
+ import { Box as se, Typography as ke, Stack as Z, Button as Me, InputLabel as At, Menu as br, ButtonBase as zn, ToggleButtonGroup as bo, TextField as dt, ToggleButton as le, MenuItem as on, Slider as Rl, Dialog as Cr, DialogTitle as yr, DialogContent as xr, DialogActions as Sr, CircularProgress as Kn, FormControlLabel as vr, Switch as Pl, IconButton as $e, Divider as rn, Popover as ao, Select as wr, Checkbox as Fl, Accordion as zl, AccordionSummary as Ll, AccordionDetails as Wl, Paper as Co, Drawer as Ir, Tabs as kr, Tab as Zt, Link as Hl, Fade as Vl, Tooltip as Ze, Alert as Ul, useTheme as Dr, ThemeProvider as $l, CssBaseline as jl } from "@mui/material";
7
+ import { renderToStaticMarkup as yo, Reader as Kl } from "monto-email-core";
8
+ import { create as ql } from "zustand";
9
+ import { g as Er, s as Ar, t as Yl } from "./chunks/chunk-_7XTjFEi.js";
10
10
  import { E as sn } from "./chunks/chunk-Cc3ecmGS.js";
11
- import { getFontFamily as Tr, styleToCss as _r, getResolvedTextBodyHtml as Ht, TextPropsSchema as Br, Text as Yl } from "monto-email-block-text";
12
- import { createTheme as Or, alpha as eo, lighten as jt, darken as Ho } from "@mui/material/styles";
13
- import { ButtonPropsDefaults as Kt, ButtonPropsSchema as Mr, Button as Xl } from "monto-email-block-button";
14
- import { CloseOutlined as Nr, AddOutlined as xo, TextFieldsOutlined as Gl, TitleOutlined as Jl, AlignVerticalTopOutlined as Zl, AlignVerticalBottomOutlined as Ql, AlignHorizontalLeftOutlined as ei, AlignHorizontalRightOutlined as ti, FormatAlignLeftOutlined as ni, FormatAlignCenterOutlined as oi, FormatAlignRightOutlined as ri, RoundedCornerOutlined as li, SpaceBarOutlined as ii, VerticalAlignTopOutlined as So, VerticalAlignCenterOutlined as vo, VerticalAlignBottomOutlined as wo, UnfoldMoreOutlined as ai, HeightOutlined as Rr, AspectRatioOutlined as Pr, LinkOutlined as Kn, CloudUploadOutlined as Ft, DataObjectOutlined as si, DragIndicator as Fr, DeleteOutline as ci, Add as ui, HMobiledataOutlined as di, NotesOutlined as pi, SmartButtonOutlined as fi, ImageOutlined as mi, VideocamOutlined as gi, HorizontalRuleOutlined as hi, Crop32Outlined as bi, ShareOutlined as Ci, HtmlOutlined as yi, ViewColumnOutlined as xi, LibraryAddOutlined as Si, ArrowRightOutlined as vi, Check as zr, ArrowUpwardOutlined as wi, ArrowDownwardOutlined as Ii, ContentCopyOutlined as ki, DeleteOutlined as Di } from "@mui/icons-material";
15
- import { HexColorPicker as Ei, HexColorInput as Ai } from "react-colorful";
16
- import Ti from "@mui/icons-material/FormatBoldOutlined";
17
- import _i from "@mui/icons-material/FormatItalicOutlined";
18
- import Bi from "@mui/icons-material/FormatUnderlinedOutlined";
19
- import Oi from "@mui/icons-material/StrikethroughSOutlined";
11
+ import { getFontFamily as Tr, styleToCss as _r, getResolvedTextBodyHtml as Ht, TextPropsSchema as Br, Text as Xl } from "monto-email-block-text";
12
+ import { createTheme as Mr, alpha as eo, lighten as jt, darken as Ho } from "@mui/material/styles";
13
+ import { ButtonPropsDefaults as Kt, ButtonPropsSchema as Or, Button as Gl } from "monto-email-block-button";
14
+ import xo from "@mui/icons-material/AddOutlined";
15
+ import Nr from "@mui/icons-material/CloseOutlined";
16
+ import { HexColorPicker as Jl, HexColorInput as Zl } from "react-colorful";
17
+ import Ql from "@mui/icons-material/FormatBoldOutlined";
18
+ import ei from "@mui/icons-material/FormatItalicOutlined";
19
+ import ti from "@mui/icons-material/FormatUnderlinedOutlined";
20
+ import ni from "@mui/icons-material/StrikethroughSOutlined";
21
+ import oi from "@mui/icons-material/RoundedCornerOutlined";
22
+ import ri from "@mui/icons-material/TextFieldsOutlined";
23
+ import li from "@mui/icons-material/TitleOutlined";
24
+ import ii from "@mui/icons-material/AlignHorizontalLeftOutlined";
25
+ import ai from "@mui/icons-material/AlignHorizontalRightOutlined";
26
+ import si from "@mui/icons-material/AlignVerticalBottomOutlined";
27
+ import ci from "@mui/icons-material/AlignVerticalTopOutlined";
28
+ import ui from "@mui/icons-material/FormatAlignCenterOutlined";
29
+ import di from "@mui/icons-material/FormatAlignLeftOutlined";
30
+ import pi from "@mui/icons-material/FormatAlignRightOutlined";
31
+ import fi from "@mui/icons-material/SpaceBarOutlined";
32
+ import mi from "@mui/icons-material/UnfoldMoreOutlined";
33
+ import So from "@mui/icons-material/VerticalAlignBottomOutlined";
34
+ import vo from "@mui/icons-material/VerticalAlignCenterOutlined";
35
+ import wo from "@mui/icons-material/VerticalAlignTopOutlined";
20
36
  import { z as J } from "zod";
21
- import { ColumnsContainerPropsSchema as Lr, ColumnsContainer as Mi } from "monto-email-block-columns-container";
22
- import { ContainerPropsSchema as Ni, Container as Ri } from "monto-email-block-container";
23
- import { DividerPropsDefaults as Vo, DividerPropsSchema as Wr, Divider as Pi } from "monto-email-block-divider";
24
- import { HeadingPropsDefaults as Fi, HeadingPropsSchema as Hr, Heading as zi } from "monto-email-block-heading";
25
- import { HtmlPropsSchema as Vr, Html as Li } from "monto-email-block-html";
26
- import Wi from "@uiw/react-codemirror";
27
- import { html as Hi } from "@codemirror/lang-html";
28
- import { dracula as Vi } from "@uiw/codemirror-themes-all";
29
- import { ImagePropsSchema as Ur, Image as Ui } from "monto-email-block-image";
30
- import { SpacerPropsDefaults as $i, SpacerPropsSchema as $r, Spacer as ji } from "monto-email-block-spacer";
31
- import Ki from "@mui/icons-material/ExpandMoreOutlined";
32
- import qi from "@mui/icons-material/LinkOutlined";
33
- import Yi from "@mui/material/ToggleButton";
34
- import Xi from "@mui/icons-material/MonitorOutlined";
35
- import Gi from "@mui/icons-material/PhoneIphoneOutlined";
36
- import { buildBlockConfigurationDictionary as Ji, buildBlockComponent as Zi, buildBlockConfigurationSchema as Qi } from "monto-email-document-core";
37
- import { Video as ea } from "monto-email-block-video";
38
- import { Socials as ta } from "monto-email-block-socials";
39
- import na from "@mui/icons-material/AppRegistrationOutlined";
40
- import oa from "@mui/icons-material/LastPageOutlined";
41
- import ra from "@mui/icons-material/FirstPageOutlined";
42
- import la from "@mui/icons-material/MenuOutlined";
43
- import ia from "@mui/icons-material/FileDownloadOutlined";
44
- import aa from "@mui/icons-material/FileUploadOutlined";
45
- import sa from "@mui/icons-material/CodeOutlined";
46
- import ca from "@mui/icons-material/DataObjectOutlined";
47
- import ua from "@mui/icons-material/EditOutlined";
48
- import da from "@mui/icons-material/PreviewOutlined";
49
- import pa from "@mui/icons-material/RedoOutlined";
50
- import fa from "@mui/icons-material/UndoOutlined";
51
- class jr {
37
+ import { ColumnsContainerPropsSchema as Rr, ColumnsContainer as gi } from "monto-email-block-columns-container";
38
+ import { ContainerPropsSchema as hi, Container as bi } from "monto-email-block-container";
39
+ import Pr from "@mui/icons-material/HeightOutlined";
40
+ import { DividerPropsDefaults as Vo, DividerPropsSchema as Fr, Divider as Ci } from "monto-email-block-divider";
41
+ import zr from "@mui/icons-material/AspectRatioOutlined";
42
+ import { HeadingPropsDefaults as yi, HeadingPropsSchema as Lr, Heading as xi } from "monto-email-block-heading";
43
+ import { HtmlPropsSchema as Wr, Html as Si } from "monto-email-block-html";
44
+ import vi from "@uiw/react-codemirror";
45
+ import { html as wi } from "@codemirror/lang-html";
46
+ import { dracula as Ii } from "@uiw/codemirror-themes-all";
47
+ import Ft from "@mui/icons-material/CloudUploadOutlined";
48
+ import An from "@mui/icons-material/LinkOutlined";
49
+ import { ImagePropsSchema as Hr, Image as ki } from "monto-email-block-image";
50
+ import { SpacerPropsDefaults as Di, SpacerPropsSchema as Vr, Spacer as Ei } from "monto-email-block-spacer";
51
+ import Ur from "@mui/icons-material/DataObjectOutlined";
52
+ import Ai from "@mui/icons-material/ExpandMoreOutlined";
53
+ import $r from "@mui/icons-material/DragIndicator";
54
+ import Ti from "@mui/icons-material/DeleteOutline";
55
+ import _i from "@mui/icons-material/Add";
56
+ import Bi from "@mui/material/ToggleButton";
57
+ import Mi from "@mui/icons-material/ArrowRightOutlined";
58
+ import Oi from "@mui/icons-material/Crop32Outlined";
59
+ import Ni from "@mui/icons-material/HMobiledataOutlined";
60
+ import Ri from "@mui/icons-material/HorizontalRuleOutlined";
61
+ import Pi from "@mui/icons-material/HtmlOutlined";
62
+ import Fi from "@mui/icons-material/ImageOutlined";
63
+ import zi from "@mui/icons-material/LibraryAddOutlined";
64
+ import Li from "@mui/icons-material/NotesOutlined";
65
+ import Wi from "@mui/icons-material/ShareOutlined";
66
+ import Hi from "@mui/icons-material/SmartButtonOutlined";
67
+ import Vi from "@mui/icons-material/ViewColumnOutlined";
68
+ import Ui from "@mui/icons-material/VideocamOutlined";
69
+ import $i from "@mui/icons-material/MonitorOutlined";
70
+ import ji from "@mui/icons-material/PhoneIphoneOutlined";
71
+ import { buildBlockConfigurationDictionary as Ki, buildBlockComponent as qi, buildBlockConfigurationSchema as Yi } from "monto-email-document-core";
72
+ import jr from "@mui/icons-material/Check";
73
+ import { Video as Xi } from "monto-email-block-video";
74
+ import { Socials as Gi } from "monto-email-block-socials";
75
+ import Ji from "@mui/icons-material/ArrowDownwardOutlined";
76
+ import Zi from "@mui/icons-material/ArrowUpwardOutlined";
77
+ import Qi from "@mui/icons-material/ContentCopyOutlined";
78
+ import ea from "@mui/icons-material/DeleteOutlined";
79
+ import ta from "@mui/icons-material/AppRegistrationOutlined";
80
+ import na from "@mui/icons-material/LastPageOutlined";
81
+ import oa from "@mui/icons-material/FirstPageOutlined";
82
+ import ra from "@mui/icons-material/MenuOutlined";
83
+ import la from "@mui/icons-material/FileDownloadOutlined";
84
+ import ia from "@mui/icons-material/FileUploadOutlined";
85
+ import aa from "@mui/icons-material/CodeOutlined";
86
+ import sa from "@mui/icons-material/EditOutlined";
87
+ import ca from "@mui/icons-material/PreviewOutlined";
88
+ import ua from "@mui/icons-material/RedoOutlined";
89
+ import da from "@mui/icons-material/UndoOutlined";
90
+ class Kr {
52
91
  // 最多支持回退5步
53
92
  constructor(t) {
54
93
  gn(this, "past", []);
@@ -120,11 +159,11 @@ class jr {
120
159
  return JSON.stringify(t) === JSON.stringify(n);
121
160
  }
122
161
  }
123
- let ma = 0, Hn = null, so = null, co = !0, uo = !0, He = null;
124
- function ga(e) {
125
- e != null && e.document && (Hn = e.document), e != null && e.language && (so = e.language), (e == null ? void 0 : e.showJsonFeatures) !== void 0 && (co = e.showJsonFeatures), (e == null ? void 0 : e.showSamplesDrawerTitle) !== void 0 && (uo = e.showSamplesDrawerTitle);
126
- const t = (e == null ? void 0 : e.document) ?? Hn ?? sn, n = (e == null ? void 0 : e.language) ?? so ?? Er(), r = (e == null ? void 0 : e.showJsonFeatures) ?? co, i = (e == null ? void 0 : e.showSamplesDrawerTitle) ?? uo, l = (e == null ? void 0 : e.contactAttributes) ?? [];
127
- He ? He.reset(t) : He = new jr(t), O.setState({
162
+ let pa = 0, Vn = null, so = null, co = !0, uo = !0, He = null;
163
+ function fa(e) {
164
+ e != null && e.document && (Vn = e.document), e != null && e.language && (so = e.language), (e == null ? void 0 : e.showJsonFeatures) !== void 0 && (co = e.showJsonFeatures), (e == null ? void 0 : e.showSamplesDrawerTitle) !== void 0 && (uo = e.showSamplesDrawerTitle);
165
+ const t = (e == null ? void 0 : e.document) ?? Vn ?? sn, n = (e == null ? void 0 : e.language) ?? so ?? Er(), r = (e == null ? void 0 : e.showJsonFeatures) ?? co, i = (e == null ? void 0 : e.showSamplesDrawerTitle) ?? uo, l = (e == null ? void 0 : e.contactAttributes) ?? [];
166
+ He ? He.reset(t) : He = new Kr(t), M.setState({
128
167
  document: t,
129
168
  language: n,
130
169
  showJsonFeatures: r,
@@ -141,11 +180,11 @@ function ga(e) {
141
180
  }), Ar(n);
142
181
  }
143
182
  if (!He) {
144
- const e = Hn || sn;
145
- He = new jr(e);
183
+ const e = Vn || sn;
184
+ He = new Kr(e);
146
185
  }
147
- const O = Kl((e, t) => ({
148
- document: Hn || sn,
186
+ const M = ql((e, t) => ({
187
+ document: Vn || sn,
149
188
  selectedBlockId: null,
150
189
  textSelection: null,
151
190
  textCaret: null,
@@ -169,39 +208,39 @@ const O = Kl((e, t) => ({
169
208
  onSamplesDrawerToggle: void 0,
170
209
  onInspectorDrawerToggle: void 0
171
210
  }));
172
- function ha(e) {
173
- return O.setState({ contactAttributes: Array.isArray(e) ? e : [] });
211
+ function ma(e) {
212
+ return M.setState({ contactAttributes: Array.isArray(e) ? e : [] });
174
213
  }
175
- function Kr() {
176
- return O((e) => e.contactAttributes);
214
+ function qr() {
215
+ return M((e) => e.contactAttributes);
177
216
  }
178
217
  function Qe() {
179
- return O((e) => e.document);
218
+ return M((e) => e.document);
180
219
  }
181
220
  function cn() {
182
- return O((e) => e.selectedBlockId);
221
+ return M((e) => e.selectedBlockId);
183
222
  }
184
- function ba() {
185
- return O((e) => e.selectedScreenSize);
223
+ function ga() {
224
+ return M((e) => e.selectedScreenSize);
186
225
  }
187
226
  function Io() {
188
- return O((e) => e.selectedMainTab);
227
+ return M((e) => e.selectedMainTab);
189
228
  }
190
229
  function po(e) {
191
- return O.setState({ selectedMainTab: e });
230
+ return M.setState({ selectedMainTab: e });
192
231
  }
193
- function Ca() {
194
- return O((e) => e.selectedSidebarTab);
232
+ function ha() {
233
+ return M((e) => e.selectedSidebarTab);
195
234
  }
196
235
  function ko() {
197
- return O((e) => e.inspectorDrawerOpen);
236
+ return M((e) => e.inspectorDrawerOpen);
198
237
  }
199
238
  function Do() {
200
- return O((e) => e.samplesDrawerOpen);
239
+ return M((e) => e.samplesDrawerOpen);
201
240
  }
202
241
  function nt(e) {
203
242
  const t = e === null ? "styles" : "block-configuration", n = {};
204
- return e !== null && (n.inspectorDrawerOpen = !0), O.setState({
243
+ return e !== null && (n.inspectorDrawerOpen = !0), M.setState({
205
244
  selectedBlockId: e,
206
245
  textSelection: null,
207
246
  textCaret: null,
@@ -212,43 +251,43 @@ function nt(e) {
212
251
  });
213
252
  }
214
253
  function yt(e) {
215
- return O.setState({ textSelection: e });
254
+ return M.setState({ textSelection: e });
216
255
  }
217
- function Bn(e) {
218
- return O.setState({ textCaret: e });
219
- }
220
- function qr() {
221
- return O((e) => e.textSelection);
256
+ function Mn(e) {
257
+ return M.setState({ textCaret: e });
222
258
  }
223
259
  function Yr() {
224
- return O((e) => e.textCaret);
260
+ return M((e) => e.textSelection);
261
+ }
262
+ function Xr() {
263
+ return M((e) => e.textCaret);
225
264
  }
226
265
  function Sn() {
227
- return O.setState({ lastInlineStyleApplyAt: Date.now() });
266
+ return M.setState({ lastInlineStyleApplyAt: Date.now() });
228
267
  }
229
268
  function hn(e) {
230
- return O.setState({ lastTextBlockContent: e });
269
+ return M.setState({ lastTextBlockContent: e });
231
270
  }
232
271
  function qt(e, t) {
233
- O.setState({
272
+ M.setState({
234
273
  textDomApplyRequest: {
235
274
  blockId: e,
236
- id: ++ma,
275
+ id: ++pa,
237
276
  ...t
238
277
  }
239
278
  });
240
279
  }
241
280
  function Yt() {
242
- return O.setState({ textDomApplyRequest: null });
281
+ return M.setState({ textDomApplyRequest: null });
243
282
  }
244
- function ya() {
245
- return O((e) => e.textDomApplyRequest);
283
+ function ba() {
284
+ return M((e) => e.textDomApplyRequest);
246
285
  }
247
- function xa() {
248
- return O((e) => e.lastTextBlockContent);
286
+ function Ca() {
287
+ return M((e) => e.lastTextBlockContent);
249
288
  }
250
- function Sa(e) {
251
- return O.setState({ selectedSidebarTab: e });
289
+ function ya(e) {
290
+ return M.setState({ selectedSidebarTab: e });
252
291
  }
253
292
  function wn(e, t) {
254
293
  let n;
@@ -260,7 +299,7 @@ function wn(e, t) {
260
299
  t(e, n);
261
300
  }
262
301
  function Rt(e) {
263
- He && He.reset(e), O.setState({
302
+ He && He.reset(e), M.setState({
264
303
  document: e,
265
304
  selectedSidebarTab: "styles",
266
305
  selectedBlockId: null,
@@ -268,141 +307,141 @@ function Rt(e) {
268
307
  lastTextBlockContent: null,
269
308
  textDomApplyRequest: null
270
309
  });
271
- const t = O.getState().onChange;
310
+ const t = M.getState().onChange;
272
311
  t && queueMicrotask(() => {
273
312
  wn(e, t);
274
313
  });
275
314
  }
276
315
  function _e(e, t) {
277
316
  const r = {
278
- ...O.getState().document,
317
+ ...M.getState().document,
279
318
  ...e
280
319
  };
281
320
  if (He) {
282
321
  const i = He.record(r);
283
- O.setState({
322
+ M.setState({
284
323
  document: i
285
324
  });
286
- const l = O.getState().onChange;
325
+ const l = M.getState().onChange;
287
326
  l && queueMicrotask(() => {
288
327
  wn(i, l);
289
328
  });
290
329
  } else {
291
- O.setState({
330
+ M.setState({
292
331
  document: r
293
332
  });
294
- const i = O.getState().onChange;
333
+ const i = M.getState().onChange;
295
334
  i && queueMicrotask(() => {
296
335
  wn(r, i);
297
336
  });
298
337
  }
299
338
  }
300
- function va(e) {
301
- return O.setState({ onChange: e });
339
+ function xa(e) {
340
+ return M.setState({ onChange: e });
302
341
  }
303
- function wa() {
304
- const e = O.getState(), t = !e.inspectorDrawerOpen;
305
- O.setState({ inspectorDrawerOpen: t }), e.onInspectorDrawerToggle && e.onInspectorDrawerToggle(t);
342
+ function Sa() {
343
+ const e = M.getState(), t = !e.inspectorDrawerOpen;
344
+ M.setState({ inspectorDrawerOpen: t }), e.onInspectorDrawerToggle && e.onInspectorDrawerToggle(t);
306
345
  }
307
- function Ia() {
308
- const e = O.getState(), t = !e.samplesDrawerOpen;
309
- O.setState({ samplesDrawerOpen: t }), e.onSamplesDrawerToggle && e.onSamplesDrawerToggle(t);
346
+ function va() {
347
+ const e = M.getState(), t = !e.samplesDrawerOpen;
348
+ M.setState({ samplesDrawerOpen: t }), e.onSamplesDrawerToggle && e.onSamplesDrawerToggle(t);
310
349
  }
311
350
  function Uo(e) {
312
- return O.setState({ selectedScreenSize: e });
351
+ return M.setState({ selectedScreenSize: e });
313
352
  }
314
- function Xr() {
315
- return O((e) => e.imageUploadHandler);
353
+ function Gr() {
354
+ return M((e) => e.imageUploadHandler);
316
355
  }
317
- function ka(e) {
318
- return O.setState({ imageUploadHandler: e });
356
+ function wa(e) {
357
+ return M.setState({ imageUploadHandler: e });
319
358
  }
320
- function Gr() {
321
- return O((e) => e.videoUploadHandler);
359
+ function Jr() {
360
+ return M((e) => e.videoUploadHandler);
361
+ }
362
+ function Ia(e) {
363
+ return M.setState({ videoUploadHandler: e });
364
+ }
365
+ function ka() {
366
+ return M((e) => e.language);
322
367
  }
323
368
  function Da(e) {
324
- return O.setState({ videoUploadHandler: e });
369
+ return Ar(e), M.setState({ language: e });
325
370
  }
326
371
  function Ea() {
327
- return O((e) => e.language);
372
+ return M((e) => e.name);
328
373
  }
329
374
  function Aa(e) {
330
- return Ar(e), O.setState({ language: e });
375
+ M.setState({ name: e });
376
+ const t = M.getState().onNameChange;
377
+ t && t(e);
331
378
  }
332
- function Ta() {
333
- return O((e) => e.name);
379
+ function Ta(e) {
380
+ return M.setState({ onNameChange: e });
334
381
  }
335
382
  function _a(e) {
336
- O.setState({ name: e });
337
- const t = O.getState().onNameChange;
338
- t && t(e);
383
+ return M.setState({ onSamplesDrawerToggle: e });
339
384
  }
340
385
  function Ba(e) {
341
- return O.setState({ onNameChange: e });
386
+ return M.setState({ onInspectorDrawerToggle: e });
342
387
  }
343
- function Oa(e) {
344
- return O.setState({ onSamplesDrawerToggle: e });
388
+ function Zr() {
389
+ return M((e) => e.showJsonFeatures);
345
390
  }
346
391
  function Ma(e) {
347
- return O.setState({ onInspectorDrawerToggle: e });
392
+ return M.setState({ showJsonFeatures: e });
348
393
  }
349
- function Jr() {
350
- return O((e) => e.showJsonFeatures);
394
+ function Oa() {
395
+ return M((e) => e.showSamplesDrawerTitle);
351
396
  }
352
397
  function Na(e) {
353
- return O.setState({ showJsonFeatures: e });
398
+ return M.setState({ showSamplesDrawerTitle: e });
354
399
  }
355
400
  function Ra() {
356
- return O((e) => e.showSamplesDrawerTitle);
357
- }
358
- function Pa(e) {
359
- return O.setState({ showSamplesDrawerTitle: e });
360
- }
361
- function Fa() {
362
401
  return He ? He.canUndo() : !1;
363
402
  }
364
- function za() {
403
+ function Pa() {
365
404
  return He ? He.canRedo() : !1;
366
405
  }
367
- function Zr() {
406
+ function Qr() {
368
407
  if (!He) return !1;
369
408
  const e = He.undo();
370
409
  if (!e) return !1;
371
- O.setState({
410
+ M.setState({
372
411
  document: e
373
412
  });
374
- const t = O.getState().onChange;
413
+ const t = M.getState().onChange;
375
414
  return t && queueMicrotask(() => wn(e, t)), !0;
376
415
  }
377
- function Qr() {
416
+ function el() {
378
417
  if (!He) return !1;
379
418
  const e = He.redo();
380
419
  if (!e) return !1;
381
- O.setState({
420
+ M.setState({
382
421
  document: e
383
422
  });
384
- const t = O.getState().onChange;
423
+ const t = M.getState().onChange;
385
424
  return t && queueMicrotask(() => wn(e, t)), !0;
386
425
  }
387
- function La() {
388
- const e = O((t) => t.document);
389
- return mt.useMemo(() => Fa(), [e]);
426
+ function Fa() {
427
+ const e = M((t) => t.document);
428
+ return mt.useMemo(() => Ra(), [e]);
390
429
  }
391
- function Wa() {
392
- const e = O((t) => t.document);
393
- return mt.useMemo(() => za(), [e]);
430
+ function za() {
431
+ const e = M((t) => t.document);
432
+ return mt.useMemo(() => Pa(), [e]);
394
433
  }
395
- const el = ho(null);
396
- function Ha({
434
+ const tl = ho(null);
435
+ function La({
397
436
  value: e,
398
437
  children: t
399
438
  }) {
400
- return /* @__PURE__ */ o(el.Provider, { value: e, children: t });
439
+ return /* @__PURE__ */ o(tl.Provider, { value: e, children: t });
401
440
  }
402
- function Va() {
403
- return hr(el);
441
+ function Wa() {
442
+ return hr(tl);
404
443
  }
405
- const Ua = [
444
+ const Ha = [
406
445
  "MODERN_SANS",
407
446
  "BOOK_SANS",
408
447
  "ORGANIC_SANS",
@@ -413,10 +452,10 @@ const Ua = [
413
452
  "BOOK_SERIF",
414
453
  "MONOSPACE"
415
454
  ];
416
- function $a(e) {
455
+ function Va(e) {
417
456
  const t = e.trim().toLowerCase();
418
457
  if (t)
419
- for (const n of Ua) {
458
+ for (const n of Ha) {
420
459
  const r = Tr(n);
421
460
  if (!r) continue;
422
461
  const i = r.split(",")[0].replace(/"/g, "").trim().toLowerCase();
@@ -440,7 +479,7 @@ function Dt(e) {
440
479
  function pt(e) {
441
480
  return Dt(e).length;
442
481
  }
443
- function ja(e, t) {
482
+ function Ua(e, t) {
444
483
  if (t < 0) return null;
445
484
  let n = 0;
446
485
  const r = document.createTreeWalker(e, NodeFilter.SHOW_TEXT);
@@ -465,10 +504,10 @@ function fo(e, t) {
465
504
  return { node: i, offset: Math.max(0, t - n) };
466
505
  n += a;
467
506
  }
468
- const l = Ka(e);
507
+ const l = $a(e);
469
508
  return l && t === n ? { node: l, offset: (l.textContent ?? "").length } : null;
470
509
  }
471
- function Ka(e) {
510
+ function $a(e) {
472
511
  const t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT);
473
512
  let n, r = null;
474
513
  for (; n = t.nextNode(); ) r = n;
@@ -495,19 +534,19 @@ function jo(e, t, n) {
495
534
  return 0;
496
535
  }
497
536
  }
498
- function Vn(e) {
537
+ function Un(e) {
499
538
  return Array.from(e.children).filter((t) => t.tagName === "P");
500
539
  }
501
- function tl(e) {
540
+ function nl(e) {
502
541
  const t = [];
503
542
  let n = 0;
504
- for (const r of Vn(e)) {
543
+ for (const r of Un(e)) {
505
544
  const i = pt(r);
506
545
  t.push({ p: r, start: n, end: n + i }), n += i;
507
546
  }
508
547
  return t;
509
548
  }
510
- function qa(e) {
549
+ function ja(e) {
511
550
  let t;
512
551
  for (; t = e.querySelector("a"); ) {
513
552
  const n = t.parentNode;
@@ -517,7 +556,7 @@ function qa(e) {
517
556
  n.removeChild(t);
518
557
  }
519
558
  }
520
- function nl(e) {
559
+ function ol(e) {
521
560
  for (; ; ) {
522
561
  const t = Array.from(e.querySelectorAll("span")).find((r) => !r.hasAttribute("data-text-variable"));
523
562
  if (!t) break;
@@ -528,33 +567,33 @@ function nl(e) {
528
567
  n.removeChild(t);
529
568
  }
530
569
  }
531
- function Ya(e, t, n, r) {
570
+ function Ka(e, t, n, r) {
532
571
  const i = Et(e, t, n);
533
572
  if (!i || i.collapsed) return;
534
573
  const l = i.extractContents();
535
- nl(l);
574
+ ol(l);
536
575
  const a = document.createElement("span");
537
- Un(a, r), a.appendChild(l), i.insertNode(a);
576
+ $n(a, r), a.appendChild(l), i.insertNode(a);
538
577
  }
539
578
  function In(e) {
540
579
  e.style.color || (e.style.color = "inherit");
541
580
  }
542
- function Xa(e, t, n, r, i) {
581
+ function qa(e, t, n, r, i) {
543
582
  const l = Et(e, t, n);
544
583
  if (!l || l.collapsed) return;
545
584
  const a = l.extractContents();
546
- qa(a);
585
+ ja(a);
547
586
  const c = document.createElement("a");
548
587
  c.href = r, i && (c.target = "_blank", c.rel = "noopener noreferrer"), In(c), c.style.textDecoration || (c.style.textDecoration = "underline"), c.appendChild(a), l.insertNode(c);
549
588
  }
550
- function Ga(e) {
589
+ function Ya(e) {
551
590
  return e.tagName === "SPAN" && Dn(e);
552
591
  }
553
- function Ja(e) {
592
+ function Xa(e) {
554
593
  const t = Array.from(e.children);
555
594
  if (t.length !== 1) return;
556
595
  const n = t[0];
557
- if (!Ga(n)) return;
596
+ if (!Ya(n)) return;
558
597
  const r = n, i = (e.textContent ?? "").replace(/\u200B/g, ""), l = (r.textContent ?? "").replace(/\u200B/g, "");
559
598
  if (i !== l) return;
560
599
  const a = r.style, c = (s) => {
@@ -562,19 +601,19 @@ function Ja(e) {
562
601
  if (!u) return;
563
602
  e.style[d] || (e.style[d] = u);
564
603
  };
565
- c("fontSize"), c("fontFamily"), c("fontWeight"), c("fontStyle"), c("letterSpacing"), c("color"), c("backgroundColor"), c("textDecoration"), zn(r);
604
+ c("fontSize"), c("fontFamily"), c("fontWeight"), c("fontStyle"), c("letterSpacing"), c("color"), c("backgroundColor"), c("textDecoration"), Ln(r);
566
605
  }
567
- function Za(e, t, n, r, i) {
606
+ function Ga(e, t, n, r, i) {
568
607
  const l = Et(e, t, n);
569
608
  if (!l || l.collapsed) return;
570
609
  const a = l.extractContents();
571
- nl(a);
610
+ ol(a);
572
611
  const c = document.createDocumentFragment(), s = [], d = () => {
573
612
  if (s.length === 0) return;
574
613
  const u = s.filter((m) => m.nodeType !== Node.TEXT_NODE ? !0 : (m.textContent ?? "").replace(/\u200B/g, "").length > 0);
575
614
  if (s.length = 0, u.length === 0) return;
576
615
  const g = document.createElement("span");
577
- Un(g, r);
616
+ $n(g, r);
578
617
  for (const m of u) g.appendChild(m);
579
618
  (g.textContent ?? "").replace(/\u200B/g, "").length === 0 && g.children.length === 0 || c.appendChild(g);
580
619
  };
@@ -595,7 +634,7 @@ function Za(e, t, n, r, i) {
595
634
  }
596
635
  d(), l.insertNode(c);
597
636
  }
598
- function Qa(e) {
637
+ function Ja(e) {
599
638
  const t = {};
600
639
  for (const [n, r] of Object.entries(e))
601
640
  if (r != null && !(typeof r == "string" && (r === "undefined" || r === "null")) && !(typeof r == "number" && Number.isNaN(r)) && n !== "lineHeight") {
@@ -607,7 +646,7 @@ function Qa(e) {
607
646
  }
608
647
  return t;
609
648
  }
610
- function es(e) {
649
+ function Za(e) {
611
650
  const t = _r(e);
612
651
  return delete t.lineHeight, t;
613
652
  }
@@ -638,7 +677,7 @@ function kn(e, t) {
638
677
  typeof i == "number" ? n("letterSpacing", `${i}px`) : n("letterSpacing", String(i));
639
678
  }
640
679
  }
641
- function ts(e, t, n) {
680
+ function Qa(e, t, n) {
642
681
  const r = Array.from(e.querySelectorAll("span"));
643
682
  for (const i of r) {
644
683
  const l = document.createRange();
@@ -649,7 +688,7 @@ function ts(e, t, n) {
649
688
  }
650
689
  return null;
651
690
  }
652
- function ns(e, t, n) {
691
+ function es(e, t, n) {
653
692
  const r = Array.from(e.querySelectorAll("span[data-text-variable]"));
654
693
  for (const i of r) {
655
694
  const l = document.createRange();
@@ -659,11 +698,11 @@ function ns(e, t, n) {
659
698
  }
660
699
  return null;
661
700
  }
662
- function Un(e, t) {
701
+ function $n(e, t) {
663
702
  for (const [n, r] of Object.entries(t))
664
703
  e.style[n] = r;
665
704
  }
666
- function zn(e) {
705
+ function Ln(e) {
667
706
  const t = e.parentNode;
668
707
  if (t) {
669
708
  for (; e.firstChild; )
@@ -678,16 +717,16 @@ function ln(e) {
678
717
  const t = (e ?? "").trim().toLowerCase();
679
718
  return t ? t.split(";").map((r) => r.trim()).filter(Boolean).sort().join(";") : "";
680
719
  }
681
- function os(e, t) {
720
+ function ts(e, t) {
682
721
  return !Dn(e) || !Dn(t) ? !1 : ln(e.getAttribute("style")) === ln(t.getAttribute("style"));
683
722
  }
684
723
  function Ko(e) {
685
724
  return (e.getAttribute("href") ?? "").trim();
686
725
  }
687
- function rs(e, t) {
726
+ function ns(e, t) {
688
727
  return Ko(e) !== Ko(t) || (e.getAttribute("target") ?? "") !== (t.getAttribute("target") ?? "") || (e.getAttribute("rel") ?? "") !== (t.getAttribute("rel") ?? "") ? !1 : ln(e.getAttribute("style")) === ln(t.getAttribute("style"));
689
728
  }
690
- function ls(e) {
729
+ function os(e) {
691
730
  return Dn(e) ? ln(e.getAttribute("style")) ? (e.textContent ?? "").replace(/\u200B/g, "").length === 0 : !0 : !1;
692
731
  }
693
732
  function Qt(e) {
@@ -699,10 +738,10 @@ function Qt(e) {
699
738
  const l = i;
700
739
  if (t(l), l.tagName === "A") {
701
740
  if ((l.textContent ?? "").replace(/\u200B/g, "").trim().length === 0) {
702
- zn(l);
741
+ Ln(l);
703
742
  continue;
704
743
  }
705
- Ja(l), In(l);
744
+ Xa(l), In(l);
706
745
  }
707
746
  if (l.tagName === "SPAN") {
708
747
  const a = l;
@@ -710,12 +749,12 @@ function Qt(e) {
710
749
  n.removeChild(a);
711
750
  continue;
712
751
  }
713
- if (ls(a)) {
714
- zn(a);
752
+ if (os(a)) {
753
+ Ln(a);
715
754
  continue;
716
755
  }
717
756
  if (ln(a.getAttribute("style")) === "" && Dn(a)) {
718
- zn(a);
757
+ Ln(a);
719
758
  continue;
720
759
  }
721
760
  }
@@ -727,7 +766,7 @@ function Qt(e) {
727
766
  }
728
767
  for (r = 0; r < n.childNodes.length - 1; ) {
729
768
  const i = n.childNodes[r], l = n.childNodes[r + 1];
730
- if (i.nodeType === Node.ELEMENT_NODE && l.nodeType === Node.ELEMENT_NODE && i.tagName === "SPAN" && l.tagName === "SPAN" && os(i, l)) {
769
+ if (i.nodeType === Node.ELEMENT_NODE && l.nodeType === Node.ELEMENT_NODE && i.tagName === "SPAN" && l.tagName === "SPAN" && ts(i, l)) {
731
770
  const a = i, c = l;
732
771
  for (; c.firstChild; )
733
772
  a.appendChild(c.firstChild);
@@ -738,7 +777,7 @@ function Qt(e) {
738
777
  }
739
778
  for (r = 0; r < n.childNodes.length - 1; ) {
740
779
  const i = n.childNodes[r], l = n.childNodes[r + 1];
741
- if (i.nodeType === Node.ELEMENT_NODE && l.nodeType === Node.ELEMENT_NODE && i.tagName === "A" && l.tagName === "A" && rs(i, l)) {
780
+ if (i.nodeType === Node.ELEMENT_NODE && l.nodeType === Node.ELEMENT_NODE && i.tagName === "A" && l.tagName === "A" && ns(i, l)) {
742
781
  const a = i, c = l;
743
782
  for (; c.firstChild; )
744
783
  a.appendChild(c.firstChild);
@@ -750,23 +789,23 @@ function Qt(e) {
750
789
  };
751
790
  t(e);
752
791
  }
753
- function is(e) {
792
+ function rs(e) {
754
793
  const t = Array.from(e.querySelectorAll("[data-text-variable]"));
755
794
  for (const n of t)
756
795
  n.style.removeProperty("border"), n.style.removeProperty("border-radius"), n.style.removeProperty("padding"), n.style.removeProperty("box-shadow"), n.style.removeProperty("user-select"), n.style.removeProperty("-webkit-user-select");
757
796
  }
758
- function as(e) {
797
+ function ls(e) {
759
798
  const t = {};
760
799
  for (const [n, r] of Object.entries(e))
761
800
  r !== void 0 && (t[n] = r);
762
801
  return t;
763
802
  }
764
- function ss(e, t) {
803
+ function is(e, t) {
765
804
  kn(e, t);
766
805
  }
767
- function cs(e, t, n, r) {
806
+ function as(e, t, n, r) {
768
807
  var d, u;
769
- const { patch: i, global: l } = r, a = as(i ?? {}), c = Object.keys(a).length > 0, s = tl(e);
808
+ const { patch: i, global: l } = r, a = ls(i ?? {}), c = Object.keys(a).length > 0, s = nl(e);
770
809
  for (const { p: g, start: f, end: m } of s) {
771
810
  const h = Math.max(t, f), b = Math.min(n, m);
772
811
  if (h >= b) continue;
@@ -780,39 +819,39 @@ function cs(e, t, n, r) {
780
819
  }
781
820
  } catch {
782
821
  }
783
- const y = ns(g, h - f, b - f);
822
+ const y = es(g, h - f, b - f);
784
823
  if (y) {
785
824
  c && kn(y, a), Qt(g);
786
825
  continue;
787
826
  }
788
- const k = ts(g, h - f, b - f);
827
+ const k = Qa(g, h - f, b - f);
789
828
  if (k) {
790
- c && ss(k, a), Qt(g);
829
+ c && is(k, a), Qt(g);
791
830
  continue;
792
831
  }
793
- const D = bs(e, h, b), E = { ...l, ...D, ...a }, N = Qa(es(E));
832
+ const D = gs(e, h, b), E = { ...l, ...D, ...a }, N = Ja(Za(E));
794
833
  if (Object.keys(N).length === 0) continue;
795
834
  const W = Et(g, h - f, b - f), P = () => {
796
835
  if (!W || W.collapsed) return !1;
797
836
  const be = W.startContainer.nodeType === Node.ELEMENT_NODE ? W.startContainer : W.startContainer.parentElement, ce = W.endContainer.nodeType === Node.ELEMENT_NODE ? W.endContainer : W.endContainer.parentElement, _ = be == null ? void 0 : be.closest("a"), x = ce == null ? void 0 : ce.closest("a");
798
- return _ && (Un(_, N), In(_)), x && x !== _ && (Un(x, N), In(x)), !!(_ || x);
837
+ return _ && ($n(_, N), In(_)), x && x !== _ && ($n(x, N), In(x)), !!(_ || x);
799
838
  };
800
839
  (() => {
801
840
  var ce;
802
841
  if (!W || W.collapsed) return !1;
803
842
  const be = W.cloneContents();
804
843
  return !!((ce = be.querySelector) != null && ce.call(be, "a,[data-text-variable]"));
805
- })() ? Za(g, h - f, b - f, N, a) : P() || Ya(g, h - f, b - f, N), Qt(g);
844
+ })() ? Ga(g, h - f, b - f, N, a) : P() || Ka(g, h - f, b - f, N), Qt(g);
806
845
  }
807
846
  }
808
- function us(e, t, n, r, i) {
809
- const l = tl(e);
847
+ function ss(e, t, n, r, i) {
848
+ const l = nl(e);
810
849
  for (const { p: a, start: c, end: s } of l) {
811
850
  const d = Math.max(t, c), u = Math.min(n, s);
812
- d >= u || (Xa(a, d - c, u - c, r, i), Qt(a));
851
+ d >= u || (qa(a, d - c, u - c, r, i), Qt(a));
813
852
  }
814
853
  }
815
- function ds(e, t) {
854
+ function cs(e, t) {
816
855
  const n = pt(e);
817
856
  if (n === 0) return null;
818
857
  const r = fo(e, Math.min(t, n - 1));
@@ -827,19 +866,19 @@ function ds(e, t) {
827
866
  }
828
867
  return null;
829
868
  }
830
- function ps(e, t, n) {
869
+ function us(e, t, n) {
831
870
  const i = new DOMParser().parseFromString(e, "text/html").body.firstElementChild;
832
871
  if (!i) return null;
833
872
  const l = pt(i);
834
873
  if (l === 0) return null;
835
874
  const a = Math.max(0, Math.min(t, l - 1)), c = Math.max(a + 1, Math.min(n, l));
836
875
  for (let s = a; s < c; s++) {
837
- const d = ds(i, s);
876
+ const d = cs(i, s);
838
877
  if (d) return d;
839
878
  }
840
879
  return null;
841
880
  }
842
- function fs(e, t, n) {
881
+ function ds(e, t, n) {
843
882
  const i = new DOMParser().parseFromString(e, "text/html").body.firstElementChild;
844
883
  if (!i) return {};
845
884
  const l = pt(i);
@@ -851,14 +890,14 @@ function fs(e, t, n) {
851
890
  u = g;
852
891
  break;
853
892
  }
854
- return Mt(i, u);
893
+ return Ot(i, u);
855
894
  }
856
895
  const mo = /^[A-Za-z_][A-Za-z0-9_]*$/;
857
- function ms(e) {
896
+ function ps(e) {
858
897
  const t = new DOMParser().parseFromString(e, "text/html");
859
898
  return Array.from(t.body.querySelectorAll("[data-text-variable]"));
860
899
  }
861
- function gs(e, t, n) {
900
+ function fs(e, t, n) {
862
901
  const i = new DOMParser().parseFromString(e, "text/html").body.firstElementChild;
863
902
  if (!i || t >= n) return null;
864
903
  const l = Array.from(i.querySelectorAll("[data-text-variable]"));
@@ -890,7 +929,7 @@ function Eo(e) {
890
929
  }
891
930
  return null;
892
931
  }
893
- function ol() {
932
+ function rl() {
894
933
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `v_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 11)}`;
895
934
  }
896
935
  function bn(e, t) {
@@ -899,7 +938,7 @@ function bn(e, t) {
899
938
  let r = !1;
900
939
  const i = Array.from(e.querySelectorAll("[data-text-variable]"));
901
940
  for (const f of i)
902
- (d = f.getAttribute("data-variable-instance-id")) != null && d.trim() || (f.setAttribute("data-variable-instance-id", ol()), r = !0);
941
+ (d = f.getAttribute("data-variable-instance-id")) != null && d.trim() || (f.setAttribute("data-variable-instance-id", rl()), r = !0);
903
942
  const l = /* @__PURE__ */ new Set();
904
943
  for (const f of i) {
905
944
  const m = (u = f.getAttribute("data-variable-instance-id")) == null ? void 0 : u.trim();
@@ -924,7 +963,7 @@ function bn(e, t) {
924
963
  }
925
964
  function qn(e) {
926
965
  const t = [];
927
- for (const n of ms(e)) {
966
+ for (const n of ps(e)) {
928
967
  const r = Eo(n.getAttribute("data-text-variable") ?? "");
929
968
  if (!r) continue;
930
969
  const i = (n.getAttribute("data-variable-instance-id") ?? "").trim();
@@ -932,7 +971,7 @@ function qn(e) {
932
971
  }
933
972
  return t;
934
973
  }
935
- function hs(e, t) {
974
+ function ms(e, t) {
936
975
  if (e.color && t.color == null) {
937
976
  const n = e.color.trim();
938
977
  t.color = n.startsWith("#") ? n : $o(n) ?? n;
@@ -946,7 +985,7 @@ function hs(e, t) {
946
985
  Number.isNaN(n) || (t.fontSize = n);
947
986
  }
948
987
  if (e.fontFamily && e.fontFamily !== "undefined" && t.fontFamily == null) {
949
- const n = $a(e.fontFamily);
988
+ const n = Va(e.fontFamily);
950
989
  n && (t.fontFamily = n);
951
990
  }
952
991
  if (t.fontWeight == null) {
@@ -962,11 +1001,11 @@ function hs(e, t) {
962
1001
  t.letterSpacing = n;
963
1002
  }
964
1003
  }
965
- function bs(e, t, n) {
1004
+ function gs(e, t, n) {
966
1005
  const r = pt(e);
967
1006
  if (r === 0) return {};
968
1007
  const i = (u) => Math.max(0, Math.min(u, r - 1));
969
- if (n <= t) return Mt(e, i(t));
1008
+ if (n <= t) return Ot(e, i(t));
970
1009
  const l = [i(t), i(Math.floor((t + n - 1) / 2)), i(n - 1)], a = [...new Set(l)], c = {};
971
1010
  let s = -1;
972
1011
  const d = [
@@ -979,7 +1018,7 @@ function bs(e, t, n) {
979
1018
  "letterSpacing"
980
1019
  ];
981
1020
  for (const u of a) {
982
- const g = Mt(e, u);
1021
+ const g = Ot(e, u);
983
1022
  typeof g.fontSize == "number" && (s = Math.max(s, g.fontSize));
984
1023
  for (const f of d) {
985
1024
  const m = g[f];
@@ -988,39 +1027,39 @@ function bs(e, t, n) {
988
1027
  }
989
1028
  return s >= 0 && (c.fontSize = s), c;
990
1029
  }
991
- function Mt(e, t) {
992
- const n = pt(e), r = Math.min(t, Math.max(0, n - 1)), i = ja(e, r);
1030
+ function Ot(e, t) {
1031
+ const n = pt(e), r = Math.min(t, Math.max(0, n - 1)), i = Ua(e, r);
993
1032
  if (!i) return {};
994
1033
  let l = i.node.nodeType === Node.TEXT_NODE ? i.node.parentElement : i.node;
995
1034
  const a = {};
996
1035
  for (; l && l !== e; ) {
997
1036
  const c = l.tagName;
998
- (c === "SPAN" || c === "A") && hs(l.style, a), (c === "STRONG" || c === "B") && a.fontWeight == null && (a.fontWeight = "bold"), (c === "I" || c === "EM") && a.fontStyle == null && (a.fontStyle = "italic"), l = l.parentElement;
1037
+ (c === "SPAN" || c === "A") && ms(l.style, a), (c === "STRONG" || c === "B") && a.fontWeight == null && (a.fontWeight = "bold"), (c === "I" || c === "EM") && a.fontStyle == null && (a.fontStyle = "italic"), l = l.parentElement;
999
1038
  }
1000
1039
  return a;
1001
1040
  }
1002
1041
  const qo = "​";
1003
1042
  function xt(e) {
1004
- if (Vn(e).length === 0) {
1043
+ if (Un(e).length === 0) {
1005
1044
  const t = document.createElement("p");
1006
1045
  t.style.margin = "0", t.appendChild(document.createTextNode(qo)), t.appendChild(document.createElement("br")), e.appendChild(t);
1007
1046
  return;
1008
1047
  }
1009
- for (const t of Vn(e))
1048
+ for (const t of Un(e))
1010
1049
  t.style.margin = "0", Dt(t).length === 0 && (t.textContent = "", t.appendChild(document.createTextNode(qo)), t.appendChild(document.createElement("br")));
1011
1050
  }
1012
- function rl(e) {
1051
+ function ll(e) {
1013
1052
  return Dt(e).replace(/\u200B/g, "");
1014
1053
  }
1015
1054
  function Cn(e) {
1016
1055
  const t = e.cloneNode(!0);
1017
1056
  xt(t);
1018
- for (const n of Vn(t))
1057
+ for (const n of Un(t))
1019
1058
  Qt(n);
1020
- return is(t), t.outerHTML;
1059
+ return rs(t), t.outerHTML;
1021
1060
  }
1022
1061
  const Yo = /^[A-Za-z_][A-Za-z0-9_]*$/;
1023
- function ll(e) {
1062
+ function il(e) {
1024
1063
  const t = (e.attribute ?? "").trim();
1025
1064
  if (t && Yo.test(t)) return t;
1026
1065
  const n = (e.variable ?? "").trim();
@@ -1049,7 +1088,7 @@ function Xo(e, t = "root") {
1049
1088
  u[y] !== S && (u[y] = S, g = !0);
1050
1089
  continue;
1051
1090
  }
1052
- const k = ll({
1091
+ const k = il({
1053
1092
  attribute: typeof h.attribute == "string" ? h.attribute : void 0,
1054
1093
  variable: typeof h.variable == "string" ? h.variable : void 0
1055
1094
  });
@@ -1068,7 +1107,7 @@ function Xo(e, t = "root") {
1068
1107
  }, l = /* @__PURE__ */ new Set();
1069
1108
  return e[t] && Yn(e, t, i, l), r ? n : e;
1070
1109
  }
1071
- function Cs(e) {
1110
+ function hs(e) {
1072
1111
  const t = e.data;
1073
1112
  if (!t || typeof t != "object") return [];
1074
1113
  const n = [], r = t.childrenIds;
@@ -1096,11 +1135,11 @@ function Yn(e, t, n, r) {
1096
1135
  const i = e[t];
1097
1136
  if (i) {
1098
1137
  r.add(t), n(t, i);
1099
- for (const l of Cs(i))
1138
+ for (const l of hs(i))
1100
1139
  Yn(e, l, n, r);
1101
1140
  }
1102
1141
  }
1103
- function ys(e, t = "root") {
1142
+ function bs(e, t = "root") {
1104
1143
  const n = [];
1105
1144
  let r = 0;
1106
1145
  const i = /* @__PURE__ */ new Map(), l = (c, s) => {
@@ -1136,7 +1175,7 @@ function to(e, t, n = "root") {
1136
1175
  r.set(g, u);
1137
1176
  continue;
1138
1177
  }
1139
- const f = ll(d);
1178
+ const f = il(d);
1140
1179
  f && i.set(f, u);
1141
1180
  }
1142
1181
  if (r.size === 0 && i.size === 0) return e;
@@ -1173,10 +1212,10 @@ function Go() {
1173
1212
  if (!t || !t.contains(e)) return;
1174
1213
  const n = t.getAttribute("data-monto-text-block-id");
1175
1214
  if (!n) return;
1176
- const r = O.getState().document[n];
1215
+ const r = M.getState().document[n];
1177
1216
  !r || r.type !== "Text" || t.blur();
1178
1217
  }
1179
- const xs = "#212443", On = "#1E40AF", yn = "#1F8466", Mn = "#E81212", Xt = "#F6DC9F", Ss = "#6C0E7C", vs = "#CC996C", ws = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Is = 'ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace', B = Or({
1218
+ const Cs = "#212443", On = "#1E40AF", yn = "#1F8466", Nn = "#E81212", Xt = "#F6DC9F", ys = "#6C0E7C", xs = "#CC996C", Ss = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', vs = 'ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace', B = Mr({
1180
1219
  palette: {
1181
1220
  background: {
1182
1221
  default: "#f2f5f7"
@@ -1187,18 +1226,18 @@ const xs = "#212443", On = "#1E40AF", yn = "#1F8466", Mn = "#E81212", Xt = "#F6D
1187
1226
  }
1188
1227
  },
1189
1228
  typography: {
1190
- fontFamily: ws
1229
+ fontFamily: Ss
1191
1230
  }
1192
- }), ks = Or(B, {
1231
+ }), ws = Mr(B, {
1193
1232
  palette: {
1194
1233
  brand: {
1195
- navy: xs,
1234
+ navy: Cs,
1196
1235
  blue: On,
1197
- red: Mn,
1236
+ red: Nn,
1198
1237
  green: yn,
1199
1238
  yellow: Xt,
1200
- purple: Ss,
1201
- brown: vs
1239
+ purple: ys,
1240
+ brown: xs
1202
1241
  },
1203
1242
  success: {
1204
1243
  main: yn,
@@ -1206,9 +1245,9 @@ const xs = "#212443", On = "#1E40AF", yn = "#1F8466", Mn = "#E81212", Xt = "#F6D
1206
1245
  dark: Ho(yn, 0.15)
1207
1246
  },
1208
1247
  error: {
1209
- main: Mn,
1210
- light: jt(Mn, 0.15),
1211
- dark: Ho(Mn, 0.15)
1248
+ main: Nn,
1249
+ light: jt(Nn, 0.15),
1250
+ dark: Ho(Nn, 0.15)
1212
1251
  },
1213
1252
  cadet: {
1214
1253
  100: "#F9FAFB",
@@ -1242,7 +1281,7 @@ const xs = "#212443", On = "#1E40AF", yn = "#1F8466", Mn = "#E81212", Xt = "#F6D
1242
1281
  padding: 0;
1243
1282
  }
1244
1283
  pre {
1245
- font-family: ${Is}
1284
+ font-family: ${vs}
1246
1285
  white-space: pre-wrap;
1247
1286
  font-size: 12px;
1248
1287
  }
@@ -1690,8 +1729,8 @@ const xs = "#212443", On = "#1E40AF", yn = "#1F8466", Mn = "#E81212", Xt = "#F6D
1690
1729
  ]
1691
1730
  });
1692
1731
  function Se() {
1693
- const e = Ea();
1694
- return { t: (n, r) => ql(n, r, e), language: e };
1732
+ const e = ka();
1733
+ return { t: (n, r) => Yl(n, r, e), language: e };
1695
1734
  }
1696
1735
  function it({ title: e, children: t }) {
1697
1736
  return /* @__PURE__ */ w(se, { p: 2, sx: { width: "100%", maxWidth: "100%", boxSizing: "border-box" }, children: [
@@ -1699,17 +1738,17 @@ function it({ title: e, children: t }) {
1699
1738
  /* @__PURE__ */ o(Z, { spacing: 3, mb: 3, sx: { width: "100%", maxWidth: "100%" }, children: t })
1700
1739
  ] });
1701
1740
  }
1702
- const Ds = {
1741
+ const Is = {
1703
1742
  width: 24,
1704
1743
  height: 24
1705
1744
  };
1706
- function Es({ paletteColors: e, value: t, onChange: n }) {
1745
+ function ks({ paletteColors: e, value: t, onChange: n }) {
1707
1746
  const r = (i) => /* @__PURE__ */ o(
1708
- Oe,
1747
+ Me,
1709
1748
  {
1710
1749
  onClick: () => n(i),
1711
1750
  sx: {
1712
- ...Ds,
1751
+ ...Is,
1713
1752
  backgroundColor: i,
1714
1753
  border: "1px solid",
1715
1754
  borderColor: t === i ? "black" : "grey.200",
@@ -1725,7 +1764,7 @@ function Es({ paletteColors: e, value: t, onChange: n }) {
1725
1764
  );
1726
1765
  return /* @__PURE__ */ o(se, { width: "100%", sx: { display: "grid", gap: 1, gridTemplateColumns: "1fr 1fr 1fr 1fr 1fr 1fr" }, children: e.map((i) => r(i)) });
1727
1766
  }
1728
- const As = [
1767
+ const Ds = [
1729
1768
  "#E11D48",
1730
1769
  "#DB2777",
1731
1770
  "#C026D3",
@@ -1756,7 +1795,7 @@ const As = [
1756
1795
  "#171717",
1757
1796
  "#0A0A0A",
1758
1797
  "#000000"
1759
- ], Ts = {
1798
+ ], Es = {
1760
1799
  p: 1,
1761
1800
  ".react-colorful__pointer ": {
1762
1801
  width: 16,
@@ -1786,11 +1825,11 @@ const As = [
1786
1825
  width: "100%"
1787
1826
  }
1788
1827
  };
1789
- function _s({ value: e, onChange: t }) {
1790
- return /* @__PURE__ */ w(Z, { spacing: 1, sx: Ts, children: [
1791
- /* @__PURE__ */ o(Ei, { color: e, onChange: t }),
1792
- /* @__PURE__ */ o(Es, { paletteColors: As, value: e, onChange: t }),
1793
- /* @__PURE__ */ o(se, { pt: 1, children: /* @__PURE__ */ o(Ai, { prefixed: !0, color: e, onChange: t }) })
1828
+ function As({ value: e, onChange: t }) {
1829
+ return /* @__PURE__ */ w(Z, { spacing: 1, sx: Es, children: [
1830
+ /* @__PURE__ */ o(Jl, { color: e, onChange: t }),
1831
+ /* @__PURE__ */ o(ks, { paletteColors: Ds, value: e, onChange: t }),
1832
+ /* @__PURE__ */ o(se, { pt: 1, children: /* @__PURE__ */ o(Zl, { prefixed: !0, color: e, onChange: t }) })
1794
1833
  ] });
1795
1834
  }
1796
1835
  const Jo = 24, Zo = {
@@ -1813,7 +1852,7 @@ const Jo = 24, Zo = {
1813
1852
  minHeight: 40,
1814
1853
  cursor: "pointer"
1815
1854
  };
1816
- function il({ label: e, defaultValue: t, onChange: n, nullable: r }) {
1855
+ function al({ label: e, defaultValue: t, onChange: n, nullable: r }) {
1817
1856
  const [i, l] = z(null), [a, c] = z(t);
1818
1857
  Ce(() => {
1819
1858
  c(t);
@@ -1821,7 +1860,7 @@ function il({ label: e, defaultValue: t, onChange: n, nullable: r }) {
1821
1860
  const s = (g) => {
1822
1861
  l(g.currentTarget);
1823
1862
  }, d = () => !r || typeof a != "string" || a.trim().length === 0 ? null : /* @__PURE__ */ o(
1824
- Fn,
1863
+ zn,
1825
1864
  {
1826
1865
  onClick: () => {
1827
1866
  c(null), n(null);
@@ -1832,10 +1871,10 @@ function il({ label: e, defaultValue: t, onChange: n, nullable: r }) {
1832
1871
  return /* @__PURE__ */ w(Z, { alignItems: "flex-start", children: [
1833
1872
  /* @__PURE__ */ o(At, { sx: { mb: 0.5 }, children: e }),
1834
1873
  /* @__PURE__ */ w(Z, { direction: "row", spacing: 1, alignItems: "center", children: [
1835
- a ? /* @__PURE__ */ w(Fn, { onClick: s, sx: Qo, focusRipple: !0, children: [
1874
+ a ? /* @__PURE__ */ w(zn, { onClick: s, sx: Qo, focusRipple: !0, children: [
1836
1875
  /* @__PURE__ */ o(se, { sx: { ...Zo, bgcolor: a } }),
1837
1876
  /* @__PURE__ */ o(ke, { component: "span", variant: "body2", sx: { color: "text.primary", fontFamily: "monospace", fontSize: "13px" }, children: a })
1838
- ] }) : /* @__PURE__ */ o(Fn, { onClick: s, sx: Qo, focusRipple: !0, children: /* @__PURE__ */ o(se, { sx: { ...Zo, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ o(xo, { sx: { fontSize: 18 } }) }) }),
1877
+ ] }) : /* @__PURE__ */ o(zn, { onClick: s, sx: Qo, focusRipple: !0, children: /* @__PURE__ */ o(se, { sx: { ...Zo, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ o(xo, { sx: { fontSize: 18 } }) }) }),
1839
1878
  d()
1840
1879
  ] }),
1841
1880
  /* @__PURE__ */ o(
@@ -1848,7 +1887,7 @@ function il({ label: e, defaultValue: t, onChange: n, nullable: r }) {
1848
1887
  sx: { height: "auto", padding: 0 }
1849
1888
  },
1850
1889
  children: /* @__PURE__ */ o(
1851
- _s,
1890
+ As,
1852
1891
  {
1853
1892
  value: a || "",
1854
1893
  onChange: (g) => {
@@ -1861,10 +1900,10 @@ function il({ label: e, defaultValue: t, onChange: n, nullable: r }) {
1861
1900
  ] });
1862
1901
  }
1863
1902
  function nn(e) {
1864
- return /* @__PURE__ */ o(il, { ...e, nullable: !1 });
1903
+ return /* @__PURE__ */ o(al, { ...e, nullable: !1 });
1865
1904
  }
1866
- function Ln(e) {
1867
- return /* @__PURE__ */ o(il, { ...e, nullable: !0 });
1905
+ function Wn(e) {
1906
+ return /* @__PURE__ */ o(al, { ...e, nullable: !0 });
1868
1907
  }
1869
1908
  function ft({ label: e, children: t, defaultValue: n, onChange: r }) {
1870
1909
  const [i, l] = z(n);
@@ -1910,15 +1949,15 @@ function Pt({ helperText: e, label: t, placeholder: n, rows: r, InputProps: i, d
1910
1949
  }
1911
1950
  );
1912
1951
  }
1913
- function Bs(e) {
1952
+ function Ts(e) {
1914
1953
  return typeof e == "string" && e.includes("underline");
1915
1954
  }
1916
- function Os(e) {
1955
+ function _s(e) {
1917
1956
  return typeof e == "string" && e.includes("line-through");
1918
1957
  }
1919
- function Ms({ value: e, onChange: t }) {
1958
+ function Bs({ value: e, onChange: t }) {
1920
1959
  const n = (e == null ? void 0 : e.fontWeight) ?? "normal", r = (e == null ? void 0 : e.fontStyle) ?? "normal", i = (e == null ? void 0 : e.textDecoration) ?? "none", l = [];
1921
- return n === "bold" && l.push("bold"), r === "italic" && l.push("italic"), Bs(i) && l.push("underline"), Os(i) && l.push("strikethrough"), /* @__PURE__ */ o(Z, { alignItems: "flex-start", children: /* @__PURE__ */ w(
1960
+ return n === "bold" && l.push("bold"), r === "italic" && l.push("italic"), Ts(i) && l.push("underline"), _s(i) && l.push("strikethrough"), /* @__PURE__ */ o(Z, { alignItems: "flex-start", children: /* @__PURE__ */ w(
1922
1961
  bo,
1923
1962
  {
1924
1963
  size: "small",
@@ -1933,15 +1972,15 @@ function Ms({ value: e, onChange: t }) {
1933
1972
  },
1934
1973
  sx: { flexWrap: "nowrap" },
1935
1974
  children: [
1936
- /* @__PURE__ */ o(le, { value: "bold", "aria-label": "bold", children: /* @__PURE__ */ o(Ti, { fontSize: "small" }) }),
1937
- /* @__PURE__ */ o(le, { value: "italic", "aria-label": "italic", children: /* @__PURE__ */ o(_i, { fontSize: "small" }) }),
1938
- /* @__PURE__ */ o(le, { value: "underline", "aria-label": "underline", children: /* @__PURE__ */ o(Bi, { fontSize: "small" }) }),
1939
- /* @__PURE__ */ o(le, { value: "strikethrough", "aria-label": "strikethrough", children: /* @__PURE__ */ o(Oi, { fontSize: "small" }) })
1975
+ /* @__PURE__ */ o(le, { value: "bold", "aria-label": "bold", children: /* @__PURE__ */ o(Ql, { fontSize: "small" }) }),
1976
+ /* @__PURE__ */ o(le, { value: "italic", "aria-label": "italic", children: /* @__PURE__ */ o(ei, { fontSize: "small" }) }),
1977
+ /* @__PURE__ */ o(le, { value: "underline", "aria-label": "underline", children: /* @__PURE__ */ o(ti, { fontSize: "small" }) }),
1978
+ /* @__PURE__ */ o(le, { value: "strikethrough", "aria-label": "strikethrough", children: /* @__PURE__ */ o(ni, { fontSize: "small" }) })
1940
1979
  ]
1941
1980
  }
1942
1981
  ) });
1943
1982
  }
1944
- const Ns = [
1983
+ const Ms = [
1945
1984
  {
1946
1985
  key: "MODERN_SANS",
1947
1986
  label: "Modern sans",
@@ -1987,8 +2026,8 @@ const Ns = [
1987
2026
  label: "Monospace",
1988
2027
  value: "monospace"
1989
2028
  }
1990
- ], Rs = Ns.map((e) => /* @__PURE__ */ o(on, { value: e.key, sx: { fontFamily: e.value }, children: e.label }, e.key));
1991
- function al({ label: e, onChange: t, defaultValue: n }) {
2029
+ ], Os = Ms.map((e) => /* @__PURE__ */ o(on, { value: e.key, sx: { fontFamily: e.value }, children: e.label }, e.key));
2030
+ function sl({ label: e, onChange: t, defaultValue: n }) {
1992
2031
  const [r, i] = z(n ?? "inherit");
1993
2032
  return /* @__PURE__ */ w(
1994
2033
  dt,
@@ -2003,7 +2042,7 @@ function al({ label: e, onChange: t, defaultValue: n }) {
2003
2042
  },
2004
2043
  children: [
2005
2044
  /* @__PURE__ */ o(on, { value: "inherit", children: "Match email settings" }),
2006
- Rs
2045
+ Os
2007
2046
  ]
2008
2047
  }
2009
2048
  );
@@ -2012,7 +2051,7 @@ function Vt({ iconLabel: e, value: t, setValue: n, units: r, ...i }) {
2012
2051
  return /* @__PURE__ */ w(Z, { direction: "row", alignItems: "center", spacing: 2, justifyContent: "space-between", width: "100%", children: [
2013
2052
  /* @__PURE__ */ o(se, { sx: { minWidth: 24, lineHeight: 1, flexShrink: 0 }, children: e }),
2014
2053
  /* @__PURE__ */ o(
2015
- Nl,
2054
+ Rl,
2016
2055
  {
2017
2056
  ...i,
2018
2057
  value: t,
@@ -2029,7 +2068,7 @@ function Vt({ iconLabel: e, value: t, setValue: n, units: r, ...i }) {
2029
2068
  ] }) })
2030
2069
  ] });
2031
2070
  }
2032
- function Ps({ label: e, defaultValue: t, onChange: n }) {
2071
+ function Ns({ label: e, defaultValue: t, onChange: n }) {
2033
2072
  const r = t ?? 14, [i, l] = z(r);
2034
2073
  return Ce(() => {
2035
2074
  l(t ?? 14);
@@ -2038,7 +2077,7 @@ function Ps({ label: e, defaultValue: t, onChange: n }) {
2038
2077
  /* @__PURE__ */ o(
2039
2078
  Vt,
2040
2079
  {
2041
- iconLabel: /* @__PURE__ */ o(Gl, { sx: { fontSize: 16 } }),
2080
+ iconLabel: /* @__PURE__ */ o(ri, { sx: { fontSize: 16 } }),
2042
2081
  value: i,
2043
2082
  setValue: (c) => {
2044
2083
  l(c), n(c);
@@ -2051,7 +2090,7 @@ function Ps({ label: e, defaultValue: t, onChange: n }) {
2051
2090
  )
2052
2091
  ] });
2053
2092
  }
2054
- function Fs({ label: e, defaultValue: t, onChange: n }) {
2093
+ function Rs({ label: e, defaultValue: t, onChange: n }) {
2055
2094
  const { t: r } = Se(), i = t || "normal", [l, a] = z(i);
2056
2095
  return Ce(() => {
2057
2096
  a(i);
@@ -2070,7 +2109,7 @@ function Fs({ label: e, defaultValue: t, onChange: n }) {
2070
2109
  }
2071
2110
  );
2072
2111
  }
2073
- function zs({ label: e, defaultValue: t, onChange: n }) {
2112
+ function Ps({ label: e, defaultValue: t, onChange: n }) {
2074
2113
  const { t: r } = Se(), i = t ?? "normal", [l, a] = z(i);
2075
2114
  return Ce(() => {
2076
2115
  a(i);
@@ -2089,13 +2128,13 @@ function zs({ label: e, defaultValue: t, onChange: n }) {
2089
2128
  }
2090
2129
  );
2091
2130
  }
2092
- const sl = -5, cl = 50, er = 0;
2131
+ const cl = -5, ul = 50, er = 0;
2093
2132
  function tr(e) {
2094
2133
  if (e == null) return er;
2095
2134
  const t = typeof e == "number" ? e : parseFloat(String(e));
2096
- return Number.isFinite(t) ? Math.max(sl, Math.min(cl, t)) : er;
2135
+ return Number.isFinite(t) ? Math.max(cl, Math.min(ul, t)) : er;
2097
2136
  }
2098
- function Ls({ label: e, defaultValue: t, onChange: n }) {
2137
+ function Fs({ label: e, defaultValue: t, onChange: n }) {
2099
2138
  const r = tr(t), [i, l] = z(r);
2100
2139
  return Ce(() => {
2101
2140
  l(tr(t));
@@ -2104,21 +2143,21 @@ function Ls({ label: e, defaultValue: t, onChange: n }) {
2104
2143
  /* @__PURE__ */ o(
2105
2144
  Vt,
2106
2145
  {
2107
- iconLabel: /* @__PURE__ */ o(Jl, { sx: { fontSize: 16 } }),
2146
+ iconLabel: /* @__PURE__ */ o(li, { sx: { fontSize: 16 } }),
2108
2147
  value: i,
2109
2148
  setValue: (c) => {
2110
2149
  l(c), n(c);
2111
2150
  },
2112
2151
  units: "px",
2113
2152
  step: 1,
2114
- min: sl,
2115
- max: cl
2153
+ min: cl,
2154
+ max: ul
2116
2155
  }
2117
2156
  )
2118
2157
  ] });
2119
2158
  }
2120
- const Ws = [1, 1.5, 2, 2.5, 3], nr = 1.5;
2121
- function Hs({ label: e, defaultValue: t, onChange: n }) {
2159
+ const zs = [1, 1.5, 2, 2.5, 3], nr = 1.5;
2160
+ function Ls({ label: e, defaultValue: t, onChange: n }) {
2122
2161
  const [r, i] = z(t ?? nr);
2123
2162
  return Ce(() => {
2124
2163
  i(t ?? nr);
@@ -2134,11 +2173,11 @@ function Hs({ label: e, defaultValue: t, onChange: n }) {
2134
2173
  const a = Number(l.target.value);
2135
2174
  i(a), n(a);
2136
2175
  },
2137
- children: Ws.map((l) => /* @__PURE__ */ o(on, { value: l, children: l }, l))
2176
+ children: zs.map((l) => /* @__PURE__ */ o(on, { value: l, children: l }, l))
2138
2177
  }
2139
2178
  );
2140
2179
  }
2141
- function Vs({ label: e, defaultValue: t, onChange: n }) {
2180
+ function Ws({ label: e, defaultValue: t, onChange: n }) {
2142
2181
  const [r, i] = z(() => t || {
2143
2182
  top: 0,
2144
2183
  left: 0,
@@ -2157,7 +2196,7 @@ function Vs({ label: e, defaultValue: t, onChange: n }) {
2157
2196
  /* @__PURE__ */ o(
2158
2197
  Vt,
2159
2198
  {
2160
- iconLabel: /* @__PURE__ */ o(Zl, { sx: { fontSize: 16 } }),
2199
+ iconLabel: /* @__PURE__ */ o(ci, { sx: { fontSize: 16 } }),
2161
2200
  value: r.top,
2162
2201
  setValue: (a) => l("top", a),
2163
2202
  units: "px",
@@ -2170,7 +2209,7 @@ function Vs({ label: e, defaultValue: t, onChange: n }) {
2170
2209
  /* @__PURE__ */ o(
2171
2210
  Vt,
2172
2211
  {
2173
- iconLabel: /* @__PURE__ */ o(Ql, { sx: { fontSize: 16 } }),
2212
+ iconLabel: /* @__PURE__ */ o(si, { sx: { fontSize: 16 } }),
2174
2213
  value: r.bottom,
2175
2214
  setValue: (a) => l("bottom", a),
2176
2215
  units: "px",
@@ -2183,7 +2222,7 @@ function Vs({ label: e, defaultValue: t, onChange: n }) {
2183
2222
  /* @__PURE__ */ o(
2184
2223
  Vt,
2185
2224
  {
2186
- iconLabel: /* @__PURE__ */ o(ei, { sx: { fontSize: 16 } }),
2225
+ iconLabel: /* @__PURE__ */ o(ii, { sx: { fontSize: 16 } }),
2187
2226
  value: r.left,
2188
2227
  setValue: (a) => l("left", a),
2189
2228
  units: "px",
@@ -2196,7 +2235,7 @@ function Vs({ label: e, defaultValue: t, onChange: n }) {
2196
2235
  /* @__PURE__ */ o(
2197
2236
  Vt,
2198
2237
  {
2199
- iconLabel: /* @__PURE__ */ o(ti, { sx: { fontSize: 16 } }),
2238
+ iconLabel: /* @__PURE__ */ o(ai, { sx: { fontSize: 16 } }),
2200
2239
  value: r.right,
2201
2240
  setValue: (a) => l("right", a),
2202
2241
  units: "px",
@@ -2224,7 +2263,7 @@ function un({ label: e, defaultValue: t, onChange: n, ...r }) {
2224
2263
  )
2225
2264
  ] });
2226
2265
  }
2227
- function Us({ label: e, defaultValue: t, onChange: n }) {
2266
+ function Hs({ label: e, defaultValue: t, onChange: n }) {
2228
2267
  const [r, i] = z(t ?? "left");
2229
2268
  return /* @__PURE__ */ w(
2230
2269
  ft,
@@ -2235,14 +2274,14 @@ function Us({ label: e, defaultValue: t, onChange: n }) {
2235
2274
  i(l), n(l);
2236
2275
  },
2237
2276
  children: [
2238
- /* @__PURE__ */ o(le, { value: "left", children: /* @__PURE__ */ o(ni, { fontSize: "small" }) }),
2239
- /* @__PURE__ */ o(le, { value: "center", children: /* @__PURE__ */ o(oi, { fontSize: "small" }) }),
2240
- /* @__PURE__ */ o(le, { value: "right", children: /* @__PURE__ */ o(ri, { fontSize: "small" }) })
2277
+ /* @__PURE__ */ o(le, { value: "left", children: /* @__PURE__ */ o(di, { fontSize: "small" }) }),
2278
+ /* @__PURE__ */ o(le, { value: "center", children: /* @__PURE__ */ o(ui, { fontSize: "small" }) }),
2279
+ /* @__PURE__ */ o(le, { value: "right", children: /* @__PURE__ */ o(pi, { fontSize: "small" }) })
2241
2280
  ]
2242
2281
  }
2243
2282
  );
2244
2283
  }
2245
- function $s({ label: e, defaultValue: t, onChange: n }) {
2284
+ function Vs({ label: e, defaultValue: t, onChange: n }) {
2246
2285
  const { t: r } = Se(), i = t || "none", [l, a] = z(i);
2247
2286
  return Ce(() => {
2248
2287
  a(i);
@@ -2268,14 +2307,14 @@ function or({ name: e, value: t, onChange: n }) {
2268
2307
  };
2269
2308
  switch (e) {
2270
2309
  case "backgroundColor":
2271
- return /* @__PURE__ */ o(Ln, { label: r("style.backgroundColor"), defaultValue: i, onChange: l });
2310
+ return /* @__PURE__ */ o(Wn, { label: r("style.backgroundColor"), defaultValue: i, onChange: l });
2272
2311
  case "borderColor":
2273
- return /* @__PURE__ */ o(Ln, { label: r("style.borderColor"), defaultValue: i, onChange: l });
2312
+ return /* @__PURE__ */ o(Wn, { label: r("style.borderColor"), defaultValue: i, onChange: l });
2274
2313
  case "borderRadius":
2275
2314
  return /* @__PURE__ */ o(
2276
2315
  un,
2277
2316
  {
2278
- iconLabel: /* @__PURE__ */ o(li, {}),
2317
+ iconLabel: /* @__PURE__ */ o(oi, {}),
2279
2318
  units: "px",
2280
2319
  step: 4,
2281
2320
  marks: !0,
@@ -2287,45 +2326,45 @@ function or({ name: e, value: t, onChange: n }) {
2287
2326
  }
2288
2327
  );
2289
2328
  case "color":
2290
- return /* @__PURE__ */ o(Ln, { label: r("style.textColor"), defaultValue: i, onChange: l });
2329
+ return /* @__PURE__ */ o(Wn, { label: r("style.textColor"), defaultValue: i, onChange: l });
2291
2330
  case "fontFamily":
2292
- return /* @__PURE__ */ o(al, { label: r("style.fontFamily"), defaultValue: i, onChange: l });
2331
+ return /* @__PURE__ */ o(sl, { label: r("style.fontFamily"), defaultValue: i, onChange: l });
2293
2332
  case "fontSize":
2294
- return /* @__PURE__ */ o(Ps, { label: r("style.fontSize"), defaultValue: i, onChange: l });
2333
+ return /* @__PURE__ */ o(Ns, { label: r("style.fontSize"), defaultValue: i, onChange: l });
2295
2334
  case "fontWeight":
2296
- return /* @__PURE__ */ o(zs, { label: r("style.fontWeight"), defaultValue: i, onChange: l });
2335
+ return /* @__PURE__ */ o(Ps, { label: r("style.fontWeight"), defaultValue: i, onChange: l });
2297
2336
  case "fontStyle":
2298
- return /* @__PURE__ */ o(Fs, { label: r("style.fontStyle"), defaultValue: i, onChange: l });
2337
+ return /* @__PURE__ */ o(Rs, { label: r("style.fontStyle"), defaultValue: i, onChange: l });
2299
2338
  case "textDecoration":
2300
- return /* @__PURE__ */ o($s, { label: r("style.textDecoration"), defaultValue: i, onChange: l });
2339
+ return /* @__PURE__ */ o(Vs, { label: r("style.textDecoration"), defaultValue: i, onChange: l });
2301
2340
  case "lineHeight":
2302
- return /* @__PURE__ */ o(Hs, { label: r("style.lineHeight"), defaultValue: i, onChange: l });
2341
+ return /* @__PURE__ */ o(Ls, { label: r("style.lineHeight"), defaultValue: i, onChange: l });
2303
2342
  case "letterSpacing":
2304
- return /* @__PURE__ */ o(Ls, { label: r("style.letterSpacing"), defaultValue: i, onChange: l });
2343
+ return /* @__PURE__ */ o(Fs, { label: r("style.letterSpacing"), defaultValue: i, onChange: l });
2305
2344
  case "textAlign":
2306
- return /* @__PURE__ */ o(Us, { label: r("style.alignment"), defaultValue: i, onChange: l });
2345
+ return /* @__PURE__ */ o(Hs, { label: r("style.alignment"), defaultValue: i, onChange: l });
2307
2346
  case "padding":
2308
- return /* @__PURE__ */ o(Vs, { label: r("style.padding"), defaultValue: i, onChange: l });
2347
+ return /* @__PURE__ */ o(Ws, { label: r("style.padding"), defaultValue: i, onChange: l });
2309
2348
  }
2310
2349
  }
2311
- const ul = ["fontWeight", "fontStyle", "textDecoration"];
2312
- function js(e) {
2313
- return ul.every((t) => e.includes(t));
2350
+ const dl = ["fontWeight", "fontStyle", "textDecoration"];
2351
+ function Us(e) {
2352
+ return dl.every((t) => e.includes(t));
2314
2353
  }
2315
2354
  function gt({ names: e, value: t, onChange: n }) {
2316
- const { t: r } = Se(), i = js(e);
2317
- return /* @__PURE__ */ o(an, { children: e.map((l) => ul.includes(l) ? null : l === "letterSpacing" && i ? /* @__PURE__ */ w(mt.Fragment, { children: [
2355
+ const { t: r } = Se(), i = Us(e);
2356
+ return /* @__PURE__ */ o(an, { children: e.map((l) => dl.includes(l) ? null : l === "letterSpacing" && i ? /* @__PURE__ */ w(mt.Fragment, { children: [
2318
2357
  /* @__PURE__ */ o(or, { name: "letterSpacing", value: t || {}, onChange: n }),
2319
2358
  /* @__PURE__ */ w(Z, { alignItems: "flex-start", sx: { mt: 1 }, children: [
2320
2359
  /* @__PURE__ */ o(At, { shrink: !0, children: r("style.formatGroup") }),
2321
- /* @__PURE__ */ o(Ms, { value: t || {}, onChange: n })
2360
+ /* @__PURE__ */ o(Bs, { value: t || {}, onChange: n })
2322
2361
  ] })
2323
2362
  ] }, "letterSpacing-and-format") : /* @__PURE__ */ o(or, { name: l, value: t || {}, onChange: n }, l)) });
2324
2363
  }
2325
- function Ks({ data: e, setData: t }) {
2364
+ function $s({ data: e, setData: t }) {
2326
2365
  var g, f, m, h, b, S;
2327
2366
  const { t: n } = Se(), [, r] = z(null), i = (y) => {
2328
- const k = Mr.safeParse(y);
2367
+ const k = Or.safeParse(y);
2329
2368
  k.success ? (t(k.data), r(null)) : r(k.error);
2330
2369
  }, l = ((g = e.props) == null ? void 0 : g.url) ?? Kt.url, a = ((f = e.props) == null ? void 0 : f.fullWidth) ?? Kt.fullWidth, c = ((m = e.props) == null ? void 0 : m.size) ?? Kt.size, s = ((h = e.props) == null ? void 0 : h.buttonStyle) ?? Kt.buttonStyle, d = ((b = e.props) == null ? void 0 : b.buttonTextColor) ?? Kt.buttonTextColor, u = ((S = e.props) == null ? void 0 : S.buttonBackgroundColor) ?? Kt.buttonBackgroundColor;
2331
2370
  return /* @__PURE__ */ w(it, { title: n("button.title"), children: [
@@ -2402,10 +2441,10 @@ function Ks({ data: e, setData: t }) {
2402
2441
  )
2403
2442
  ] });
2404
2443
  }
2405
- const qs = Lr.shape.props.unwrap().unwrap().shape, Xn = J.object({
2406
- style: Lr.shape.style,
2444
+ const js = Rr.shape.props.unwrap().unwrap().shape, Xn = J.object({
2445
+ style: Rr.shape.style,
2407
2446
  props: J.object({
2408
- ...qs,
2447
+ ...js,
2409
2448
  columnsCount: J.number().min(1).max(4).optional().nullable(),
2410
2449
  columns: J.array(J.object({ childrenIds: J.array(J.string()) })).min(1).max(4),
2411
2450
  fixedWidths: J.tuple([
@@ -2416,7 +2455,7 @@ const qs = Lr.shape.props.unwrap().unwrap().shape, Xn = J.object({
2416
2455
  ]).optional().nullable()
2417
2456
  }).optional().nullable()
2418
2457
  });
2419
- function Ys({ data: e, setData: t }) {
2458
+ function Ks({ data: e, setData: t }) {
2420
2459
  var P, he, be, ce, _;
2421
2460
  const { t: n } = Se(), r = Qe(), i = cn(), [, l] = z(null), a = (x) => {
2422
2461
  const T = Xn.safeParse(x);
@@ -2623,7 +2662,7 @@ function Ys({ data: e, setData: t }) {
2623
2662
  un,
2624
2663
  {
2625
2664
  label: n("columns.gap"),
2626
- iconLabel: /* @__PURE__ */ o(ii, { sx: { color: "text.secondary" } }),
2665
+ iconLabel: /* @__PURE__ */ o(fi, { sx: { color: "text.secondary" } }),
2627
2666
  units: "px",
2628
2667
  step: 4,
2629
2668
  marks: !0,
@@ -2642,10 +2681,10 @@ function Ys({ data: e, setData: t }) {
2642
2681
  a({ ...e, props: { ...e.props, contentAlignment: x } });
2643
2682
  },
2644
2683
  children: [
2645
- /* @__PURE__ */ o(le, { value: "top", title: n("columns.alignmentTop"), children: /* @__PURE__ */ o(So, { fontSize: "small" }) }),
2684
+ /* @__PURE__ */ o(le, { value: "top", title: n("columns.alignmentTop"), children: /* @__PURE__ */ o(wo, { fontSize: "small" }) }),
2646
2685
  /* @__PURE__ */ o(le, { value: "middle", title: n("columns.alignmentMiddle"), children: /* @__PURE__ */ o(vo, { fontSize: "small" }) }),
2647
- /* @__PURE__ */ o(le, { value: "bottom", title: n("columns.alignmentBottom"), children: /* @__PURE__ */ o(wo, { fontSize: "small" }) }),
2648
- /* @__PURE__ */ o(le, { value: "stretch", title: n("columns.alignmentStretch"), children: /* @__PURE__ */ o(ai, { fontSize: "small" }) })
2686
+ /* @__PURE__ */ o(le, { value: "bottom", title: n("columns.alignmentBottom"), children: /* @__PURE__ */ o(So, { fontSize: "small" }) }),
2687
+ /* @__PURE__ */ o(le, { value: "stretch", title: n("columns.alignmentStretch"), children: /* @__PURE__ */ o(mi, { fontSize: "small" }) })
2649
2688
  ]
2650
2689
  }
2651
2690
  ),
@@ -2661,21 +2700,21 @@ function Ys({ data: e, setData: t }) {
2661
2700
  /* @__PURE__ */ o(yr, { children: n("columns.confirmChangeTitle") }),
2662
2701
  /* @__PURE__ */ o(xr, { children: /* @__PURE__ */ o(ke, { children: n("columns.confirmChangeMessage") }) }),
2663
2702
  /* @__PURE__ */ w(Sr, { children: [
2664
- /* @__PURE__ */ o(Oe, { variant: "outlined", color: "primary", onClick: () => h(!1), children: n("columns.cancel") }),
2665
- /* @__PURE__ */ o(Oe, { variant: "contained", color: "error", onClick: () => h(!0), children: n("columns.confirm") })
2703
+ /* @__PURE__ */ o(Me, { variant: "outlined", color: "primary", onClick: () => h(!1), children: n("columns.cancel") }),
2704
+ /* @__PURE__ */ o(Me, { variant: "contained", color: "error", onClick: () => h(!0), children: n("columns.confirm") })
2666
2705
  ] })
2667
2706
  ] })
2668
2707
  ] });
2669
2708
  }
2670
- const dl = J.object({
2671
- style: Ni.shape.style,
2709
+ const pl = J.object({
2710
+ style: hi.shape.style,
2672
2711
  props: J.object({
2673
2712
  childrenIds: J.array(J.string()).optional().nullable()
2674
2713
  }).optional().nullable()
2675
2714
  });
2676
- function Xs({ data: e, setData: t }) {
2715
+ function qs({ data: e, setData: t }) {
2677
2716
  const { t: n } = Se(), [, r] = z(null), i = (l) => {
2678
- const a = dl.safeParse(l);
2717
+ const a = pl.safeParse(l);
2679
2718
  a.success ? (t(a.data), r(null)) : r(a.error);
2680
2719
  };
2681
2720
  return /* @__PURE__ */ o(it, { title: n("container.title"), children: /* @__PURE__ */ o(
@@ -2687,10 +2726,10 @@ function Xs({ data: e, setData: t }) {
2687
2726
  }
2688
2727
  ) });
2689
2728
  }
2690
- function Gs({ data: e, setData: t }) {
2729
+ function Ys({ data: e, setData: t }) {
2691
2730
  var c, s;
2692
2731
  const { t: n } = Se(), [, r] = z(null), i = (d) => {
2693
- const u = Wr.safeParse(d);
2732
+ const u = Fr.safeParse(d);
2694
2733
  u.success ? (t(u.data), r(null)) : r(u.error);
2695
2734
  }, l = ((c = e.props) == null ? void 0 : c.lineColor) ?? Vo.lineColor, a = ((s = e.props) == null ? void 0 : s.lineHeight) ?? Vo.lineHeight;
2696
2735
  return /* @__PURE__ */ w(it, { title: n("divider.title"), children: [
@@ -2706,7 +2745,7 @@ function Gs({ data: e, setData: t }) {
2706
2745
  un,
2707
2746
  {
2708
2747
  label: n("divider.height"),
2709
- iconLabel: /* @__PURE__ */ o(Rr, { sx: { color: "text.secondary" } }),
2748
+ iconLabel: /* @__PURE__ */ o(Pr, { sx: { color: "text.secondary" } }),
2710
2749
  units: "px",
2711
2750
  step: 1,
2712
2751
  min: 1,
@@ -2725,7 +2764,7 @@ function Gs({ data: e, setData: t }) {
2725
2764
  )
2726
2765
  ] });
2727
2766
  }
2728
- const Nn = J.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(), Js = J.enum([
2767
+ const Rn = J.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(), Xs = J.enum([
2729
2768
  "MODERN_SANS",
2730
2769
  "BOOK_SANS",
2731
2770
  "ORGANIC_SANS",
@@ -2735,19 +2774,19 @@ const Nn = J.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(), Js = J.e
2735
2774
  "MODERN_SERIF",
2736
2775
  "BOOK_SERIF",
2737
2776
  "MONOSPACE"
2738
- ]).nullable().optional(), pl = J.object({
2739
- backdropColor: Nn,
2740
- borderColor: Nn,
2777
+ ]).nullable().optional(), fl = J.object({
2778
+ backdropColor: Rn,
2779
+ borderColor: Rn,
2741
2780
  borderRadius: J.number().optional().nullable(),
2742
- canvasColor: Nn,
2743
- textColor: Nn,
2744
- fontFamily: Js,
2781
+ canvasColor: Rn,
2782
+ textColor: Rn,
2783
+ fontFamily: Xs,
2745
2784
  width: J.number().optional().nullable(),
2746
2785
  childrenIds: J.array(J.string()).optional().nullable()
2747
2786
  });
2748
- function fl({ data: e, setData: t }) {
2787
+ function ml({ data: e, setData: t }) {
2749
2788
  const { t: n } = Se(), [, r] = z(null), i = (l) => {
2750
- const a = pl.safeParse(l);
2789
+ const a = fl.safeParse(l);
2751
2790
  a.success ? (t(a.data), r(null)) : r(a.error);
2752
2791
  };
2753
2792
  return /* @__PURE__ */ w(it, { title: n("emailLayout.global"), children: [
@@ -2768,7 +2807,7 @@ function fl({ data: e, setData: t }) {
2768
2807
  }
2769
2808
  ),
2770
2809
  /* @__PURE__ */ o(
2771
- Ln,
2810
+ Wn,
2772
2811
  {
2773
2812
  label: n("emailLayout.canvasBorderColor"),
2774
2813
  defaultValue: e.borderColor ?? null,
@@ -2778,7 +2817,7 @@ function fl({ data: e, setData: t }) {
2778
2817
  /* @__PURE__ */ o(
2779
2818
  un,
2780
2819
  {
2781
- iconLabel: /* @__PURE__ */ o(Pr, {}),
2820
+ iconLabel: /* @__PURE__ */ o(zr, {}),
2782
2821
  units: "px",
2783
2822
  step: 20,
2784
2823
  marks: !0,
@@ -2790,7 +2829,7 @@ function fl({ data: e, setData: t }) {
2790
2829
  }
2791
2830
  ),
2792
2831
  /* @__PURE__ */ o(
2793
- al,
2832
+ sl,
2794
2833
  {
2795
2834
  label: n("emailLayout.fontFamily"),
2796
2835
  defaultValue: "MODERN_SANS",
@@ -2807,10 +2846,10 @@ function fl({ data: e, setData: t }) {
2807
2846
  )
2808
2847
  ] });
2809
2848
  }
2810
- function Zs({ data: e, setData: t }) {
2849
+ function Gs({ data: e, setData: t }) {
2811
2850
  var l;
2812
2851
  const { t: n } = Se(), [, r] = z(null), i = (a) => {
2813
- const c = Hr.safeParse(a);
2852
+ const c = Lr.safeParse(a);
2814
2853
  c.success ? (t(c.data), r(null)) : r(c.error);
2815
2854
  };
2816
2855
  return /* @__PURE__ */ w(it, { title: n("heading.title"), children: [
@@ -2818,7 +2857,7 @@ function Zs({ data: e, setData: t }) {
2818
2857
  ft,
2819
2858
  {
2820
2859
  label: n("heading.level"),
2821
- defaultValue: ((l = e.props) == null ? void 0 : l.level) ?? Fi.level,
2860
+ defaultValue: ((l = e.props) == null ? void 0 : l.level) ?? yi.level,
2822
2861
  onChange: (a) => {
2823
2862
  i({ ...e, props: { ...e.props, level: a } });
2824
2863
  },
@@ -2839,8 +2878,8 @@ function Zs({ data: e, setData: t }) {
2839
2878
  )
2840
2879
  ] });
2841
2880
  }
2842
- function Qs({ label: e, value: t, onChange: n, height: r = "200px" }) {
2843
- const [i, l] = mt.useState(t), a = Me(null);
2881
+ function Js({ label: e, value: t, onChange: n, height: r = "200px" }) {
2882
+ const [i, l] = mt.useState(t), a = Oe(null);
2844
2883
  Ce(() => {
2845
2884
  t !== i && l(t);
2846
2885
  }, [t]);
@@ -2869,12 +2908,12 @@ function Qs({ label: e, value: t, onChange: n, height: r = "200px" }) {
2869
2908
  }
2870
2909
  },
2871
2910
  children: /* @__PURE__ */ o(
2872
- Wi,
2911
+ vi,
2873
2912
  {
2874
2913
  value: i,
2875
2914
  height: r,
2876
- extensions: [Hi()],
2877
- theme: Vi,
2915
+ extensions: [wi()],
2916
+ theme: Ii,
2878
2917
  onChange: c,
2879
2918
  basicSetup: {
2880
2919
  lineNumbers: !0,
@@ -2888,15 +2927,15 @@ function Qs({ label: e, value: t, onChange: n, height: r = "200px" }) {
2888
2927
  )
2889
2928
  ] });
2890
2929
  }
2891
- function ec({ data: e, setData: t }) {
2930
+ function Zs({ data: e, setData: t }) {
2892
2931
  var l;
2893
2932
  const { t: n } = Se(), [, r] = z(null), i = (a) => {
2894
- const c = Vr.safeParse(a);
2933
+ const c = Wr.safeParse(a);
2895
2934
  c.success ? (t(c.data), r(null)) : r(c.error);
2896
2935
  };
2897
2936
  return /* @__PURE__ */ w(it, { title: n("html.title"), children: [
2898
2937
  /* @__PURE__ */ o(
2899
- Qs,
2938
+ Js,
2900
2939
  {
2901
2940
  label: n("html.content"),
2902
2941
  value: ((l = e.props) == null ? void 0 : l.contents) ?? "",
@@ -2914,7 +2953,7 @@ function ec({ data: e, setData: t }) {
2914
2953
  )
2915
2954
  ] });
2916
2955
  }
2917
- function $n({ label: e, defaultValue: t, onChange: n }) {
2956
+ function jn({ label: e, defaultValue: t, onChange: n }) {
2918
2957
  return /* @__PURE__ */ o(
2919
2958
  dt,
2920
2959
  {
@@ -2934,10 +2973,10 @@ function $n({ label: e, defaultValue: t, onChange: n }) {
2934
2973
  }
2935
2974
  );
2936
2975
  }
2937
- function tc({ data: e, setData: t }) {
2976
+ function Qs({ data: e, setData: t }) {
2938
2977
  var m, h, b, S, y, k;
2939
- const { t: n } = Se(), [, r] = z(null), [i, l] = z("url"), [a, c] = z(!1), s = Me(null), d = Xr(), u = (D) => {
2940
- const E = Ur.safeParse(D);
2978
+ const { t: n } = Se(), [, r] = z(null), [i, l] = z("url"), [a, c] = z(!1), s = Oe(null), d = Gr(), u = (D) => {
2979
+ const E = Hr.safeParse(D);
2941
2980
  E.success ? (t(E.data), r(null)) : r(E.error);
2942
2981
  }, g = async (D) => {
2943
2982
  var N;
@@ -2968,7 +3007,7 @@ function tc({ data: e, setData: t }) {
2968
3007
  size: "small",
2969
3008
  fullWidth: !0,
2970
3009
  children: [
2971
- /* @__PURE__ */ o(Kn, { fontSize: "small", sx: { mr: 0.5 } }),
3010
+ /* @__PURE__ */ o(An, { fontSize: "small", sx: { mr: 0.5 } }),
2972
3011
  n("image.url")
2973
3012
  ]
2974
3013
  }
@@ -3011,10 +3050,10 @@ function tc({ data: e, setData: t }) {
3011
3050
  }
3012
3051
  ),
3013
3052
  /* @__PURE__ */ o(
3014
- Oe,
3053
+ Me,
3015
3054
  {
3016
3055
  variant: "outlined",
3017
- startIcon: a ? /* @__PURE__ */ o(jn, { size: 16 }) : /* @__PURE__ */ o(Ft, {}),
3056
+ startIcon: a ? /* @__PURE__ */ o(Kn, { size: 16 }) : /* @__PURE__ */ o(Ft, {}),
3018
3057
  onClick: f,
3019
3058
  disabled: a || !d,
3020
3059
  fullWidth: !0,
@@ -3045,7 +3084,7 @@ function tc({ data: e, setData: t }) {
3045
3084
  ),
3046
3085
  /* @__PURE__ */ w(Z, { direction: "row", spacing: 2, children: [
3047
3086
  /* @__PURE__ */ o(
3048
- $n,
3087
+ jn,
3049
3088
  {
3050
3089
  label: n("image.width"),
3051
3090
  defaultValue: (S = e.props) == null ? void 0 : S.width,
@@ -3053,7 +3092,7 @@ function tc({ data: e, setData: t }) {
3053
3092
  }
3054
3093
  ),
3055
3094
  /* @__PURE__ */ o(
3056
- $n,
3095
+ jn,
3057
3096
  {
3058
3097
  label: n("image.height"),
3059
3098
  defaultValue: (y = e.props) == null ? void 0 : y.height,
@@ -3068,9 +3107,9 @@ function tc({ data: e, setData: t }) {
3068
3107
  defaultValue: ((k = e.props) == null ? void 0 : k.contentAlignment) ?? "middle",
3069
3108
  onChange: (D) => u({ ...e, props: { ...e.props, contentAlignment: D } }),
3070
3109
  children: [
3071
- /* @__PURE__ */ o(le, { value: "top", children: /* @__PURE__ */ o(So, { fontSize: "small" }) }),
3110
+ /* @__PURE__ */ o(le, { value: "top", children: /* @__PURE__ */ o(wo, { fontSize: "small" }) }),
3072
3111
  /* @__PURE__ */ o(le, { value: "middle", children: /* @__PURE__ */ o(vo, { fontSize: "small" }) }),
3073
- /* @__PURE__ */ o(le, { value: "bottom", children: /* @__PURE__ */ o(wo, { fontSize: "small" }) })
3112
+ /* @__PURE__ */ o(le, { value: "bottom", children: /* @__PURE__ */ o(So, { fontSize: "small" }) })
3074
3113
  ]
3075
3114
  }
3076
3115
  ),
@@ -3084,7 +3123,7 @@ function tc({ data: e, setData: t }) {
3084
3123
  )
3085
3124
  ] });
3086
3125
  }
3087
- function ml() {
3126
+ function gl() {
3088
3127
  return J.object({
3089
3128
  top: J.number(),
3090
3129
  bottom: J.number(),
@@ -3092,7 +3131,7 @@ function ml() {
3092
3131
  left: J.number()
3093
3132
  });
3094
3133
  }
3095
- const gl = J.object({
3134
+ const hl = J.object({
3096
3135
  props: J.object({
3097
3136
  url: J.string().nullable().optional(),
3098
3137
  alt: J.string().optional().nullable(),
@@ -3106,19 +3145,19 @@ const gl = J.object({
3106
3145
  controls: J.boolean().optional().nullable()
3107
3146
  }).optional().nullable(),
3108
3147
  style: J.object({
3109
- padding: ml().optional().nullable(),
3148
+ padding: gl().optional().nullable(),
3110
3149
  backgroundColor: J.string().optional().nullable(),
3111
3150
  textAlign: J.enum(["left", "center", "right"]).optional().nullable()
3112
3151
  }).optional().nullable()
3113
3152
  });
3114
- function Rn({ label: e, defaultValue: t, onChange: n }) {
3153
+ function Pn({ label: e, defaultValue: t, onChange: n }) {
3115
3154
  const [r, i] = z(t);
3116
3155
  return /* @__PURE__ */ o(
3117
3156
  vr,
3118
3157
  {
3119
3158
  label: e,
3120
3159
  control: /* @__PURE__ */ o(
3121
- Rl,
3160
+ Pl,
3122
3161
  {
3123
3162
  checked: r,
3124
3163
  onChange: (l, a) => {
@@ -3129,10 +3168,10 @@ function Rn({ label: e, defaultValue: t, onChange: n }) {
3129
3168
  }
3130
3169
  );
3131
3170
  }
3132
- function nc({ data: e, setData: t }) {
3171
+ function ec({ data: e, setData: t }) {
3133
3172
  var m, h, b, S, y, k, D, E, N, W;
3134
- const { t: n } = Se(), [, r] = z(null), [i, l] = z("url"), [a, c] = z(!1), s = Me(null), d = Gr(), u = (P) => {
3135
- const he = gl.safeParse(P);
3173
+ const { t: n } = Se(), [, r] = z(null), [i, l] = z("url"), [a, c] = z(!1), s = Oe(null), d = Jr(), u = (P) => {
3174
+ const he = hl.safeParse(P);
3136
3175
  he.success ? (t(he.data), r(null)) : r(he.error);
3137
3176
  }, g = async (P) => {
3138
3177
  var be;
@@ -3163,7 +3202,7 @@ function nc({ data: e, setData: t }) {
3163
3202
  size: "small",
3164
3203
  fullWidth: !0,
3165
3204
  children: [
3166
- /* @__PURE__ */ o(Kn, { fontSize: "small", sx: { mr: 0.5 } }),
3205
+ /* @__PURE__ */ o(An, { fontSize: "small", sx: { mr: 0.5 } }),
3167
3206
  n("video.url")
3168
3207
  ]
3169
3208
  }
@@ -3206,10 +3245,10 @@ function nc({ data: e, setData: t }) {
3206
3245
  }
3207
3246
  ),
3208
3247
  /* @__PURE__ */ o(
3209
- Oe,
3248
+ Me,
3210
3249
  {
3211
3250
  variant: "outlined",
3212
- startIcon: a ? /* @__PURE__ */ o(jn, { size: 16 }) : /* @__PURE__ */ o(Ft, {}),
3251
+ startIcon: a ? /* @__PURE__ */ o(Kn, { size: 16 }) : /* @__PURE__ */ o(Ft, {}),
3213
3252
  onClick: f,
3214
3253
  disabled: a || !d,
3215
3254
  fullWidth: !0,
@@ -3240,7 +3279,7 @@ function nc({ data: e, setData: t }) {
3240
3279
  ),
3241
3280
  /* @__PURE__ */ w(Z, { direction: "row", spacing: 2, children: [
3242
3281
  /* @__PURE__ */ o(
3243
- $n,
3282
+ jn,
3244
3283
  {
3245
3284
  label: n("video.width"),
3246
3285
  defaultValue: (S = e.props) != null && S.width ? (() => {
@@ -3254,7 +3293,7 @@ function nc({ data: e, setData: t }) {
3254
3293
  }
3255
3294
  ),
3256
3295
  /* @__PURE__ */ o(
3257
- $n,
3296
+ jn,
3258
3297
  {
3259
3298
  label: n("video.height"),
3260
3299
  defaultValue: (y = e.props) != null && y.height ? (() => {
@@ -3275,15 +3314,15 @@ function nc({ data: e, setData: t }) {
3275
3314
  defaultValue: ((k = e.props) == null ? void 0 : k.contentAlignment) ?? "middle",
3276
3315
  onChange: (P) => u({ ...e, props: { ...e.props, contentAlignment: P } }),
3277
3316
  children: [
3278
- /* @__PURE__ */ o(le, { value: "top", children: /* @__PURE__ */ o(So, { fontSize: "small" }) }),
3317
+ /* @__PURE__ */ o(le, { value: "top", children: /* @__PURE__ */ o(wo, { fontSize: "small" }) }),
3279
3318
  /* @__PURE__ */ o(le, { value: "middle", children: /* @__PURE__ */ o(vo, { fontSize: "small" }) }),
3280
- /* @__PURE__ */ o(le, { value: "bottom", children: /* @__PURE__ */ o(wo, { fontSize: "small" }) })
3319
+ /* @__PURE__ */ o(le, { value: "bottom", children: /* @__PURE__ */ o(So, { fontSize: "small" }) })
3281
3320
  ]
3282
3321
  }
3283
3322
  ),
3284
3323
  /* @__PURE__ */ w(Z, { spacing: 1, children: [
3285
3324
  /* @__PURE__ */ o(
3286
- Rn,
3325
+ Pn,
3287
3326
  {
3288
3327
  label: n("video.autoplay"),
3289
3328
  defaultValue: ((D = e.props) == null ? void 0 : D.autoplay) ?? !1,
@@ -3291,7 +3330,7 @@ function nc({ data: e, setData: t }) {
3291
3330
  }
3292
3331
  ),
3293
3332
  /* @__PURE__ */ o(
3294
- Rn,
3333
+ Pn,
3295
3334
  {
3296
3335
  label: n("video.loop"),
3297
3336
  defaultValue: ((E = e.props) == null ? void 0 : E.loop) ?? !1,
@@ -3299,7 +3338,7 @@ function nc({ data: e, setData: t }) {
3299
3338
  }
3300
3339
  ),
3301
3340
  /* @__PURE__ */ o(
3302
- Rn,
3341
+ Pn,
3303
3342
  {
3304
3343
  label: n("video.muted"),
3305
3344
  defaultValue: ((N = e.props) == null ? void 0 : N.muted) ?? !1,
@@ -3307,7 +3346,7 @@ function nc({ data: e, setData: t }) {
3307
3346
  }
3308
3347
  ),
3309
3348
  /* @__PURE__ */ o(
3310
- Rn,
3349
+ Pn,
3311
3350
  {
3312
3351
  label: n("video.controls"),
3313
3352
  defaultValue: ((W = e.props) == null ? void 0 : W.controls) ?? !0,
@@ -3325,22 +3364,22 @@ function nc({ data: e, setData: t }) {
3325
3364
  )
3326
3365
  ] });
3327
3366
  }
3328
- function oc({ data: e, setData: t }) {
3367
+ function tc({ data: e, setData: t }) {
3329
3368
  var l;
3330
3369
  const { t: n } = Se(), [, r] = z(null), i = (a) => {
3331
- const c = $r.safeParse(a);
3370
+ const c = Vr.safeParse(a);
3332
3371
  c.success ? (t(c.data), r(null)) : r(c.error);
3333
3372
  };
3334
3373
  return /* @__PURE__ */ o(it, { title: n("spacer.title"), children: /* @__PURE__ */ o(
3335
3374
  un,
3336
3375
  {
3337
3376
  label: n("spacer.height"),
3338
- iconLabel: /* @__PURE__ */ o(Rr, { sx: { color: "text.secondary" } }),
3377
+ iconLabel: /* @__PURE__ */ o(Pr, { sx: { color: "text.secondary" } }),
3339
3378
  units: "px",
3340
3379
  step: 4,
3341
3380
  min: 4,
3342
3381
  max: 128,
3343
- defaultValue: ((l = e.props) == null ? void 0 : l.height) ?? $i.height,
3382
+ defaultValue: ((l = e.props) == null ? void 0 : l.height) ?? Di.height,
3344
3383
  onChange: (a) => i({ ...e, props: { ...e.props, height: a } })
3345
3384
  }
3346
3385
  ) });
@@ -3395,7 +3434,7 @@ const Ao = [
3395
3434
  items: [{ name: "unsubscribe_link", labelKey: "text.variables.unsubscribeLink", kind: "user" }]
3396
3435
  }
3397
3436
  ];
3398
- function rc(e) {
3437
+ function nc(e) {
3399
3438
  const t = e.baseGroups ?? Ao, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
3400
3439
  for (const l of t)
3401
3440
  for (const a of l.items)
@@ -3418,7 +3457,7 @@ const rr = [
3418
3457
  "fontWeight",
3419
3458
  "fontStyle",
3420
3459
  "textDecoration"
3421
- ], lc = [
3460
+ ], oc = [
3422
3461
  "color",
3423
3462
  "backgroundColor",
3424
3463
  "fontFamily",
@@ -3427,30 +3466,30 @@ const rr = [
3427
3466
  "fontWeight",
3428
3467
  "fontStyle",
3429
3468
  "textDecoration"
3430
- ], ic = ["lineHeight", "textAlign", "padding"], ac = Ao;
3431
- function sc({ blockId: e, data: t, setData: n }) {
3469
+ ], rc = ["lineHeight", "textAlign", "padding"], lc = Ao;
3470
+ function ic({ blockId: e, data: t, setData: n }) {
3432
3471
  var fe;
3433
- const { t: r } = Se(), [, i] = z(null), l = qr();
3434
- Yr();
3435
- const a = xa(), c = Kr(), s = ct(() => {
3436
- const I = (R) => typeof R == "string" ? R.trim() : "", M = (Array.isArray(c) ? c : []).filter((R) => {
3472
+ const { t: r } = Se(), [, i] = z(null), l = Yr();
3473
+ Xr();
3474
+ const a = Ca(), c = qr(), s = ct(() => {
3475
+ const I = (R) => typeof R == "string" ? R.trim() : "", O = (Array.isArray(c) ? c : []).filter((R) => {
3437
3476
  if (!I(R == null ? void 0 : R.AttrField)) return !1;
3438
3477
  const Ee = R == null ? void 0 : R.Enable;
3439
3478
  return !(Ee === 0 || Ee === !1);
3440
3479
  }).map((R) => {
3441
3480
  const de = I(R == null ? void 0 : R.AttrField), Ee = I(R == null ? void 0 : R.AttrComment) || I(R == null ? void 0 : R.Name) || de;
3442
3481
  return { name: de, labelKey: Ee, kind: "user", isCustomLabel: !0 };
3443
- }), $ = ac.map((R) => ({
3482
+ }), $ = lc.map((R) => ({
3444
3483
  ...R,
3445
3484
  items: R.items.map((de) => ({ ...de, isCustomLabel: !1 }))
3446
3485
  })), j = $.find((R) => R.id === "contacts");
3447
3486
  if (j) {
3448
3487
  const R = new Set(j.items.map((de) => de.name));
3449
- for (const de of M)
3488
+ for (const de of O)
3450
3489
  R.has(de.name) || j.items.push(de);
3451
3490
  }
3452
3491
  return $;
3453
- }, [c]), d = Me({}), u = Me(null), g = en(() => {
3492
+ }, [c]), d = Oe({}), u = Oe(null), g = en(() => {
3454
3493
  u.current = null;
3455
3494
  const I = d.current;
3456
3495
  d.current = {}, Object.keys(I).length !== 0 && (Sn(), qt(e, { kind: "style", style: I }));
@@ -3461,23 +3500,23 @@ function sc({ blockId: e, data: t, setData: n }) {
3461
3500
  const f = (l == null ? void 0 : l.blockId) === e && l.start < l.end, m = ct(() => {
3462
3501
  const I = t.style ?? {};
3463
3502
  if (!f || !l) return I;
3464
- const M = Ht(t.props ?? null), $ = fs(M, l.start, l.end);
3503
+ const O = Ht(t.props ?? null), $ = ds(O, l.start, l.end);
3465
3504
  if ($ && Object.keys($).length) return { ...I, ...$ };
3466
3505
  const j = (a == null ? void 0 : a.blockId) === e ? a.styleSnapshot : void 0;
3467
3506
  return j && Object.keys(j).length ? { ...I, ...j } : I;
3468
3507
  }, [t.style, t.props, f, l, a, e]), h = (I) => {
3469
- const M = Br.safeParse(I);
3470
- M.success ? (n(M.data), i(null)) : i(M.error);
3508
+ const O = Br.safeParse(I);
3509
+ O.success ? (n(O.data), i(null)) : i(O.error);
3471
3510
  }, b = (I) => {
3472
- const M = m, $ = I, j = [...rr, "lineHeight", "textAlign", "padding"], R = {};
3511
+ const O = m, $ = I, j = [...rr, "lineHeight", "textAlign", "padding"], R = {};
3473
3512
  for (const xe of j)
3474
- if ($[xe] !== M[xe]) {
3513
+ if ($[xe] !== O[xe]) {
3475
3514
  const ge = $[xe];
3476
3515
  if (ge === void 0) continue;
3477
3516
  R[xe] = ge;
3478
3517
  }
3479
3518
  const de = ["fontWeight", "fontStyle", "textDecoration"];
3480
- if (de.some((xe) => $[xe] !== M[xe]))
3519
+ if (de.some((xe) => $[xe] !== O[xe]))
3481
3520
  for (const xe of de) {
3482
3521
  const ge = $[xe];
3483
3522
  ge !== void 0 && (R[xe] = ge);
@@ -3499,39 +3538,39 @@ function sc({ blockId: e, data: t, setData: n }) {
3499
3538
  }, S = (a == null ? void 0 : a.blockId) === e ? a.text : "", y = f && l ? S.slice(l.start, l.end) : "", k = f, D = ct(() => {
3500
3539
  if (!f || !l) return null;
3501
3540
  const I = Ht(t.props ?? null);
3502
- return gs(I, l.start, l.end);
3541
+ return fs(I, l.start, l.end);
3503
3542
  }, [f, l, t.props]), E = !f || !!D, N = ct(() => Ht(t.props ?? null), [t.props]), W = ct(() => {
3504
3543
  const I = /* @__PURE__ */ new Set();
3505
- for (const M of s)
3506
- for (const $ of M.items)
3544
+ for (const O of s)
3545
+ for (const $ of O.items)
3507
3546
  $.kind === "user" && I.add($.name);
3508
3547
  return I;
3509
3548
  }, [s]), P = ct(() => {
3510
- const I = qn(N), M = [], $ = /* @__PURE__ */ new Map();
3549
+ const I = qn(N), O = [], $ = /* @__PURE__ */ new Map();
3511
3550
  for (const j of I) {
3512
3551
  if (j.builtin || !W.has(j.name) || !j.instanceId) continue;
3513
3552
  const R = $.get(j.name) ?? 0;
3514
3553
  $.set(j.name, R + 1);
3515
3554
  const de = R === 0 ? `{{${j.name}}}` : `{{${j.name}}} (${R + 1})`;
3516
- M.push({
3555
+ O.push({
3517
3556
  instanceId: j.instanceId,
3518
3557
  name: j.name,
3519
3558
  label: de
3520
3559
  });
3521
3560
  }
3522
- return M;
3523
- }, [N, W]), he = ((fe = t.props) == null ? void 0 : fe.variableDefaults) ?? null, [be, ce] = z(null), [_, x] = z(null), [T, U] = z("contacts"), [ie, C] = z("pick"), [p, F] = z(null), [X, V] = z(""), [me, ve] = z(!1), [we, K] = z("web"), [Re, je] = z(""), [_t, ht] = z(!0), [pe, q] = z(!1), v = Me(null), Y = /^(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/, ee = /^(?:\[(?:[A-Fa-f0-9:.]+)\]|(?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})+)$/, L = (I) => {
3524
- const M = I.match(/^[A-Za-z][A-Za-z0-9+.-]*:\/\/([^/?#]*)/);
3525
- if (!M) return null;
3526
- const j = M[1].replace(/^.*@/, "");
3561
+ return O;
3562
+ }, [N, W]), he = ((fe = t.props) == null ? void 0 : fe.variableDefaults) ?? null, [be, ce] = z(null), [_, x] = z(null), [T, U] = z("contacts"), [ie, C] = z("pick"), [p, F] = z(null), [X, V] = z(""), [me, ve] = z(!1), [we, K] = z("web"), [Re, je] = z(""), [_t, ht] = z(!0), [pe, q] = z(!1), v = Oe(null), Y = /^(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/, ee = /^(?:\[(?:[A-Fa-f0-9:.]+)\]|(?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})+)$/, L = (I) => {
3563
+ const O = I.match(/^[A-Za-z][A-Za-z0-9+.-]*:\/\/([^/?#]*)/);
3564
+ if (!O) return null;
3565
+ const j = O[1].replace(/^.*@/, "");
3527
3566
  if (!j) return null;
3528
3567
  if (j.startsWith("[")) {
3529
3568
  const R = j.indexOf("]");
3530
3569
  return R <= 0 ? null : j.slice(0, R + 1);
3531
3570
  }
3532
3571
  return j.split(":")[0] || null;
3533
- }, G = (I, M) => {
3534
- const $ = M.trim();
3572
+ }, G = (I, O) => {
3573
+ const $ = O.trim();
3535
3574
  if (!$) return null;
3536
3575
  if (/^\{\{[A-Za-z_][A-Za-z0-9_]*\}\}$/.test($) || /^\{\%[A-Za-z_][A-Za-z0-9_]*\%\}$/.test($))
3537
3576
  return $;
@@ -3547,30 +3586,30 @@ function sc({ blockId: e, data: t, setData: n }) {
3547
3586
  } catch {
3548
3587
  return null;
3549
3588
  }
3550
- }, ae = (I, M) => {
3589
+ }, ae = (I, O) => {
3551
3590
  const $ = Ht(t.props ?? null);
3552
- return ps($, I, M);
3591
+ return us($, I, O);
3553
3592
  }, re = (I) => {
3554
3593
  if (!k || !l) return;
3555
- const M = ae(l.start, l.end);
3556
- M ? (/^mailto:/i.test(M.href) ? (K("email"), je(M.href.replace(/^mailto:/i, ""))) : (K("web"), je(M.href)), ht(!!M.targetBlank)) : (K("web"), je(""), ht(!0)), q(!1), ce(I.currentTarget);
3594
+ const O = ae(l.start, l.end);
3595
+ O ? (/^mailto:/i.test(O.href) ? (K("email"), je(O.href.replace(/^mailto:/i, ""))) : (K("web"), je(O.href)), ht(!!O.targetBlank)) : (K("web"), je(""), ht(!0)), q(!1), ce(I.currentTarget);
3557
3596
  }, ue = () => {
3558
3597
  ce(null), q(!1);
3559
3598
  }, te = ct(() => {
3560
- const I = s.find((M) => M.id === "links");
3599
+ const I = s.find((O) => O.id === "links");
3561
3600
  return I ? I.items : [];
3562
3601
  }, [s]), Q = (I) => {
3563
- const M = v.current;
3564
- if (!M) {
3602
+ const O = v.current;
3603
+ if (!O) {
3565
3604
  je(I);
3566
3605
  return;
3567
3606
  }
3568
- const $ = M.selectionStart ?? Re.length, j = M.selectionEnd ?? Re.length, R = Re.slice(0, $) + I + Re.slice(j);
3607
+ const $ = O.selectionStart ?? Re.length, j = O.selectionEnd ?? Re.length, R = Re.slice(0, $) + I + Re.slice(j);
3569
3608
  je(R), requestAnimationFrame(() => {
3570
3609
  try {
3571
- M.focus();
3610
+ O.focus();
3572
3611
  const de = $ + I.length;
3573
- M.setSelectionRange(de, de);
3612
+ O.setSelectionRange(de, de);
3574
3613
  } catch {
3575
3614
  }
3576
3615
  });
@@ -3578,9 +3617,9 @@ function sc({ blockId: e, data: t, setData: n }) {
3578
3617
  E && (x(I.currentTarget), U("contacts"), C("pick"), F(null), V(""), ve(!1));
3579
3618
  }, ne = () => {
3580
3619
  x(null), C("pick"), F(null), V(""), ve(!1);
3581
- }, A = (I, M) => {
3620
+ }, A = (I, O) => {
3582
3621
  if (E) {
3583
- if (M === "builtin") {
3622
+ if (O === "builtin") {
3584
3623
  const $ = `{%${I}%}`;
3585
3624
  D && l ? qt(e, {
3586
3625
  kind: "replaceVariable",
@@ -3590,7 +3629,7 @@ function sc({ blockId: e, data: t, setData: n }) {
3590
3629
  }) : qt(e, { kind: "variable", token: $ }), ne();
3591
3630
  return;
3592
3631
  }
3593
- F({ name: I, kind: M }), V(""), ve(!1), C("default");
3632
+ F({ name: I, kind: O }), V(""), ve(!1), C("default");
3594
3633
  }
3595
3634
  }, H = () => {
3596
3635
  C("pick"), ve(!1);
@@ -3598,16 +3637,16 @@ function sc({ blockId: e, data: t, setData: n }) {
3598
3637
  if (!p) return;
3599
3638
  const I = X.trim();
3600
3639
  if (I === "") return;
3601
- const M = p.kind === "builtin" ? `{%${p.name}%}` : `{{${p.name}}}`;
3640
+ const O = p.kind === "builtin" ? `{%${p.name}%}` : `{{${p.name}}}`;
3602
3641
  D && l ? qt(e, {
3603
3642
  kind: "replaceVariable",
3604
- token: M,
3643
+ token: O,
3605
3644
  start: l.start,
3606
3645
  end: l.end,
3607
3646
  defaultValue: I
3608
3647
  }) : qt(e, {
3609
3648
  kind: "variable",
3610
- token: M,
3649
+ token: O,
3611
3650
  defaultValue: I
3612
3651
  }), ne();
3613
3652
  }, oe = () => {
@@ -3658,14 +3697,14 @@ function sc({ blockId: e, data: t, setData: n }) {
3658
3697
  /* @__PURE__ */ w(Z, { direction: "row", alignItems: "start", flexDirection: "column", justifyContent: "space-between", children: [
3659
3698
  /* @__PURE__ */ o(At, { shrink: !0, children: r("text.link") }),
3660
3699
  /* @__PURE__ */ o(Z, { direction: "row", spacing: 1, sx: { mt: 0.5, alignSelf: "flex-start" }, children: /* @__PURE__ */ o(
3661
- Oe,
3700
+ Me,
3662
3701
  {
3663
3702
  size: "small",
3664
3703
  variant: "outlined",
3665
3704
  onClick: re,
3666
3705
  disabled: !k,
3667
3706
  "aria-label": r("text.link"),
3668
- startIcon: /* @__PURE__ */ o(qi, { fontSize: "small" }),
3707
+ startIcon: /* @__PURE__ */ o(An, { fontSize: "small" }),
3669
3708
  sx: {
3670
3709
  color: "text.secondary",
3671
3710
  borderColor: "divider",
@@ -3683,14 +3722,14 @@ function sc({ blockId: e, data: t, setData: n }) {
3683
3722
  /* @__PURE__ */ w(Z, { direction: "row", alignItems: "start", flexDirection: "column", justifyContent: "space-between", sx: { mt: 2 }, children: [
3684
3723
  /* @__PURE__ */ o(At, { shrink: !0, children: r("text.variables.title") }),
3685
3724
  /* @__PURE__ */ o(Z, { direction: "row", spacing: 1, alignItems: "center", sx: { mt: 0.5, alignSelf: "flex-start" }, children: /* @__PURE__ */ o(
3686
- Oe,
3725
+ Me,
3687
3726
  {
3688
3727
  size: "small",
3689
3728
  variant: "outlined",
3690
3729
  onClick: Ie,
3691
3730
  disabled: !E,
3692
3731
  "aria-label": r("text.addVariables"),
3693
- startIcon: /* @__PURE__ */ o(si, { fontSize: "small" }),
3732
+ startIcon: /* @__PURE__ */ o(Ur, { fontSize: "small" }),
3694
3733
  sx: {
3695
3734
  color: "text.secondary",
3696
3735
  borderColor: "divider",
@@ -3740,9 +3779,9 @@ function sc({ blockId: e, data: t, setData: n }) {
3740
3779
  },
3741
3780
  value: (he && he[I.instanceId]) ?? "",
3742
3781
  placeholder: r("text.variables.defaultPlaceholder"),
3743
- onChange: (M) => {
3782
+ onChange: (O) => {
3744
3783
  const $ = { ...he ?? {} };
3745
- $[I.instanceId] = M.target.value, h({ ...t, props: { ...t.props, variableDefaults: $ } });
3784
+ $[I.instanceId] = O.target.value, h({ ...t, props: { ...t.props, variableDefaults: $ } });
3746
3785
  }
3747
3786
  }
3748
3787
  )
@@ -3751,9 +3790,9 @@ function sc({ blockId: e, data: t, setData: n }) {
3751
3790
  I.instanceId
3752
3791
  ))
3753
3792
  ] }),
3754
- /* @__PURE__ */ o(gt, { names: lc, value: m, onChange: b }),
3793
+ /* @__PURE__ */ o(gt, { names: oc, value: m, onChange: b }),
3755
3794
  /* @__PURE__ */ o(rn, { sx: { my: 2 } }),
3756
- /* @__PURE__ */ o(gt, { names: ic, value: m, onChange: b }),
3795
+ /* @__PURE__ */ o(gt, { names: rc, value: m, onChange: b }),
3757
3796
  /* @__PURE__ */ o(
3758
3797
  ao,
3759
3798
  {
@@ -3798,7 +3837,7 @@ function sc({ blockId: e, data: t, setData: n }) {
3798
3837
  te.length > 0 && /* @__PURE__ */ w(Z, { spacing: 0.75, children: [
3799
3838
  /* @__PURE__ */ o(ke, { variant: "body2", color: "text.secondary", children: r("text.linkVariables") }),
3800
3839
  /* @__PURE__ */ o(Z, { direction: "row", spacing: 1, sx: { flexWrap: "wrap" }, children: te.map((I) => /* @__PURE__ */ o(
3801
- Oe,
3840
+ Me,
3802
3841
  {
3803
3842
  size: "small",
3804
3843
  variant: "outlined",
@@ -3812,13 +3851,13 @@ function sc({ blockId: e, data: t, setData: n }) {
3812
3851
  /* @__PURE__ */ o(
3813
3852
  vr,
3814
3853
  {
3815
- control: /* @__PURE__ */ o(Pl, { checked: _t, onChange: (I) => ht(I.target.checked) }),
3854
+ control: /* @__PURE__ */ o(Fl, { checked: _t, onChange: (I) => ht(I.target.checked) }),
3816
3855
  label: r("text.linkTargetBlank")
3817
3856
  }
3818
3857
  ),
3819
3858
  /* @__PURE__ */ w(se, { sx: { display: "flex", gap: 1, justifyContent: "flex-end", pt: 1 }, children: [
3820
- /* @__PURE__ */ o(Oe, { variant: "outlined", onClick: ue, children: r("common.cancel") }),
3821
- /* @__PURE__ */ o(Oe, { variant: "contained", onClick: oe, disabled: !G(we, Re), children: r("common.save") })
3859
+ /* @__PURE__ */ o(Me, { variant: "outlined", onClick: ue, children: r("common.cancel") }),
3860
+ /* @__PURE__ */ o(Me, { variant: "contained", onClick: oe, disabled: !G(we, Re), children: r("common.save") })
3822
3861
  ] })
3823
3862
  ] })
3824
3863
  }
@@ -3834,10 +3873,10 @@ function sc({ blockId: e, data: t, setData: n }) {
3834
3873
  PaperProps: { sx: { width: 360, p: 2.5, maxHeight: 500, overflowY: "auto" } },
3835
3874
  children: /* @__PURE__ */ w(Z, { spacing: 1.5, children: [
3836
3875
  /* @__PURE__ */ o(ke, { variant: "subtitle1", sx: { fontWeight: 700 }, children: r(ie === "pick" ? "text.addVariables" : "text.variables.setDefaultTitle") }),
3837
- ie === "pick" ? /* @__PURE__ */ o(se, { children: s.map((I, M) => {
3876
+ ie === "pick" ? /* @__PURE__ */ o(se, { children: s.map((I, O) => {
3838
3877
  const $ = I.id === "contacts" ? "text.variables.groupContacts" : I.id === "email" ? "text.variables.groupEmail" : I.id === "organization" ? "text.variables.groupOrganization" : I.id === "date" ? "text.variables.groupDate" : "text.variables.groupLinks", j = T === I.id;
3839
3878
  return /* @__PURE__ */ w(
3840
- Fl,
3879
+ zl,
3841
3880
  {
3842
3881
  disableGutters: !0,
3843
3882
  square: !0,
@@ -3854,9 +3893,9 @@ function sc({ blockId: e, data: t, setData: n }) {
3854
3893
  },
3855
3894
  children: [
3856
3895
  /* @__PURE__ */ o(
3857
- zl,
3896
+ Ll,
3858
3897
  {
3859
- expandIcon: /* @__PURE__ */ o(Ki, { fontSize: "small" }),
3898
+ expandIcon: /* @__PURE__ */ o(Ai, { fontSize: "small" }),
3860
3899
  sx: {
3861
3900
  minHeight: 40,
3862
3901
  "& .MuiAccordionSummary-content": { my: 0.75 }
@@ -3864,8 +3903,8 @@ function sc({ blockId: e, data: t, setData: n }) {
3864
3903
  children: /* @__PURE__ */ o(ke, { variant: "overline", color: "text.secondary", children: r($) })
3865
3904
  }
3866
3905
  ),
3867
- /* @__PURE__ */ o(Ll, { sx: { pt: 0, pb: 1.25 }, children: /* @__PURE__ */ o(Z, { sx: { mt: 0.5 }, children: I.items.map((R) => /* @__PURE__ */ o(
3868
- Oe,
3906
+ /* @__PURE__ */ o(Wl, { sx: { pt: 0, pb: 1.25 }, children: /* @__PURE__ */ o(Z, { sx: { mt: 0.5 }, children: I.items.map((R) => /* @__PURE__ */ o(
3907
+ Me,
3869
3908
  {
3870
3909
  size: "small",
3871
3910
  variant: "outlined",
@@ -3930,9 +3969,9 @@ function sc({ blockId: e, data: t, setData: n }) {
3930
3969
  }
3931
3970
  ),
3932
3971
  /* @__PURE__ */ w(se, { sx: { display: "flex", gap: 1, justifyContent: "flex-end", pt: 0.5 }, children: [
3933
- /* @__PURE__ */ o(Oe, { variant: "outlined", onClick: H, children: r("text.variables.back") }),
3972
+ /* @__PURE__ */ o(Me, { variant: "outlined", onClick: H, children: r("text.variables.back") }),
3934
3973
  /* @__PURE__ */ o(
3935
- Oe,
3974
+ Me,
3936
3975
  {
3937
3976
  variant: "contained",
3938
3977
  onClick: De,
@@ -3961,7 +4000,7 @@ const vn = [
3961
4000
  "reddit",
3962
4001
  "twitch",
3963
4002
  "threads"
3964
- ], hl = [
4003
+ ], bl = [
3965
4004
  "no-border-black",
3966
4005
  // 深色 (Glyph Dark) -> glyph-dark
3967
4006
  "no-border-white",
@@ -3980,12 +4019,12 @@ const vn = [
3980
4019
  // 线性·浅色 (Circular Outline Light) -> circular-outline-light
3981
4020
  "standard"
3982
4021
  // 标准 (Standard) -> standard
3983
- ], bl = J.object({
4022
+ ], Cl = J.object({
3984
4023
  props: J.object({
3985
4024
  // 选中的社媒平台列表
3986
4025
  platforms: J.array(J.enum(vn)).optional().nullable(),
3987
4026
  // 图标类别
3988
- iconStyle: J.enum(hl).optional().nullable(),
4027
+ iconStyle: J.enum(bl).optional().nullable(),
3989
4028
  // 图标统一尺寸(宽高相同)
3990
4029
  iconSize: J.number().optional().nullable(),
3991
4030
  // 每个平台的配置
@@ -3997,11 +4036,11 @@ const vn = [
3997
4036
  ).optional().nullable()
3998
4037
  }).optional().nullable(),
3999
4038
  style: J.object({
4000
- padding: ml().optional().nullable(),
4039
+ padding: gl().optional().nullable(),
4001
4040
  backgroundColor: J.string().optional().nullable(),
4002
4041
  textAlign: J.enum(["left", "center", "right"]).optional().nullable()
4003
4042
  }).optional().nullable()
4004
- }), Pn = {
4043
+ }), Fn = {
4005
4044
  facebook: { zh: "Facebook", en: "Facebook" },
4006
4045
  instagram: { zh: "Instagram", en: "Instagram" },
4007
4046
  x: { zh: "X (Twitter)", en: "X (Twitter)" },
@@ -4026,10 +4065,10 @@ const vn = [
4026
4065
  "with-border-line-white": { zh: "线性·浅色", en: "Circular Outline Light" },
4027
4066
  standard: { zh: "标准", en: "Standard" }
4028
4067
  };
4029
- function cc({ data: e, setData: t }) {
4068
+ function ac({ data: e, setData: t }) {
4030
4069
  var T, U, ie;
4031
- const { t: n, language: r } = Se(), [, i] = z(null), [l, a] = z(null), [c, s] = z(null), [d, u] = z(null), g = Me(!1), f = (C) => {
4032
- const p = bl.safeParse(C);
4070
+ const { t: n, language: r } = Se(), [, i] = z(null), [l, a] = z(null), [c, s] = z(null), [d, u] = z(null), g = Oe(!1), f = (C) => {
4071
+ const p = Cl.safeParse(C);
4033
4072
  p.success ? (t(p.data), i(null)) : i(p.error);
4034
4073
  }, m = ((T = e.props) == null ? void 0 : T.iconStyle) || "origin-colorful", h = ((U = e.props) == null ? void 0 : U.iconSize) ?? 36, S = ((ie = e.props) == null ? void 0 : ie.socials) || [];
4035
4074
  S.map((C) => C.platform);
@@ -4155,7 +4194,7 @@ function cc({ data: e, setData: t }) {
4155
4194
  l !== null && c !== null && (C.preventDefault(), C.stopPropagation(), ce(C, c));
4156
4195
  },
4157
4196
  children: S.map((C, p) => {
4158
- const F = x ? Pn[C.platform].zh : Pn[C.platform].en, X = l === p, V = c === p, me = V && d === "top", ve = V && d === "bottom", we = `social-${p}`;
4197
+ const F = x ? Fn[C.platform].zh : Fn[C.platform].en, X = l === p, V = c === p, me = V && d === "top", ve = V && d === "bottom", we = `social-${p}`;
4159
4198
  return /* @__PURE__ */ w(mt.Fragment, { children: [
4160
4199
  me && /* @__PURE__ */ o(
4161
4200
  se,
@@ -4226,7 +4265,7 @@ function cc({ data: e, setData: t }) {
4226
4265
  onMouseDown: (K) => {
4227
4266
  K.stopPropagation(), P();
4228
4267
  },
4229
- children: /* @__PURE__ */ o(Fr, { fontSize: "small" })
4268
+ children: /* @__PURE__ */ o($r, { fontSize: "small" })
4230
4269
  }
4231
4270
  ),
4232
4271
  /* @__PURE__ */ o(
@@ -4238,7 +4277,7 @@ function cc({ data: e, setData: t }) {
4238
4277
  sx: { flex: 1, fontSize: "12px" },
4239
4278
  onMouseDown: (K) => K.stopPropagation(),
4240
4279
  children: vn.map((K) => {
4241
- const Re = x ? Pn[K].zh : Pn[K].en;
4280
+ const Re = x ? Fn[K].zh : Fn[K].en;
4242
4281
  return /* @__PURE__ */ o(on, { value: K, children: Re }, K);
4243
4282
  })
4244
4283
  }
@@ -4250,7 +4289,7 @@ function cc({ data: e, setData: t }) {
4250
4289
  onClick: () => E(p),
4251
4290
  sx: { color: "error.main" },
4252
4291
  onMouseDown: (K) => K.stopPropagation(),
4253
- children: /* @__PURE__ */ o(ci, { fontSize: "small" })
4292
+ children: /* @__PURE__ */ o(Ti, { fontSize: "small" })
4254
4293
  }
4255
4294
  )
4256
4295
  ] }),
@@ -4306,9 +4345,9 @@ function cc({ data: e, setData: t }) {
4306
4345
  }
4307
4346
  ),
4308
4347
  /* @__PURE__ */ o(
4309
- Oe,
4348
+ Me,
4310
4349
  {
4311
- startIcon: /* @__PURE__ */ o(ui, {}),
4350
+ startIcon: /* @__PURE__ */ o(_i, {}),
4312
4351
  onClick: N,
4313
4352
  variant: "outlined",
4314
4353
  size: "small",
@@ -4321,10 +4360,10 @@ function cc({ data: e, setData: t }) {
4321
4360
  /* @__PURE__ */ o(rn, { sx: { my: 1 } }),
4322
4361
  /* @__PURE__ */ w(se, { sx: { mb: 2 }, children: [
4323
4362
  /* @__PURE__ */ o(ke, { variant: "body2", sx: { color: "text.secondary", mb: 1, fontSize: "12px", fontWeight: 500 }, children: n("socials.iconStyle") }),
4324
- /* @__PURE__ */ o(Z, { spacing: 1, sx: { mt: 1 }, children: hl.map((C) => {
4363
+ /* @__PURE__ */ o(Z, { spacing: 1, sx: { mt: 1 }, children: bl.map((C) => {
4325
4364
  const p = x ? lr[C].zh : lr[C].en;
4326
4365
  return /* @__PURE__ */ o(
4327
- Yi,
4366
+ Bi,
4328
4367
  {
4329
4368
  value: C,
4330
4369
  selected: m === C,
@@ -4347,7 +4386,7 @@ function cc({ data: e, setData: t }) {
4347
4386
  un,
4348
4387
  {
4349
4388
  label: n("socials.iconSize"),
4350
- iconLabel: /* @__PURE__ */ o(Pr, { sx: { fontSize: 16 } }),
4389
+ iconLabel: /* @__PURE__ */ o(zr, { sx: { fontSize: 16 } }),
4351
4390
  defaultValue: h,
4352
4391
  onChange: (C) => {
4353
4392
  f({
@@ -4378,7 +4417,7 @@ function cc({ data: e, setData: t }) {
4378
4417
  function ir(e) {
4379
4418
  return /* @__PURE__ */ o(se, { sx: { m: 3, p: 1, border: "1px dashed", borderColor: "divider" }, children: /* @__PURE__ */ o(ke, { color: "text.secondary", children: e }) });
4380
4419
  }
4381
- function uc() {
4420
+ function sc() {
4382
4421
  const { t: e } = Se(), t = Qe(), n = cn();
4383
4422
  if (!n)
4384
4423
  return ir(e("inspector.clickBlockToInspect"));
@@ -4388,28 +4427,28 @@ function uc() {
4388
4427
  const i = (c) => _e({ [n]: c }), { data: l, type: a } = r;
4389
4428
  switch (a) {
4390
4429
  case "Button":
4391
- return /* @__PURE__ */ o(Ks, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4430
+ return /* @__PURE__ */ o($s, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4392
4431
  case "ColumnsContainer":
4393
- return /* @__PURE__ */ o(Ys, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4432
+ return /* @__PURE__ */ o(Ks, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4394
4433
  case "Container":
4395
- return /* @__PURE__ */ o(Xs, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4434
+ return /* @__PURE__ */ o(qs, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4396
4435
  case "Divider":
4397
- return /* @__PURE__ */ o(Gs, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4436
+ return /* @__PURE__ */ o(Ys, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4398
4437
  case "Heading":
4399
- return /* @__PURE__ */ o(Zs, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4438
+ return /* @__PURE__ */ o(Gs, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4400
4439
  case "Html":
4401
- return /* @__PURE__ */ o(ec, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4440
+ return /* @__PURE__ */ o(Zs, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4402
4441
  case "Image":
4403
- return /* @__PURE__ */ o(tc, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4442
+ return /* @__PURE__ */ o(Qs, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4404
4443
  case "Video":
4405
- return /* @__PURE__ */ o(nc, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4444
+ return /* @__PURE__ */ o(ec, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4406
4445
  case "EmailLayout":
4407
- return /* @__PURE__ */ o(fl, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4446
+ return /* @__PURE__ */ o(ml, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4408
4447
  case "Spacer":
4409
- return /* @__PURE__ */ o(oc, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4448
+ return /* @__PURE__ */ o(tc, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4410
4449
  case "Text":
4411
4450
  return /* @__PURE__ */ o(
4412
- sc,
4451
+ ic,
4413
4452
  {
4414
4453
  blockId: n,
4415
4454
  data: l,
@@ -4418,28 +4457,28 @@ function uc() {
4418
4457
  n
4419
4458
  );
4420
4459
  case "Socials":
4421
- return /* @__PURE__ */ o(cc, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4460
+ return /* @__PURE__ */ o(ac, { data: l, setData: (c) => i({ type: a, data: c }) }, n);
4422
4461
  default:
4423
4462
  return /* @__PURE__ */ o("pre", { children: JSON.stringify(r, null, " ") });
4424
4463
  }
4425
4464
  }
4426
- function dc() {
4465
+ function cc() {
4427
4466
  const e = Qe().root;
4428
4467
  if (!e)
4429
4468
  return /* @__PURE__ */ o("p", { children: "Block not found" });
4430
4469
  const { data: t, type: n } = e;
4431
4470
  if (n !== "EmailLayout")
4432
4471
  throw new Error('Expected "root" element to be of type EmailLayout');
4433
- return /* @__PURE__ */ o(fl, { data: t, setData: (r) => _e({ root: { type: n, data: r } }) }, "root");
4472
+ return /* @__PURE__ */ o(ml, { data: t, setData: (r) => _e({ root: { type: n, data: r } }) }, "root");
4434
4473
  }
4435
4474
  const ar = 320;
4436
- function pc() {
4437
- const { t: e } = Se(), t = Ca(), n = ko(), i = Io() === "preview", l = () => {
4475
+ function uc() {
4476
+ const { t: e } = Se(), t = ha(), n = ko(), i = Io() === "preview", l = () => {
4438
4477
  switch (t) {
4439
4478
  case "block-configuration":
4440
- return /* @__PURE__ */ o(uc, {});
4479
+ return /* @__PURE__ */ o(sc, {});
4441
4480
  case "styles":
4442
- return /* @__PURE__ */ o(dc, {});
4481
+ return /* @__PURE__ */ o(cc, {});
4443
4482
  }
4444
4483
  };
4445
4484
  return /* @__PURE__ */ w(
@@ -4471,7 +4510,7 @@ function pc() {
4471
4510
  }
4472
4511
  },
4473
4512
  children: [
4474
- /* @__PURE__ */ o(se, { px: 2, children: /* @__PURE__ */ w(kr, { value: t, onChange: (a, c) => Sa(c), children: [
4513
+ /* @__PURE__ */ o(se, { px: 2, children: /* @__PURE__ */ w(kr, { value: t, onChange: (a, c) => ya(c), children: [
4475
4514
  /* @__PURE__ */ o(Zt, { value: "styles", label: e("inspector.styles") }),
4476
4515
  /* @__PURE__ */ o(Zt, { value: "block-configuration", label: e("inspector.inspect") })
4477
4516
  ] }) }),
@@ -4493,7 +4532,7 @@ function pc() {
4493
4532
  }
4494
4533
  );
4495
4534
  }
4496
- const fc = {
4535
+ const dc = {
4497
4536
  welcome: () => import("./chunks/chunk-Cc3ecmGS.js").then((e) => e.w).then((e) => e.default),
4498
4537
  "one-time-password": () => import("./chunks/chunk-Cc3ecmGS.js").then((e) => e.o).then((e) => e.default),
4499
4538
  "order-ecomerce": () => import("./chunks/chunk-Cc3ecmGS.js").then((e) => e.a).then((e) => e.default),
@@ -4510,8 +4549,8 @@ const fc = {
4510
4549
  "uspeedo-mothers-day": () => import("./chunks/chunk-Cc3ecmGS.js").then((e) => e.h).then((e) => e.default),
4511
4550
  "uspeedo-shopping-cart": () => import("./chunks/chunk-Cc3ecmGS.js").then((e) => e.i).then((e) => e.default)
4512
4551
  }, no = {};
4513
- async function mc(e) {
4514
- const t = fc[e];
4552
+ async function pc(e) {
4553
+ const t = dc[e];
4515
4554
  if (!t)
4516
4555
  return sn;
4517
4556
  if (no[e])
@@ -4521,10 +4560,10 @@ async function mc(e) {
4521
4560
  }
4522
4561
  function Ye({ sampleName: e, children: t }) {
4523
4562
  const [n, r] = z(!1);
4524
- return /* @__PURE__ */ o(Oe, { size: "small", onClick: async () => {
4563
+ return /* @__PURE__ */ o(Me, { size: "small", onClick: async () => {
4525
4564
  r(!0);
4526
4565
  try {
4527
- const l = await mc(e);
4566
+ const l = await pc(e);
4528
4567
  Rt(l);
4529
4568
  } catch {
4530
4569
  } finally {
@@ -4532,7 +4571,7 @@ function Ye({ sampleName: e, children: t }) {
4532
4571
  }
4533
4572
  }, disabled: n, children: n ? "Loading..." : t });
4534
4573
  }
4535
- const gc = { p: 1.5, display: "flex", flexDirection: "column" }, hc = {
4574
+ const fc = { p: 1.5, display: "flex", flexDirection: "column" }, mc = {
4536
4575
  mb: 0.75,
4537
4576
  width: "100%",
4538
4577
  bgcolor: "cadet.200",
@@ -4542,7 +4581,7 @@ const gc = { p: 1.5, display: "flex", flexDirection: "column" }, hc = {
4542
4581
  border: "1px solid",
4543
4582
  borderColor: "cadet.300"
4544
4583
  };
4545
- function Cl({ label: e, icon: t, onClick: n, disabled: r = !1, block: i, onDragStart: l }) {
4584
+ function yl({ label: e, icon: t, onClick: n, disabled: r = !1, block: i, onDragStart: l }) {
4546
4585
  const [a, c] = mt.useState(!1), s = mt.useRef(null), d = (g) => {
4547
4586
  if (!i || r) {
4548
4587
  g.preventDefault();
@@ -4563,11 +4602,11 @@ function Cl({ label: e, icon: t, onClick: n, disabled: r = !1, block: i, onDragS
4563
4602
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1, c(!1);
4564
4603
  };
4565
4604
  return /* @__PURE__ */ w(
4566
- Oe,
4605
+ Me,
4567
4606
  {
4568
4607
  ref: s,
4569
4608
  sx: {
4570
- ...gc,
4609
+ ...fc,
4571
4610
  // cursor: disabled ? 'default' : 'move',
4572
4611
  outline: a ? "2px dashed rgba(0,121,204, 0.8)" : "none",
4573
4612
  outlineOffset: a ? "-2px" : "0",
@@ -4586,16 +4625,16 @@ function Cl({ label: e, icon: t, onClick: n, disabled: r = !1, block: i, onDragS
4586
4625
  g.stopPropagation(), r || n();
4587
4626
  },
4588
4627
  children: [
4589
- /* @__PURE__ */ o(se, { sx: hc, children: t }),
4628
+ /* @__PURE__ */ o(se, { sx: mc, children: t }),
4590
4629
  /* @__PURE__ */ o(ke, { variant: "body2", children: e })
4591
4630
  ]
4592
4631
  }
4593
4632
  );
4594
4633
  }
4595
- const yl = [
4634
+ const xl = [
4596
4635
  {
4597
4636
  label: "Heading",
4598
- icon: /* @__PURE__ */ o(di, {}),
4637
+ icon: /* @__PURE__ */ o(Ni, {}),
4599
4638
  block: () => ({
4600
4639
  type: "Heading",
4601
4640
  data: {
@@ -4608,7 +4647,7 @@ const yl = [
4608
4647
  },
4609
4648
  {
4610
4649
  label: "Text",
4611
- icon: /* @__PURE__ */ o(pi, {}),
4650
+ icon: /* @__PURE__ */ o(Li, {}),
4612
4651
  block: () => ({
4613
4652
  type: "Text",
4614
4653
  data: {
@@ -4622,7 +4661,7 @@ const yl = [
4622
4661
  },
4623
4662
  {
4624
4663
  label: "Button",
4625
- icon: /* @__PURE__ */ o(fi, {}),
4664
+ icon: /* @__PURE__ */ o(Hi, {}),
4626
4665
  block: () => ({
4627
4666
  type: "Button",
4628
4667
  data: {
@@ -4636,7 +4675,7 @@ const yl = [
4636
4675
  },
4637
4676
  {
4638
4677
  label: "Image",
4639
- icon: /* @__PURE__ */ o(mi, {}),
4678
+ icon: /* @__PURE__ */ o(Fi, {}),
4640
4679
  block: () => ({
4641
4680
  type: "Image",
4642
4681
  data: {
@@ -4652,7 +4691,7 @@ const yl = [
4652
4691
  },
4653
4692
  {
4654
4693
  label: "Video",
4655
- icon: /* @__PURE__ */ o(gi, {}),
4694
+ icon: /* @__PURE__ */ o(Ui, {}),
4656
4695
  block: () => ({
4657
4696
  type: "Video",
4658
4697
  data: {
@@ -4686,7 +4725,7 @@ const yl = [
4686
4725
  // },
4687
4726
  {
4688
4727
  label: "Divider",
4689
- icon: /* @__PURE__ */ o(hi, {}),
4728
+ icon: /* @__PURE__ */ o(Ri, {}),
4690
4729
  block: () => ({
4691
4730
  type: "Divider",
4692
4731
  data: {
@@ -4699,7 +4738,7 @@ const yl = [
4699
4738
  },
4700
4739
  {
4701
4740
  label: "Spacer",
4702
- icon: /* @__PURE__ */ o(bi, {}),
4741
+ icon: /* @__PURE__ */ o(Oi, {}),
4703
4742
  block: () => ({
4704
4743
  type: "Spacer",
4705
4744
  data: {}
@@ -4707,7 +4746,7 @@ const yl = [
4707
4746
  },
4708
4747
  {
4709
4748
  label: "Socials",
4710
- icon: /* @__PURE__ */ o(Ci, {}),
4749
+ icon: /* @__PURE__ */ o(Wi, {}),
4711
4750
  block: () => ({
4712
4751
  type: "Socials",
4713
4752
  data: {
@@ -4727,7 +4766,7 @@ const yl = [
4727
4766
  },
4728
4767
  {
4729
4768
  label: "HTML",
4730
- icon: /* @__PURE__ */ o(yi, {}),
4769
+ icon: /* @__PURE__ */ o(Pi, {}),
4731
4770
  block: () => ({
4732
4771
  type: "Html",
4733
4772
  data: {
@@ -4742,7 +4781,7 @@ const yl = [
4742
4781
  },
4743
4782
  {
4744
4783
  label: "Columns",
4745
- icon: /* @__PURE__ */ o(xi, {}),
4784
+ icon: /* @__PURE__ */ o(Vi, {}),
4746
4785
  block: () => ({
4747
4786
  type: "ColumnsContainer",
4748
4787
  data: {
@@ -4758,7 +4797,7 @@ const yl = [
4758
4797
  },
4759
4798
  {
4760
4799
  label: "Container",
4761
- icon: /* @__PURE__ */ o(Si, {}),
4800
+ icon: /* @__PURE__ */ o(zi, {}),
4762
4801
  block: () => ({
4763
4802
  type: "Container",
4764
4803
  data: {
@@ -4768,7 +4807,7 @@ const yl = [
4768
4807
  }
4769
4808
  // { label: 'ProgressBar', icon: <ProgressBarOutlined />, block: () => ({}) },
4770
4809
  // { label: 'LoopContainer', icon: <ViewListOutlined />, block: () => ({}) },
4771
- ], bc = (e) => ({
4810
+ ], gc = (e) => ({
4772
4811
  Heading: "heading.name",
4773
4812
  Text: "text.name",
4774
4813
  Button: "button.name",
@@ -4781,15 +4820,15 @@ const yl = [
4781
4820
  ColumnsContainer: "columns.name",
4782
4821
  Container: "container.name"
4783
4822
  })[e] || e;
4784
- function Cc({ onSelect: e, disableContainerBlocks: t = !1, containerType: n = null }) {
4785
- const { t: r } = Se(), i = yl.filter((l) => {
4823
+ function hc({ onSelect: e, disableContainerBlocks: t = !1, containerType: n = null }) {
4824
+ const { t: r } = Se(), i = xl.filter((l) => {
4786
4825
  const a = l.block(), c = a.type === "Container" || a.type === "ColumnsContainer";
4787
4826
  return !(t && c && (n === "Container" && a.type === "ColumnsContainer" || n === "ColumnsContainer" && a.type === "ColumnsContainer" || !n || n !== "Container" && n !== "ColumnsContainer"));
4788
4827
  });
4789
4828
  return /* @__PURE__ */ o(se, { sx: { p: 1, display: "grid", gridTemplateColumns: "repeat(3, 1fr)", gap: 0.5 }, children: i.map((l, a) => {
4790
- const c = l.block(), s = bc(c.type), d = r(s);
4829
+ const c = l.block(), s = gc(c.type), d = r(s);
4791
4830
  return /* @__PURE__ */ o(
4792
- Cl,
4831
+ yl,
4793
4832
  {
4794
4833
  label: d,
4795
4834
  icon: l.icon,
@@ -4802,18 +4841,18 @@ function Cc({ onSelect: e, disableContainerBlocks: t = !1, containerType: n = nu
4802
4841
  }) });
4803
4842
  }
4804
4843
  const sr = 240;
4805
- function yc() {
4844
+ function bc() {
4806
4845
  return `block-${Date.now()}`;
4807
4846
  }
4808
- function xc() {
4809
- const { t: e } = Se(), t = Do(), n = Qe(), r = Ra(), i = Va(), l = () => {
4847
+ function Cc() {
4848
+ const { t: e } = Se(), t = Do(), n = Qe(), r = Oa(), i = Wa(), l = () => {
4810
4849
  Rt(sn);
4811
4850
  }, a = () => {
4812
4851
  for (const [m, h] of Object.entries(n))
4813
4852
  if (h.type === "EmailLayout")
4814
4853
  return m;
4815
4854
  return null;
4816
- }, [c, s] = z(null), d = Me(null), u = (m) => {
4855
+ }, [c, s] = z(null), d = Oe(null), u = (m) => {
4817
4856
  d.current && clearTimeout(d.current), s(m.currentTarget);
4818
4857
  }, g = (m = 0) => {
4819
4858
  d.current && clearTimeout(d.current), m ? d.current = setTimeout(() => s(null), m) : (d.current = null, s(null));
@@ -4821,7 +4860,7 @@ function xc() {
4821
4860
  const h = a();
4822
4861
  if (!h)
4823
4862
  return;
4824
- const b = yc(), S = n[h];
4863
+ const b = bc(), S = n[h];
4825
4864
  if (!S || S.type !== "EmailLayout")
4826
4865
  return;
4827
4866
  const k = [...S.data.childrenIds || [], b];
@@ -4868,7 +4907,7 @@ function xc() {
4868
4907
  r && /* @__PURE__ */ w(an, { children: [
4869
4908
  /* @__PURE__ */ o(ke, { variant: "h6", component: "h1", sx: { p: 0.75 }, children: e("common.emailBuilder") }),
4870
4909
  /* @__PURE__ */ o(Z, { spacing: 1, alignItems: "flex-start", style: { marginTop: r ? 0 : 8 }, children: /* @__PURE__ */ o(
4871
- Oe,
4910
+ Me,
4872
4911
  {
4873
4912
  variant: "contained",
4874
4913
  color: "primary",
@@ -4901,20 +4940,20 @@ function xc() {
4901
4940
  onMouseLeave: () => g(180),
4902
4941
  sx: { width: "100%" },
4903
4942
  children: /* @__PURE__ */ w(
4904
- Oe,
4943
+ Me,
4905
4944
  {
4906
4945
  size: "small",
4907
4946
  sx: { cursor: "default", width: "100%", justifyContent: "space-between" },
4908
4947
  children: [
4909
4948
  /* @__PURE__ */ o("span", { children: e("common.more") }),
4910
- /* @__PURE__ */ o(vi, {})
4949
+ /* @__PURE__ */ o(Mi, {})
4911
4950
  ]
4912
4951
  }
4913
4952
  )
4914
4953
  }
4915
4954
  ),
4916
4955
  /* @__PURE__ */ o(
4917
- Wl,
4956
+ Hl,
4918
4957
  {
4919
4958
  href: "https://uspeedo.com/email",
4920
4959
  target: "_blank",
@@ -4958,17 +4997,17 @@ function xc() {
4958
4997
  i || null,
4959
4998
  /* @__PURE__ */ w(Z, { spacing: 1, sx: { mt: r ? 0 : "16px !important" }, children: [
4960
4999
  /* @__PURE__ */ o(ke, { variant: "caption", color: "text.secondary", sx: { px: 0.75, fontWeight: 500 }, children: e("common.addContentBlocks") }),
4961
- /* @__PURE__ */ o(Cc, { onSelect: f, disableContainerBlocks: !1 })
5000
+ /* @__PURE__ */ o(hc, { onSelect: f, disableContainerBlocks: !1 })
4962
5001
  ] })
4963
5002
  ] }) })
4964
5003
  }
4965
5004
  );
4966
5005
  }
4967
- const Sc = ho(!1);
4968
- function vc({ value: e, children: t }) {
4969
- return /* @__PURE__ */ o(Sc.Provider, { value: e, children: t });
5006
+ const yc = ho(!1);
5007
+ function xc({ value: e, children: t }) {
5008
+ return /* @__PURE__ */ o(yc.Provider, { value: e, children: t });
4970
5009
  }
4971
- const wc = (e) => ({
5010
+ const Sc = (e) => ({
4972
5011
  Heading: "heading.name",
4973
5012
  Text: "text.name",
4974
5013
  Button: "button.name",
@@ -4981,7 +5020,7 @@ const wc = (e) => ({
4981
5020
  ColumnsContainer: "columns.name",
4982
5021
  Container: "container.name"
4983
5022
  })[e] || e;
4984
- function Ic({ anchorEl: e, setAnchorEl: t, onSelect: n, disableContainerBlocks: r = !1, containerType: i = null }) {
5023
+ function vc({ anchorEl: e, setAnchorEl: t, onSelect: n, disableContainerBlocks: r = !1, containerType: i = null }) {
4985
5024
  const { t: l } = Se(), a = () => {
4986
5025
  t(null);
4987
5026
  }, c = (d) => {
@@ -4989,7 +5028,7 @@ function Ic({ anchorEl: e, setAnchorEl: t, onSelect: n, disableContainerBlocks:
4989
5028
  };
4990
5029
  if (e === null)
4991
5030
  return null;
4992
- const s = yl.filter((d) => {
5031
+ const s = xl.filter((d) => {
4993
5032
  const u = d.block(), g = u.type === "Container" || u.type === "ColumnsContainer";
4994
5033
  return !(r && g && (i === "Container" && u.type === "ColumnsContainer" || i === "ColumnsContainer" && u.type === "ColumnsContainer" || !i || i !== "Container" && i !== "ColumnsContainer"));
4995
5034
  });
@@ -5002,9 +5041,9 @@ function Ic({ anchorEl: e, setAnchorEl: t, onSelect: n, disableContainerBlocks:
5002
5041
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
5003
5042
  transformOrigin: { vertical: "top", horizontal: "center" },
5004
5043
  children: /* @__PURE__ */ o(se, { sx: { p: 1, display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr" }, children: s.map((d, u) => {
5005
- const g = d.block(), f = wc(g.type), m = l(f);
5044
+ const g = d.block(), f = Sc(g.type), m = l(f);
5006
5045
  return /* @__PURE__ */ o(
5007
- Cl,
5046
+ yl,
5008
5047
  {
5009
5048
  label: m,
5010
5049
  icon: d.icon,
@@ -5017,7 +5056,7 @@ function Ic({ anchorEl: e, setAnchorEl: t, onSelect: n, disableContainerBlocks:
5017
5056
  }
5018
5057
  );
5019
5058
  }
5020
- function kc({ buttonElement: e, onClick: t }) {
5059
+ function wc({ buttonElement: e, onClick: t }) {
5021
5060
  const [n, r] = z(!1);
5022
5061
  return Ce(() => {
5023
5062
  function i({ clientX: l, clientY: a }) {
@@ -5033,7 +5072,7 @@ function kc({ buttonElement: e, onClick: t }) {
5033
5072
  return window.addEventListener("mousemove", i), () => {
5034
5073
  window.removeEventListener("mousemove", i);
5035
5074
  };
5036
- }, [e, r]), /* @__PURE__ */ o(Hl, { in: n, children: /* @__PURE__ */ o(
5075
+ }, [e, r]), /* @__PURE__ */ o(Vl, { in: n, children: /* @__PURE__ */ o(
5037
5076
  $e,
5038
5077
  {
5039
5078
  size: "small",
@@ -5058,9 +5097,9 @@ function kc({ buttonElement: e, onClick: t }) {
5058
5097
  }
5059
5098
  ) });
5060
5099
  }
5061
- function Dc({ onClick: e }) {
5100
+ function Ic({ onClick: e }) {
5062
5101
  return /* @__PURE__ */ o(
5063
- Fn,
5102
+ zn,
5064
5103
  {
5065
5104
  onClick: (t) => {
5066
5105
  t.stopPropagation(), e();
@@ -5093,13 +5132,13 @@ function oo({ onSelect: e, placeholder: t, disableContainerBlocks: n = !1, conta
5093
5132
  l(a);
5094
5133
  };
5095
5134
  return /* @__PURE__ */ w(an, { children: [
5096
- /* @__PURE__ */ o("div", { ref: c, style: { position: "relative" }, children: t ? /* @__PURE__ */ o(Dc, { onClick: s }) : /* @__PURE__ */ o(kc, { buttonElement: a, onClick: s }) }),
5097
- /* @__PURE__ */ o(Ic, { anchorEl: i, setAnchorEl: l, onSelect: e, disableContainerBlocks: n, containerType: r })
5135
+ /* @__PURE__ */ o("div", { ref: c, style: { position: "relative" }, children: t ? /* @__PURE__ */ o(Ic, { onClick: s }) : /* @__PURE__ */ o(wc, { buttonElement: a, onClick: s }) }),
5136
+ /* @__PURE__ */ o(vc, { anchorEl: i, setAnchorEl: l, onSelect: e, disableContainerBlocks: n, containerType: r })
5098
5137
  ] });
5099
5138
  }
5100
- let Ec = 0;
5139
+ let kc = 0;
5101
5140
  function kt() {
5102
- return `block-${Date.now()}-${++Ec}`;
5141
+ return `block-${Date.now()}-${++kc}`;
5103
5142
  }
5104
5143
  const Gt = () => window.__currentDraggedBlockId || null, Jt = () => window.__currentDraggedBlock || null;
5105
5144
  function Te(e, t) {
@@ -5181,7 +5220,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5181
5220
  typeof document < "u" && document.body && (document.body.style.cursor = "");
5182
5221
  };
5183
5222
  }, [d]);
5184
- const b = O.getState().document, S = n ? (ce = b[n]) == null ? void 0 : ce.type : null, y = S === "Container" || S === "ColumnsContainer", k = S === "ColumnsContainer", D = (_) => {
5223
+ const b = M.getState().document, S = n ? (ce = b[n]) == null ? void 0 : ce.type : null, y = S === "Container" || S === "ColumnsContainer", k = S === "ColumnsContainer", D = (_) => {
5185
5224
  const x = kt();
5186
5225
  return t({
5187
5226
  blockId: x,
@@ -5199,7 +5238,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5199
5238
  _.preventDefault(), _.stopPropagation();
5200
5239
  const T = Gt();
5201
5240
  if (T) {
5202
- const U = Jt(), ie = O.getState().document, C = Lt(U, n, ie);
5241
+ const U = Jt(), ie = M.getState().document, C = Lt(U, n, ie);
5203
5242
  u(!C), C ? (_.dataTransfer.effectAllowed = "move", _.dataTransfer.dropEffect = "move") : (_.dataTransfer.effectAllowed = "none", _.dataTransfer.dropEffect = "none"), a(T);
5204
5243
  const p = _.currentTarget.getBoundingClientRect(), F = _.clientY, X = p.top + p.height / 2;
5205
5244
  if (F < X)
@@ -5251,7 +5290,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5251
5290
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, a(null), s(null);
5252
5291
  return;
5253
5292
  }
5254
- const F = O.getState().document;
5293
+ const F = M.getState().document;
5255
5294
  if (!Lt(ie, n, F)) {
5256
5295
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, a(null), s(null), u(!1);
5257
5296
  return;
@@ -5279,7 +5318,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5279
5318
  _.preventDefault(), _.stopPropagation();
5280
5319
  const x = Gt();
5281
5320
  if (x) {
5282
- const T = Jt(), U = O.getState().document, ie = Lt(T, n, U);
5321
+ const T = Jt(), U = M.getState().document, ie = Lt(T, n, U);
5283
5322
  u(!ie), ie ? (_.dataTransfer.effectAllowed = "move", _.dataTransfer.dropEffect = "move") : (_.dataTransfer.effectAllowed = "none", _.dataTransfer.dropEffect = "none"), a(x), s(0);
5284
5323
  }
5285
5324
  },
@@ -5301,7 +5340,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5301
5340
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, a(null), s(null);
5302
5341
  return;
5303
5342
  }
5304
- const C = O.getState().document;
5343
+ const C = M.getState().document;
5305
5344
  if (!Lt(T, n, C)) {
5306
5345
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, a(null), s(null), u(!1);
5307
5346
  return;
@@ -5350,17 +5389,17 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5350
5389
  !r && // 列有元素
5351
5390
  !V && // 不是跨列拖拽
5352
5391
  ve, K = r && c === x && U || X && c === x, Re = !r && c === x && U && !X && !we && !V, je = !r && T && c === e.length && U && !we && !V;
5353
- return /* @__PURE__ */ w(_l, { children: [
5392
+ return /* @__PURE__ */ w(Bl, { children: [
5354
5393
  !k && /* @__PURE__ */ o(se, { component: "span", sx: { flex: "none", alignSelf: "flex-start" }, children: /* @__PURE__ */ o(oo, { onSelect: (pe) => E(pe, x), disableContainerBlocks: y, containerType: S }) }),
5355
5394
  /* @__PURE__ */ o(
5356
5395
  se,
5357
5396
  {
5358
5397
  onDragOver: (pe) => {
5359
- var fe, I, M, $, j, R, de, Ee, Pe;
5398
+ var fe, I, O, $, j, R, de, Ee, Pe;
5360
5399
  pe.preventDefault(), pe.stopPropagation();
5361
5400
  const q = Gt();
5362
5401
  if (!q) return;
5363
- const v = Jt(), Y = O.getState().document, ee = Lt(v, n, Y);
5402
+ const v = Jt(), Y = M.getState().document, ee = Lt(v, n, Y);
5364
5403
  u(!ee), ee ? (pe.dataTransfer.effectAllowed = "move", pe.dataTransfer.dropEffect = "move") : (pe.dataTransfer.effectAllowed = "none", pe.dataTransfer.dropEffect = "none");
5365
5404
  const L = !e.includes(q), ae = window.__isSidebarBlock === !0 ? { containerId: null, columnIndex: null } : Te(Y, q), re = Te(Y, _), ue = ae.columnIndex !== null, te = re.columnIndex !== null, Q = ue && te && re.containerId !== null && // 如果是同一个容器,需要是不同的列(避免同一列内部拖拽)
5366
5405
  // 如果是不同的容器,只要都在列中即可(允许跨容器拖拽)
@@ -5374,7 +5413,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5374
5413
  if (ye) {
5375
5414
  const Be = Y[ye];
5376
5415
  if (Be && Be.type === "ColumnsContainer") {
5377
- if ((((fe = Be.data.props) == null ? void 0 : fe.columnsCount) || ((M = (I = Be.data.props) == null ? void 0 : I.columns) == null ? void 0 : M.length) || 0) >= 4) {
5416
+ if ((((fe = Be.data.props) == null ? void 0 : fe.columnsCount) || ((O = (I = Be.data.props) == null ? void 0 : I.columns) == null ? void 0 : O.length) || 0) >= 4) {
5378
5417
  u(!0), pe.dataTransfer.effectAllowed = "none", pe.dataTransfer.dropEffect = "none", f(null), h(null), s(null);
5379
5418
  return;
5380
5419
  }
@@ -5410,18 +5449,18 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5410
5449
  return;
5411
5450
  }
5412
5451
  if (We) {
5413
- const dn = pe.currentTarget.getBoundingClientRect(), An = pe.clientX, Tn = dn.left + dn.width / 2;
5414
- a(q), s(null), An < Tn ? f("left") : f("right"), h(x);
5452
+ const dn = pe.currentTarget.getBoundingClientRect(), Tn = pe.clientX, _n = dn.left + dn.width / 2;
5453
+ a(q), s(null), Tn < _n ? f("left") : f("right"), h(x);
5415
5454
  return;
5416
5455
  }
5417
- const St = pe.currentTarget.getBoundingClientRect(), Bt = pe.clientX, vt = pe.clientY, Ot = St.bottom, zt = St.width * 0.15;
5456
+ const St = pe.currentTarget.getBoundingClientRect(), Bt = pe.clientX, vt = pe.clientY, Mt = St.bottom, zt = St.width * 0.15;
5418
5457
  if (Bt < St.left + zt) {
5419
5458
  a(q), f("left"), h(x), s(null);
5420
5459
  return;
5421
5460
  } else if (Bt > St.right - zt) {
5422
5461
  a(q), f("right"), h(x), s(null);
5423
5462
  return;
5424
- } else if (vt > Ot - St.height / 2) {
5463
+ } else if (vt > Mt - St.height / 2) {
5425
5464
  a(q), s(e.length), f(null), h(null);
5426
5465
  return;
5427
5466
  }
@@ -5446,8 +5485,8 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5446
5485
  return;
5447
5486
  }
5448
5487
  if (We) {
5449
- const vt = pe.currentTarget.getBoundingClientRect(), Ot = pe.clientX, zt = vt.left + vt.width / 2;
5450
- a(q), s(null), Ot < zt ? f("left") : f("right"), h(x);
5488
+ const vt = pe.currentTarget.getBoundingClientRect(), Mt = pe.clientX, zt = vt.left + vt.width / 2;
5489
+ a(q), s(null), Mt < zt ? f("left") : f("right"), h(x);
5451
5490
  return;
5452
5491
  }
5453
5492
  const Xe = pe.currentTarget.getBoundingClientRect(), Ke = pe.clientX, $t = pe.clientY;
@@ -5463,8 +5502,8 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5463
5502
  if (a(q), f(null), h(null), $t < St)
5464
5503
  s(x);
5465
5504
  else {
5466
- const vt = (e == null ? void 0 : e.length) || 0, Ot = Math.min(x + 1, vt);
5467
- s(Ot);
5505
+ const vt = (e == null ? void 0 : e.length) || 0, Mt = Math.min(x + 1, vt);
5506
+ s(Mt);
5468
5507
  }
5469
5508
  return;
5470
5509
  }
@@ -5478,7 +5517,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5478
5517
  },
5479
5518
  onDragLeave: W,
5480
5519
  onDrop: (pe) => {
5481
- var vt, Ot, zt, dn, An, Tn, Bo, Oo, Mo, No, Ro, Po, Fo, zo;
5520
+ var vt, Mt, zt, dn, Tn, _n, Bo, Mo, Oo, No, Ro, Po, Fo, zo;
5482
5521
  pe.preventDefault(), pe.stopPropagation();
5483
5522
  const q = pe.dataTransfer.getData("text/plain") || Gt();
5484
5523
  if (!q || !e) {
@@ -5490,7 +5529,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5490
5529
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1, a(null), s(null), f(null), h(null);
5491
5530
  return;
5492
5531
  }
5493
- const Y = window.__isSidebarBlock === !0, ee = _, L = O.getState().document, G = L[ee], ae = (v == null ? void 0 : v.type) === "Container" || (v == null ? void 0 : v.type) === "ColumnsContainer", re = (G == null ? void 0 : G.type) === "Container" || (G == null ? void 0 : G.type) === "ColumnsContainer", ue = Y ? { containerId: null, columnIndex: null } : Te(L, q), te = Te(L, ee), Q = ue.columnIndex !== null, Ie = te.columnIndex !== null, ne = Q && Ie && ue.containerId === te.containerId && ue.containerId !== null && ue.columnIndex !== te.columnIndex, A = Q && Ie && ue.containerId === te.containerId && ue.columnIndex === te.columnIndex;
5532
+ const Y = window.__isSidebarBlock === !0, ee = _, L = M.getState().document, G = L[ee], ae = (v == null ? void 0 : v.type) === "Container" || (v == null ? void 0 : v.type) === "ColumnsContainer", re = (G == null ? void 0 : G.type) === "Container" || (G == null ? void 0 : G.type) === "ColumnsContainer", ue = Y ? { containerId: null, columnIndex: null } : Te(L, q), te = Te(L, ee), Q = ue.columnIndex !== null, Ie = te.columnIndex !== null, ne = Q && Ie && ue.containerId === te.containerId && ue.containerId !== null && ue.columnIndex !== te.columnIndex, A = Q && Ie && ue.containerId === te.containerId && ue.columnIndex === te.columnIndex;
5494
5533
  if (ne && !ae && !re && q !== ee) {
5495
5534
  const Ne = ue.columnIndex, ze = te.columnIndex, Fe = ue.containerId, qe = L[Fe];
5496
5535
  if (qe && qe.type === "ColumnsContainer") {
@@ -5589,22 +5628,22 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5589
5628
  if (et) {
5590
5629
  const tt = L[et];
5591
5630
  if (tt && tt.type === "ColumnsContainer") {
5592
- const lt = ((Ot = tt.data.props) == null ? void 0 : Ot.columnsCount) || ((dn = (zt = tt.data.props) == null ? void 0 : zt.columns) == null ? void 0 : dn.length) || 0;
5631
+ const lt = ((Mt = tt.data.props) == null ? void 0 : Mt.columnsCount) || ((dn = (zt = tt.data.props) == null ? void 0 : zt.columns) == null ? void 0 : dn.length) || 0;
5593
5632
  if (lt >= 4) {
5594
5633
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1, a(null), s(null), u(!1);
5595
5634
  return;
5596
5635
  }
5597
- const pn = Ne ? kt() : q, _n = ((An = tt.data.props) == null ? void 0 : An.columns) || [], Gn = Fe.columnIndex;
5636
+ const pn = Ne ? kt() : q, Bn = ((Tn = tt.data.props) == null ? void 0 : Tn.columns) || [], Gn = Fe.columnIndex;
5598
5637
  let Jn, Zn;
5599
5638
  lt === 2 || lt === 4 ? (Jn = 3, Zn = [null, null, null, null]) : Jn = lt + 1;
5600
5639
  const fn = [];
5601
5640
  for (let mn = 0; mn < lt; mn++)
5602
- mn === Gn ? (fn.push({ childrenIds: ((Tn = _n[mn]) == null ? void 0 : Tn.childrenIds) || [] }), fn.push({ childrenIds: [pn] })) : fn.push({ childrenIds: ((Bo = _n[mn]) == null ? void 0 : Bo.childrenIds) || [] });
5641
+ mn === Gn ? (fn.push({ childrenIds: ((_n = Bn[mn]) == null ? void 0 : _n.childrenIds) || [] }), fn.push({ childrenIds: [pn] })) : fn.push({ childrenIds: ((Bo = Bn[mn]) == null ? void 0 : Bo.childrenIds) || [] });
5603
5642
  (lt === 2 || lt === 4) && lt === 4 && fn.splice(3);
5604
5643
  const Lo = Ne ? { containerId: null, columnIndex: null } : Te(L, q);
5605
5644
  let Wo = L;
5606
5645
  !Ne && Lo.containerId && (Wo = Wt(L, q, Lo));
5607
- const El = {
5646
+ const Al = {
5608
5647
  ...tt,
5609
5648
  data: {
5610
5649
  ...tt.data,
@@ -5618,7 +5657,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5618
5657
  };
5619
5658
  _e({
5620
5659
  ...Wo,
5621
- [et]: El,
5660
+ [et]: Al,
5622
5661
  [pn]: v
5623
5662
  }), window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1, a(null), s(null), f(null), h(null);
5624
5663
  return;
@@ -5639,8 +5678,8 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5639
5678
  return;
5640
5679
  }
5641
5680
  if (n) {
5642
- const et = Te(L, n), tt = r || et.columnIndex !== null, lt = Le ? { containerId: null, columnIndex: null } : Te(L, q), pn = lt.columnIndex !== null, _n = (v == null ? void 0 : v.type) === "Container" || (v == null ? void 0 : v.type) === "ColumnsContainer", Gn = pn && tt && lt.containerId === et.containerId && lt.columnIndex !== et.columnIndex;
5643
- if (tt && !r && (!pn || Gn) && _n) {
5681
+ const et = Te(L, n), tt = r || et.columnIndex !== null, lt = Le ? { containerId: null, columnIndex: null } : Te(L, q), pn = lt.columnIndex !== null, Bn = (v == null ? void 0 : v.type) === "Container" || (v == null ? void 0 : v.type) === "ColumnsContainer", Gn = pn && tt && lt.containerId === et.containerId && lt.columnIndex !== et.columnIndex;
5682
+ if (tt && !r && (!pn || Gn) && Bn) {
5644
5683
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1, a(null), s(null), u(!1);
5645
5684
  return;
5646
5685
  }
@@ -5681,7 +5720,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5681
5720
  if (Ne) {
5682
5721
  const ze = L[Ne];
5683
5722
  if (ze && ze.type === "ColumnsContainer") {
5684
- const Fe = ((Oo = ze.data.props) == null ? void 0 : Oo.columnsCount) || ((No = (Mo = ze.data.props) == null ? void 0 : Mo.columns) == null ? void 0 : No.length) || 0;
5723
+ const Fe = ((Mo = ze.data.props) == null ? void 0 : Mo.columnsCount) || ((No = (Oo = ze.data.props) == null ? void 0 : Oo.columns) == null ? void 0 : No.length) || 0;
5685
5724
  if (Fe >= 4) {
5686
5725
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, a(null), s(null), u(!1);
5687
5726
  return;
@@ -5794,7 +5833,7 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5794
5833
  } : {}
5795
5834
  }
5796
5835
  },
5797
- children: /* @__PURE__ */ o(kl, { id: _ })
5836
+ children: /* @__PURE__ */ o(Dl, { id: _ })
5798
5837
  }
5799
5838
  )
5800
5839
  ] }, _);
@@ -5803,8 +5842,8 @@ function To({ childrenIds: e, onChange: t, containerId: n, allowReplace: r = !1,
5803
5842
  ] });
5804
5843
  return i ? /* @__PURE__ */ o(se, { sx: cr, children: be }) : be;
5805
5844
  }
5806
- const Ac = [{ childrenIds: [] }], Tc = [{ childrenIds: [] }, { childrenIds: [] }], _c = [{ childrenIds: [] }, { childrenIds: [] }, { childrenIds: [] }], Bc = [{ childrenIds: [] }, { childrenIds: [] }, { childrenIds: [] }, { childrenIds: [] }];
5807
- function Oc({ style: e, props: t }) {
5845
+ const Dc = [{ childrenIds: [] }], Ec = [{ childrenIds: [] }, { childrenIds: [] }], Ac = [{ childrenIds: [] }, { childrenIds: [] }, { childrenIds: [] }], Tc = [{ childrenIds: [] }, { childrenIds: [] }, { childrenIds: [] }, { childrenIds: [] }];
5846
+ function _c({ style: e, props: t }) {
5808
5847
  var E;
5809
5848
  const n = Tt();
5810
5849
  Qe();
@@ -5817,10 +5856,10 @@ function Oc({ style: e, props: t }) {
5817
5856
  N.push({ childrenIds: [] });
5818
5857
  return N;
5819
5858
  }
5820
- return s === 1 ? Ac : s === 2 ? Tc : s === 4 ? Bc : _c;
5859
+ return s === 1 ? Dc : s === 2 ? Ec : s === 4 ? Tc : Ac;
5821
5860
  }, [i, s]), u = (N, { block: W, blockId: P, childrenIds: he }) => {
5822
5861
  var F, X, V;
5823
- const be = O.getState().document, ce = be[P] && be[P].type, _ = be[n];
5862
+ const be = M.getState().document, ce = be[P] && be[P].type, _ = be[n];
5824
5863
  let x = d;
5825
5864
  if (_ && _.type === "ColumnsContainer") {
5826
5865
  const me = (F = _.data.props) == null ? void 0 : F.columns;
@@ -5886,13 +5925,13 @@ function Oc({ style: e, props: t }) {
5886
5925
  fillHeight: b || ce
5887
5926
  }
5888
5927
  ) }, W);
5889
- return b || ce ? /* @__PURE__ */ o(vc, { value: !0, children: x }, W) : x;
5928
+ return b || ce ? /* @__PURE__ */ o(xc, { value: !0, children: x }, W) : x;
5890
5929
  }), D = {
5891
5930
  ...c && typeof c == "object" ? c : {},
5892
5931
  columnsCount: s
5893
5932
  };
5894
5933
  return /* @__PURE__ */ o(se, { sx: { color: "inherit", width: "100%", minWidth: 0, maxWidth: "100%", boxSizing: "border-box" }, children: /* @__PURE__ */ o(
5895
- Mi,
5934
+ gi,
5896
5935
  {
5897
5936
  props: D,
5898
5937
  style: e,
@@ -5900,9 +5939,9 @@ function Oc({ style: e, props: t }) {
5900
5939
  }
5901
5940
  ) });
5902
5941
  }
5903
- function Mc({ style: e, props: t }) {
5942
+ function Bc({ style: e, props: t }) {
5904
5943
  const n = (t == null ? void 0 : t.childrenIds) ?? [], r = Qe(), i = Tt();
5905
- return /* @__PURE__ */ o(Ri, { style: e, children: /* @__PURE__ */ o(
5944
+ return /* @__PURE__ */ o(bi, { style: e, children: /* @__PURE__ */ o(
5906
5945
  To,
5907
5946
  {
5908
5947
  childrenIds: n,
@@ -5920,7 +5959,7 @@ function Mc({ style: e, props: t }) {
5920
5959
  }
5921
5960
  });
5922
5961
  else {
5923
- const s = O.getState().document, d = s[a] && s[a].type, u = {
5962
+ const s = M.getState().document, d = s[a] && s[a].type, u = {
5924
5963
  [i]: {
5925
5964
  type: "Container",
5926
5965
  data: {
@@ -5935,12 +5974,12 @@ function Mc({ style: e, props: t }) {
5935
5974
  }
5936
5975
  ) });
5937
5976
  }
5938
- let Nc = 0;
5939
- function Rc() {
5940
- return `block-${Date.now()}-${++Nc}`;
5977
+ let Mc = 0;
5978
+ function Oc() {
5979
+ return `block-${Date.now()}-${++Mc}`;
5941
5980
  }
5942
- const ur = () => window.__currentDraggedBlockId || null, Pc = () => window.__currentDraggedBlock || null;
5943
- function Fc(e) {
5981
+ const ur = () => window.__currentDraggedBlockId || null, Nc = () => window.__currentDraggedBlock || null;
5982
+ function Rc(e) {
5944
5983
  switch (e ?? "MODERN_SANS") {
5945
5984
  case "MODERN_SANS":
5946
5985
  return "Helvetica, Arial, sans-serif";
@@ -5962,7 +6001,7 @@ function Fc(e) {
5962
6001
  return "monospace";
5963
6002
  }
5964
6003
  }
5965
- function zc(e) {
6004
+ function Pc(e) {
5966
6005
  const t = e.childrenIds ?? [], n = Qe(), r = Tt();
5967
6006
  return /* @__PURE__ */ o(
5968
6007
  "div",
@@ -5985,7 +6024,7 @@ function zc(e) {
5985
6024
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1;
5986
6025
  return;
5987
6026
  }
5988
- const u = window.__isSidebarBlock === !0, g = Pc();
6027
+ const u = window.__isSidebarBlock === !0, g = Nc();
5989
6028
  if (!g) {
5990
6029
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1;
5991
6030
  return;
@@ -5994,12 +6033,12 @@ function zc(e) {
5994
6033
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1;
5995
6034
  return;
5996
6035
  }
5997
- const f = u ? Rc() : d;
6036
+ const f = u ? Oc() : d;
5998
6037
  if (f === r) {
5999
6038
  window.__currentDraggedBlockId = null, window.__currentDraggedBlock = null, window.__isSidebarBlock = !1;
6000
6039
  return;
6001
6040
  }
6002
- const m = O.getState().document;
6041
+ const m = M.getState().document;
6003
6042
  if (!u) {
6004
6043
  let ce = { containerId: null, columnIndex: null };
6005
6044
  for (const [_, x] of Object.entries(m)) {
@@ -6067,7 +6106,7 @@ function zc(e) {
6067
6106
  _e(x);
6068
6107
  }
6069
6108
  }
6070
- const h = [...t, f], b = O.getState().document, S = b[f] && b[f].type, y = {
6109
+ const h = [...t, f], b = M.getState().document, S = b[f] && b[f].type, y = {
6071
6110
  [r]: {
6072
6111
  type: "EmailLayout",
6073
6112
  data: {
@@ -6081,7 +6120,7 @@ function zc(e) {
6081
6120
  style: {
6082
6121
  backgroundColor: e.backdropColor ?? "#F5F5F5",
6083
6122
  color: e.textColor ?? "#262626",
6084
- fontFamily: Fc(e.fontFamily),
6123
+ fontFamily: Rc(e.fontFamily),
6085
6124
  fontSize: "16px",
6086
6125
  fontWeight: "400",
6087
6126
  letterSpacing: "0.15008px",
@@ -6131,7 +6170,7 @@ function zc(e) {
6131
6170
  }
6132
6171
  });
6133
6172
  else {
6134
- const d = O.getState().document, u = d[c] && d[c].type, g = {
6173
+ const d = M.getState().document, u = d[c] && d[c].type, g = {
6135
6174
  [r]: {
6136
6175
  type: "EmailLayout",
6137
6176
  data: {
@@ -6150,9 +6189,9 @@ function zc(e) {
6150
6189
  }
6151
6190
  );
6152
6191
  }
6153
- function Lc(e) {
6192
+ function Fc(e) {
6154
6193
  var g;
6155
- const { t } = Se(), n = Tt(), r = Xr(), [i, l] = z("url"), [a, c] = z(!1), [s, d] = z(""), u = Me(null);
6194
+ const { t } = Se(), n = Tt(), r = Gr(), [i, l] = z("url"), [a, c] = z(!1), [s, d] = z(""), u = Oe(null);
6156
6195
  if (!((g = e.props) != null && g.url)) {
6157
6196
  const f = async (y) => {
6158
6197
  var D;
@@ -6160,7 +6199,7 @@ function Lc(e) {
6160
6199
  if (!(!k || !r)) {
6161
6200
  c(!0);
6162
6201
  try {
6163
- const E = await r(k), N = O.getState().document[n];
6202
+ const E = await r(k), N = M.getState().document[n];
6164
6203
  N && N.type === "Image" && _e({
6165
6204
  [n]: {
6166
6205
  ...N,
@@ -6182,7 +6221,7 @@ function Lc(e) {
6182
6221
  var k;
6183
6222
  y.stopPropagation(), y.preventDefault(), (k = u.current) == null || k.click();
6184
6223
  }, h = () => {
6185
- const y = s.trim().length === 0 ? null : s.trim(), k = O.getState().document[n];
6224
+ const y = s.trim().length === 0 ? null : s.trim(), k = M.getState().document[n];
6186
6225
  k && k.type === "Image" && _e({
6187
6226
  [n]: {
6188
6227
  ...k,
@@ -6230,7 +6269,7 @@ function Lc(e) {
6230
6269
  size: "small",
6231
6270
  fullWidth: !0,
6232
6271
  children: [
6233
- /* @__PURE__ */ o(Kn, { fontSize: "small", sx: { mr: 0.5 } }),
6272
+ /* @__PURE__ */ o(An, { fontSize: "small", sx: { mr: 0.5 } }),
6234
6273
  t("image.url")
6235
6274
  ]
6236
6275
  }
@@ -6269,7 +6308,7 @@ function Lc(e) {
6269
6308
  }
6270
6309
  ),
6271
6310
  /* @__PURE__ */ o(
6272
- Oe,
6311
+ Me,
6273
6312
  {
6274
6313
  variant: "contained",
6275
6314
  size: "small",
@@ -6278,7 +6317,7 @@ function Lc(e) {
6278
6317
  },
6279
6318
  onMouseDown: (y) => y.stopPropagation(),
6280
6319
  sx: { minWidth: "auto", px: 2 },
6281
- children: /* @__PURE__ */ o(zr, { fontSize: "small" })
6320
+ children: /* @__PURE__ */ o(jr, { fontSize: "small" })
6282
6321
  }
6283
6322
  )
6284
6323
  ] }) : /* @__PURE__ */ w(Z, { spacing: 1, children: [
@@ -6293,10 +6332,10 @@ function Lc(e) {
6293
6332
  }
6294
6333
  ),
6295
6334
  /* @__PURE__ */ o(
6296
- Oe,
6335
+ Me,
6297
6336
  {
6298
6337
  variant: "outlined",
6299
- startIcon: a ? /* @__PURE__ */ o(jn, { size: 16 }) : /* @__PURE__ */ o(Ft, {}),
6338
+ startIcon: a ? /* @__PURE__ */ o(Kn, { size: 16 }) : /* @__PURE__ */ o(Ft, {}),
6300
6339
  onClick: m,
6301
6340
  onMouseDown: (y) => y.stopPropagation(),
6302
6341
  disabled: a || !r,
@@ -6317,13 +6356,13 @@ function Lc(e) {
6317
6356
  onClick: (f) => {
6318
6357
  },
6319
6358
  sx: { display: "inline-block", width: "100%" },
6320
- children: /* @__PURE__ */ o(Ui, { ...e })
6359
+ children: /* @__PURE__ */ o(ki, { ...e })
6321
6360
  }
6322
6361
  );
6323
6362
  }
6324
- function Wc(e) {
6363
+ function zc(e) {
6325
6364
  var g, f, m;
6326
- const { t } = Se(), n = Tt(), r = Gr(), [i, l] = z("url"), [a, c] = z(!1), [s, d] = z(""), u = Me(null);
6365
+ const { t } = Se(), n = Tt(), r = Jr(), [i, l] = z("url"), [a, c] = z(!1), [s, d] = z(""), u = Oe(null);
6327
6366
  if (!((g = e.props) != null && g.url)) {
6328
6367
  const h = async (D) => {
6329
6368
  var N;
@@ -6331,7 +6370,7 @@ function Wc(e) {
6331
6370
  if (!(!E || !r)) {
6332
6371
  c(!0);
6333
6372
  try {
6334
- const W = await r(E), P = O.getState().document[n];
6373
+ const W = await r(E), P = M.getState().document[n];
6335
6374
  P && P.type === "Video" && _e({
6336
6375
  [n]: {
6337
6376
  ...P,
@@ -6353,7 +6392,7 @@ function Wc(e) {
6353
6392
  var E;
6354
6393
  D.stopPropagation(), D.preventDefault(), (E = u.current) == null || E.click();
6355
6394
  }, S = () => {
6356
- const D = s.trim().length === 0 ? null : s.trim(), E = O.getState().document[n];
6395
+ const D = s.trim().length === 0 ? null : s.trim(), E = M.getState().document[n];
6357
6396
  E && E.type === "Video" && _e({
6358
6397
  [n]: {
6359
6398
  ...E,
@@ -6401,7 +6440,7 @@ function Wc(e) {
6401
6440
  size: "small",
6402
6441
  fullWidth: !0,
6403
6442
  children: [
6404
- /* @__PURE__ */ o(Kn, { fontSize: "small", sx: { mr: 0.5 } }),
6443
+ /* @__PURE__ */ o(An, { fontSize: "small", sx: { mr: 0.5 } }),
6405
6444
  t("video.url")
6406
6445
  ]
6407
6446
  }
@@ -6440,7 +6479,7 @@ function Wc(e) {
6440
6479
  }
6441
6480
  ),
6442
6481
  /* @__PURE__ */ o(
6443
- Oe,
6482
+ Me,
6444
6483
  {
6445
6484
  variant: "contained",
6446
6485
  size: "small",
@@ -6449,7 +6488,7 @@ function Wc(e) {
6449
6488
  },
6450
6489
  onMouseDown: (D) => D.stopPropagation(),
6451
6490
  sx: { minWidth: "auto", px: 2 },
6452
- children: /* @__PURE__ */ o(zr, { fontSize: "small" })
6491
+ children: /* @__PURE__ */ o(jr, { fontSize: "small" })
6453
6492
  }
6454
6493
  )
6455
6494
  ] }) : /* @__PURE__ */ w(Z, { spacing: 1, children: [
@@ -6464,10 +6503,10 @@ function Wc(e) {
6464
6503
  }
6465
6504
  ),
6466
6505
  /* @__PURE__ */ o(
6467
- Oe,
6506
+ Me,
6468
6507
  {
6469
6508
  variant: "outlined",
6470
- startIcon: a ? /* @__PURE__ */ o(jn, { size: 16 }) : /* @__PURE__ */ o(Ft, {}),
6509
+ startIcon: a ? /* @__PURE__ */ o(Kn, { size: 16 }) : /* @__PURE__ */ o(Ft, {}),
6471
6510
  onClick: b,
6472
6511
  onMouseDown: (D) => D.stopPropagation(),
6473
6512
  disabled: a || !r,
@@ -6495,11 +6534,11 @@ function Wc(e) {
6495
6534
  backgroundColor: ((f = e.style) == null ? void 0 : f.backgroundColor) || void 0,
6496
6535
  textAlign: ((m = e.style) == null ? void 0 : m.textAlign) || void 0
6497
6536
  },
6498
- children: /* @__PURE__ */ o(ea, { ...e })
6537
+ children: /* @__PURE__ */ o(Xi, { ...e })
6499
6538
  }
6500
6539
  );
6501
6540
  }
6502
- function Hc(e) {
6541
+ function Lc(e) {
6503
6542
  var l, a;
6504
6543
  const { t } = Se(), n = ((l = e.props) == null ? void 0 : l.socials) || [], r = ((a = e.props) == null ? void 0 : a.platforms) || [];
6505
6544
  return (n.length > 0 ? n.map((c) => c.platform) : r).length === 0 ? /* @__PURE__ */ o(
@@ -6517,14 +6556,14 @@ function Hc(e) {
6517
6556
  },
6518
6557
  children: /* @__PURE__ */ o(ke, { variant: "body2", sx: { textAlign: "center", px: 2 }, children: t("socials.placeholder") })
6519
6558
  }
6520
- ) : /* @__PURE__ */ o(ta, { ...e });
6559
+ ) : /* @__PURE__ */ o(Gi, { ...e });
6521
6560
  }
6522
- function Vc(e) {
6561
+ function Wc(e) {
6523
6562
  const t = e == null ? void 0 : e.padding;
6524
6563
  if (t)
6525
6564
  return `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
6526
6565
  }
6527
- function Uc(e, t) {
6566
+ function Hc(e, t) {
6528
6567
  e.focus();
6529
6568
  const n = t.replace(/\r\n/g, `
6530
6569
  `);
@@ -6535,7 +6574,7 @@ function Uc(e, t) {
6535
6574
  }
6536
6575
  xt(e);
6537
6576
  }
6538
- function $c(e, t, n) {
6577
+ function Vc(e, t, n) {
6539
6578
  const r = document;
6540
6579
  let i = null;
6541
6580
  if (r.caretPositionFromPoint) {
@@ -6546,7 +6585,7 @@ function $c(e, t, n) {
6546
6585
  const l = window.getSelection();
6547
6586
  return l == null || l.removeAllRanges(), l == null || l.addRange(i), !0;
6548
6587
  }
6549
- function xl(e) {
6588
+ function Sl(e) {
6550
6589
  const t = window.getSelection();
6551
6590
  if (!t) return;
6552
6591
  const n = document.createRange();
@@ -6556,7 +6595,7 @@ function Nt(e) {
6556
6595
  xt(e);
6557
6596
  const t = e.querySelectorAll("p"), n = t.length ? t[t.length - 1] : null;
6558
6597
  if (!n) {
6559
- xl(e);
6598
+ Sl(e);
6560
6599
  return;
6561
6600
  }
6562
6601
  const r = window.getSelection();
@@ -6564,7 +6603,7 @@ function Nt(e) {
6564
6603
  const i = document.createRange();
6565
6604
  i.selectNodeContents(n), i.collapse(!1), r.removeAllRanges(), r.addRange(i);
6566
6605
  }
6567
- function jc(e) {
6606
+ function Uc(e) {
6568
6607
  const t = window.getSelection();
6569
6608
  if (!t || t.rangeCount === 0) return;
6570
6609
  const n = t.getRangeAt(0);
@@ -6572,11 +6611,11 @@ function jc(e) {
6572
6611
  const i = document.createRange();
6573
6612
  i.setStart(n.endContainer, n.endOffset), i.collapse(!0), t.removeAllRanges(), t.addRange(i);
6574
6613
  }
6575
- function Sl(e) {
6614
+ function vl(e) {
6576
6615
  const t = document.createElement("span");
6577
- return t.textContent = e, t.setAttribute("data-text-variable", e), t.setAttribute("data-variable-instance-id", ol()), t.contentEditable = "false", t.setAttribute("contenteditable", "false"), t.setAttribute("contentEditable", "false"), t.style.whiteSpace = "nowrap", t.style.display = "inline-block", t.style.overflowWrap = "normal", t.style.wordBreak = "normal", vl(t), t;
6616
+ return t.textContent = e, t.setAttribute("data-text-variable", e), t.setAttribute("data-variable-instance-id", rl()), t.contentEditable = "false", t.setAttribute("contenteditable", "false"), t.setAttribute("contentEditable", "false"), t.style.whiteSpace = "nowrap", t.style.display = "inline-block", t.style.overflowWrap = "normal", t.style.wordBreak = "normal", wl(t), t;
6578
6617
  }
6579
- function vl(e) {
6618
+ function wl(e) {
6580
6619
  e.style.userSelect = "all", e.style.webkitUserSelect = "all", e.style.border = "1px solid rgba(25, 118, 210, 0.55)", e.style.borderRadius = "4px", e.style.padding = "0 4px", e.style.boxShadow = "inset 0 -999px 0 rgba(25, 118, 210, 0.08)";
6581
6620
  }
6582
6621
  function dr(e) {
@@ -6588,30 +6627,30 @@ function dr(e) {
6588
6627
  e.setAttribute("contenteditable", "false"), e.setAttribute("contentEditable", "false");
6589
6628
  }
6590
6629
  }
6591
- function Kc(e) {
6630
+ function $c(e) {
6592
6631
  try {
6593
6632
  e.contentEditable = "true";
6594
6633
  } catch {
6595
6634
  }
6596
6635
  e.setAttribute("contenteditable", "true"), e.setAttribute("contentEditable", "true");
6597
6636
  }
6598
- function Wn(e) {
6637
+ function Hn(e) {
6599
6638
  const t = (e.textContent ?? "").replace(/\u200B/g, "");
6600
6639
  return !!e.querySelector("br") && t.length === 0;
6601
6640
  }
6602
6641
  function xn(e) {
6603
6642
  const t = Array.from(e.querySelectorAll("p")), n = [];
6604
6643
  for (const r of t) {
6605
- if (Wn(r)) {
6644
+ if (Hn(r)) {
6606
6645
  n.push("");
6607
6646
  continue;
6608
6647
  }
6609
- n.push(rl(r));
6648
+ n.push(ll(r));
6610
6649
  }
6611
6650
  return n.join(`
6612
6651
  `);
6613
6652
  }
6614
- function qc(e) {
6653
+ function jc(e) {
6615
6654
  return qn(e).filter((t) => t.instanceId).map((t) => {
6616
6655
  const n = t.builtin ? "system" : "user";
6617
6656
  return {
@@ -6622,7 +6661,7 @@ function qc(e) {
6622
6661
  };
6623
6662
  });
6624
6663
  }
6625
- function Yc(e, t) {
6664
+ function Kc(e, t) {
6626
6665
  const n = window.getSelection();
6627
6666
  if (!n || (n.rangeCount === 0 && Nt(e), n.rangeCount === 0)) return null;
6628
6667
  const r = n.getRangeAt(0);
@@ -6636,31 +6675,31 @@ function Yc(e, t) {
6636
6675
  }
6637
6676
  const u = n.getRangeAt(0);
6638
6677
  u.deleteContents();
6639
- const g = Sl(t);
6678
+ const g = vl(t);
6640
6679
  u.insertNode(g);
6641
6680
  const f = document.createRange();
6642
6681
  return f.setStartAfter(g), f.collapse(!0), n.removeAllRanges(), n.addRange(f), g.getAttribute("data-variable-instance-id");
6643
6682
  }
6644
- function Xc(e, t, n, r) {
6683
+ function qc(e, t, n, r) {
6645
6684
  const i = Et(e, t, n);
6646
6685
  if (!i) return null;
6647
6686
  const l = window.getSelection();
6648
6687
  if (!l) return null;
6649
6688
  l.removeAllRanges(), l.addRange(i), i.deleteContents();
6650
- const a = Sl(r);
6689
+ const a = vl(r);
6651
6690
  i.insertNode(a);
6652
6691
  const c = document.createRange();
6653
6692
  return c.setStartAfter(a), c.collapse(!0), l.removeAllRanges(), l.addRange(c), a.getAttribute("data-variable-instance-id");
6654
6693
  }
6655
- function Gc(e) {
6694
+ function Yc(e) {
6656
6695
  var E, N, W, P, he, be, ce, _, x, T, U, ie;
6657
- const t = Tt(), n = cn(), r = qr(), i = Yr(), l = Kr(), a = ya(), c = Me(null), s = Me(null), d = Me(""), u = Me(!1), g = Me(null), f = Me(null), m = n === t, { allowedUser: h, allowedBuiltin: b } = ct(
6658
- () => rc({ baseGroups: Ao, contactAttributes: l }),
6696
+ const t = Tt(), n = cn(), r = Yr(), i = Xr(), l = qr(), a = ba(), c = Oe(null), s = Oe(null), d = Oe(""), u = Oe(!1), g = Oe(null), f = Oe(null), m = n === t, { allowedUser: h, allowedBuiltin: b } = ct(
6697
+ () => nc({ baseGroups: Ao, contactAttributes: l }),
6659
6698
  [l]
6660
6699
  ), S = {
6661
6700
  ..._r(e.style ?? null),
6662
6701
  textAlign: ((E = e.style) == null ? void 0 : E.textAlign) ?? void 0,
6663
- padding: Vc(e.style ?? null),
6702
+ padding: Wc(e.style ?? null),
6664
6703
  margin: 0
6665
6704
  }, y = en(() => {
6666
6705
  if (!m) return;
@@ -6676,10 +6715,10 @@ function Gc(e) {
6676
6715
  }, [y, (N = e.props) == null ? void 0 : N.html, (W = e.props) == null ? void 0 : W.text, (P = e.props) == null ? void 0 : P.message, (he = e.props) == null ? void 0 : he.variables, m]);
6677
6716
  const k = en(
6678
6717
  (C, p, F) => {
6679
- const X = O.getState().document[t];
6718
+ const X = M.getState().document[t];
6680
6719
  if (!X || X.type !== "Text") return;
6681
6720
  d.current = C;
6682
- const V = qc(C);
6721
+ const V = jc(C);
6683
6722
  _e({
6684
6723
  [t]: {
6685
6724
  ...X,
@@ -6725,9 +6764,9 @@ function Gc(e) {
6725
6764
  s.current = C.firstElementChild;
6726
6765
  const p = s.current;
6727
6766
  if (!p) return;
6728
- Kc(p), p.setAttribute("data-monto-text-block-id", t), p.style.outline = "none", p.style.cursor = "text";
6767
+ $c(p), p.setAttribute("data-monto-text-block-id", t), p.style.outline = "none", p.style.cursor = "text";
6729
6768
  for (const v of Array.from(p.querySelectorAll("[data-text-variable]")))
6730
- dr(v), vl(v);
6769
+ dr(v), wl(v);
6731
6770
  const F = { current: !1 }, X = (v) => {
6732
6771
  var Ie, ne;
6733
6772
  if (F.current || v.rangeCount === 0) return null;
@@ -6777,7 +6816,7 @@ function Gc(e) {
6777
6816
  }, V = () => {
6778
6817
  const v = window.getSelection();
6779
6818
  if (!v || v.rangeCount === 0) {
6780
- yt(null), Bn(null);
6819
+ yt(null), Mn(null);
6781
6820
  return;
6782
6821
  }
6783
6822
  const ee = X(v) ?? v.getRangeAt(0);
@@ -6785,16 +6824,16 @@ function Gc(e) {
6785
6824
  if (ee.collapsed) {
6786
6825
  yt(null);
6787
6826
  const { start: Q } = tn(p, ee);
6788
- Bn({ blockId: t, offset: Q });
6827
+ Mn({ blockId: t, offset: Q });
6789
6828
  return;
6790
6829
  }
6791
6830
  const { start: L, end: G } = tn(p, ee), ae = Dt(p), re = Math.max(0, Math.min(L, G)), ue = Math.min(ae.length, Math.max(L, G));
6792
6831
  if (re >= ue) {
6793
- yt(null), Bn({ blockId: t, offset: re });
6832
+ yt(null), Mn({ blockId: t, offset: re });
6794
6833
  return;
6795
6834
  }
6796
- const te = Mt(p, re);
6797
- hn({ blockId: t, text: ae, styleSnapshot: te }), yt({ blockId: t, start: re, end: ue }), Bn({ blockId: t, offset: ue });
6835
+ const te = Ot(p, re);
6836
+ hn({ blockId: t, text: ae, styleSnapshot: te }), yt({ blockId: t, start: re, end: ue }), Mn({ blockId: t, offset: ue });
6798
6837
  }, me = () => {
6799
6838
  f.current = null;
6800
6839
  const v = Dt(p), Y = window.getSelection();
@@ -6803,7 +6842,7 @@ function Gc(e) {
6803
6842
  const L = Y.getRangeAt(0);
6804
6843
  if (p.contains(L.startContainer) && p.contains(L.endContainer)) {
6805
6844
  const { start: G } = tn(p, L);
6806
- ee = Mt(p, Math.min(Math.max(G, 0), Math.max(v.length - 1, 0)));
6845
+ ee = Ot(p, Math.min(Math.max(G, 0), Math.max(v.length - 1, 0)));
6807
6846
  }
6808
6847
  }
6809
6848
  hn({ blockId: t, text: v, styleSnapshot: ee });
@@ -6829,11 +6868,11 @@ function Gc(e) {
6829
6868
  }
6830
6869
  } catch {
6831
6870
  }
6832
- Uc(p, Y);
6871
+ Hc(p, Y);
6833
6872
  }, Re = (v) => {
6834
6873
  var ee;
6835
6874
  v.preventDefault();
6836
- const Y = rl(p);
6875
+ const Y = ll(p);
6837
6876
  (ee = v.clipboardData) == null || ee.setData("text/plain", Y);
6838
6877
  }, je = (v) => {
6839
6878
  var Y, ee, L, G, ae, re, ue;
@@ -6863,9 +6902,9 @@ function Gc(e) {
6863
6902
  const $ = document.createRange();
6864
6903
  $.setStartAfter(fe), $.collapse(!0), te.removeAllRanges(), te.addRange($);
6865
6904
  }
6866
- const I = document.createTextNode(v.key), M = te.rangeCount > 0 ? te.getRangeAt(0) : null;
6867
- if (M && p.contains(M.startContainer)) {
6868
- M.insertNode(I);
6905
+ const I = document.createTextNode(v.key), O = te.rangeCount > 0 ? te.getRangeAt(0) : null;
6906
+ if (O && p.contains(O.startContainer)) {
6907
+ O.insertNode(I);
6869
6908
  const $ = document.createRange();
6870
6909
  $.setStartAfter(I), $.collapse(!0), te.removeAllRanges(), te.addRange($);
6871
6910
  }
@@ -6885,8 +6924,8 @@ function Gc(e) {
6885
6924
  if (De || oe || (() => {
6886
6925
  var I;
6887
6926
  try {
6888
- const M = Q.cloneContents();
6889
- return !!((I = M.querySelector) != null && I.call(M, "a,[data-text-variable]"));
6927
+ const O = Q.cloneContents();
6928
+ return !!((I = O.querySelector) != null && I.call(O, "a,[data-text-variable]"));
6890
6929
  } catch {
6891
6930
  return !1;
6892
6931
  }
@@ -6917,12 +6956,12 @@ function Gc(e) {
6917
6956
  try {
6918
6957
  const fe = document.createRange();
6919
6958
  if (fe.setStart(A, 0), fe.setEnd(Q.startContainer, Q.startOffset), fe.toString().replace(/\u200B/g, "").length === 0) {
6920
- let M = A.previousElementSibling, $ = !1;
6921
- for (; M && M.tagName === "P"; ) {
6922
- const j = M, R = (j.textContent ?? "").replace(/\u200B/g, "");
6959
+ let O = A.previousElementSibling, $ = !1;
6960
+ for (; O && O.tagName === "P"; ) {
6961
+ const j = O, R = (j.textContent ?? "").replace(/\u200B/g, "");
6923
6962
  if (!(!!j.querySelector("br") && R.length === 0)) break;
6924
6963
  const Ee = j;
6925
- M = Ee.previousElementSibling, (G = Ee.parentElement) == null || G.removeChild(Ee), $ = !0;
6964
+ O = Ee.previousElementSibling, (G = Ee.parentElement) == null || G.removeChild(Ee), $ = !0;
6926
6965
  }
6927
6966
  if ($) {
6928
6967
  v.preventDefault(), v.stopPropagation(), xt(p);
@@ -6944,7 +6983,7 @@ function Gc(e) {
6944
6983
  try {
6945
6984
  if (te && te.rangeCount > 0) {
6946
6985
  const ne = te.getRangeAt(0);
6947
- p.contains(ne.startContainer) && p.contains(ne.endContainer) && (Q = ((ae = ((H) => H.nodeType === Node.ELEMENT_NODE ? H : H.parentElement)(ne.startContainer)) == null ? void 0 : ae.closest("p")) ?? null, Q && (Ie = Wn(Q)));
6986
+ p.contains(ne.startContainer) && p.contains(ne.endContainer) && (Q = ((ae = ((H) => H.nodeType === Node.ELEMENT_NODE ? H : H.parentElement)(ne.startContainer)) == null ? void 0 : ae.closest("p")) ?? null, Q && (Ie = Hn(Q)));
6948
6987
  }
6949
6988
  } catch {
6950
6989
  Q = null, Ie = !1;
@@ -6954,18 +6993,18 @@ function Gc(e) {
6954
6993
  if (ne && ne.rangeCount > 0) {
6955
6994
  const A = ne.getRangeAt(0);
6956
6995
  if (p.contains(A.startContainer) && p.contains(A.endContainer) && A.collapsed) {
6957
- const oe = ((re = ((M) => M.nodeType === Node.ELEMENT_NODE ? M : M.parentElement)(A.startContainer)) == null ? void 0 : re.closest("p")) ?? null, fe = (() => {
6958
- const M = A.startContainer;
6959
- if (M.nodeType === Node.TEXT_NODE) {
6960
- const $ = (M.textContent ?? "").length;
6961
- return A.startOffset < $ ? null : M.nextSibling;
6996
+ const oe = ((re = ((O) => O.nodeType === Node.ELEMENT_NODE ? O : O.parentElement)(A.startContainer)) == null ? void 0 : re.closest("p")) ?? null, fe = (() => {
6997
+ const O = A.startContainer;
6998
+ if (O.nodeType === Node.TEXT_NODE) {
6999
+ const $ = (O.textContent ?? "").length;
7000
+ return A.startOffset < $ ? null : O.nextSibling;
6962
7001
  }
6963
- return M.nodeType === Node.ELEMENT_NODE ? M.childNodes[A.startOffset] ?? null : null;
7002
+ return O.nodeType === Node.ELEMENT_NODE ? O.childNodes[A.startOffset] ?? null : null;
6964
7003
  })(), I = !!(fe && fe.nodeType === Node.ELEMENT_NODE && ((ue = fe.closest) != null && ue.call(fe, "[data-text-variable]")));
6965
7004
  if (oe && I) {
6966
- const M = document.createRange();
6967
- M.selectNodeContents(oe), M.setStart(A.startContainer, A.startOffset);
6968
- const $ = M.extractContents(), j = document.createElement("p");
7005
+ const O = document.createRange();
7006
+ O.selectNodeContents(oe), O.setStart(A.startContainer, A.startOffset);
7007
+ const $ = O.extractContents(), j = document.createElement("p");
6969
7008
  j.appendChild($), oe.insertAdjacentElement("afterend", j), xt(p);
6970
7009
  const R = document.createRange();
6971
7010
  R.selectNodeContents(j), R.collapse(!0), ne.removeAllRanges(), ne.addRange(R), V(), v.stopPropagation();
@@ -6976,7 +7015,7 @@ function Gc(e) {
6976
7015
  } catch {
6977
7016
  }
6978
7017
  document.execCommand("insertParagraph", !1), xt(p), requestAnimationFrame(() => {
6979
- var M, $, j, R, de, Ee, Pe, ye, Be, xe;
7018
+ var O, $, j, R, de, Ee, Pe, ye, Be, xe;
6980
7019
  try {
6981
7020
  p.focus({ preventScroll: !0 });
6982
7021
  } catch {
@@ -6984,12 +7023,12 @@ function Gc(e) {
6984
7023
  const ne = window.getSelection();
6985
7024
  try {
6986
7025
  if (Q && Q.isConnected) {
6987
- const ge = ((M = Q.nextElementSibling) == null ? void 0 : M.tagName) === "P" ? Q.nextElementSibling : null;
7026
+ const ge = ((O = Q.nextElementSibling) == null ? void 0 : O.tagName) === "P" ? Q.nextElementSibling : null;
6988
7027
  if (ge && ne) {
6989
7028
  try {
6990
- if (!Ie && Wn(ge)) {
7029
+ if (!Ie && Hn(ge)) {
6991
7030
  const We = (($ = ge.nextElementSibling) == null ? void 0 : $.tagName) === "P" ? ge.nextElementSibling : null;
6992
- We && Wn(We) && ((j = We.parentElement) == null || j.removeChild(We), xt(p));
7031
+ We && Hn(We) && ((j = We.parentElement) == null || j.removeChild(We), xt(p));
6993
7032
  }
6994
7033
  } catch {
6995
7034
  }
@@ -7121,7 +7160,7 @@ function Gc(e) {
7121
7160
  return;
7122
7161
  }
7123
7162
  }
7124
- p.focus({ preventScroll: !0 }), $c(p, v.clientX, v.clientY) || xl(p), jc(p), yt(null), requestAnimationFrame(V);
7163
+ p.focus({ preventScroll: !0 }), Vc(p, v.clientX, v.clientY) || Sl(p), Uc(p), yt(null), requestAnimationFrame(V);
7125
7164
  };
7126
7165
  return document.addEventListener("selectionchange", ve), p.addEventListener("blur", D), p.addEventListener("input", we), p.addEventListener("paste", K), p.addEventListener("copy", Re), p.addEventListener("keydown", je), p.addEventListener("beforeinput", _t), p.addEventListener("mousedown", pe), p.addEventListener("mouseup", q), p.addEventListener("click", ht), () => {
7127
7166
  document.removeEventListener("selectionchange", ve), p.removeEventListener("blur", D), p.removeEventListener("input", we), p.removeEventListener("paste", K), p.removeEventListener("copy", Re), p.removeEventListener("keydown", je), p.removeEventListener("beforeinput", _t), p.removeEventListener("mousedown", pe), p.removeEventListener("mouseup", q), p.removeEventListener("click", ht), p.contentEditable = "false", p.style.cursor = "", s.current = null, f.current != null && (cancelAnimationFrame(f.current), f.current = null);
@@ -7143,21 +7182,21 @@ function Gc(e) {
7143
7182
  De && oe && (oe.removeAllRanges(), oe.addRange(De));
7144
7183
  } else
7145
7184
  Nt(p);
7146
- const G = Yc(p, C.token), ae = O.getState().document[t], re = ((q = (pe = ae == null ? void 0 : ae.data) == null ? void 0 : pe.props) == null ? void 0 : q.variableDefaults) ?? null, { variableDefaults: ue } = bn(p, re), te = C.defaultValue ?? "";
7185
+ const G = Kc(p, C.token), ae = M.getState().document[t], re = ((q = (pe = ae == null ? void 0 : ae.data) == null ? void 0 : pe.props) == null ? void 0 : q.variableDefaults) ?? null, { variableDefaults: ue } = bn(p, re), te = C.defaultValue ?? "";
7147
7186
  G && te !== "" && (ue[G] = te);
7148
7187
  const Q = Cn(p), Ie = xn(p);
7149
7188
  k(Q, Ie, ue), Sn(), Yt();
7150
7189
  const ne = Dt(p);
7151
7190
  pt(p);
7152
- const A = ne.length > 0 ? Mt(p, Math.max(0, ne.length - 1)) : {};
7191
+ const A = ne.length > 0 ? Ot(p, Math.max(0, ne.length - 1)) : {};
7153
7192
  hn({ blockId: t, text: ne, styleSnapshot: A });
7154
7193
  return;
7155
7194
  } else if (C.kind === "replaceVariable") {
7156
- const G = Xc(p, C.start, C.end, C.token), ae = O.getState().document[t], re = ((Y = (v = ae == null ? void 0 : ae.data) == null ? void 0 : v.props) == null ? void 0 : Y.variableDefaults) ?? null, { variableDefaults: ue } = bn(p, re), te = C.defaultValue ?? "";
7195
+ const G = qc(p, C.start, C.end, C.token), ae = M.getState().document[t], re = ((Y = (v = ae == null ? void 0 : ae.data) == null ? void 0 : v.props) == null ? void 0 : Y.variableDefaults) ?? null, { variableDefaults: ue } = bn(p, re), te = C.defaultValue ?? "";
7157
7196
  G && te !== "" && (ue[G] = te);
7158
7197
  const Q = Cn(p), Ie = xn(p);
7159
7198
  k(Q, Ie, ue), Sn(), Yt();
7160
- const ne = Dt(p), A = ne.length > 0 ? Mt(p, Math.max(0, ne.length - 1)) : {};
7199
+ const ne = Dt(p), A = ne.length > 0 ? Ot(p, Math.max(0, ne.length - 1)) : {};
7161
7200
  hn({ blockId: t, text: ne, styleSnapshot: A }), yt(null);
7162
7201
  return;
7163
7202
  } else {
@@ -7172,26 +7211,26 @@ function Gc(e) {
7172
7211
  return;
7173
7212
  }
7174
7213
  const re = window.getSelection();
7175
- re == null || re.removeAllRanges(), re == null || re.addRange(ae), C.kind === "style" ? cs(p, G.start, G.end, {
7214
+ re == null || re.removeAllRanges(), re == null || re.addRange(ae), C.kind === "style" ? as(p, G.start, G.end, {
7176
7215
  patch: C.style,
7177
7216
  global: e.style ?? null
7178
- }) : us(p, G.start, G.end, C.href, C.targetBlank);
7217
+ }) : ss(p, G.start, G.end, C.href, C.targetBlank);
7179
7218
  }
7180
7219
  xt(p);
7181
- const F = O.getState().document[t], X = ((L = (ee = F == null ? void 0 : F.data) == null ? void 0 : ee.props) == null ? void 0 : L.variableDefaults) ?? null, { variableDefaults: V } = bn(p, X), me = Cn(p), ve = xn(p);
7220
+ const F = M.getState().document[t], X = ((L = (ee = F == null ? void 0 : F.data) == null ? void 0 : ee.props) == null ? void 0 : L.variableDefaults) ?? null, { variableDefaults: V } = bn(p, X), me = Cn(p), ve = xn(p);
7182
7221
  k(me, ve, V), Sn(), Yt();
7183
- const we = pt(p), K = r ? Math.min(r.start, we) : we, Re = r ? Math.min(r.end, we) : we, je = Dt(p), _t = je.length > 0 ? Mt(p, Math.min(K, je.length - 1)) : {};
7222
+ const we = pt(p), K = r ? Math.min(r.start, we) : we, Re = r ? Math.min(r.end, we) : we, je = Dt(p), _t = je.length > 0 ? Ot(p, Math.min(K, je.length - 1)) : {};
7184
7223
  hn({ blockId: t, text: je, styleSnapshot: _t });
7185
7224
  const ht = Et(p, K, Re);
7186
7225
  if (ht && K < Re) {
7187
7226
  const G = window.getSelection();
7188
7227
  G == null || G.removeAllRanges(), G == null || G.addRange(ht);
7189
7228
  }
7190
- }, [a == null ? void 0 : a.id, r, i, t, k, e.style]), m ? /* @__PURE__ */ o("div", { style: S, children: /* @__PURE__ */ o("div", { ref: c, style: { margin: 0, padding: 0 } }, t) }) : /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(Yl, { ...e }) });
7229
+ }, [a == null ? void 0 : a.id, r, i, t, k, e.style]), m ? /* @__PURE__ */ o("div", { style: S, children: /* @__PURE__ */ o("div", { ref: c, style: { margin: 0, padding: 0 } }, t) }) : /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(Xl, { ...e }) });
7191
7230
  }
7192
- function Jc(e) {
7193
- const t = Tt(), n = cn(), r = Me(null), i = Me(null), l = Me(!1), a = n === t, c = en((s) => {
7194
- const d = O.getState().document[t];
7231
+ function Xc(e) {
7232
+ const t = Tt(), n = cn(), r = Oe(null), i = Oe(null), l = Oe(!1), a = n === t, c = en((s) => {
7233
+ const d = M.getState().document[t];
7195
7234
  d && d.type === "Heading" && _e({
7196
7235
  [t]: {
7197
7236
  ...d,
@@ -7237,11 +7276,11 @@ function Jc(e) {
7237
7276
  };
7238
7277
  }
7239
7278
  } else !a && i.current && (i.current.contentEditable = "false", i.current.style.cursor = "", i.current = null, l.current = !1);
7240
- }, [a, t, c]), /* @__PURE__ */ o(se, { ref: r, children: /* @__PURE__ */ o(zi, { ...e }) });
7279
+ }, [a, t, c]), /* @__PURE__ */ o(se, { ref: r, children: /* @__PURE__ */ o(xi, { ...e }) });
7241
7280
  }
7242
- function Zc(e) {
7243
- const t = Tt(), n = cn(), r = Me(null), i = Me(null), l = Me(!1), a = n === t, c = en((s) => {
7244
- const d = O.getState().document[t];
7281
+ function Gc(e) {
7282
+ const t = Tt(), n = cn(), r = Oe(null), i = Oe(null), l = Oe(!1), a = n === t, c = en((s) => {
7283
+ const d = M.getState().document[t];
7245
7284
  d && d.type === "Button" && _e({
7246
7285
  [t]: {
7247
7286
  ...d,
@@ -7308,9 +7347,9 @@ function Zc(e) {
7308
7347
  }
7309
7348
  }
7310
7349
  } else !a && i.current && (i.current.contentEditable = "false", i.current.style.cursor = "", i.current = null, l.current = !1, r.current && (r.current.contentEditable = "false", r.current.style.cursor = ""));
7311
- }, [a, t, c]), /* @__PURE__ */ o(se, { ref: r, children: /* @__PURE__ */ o(Xl, { ...e }) });
7350
+ }, [a, t, c]), /* @__PURE__ */ o(se, { ref: r, children: /* @__PURE__ */ o(Gl, { ...e }) });
7312
7351
  }
7313
- function Qc() {
7352
+ function Jc() {
7314
7353
  return `block-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
7315
7354
  }
7316
7355
  function go(e, t) {
@@ -7318,7 +7357,7 @@ function go(e, t) {
7318
7357
  const n = e[t];
7319
7358
  if (!n)
7320
7359
  return { newDocument: e, newBlockId: t };
7321
- const r = Qc(), i = JSON.parse(JSON.stringify(n));
7360
+ const r = Jc(), i = JSON.parse(JSON.stringify(n));
7322
7361
  let l = { ...e };
7323
7362
  if (i.type === "Container" && ((c = (a = i.data) == null ? void 0 : a.props) != null && c.childrenIds)) {
7324
7363
  const u = [];
@@ -7358,7 +7397,7 @@ function pr(e, t) {
7358
7397
  }
7359
7398
  return { containerId: null, columnIndex: null };
7360
7399
  }
7361
- const eu = {
7400
+ const Zc = {
7362
7401
  position: "absolute",
7363
7402
  bottom: -12,
7364
7403
  left: -50,
@@ -7367,7 +7406,7 @@ const eu = {
7367
7406
  paddingY: 0.5,
7368
7407
  zIndex: "fab"
7369
7408
  };
7370
- function tu({ blockId: e }) {
7409
+ function Qc({ blockId: e }) {
7371
7410
  const t = Qe(), n = pr(t, e), r = mt.useMemo(() => {
7372
7411
  var u, g;
7373
7412
  if (!n.containerId)
@@ -7594,19 +7633,19 @@ function tu({ blockId: e }) {
7594
7633
  }
7595
7634
  Rt(d), nt(e);
7596
7635
  };
7597
- return /* @__PURE__ */ o(Co, { sx: eu, onClick: (c) => c.stopPropagation(), children: /* @__PURE__ */ w(Z, { children: [
7598
- r.canMoveUp && /* @__PURE__ */ o(Ze, { title: "Move up", placement: "left", arrow: !0, children: /* @__PURE__ */ o($e, { onClick: () => a("up"), sx: { color: "text.primary" }, children: /* @__PURE__ */ o(wi, { fontSize: "small" }) }) }),
7599
- r.canMoveDown && /* @__PURE__ */ o(Ze, { title: "Move down", placement: "left", arrow: !0, children: /* @__PURE__ */ o($e, { onClick: () => a("down"), sx: { color: "text.primary" }, children: /* @__PURE__ */ o(Ii, { fontSize: "small" }) }) }),
7636
+ return /* @__PURE__ */ o(Co, { sx: Zc, onClick: (c) => c.stopPropagation(), children: /* @__PURE__ */ w(Z, { children: [
7637
+ r.canMoveUp && /* @__PURE__ */ o(Ze, { title: "Move up", placement: "left", arrow: !0, children: /* @__PURE__ */ o($e, { onClick: () => a("up"), sx: { color: "text.primary" }, children: /* @__PURE__ */ o(Zi, { fontSize: "small" }) }) }),
7638
+ r.canMoveDown && /* @__PURE__ */ o(Ze, { title: "Move down", placement: "left", arrow: !0, children: /* @__PURE__ */ o($e, { onClick: () => a("down"), sx: { color: "text.primary" }, children: /* @__PURE__ */ o(Ji, { fontSize: "small" }) }) }),
7600
7639
  (r.canMoveUp || r.canMoveDown) && /* @__PURE__ */ o(rn, { sx: { my: 1, mx: 1 } }),
7601
- e !== "root" && /* @__PURE__ */ o(Ze, { title: "Duplicate", placement: "left", arrow: !0, children: /* @__PURE__ */ o($e, { onClick: l, sx: { color: "text.primary" }, children: /* @__PURE__ */ o(ki, { sx: { fontSize: "16px" } }) }) }),
7602
- /* @__PURE__ */ o(Ze, { title: "Delete", placement: "left", arrow: !0, children: /* @__PURE__ */ o($e, { onClick: i, sx: { color: "text.primary" }, children: /* @__PURE__ */ o(Di, { color: "error", fontSize: "small" }) }) })
7640
+ e !== "root" && /* @__PURE__ */ o(Ze, { title: "Duplicate", placement: "left", arrow: !0, children: /* @__PURE__ */ o($e, { onClick: l, sx: { color: "text.primary" }, children: /* @__PURE__ */ o(Qi, { sx: { fontSize: "16px" } }) }) }),
7641
+ /* @__PURE__ */ o(Ze, { title: "Delete", placement: "left", arrow: !0, children: /* @__PURE__ */ o($e, { onClick: i, sx: { color: "text.primary" }, children: /* @__PURE__ */ o(ea, { color: "error", fontSize: "small" }) }) })
7603
7642
  ] }) });
7604
7643
  }
7605
7644
  function st({ children: e }) {
7606
- const t = cn(), [n, r] = z(!1), [i, l] = z(!1), [a, c] = z(!1), [s, d] = z(!1), u = Tt(), g = Me(!1), m = O.getState().document[u], h = (m == null ? void 0 : m.type) === "Container" || (m == null ? void 0 : m.type) === "ColumnsContainer";
7645
+ const t = cn(), [n, r] = z(!1), [i, l] = z(!1), [a, c] = z(!1), [s, d] = z(!1), u = Tt(), g = Oe(!1), m = M.getState().document[u], h = (m == null ? void 0 : m.type) === "Container" || (m == null ? void 0 : m.type) === "ColumnsContainer";
7607
7646
  let b;
7608
7647
  a ? b = "2px dashed rgba(0,121,204, 0.8)" : t === u ? b = "2px solid rgba(0,121,204, 1)" : n && (b = "2px solid rgba(0,121,204, 0.3)");
7609
- const S = () => t !== u || a ? null : /* @__PURE__ */ o(tu, { blockId: u }), y = (E) => {
7648
+ const S = () => t !== u || a ? null : /* @__PURE__ */ o(Qc, { blockId: u }), y = (E) => {
7610
7649
  if (!g.current) {
7611
7650
  E.preventDefault();
7612
7651
  return;
@@ -7698,7 +7737,7 @@ function st({ children: e }) {
7698
7737
  borderColor: "primary.main"
7699
7738
  }
7700
7739
  },
7701
- children: /* @__PURE__ */ o(Fr, { fontSize: "small" })
7740
+ children: /* @__PURE__ */ o($r, { fontSize: "small" })
7702
7741
  }
7703
7742
  ),
7704
7743
  S(),
@@ -7707,80 +7746,80 @@ function st({ children: e }) {
7707
7746
  }
7708
7747
  );
7709
7748
  }
7710
- const wl = Ji({
7749
+ const Il = Ki({
7711
7750
  Button: {
7712
- schema: Mr,
7713
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Zc, { ...e }) })
7751
+ schema: Or,
7752
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Gc, { ...e }) })
7714
7753
  },
7715
7754
  Container: {
7716
- schema: dl,
7717
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Mc, { ...e }) })
7755
+ schema: pl,
7756
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Bc, { ...e }) })
7718
7757
  },
7719
7758
  ColumnsContainer: {
7720
7759
  schema: Xn,
7721
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Oc, { ...e }) })
7760
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(_c, { ...e }) })
7722
7761
  },
7723
7762
  Heading: {
7724
- schema: Hr,
7725
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Jc, { ...e }) })
7763
+ schema: Lr,
7764
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Xc, { ...e }) })
7726
7765
  },
7727
7766
  Html: {
7728
- schema: Vr,
7729
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Li, { ...e }) })
7767
+ schema: Wr,
7768
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Si, { ...e }) })
7730
7769
  },
7731
7770
  Image: {
7732
- schema: Ur,
7733
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Lc, { ...e }) })
7771
+ schema: Hr,
7772
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Fc, { ...e }) })
7734
7773
  },
7735
7774
  Video: {
7736
- schema: gl,
7737
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Wc, { ...e }) })
7775
+ schema: hl,
7776
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(zc, { ...e }) })
7738
7777
  },
7739
7778
  Text: {
7740
7779
  schema: Br,
7741
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Gc, { ...e }) })
7780
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Yc, { ...e }) })
7742
7781
  },
7743
7782
  EmailLayout: {
7744
- schema: pl,
7745
- Component: (e) => /* @__PURE__ */ o(zc, { ...e })
7783
+ schema: fl,
7784
+ Component: (e) => /* @__PURE__ */ o(Pc, { ...e })
7746
7785
  },
7747
7786
  Spacer: {
7748
- schema: $r,
7749
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(ji, { ...e }) })
7787
+ schema: Vr,
7788
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Ei, { ...e }) })
7750
7789
  },
7751
7790
  Divider: {
7752
- schema: Wr,
7753
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Pi, { ...e }) })
7791
+ schema: Fr,
7792
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Ci, { ...e }) })
7754
7793
  },
7755
7794
  Socials: {
7756
- schema: bl,
7757
- Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Hc, { ...e }) })
7795
+ schema: Cl,
7796
+ Component: (e) => /* @__PURE__ */ o(st, { children: /* @__PURE__ */ o(Lc, { ...e }) })
7758
7797
  }
7759
- }), nu = Zi(wl), ou = Qi(wl), ru = J.record(J.string(), ou), Il = ho(null), Tt = () => hr(Il);
7760
- function kl({ id: e }) {
7798
+ }), eu = qi(Il), tu = Yi(Il), nu = J.record(J.string(), tu), kl = ho(null), Tt = () => hr(kl);
7799
+ function Dl({ id: e }) {
7761
7800
  const n = Qe()[e];
7762
7801
  if (!n)
7763
7802
  throw new Error("Could not find block");
7764
- return /* @__PURE__ */ o(Il.Provider, { value: e, children: /* @__PURE__ */ o(nu, { ...n }) });
7803
+ return /* @__PURE__ */ o(kl.Provider, { value: e, children: /* @__PURE__ */ o(eu, { ...n }) });
7765
7804
  }
7766
- function lu() {
7805
+ function ou() {
7767
7806
  const e = ko(), t = () => {
7768
- wa();
7807
+ Sa();
7769
7808
  };
7770
- return e ? /* @__PURE__ */ o($e, { onClick: t, children: /* @__PURE__ */ o(oa, { fontSize: "small" }) }) : /* @__PURE__ */ o($e, { onClick: t, children: /* @__PURE__ */ o(na, { fontSize: "small" }) });
7809
+ return e ? /* @__PURE__ */ o($e, { onClick: t, children: /* @__PURE__ */ o(na, { fontSize: "small" }) }) : /* @__PURE__ */ o($e, { onClick: t, children: /* @__PURE__ */ o(ta, { fontSize: "small" }) });
7771
7810
  }
7772
- function iu() {
7773
- return Do() ? /* @__PURE__ */ o(ra, { fontSize: "small" }) : /* @__PURE__ */ o(la, { fontSize: "small" });
7811
+ function ru() {
7812
+ return Do() ? /* @__PURE__ */ o(oa, { fontSize: "small" }) : /* @__PURE__ */ o(ra, { fontSize: "small" });
7774
7813
  }
7775
- function au() {
7776
- const e = iu();
7777
- return /* @__PURE__ */ o($e, { onClick: Ia, children: e });
7814
+ function lu() {
7815
+ const e = ru();
7816
+ return /* @__PURE__ */ o($e, { onClick: va, children: e });
7778
7817
  }
7779
- function su() {
7818
+ function iu() {
7780
7819
  const { t: e } = Se(), t = Qe(), n = ct(() => `data:text/plain,${encodeURIComponent(JSON.stringify(t, null, " "))}`, [t]);
7781
- return /* @__PURE__ */ o(Ze, { title: e("common.downloadJson"), arrow: !0, children: /* @__PURE__ */ o($e, { href: n, download: "emailTemplate.json", children: /* @__PURE__ */ o(ia, { fontSize: "small" }) }) });
7820
+ return /* @__PURE__ */ o(Ze, { title: e("common.downloadJson"), arrow: !0, children: /* @__PURE__ */ o($e, { href: n, download: "emailTemplate.json", children: /* @__PURE__ */ o(la, { fontSize: "small" }) }) });
7782
7821
  }
7783
- let ut = null, ro = null, lo = null, En = null, cu = !1, io = !1;
7822
+ let ut = null, ro = null, lo = null, En = null, au = !1, io = !1;
7784
7823
  async function _o() {
7785
7824
  if (!(ut || io) && !(typeof window > "u")) {
7786
7825
  io = !0;
@@ -7791,7 +7830,7 @@ async function _o() {
7791
7830
  const n = await import("react-syntax-highlighter/dist/esm/languages/hljs/xml");
7792
7831
  lo = n.default || n;
7793
7832
  const r = await import("react-syntax-highlighter/dist/esm/styles/hljs/github");
7794
- En = r.default || r, ut != null && ut.registerLanguage && (ro && ut.registerLanguage("json", ro), lo && ut.registerLanguage("html", lo), cu = !0);
7833
+ En = r.default || r, ut != null && ut.registerLanguage && (ro && ut.registerLanguage("json", ro), lo && ut.registerLanguage("html", lo), au = !0);
7795
7834
  } catch {
7796
7835
  } finally {
7797
7836
  io = !1;
@@ -7813,7 +7852,7 @@ const fr = (e) => {
7813
7852
  `);
7814
7853
  }
7815
7854
  return e;
7816
- }, uu = (e) => {
7855
+ }, su = (e) => {
7817
7856
  var i, l;
7818
7857
  const t = e.split(`
7819
7858
  `), n = [], r = [];
@@ -7844,12 +7883,12 @@ const fr = (e) => {
7844
7883
  return r.join(`
7845
7884
  `);
7846
7885
  };
7847
- function du(e) {
7886
+ function cu(e) {
7848
7887
  try {
7849
7888
  if (e.includes(`
7850
7889
  `) && e.trim().length > 0) {
7851
7890
  let a = fr(e);
7852
- return a = uu(a), a;
7891
+ return a = su(a), a;
7853
7892
  }
7854
7893
  let t = e.replace(/></g, `>
7855
7894
  <`).replace(/\n\s*\n/g, `
@@ -7872,7 +7911,7 @@ function du(e) {
7872
7911
  return e;
7873
7912
  }
7874
7913
  }
7875
- function pu(e) {
7914
+ function uu(e) {
7876
7915
  try {
7877
7916
  const t = JSON.parse(e);
7878
7917
  return JSON.stringify(t, null, 2);
@@ -7880,9 +7919,9 @@ function pu(e) {
7880
7919
  return e;
7881
7920
  }
7882
7921
  }
7883
- async function fu(e) {
7922
+ async function du(e) {
7884
7923
  await _o();
7885
- const t = du(e);
7924
+ const t = cu(e);
7886
7925
  return !ut || !En ? /* @__PURE__ */ o("pre", { style: { margin: 0, padding: 16, whiteSpace: "pre-wrap" }, children: t }) : /* @__PURE__ */ o(
7887
7926
  ut,
7888
7927
  {
@@ -7896,9 +7935,9 @@ async function fu(e) {
7896
7935
  }
7897
7936
  );
7898
7937
  }
7899
- async function mu(e) {
7938
+ async function pu(e) {
7900
7939
  await _o();
7901
- const t = pu(e);
7940
+ const t = uu(e);
7902
7941
  return !ut || !En ? /* @__PURE__ */ o("pre", { style: { margin: 0, padding: 16, whiteSpace: "pre-wrap" }, children: t }) : /* @__PURE__ */ o(
7903
7942
  ut,
7904
7943
  {
@@ -7912,15 +7951,15 @@ async function mu(e) {
7912
7951
  }
7913
7952
  );
7914
7953
  }
7915
- function Dl({ type: e, value: t }) {
7954
+ function El({ type: e, value: t }) {
7916
7955
  const [n, r] = z(null);
7917
7956
  return Ce(() => {
7918
7957
  switch (e) {
7919
7958
  case "html":
7920
- fu(t).then(r);
7959
+ du(t).then(r);
7921
7960
  return;
7922
7961
  case "json":
7923
- mu(t).then(r);
7962
+ pu(t).then(r);
7924
7963
  return;
7925
7964
  }
7926
7965
  }, [t, e]), n === null ? null : /* @__PURE__ */ o(
@@ -7934,7 +7973,7 @@ function Dl({ type: e, value: t }) {
7934
7973
  }
7935
7974
  );
7936
7975
  }
7937
- function gu() {
7976
+ function fu() {
7938
7977
  const e = Qe(), [t, n] = z("");
7939
7978
  return Ce(() => {
7940
7979
  try {
@@ -7943,7 +7982,7 @@ function gu() {
7943
7982
  } catch {
7944
7983
  n("<!-- Error rendering HTML -->");
7945
7984
  }
7946
- }, [e]), /* @__PURE__ */ o(Dl, { type: "html", value: t });
7985
+ }, [e]), /* @__PURE__ */ o(El, { type: "html", value: t });
7947
7986
  }
7948
7987
  function mr(e) {
7949
7988
  let t;
@@ -7952,10 +7991,10 @@ function mr(e) {
7952
7991
  } catch {
7953
7992
  return { error: "Invalid json" };
7954
7993
  }
7955
- const n = ru.safeParse(t);
7994
+ const n = nu.safeParse(t);
7956
7995
  return n.success ? n.data.root ? { data: n.data } : { error: 'Missing "root" node' } : { error: "Invalid JSON schema" };
7957
7996
  }
7958
- function hu({ onClose: e }) {
7997
+ function mu({ onClose: e }) {
7959
7998
  const { t } = Se(), [n, r] = z(""), [i, l] = z(null), a = (s) => {
7960
7999
  const d = s.currentTarget.value;
7961
8000
  r(d);
@@ -7963,7 +8002,7 @@ function hu({ onClose: e }) {
7963
8002
  l(u ?? null);
7964
8003
  };
7965
8004
  let c = null;
7966
- return i && (c = /* @__PURE__ */ o(Vl, { color: "error", children: i })), /* @__PURE__ */ w(Cr, { open: !0, onClose: e, children: [
8005
+ return i && (c = /* @__PURE__ */ o(Ul, { color: "error", children: i })), /* @__PURE__ */ w(Cr, { open: !0, onClose: e, children: [
7967
8006
  /* @__PURE__ */ o(yr, { children: t("common.importJson") }),
7968
8007
  /* @__PURE__ */ w(
7969
8008
  "form",
@@ -7992,28 +8031,28 @@ function hu({ onClose: e }) {
7992
8031
  )
7993
8032
  ] }),
7994
8033
  /* @__PURE__ */ w(Sr, { children: [
7995
- /* @__PURE__ */ o(Oe, { variant: "outlined", color: "primary", type: "button", onClick: e, children: t("common.cancel") }),
7996
- /* @__PURE__ */ o(Oe, { variant: "contained", type: "submit", disabled: i !== null, children: t("common.import") })
8034
+ /* @__PURE__ */ o(Me, { variant: "outlined", color: "primary", type: "button", onClick: e, children: t("common.cancel") }),
8035
+ /* @__PURE__ */ o(Me, { variant: "contained", type: "submit", disabled: i !== null, children: t("common.import") })
7997
8036
  ] })
7998
8037
  ]
7999
8038
  }
8000
8039
  )
8001
8040
  ] });
8002
8041
  }
8003
- function bu() {
8042
+ function gu() {
8004
8043
  const { t: e } = Se(), [t, n] = z(!1);
8005
8044
  let r = null;
8006
- return t && (r = /* @__PURE__ */ o(hu, { onClose: () => n(!1) })), /* @__PURE__ */ w(an, { children: [
8007
- /* @__PURE__ */ o(Ze, { title: e("common.importJson"), arrow: !0, children: /* @__PURE__ */ o($e, { onClick: () => n(!0), children: /* @__PURE__ */ o(aa, { fontSize: "small" }) }) }),
8045
+ return t && (r = /* @__PURE__ */ o(mu, { onClose: () => n(!1) })), /* @__PURE__ */ w(an, { children: [
8046
+ /* @__PURE__ */ o(Ze, { title: e("common.importJson"), arrow: !0, children: /* @__PURE__ */ o($e, { onClick: () => n(!0), children: /* @__PURE__ */ o(ia, { fontSize: "small" }) }) }),
8008
8047
  r
8009
8048
  ] });
8010
8049
  }
8011
- function Cu() {
8050
+ function hu() {
8012
8051
  const e = Qe(), t = ct(() => JSON.stringify(e, null, " "), [e]);
8013
- return /* @__PURE__ */ o(Dl, { type: "json", value: t });
8052
+ return /* @__PURE__ */ o(El, { type: "json", value: t });
8014
8053
  }
8015
- function yu() {
8016
- const { t: e } = Se(), t = Io(), n = Jr();
8054
+ function bu() {
8055
+ const { t: e } = Se(), t = Io(), n = Zr();
8017
8056
  return /* @__PURE__ */ w(kr, { value: t, onChange: (i, l) => {
8018
8057
  switch (l) {
8019
8058
  case "json":
@@ -8030,34 +8069,34 @@ function yu() {
8030
8069
  Zt,
8031
8070
  {
8032
8071
  value: "editor",
8033
- label: /* @__PURE__ */ o(Ze, { title: e("tabs.edit"), arrow: !0, children: /* @__PURE__ */ o(ua, { fontSize: "small" }) })
8072
+ label: /* @__PURE__ */ o(Ze, { title: e("tabs.edit"), arrow: !0, children: /* @__PURE__ */ o(sa, { fontSize: "small" }) })
8034
8073
  }
8035
8074
  ),
8036
8075
  /* @__PURE__ */ o(
8037
8076
  Zt,
8038
8077
  {
8039
8078
  value: "preview",
8040
- label: /* @__PURE__ */ o(Ze, { title: e("tabs.preview"), arrow: !0, children: /* @__PURE__ */ o(da, { fontSize: "small" }) })
8079
+ label: /* @__PURE__ */ o(Ze, { title: e("tabs.preview"), arrow: !0, children: /* @__PURE__ */ o(ca, { fontSize: "small" }) })
8041
8080
  }
8042
8081
  ),
8043
8082
  /* @__PURE__ */ o(
8044
8083
  Zt,
8045
8084
  {
8046
8085
  value: "html",
8047
- label: /* @__PURE__ */ o(Ze, { title: e("tabs.htmlOutput"), arrow: !0, children: /* @__PURE__ */ o(sa, { fontSize: "small" }) })
8086
+ label: /* @__PURE__ */ o(Ze, { title: e("tabs.htmlOutput"), arrow: !0, children: /* @__PURE__ */ o(aa, { fontSize: "small" }) })
8048
8087
  }
8049
8088
  ),
8050
8089
  n && /* @__PURE__ */ o(
8051
8090
  Zt,
8052
8091
  {
8053
8092
  value: "json",
8054
- label: /* @__PURE__ */ o(Ze, { title: e("tabs.jsonOutput"), arrow: !0, children: /* @__PURE__ */ o(ca, { fontSize: "small" }) })
8093
+ label: /* @__PURE__ */ o(Ze, { title: e("tabs.jsonOutput"), arrow: !0, children: /* @__PURE__ */ o(Ur, { fontSize: "small" }) })
8055
8094
  }
8056
8095
  )
8057
8096
  ] });
8058
8097
  }
8059
- function xu() {
8060
- const { t: e } = Se(), t = Ta();
8098
+ function Cu() {
8099
+ const { t: e } = Se(), t = Ea();
8061
8100
  return /* @__PURE__ */ o(
8062
8101
  ke,
8063
8102
  {
@@ -8078,17 +8117,17 @@ function xu() {
8078
8117
  }
8079
8118
  );
8080
8119
  }
8081
- function Su() {
8082
- const { t: e } = Se(), t = Wa();
8083
- return /* @__PURE__ */ o(Ze, { title: e("common.redoTooltip"), arrow: !0, children: /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o($e, { onClick: Qr, disabled: !t, size: "small", children: /* @__PURE__ */ o(pa, { fontSize: "small" }) }) }) });
8120
+ function yu() {
8121
+ const { t: e } = Se(), t = za();
8122
+ return /* @__PURE__ */ o(Ze, { title: e("common.redoTooltip"), arrow: !0, children: /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o($e, { onClick: el, disabled: !t, size: "small", children: /* @__PURE__ */ o(ua, { fontSize: "small" }) }) }) });
8084
8123
  }
8085
- function vu() {
8086
- const { t: e } = Se(), t = La();
8087
- return /* @__PURE__ */ o(Ze, { title: e("common.undoTooltip"), arrow: !0, children: /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o($e, { onClick: Zr, disabled: !t, size: "small", children: /* @__PURE__ */ o(fa, { fontSize: "small" }) }) }) });
8124
+ function xu() {
8125
+ const { t: e } = Se(), t = Fa();
8126
+ return /* @__PURE__ */ o(Ze, { title: e("common.undoTooltip"), arrow: !0, children: /* @__PURE__ */ o("span", { children: /* @__PURE__ */ o($e, { onClick: Qr, disabled: !t, size: "small", children: /* @__PURE__ */ o(da, { fontSize: "small" }) }) }) });
8088
8127
  }
8089
- function wu() {
8128
+ function Su() {
8090
8129
  var g, f, m, h, b, S;
8091
- const { t: e } = Se(), t = Qe(), n = Io(), r = ba(), i = Jr();
8130
+ const { t: e } = Se(), t = Qe(), n = Io(), r = ga(), i = Zr();
8092
8131
  mt.useEffect(() => {
8093
8132
  !i && n === "json" && po("editor");
8094
8133
  }, [i, n]);
@@ -8112,13 +8151,13 @@ function wu() {
8112
8151
  }, u = () => {
8113
8152
  switch (n) {
8114
8153
  case "editor":
8115
- return /* @__PURE__ */ o(se, { sx: l, children: /* @__PURE__ */ o(kl, { id: "root" }) });
8154
+ return /* @__PURE__ */ o(se, { sx: l, children: /* @__PURE__ */ o(Dl, { id: "root" }) });
8116
8155
  case "preview":
8117
- return /* @__PURE__ */ o(se, { sx: l, children: /* @__PURE__ */ o(jl, { document: t, rootBlockId: "root" }) });
8156
+ return /* @__PURE__ */ o(se, { sx: l, children: /* @__PURE__ */ o(Kl, { document: t, rootBlockId: "root" }) });
8118
8157
  case "html":
8119
- return /* @__PURE__ */ o(gu, {});
8158
+ return /* @__PURE__ */ o(fu, {});
8120
8159
  case "json":
8121
- return i ? /* @__PURE__ */ o(Cu, {}) : null;
8160
+ return i ? /* @__PURE__ */ o(hu, {}) : null;
8122
8161
  }
8123
8162
  };
8124
8163
  return /* @__PURE__ */ w(se, { sx: { display: "flex", flexDirection: "column", height: "100%", overflow: "hidden" }, children: [
@@ -8139,22 +8178,22 @@ function wu() {
8139
8178
  justifyContent: "space-between",
8140
8179
  alignItems: "center",
8141
8180
  children: [
8142
- /* @__PURE__ */ o(au, {}),
8143
- /* @__PURE__ */ o(xu, {}),
8181
+ /* @__PURE__ */ o(lu, {}),
8182
+ /* @__PURE__ */ o(Cu, {}),
8144
8183
  /* @__PURE__ */ w(Z, { px: 2, direction: "row", gap: 2, width: "100%", justifyContent: "space-between", alignItems: "center", children: [
8145
- /* @__PURE__ */ o(Z, { direction: "row", spacing: 2, children: /* @__PURE__ */ o(yu, {}) }),
8184
+ /* @__PURE__ */ o(Z, { direction: "row", spacing: 2, children: /* @__PURE__ */ o(bu, {}) }),
8146
8185
  /* @__PURE__ */ w(Z, { direction: "row", spacing: 2, alignItems: "center", children: [
8147
- /* @__PURE__ */ o(vu, {}),
8148
- /* @__PURE__ */ o(Su, {}),
8149
- i && /* @__PURE__ */ o(su, {}),
8150
- i && /* @__PURE__ */ o(bu, {}),
8186
+ /* @__PURE__ */ o(xu, {}),
8187
+ /* @__PURE__ */ o(yu, {}),
8188
+ i && /* @__PURE__ */ o(iu, {}),
8189
+ i && /* @__PURE__ */ o(gu, {}),
8151
8190
  /* @__PURE__ */ w(bo, { size: "small", value: s, exclusive: !0, onChange: a, children: [
8152
- /* @__PURE__ */ o(Ze, { title: e("common.desktopView"), arrow: !0, children: /* @__PURE__ */ o(le, { value: "desktop", sx: s === "desktop" ? d : void 0, children: /* @__PURE__ */ o(Xi, { fontSize: "small" }) }) }),
8153
- /* @__PURE__ */ o(Ze, { title: e("common.mobileView"), arrow: !0, children: /* @__PURE__ */ o(le, { value: "mobile", sx: s === "mobile" ? d : void 0, children: /* @__PURE__ */ o(Gi, { fontSize: "small" }) }) })
8191
+ /* @__PURE__ */ o(Ze, { title: e("common.desktopView"), arrow: !0, children: /* @__PURE__ */ o(le, { value: "desktop", sx: s === "desktop" ? d : void 0, children: /* @__PURE__ */ o($i, { fontSize: "small" }) }) }),
8192
+ /* @__PURE__ */ o(Ze, { title: e("common.mobileView"), arrow: !0, children: /* @__PURE__ */ o(le, { value: "mobile", sx: s === "mobile" ? d : void 0, children: /* @__PURE__ */ o(ji, { fontSize: "small" }) }) })
8154
8193
  ] })
8155
8194
  ] })
8156
8195
  ] }),
8157
- /* @__PURE__ */ o(lu, {})
8196
+ /* @__PURE__ */ o(ou, {})
8158
8197
  ]
8159
8198
  }
8160
8199
  ),
@@ -8168,7 +8207,7 @@ function gr(e, t) {
8168
8207
  duration: t ? n.duration.enteringScreen : n.duration.leavingScreen
8169
8208
  });
8170
8209
  }
8171
- function Iu() {
8210
+ function vu() {
8172
8211
  const e = ko(), t = Do(), n = gr("margin-left", t), r = gr("margin-right", e);
8173
8212
  return Ce(() => {
8174
8213
  const i = (l) => {
@@ -8176,13 +8215,13 @@ function Iu() {
8176
8215
  const a = l.target;
8177
8216
  if (a.tagName === "INPUT" || a.tagName === "TEXTAREA" || a.isContentEditable)
8178
8217
  return;
8179
- l.preventDefault(), Zr();
8218
+ l.preventDefault(), Qr();
8180
8219
  }
8181
8220
  if ((l.metaKey || l.ctrlKey) && (l.key === "y" || l.key === "z" && l.shiftKey)) {
8182
8221
  const a = l.target;
8183
8222
  if (a.tagName === "INPUT" || a.tagName === "TEXTAREA" || a.isContentEditable)
8184
8223
  return;
8185
- l.preventDefault(), Qr();
8224
+ l.preventDefault(), el();
8186
8225
  }
8187
8226
  };
8188
8227
  return window.addEventListener("keydown", i), () => {
@@ -8199,7 +8238,7 @@ function Iu() {
8199
8238
  overflow: "hidden"
8200
8239
  },
8201
8240
  children: [
8202
- /* @__PURE__ */ o(xc, {}),
8241
+ /* @__PURE__ */ o(Cc, {}),
8203
8242
  /* @__PURE__ */ o(
8204
8243
  Z,
8205
8244
  {
@@ -8212,15 +8251,15 @@ function Iu() {
8212
8251
  overflow: "hidden",
8213
8252
  zIndex: 0
8214
8253
  },
8215
- children: /* @__PURE__ */ o(wu, {})
8254
+ children: /* @__PURE__ */ o(Su, {})
8216
8255
  }
8217
8256
  ),
8218
- /* @__PURE__ */ o(pc, {})
8257
+ /* @__PURE__ */ o(uc, {})
8219
8258
  ]
8220
8259
  }
8221
8260
  );
8222
8261
  }
8223
- const ku = Bl(function() {
8262
+ const wu = Ml(function() {
8224
8263
  return /* @__PURE__ */ o(
8225
8264
  se,
8226
8265
  {
@@ -8232,10 +8271,10 @@ const ku = Bl(function() {
8232
8271
  flexDirection: "column",
8233
8272
  overflow: "hidden"
8234
8273
  },
8235
- children: /* @__PURE__ */ o(Iu, {})
8274
+ children: /* @__PURE__ */ o(vu, {})
8236
8275
  }
8237
8276
  );
8238
- }), Du = Ol(({
8277
+ }), Iu = Ol(({
8239
8278
  initialDocument: e,
8240
8279
  language: t = "en",
8241
8280
  imageUploadHandler: n,
@@ -8252,10 +8291,10 @@ const ku = Bl(function() {
8252
8291
  contactAttributes: m,
8253
8292
  variables: h
8254
8293
  }, b) => {
8255
- const S = Me(!1);
8294
+ const S = Oe(!1);
8256
8295
  if (!S.current) {
8257
8296
  const y = Xo(e ?? sn);
8258
- ga({
8297
+ fa({
8259
8298
  document: to(y, h),
8260
8299
  language: t,
8261
8300
  showJsonFeatures: s,
@@ -8270,20 +8309,20 @@ const ku = Bl(function() {
8270
8309
  }
8271
8310
  }, [e]), Ce(() => {
8272
8311
  if (h === void 0 || h.length === 0) return;
8273
- const y = O.getState().document;
8312
+ const y = M.getState().document;
8274
8313
  Rt(to(y, h));
8275
8314
  }, [h]), Ce(() => {
8276
- t !== void 0 && Aa(t);
8315
+ t !== void 0 && Da(t);
8277
8316
  }, [t]), Ce(() => {
8278
- ka(n);
8317
+ wa(n);
8279
8318
  }, [n]), Ce(() => {
8280
- Da(r);
8319
+ Ia(r);
8281
8320
  }, [r]), Ce(() => {
8282
- va(i);
8283
- }, [i]), Ml(b, () => ({
8321
+ xa(i);
8322
+ }, [i]), Nl(b, () => ({
8284
8323
  getData: (y) => {
8285
8324
  Go();
8286
- const k = O.getState().document;
8325
+ const k = M.getState().document;
8287
8326
  try {
8288
8327
  const D = yo(k, { rootBlockId: "root" });
8289
8328
  y(k, D);
@@ -8293,32 +8332,32 @@ const ku = Bl(function() {
8293
8332
  },
8294
8333
  getVariables: (y) => {
8295
8334
  Go();
8296
- const k = O.getState().document;
8297
- y(ys(k));
8335
+ const k = M.getState().document;
8336
+ y(bs(k));
8298
8337
  }
8299
8338
  })), Ce(() => {
8300
- l !== void 0 && _a(l);
8339
+ l !== void 0 && Aa(l);
8301
8340
  }, [l]), Ce(() => {
8302
- Ba(a);
8341
+ Ta(a);
8303
8342
  }, [a]), Ce(() => {
8304
- Na(s);
8343
+ Ma(s);
8305
8344
  }, [s]), Ce(() => {
8306
- Pa(d);
8345
+ Na(d);
8307
8346
  }, [d]), Ce(() => {
8308
- Oa(g);
8347
+ _a(g);
8309
8348
  }, [g]), Ce(() => {
8310
- Ma(f);
8349
+ Ba(f);
8311
8350
  }, [f]), Ce(() => {
8312
- ha(m);
8313
- }, [m]), /* @__PURE__ */ w(Ul, { theme: c || ks, children: [
8314
- /* @__PURE__ */ o($l, {}),
8315
- /* @__PURE__ */ o(Ha, { value: u ?? null, children: /* @__PURE__ */ o(ku, {}) })
8351
+ ma(m);
8352
+ }, [m]), /* @__PURE__ */ w($l, { theme: c || ws, children: [
8353
+ /* @__PURE__ */ o(jl, {}),
8354
+ /* @__PURE__ */ o(La, { value: u ?? null, children: /* @__PURE__ */ o(wu, {}) })
8316
8355
  ] });
8317
8356
  });
8318
- Du.displayName = "EmailBuilder";
8357
+ Iu.displayName = "EmailBuilder";
8319
8358
  export {
8320
- Du as EmailBuilder,
8321
- Du as default,
8359
+ Iu as EmailBuilder,
8360
+ Iu as default,
8322
8361
  Qe as useDocument,
8323
- Ea as useLanguage
8362
+ ka as useLanguage
8324
8363
  };