@chaibuilder/sdk 4.0.0-beta.40 → 4.0.0-beta.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/{2SSKDMRQ-DKit4bEt.js → 2SSKDMRQ-CdpXONNF.js} +2 -2
  2. package/dist/{2SSKDMRQ-D-2rSLsq.cjs → 2SSKDMRQ-Dq_oq6gn.cjs} +1 -1
  3. package/dist/{AP7HFJJL-BWruCozs.js → AP7HFJJL-CZb0rAxI.js} +1 -1
  4. package/dist/{AP7HFJJL-CAE2yHEv.cjs → AP7HFJJL-Do14BULM.cjs} +1 -1
  5. package/dist/{IconPicker-BOBnjfJc.js → IconPicker-CvZSjXc6.js} +1 -1
  6. package/dist/{IconPicker-BCYCPK5M.cjs → IconPicker-DUN9bxmQ.cjs} +1 -1
  7. package/dist/{WDYDFRGG-BNve1FlV.cjs → WDYDFRGG-DfczfcZ8.cjs} +1 -1
  8. package/dist/{WDYDFRGG-Bv40IVPG.js → WDYDFRGG-Dxa2zFdt.js} +2 -2
  9. package/dist/{active-in-another-tab-C334yD2g.js → active-in-another-tab-BREv3Xj8.js} +2 -2
  10. package/dist/{active-in-another-tab-BPBvEwmD.cjs → active-in-another-tab-C9o276yY.cjs} +1 -1
  11. package/dist/{add-new-language-page-DVL-HkWR.js → add-new-language-page-C4PSVDV5.js} +3 -3
  12. package/dist/{add-new-language-page-BVME8b7v.cjs → add-new-language-page-jHLJjrl1.cjs} +1 -1
  13. package/dist/{add-new-page-BPysPck8.cjs → add-new-page-BPPMxBYi.cjs} +1 -1
  14. package/dist/{add-new-page-BQOsHkVl.js → add-new-page-DomZuT16.js} +2 -2
  15. package/dist/{ai-panel-content-BwX0YBGD.js → ai-panel-content-CsmUoTCg.js} +3 -3
  16. package/dist/{ai-panel-content-BsElc0Ke.cjs → ai-panel-content-DlS51Qef.cjs} +1 -1
  17. package/dist/{ai-panel-default-lang-CYZuwSQn.js → ai-panel-default-lang-BRVlAMMU.js} +3 -3
  18. package/dist/{ai-panel-default-lang-BqhAu1iN.cjs → ai-panel-default-lang-DVKDEnbe.cjs} +2 -2
  19. package/dist/{ai-panel-other-lang-CivH2s8Q.cjs → ai-panel-other-lang-B-2xJz2W.cjs} +1 -1
  20. package/dist/{ai-panel-other-lang-CL83Mwha.js → ai-panel-other-lang-BPVS6lO_.js} +3 -3
  21. package/dist/{ai-prompt-input-C37B_jlE.js → ai-prompt-input-B0FMhaLB.js} +1 -1
  22. package/dist/{ai-prompt-input-BuP52voq.cjs → ai-prompt-input-CY2pBPzO.cjs} +1 -1
  23. package/dist/{ai-translation-prompt-V5PBEZRn.js → ai-translation-prompt-6LlaU9LO.js} +1 -1
  24. package/dist/{ai-translation-prompt-CgZKlkF_.cjs → ai-translation-prompt-BwhKmgC3.cjs} +1 -1
  25. package/dist/{change-password-modal-AQU_GLqq.js → change-password-modal-BlSTfit6.js} +2 -2
  26. package/dist/{change-password-modal-Chufk3yU.cjs → change-password-modal-wbCcGfDM.cjs} +1 -1
  27. package/dist/{code-editor-gqdLU-rU.cjs → code-editor-BC_saYAw.cjs} +1 -1
  28. package/dist/{code-editor-D-fpas30.js → code-editor-Be5VT6om.js} +1 -1
  29. package/dist/{continue-editing-in-this-client-BNEnV0hi.cjs → continue-editing-in-this-client-Bs_3q1hH.cjs} +1 -1
  30. package/dist/{continue-editing-in-this-client-Dx3f64SH.js → continue-editing-in-this-client-Z1rBUPU8.js} +2 -2
  31. package/dist/core.cjs +1 -1
  32. package/dist/core.js +1 -1
  33. package/dist/{css-import-modal-c_6VH1js.js → css-import-modal-DMZRgpy0.js} +1 -1
  34. package/dist/{css-import-modal-B2NoLsdZ.cjs → css-import-modal-QaTHJ7CT.cjs} +1 -1
  35. package/dist/{delete-page-B1R1w8O5.js → delete-page-BoP3I06P.js} +2 -2
  36. package/dist/{delete-page-DbQDbCyB.cjs → delete-page-CjXYHAsS.cjs} +1 -1
  37. package/dist/{design-token-usage-11kPk5n1.js → design-token-usage-DFanW2r-.js} +1 -1
  38. package/dist/{design-token-usage-BBLfxzzo.cjs → design-token-usage-kEPgi-3C.cjs} +1 -1
  39. package/dist/{digital-asset-manager-BbEQ8cPb.js → digital-asset-manager-BbI7Ye34.js} +3 -3
  40. package/dist/{digital-asset-manager-B0h5rUVQ.cjs → digital-asset-manager-N8tcW28y.cjs} +1 -1
  41. package/dist/{duplicate-page-BaAzKbiX.cjs → duplicate-page-B-4nFU4j.cjs} +1 -1
  42. package/dist/{duplicate-page-BY_Pcqbb.js → duplicate-page-C6y7FdRQ.js} +3 -3
  43. package/dist/{dynamic-page-selector-DzH_gCQ4.cjs → dynamic-page-selector-Cq4U-49i.cjs} +1 -1
  44. package/dist/{dynamic-page-selector-bsaLGZkO.js → dynamic-page-selector-DQCWphi0.js} +2 -2
  45. package/dist/get-chai-builder-theme-B5RkBTsB.cjs +1 -0
  46. package/dist/{get-chai-builder-theme-CyOkIlte.js → get-chai-builder-theme-BpuwSLeS.js} +1 -1
  47. package/dist/{image-editor-Cfn290vp.cjs → image-editor-565A0NpE.cjs} +1 -1
  48. package/dist/{image-editor-CyGqVNvX.js → image-editor-Dz_HQ0I8.js} +1 -1
  49. package/dist/index-3pEi7VzS.cjs +5 -0
  50. package/dist/{index-P-2SvZA9.cjs → index-C3CV1lXL.cjs} +8 -8
  51. package/dist/{index-BpVxZOd-.js → index-CDVuf3C1.js} +1065 -1029
  52. package/dist/{index-DpeytsiB.js → index-wBr2Ml98.js} +310 -314
  53. package/dist/{json-diff-viewer-BBERGXdt.cjs → json-diff-viewer-CMYFM6D6.cjs} +1 -1
  54. package/dist/{json-diff-viewer-C-bpInzt.js → json-diff-viewer-DG7a5-2B.js} +2 -2
  55. package/dist/{lang-panel-4Q_PTmKm.js → lang-panel-BvGiJJ8s.js} +3 -3
  56. package/dist/{lang-panel-uI149Beq.cjs → lang-panel-D97iJH-l.cjs} +1 -1
  57. package/dist/{manage-design-tokens-CHpHE-dx.js → manage-design-tokens-4Gu6TMKZ.js} +2 -2
  58. package/dist/{manage-design-tokens-B_-TrQgu.cjs → manage-design-tokens-Do9Kptp3.cjs} +1 -1
  59. package/dist/manage-design-tokens-modal-Btbdgoun.cjs +1 -0
  60. package/dist/{manage-design-tokens-modal-DO_tHkgp.js → manage-design-tokens-modal-CkyFE8NW.js} +3 -3
  61. package/dist/{mark-as-template-Ca3QLzX4.js → mark-as-template-Djhnj93U.js} +2 -2
  62. package/dist/{mark-as-template-BEnMYTql.cjs → mark-as-template-QPJ0DqxL.cjs} +1 -1
  63. package/dist/{nested-path-selector-content-BHPOfftZ.cjs → nested-path-selector-content-BcmSxXxL.cjs} +1 -1
  64. package/dist/{nested-path-selector-content-5gECLoRV.js → nested-path-selector-content-DkPIHcVj.js} +1 -1
  65. package/dist/{no-language-page-content-Bb3nUSLv.js → no-language-page-content-DTq-5StU.js} +2 -2
  66. package/dist/{no-language-page-content-CKxggLC_.cjs → no-language-page-content-ZQz4Kr0-.cjs} +1 -1
  67. package/dist/{no-language-page-dialog-BEVRCAhM.js → no-language-page-dialog-2rA-YBbC.js} +2 -2
  68. package/dist/{no-language-page-dialog-DMb5Z5on.cjs → no-language-page-dialog-BsLkwJID.cjs} +1 -1
  69. package/dist/{page-creator-DQRFXhNj.js → page-creator-Dzpc0_dN.js} +3 -3
  70. package/dist/{page-creator-C_95U8kn.cjs → page-creator-lcDUpPjh.cjs} +1 -1
  71. package/dist/{page-lock-DKWt66MX.cjs → page-lock-B2GU-1YM.cjs} +1 -1
  72. package/dist/{page-lock-Be5wPHz5.js → page-lock-ulFtdOkt.js} +2 -2
  73. package/dist/{page-locked-dialog-CkXpQUpO.js → page-locked-dialog-B9VpkvhN.js} +2 -2
  74. package/dist/{page-locked-dialog-CWyZol0i.cjs → page-locked-dialog-CJ53Z6sQ.cjs} +1 -1
  75. package/dist/{page-manager-new-Bt7rBO1J.cjs → page-manager-new-CkoS0B1i.cjs} +1 -1
  76. package/dist/{page-manager-new-2gYNPR6y.js → page-manager-new-OoC8W7Yn.js} +3 -3
  77. package/dist/{page-manager-search-and-filter-Dkwl089C.cjs → page-manager-search-and-filter-BosoN3wg.cjs} +1 -1
  78. package/dist/{page-manager-search-and-filter-BotSCoAo.js → page-manager-search-and-filter-JfSTGlvp.js} +2 -2
  79. package/dist/{page-revisions-content-OigWteYc.js → page-revisions-content-DsFh5itr.js} +3 -3
  80. package/dist/{page-revisions-content-bQ32feXp.cjs → page-revisions-content-Dtd-t1N3.cjs} +1 -1
  81. package/dist/pages.cjs +1 -1
  82. package/dist/pages.js +1 -1
  83. package/dist/{default-theme-options-saBIkWGT.js → plugin-BSjgGgwo.js} +114 -114
  84. package/dist/plugin-DHpuZZXz.cjs +22 -0
  85. package/dist/{publish-pages-content-Dtkal6ue.cjs → publish-pages-content-C7oS7pkz.cjs} +1 -1
  86. package/dist/{publish-pages-content-2RcG3Ptp.js → publish-pages-content-DJc7iu8d.js} +3 -3
  87. package/dist/render.cjs +1 -1
  88. package/dist/render.js +2 -2
  89. package/dist/{rte-widget-modal-CHxO3TQR.cjs → rte-widget-modal-BKQaoxh9.cjs} +1 -1
  90. package/dist/{rte-widget-modal-DmQk0Lfj.js → rte-widget-modal-BdBYmqgs.js} +1 -1
  91. package/dist/{save-to-lib-CVqlFkRK.js → save-to-lib-5nwSdZ9R.js} +2 -2
  92. package/dist/{save-to-lib-BSsuvkZS.cjs → save-to-lib-D0WdH4lq.cjs} +1 -1
  93. package/dist/{selected-block-display-DngI-pF1.js → selected-block-display-D8ROZHHv.js} +2 -2
  94. package/dist/{selected-block-display-Cr7R1ojV.cjs → selected-block-display-DjYeUPdU.cjs} +1 -1
  95. package/dist/{seo-panel-CHkFLI5b.js → seo-panel-BbyRNAEo.js} +2 -2
  96. package/dist/{seo-panel-BMYdzcoJ.cjs → seo-panel-DRjSxmk5.cjs} +1 -1
  97. package/dist/{shared-json-ld-ClIZw1aA.cjs → shared-json-ld-BbNLdzCO.cjs} +1 -1
  98. package/dist/{shared-json-ld-BzjOUN-P.js → shared-json-ld-EPbpTI9V.js} +2 -2
  99. package/dist/{slug-input-DHVDl_Dv.cjs → slug-input-CIzxXknM.cjs} +1 -1
  100. package/dist/{slug-input-07EKw9U5.js → slug-input-DSbJecNr.js} +1 -1
  101. package/dist/{take-over-request-zqtItFSK.js → take-over-request-BOGDk0H4.js} +2 -2
  102. package/dist/{take-over-request-BLdOZhUs.cjs → take-over-request-BXntCMdj.cjs} +1 -1
  103. package/dist/{translation-warning-modal-BxV_8mCE.cjs → translation-warning-modal-DhJaOyLo.cjs} +1 -1
  104. package/dist/{translation-warning-modal-DnSd7lOJ.js → translation-warning-modal-reVr0L9e.js} +1 -1
  105. package/dist/{unmark-as-template-DIKZYr01.js → unmark-as-template-BM85Y7WK.js} +2 -2
  106. package/dist/{unmark-as-template-C4UkGyOP.cjs → unmark-as-template-DOPyeU7R.cjs} +1 -1
  107. package/dist/{unpublish-page-CK0sAZcB.js → unpublish-page-DHfds-1-.js} +2 -2
  108. package/dist/{unpublish-page-DFXLzJbc.cjs → unpublish-page-Dz028Bzp.cjs} +1 -1
  109. package/dist/{unpublished-partials-modal-CDaOvXgp.js → unpublished-partials-modal-BO5ZZdTw.js} +1 -1
  110. package/dist/{unpublished-partials-modal-BAr1SkEG.cjs → unpublished-partials-modal-CMqQa9-m.cjs} +1 -1
  111. package/dist/utils.cjs +1 -1
  112. package/dist/utils.js +1 -1
  113. package/dist/{web-preview-DA7_F3vv.cjs → web-preview-5MzixBt5.cjs} +1 -1
  114. package/dist/{web-preview-CRSjh2he.js → web-preview-BNjG8s8A.js} +1 -1
  115. package/package.json +1 -1
  116. package/dist/default-theme-options-DN-3gIjM.cjs +0 -22
  117. package/dist/get-chai-builder-theme-C_qofMh_.cjs +0 -1
  118. package/dist/index-CQf0jL1k.cjs +0 -5
  119. package/dist/manage-design-tokens-modal-Bug5H8PT.cjs +0 -1
@@ -3,9 +3,9 @@ var Bu = (t, e, n) => e in t ? Tu(t, e, { enumerable: !0, configurable: !0, writ
3
3
  var Xt = (t, e, n) => Bu(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { jsx as a, jsxs as b, Fragment as Z } from "react/jsx-runtime";
5
5
  import { E as j, z as Wn, B as ne, n as Iu, u as Qo, o as Ru, l as ol, d as Lu, G as sl, s as il, v as $s, y as Pu, w as Zi, g as Ou, i as Du, h as Mu } from "./register-chai-top-bar-D6GjnauV.js";
6
- import { noop as kt, get as _, has as ce, find as te, filter as q, flatten as Mt, map as A, includes as Be, without as $u, compact as Gn, forEach as vo, keys as Ct, isEmpty as F, set as We, unset as Fu, omit as kr, isString as $t, chunk as zu, values as Rt, pick as un, startsWith as Ie, isFunction as Qt, isObject as Fs, memoize as Hu, each as gt, first as ve, findIndex as lr, throttle as Vu, some as ju, uniq as zs, cloneDeep as no, isArray as Cr, isNull as al, split as Wu, reject as Kr, take as Gu, debounce as Hs, startCase as Ut, isNumber as Uu, parseInt as Ku, isNaN as Ju, range as Xe, flattenDeep as Pt, toLower as ll, nth as Qi, findLast as Yu, intersection as Xu, toUpper as es, kebabCase as cl, capitalize as Fn, groupBy as dl, sortBy as qu, reverse as Zu, camelCase as Qu } from "lodash-es";
6
+ import { noop as kt, get as _, has as ce, find as te, filter as q, flatten as Mt, map as A, includes as Be, without as $u, compact as Gn, forEach as vo, keys as Ct, isEmpty as F, set as We, unset as Fu, omit as kr, isString as $t, chunk as zu, values as Rt, pick as un, startsWith as Ie, isFunction as Qt, isObject as Fs, memoize as Hu, each as mt, first as ve, findIndex as lr, throttle as Vu, some as ju, uniq as zs, cloneDeep as no, isArray as Cr, isNull as al, split as Wu, reject as Kr, take as Gu, debounce as Hs, startCase as Ut, isNumber as Uu, parseInt as Ku, isNaN as Ju, range as Xe, flattenDeep as Pt, toLower as ll, nth as Qi, findLast as Yu, intersection as Xu, toUpper as es, kebabCase as cl, capitalize as Fn, groupBy as dl, sortBy as qu, reverse as Zu, camelCase as Qu } from "lodash-es";
7
7
  import * as Ae from "@radix-ui/react-dropdown-menu";
8
- import { ChevronRightIcon as Un, CheckIcon as Nr, CircleIcon as ul, PinTopIcon as ep, PinBottomIcon as tp, PinLeftIcon as np, PinRightIcon as rp, GearIcon as op, DragHandleDots2Icon as pl, ArrowUpIcon as Zt, PlusIcon as qe, CopyIcon as Vs, TrashIcon as js, CaretDownIcon as ys, Cross1Icon as Ze, FontBoldIcon as sp, FontItalicIcon as fl, UnderlineIcon as hl, StrikethroughIcon as ip, ListBulletIcon as xs, ValueIcon as ap, TextAlignLeftIcon as ea, TextAlignCenterIcon as ta, TextAlignRightIcon as na, Link2Icon as lp, LinkBreak2Icon as ml, EnterFullScreenIcon as cp, Pencil2Icon as ko, MagnifyingGlassIcon as Ws, ChevronLeftIcon as gl, LoopIcon as bl, IdCardIcon as yl, ChevronDownIcon as yn, InfoCircledIcon as hr, FileIcon as dp, PlusCircledIcon as up, DotsVerticalIcon as Co, TriangleDownIcon as pp, RowSpacingIcon as fp, Cross2Icon as No, LetterCaseUppercaseIcon as hp, OverlineIcon as mp, StretchHorizontallyIcon as gp, AlignRightIcon as bp, AlignCenterHorizontallyIcon as yp, AlignLeftIcon as xp, ArrowLeftIcon as Qn, ArrowDownIcon as Ln, ArrowRightIcon as er, HeightIcon as ot, WidthIcon as st, BorderAllIcon as Bt, ArrowBottomLeftIcon as wp, ArrowBottomRightIcon as vp, ArrowTopRightIcon as xl, ArrowTopLeftIcon as kp, EyeClosedIcon as ro, EyeOpenIcon as wl, BoxIcon as Gs, MinusIcon as Cp, CrossCircledIcon as Np, TokensIcon as Sp, ChevronUpIcon as Ep, ReloadIcon as Us, CaretRightIcon as _p, FrameIcon as Ap, SquareIcon as Tp, EraserIcon as vl, DownloadIcon as Bp, CardStackPlusIcon as Ip, CardStackIcon as Ks, ScissorsIcon as Rp, ExclamationTriangleIcon as Lp, StackIcon as Pp, DoubleArrowDownIcon as Op, DoubleArrowUpIcon as Dp, ResetIcon as oo, UploadIcon as Mp, TextIcon as $p, CornerTopRightIcon as Fp, MixerHorizontalIcon as so, SunIcon as kl, MoonIcon as Cl, FaceIcon as zp, ShuffleIcon as Hp, ChatBubbleIcon as Vp, StopIcon as jp, LightningBoltIcon as Wp } from "@radix-ui/react-icons";
8
+ import { ChevronRightIcon as Un, CheckIcon as Nr, CircleIcon as ul, PinTopIcon as ep, PinBottomIcon as tp, PinLeftIcon as np, PinRightIcon as rp, GearIcon as op, DragHandleDots2Icon as pl, ArrowUpIcon as Zt, PlusIcon as qe, CopyIcon as Vs, TrashIcon as js, CaretDownIcon as ys, Cross1Icon as Ze, FontBoldIcon as sp, FontItalicIcon as fl, UnderlineIcon as hl, StrikethroughIcon as ip, ListBulletIcon as xs, ValueIcon as ap, TextAlignLeftIcon as ea, TextAlignCenterIcon as ta, TextAlignRightIcon as na, Link2Icon as lp, LinkBreak2Icon as ml, EnterFullScreenIcon as cp, Pencil2Icon as ko, MagnifyingGlassIcon as Ws, ChevronLeftIcon as gl, LoopIcon as bl, IdCardIcon as yl, ChevronDownIcon as yn, InfoCircledIcon as hr, FileIcon as dp, PlusCircledIcon as up, DotsVerticalIcon as Co, TriangleDownIcon as pp, RowSpacingIcon as fp, Cross2Icon as No, LetterCaseUppercaseIcon as hp, OverlineIcon as mp, StretchHorizontallyIcon as gp, AlignRightIcon as bp, AlignCenterHorizontallyIcon as yp, AlignLeftIcon as xp, ArrowLeftIcon as Qn, ArrowDownIcon as Ln, ArrowRightIcon as er, HeightIcon as rt, WidthIcon as ot, BorderAllIcon as Bt, ArrowBottomLeftIcon as wp, ArrowBottomRightIcon as vp, ArrowTopRightIcon as xl, ArrowTopLeftIcon as kp, EyeClosedIcon as ro, EyeOpenIcon as wl, BoxIcon as Gs, MinusIcon as Cp, CrossCircledIcon as Np, TokensIcon as Sp, ChevronUpIcon as Ep, ReloadIcon as Us, CaretRightIcon as _p, FrameIcon as Ap, SquareIcon as Tp, EraserIcon as vl, DownloadIcon as Bp, CardStackPlusIcon as Ip, CardStackIcon as Ks, ScissorsIcon as Rp, ExclamationTriangleIcon as Lp, StackIcon as Pp, DoubleArrowDownIcon as Op, DoubleArrowUpIcon as Dp, ResetIcon as oo, UploadIcon as Mp, TextIcon as $p, CornerTopRightIcon as Fp, MixerHorizontalIcon as so, SunIcon as kl, MoonIcon as Cl, FaceIcon as zp, ShuffleIcon as Hp, ChatBubbleIcon as Vp, StopIcon as jp, LightningBoltIcon as Wp } from "@radix-ui/react-icons";
9
9
  import * as W from "react";
10
10
  import ee, { useMemo as M, useCallback as I, useState as $, useEffect as z, useRef as re, Component as Nl, Children as Gp, memo as xn, startTransition as Up, createElement as pn, createContext as So, useContext as wn, Suspense as He, lazy as Eo } from "react";
11
11
  import { f as Le, a as Js, j as _o, l as Ys, b as ra } from "./core-nSRy3D7z.js";
@@ -13,7 +13,7 @@ import { atom as P, getDefaultStore as Kp, useAtomValue as Ge, useAtom as D, use
13
13
  import { C as Ot, S as Nt, R as cr, D as tr, a as Jr } from "./STRINGS-BExFecZW.js";
14
14
  import { isObject as oa } from "@rjsf/utils";
15
15
  import { g as fn, a as Sl, c as Qe } from "./common-functions-D2lMFR6K.js";
16
- import { splitAtom as El, atomWithStorage as tt, useAtomCallback as Yp } from "jotai/utils";
16
+ import { splitAtom as El, atomWithStorage as bt, useAtomCallback as Yp } from "jotai/utils";
17
17
  import { useDebouncedCallback as St, useThrottledCallback as hn, useResizeObserver as ws, useDebouncedState as sa } from "@react-hookz/web";
18
18
  import Xp from "tree-model";
19
19
  import qp from "undo-manager";
@@ -22,7 +22,7 @@ import * as ye from "@radix-ui/react-dialog";
22
22
  import { f as Qp, a as _l, b as ia, c as aa, d as la, r as ef, e as tf, j as vn, k as nf, g as mr, m as rf } from "./apply-binding-RQRSIe56.js";
23
23
  import { cva as Xs } from "class-variance-authority";
24
24
  import * as zn from "@radix-ui/react-tooltip";
25
- import { Command as nt } from "cmdk";
25
+ import { Command as tt } from "cmdk";
26
26
  import * as gr from "@radix-ui/react-popover";
27
27
  import vs, { t as nr } from "i18next";
28
28
  import of from "@tiptap/extension-text-style";
@@ -35,7 +35,7 @@ import { useEditor as uf, BubbleMenu as pf, EditorContent as Al } from "@tiptap/
35
35
  import ff from "@tiptap/starter-kit";
36
36
  import hf, { clsx as mf } from "clsx";
37
37
  import { twMerge as Tl } from "tailwind-merge";
38
- import { c as gf, d as Bl, h as qs, p as bf, g as yf, a as xf, b as wf } from "./default-theme-options-saBIkWGT.js";
38
+ import { h as qs, c as gf, d as Bl, p as bf, g as yf, a as xf, b as wf } from "./plugin-BSjgGgwo.js";
39
39
  import { HexAlphaColorPicker as vf } from "react-colorful";
40
40
  import ca, { createPortal as kf } from "react-dom";
41
41
  import Cf from "@rjsf/core";
@@ -196,7 +196,7 @@ const se = {
196
196
  CANVAS_BLOCK_STYLE_SELECTED: "CANVAS_BLOCK_STYLE_SELECTED",
197
197
  // Export Code
198
198
  OPEN_EXPORT_CODE: "OPEN_EXPORT_CODE"
199
- }, bt = (t, e) => {
199
+ }, gt = (t, e) => {
200
200
  if (!t) return !0;
201
201
  const n = Le(t);
202
202
  return n && n.canAcceptBlock ? n.canAcceptBlock(e) : !1;
@@ -214,7 +214,7 @@ const se = {
214
214
  return e && e.canDelete ? e.canDelete() : !0;
215
215
  }, da = (t, { dragSource: e, dropTarget: n }) => {
216
216
  const r = _(e, "data._type", ""), o = _(n, "data._type", "");
217
- return bt(o, r);
217
+ return gt(o, r);
218
218
  };
219
219
  import.meta.vitest && describe("canDropBlock Function", () => {
220
220
  it('should return false if dragSourceType is "Slot"', () => {
@@ -314,7 +314,7 @@ const Vl = P((t) => {
314
314
  }), n;
315
315
  });
316
316
  Vl.debugLabel = "structureErrorsByBlockAtom";
317
- const lt = Kp(), qf = () => lt.get($e), G = (t, e) => {
317
+ const at = Kp(), qf = () => at.get($e), G = (t, e) => {
318
318
  const n = Ge(ci);
319
319
  return M(() => _(n, t, e), [n, t, e]);
320
320
  }, jl = P("");
@@ -356,7 +356,7 @@ const Gl = P(() => !1);
356
356
  Gl.debugLabel = "selectedBlockGridChildAtom";
357
357
  const ai = P("");
358
358
  ai.debugLabel = "styleStateAtom";
359
- const Ul = tt("styleBreakpoint", "xs");
359
+ const Ul = bt("styleBreakpoint", "xs");
360
360
  Ul.debugLabel = "styleBreakpointAtom";
361
361
  const eh = () => ({
362
362
  flexChild: Ge(Wl),
@@ -862,7 +862,7 @@ const gh = () => {
862
862
  blocks: r
863
863
  };
864
864
  }, [t, e, n]);
865
- }, ql = P(!1), vh = () => D(ql), ft = () => {
865
+ }, ql = P(!1), vh = () => D(ql), pt = () => {
866
866
  const t = G("permissions", null);
867
867
  return { hasPermission: I(
868
868
  (n) => t ? t.includes(n) : !0,
@@ -987,7 +987,7 @@ const Sh = (t, e) => e ? t.some((n) => {
987
987
  }
988
988
  }) : !1, _r = () => {
989
989
  const [t, e] = D(Lo), n = G("onSave", async (E) => {
990
- }), r = G("onSaveStateChange", kt), o = wh(), { hasPermission: s } = ft(), { selectedLang: i, fallbackLang: l } = Ke(), [c] = vh(), d = Ge(Ro), u = ui(), [, p] = D(Io), h = () => {
990
+ }), r = G("onSaveStateChange", kt), o = wh(), { hasPermission: s } = pt(), { selectedLang: i, fallbackLang: l } = Ke(), [c] = vh(), d = Ge(Ro), u = ui(), [, p] = D(Io), h = () => {
991
991
  const E = o();
992
992
  return !i || i === l ? !1 : Sh(E.blocks || [], i);
993
993
  }, f = I(
@@ -1252,7 +1252,7 @@ const or = new BroadcastChannel("chaibuilder"), nc = () => {
1252
1252
  const o = [...e, ...r], s = [], i = q(n, (l) => Be(o, l._id) || Be(o, l._parent) ? (s.push(l._id), !1) : !0);
1253
1253
  return F(s) ? i : fi(i, s);
1254
1254
  }, hi = () => {
1255
- const [t] = le(), [e, n] = oe(), { setNewBlocks: r } = Fe(), { hasPermission: o } = ft();
1255
+ const [t] = le(), [e, n] = oe(), { setNewBlocks: r } = Fe(), { hasPermission: o } = pt();
1256
1256
  return I(
1257
1257
  (s) => {
1258
1258
  var l;
@@ -1283,7 +1283,7 @@ const or = new BroadcastChannel("chaibuilder"), nc = () => {
1283
1283
  },
1284
1284
  [t]
1285
1285
  ),
1286
- { store: lt }
1286
+ { store: at }
1287
1287
  ), rc = () => {
1288
1288
  const [, t] = le(), { postMessage: e } = nc(), n = Mh(), r = ui(), o = _h();
1289
1289
  return {
@@ -1307,7 +1307,7 @@ const or = new BroadcastChannel("chaibuilder"), nc = () => {
1307
1307
  let d = [...c];
1308
1308
  for (let u = 0; u < s.length; u++)
1309
1309
  d = Ph(d, s[u], i, l);
1310
- return gt(s, (u) => {
1310
+ return mt(s, (u) => {
1311
1311
  const p = te(d, (h) => h._id === u);
1312
1312
  p && n({ id: u, props: { _parent: p._parent || null } });
1313
1313
  }), e({ type: "blocks-updated", blocks: d }), r(d), o(), d;
@@ -1320,33 +1320,33 @@ const or = new BroadcastChannel("chaibuilder"), nc = () => {
1320
1320
  }), e({ type: "blocks-props-updated", blocks: s }), o();
1321
1321
  }
1322
1322
  };
1323
- }, mt = new qp();
1324
- mt.setLimit(50);
1323
+ }, ht = new qp();
1324
+ ht.setLimit(50);
1325
1325
  const Fh = P({
1326
1326
  canUndo: !1,
1327
1327
  canRedo: !1
1328
1328
  }), Ar = () => {
1329
1329
  const [, t] = D(Lo), [e, n] = D(Fh), r = G("onSaveStateChange", kt), o = I(() => {
1330
1330
  const d = {
1331
- canUndo: mt.hasUndo(),
1332
- canRedo: mt.hasRedo()
1331
+ canUndo: ht.hasUndo(),
1332
+ canRedo: ht.hasRedo()
1333
1333
  };
1334
1334
  n(d), t("UNSAVED"), r("UNSAVED");
1335
1335
  }, [n, t, r]);
1336
- z(() => (mt.setCallback(o), () => {
1337
- mt.setCallback(kt);
1336
+ z(() => (ht.setCallback(o), () => {
1337
+ ht.setCallback(kt);
1338
1338
  }), [o]);
1339
1339
  const s = I(
1340
1340
  (d) => {
1341
- mt.add(d), o();
1341
+ ht.add(d), o();
1342
1342
  },
1343
1343
  [o]
1344
1344
  ), i = I(() => {
1345
- mt.undo(), o();
1345
+ ht.undo(), o();
1346
1346
  }, [o]), l = I(() => {
1347
- mt.redo(), o();
1347
+ ht.redo(), o();
1348
1348
  }, [o]), c = I(() => {
1349
- mt.clear(), n({
1349
+ ht.clear(), n({
1350
1350
  canUndo: !1,
1351
1351
  canRedo: !1
1352
1352
  });
@@ -1372,12 +1372,12 @@ const Fh = P({
1372
1372
  } = rc();
1373
1373
  return {
1374
1374
  moveBlocks: (f, m, g) => {
1375
- const y = lt.get($e), x = A(f, (E) => {
1375
+ const y = at.get($e), x = A(f, (E) => {
1376
1376
  const N = y.find((C) => C._id === E)._parent || null, k = y.filter((C) => N ? C._parent === N : !C._parent).map((C) => C._id).indexOf(E);
1377
1377
  return { _id: E, oldParent: N, oldPosition: k };
1378
1378
  }), v = x.find(({ _id: E }) => E === f[0]);
1379
1379
  v && v.oldParent === m && v.oldPosition === g || (o(f, m ?? null, g), t({
1380
- undo: () => gt(x, ({ _id: E, oldParent: S, oldPosition: N }) => {
1380
+ undo: () => mt(x, ({ _id: E, oldParent: S, oldPosition: N }) => {
1381
1381
  o([E], S ?? null, N);
1382
1382
  }),
1383
1383
  redo: () => o(f, m ?? null, g)
@@ -1391,14 +1391,14 @@ const Fh = P({
1391
1391
  },
1392
1392
  removeBlocks: (f) => {
1393
1393
  var v;
1394
- const m = lt.get($e), g = (v = ve(f)) == null ? void 0 : v._parent, x = m.filter((E) => g ? E._parent === g : !E._parent).indexOf(ve(f));
1394
+ const m = at.get($e), g = (v = ve(f)) == null ? void 0 : v._parent, x = m.filter((E) => g ? E._parent === g : !E._parent).indexOf(ve(f));
1395
1395
  r(A(f, "_id")), t({
1396
1396
  undo: () => n(f, g ?? void 0, x),
1397
1397
  redo: () => r(A(f, "_id"))
1398
1398
  });
1399
1399
  },
1400
1400
  updateBlocks: (f, m, g) => {
1401
- const y = lt.get($e);
1401
+ const y = at.get($e);
1402
1402
  let x = [];
1403
1403
  if (g)
1404
1404
  x = A(f, (v) => ({ _id: v, ...g }));
@@ -1406,7 +1406,7 @@ const Fh = P({
1406
1406
  const v = Ct(m);
1407
1407
  x = A(f, (E) => {
1408
1408
  const S = y.find((T) => T._id === E), N = { _id: E };
1409
- return gt(v, (T) => N[T] = S[T]), N;
1409
+ return mt(v, (T) => N[T] = S[T]), N;
1410
1410
  });
1411
1411
  }
1412
1412
  s(A(f, (v) => ({ _id: v, ...m }))), t({
@@ -1418,18 +1418,18 @@ const Fh = P({
1418
1418
  s(A(f, (g) => ({ _id: g, ...m })));
1419
1419
  },
1420
1420
  setNewBlocks: (f) => {
1421
- const m = lt.get($e);
1421
+ const m = at.get($e);
1422
1422
  e(f), t({
1423
1423
  undo: () => e(m),
1424
1424
  redo: () => e(f)
1425
1425
  });
1426
1426
  },
1427
1427
  updateMultipleBlocksProps: (f) => {
1428
- const m = lt.get($e);
1428
+ const m = at.get($e);
1429
1429
  let g = [];
1430
1430
  g = A(f, (y) => {
1431
1431
  const x = Ct(y), v = m.find((S) => S._id === y._id), E = {};
1432
- return gt(x, (S) => E[S] = v == null ? void 0 : v[S]), E;
1432
+ return mt(x, (S) => E[S] = v == null ? void 0 : v[S]), E;
1433
1433
  }), s(f), t({
1434
1434
  undo: () => s(g),
1435
1435
  redo: () => s(f)
@@ -1437,7 +1437,7 @@ const Fh = P({
1437
1437
  }
1438
1438
  };
1439
1439
  }, zh = ({ block: t, children: e }) => {
1440
- const { t: n } = K(), [r] = le(), { hasPermission: o } = ft(), s = _(t, "_id"), i = _(t, "_parent"), l = q(r, (p) => i ? _(p, "_parent") === i : !_(p, "_parent")), c = io(_(t, "_type", "")), d = lr(l, { _id: s }), u = (p) => {
1440
+ const { t: n } = K(), [r] = le(), { hasPermission: o } = pt(), s = _(t, "_id"), i = _(t, "_parent"), l = q(r, (p) => i ? _(p, "_parent") === i : !_(p, "_parent")), c = io(_(t, "_type", "")), d = lr(l, { _id: s }), u = (p) => {
1441
1441
  if (p === "CHILD")
1442
1442
  ge.publish(se.OPEN_ADD_BLOCK, t);
1443
1443
  else {
@@ -1494,17 +1494,17 @@ const sc = P(!1);
1494
1494
  sc.debugLabel = "aiAssistantActiveAtom";
1495
1495
  const Yh = P(!1);
1496
1496
  Yh.debugLabel = "codeEditorOpenAtom";
1497
- const Xh = tt("codeEditorHeight", 500);
1497
+ const Xh = bt("codeEditorHeight", 500);
1498
1498
  Xh.debugLabel = "codeEditorHeightAtom";
1499
1499
  const qh = P([]);
1500
1500
  qh.debugLabel = "xShowBlocksAtom";
1501
- const yi = tt("_selectedLibrary", null);
1501
+ const yi = bt("_selectedLibrary", null);
1502
1502
  yi.debugLabel = "selectedLibraryAtom";
1503
1503
  const ic = P(!0);
1504
1504
  ic.debugLabel = "dataBindingActiveAtom";
1505
- const Yn = () => D(Oo);
1505
+ const Zh = bt("chai-builder-theme", qs), Yn = () => D(Oo);
1506
1506
  let me = null, Lt = null;
1507
- function Zh(t, e) {
1507
+ function Qh(t, e) {
1508
1508
  const n = t.getAttribute("data-block-name"), r = t.getAttribute("data-block-type"), o = n || r || "Container", s = e.createElement("div");
1509
1509
  return s.className = "chai-drag-parent-label", s.textContent = o, s.className = "absolute top-0 -left-0.5 -translate-x-0.5 -translate-y-full -mt-1 bg-green-500/95 text-white px-2 py-1 text-xs font-semibold font-sans leading-tight whitespace-nowrap shadow-lg z-[999999] pointer-events-none select-none", s;
1510
1510
  }
@@ -1526,7 +1526,7 @@ const xi = () => {
1526
1526
  me && (me.style.outline = "", me.style.outlineOffset = "", me.style.backgroundColor = "", me.style.position = "", me = null), ns();
1527
1527
  return;
1528
1528
  }
1529
- typeof o != "string" ? s = o : s = e.querySelector(`[data-block-id="${o}"]`), !(s === me && Lt && Lt.parentNode) && (me && me !== s && (me.style.outline = "", me.style.outlineOffset = "", me.style.backgroundColor = "", me.style.position = ""), ns(), s ? (s.style.outline = "2px dashed rgba(34, 197, 94, 1)", s.style.outlineOffset = "2px", s.style.backgroundColor = "rgba(34, 197, 94, 0.05)", window.getComputedStyle(s).position === "static" && (s.style.position = "relative"), Lt = Zh(s, e), s.appendChild(Lt), me = s) : me = null);
1529
+ typeof o != "string" ? s = o : s = e.querySelector(`[data-block-id="${o}"]`), !(s === me && Lt && Lt.parentNode) && (me && me !== s && (me.style.outline = "", me.style.outlineOffset = "", me.style.backgroundColor = "", me.style.position = ""), ns(), s ? (s.style.outline = "2px dashed rgba(34, 197, 94, 1)", s.style.outlineOffset = "2px", s.style.backgroundColor = "rgba(34, 197, 94, 0.05)", window.getComputedStyle(s).position === "static" && (s.style.position = "relative"), Lt = Qh(s, e), s.appendChild(Lt), me = s) : me = null);
1530
1530
  },
1531
1531
  [e]
1532
1532
  ), r = I(() => {
@@ -1537,7 +1537,7 @@ const xi = () => {
1537
1537
  clearParentHighlight: r,
1538
1538
  lastDragHighlighted: me
1539
1539
  };
1540
- }, Qh = () => {
1540
+ }, em = () => {
1541
1541
  const [, t] = D(Po), [, e] = D(Tr), [n] = Yn(), { clearParentHighlight: r } = xi(), [o, s] = D(gi), i = n == null ? void 0 : n.contentDocument;
1542
1542
  return I(() => {
1543
1543
  t(null), e({
@@ -1550,12 +1550,12 @@ const xi = () => {
1550
1550
  left: 0,
1551
1551
  width: 0,
1552
1552
  height: 0
1553
- }), em(i), r(), i && i.querySelectorAll("[data-dragging]").forEach((c) => {
1553
+ }), tm(i), r(), i && i.querySelectorAll("[data-dragging]").forEach((c) => {
1554
1554
  c.removeAttribute("data-dragging");
1555
1555
  }), mi(!1), s(o + 1);
1556
1556
  }, [t, e, i, r, o, s]);
1557
1557
  };
1558
- function em(t) {
1558
+ function tm(t) {
1559
1559
  if (!t) return;
1560
1560
  t.querySelectorAll("[data-drop-target]").forEach((n) => n.removeAttribute("data-drop-target"));
1561
1561
  }
@@ -1572,7 +1572,7 @@ function gn(t, e = null) {
1572
1572
  return "horizontal";
1573
1573
  return "vertical";
1574
1574
  }
1575
- const tm = [
1575
+ const nm = [
1576
1576
  "Heading",
1577
1577
  "Text",
1578
1578
  "Image",
@@ -1588,9 +1588,9 @@ const tm = [
1588
1588
  "Repeater",
1589
1589
  "Video"
1590
1590
  ];
1591
- function nm(t) {
1591
+ function rm(t) {
1592
1592
  try {
1593
- return tm.includes(t);
1593
+ return nm.includes(t);
1594
1594
  } catch {
1595
1595
  return !1;
1596
1596
  }
@@ -1638,12 +1638,12 @@ function Yr(t) {
1638
1638
  return !1;
1639
1639
  }
1640
1640
  }
1641
- function rm(t, e, n, r) {
1641
+ function om(t, e, n, r) {
1642
1642
  try {
1643
1643
  const o = Wt(t);
1644
1644
  if (o.length < 2)
1645
1645
  return null;
1646
- const s = am(o, e, n, r);
1646
+ const s = lm(o, e, n, r);
1647
1647
  if (s) {
1648
1648
  const i = wi(o, s, r);
1649
1649
  i.sort((l, c) => {
@@ -1680,7 +1680,7 @@ function rm(t, e, n, r) {
1680
1680
  return null;
1681
1681
  }
1682
1682
  }
1683
- function om(t, e, n, r) {
1683
+ function sm(t, e, n, r) {
1684
1684
  try {
1685
1685
  const o = t.getBoundingClientRect(), s = wt.PARENT_EDGE_PROXIMITY;
1686
1686
  if (r === "vertical") {
@@ -1699,7 +1699,7 @@ function om(t, e, n, r) {
1699
1699
  return null;
1700
1700
  }
1701
1701
  }
1702
- function sm(t, e, n, r, o) {
1702
+ function im(t, e, n, r, o) {
1703
1703
  const s = t.getBoundingClientRect();
1704
1704
  if (o === "vertical") {
1705
1705
  const l = (n - s.top) / s.height, c = pa(s.height), d = c / s.height;
@@ -1742,7 +1742,7 @@ function sm(t, e, n, r, o) {
1742
1742
  };
1743
1743
  }
1744
1744
  }
1745
- function im(t, e, n, r, o) {
1745
+ function am(t, e, n, r, o) {
1746
1746
  var E, S, N, T;
1747
1747
  const s = t.getAttribute("data-block-id"), i = t.getAttribute("data-block-type") || "Box";
1748
1748
  if (!s)
@@ -1750,7 +1750,7 @@ function im(t, e, n, r, o) {
1750
1750
  let l = t.parentElement;
1751
1751
  for (; l && !l.hasAttribute("data-block-id"); )
1752
1752
  l = l.parentElement;
1753
- const c = s === "canvas" ? s : l == null ? void 0 : l.getAttribute("data-block-id"), d = l ? gn(l) : "vertical", u = gn(t), p = nm(i), h = !p && bt(i, r), f = ((E = o.defaultView) == null ? void 0 : E.scrollY) || 0, m = ((S = o.defaultView) == null ? void 0 : S.scrollX) || 0;
1753
+ const c = s === "canvas" ? s : l == null ? void 0 : l.getAttribute("data-block-id"), d = l ? gn(l) : "vertical", u = gn(t), p = rm(i), h = !p && gt(i, r), f = ((E = o.defaultView) == null ? void 0 : E.scrollY) || 0, m = ((S = o.defaultView) == null ? void 0 : S.scrollX) || 0;
1754
1754
  if (s === "canvas" && Yr(t)) {
1755
1755
  const k = Wt(t), C = k[k.length - 1];
1756
1756
  if (C) {
@@ -1773,7 +1773,7 @@ function im(t, e, n, r, o) {
1773
1773
  }
1774
1774
  }
1775
1775
  if (h && !p && Yr(t)) {
1776
- const k = rm(t, e, n, u);
1776
+ const k = om(t, e, n, u);
1777
1777
  if (k) {
1778
1778
  const C = k.before.getBoundingClientRect(), w = k.after.getBoundingClientRect(), B = t.getBoundingClientRect(), L = window.getComputedStyle(t), R = parseFloat(L.paddingLeft) || 0, V = parseFloat(L.paddingRight) || 0, J = Wt(t), Q = wi(J, k.before, u);
1779
1779
  let Se = 0;
@@ -1819,7 +1819,7 @@ function im(t, e, n, r, o) {
1819
1819
  }
1820
1820
  }
1821
1821
  if (l && c) {
1822
- const k = om(l, e, n, d);
1822
+ const k = sm(l, e, n, d);
1823
1823
  if (k) {
1824
1824
  const C = l.getBoundingClientRect(), w = window.getComputedStyle(l), B = parseFloat(w.paddingLeft) || 0, L = parseFloat(w.paddingRight) || 0, R = parseFloat(w.paddingTop) || 0, V = parseFloat(w.paddingBottom) || 0, J = ((N = o.defaultView) == null ? void 0 : N.scrollY) || 0, Q = ((T = o.defaultView) == null ? void 0 : T.scrollX) || 0, Se = d === "vertical" ? "horizontal" : "vertical", xe = ac(l);
1825
1825
  if (k === "start") {
@@ -1865,13 +1865,13 @@ function im(t, e, n, r, o) {
1865
1865
  if (Pe) {
1866
1866
  const Je = Pe.getBoundingClientRect();
1867
1867
  if (d === "vertical") {
1868
- const Y = C.width - B - L, rt = C.left + Q + B;
1868
+ const Y = C.width - B - L, nt = C.left + Q + B;
1869
1869
  return {
1870
1870
  position: "after",
1871
1871
  placeholderOrientation: Se,
1872
1872
  rect: {
1873
1873
  top: Je.bottom + J - 2,
1874
- left: rt,
1874
+ left: nt,
1875
1875
  width: Y,
1876
1876
  height: 4
1877
1877
  },
@@ -1881,7 +1881,7 @@ function im(t, e, n, r, o) {
1881
1881
  confidence: 0.9
1882
1882
  };
1883
1883
  } else {
1884
- const Y = C.top + J + R, rt = xe.maxHeight > 0 ? xe.maxHeight : C.height - R - V;
1884
+ const Y = C.top + J + R, nt = xe.maxHeight > 0 ? xe.maxHeight : C.height - R - V;
1885
1885
  return {
1886
1886
  position: "after",
1887
1887
  placeholderOrientation: Se,
@@ -1889,7 +1889,7 @@ function im(t, e, n, r, o) {
1889
1889
  top: Y,
1890
1890
  left: Je.right + Q - 2,
1891
1891
  width: 4,
1892
- height: rt
1892
+ height: nt
1893
1893
  },
1894
1894
  targetElement: Pe,
1895
1895
  targetBlockId: Pe.getAttribute("data-block-id"),
@@ -1901,7 +1901,7 @@ function im(t, e, n, r, o) {
1901
1901
  }
1902
1902
  }
1903
1903
  }
1904
- let g = sm(t, e, n, h, d);
1904
+ let g = im(t, e, n, h, d);
1905
1905
  if (p && g.position === "inside") {
1906
1906
  const k = t.getBoundingClientRect();
1907
1907
  d === "vertical" ? g = {
@@ -1914,7 +1914,7 @@ function im(t, e, n, r, o) {
1914
1914
  }
1915
1915
  let y;
1916
1916
  g.position === "inside" ? y = u === "vertical" ? "horizontal" : "vertical" : y = d === "vertical" ? "horizontal" : "vertical";
1917
- const x = lm(
1917
+ const x = cm(
1918
1918
  t,
1919
1919
  l,
1920
1920
  g.position,
@@ -1932,7 +1932,7 @@ function im(t, e, n, r, o) {
1932
1932
  confidence: g.confidence
1933
1933
  };
1934
1934
  }
1935
- function am(t, e, n, r) {
1935
+ function lm(t, e, n, r) {
1936
1936
  if (t.length === 0) return null;
1937
1937
  const o = t.filter((l) => {
1938
1938
  const c = l.getBoundingClientRect();
@@ -1974,7 +1974,7 @@ function wi(t, e, n) {
1974
1974
  return n === "vertical" ? Math.abs(i.top - r.top) <= o : Math.abs(i.left - r.left) <= o;
1975
1975
  });
1976
1976
  }
1977
- function lm(t, e, n, r, o) {
1977
+ function cm(t, e, n, r, o) {
1978
1978
  var R, V;
1979
1979
  const s = t.getBoundingClientRect(), i = window.getComputedStyle(t), l = ((R = o.defaultView) == null ? void 0 : R.scrollY) || 0, c = ((V = o.defaultView) == null ? void 0 : V.scrollX) || 0, d = parseFloat(i.marginTop) || 0, u = parseFloat(i.marginBottom) || 0, p = parseFloat(i.marginLeft) || 0, h = parseFloat(i.marginRight) || 0, f = parseFloat(i.paddingTop) || 0, m = parseFloat(i.paddingBottom) || 0, g = parseFloat(i.paddingLeft) || 0, y = parseFloat(i.paddingRight) || 0, x = e == null ? void 0 : e.getBoundingClientRect(), v = e && parseFloat(window.getComputedStyle(e).paddingLeft) || 0, E = e && parseFloat(window.getComputedStyle(e).paddingRight) || 0, S = e && parseFloat(window.getComputedStyle(e).paddingTop) || 0, N = e && parseFloat(window.getComputedStyle(e).paddingBottom) || 0, T = e ? ac(e) : { maxHeight: 0 }, k = e ? gn(e) : "vertical", C = e ? Wt(e) : [], w = wi(C, t, k);
1980
1980
  let B = 0, L = 0;
@@ -2035,7 +2035,7 @@ function lm(t, e, n, r, o) {
2035
2035
  height: Math.max(s.height - f - m, 20)
2036
2036
  };
2037
2037
  }
2038
- const cm = 100, Sn = () => {
2038
+ const dm = 100, Sn = () => {
2039
2039
  const [t] = le(), [, e] = oe(), { addBlocks: n } = Fe(), r = I(
2040
2040
  (s, i, l) => {
2041
2041
  for (let h = 0; h < s.length; h++) {
@@ -2049,7 +2049,7 @@ const cm = 100, Sn = () => {
2049
2049
  let d, u;
2050
2050
  return i && (d = te(t, { _id: i }), s[0]._parent = i, vo(s, (h) => {
2051
2051
  h != null && h._parent || (h._parent = i);
2052
- }), u = i), !(d ? bt(d == null ? void 0 : d._type, c._type) : !0) && d && (s[0]._parent = d._parent, u = d._parent), n(s, u ?? void 0, l), e([c._id]), c;
2052
+ }), u = i), !(d ? gt(d == null ? void 0 : d._type, c._type) : !0) && d && (s[0]._parent = d._parent, u = d._parent), n(s, u ?? void 0, l), e([c._id]), c;
2053
2053
  },
2054
2054
  [n, t, e]
2055
2055
  );
@@ -2067,7 +2067,7 @@ const cm = 100, Sn = () => {
2067
2067
  ...ce(s, "partialBlockId") && { partialBlockId: s.partialBlockId }
2068
2068
  };
2069
2069
  let p, h;
2070
- return i && (p = te(t, { _id: i }), u._parent = i, h = i), !bt(p == null ? void 0 : p._type, u._type) && p && (u._parent = p._parent, h = p._parent), n([u], h ?? void 0, l), setTimeout(() => e([u._id]), cm), u;
2070
+ return i && (p = te(t, { _id: i }), u._parent = i, h = i), !gt(p == null ? void 0 : p._type, u._type) && p && (u._parent = p._parent, h = p._parent), n([u], h ?? void 0, l), setTimeout(() => e([u._id]), dm), u;
2071
2071
  },
2072
2072
  [n, r, t, e]
2073
2073
  ), addPredefinedBlock: r };
@@ -2095,11 +2095,11 @@ const _t = () => {
2095
2095
  return { highlightBlock: n, clearHighlight: r, lastHighlighted: It };
2096
2096
  }, Br = P([]);
2097
2097
  Br.debugLabel = "selectedStylingBlocksAtom";
2098
- const ze = () => D(Br), dm = () => {
2098
+ const ze = () => D(Br), um = () => {
2099
2099
  const [t, e] = D(Po), [n, r] = D(Tr), [o] = le(), [s] = Yn(), { addCoreBlock: i } = Sn(), { moveBlocks: l } = Fe(), [, c] = oe(), [, d] = ze(), { clearHighlight: u } = _t(), { clearParentHighlight: p } = xi(), [h, f] = D(gi), m = Et(), g = ec(), y = s == null ? void 0 : s.contentDocument;
2100
2100
  return I(
2101
2101
  (x) => {
2102
- if (x.preventDefault(), x.stopPropagation(), mi(!1), pm(y), fa(y), p(), r({
2102
+ if (x.preventDefault(), x.stopPropagation(), mi(!1), fm(y), fa(y), p(), r({
2103
2103
  isVisible: !1,
2104
2104
  isValid: !1,
2105
2105
  position: "inside",
@@ -2131,7 +2131,7 @@ const ze = () => D(Br), dm = () => {
2131
2131
  const v = n.targetBlockId, E = n.targetParentId;
2132
2132
  if (!v)
2133
2133
  return;
2134
- const { parentId: S, index: N, replaceImageUrl: T } = um(
2134
+ const { parentId: S, index: N, replaceImageUrl: T } = pm(
2135
2135
  o,
2136
2136
  v,
2137
2137
  E,
@@ -2196,7 +2196,7 @@ const ze = () => D(Br), dm = () => {
2196
2196
  const e = ce(t, "blocks"), n = t == null ? void 0 : t.blocks, r = (n == null ? void 0 : n.length) === 1 && ((s = n == null ? void 0 : n[0]) == null ? void 0 : s._type) === "Image", o = !((i = n == null ? void 0 : n[0]) != null && i._id);
2197
2197
  return e && r && o;
2198
2198
  };
2199
- function um(t, e, n, r, o) {
2199
+ function pm(t, e, n, r, o) {
2200
2200
  var s, i;
2201
2201
  try {
2202
2202
  if (e === n && ((s = o == null ? void 0 : o.blocks) == null ? void 0 : s.length) === 1 && _(o, "blocks.0._type") === "Image" && ((i = te(t, { _id: e })) == null ? void 0 : i._type) === "Image")
@@ -2236,7 +2236,7 @@ function fa(t) {
2236
2236
  if (!t) return;
2237
2237
  t.querySelectorAll("[data-drop-target]").forEach((n) => n.removeAttribute("data-drop-target"));
2238
2238
  }
2239
- function pm(t) {
2239
+ function fm(t) {
2240
2240
  if (!t) return;
2241
2241
  t.querySelectorAll("[data-dragging]").forEach((n) => {
2242
2242
  n.removeAttribute("data-dragging");
@@ -2260,14 +2260,14 @@ function cc(t, e, n) {
2260
2260
  function dc(t, e, n) {
2261
2261
  return !t || !e ? !0 : !cc(e, t, n);
2262
2262
  }
2263
- function fm(t, e, n) {
2263
+ function hm(t, e, n) {
2264
2264
  if (!t) return !0;
2265
2265
  const r = n.find((s) => s._id === e);
2266
2266
  if (!r) return !0;
2267
2267
  const o = r._parent;
2268
2268
  return dc(t, o, n);
2269
2269
  }
2270
- const hm = [
2270
+ const mm = [
2271
2271
  "Heading",
2272
2272
  "Text",
2273
2273
  "Image",
@@ -2289,7 +2289,7 @@ const hm = [
2289
2289
  MAX_SCROLL_SPEED: 10,
2290
2290
  /** Minimum scroll speed in pixels per frame */
2291
2291
  MIN_SCROLL_SPEED: 10
2292
- }, mm = () => {
2292
+ }, gm = () => {
2293
2293
  const [t] = D(Po), [e] = Yn(), [, n] = D(Tr), { clearParentHighlight: r, highlightParent: o } = xi(), [s] = le(), i = e == null ? void 0 : e.contentDocument, l = re(null), c = re(0), d = I(
2294
2294
  (p) => {
2295
2295
  if (!(i != null && i.defaultView)) return;
@@ -2327,7 +2327,7 @@ const hm = [
2327
2327
  if (!On || !t)
2328
2328
  return;
2329
2329
  r();
2330
- const h = gm(p), { element: f, targetBlockId: m, targetParentId: g } = h;
2330
+ const h = bm(p), { element: f, targetBlockId: m, targetParentId: g } = h;
2331
2331
  if (!f || !m)
2332
2332
  return;
2333
2333
  const y = t._id;
@@ -2338,12 +2338,12 @@ const hm = [
2338
2338
  return;
2339
2339
  const v = p.clientX, E = p.clientY;
2340
2340
  if (d(E), !i) return;
2341
- const S = im(f, v, E, x, i);
2341
+ const S = am(f, v, E, x, i);
2342
2342
  if (!S)
2343
2343
  return;
2344
2344
  const N = f.getAttribute("data-block-type") || "Box";
2345
2345
  let T = !1;
2346
- const k = hm.includes(N);
2346
+ const k = mm.includes(N);
2347
2347
  if (N === "Image" && x === "Image" && lc(t)) {
2348
2348
  o(m), n({
2349
2349
  isVisible: !0,
@@ -2363,14 +2363,14 @@ const hm = [
2363
2363
  if (S.position === "inside") {
2364
2364
  if (k || y && !dc(y, m, s))
2365
2365
  return;
2366
- T = bt(N, x);
2366
+ T = gt(N, x);
2367
2367
  } else {
2368
2368
  let w = f.parentElement, B = "Box";
2369
2369
  for (; w && !w.hasAttribute("data-block-id"); )
2370
2370
  w = w.parentElement;
2371
- if (w && (B = w.getAttribute("data-block-type") || "Box"), y && !fm(y, m, s))
2371
+ if (w && (B = w.getAttribute("data-block-type") || "Box"), y && !hm(y, m, s))
2372
2372
  return;
2373
- T = bt(B, x);
2373
+ T = gt(B, x);
2374
2374
  }
2375
2375
  if (!T)
2376
2376
  return;
@@ -2388,7 +2388,7 @@ const hm = [
2388
2388
  height: S.rect.height,
2389
2389
  targetBlockId: S.targetBlockId,
2390
2390
  targetParentId: C
2391
- }), bm(i), S.targetElement.setAttribute("data-drop-target", "true");
2391
+ }), ym(i), S.targetElement.setAttribute("data-drop-target", "true");
2392
2392
  }, 300),
2393
2393
  [i, t, n, r, o, s, d]
2394
2394
  );
@@ -2399,7 +2399,7 @@ const hm = [
2399
2399
  [u]
2400
2400
  );
2401
2401
  };
2402
- function gm(t) {
2402
+ function bm(t) {
2403
2403
  let e = t.target;
2404
2404
  for (; e && !e.hasAttribute("data-block-id"); )
2405
2405
  e = e.parentElement;
@@ -2426,11 +2426,11 @@ function gm(t) {
2426
2426
  orientation: l
2427
2427
  };
2428
2428
  }
2429
- function bm(t) {
2429
+ function ym(t) {
2430
2430
  if (!t) return;
2431
2431
  t.querySelectorAll("[data-drop-target]").forEach((n) => n.removeAttribute("data-drop-target"));
2432
2432
  }
2433
- function ym(t) {
2433
+ function xm(t) {
2434
2434
  var s;
2435
2435
  const e = document.createElement("div");
2436
2436
  e.className = "absolute -top-[1000px] -left-[1000px] pl-3 pr-1 py-1 bg-white/60 border border-blue-400/30 rounded shadow-md flex items-center gap-1.5 font-sans pointer-events-none z-[9999] scale-90";
@@ -2447,7 +2447,7 @@ function ym(t) {
2447
2447
  function ha(t) {
2448
2448
  t && t.parentNode && t.parentNode.removeChild(t);
2449
2449
  }
2450
- const xm = () => {
2450
+ const wm = () => {
2451
2451
  const [, t] = oe(), [, e] = ze(), { clearHighlight: n } = _t(), [, r] = D(Po), [, o] = D(Tr), s = re(null);
2452
2452
  return I(
2453
2453
  (i, l, c = !0) => {
@@ -2467,7 +2467,7 @@ const xm = () => {
2467
2467
  }
2468
2468
  }
2469
2469
  if (l != null && l._type || l != null && l.type) {
2470
- const p = ym(l);
2470
+ const p = xm(l);
2471
2471
  s.current = p, i.dataTransfer.setDragImage(p, 0, 0), setTimeout(() => {
2472
2472
  s.current && (ha(s.current), s.current = null);
2473
2473
  }, 50);
@@ -2489,7 +2489,7 @@ const xm = () => {
2489
2489
  [t, n, r, o]
2490
2490
  );
2491
2491
  }, Xn = () => {
2492
- const t = xm(), e = mm(), n = dm(), r = Qh();
2492
+ const t = wm(), e = gm(), n = um(), r = em();
2493
2493
  return {
2494
2494
  onDragStart: t,
2495
2495
  onDragOver: e,
@@ -2497,7 +2497,7 @@ const xm = () => {
2497
2497
  onDragEnd: r,
2498
2498
  isDragging: On
2499
2499
  };
2500
- }, wm = () => {
2500
+ }, vm = () => {
2501
2501
  const [t] = D(Tr);
2502
2502
  return t;
2503
2503
  }, yt = () => {
@@ -2507,12 +2507,12 @@ const xm = () => {
2507
2507
  let uc, pc;
2508
2508
  typeof document < "u" && (uc = document);
2509
2509
  typeof window < "u" && (pc = window);
2510
- const fc = ee.createContext({ document: uc, window: pc }), At = () => ee.useContext(fc), { Provider: vm, Consumer: oC } = fc, km = [
2510
+ const fc = ee.createContext({ document: uc, window: pc }), At = () => ee.useContext(fc), { Provider: km, Consumer: oC } = fc, Cm = [
2511
2511
  { ControlIcon: ep, dir: "VERTICAL", key: "UP" },
2512
2512
  { ControlIcon: tp, dir: "VERTICAL", key: "DOWN" },
2513
2513
  { ControlIcon: np, dir: "HORIZONTAL", key: "LEFT" },
2514
2514
  { ControlIcon: rp, dir: "HORIZONTAL", key: "RIGHT" }
2515
- ], Cm = (t, e, n) => {
2515
+ ], Nm = (t, e, n) => {
2516
2516
  try {
2517
2517
  if (!t || !n) return "VERTICAL";
2518
2518
  const r = `[data-block-id='${t}']`, o = n == null ? void 0 : n.querySelector(r);
@@ -2524,8 +2524,8 @@ const fc = ee.createContext({ document: uc, window: pc }), At = () => ee.useCont
2524
2524
  } catch {
2525
2525
  return "VERTICAL";
2526
2526
  }
2527
- }, hc = (t, e, n) => !!(t && (n === "UP" || n === "LEFT") || e && (n === "DOWN" || n === "RIGHT")), Nm = (t, e) => {
2528
- const [n] = le(), { document: r } = At(), { moveBlocks: o } = Fe(), s = _(t, "_id"), i = _(t, "_parent"), l = q(n, (m) => i ? _(m, "_parent") === i : !_(m, "_parent")), c = (l == null ? void 0 : l.length) <= 1, d = lr(l, { _id: s }), u = d <= 0, p = d + 1 === (l == null ? void 0 : l.length), h = Cm(i, s, r), f = I(
2527
+ }, hc = (t, e, n) => !!(t && (n === "UP" || n === "LEFT") || e && (n === "DOWN" || n === "RIGHT")), Sm = (t, e) => {
2528
+ const [n] = le(), { document: r } = At(), { moveBlocks: o } = Fe(), s = _(t, "_id"), i = _(t, "_parent"), l = q(n, (m) => i ? _(m, "_parent") === i : !_(m, "_parent")), c = (l == null ? void 0 : l.length) <= 1, d = lr(l, { _id: s }), u = d <= 0, p = d + 1 === (l == null ? void 0 : l.length), h = Nm(i, s, r), f = I(
2529
2529
  (m) => {
2530
2530
  hc(u, p, m) || c || (m === "UP" || m === "LEFT" ? o([s], i || void 0, d - 1) : (m === "DOWN" || m === "RIGHT") && o([s], i || void 0, d + 2), e());
2531
2531
  },
@@ -2540,12 +2540,12 @@ const fc = ee.createContext({ document: uc, window: pc }), At = () => ee.useCont
2540
2540
  { document: r },
2541
2541
  [f]
2542
2542
  ), { isOnlyChild: c, isFirstBlock: u, isLastBlock: p, moveBlock: f, orientation: h };
2543
- }, Sm = ({ block: t, updateFloatingBar: e }) => {
2544
- const { isOnlyChild: n, isFirstBlock: r, isLastBlock: o, moveBlock: s, orientation: i } = Nm(
2543
+ }, Em = ({ block: t, updateFloatingBar: e }) => {
2544
+ const { isOnlyChild: n, isFirstBlock: r, isLastBlock: o, moveBlock: s, orientation: i } = Sm(
2545
2545
  t,
2546
2546
  e
2547
2547
  );
2548
- return n ? null : /* @__PURE__ */ a(Z, { children: km.map(({ ControlIcon: l, dir: c, key: d }) => i !== c || hc(r, o, d) ? null : /* @__PURE__ */ a(
2548
+ return n ? null : /* @__PURE__ */ a(Z, { children: Cm.map(({ ControlIcon: l, dir: c, key: d }) => i !== c || hc(r, o, d) ? null : /* @__PURE__ */ a(
2549
2549
  l,
2550
2550
  {
2551
2551
  onClick: () => s(d),
@@ -2558,7 +2558,7 @@ const fc = ee.createContext({ document: uc, window: pc }), At = () => ee.useCont
2558
2558
  return I(
2559
2559
  (r, o = null) => {
2560
2560
  const s = [];
2561
- gt(r, (i) => {
2561
+ mt(r, (i) => {
2562
2562
  const l = t.find((h) => h._id === i);
2563
2563
  o ? o === "root" && (o = null) : o = (l == null ? void 0 : l._parent) ?? null;
2564
2564
  const u = q(
@@ -2570,7 +2570,7 @@ const fc = ee.createContext({ document: uc, window: pc }), At = () => ee.useCont
2570
2570
  },
2571
2571
  [t, e]
2572
2572
  );
2573
- }, Em = P(""), mc = () => D(Em), gc = P("");
2573
+ }, _m = P(""), mc = () => D(_m), gc = P("");
2574
2574
  gc.debugLabel = "inlineEditingActiveAtom";
2575
2575
  const bc = P(0);
2576
2576
  bc.debugLabel = "inlineEditingItemIndexAtom";
@@ -2584,9 +2584,9 @@ const En = () => {
2584
2584
  };
2585
2585
  }, yc = P("outline");
2586
2586
  yc.debugLabel = "sidebarActivePanelAtom";
2587
- const ki = () => D(yc), _m = ({ blockId: t, className: e }) => /* @__PURE__ */ a(op, { className: e, onClick: () => {
2587
+ const ki = () => D(yc), Am = ({ blockId: t, className: e }) => /* @__PURE__ */ a(op, { className: e, onClick: () => {
2588
2588
  t && ge.publish(se.GOTO_BLOCK_SETTINGS, t);
2589
- } }), Am = P(0), xc = P(0);
2589
+ } }), Tm = P(0), xc = P(0);
2590
2590
  function Ci(t) {
2591
2591
  if (t.getAttribute("data-block-id") === "canvas")
2592
2592
  return null;
@@ -2595,25 +2595,25 @@ function Ci(t) {
2595
2595
  const e = t.closest("[data-block-id]");
2596
2596
  return (e == null ? void 0 : e.getAttribute("data-block-id")) === "canvas" ? null : e;
2597
2597
  }
2598
- const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t) => {
2598
+ const Bm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Im = (t) => {
2599
2599
  var e;
2600
2600
  return (t == null ? void 0 : t.getAttribute("data-block-type")) === "RichText" || ((e = t == null ? void 0 : t.parentElement) == null ? void 0 : e.getAttribute("data-block-type")) === "RichText";
2601
2601
  }, wc = (t) => t ? ju(t.children, (e) => {
2602
2602
  const n = e;
2603
2603
  return n.hasAttribute("data-block-id") || wc(n);
2604
- }) : !1, Im = (t, e) => {
2605
- if (Bm(t))
2604
+ }) : !1, Rm = (t, e) => {
2605
+ if (Im(t))
2606
2606
  return !0;
2607
2607
  const n = t == null ? void 0 : t.getAttribute("data-block-type");
2608
- return n ? Tm.includes(n) : !1;
2609
- }, Rm = () => {
2608
+ return n ? Bm.includes(n) : !1;
2609
+ }, Lm = () => {
2610
2610
  const { editingBlockId: t, setEditingBlockId: e, setEditingItemIndex: n } = En();
2611
2611
  return I(
2612
2612
  (r) => {
2613
2613
  var l;
2614
2614
  if (r == null || r.preventDefault(), r == null || r.stopPropagation(), t) return;
2615
2615
  const o = Ci(r.target);
2616
- if (!o || !Im(o) || wc(o)) return;
2616
+ if (!o || !Rm(o) || wc(o)) return;
2617
2617
  const s = o.getAttribute("data-block-id");
2618
2618
  if (!s) return;
2619
2619
  const i = o.closest('[data-block-type="Repeater"]');
@@ -2623,7 +2623,7 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2623
2623
  },
2624
2624
  [t, e, n]
2625
2625
  );
2626
- }, Lm = () => {
2626
+ }, Pm = () => {
2627
2627
  const { editingBlockId: t } = En(), { clearHighlight: e } = _t(), [, n] = ze(), [r] = D(xc);
2628
2628
  return I(
2629
2629
  (o) => {
@@ -2651,7 +2651,7 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2651
2651
  },
2652
2652
  [t, r, e, n]
2653
2653
  );
2654
- }, Pm = () => {
2654
+ }, Om = () => {
2655
2655
  const { editingBlockId: t } = En(), { highlightBlock: e } = _t();
2656
2656
  return hn(
2657
2657
  (n) => {
@@ -2662,11 +2662,11 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2662
2662
  [t, e],
2663
2663
  100
2664
2664
  );
2665
- }, Om = () => {
2665
+ }, Dm = () => {
2666
2666
  const { clearHighlight: t } = _t();
2667
2667
  return I(() => t(), [t]);
2668
- }, Dm = ({ children: t }) => {
2669
- const e = Rm(), n = Lm(), r = Pm(), o = Om();
2668
+ }, Mm = ({ children: t }) => {
2669
+ const e = Lm(), n = Pm(), r = Om(), o = Dm();
2670
2670
  return /* @__PURE__ */ a(
2671
2671
  "div",
2672
2672
  {
@@ -2680,7 +2680,7 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2680
2680
  children: t
2681
2681
  }
2682
2682
  );
2683
- }, vc = (t, e) => t.querySelector(`[data-block-id="${e}"]`), Mm = (t, e) => t.querySelector(`[data-style-id="${e}"]`), $m = () => {
2683
+ }, vc = (t, e) => t.querySelector(`[data-block-id="${e}"]`), $m = (t, e) => t.querySelector(`[data-style-id="${e}"]`), Fm = () => {
2684
2684
  const t = ae(), { document: e } = At(), [n] = ze(), [r, o] = $([]), [, s] = $([]), { onDragStart: i, onDragEnd: l, isDragging: c } = Xn(), [d, u] = $(null), p = yt(), h = (f, m = 0) => {
2685
2685
  const { top: g } = f.getBoundingClientRect();
2686
2686
  return g + m >= 0 && g - m <= window.innerHeight;
@@ -2693,7 +2693,7 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2693
2693
  }
2694
2694
  }, [t == null ? void 0 : t._id, t == null ? void 0 : t.type, e]), z(() => {
2695
2695
  if (!F(n) && e) {
2696
- const f = Mm(e, ve(n).id);
2696
+ const f = $m(e, ve(n).id);
2697
2697
  s(f ? [f] : [null]);
2698
2698
  } else
2699
2699
  s([null]);
@@ -2708,7 +2708,7 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2708
2708
  u(r == null ? void 0 : r[0]), i(f, t, !1);
2709
2709
  },
2710
2710
  children: t && /* @__PURE__ */ a(
2711
- Fm,
2711
+ zm,
2712
2712
  {
2713
2713
  block: t,
2714
2714
  isDragging: c && !!d,
@@ -2717,8 +2717,8 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2717
2717
  )
2718
2718
  }
2719
2719
  );
2720
- }, Fm = ({ block: t, isDragging: e, selectedBlockElement: n }) => {
2721
- const r = hi(), o = vi(), [, s] = oe(), [, i] = mc(), [, l] = ze(), { hasPermission: c } = ft(), { editingBlockId: d } = En(), { document: u } = At(), p = yt(), h = G("flags.gotoSettings", !1), f = G("flags.ai", !1), { floatingStyles: m, refs: g, update: y } = zf({
2720
+ }, zm = ({ block: t, isDragging: e, selectedBlockElement: n }) => {
2721
+ const r = hi(), o = vi(), [, s] = oe(), [, i] = mc(), [, l] = ze(), { hasPermission: c } = pt(), { editingBlockId: d } = En(), { document: u } = At(), p = yt(), h = G("flags.gotoSettings", !1), f = G("flags.ai", !1), { floatingStyles: m, refs: g, update: y } = zf({
2722
2722
  placement: "top-start",
2723
2723
  middleware: [
2724
2724
  Hf({
@@ -2796,7 +2796,7 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2796
2796
  }
2797
2797
  ),
2798
2798
  h && /* @__PURE__ */ a(
2799
- _m,
2799
+ Am,
2800
2800
  {
2801
2801
  blockId: t == null ? void 0 : t._id,
2802
2802
  className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500"
@@ -2817,12 +2817,12 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2817
2817
  onClick: () => r([t == null ? void 0 : t._id])
2818
2818
  }
2819
2819
  ) : null,
2820
- c(fe.MOVE_BLOCK) && /* @__PURE__ */ a(Sm, { block: t, updateFloatingBar: y })
2820
+ c(fe.MOVE_BLOCK) && /* @__PURE__ */ a(Em, { block: t, updateFloatingBar: y })
2821
2821
  ] })
2822
2822
  ] })
2823
2823
  }
2824
2824
  ) });
2825
- }, zm = `<!doctype html>
2825
+ }, Hm = `<!doctype html>
2826
2826
  <html lang="en" dir="__HTML_DIR__" class="scroll-smooth h-full overflow-y-auto">
2827
2827
  <head>
2828
2828
  <meta charset="UTF-8">
@@ -2947,7 +2947,7 @@ const Tm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], Bm = (t)
2947
2947
  <div class="frame-root h-full"></div>
2948
2948
  </body>
2949
2949
  </html>`;
2950
- class Hm extends Nl {
2950
+ class Vm extends Nl {
2951
2951
  componentDidMount() {
2952
2952
  this.props.contentDidMount();
2953
2953
  }
@@ -2995,7 +2995,7 @@ class kc extends Nl {
2995
2995
  const n = this.getDoc();
2996
2996
  if (!n)
2997
2997
  return null;
2998
- const r = this.props.contentDidMount, o = this.props.contentDidUpdate, s = n.defaultView || n.parentView, i = /* @__PURE__ */ a(Hm, { contentDidMount: r, contentDidUpdate: o, children: /* @__PURE__ */ a(vm, { value: { document: n, window: s }, children: /* @__PURE__ */ a("div", { className: "frame-content", children: this.props.children }) }) }), l = this.getMountTarget();
2998
+ const r = this.props.contentDidMount, o = this.props.contentDidUpdate, s = n.defaultView || n.parentView, i = /* @__PURE__ */ a(Vm, { contentDidMount: r, contentDidUpdate: o, children: /* @__PURE__ */ a(km, { value: { document: n, window: s }, children: /* @__PURE__ */ a("div", { className: "frame-content", children: this.props.children }) }) }), l = this.getMountTarget();
2999
2999
  return [ca.createPortal(this.props.head, this.getDoc().head), ca.createPortal(i, l)];
3000
3000
  }
3001
3001
  render() {
@@ -3019,7 +3019,7 @@ Xt(kc, "defaultProps", {
3019
3019
  },
3020
3020
  initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
3021
3021
  });
3022
- const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e })), Cc = P([]), Do = () => {
3022
+ const jm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e })), Cc = P([]), Do = () => {
3023
3023
  const [t, e] = D(Cc), n = vt(Nc), r = I(
3024
3024
  (o) => {
3025
3025
  e(o), n([]);
@@ -3068,7 +3068,7 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3068
3068
  [n, r, t]
3069
3069
  );
3070
3070
  return [e, l, i];
3071
- }, rs = () => navigator.userAgent.toLowerCase().includes("firefox"), jm = () => {
3071
+ }, rs = () => navigator.userAgent.toLowerCase().includes("firefox"), Wm = () => {
3072
3072
  const [t] = le();
3073
3073
  return (e, n) => {
3074
3074
  var s;
@@ -3076,9 +3076,9 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3076
3076
  var l;
3077
3077
  return (l = te(t, { _id: i })) == null ? void 0 : l._type;
3078
3078
  }));
3079
- return bt(r, o);
3079
+ return gt(r, o);
3080
3080
  };
3081
- }, Wm = () => {
3081
+ }, Gm = () => {
3082
3082
  const t = Ge($e), { moveBlocks: e } = Fe();
3083
3083
  return I(
3084
3084
  (n, r) => {
@@ -3094,7 +3094,7 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3094
3094
  [e, t]
3095
3095
  );
3096
3096
  }, Ni = () => {
3097
- const [t, e] = Do(), n = Wm(), { addPredefinedBlock: r } = Sn(), o = jm();
3097
+ const [t, e] = Do(), n = Gm(), { addPredefinedBlock: r } = Sn(), o = Wm();
3098
3098
  return {
3099
3099
  canPaste: I(
3100
3100
  async (i) => {
@@ -3165,14 +3165,14 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3165
3165
  xt(
3166
3166
  "ctrl+z,meta+z",
3167
3167
  (f) => {
3168
- f.preventDefault(), mt.hasUndo() && i();
3168
+ f.preventDefault(), ht.hasUndo() && i();
3169
3169
  },
3170
3170
  { ...h, preventDefault: !0 },
3171
3171
  [i]
3172
3172
  ), xt(
3173
3173
  "ctrl+y,meta+y",
3174
3174
  (f) => {
3175
- f.preventDefault(), mt.hasRedo() && l();
3175
+ f.preventDefault(), ht.hasRedo() && l();
3176
3176
  },
3177
3177
  { ...h, preventDefault: !0 },
3178
3178
  [l]
@@ -3212,11 +3212,11 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3212
3212
  h,
3213
3213
  [e, o]
3214
3214
  );
3215
- }, Gm = () => {
3215
+ }, Um = () => {
3216
3216
  const { document: t } = At();
3217
3217
  return Ec(t), null;
3218
- }, Um = () => {
3219
- const { t } = K(), { hasPermission: e } = ft(), n = e(fe.ADD_BLOCK), r = yt();
3218
+ }, Km = () => {
3219
+ const { t } = K(), { hasPermission: e } = pt(), n = e(fe.ADD_BLOCK), r = yt();
3220
3220
  return n ? /* @__PURE__ */ b("div", { id: "add-block-bottom", className: "group relative w-full cursor-pointer py-2", children: [
3221
3221
  /* @__PURE__ */ a("br", {}),
3222
3222
  !r && /* @__PURE__ */ a(
@@ -3240,10 +3240,10 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3240
3240
  }, _c = ({ theme: t }) => {
3241
3241
  const e = M(() => gf({ theme: t }), [t]);
3242
3242
  return /* @__PURE__ */ a("style", { id: "chai-theme", dangerouslySetInnerHTML: { __html: e } });
3243
- }, Ac = tt("darkMode", !1), Ir = () => {
3243
+ }, Ac = bt("darkMode", !1), Ir = () => {
3244
3244
  const [t, e] = D(Ac);
3245
3245
  return [t, e];
3246
- }, Km = (t = Bl) => {
3246
+ }, Jm = (t = Bl) => {
3247
3247
  const e = qs;
3248
3248
  return t.fontFamily && (e.fontFamily = Object.entries(t.fontFamily).reduce(
3249
3249
  (n, [r, o]) => ({
@@ -3254,8 +3254,8 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3254
3254
  )), e.borderRadius = t.borderRadius, t.colors && (e.colors = t.colors.reduce((n, r) => (Object.entries(r.items).forEach(([o, s]) => {
3255
3255
  o in n && (n[o] = s);
3256
3256
  }), n), e.colors)), e;
3257
- }, Jm = P({}), Mo = () => {
3258
- const t = Rr(), e = M(() => Km(t), [t]), n = G("theme", {}), [r, o] = D(Jm);
3257
+ }, Ym = P({}), Mo = () => {
3258
+ const t = Rr(), e = M(() => Jm(t), [t]), n = G("theme", {}), [r, o] = D(Ym);
3259
3259
  return [M(
3260
3260
  () => ({ ...e, ...!F(n) && n, ...!F(r) && r }),
3261
3261
  [e, n, r]
@@ -3263,7 +3263,7 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3263
3263
  }, Rr = () => {
3264
3264
  const t = G("themeOptions", (n) => n);
3265
3265
  return M(() => t(Bl), [t]);
3266
- }, Ym = P("block"), Xm = () => D(Ym), qm = P("settings"), Tc = () => D(qm), Zm = () => {
3266
+ }, Xm = P("block"), qm = () => D(Xm), Zm = P("settings"), Tc = () => D(Zm), Qm = () => {
3267
3267
  const [t] = Mo(), e = Rr(), [n] = Ir(), { document: r, window: o } = At();
3268
3268
  return z(() => {
3269
3269
  n ? r == null || r.documentElement.classList.add("dark") : r == null || r.documentElement.classList.remove("dark");
@@ -3303,21 +3303,21 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3303
3303
  });
3304
3304
  }, [t, e, o]), /* @__PURE__ */ b(Z, { children: [
3305
3305
  /* @__PURE__ */ a(_c, { theme: t }),
3306
+ /* @__PURE__ */ a(ng, {}),
3306
3307
  /* @__PURE__ */ a(tg, {}),
3307
- /* @__PURE__ */ a(eg, {}),
3308
- /* @__PURE__ */ a(Qm, {})
3308
+ /* @__PURE__ */ a(eg, {})
3309
3309
  ] });
3310
- }, Qm = () => {
3310
+ }, eg = () => {
3311
3311
  const [t] = ze(), [e] = oe(), n = M(() => `${A(t, ({ id: r }) => `[data-style-id="${r}"]`).join(",")}{
3312
3312
  outline: 1px solid ${e.length > 0 ? "#42a1fc" : "#de8f09"} !important; outline-offset: -1px;
3313
3313
  }`, [t, e]);
3314
3314
  return /* @__PURE__ */ a("style", { id: "selected-styling-blocks", dangerouslySetInnerHTML: { __html: n } });
3315
- }, eg = () => {
3315
+ }, tg = () => {
3316
3316
  const [t] = oe(), e = M(() => `${A(t, (n) => `[data-block-id="${n}"]`).join(",")}{
3317
3317
  outline: 1px solid #42a1fc !important; outline-offset: -1px;
3318
3318
  }`, [t]);
3319
3319
  return /* @__PURE__ */ a("style", { id: "selected-blocks", dangerouslySetInnerHTML: { __html: e } });
3320
- }, tg = () => {
3320
+ }, ng = () => {
3321
3321
  const [t] = Mo(), e = Zs(), n = M(() => {
3322
3322
  const { heading: s, body: i } = {
3323
3323
  heading: _(t, "fontFamily.heading"),
@@ -3335,7 +3335,7 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3335
3335
  r.map((s, i) => /* @__PURE__ */ a("link", { rel: "stylesheet", href: s }, `google-font-${i}`)),
3336
3336
  /* @__PURE__ */ a("style", { id: "chai-custom-fonts", dangerouslySetInnerHTML: { __html: o } })
3337
3337
  ] });
3338
- }, ng = ({ children: t, onMount: e, onResize: n }) => {
3338
+ }, rg = ({ children: t, onMount: e, onResize: n }) => {
3339
3339
  const [, r] = oe(), [, o] = ze(), s = re(null), i = St(
3340
3340
  () => {
3341
3341
  const { clientWidth: c } = s.current;
@@ -3361,8 +3361,8 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3361
3361
  children: t
3362
3362
  }
3363
3363
  );
3364
- }, rg = () => {
3365
- const [, t] = oe(), { onDragStart: e, onDragEnd: n } = Xn(), [r] = le(), o = re(null), [s, i] = D(Am), [l, c] = D(xc), d = I(
3364
+ }, og = () => {
3365
+ const [, t] = oe(), { onDragStart: e, onDragEnd: n } = Xn(), [r] = le(), o = re(null), [s, i] = D(Tm), [l, c] = D(xc), d = I(
3366
3366
  (h) => {
3367
3367
  var x;
3368
3368
  if (h.button !== 0) return;
@@ -3391,7 +3391,7 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3391
3391
  onDragStart: u,
3392
3392
  onDragEnd: p
3393
3393
  };
3394
- }, og = () => {
3394
+ }, sg = () => {
3395
3395
  const [t] = le();
3396
3396
  return I(
3397
3397
  (e, n) => F(n) ? {} : Object.entries(n).reduce(
@@ -3407,20 +3407,16 @@ const Vm = ee.forwardRef((t, e) => /* @__PURE__ */ a(kc, { ...t, forwardedRef: e
3407
3407
  ),
3408
3408
  [t]
3409
3409
  );
3410
- }, sg = P("edit"), Bc = () => {
3411
- const [t, e] = D(sg);
3410
+ }, ig = P("edit"), Bc = () => {
3411
+ const [t, e] = D(ig);
3412
3412
  return { mode: t, setMode: e };
3413
- }, ig = ({ children: t, block: e }) => {
3413
+ }, ag = ({ children: t, block: e }) => {
3414
3414
  const n = M(() => Le(e._type), [e._type]), r = _(n, "dataProviderDependencies"), o = _(n, "dataProvider"), s = _(n, "dataProviderMode", "mock"), i = ih(e, s, r, o);
3415
3415
  return t(i);
3416
- }, ag = () => /* @__PURE__ */ a("div", { className: "flex min-h-[100px] items-center justify-center bg-red-50 p-2 text-center text-red-500", children: "Something went wrong." });
3416
+ }, lg = () => /* @__PURE__ */ a("div", { className: "flex min-h-[100px] items-center justify-center bg-red-50 p-2 text-center text-red-500", children: "Something went wrong." });
3417
3417
  function Te(...t) {
3418
3418
  return Tl(mf(t));
3419
3419
  }
3420
- tt("chai-builder-blocks", []);
3421
- const lg = tt("chai-builder-theme", qs);
3422
- tt("chai-builder-design-tokens", {});
3423
- tt("chai-builder-ai-context", "");
3424
3420
  const Es = ({
3425
3421
  editor: t,
3426
3422
  trigger: e,
@@ -3543,7 +3539,7 @@ const Es = ({
3543
3539
  onRemoveHighlightColor: s,
3544
3540
  onClose: i
3545
3541
  }) => {
3546
- const [l] = Ir(), [c] = D(lg), d = (c == null ? void 0 : c.colors) || {}, u = Object.values(d).map((f) => _(f, l ? "1" : "0")), [p, h] = $("TEXT");
3542
+ const [l] = Ir(), [c] = D(Zh), d = (c == null ? void 0 : c.colors) || {}, u = Object.values(d).map((f) => _(f, l ? "1" : "0")), [p, h] = $("TEXT");
3547
3543
  return /* @__PURE__ */ b("div", { id: "rte-widget-color-picker", className: "px-1", children: [
3548
3544
  /* @__PURE__ */ b("div", { className: "mb-2 flex items-center justify-between rounded-md border bg-muted", children: [
3549
3545
  /* @__PURE__ */ a(
@@ -6558,15 +6554,15 @@ class Sa {
6558
6554
  return (this.delInfo & Xr) > 0;
6559
6555
  }
6560
6556
  }
6561
- class ct {
6557
+ class lt {
6562
6558
  /**
6563
6559
  Create a position map. The modifications to the document are
6564
6560
  represented as an array of numbers, in which each group of three
6565
6561
  represents a modified chunk as `[start, oldSize, newSize]`.
6566
6562
  */
6567
6563
  constructor(e, n = !1) {
6568
- if (this.ranges = e, this.inverted = n, !e.length && ct.empty)
6569
- return ct.empty;
6564
+ if (this.ranges = e, this.inverted = n, !e.length && lt.empty)
6565
+ return lt.empty;
6570
6566
  }
6571
6567
  /**
6572
6568
  @internal
@@ -6637,7 +6633,7 @@ class ct {
6637
6633
  map positions in the post-step document to the pre-step document.
6638
6634
  */
6639
6635
  invert() {
6640
- return new ct(this.ranges, !this.inverted);
6636
+ return new lt(this.ranges, !this.inverted);
6641
6637
  }
6642
6638
  /**
6643
6639
  @internal
@@ -6651,10 +6647,10 @@ class ct {
6651
6647
  sub-document to a larger document, or vice-versa.
6652
6648
  */
6653
6649
  static offset(e) {
6654
- return e == 0 ? ct.empty : new ct(e < 0 ? [0, -e, 0] : [0, 0, e]);
6650
+ return e == 0 ? lt.empty : new lt(e < 0 ? [0, -e, 0] : [0, 0, e]);
6655
6651
  }
6656
6652
  }
6657
- ct.empty = new ct([]);
6653
+ lt.empty = new lt([]);
6658
6654
  const is = /* @__PURE__ */ Object.create(null);
6659
6655
  class je {
6660
6656
  /**
@@ -6663,7 +6659,7 @@ class je {
6663
6659
  and the new document.
6664
6660
  */
6665
6661
  getMap() {
6666
- return ct.empty;
6662
+ return lt.empty;
6667
6663
  }
6668
6664
  /**
6669
6665
  Try to merge this step with another one, to be applied directly
@@ -6896,7 +6892,7 @@ class xr extends je {
6896
6892
  }
6897
6893
  }
6898
6894
  je.jsonID("removeNodeMark", xr);
6899
- class at extends je {
6895
+ class st extends je {
6900
6896
  /**
6901
6897
  The given `slice` should fit the 'gap' between `from` and
6902
6898
  `to`—the depths must line up, and the surrounding nodes must be
@@ -6913,24 +6909,24 @@ class at extends je {
6913
6909
  return this.structure && Bs(e, this.from, this.to) ? Re.fail("Structure replace would overwrite content") : Re.fromReplace(e, this.from, this.to, this.slice);
6914
6910
  }
6915
6911
  getMap() {
6916
- return new ct([this.from, this.to - this.from, this.slice.size]);
6912
+ return new lt([this.from, this.to - this.from, this.slice.size]);
6917
6913
  }
6918
6914
  invert(e) {
6919
- return new at(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
6915
+ return new st(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
6920
6916
  }
6921
6917
  map(e) {
6922
6918
  let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
6923
- return n.deletedAcross && r.deletedAcross ? null : new at(n.pos, Math.max(n.pos, r.pos), this.slice, this.structure);
6919
+ return n.deletedAcross && r.deletedAcross ? null : new st(n.pos, Math.max(n.pos, r.pos), this.slice, this.structure);
6924
6920
  }
6925
6921
  merge(e) {
6926
- if (!(e instanceof at) || e.structure || this.structure)
6922
+ if (!(e instanceof st) || e.structure || this.structure)
6927
6923
  return null;
6928
6924
  if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
6929
6925
  let n = this.slice.size + e.slice.size == 0 ? X.empty : new X(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
6930
- return new at(this.from, this.to + (e.to - e.from), n, this.structure);
6926
+ return new st(this.from, this.to + (e.to - e.from), n, this.structure);
6931
6927
  } else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
6932
6928
  let n = this.slice.size + e.slice.size == 0 ? X.empty : new X(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
6933
- return new at(e.from, this.to, n, this.structure);
6929
+ return new st(e.from, this.to, n, this.structure);
6934
6930
  } else
6935
6931
  return null;
6936
6932
  }
@@ -6944,10 +6940,10 @@ class at extends je {
6944
6940
  static fromJSON(e, n) {
6945
6941
  if (typeof n.from != "number" || typeof n.to != "number")
6946
6942
  throw new RangeError("Invalid input for ReplaceStep.fromJSON");
6947
- return new at(n.from, n.to, X.fromJSON(e, n.slice), !!n.structure);
6943
+ return new st(n.from, n.to, X.fromJSON(e, n.slice), !!n.structure);
6948
6944
  }
6949
6945
  }
6950
- je.jsonID("replace", at);
6946
+ je.jsonID("replace", st);
6951
6947
  class et extends je {
6952
6948
  /**
6953
6949
  Create a replace-around step with the given range and gap.
@@ -6968,7 +6964,7 @@ class et extends je {
6968
6964
  return r ? Re.fromReplace(e, this.from, this.to, r) : Re.fail("Content does not fit in gap");
6969
6965
  }
6970
6966
  getMap() {
6971
- return new ct([
6967
+ return new lt([
6972
6968
  this.from,
6973
6969
  this.gapFrom - this.from,
6974
6970
  this.insert,
@@ -7107,7 +7103,7 @@ function _i(t, e, n = e, r = X.empty) {
7107
7103
  if (e == n && !r.size)
7108
7104
  return null;
7109
7105
  let o = t.resolve(e), s = t.resolve(n);
7110
- return zg(o, s, r) ? new at(e, n, r) : new Hg(o, s, r).fit();
7106
+ return zg(o, s, r) ? new st(e, n, r) : new Hg(o, s, r).fit();
7111
7107
  }
7112
7108
  function zg(t, e, n) {
7113
7109
  return !n.openStart && !n.openEnd && t.start() == e.start() && t.parent.canReplace(t.index(), e.index(), n.content);
@@ -7140,7 +7136,7 @@ class Hg {
7140
7136
  for (; i && l && s.childCount == 1; )
7141
7137
  s = s.firstChild.content, i--, l--;
7142
7138
  let c = new X(s, i, l);
7143
- return e > -1 ? new et(r.pos, e, this.$to.pos, this.$to.end(), c, n) : c.size || r.pos != this.$to.pos ? new at(r.pos, o.pos, c) : null;
7139
+ return e > -1 ? new et(r.pos, e, this.$to.pos, this.$to.end(), c, n) : c.size || r.pos != this.$to.pos ? new st(r.pos, o.pos, c) : null;
7144
7140
  }
7145
7141
  // Find a position on the start spine of `this.unplaced` that has
7146
7142
  // content that can be moved somewhere on the frontier. Returns two
@@ -7308,7 +7304,7 @@ class pr extends je {
7308
7304
  return Re.fromReplace(e, this.pos, this.pos + 1, new X(H.from(o), 0, n.isLeaf ? 0 : 1));
7309
7305
  }
7310
7306
  getMap() {
7311
- return ct.empty;
7307
+ return lt.empty;
7312
7308
  }
7313
7309
  invert(e) {
7314
7310
  return new pr(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
@@ -7343,7 +7339,7 @@ class mo extends je {
7343
7339
  return Re.ok(r);
7344
7340
  }
7345
7341
  getMap() {
7346
- return ct.empty;
7342
+ return lt.empty;
7347
7343
  }
7348
7344
  invert(e) {
7349
7345
  return new mo(this.attr, e.attrs[this.attr]);
@@ -7481,7 +7477,7 @@ class ie {
7481
7477
  negative, it will search backwards first.
7482
7478
  */
7483
7479
  static near(e, n = 1) {
7484
- return this.findFrom(e, n) || this.findFrom(e, -n) || new ut(e.node(0));
7480
+ return this.findFrom(e, n) || this.findFrom(e, -n) || new dt(e.node(0));
7485
7481
  }
7486
7482
  /**
7487
7483
  Find the cursor or leaf node selection closest to the start of
@@ -7490,14 +7486,14 @@ class ie {
7490
7486
  exists.
7491
7487
  */
7492
7488
  static atStart(e) {
7493
- return Pn(e, e, 0, 0, 1) || new ut(e);
7489
+ return Pn(e, e, 0, 0, 1) || new dt(e);
7494
7490
  }
7495
7491
  /**
7496
7492
  Find the cursor or leaf node selection closest to the end of the
7497
7493
  given document.
7498
7494
  */
7499
7495
  static atEnd(e) {
7500
- return Pn(e, e, e.content.size, e.childCount, -1) || new ut(e);
7496
+ return Pn(e, e, e.content.size, e.childCount, -1) || new dt(e);
7501
7497
  }
7502
7498
  /**
7503
7499
  Deserialize the JSON representation of a selection. Must be
@@ -7693,7 +7689,7 @@ class Ai {
7693
7689
  return r && ue.isSelectable(r) ? new ue(n) : ie.near(n);
7694
7690
  }
7695
7691
  }
7696
- class ut extends ie {
7692
+ class dt extends ie {
7697
7693
  /**
7698
7694
  Create an all-selection over the given document.
7699
7695
  */
@@ -7715,25 +7711,25 @@ class ut extends ie {
7715
7711
  @internal
7716
7712
  */
7717
7713
  static fromJSON(e) {
7718
- return new ut(e);
7714
+ return new dt(e);
7719
7715
  }
7720
7716
  map(e) {
7721
- return new ut(e);
7717
+ return new dt(e);
7722
7718
  }
7723
7719
  eq(e) {
7724
- return e instanceof ut;
7720
+ return e instanceof dt;
7725
7721
  }
7726
7722
  getBookmark() {
7727
7723
  return Wg;
7728
7724
  }
7729
7725
  }
7730
- ie.jsonID("all", ut);
7726
+ ie.jsonID("all", dt);
7731
7727
  const Wg = {
7732
7728
  map() {
7733
7729
  return this;
7734
7730
  },
7735
7731
  resolve(t) {
7736
- return new ut(t);
7732
+ return new dt(t);
7737
7733
  }
7738
7734
  };
7739
7735
  function Pn(t, e, n, r, o, s = !1) {
@@ -7758,7 +7754,7 @@ function Ta(t, e, n) {
7758
7754
  if (r < e)
7759
7755
  return;
7760
7756
  let o = t.steps[r];
7761
- if (!(o instanceof at || o instanceof et))
7757
+ if (!(o instanceof st || o instanceof et))
7762
7758
  return;
7763
7759
  let s = t.mapping.maps[r], i;
7764
7760
  s.forEach((l, c, d, u) => {
@@ -7912,7 +7908,7 @@ function id(t, e, n) {
7912
7908
  l = u;
7913
7909
  }
7914
7910
  let d = _i(t.doc, s, c, X.empty);
7915
- if (!d || d.from != s || d instanceof at && d.slice.size >= c - s)
7911
+ if (!d || d.from != s || d instanceof st && d.slice.size >= c - s)
7916
7912
  return !1;
7917
7913
  if (n) {
7918
7914
  let u = t.tr.step(d);
@@ -8051,7 +8047,7 @@ const Xg = (t, e) => {
8051
8047
  return !0;
8052
8048
  }, pd = (t, e) => {
8053
8049
  let n = t.selection, { $from: r, $to: o } = n;
8054
- if (n instanceof ut || r.parent.inlineContent || o.parent.inlineContent)
8050
+ if (n instanceof dt || r.parent.inlineContent || o.parent.inlineContent)
8055
8051
  return !1;
8056
8052
  let s = Ri(o.parent.contentMatchAt(o.indexAfter()));
8057
8053
  if (!s || !s.isTextblock)
@@ -8091,7 +8087,7 @@ function qg(t) {
8091
8087
  s.unshift(null);
8092
8088
  }
8093
8089
  let u = e.tr;
8094
- (e.selection instanceof be || e.selection instanceof ut) && u.deleteSelection();
8090
+ (e.selection instanceof be || e.selection instanceof dt) && u.deleteSelection();
8095
8091
  let p = u.mapping.map(r.pos), h = Dt(u.doc, p, s.length, s);
8096
8092
  if (h || (s[0] = l ? { type: l } : null, h = Dt(u.doc, p, s.length, s)), !h)
8097
8093
  return !1;
@@ -8417,7 +8413,7 @@ function bd(t, e) {
8417
8413
  jr(e[r]) && jr(t[r]) ? n[r] = bd(t[r], e[r]) : n[r] = e[r];
8418
8414
  }), n;
8419
8415
  }
8420
- class pt {
8416
+ class ut {
8421
8417
  constructor(e = {}) {
8422
8418
  this.type = "extension", this.name = "extension", this.parent = null, this.child = null, this.config = {
8423
8419
  name: this.name,
@@ -8433,7 +8429,7 @@ class pt {
8433
8429
  })) || {};
8434
8430
  }
8435
8431
  static create(e = {}) {
8436
- return new pt(e);
8432
+ return new ut(e);
8437
8433
  }
8438
8434
  configure(e = {}) {
8439
8435
  const n = this.extend({
@@ -8443,7 +8439,7 @@ class pt {
8443
8439
  return n.name = this.name, n.parent = this.parent, n;
8444
8440
  }
8445
8441
  extend(e = {}) {
8446
- const n = new pt({ ...this.config, ...e });
8442
+ const n = new ut({ ...this.config, ...e });
8447
8443
  return n.parent = this, this.child = n, n.name = e.name ? e.name : n.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = ar(rn(n, "addOptions", {
8448
8444
  name: n.name
8449
8445
  })), n.storage = ar(rn(n, "addStorage", {
@@ -8475,7 +8471,7 @@ function gb(t, e, n) {
8475
8471
  function bb(t) {
8476
8472
  return Object.fromEntries(Object.entries(t.nodes).filter(([, e]) => e.spec.toText).map(([e, n]) => [e, n.spec.toText]));
8477
8473
  }
8478
- pt.create({
8474
+ ut.create({
8479
8475
  name: "clipboardTextSerializer",
8480
8476
  addOptions() {
8481
8477
  return {
@@ -8721,7 +8717,7 @@ function Mb(t, e, n) {
8721
8717
  if (r < e)
8722
8718
  return;
8723
8719
  const o = t.steps[r];
8724
- if (!(o instanceof at || o instanceof et))
8720
+ if (!(o instanceof st || o instanceof et))
8725
8721
  return;
8726
8722
  const s = t.mapping.maps[r];
8727
8723
  let i = 0;
@@ -8890,7 +8886,7 @@ const ey = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
8890
8886
  }), !0) : !1;
8891
8887
  }, ty = () => ({ tr: t, dispatch: e }) => (e && t.scrollIntoView(), !0), ny = () => ({ tr: t, dispatch: e }) => {
8892
8888
  if (e) {
8893
- const n = new ut(t.doc);
8889
+ const n = new dt(t.doc);
8894
8890
  t.setSelection(n);
8895
8891
  }
8896
8892
  return !0;
@@ -9343,7 +9339,7 @@ var Ly = /* @__PURE__ */ Object.freeze({
9343
9339
  wrapIn: Iy,
9344
9340
  wrapInList: Ry
9345
9341
  });
9346
- pt.create({
9342
+ ut.create({
9347
9343
  name: "commands",
9348
9344
  addCommands() {
9349
9345
  return {
@@ -9351,7 +9347,7 @@ pt.create({
9351
9347
  };
9352
9348
  }
9353
9349
  });
9354
- pt.create({
9350
+ ut.create({
9355
9351
  name: "drop",
9356
9352
  addProseMirrorPlugins() {
9357
9353
  return [
@@ -9371,7 +9367,7 @@ pt.create({
9371
9367
  ];
9372
9368
  }
9373
9369
  });
9374
- pt.create({
9370
+ ut.create({
9375
9371
  name: "editable",
9376
9372
  addProseMirrorPlugins() {
9377
9373
  return [
@@ -9385,7 +9381,7 @@ pt.create({
9385
9381
  }
9386
9382
  });
9387
9383
  const Py = new Tn("focusEvents");
9388
- pt.create({
9384
+ ut.create({
9389
9385
  name: "focusEvents",
9390
9386
  addProseMirrorPlugins() {
9391
9387
  const { editor: t } = this;
@@ -9410,7 +9406,7 @@ pt.create({
9410
9406
  ];
9411
9407
  }
9412
9408
  });
9413
- pt.create({
9409
+ ut.create({
9414
9410
  name: "keymap",
9415
9411
  addKeyboardShortcuts() {
9416
9412
  const t = () => this.editor.commands.first(({ commands: i }) => [
@@ -9489,7 +9485,7 @@ pt.create({
9489
9485
  ];
9490
9486
  }
9491
9487
  });
9492
- pt.create({
9488
+ ut.create({
9493
9489
  name: "paste",
9494
9490
  addProseMirrorPlugins() {
9495
9491
  return [
@@ -9508,7 +9504,7 @@ pt.create({
9508
9504
  ];
9509
9505
  }
9510
9506
  });
9511
- pt.create({
9507
+ ut.create({
9512
9508
  name: "tabindex",
9513
9509
  addProseMirrorPlugins() {
9514
9510
  return [
@@ -9521,7 +9517,7 @@ pt.create({
9521
9517
  ];
9522
9518
  }
9523
9519
  });
9524
- const Oy = pt.create({
9520
+ const Oy = ut.create({
9525
9521
  name: "color",
9526
9522
  addOptions() {
9527
9523
  return {
@@ -9822,7 +9818,7 @@ const My = xn(
9822
9818
  blockAtom: e,
9823
9819
  children: n
9824
9820
  }) => {
9825
- const { editingBlockId: r, editingItemIndex: o } = En(), [s] = D(e), i = M(() => Le(s._type), [s._type]), { selectedLang: l, fallbackLang: c } = Ke(), d = og(), u = Jn(), [p] = D(ic), h = _(i, "component", null), { index: f, key: m } = wn(Ed), { mode: g } = Bc(), y = Ge(Er), x = yt(), v = g === "edit", E = rg(), S = M(
9821
+ const { editingBlockId: r, editingItemIndex: o } = En(), [s] = D(e), i = M(() => Le(s._type), [s._type]), { selectedLang: l, fallbackLang: c } = Ke(), d = sg(), u = Jn(), [p] = D(ic), h = _(i, "component", null), { index: f, key: m } = wn(Ed), { mode: g } = Bc(), y = Ge(Er), x = yt(), v = g === "edit", E = og(), S = M(
9826
9822
  () => p ? _l(ia(s, l, i), u, {
9827
9823
  index: f,
9828
9824
  key: m
@@ -9878,7 +9874,7 @@ const My = xn(
9878
9874
  })
9879
9875
  }) });
9880
9876
  const R = r === s._id && (o === f || f < 0) ? /* @__PURE__ */ a(Fy, { block: s, children: L }) : L;
9881
- return w ? /* @__PURE__ */ a(an, { fallbackRender: ag, children: R }) : R;
9877
+ return w ? /* @__PURE__ */ a(an, { fallbackRender: lg, children: R }) : R;
9882
9878
  }, Vy = ({ children: t, partialBlockId: e }) => {
9883
9879
  const n = G("gotoPage", kt), { saveState: r } = _r(), { selectedLang: o, fallbackLang: s } = Ke(), i = I(
9884
9880
  (l) => {
@@ -9925,7 +9921,7 @@ const My = xn(
9925
9921
  );
9926
9922
  return (r === "Heading" || r === "Paragraph" || r === "Link") && (s = Qp(s)), A(s, (l) => {
9927
9923
  const c = o(l._id);
9928
- return c ? /* @__PURE__ */ a(ig, { block: l, children: (d) => /* @__PURE__ */ a(Hy, { blockAtom: c, asyncProps: d, children: ({ _id: u, _type: p, partialBlockId: h, repeaterItems: f, $repeaterItemsKey: m }) => p === "Repeater" ? Cr(f) && f.map((g, y) => /* @__PURE__ */ a(Ed.Provider, { value: { index: y, key: m }, children: /* @__PURE__ */ a(bo, { splitAtoms: n, blocks: t, parent: l._id, type: p }) }, `${u}-${y}`)) : p === "GlobalBlock" || p === "PartialBlock" ? /* @__PURE__ */ a(Jp, { store: lt, children: /* @__PURE__ */ a(Wy, { partialBlockId: h }) }) : i(u) ? /* @__PURE__ */ a(bo, { splitAtoms: n, blocks: t, parent: l._id, type: p }) : null }) }, l._id) : null;
9924
+ return c ? /* @__PURE__ */ a(ag, { block: l, children: (d) => /* @__PURE__ */ a(Hy, { blockAtom: c, asyncProps: d, children: ({ _id: u, _type: p, partialBlockId: h, repeaterItems: f, $repeaterItemsKey: m }) => p === "Repeater" ? Cr(f) && f.map((g, y) => /* @__PURE__ */ a(Ed.Provider, { value: { index: y, key: m }, children: /* @__PURE__ */ a(bo, { splitAtoms: n, blocks: t, parent: l._id, type: p }) }, `${u}-${y}`)) : p === "GlobalBlock" || p === "PartialBlock" ? /* @__PURE__ */ a(Jp, { store: at, children: /* @__PURE__ */ a(Wy, { partialBlockId: h }) }) : i(u) ? /* @__PURE__ */ a(bo, { splitAtoms: n, blocks: t, parent: l._id, type: p }) : null }) }, l._id) : null;
9929
9925
  });
9930
9926
  }, Gy = () => {
9931
9927
  const [t] = le();
@@ -9933,7 +9929,7 @@ const My = xn(
9933
9929
  }, Uy = () => {
9934
9930
  const [t] = le(), [e] = D(gi), n = F(t) ? null : /* @__PURE__ */ a(Gy, {}, e);
9935
9931
  return /* @__PURE__ */ a(Z, { children: n });
9936
- }, Ky = tt("canvasZoom", 100), Jy = () => D(Ky), Yy = () => D(Ul), _d = tt("canvasWidth", 800), Xy = tt("canvasDisplayWidth", 800), Ad = P((t) => {
9932
+ }, Ky = bt("canvasZoom", 100), Jy = () => D(Ky), Yy = () => D(Ul), _d = bt("canvasWidth", 800), Xy = bt("canvasDisplayWidth", 800), Ad = P((t) => {
9937
9933
  const e = t(_d);
9938
9934
  return Sl(e).toLowerCase();
9939
9935
  }), yo = () => {
@@ -10005,7 +10001,7 @@ const Zy = () => {
10005
10001
  o(), t([]), n([]);
10006
10002
  }), null;
10007
10003
  }, Qy = () => {
10008
- const [t] = Mi(), [, e] = mc(), n = re(null), r = re(null), [o, s] = $({ width: 0, height: 0 }), i = qy(o), [, l] = Yn(), c = G("loading", !1), d = G("htmlDir", "ltr"), { onDragOver: u, onDrop: p, onDragEnd: h } = Xn(), f = wm(), m = I(
10004
+ const [t] = Mi(), [, e] = mc(), n = re(null), r = re(null), [o, s] = $({ width: 0, height: 0 }), i = qy(o), [, l] = Yn(), c = G("loading", !1), d = G("htmlDir", "ltr"), { onDragOver: u, onDrop: p, onDragEnd: h } = Xn(), f = vm(), m = I(
10009
10005
  (y) => {
10010
10006
  s((x) => ({ ...x, width: y }));
10011
10007
  },
@@ -10017,10 +10013,10 @@ const Zy = () => {
10017
10013
  s({ width: y, height: x });
10018
10014
  }, [r, t]);
10019
10015
  const g = M(() => {
10020
- let y = zm;
10016
+ let y = Hm;
10021
10017
  return y = y.replace("__HTML_DIR__", d), y;
10022
10018
  }, [d]);
10023
- return /* @__PURE__ */ a(ng, { onMount: m, onResize: m, children: /* @__PURE__ */ a(
10019
+ return /* @__PURE__ */ a(rg, { onMount: m, onResize: m, children: /* @__PURE__ */ a(
10024
10020
  "div",
10025
10021
  {
10026
10022
  onMouseLeave: () => setTimeout(() => e(""), 300),
@@ -10030,7 +10026,7 @@ const Zy = () => {
10030
10026
  onDragEnd: h,
10031
10027
  ref: r,
10032
10028
  children: /* @__PURE__ */ b(
10033
- Vm,
10029
+ jm,
10034
10030
  {
10035
10031
  contentDidMount: () => l(n.current),
10036
10032
  ref: n,
@@ -10039,13 +10035,13 @@ const Zy = () => {
10039
10035
  className: "relative mx-auto box-content h-full w-full max-w-full shadow-lg transition-all duration-300 ease-linear",
10040
10036
  initialContent: g,
10041
10037
  children: [
10042
- /* @__PURE__ */ a(Gm, {}),
10043
- /* @__PURE__ */ a($m, {}),
10044
- /* @__PURE__ */ a(Zm, {}),
10038
+ /* @__PURE__ */ a(Um, {}),
10039
+ /* @__PURE__ */ a(Fm, {}),
10040
+ /* @__PURE__ */ a(Qm, {}),
10045
10041
  /* @__PURE__ */ b(Vf, { children: [
10046
- /* @__PURE__ */ b(Dm, { children: [
10042
+ /* @__PURE__ */ b(Mm, { children: [
10047
10043
  c ? /* @__PURE__ */ a("div", { className: "h-full p-4", children: /* @__PURE__ */ a(Hn, { className: "h-full" }) }) : /* @__PURE__ */ a(Uy, {}),
10048
- /* @__PURE__ */ a(Um, {})
10044
+ /* @__PURE__ */ a(Km, {})
10049
10045
  ] }),
10050
10046
  /* @__PURE__ */ a(Zy, {})
10051
10047
  ] }),
@@ -10073,7 +10069,7 @@ const Zy = () => {
10073
10069
  /* @__PURE__ */ a("p", { className: "font-semibold", children: t("Oops! Something went wrong.") }),
10074
10070
  /* @__PURE__ */ a("p", { children: t("Please try again.") })
10075
10071
  ] }) });
10076
- }, ex = P(null), Td = () => D(ex), tx = ee.lazy(() => import("./code-editor-D-fpas30.js")), nx = () => {
10072
+ }, ex = P(null), Td = () => D(ex), tx = ee.lazy(() => import("./code-editor-Be5VT6om.js")), nx = () => {
10077
10073
  const [t] = Td(), e = G("onError", kt);
10078
10074
  return /* @__PURE__ */ a("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ b("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40", children: [
10079
10075
  /* @__PURE__ */ a(He, { fallback: /* @__PURE__ */ a(Hn, { className: "h-full" }), children: /* @__PURE__ */ a(an, { fallback: /* @__PURE__ */ a(fr, {}), onError: e, children: /* @__PURE__ */ a(Qy, {}) }) }),
@@ -10296,7 +10292,7 @@ const Zy = () => {
10296
10292
  /* @__PURE__ */ a("option", { value: "", children: "Select" }),
10297
10293
  d.map((u) => /* @__PURE__ */ a("option", { value: u.id, children: u.name }, u.id))
10298
10294
  ] }) });
10299
- }, sx = Eo(() => import("./IconPicker-BOBnjfJc.js").then((t) => ({ default: t.IconPicker }))), ix = (t) => {
10295
+ }, sx = Eo(() => import("./IconPicker-CvZSjXc6.js").then((t) => ({ default: t.IconPicker }))), ix = (t) => {
10300
10296
  try {
10301
10297
  let e = t.replace(/<svg([^>]*)\sheight="[^"]*"([^>]*)>/gi, "<svg$1$2>").replace(/<svg([^>]*)\swidth="[^"]*"([^>]*)>/gi, "<svg$1$2>");
10302
10298
  return e = e.replace(/>\s+</g, "><"), e = e.replace(/\n/g, "").replace(/\s{2,}/g, " "), e = e.replace(/\s+=/g, "=").replace(/=\s+/g, "="), e = e.replace(/<!--[\s\S]*?-->/g, ""), e.trim();
@@ -10527,7 +10523,7 @@ const Is = zn.Provider, Ce = zn.Root, Ne = zn.Trigger, we = W.forwardRef(({ clas
10527
10523
  ) }));
10528
10524
  we.displayName = zn.Content.displayName;
10529
10525
  const Id = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
10530
- nt,
10526
+ tt,
10531
10527
  {
10532
10528
  ref: n,
10533
10529
  className: j(
@@ -10537,11 +10533,11 @@ const Id = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
10537
10533
  ...e
10538
10534
  }
10539
10535
  ));
10540
- Id.displayName = nt.displayName;
10536
+ Id.displayName = tt.displayName;
10541
10537
  const Rd = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ b("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
10542
10538
  /* @__PURE__ */ a(Ws, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
10543
10539
  /* @__PURE__ */ a(
10544
- nt.Input,
10540
+ tt.Input,
10545
10541
  {
10546
10542
  ref: n,
10547
10543
  className: j(
@@ -10552,20 +10548,20 @@ const Rd = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ b("div",
10552
10548
  }
10553
10549
  )
10554
10550
  ] }));
10555
- Rd.displayName = nt.Input.displayName;
10551
+ Rd.displayName = tt.Input.displayName;
10556
10552
  const Ld = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
10557
- nt.List,
10553
+ tt.List,
10558
10554
  {
10559
10555
  ref: n,
10560
10556
  className: j("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
10561
10557
  ...e
10562
10558
  }
10563
10559
  ));
10564
- Ld.displayName = nt.List.displayName;
10565
- const Pd = W.forwardRef((t, e) => /* @__PURE__ */ a(nt.Empty, { ref: e, className: "py-6 text-center text-sm", ...t }));
10566
- Pd.displayName = nt.Empty.displayName;
10560
+ Ld.displayName = tt.List.displayName;
10561
+ const Pd = W.forwardRef((t, e) => /* @__PURE__ */ a(tt.Empty, { ref: e, className: "py-6 text-center text-sm", ...t }));
10562
+ Pd.displayName = tt.Empty.displayName;
10567
10563
  const Od = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
10568
- nt.Group,
10564
+ tt.Group,
10569
10565
  {
10570
10566
  ref: n,
10571
10567
  className: j(
@@ -10575,11 +10571,11 @@ const Od = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
10575
10571
  ...e
10576
10572
  }
10577
10573
  ));
10578
- Od.displayName = nt.Group.displayName;
10579
- const gx = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(nt.Separator, { ref: n, className: j("-mx-1 h-px bg-border", t), ...e }));
10580
- gx.displayName = nt.Separator.displayName;
10574
+ Od.displayName = tt.Group.displayName;
10575
+ const gx = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(tt.Separator, { ref: n, className: j("-mx-1 h-px bg-border", t), ...e }));
10576
+ gx.displayName = tt.Separator.displayName;
10581
10577
  const Rs = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
10582
- nt.Item,
10578
+ tt.Item,
10583
10579
  {
10584
10580
  ref: n,
10585
10581
  className: j(
@@ -10589,7 +10585,7 @@ const Rs = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
10589
10585
  ...e
10590
10586
  }
10591
10587
  ));
10592
- Rs.displayName = nt.Item.displayName;
10588
+ Rs.displayName = tt.Item.displayName;
10593
10589
  const Fi = gr.Root, zi = gr.Trigger, Vo = W.forwardRef(({ className: t, align: e = "center", sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ a(gr.Portal, { children: /* @__PURE__ */ a(
10594
10590
  gr.Content,
10595
10591
  {
@@ -11120,7 +11116,7 @@ const Hi = () => Ge($d), kx = () => {
11120
11116
  ]
11121
11117
  }
11122
11118
  ) });
11123
- }, Cx = ee.lazy(() => import("./rte-widget-modal-DmQk0Lfj.js")), Nx = ({ blockId: t, id: e, placeholder: n, value: r, onChange: o, onBlur: s }) => {
11119
+ }, Cx = ee.lazy(() => import("./rte-widget-modal-BdBYmqgs.js")), Nx = ({ blockId: t, id: e, placeholder: n, value: r, onChange: o, onBlur: s }) => {
11124
11120
  const i = re(null), [l, c] = $(!1), d = Sd({
11125
11121
  blockId: t,
11126
11122
  value: r,
@@ -11783,12 +11779,12 @@ const Px = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11783
11779
  return A(s, (i) => {
11784
11780
  const l = t(i), c = r;
11785
11781
  let { classes: d, baseClasses: u } = vn(_(l, o.prop, `${Nt},`));
11786
- return gt(c, (p) => {
11782
+ return mt(c, (p) => {
11787
11783
  const h = p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), f = new RegExp(`(^|\\s)${h}(?=\\s|$)`, "g");
11788
11784
  d = d.replace(f, " ").replace(/\s+/g, " ").trim();
11789
11785
  const m = ve(p.split(":"));
11790
11786
  Be(["2xl", "xl", "lg", "md", "sm"], m) && c.push(p.split(":").pop().trim());
11791
- }), gt(c, (p) => {
11787
+ }), mt(c, (p) => {
11792
11788
  const h = p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), f = new RegExp(`(^|\\s)${h}(?=\\s|$)`, "g");
11793
11789
  u = u.replace(f, " ").replace(/\s+/g, " ").trim();
11794
11790
  }), {
@@ -13228,7 +13224,7 @@ const Px = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
13228
13224
  const t = Rr(), e = M(() => {
13229
13225
  if (t.colors) {
13230
13226
  const o = Pt(A(t.colors, ({ items: s }) => Ct(s)));
13231
- gt($n, (s, i) => {
13227
+ mt($n, (s, i) => {
13232
13228
  We($n, `${i}.regExp`, s.regExp.replace("__THEME_COLORS_REGEXP__", o.join("|")));
13233
13229
  });
13234
13230
  }
@@ -13369,33 +13365,33 @@ const Zx = {
13369
13365
  // display
13370
13366
  hidden: ro,
13371
13367
  gap: Bt,
13372
- gapX: st,
13373
- gapY: ot,
13374
- spaceX: st,
13375
- spaceY: ot,
13368
+ gapX: ot,
13369
+ gapY: rt,
13370
+ spaceX: ot,
13371
+ spaceY: rt,
13376
13372
  overscroll: Bt,
13377
- overscrollX: st,
13378
- overscrollY: ot,
13373
+ overscrollX: ot,
13374
+ overscrollY: rt,
13379
13375
  overflow: Bt,
13380
- overflowX: st,
13381
- overflowY: ot,
13376
+ overflowX: ot,
13377
+ overflowY: rt,
13382
13378
  top: Zt,
13383
13379
  right: er,
13384
13380
  bottom: Ln,
13385
13381
  left: Qn,
13386
13382
  inset: Bt,
13387
- insetX: st,
13388
- insetY: ot,
13383
+ insetX: ot,
13384
+ insetY: rt,
13389
13385
  border: Bt,
13390
- borderX: st,
13391
- borderY: ot,
13386
+ borderX: ot,
13387
+ borderY: rt,
13392
13388
  borderTop: Zt,
13393
13389
  borderRight: er,
13394
13390
  borderBottom: Ln,
13395
13391
  borderLeft: Qn,
13396
13392
  borderRadius: Bt,
13397
- borderRadiusX: st,
13398
- borderRadiusY: ot,
13393
+ borderRadiusX: ot,
13394
+ borderRadiusY: rt,
13399
13395
  borderRadiusTop: Zt,
13400
13396
  borderRadiusRight: er,
13401
13397
  borderRadiusBottom: Ln,
@@ -13404,27 +13400,27 @@ const Zx = {
13404
13400
  borderRadiusTopRight: xl,
13405
13401
  borderRadiusBottomRight: vp,
13406
13402
  borderRadiusBottomLeft: wp,
13407
- divideXWidth: st,
13408
- divideYWidth: ot,
13403
+ divideXWidth: ot,
13404
+ divideYWidth: rt,
13409
13405
  scale: Bt,
13410
- scaleX: st,
13411
- scaleY: ot,
13412
- skewX: st,
13413
- skewY: ot,
13414
- translateX: st,
13415
- translateY: ot,
13406
+ scaleX: ot,
13407
+ scaleY: rt,
13408
+ skewX: ot,
13409
+ skewY: rt,
13410
+ translateX: ot,
13411
+ translateY: rt,
13416
13412
  // padding
13417
13413
  padding: Bt,
13418
- paddingX: st,
13419
- paddingY: ot,
13414
+ paddingX: ot,
13415
+ paddingY: rt,
13420
13416
  paddingTop: Zt,
13421
13417
  paddingRight: er,
13422
13418
  paddingBottom: Ln,
13423
13419
  paddingLeft: Qn,
13424
13420
  // margin
13425
13421
  margin: Bt,
13426
- marginX: st,
13427
- marginY: ot,
13422
+ marginX: ot,
13423
+ marginY: rt,
13428
13424
  marginTop: Zt,
13429
13425
  marginRight: er,
13430
13426
  marginBottom: Ln,
@@ -13657,7 +13653,7 @@ import.meta.vitest && test("orderClassesByBreakpoint", () => {
13657
13653
  "bg-red-400 sm:bg-red-500 md:bg-red-600"
13658
13654
  ), expect(qt("xl:sticky block sm:absolute")).toBe("block sm:absolute xl:sticky"), expect(qt("sm:bg-red-500 bg-red-400")).toBe("bg-red-400 sm:bg-red-500"), expect(qt("sm:w-[30%] w-[30%]")).toBe("w-[30%] sm:w-[30%]"), expect(qt("text-[30px] sm:text-[20px]")).toBe("text-[30px] sm:text-[20px]");
13659
13655
  });
13660
- function ht(t) {
13656
+ function ft(t) {
13661
13657
  if (t = t.replace(/\s+/g, " "), !t) return "";
13662
13658
  const e = ["xs", "sm", "md", "lg", "xl", "2xl"], n = t.split(" ").map(ji).filter((o) => o !== null);
13663
13659
  let r = t;
@@ -13675,7 +13671,7 @@ function ht(t) {
13675
13671
  return r.replace(/\s+/g, " ").trim();
13676
13672
  }
13677
13673
  import.meta.vitest && test("removeDuplicateClasses (tailwind classes) at higher breakpoints", () => {
13678
- expect(ht("")).toBe(""), expect(ht("bg-red-400")).toBe("bg-red-400"), expect(ht("bg-red-400 sm:bg-red-500")).toBe("bg-red-400 sm:bg-red-500"), expect(ht("bg-red-400 sm:bg-red-400")).toBe("bg-red-400"), expect(ht("bg-red-400 sm:bg-red-400 lg:bg-red-400")).toBe("bg-red-400"), expect(ht("p-4 sm:p-6 md:p-4")).toBe("p-4 sm:p-6 md:p-4"), expect(ht("p-4 sm:p-6 md:p-4 lg:p-4")).toBe("p-4 sm:p-6 md:p-4"), expect(ht("sm:bg-red-400 bg-red-400")).toBe("bg-red-400"), expect(ht("w-[30%] sm:w-[30%]")).toBe("w-[30%]"), expect(ht("w-[30%] sm:w-[30%] md:w-[40%]")).toBe("w-[30%] md:w-[40%]");
13674
+ expect(ft("")).toBe(""), expect(ft("bg-red-400")).toBe("bg-red-400"), expect(ft("bg-red-400 sm:bg-red-500")).toBe("bg-red-400 sm:bg-red-500"), expect(ft("bg-red-400 sm:bg-red-400")).toBe("bg-red-400"), expect(ft("bg-red-400 sm:bg-red-400 lg:bg-red-400")).toBe("bg-red-400"), expect(ft("p-4 sm:p-6 md:p-4")).toBe("p-4 sm:p-6 md:p-4"), expect(ft("p-4 sm:p-6 md:p-4 lg:p-4")).toBe("p-4 sm:p-6 md:p-4"), expect(ft("sm:bg-red-400 bg-red-400")).toBe("bg-red-400"), expect(ft("w-[30%] sm:w-[30%]")).toBe("w-[30%]"), expect(ft("w-[30%] sm:w-[30%] md:w-[40%]")).toBe("w-[30%] md:w-[40%]");
13679
13675
  });
13680
13676
  const a0 = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13681
13677
  const o = q(
@@ -13691,7 +13687,7 @@ const a0 = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13691
13687
  ids: [l._id],
13692
13688
  props: {
13693
13689
  [s.prop]: `${Nt},${qt(
13694
- ht(Tl(d, r))
13690
+ ft(Tl(d, r))
13695
13691
  )}`
13696
13692
  }
13697
13693
  };
@@ -13991,7 +13987,7 @@ const a0 = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13991
13987
  }
13992
13988
  ));
13993
13989
  Jd.displayName = Ao.Content.displayName;
13994
- const x0 = tt("selectedBreakpoints", ["XS", "MD", "XL"]), w0 = () => {
13990
+ const x0 = bt("selectedBreakpoints", ["XS", "MD", "XL"]), w0 = () => {
13995
13991
  const [t, e] = D(x0);
13996
13992
  return [t, e];
13997
13993
  }, Ga = ({ className: t = "" }) => /* @__PURE__ */ b(
@@ -14226,7 +14222,7 @@ const S0 = Xs(
14226
14222
  }
14227
14223
  ));
14228
14224
  Gt.displayName = Rl.Root.displayName;
14229
- const Ms = ({ className: t = "" }) => /* @__PURE__ */ a(Sp, { className: t }), E0 = Eo(() => import("./manage-design-tokens-modal-DO_tHkgp.js"));
14225
+ const Ms = ({ className: t = "" }) => /* @__PURE__ */ a(Sp, { className: t }), E0 = Eo(() => import("./manage-design-tokens-modal-CkyFE8NW.js"));
14230
14226
  function Yd({
14231
14227
  from: t = "default",
14232
14228
  classFromProps: e,
@@ -14302,7 +14298,7 @@ function Yd({
14302
14298
  }, he = () => {
14303
14299
  const U = T.trim().replace(/ +(?= )/g, "").split(" ").map(xe);
14304
14300
  t === "designToken" ? Qt(n) && n(U) : E(N, U, !0), k("");
14305
- }, [Pe, Je] = $([]), Y = G("flags.designTokens", !0), rt = ({ value: U }) => {
14301
+ }, [Pe, Je] = $([]), Y = G("flags.designTokens", !0), nt = ({ value: U }) => {
14306
14302
  const pe = U.trim().toLowerCase(), Oe = pe.match(/.+:/g);
14307
14303
  let Tt = [], qo = [];
14308
14304
  if (Y && o && (pe === "" ? qo = Object.entries(C).map(([zt, Zn]) => ({
@@ -14395,7 +14391,7 @@ function Yd({
14395
14391
  Sf,
14396
14392
  {
14397
14393
  suggestions: Pe,
14398
- onSuggestionsFetchRequested: rt,
14394
+ onSuggestionsFetchRequested: nt,
14399
14395
  onSuggestionsClearRequested: Jt,
14400
14396
  getSuggestionValue: Bn,
14401
14397
  renderSuggestion: In,
@@ -14639,7 +14635,7 @@ const Wi = kn.Root, Go = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE_
14639
14635
  }
14640
14636
  ));
14641
14637
  Go.displayName = kn.List.displayName;
14642
- const dt = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
14638
+ const ct = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
14643
14639
  kn.Trigger,
14644
14640
  {
14645
14641
  ref: n,
@@ -14650,7 +14646,7 @@ const dt = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
14650
14646
  ...e
14651
14647
  }
14652
14648
  ));
14653
- dt.displayName = kn.Trigger.displayName;
14649
+ ct.displayName = kn.Trigger.displayName;
14654
14650
  const Vt = W.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
14655
14651
  kn.Content,
14656
14652
  {
@@ -15409,7 +15405,7 @@ const Ya = ({
15409
15405
  parentId: n,
15410
15406
  position: r,
15411
15407
  block: J,
15412
- disabled: !v && (!bt(h, J.type) || !Uf(h, J.type))
15408
+ disabled: !v && (!gt(h, J.type) || !Uf(h, J.type))
15413
15409
  },
15414
15410
  J.type + "-" + V + "-" + Q
15415
15411
  )) })
@@ -15418,14 +15414,14 @@ const Ya = ({
15418
15414
  )
15419
15415
  ] })
15420
15416
  ] });
15421
- }, iu = tt("__add_block_tab", "library"), au = ({
15417
+ }, iu = bt("__add_block_tab", "library"), au = ({
15422
15418
  className: t,
15423
15419
  showHeading: e = !0,
15424
15420
  parentId: n = void 0,
15425
15421
  position: r = -1,
15426
15422
  fromSidebar: o = !1
15427
15423
  }) => {
15428
- const { t: s } = K(), [i, l] = D(iu), [, c] = D(oc), d = G("flags.importHtml", !0), { data: u } = tc(), p = Object.keys(u || {}).length > 0, { hasPermission: h } = ft();
15424
+ const { t: s } = K(), [i, l] = D(iu), [, c] = D(oc), d = G("flags.importHtml", !0), { data: u } = tc(), p = Object.keys(u || {}).length > 0, { hasPermission: h } = pt();
15429
15425
  z(() => {
15430
15426
  i === "partials" && !p && l("library");
15431
15427
  }, [i, p, l]);
@@ -15449,12 +15445,12 @@ const Ya = ({
15449
15445
  className: "flex h-full max-h-full flex-col overflow-hidden",
15450
15446
  children: [
15451
15447
  /* @__PURE__ */ b(Go, { className: `flex items-center ${o ? "h-max w-max justify-start p-1" : "w-full"}`, children: [
15452
- x && /* @__PURE__ */ a(dt, { value: "library", className: o ? "h-5 px-2 text-xs" : "", children: s("Library") }),
15453
- /* @__PURE__ */ a(dt, { value: "core", className: o ? "h-5 px-2 text-xs" : "", children: s("Blocks") }),
15454
- p && /* @__PURE__ */ a(dt, { value: "partials", className: o ? "h-5 px-2 text-xs" : "", children: s("Partials") }),
15455
- g ? /* @__PURE__ */ a(dt, { value: "html", className: o ? "h-5 px-2 text-xs" : "", children: s("Import") }) : null,
15448
+ x && /* @__PURE__ */ a(ct, { value: "library", className: o ? "h-5 px-2 text-xs" : "", children: s("Library") }),
15449
+ /* @__PURE__ */ a(ct, { value: "core", className: o ? "h-5 px-2 text-xs" : "", children: s("Blocks") }),
15450
+ p && /* @__PURE__ */ a(ct, { value: "partials", className: o ? "h-5 px-2 text-xs" : "", children: s("Partials") }),
15451
+ g ? /* @__PURE__ */ a(ct, { value: "html", className: o ? "h-5 px-2 text-xs" : "", children: s("Import") }) : null,
15456
15452
  A(m, (v) => /* @__PURE__ */ a(
15457
- dt,
15453
+ ct,
15458
15454
  {
15459
15455
  value: v.id,
15460
15456
  className: o ? "h-5 px-2 text-xs" : "",
@@ -15754,7 +15750,7 @@ const lw = ({ children: t }) => {
15754
15750
  }
15755
15751
  );
15756
15752
  }, hw = ({ node: t }) => {
15757
- const { t: e } = K(), [n] = oe(), r = vi(), o = ae(), { hasPermission: s } = ft(), { librarySite: i } = G("flags", { librarySite: !1 }), l = yt(), c = I(() => {
15753
+ const { t: e } = K(), [n] = oe(), r = vi(), o = ae(), { hasPermission: s } = pt(), { librarySite: i } = G("flags", { librarySite: !1 }), l = yt(), c = I(() => {
15758
15754
  r(n);
15759
15755
  }, [n, r]), d = M(() => ce(o, "_libBlockId") && !F(o._libBlockId), [o == null ? void 0 : o._libBlockId]);
15760
15756
  return t === "BODY" ? /* @__PURE__ */ a(Ft, { side: "bottom", className: "border-border text-xs", children: s(fe.ADD_BLOCK) && /* @__PURE__ */ b(Z, { children: [
@@ -15903,7 +15899,7 @@ const mw = () => {
15903
15899
  return t != null && t._name ? t._name : (t == null ? void 0 : t._type) === "Box" && (t != null && t.tag) && (t == null ? void 0 : t.tag) !== "div" ? Ut(t.tag) : ((e = t == null ? void 0 : t._type) == null ? void 0 : e.split("/").pop()) || "";
15904
15900
  }, yw = (t, e) => t.length > e ? t.substring(0, e) + "..." : t, xw = xn(({ node: t, style: e, dragHandle: n }) => {
15905
15901
  var Pe, Je;
15906
- const { t: r } = K(), o = Et(), [s] = D(Oo), { hasPermission: i } = ft();
15902
+ const { t: r } = K(), o = Et(), [s] = D(Oo), { hasPermission: i } = pt();
15907
15903
  let l = null;
15908
15904
  const c = t.children && t.children.length > 0, { highlightBlock: d, clearHighlight: u } = _t(), p = yt(), { id: h, data: f, isSelected: m, willReceiveDrop: g, isDragging: y, isEditing: x, handleClick: v } = t, E = mw(), S = M(() => E.getBlockErrors(h), [E, h]), N = _(f, "_show", !0), T = (Y) => {
15909
15905
  Y.stopPropagation(), N && t.toggle();
@@ -15912,8 +15908,8 @@ const mw = () => {
15912
15908
  }, C = (Y) => {
15913
15909
  Y.isInternal && l !== null && (l ? Y.open() : Y.close(), l = null);
15914
15910
  }, [w, B] = D(bw), L = () => {
15915
- var Y, rt;
15916
- R(), (Y = t.parent) != null && Y.isSelected || B((rt = t == null ? void 0 : t.parent) == null ? void 0 : rt.id);
15911
+ var Y, nt;
15912
+ R(), (Y = t.parent) != null && Y.isSelected || B((nt = t == null ? void 0 : t.parent) == null ? void 0 : nt.id);
15917
15913
  }, R = () => {
15918
15914
  B(null);
15919
15915
  }, V = (Y) => {
@@ -15925,16 +15921,16 @@ const mw = () => {
15925
15921
  }, 500);
15926
15922
  return () => clearTimeout(Y);
15927
15923
  }, [g, t, y]);
15928
- const J = (Y, rt) => {
15924
+ const J = (Y, nt) => {
15929
15925
  var $r;
15930
15926
  const Jt = s.contentDocument || (($r = s.contentWindow) == null ? void 0 : $r.document), Bn = Jt == null ? void 0 : Jt.querySelector(`[data-block-id=${Y}]`);
15931
- Bn && Bn.setAttribute("data-drop", rt);
15927
+ Bn && Bn.setAttribute("data-drop", nt);
15932
15928
  const In = Bn.getBoundingClientRect(), Yt = s.getBoundingClientRect();
15933
15929
  !(In.top >= Yt.top && In.left >= Yt.left && In.bottom <= Yt.bottom && In.right <= Yt.right) && Jt && (Jt.documentElement.scrollTop = Bn.offsetTop - Yt.top);
15934
15930
  }, Q = (Y) => {
15935
15931
  R();
15936
- const rt = _(t, "parent.id");
15937
- rt !== "__REACT_ARBORIST_INTERNAL_ROOT__" ? ge.publish(se.OPEN_ADD_BLOCK, { _id: rt, position: Y }) : ge.publish(se.OPEN_ADD_BLOCK, { position: Y });
15932
+ const nt = _(t, "parent.id");
15933
+ nt !== "__REACT_ARBORIST_INTERNAL_ROOT__" ? ge.publish(se.OPEN_ADD_BLOCK, { _id: nt, position: Y }) : ge.publish(se.OPEN_ADD_BLOCK, { position: Y });
15938
15934
  };
15939
15935
  if (h === Jr)
15940
15936
  return /* @__PURE__ */ b("div", { className: "group relative mt-2 w-full cursor-pointer", children: [
@@ -15994,7 +15990,7 @@ const mw = () => {
15994
15990
  className: Te(
15995
15991
  "group flex w-full cursor-pointer items-center justify-between space-x-px !rounded p-1 py-0 outline-none",
15996
15992
  m ? "bg-primary/20" : "hover:bg-primary/10",
15997
- g && bt(f._type, "Icon") ? "bg-green-200" : "",
15993
+ g && gt(f._type, "Icon") ? "bg-green-200" : "",
15998
15994
  (t == null ? void 0 : t.id) === w ? "bg-primary/10" : "",
15999
15995
  y && "opacity-20",
16000
15996
  N ? "" : "line-through opacity-50",
@@ -16132,7 +16128,7 @@ const mw = () => {
16132
16128
  var i;
16133
16129
  return (i = te(t, { _id: s })) == null ? void 0 : i._type;
16134
16130
  }));
16135
- return o ? bt(r._type, o) : !1;
16131
+ return o ? gt(r._type, o) : !1;
16136
16132
  };
16137
16133
  }, Cw = () => {
16138
16134
  const [t] = D($l), [e, n] = oe(), [r] = Do(), o = Et(), [, s] = ze(), { moveBlocks: i } = Fe(), l = kw(), c = re(null), [, d] = D(bi), { t: u } = K(), [p, h] = $(null), f = () => {
@@ -16159,7 +16155,7 @@ const mw = () => {
16159
16155
  }, E = St(
16160
16156
  ({ parentNode: k, dragNodes: C }) => {
16161
16157
  var w;
16162
- return (k == null ? void 0 : k.data._type) === Jr || !bt(k == null ? void 0 : k.data._type, (w = C[0]) == null ? void 0 : w.data._type);
16158
+ return (k == null ? void 0 : k.data._type) === Jr || !gt(k == null ? void 0 : k.data._type, (w = C[0]) == null ? void 0 : w.data._type);
16163
16159
  },
16164
16160
  [],
16165
16161
  300
@@ -16220,7 +16216,7 @@ const mw = () => {
16220
16216
  const C = new MutationObserver(k);
16221
16217
  return C.observe(document.body, { childList: !0, subtree: !0 }), () => C.disconnect();
16222
16218
  }, [d]);
16223
- const { hasPermission: T } = ft();
16219
+ const { hasPermission: T } = pt();
16224
16220
  return F(t) ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("div", { className: "mt-10 flex h-full w-full items-center justify-center p-8", children: /* @__PURE__ */ b("div", { className: "flex flex-col items-center space-y-6 text-center", children: [
16225
16221
  /* @__PURE__ */ a("div", { className: "rounded-full bg-muted p-6", children: /* @__PURE__ */ a(Pp, { className: "h-12 w-12 text-muted-foreground" }) }),
16226
16222
  /* @__PURE__ */ b("div", { className: "space-y-2", children: [
@@ -16428,7 +16424,7 @@ const Nw = ({ value: t, onChange: e, disabled: n }) => {
16428
16424
  [r, e]
16429
16425
  ), s = I(
16430
16426
  async (c) => {
16431
- const d = c ?? lt.get(Er);
16427
+ const d = c ?? at.get(Er);
16432
16428
  await r({ type: "DESIGN_TOKENS", data: d });
16433
16429
  },
16434
16430
  [r]
@@ -16576,7 +16572,7 @@ const Nw = ({ value: t, onChange: e, disabled: n }) => {
16576
16572
  "popover-foreground": ["#3d3436", "#f2e9e4"]
16577
16573
  }
16578
16574
  }, Lw = Eo(
16579
- () => import("./css-import-modal-c_6VH1js.js").then((t) => ({ default: t.CssImportModal }))
16575
+ () => import("./css-import-modal-DMZRgpy0.js").then((t) => ({ default: t.CssImportModal }))
16580
16576
  ), bu = "chai-builder-previous-theme", Pw = [
16581
16577
  { shadcn_default: Aw },
16582
16578
  { twitter_theme: Tw },
@@ -16598,7 +16594,7 @@ const Nw = ({ value: t, onChange: e, disabled: n }) => {
16598
16594
  console.warn("Failed to clear previous theme from localStorage:", t);
16599
16595
  }
16600
16596
  }, Mw = W.memo(({ className: t = "" }) => {
16601
- const [e, n] = Ir(), [r, o] = W.useState(""), [s, i] = W.useState(!1), l = G("themePresets", {}), { hasPermission: c } = ft(), { debouncedSaveTheme: d } = _w(), u = G("flags.importTheme", !0), p = G("flags.darkMode", !1), h = Zs();
16597
+ const [e, n] = Ir(), [r, o] = W.useState(""), [s, i] = W.useState(!1), l = G("themePresets", {}), { hasPermission: c } = pt(), { debouncedSaveTheme: d } = _w(), u = G("flags.importTheme", !0), p = G("flags.darkMode", !1), h = Zs();
16602
16598
  (!l || l.length === 0) && Pw.map((C) => {
16603
16599
  l.push(C);
16604
16600
  });
@@ -17742,7 +17738,7 @@ const kk = ({ partialBlockId: t }) => {
17742
17738
  );
17743
17739
  return /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ a("div", { className: "hidden", children: /* @__PURE__ */ a("div", { onDoubleClick: s, className: "h-full w-full items-center justify-center", children: /* @__PURE__ */ a("p", { className: "rounded-md bg-white px-2 py-1 text-xs", children: "Partial block. Double click to edit." }) }) }) });
17744
17740
  }, Ck = () => {
17745
- const t = ae(), { t: e } = K(), n = G("onError", kt), { hasPermission: r } = ft();
17741
+ const t = ae(), { t: e } = K(), n = G("onError", kt), { hasPermission: r } = pt();
17746
17742
  let o = !r(fe.EDIT_BLOCK);
17747
17743
  const s = !r(fe.EDIT_STYLES), [i, l] = Tc();
17748
17744
  return t && t._type === "PartialBlock" ? /* @__PURE__ */ a(kk, { partialBlockId: t.partialBlockId }) : t ? o && s ? /* @__PURE__ */ a("div", { className: "p-4 text-center", children: /* @__PURE__ */ b("div", { className: "space-y-4 rounded-xl p-4 text-muted-foreground", children: [
@@ -17764,8 +17760,8 @@ const kk = ({ partialBlockId: t }) => {
17764
17760
  (u === "settings" || u === "styles") && l(u);
17765
17761
  }, className: "flex flex-1 flex-col", children: [
17766
17762
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ b(Go, { className: "grid h-auto w-full grid-cols-2 p-1 py-1", children: [
17767
- /* @__PURE__ */ a(dt, { value: "settings", className: "text-xs", children: e("Settings") }),
17768
- /* @__PURE__ */ a(dt, { value: "styles", className: "text-xs", children: /* @__PURE__ */ b("div", { className: "flex w-full items-center justify-between", children: [
17763
+ /* @__PURE__ */ a(ct, { value: "settings", className: "text-xs", children: e("Settings") }),
17764
+ /* @__PURE__ */ a(ct, { value: "styles", className: "text-xs", children: /* @__PURE__ */ b("div", { className: "flex w-full items-center justify-between", children: [
17769
17765
  /* @__PURE__ */ a("span", { className: "w-[90%] text-center", children: e("Styling") }),
17770
17766
  /* @__PURE__ */ a("span", { className: "w-[10%]", children: /* @__PURE__ */ a(tl, {}) })
17771
17767
  ] }) })
@@ -17793,7 +17789,7 @@ const kk = ({ partialBlockId: t }) => {
17793
17789
  /* @__PURE__ */ a(so, { className: "mx-auto text-3xl" }),
17794
17790
  /* @__PURE__ */ a("h1", { children: e("Please select a block to edit settings or styles") })
17795
17791
  ] }) });
17796
- }, Nk = ee.lazy(() => import("./manage-design-tokens-CHpHE-dx.js")), jt = 280, Sk = ({ isActive: t, show: e }) => /* @__PURE__ */ a(ne, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Df, { className: "h-5 w-5" }) }), Ek = ({ isActive: t, show: e }) => yt() && /* @__PURE__ */ a(ne, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Of, { className: "h-5 w-5" }) }), _k = ({ isActive: t, show: e }) => G("flags.ai", !1) ? /* @__PURE__ */ a(ne, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Qs, {}) }) : null;
17792
+ }, Nk = ee.lazy(() => import("./manage-design-tokens-4Gu6TMKZ.js")), jt = 280, Sk = ({ isActive: t, show: e }) => /* @__PURE__ */ a(ne, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Df, { className: "h-5 w-5" }) }), Ek = ({ isActive: t, show: e }) => yt() && /* @__PURE__ */ a(ne, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Of, { className: "h-5 w-5" }) }), _k = ({ isActive: t, show: e }) => G("flags.ai", !1) ? /* @__PURE__ */ a(ne, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Qs, {}) }) : null;
17797
17793
  $s("add-block", {
17798
17794
  button: Ek,
17799
17795
  label: "Add Blocks",
@@ -17819,7 +17815,7 @@ $s("outline", {
17819
17815
  panel: () => /* @__PURE__ */ a("div", { className: "-mt-8", children: /* @__PURE__ */ a(Cw, {}) })
17820
17816
  });
17821
17817
  const Ak = () => {
17822
- const t = Pu(), [e, n] = ki(), r = re("outline"), [o, s] = $(jt), [i, l] = Xm(), [, c] = Tc(), d = Zi("top"), u = Zi("bottom"), p = Zu([...u ?? []]), h = I((C) => {
17818
+ const t = Pu(), [e, n] = ki(), r = re("outline"), [o, s] = $(jt), [i, l] = qm(), [, c] = Tc(), d = Zi("top"), u = Zi("bottom"), p = Zu([...u ?? []]), h = I((C) => {
17823
17819
  C.preventDefault();
17824
17820
  }, []), f = M(() => [d].flat(), [d]), m = I(
17825
17821
  (C) => {
@@ -18041,7 +18037,7 @@ const Ak = () => {
18041
18037
  e.description && /* @__PURE__ */ a("p", { className: "mt-0.5 text-xs text-gray-500 dark:text-gray-400", children: e.description })
18042
18038
  ] })
18043
18039
  ] });
18044
- }, Lk = tt(
18040
+ }, Lk = bt(
18045
18041
  "show-feature-flag",
18046
18042
  null
18047
18043
  ), Pk = ({
@@ -18590,10 +18586,10 @@ ${o})
18590
18586
  /* @__PURE__ */ b(Ho, { className: "flex flex-row items-center justify-between", children: [
18591
18587
  /* @__PURE__ */ a(Pr, { className: "text-foreground", children: t("Export Code") }),
18592
18588
  /* @__PURE__ */ a(Wi, { defaultValue: "js", onValueChange: s, children: /* @__PURE__ */ b(Go, { children: [
18593
- /* @__PURE__ */ a(dt, { value: "js", children: "Javascript" }),
18594
- /* @__PURE__ */ a(dt, { value: "ts", children: "Typescript" }),
18595
- /* @__PURE__ */ a(dt, { value: "html", children: "HTML" }),
18596
- /* @__PURE__ */ a(dt, { value: "tailwind", children: "Tailwind config" })
18589
+ /* @__PURE__ */ a(ct, { value: "js", children: "Javascript" }),
18590
+ /* @__PURE__ */ a(ct, { value: "ts", children: "Typescript" }),
18591
+ /* @__PURE__ */ a(ct, { value: "html", children: "HTML" }),
18592
+ /* @__PURE__ */ a(ct, { value: "tailwind", children: "Tailwind config" })
18597
18593
  ] }) }),
18598
18594
  /* @__PURE__ */ a("div", {})
18599
18595
  ] }),
@@ -18660,15 +18656,15 @@ ${o})
18660
18656
  D(yi), Ec(), Xk(), Eh(), Nh(), Oh();
18661
18657
  const { postMessage: o } = nc(), [, s] = D(ql), i = ui();
18662
18658
  return z(() => {
18663
- lt.set(
18659
+ at.set(
18664
18660
  // @ts-ignore
18665
18661
  ci,
18666
18662
  kr(t, ["blocks", "translations", "pageExternalData", "globalStyles"])
18667
18663
  );
18668
18664
  }, [t]), z(() => {
18669
- lt.set(di, t.pageExternalData || {});
18665
+ at.set(di, t.pageExternalData || {});
18670
18666
  }, [t.pageExternalData]), z(() => {
18671
- lt.set(Er, t.designTokens || {});
18667
+ at.set(Er, t.designTokens || {});
18672
18668
  }, [t.designTokens]), z(() => {
18673
18669
  s(!1), setTimeout(() => {
18674
18670
  const l = _o(t.blocks || []);
@@ -18679,7 +18675,7 @@ ${o})
18679
18675
  }, [t.locale]), z(() => {
18680
18676
  Dk(t.debugLogs ?? !1);
18681
18677
  }, [t.debugLogs]), z(() => {
18682
- t.translations && gt(t.translations, (l, c) => {
18678
+ t.translations && mt(t.translations, (l, c) => {
18683
18679
  vs.addResourceBundle(c, "translation", l, !0, !0);
18684
18680
  });
18685
18681
  }, [t.translations]), z(() => (r !== "SAVED" ? window.onbeforeunload = () => "" : window.onbeforeunload = null, () => {
@@ -18738,7 +18734,7 @@ ${o})
18738
18734
  const o = r.i18nProps;
18739
18735
  if (!o) return n;
18740
18736
  const s = q(e, { _type: n._type }), i = un(n, o);
18741
- return gt(i, (l, c) => {
18737
+ return mt(i, (l, c) => {
18742
18738
  const d = te(s, (u) => {
18743
18739
  var f;
18744
18740
  const p = typeof u[c] == "string" ? (f = u[c]) == null ? void 0 : f.trim().toLowerCase() : JSON.stringify(u[c]), h = typeof l == "string" ? l.trim().toLowerCase() : JSON.stringify(l);
@@ -18778,7 +18774,7 @@ ${o})
18778
18774
  const i = (s == null ? void 0 : s.i18nProps) ?? [];
18779
18775
  if (i.length === 0) return null;
18780
18776
  const l = n === "ALL" ? Object.keys(o).filter((d) => i.find((u) => d.startsWith(u))) : i.map((d) => n ? `${d}-${n}` : d), c = un(o, ["_id"]);
18781
- return gt(l, (d) => {
18777
+ return mt(l, (d) => {
18782
18778
  c[d] = _(o, d, _(o, d.replace(`-${n}`, "")));
18783
18779
  }), c;
18784
18780
  })
@@ -18799,11 +18795,11 @@ ${o})
18799
18795
  ...l.slice(o)
18800
18796
  ];
18801
18797
  }, pC = () => {
18802
- const [, t] = oe(), { setNewBlocks: e } = Fe(), { hasPermission: n } = ft();
18798
+ const [, t] = oe(), { setNewBlocks: e } = Fe(), { hasPermission: n } = pt();
18803
18799
  return I(
18804
18800
  (r, o) => {
18805
18801
  if (!n(fe.EDIT_BLOCK)) return;
18806
- const s = lt.get($e), i = r ? t1(s, r, o) : o;
18802
+ const s = at.get($e), i = r ? t1(s, r, o) : o;
18807
18803
  e(i), o.length > 0 && setTimeout(() => t([o[0]._id]), 200);
18808
18804
  },
18809
18805
  [t, e, n]
@@ -18852,7 +18848,7 @@ export {
18852
18848
  wo as a7,
18853
18849
  Yd as a8,
18854
18850
  qt as a9,
18855
- dt as aA,
18851
+ ct as aA,
18856
18852
  y0 as aB,
18857
18853
  b0 as aC,
18858
18854
  Jd as aD,
@@ -18867,19 +18863,19 @@ export {
18867
18863
  iC as aM,
18868
18864
  lw as aN,
18869
18865
  fe as aO,
18870
- Jm as aP,
18866
+ Ym as aP,
18871
18867
  Qr as aQ,
18872
18868
  mk as aR,
18873
18869
  aC as aS,
18874
18870
  ku as aT,
18875
- Xm as aU,
18871
+ qm as aU,
18876
18872
  Ol as aV,
18877
18873
  yk as aW,
18878
18874
  lC as aX,
18879
18875
  Vt as aY,
18880
18876
  au as aZ,
18881
18877
  Fa as a_,
18882
- ht as aa,
18878
+ ft as aa,
18883
18879
  Or as ab,
18884
18880
  Cu as ac,
18885
18881
  Nu as ad,
@@ -18890,8 +18886,8 @@ export {
18890
18886
  pC as ai,
18891
18887
  hi as aj,
18892
18888
  Fk as ak,
18893
- zm as al,
18894
- Vm as am,
18889
+ Hm as al,
18890
+ jm as am,
18895
18891
  Mo as an,
18896
18892
  Rr as ao,
18897
18893
  Ir as ap,
@@ -18902,7 +18898,7 @@ export {
18902
18898
  du as au,
18903
18899
  iw as av,
18904
18900
  Is as aw,
18905
- ft as ax,
18901
+ pt as ax,
18906
18902
  Wi as ay,
18907
18903
  Go as az,
18908
18904
  Et as b,