@chaibuilder/sdk 4.0.0-beta.8 → 4.0.0-beta.9

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 (139) hide show
  1. package/README.md +4 -5
  2. package/dist/{2SSKDMRQ-DewwiCoQ.js → 2SSKDMRQ-CdFBQR2o.js} +2 -2
  3. package/dist/{2SSKDMRQ-DHv4u_0i.cjs → 2SSKDMRQ-CuQ42ST6.cjs} +1 -1
  4. package/dist/{AP7HFJJL-cz754qhG.cjs → AP7HFJJL-DcnEb4BE.cjs} +1 -1
  5. package/dist/{AP7HFJJL-ComnZw7J.js → AP7HFJJL-bDlWX5Yx.js} +1 -1
  6. package/dist/{IconPicker-2H9IGKMS.js → IconPicker-CNwplOGy.js} +1 -1
  7. package/dist/{IconPicker-U0Z2dWeR.cjs → IconPicker-FpyYsxOf.cjs} +1 -1
  8. package/dist/STRINGS-BExFecZW.js +8 -0
  9. package/dist/STRINGS-FNnfjF5H.cjs +1 -0
  10. package/dist/{WDYDFRGG-BfRX3M58.cjs → WDYDFRGG-BxLmjulP.cjs} +1 -1
  11. package/dist/{WDYDFRGG-vy7nMYD4.js → WDYDFRGG-CWq7H6Qk.js} +2 -2
  12. package/dist/{actions-registery-CtQSSexG.cjs → actions-registery-BRgseJas.cjs} +16 -16
  13. package/dist/{actions-registery-DqrFhSMp.js → actions-registery-DRV8xywr.js} +180 -181
  14. package/dist/actions.cjs +1 -1
  15. package/dist/actions.d.ts +112 -51
  16. package/dist/actions.js +2 -2
  17. package/dist/{active-in-another-tab-5hn17Jeq.js → active-in-another-tab-C392ZWQc.js} +2 -2
  18. package/dist/{active-in-another-tab-ijahI5qu.cjs → active-in-another-tab-DEWOFgY5.cjs} +1 -1
  19. package/dist/{add-new-language-page-DmOyPy0u.js → add-new-language-page-BL2F_Cu7.js} +3 -3
  20. package/dist/{add-new-language-page-vmNKNx-e.cjs → add-new-language-page-DBWd0wDY.cjs} +1 -1
  21. package/dist/{add-new-page-XDuCkOyb.cjs → add-new-page-DYrQeKCi.cjs} +1 -1
  22. package/dist/{add-new-page-NHScAQn8.js → add-new-page-QVlyJhn9.js} +2 -2
  23. package/dist/{ai-panel-content-CHJ0JcQI.js → ai-panel-content-CCOluPtK.js} +3 -3
  24. package/dist/{ai-panel-content-BDqW16AW.cjs → ai-panel-content-DCZRBa6s.cjs} +1 -1
  25. package/dist/{ai-panel-default-lang-HeYWpbMu.cjs → ai-panel-default-lang-C3t0elrO.cjs} +2 -2
  26. package/dist/{ai-panel-default-lang-BIomgsN0.js → ai-panel-default-lang-Crz7QAxl.js} +4 -4
  27. package/dist/{ai-panel-other-lang-BMelEs3p.cjs → ai-panel-other-lang-BRkr4Te3.cjs} +1 -1
  28. package/dist/{ai-panel-other-lang-CbAgG-qX.js → ai-panel-other-lang-DIF8PYLh.js} +4 -4
  29. package/dist/{ai-prompt-input-BH8LOVT4.js → ai-prompt-input-D4dqy8L2.js} +1 -1
  30. package/dist/{ai-prompt-input-C_GG6nwq.cjs → ai-prompt-input-Ybgvrvd6.cjs} +1 -1
  31. package/dist/{ai-translation-prompt-CkHaFv5I.cjs → ai-translation-prompt-Ck12Bfl6.cjs} +1 -1
  32. package/dist/{ai-translation-prompt-DxsNw8YR.js → ai-translation-prompt-eZ4Sllva.js} +1 -1
  33. package/dist/{apply-binding-BvWfJCSZ.js → apply-binding-CLU6Xp4K.js} +77 -81
  34. package/dist/apply-binding-NvZX_rJe.cjs +1 -0
  35. package/dist/{code-editor-CGBAc-A6.js → code-editor-D45h29W1.js} +1 -1
  36. package/dist/{code-editor-GV8ibQ4h.cjs → code-editor-DH8eU4WL.cjs} +1 -1
  37. package/dist/{continue-editing-in-this-client-Da8ab_9d.js → continue-editing-in-this-client-BRrIvSrl.js} +2 -2
  38. package/dist/{continue-editing-in-this-client-DKHP0pq8.cjs → continue-editing-in-this-client-DgZ9Q18G.cjs} +1 -1
  39. package/dist/core-8lkXy4lC.cjs +1 -0
  40. package/dist/core-BvsZwF26.js +52 -0
  41. package/dist/core.cjs +1 -1
  42. package/dist/core.d.ts +147 -87
  43. package/dist/core.js +2 -2
  44. package/dist/{css-import-modal-CcZVLsF9.js → css-import-modal-BhLPzQH8.js} +1 -1
  45. package/dist/{css-import-modal-B4j26_cO.cjs → css-import-modal-C2-oVwFv.cjs} +1 -1
  46. package/dist/{delete-design-token-DzINIVtO.js → delete-design-token-D4Q5-Xql.js} +1 -1
  47. package/dist/{delete-design-token-3-WwqXMO.cjs → delete-design-token-DJSQluQ6.cjs} +1 -1
  48. package/dist/{delete-page-B7ODELqM.cjs → delete-page-BxbsKhY5.cjs} +1 -1
  49. package/dist/{delete-page-DwZDMwfI.js → delete-page-xHdZT-7c.js} +2 -2
  50. package/dist/{design-token-usage-DQf180Lg.js → design-token-usage-7wgmVSWI.js} +1 -1
  51. package/dist/{design-token-usage-Dy08kcIc.cjs → design-token-usage-KZ4pilLm.cjs} +1 -1
  52. package/dist/{digital-asset-manager-CDy9kHZO.js → digital-asset-manager-BmbVU7fX.js} +3 -3
  53. package/dist/{digital-asset-manager-C7subULa.cjs → digital-asset-manager-a1fqrQVH.cjs} +1 -1
  54. package/dist/{duplicate-page-DTnSztlr.js → duplicate-page-5uIno9Yh.js} +3 -3
  55. package/dist/{duplicate-page-CWQ9aMd9.cjs → duplicate-page-BBTxn_o1.cjs} +1 -1
  56. package/dist/{dynamic-page-selector-DJuxLcsM.cjs → dynamic-page-selector-C1ef0i2I.cjs} +1 -1
  57. package/dist/{dynamic-page-selector-DYW3ov_u.js → dynamic-page-selector-rhvhg7ol.js} +2 -2
  58. package/dist/{image-editor-DLeSST0K.js → image-editor-BXYZDa0s.js} +1 -1
  59. package/dist/{image-editor-C4H3AkZK.cjs → image-editor-rqUgAO8V.cjs} +1 -1
  60. package/dist/{index-D5d4QDq7.js → index-Be9lAaD7.js} +420 -422
  61. package/dist/index-BhqugjzS.cjs +160 -0
  62. package/dist/index-CNEEEgTV.cjs +5 -0
  63. package/dist/{index-BK0xWO1z.js → index-mjuSGlPU.js} +440 -447
  64. package/dist/{json-diff-viewer-g6SY62bl.cjs → json-diff-viewer-C9qmLiaq.cjs} +1 -1
  65. package/dist/{json-diff-viewer-BYHieVod.js → json-diff-viewer-aVwY7_hZ.js} +2 -2
  66. package/dist/{lang-panel-BG1GMn-1.js → lang-panel-BTWk23Mw.js} +3 -3
  67. package/dist/{lang-panel-Dm1eOO2J.cjs → lang-panel-Bo1ZWYfu.cjs} +1 -1
  68. package/dist/{manage-design-tokens-BdWQUHhw.js → manage-design-tokens-id8bylgO.js} +3 -3
  69. package/dist/manage-design-tokens-lUMCgjdS.cjs +1 -0
  70. package/dist/{mark-as-template-DUFnfVM3.cjs → mark-as-template-BYXBDXMv.cjs} +1 -1
  71. package/dist/{mark-as-template-D2XxagVO.js → mark-as-template-hv3WD852.js} +2 -2
  72. package/dist/{nested-path-selector-content-Wd6-Eql0.js → nested-path-selector-content-B8z90MFF.js} +1 -1
  73. package/dist/{nested-path-selector-content-CQOx2L9C.cjs → nested-path-selector-content-DgFFXcTD.cjs} +1 -1
  74. package/dist/{no-language-page-content-C11uF6hs.cjs → no-language-page-content-6Kk8UjFX.cjs} +1 -1
  75. package/dist/{no-language-page-content-BOv6TZIk.js → no-language-page-content-DMACzysm.js} +2 -2
  76. package/dist/{no-language-page-dialog-DIXyKRJq.js → no-language-page-dialog-D4n_XYUq.js} +2 -2
  77. package/dist/{no-language-page-dialog-CY5XhXsC.cjs → no-language-page-dialog-mBH-fthh.cjs} +1 -1
  78. package/dist/{page-creator-zSUFF4eT.cjs → page-creator-CGglYnYg.cjs} +1 -1
  79. package/dist/{page-creator-WX9lMrJY.js → page-creator-CgsOF0Eg.js} +3 -3
  80. package/dist/{page-lock-D9miLZjm.js → page-lock-CUCEBnJb.js} +2 -2
  81. package/dist/{page-lock-DGhR_url.cjs → page-lock-Hsi61Mk5.cjs} +1 -1
  82. package/dist/{page-locked-dialog-DTLnbfuP.cjs → page-locked-dialog-DSxbAMpt.cjs} +1 -1
  83. package/dist/{page-locked-dialog-CNCUCcvH.js → page-locked-dialog-bHvbFllT.js} +2 -2
  84. package/dist/{page-manager-new-Dd2c-Q_O.cjs → page-manager-new-CBfFl5rL.cjs} +1 -1
  85. package/dist/{page-manager-new-BFFOLh-l.js → page-manager-new-Cifc526h.js} +7 -7
  86. package/dist/{page-manager-search-and-filter-C1IWF_4d.js → page-manager-search-and-filter-CLJss6pV.js} +2 -2
  87. package/dist/{page-manager-search-and-filter-BKdQUJ2W.cjs → page-manager-search-and-filter-mEKl-UKh.cjs} +1 -1
  88. package/dist/{page-revisions-content-D0cflnj1.cjs → page-revisions-content-C95dQJyx.cjs} +1 -1
  89. package/dist/{page-revisions-content-DHapiLck.js → page-revisions-content-DvL4ya9g.js} +3 -3
  90. package/dist/pages.cjs +1 -1
  91. package/dist/pages.d.ts +146 -93
  92. package/dist/pages.js +1 -1
  93. package/dist/{publish-pages-content-BqLcnKry.cjs → publish-pages-content-B-6vSkql.cjs} +1 -1
  94. package/dist/{publish-pages-content-Bd2zJHtK.js → publish-pages-content-B8-IZW_U.js} +3 -3
  95. package/dist/render.cjs +1 -1
  96. package/dist/render.d.ts +12 -14
  97. package/dist/render.js +3 -3
  98. package/dist/{rte-widget-modal-RS8PMKOn.js → rte-widget-modal-1SbY5bcQ.js} +1 -1
  99. package/dist/{rte-widget-modal-DiB5BjH1.cjs → rte-widget-modal-CyKwtbOG.cjs} +1 -1
  100. package/dist/runtime.cjs +1 -1
  101. package/dist/runtime.d.ts +91 -77
  102. package/dist/runtime.js +57 -56
  103. package/dist/{save-to-lib--6ZXHEbC.js → save-to-lib-BKcBfjfi.js} +2 -2
  104. package/dist/{save-to-lib-BXJvaC1N.cjs → save-to-lib-BmPh_Vns.cjs} +1 -1
  105. package/dist/{selected-block-display-CUnCqXQw.js → selected-block-display-B3hHlcLA.js} +2 -2
  106. package/dist/{selected-block-display-BfpJda4h.cjs → selected-block-display-BCvTNcp2.cjs} +1 -1
  107. package/dist/{seo-panel-Bs-FcY1A.js → seo-panel-D3EyOYij.js} +2 -2
  108. package/dist/{seo-panel-CQITMfZ6.cjs → seo-panel-DVClgzX9.cjs} +1 -1
  109. package/dist/{shared-json-ld-DDXXi-Mj.cjs → shared-json-ld-BRgJTv0m.cjs} +1 -1
  110. package/dist/{shared-json-ld-7EujD341.js → shared-json-ld-DSPadwbY.js} +2 -2
  111. package/dist/{slug-input-CsVJAr7r.cjs → slug-input-B39SPBdP.cjs} +1 -1
  112. package/dist/{slug-input-DoEIq5rs.js → slug-input-C3UrwSkt.js} +1 -1
  113. package/dist/supabase-actions.cjs +1 -1
  114. package/dist/supabase-actions.js +1 -1
  115. package/dist/{take-over-request-C14kJ356.js → take-over-request-DfAlPvpE.js} +2 -2
  116. package/dist/{take-over-request-D5Oo3MPo.cjs → take-over-request-Tq9-gOCV.cjs} +1 -1
  117. package/dist/{theme-panel-footer-Dvknelm8.js → theme-panel-footer-DIy4baYU.js} +2 -2
  118. package/dist/{theme-panel-footer-Eeibz2JA.cjs → theme-panel-footer-DQzjVBBP.cjs} +1 -1
  119. package/dist/{translation-warning-modal-YlzP2XoO.js → translation-warning-modal-BHwLZZOw.js} +1 -1
  120. package/dist/{translation-warning-modal-CPzdHzqq.cjs → translation-warning-modal-Ckwt5Skc.cjs} +1 -1
  121. package/dist/types.cjs +1 -0
  122. package/dist/types.d.ts +598 -0
  123. package/dist/types.js +1 -0
  124. package/dist/{unmark-as-template-BGDwuCnv.cjs → unmark-as-template-BKA-sNZr.cjs} +1 -1
  125. package/dist/{unmark-as-template-CPJvQk7L.js → unmark-as-template-CbgifSbI.js} +2 -2
  126. package/dist/{unpublish-page-BMowW5wT.cjs → unpublish-page-BqzvOD76.cjs} +1 -1
  127. package/dist/{unpublish-page-DlFHLlmI.js → unpublish-page-DXQpAkvc.js} +2 -2
  128. package/dist/utils.d.ts +5 -5
  129. package/dist/web-blocks.cjs +1 -1
  130. package/dist/web-blocks.js +237 -237
  131. package/dist/{web-preview-BUnv3jIc.js → web-preview-DH7Yv-jg.js} +1 -1
  132. package/dist/{web-preview-D8GQHCjs.cjs → web-preview-DShy13AM.cjs} +1 -1
  133. package/package.json +6 -1
  134. package/dist/apply-binding-IsUf6UWJ.cjs +0 -1
  135. package/dist/core-Dr7QYemB.js +0 -56
  136. package/dist/core-Y0lXLwkq.cjs +0 -1
  137. package/dist/index-BRJCj7c_.cjs +0 -5
  138. package/dist/index-Bm8iS2OH.cjs +0 -160
  139. package/dist/manage-design-tokens-XWs_B6jo.cjs +0 -1
@@ -2,25 +2,26 @@ var Cu = Object.defineProperty;
2
2
  var Nu = (t, e, n) => e in t ? Cu(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var qt = (t, e, n) => Nu(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { jsx as a, jsxs as g, Fragment as Z } from "react/jsx-runtime";
5
- import { E as j, z as gr, B as te, n as Su, u as jo, o as Eu, l as ja, d as _u, G as Wa, s as Ga, v as Es, y as Au, w as $i, g as Tu, i as Bu, h as Iu } from "./register-chai-top-bar-CX_JkRJn.js";
6
- import { noop as kt, get as S, has as de, find as ne, filter as ee, flatten as Ot, map as N, includes as Ie, without as Ru, compact as ho, forEach as br, keys as Ct, isEmpty as $, set as We, unset as Lu, omit as yr, isString as zn, chunk as Pu, values as Tt, pick as mo, startsWith as Re, isFunction as en, isObject as Ou, memoize as Du, each as It, first as ke, findIndex as rr, throttle as Mu, some as $u, uniq as _s, cloneDeep as Yr, isArray as As, isNull as Ts, split as Fu, reject as Hr, take as zu, debounce as Bs, startCase as Jt, isNumber as Hu, parseInt as Vu, isNaN as ju, range as Je, flattenDeep as Rt, toLower as Ua, nth as Fi, findLast as Wu, intersection as Gu, toUpper as Wo, kebabCase as Ka, capitalize as On, groupBy as Ja, sortBy as Uu, round as Ku, reverse as Ju, camelCase as Yu } from "lodash-es";
5
+ import { E as j, z as gr, B as te, n as Su, u as jo, o as Eu, l as Wa, d as _u, G as Ga, s as Ua, v as Es, y as Au, w as Fi, g as Tu, i as Bu, h as Iu } from "./register-chai-top-bar-CX_JkRJn.js";
6
+ import { noop as kt, get as S, has as de, find as ne, filter as ee, flatten as Ot, map as N, includes as Ie, without as Ru, compact as ho, forEach as br, keys as Ct, isEmpty as $, set as We, unset as Lu, omit as yr, isString as zn, chunk as Pu, values as Tt, pick as mo, startsWith as Re, isFunction as en, isObject as Ou, memoize as Du, each as It, first as ke, findIndex as rr, throttle as Mu, some as $u, uniq as _s, cloneDeep as Yr, isArray as As, isNull as Ts, split as Fu, reject as Hr, take as zu, debounce as Bs, startCase as Jt, isNumber as Hu, parseInt as Vu, isNaN as ju, range as Je, flattenDeep as Rt, toLower as Ka, nth as zi, findLast as Wu, intersection as Gu, toUpper as Wo, kebabCase as Ja, capitalize as On, groupBy as Ya, sortBy as Uu, round as Ku, reverse as Ju, camelCase as Yu } from "lodash-es";
7
7
  import * as Ae from "@radix-ui/react-dropdown-menu";
8
- import { ChevronRightIcon as Hn, CheckIcon as xr, CircleIcon as Ya, PinTopIcon as Xu, PinBottomIcon as qu, PinLeftIcon as Zu, PinRightIcon as Qu, GearIcon as ep, DragHandleDots2Icon as Xa, ArrowUpIcon as Qt, PlusIcon as Ye, CopyIcon as Is, TrashIcon as qa, CaretDownIcon as as, Cross1Icon as Xe, FontBoldIcon as tp, FontItalicIcon as Za, UnderlineIcon as Qa, StrikethroughIcon as np, ListBulletIcon as ls, ValueIcon as rp, TextAlignLeftIcon as zi, TextAlignCenterIcon as Hi, TextAlignRightIcon as Vi, Link2Icon as op, LinkBreak2Icon as el, EnterFullScreenIcon as sp, Pencil2Icon as go, MagnifyingGlassIcon as Rs, ChevronLeftIcon as tl, LoopIcon as nl, IdCardIcon as rl, ChevronDownIcon as yn, InfoCircledIcon as Dn, FileIcon as ip, PlusCircledIcon as ol, DotsVerticalIcon as bo, TriangleDownIcon as ap, RowSpacingIcon as lp, Cross2Icon as yo, LetterCaseUppercaseIcon as cp, OverlineIcon as dp, StretchHorizontallyIcon as up, AlignRightIcon as pp, AlignCenterHorizontallyIcon as fp, AlignLeftIcon as hp, ArrowLeftIcon as Yn, ArrowDownIcon as An, ArrowRightIcon as Xn, HeightIcon as rt, WidthIcon as ot, BorderAllIcon as _t, ArrowBottomLeftIcon as mp, ArrowBottomRightIcon as gp, ArrowTopRightIcon as sl, ArrowTopLeftIcon as bp, EyeClosedIcon as Xr, EyeOpenIcon as il, BoxIcon as Ls, MinusIcon as yp, CrossCircledIcon as xp, MobileIcon as ji, LaptopIcon as vp, DesktopIcon as wp, TokensIcon as kp, ChevronUpIcon as Cp, ReloadIcon as Ps, CaretRightIcon as Np, FrameIcon as Sp, SquareIcon as Ep, EraserIcon as al, DownloadIcon as _p, CardStackPlusIcon as Ap, CardStackIcon as Os, ScissorsIcon as Tp, ExclamationTriangleIcon as ll, StackIcon as cl, DoubleArrowDownIcon as Bp, DoubleArrowUpIcon as Ip, ResetIcon as qr, UploadIcon as Rp, TextIcon as Lp, CornerTopRightIcon as Pp, MixerHorizontalIcon as Zr, SunIcon as dl, MoonIcon as ul, FaceIcon as Op, ShuffleIcon as Dp, ChatBubbleIcon as Mp, StopIcon as $p, ZoomInIcon as Fp, DotsHorizontalIcon as zp, LightningBoltIcon as pl } from "@radix-ui/react-icons";
8
+ import { ChevronRightIcon as Hn, CheckIcon as xr, CircleIcon as Xa, PinTopIcon as Xu, PinBottomIcon as qu, PinLeftIcon as Zu, PinRightIcon as Qu, GearIcon as ep, DragHandleDots2Icon as qa, ArrowUpIcon as Qt, PlusIcon as Ye, CopyIcon as Is, TrashIcon as Za, CaretDownIcon as as, Cross1Icon as Xe, FontBoldIcon as tp, FontItalicIcon as Qa, UnderlineIcon as el, StrikethroughIcon as np, ListBulletIcon as ls, ValueIcon as rp, TextAlignLeftIcon as Hi, TextAlignCenterIcon as Vi, TextAlignRightIcon as ji, Link2Icon as op, LinkBreak2Icon as tl, EnterFullScreenIcon as sp, Pencil2Icon as go, MagnifyingGlassIcon as Rs, ChevronLeftIcon as nl, LoopIcon as rl, IdCardIcon as ol, ChevronDownIcon as yn, InfoCircledIcon as Dn, FileIcon as ip, PlusCircledIcon as sl, DotsVerticalIcon as bo, TriangleDownIcon as ap, RowSpacingIcon as lp, Cross2Icon as yo, LetterCaseUppercaseIcon as cp, OverlineIcon as dp, StretchHorizontallyIcon as up, AlignRightIcon as pp, AlignCenterHorizontallyIcon as fp, AlignLeftIcon as hp, ArrowLeftIcon as Yn, ArrowDownIcon as An, ArrowRightIcon as Xn, HeightIcon as rt, WidthIcon as ot, BorderAllIcon as _t, ArrowBottomLeftIcon as mp, ArrowBottomRightIcon as gp, ArrowTopRightIcon as il, ArrowTopLeftIcon as bp, EyeClosedIcon as Xr, EyeOpenIcon as al, BoxIcon as Ls, MinusIcon as yp, CrossCircledIcon as xp, MobileIcon as Wi, LaptopIcon as vp, DesktopIcon as wp, TokensIcon as kp, ChevronUpIcon as Cp, ReloadIcon as Ps, CaretRightIcon as Np, FrameIcon as Sp, SquareIcon as Ep, EraserIcon as ll, DownloadIcon as _p, CardStackPlusIcon as Ap, CardStackIcon as Os, ScissorsIcon as Tp, ExclamationTriangleIcon as cl, StackIcon as dl, DoubleArrowDownIcon as Bp, DoubleArrowUpIcon as Ip, ResetIcon as qr, UploadIcon as Rp, TextIcon as Lp, CornerTopRightIcon as Pp, MixerHorizontalIcon as Zr, SunIcon as ul, MoonIcon as pl, FaceIcon as Op, ShuffleIcon as Dp, ChatBubbleIcon as Mp, StopIcon as $p, ZoomInIcon as Fp, DotsHorizontalIcon as zp, LightningBoltIcon as fl } from "@radix-ui/react-icons";
9
9
  import * as V from "react";
10
- import Q, { useMemo as M, useCallback as L, useState as F, useEffect as H, useRef as le, Component as fl, Children as Hp, memo as xn, createElement as pn, createContext as Ds, useContext as Vn, Suspense as je, lazy as Ms } from "react";
11
- import { e as Fe, b as hl, i as xo, j as $s, a as Wi } from "./core-Dr7QYemB.js";
10
+ import Q, { useMemo as M, useCallback as L, useState as F, useEffect as H, useRef as le, Component as hl, Children as Hp, memo as xn, createElement as pn, createContext as Ds, useContext as Vn, Suspense as je, lazy as Ms } from "react";
11
+ import { e as Fe, b as ml, i as xo, j as $s, a as Gi } from "./core-BvsZwF26.js";
12
12
  import { atom as P, getDefaultStore as Vp, useAtomValue as Ge, useAtom as O, useSetAtom as wt, Provider as jp } from "jotai";
13
- import { g as fn, a as ml, c as ht } from "./common-functions-D2lMFR6K.js";
14
- import { splitAtom as gl, atomWithStorage as Ze, useAtomCallback as Wp } from "jotai/utils";
13
+ import { g as fn, a as gl, c as ht } from "./common-functions-D2lMFR6K.js";
14
+ import { splitAtom as bl, atomWithStorage as Ze, useAtomCallback as Wp } from "jotai/utils";
15
15
  import { useTranslation as U, initReactI18next as Gp } from "react-i18next";
16
- import { C as Lt, f as Up, a as bl, b as Gi, c as Ui, d as Ki, e as Kp, R as or, j as jn, S as Dt, D as Lr, g as Qr, k as Vr } from "./apply-binding-BvWfJCSZ.js";
17
- import { isObject as Ji } from "@rjsf/utils";
18
- import { useDebouncedCallback as Ut, useThrottledCallback as hn, useResizeObserver as cs, useDebouncedState as Yi } from "@react-hookz/web";
19
- import { d as yl, e as xl, a as Jp, p as Yp, g as Xp, f as qp, h as Zp } from "./plugin-C-ht41UZ.js";
20
- import Qp from "tree-model";
21
- import ef from "undo-manager";
16
+ import { C as Lt, R as or, S as Dt, D as Lr, a as Vr } from "./STRINGS-BExFecZW.js";
17
+ import { isObject as Ui } from "@rjsf/utils";
18
+ import { useDebouncedCallback as Ut, useThrottledCallback as hn, useResizeObserver as cs, useDebouncedState as Ki } from "@react-hookz/web";
19
+ import { d as yl, e as Fs, a as Up, p as Kp, g as Jp, f as Yp, h as Xp } from "./plugin-C-ht41UZ.js";
20
+ import qp from "tree-model";
21
+ import Zp from "undo-manager";
22
22
  import * as be from "@radix-ui/react-dialog";
23
- import { cva as Fs } from "class-variance-authority";
23
+ import { f as Qp, a as xl, b as Ji, c as Yi, d as Xi, e as ef, j as jn, g as Qr } from "./apply-binding-CLU6Xp4K.js";
24
+ import { cva as zs } from "class-variance-authority";
24
25
  import * as Mn from "@radix-ui/react-tooltip";
25
26
  import { Command as Qe } from "cmdk";
26
27
  import * as cr from "@radix-ui/react-popover";
@@ -36,7 +37,7 @@ import df from "@tiptap/starter-kit";
36
37
  import uf, { clsx as pf } from "clsx";
37
38
  import { twMerge as wl } from "tailwind-merge";
38
39
  import { HexAlphaColorPicker as ff } from "react-colorful";
39
- import Xi, { createPortal as hf } from "react-dom";
40
+ import qi, { createPortal as hf } from "react-dom";
40
41
  import mf from "@rjsf/core";
41
42
  import gf from "@rjsf/validator-ajv8";
42
43
  import * as mn from "@radix-ui/react-accordion";
@@ -80,7 +81,7 @@ function $n({
80
81
  }
81
82
  );
82
83
  }
83
- const zs = ({
84
+ const Hs = ({
84
85
  className: t = "h-full w-full",
85
86
  onClick: e = kt
86
87
  }) => /* @__PURE__ */ a("svg", { className: t, viewBox: "0 0 256 256", fill: "currentColor", onClick: e, children: /* @__PURE__ */ a("path", { d: "m198.39 128.986-52.16-19.216-19.216-52.16a16 16 0 0 0-30.028 0L77.77 109.77l-52.16 19.216a16 16 0 0 0 0 30.028l52.16 19.216 19.216 52.16a16 16 0 0 0 30.028 0l19.216-52.16 52.16-19.216a16 16 0 0 0 0-30.028m-57.69 34.23a15.97 15.97 0 0 0-9.483 9.483l-19.22 52.152-19.214-52.15a15.97 15.97 0 0 0-9.482-9.484l-52.152-19.22 52.15-19.214a15.97 15.97 0 0 0 9.484-9.482l19.22-52.152 19.214 52.15a15.97 15.97 0 0 0 9.482 9.484l52.152 19.22ZM144 40a8 8 0 0 1 8-8h16V16a8 8 0 0 1 16 0v16h16a8 8 0 0 1 0 16h-16v16a8 8 0 0 1-16 0V48h-16a8 8 0 0 1-8-8m104 48a8 8 0 0 1-8 8h-8v8a8 8 0 0 1-16 0v-8h-8a8 8 0 0 1 0-16h8v-8a8 8 0 0 1 16 0v8h8a8 8 0 0 1 8 8" }) }), Mt = Ae.Root, $t = Ae.Trigger, Lf = V.forwardRef(({ className: t, inset: e, children: n, ...r }, o) => /* @__PURE__ */ g(
@@ -166,7 +167,7 @@ const Of = V.forwardRef(({ className: t, children: e, ...n }, r) => /* @__PURE__
166
167
  ),
167
168
  ...n,
168
169
  children: [
169
- /* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(Ae.ItemIndicator, { children: /* @__PURE__ */ a(Ya, { className: "h-2 w-2 fill-current" }) }) }),
170
+ /* @__PURE__ */ a("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a(Ae.ItemIndicator, { children: /* @__PURE__ */ a(Xa, { className: "h-2 w-2 fill-current" }) }) }),
170
171
  e
171
172
  ]
172
173
  }
@@ -204,23 +205,23 @@ const oe = {
204
205
  }, Df = (t, e) => {
205
206
  const n = Fe(e);
206
207
  return n && n.canBeNested ? n.canBeNested(t) : !0;
207
- }, Hs = (t) => {
208
+ }, Vs = (t) => {
208
209
  const e = Fe(t);
209
210
  return e && e.canDuplicate ? e.canDuplicate() : !0;
210
- }, Vs = (t) => {
211
+ }, js = (t) => {
211
212
  const e = Fe(t);
212
213
  return e && e.canDelete ? e.canDelete() : !0;
213
- }, qi = (t, { dragSource: e, dropTarget: n }) => {
214
+ }, Zi = (t, { dragSource: e, dropTarget: n }) => {
214
215
  const r = S(e, "data._type", ""), o = S(n, "data._type", "");
215
216
  return gt(o, r);
216
217
  };
217
218
  import.meta.vitest && describe("canDropBlock Function", () => {
218
219
  it('should return false if dragSourceType is "Slot"', () => {
219
220
  const t = { data: { _type: "Slot" } }, e = { data: {} };
220
- expect(qi({}, { dragSource: t, dropTarget: e })).toBe(!0);
221
+ expect(Zi({}, { dragSource: t, dropTarget: e })).toBe(!0);
221
222
  }), it("should return true if dropTargetType is empty", () => {
222
223
  const t = { data: { _type: "Box" } }, e = { data: {} };
223
- expect(qi({}, { dragSource: t, dropTarget: e })).toBe(!0);
224
+ expect(Zi({}, { dragSource: t, dropTarget: e })).toBe(!0);
224
225
  });
225
226
  });
226
227
  class Mf {
@@ -254,7 +255,7 @@ function Tl(t, e, n) {
254
255
  });
255
256
  return Ot(o);
256
257
  }
257
- function js(t) {
258
+ function Ws(t) {
258
259
  const e = {};
259
260
  t.forEach((r) => {
260
261
  e[r._id] = { ...r, children: [] };
@@ -277,10 +278,10 @@ const ps = (t, e, n = null) => {
277
278
  $e.debugLabel = "presentBlocksAtom";
278
279
  const Bl = P((t) => {
279
280
  const e = t($e);
280
- return js([...e]);
281
+ return Ws([...e]);
281
282
  });
282
283
  Bl.debugLabel = "treeDSBlocks";
283
- const vr = gl($e);
284
+ const vr = bl($e);
284
285
  vr.debugLabel = "pageBlocksAtomsAtom";
285
286
  const $f = P("");
286
287
  $f.debugLabel = "builderActivePageAtom";
@@ -295,12 +296,12 @@ const zf = P((t) => {
295
296
  zf.debugLabel = "globalBlocksAtom";
296
297
  const Wn = P([]);
297
298
  Wn.debugLabel = "structureErrorsAtom";
298
- const Ws = P(!0);
299
- Ws.debugLabel = "structureValidationValidAtom";
300
- const Gs = P(!1);
301
- Gs.debugLabel = "hasStructureErrorsAtom";
299
+ const Gs = P(!0);
300
+ Gs.debugLabel = "structureValidationValidAtom";
302
301
  const Us = P(!1);
303
- Us.debugLabel = "hasStructureWarningsAtom";
302
+ Us.debugLabel = "hasStructureErrorsAtom";
303
+ const Ks = P(!1);
304
+ Ks.debugLabel = "hasStructureWarningsAtom";
304
305
  const Rl = P((t) => t(Wn).filter((n) => n.severity === "error").length);
305
306
  Rl.debugLabel = "structureErrorCountAtom";
306
307
  const Ll = P((t) => t(Wn).filter((n) => n.severity === "warning").length);
@@ -313,7 +314,7 @@ const Pl = P((t) => {
313
314
  });
314
315
  Pl.debugLabel = "structureErrorsByBlockAtom";
315
316
  const ft = Vp(), Hf = () => ft.get($e), W = (t, e) => {
316
- const n = Ge(Xs);
317
+ const n = Ge(qs);
317
318
  return M(() => S(n, t, e), [n, t, e]);
318
319
  }, Ol = P("");
319
320
  Ol.debugLabel = "selectedLanguageAtom";
@@ -329,22 +330,22 @@ const et = () => {
329
330
  };
330
331
  }, wo = P([]);
331
332
  wo.debugLabel = "selectedBlockIdsAtom";
332
- const Ks = P((t) => {
333
+ const Js = P((t) => {
333
334
  const e = t($e), n = t(wo);
334
335
  return N(
335
336
  ee(e, ({ _id: r }) => Ie(n, r)),
336
337
  (r) => ({ ...r })
337
338
  );
338
339
  });
339
- Ks.debugLabel = "selectedBlocksAtom";
340
+ Js.debugLabel = "selectedBlocksAtom";
340
341
  const ko = P((t) => {
341
- const e = t(Ks);
342
+ const e = t(Js);
342
343
  if (e.length !== 0 && e.length === 1)
343
344
  return e[0];
344
345
  });
345
346
  ko.debugLabel = "selectedBlockAtom";
346
347
  const ce = () => Ge(ko), Vf = (t) => S(t, "_parent", null), jf = P((t) => {
347
- const e = t(Ks), n = N(e, Vf);
348
+ const e = t(Js), n = N(e, Vf);
348
349
  return ee(t($e), (r) => Ie(n, r._id));
349
350
  });
350
351
  jf.debugLabel = "selectedBlocksParentsAtom";
@@ -352,8 +353,8 @@ const Dl = P(() => !1);
352
353
  Dl.debugLabel = "selectedBlockFlexChildAtom";
353
354
  const Ml = P(() => !1);
354
355
  Ml.debugLabel = "selectedBlockGridChildAtom";
355
- const Js = P("");
356
- Js.debugLabel = "styleStateAtom";
356
+ const Ys = P("");
357
+ Ys.debugLabel = "styleStateAtom";
357
358
  const $l = Ze("styleBreakpoint", "xs");
358
359
  $l.debugLabel = "styleBreakpointAtom";
359
360
  const Wf = () => ({
@@ -440,20 +441,20 @@ const Wf = () => ({
440
441
  },
441
442
  [e, n, t]
442
443
  );
443
- }, Ys = P({});
444
- Ys.debugLabel = "blockRepeaterDataAtom";
445
- const Hl = () => O(Ys), Xf = (t, e, n, r) => {
444
+ }, Xs = P({});
445
+ Xs.debugLabel = "blockRepeaterDataAtom";
446
+ const Hl = () => O(Xs), Xf = (t, e, n, r) => {
446
447
  const [o, s] = F({
447
448
  status: "idle",
448
449
  props: {},
449
450
  error: void 0
450
- }), i = zl(), l = W("getBlockAsyncProps", async (f) => ({})), c = wt(Ys), d = JSON.stringify([t == null ? void 0 : t._id, ...Tt(mo(t, n ?? []))]), u = (t == null ? void 0 : t._type) === "Repeater" && Re(t.repeaterItems, `{{${Lt}`), p = (t == null ? void 0 : t._type) !== "Repeater" && e === "live";
451
+ }), i = zl(), l = W("getBlockAsyncProps", async (f) => ({})), c = wt(Xs), d = JSON.stringify([t == null ? void 0 : t._id, ...Tt(mo(t, n ?? []))]), u = (t == null ? void 0 : t._type) === "Repeater" && Re(t.repeaterItems, `{{${Lt}`), p = (t == null ? void 0 : t._type) !== "Repeater" && e === "live";
451
452
  return H(() => {
452
453
  if (e === "mock") {
453
454
  if (en(r)) {
454
455
  s((m) => ({ ...m, status: "loading", props: {} }));
455
456
  const f = r({ block: t });
456
- if (!Ji(f))
457
+ if (!Ui(f))
457
458
  throw new Error("mockDataProvider should return an object");
458
459
  s((m) => ({ ...m, status: "loaded", props: f }));
459
460
  }
@@ -467,7 +468,7 @@ const Hl = () => O(Ys), Xf = (t, e, n, r) => {
467
468
  props: S(f, "items", []),
468
469
  repeaterItems: t.repeaterItems
469
470
  }
470
- })), s((m) => ({ ...m, status: "loaded", props: { totalItems: S(f, "totalItems") } })), i([t._id], { totalItems: S(f, "totalItems") })) : s((m) => ({ ...m, status: "loaded", props: Ji(f) ? f : {} }));
471
+ })), s((m) => ({ ...m, status: "loaded", props: { totalItems: S(f, "totalItems") } })), i([t._id], { totalItems: S(f, "totalItems") })) : s((m) => ({ ...m, status: "loaded", props: Ui(f) ? f : {} }));
471
472
  }).catch((f) => {
472
473
  u ? (c((m) => ({
473
474
  ...m,
@@ -478,8 +479,8 @@ const Hl = () => O(Ys), Xf = (t, e, n, r) => {
478
479
  $loading: S(o, "status") === "loading",
479
480
  ...t ? S(o, "props", {}) : {}
480
481
  };
481
- }, Xs = P(null);
482
- Xs.debugLabel = "chaiBuilderPropsAtom";
482
+ }, qs = P(null);
483
+ qs.debugLabel = "chaiBuilderPropsAtom";
483
484
  const qf = P({});
484
485
  qf.debugLabel = "chaiExternalDataAtom";
485
486
  const Zf = P({});
@@ -488,8 +489,8 @@ const Qf = P({});
488
489
  Qf.debugLabel = "chaiRjsfWidgetsAtom";
489
490
  const eh = P({});
490
491
  eh.debugLabel = "chaiRjsfTemplatesAtom";
491
- const qs = P({});
492
- qs.debugLabel = "chaiPageExternalDataAtom";
492
+ const Zs = P({});
493
+ Zs.debugLabel = "chaiPageExternalDataAtom";
493
494
  const wr = P({});
494
495
  wr.debugLabel = "chaiDesignTokensAtom";
495
496
  const kr = () => {
@@ -499,7 +500,7 @@ const kr = () => {
499
500
  s.status === "loaded" && s.repeaterItems && (r[s.repeaterItems.replace("}}", `/${o}`).replace("{{", "")] = s.props);
500
501
  }), r;
501
502
  }, [t]);
502
- return { ...Ge(qs), ...e };
503
+ return { ...Ge(Zs), ...e };
503
504
  }, Co = P(0), Vl = P({
504
505
  isOpen: !1,
505
506
  blockId: null
@@ -748,12 +749,12 @@ class rh {
748
749
  return this.rules.map((e) => e.name);
749
750
  }
750
751
  }
751
- const Go = new rh(), Zs = (t = {}) => {
752
- const e = W("flags.validateStructure", !0), n = wt(Wn), r = wt(Ws), o = wt(Gs), s = wt(Us), i = L(
752
+ const Go = new rh(), Qs = (t = {}) => {
753
+ const e = W("flags.validateStructure", !0), n = wt(Wn), r = wt(Gs), o = wt(Us), s = wt(Ks), i = L(
753
754
  (c) => {
754
755
  const d = c;
755
756
  if (!e || !d || d.length === 0) return;
756
- const u = js(d), p = [];
757
+ const u = Ws(d), p = [];
757
758
  let h = Go.getRules();
758
759
  t.enableAccessibilityRules && (Go.enableAccessibilityRules(), h = Go.getRules()), t.customRules && t.customRules.length > 0 && h.push(...t.customRules), h.forEach((y) => {
759
760
  try {
@@ -867,7 +868,7 @@ const ih = () => {
867
868
  [t]
868
869
  ) };
869
870
  }, ph = (t = yl) => {
870
- const e = xl;
871
+ const e = Fs;
871
872
  return t.fontFamily && (e.fontFamily = Object.entries(t.fontFamily).reduce(
872
873
  (n, [r, o]) => ({
873
874
  ...n,
@@ -875,7 +876,7 @@ const ih = () => {
875
876
  }),
876
877
  e.fontFamily
877
878
  )), e.borderRadius = t.borderRadius, t.colors && (e.colors = t.colors.reduce((n, r) => (Object.entries(r.items).forEach(([o, s]) => {
878
- n[o] = s;
879
+ o in n && (n[o] = s);
879
880
  }), n), e.colors)), e;
880
881
  }, fh = P({}), No = () => {
881
882
  const t = Cr(), e = M(() => ph(t), [t]), n = W("theme", {}), [r, o] = O(fh);
@@ -902,7 +903,7 @@ const gh = (t, e) => e ? t.some((n) => {
902
903
  }
903
904
  }) : !1, Eo = () => {
904
905
  const [t, e] = O(So), n = W("onSave", async (y) => {
905
- }), r = W("onSaveStateChange", kt), o = dh(), [s] = No(), { hasPermission: i } = bt(), { selectedLang: l, fallbackLang: c } = et(), [d] = uh(), u = Ge(wr), p = Zs(), [, h] = O(Co), f = () => {
906
+ }), r = W("onSaveStateChange", kt), o = dh(), [s] = No(), { hasPermission: i } = bt(), { selectedLang: l, fallbackLang: c } = et(), [d] = uh(), u = Ge(wr), p = Qs(), [, h] = O(Co), f = () => {
906
907
  const y = o();
907
908
  return !l || l === c ? !1 : gh(y.blocks || [], l);
908
909
  };
@@ -1004,18 +1005,18 @@ function yh(t, e, n, r) {
1004
1005
  ];
1005
1006
  }
1006
1007
  function xh(t) {
1007
- return js(t);
1008
+ return Ws(t);
1008
1009
  }
1009
1010
  function vh(t) {
1010
1011
  let e = [];
1011
1012
  return t.walk((n) => (delete n.model.children, e.push(n.model), !0)), e;
1012
1013
  }
1013
- function Zi(t, e) {
1014
+ function Qi(t, e) {
1014
1015
  return t.first((n) => n.model._id === e) || null;
1015
1016
  }
1016
1017
  function wh(t, e, n, r) {
1017
1018
  var d, u;
1018
- const o = Zi(t, e), s = Zi(t, n);
1019
+ const o = Qi(t, e), s = Qi(t, n);
1019
1020
  if (!o || !s) return !1;
1020
1021
  s.children || (s.model.children = []);
1021
1022
  let i = (d = s == null ? void 0 : s.children) == null ? void 0 : d.findIndex((p) => p.model._id === e);
@@ -1080,7 +1081,7 @@ function Nh(t, e, n, r) {
1080
1081
  const o = t.find((d) => d._id === e);
1081
1082
  if (!o) return t;
1082
1083
  let s = kh(t, o);
1083
- const i = n || "root", c = new Qp().parse({ _id: "root", children: xh(s) });
1084
+ const i = n || "root", c = new qp().parse({ _id: "root", children: xh(s) });
1084
1085
  if (wh(c, e, i, r)) {
1085
1086
  let d = vh(c);
1086
1087
  const u = d.find((p) => p._id === e);
@@ -1104,7 +1105,7 @@ const Qn = new BroadcastChannel("chaibuilder"), Kl = () => {
1104
1105
  }, () => {
1105
1106
  Qn.onmessage = null, Qn.onmessageerror = null;
1106
1107
  }), [t, e]);
1107
- }, Qs = (t, e) => {
1108
+ }, ei = (t, e) => {
1108
1109
  let n = [...t], r = [];
1109
1110
  e.forEach((l) => {
1110
1111
  const c = n.find((p) => p._id === l);
@@ -1127,15 +1128,15 @@ const Qn = new BroadcastChannel("chaibuilder"), Kl = () => {
1127
1128
  }
1128
1129
  });
1129
1130
  const o = [...e, ...r], s = [], i = ee(n, (l) => Ie(o, l._id) || Ie(o, l._parent) ? (s.push(l._id), !1) : !0);
1130
- return $(s) ? i : Qs(i, s);
1131
- }, ei = () => {
1131
+ return $(s) ? i : ei(i, s);
1132
+ }, ti = () => {
1132
1133
  const [t] = ue(), [e, n] = re(), { setNewBlocks: r } = He(), { hasPermission: o } = bt();
1133
1134
  return L(
1134
1135
  (s) => {
1135
1136
  var l;
1136
1137
  if (!o(he.DELETE_BLOCK)) return;
1137
1138
  const i = ((l = ne(t, { _id: s[0] })) == null ? void 0 : l._parent) || null;
1138
- r(Qs(t, s)), setTimeout(() => n(i ? [i] : []), 200);
1139
+ r(ei(t, s)), setTimeout(() => n(i ? [i] : []), 200);
1139
1140
  },
1140
1141
  [t, n, e, o]
1141
1142
  );
@@ -1162,7 +1163,7 @@ const Qn = new BroadcastChannel("chaibuilder"), Kl = () => {
1162
1163
  ),
1163
1164
  { store: ft }
1164
1165
  ), Jl = () => {
1165
- const [, t] = ue(), { postMessage: e } = Kl(), n = _h(), r = Zs(), o = Ul();
1166
+ const [, t] = ue(), { postMessage: e } = Kl(), n = _h(), r = Qs(), o = Ul();
1166
1167
  return {
1167
1168
  setNewBlocks: (s) => {
1168
1169
  t(s), e({ type: "blocks-updated", blocks: s });
@@ -1175,7 +1176,7 @@ const Qn = new BroadcastChannel("chaibuilder"), Kl = () => {
1175
1176
  },
1176
1177
  removeBlocks: (s) => {
1177
1178
  t((i) => {
1178
- const l = Qs(i, s);
1179
+ const l = ei(i, s);
1179
1180
  return e({ type: "blocks-updated", blocks: l }), r(l), o(), l;
1180
1181
  });
1181
1182
  },
@@ -1197,7 +1198,7 @@ const Qn = new BroadcastChannel("chaibuilder"), Kl = () => {
1197
1198
  }), e({ type: "blocks-props-updated", blocks: s }), o();
1198
1199
  }
1199
1200
  };
1200
- }, pt = new ef();
1201
+ }, pt = new Zp();
1201
1202
  pt.setLimit(50);
1202
1203
  const Th = P({
1203
1204
  canUndo: !1,
@@ -1342,9 +1343,9 @@ const Th = P({
1342
1343
  height: 0
1343
1344
  });
1344
1345
  let Bn = !1;
1345
- const ti = (t) => {
1346
+ const ni = (t) => {
1346
1347
  Bn = t;
1347
- }, ni = P(0), Ih = P(!1);
1348
+ }, ri = P(0), Ih = P(!1);
1348
1349
  Ih.debugLabel = "readOnlyModeAtom";
1349
1350
  const Rh = P("online");
1350
1351
  Rh.debugLabel = "networkModeAtom";
@@ -1363,8 +1364,8 @@ const Yl = P("");
1363
1364
  Yl.debugLabel = "showPredefinedBlockCategoryAtom";
1364
1365
  const Mh = P(!1);
1365
1366
  Mh.debugLabel = "draggingFlagAtom";
1366
- const ri = P(null);
1367
- ri.debugLabel = "treeRefAtom";
1367
+ const oi = P(null);
1368
+ oi.debugLabel = "treeRefAtom";
1368
1369
  const $h = P({});
1369
1370
  $h.debugLabel = "canvasSettingsAtom";
1370
1371
  const Xl = P(!1);
@@ -1375,10 +1376,10 @@ const zh = Ze("codeEditorHeight", 500);
1375
1376
  zh.debugLabel = "codeEditorHeightAtom";
1376
1377
  const Hh = P([]);
1377
1378
  Hh.debugLabel = "xShowBlocksAtom";
1378
- const oi = Ze("_selectedLibrary", null);
1379
- oi.debugLabel = "selectedLibraryAtom";
1380
- const si = P(!0);
1381
- si.debugLabel = "dataBindingActiveAtom";
1379
+ const si = Ze("_selectedLibrary", null);
1380
+ si.debugLabel = "selectedLibraryAtom";
1381
+ const ii = P(!0);
1382
+ ii.debugLabel = "dataBindingActiveAtom";
1382
1383
  const Gn = () => O(Ao);
1383
1384
  let fe = null, Bt = null;
1384
1385
  function Vh(t, e) {
@@ -1388,7 +1389,7 @@ function Vh(t, e) {
1388
1389
  function Uo() {
1389
1390
  Bt && Bt.parentNode && (Bt.parentNode.removeChild(Bt), Bt = null);
1390
1391
  }
1391
- const ii = () => {
1392
+ const ai = () => {
1392
1393
  const [t] = Gn(), e = M(
1393
1394
  () => {
1394
1395
  var o;
@@ -1415,7 +1416,7 @@ const ii = () => {
1415
1416
  lastDragHighlighted: fe
1416
1417
  };
1417
1418
  }, jh = () => {
1418
- const [, t] = O(_o), [, e] = O(Sr), [n] = Gn(), { clearParentHighlight: r } = ii(), [o, s] = O(ni), i = n == null ? void 0 : n.contentDocument;
1419
+ const [, t] = O(_o), [, e] = O(Sr), [n] = Gn(), { clearParentHighlight: r } = ai(), [o, s] = O(ri), i = n == null ? void 0 : n.contentDocument;
1419
1420
  return L(() => {
1420
1421
  t(null), e({
1421
1422
  isVisible: !1,
@@ -1429,7 +1430,7 @@ const ii = () => {
1429
1430
  height: 0
1430
1431
  }), Wh(i), r(), i && i.querySelectorAll("[data-dragging]").forEach((c) => {
1431
1432
  c.removeAttribute("data-dragging");
1432
- }), ti(!1), s(o + 1);
1433
+ }), ni(!1), s(o + 1);
1433
1434
  }, [t, e, i, r, o, s]);
1434
1435
  };
1435
1436
  function Wh(t) {
@@ -1486,7 +1487,7 @@ const vt = {
1486
1487
  /** Distance from parent edge (in pixels) to trigger parent-level placement */
1487
1488
  PARENT_EDGE_PROXIMITY: 20
1488
1489
  };
1489
- function Qi(t) {
1490
+ function ea(t) {
1490
1491
  try {
1491
1492
  if (t < vt.MIN_SIZE_FOR_EDGE_ZONES)
1492
1493
  return 0;
@@ -1522,7 +1523,7 @@ function Kh(t, e, n, r) {
1522
1523
  return null;
1523
1524
  const s = qh(o, e, n, r);
1524
1525
  if (s) {
1525
- const i = ai(o, s, r);
1526
+ const i = li(o, s, r);
1526
1527
  i.sort((l, c) => {
1527
1528
  const d = l.getBoundingClientRect(), u = c.getBoundingClientRect();
1528
1529
  return r === "vertical" ? d.top - u.top : d.left - u.left;
@@ -1579,7 +1580,7 @@ function Jh(t, e, n, r) {
1579
1580
  function Yh(t, e, n, r, o) {
1580
1581
  const s = t.getBoundingClientRect();
1581
1582
  if (o === "vertical") {
1582
- const l = (n - s.top) / s.height, c = Qi(s.height), d = c / s.height;
1583
+ const l = (n - s.top) / s.height, c = ea(s.height), d = c / s.height;
1583
1584
  return r ? c > 0 && l < d ? {
1584
1585
  position: "before",
1585
1586
  confidence: 1 - l / d
@@ -1600,7 +1601,7 @@ function Yh(t, e, n, r, o) {
1600
1601
  // Higher confidence closer to bottom
1601
1602
  };
1602
1603
  } else {
1603
- const l = (e - s.left) / s.width, c = Qi(s.width), d = c / s.width;
1604
+ const l = (e - s.left) / s.width, c = ea(s.width), d = c / s.width;
1604
1605
  return r ? c > 0 && l < d ? {
1605
1606
  position: "before",
1606
1607
  confidence: 1 - l / d
@@ -1652,7 +1653,7 @@ function Xh(t, e, n, r, o) {
1652
1653
  if (h && !p && jr(t)) {
1653
1654
  const C = Kh(t, e, n, u);
1654
1655
  if (C) {
1655
- const k = C.before.getBoundingClientRect(), w = C.after.getBoundingClientRect(), B = t.getBoundingClientRect(), R = window.getComputedStyle(t), I = parseFloat(R.paddingLeft) || 0, X = parseFloat(R.paddingRight) || 0, K = Gt(t), q = ai(K, C.before, u);
1656
+ const k = C.before.getBoundingClientRect(), w = C.after.getBoundingClientRect(), B = t.getBoundingClientRect(), R = window.getComputedStyle(t), I = parseFloat(R.paddingLeft) || 0, X = parseFloat(R.paddingRight) || 0, K = Gt(t), q = li(K, C.before, u);
1656
1657
  let Ce = 0;
1657
1658
  if (q.forEach((ye) => {
1658
1659
  const xe = ye.getBoundingClientRect();
@@ -1844,7 +1845,7 @@ function ql(t) {
1844
1845
  s.width > n && (n = s.width), s.height > r && (r = s.height);
1845
1846
  }), { maxWidth: n, maxHeight: r };
1846
1847
  }
1847
- function ai(t, e, n) {
1848
+ function li(t, e, n) {
1848
1849
  const r = e.getBoundingClientRect(), o = 5;
1849
1850
  return t.filter((s) => {
1850
1851
  const i = s.getBoundingClientRect();
@@ -1853,7 +1854,7 @@ function ai(t, e, n) {
1853
1854
  }
1854
1855
  function Zh(t, e, n, r, o) {
1855
1856
  var I, X;
1856
- const s = t.getBoundingClientRect(), i = window.getComputedStyle(t), l = ((I = o.defaultView) == null ? void 0 : I.scrollY) || 0, c = ((X = o.defaultView) == null ? void 0 : X.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, b = 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, A = e && parseFloat(window.getComputedStyle(e).paddingTop) || 0, _ = e && parseFloat(window.getComputedStyle(e).paddingBottom) || 0, T = e ? ql(e) : { maxHeight: 0 }, C = e ? gn(e) : "vertical", k = e ? Gt(e) : [], w = ai(k, t, C);
1857
+ const s = t.getBoundingClientRect(), i = window.getComputedStyle(t), l = ((I = o.defaultView) == null ? void 0 : I.scrollY) || 0, c = ((X = o.defaultView) == null ? void 0 : X.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, b = 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, A = e && parseFloat(window.getComputedStyle(e).paddingTop) || 0, _ = e && parseFloat(window.getComputedStyle(e).paddingBottom) || 0, T = e ? ql(e) : { maxHeight: 0 }, C = e ? gn(e) : "vertical", k = e ? Gt(e) : [], w = li(k, t, C);
1857
1858
  let B = 0, R = 0;
1858
1859
  if (w.forEach((K) => {
1859
1860
  const q = K.getBoundingClientRect();
@@ -1936,7 +1937,7 @@ const Qh = 100, wn = () => {
1936
1937
  const b = s.blocks;
1937
1938
  return r(b, i ?? void 0, l);
1938
1939
  }
1939
- const c = fn(), d = hl(s.type), u = {
1940
+ const c = fn(), d = ml(s.type), u = {
1940
1941
  _type: s.type,
1941
1942
  _id: c,
1942
1943
  ...d,
@@ -1973,10 +1974,10 @@ const Nt = () => {
1973
1974
  }, Er = P([]);
1974
1975
  Er.debugLabel = "selectedStylingBlocksAtom";
1975
1976
  const De = () => O(Er), em = () => {
1976
- const [t, e] = O(_o), [n, r] = O(Sr), [o] = ue(), [s] = Gn(), { addCoreBlock: i } = wn(), { moveBlocks: l } = He(), [, c] = re(), [, d] = De(), { clearHighlight: u } = Nt(), { clearParentHighlight: p } = ii(), [h, f] = O(ni), m = Ft(), b = s == null ? void 0 : s.contentDocument;
1977
+ const [t, e] = O(_o), [n, r] = O(Sr), [o] = ue(), [s] = Gn(), { addCoreBlock: i } = wn(), { moveBlocks: l } = He(), [, c] = re(), [, d] = De(), { clearHighlight: u } = Nt(), { clearParentHighlight: p } = ai(), [h, f] = O(ri), m = Ft(), b = s == null ? void 0 : s.contentDocument;
1977
1978
  return L(
1978
1979
  (y) => {
1979
- if (y.preventDefault(), y.stopPropagation(), ti(!1), nm(b), ea(b), p(), r({
1980
+ if (y.preventDefault(), y.stopPropagation(), ni(!1), nm(b), ta(b), p(), r({
1980
1981
  isVisible: !1,
1981
1982
  isValid: !1,
1982
1983
  position: "inside",
@@ -1987,7 +1988,7 @@ const De = () => O(Er), em = () => {
1987
1988
  width: 0,
1988
1989
  height: 0
1989
1990
  }), setTimeout(() => {
1990
- p(), ea(b), r({
1991
+ p(), ta(b), r({
1991
1992
  isVisible: !1,
1992
1993
  isValid: !1,
1993
1994
  position: "inside",
@@ -2096,7 +2097,7 @@ function tm(t, e, n, r, o) {
2096
2097
  };
2097
2098
  }
2098
2099
  }
2099
- function ea(t) {
2100
+ function ta(t) {
2100
2101
  if (!t) return;
2101
2102
  t.querySelectorAll("[data-drop-target]").forEach((n) => n.removeAttribute("data-drop-target"));
2102
2103
  }
@@ -2154,7 +2155,7 @@ const om = [
2154
2155
  /** Minimum scroll speed in pixels per frame */
2155
2156
  MIN_SCROLL_SPEED: 10
2156
2157
  }, sm = () => {
2157
- const [t] = O(_o), [e] = Gn(), [, n] = O(Sr), { clearParentHighlight: r, highlightParent: o } = ii(), [s] = ue(), i = e == null ? void 0 : e.contentDocument, l = le(null), c = le(0), d = L(
2158
+ const [t] = O(_o), [e] = Gn(), [, n] = O(Sr), { clearParentHighlight: r, highlightParent: o } = ai(), [s] = ue(), i = e == null ? void 0 : e.contentDocument, l = le(null), c = le(0), d = L(
2158
2159
  (p) => {
2159
2160
  if (!(i != null && i.defaultView)) return;
2160
2161
  const h = i.defaultView, f = h.innerHeight, m = h.scrollY, b = i.documentElement.scrollHeight;
@@ -2308,7 +2309,7 @@ function lm(t) {
2308
2309
  const o = document.createElement("span");
2309
2310
  return o.className = "text-[10px] font-medium text-blue-600 whitespace-nowrap", o.textContent = t.label || t.type || t._name || t._type || "Block", e.appendChild(r), e.appendChild(o), document.body.appendChild(e), e;
2310
2311
  }
2311
- function ta(t) {
2312
+ function na(t) {
2312
2313
  t && t.parentNode && t.parentNode.removeChild(t);
2313
2314
  }
2314
2315
  const cm = () => {
@@ -2316,7 +2317,7 @@ const cm = () => {
2316
2317
  return L(
2317
2318
  (i, l, c = !0) => {
2318
2319
  var u;
2319
- s.current && (ta(s.current), s.current = null);
2320
+ s.current && (na(s.current), s.current = null);
2320
2321
  const d = c ? mo(l, ["type", "blocks", "partialBlockId"]) : l;
2321
2322
  if (r(d), i.dataTransfer.setData("text/plain", JSON.stringify({ block: d })), i.dataTransfer.effectAllowed = "move", !c && l._id) {
2322
2323
  const p = (u = document.getElementById("canvas-iframe")) == null ? void 0 : u.contentDocument;
@@ -2333,10 +2334,10 @@ const cm = () => {
2333
2334
  if (l != null && l._type || l != null && l.type) {
2334
2335
  const p = lm(l);
2335
2336
  s.current = p, i.dataTransfer.setDragImage(p, 0, 0), setTimeout(() => {
2336
- s.current && (ta(s.current), s.current = null);
2337
+ s.current && (na(s.current), s.current = null);
2337
2338
  }, 50);
2338
2339
  }
2339
- t([]), n(), e([]), me.publish(oe.CLOSE_ADD_BLOCK), ti(!0), o({
2340
+ t([]), n(), e([]), me.publish(oe.CLOSE_ADD_BLOCK), ni(!0), o({
2340
2341
  isVisible: !0,
2341
2342
  isValid: !0,
2342
2343
  position: "inside",
@@ -2371,7 +2372,7 @@ const cm = () => {
2371
2372
  let tc, nc;
2372
2373
  typeof document < "u" && (tc = document);
2373
2374
  typeof window < "u" && (nc = window);
2374
- const rc = Q.createContext({ document: tc, window: nc }), St = () => Q.useContext(rc), { Provider: um, Consumer: R1 } = rc, pm = [
2375
+ const rc = Q.createContext({ document: tc, window: nc }), St = () => Q.useContext(rc), { Provider: um, Consumer: L1 } = rc, pm = [
2375
2376
  { ControlIcon: Xu, dir: "VERTICAL", key: "UP" },
2376
2377
  { ControlIcon: qu, dir: "VERTICAL", key: "DOWN" },
2377
2378
  { ControlIcon: Zu, dir: "HORIZONTAL", key: "LEFT" },
@@ -2417,7 +2418,7 @@ const rc = Q.createContext({ document: tc, window: nc }), St = () => Q.useContex
2417
2418
  },
2418
2419
  d
2419
2420
  )) });
2420
- }, li = () => {
2421
+ }, ci = () => {
2421
2422
  const [t] = ue(), [, e] = re(), { addBlocks: n } = He();
2422
2423
  return L(
2423
2424
  (r, o = null) => {
@@ -2448,10 +2449,10 @@ const kn = () => {
2448
2449
  };
2449
2450
  }, lc = P("outline");
2450
2451
  lc.debugLabel = "sidebarActivePanelAtom";
2451
- const ci = () => O(lc), bm = ({ blockId: t, className: e }) => /* @__PURE__ */ a(ep, { className: e, onClick: () => {
2452
+ const di = () => O(lc), bm = ({ blockId: t, className: e }) => /* @__PURE__ */ a(ep, { className: e, onClick: () => {
2452
2453
  t && me.publish(oe.GOTO_BLOCK_SETTINGS, t);
2453
2454
  } }), ym = P(0), cc = P(0);
2454
- function di(t) {
2455
+ function ui(t) {
2455
2456
  if (t.getAttribute("data-block-id") === "canvas")
2456
2457
  return null;
2457
2458
  if (t.getAttribute("data-block-id") || t.getAttribute("data-block-parent"))
@@ -2476,7 +2477,7 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2476
2477
  (r) => {
2477
2478
  var l;
2478
2479
  if (r == null || r.preventDefault(), r == null || r.stopPropagation(), t) return;
2479
- const o = di(r.target);
2480
+ const o = ui(r.target);
2480
2481
  if (!o || !wm(o) || dc(o)) return;
2481
2482
  const s = o.getAttribute("data-block-id");
2482
2483
  if (!s) return;
@@ -2493,7 +2494,7 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2493
2494
  (o) => {
2494
2495
  if (t) return;
2495
2496
  o.stopPropagation();
2496
- const s = di(o.target);
2497
+ const s = ui(o.target);
2497
2498
  if (!s) {
2498
2499
  e(), n([]), me.publish(oe.CANVAS_BLOCK_SELECTED, []);
2499
2500
  return;
@@ -2520,7 +2521,7 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2520
2521
  return hn(
2521
2522
  (n) => {
2522
2523
  if (t) return;
2523
- const r = di(n.target);
2524
+ const r = ui(n.target);
2524
2525
  r && e(r);
2525
2526
  },
2526
2527
  [t, e],
@@ -2582,7 +2583,7 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2582
2583
  }
2583
2584
  );
2584
2585
  }, Tm = ({ block: t, isDragging: e, selectedBlockElement: n }) => {
2585
- const r = ei(), o = li(), [, s] = re(), [, i] = sc(), [, l] = De(), { hasPermission: c } = bt(), { editingBlockId: d } = kn(), { document: u } = St(), p = yt(), h = W("flags.gotoSettings", !1), { floatingStyles: f, refs: m, update: b } = Bf({
2586
+ const r = ti(), o = ci(), [, s] = re(), [, i] = sc(), [, l] = De(), { hasPermission: c } = bt(), { editingBlockId: d } = kn(), { document: u } = St(), p = yt(), h = W("flags.gotoSettings", !1), { floatingStyles: f, refs: m, update: b } = Bf({
2586
2587
  placement: "top-start",
2587
2588
  middleware: [
2588
2589
  If({
@@ -2619,7 +2620,7 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2619
2620
  E && clearTimeout(E);
2620
2621
  });
2621
2622
  }, [n, t == null ? void 0 : t._id]);
2622
- const [, v] = ci();
2623
+ const [, v] = di();
2623
2624
  return !e && (!n || !t || d) ? null : /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ a(
2624
2625
  "div",
2625
2626
  {
@@ -2637,7 +2638,7 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2637
2638
  className: `isolate z-[999] flex h-6 items-center justify-between bg-blue-500 py-2 text-xs text-white ${e ? "opacity-0" : ""}`,
2638
2639
  children: /* @__PURE__ */ g(Z, { children: [
2639
2640
  /* @__PURE__ */ g("div", { className: "flex items-center", children: [
2640
- p && /* @__PURE__ */ a(Xa, { className: "flex-shrink-0 cursor-grab rounded p-0.5 hover:bg-white/20 active:cursor-grabbing" }),
2641
+ p && /* @__PURE__ */ a(qa, { className: "flex-shrink-0 cursor-grab rounded p-0.5 hover:bg-white/20 active:cursor-grabbing" }),
2641
2642
  y && /* @__PURE__ */ a(
2642
2643
  Qt,
2643
2644
  {
@@ -2651,7 +2652,7 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2651
2652
  /* @__PURE__ */ a("div", { className: `w-full ${p ? "cursor-grab active:cursor-grabbing" : ""}`, children: /* @__PURE__ */ a("div", { className: "mr-10 w-full items-center space-x-1 px-1 leading-tight", children: x }) }),
2652
2653
  /* @__PURE__ */ g("div", { className: "flex items-center gap-1 pl-1 pr-1.5", children: [
2653
2654
  c(he.ADD_BLOCK) && /* @__PURE__ */ a(
2654
- zs,
2655
+ Hs,
2655
2656
  {
2656
2657
  className: "h-4 w-4 rounded hover:bg-white hover:text-blue-500",
2657
2658
  onClick: () => {
@@ -2667,15 +2668,15 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2667
2668
  }
2668
2669
  ),
2669
2670
  !p && /* @__PURE__ */ a(Bh, { block: t, children: /* @__PURE__ */ a(Ye, { className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500" }) }),
2670
- Hs(S(t, "_type", "")) && c(he.ADD_BLOCK) ? /* @__PURE__ */ a(
2671
+ Vs(S(t, "_type", "")) && c(he.ADD_BLOCK) ? /* @__PURE__ */ a(
2671
2672
  Is,
2672
2673
  {
2673
2674
  className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500",
2674
2675
  onClick: () => o([t == null ? void 0 : t._id])
2675
2676
  }
2676
2677
  ) : null,
2677
- Vs(S(t, "_type", "")) && c(he.DELETE_BLOCK) ? /* @__PURE__ */ a(
2678
- qa,
2678
+ js(S(t, "_type", "")) && c(he.DELETE_BLOCK) ? /* @__PURE__ */ a(
2679
+ Za,
2679
2680
  {
2680
2681
  className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500",
2681
2682
  onClick: () => r([t == null ? void 0 : t._id])
@@ -2811,7 +2812,7 @@ const xm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], vm = (t)
2811
2812
  <div class="frame-root h-full"></div>
2812
2813
  </body>
2813
2814
  </html>`;
2814
- class Im extends fl {
2815
+ class Im extends hl {
2815
2816
  componentDidMount() {
2816
2817
  this.props.contentDidMount();
2817
2818
  }
@@ -2822,7 +2823,7 @@ class Im extends fl {
2822
2823
  return Hp.only(this.props.children);
2823
2824
  }
2824
2825
  }
2825
- class pc extends fl {
2826
+ class pc extends hl {
2826
2827
  constructor(n, r) {
2827
2828
  super(n, r);
2828
2829
  qt(this, "setRef", (n) => {
@@ -2860,7 +2861,7 @@ class pc extends fl {
2860
2861
  if (!n)
2861
2862
  return null;
2862
2863
  const r = this.props.contentDidMount, o = this.props.contentDidUpdate, s = n.defaultView || n.parentView, i = /* @__PURE__ */ a(Im, { contentDidMount: r, contentDidUpdate: o, children: /* @__PURE__ */ a(um, { value: { document: n, window: s }, children: /* @__PURE__ */ a("div", { className: "frame-content", children: this.props.children }) }) }), l = this.getMountTarget();
2863
- return [Xi.createPortal(this.props.head, this.getDoc().head), Xi.createPortal(i, l)];
2864
+ return [qi.createPortal(this.props.head, this.getDoc().head), qi.createPortal(i, l)];
2864
2865
  }
2865
2866
  render() {
2866
2867
  const n = {
@@ -2891,7 +2892,7 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
2891
2892
  [e, n]
2892
2893
  );
2893
2894
  return [t, r];
2894
- }, hc = P({}), Lm = P({}), ui = () => {
2895
+ }, hc = P({}), Lm = P({}), pi = () => {
2895
2896
  const [t, e] = O(hc), n = L((o) => S(t, o, []), [t]), r = L(() => e({}), [e]);
2896
2897
  return { getPartailBlocks: n, reset: r };
2897
2898
  }, Pm = () => {
@@ -2932,7 +2933,7 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
2932
2933
  l();
2933
2934
  }, []), { data: o, isLoading: t, refetch: l, error: n };
2934
2935
  }, gc = P([]), bc = () => {
2935
- const [t] = ue(), [e, n] = O(gc), r = wt(fc), { getPartailBlocks: o } = ui(), s = W("flags.copyPaste", !0), i = L(
2936
+ const [t] = ue(), [e, n] = O(gc), r = wt(fc), { getPartailBlocks: o } = pi(), s = W("flags.copyPaste", !0), i = L(
2936
2937
  (c) => c.some((d) => ps(t, d, null).some((p) => p._type === "PartialBlock" || p._type === "GlobalBlock")),
2937
2938
  [t]
2938
2939
  ), l = L(
@@ -2997,7 +2998,7 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
2997
2998
  },
2998
2999
  [e, t]
2999
3000
  );
3000
- }, pi = () => {
3001
+ }, fi = () => {
3001
3002
  const [t, e] = To(), n = Mm(), { addPredefinedBlock: r } = wn(), o = Dm();
3002
3003
  return {
3003
3004
  canPaste: L(
@@ -3065,7 +3066,7 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
3065
3066
  )
3066
3067
  };
3067
3068
  }, yc = (t) => {
3068
- const [e, n] = re(), r = ce(), o = ei(), s = li(), { undo: i, redo: l } = Nr(), [, c] = To(), [, d] = bc(), { canPaste: u, pasteBlocks: p } = pi(), h = t ? { document: t } : {};
3069
+ const [e, n] = re(), r = ce(), o = ti(), s = ci(), { undo: i, redo: l } = Nr(), [, c] = To(), [, d] = bc(), { canPaste: u, pasteBlocks: p } = fi(), h = t ? { document: t } : {};
3069
3070
  xt(
3070
3071
  "ctrl+z,meta+z",
3071
3072
  (f) => {
@@ -3107,7 +3108,7 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
3107
3108
  ), xt(
3108
3109
  "del, backspace",
3109
3110
  (f) => {
3110
- f.preventDefault(), Vs(S(r, "_type", "")) && o(e);
3111
+ f.preventDefault(), js(S(r, "_type", "")) && o(e);
3111
3112
  },
3112
3113
  h,
3113
3114
  [e, o]
@@ -3138,7 +3139,7 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
3138
3139
  /* @__PURE__ */ a("br", {})
3139
3140
  ] }) : null;
3140
3141
  }, xc = ({ theme: t }) => {
3141
- const e = M(() => Jp(t), [t]);
3142
+ const e = M(() => Up(t), [t]);
3142
3143
  return /* @__PURE__ */ a("style", { id: "chai-theme", children: e });
3143
3144
  }, vc = Ze("darkMode", !1), _r = () => {
3144
3145
  const [t, e] = O(vc);
@@ -3159,7 +3160,7 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
3159
3160
  "2xl": "1400px"
3160
3161
  }
3161
3162
  },
3162
- ...Xp(e)
3163
+ ...Jp(e)
3163
3164
  }
3164
3165
  },
3165
3166
  plugins: [
@@ -3167,7 +3168,7 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
3167
3168
  Nf,
3168
3169
  kf,
3169
3170
  Cf,
3170
- Yp(function({ addBase: s, theme: i }) {
3171
+ Kp(function({ addBase: s, theme: i }) {
3171
3172
  s({
3172
3173
  "h1,h2,h3,h4,h5,h6": {
3173
3174
  fontFamily: i("fontFamily.heading")
@@ -3205,10 +3206,10 @@ const Rm = Q.forwardRef((t, e) => /* @__PURE__ */ a(pc, { ...t, forwardedRef: e
3205
3206
  };
3206
3207
  return e.filter((l) => l.family === s || l.family === i);
3207
3208
  }, [t == null ? void 0 : t.fontFamily, e]), r = M(
3208
- () => qp(ee(n, (s) => de(s, "url"))),
3209
+ () => Yp(ee(n, (s) => de(s, "url"))),
3209
3210
  [n]
3210
3211
  ), o = M(
3211
- () => Zp(ee(n, (s) => de(s, "src"))),
3212
+ () => Xp(ee(n, (s) => de(s, "src"))),
3212
3213
  [n]
3213
3214
  );
3214
3215
  return /* @__PURE__ */ g(Z, { children: [
@@ -3298,7 +3299,7 @@ function Te(...t) {
3298
3299
  return wl(pf(t));
3299
3300
  }
3300
3301
  Ze("chai-builder-blocks", []);
3301
- const Xm = Ze("chai-builder-theme", {});
3302
+ const Xm = Ze("chai-builder-theme", Fs);
3302
3303
  Ze("chai-builder-design-tokens", {});
3303
3304
  Ze("chai-builder-ai-context", "");
3304
3305
  const hs = ({
@@ -3366,7 +3367,7 @@ const hs = ({
3366
3367
  "bg-blue-500 text-white": o && r,
3367
3368
  "bg-white text-blue-500": o && !r
3368
3369
  };
3369
- }, na = ({ themeColors: t, onClose: e, color: n, onChange: r, onRemove: o }) => /* @__PURE__ */ g(Z, { children: [
3370
+ }, ra = ({ themeColors: t, onClose: e, color: n, onChange: r, onRemove: o }) => /* @__PURE__ */ g(Z, { children: [
3370
3371
  /* @__PURE__ */ a("div", { className: "flex w-[180px] flex-wrap gap-1 pb-2", children: (t == null ? void 0 : t.length) > 0 && _s(t).map((s) => {
3371
3372
  var i;
3372
3373
  return /* @__PURE__ */ a(
@@ -3444,7 +3445,7 @@ const hs = ({
3444
3445
  )
3445
3446
  ] }),
3446
3447
  p === "TEXT" ? /* @__PURE__ */ a(
3447
- na,
3448
+ ra,
3448
3449
  {
3449
3450
  themeColors: u,
3450
3451
  onClose: i,
@@ -3453,7 +3454,7 @@ const hs = ({
3453
3454
  onRemove: o
3454
3455
  }
3455
3456
  ) : /* @__PURE__ */ a(
3456
- na,
3457
+ ra,
3457
3458
  {
3458
3459
  themeColors: u,
3459
3460
  onClose: i,
@@ -3465,7 +3466,7 @@ const hs = ({
3465
3466
  ] });
3466
3467
  }, Qm = ({ editor: t, from: e, menuRef: n }) => {
3467
3468
  var v, E;
3468
- const r = (v = t == null ? void 0 : t.getAttributes("textStyle")) == null ? void 0 : v.color, o = (E = t == null ? void 0 : t.getAttributes("highlight")) == null ? void 0 : E.color, [s, i] = F(r || "#000000F2"), [l, c] = F(o || "#00000057"), [d, u] = Yi(s, 150), [p, h] = Yi(l, 150), f = (A, _) => {
3469
+ const r = (v = t == null ? void 0 : t.getAttributes("textStyle")) == null ? void 0 : v.color, o = (E = t == null ? void 0 : t.getAttributes("highlight")) == null ? void 0 : E.color, [s, i] = F(r || "#000000F2"), [l, c] = F(o || "#00000057"), [d, u] = Ki(s, 150), [p, h] = Ki(l, 150), f = (A, _) => {
3469
3470
  _ ? (i(A), u(A)) : (t == null || t.chain().setColor(A).run(), i(A));
3470
3471
  }, m = (A, _) => {
3471
3472
  _ ? (c(A), h(A)) : (t == null || t.chain().setHighlight({ color: A }).run(), c(A));
@@ -3556,7 +3557,7 @@ const hs = ({
3556
3557
  onClick: () => t.chain().focus().toggleItalic().run(),
3557
3558
  className: Te("", Ke(t, ["italic"], e)),
3558
3559
  title: "Italic",
3559
- children: /* @__PURE__ */ a(Za, { className: "h-4 w-4" })
3560
+ children: /* @__PURE__ */ a(Qa, { className: "h-4 w-4" })
3560
3561
  }
3561
3562
  ),
3562
3563
  /* @__PURE__ */ a(
@@ -3566,7 +3567,7 @@ const hs = ({
3566
3567
  onClick: () => t.chain().focus().toggleUnderline().run(),
3567
3568
  className: Te("", Ke(t, ["underline"], e)),
3568
3569
  title: "Underline",
3569
- children: /* @__PURE__ */ a(Qa, { className: "h-4 w-4" })
3570
+ children: /* @__PURE__ */ a(el, { className: "h-4 w-4" })
3570
3571
  }
3571
3572
  ),
3572
3573
  /* @__PURE__ */ a(
@@ -3656,7 +3657,7 @@ const hs = ({
3656
3657
  ),
3657
3658
  title: "Text Alignment",
3658
3659
  children: [
3659
- t.isActive({ textAlign: "center" }) ? /* @__PURE__ */ a(Hi, { className: "h-4 w-4" }) : t.isActive({ textAlign: "right" }) ? /* @__PURE__ */ a(Vi, { className: "h-4 w-4" }) : /* @__PURE__ */ a(zi, { className: "h-4 w-4" }),
3660
+ t.isActive({ textAlign: "center" }) ? /* @__PURE__ */ a(Vi, { className: "h-4 w-4" }) : t.isActive({ textAlign: "right" }) ? /* @__PURE__ */ a(ji, { className: "h-4 w-4" }) : /* @__PURE__ */ a(Hi, { className: "h-4 w-4" }),
3660
3661
  /* @__PURE__ */ a(as, { className: "h-3 w-3 opacity-50" })
3661
3662
  ]
3662
3663
  }
@@ -3673,7 +3674,7 @@ const hs = ({
3673
3674
  Ke(t, t.isActive({ textAlign: "left" }), e)
3674
3675
  ),
3675
3676
  children: [
3676
- /* @__PURE__ */ a(zi, { className: "h-4 w-4" }),
3677
+ /* @__PURE__ */ a(Hi, { className: "h-4 w-4" }),
3677
3678
  " Align Left"
3678
3679
  ]
3679
3680
  }
@@ -3689,7 +3690,7 @@ const hs = ({
3689
3690
  Ke(t, t.isActive({ textAlign: "center" }), e)
3690
3691
  ),
3691
3692
  children: [
3692
- /* @__PURE__ */ a(Hi, { className: "h-4 w-4" }),
3693
+ /* @__PURE__ */ a(Vi, { className: "h-4 w-4" }),
3693
3694
  " Align Center"
3694
3695
  ]
3695
3696
  }
@@ -3705,7 +3706,7 @@ const hs = ({
3705
3706
  Ke(t, t.isActive({ textAlign: "right" }), e)
3706
3707
  ),
3707
3708
  children: [
3708
- /* @__PURE__ */ a(Vi, { className: "h-4 w-4" }),
3709
+ /* @__PURE__ */ a(ji, { className: "h-4 w-4" }),
3709
3710
  " Align Right"
3710
3711
  ]
3711
3712
  }
@@ -3721,7 +3722,7 @@ const hs = ({
3721
3722
  className: Te("", Ke(t, ["link"], e)),
3722
3723
  title: "Remove Link",
3723
3724
  disabled: !t.isActive("link"),
3724
- children: /* @__PURE__ */ a(el, { className: "h-3.5 w-3.5" })
3725
+ children: /* @__PURE__ */ a(tl, { className: "h-3.5 w-3.5" })
3725
3726
  }
3726
3727
  ) : /* @__PURE__ */ a(
3727
3728
  "button",
@@ -4686,7 +4687,7 @@ class dr {
4686
4687
  @internal
4687
4688
  */
4688
4689
  static resolveCached(e, n) {
4689
- let r = ra.get(e);
4690
+ let r = oa.get(e);
4690
4691
  if (r)
4691
4692
  for (let s = 0; s < r.elts.length; s++) {
4692
4693
  let i = r.elts[s];
@@ -4694,7 +4695,7 @@ class dr {
4694
4695
  return i;
4695
4696
  }
4696
4697
  else
4697
- ra.set(e, r = new ng());
4698
+ oa.set(e, r = new ng());
4698
4699
  let o = r.elts[r.i] = dr.resolve(e, n);
4699
4700
  return r.i = (r.i + 1) % rg, o;
4700
4701
  }
@@ -4704,7 +4705,7 @@ class ng {
4704
4705
  this.elts = [], this.i = 0;
4705
4706
  }
4706
4707
  }
4707
- const rg = 12, ra = /* @__PURE__ */ new WeakMap();
4708
+ const rg = 12, oa = /* @__PURE__ */ new WeakMap();
4708
4709
  class oo {
4709
4710
  /**
4710
4711
  Construct a node range. `$from` and `$to` should point into the
@@ -5365,14 +5366,14 @@ function ag(t) {
5365
5366
  break;
5366
5367
  return e;
5367
5368
  }
5368
- function oa(t) {
5369
+ function sa(t) {
5369
5370
  /\D/.test(t.next) && t.err("Expected number, got '" + t.next + "'");
5370
5371
  let e = Number(t.next);
5371
5372
  return t.pos++, e;
5372
5373
  }
5373
5374
  function lg(t, e) {
5374
- let n = oa(t), r = n;
5375
- return t.eat(",") && (t.next != "}" ? r = oa(t) : r = -1), t.eat("}") || t.err("Unclosed braced range"), { type: "range", min: n, max: r, expr: e };
5375
+ let n = sa(t), r = n;
5376
+ return t.eat(",") && (t.next != "}" ? r = sa(t) : r = -1), t.eat("}") || t.err("Unclosed braced range"), { type: "range", min: n, max: r, expr: e };
5376
5377
  }
5377
5378
  function cg(t, e) {
5378
5379
  let n = t.nodeTypes, r = n[e];
@@ -5453,7 +5454,7 @@ function ug(t) {
5453
5454
  function Rc(t, e) {
5454
5455
  return e - t;
5455
5456
  }
5456
- function sa(t, e) {
5457
+ function ia(t, e) {
5457
5458
  let n = [];
5458
5459
  return r(e), n.sort(Rc);
5459
5460
  function r(o) {
@@ -5469,7 +5470,7 @@ function sa(t, e) {
5469
5470
  }
5470
5471
  function pg(t) {
5471
5472
  let e = /* @__PURE__ */ Object.create(null);
5472
- return n(sa(t, 0));
5473
+ return n(ia(t, 0));
5473
5474
  function n(r) {
5474
5475
  let o = [];
5475
5476
  r.forEach((i) => {
@@ -5479,7 +5480,7 @@ function pg(t) {
5479
5480
  let d;
5480
5481
  for (let u = 0; u < o.length; u++)
5481
5482
  o[u][0] == l && (d = o[u][1]);
5482
- sa(t, c).forEach((u) => {
5483
+ ia(t, c).forEach((u) => {
5483
5484
  d || o.push([l, d = []]), d.indexOf(u) == -1 && d.push(u);
5484
5485
  });
5485
5486
  });
@@ -5738,7 +5739,7 @@ class mg {
5738
5739
  return !this.hasDefault;
5739
5740
  }
5740
5741
  }
5741
- class fi {
5742
+ class hi {
5742
5743
  /**
5743
5744
  @internal
5744
5745
  */
@@ -5760,7 +5761,7 @@ class fi {
5760
5761
  */
5761
5762
  static compile(e, n) {
5762
5763
  let r = /* @__PURE__ */ Object.create(null), o = 0;
5763
- return e.forEach((s, i) => r[s] = new fi(s, o++, n, i)), r;
5764
+ return e.forEach((s, i) => r[s] = new hi(s, o++, n, i)), r;
5764
5765
  }
5765
5766
  /**
5766
5767
  When there is a mark of this type in the given set, a new set
@@ -5802,7 +5803,7 @@ class gg {
5802
5803
  let n = this.spec = {};
5803
5804
  for (let o in e)
5804
5805
  n[o] = e[o];
5805
- n.nodes = Pe.from(e.nodes), n.marks = Pe.from(e.marks || {}), this.nodes = io.compile(this.spec.nodes, this), this.marks = fi.compile(this.spec.marks, this);
5806
+ n.nodes = Pe.from(e.nodes), n.marks = Pe.from(e.marks || {}), this.nodes = io.compile(this.spec.nodes, this), this.marks = hi.compile(this.spec.marks, this);
5806
5807
  let r = /* @__PURE__ */ Object.create(null);
5807
5808
  for (let o in this.nodes) {
5808
5809
  if (o in this.marks)
@@ -5815,11 +5816,11 @@ class gg {
5815
5816
  throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");
5816
5817
  this.linebreakReplacement = s;
5817
5818
  }
5818
- s.markSet = l == "_" ? null : l ? ia(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
5819
+ s.markSet = l == "_" ? null : l ? aa(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
5819
5820
  }
5820
5821
  for (let o in this.marks) {
5821
5822
  let s = this.marks[o], i = s.spec.excludes;
5822
- s.excluded = i == null ? [s] : i == "" ? [] : ia(this, i.split(" "));
5823
+ s.excluded = i == null ? [s] : i == "" ? [] : aa(this, i.split(" "));
5823
5824
  }
5824
5825
  this.nodeFromJSON = (o) => un.fromJSON(this, o), this.markFromJSON = (o) => ie.fromJSON(this, o), this.topNodeType = this.nodes[this.spec.topNode || "doc"], this.cached.wrappings = /* @__PURE__ */ Object.create(null);
5825
5826
  }
@@ -5862,7 +5863,7 @@ class gg {
5862
5863
  return n;
5863
5864
  }
5864
5865
  }
5865
- function ia(t, e) {
5866
+ function aa(t, e) {
5866
5867
  let n = [];
5867
5868
  for (let r = 0; r < e.length; r++) {
5868
5869
  let o = e[r], s = t.marks[o], i = s;
@@ -5910,7 +5911,7 @@ class In {
5910
5911
  Parse a document from the content of a DOM node.
5911
5912
  */
5912
5913
  parse(e, n = {}) {
5913
- let r = new la(this, n, !1);
5914
+ let r = new ca(this, n, !1);
5914
5915
  return r.addAll(e, ie.none, n.from, n.to), r.finish();
5915
5916
  }
5916
5917
  /**
@@ -5922,7 +5923,7 @@ class In {
5922
5923
  the left of the input and the end of nodes at the end.
5923
5924
  */
5924
5925
  parseSlice(e, n = {}) {
5925
- let r = new la(this, n, !0);
5926
+ let r = new ca(this, n, !0);
5926
5927
  return r.addAll(e, ie.none, n.from, n.to), J.maxOpen(r.finish());
5927
5928
  }
5928
5929
  /**
@@ -5979,13 +5980,13 @@ class In {
5979
5980
  for (let o in e.marks) {
5980
5981
  let s = e.marks[o].spec.parseDOM;
5981
5982
  s && s.forEach((i) => {
5982
- r(i = ca(i)), i.mark || i.ignore || i.clearMark || (i.mark = o);
5983
+ r(i = da(i)), i.mark || i.ignore || i.clearMark || (i.mark = o);
5983
5984
  });
5984
5985
  }
5985
5986
  for (let o in e.nodes) {
5986
5987
  let s = e.nodes[o].spec.parseDOM;
5987
5988
  s && s.forEach((i) => {
5988
- r(i = ca(i)), i.node || i.ignore || i.mark || (i.node = o);
5989
+ r(i = da(i)), i.node || i.ignore || i.mark || (i.node = o);
5989
5990
  });
5990
5991
  }
5991
5992
  return n;
@@ -6040,7 +6041,7 @@ const Mc = {
6040
6041
  style: !0,
6041
6042
  title: !0
6042
6043
  }, $c = { ol: !0, ul: !0 }, ur = 1, bs = 2, ir = 4;
6043
- function aa(t, e, n) {
6044
+ function la(t, e, n) {
6044
6045
  return e != null ? (e ? ur : 0) | (e === "full" ? bs : 0) : t && t.whitespace == "pre" ? ur | bs : n & ~ir;
6045
6046
  }
6046
6047
  class Dr {
@@ -6076,10 +6077,10 @@ class Dr {
6076
6077
  return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Mc.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
6077
6078
  }
6078
6079
  }
6079
- class la {
6080
+ class ca {
6080
6081
  constructor(e, n, r) {
6081
6082
  this.parser = e, this.options = n, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
6082
- let o = n.topNode, s, i = aa(null, n.preserveWhitespace, 0) | (r ? ir : 0);
6083
+ let o = n.topNode, s, i = la(null, n.preserveWhitespace, 0) | (r ? ir : 0);
6083
6084
  o ? s = new Dr(o.type, o.attrs, ie.none, !0, n.topMatch || o.type.contentMatch, i) : r ? s = new Dr(null, null, ie.none, !0, null, i) : s = new Dr(e.schema.topNodeType, null, ie.none, !0, null, i), this.nodes = [s], this.find = n.findPositions, this.needsBlock = !1;
6084
6085
  }
6085
6086
  get top() {
@@ -6245,7 +6246,7 @@ class la {
6245
6246
  s.match && (s.match = s.match.matchType(e.type));
6246
6247
  let i = ie.none;
6247
6248
  for (let l of o.concat(e.marks))
6248
- (s.type ? s.type.allowsMarkType(l.type) : da(l.type, e.type)) && (i = l.addToSet(i));
6249
+ (s.type ? s.type.allowsMarkType(l.type) : ua(l.type, e.type)) && (i = l.addToSet(i));
6249
6250
  return s.content.push(e.mark(i)), !0;
6250
6251
  }
6251
6252
  return !1;
@@ -6261,10 +6262,10 @@ class la {
6261
6262
  this.closeExtra();
6262
6263
  let i = this.top;
6263
6264
  i.match = i.match && i.match.matchType(e);
6264
- let l = aa(e, s, i.options);
6265
+ let l = la(e, s, i.options);
6265
6266
  i.options & ir && i.content.length == 0 && (l |= ir);
6266
6267
  let c = ie.none;
6267
- return r = r.filter((d) => (i.type ? i.type.allowsMarkType(d.type) : da(d.type, e)) ? (c = d.addToSet(c), !1) : !0), this.nodes.push(new Dr(e, n, c, o, null, l)), this.open++, r;
6268
+ return r = r.filter((d) => (i.type ? i.type.allowsMarkType(d.type) : ua(d.type, e)) ? (c = d.addToSet(c), !1) : !0), this.nodes.push(new Dr(e, n, c, o, null, l)), this.open++, r;
6268
6269
  }
6269
6270
  // Make sure all nodes above this.open are finished and added to
6270
6271
  // their parents
@@ -6367,13 +6368,13 @@ function vg(t) {
6367
6368
  function wg(t, e) {
6368
6369
  return (t.matches || t.msMatchesSelector || t.webkitMatchesSelector || t.mozMatchesSelector).call(t, e);
6369
6370
  }
6370
- function ca(t) {
6371
+ function da(t) {
6371
6372
  let e = {};
6372
6373
  for (let n in t)
6373
6374
  e[n] = t[n];
6374
6375
  return e;
6375
6376
  }
6376
- function da(t, e) {
6377
+ function ua(t, e) {
6377
6378
  let n = e.schema.nodes;
6378
6379
  for (let r in n) {
6379
6380
  let o = n[r];
@@ -6395,14 +6396,14 @@ const Fc = 65535, zc = Math.pow(2, 16);
6395
6396
  function kg(t, e) {
6396
6397
  return t + e * zc;
6397
6398
  }
6398
- function ua(t) {
6399
+ function pa(t) {
6399
6400
  return t & Fc;
6400
6401
  }
6401
6402
  function Cg(t) {
6402
6403
  return (t - (t & Fc)) / zc;
6403
6404
  }
6404
6405
  const Hc = 1, Vc = 2, Wr = 4, jc = 8;
6405
- class pa {
6406
+ class fa {
6406
6407
  /**
6407
6408
  @internal
6408
6409
  */
@@ -6452,7 +6453,7 @@ class at {
6452
6453
  @internal
6453
6454
  */
6454
6455
  recover(e) {
6455
- let n = 0, r = ua(e);
6456
+ let n = 0, r = pa(e);
6456
6457
  if (!this.inverted)
6457
6458
  for (let o = 0; o < r; o++)
6458
6459
  n += this.ranges[o * 3 + 2] - this.ranges[o * 3 + 1];
@@ -6479,17 +6480,17 @@ class at {
6479
6480
  if (r)
6480
6481
  return f;
6481
6482
  let m = e == (n < 0 ? c : p) ? null : kg(l / 3, e - c), b = e == c ? Vc : e == p ? Hc : Wr;
6482
- return (n < 0 ? e != c : e != p) && (b |= jc), new pa(f, b, m);
6483
+ return (n < 0 ? e != c : e != p) && (b |= jc), new fa(f, b, m);
6483
6484
  }
6484
6485
  o += u - d;
6485
6486
  }
6486
- return r ? e + o : new pa(e + o, 0, null);
6487
+ return r ? e + o : new fa(e + o, 0, null);
6487
6488
  }
6488
6489
  /**
6489
6490
  @internal
6490
6491
  */
6491
6492
  touches(e, n) {
6492
- let r = 0, o = ua(n), s = this.inverted ? 2 : 1, i = this.inverted ? 1 : 2;
6493
+ let r = 0, o = pa(n), s = this.inverted ? 2 : 1, i = this.inverted ? 1 : 2;
6493
6494
  for (let l = 0; l < this.ranges.length; l += 3) {
6494
6495
  let c = this.ranges[l] - (this.inverted ? r : 0);
6495
6496
  if (c > e)
@@ -6611,11 +6612,11 @@ class Be {
6611
6612
  }
6612
6613
  }
6613
6614
  }
6614
- function hi(t, e, n) {
6615
+ function mi(t, e, n) {
6615
6616
  let r = [];
6616
6617
  for (let o = 0; o < t.childCount; o++) {
6617
6618
  let s = t.child(o);
6618
- s.content.size && (s = s.copy(hi(s.content, e, s))), s.isInline && (s = e(s, n, o)), r.push(s);
6619
+ s.content.size && (s = s.copy(mi(s.content, e, s))), s.isInline && (s = e(s, n, o)), r.push(s);
6619
6620
  }
6620
6621
  return z.fromArray(r);
6621
6622
  }
@@ -6627,7 +6628,7 @@ class tn extends Ve {
6627
6628
  super(), this.from = e, this.to = n, this.mark = r;
6628
6629
  }
6629
6630
  apply(e) {
6630
- let n = e.slice(this.from, this.to), r = e.resolve(this.from), o = r.node(r.sharedDepth(this.to)), s = new J(hi(n.content, (i, l) => !i.isAtom || !l.type.allowsMarkType(this.mark.type) ? i : i.mark(this.mark.addToSet(i.marks)), o), n.openStart, n.openEnd);
6631
+ let n = e.slice(this.from, this.to), r = e.resolve(this.from), o = r.node(r.sharedDepth(this.to)), s = new J(mi(n.content, (i, l) => !i.isAtom || !l.type.allowsMarkType(this.mark.type) ? i : i.mark(this.mark.addToSet(i.marks)), o), n.openStart, n.openEnd);
6631
6632
  return Be.fromReplace(e, this.from, this.to, s);
6632
6633
  }
6633
6634
  invert() {
@@ -6666,7 +6667,7 @@ class nn extends Ve {
6666
6667
  super(), this.from = e, this.to = n, this.mark = r;
6667
6668
  }
6668
6669
  apply(e) {
6669
- let n = e.slice(this.from, this.to), r = new J(hi(n.content, (o) => o.mark(this.mark.removeFromSet(o.marks)), e), n.openStart, n.openEnd);
6670
+ let n = e.slice(this.from, this.to), r = new J(mi(n.content, (o) => o.mark(this.mark.removeFromSet(o.marks)), e), n.openStart, n.openEnd);
6670
6671
  return Be.fromReplace(e, this.from, this.to, r);
6671
6672
  }
6672
6673
  invert() {
@@ -6917,9 +6918,9 @@ function Kn(t) {
6917
6918
  }
6918
6919
  function Wc(t, e, n = null, r = t) {
6919
6920
  let o = Sg(t, e), s = o && Eg(r, e);
6920
- return s ? o.map(fa).concat({ type: e, attrs: n }).concat(s.map(fa)) : null;
6921
+ return s ? o.map(ha).concat({ type: e, attrs: n }).concat(s.map(ha)) : null;
6921
6922
  }
6922
- function fa(t) {
6923
+ function ha(t) {
6923
6924
  return { type: t, attrs: null };
6924
6925
  }
6925
6926
  function Sg(t, e) {
@@ -6983,7 +6984,7 @@ function Bo(t, e, n = -1) {
6983
6984
  e = n < 0 ? r.before(o) : r.after(o);
6984
6985
  }
6985
6986
  }
6986
- function mi(t, e, n = e, r = J.empty) {
6987
+ function gi(t, e, n = e, r = J.empty) {
6987
6988
  if (e == n && !r.size)
6988
6989
  return null;
6989
6990
  let o = t.resolve(e), s = t.resolve(n);
@@ -7323,7 +7324,7 @@ class se {
7323
7324
  let s = e.steps.length, i = this.ranges;
7324
7325
  for (let l = 0; l < i.length; l++) {
7325
7326
  let { $from: c, $to: d } = i[l], u = e.mapping.slice(s);
7326
- e.replaceRange(u.map(c.pos), u.map(d.pos), l ? J.empty : n), l == 0 && ga(e, s, (r ? r.isInline : o && o.isTextblock) ? -1 : 1);
7327
+ e.replaceRange(u.map(c.pos), u.map(d.pos), l ? J.empty : n), l == 0 && ba(e, s, (r ? r.isInline : o && o.isTextblock) ? -1 : 1);
7327
7328
  }
7328
7329
  }
7329
7330
  /**
@@ -7334,7 +7335,7 @@ class se {
7334
7335
  let r = e.steps.length, o = this.ranges;
7335
7336
  for (let s = 0; s < o.length; s++) {
7336
7337
  let { $from: i, $to: l } = o[s], c = e.mapping.slice(r), d = c.map(i.pos), u = c.map(l.pos);
7337
- s ? e.deleteRange(d, u) : (e.replaceRangeWith(d, u, n), ga(e, r, n.isInline ? -1 : 1));
7338
+ s ? e.deleteRange(d, u) : (e.replaceRangeWith(d, u, n), ba(e, r, n.isInline ? -1 : 1));
7338
7339
  }
7339
7340
  }
7340
7341
  /**
@@ -7424,16 +7425,16 @@ class Ig {
7424
7425
  this.$from = e, this.$to = n;
7425
7426
  }
7426
7427
  }
7427
- let ha = !1;
7428
- function ma(t) {
7429
- !ha && !t.parent.inlineContent && (ha = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
7428
+ let ma = !1;
7429
+ function ga(t) {
7430
+ !ma && !t.parent.inlineContent && (ma = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
7430
7431
  }
7431
7432
  class ge extends se {
7432
7433
  /**
7433
7434
  Construct a text selection between the given points.
7434
7435
  */
7435
7436
  constructor(e, n = e) {
7436
- ma(e), ma(n), super(e, n);
7437
+ ga(e), ga(n), super(e, n);
7437
7438
  }
7438
7439
  /**
7439
7440
  Returns a resolved position if this is a cursor selection (an
@@ -7534,7 +7535,7 @@ class ae extends se {
7534
7535
  return { type: "node", anchor: this.anchor };
7535
7536
  }
7536
7537
  getBookmark() {
7537
- return new gi(this.anchor);
7538
+ return new bi(this.anchor);
7538
7539
  }
7539
7540
  /**
7540
7541
  @internal
@@ -7560,13 +7561,13 @@ class ae extends se {
7560
7561
  }
7561
7562
  ae.prototype.visible = !1;
7562
7563
  se.jsonID("node", ae);
7563
- class gi {
7564
+ class bi {
7564
7565
  constructor(e) {
7565
7566
  this.anchor = e;
7566
7567
  }
7567
7568
  map(e) {
7568
7569
  let { deleted: n, pos: r } = e.mapResult(this.anchor);
7569
- return n ? new Io(r, r) : new gi(r);
7570
+ return n ? new Io(r, r) : new bi(r);
7570
7571
  }
7571
7572
  resolve(e) {
7572
7573
  let n = e.resolve(this.anchor), r = n.nodeAfter;
@@ -7633,7 +7634,7 @@ function Tn(t, e, n, r, o, s = !1) {
7633
7634
  }
7634
7635
  return null;
7635
7636
  }
7636
- function ga(t, e, n) {
7637
+ function ba(t, e, n) {
7637
7638
  let r = t.steps.length - 1;
7638
7639
  if (r < e)
7639
7640
  return;
@@ -7645,12 +7646,12 @@ function ga(t, e, n) {
7645
7646
  i == null && (i = u);
7646
7647
  }), t.setSelection(se.near(t.doc.resolve(i), n));
7647
7648
  }
7648
- function ba(t, e) {
7649
+ function ya(t, e) {
7649
7650
  return !e || !t ? t : t.bind(e);
7650
7651
  }
7651
7652
  class Mr {
7652
7653
  constructor(e, n, r) {
7653
- this.name = e, this.init = ba(n.init, r), this.apply = ba(n.apply, r);
7654
+ this.name = e, this.init = ya(n.init, r), this.apply = ya(n.apply, r);
7654
7655
  }
7655
7656
  }
7656
7657
  new Mr("doc", {
@@ -7728,7 +7729,7 @@ class Sn {
7728
7729
  return e[this.key];
7729
7730
  }
7730
7731
  }
7731
- const bi = (t, e) => t.selection.empty ? !1 : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
7732
+ const yi = (t, e) => t.selection.empty ? !1 : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
7732
7733
  function Yc(t, e) {
7733
7734
  let { $cursor: n } = t.selection;
7734
7735
  return !n || (e ? !e.endOfTextblock("backward", t) : n.parentOffset > 0) ? null : n;
@@ -7737,7 +7738,7 @@ const Xc = (t, e, n) => {
7737
7738
  let r = Yc(t, n);
7738
7739
  if (!r)
7739
7740
  return !1;
7740
- let o = yi(r);
7741
+ let o = xi(r);
7741
7742
  if (!o) {
7742
7743
  let i = r.blockRange(), l = i && Kn(i);
7743
7744
  return l == null ? !1 : (e && e(t.tr.lift(i, l).scrollIntoView()), !0);
@@ -7747,7 +7748,7 @@ const Xc = (t, e, n) => {
7747
7748
  return !0;
7748
7749
  if (r.parent.content.size == 0 && (Fn(s, "end") || ae.isSelectable(s)))
7749
7750
  for (let i = r.depth; ; i--) {
7750
- let l = mi(t.doc, r.before(i), r.after(i), J.empty);
7751
+ let l = gi(t.doc, r.before(i), r.after(i), J.empty);
7751
7752
  if (l && l.slice.size < l.to - l.from) {
7752
7753
  if (e) {
7753
7754
  let c = t.tr.step(l);
@@ -7763,13 +7764,13 @@ const Xc = (t, e, n) => {
7763
7764
  let r = Yc(t, n);
7764
7765
  if (!r)
7765
7766
  return !1;
7766
- let o = yi(r);
7767
+ let o = xi(r);
7767
7768
  return o ? qc(t, o, e) : !1;
7768
7769
  }, Pg = (t, e, n) => {
7769
7770
  let r = Qc(t, n);
7770
7771
  if (!r)
7771
7772
  return !1;
7772
- let o = xi(r);
7773
+ let o = vi(r);
7773
7774
  return o ? qc(t, o, e) : !1;
7774
7775
  };
7775
7776
  function qc(t, e, n) {
@@ -7791,7 +7792,7 @@ function qc(t, e, n) {
7791
7792
  return !1;
7792
7793
  l = u;
7793
7794
  }
7794
- let d = mi(t.doc, s, c, J.empty);
7795
+ let d = gi(t.doc, s, c, J.empty);
7795
7796
  if (!d || d.from != s || d instanceof st && d.slice.size >= c - s)
7796
7797
  return !1;
7797
7798
  if (n) {
@@ -7816,12 +7817,12 @@ const Zc = (t, e, n) => {
7816
7817
  if (r.parent.isTextblock) {
7817
7818
  if (n ? !n.endOfTextblock("backward", t) : r.parentOffset > 0)
7818
7819
  return !1;
7819
- s = yi(r);
7820
+ s = xi(r);
7820
7821
  }
7821
7822
  let i = s && s.nodeBefore;
7822
7823
  return !i || !ae.isSelectable(i) ? !1 : (e && e(t.tr.setSelection(ae.create(t.doc, s.pos - i.nodeSize)).scrollIntoView()), !0);
7823
7824
  };
7824
- function yi(t) {
7825
+ function xi(t) {
7825
7826
  if (!t.parent.type.spec.isolating)
7826
7827
  for (let e = t.depth - 1; e >= 0; e--) {
7827
7828
  if (t.index(e) > 0)
@@ -7839,14 +7840,14 @@ const ed = (t, e, n) => {
7839
7840
  let r = Qc(t, n);
7840
7841
  if (!r)
7841
7842
  return !1;
7842
- let o = xi(r);
7843
+ let o = vi(r);
7843
7844
  if (!o)
7844
7845
  return !1;
7845
7846
  let s = o.nodeAfter;
7846
7847
  if (sd(t, o, e, 1))
7847
7848
  return !0;
7848
7849
  if (r.parent.content.size == 0 && (Fn(s, "start") || ae.isSelectable(s))) {
7849
- let i = mi(t.doc, r.before(), r.after(), J.empty);
7850
+ let i = gi(t.doc, r.before(), r.after(), J.empty);
7850
7851
  if (i && i.slice.size < i.to - i.from) {
7851
7852
  if (e) {
7852
7853
  let l = t.tr.step(i);
@@ -7863,12 +7864,12 @@ const ed = (t, e, n) => {
7863
7864
  if (r.parent.isTextblock) {
7864
7865
  if (n ? !n.endOfTextblock("forward", t) : r.parentOffset < r.parent.content.size)
7865
7866
  return !1;
7866
- s = xi(r);
7867
+ s = vi(r);
7867
7868
  }
7868
7869
  let i = s && s.nodeAfter;
7869
7870
  return !i || !ae.isSelectable(i) ? !1 : (e && e(t.tr.setSelection(ae.create(t.doc, s.pos)).scrollIntoView()), !0);
7870
7871
  };
7871
- function xi(t) {
7872
+ function vi(t) {
7872
7873
  if (!t.parent.type.spec.isolating)
7873
7874
  for (let e = t.depth - 1; e >= 0; e--) {
7874
7875
  let n = t.node(e);
@@ -7909,7 +7910,7 @@ const Og = (t, e) => {
7909
7910
  return !n.parent.type.spec.code || !n.sameParent(r) ? !1 : (e && e(t.tr.insertText(`
7910
7911
  `).scrollIntoView()), !0);
7911
7912
  };
7912
- function vi(t) {
7913
+ function wi(t) {
7913
7914
  for (let e = 0; e < t.edgeCount; e++) {
7914
7915
  let { type: n } = t.edge(e);
7915
7916
  if (n.isTextblock && !n.hasRequiredAttrs())
@@ -7921,7 +7922,7 @@ const $g = (t, e) => {
7921
7922
  let { $head: n, $anchor: r } = t.selection;
7922
7923
  if (!n.parent.type.spec.code || !n.sameParent(r))
7923
7924
  return !1;
7924
- let o = n.node(-1), s = n.indexAfter(-1), i = vi(o.contentMatchAt(s));
7925
+ let o = n.node(-1), s = n.indexAfter(-1), i = wi(o.contentMatchAt(s));
7925
7926
  if (!i || !o.canReplaceWith(s, s, i))
7926
7927
  return !1;
7927
7928
  if (e) {
@@ -7933,7 +7934,7 @@ const $g = (t, e) => {
7933
7934
  let n = t.selection, { $from: r, $to: o } = n;
7934
7935
  if (n instanceof ct || r.parent.inlineContent || o.parent.inlineContent)
7935
7936
  return !1;
7936
- let s = vi(o.parent.contentMatchAt(o.indexAfter()));
7937
+ let s = wi(o.parent.contentMatchAt(o.indexAfter()));
7937
7938
  if (!s || !s.isTextblock)
7938
7939
  return !1;
7939
7940
  if (e) {
@@ -7963,7 +7964,7 @@ function Fg(t) {
7963
7964
  let s = [], i, l, c = !1, d = !1;
7964
7965
  for (let f = r.depth; ; f--)
7965
7966
  if (r.node(f).isBlock) {
7966
- c = r.end(f) == r.pos + (r.depth - f), d = r.start(f) == r.pos - (r.depth - f), l = vi(r.node(f - 1).contentMatchAt(r.indexAfter(f - 1))), s.unshift(c && l ? { type: l } : null), i = f;
7967
+ c = r.end(f) == r.pos + (r.depth - f), d = r.start(f) == r.pos - (r.depth - f), l = wi(r.node(f - 1).contentMatchAt(r.indexAfter(f - 1))), s.unshift(c && l ? { type: l } : null), i = f;
7967
7968
  break;
7968
7969
  } else {
7969
7970
  if (f == 1)
@@ -8047,7 +8048,7 @@ function Gg(t, e = null) {
8047
8048
  return l ? (r && r(n.tr.wrap(i, l).scrollIntoView()), !0) : !1;
8048
8049
  };
8049
8050
  }
8050
- function ya(t, e = null) {
8051
+ function xa(t, e = null) {
8051
8052
  return function(n, r) {
8052
8053
  let o = !1;
8053
8054
  for (let s = 0; s < n.selection.ranges.length && !o; s++) {
@@ -8077,7 +8078,7 @@ function ya(t, e = null) {
8077
8078
  return !0;
8078
8079
  };
8079
8080
  }
8080
- function wi(...t) {
8081
+ function ki(...t) {
8081
8082
  return function(e, n, r) {
8082
8083
  for (let o = 0; o < t.length; o++)
8083
8084
  if (t[o](e, n, r))
@@ -8085,9 +8086,9 @@ function wi(...t) {
8085
8086
  return !1;
8086
8087
  };
8087
8088
  }
8088
- wi(bi, Xc, Zc);
8089
- wi(bi, ed, td);
8090
- wi(nd, rd, od, zg);
8089
+ ki(yi, Xc, Zc);
8090
+ ki(yi, ed, td);
8091
+ ki(nd, rd, od, zg);
8091
8092
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
8092
8093
  function Ug(t, e = null) {
8093
8094
  return function(n, r) {
@@ -8432,7 +8433,7 @@ const ib = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
8432
8433
  }, hb = (t) => ({ tr: e, dispatch: n }) => {
8433
8434
  const { from: r, to: o } = t;
8434
8435
  return n && e.delete(r, o), !0;
8435
- }, mb = () => ({ state: t, dispatch: e }) => bi(t, e), gb = () => ({ commands: t }) => t.keyboardShortcut("Enter"), bb = () => ({ state: t, dispatch: e }) => $g(t, e);
8436
+ }, mb = () => ({ state: t, dispatch: e }) => yi(t, e), gb = () => ({ commands: t }) => t.keyboardShortcut("Enter"), bb = () => ({ state: t, dispatch: e }) => $g(t, e);
8436
8437
  function lo(t, e, n = { strict: !0 }) {
8437
8438
  const r = Object.keys(e);
8438
8439
  return r.length ? r.every((o) => n.strict ? e[o] === t[o] : nb(e[o]) ? e[o].test(t[o]) : e[o] === t[o]) : !0;
@@ -8444,7 +8445,7 @@ function cd(t, e, n = {}) {
8444
8445
  n
8445
8446
  ));
8446
8447
  }
8447
- function xa(t, e, n = {}) {
8448
+ function va(t, e, n = {}) {
8448
8449
  return !!cd(t, e, n);
8449
8450
  }
8450
8451
  function dd(t, e, n) {
@@ -8455,9 +8456,9 @@ function dd(t, e, n) {
8455
8456
  if ((!o.node || !o.node.marks.some((u) => u.type === e)) && (o = t.parent.childBefore(t.parentOffset)), !o.node || !o.node.marks.some((u) => u.type === e) || (n = n || ((r = o.node.marks[0]) === null || r === void 0 ? void 0 : r.attrs), !cd([...o.node.marks], e, n)))
8456
8457
  return;
8457
8458
  let i = o.index, l = t.start() + o.offset, c = i + 1, d = l + o.node.nodeSize;
8458
- for (; i > 0 && xa([...t.parent.child(i - 1).marks], e, n); )
8459
+ for (; i > 0 && va([...t.parent.child(i - 1).marks], e, n); )
8459
8460
  i -= 1, l -= t.parent.child(i).nodeSize;
8460
- for (; c < t.parent.childCount && xa([...t.parent.child(c).marks], e, n); )
8461
+ for (; c < t.parent.childCount && va([...t.parent.child(c).marks], e, n); )
8461
8462
  d += t.parent.child(c).nodeSize, c += 1;
8462
8463
  return {
8463
8464
  from: l,
@@ -8509,7 +8510,7 @@ function vb(t, e = null) {
8509
8510
  function wb() {
8510
8511
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
8511
8512
  }
8512
- function ki() {
8513
+ function Ci() {
8513
8514
  return [
8514
8515
  "iPad Simulator",
8515
8516
  "iPhone Simulator",
@@ -8525,7 +8526,7 @@ const kb = (t = null, e = {}) => ({ editor: n, view: r, tr: o, dispatch: s }) =>
8525
8526
  ...e
8526
8527
  };
8527
8528
  const i = () => {
8528
- (ki() || wb()) && r.dom.focus(), requestAnimationFrame(() => {
8529
+ (Ci() || wb()) && r.dom.focus(), requestAnimationFrame(() => {
8529
8530
  n.isDestroyed || (r.focus(), e != null && e.scrollIntoView && n.commands.scrollIntoView());
8530
8531
  });
8531
8532
  };
@@ -8706,7 +8707,7 @@ function Db(t) {
8706
8707
  else if (/^s(hift)?$/i.test(c))
8707
8708
  s = !0;
8708
8709
  else if (/^mod$/i.test(c))
8709
- ki() || fd() ? i = !0 : o = !0;
8710
+ Ci() || fd() ? i = !0 : o = !0;
8710
8711
  else
8711
8712
  throw new Error(`Unrecognized modifier name: ${c}`);
8712
8713
  }
@@ -8729,7 +8730,7 @@ const Mb = (t) => ({ editor: e, view: n, tr: r, dispatch: o }) => {
8729
8730
  u && o && r.maybeStep(u);
8730
8731
  }), !0;
8731
8732
  };
8732
- function Ci(t, e, n = {}) {
8733
+ function Ni(t, e, n = {}) {
8733
8734
  const { from: r, to: o, empty: s } = t.selection, i = e ? ze(e, t.schema) : null, l = [];
8734
8735
  t.doc.nodesBetween(r, o, (p, h) => {
8735
8736
  if (p.isText)
@@ -8746,7 +8747,7 @@ function Ci(t, e, n = {}) {
8746
8747
  }
8747
8748
  const $b = (t, e = {}) => ({ state: n, dispatch: r }) => {
8748
8749
  const o = ze(t, n.schema);
8749
- return Ci(n, o, e) ? Mg(n, r) : !1;
8750
+ return Ni(n, o, e) ? Mg(n, r) : !1;
8750
8751
  }, Fb = () => ({ state: t, dispatch: e }) => od(t, e), zb = (t) => ({ state: e, dispatch: n }) => {
8751
8752
  const r = ze(t, e.schema);
8752
8753
  return Yg(r)(e, n);
@@ -8754,7 +8755,7 @@ const $b = (t, e = {}) => ({ state: n, dispatch: r }) => {
8754
8755
  function hd(t, e) {
8755
8756
  return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
8756
8757
  }
8757
- function va(t, e) {
8758
+ function wa(t, e) {
8758
8759
  const n = typeof e == "string" ? [e] : e;
8759
8760
  return Object.keys(t).reduce((r, o) => (n.includes(o) || (r[o] = t[o]), r), {});
8760
8761
  }
@@ -8763,8 +8764,8 @@ const Vb = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
8763
8764
  const l = hd(typeof t == "string" ? t : t.name, r.schema);
8764
8765
  return l ? (l === "node" && (s = ze(t, r.schema)), l === "mark" && (i = Yt(t, r.schema)), o && n.selection.ranges.forEach((c) => {
8765
8766
  r.doc.nodesBetween(c.$from.pos, c.$to.pos, (d, u) => {
8766
- s && s === d.type && n.setNodeMarkup(u, void 0, va(d.attrs, e)), i && d.marks.length && d.marks.forEach((p) => {
8767
- i === p.type && n.addMark(u, u + d.nodeSize, i.create(va(p.attrs, e)));
8767
+ s && s === d.type && n.setNodeMarkup(u, void 0, wa(d.attrs, e)), i && d.marks.length && d.marks.forEach((p) => {
8768
+ i === p.type && n.addMark(u, u + d.nodeSize, i.create(wa(p.attrs, e)));
8768
8769
  });
8769
8770
  });
8770
8771
  }), !0) : !1;
@@ -8824,7 +8825,7 @@ function ey(t, e) {
8824
8825
  };
8825
8826
  }
8826
8827
  }
8827
- function Ni(t) {
8828
+ function Si(t) {
8828
8829
  return (e) => ey(e.$from, t);
8829
8830
  }
8830
8831
  function Gr(t, e, n) {
@@ -8856,7 +8857,7 @@ function ty(t, e, n = {}) {
8856
8857
  const c = l.filter((p) => s ? s.name === p.mark.type.name : !0).filter((p) => lo(p.mark.attrs, n, { strict: !1 })).reduce((p, h) => p + h.to - h.from, 0), d = l.filter((p) => s ? p.mark.type !== s && p.mark.type.excludes(s) : !0).reduce((p, h) => p + h.to - h.from, 0);
8857
8858
  return (c > 0 ? c + d : c) >= i;
8858
8859
  }
8859
- function wa(t, e) {
8860
+ function ka(t, e) {
8860
8861
  const { nodeExtensions: n } = eb(e), r = n.find((i) => i.name === t);
8861
8862
  if (!r)
8862
8863
  return !1;
@@ -8937,7 +8938,7 @@ const ry = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
8937
8938
  }, oy = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), sy = (t, e = {}) => ({ state: n, dispatch: r, chain: o }) => {
8938
8939
  const s = ze(t, n.schema);
8939
8940
  let i;
8940
- return n.selection.$anchor.sameParent(n.selection.$head) && (i = n.selection.$anchor.parent.attrs), s.isTextblock ? o().command(({ commands: l }) => ya(s, { ...i, ...e })(n) ? !0 : l.clearNodes()).command(({ state: l }) => ya(s, { ...i, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
8941
+ return n.selection.$anchor.sameParent(n.selection.$head) && (i = n.selection.$anchor.parent.attrs), s.isTextblock ? o().command(({ commands: l }) => xa(s, { ...i, ...e })(n) ? !0 : l.clearNodes()).command(({ state: l }) => xa(s, { ...i, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
8941
8942
  }, iy = (t) => ({ tr: e, dispatch: n }) => {
8942
8943
  if (n) {
8943
8944
  const { doc: r } = e, o = sn(t, 0, r.content.size), s = ae.create(r, o);
@@ -8954,7 +8955,7 @@ const ry = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
8954
8955
  const r = ze(t, e.schema);
8955
8956
  return Zg(r)(e, n);
8956
8957
  };
8957
- function ka(t, e) {
8958
+ function Ca(t, e) {
8958
8959
  const n = t.storedMarks || t.selection.$to.parentOffset && t.selection.$from.marks();
8959
8960
  if (n) {
8960
8961
  const r = n.filter((o) => e == null ? void 0 : e.includes(o.type.name));
@@ -8964,7 +8965,7 @@ function ka(t, e) {
8964
8965
  const cy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor: o }) => {
8965
8966
  const { selection: s, doc: i } = e, { $from: l, $to: c } = s, d = o.extensionManager.attributes, u = Gr(d, l.node().type.name, l.node().attrs);
8966
8967
  if (s instanceof ae && s.node.isBlock)
8967
- return !l.parentOffset || !Pt(i, l.pos) ? !1 : (r && (t && ka(n, o.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
8968
+ return !l.parentOffset || !Pt(i, l.pos) ? !1 : (r && (t && Ca(n, o.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
8968
8969
  if (!l.parent.isBlock)
8969
8970
  return !1;
8970
8971
  const p = c.parentOffset === c.parent.content.size, h = l.depth === 0 ? void 0 : Qb(l.node(-1).contentMatchAt(l.indexAfter(-1)));
@@ -8984,7 +8985,7 @@ const cy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
8984
8985
  const b = e.mapping.map(l.before()), y = e.doc.resolve(b);
8985
8986
  l.node(-1).canReplaceWith(y.index(), y.index() + 1, h) && e.setNodeMarkup(e.mapping.map(l.before()), h);
8986
8987
  }
8987
- t && ka(n, o.extensionManager.splittableMarks), e.scrollIntoView();
8988
+ t && Ca(n, o.extensionManager.splittableMarks), e.scrollIntoView();
8988
8989
  }
8989
8990
  return m;
8990
8991
  }, dy = (t, e = {}) => ({ tr: n, state: r, dispatch: o, editor: s }) => {
@@ -9043,7 +9044,7 @@ const cy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
9043
9044
  }
9044
9045
  return !0;
9045
9046
  }, es = (t, e) => {
9046
- const n = Ni((i) => i.type === e)(t.selection);
9047
+ const n = Si((i) => i.type === e)(t.selection);
9047
9048
  if (!n)
9048
9049
  return !0;
9049
9050
  const r = t.doc.resolve(Math.max(0, n.pos - 1)).before(n.depth);
@@ -9052,7 +9053,7 @@ const cy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
9052
9053
  const o = t.doc.nodeAt(r);
9053
9054
  return n.node.type === (o == null ? void 0 : o.type) && Cn(t.doc, n.pos) && t.join(n.pos), !0;
9054
9055
  }, ts = (t, e) => {
9055
- const n = Ni((i) => i.type === e)(t.selection);
9056
+ const n = Si((i) => i.type === e)(t.selection);
9056
9057
  if (!n)
9057
9058
  return !0;
9058
9059
  const r = t.doc.resolve(n.start).after(n.depth);
@@ -9064,11 +9065,11 @@ const cy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
9064
9065
  const { extensions: p, splittableMarks: h } = o.extensionManager, f = ze(t, i.schema), m = ze(e, i.schema), { selection: b, storedMarks: y } = i, { $from: x, $to: v } = b, E = x.blockRange(v), A = y || b.$to.parentOffset && b.$from.marks();
9065
9066
  if (!E)
9066
9067
  return !1;
9067
- const _ = Ni((T) => wa(T.type.name, p))(b);
9068
+ const _ = Si((T) => ka(T.type.name, p))(b);
9068
9069
  if (E.depth >= 1 && _ && E.depth - _.depth <= 1) {
9069
9070
  if (_.node.type === f)
9070
9071
  return d.liftListItem(m);
9071
- if (wa(_.node.type.name, p) && f.validContent(_.node.content) && l)
9072
+ if (ka(_.node.type.name, p) && f.validContent(_.node.content) && l)
9072
9073
  return c().command(() => (s.setNodeMarkup(_.pos, f), !0)).command(() => es(s, f)).command(() => ts(s, f)).run();
9073
9074
  }
9074
9075
  return !n || !A || !l ? c().command(() => u().wrapInList(f, r) ? !0 : d.clearNodes()).wrapInList(f, r).command(() => es(s, f)).command(() => ts(s, f)).run() : c().command(() => {
@@ -9079,12 +9080,12 @@ const cy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
9079
9080
  const { extendEmptyMarkRange: s = !1 } = n, i = Yt(t, r.schema);
9080
9081
  return ty(r, i, e) ? o.unsetMark(i, { extendEmptyMarkRange: s }) : o.setMark(i, e);
9081
9082
  }, fy = (t, e, n = {}) => ({ state: r, commands: o }) => {
9082
- const s = ze(t, r.schema), i = ze(e, r.schema), l = Ci(r, s, n);
9083
+ const s = ze(t, r.schema), i = ze(e, r.schema), l = Ni(r, s, n);
9083
9084
  let c;
9084
9085
  return r.selection.$anchor.sameParent(r.selection.$head) && (c = r.selection.$anchor.parent.attrs), l ? o.setNode(i, c) : o.setNode(s, { ...c, ...n });
9085
9086
  }, hy = (t, e = {}) => ({ state: n, commands: r }) => {
9086
9087
  const o = ze(t, n.schema);
9087
- return Ci(n, o, e) ? r.lift(o) : r.wrapIn(o, e);
9088
+ return Ni(n, o, e) ? r.lift(o) : r.wrapIn(o, e);
9088
9089
  }, my = () => ({ state: t, dispatch: e }) => {
9089
9090
  const n = t.plugins;
9090
9091
  for (let r = 0; r < n.length; r += 1) {
@@ -9335,7 +9336,7 @@ dt.create({
9335
9336
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
9336
9337
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
9337
9338
  };
9338
- return ki() || fd() ? s : o;
9339
+ return Ci() || fd() ? s : o;
9339
9340
  },
9340
9341
  addProseMirrorPlugins() {
9341
9342
  return [
@@ -9702,18 +9703,18 @@ const Sy = xn(
9702
9703
  blockAtom: e,
9703
9704
  children: n
9704
9705
  }) => {
9705
- const { editingBlockId: r, editingItemIndex: o } = kn(), [s] = O(e), i = M(() => Fe(s._type), [s._type]), { selectedLang: l, fallbackLang: c } = et(), d = Um(), u = kr(), [p] = O(si), h = S(i, "component", null), { index: f, key: m } = Vn(bd), { mode: b } = wc(), y = Ge(wr), x = yt(), v = b === "edit", E = Gm(), A = M(
9706
- () => p ? bl(Gi(s, l, i), u, {
9706
+ const { editingBlockId: r, editingItemIndex: o } = kn(), [s] = O(e), i = M(() => Fe(s._type), [s._type]), { selectedLang: l, fallbackLang: c } = et(), d = Um(), u = kr(), [p] = O(ii), h = S(i, "component", null), { index: f, key: m } = Vn(bd), { mode: b } = wc(), y = Ge(wr), x = yt(), v = b === "edit", E = Gm(), A = M(
9707
+ () => p ? xl(Ji(s, l, i), u, {
9707
9708
  index: f,
9708
9709
  key: m
9709
- }) : Gi(s, l, i),
9710
+ }) : Ji(s, l, i),
9710
9711
  [s, l, i, u, p, f, m]
9711
9712
  ), _ = M(
9712
- () => Ui(s, !0, y),
9713
- [s, Ui, y]
9713
+ () => Yi(s, !0, y),
9714
+ [s, Yi, y]
9714
9715
  ), T = M(
9715
- () => d(s._id, Ki(s._type)),
9716
- [s._id, s._type, d, Ki]
9716
+ () => d(s._id, Xi(s._type)),
9717
+ [s._id, s._type, d, Xi]
9717
9718
  ), C = M(() => {
9718
9719
  const X = {
9719
9720
  "data-block-id": s._id,
@@ -9747,7 +9748,7 @@ const Sy = xn(
9747
9748
  _id: s._id,
9748
9749
  _type: s._type,
9749
9750
  ...As(A.repeaterItems) ? {
9750
- repeaterItems: Kp(A.repeaterItems, s),
9751
+ repeaterItems: ef(A.repeaterItems, s),
9751
9752
  $repeaterItemsKey: A.$repeaterItemsKey
9752
9753
  } : {},
9753
9754
  ...s.partialBlockId ? { partialBlockId: s.partialBlockId } : "",
@@ -9779,7 +9780,7 @@ const Sy = xn(
9779
9780
  ) })
9780
9781
  ] });
9781
9782
  }, Iy = ({ partialBlockId: t }) => {
9782
- const { getPartailBlocks: e } = ui(), n = M(() => e(t), [e, t]), r = M(() => gl(P(n)), [n]);
9783
+ const { getPartailBlocks: e } = pi(), n = M(() => e(t), [e, t]), r = M(() => bl(P(n)), [n]);
9783
9784
  return $(n) ? null : /* @__PURE__ */ a(By, { partialBlockId: t, children: /* @__PURE__ */ a(co, { splitAtoms: r, blocks: n, type: "PartialBlock" }) });
9784
9785
  }, co = ({
9785
9786
  blocks: t,
@@ -9796,7 +9797,7 @@ const Sy = xn(
9796
9797
  (l) => ee(t, (c) => c._parent === l).length > 0,
9797
9798
  [t]
9798
9799
  );
9799
- return (r === "Heading" || r === "Paragraph" || r === "Link") && (s = Up(s)), N(s, (l) => {
9800
+ return (r === "Heading" || r === "Paragraph" || r === "Link") && (s = Qp(s)), N(s, (l) => {
9800
9801
  const c = o(l._id);
9801
9802
  return c ? /* @__PURE__ */ a(Jm, { block: l, children: (d) => /* @__PURE__ */ a(Ty, { blockAtom: c, asyncProps: d, children: ({ _id: u, _type: p, partialBlockId: h, repeaterItems: f, $repeaterItemsKey: m }) => p === "Repeater" ? As(f) && f.map((b, y) => /* @__PURE__ */ a(bd.Provider, { value: { index: y, key: m }, children: /* @__PURE__ */ a(co, { splitAtoms: n, blocks: t, parent: l._id, type: p }) }, `${u}-${y}`)) : p === "GlobalBlock" || p === "PartialBlock" ? /* @__PURE__ */ a(jp, { store: ft, children: /* @__PURE__ */ a(Iy, { partialBlockId: h }) }) : i(u) ? /* @__PURE__ */ a(co, { splitAtoms: n, blocks: t, parent: l._id, type: p }) : null }) }, l._id) : null;
9802
9803
  });
@@ -9804,21 +9805,21 @@ const Sy = xn(
9804
9805
  const [t] = ue();
9805
9806
  return /* @__PURE__ */ a(co, { splitAtoms: vr, blocks: t });
9806
9807
  }, Ly = () => {
9807
- const [t] = ue(), [e] = O(ni), n = $(t) ? null : /* @__PURE__ */ a(Ry, {}, e);
9808
+ const [t] = ue(), [e] = O(ri), n = $(t) ? null : /* @__PURE__ */ a(Ry, {}, e);
9808
9809
  return /* @__PURE__ */ a(Z, { children: n });
9809
9810
  }, Py = Ze("canvasZoom", 100), yd = () => O(Py), Oy = () => O($l), xd = Ze("canvasWidth", 800), Dy = Ze("canvasDisplayWidth", 800), vd = P((t) => {
9810
9811
  const e = t(xd);
9811
- return ml(e).toLowerCase();
9812
+ return gl(e).toLowerCase();
9812
9813
  }), uo = () => {
9813
9814
  const [t, e] = O(xd), n = Ge(vd), [r, o] = Oy();
9814
9815
  return H(() => {
9815
9816
  r !== "xs" && o(n);
9816
9817
  }, [n, r, o]), [t, n, e];
9817
- }, Si = () => {
9818
+ }, Ei = () => {
9818
9819
  const [t, e] = O(Dy);
9819
9820
  return [t, e];
9820
9821
  }, My = (t) => {
9821
- const [e] = Si(), [, n] = yd(), r = W("htmlDir", "ltr"), [o, s] = F({}), i = L(() => {
9822
+ const [e] = Ei(), [, n] = yd(), r = W("htmlDir", "ltr"), [o, s] = F({}), i = L(() => {
9822
9823
  const { width: l, height: c } = t;
9823
9824
  if (l < e) {
9824
9825
  const d = parseFloat((l / e).toFixed(2).toString());
@@ -9851,7 +9852,7 @@ function Rn(t, e) {
9851
9852
  }, [t, e]);
9852
9853
  }
9853
9854
  const $y = () => {
9854
- const [, t] = re(), [e, n] = De(), { document: r } = St(), { clearHighlight: o } = Nt(), [s] = re(), [i] = O(ri);
9855
+ const [, t] = re(), [e, n] = De(), { document: r } = St(), { clearHighlight: o } = Nt(), [s] = re(), [i] = O(oi);
9855
9856
  return H(() => {
9856
9857
  setTimeout(() => {
9857
9858
  if (!$(e))
@@ -9878,7 +9879,7 @@ const $y = () => {
9878
9879
  o(), t([]), n([]);
9879
9880
  }), null;
9880
9881
  }, Fy = () => {
9881
- const [t] = Si(), [, e] = sc(), n = le(null), r = le(null), [o, s] = F({ width: 0, height: 0 }), i = My(o), [, l] = Gn(), c = W("loading", !1), d = W("htmlDir", "ltr"), { onDragOver: u, onDrop: p, onDragEnd: h } = Un(), f = dm(), m = L(
9882
+ const [t] = Ei(), [, e] = sc(), n = le(null), r = le(null), [o, s] = F({ width: 0, height: 0 }), i = My(o), [, l] = Gn(), c = W("loading", !1), d = W("htmlDir", "ltr"), { onDragOver: u, onDrop: p, onDragEnd: h } = Un(), f = dm(), m = L(
9882
9883
  (y) => {
9883
9884
  s((x) => ({ ...x, width: y }));
9884
9885
  },
@@ -9946,7 +9947,7 @@ const $y = () => {
9946
9947
  /* @__PURE__ */ a("p", { className: "font-semibold", children: t("Oops! Something went wrong.") }),
9947
9948
  /* @__PURE__ */ a("p", { children: t("Please try again.") })
9948
9949
  ] }) });
9949
- }, zy = P(null), wd = () => O(zy), Hy = Q.lazy(() => import("./code-editor-CGBAc-A6.js")), Vy = () => {
9950
+ }, zy = P(null), wd = () => O(zy), Hy = Q.lazy(() => import("./code-editor-D45h29W1.js")), Vy = () => {
9950
9951
  const [t] = wd(), e = W("onError", kt);
9951
9952
  return /* @__PURE__ */ a("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ g("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40", children: [
9952
9953
  /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a($n, { className: "h-full" }), children: /* @__PURE__ */ a(ln, { fallback: /* @__PURE__ */ a(lr, {}), onError: e, children: /* @__PURE__ */ a(Fy, {}) }) }),
@@ -9976,7 +9977,7 @@ const $y = () => {
9976
9977
  /* @__PURE__ */ a("option", { value: "", children: "Select" }),
9977
9978
  d.map((u) => /* @__PURE__ */ a("option", { value: u.id, children: u.name }, u.id))
9978
9979
  ] }) });
9979
- }, Gy = Ms(() => import("./IconPicker-2H9IGKMS.js").then((t) => ({ default: t.IconPicker }))), Uy = (t) => {
9980
+ }, Gy = Ms(() => import("./IconPicker-CNwplOGy.js").then((t) => ({ default: t.IconPicker }))), Uy = (t) => {
9980
9981
  try {
9981
9982
  let e = t.replace(/<svg([^>]*)\sheight="[^"]*"([^>]*)>/gi, "<svg$1$2>").replace(/<svg([^>]*)\swidth="[^"]*"([^>]*)>/gi, "<svg$1$2>");
9982
9983
  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();
@@ -10091,7 +10092,7 @@ const zr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
10091
10092
  }, Qy = ({ value: t, onChange: e, id: n, onBlur: r, uiSchema: o }) => {
10092
10093
  const { t: s } = U(), { selectedLang: i } = et(), l = ce(), c = Ft(), d = kr(), u = (o == null ? void 0 : o["ui:allowEmpty"]) === !0, p = n.split(".").pop() || "", h = i ? `_${p}Id-${i}` : `_${p}Id`, f = $(i) && (l == null ? void 0 : l._type) === "Image" && de(l, "assetId"), m = S(l, h, f ? l == null ? void 0 : l.assetId : ""), b = M(() => {
10093
10094
  if (!t || !l || !/\{\{.*?\}\}/.test(t)) return t;
10094
- const _ = { ...l, [p]: t }, T = bl(_, d, { index: -1, key: "" });
10095
+ const _ = { ...l, [p]: t }, T = xl(_, d, { index: -1, key: "" });
10095
10096
  return S(T, p, t);
10096
10097
  }, [t, l, d, p]), y = !!m || b !== zr && b !== "", x = (A) => {
10097
10098
  const _ = As(A) ? ke(A) : A;
@@ -10165,7 +10166,7 @@ const zr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
10165
10166
  )
10166
10167
  ] })
10167
10168
  ] });
10168
- }, ex = Fs(
10169
+ }, ex = zs(
10169
10170
  "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
10170
10171
  {
10171
10172
  variants: {
@@ -10181,7 +10182,7 @@ const zr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
10181
10182
  }
10182
10183
  }
10183
10184
  );
10184
- function Ei({ className: t, variant: e, ...n }) {
10185
+ function _i({ className: t, variant: e, ...n }) {
10185
10186
  return /* @__PURE__ */ a("div", { className: j(ex({ variant: e }), t), ...n });
10186
10187
  }
10187
10188
  const xs = Mn.Provider, Ee = Mn.Root, _e = Mn.Trigger, we = V.forwardRef(({ className: t, sideOffset: e = 4, ...n }, r) => /* @__PURE__ */ a(Mn.Portal, { children: /* @__PURE__ */ a(
@@ -10449,7 +10450,7 @@ const vs = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
10449
10450
  }
10450
10451
  ));
10451
10452
  vs.displayName = Qe.Item.displayName;
10452
- const Ad = cr.Root, Td = cr.Trigger, _i = V.forwardRef(({ className: t, align: e = "center", sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ a(cr.Portal, { children: /* @__PURE__ */ a(
10453
+ const Ad = cr.Root, Td = cr.Trigger, Ai = V.forwardRef(({ className: t, align: e = "center", sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ a(cr.Portal, { children: /* @__PURE__ */ a(
10453
10454
  cr.Content,
10454
10455
  {
10455
10456
  ref: o,
@@ -10462,7 +10463,7 @@ const Ad = cr.Root, Td = cr.Trigger, _i = V.forwardRef(({ className: t, align: e
10462
10463
  ...r
10463
10464
  }
10464
10465
  ) }));
10465
- _i.displayName = cr.Content.displayName;
10466
+ Ai.displayName = cr.Content.displayName;
10466
10467
  const nx = ({ data: t, onSelect: e, dataType: n }) => {
10467
10468
  const [r, o] = Q.useState([]), [s, i] = Q.useState(t), l = (p) => Array.isArray(p) ? "array" : typeof p == "object" && p !== null ? "object" : "value", c = Q.useCallback(
10468
10469
  (p) => {
@@ -10482,7 +10483,7 @@ const nx = ({ data: t, onSelect: e, dataType: n }) => {
10482
10483
  /* @__PURE__ */ a(Ed, { children: qn("No option found.") }),
10483
10484
  /* @__PURE__ */ g(_d, { children: [
10484
10485
  r.length > 0 && /* @__PURE__ */ g(vs, { onSelect: d, className: "flex items-center text-sm", children: [
10485
- /* @__PURE__ */ a(tl, { className: "mr-2 h-4 w-4" }),
10486
+ /* @__PURE__ */ a(nl, { className: "mr-2 h-4 w-4" }),
10486
10487
  qn("Back")
10487
10488
  ] }),
10488
10489
  u.map((p) => /* @__PURE__ */ g(
@@ -10494,7 +10495,7 @@ const nx = ({ data: t, onSelect: e, dataType: n }) => {
10494
10495
  className: "flex items-center justify-between",
10495
10496
  children: [
10496
10497
  /* @__PURE__ */ g("span", { className: "flex items-center gap-x-2", children: [
10497
- Re(p.key, or) ? /* @__PURE__ */ a(nl, {}) : Re(p.key, Lt) ? /* @__PURE__ */ a(rl, {}) : null,
10498
+ Re(p.key, or) ? /* @__PURE__ */ a(rl, {}) : Re(p.key, Lt) ? /* @__PURE__ */ a(ol, {}) : null,
10498
10499
  Re(p.key, or) ? qn("Repeater Data") : Re(p.key, Lt) ? p.key.replace(Lt, "") : p.key
10499
10500
  ] }),
10500
10501
  /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
@@ -10546,7 +10547,7 @@ function Bd({ data: t, onSelect: e, dataType: n = "value" }) {
10546
10547
  ) }) }),
10547
10548
  /* @__PURE__ */ a(we, { children: qn("Add field") })
10548
10549
  ] }),
10549
- /* @__PURE__ */ a(_i, { className: "z-[1000]! relative mr-3 w-[300px] p-0", children: /* @__PURE__ */ a(
10550
+ /* @__PURE__ */ a(Ai, { className: "z-[1000]! relative mr-3 w-[300px] p-0", children: /* @__PURE__ */ a(
10550
10551
  nx,
10551
10552
  {
10552
10553
  data: i,
@@ -10653,7 +10654,7 @@ const Id = ({
10653
10654
  /* @__PURE__ */ a(ls, { className: "h-3 w-3" }),
10654
10655
  /* @__PURE__ */ a("span", { className: "leading-tight", children: r }),
10655
10656
  " ",
10656
- /* @__PURE__ */ a(Ei, { className: "m-0 bg-gray-200 px-2 leading-tight text-gray-500 hover:bg-gray-200 hover:text-gray-500", children: /* @__PURE__ */ a("span", { className: "text-[9px] font-medium text-slate-600", children: u == null ? void 0 : u.length }) }),
10657
+ /* @__PURE__ */ a(_i, { className: "m-0 bg-gray-200 px-2 leading-tight text-gray-500 hover:bg-gray-200 hover:text-gray-500", children: /* @__PURE__ */ a("span", { className: "text-[9px] font-medium text-slate-600", children: u == null ? void 0 : u.length }) }),
10657
10658
  d.description && /* @__PURE__ */ a(xs, { children: /* @__PURE__ */ g(Ee, { children: [
10658
10659
  /* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ a(
10659
10660
  Dn,
@@ -10925,7 +10926,7 @@ const Id = ({
10925
10926
  return r && (o = (s = t == null ? void 0 : t.replace(n, "")) == null ? void 0 : s.replace("}}", "")), /* @__PURE__ */ a("div", { className: "mt-1 flex flex-col gap-1", children: /* @__PURE__ */ g("div", { className: "flex items-center justify-between gap-2 rounded-md border border-blue-200 bg-blue-50 px-2 py-1 text-xs text-blue-600", children: [
10926
10927
  /* @__PURE__ */ g("span", { className: "flex max-w-[200px] items-center gap-2", children: [
10927
10928
  " ",
10928
- r ? /* @__PURE__ */ a(rl, { className: "h-3 min-h-3 w-3 min-w-3" }) : null,
10929
+ r ? /* @__PURE__ */ a(ol, { className: "h-3 min-h-3 w-3 min-w-3" }) : null,
10929
10930
  /* @__PURE__ */ g(Ee, { delayDuration: 500, children: [
10930
10931
  /* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "cursor-default truncate", children: o }) }),
10931
10932
  /* @__PURE__ */ a(we, { side: "left", hidden: o.length < 50, children: o })
@@ -10962,8 +10963,8 @@ const Id = ({
10962
10963
  return null;
10963
10964
  });
10964
10965
  Rd.debugLabel = "wrapperBlockAtom";
10965
- const Ai = () => Ge(Rd), ax = () => {
10966
- const t = ce(), e = Ai(), { addCoreBlock: n } = wn();
10966
+ const Ti = () => Ge(Rd), ax = () => {
10967
+ const t = ce(), e = Ti(), { addCoreBlock: n } = wn();
10967
10968
  if (!t && !e) return null;
10968
10969
  const r = (t == null ? void 0 : t._type) === "Row" ? t : e;
10969
10970
  return /* @__PURE__ */ a("div", { className: "pt-1", children: /* @__PURE__ */ g(
@@ -10978,7 +10979,7 @@ const Ai = () => Ge(Rd), ax = () => {
10978
10979
  ]
10979
10980
  }
10980
10981
  ) });
10981
- }, lx = Q.lazy(() => import("./rte-widget-modal-RS8PMKOn.js")), cx = ({ blockId: t, id: e, placeholder: n, value: r, onChange: o, onBlur: s }) => {
10982
+ }, lx = Q.lazy(() => import("./rte-widget-modal-1SbY5bcQ.js")), cx = ({ blockId: t, id: e, placeholder: n, value: r, onChange: o, onBlur: s }) => {
10982
10983
  const i = le(null), [l, c] = F(!1), d = gd({
10983
10984
  blockId: t,
10984
10985
  value: r,
@@ -11020,7 +11021,7 @@ const Ai = () => Ge(Rd), ax = () => {
11020
11021
  r(s);
11021
11022
  }, [s]), n && n !== e ? /* @__PURE__ */ a(cx, { ...t, blockId: n }, n) : null;
11022
11023
  }, ux = ({ formData: t, onChange: e }) => {
11023
- const [n] = ue(), r = ce(), o = Ai(), { addCoreBlock: s } = wn(), [, i] = re(), l = (r == null ? void 0 : r._type) === "Slider" ? r : o, c = ne(n, { _parent: l == null ? void 0 : l._id, _type: "Slides" }), d = ee(n, { _parent: c == null ? void 0 : c._id, _type: "Slide" }), u = (t == null ? void 0 : t.currentSlide) || S(d, "0._id");
11024
+ const [n] = ue(), r = ce(), o = Ti(), { addCoreBlock: s } = wn(), [, i] = re(), l = (r == null ? void 0 : r._type) === "Slider" ? r : o, c = ne(n, { _parent: l == null ? void 0 : l._id, _type: "Slides" }), d = ee(n, { _parent: c == null ? void 0 : c._id, _type: "Slide" }), u = (t == null ? void 0 : t.currentSlide) || S(d, "0._id");
11024
11025
  if (H(() => {
11025
11026
  (r == null ? void 0 : r._type) === "Slide" && (t == null ? void 0 : t.currentSlide) !== (r == null ? void 0 : r._id) && e({ ...t, currentSlide: r == null ? void 0 : r._id });
11026
11027
  }, [r]), H(() => {
@@ -11049,7 +11050,7 @@ const Ai = () => Ge(Rd), ax = () => {
11049
11050
  };
11050
11051
  return /* @__PURE__ */ g("div", { className: "space-y-1.5 px-2", children: [
11051
11052
  /* @__PURE__ */ g("div", { className: "flex items-center gap-x-2 pb-2 text-[12px]", children: [
11052
- /* @__PURE__ */ a("button", { onClick: h, className: "rounded bg-gray-200 p-1.5 hover:opacity-80", children: /* @__PURE__ */ a(tl, { className: "h-3 w-3" }) }),
11053
+ /* @__PURE__ */ a("button", { onClick: h, className: "rounded bg-gray-200 p-1.5 hover:opacity-80", children: /* @__PURE__ */ a(nl, { className: "h-3 w-3" }) }),
11053
11054
  /* @__PURE__ */ a("div", { className: "whitespace-nowrap text-center text-[10px] text-slate-500", children: u ? /* @__PURE__ */ g("span", { className: "", children: [
11054
11055
  /* @__PURE__ */ g("b", { className: "text-[12px]", children: [
11055
11056
  " ",
@@ -11065,7 +11066,7 @@ const Ai = () => Ge(Rd), ax = () => {
11065
11066
  onClick: f,
11066
11067
  className: "flex w-full items-center justify-center gap-x-1 rounded bg-gray-200 p-1.5 text-xs font-medium leading-tight hover:opacity-80",
11067
11068
  children: [
11068
- /* @__PURE__ */ a(ol, { className: "h-3 w-3" }),
11069
+ /* @__PURE__ */ a(sl, { className: "h-3 w-3" }),
11069
11070
  "Add Slide"
11070
11071
  ]
11071
11072
  }
@@ -11199,7 +11200,7 @@ const Ai = () => Ge(Rd), ax = () => {
11199
11200
  /* @__PURE__ */ a(Ye, { className: "h-3 w-3" }),
11200
11201
  " ",
11201
11202
  /* @__PURE__ */ a("span", { children: "Add" })
11202
- ] }) }), Ca = xn(({ blockId: t, schema: e, uiSchema: n, formData: r, onChange: o }) => {
11203
+ ] }) }), Na = xn(({ blockId: t, schema: e, uiSchema: n, formData: r, onChange: o }) => {
11203
11204
  const { selectedLang: s } = et(), i = jo("widget"), l = jo("field"), c = jo("template"), d = hn(
11204
11205
  async ({ formData: u }, p) => {
11205
11206
  S(u, p) === void 0 && We(u, p, ""), o({ formData: u }, p);
@@ -11251,14 +11252,14 @@ const Ai = () => Ge(Rd), ax = () => {
11251
11252
  },
11252
11253
  s
11253
11254
  );
11254
- }), Na = (t, e, n) => {
11255
+ }), Sa = (t, e, n) => {
11255
11256
  const r = Yr(t);
11256
11257
  return br(Ct(t), (o) => {
11257
11258
  Ie(S(n, "i18nProps", []), o) && !$(e) && (r[o] = S(t, `${o}-${e}`));
11258
11259
  }), r;
11259
11260
  };
11260
- function Sa() {
11261
- const { selectedLang: t } = et(), e = ce(), n = zl(), r = Ft(), o = Fe(e == null ? void 0 : e._type), s = Na(e, t, o), [i, l] = F(s), [c, d] = F(!1), u = Ai(), p = Fe(u == null ? void 0 : u._type), h = Na(u, t, p), f = ({ formData: _ }, T, C) => {
11261
+ function Ea() {
11262
+ const { selectedLang: t } = et(), e = ce(), n = zl(), r = Ft(), o = Fe(e == null ? void 0 : e._type), s = Sa(e, t, o), [i, l] = F(s), [c, d] = F(!1), u = Ti(), p = Fe(u == null ? void 0 : u._type), h = Sa(u, t, p), f = ({ formData: _ }, T, C) => {
11262
11263
  T && (i == null ? void 0 : i._id) === e._id && r([e._id], { [T]: S(_, T) }, C);
11263
11264
  }, m = L(
11264
11265
  Bs(({ formData: _ }, T, C) => {
@@ -11274,7 +11275,7 @@ function Sa() {
11274
11275
  if (!_)
11275
11276
  return { schema: {}, uiSchema: {} };
11276
11277
  try {
11277
- const { schema: T, uiSchema: C } = Wi(_);
11278
+ const { schema: T, uiSchema: C } = Gi(_);
11278
11279
  if (_ === "Repeater") {
11279
11280
  const k = S(e, "repeaterItems", "");
11280
11281
  Re(k, `{{${Lt}`) ? (We(C, "filter", { "ui:widget": "collectionSelect" }), We(C, "sort", { "ui:widget": "collectionSelect" })) : (We(C, "filter", { "ui:widget": "hidden" }), We(C, "sort", { "ui:widget": "hidden" }));
@@ -11286,7 +11287,7 @@ function Sa() {
11286
11287
  }, [e]), { wrapperSchema: E, wrapperUiSchema: A } = M(() => {
11287
11288
  if (!u || !(u != null && u._type))
11288
11289
  return { wrapperSchema: {}, wrapperUiSchema: {} };
11289
- const _ = u == null ? void 0 : u._type, { schema: T = {}, uiSchema: C = {} } = Wi(_);
11290
+ const _ = u == null ? void 0 : u._type, { schema: T = {}, uiSchema: C = {} } = Gi(_);
11290
11291
  return { wrapperSchema: T, wrapperUiSchema: C };
11291
11292
  }, [u]);
11292
11293
  return /* @__PURE__ */ g("div", { className: "no-scrollbar overflow-x-hidden px-px", children: [
@@ -11310,7 +11311,7 @@ function Sa() {
11310
11311
  }
11311
11312
  ),
11312
11313
  /* @__PURE__ */ a("div", { className: c ? "h-auto" : "invisible h-0", children: /* @__PURE__ */ a(
11313
- Ca,
11314
+ Na,
11314
11315
  {
11315
11316
  blockId: u == null ? void 0 : u._id,
11316
11317
  onChange: y,
@@ -11321,7 +11322,7 @@ function Sa() {
11321
11322
  ) })
11322
11323
  ] }),
11323
11324
  $(x) ? null : /* @__PURE__ */ a(
11324
- Ca,
11325
+ Na,
11325
11326
  {
11326
11327
  blockId: e == null ? void 0 : e._id,
11327
11328
  onChange: b,
@@ -11412,7 +11413,7 @@ const mx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11412
11413
  },
11413
11414
  [t, e]
11414
11415
  );
11415
- }, Ti = () => {
11416
+ }, Bi = () => {
11416
11417
  const { updateBlocks: t, updateBlocksRuntime: e } = He(), n = wt(mx);
11417
11418
  return L(
11418
11419
  (r, o, s = !1) => {
@@ -11422,7 +11423,7 @@ const mx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11422
11423
  [n]
11423
11424
  );
11424
11425
  }, Dd = () => {
11425
- const t = ce(), e = Ft(), n = L((i) => hl(i) || {}, []), r = L((i) => Object.keys(i).filter(
11426
+ const t = ce(), e = Ft(), n = L((i) => ml(i) || {}, []), r = L((i) => Object.keys(i).filter(
11426
11427
  (l) => typeof i[l] == "string" && i[l].startsWith("#styles:")
11427
11428
  ), []), o = L(
11428
11429
  (i) => {
@@ -11441,7 +11442,7 @@ const mx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11441
11442
  }, [t, r, n, e]), reset: o };
11442
11443
  }, yx = () => {
11443
11444
  var f;
11444
- const t = ce(), [e, n] = De(), r = Ti(), [o] = re(), { t: s } = U();
11445
+ const t = ce(), [e, n] = De(), r = Bi(), [o] = re(), { t: s } = U();
11445
11446
  if (!t) return null;
11446
11447
  const i = Object.keys(t).filter(
11447
11448
  (m) => typeof t[m] == "string" && t[m].startsWith("#styles:")
@@ -11452,7 +11453,7 @@ const mx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11452
11453
  ":"
11453
11454
  ] }),
11454
11455
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: N(i, (m) => /* @__PURE__ */ g(
11455
- Ei,
11456
+ _i,
11456
11457
  {
11457
11458
  className: "flex cursor-pointer items-center gap-1 pr-1",
11458
11459
  variant: h(m) ? "default" : "secondary",
@@ -11503,7 +11504,7 @@ const mx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11503
11504
  }, Md = Q.createContext({
11504
11505
  setDragData: () => {
11505
11506
  }
11506
- }), Ea = (t, e) => {
11507
+ }), _a = (t, e) => {
11507
11508
  t = t.toLowerCase();
11508
11509
  let n = t.trim().replace(/ |\+/g, "");
11509
11510
  if ((n === "auto" || n === "none") && e.includes(n))
@@ -11644,7 +11645,7 @@ const mx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11644
11645
  children: r
11645
11646
  },
11646
11647
  r
11647
- )) }), _a = 50, Nx = (t) => {
11648
+ )) }), Aa = 50, Nx = (t) => {
11648
11649
  const [e, n] = F(!1), [r, o] = F(""), { currentClass: s, onChange: i, classPrefix: l, cssProperty: c, units: d, negative: u } = t, [p, h] = F(c != null && c.toLowerCase().includes("width") ? "%" : d[0]), [f, m] = F(!1), [b, y] = F(""), [x, v] = F(!1), [E, A] = F(!1);
11649
11650
  H(() => {
11650
11651
  const { value: w, unit: B } = vx(s);
@@ -11654,9 +11655,9 @@ const mx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11654
11655
  }
11655
11656
  h(B), o(B === "class" || $(w) ? "" : w);
11656
11657
  }, [s, c, d]);
11657
- const _ = hn((w) => i(w), [i], _a), T = hn((w) => i(w, !1), [i], _a), C = L(
11658
+ const _ = hn((w) => i(w), [i], Aa), T = hn((w) => i(w, !1), [i], Aa), C = L(
11658
11659
  (w = !1) => {
11659
- const B = Ea(`${r}`, d);
11660
+ const B = _a(`${r}`, d);
11660
11661
  if (S(B, "error", !1)) {
11661
11662
  m(!0);
11662
11663
  return;
@@ -11674,7 +11675,7 @@ const mx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11674
11675
  [_, T, r, p, l, d]
11675
11676
  ), k = L(
11676
11677
  (w) => {
11677
- const B = Ea(`${r}`, d);
11678
+ const B = _a(`${r}`, d);
11678
11679
  if (S(B, "error", !1)) {
11679
11680
  m(!0);
11680
11681
  return;
@@ -12959,7 +12960,7 @@ const Lx = {
12959
12960
  }, Fd = {
12960
12961
  "not-italic": () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ a("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9 3H11V5H9V11H11V13H5V11H7V5H5V3H9Z", fill: "white" }) }),
12961
12962
  // visibility
12962
- visible: il,
12963
+ visible: al,
12963
12964
  invisible: Xr,
12964
12965
  // display
12965
12966
  hidden: Xr,
@@ -12996,7 +12997,7 @@ const Lx = {
12996
12997
  borderRadiusBottom: An,
12997
12998
  borderRadiusLeft: Yn,
12998
12999
  borderRadiusTopLeft: bp,
12999
- borderRadiusTopRight: sl,
13000
+ borderRadiusTopRight: il,
13000
13001
  borderRadiusBottomRight: gp,
13001
13002
  borderRadiusBottomLeft: mp,
13002
13003
  divideXWidth: ot,
@@ -13030,10 +13031,10 @@ const Lx = {
13030
13031
  textRight: pp,
13031
13032
  textJustify: up,
13032
13033
  // font style
13033
- italic: Za,
13034
+ italic: Qa,
13034
13035
  // "not-italic": "",
13035
13036
  // decoration
13036
- underline: Qa,
13037
+ underline: el,
13037
13038
  overline: dp,
13038
13039
  // transform
13039
13040
  uppercase: cp,
@@ -13163,7 +13164,7 @@ const Lx = {
13163
13164
  children: Q.createElement(S(Fd, l, Ls))
13164
13165
  }
13165
13166
  ) }),
13166
- /* @__PURE__ */ a(we, { children: Jt(Ua(l)) })
13167
+ /* @__PURE__ */ a(we, { children: Jt(Ka(l)) })
13167
13168
  ] })) });
13168
13169
  }, Dx = ({ property: t, onChange: e }) => {
13169
13170
  const { canReset: n, canChange: r } = Vn(Br), o = Ir(t), s = M(() => S(o, "cls", ""), [o]), { getClasses: i } = Po(), l = i(t, [""]), c = l.indexOf(s) > -1 ? l.indexOf(s) : 0, d = /\[.*\]/g.test(s);
@@ -13174,7 +13175,7 @@ const Lx = {
13174
13175
  type: "button",
13175
13176
  className: "hover:bg-bg-gray-700 box-border w-2/12 rounded-bl rounded-tl bg-background px-1 text-center disabled:cursor-not-allowed disabled:bg-gray-600",
13176
13177
  disabled: !r && (!n || c - 1 < 0),
13177
- onClick: () => e(Fi(l, c - 1), t),
13178
+ onClick: () => e(zi(l, c - 1), t),
13178
13179
  children: /* @__PURE__ */ a("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ a(
13179
13180
  yp,
13180
13181
  {
@@ -13190,7 +13191,7 @@ const Lx = {
13190
13191
  type: "button",
13191
13192
  className: "hover:bg-bg-gray-700 w-2/12 rounded-br rounded-tr bg-background px-1 text-center disabled:cursor-not-allowed disabled:bg-gray-600",
13192
13193
  disabled: !r && (!n || c + 1 >= l.length),
13193
- onClick: () => e(Fi(l, c + 1), t),
13194
+ onClick: () => e(zi(l, c + 1), t),
13194
13195
  children: /* @__PURE__ */ a("span", { className: "flex items-center justify-center", children: /* @__PURE__ */ a(
13195
13196
  Ye,
13196
13197
  {
@@ -13228,7 +13229,7 @@ function zx(t) {
13228
13229
  }
13229
13230
  return e;
13230
13231
  }
13231
- function Bi(t) {
13232
+ function Ii(t) {
13232
13233
  return $(t) ? null : {
13233
13234
  dark: Re(t, "dark:"),
13234
13235
  mq: Mx(t),
@@ -13244,7 +13245,7 @@ function Hx(t) {
13244
13245
  }
13245
13246
  function Zt(t) {
13246
13247
  t = t.replace(/\s+/g, " ");
13247
- const e = t.split(" ").map(Bi).filter((r) => r !== null), n = ["xs", "sm", "md", "lg", "xl", "2xl"];
13248
+ const e = t.split(" ").map(Ii).filter((r) => r !== null), n = ["xs", "sm", "md", "lg", "xl", "2xl"];
13248
13249
  return e.sort((r, o) => n.indexOf(r.mq) - n.indexOf(o.mq)).map((r) => r.fullCls).join(" ");
13249
13250
  }
13250
13251
  import.meta.vitest && test("orderClassesByBreakpoint", () => {
@@ -13254,7 +13255,7 @@ import.meta.vitest && test("orderClassesByBreakpoint", () => {
13254
13255
  });
13255
13256
  function ut(t) {
13256
13257
  if (t = t.replace(/\s+/g, " "), !t) return "";
13257
- const e = ["xs", "sm", "md", "lg", "xl", "2xl"], n = t.split(" ").map(Bi).filter((o) => o !== null);
13258
+ const e = ["xs", "sm", "md", "lg", "xl", "2xl"], n = t.split(" ").map(Ii).filter((o) => o !== null);
13258
13259
  let r = t;
13259
13260
  if (n.length === 1) return n[0].fullCls;
13260
13261
  for (const o of n) {
@@ -13311,12 +13312,12 @@ const Vx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13311
13312
  const e = ke(t(Er)), n = t(ko);
13312
13313
  if (!e || e.blockId !== S(n, "_id", null)) return [];
13313
13314
  const r = S(n, e.prop, `${Dt},`), { classes: o } = jn(r);
13314
- return ee(N(o.trim().split(" "), Bi), (s) => !Ts(s));
13315
- }), Aa = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Gx = P((t) => {
13316
- const e = t(vd), n = t(Js), r = t(vc), o = jx(e);
13315
+ return ee(N(o.trim().split(" "), Ii), (s) => !Ts(s));
13316
+ }), Ta = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Gx = P((t) => {
13317
+ const e = t(vd), n = t(Ys), r = t(vc), o = jx(e);
13317
13318
  let s = ee(t(Wx), { mod: n });
13318
- return Re(n, "_") || (s = ee(s, (i) => o.includes(i.mq))), s = s.sort((i, l) => Aa[i.mq] - Aa[l.mq]), r || (s = ee(s, { dark: !1 })), s;
13319
- }), Oo = () => Ge(Gx), Ux = () => O(Js), Ir = (t) => {
13319
+ return Re(n, "_") || (s = ee(s, (i) => o.includes(i.mq))), s = s.sort((i, l) => Ta[i.mq] - Ta[l.mq]), r || (s = ee(s, { dark: !1 })), s;
13320
+ }), Oo = () => Ge(Gx), Ux = () => O(Ys), Ir = (t) => {
13320
13321
  const e = Oo();
13321
13322
  return Wu(e, { property: t });
13322
13323
  }, Kx = (t, e) => {
@@ -13395,16 +13396,16 @@ const Vx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13395
13396
  insetY: "inset-y-",
13396
13397
  opacity: "opacity-",
13397
13398
  flexBasis: "basis-"
13398
- }, Ta = {
13399
+ }, Ba = {
13399
13400
  xs: "",
13400
13401
  sm: "640px",
13401
13402
  md: "768px",
13402
13403
  lg: "1024px",
13403
13404
  xl: "1280px",
13404
13405
  "2xl": "1536px"
13405
- }, Yx = (t) => `${t.toUpperCase()} ${Ta[t] ? `(${Ta[t]} & up)` : ""}`, po = (t) => {
13406
+ }, Yx = (t) => `${t.toUpperCase()} ${Ba[t] ? `(${Ba[t]} & up)` : ""}`, po = (t) => {
13406
13407
  const { t: e } = U(), { type: n = "icons", label: r, property: o, onEmitChange: s = () => {
13407
- }, units: i, negative: l = !1 } = t, [c] = _r(), [d] = Ux(), [, u] = uo(), p = Ir(o), h = zd(), f = Ti(), [m] = re(), b = M(() => S(p, "fullCls", ""), [p]), y = L(
13408
+ }, units: i, negative: l = !1 } = t, [c] = _r(), [d] = Ux(), [, u] = uo(), p = Ir(o), h = zd(), f = Bi(), [m] = re(), b = M(() => S(p, "fullCls", ""), [p]), y = L(
13408
13409
  (T, C = !0) => {
13409
13410
  const k = { dark: c, mq: u, mod: d, cls: T };
13410
13411
  (c || d !== "") && (k.mq = "xs");
@@ -13515,7 +13516,7 @@ const Vx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13515
13516
  ]
13516
13517
  }
13517
13518
  ) }),
13518
- /* @__PURE__ */ a(we, { children: Jt(Ua(h)) })
13519
+ /* @__PURE__ */ a(we, { children: Jt(Ka(h)) })
13519
13520
  ] }) }, `option-${m}`)) })
13520
13521
  ] }),
13521
13522
  /* @__PURE__ */ a("div", { className: "mt-0 flex items-center", children: /* @__PURE__ */ a(
@@ -13531,7 +13532,7 @@ const Vx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13531
13532
  ]
13532
13533
  }
13533
13534
  );
13534
- }, Ba = ({ heading: t, items: e }) => {
13535
+ }, Ia = ({ heading: t, items: e }) => {
13535
13536
  const { t: n } = U(), r = Oo(), o = M(() => {
13536
13537
  const s = (c) => Ot(
13537
13538
  c.map((d) => d.styleType === "multiple" ? N(d.options, "key") : d.property)
@@ -13570,8 +13571,8 @@ const Vx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13570
13571
  ), s = M(() => ({}), []);
13571
13572
  return /* @__PURE__ */ a(qx.Provider, { value: s, children: e ? /* @__PURE__ */ g(Ld, { value: t.heading, className: "border-none", children: [
13572
13573
  /* @__PURE__ */ a(Pd, { className: "border-slate-150 border-t py-2 text-xs", children: /* @__PURE__ */ a("div", { className: "flex items-center py-2", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-x-2 text-xs font-medium", children: Jt(n(t.heading)) }) }) }),
13573
- /* @__PURE__ */ a(Od, { className: "py-2", children: t.items.map((i) => de(i, "component") ? Q.createElement(i.component, { key: i.label }) : de(i, "styleType") ? i.styleType === "multiple" ? /* @__PURE__ */ a(Cs, { ...i }, i.label + "multiple-choices") : i.styleType === "accordion" && o(i == null ? void 0 : i.conditions) ? /* @__PURE__ */ a(Ba, { ...i }, i.label + "nested-options") : null : /* @__PURE__ */ a(po, { ...i }, i.label + "block-style")) })
13574
- ] }) : /* @__PURE__ */ a("div", { className: "py-2", children: t.items.map((i, l) => de(i, "component") ? Q.createElement(i.component, { key: i.label }) : de(i, "styleType") ? i.styleType === "multiple" ? /* @__PURE__ */ a(Cs, { ...i }, i.label + "multiple-choices" + l) : i.styleType === "accordion" && o(i == null ? void 0 : i.conditions) ? /* @__PURE__ */ a(Ba, { ...i }, i.label + "nested-options" + l) : null : /* @__PURE__ */ a(po, { ...i }, i.label + "block-style" + l)) }) });
13574
+ /* @__PURE__ */ a(Od, { className: "py-2", children: t.items.map((i) => de(i, "component") ? Q.createElement(i.component, { key: i.label }) : de(i, "styleType") ? i.styleType === "multiple" ? /* @__PURE__ */ a(Cs, { ...i }, i.label + "multiple-choices") : i.styleType === "accordion" && o(i == null ? void 0 : i.conditions) ? /* @__PURE__ */ a(Ia, { ...i }, i.label + "nested-options") : null : /* @__PURE__ */ a(po, { ...i }, i.label + "block-style")) })
13575
+ ] }) : /* @__PURE__ */ a("div", { className: "py-2", children: t.items.map((i, l) => de(i, "component") ? Q.createElement(i.component, { key: i.label }) : de(i, "styleType") ? i.styleType === "multiple" ? /* @__PURE__ */ a(Cs, { ...i }, i.label + "multiple-choices" + l) : i.styleType === "accordion" && o(i == null ? void 0 : i.conditions) ? /* @__PURE__ */ a(Ia, { ...i }, i.label + "nested-options" + l) : null : /* @__PURE__ */ a(po, { ...i }, i.label + "block-style" + l)) }) });
13575
13576
  }, Zx = vo.Root, Qx = vo.Trigger, Hd = V.forwardRef(({ className: t, align: e = "center", sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ a(
13576
13577
  vo.Content,
13577
13578
  {
@@ -13589,7 +13590,7 @@ Hd.displayName = vo.Content.displayName;
13589
13590
  const e0 = Ze("selectedBreakpoints", ["XS", "MD", "XL"]), t0 = () => {
13590
13591
  const [t, e] = O(e0);
13591
13592
  return [t, e];
13592
- }, Ia = ({ landscape: t = !1, className: e = "" }) => /* @__PURE__ */ a(
13593
+ }, Ra = ({ landscape: t = !1, className: e = "" }) => /* @__PURE__ */ a(
13593
13594
  "svg",
13594
13595
  {
13595
13596
  className: ht("h-3 w-3", t ? "rotate-90" : "", e),
@@ -13605,28 +13606,28 @@ const e0 = Ze("selectedBreakpoints", ["XS", "MD", "XL"]), t0 = () => {
13605
13606
  title: "Mobile (Base)",
13606
13607
  content: "Styles set here are applied to all screen unless edited at higher breakpoint",
13607
13608
  breakpoint: "xs",
13608
- icon: /* @__PURE__ */ a(ji, { className: "h-4 w-4" }),
13609
+ icon: /* @__PURE__ */ a(Wi, { className: "h-4 w-4" }),
13609
13610
  width: 400
13610
13611
  },
13611
13612
  {
13612
13613
  title: "Mobile landscape (SM)",
13613
13614
  content: "Styles set here are applied at 640px and up unless edited at higher breakpoint",
13614
13615
  breakpoint: "sm",
13615
- icon: /* @__PURE__ */ a(ji, { className: "h-4 w-4 rotate-90" }),
13616
+ icon: /* @__PURE__ */ a(Wi, { className: "h-4 w-4 rotate-90" }),
13616
13617
  width: 640
13617
13618
  },
13618
13619
  {
13619
13620
  title: "Tablet (MD)",
13620
13621
  content: "Styles set here are applied at 768px and up",
13621
13622
  breakpoint: "md",
13622
- icon: /* @__PURE__ */ a(Ia, {}),
13623
+ icon: /* @__PURE__ */ a(Ra, {}),
13623
13624
  width: 800
13624
13625
  },
13625
13626
  {
13626
13627
  title: "Tablet Landscape (LG)",
13627
13628
  content: "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
13628
13629
  breakpoint: "lg",
13629
- icon: /* @__PURE__ */ a(Ia, { landscape: !0 }),
13630
+ icon: /* @__PURE__ */ a(Ra, { landscape: !0 }),
13630
13631
  width: 1024
13631
13632
  },
13632
13633
  {
@@ -13643,7 +13644,7 @@ const e0 = Ze("selectedBreakpoints", ["XS", "MD", "XL"]), t0 = () => {
13643
13644
  icon: /* @__PURE__ */ a(wp, { className: "h-4 w-4" }),
13644
13645
  width: 1920
13645
13646
  }
13646
- ], Ra = ({
13647
+ ], La = ({
13647
13648
  canvas: t = !1,
13648
13649
  openDelay: e = 400,
13649
13650
  tooltip: n = !0,
@@ -13690,13 +13691,13 @@ const e0 = Ze("selectedBreakpoints", ["XS", "MD", "XL"]), t0 = () => {
13690
13691
  buttonClass: r = "",
13691
13692
  activeButtonClass: o = ""
13692
13693
  }) => {
13693
- const [s, , i] = uo(), [l, c] = Si(), [d, u] = t0(), p = d, h = u, { t: f } = U(), m = W("breakpoints", Ns), b = (v) => {
13694
+ const [s, , i] = uo(), [l, c] = Ei(), [d, u] = t0(), p = d, h = u, { t: f } = U(), m = W("breakpoints", Ns), b = (v) => {
13694
13695
  p.includes(v) ? p.length > 2 && h(p.filter((E) => E !== v)) : h((E) => [...E, v]);
13695
13696
  }, y = (v) => {
13696
13697
  e || i(v), c(v);
13697
- }, x = ml(e ? l : s).toLowerCase();
13698
+ }, x = gl(e ? l : s).toLowerCase();
13698
13699
  return m.length < 4 ? /* @__PURE__ */ a("div", { className: "flex items-center rounded-md", children: N(m, (v) => /* @__PURE__ */ pn(
13699
- Ra,
13700
+ La,
13700
13701
  {
13701
13702
  canvas: e,
13702
13703
  ...v,
@@ -13708,7 +13709,7 @@ const e0 = Ze("selectedBreakpoints", ["XS", "MD", "XL"]), t0 = () => {
13708
13709
  /* @__PURE__ */ a("div", { className: "flex items-center", children: N(
13709
13710
  m.filter((v) => Ie(p, Wo(v.breakpoint))),
13710
13711
  (v) => /* @__PURE__ */ pn(
13711
- Ra,
13712
+ La,
13712
13713
  {
13713
13714
  canvas: e,
13714
13715
  openDelay: t,
@@ -13762,7 +13763,7 @@ function n0() {
13762
13763
  ] }) }) })
13763
13764
  ] });
13764
13765
  }
13765
- const r0 = Fs(
13766
+ const r0 = zs(
13766
13767
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
13767
13768
  ), Kt = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
13768
13769
  Cl.Root,
@@ -13781,7 +13782,7 @@ function jd({
13781
13782
  onRemove: r
13782
13783
  }) {
13783
13784
  var Xt;
13784
- const o = le(null), [s, i] = F(""), [l, c] = F(!1), [d, u] = F(-1), [, p] = Wl(), h = Rx(), { t: f } = U(), [m] = De(), b = ce(), y = zd(), x = Ti(), [v] = re(), [E, A] = F(""), _ = Ge(wr), T = (Xt = ke(m)) == null ? void 0 : Xt.prop, { classes: C } = jn(S(b, T, "")), w = (t === "default" ? C : e ?? "").split(" ").filter((G) => !$(G)), B = M(() => [...w].sort((G, pe) => {
13785
+ const o = le(null), [s, i] = F(""), [l, c] = F(!1), [d, u] = F(-1), [, p] = Wl(), h = Rx(), { t: f } = U(), [m] = De(), b = ce(), y = zd(), x = Bi(), [v] = re(), [E, A] = F(""), _ = Ge(wr), T = (Xt = ke(m)) == null ? void 0 : Xt.prop, { classes: C } = jn(S(b, T, "")), w = (t === "default" ? C : e ?? "").split(" ").filter((G) => !$(G)), B = M(() => [...w].sort((G, pe) => {
13785
13786
  const Le = G.startsWith(Lr), Et = pe.startsWith(Lr);
13786
13787
  return Le && !Et ? -1 : !Le && Et ? 1 : 0;
13787
13788
  }), [w]), R = W("flags.copyPaste", !0), I = (G) => {
@@ -14083,7 +14084,7 @@ const a0 = {
14083
14084
  deg: 1,
14084
14085
  ms: 0.1
14085
14086
  };
14086
- function La() {
14087
+ function Pa() {
14087
14088
  const { flexChild: t, gridChild: e } = Wf(), [n] = De(), [r, o] = Q.useState(""), [s, i] = Q.useState({
14088
14089
  onDrag: (d) => d,
14089
14090
  onDragEnd: (d) => d,
@@ -14158,7 +14159,7 @@ const Wd = V.forwardRef(({ className: t, orientation: e = "vertical", ...n }, r)
14158
14159
  }
14159
14160
  ));
14160
14161
  Wd.displayName = an.ScrollAreaScrollbar.displayName;
14161
- const Ii = vn.Root, Do = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
14162
+ const Ri = vn.Root, Do = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
14162
14163
  vn.List,
14163
14164
  {
14164
14165
  ref: n,
@@ -14218,7 +14219,7 @@ const l0 = ({
14218
14219
  onDragStart: (m) => h(m, { ...t, label: i, icon: s }),
14219
14220
  onDragEnd: f,
14220
14221
  draggable: u,
14221
- className: `${Ka(`chai-block-${o}`)} ${u ? "cursor-grab active:cursor-grabbing" : "cursor-pointer"} space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 dark:border-gray-700 dark:text-white dark:hover:bg-slate-800/50 dark:disabled:bg-gray-900 dark:disabled:text-foreground ${e ? "opacity-50" : ""}`,
14222
+ className: `${Ja(`chai-block-${o}`)} ${u ? "cursor-grab active:cursor-grabbing" : "cursor-pointer"} space-y-2 rounded-lg border border-border p-3 text-center hover:bg-slate-300/50 disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400 dark:border-gray-700 dark:text-white dark:hover:bg-slate-800/50 dark:disabled:bg-gray-900 dark:disabled:text-foreground ${e ? "opacity-50" : ""}`,
14222
14223
  children: [
14223
14224
  pn(s || Ls, { className: "w-4 h-4 mx-auto", "data-add-core-block-icon": o }),
14224
14225
  /* @__PURE__ */ a("p", { className: "truncate text-xs", children: On(p(i || o)) })
@@ -14233,7 +14234,7 @@ const l0 = ({
14233
14234
  gridCols: n = "grid-cols-2",
14234
14235
  disableBlockGroupsSidebar: r = !1
14235
14236
  }) => {
14236
- const o = $s(), s = Ja(o, "category"), i = _s(N(s.core, "group"));
14237
+ const o = $s(), s = Ya(o, "category"), i = _s(N(s.core, "group"));
14237
14238
  return /* @__PURE__ */ a(
14238
14239
  Qd,
14239
14240
  {
@@ -14305,12 +14306,12 @@ const u0 = ({
14305
14306
  )
14306
14307
  ] }) }),
14307
14308
  /* @__PURE__ */ a(Yd, { className: "flex flex-col justify-end p-3", children: /* @__PURE__ */ a(te, { disabled: o.trim() === "" || l, onClick: () => d(), size: "sm", className: "w-fit", children: l ? /* @__PURE__ */ g(Z, { children: [
14308
- /* @__PURE__ */ a(Ya, { className: "mr-2 h-4 w-4 animate-spin" }),
14309
+ /* @__PURE__ */ a(Xa, { className: "mr-2 h-4 w-4 animate-spin" }),
14309
14310
  " ",
14310
14311
  r("Importing...")
14311
14312
  ] }) : r("Import HTML") }) })
14312
14313
  ] });
14313
- }, Ri = Se.Root, Li = Se.Value, $o = V.forwardRef(({ className: t, children: e, ...n }, r) => /* @__PURE__ */ g(
14314
+ }, Li = Se.Root, Pi = Se.Value, $o = V.forwardRef(({ className: t, children: e, ...n }, r) => /* @__PURE__ */ g(
14314
14315
  Se.Trigger,
14315
14316
  {
14316
14317
  ref: r,
@@ -14468,7 +14469,7 @@ const g0 = P(
14468
14469
  [n]
14469
14470
  );
14470
14471
  return { data: o || [], isLoading: s === "loading", resetLibrary: l };
14471
- }, y0 = () => O(oi), x0 = ({
14472
+ }, y0 = () => O(si), x0 = ({
14472
14473
  block: t,
14473
14474
  html: e,
14474
14475
  blocks: n,
@@ -14566,7 +14567,7 @@ function Zd({ value: t, setValue: e }) {
14566
14567
  )
14567
14568
  ] }) });
14568
14569
  }
14569
- const Pa = ({
14570
+ const Oa = ({
14570
14571
  block: t,
14571
14572
  library: e,
14572
14573
  parentId: n = void 0,
@@ -14617,7 +14618,7 @@ const Pa = ({
14617
14618
  position: e,
14618
14619
  fromSidebar: n
14619
14620
  }) => {
14620
- const [r, o] = y0(), s = ja(), i = s.find((R) => R.id === r) || ke(s), { data: l, isLoading: c, resetLibrary: d } = b0(i), [u, p] = F(""), [h, f] = F([]), m = le(null);
14621
+ const [r, o] = y0(), s = Wa(), i = s.find((R) => R.id === r) || ke(s), { data: l, isLoading: c, resetLibrary: d } = b0(i), [u, p] = F(""), [h, f] = F([]), m = le(null);
14621
14622
  H(() => {
14622
14623
  l && Array.isArray(l) && l.length > 0 && (m.current = new kl(l, {
14623
14624
  keys: ["name", "label", "description", "group"],
@@ -14632,7 +14633,7 @@ const Pa = ({
14632
14633
  const R = m.current.search(u).map((I) => I.item);
14633
14634
  f(R);
14634
14635
  }, [u]);
14635
- const b = u.trim() && !$(h) ? h : l || [], y = Ja(b, "group"), [x, v] = F(null);
14636
+ const b = u.trim() && !$(h) ? h : l || [], y = Ya(b, "group"), [x, v] = F(null);
14636
14637
  H(() => {
14637
14638
  if ($(Ct(y))) {
14638
14639
  v(null);
@@ -14684,8 +14685,8 @@ const Pa = ({
14684
14685
  /* @__PURE__ */ a(Ps, { className: "h-4 w-4" }),
14685
14686
  _("Retry")
14686
14687
  ] })
14687
- ] }) }) : n ? /* @__PURE__ */ g(Ri, { value: x ?? "", onValueChange: v, children: [
14688
- /* @__PURE__ */ a($o, { className: "w-full", children: /* @__PURE__ */ a(Li, { placeholder: _("Select a group") }) }),
14688
+ ] }) }) : n ? /* @__PURE__ */ g(Li, { value: x ?? "", onValueChange: v, children: [
14689
+ /* @__PURE__ */ a($o, { className: "w-full", children: /* @__PURE__ */ a(Pi, { placeholder: _("Select a group") }) }),
14689
14690
  /* @__PURE__ */ a(Fo, { children: N(y, (R, I) => /* @__PURE__ */ a(zo, { value: I, children: On(_(I.toLowerCase())) }, I)) })
14690
14691
  ] }) : N(y, (R, I) => /* @__PURE__ */ g(
14691
14692
  "div",
@@ -14720,7 +14721,7 @@ const Pa = ({
14720
14721
  children: [
14721
14722
  $(E) && !$(y) ? /* @__PURE__ */ a("div", { className: "flex h-full flex-col items-center justify-center p-6 text-center", children: /* @__PURE__ */ a("p", { className: "text-sm", children: _("No blocks found in this group") }) }) : /* @__PURE__ */ g("div", { className: `grid w-full gap-2 ${n ? "grid-cols-1 pb-20" : "grid-cols-2 px-2"}`, children: [
14722
14723
  /* @__PURE__ */ a("div", { className: "flex flex-col gap-1", children: w.map((R, I) => /* @__PURE__ */ a(
14723
- Pa,
14724
+ Oa,
14724
14725
  {
14725
14726
  parentId: t,
14726
14727
  position: e,
@@ -14730,7 +14731,7 @@ const Pa = ({
14730
14731
  `block-${I}`
14731
14732
  )) }),
14732
14733
  /* @__PURE__ */ a("div", { className: "flex flex-col gap-1", children: B.map((R, I) => /* @__PURE__ */ a(
14733
- Pa,
14734
+ Oa,
14734
14735
  {
14735
14736
  parentId: t,
14736
14737
  position: e,
@@ -14757,7 +14758,7 @@ const Pa = ({
14757
14758
  groups: [],
14758
14759
  isLoading: !0,
14759
14760
  error: null
14760
- }), C0 = P(!1), Oa = (t) => {
14761
+ }), C0 = P(!1), Da = (t) => {
14761
14762
  if (!t) return "";
14762
14763
  let e = t.replace(/[-_]/g, " ");
14763
14764
  return e = e.replace(/([a-z])([A-Z])/g, "$1 $2"), e.split(" ").map((n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join(" ");
@@ -14779,11 +14780,11 @@ const Pa = ({
14779
14780
  }), p(!0);
14780
14781
  else if (!s && Object.keys(o || {}).length > 0) {
14781
14782
  const f = Object.entries(o).map(([b, y]) => {
14782
- const x = y, v = x.type || "partial", E = Oa(v);
14783
+ const x = y, v = x.type || "partial", E = Da(v);
14783
14784
  return {
14784
14785
  type: "PartialBlock",
14785
14786
  // Set the type to PartialBlock
14786
- label: Oa(x.name || b),
14787
+ label: Da(x.name || b),
14787
14788
  description: x.description || "",
14788
14789
  icon: Sp,
14789
14790
  group: E,
@@ -14839,7 +14840,7 @@ const Pa = ({
14839
14840
  disableBlockGroupsSidebar: r
14840
14841
  }
14841
14842
  );
14842
- }, Da = ["basic", "typography", "media", "layout", "form", "advanced", "other"], Qd = ({
14843
+ }, Ma = ["basic", "typography", "media", "layout", "form", "advanced", "other"], Qd = ({
14843
14844
  groups: t,
14844
14845
  blocks: e,
14845
14846
  parentId: n,
@@ -14882,7 +14883,7 @@ const Pa = ({
14882
14883
  ) : t.filter((I) => Hr(ee(Tt(e), { group: I }), { hidden: !0 }).length > 0),
14883
14884
  [e, T, t, c]
14884
14885
  ), k = M(
14885
- () => Uu(C, (I) => Da.indexOf(I) === -1 ? 99 : Da.indexOf(I)),
14886
+ () => Uu(C, (I) => Ma.indexOf(I) === -1 ? 99 : Ma.indexOf(I)),
14886
14887
  [C]
14887
14888
  ), w = M(() => f === "all" ? T : ee(Tt(T), { group: f }), [T, f]), B = M(() => f === "all" ? k : [f], [k, f]);
14888
14889
  return /* @__PURE__ */ g("div", { className: "mx-auto flex h-full w-full flex-col", children: [
@@ -14954,7 +14955,7 @@ const Pa = ({
14954
14955
  }, [i, p, l]);
14955
14956
  const f = L(() => {
14956
14957
  me.publish(oe.CLOSE_ADD_BLOCK);
14957
- }, []), m = _u(), b = d && h(he.IMPORT_HTML), x = ja().length > 0;
14958
+ }, []), m = _u(), b = d && h(he.IMPORT_HTML), x = Wa().length > 0;
14958
14959
  return H(() => {
14959
14960
  i === "library" && !x && l("core");
14960
14961
  }, [i, x, l]), /* @__PURE__ */ g("div", { className: ht("flex h-full w-full flex-col overflow-hidden", t), children: [
@@ -14963,7 +14964,7 @@ const Pa = ({
14963
14964
  /* @__PURE__ */ a("span", { className: "p-0 text-xs font-light leading-3 opacity-80 xl:pl-1", children: s(i === "html" ? "Enter or paste TailwindCSS HTML snippet" : "Click to add block to page") })
14964
14965
  ] }) : null,
14965
14966
  /* @__PURE__ */ g(
14966
- Ii,
14967
+ Ri,
14967
14968
  {
14968
14969
  onValueChange: (v) => {
14969
14970
  c(""), l(v);
@@ -15024,9 +15025,9 @@ const Pa = ({
15024
15025
  right: 0
15025
15026
  };
15026
15027
  return /* @__PURE__ */ a("div", { style: { ...S0, ...r }, children: /* @__PURE__ */ a("div", { className: "h-0.5 flex-1 rounded-[1px] bg-green-500" }) });
15027
- }), Ma = "h-3 w-3 flex-shrink-0", Pi = (t) => {
15028
+ }), $a = "h-3 w-3 flex-shrink-0", Oi = (t) => {
15028
15029
  const e = $s(), n = S(e, [t.type, "icon"]);
15029
- return n ? Q.createElement(n, { className: Ma }) : /* @__PURE__ */ a(Ep, { className: Ma });
15030
+ return n ? Q.createElement(n, { className: $a }) : /* @__PURE__ */ a(Ep, { className: $a });
15030
15031
  }, _0 = xn(function({ children: e, isDragging: n }) {
15031
15032
  return n ? /* @__PURE__ */ a("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: e }) : null;
15032
15033
  }), A0 = xn(({ id: t, isDragging: e, mouse: n }) => {
@@ -15042,7 +15043,7 @@ const Pa = ({
15042
15043
  className: "pointer-events-none absolute z-50 rounded border border-border bg-gray-100/80 font-semibold text-blue-600 shadow-md dark:border-gray-700 dark:bg-gray-800",
15043
15044
  style: s,
15044
15045
  children: /* @__PURE__ */ g("button", { type: "button", className: "flex !cursor-grab items-center p-0.5", "aria-label": `Type: ${o == null ? void 0 : o._type}`, children: [
15045
- /* @__PURE__ */ a("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ a(Pi, { type: o == null ? void 0 : o._type }) }),
15046
+ /* @__PURE__ */ a("div", { className: "-mt-0.5 h-3 w-3", children: /* @__PURE__ */ a(Oi, { type: o == null ? void 0 : o._type }) }),
15046
15047
  /* @__PURE__ */ a("div", { className: "ml-2 truncate text-[11px]", children: (o == null ? void 0 : o._name) || (o == null ? void 0 : o._type) })
15047
15048
  ] })
15048
15049
  }
@@ -15092,7 +15093,7 @@ const P0 = (t, e) => {
15092
15093
  }
15093
15094
  ));
15094
15095
  ru.displayName = Ue.Overlay.displayName;
15095
- const Oi = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ g($0, { children: [
15096
+ const Di = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ g($0, { children: [
15096
15097
  /* @__PURE__ */ a(ru, {}),
15097
15098
  /* @__PURE__ */ a(
15098
15099
  Ue.Content,
@@ -15106,22 +15107,22 @@ const Oi = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ g($0, { c
15106
15107
  }
15107
15108
  )
15108
15109
  ] }));
15109
- Oi.displayName = Ue.Content.displayName;
15110
- const Di = ({ className: t, ...e }) => /* @__PURE__ */ a("div", { className: j("flex flex-col space-y-2 text-center sm:text-left", t), ...e });
15111
- Di.displayName = "AlertDialogHeader";
15110
+ Di.displayName = Ue.Content.displayName;
15111
+ const Mi = ({ className: t, ...e }) => /* @__PURE__ */ a("div", { className: j("flex flex-col space-y-2 text-center sm:text-left", t), ...e });
15112
+ Mi.displayName = "AlertDialogHeader";
15112
15113
  const ou = ({ className: t, ...e }) => /* @__PURE__ */ a("div", { className: j("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", t), ...e });
15113
15114
  ou.displayName = "AlertDialogFooter";
15114
- const Mi = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(Ue.Title, { ref: n, className: j("text-lg font-semibold", t), ...e }));
15115
- Mi.displayName = Ue.Title.displayName;
15115
+ const $i = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(Ue.Title, { ref: n, className: j("text-lg font-semibold", t), ...e }));
15116
+ $i.displayName = Ue.Title.displayName;
15116
15117
  const su = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(Ue.Description, { ref: n, className: j("text-sm text-muted-foreground", t), ...e }));
15117
15118
  su.displayName = Ue.Description.displayName;
15118
- const iu = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(Ue.Action, { ref: n, className: j(Wa(), t), ...e }));
15119
+ const iu = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(Ue.Action, { ref: n, className: j(Ga(), t), ...e }));
15119
15120
  iu.displayName = Ue.Action.displayName;
15120
15121
  const au = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
15121
15122
  Ue.Cancel,
15122
15123
  {
15123
15124
  ref: n,
15124
- className: j(Wa({ variant: "outline" }), "mt-2 sm:mt-0", t),
15125
+ className: j(Ga({ variant: "outline" }), "mt-2 sm:mt-0", t),
15125
15126
  ...e
15126
15127
  }
15127
15128
  ));
@@ -15132,13 +15133,13 @@ const lu = ({ children: t }) => {
15132
15133
  }, [n]);
15133
15134
  return /* @__PURE__ */ a("div", { className: "flex items-center", children: /* @__PURE__ */ g(nu, { children: [
15134
15135
  /* @__PURE__ */ a(M0, { asChild: !0, children: t || /* @__PURE__ */ g(te, { size: "sm", variant: "ghost", className: "flex items-center", children: [
15135
- /* @__PURE__ */ a(al, {}),
15136
+ /* @__PURE__ */ a(ll, {}),
15136
15137
  " ",
15137
15138
  e("Clear")
15138
15139
  ] }) }),
15139
- /* @__PURE__ */ g(Oi, { className: "border-border", children: [
15140
- /* @__PURE__ */ g(Di, { children: [
15141
- /* @__PURE__ */ a(Mi, { className: "text-foreground", children: e("Clear whole canvas?") }),
15140
+ /* @__PURE__ */ g(Di, { className: "border-border", children: [
15141
+ /* @__PURE__ */ g(Mi, { children: [
15142
+ /* @__PURE__ */ a($i, { className: "text-foreground", children: e("Clear whole canvas?") }),
15142
15143
  /* @__PURE__ */ a(su, { children: e("Are you sure you want to clear the page?") })
15143
15144
  ] }),
15144
15145
  /* @__PURE__ */ g(ou, { children: [
@@ -15148,7 +15149,7 @@ const lu = ({ children: t }) => {
15148
15149
  ] })
15149
15150
  ] }) });
15150
15151
  }, F0 = () => {
15151
- const t = ce(), { t: e } = U(), [, n] = O(Vl), r = Ga(), o = () => {
15152
+ const t = ce(), { t: e } = U(), [, n] = O(Vl), r = Ua(), o = () => {
15152
15153
  t && n({
15153
15154
  isOpen: !0,
15154
15155
  blockId: t._id
@@ -15166,11 +15167,11 @@ const lu = ({ children: t }) => {
15166
15167
  _libBlockId: null
15167
15168
  });
15168
15169
  }, className: "flex items-center gap-x-4 text-xs", children: [
15169
- /* @__PURE__ */ a(el, { className: "h-4 w-4" }),
15170
+ /* @__PURE__ */ a(tl, { className: "h-4 w-4" }),
15170
15171
  " ",
15171
15172
  t("Unlink from library")
15172
15173
  ] });
15173
- }, $a = () => {
15174
+ }, Fa = () => {
15174
15175
  const { t } = U(), [e] = re();
15175
15176
  return W("flags.exportCode", !1) ? /* @__PURE__ */ g(
15176
15177
  ve,
@@ -15184,8 +15185,8 @@ const lu = ({ children: t }) => {
15184
15185
  ]
15185
15186
  }
15186
15187
  ) : null;
15187
- }, Fa = ({ isFromBody: t = !1 }) => {
15188
- const [e] = ue(), [n] = re(), { pasteBlocks: r } = pi(), [, o, s] = bc(), { t: i } = U(), l = ce(), c = W("flags.copyPaste", !0), d = L(() => {
15188
+ }, za = ({ isFromBody: t = !1 }) => {
15189
+ const [e] = ue(), [n] = re(), { pasteBlocks: r } = fi(), [, o, s] = bc(), { t: i } = U(), l = ce(), c = W("flags.copyPaste", !0), d = L(() => {
15189
15190
  var h;
15190
15191
  const p = (t ? (h = e == null ? void 0 : e.filter((f) => !(f != null && f._parent))) == null ? void 0 : h.map((f) => f == null ? void 0 : f._id) : n).map((f) => {
15191
15192
  const m = e.find((b) => b._id === f);
@@ -15217,7 +15218,7 @@ const lu = ({ children: t }) => {
15217
15218
  c && /* @__PURE__ */ g(
15218
15219
  ve,
15219
15220
  {
15220
- disabled: !Hs(l == null ? void 0 : l._type),
15221
+ disabled: !Vs(l == null ? void 0 : l._type),
15221
15222
  onClick: d,
15222
15223
  className: "flex items-center gap-x-4 text-xs",
15223
15224
  children: [
@@ -15250,15 +15251,15 @@ const lu = ({ children: t }) => {
15250
15251
  n("Cut")
15251
15252
  ] }) });
15252
15253
  }, V0 = () => {
15253
- const [t] = re(), e = ei(), n = ce(), { t: r } = U();
15254
+ const [t] = re(), e = ti(), n = ce(), { t: r } = U();
15254
15255
  return /* @__PURE__ */ g(
15255
15256
  ve,
15256
15257
  {
15257
- disabled: !Vs(n == null ? void 0 : n._type),
15258
+ disabled: !js(n == null ? void 0 : n._type),
15258
15259
  className: "flex items-center gap-x-4 text-xs",
15259
15260
  onClick: () => e(t),
15260
15261
  children: [
15261
- /* @__PURE__ */ a(qa, {}),
15262
+ /* @__PURE__ */ a(Za, {}),
15262
15263
  " ",
15263
15264
  r("Remove")
15264
15265
  ]
@@ -15281,7 +15282,7 @@ const lu = ({ children: t }) => {
15281
15282
  }
15282
15283
  );
15283
15284
  }, W0 = ({ node: t }) => {
15284
- const { t: e } = U(), [n] = re(), r = li(), o = ce(), { hasPermission: s } = bt(), { librarySite: i } = W("flags", { librarySite: !1 }), l = yt(), c = L(() => {
15285
+ const { t: e } = U(), [n] = re(), r = ci(), o = ce(), { hasPermission: s } = bt(), { librarySite: i } = W("flags", { librarySite: !1 }), l = yt(), c = L(() => {
15285
15286
  r(n);
15286
15287
  }, [n, r]), d = M(() => de(o, "_libBlockId") && !$(o._libBlockId), [o == null ? void 0 : o._libBlockId]);
15287
15288
  return t === "BODY" ? /* @__PURE__ */ a(mt, { side: "bottom", className: "border-border text-xs", children: s(he.ADD_BLOCK) && /* @__PURE__ */ g(Z, { children: [
@@ -15298,8 +15299,8 @@ const lu = ({ children: t }) => {
15298
15299
  ]
15299
15300
  }
15300
15301
  ),
15301
- s(he.ADD_BLOCK) && /* @__PURE__ */ a(Fa, { isFromBody: !0 }),
15302
- /* @__PURE__ */ a($a, {}),
15302
+ s(he.ADD_BLOCK) && /* @__PURE__ */ a(za, { isFromBody: !0 }),
15303
+ /* @__PURE__ */ a(Fa, {}),
15303
15304
  /* @__PURE__ */ a(
15304
15305
  ve,
15305
15306
  {
@@ -15310,7 +15311,7 @@ const lu = ({ children: t }) => {
15310
15311
  lu,
15311
15312
  {
15312
15313
  children: /* @__PURE__ */ g("div", { className: "flex items-center gap-x-4 text-xs", children: [
15313
- /* @__PURE__ */ a(al, {}),
15314
+ /* @__PURE__ */ a(ll, {}),
15314
15315
  " ",
15315
15316
  e("Clear canvas")
15316
15317
  ] })
@@ -15336,7 +15337,7 @@ const lu = ({ children: t }) => {
15336
15337
  /* @__PURE__ */ g(
15337
15338
  ve,
15338
15339
  {
15339
- disabled: !Hs(o == null ? void 0 : o._type),
15340
+ disabled: !Vs(o == null ? void 0 : o._type),
15340
15341
  className: "flex items-center gap-x-4 text-xs",
15341
15342
  onClick: c,
15342
15343
  children: [
@@ -15349,10 +15350,10 @@ const lu = ({ children: t }) => {
15349
15350
  ] }),
15350
15351
  /* @__PURE__ */ a(j0, { node: t }),
15351
15352
  s(he.MOVE_BLOCK) && /* @__PURE__ */ a(H0, {}),
15352
- s(he.ADD_BLOCK) && /* @__PURE__ */ a(Fa, {}),
15353
+ s(he.ADD_BLOCK) && /* @__PURE__ */ a(za, {}),
15353
15354
  d && i && /* @__PURE__ */ a(z0, {}),
15354
15355
  s(he.CREATE_LIBRARY_BLOCK) && i && /* @__PURE__ */ a(F0, {}),
15355
- /* @__PURE__ */ a($a, {}),
15356
+ /* @__PURE__ */ a(Fa, {}),
15356
15357
  s(he.DELETE_BLOCK) && /* @__PURE__ */ a(V0, {})
15357
15358
  ] });
15358
15359
  }, cu = ({ children: t, id: e, node: n }) => {
@@ -15386,7 +15387,7 @@ const lu = ({ children: t }) => {
15386
15387
  };
15387
15388
  Object.values(he);
15388
15389
  const du = () => {
15389
- const [t] = O(Wn), [e] = O(Ws), [n] = O(Gs), [r] = O(Us), [o] = O(Rl), [s] = O(Ll), [i] = O(Pl);
15390
+ const [t] = O(Wn), [e] = O(Gs), [n] = O(Us), [r] = O(Ks), [o] = O(Rl), [s] = O(Ll), [i] = O(Pl);
15390
15391
  return {
15391
15392
  errors: t,
15392
15393
  isValid: e,
@@ -15547,7 +15548,7 @@ const du = () => {
15547
15548
  xe && m && "text-purple-800"
15548
15549
  ),
15549
15550
  children: [
15550
- A.length > 0 ? /* @__PURE__ */ a("div", { className: "text-red-500", children: /* @__PURE__ */ a(ll, { className: "h-3 w-3" }) }) : /* @__PURE__ */ a(Pi, { type: f == null ? void 0 : f._type }),
15551
+ A.length > 0 ? /* @__PURE__ */ a("div", { className: "text-red-500", children: /* @__PURE__ */ a(cl, { className: "h-3 w-3" }) }) : /* @__PURE__ */ a(Oi, { type: f == null ? void 0 : f._type }),
15551
15552
  x ? /* @__PURE__ */ a(G0, { node: t }) : /* @__PURE__ */ a(
15552
15553
  "div",
15553
15554
  {
@@ -15584,7 +15585,7 @@ const du = () => {
15584
15585
  },
15585
15586
  className: "cursor-pointer rounded bg-transparent p-0.5 hover:bg-primary/10",
15586
15587
  asChild: !0,
15587
- children: _ ? /* @__PURE__ */ a(Xr, { className: "h-4 w-4" }) : /* @__PURE__ */ a(il, { className: "h-4 w-4" })
15588
+ children: _ ? /* @__PURE__ */ a(Xr, { className: "h-4 w-4" }) : /* @__PURE__ */ a(al, { className: "h-4 w-4" })
15588
15589
  }
15589
15590
  ),
15590
15591
  /* @__PURE__ */ a(we, { className: "isolate z-[9999] text-xs", side: "bottom", children: r(_ ? "Hide the block from page" : "Show the block on page") })
@@ -15605,7 +15606,7 @@ const du = () => {
15605
15606
  r.push(...uu(t, o == null ? void 0 : o._id));
15606
15607
  }), r;
15607
15608
  }, Y0 = () => {
15608
- const [t, e] = O(Vl), { t: n } = U(), [r] = ue(), o = () => e({ isOpen: !1, blockId: null }), s = Ga(), i = M(() => {
15609
+ const [t, e] = O(Vl), { t: n } = U(), [r] = ue(), o = () => e({ isOpen: !1, blockId: null }), s = Ua(), i = M(() => {
15609
15610
  if (!t.blockId) return [];
15610
15611
  const l = ne(r, { _id: t.blockId });
15611
15612
  return l == null || delete l._parent, [l, ...uu(r, l == null ? void 0 : l._id)];
@@ -15618,7 +15619,7 @@ const du = () => {
15618
15619
  parentContext: t,
15619
15620
  setParentContext: e
15620
15621
  }) => {
15621
- const { t: n } = U(), { canPaste: r, pasteBlocks: o } = pi(), s = W("flags.copyPaste", !0);
15622
+ const { t: n } = U(), { canPaste: r, pasteBlocks: o } = fi(), s = W("flags.copyPaste", !0);
15622
15623
  return H(() => {
15623
15624
  r("root") || e(null);
15624
15625
  }, [r("root")]), !t || !r("root") || !s ? null : /* @__PURE__ */ a("div", { className: "absolute inset-0", children: /* @__PURE__ */ g(Mt, { open: !0, onOpenChange: () => e(null), children: [
@@ -15657,7 +15658,7 @@ const du = () => {
15657
15658
  return o ? gt(r._type, o) : !1;
15658
15659
  };
15659
15660
  }, Z0 = () => {
15660
- const [t] = O(Bl), [e, n] = re(), [r] = To(), o = Ft(), [, s] = De(), { moveBlocks: i } = He(), l = q0(), c = le(null), [, d] = O(ri), { t: u } = U(), [p, h] = F(null), f = () => {
15661
+ const [t] = O(Bl), [e, n] = re(), [r] = To(), o = Ft(), [, s] = De(), { moveBlocks: i } = He(), l = q0(), c = le(null), [, d] = O(oi), { t: u } = U(), [p, h] = F(null), f = () => {
15661
15662
  n([]), s([]);
15662
15663
  }, m = M(() => {
15663
15664
  const C = (w, B) => w.filter((R) => !B.includes(R._id)).map((R) => ({
@@ -15744,7 +15745,7 @@ const du = () => {
15744
15745
  }, [d]);
15745
15746
  const { hasPermission: T } = bt();
15746
15747
  return $(t) ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("div", { className: "mt-10 flex h-full w-full items-center justify-center p-8", children: /* @__PURE__ */ g("div", { className: "flex flex-col items-center space-y-6 text-center", children: [
15747
- /* @__PURE__ */ a("div", { className: "rounded-full bg-muted p-6", children: /* @__PURE__ */ a(cl, { className: "h-12 w-12 text-muted-foreground" }) }),
15748
+ /* @__PURE__ */ a("div", { className: "rounded-full bg-muted p-6", children: /* @__PURE__ */ a(dl, { className: "h-12 w-12 text-muted-foreground" }) }),
15748
15749
  /* @__PURE__ */ g("div", { className: "space-y-2", children: [
15749
15750
  /* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-foreground", children: u("This page is empty") }),
15750
15751
  /* @__PURE__ */ a("p", { className: "max-w-sm text-sm text-muted-foreground", children: u("Get started by adding your first block to begin building your page") })
@@ -15952,8 +15953,8 @@ const Q0 = ({ value: t, onChange: e, disabled: n }) => {
15952
15953
  r.some((s) => s.family === e) || n(r[0].family);
15953
15954
  }, [e, n]), /* @__PURE__ */ g("div", { className: "space-y-0.5", children: [
15954
15955
  /* @__PURE__ */ a(Kt, { className: "mb-1 block text-xs text-gray-600", children: o(Jt(t)) }),
15955
- /* @__PURE__ */ g(Ri, { value: e, onValueChange: n, children: [
15956
- /* @__PURE__ */ a($o, { className: "h-8 w-full text-xs text-black", children: /* @__PURE__ */ a(Li, { placeholder: o("Select font") }) }),
15956
+ /* @__PURE__ */ g(Li, { value: e, onValueChange: n, children: [
15957
+ /* @__PURE__ */ a($o, { className: "h-8 w-full text-xs text-black", children: /* @__PURE__ */ a(Pi, { placeholder: o("Select font") }) }),
15957
15958
  /* @__PURE__ */ a(Fo, { children: r.map((s) => /* @__PURE__ */ a(zo, { value: s.family, children: s.family }, s.family)) })
15958
15959
  ] })
15959
15960
  ] });
@@ -16009,15 +16010,7 @@ const Q0 = ({ value: t, onChange: e, disabled: n }) => {
16009
16010
  card: ["#f7f8f8", "#17181c"],
16010
16011
  "card-foreground": ["#0f1419", "#d9d9d9"],
16011
16012
  popover: ["#ffffff", "#000000"],
16012
- "popover-foreground": ["#0f1419", "#e7e9ea"],
16013
- sidebar: ["#f7f8f8", "#17181c"],
16014
- "sidebar-foreground": ["#0f1419", "#d9d9d9"],
16015
- "sidebar-primary": ["#1e9df1", "#1da1f2"],
16016
- "sidebar-primary-foreground": ["#ffffff", "#ffffff"],
16017
- "sidebar-accent": ["#e3ecf6", "#061622"],
16018
- "sidebar-accent-foreground": ["#1e9df1", "#1c9cf0"],
16019
- "sidebar-border": ["#e1e8ed", "#38444d"],
16020
- "sidebar-ring": ["#1da1f2", "#1da1f2"]
16013
+ "popover-foreground": ["#0f1419", "#e7e9ea"]
16021
16014
  }
16022
16015
  }, ov = {
16023
16016
  fontFamily: {
@@ -16101,7 +16094,7 @@ const Q0 = ({ value: t, onChange: e, disabled: n }) => {
16101
16094
  "popover-foreground": ["#3d3436", "#f2e9e4"]
16102
16095
  }
16103
16096
  }, av = Ms(
16104
- () => import("./css-import-modal-CcZVLsF9.js").then((t) => ({ default: t.CssImportModal }))
16097
+ () => import("./css-import-modal-BhLPzQH8.js").then((t) => ({ default: t.CssImportModal }))
16105
16098
  ), fu = "chai-builder-previous-theme", lv = [
16106
16099
  { shadcn_default: nv },
16107
16100
  { twitter_theme: rv },
@@ -16213,8 +16206,8 @@ const Q0 = ({ value: t, onChange: e, disabled: n }) => {
16213
16206
  ] }) })
16214
16207
  ] }),
16215
16208
  /* @__PURE__ */ g("div", { className: "flex items-center gap-2 px-0", children: [
16216
- /* @__PURE__ */ a("div", { className: "w-[70%]", children: /* @__PURE__ */ g(Ri, { value: r, onValueChange: o, children: [
16217
- /* @__PURE__ */ a($o, { className: "h-9 w-full text-sm", children: /* @__PURE__ */ a(Li, { placeholder: y("Select preset") }) }),
16209
+ /* @__PURE__ */ a("div", { className: "w-[70%]", children: /* @__PURE__ */ g(Li, { value: r, onValueChange: o, children: [
16210
+ /* @__PURE__ */ a($o, { className: "h-9 w-full text-sm", children: /* @__PURE__ */ a(Pi, { placeholder: y("Select preset") }) }),
16218
16211
  /* @__PURE__ */ a(Fo, { children: Array.isArray(l) && l.map((k) => {
16219
16212
  const w = Object.keys(k)[0], B = w.replaceAll("_", " ");
16220
16213
  return /* @__PURE__ */ a(zo, { value: w, children: On(B) }, w);
@@ -16245,7 +16238,7 @@ const Q0 = ({ value: t, onChange: e, disabled: n }) => {
16245
16238
  /* @__PURE__ */ a(Pp, { className: "h-3 w-3 text-gray-600" }),
16246
16239
  /* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: y("Border Radius") })
16247
16240
  ] }),
16248
- /* @__PURE__ */ a(Ei, { variant: "secondary", className: "text-xs", children: f.borderRadius })
16241
+ /* @__PURE__ */ a(_i, { variant: "secondary", className: "text-xs", children: f.borderRadius })
16249
16242
  ] }),
16250
16243
  /* @__PURE__ */ a("div", { className: "flex items-center gap-4 py-2", children: /* @__PURE__ */ a(Q0, { value: f.borderRadius, onChange: _ }) })
16251
16244
  ] }),
@@ -16257,7 +16250,7 @@ const Q0 = ({ value: t, onChange: e, disabled: n }) => {
16257
16250
  /* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: y("Colors") })
16258
16251
  ] }),
16259
16252
  p && /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
16260
- /* @__PURE__ */ a(dl, { className: "h-4 w-4" }),
16253
+ /* @__PURE__ */ a(ul, { className: "h-4 w-4" }),
16261
16254
  /* @__PURE__ */ a(
16262
16255
  Rr,
16263
16256
  {
@@ -16267,7 +16260,7 @@ const Q0 = ({ value: t, onChange: e, disabled: n }) => {
16267
16260
  className: "mx-1"
16268
16261
  }
16269
16262
  ),
16270
- /* @__PURE__ */ a(ul, { className: "h-4 w-4" })
16263
+ /* @__PURE__ */ a(pl, { className: "h-4 w-4" })
16271
16264
  ] })
16272
16265
  ] }),
16273
16266
  /* @__PURE__ */ a("div", { className: "space-y-2", children: b.colors.map((k) => C(k)) })
@@ -16839,7 +16832,7 @@ function Hw({ onClick: t }) {
16839
16832
  },
16840
16833
  {
16841
16834
  name: n("Replace placeholder content"),
16842
- icon: nl,
16835
+ icon: rl,
16843
16836
  prompt: n("Discard current placeholder content and replace with meaningful relevant content.")
16844
16837
  },
16845
16838
  {
@@ -16887,7 +16880,7 @@ function Hw({ onClick: t }) {
16887
16880
  },
16888
16881
  l
16889
16882
  ) }),
16890
- /* @__PURE__ */ a(_i, { side: "right", children: /* @__PURE__ */ a("ul", { children: /* @__PURE__ */ a("li", { children: n("Happy") }) }) })
16883
+ /* @__PURE__ */ a(Ai, { side: "right", children: /* @__PURE__ */ a("ul", { children: /* @__PURE__ */ a("li", { children: n("Happy") }) }) })
16891
16884
  ] }) : /* @__PURE__ */ g(
16892
16885
  "li",
16893
16886
  {
@@ -16914,7 +16907,7 @@ const Vw = ({ blockId: t }) => {
16914
16907
  return /* @__PURE__ */ a("div", { className: "", children: t ? /* @__PURE__ */ g("div", { className: "", children: [
16915
16908
  /* @__PURE__ */ a("label", { className: "text-xs font-medium text-gray-500", children: e("Selected block") }),
16916
16909
  d && /* @__PURE__ */ g("div", { className: "flex items-center gap-x-1 rounded border border-primary/20 bg-primary/10 p-1.5 text-xs text-primary", children: [
16917
- /* @__PURE__ */ a(Pi, { type: d._type }),
16910
+ /* @__PURE__ */ a(Oi, { type: d._type }),
16918
16911
  " ",
16919
16912
  /* @__PURE__ */ a("p", { className: "truncate whitespace-nowrap leading-none", children: d._name || d._type })
16920
16913
  ] }),
@@ -16957,14 +16950,14 @@ const Vw = ({ blockId: t }) => {
16957
16950
  className: "h-7 w-7",
16958
16951
  disabled: r || s.trim().length < 1,
16959
16952
  size: "icon",
16960
- children: r ? /* @__PURE__ */ a(Ps, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ a(sl, { className: "h-4 w-4" })
16953
+ children: r ? /* @__PURE__ */ a(Ps, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ a(il, { className: "h-4 w-4" })
16961
16954
  }
16962
16955
  )
16963
16956
  ] })
16964
16957
  ] }),
16965
16958
  /* @__PURE__ */ a("div", { className: "max-w-full pt-2", children: o && /* @__PURE__ */ a("p", { className: "break-words rounded border border-red-500 bg-red-100 p-1 text-xs text-red-500", children: o.message }) })
16966
16959
  ] }) : /* @__PURE__ */ a("div", { className: "p-4 text-center", children: /* @__PURE__ */ g("div", { className: "space-y-4 rounded-xl p-4 text-muted-foreground", children: [
16967
- /* @__PURE__ */ a(zs, { className: "mx-auto h-7 w-7 text-muted-foreground" }),
16960
+ /* @__PURE__ */ a(Hs, { className: "mx-auto h-7 w-7 text-muted-foreground" }),
16968
16961
  /* @__PURE__ */ a("h1", { children: e("Please select a block to Ask AI") })
16969
16962
  ] }) }) });
16970
16963
  }, gu = () => {
@@ -16974,7 +16967,7 @@ const Vw = ({ blockId: t }) => {
16974
16967
  function jw() {
16975
16968
  const [t, e] = _r();
16976
16969
  return /* @__PURE__ */ g("div", { className: "flex items-center", children: [
16977
- t ? /* @__PURE__ */ a(ul, { className: "size-4 shrink-0" }) : /* @__PURE__ */ a(dl, { className: "size-4 shrink-0" }),
16970
+ t ? /* @__PURE__ */ a(pl, { className: "size-4 shrink-0" }) : /* @__PURE__ */ a(ul, { className: "size-4 shrink-0" }),
16978
16971
  /* @__PURE__ */ a(
16979
16972
  Rr,
16980
16973
  {
@@ -17001,7 +16994,7 @@ const Ww = () => {
17001
16994
  /* @__PURE__ */ a(te, { disabled: !t(), size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ a(qr, {}) }),
17002
16995
  /* @__PURE__ */ a(te, { disabled: !e(), onClick: r, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ a(qr, { className: "rotate-180 scale-y-[-1] transform" }) })
17003
16996
  ] });
17004
- }, Gw = be.Root, L1 = be.Trigger, Uw = be.Portal, bu = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
16997
+ }, Gw = be.Root, P1 = be.Trigger, Uw = be.Portal, bu = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(
17005
16998
  be.Overlay,
17006
16999
  {
17007
17000
  className: j(
@@ -17013,7 +17006,7 @@ const Ww = () => {
17013
17006
  }
17014
17007
  ));
17015
17008
  bu.displayName = be.Overlay.displayName;
17016
- const Kw = Fs(
17009
+ const Kw = zs(
17017
17010
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
17018
17011
  {
17019
17012
  variants: {
@@ -17048,14 +17041,14 @@ vu.displayName = be.Title.displayName;
17048
17041
  const Jw = V.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */ a(be.Description, { ref: n, className: j("text-sm text-muted-foreground", t), ...e }));
17049
17042
  Jw.displayName = be.Description.displayName;
17050
17043
  const Yw = () => {
17051
- const { t } = U(), [e, n] = F(null), [r, o] = F(-1), [s, i] = F(!1), l = yt(), [, c] = ci();
17044
+ const { t } = U(), [e, n] = F(null), [r, o] = F(-1), [s, i] = F(!1), l = yt(), [, c] = di();
17052
17045
  return Rn(oe.OPEN_ADD_BLOCK, (d) => {
17053
17046
  l ? c("add-block") : (n(d ? d._id : null), o((d == null ? void 0 : d.position) ?? -1), i(!0));
17054
17047
  }), Rn(oe.CLOSE_ADD_BLOCK, () => {
17055
17048
  n(null), o(-1), i(!1);
17056
- }), /* @__PURE__ */ a(nu, { open: s, onOpenChange: () => s ? i(!1) : "", children: /* @__PURE__ */ g(Oi, { className: "max-w-5xl overflow-hidden border-border", children: [
17057
- /* @__PURE__ */ g(Di, { className: "flex flex-row items-center justify-between", children: [
17058
- /* @__PURE__ */ a(Mi, { className: "text-foreground", children: t("Add blocks") }),
17049
+ }), /* @__PURE__ */ a(nu, { open: s, onOpenChange: () => s ? i(!1) : "", children: /* @__PURE__ */ g(Di, { className: "max-w-5xl overflow-hidden border-border", children: [
17050
+ /* @__PURE__ */ g(Mi, { className: "flex flex-row items-center justify-between", children: [
17051
+ /* @__PURE__ */ a($i, { className: "text-foreground", children: t("Add blocks") }),
17059
17052
  /* @__PURE__ */ a(
17060
17053
  "button",
17061
17054
  {
@@ -17217,7 +17210,7 @@ const Yw = () => {
17217
17210
  const { hasErrors: t, hasWarnings: e, errorCount: n, warningCount: r, errors: o } = du(), [, s] = re(), { t: i } = U();
17218
17211
  if (!t && !e)
17219
17212
  return null;
17220
- const l = () => t ? "text-red-500" : e ? "text-orange-500" : "text-gray-500", c = () => t ? /* @__PURE__ */ a(ll, { className: "h-4 w-4" }) : e ? /* @__PURE__ */ a(Dn, { className: "h-4 w-4" }) : null, d = () => t && e ? `${n} error${n > 1 ? "s" : ""}, ${r} warning${r > 1 ? "s" : ""}` : t ? `${n} error${n > 1 ? "s" : ""}` : e ? `${r} warning${r > 1 ? "s" : ""}` : "";
17213
+ const l = () => t ? "text-red-500" : e ? "text-orange-500" : "text-gray-500", c = () => t ? /* @__PURE__ */ a(cl, { className: "h-4 w-4" }) : e ? /* @__PURE__ */ a(Dn, { className: "h-4 w-4" }) : null, d = () => t && e ? `${n} error${n > 1 ? "s" : ""}, ${r} warning${r > 1 ? "s" : ""}` : t ? `${n} error${n > 1 ? "s" : ""}` : e ? `${r} warning${r > 1 ? "s" : ""}` : "";
17221
17214
  return /* @__PURE__ */ g(Mt, { children: [
17222
17215
  /* @__PURE__ */ a($t, { asChild: !0, children: /* @__PURE__ */ g("div", { className: `ml-2 flex cursor-pointer items-center gap-2 ${l()}`, children: [
17223
17216
  c(),
@@ -17249,7 +17242,7 @@ const Yw = () => {
17249
17242
  ] }) })
17250
17243
  ] });
17251
17244
  }, ek = () => {
17252
- const t = W("flags.darkMode", !0), e = W("flags.dataBinding", !0), [n, r] = O(si), { t: o } = U();
17245
+ const t = W("flags.darkMode", !0), e = W("flags.dataBinding", !0), [n, r] = O(ii), { t: o } = U();
17253
17246
  return /* @__PURE__ */ g("div", { className: "flex h-10 items-center justify-between border-b border-border bg-background/70 px-2 shadow-xl", children: [
17254
17247
  /* @__PURE__ */ a("div", { className: "flex h-full space-x-2", children: t ? /* @__PURE__ */ a(jw, {}) : null }),
17255
17248
  /* @__PURE__ */ g("div", { className: "flex h-full items-center space-x-2", children: [
@@ -17263,7 +17256,7 @@ const Yw = () => {
17263
17256
  e ? /* @__PURE__ */ g(Mt, { children: [
17264
17257
  /* @__PURE__ */ a($t, { asChild: !0, children: /* @__PURE__ */ a(te, { size: "sm", variant: "ghost", className: "h-7 w-7 rounded-md p-1", children: /* @__PURE__ */ a(zp, { className: "h-4 w-4" }) }) }),
17265
17258
  /* @__PURE__ */ a(mt, { className: "w-56 border-border text-xs", children: /* @__PURE__ */ g(ve, { className: "flex items-center gap-2", onSelect: (l) => l.preventDefault(), children: [
17266
- /* @__PURE__ */ a(pl, { className: "h-4 w-4 text-gray-500" }),
17259
+ /* @__PURE__ */ a(fl, { className: "h-4 w-4 text-gray-500" }),
17267
17260
  /* @__PURE__ */ a("span", { className: "flex-1", children: o("Data Binding") }),
17268
17261
  /* @__PURE__ */ a(Rr, { checked: n, onCheckedChange: () => r(!n) })
17269
17262
  ] }) })
@@ -17272,7 +17265,7 @@ const Yw = () => {
17272
17265
  /* @__PURE__ */ a(lu, {})
17273
17266
  ] })
17274
17267
  ] });
17275
- }, _n = () => null, za = () => {
17268
+ }, _n = () => null, Ha = () => {
17276
17269
  const { resetAll: t } = Dd(), e = ce(), [n] = De(), r = bx(), { t: o } = U();
17277
17270
  return !e || $(n) ? null : /* @__PURE__ */ g(Mt, { children: [
17278
17271
  /* @__PURE__ */ a($t, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "inline-flex rounded-sm p-0.5 hover:bg-gray-300", onClick: (s) => s.stopPropagation(), children: /* @__PURE__ */ a(bo, { className: "h-3 w-3" }) }) }),
@@ -17306,7 +17299,7 @@ const Yw = () => {
17306
17299
  ] })
17307
17300
  ] });
17308
17301
  };
17309
- function Ha() {
17302
+ function Va() {
17310
17303
  const { t } = U(), [e, n] = F(!0), [r] = De();
17311
17304
  return $(r) ? null : /* @__PURE__ */ g(Z, { children: [
17312
17305
  /* @__PURE__ */ g(
@@ -17347,28 +17340,28 @@ const tk = ({ partialBlockId: t }) => {
17347
17340
  /* @__PURE__ */ a("h1", { children: e("You don't have permission to edit settings or styles") }),
17348
17341
  /* @__PURE__ */ a("p", { children: e("Please contact your administrator to get access") })
17349
17342
  ] }) }) : s ? /* @__PURE__ */ a(ln, { fallback: /* @__PURE__ */ a(lr, {}), onError: n, children: /* @__PURE__ */ g("div", { className: "no-scrollbar h-full max-h-min w-full overflow-y-auto", children: [
17350
- /* @__PURE__ */ a(Sa, {}),
17343
+ /* @__PURE__ */ a(Ea, {}),
17351
17344
  /* @__PURE__ */ a("br", {}),
17352
17345
  /* @__PURE__ */ a("br", {})
17353
17346
  ] }) }) : o ? /* @__PURE__ */ a(ln, { fallback: /* @__PURE__ */ a(lr, {}), onError: n, children: /* @__PURE__ */ g("div", { className: "no-scrollbar h-full max-h-min w-full overflow-y-auto overflow-x-hidden", children: [
17354
- /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-end", children: /* @__PURE__ */ a(za, {}) }),
17355
- /* @__PURE__ */ a(La, {}),
17356
- /* @__PURE__ */ a(Ha, {}),
17347
+ /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-end", children: /* @__PURE__ */ a(Ha, {}) }),
17348
+ /* @__PURE__ */ a(Pa, {}),
17349
+ /* @__PURE__ */ a(Va, {}),
17357
17350
  /* @__PURE__ */ a("br", {}),
17358
17351
  /* @__PURE__ */ a("br", {}),
17359
17352
  /* @__PURE__ */ a("br", {})
17360
- ] }) }) : /* @__PURE__ */ a(ln, { fallback: /* @__PURE__ */ a(lr, {}), onError: n, children: /* @__PURE__ */ g(Ii, { value: i, onValueChange: (u) => {
17353
+ ] }) }) : /* @__PURE__ */ a(ln, { fallback: /* @__PURE__ */ a(lr, {}), onError: n, children: /* @__PURE__ */ g(Ri, { value: i, onValueChange: (u) => {
17361
17354
  (u === "settings" || u === "styles") && l(u);
17362
17355
  }, className: "flex flex-1 flex-col", children: [
17363
17356
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ g(Do, { className: "grid h-auto w-full grid-cols-2 p-1 py-1", children: [
17364
17357
  /* @__PURE__ */ a(lt, { value: "settings", className: "text-xs", children: e("Settings") }),
17365
17358
  /* @__PURE__ */ a(lt, { value: "styles", className: "text-xs", children: /* @__PURE__ */ g("div", { className: "flex w-full items-center justify-between", children: [
17366
17359
  /* @__PURE__ */ a("span", { className: "w-[90%] text-center", children: e("Styling") }),
17367
- /* @__PURE__ */ a("span", { className: "w-[10%]", children: /* @__PURE__ */ a(za, {}) })
17360
+ /* @__PURE__ */ a("span", { className: "w-[10%]", children: /* @__PURE__ */ a(Ha, {}) })
17368
17361
  ] }) })
17369
17362
  ] }) }),
17370
17363
  /* @__PURE__ */ g(jt, { value: "settings", className: "no-scrollbar h-full max-h-min overflow-y-auto", children: [
17371
- /* @__PURE__ */ a(Sa, {}),
17364
+ /* @__PURE__ */ a(Ea, {}),
17372
17365
  /* @__PURE__ */ a("br", {}),
17373
17366
  /* @__PURE__ */ a("br", {})
17374
17367
  ] }),
@@ -17378,8 +17371,8 @@ const tk = ({ partialBlockId: t }) => {
17378
17371
  value: "styles",
17379
17372
  className: "no-scrollbar h-full max-h-min max-w-full overflow-y-auto overflow-x-hidden",
17380
17373
  children: [
17381
- /* @__PURE__ */ a(La, {}),
17382
- /* @__PURE__ */ a(Ha, {}),
17374
+ /* @__PURE__ */ a(Pa, {}),
17375
+ /* @__PURE__ */ a(Va, {}),
17383
17376
  /* @__PURE__ */ a("br", {}),
17384
17377
  /* @__PURE__ */ a("br", {}),
17385
17378
  /* @__PURE__ */ a("br", {})
@@ -17387,7 +17380,7 @@ const tk = ({ partialBlockId: t }) => {
17387
17380
  }
17388
17381
  )
17389
17382
  ] }) });
17390
- }, rk = Q.lazy(() => import("./manage-design-tokens-BdWQUHhw.js")), Wt = 280, ok = ({ isActive: t, show: e }) => /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(cl, { className: "h-5 w-5" }) }), sk = ({ isActive: t, show: e }) => yt() && /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(ol, { className: "h-5 w-5" }) }), ik = ({ isActive: t, show: e }) => /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(zs, {}) });
17383
+ }, rk = Q.lazy(() => import("./manage-design-tokens-id8bylgO.js")), Wt = 280, ok = ({ isActive: t, show: e }) => /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(dl, { className: "h-5 w-5" }) }), sk = ({ isActive: t, show: e }) => yt() && /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(sl, { className: "h-5 w-5" }) }), ik = ({ isActive: t, show: e }) => /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Hs, {}) });
17391
17384
  Es("add-block", {
17392
17385
  button: sk,
17393
17386
  label: "Add Blocks",
@@ -17413,7 +17406,7 @@ Es("outline", {
17413
17406
  panel: () => /* @__PURE__ */ a("div", { className: "-mt-8", children: /* @__PURE__ */ a(Z0, {}) })
17414
17407
  });
17415
17408
  const ak = () => {
17416
- const t = Au(), [e, n] = ci(), r = le("outline"), [o, s] = F(Wt), [i, l] = Wl(), [, c] = Gl(), d = $i("top"), u = $i("bottom"), p = Ju([...u ?? []]), h = L((k) => {
17409
+ const t = Au(), [e, n] = di(), r = le("outline"), [o, s] = F(Wt), [i, l] = Wl(), [, c] = Gl(), d = Fi("top"), u = Fi("bottom"), p = Ju([...u ?? []]), h = L((k) => {
17417
17410
  k.preventDefault();
17418
17411
  }, []), f = M(() => [d].flat(), [d]), m = L(
17419
17412
  (k) => {
@@ -17509,7 +17502,7 @@ const ak = () => {
17509
17502
  transition: { duration: 0.3, ease: "easeInOut" },
17510
17503
  children: /* @__PURE__ */ a("div", { className: "no-scrollbar overflow h-full max-h-full overflow-hidden", children: /* @__PURE__ */ g("div", { className: "flex h-full max-h-full flex-col overflow-hidden p-3", children: [
17511
17504
  /* @__PURE__ */ a("h2", { className: "-mt-1 flex items-center space-x-1 text-base font-bold", children: /* @__PURE__ */ a("div", { className: "flex grow items-center gap-2", children: /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between gap-2", children: i === "ai" ? /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
17512
- /* @__PURE__ */ a(pl, { className: "rtl:ml-2" }),
17505
+ /* @__PURE__ */ a(fl, { className: "rtl:ml-2" }),
17513
17506
  " ",
17514
17507
  b("AI Assistant")
17515
17508
  ] }) }) : i === "design-tokens" ? /* @__PURE__ */ g("div", { className: "mb-1 flex w-full items-center justify-between gap-2", children: [
@@ -17690,7 +17683,7 @@ const ak = () => {
17690
17683
  /* @__PURE__ */ g("div", { className: "mb-3 flex items-center justify-between", children: [
17691
17684
  /* @__PURE__ */ g("div", { children: [
17692
17685
  /* @__PURE__ */ g("h3", { className: "flex items-center gap-x-2 text-base font-semibold text-gray-900 dark:text-gray-100", children: [
17693
- /* @__PURE__ */ a(Xa, {}),
17686
+ /* @__PURE__ */ a(qa, {}),
17694
17687
  " Feature Flags"
17695
17688
  ] }),
17696
17689
  /* @__PURE__ */ g("p", { className: "text-xs text-gray-400 dark:text-gray-400", children: [
@@ -17798,7 +17791,7 @@ const ak = () => {
17798
17791
  if (bk.includes(p) || (u = n == null ? void 0 : n.additionalCoreBlocks) != null && u.includes(p))
17799
17792
  t.attributes = t.attributes.filter((h) => h.key !== "data-block-type"), t.children && (t.children = t.children.map((h) => Kr(h, e, n)));
17800
17793
  else {
17801
- const h = `chai-${Ka(p)}`;
17794
+ const h = `chai-${Ja(p)}`;
17802
17795
  t.tagName = h, t.attributes = [], t.attributes.push({ key: "chai-type", value: p });
17803
17796
  const f = Fe(p), m = e.find((b) => b._id === (o == null ? void 0 : o.value));
17804
17797
  if (m && t.attributes.push(
@@ -17845,7 +17838,7 @@ const ak = () => {
17845
17838
  [t]
17846
17839
  );
17847
17840
  };
17848
- function Va(t) {
17841
+ function ja(t) {
17849
17842
  const e = {
17850
17843
  class: "className",
17851
17844
  for: "htmlFor",
@@ -18004,7 +17997,7 @@ function Jr(t, e = 0) {
18004
17997
  );
18005
17998
  u.push(`style={${JSON.stringify(f)}}`);
18006
17999
  } else {
18007
- const f = Va(h.name);
18000
+ const f = ja(h.name);
18008
18001
  u.push(`${f}="${h.value}"`);
18009
18002
  }
18010
18003
  const p = u.length > 0 ? ` ${u.join(" ")}` : "";
@@ -18031,7 +18024,7 @@ function Jr(t, e = 0) {
18031
18024
  );
18032
18025
  i.push(`style={${JSON.stringify(p)}}`);
18033
18026
  } else {
18034
- const p = Va(u.name);
18027
+ const p = ja(u.name);
18035
18028
  i.push(`${p}="${u.value}"`);
18036
18029
  }
18037
18030
  i.length > 0 && (s += " " + i.join(" "));
@@ -18186,7 +18179,7 @@ ${o})
18186
18179
  }, children: /* @__PURE__ */ g(Ar, { className: "max-w-5xl overflow-hidden border-border", children: [
18187
18180
  /* @__PURE__ */ g(Lo, { className: "flex flex-row items-center justify-between", children: [
18188
18181
  /* @__PURE__ */ a(Tr, { className: "text-foreground", children: t("Export Code") }),
18189
- /* @__PURE__ */ a(Ii, { defaultValue: "js", onValueChange: s, children: /* @__PURE__ */ g(Do, { children: [
18182
+ /* @__PURE__ */ a(Ri, { defaultValue: "js", onValueChange: s, children: /* @__PURE__ */ g(Do, { children: [
18190
18183
  /* @__PURE__ */ a(lt, { value: "js", children: "Javascript" }),
18191
18184
  /* @__PURE__ */ a(lt, { value: "ts", children: "Typescript" }),
18192
18185
  /* @__PURE__ */ a(lt, { value: "html", children: "HTML" }),
@@ -18235,7 +18228,7 @@ ${o})
18235
18228
  ] }) })
18236
18229
  ] }) }) }) });
18237
18230
  }, Ek = () => {
18238
- const { clear: t } = Nr(), [, e] = re(), { clearHighlight: n } = Nt(), [, r] = De(), [, o] = O(Xl), { reset: s } = ui(), { setSaveState: i } = Eo(), [, l] = Hl(), [, c] = O(Co);
18231
+ const { clear: t } = Nr(), [, e] = re(), { clearHighlight: n } = Nt(), [, r] = De(), [, o] = O(Xl), { reset: s } = pi(), { setSaveState: i } = Eo(), [, l] = Hl(), [, c] = O(Co);
18239
18232
  return () => {
18240
18233
  l({}), e([]), r([]), n(), t(), o(!1), s(), i("SAVED"), c(0);
18241
18234
  };
@@ -18254,16 +18247,16 @@ ${o})
18254
18247
  }, [t, e, n]);
18255
18248
  }, Bk = (t) => {
18256
18249
  const [, e] = ue(), n = Ek(), [r] = O(So);
18257
- O(oi), yc(), Tk(), bh(), Pm(), Sh();
18258
- const { postMessage: o } = Kl(), [, s] = O(jl), i = Zs();
18250
+ O(si), yc(), Tk(), bh(), Pm(), Sh();
18251
+ const { postMessage: o } = Kl(), [, s] = O(jl), i = Qs();
18259
18252
  return H(() => {
18260
18253
  ft.set(
18261
18254
  // @ts-ignore
18262
- Xs,
18255
+ qs,
18263
18256
  yr(t, ["blocks", "translations", "pageExternalData", "globalStyles"])
18264
18257
  );
18265
18258
  }, [t]), H(() => {
18266
- ft.set(qs, t.pageExternalData || {});
18259
+ ft.set(Zs, t.pageExternalData || {});
18267
18260
  }, [t.pageExternalData]), H(() => {
18268
18261
  ft.set(wr, t.designTokens || {});
18269
18262
  }, [t.designTokens]), H(() => {
@@ -18283,14 +18276,14 @@ ${o})
18283
18276
  window.onbeforeunload = null;
18284
18277
  }), [r]), null;
18285
18278
  }, Ik = (t) => {
18286
- const e = M(() => t.layout || ak, [t.layout]), n = W("builderTheme", xl), r = W("flags.exportCode", !1);
18279
+ const e = M(() => t.layout || ak, [t.layout]), n = W("builderTheme", Fs), r = W("flags.exportCode", !1);
18287
18280
  return /* @__PURE__ */ g(Z, { children: [
18288
18281
  t.children,
18289
18282
  /* @__PURE__ */ a(xc, { theme: n }),
18290
18283
  /* @__PURE__ */ a(e, {}),
18291
18284
  r && /* @__PURE__ */ a(Nk, {})
18292
18285
  ] });
18293
- }, P1 = (t) => {
18286
+ }, O1 = (t) => {
18294
18287
  const e = t.onError || kt;
18295
18288
  return /* @__PURE__ */ a("div", { className: "h-screen w-screen", children: /* @__PURE__ */ g(ln, { fallback: /* @__PURE__ */ a(lr, {}), onError: e, children: [
18296
18289
  /* @__PURE__ */ a(Sk, {}),
@@ -18311,19 +18304,19 @@ export {
18311
18304
  Ro as D,
18312
18305
  nu as E,
18313
18306
  M0 as F,
18314
- Oi as G,
18315
- Di as H,
18316
- Mi as I,
18307
+ Di as G,
18308
+ Mi as H,
18309
+ $i as I,
18317
18310
  su as J,
18318
18311
  ou as K,
18319
18312
  Kt as L,
18320
18313
  au as M,
18321
18314
  Bd as N,
18322
18315
  iu as O,
18323
- _i as P,
18316
+ Ai as P,
18324
18317
  Eo as Q,
18325
18318
  Gd as R,
18326
- Ri as S,
18319
+ Li as S,
18327
18320
  Mo as T,
18328
18321
  Ud as U,
18329
18322
  d0 as V,
@@ -18349,14 +18342,14 @@ export {
18349
18342
  yu as aC,
18350
18343
  Jw as aD,
18351
18344
  Pn as aE,
18352
- L1 as aF,
18345
+ P1 as aF,
18353
18346
  Wl as aG,
18354
18347
  uh as aH,
18355
- P1 as aI,
18348
+ O1 as aI,
18356
18349
  jt as aJ,
18357
18350
  tu as aK,
18358
- Sa as aL,
18359
- La as aM,
18351
+ Ea as aL,
18352
+ Pa as aM,
18360
18353
  Vy as aN,
18361
18354
  u0 as aO,
18362
18355
  Z0 as aP,
@@ -18377,26 +18370,26 @@ export {
18377
18370
  ue as ad,
18378
18371
  W as ae,
18379
18372
  Rr as af,
18380
- Ei as ag,
18373
+ _i as ag,
18381
18374
  He as ah,
18382
18375
  bt as ai,
18383
18376
  he as aj,
18384
18377
  ft as ak,
18385
18378
  $e as al,
18386
18379
  wn as am,
18387
- ei as an,
18380
+ ti as an,
18388
18381
  ce as ao,
18389
18382
  yk as ap,
18390
18383
  Yf as aq,
18391
18384
  xs as ar,
18392
- Ii as as,
18385
+ Ri as as,
18393
18386
  Do as at,
18394
18387
  lt as au,
18395
18388
  Qx as av,
18396
18389
  Zx as aw,
18397
18390
  Hd as ax,
18398
18391
  Jy as ay,
18399
- ui as az,
18392
+ pi as az,
18400
18393
  Ft as b,
18401
18394
  zl as c,
18402
18395
  Ar as d,
@@ -18410,7 +18403,7 @@ export {
18410
18403
  _d as l,
18411
18404
  vs as m,
18412
18405
  et as n,
18413
- ci as o,
18406
+ di as o,
18414
18407
  qy as p,
18415
18408
  Xy as q,
18416
18409
  Mt as r,