@templatical/editor 0.52.1 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/README.md +1 -1
  2. package/dist/AiAltTextPopover-NMJqQKvD.js +106 -0
  3. package/dist/{AiAltTextReview-9ySsXOTU.js → AiAltTextReview-Ci4zHwRc.js} +68 -66
  4. package/dist/AiChatPanel-C8SeEJRP.js +561 -0
  5. package/dist/{AiPanels-DqT4PgQ0.js → AiPanels-CR6zphjP.js} +6 -6
  6. package/dist/{AiRewriteMenu-28agTycW.js → AiRewriteMenu-CIHUnPud.js} +76 -105
  7. package/dist/BlockIssueBadge-DaPTq1RE.js +33 -0
  8. package/dist/BlockPreviewCanvas-B70RSavL.js +140 -0
  9. package/dist/{CloudHeaderExtras-QI82yF54.js → CloudHeaderExtras-XpjJjn3o.js} +4 -4
  10. package/dist/{CloudPanels-BKJaLkUN.js → CloudPanels-VpSQiLLL.js} +53 -53
  11. package/dist/CollaborationNotices-Cnx0XHzZ.js +65 -0
  12. package/dist/{CollaboratorBar-CXQqN3VP.js → CollaboratorBar-BaBoNhwB.js} +24 -24
  13. package/dist/CommentsPanel-Ck3QmqiC.js +16 -0
  14. package/dist/CommentsSidebar-CHknhOar.js +526 -0
  15. package/dist/{CountdownBlock-CU2yTWtF.js → CountdownBlock-BMezkFbJ.js} +15 -15
  16. package/dist/CountdownToolbar-CM4XNEuO.js +258 -0
  17. package/dist/IssuesPanel-1wGV0wiy.js +371 -0
  18. package/dist/LanguageMenu-d2GlX67r.js +403 -0
  19. package/dist/{LoadingTrack-DM4g6j7b.js → LoadingTrack-BG8cg9xi.js} +2 -2
  20. package/dist/LocaleNotices-WzsYtBRs.js +46 -0
  21. package/dist/LogicTagInsertButton-DgTJ6Lvx.js +1096 -0
  22. package/dist/{MediaEditModal-Dy08GEwE.js → MediaEditModal-C3U9Mi31.js} +451 -451
  23. package/dist/{MediaPanels-BgEp7iCp.js → MediaPanels-CGmk9ufe.js} +4 -4
  24. package/dist/{MergeTagInput-B9dtUthD.js → MergeTagInput-B_51YcQO.js} +30 -30
  25. package/dist/{MergeTagModeToggle-DxujhYJ4.js → MergeTagModeToggle-D3Q2z317.js} +49 -49
  26. package/dist/MergeTagTextarea-DZz1L9DE.js +126 -0
  27. package/dist/ParagraphEditor-CI68PYDL.js +825 -0
  28. package/dist/{RestoreVersionDialog-C4s_JYCx.js → RestoreVersionDialog-DcuhpOIz.js} +23 -23
  29. package/dist/{RichTextEditorContent-o6HmE8GR.js → RichTextEditorContent-Dstovi0m.js} +47 -47
  30. package/dist/{SaveBlockDialog-CWLrly6l.js → SaveBlockDialog-vuwvoi-d.js} +86 -86
  31. package/dist/{cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js → SavedBlocksBrowserModal-DUJm0dOv.js} +135 -132
  32. package/dist/{SavedBlocksPanels-BE1N9rNZ.js → SavedBlocksPanels-BiMXQ5lY.js} +9 -9
  33. package/dist/{SavedBlocksPickBar-Dwl94xhP.js → SavedBlocksPickBar-CAstZfG7.js} +15 -15
  34. package/dist/TemplateSettings-Baar78_s.js +294 -0
  35. package/dist/TestEmailModal-Bl_GHdrN.js +212 -0
  36. package/dist/{TestEmailPanel-DaFjP9QK.js → TestEmailPanel-CpTBF7B5.js} +4 -4
  37. package/dist/TitleEditor-DkbEDAZB.js +202 -0
  38. package/dist/ToggleSwitch-R3wCCYE6.js +43 -0
  39. package/dist/Toolbar-bOZ_eq7X.js +3711 -0
  40. package/dist/{TplModal-DLMssVlt.js → TplModal-wk2gLa7_.js} +17 -17
  41. package/dist/{VersionHistoryMenu-BkbYUs0Q.js → VersionHistoryMenu-BnP0EyLl.js} +39 -39
  42. package/dist/{VersionHistoryPanels-DP7HaYWv.js → VersionHistoryPanels-Cq2rFKIX.js} +5 -5
  43. package/dist/VersionPreviewBanner-BPP939cD.js +37 -0
  44. package/dist/WrapperBlock-cWT_nZgQ.js +44 -0
  45. package/dist/{blockTypeIcons-BHjlPnPf.js → blockTypeIcons-BUyPZ7Su.js} +7 -7
  46. package/dist/bundle-stats.json +8 -8
  47. package/dist/{cdn/chunks/ca-CD-Kt1qz.js → ca-DOuIxWRv.js} +114 -2
  48. package/dist/cdn/chunks/AiAltTextPopover-Cnc_kUmb.js +107 -0
  49. package/dist/cdn/chunks/AiAltTextPopover-Cnc_kUmb.js.map +1 -0
  50. package/dist/cdn/chunks/{AiAltTextReview-BGLLSKLm.js → AiAltTextReview-DPeSY-7r.js} +70 -68
  51. package/dist/cdn/chunks/AiAltTextReview-DPeSY-7r.js.map +1 -0
  52. package/dist/cdn/chunks/AiChatPanel-By8Uo1nH.js +487 -0
  53. package/dist/cdn/chunks/AiChatPanel-By8Uo1nH.js.map +1 -0
  54. package/dist/cdn/chunks/{AiPanels-0wBarZSH.js → AiPanels-BblCSkQy.js} +11 -11
  55. package/dist/cdn/chunks/{AiPanels-0wBarZSH.js.map → AiPanels-BblCSkQy.js.map} +1 -1
  56. package/dist/cdn/chunks/{AiRewriteMenu-qf-cfEpy.js → AiRewriteMenu-C4btyN4W.js} +79 -79
  57. package/dist/cdn/chunks/AiRewriteMenu-C4btyN4W.js.map +1 -0
  58. package/dist/cdn/chunks/BlockIssueBadge-D3Plo_wt.js +34 -0
  59. package/dist/cdn/chunks/BlockIssueBadge-D3Plo_wt.js.map +1 -0
  60. package/dist/cdn/chunks/BlockPreviewCanvas-CTKmBPsq.js +142 -0
  61. package/dist/cdn/chunks/{BlockPreviewCanvas-DGBh6mqe.js.map → BlockPreviewCanvas-CTKmBPsq.js.map} +1 -1
  62. package/dist/cdn/chunks/{CloudHeaderExtras-BMNK_F9p.js → CloudHeaderExtras-BtqdN777.js} +4 -4
  63. package/dist/cdn/chunks/{CloudHeaderExtras-BMNK_F9p.js.map → CloudHeaderExtras-BtqdN777.js.map} +1 -1
  64. package/dist/cdn/chunks/{CloudPanels-JMWIoVWh.js → CloudPanels-COU26R83.js} +45 -45
  65. package/dist/cdn/chunks/{CloudPanels-JMWIoVWh.js.map → CloudPanels-COU26R83.js.map} +1 -1
  66. package/dist/cdn/chunks/CollaborationNotices-DraFUhyo.js +67 -0
  67. package/dist/cdn/chunks/CollaborationNotices-DraFUhyo.js.map +1 -0
  68. package/dist/cdn/chunks/{CollaboratorBar-CXByAoUz.js → CollaboratorBar-0OEH3hrj.js} +17 -17
  69. package/dist/cdn/chunks/{CollaboratorBar-CXByAoUz.js.map → CollaboratorBar-0OEH3hrj.js.map} +1 -1
  70. package/dist/cdn/chunks/CommentsPanel-tZZswofV.js +18 -0
  71. package/dist/cdn/chunks/{CommentsPanel-DoJnKLXI.js.map → CommentsPanel-tZZswofV.js.map} +1 -1
  72. package/dist/cdn/chunks/CommentsSidebar-7Hfl3Hdj.js +496 -0
  73. package/dist/cdn/chunks/CommentsSidebar-7Hfl3Hdj.js.map +1 -0
  74. package/dist/cdn/chunks/{CountdownBlock-BqRw147R.js → CountdownBlock-CjMhMhnv.js} +22 -22
  75. package/dist/cdn/chunks/{CountdownBlock-BqRw147R.js.map → CountdownBlock-CjMhMhnv.js.map} +1 -1
  76. package/dist/cdn/chunks/CountdownToolbar-CNgsNL5-.js +260 -0
  77. package/dist/cdn/chunks/CountdownToolbar-CNgsNL5-.js.map +1 -0
  78. package/dist/cdn/chunks/{IssuesPanel-C7LfxaAY.js → IssuesPanel-Duic0mIs.js} +133 -121
  79. package/dist/cdn/chunks/IssuesPanel-Duic0mIs.js.map +1 -0
  80. package/dist/cdn/chunks/LanguageMenu-B1Aue_lf.js +359 -0
  81. package/dist/cdn/chunks/LanguageMenu-B1Aue_lf.js.map +1 -0
  82. package/dist/cdn/chunks/{LoadingTrack-CZuLTazv.js → LoadingTrack-DUYcDHOV.js} +2 -2
  83. package/dist/cdn/chunks/{LoadingTrack-CZuLTazv.js.map → LoadingTrack-DUYcDHOV.js.map} +1 -1
  84. package/dist/cdn/chunks/LocaleNotices-8J2DRWeg.js +47 -0
  85. package/dist/cdn/chunks/LocaleNotices-8J2DRWeg.js.map +1 -0
  86. package/dist/{LogicTagInsertButton-CfscnwCn.js → cdn/chunks/LogicTagInsertButton-Bhvi0nWz.js} +422 -449
  87. package/dist/cdn/chunks/LogicTagInsertButton-Bhvi0nWz.js.map +1 -0
  88. package/dist/cdn/chunks/{MediaEditModal-Cpcod6_U.js → MediaEditModal-Dz972UFx.js} +421 -421
  89. package/dist/cdn/chunks/MediaEditModal-Dz972UFx.js.map +1 -0
  90. package/dist/cdn/chunks/{MediaPanels-BIdcW_1f.js → MediaPanels-C6Hqtp1H.js} +5 -5
  91. package/dist/cdn/chunks/{MediaPanels-BIdcW_1f.js.map → MediaPanels-C6Hqtp1H.js.map} +1 -1
  92. package/dist/cdn/chunks/{MergeTagInput-BvWg8o5E.js → MergeTagInput-CrhZm-AW.js} +28 -28
  93. package/dist/cdn/chunks/{MergeTagInput-BvWg8o5E.js.map → MergeTagInput-CrhZm-AW.js.map} +1 -1
  94. package/dist/cdn/chunks/{MergeTagModeToggle-BgKEVUtV.js → MergeTagModeToggle-CWVtXLYa.js} +52 -52
  95. package/dist/cdn/chunks/MergeTagModeToggle-CWVtXLYa.js.map +1 -0
  96. package/dist/cdn/chunks/MergeTagTextarea-hTIBwX0F.js +128 -0
  97. package/dist/cdn/chunks/MergeTagTextarea-hTIBwX0F.js.map +1 -0
  98. package/dist/cdn/chunks/ParagraphEditor-B2UU1Q5I.js +660 -0
  99. package/dist/cdn/chunks/ParagraphEditor-B2UU1Q5I.js.map +1 -0
  100. package/dist/cdn/chunks/{RestoreVersionDialog-CjOdD2xj.js → RestoreVersionDialog-C1Y5Ewo_.js} +22 -22
  101. package/dist/cdn/chunks/{RestoreVersionDialog-CjOdD2xj.js.map → RestoreVersionDialog-C1Y5Ewo_.js.map} +1 -1
  102. package/dist/cdn/chunks/{RichTextEditorContent-DNjR_sNN.js → RichTextEditorContent-up4AqL7D.js} +44 -44
  103. package/dist/cdn/chunks/{RichTextEditorContent-DNjR_sNN.js.map → RichTextEditorContent-up4AqL7D.js.map} +1 -1
  104. package/dist/cdn/chunks/{SaveBlockDialog-CUhpawq0.js → SaveBlockDialog-B9lwEP_T.js} +77 -77
  105. package/dist/cdn/chunks/{SaveBlockDialog-CUhpawq0.js.map → SaveBlockDialog-B9lwEP_T.js.map} +1 -1
  106. package/dist/{SavedBlocksBrowserModal-CE8n4EBS.js → cdn/chunks/SavedBlocksBrowserModal-fAeHUyxb.js} +103 -106
  107. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BPYcRoGa.js.map → SavedBlocksBrowserModal-fAeHUyxb.js.map} +1 -1
  108. package/dist/cdn/chunks/{SavedBlocksPanels-C6--Bc81.js → SavedBlocksPanels-DRDTLDyZ.js} +9 -9
  109. package/dist/cdn/chunks/{SavedBlocksPanels-C6--Bc81.js.map → SavedBlocksPanels-DRDTLDyZ.js.map} +1 -1
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-DUavxpbU.js → SavedBlocksPickBar-B6b5z-o3.js} +16 -16
  111. package/dist/cdn/chunks/{SavedBlocksPickBar-DUavxpbU.js.map → SavedBlocksPickBar-B6b5z-o3.js.map} +1 -1
  112. package/dist/cdn/chunks/TemplateSettings-CWUpUKJb.js +266 -0
  113. package/dist/cdn/chunks/TemplateSettings-CWUpUKJb.js.map +1 -0
  114. package/dist/cdn/chunks/TestEmailModal-DQxnW5Q5.js +212 -0
  115. package/dist/cdn/chunks/TestEmailModal-DQxnW5Q5.js.map +1 -0
  116. package/dist/cdn/chunks/{TestEmailPanel-CcUpEpAn.js → TestEmailPanel-BcO_-16H.js} +5 -5
  117. package/dist/cdn/chunks/{TestEmailPanel-CcUpEpAn.js.map → TestEmailPanel-BcO_-16H.js.map} +1 -1
  118. package/dist/cdn/chunks/TitleEditor-pmycpmTd.js +202 -0
  119. package/dist/cdn/chunks/TitleEditor-pmycpmTd.js.map +1 -0
  120. package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js +45 -0
  121. package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js.map +1 -0
  122. package/dist/cdn/chunks/Toolbar-BlWVQRcA.js +3626 -0
  123. package/dist/cdn/chunks/Toolbar-BlWVQRcA.js.map +1 -0
  124. package/dist/cdn/chunks/{TplModal-CFPDgbwQ.js → TplModal-ClSSGX7a.js} +20 -20
  125. package/dist/cdn/chunks/{TplModal-CFPDgbwQ.js.map → TplModal-ClSSGX7a.js.map} +1 -1
  126. package/dist/cdn/chunks/{VersionHistoryMenu-BYlLRvRJ.js → VersionHistoryMenu-CZury5gU.js} +33 -33
  127. package/dist/cdn/chunks/{VersionHistoryMenu-BYlLRvRJ.js.map → VersionHistoryMenu-CZury5gU.js.map} +1 -1
  128. package/dist/cdn/chunks/{VersionHistoryPanels-C6SOVoiT.js → VersionHistoryPanels-B8GPBKMq.js} +6 -6
  129. package/dist/cdn/chunks/{VersionHistoryPanels-C6SOVoiT.js.map → VersionHistoryPanels-B8GPBKMq.js.map} +1 -1
  130. package/dist/cdn/chunks/VersionPreviewBanner-C4Ji8nu4.js +39 -0
  131. package/dist/cdn/chunks/VersionPreviewBanner-C4Ji8nu4.js.map +1 -0
  132. package/dist/cdn/chunks/WrapperBlock-BoUflYwY.js +46 -0
  133. package/dist/cdn/chunks/WrapperBlock-BoUflYwY.js.map +1 -0
  134. package/dist/cdn/chunks/{blockTypeIcons-D7FW7Ypo.js → blockTypeIcons-Cc6RJ27V.js} +5 -5
  135. package/dist/cdn/chunks/{blockTypeIcons-D7FW7Ypo.js.map → blockTypeIcons-Cc6RJ27V.js.map} +1 -1
  136. package/dist/{ca-CD-Kt1qz.js → cdn/chunks/ca-DOuIxWRv.js} +116 -0
  137. package/dist/cdn/chunks/ca-DOuIxWRv.js.map +1 -0
  138. package/dist/cdn/chunks/composables-C1KU4ZHw.js +3039 -0
  139. package/dist/cdn/chunks/composables-C1KU4ZHw.js.map +1 -0
  140. package/dist/cdn/chunks/{createCloudRuntime-Cth2JCEh.js → createCloudRuntime-C2Zs5F1O.js} +75 -73
  141. package/dist/cdn/chunks/createCloudRuntime-C2Zs5F1O.js.map +1 -0
  142. package/dist/{de-CeFJ6wbM.js → cdn/chunks/de-DaOUfYBX.js} +116 -0
  143. package/dist/cdn/chunks/de-DaOUfYBX.js.map +1 -0
  144. package/dist/cdn/chunks/{dist-8ym3y-pH.js → dist-BzXULHvI.js} +48 -48
  145. package/dist/cdn/chunks/{dist-8ym3y-pH.js.map → dist-BzXULHvI.js.map} +1 -1
  146. package/dist/cdn/chunks/{dist-BMzNabtD.js → dist-DqGgijFI.js} +114 -114
  147. package/dist/cdn/chunks/{dist-BMzNabtD.js.map → dist-DqGgijFI.js.map} +1 -1
  148. package/dist/cdn/chunks/{draggable-Du8AUMFT.js → draggable-DepKdldn.js} +1491 -1486
  149. package/dist/cdn/chunks/draggable-DepKdldn.js.map +1 -0
  150. package/dist/cdn/chunks/{editor-modal-CyCe560f.js → editor-modal-erQEOHZN.js} +781 -781
  151. package/dist/cdn/chunks/{editor-modal-CyCe560f.js.map → editor-modal-erQEOHZN.js.map} +1 -1
  152. package/dist/cdn/chunks/en-B6tLGRHq.js +1 -0
  153. package/dist/{en-D14i5nFh.js → cdn/chunks/en-C0pHHMiR.js} +116 -0
  154. package/dist/cdn/chunks/en-C0pHHMiR.js.map +1 -0
  155. package/dist/{es-zDacbMhs.js → cdn/chunks/es-CxyEKr6n.js} +116 -0
  156. package/dist/cdn/chunks/es-CxyEKr6n.js.map +1 -0
  157. package/dist/cdn/chunks/{extensions-CFF2KWy-.js → extensions-DcMKZpzh.js} +59 -59
  158. package/dist/cdn/chunks/{extensions-CFF2KWy-.js.map → extensions-DcMKZpzh.js.map} +1 -1
  159. package/dist/{fr-CSgYtjOd.js → cdn/chunks/fr-CYbamiI6.js} +116 -0
  160. package/dist/cdn/chunks/fr-CYbamiI6.js.map +1 -0
  161. package/dist/cdn/chunks/{icons-okSPsLOa.js → icons-Da9GKjPx.js} +188 -147
  162. package/dist/cdn/chunks/icons-Da9GKjPx.js.map +1 -0
  163. package/dist/{ja-B7H3ID8O.js → cdn/chunks/ja-DfaIAoGI.js} +116 -0
  164. package/dist/cdn/chunks/ja-DfaIAoGI.js.map +1 -0
  165. package/dist/cdn/chunks/keys-CoQtCqNv.js +11 -0
  166. package/dist/cdn/chunks/keys-CoQtCqNv.js.map +1 -0
  167. package/dist/cdn/chunks/languageName-DEEOhDWI.js +12 -0
  168. package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +1 -0
  169. package/dist/{nl-176ySmc5.js → cdn/chunks/nl-DkrB-VKZ.js} +116 -0
  170. package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +1 -0
  171. package/dist/cdn/chunks/normalizeMergeTagMarkup-cC32Ox6A.js +290 -0
  172. package/dist/cdn/chunks/normalizeMergeTagMarkup-cC32Ox6A.js.map +1 -0
  173. package/dist/cdn/chunks/noticeTones-D7BPu-Le.js +16 -0
  174. package/dist/cdn/chunks/noticeTones-D7BPu-Le.js.map +1 -0
  175. package/dist/cdn/chunks/plural-CyxrJXL1.js +17 -0
  176. package/dist/cdn/chunks/plural-CyxrJXL1.js.map +1 -0
  177. package/dist/{preRenderCustomBlocks--_xc0XK3.js → cdn/chunks/preRenderCustomBlocks-f7GEKdvw.js} +5 -3
  178. package/dist/cdn/chunks/{preRenderCustomBlocks-BcXIz7oJ.js.map → preRenderCustomBlocks-f7GEKdvw.js.map} +1 -1
  179. package/dist/{pt-BR-dDlTwX18.js → cdn/chunks/pt-BR-CY5Ye7eP.js} +116 -0
  180. package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +1 -0
  181. package/dist/cdn/chunks/sanitizeHtml-WTfz9lZd.js +61 -0
  182. package/dist/cdn/chunks/sanitizeHtml-WTfz9lZd.js.map +1 -0
  183. package/dist/cdn/chunks/socialIcons-DeCYorUT.js +2638 -0
  184. package/dist/cdn/chunks/socialIcons-DeCYorUT.js.map +1 -0
  185. package/dist/cdn/chunks/{src-DEd87i_U.js → src-A_cKeTM_.js} +618 -461
  186. package/dist/cdn/chunks/src-A_cKeTM_.js.map +1 -0
  187. package/dist/cdn/chunks/src-BQUv2CYU.js +2606 -0
  188. package/dist/cdn/chunks/src-BQUv2CYU.js.map +1 -0
  189. package/dist/cdn/chunks/src-BWX_xVxO.js +671 -0
  190. package/dist/cdn/chunks/src-BWX_xVxO.js.map +1 -0
  191. package/dist/{styleConstants-B8xVRiwX.js → cdn/chunks/styleConstants-CgiNKdnc.js} +7 -5
  192. package/dist/cdn/chunks/styleConstants-CgiNKdnc.js.map +1 -0
  193. package/dist/cdn/chunks/templateSettingsFields-cjlP-jdw.js.map +1 -1
  194. package/dist/cdn/chunks/{tiptap-CbiTlECY.js → tiptap-Dipw_zOQ.js} +40 -40
  195. package/dist/cdn/chunks/{tiptap-CbiTlECY.js.map → tiptap-Dipw_zOQ.js.map} +1 -1
  196. package/dist/cdn/chunks/{useCloudI18n-DY8_-ETE.js → useCloudI18n-Cc5NZqiI.js} +3 -3
  197. package/dist/cdn/chunks/{useCloudI18n-DY8_-ETE.js.map → useCloudI18n-Cc5NZqiI.js.map} +1 -1
  198. package/dist/cdn/chunks/useEditorRoot-D_LuZ_hE.js +9 -0
  199. package/dist/cdn/chunks/{useEditorRoot-vjZJwKrV.js.map → useEditorRoot-D_LuZ_hE.js.map} +1 -1
  200. package/dist/cdn/chunks/{useI18n-D8pY4LTq.js → useI18n-BnJYydPv.js} +3 -3
  201. package/dist/cdn/chunks/{useI18n-D8pY4LTq.js.map → useI18n-BnJYydPv.js.map} +1 -1
  202. package/dist/cdn/chunks/useLocalizedDisplay-aGfnO90D.js +33 -0
  203. package/dist/cdn/chunks/useLocalizedDisplay-aGfnO90D.js.map +1 -0
  204. package/dist/cdn/chunks/{useLogicTag-DBJDtpKA.js → useLogicTag-DtYe8HIq.js} +5 -5
  205. package/dist/cdn/chunks/{useLogicTag-DBJDtpKA.js.map → useLogicTag-DtYe8HIq.js.map} +1 -1
  206. package/dist/cdn/chunks/{useMergeTag-B-aG--s1.js → useMergeTag-B8ULmsnp.js} +6 -6
  207. package/dist/cdn/chunks/{useMergeTag-B-aG--s1.js.map → useMergeTag-B8ULmsnp.js.map} +1 -1
  208. package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js +78 -0
  209. package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js.map +1 -0
  210. package/dist/cdn/chunks/{useScrollToBlock-vjQ0fe-L.js → useScrollToBlock-Ct1AwLD-.js} +5 -5
  211. package/dist/cdn/chunks/useScrollToBlock-Ct1AwLD-.js.map +1 -0
  212. package/dist/cdn/chunks/{withCurrentFont-hZTvYBHO.js → withCurrentFont-MK8ga9q9.js} +2 -2
  213. package/dist/cdn/chunks/{withCurrentFont-hZTvYBHO.js.map → withCurrentFont-MK8ga9q9.js.map} +1 -1
  214. package/dist/cdn/editor.css +1 -1
  215. package/dist/cdn/editor.js +2189 -1495
  216. package/dist/cdn/editor.js.map +1 -1
  217. package/dist/{check-BZ8o0eet.js → check-XMnOOIEC.js} +1 -1
  218. package/dist/{chevron-down-DfAAfILv.js → chevron-down-DmamTEWQ.js} +1 -1
  219. package/dist/{chevron-right-Bk4mGdr7.js → chevron-right-BEFXOH27.js} +1 -1
  220. package/dist/{chevron-up-MhUf_azW.js → chevron-up-Dw7woXj8.js} +1 -1
  221. package/dist/{circle-alert-CShJwVFv.js → circle-alert-BTKC9vkq.js} +1 -1
  222. package/dist/{clock-CTfD6OCt.js → clock-BVT5u2uG.js} +1 -1
  223. package/dist/composables-CMIrGXJ1.js +4517 -0
  224. package/dist/{createCloudRuntime-DCgO4A1r.js → createCloudRuntime-DGV5a5Af.js} +54 -52
  225. package/dist/{createLucideIcon-CvhTA2KG.js → createLucideIcon-CgDE3xAR.js} +16 -16
  226. package/dist/{cdn/chunks/de-CeFJ6wbM.js → de-DaOUfYBX.js} +114 -2
  227. package/dist/{dist-ByCWA2Tv.js → dist-0alKVRc_.js} +101 -101
  228. package/dist/{dist-Cy8I5scI.js → dist-54VCNoC0.js} +2 -2
  229. package/dist/dist-6DU0me3E.js +4 -0
  230. package/dist/{dist-p3wymUDt.js → dist-B8dY8drK.js} +2 -2
  231. package/dist/{dist-Dd5MU2Ev.js → dist-B9a7iVye.js} +2 -2
  232. package/dist/{dist-V7W1UhVr.js → dist-BWflWcpW.js} +2 -2
  233. package/dist/{dist-D6fZec6r.js → dist-C3hu_C3w.js} +2 -2
  234. package/dist/{dist-CVy-7PHQ.js → dist-CX7skkvG.js} +48 -48
  235. package/dist/dist-CcOn7WCo.js +4 -0
  236. package/dist/dist-Cdkm20M6.js +2542 -0
  237. package/dist/{dist-BS5uKktL.js → dist-ChOb5XHW.js} +2 -2
  238. package/dist/{dist-BF5zEHop.js → dist-DZ3X-uB8.js} +2 -2
  239. package/dist/{dist-CWSG7Kj0.js → dist-D_XrUEET.js} +5 -5
  240. package/dist/{dist-txQLT2sF.js → dist-TAv500j6.js} +2 -2
  241. package/dist/{dist-D6cMdrfG.js → dist-fqSers8_.js} +55 -55
  242. package/dist/{editor-modal-zaZHcmlO.js → editor-modal-BeX6otLk.js} +953 -952
  243. package/dist/{cdn/chunks/en-D14i5nFh.js → en-C0pHHMiR.js} +114 -2
  244. package/dist/en-Do0SU6tR.js +1 -0
  245. package/dist/{cdn/chunks/es-zDacbMhs.js → es-CxyEKr6n.js} +114 -2
  246. package/dist/{extensions-fo_c-vqf.js → extensions-BJ184osp.js} +173 -173
  247. package/dist/{eye-7W4t5e0Q.js → eye-ByMgHeA_.js} +1 -1
  248. package/dist/{cdn/chunks/fr-CSgYtjOd.js → fr-CYbamiI6.js} +114 -2
  249. package/dist/{image-BDiRFzSd.js → image-Ch8tR35K.js} +1 -1
  250. package/dist/index.d.ts +182 -14
  251. package/dist/{info-Cxi3-Kh9.js → info-DzSD-Wpk.js} +1 -1
  252. package/dist/{cdn/chunks/ja-B7H3ID8O.js → ja-DfaIAoGI.js} +114 -2
  253. package/dist/keys-BCqskl51.js +9 -0
  254. package/dist/languageName-DEEOhDWI.js +10 -0
  255. package/dist/{link-ju_2Cmir.js → link-oDn9AR2w.js} +1 -1
  256. package/dist/{list-DYZJf0aZ.js → list-C5t07dp8.js} +1 -1
  257. package/dist/{loader-circle-BZRD0a4I.js → loader-circle-k6xvKgUB.js} +1 -1
  258. package/dist/{message-circle-DuEw4Zfx.js → message-circle-C23R6OJR.js} +1 -1
  259. package/dist/{cdn/chunks/nl-176ySmc5.js → nl-DkrB-VKZ.js} +114 -2
  260. package/dist/normalizeMergeTagMarkup-CUCo7B5X.js +288 -0
  261. package/dist/noticeTones-D7BPu-Le.js +14 -0
  262. package/dist/{package-CePMr2kK.js → package-C90eQ7NU.js} +1 -1
  263. package/dist/{pencil-D3aFCL7c.js → pencil-BK7GrQuA.js} +1 -1
  264. package/dist/plural-CyxrJXL1.js +15 -0
  265. package/dist/plus-Cr0Mis63.js +13 -0
  266. package/dist/{cdn/chunks/preRenderCustomBlocks-BcXIz7oJ.js → preRenderCustomBlocks-Bs3N9no-.js} +4 -6
  267. package/dist/{cdn/chunks/pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +114 -2
  268. package/dist/{refresh-cw-xnro7_Sk.js → refresh-cw-_ZLOIEvA.js} +2 -12
  269. package/dist/rotate-ccw-CB5wsHwv.js +13 -0
  270. package/dist/{runtime-dom.esm-bundler-BURR-bj5.js → runtime-dom.esm-bundler-DlHp8xgy.js} +154 -154
  271. package/dist/sanitizeHtml-2rjV0r-6.js +962 -0
  272. package/dist/{search-CDrstRBv.js → search-BmrQNox8.js} +1 -1
  273. package/dist/{send-DROkPOaX.js → send-blAsIBBg.js} +1 -1
  274. package/dist/{smartphone-Bx6u_tjn.js → smartphone-BPpWYrwV.js} +1 -1
  275. package/dist/socialIcons-TFiOkpoU.js +2705 -0
  276. package/dist/{sparkles-CdaTtvoz.js → sparkles-OqIxrNp-.js} +1 -1
  277. package/dist/{square-BbCROH_f.js → square-BP-V7iT-.js} +1 -1
  278. package/dist/style.css +1 -1
  279. package/dist/{cdn/chunks/styleConstants-B8xVRiwX.js → styleConstants-CgiNKdnc.js} +5 -7
  280. package/dist/templatical-editor.js +2438 -1752
  281. package/dist/{text-align-start-CGacJ9Vw.js → text-align-start-4mwX2o-F.js} +13 -13
  282. package/dist/{trash-DxCd7zIy.js → trash-B99WixTA.js} +1 -1
  283. package/dist/{triangle-alert-7_oaitpf.js → triangle-alert-CHMiDkHa.js} +1 -1
  284. package/dist/{upload-DuFEOi_0.js → upload-Cp8o-hrN.js} +1 -1
  285. package/dist/{useCloudI18n-DEMmUKuO.js → useCloudI18n-Dh2iydo1.js} +4 -4
  286. package/dist/useEditorRoot-DY3mgcHm.js +7 -0
  287. package/dist/{useI18n-BBrHTdu8.js → useI18n-CgtvtF4C.js} +4 -4
  288. package/dist/useLocalizedDisplay-DNNwDRxL.js +31 -0
  289. package/dist/{useLogicTag-ZPC39rfH.js → useLogicTag-BXXXQQmi.js} +4 -4
  290. package/dist/{useMergeTag-BQ4qqWpQ.js → useMergeTag-C9Okr87y.js} +5 -5
  291. package/dist/usePopoverPosition-VDQjyX_A.js +76 -0
  292. package/dist/{useScrollToBlock-BSyAV4pk.js → useScrollToBlock-B35ObCGK.js} +5 -5
  293. package/dist/{vue.runtime.esm-bundler-CnEeTfhs.js → vue.runtime.esm-bundler-BJXc_Mri.js} +1373 -1368
  294. package/dist/withCurrentFont-DJiQqZzL.js +18 -0
  295. package/dist/{x-BpfG7v9g.js → x-BIBStNMS.js} +1 -1
  296. package/package.json +21 -21
  297. package/dist/AiAltTextPopover-DawbUywc.js +0 -105
  298. package/dist/AiChatPanel-CupPhmsN.js +0 -548
  299. package/dist/BlockIssueBadge-BxpDy3u-.js +0 -33
  300. package/dist/BlockPreviewCanvas-B-4bmJ3t.js +0 -140
  301. package/dist/CollaborationNotices-CTw4JThq.js +0 -75
  302. package/dist/CommentsPanel-DwwFuh1h.js +0 -16
  303. package/dist/CommentsSidebar-9ZfiC2DO.js +0 -500
  304. package/dist/CountdownToolbar-BqoYzf_6.js +0 -197
  305. package/dist/IssuesPanel-4ykrf1ax.js +0 -359
  306. package/dist/MergeTagTextarea-CPFEjJZd.js +0 -69
  307. package/dist/ParagraphEditor-CWXfurGh.js +0 -796
  308. package/dist/TemplateSettings-CS0f1Ues.js +0 -236
  309. package/dist/TestEmailModal-DBD0X5nV.js +0 -209
  310. package/dist/TitleEditor-DSqtle77.js +0 -198
  311. package/dist/ToggleSwitch-JykPyD_8.js +0 -36
  312. package/dist/Toolbar-BZPFfKrf.js +0 -3145
  313. package/dist/VersionPreviewBanner-DECaBwLq.js +0 -37
  314. package/dist/WrapperBlock-BsJv_Fiw.js +0 -44
  315. package/dist/cdn/chunks/AiAltTextPopover-SEEjkd-I.js +0 -106
  316. package/dist/cdn/chunks/AiAltTextPopover-SEEjkd-I.js.map +0 -1
  317. package/dist/cdn/chunks/AiAltTextReview-BGLLSKLm.js.map +0 -1
  318. package/dist/cdn/chunks/AiChatPanel-DKDAaBNi.js +0 -474
  319. package/dist/cdn/chunks/AiChatPanel-DKDAaBNi.js.map +0 -1
  320. package/dist/cdn/chunks/AiRewriteMenu-qf-cfEpy.js.map +0 -1
  321. package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +0 -34
  322. package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +0 -1
  323. package/dist/cdn/chunks/BlockPreviewCanvas-DGBh6mqe.js +0 -142
  324. package/dist/cdn/chunks/CollaborationNotices-Bsf1rGW9.js +0 -77
  325. package/dist/cdn/chunks/CollaborationNotices-Bsf1rGW9.js.map +0 -1
  326. package/dist/cdn/chunks/CommentsPanel-DoJnKLXI.js +0 -18
  327. package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js +0 -470
  328. package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +0 -1
  329. package/dist/cdn/chunks/CountdownToolbar-xobieKoU.js +0 -199
  330. package/dist/cdn/chunks/CountdownToolbar-xobieKoU.js.map +0 -1
  331. package/dist/cdn/chunks/IssuesPanel-C7LfxaAY.js.map +0 -1
  332. package/dist/cdn/chunks/LogicTagInsertButton-BIi05UQu.js +0 -1051
  333. package/dist/cdn/chunks/LogicTagInsertButton-BIi05UQu.js.map +0 -1
  334. package/dist/cdn/chunks/MediaEditModal-Cpcod6_U.js.map +0 -1
  335. package/dist/cdn/chunks/MergeTagModeToggle-BgKEVUtV.js.map +0 -1
  336. package/dist/cdn/chunks/MergeTagTextarea-tBz8McZf.js +0 -71
  337. package/dist/cdn/chunks/MergeTagTextarea-tBz8McZf.js.map +0 -1
  338. package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js +0 -631
  339. package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +0 -1
  340. package/dist/cdn/chunks/TemplateSettings-CKtI-dof.js +0 -208
  341. package/dist/cdn/chunks/TemplateSettings-CKtI-dof.js.map +0 -1
  342. package/dist/cdn/chunks/TestEmailModal-CDQTgESD.js +0 -209
  343. package/dist/cdn/chunks/TestEmailModal-CDQTgESD.js.map +0 -1
  344. package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js +0 -198
  345. package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +0 -1
  346. package/dist/cdn/chunks/ToggleSwitch-J7Vwhvha.js +0 -38
  347. package/dist/cdn/chunks/ToggleSwitch-J7Vwhvha.js.map +0 -1
  348. package/dist/cdn/chunks/Toolbar-CdpsvNOR.js +0 -3061
  349. package/dist/cdn/chunks/Toolbar-CdpsvNOR.js.map +0 -1
  350. package/dist/cdn/chunks/VersionPreviewBanner-Dvg0ZfAW.js +0 -39
  351. package/dist/cdn/chunks/VersionPreviewBanner-Dvg0ZfAW.js.map +0 -1
  352. package/dist/cdn/chunks/WrapperBlock-C7Md56IT.js +0 -46
  353. package/dist/cdn/chunks/WrapperBlock-C7Md56IT.js.map +0 -1
  354. package/dist/cdn/chunks/ca-CD-Kt1qz.js.map +0 -1
  355. package/dist/cdn/chunks/createCloudRuntime-Cth2JCEh.js.map +0 -1
  356. package/dist/cdn/chunks/de-CeFJ6wbM.js.map +0 -1
  357. package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +0 -1
  358. package/dist/cdn/chunks/en-D14i5nFh.js.map +0 -1
  359. package/dist/cdn/chunks/en-TIqv4ag3.js +0 -1
  360. package/dist/cdn/chunks/es-zDacbMhs.js.map +0 -1
  361. package/dist/cdn/chunks/fr-CSgYtjOd.js.map +0 -1
  362. package/dist/cdn/chunks/icons-okSPsLOa.js.map +0 -1
  363. package/dist/cdn/chunks/ja-B7H3ID8O.js.map +0 -1
  364. package/dist/cdn/chunks/keys-CUj6UA38.js +0 -11
  365. package/dist/cdn/chunks/keys-CUj6UA38.js.map +0 -1
  366. package/dist/cdn/chunks/nl-176ySmc5.js.map +0 -1
  367. package/dist/cdn/chunks/normalizeMergeTagMarkup-C_KlfSW4.js +0 -198
  368. package/dist/cdn/chunks/normalizeMergeTagMarkup-C_KlfSW4.js.map +0 -1
  369. package/dist/cdn/chunks/pt-BR-dDlTwX18.js.map +0 -1
  370. package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js +0 -72
  371. package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js.map +0 -1
  372. package/dist/cdn/chunks/socialIcons-jsTDmkbb.js +0 -2008
  373. package/dist/cdn/chunks/socialIcons-jsTDmkbb.js.map +0 -1
  374. package/dist/cdn/chunks/src-C7bkofBL.js +0 -647
  375. package/dist/cdn/chunks/src-C7bkofBL.js.map +0 -1
  376. package/dist/cdn/chunks/src-DEd87i_U.js.map +0 -1
  377. package/dist/cdn/chunks/src-DwWrYnUj.js +0 -1404
  378. package/dist/cdn/chunks/src-DwWrYnUj.js.map +0 -1
  379. package/dist/cdn/chunks/styleConstants-B8xVRiwX.js.map +0 -1
  380. package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +0 -2582
  381. package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +0 -1
  382. package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +0 -9
  383. package/dist/cdn/chunks/usePopoverPosition-DSMtmu2W.js +0 -70
  384. package/dist/cdn/chunks/usePopoverPosition-DSMtmu2W.js.map +0 -1
  385. package/dist/cdn/chunks/useScrollToBlock-vjQ0fe-L.js.map +0 -1
  386. package/dist/dist-CKi_npZM.js +0 -1344
  387. package/dist/dist-DyFArF_G.js +0 -4
  388. package/dist/dist-pA3ooG6N.js +0 -4
  389. package/dist/en-Db76vJbY.js +0 -1
  390. package/dist/keys-BgRERHzu.js +0 -9
  391. package/dist/normalizeMergeTagMarkup-CELnOlgK.js +0 -196
  392. package/dist/sanitizeHtml-BzfzpYJY.js +0 -942
  393. package/dist/socialIcons-D7MGsg0d.js +0 -2075
  394. package/dist/useEditorCore-BSo2sSID.js +0 -4059
  395. package/dist/useEditorRoot-BMcoCLBx.js +0 -7
  396. package/dist/usePopoverPosition-DV1PxL66.js +0 -68
  397. package/dist/withCurrentFont-B22FXAF5.js +0 -18
@@ -0,0 +1,3626 @@
1
+ import { n as e } from "./rolldown-runtime-QGRDbDUS.js";
2
+ import { $ as t, B as n, C as r, F as i, G as a, H as o, K as s, L as c, O as l, Q as u, R as d, S as f, _ as p, b as m, ct as h, dt as g, g as _, h as v, m as y, mt as b, o as x, p as S, pt as C, s as w, tt as T, u as E, v as D, x as O } from "./draggable-DepKdldn.js";
3
+ import { Ft as k, Z as A, bn as j, cn as M, gn as N, ht as P, j as F, ln as I, mn as L, n as R, on as ee, pn as z, r as te, sn as ne, un as re, xn as ie } from "./src-BQUv2CYU.js";
4
+ import { F as ae, T as oe, _ as se, b as ce, d as le, f as ue, g as de, h as fe, i as pe, l as me, m as he, p as ge, r as _e, s as B, u as ve, v as ye } from "./socialIcons-DeCYorUT.js";
5
+ import { t as V } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
6
+ import { $ as be, At as xe, Bt as Se, H, It as Ce, Mt as we, O as Te, R as Ee, _ as De, _t as Oe, c as ke, et as Ae, f as je, gt as Me, h as Ne, it as Pe, lt as Fe, rt as Ie, t as Le, v as Re } from "./icons-Da9GKjPx.js";
7
+ import { B as ze, C as Be, O as Ve, T as He, U as Ue, X as We, _ as Ge, b as Ke, h as qe, ot as Je, p as Ye, r as Xe, v as Ze } from "./keys-CoQtCqNv.js";
8
+ import { t as U } from "./useI18n-BnJYydPv.js";
9
+ import { n as Qe } from "./useLocalizedDisplay-aGfnO90D.js";
10
+ import { t as $e } from "./languageName-DEEOhDWI.js";
11
+ import { S as et, _ as W, b as tt, c as nt, g as G, h as K, r as rt, v as q, y as it } from "./styleConstants-CgiNKdnc.js";
12
+ import { _ as at } from "./dist-BzXULHvI.js";
13
+ import { c as ot, r as st } from "./usePopoverPosition-BWAXWeBv.js";
14
+ import { t as ct } from "./blockTypeIcons-Cc6RJ27V.js";
15
+ import { n as J, t as lt } from "./MergeTagTextarea-hTIBwX0F.js";
16
+ import { c as Y } from "./LogicTagInsertButton-Bhvi0nWz.js";
17
+ import { t as X } from "./ToggleSwitch-BSkySwA1.js";
18
+ import { n as ut, t as dt } from "./withCurrentFont-MK8ga9q9.js";
19
+ import { t as Z } from "./MergeTagInput-CrhZm-AW.js";
20
+ // src/components/SlidingPillSelect.vue?vue&type=script&setup=true&lang.ts
21
+ var ft = [
22
+ "aria-checked",
23
+ "aria-label",
24
+ "disabled",
25
+ "aria-disabled",
26
+ "title",
27
+ "onClick"
28
+ ], pt = { key: 1 }, Q = /* @__PURE__ */ r({
29
+ __name: "SlidingPillSelect",
30
+ props: {
31
+ options: {},
32
+ modelValue: {}
33
+ },
34
+ emits: ["update:modelValue"],
35
+ setup(e, { emit: t }) {
36
+ let r = e, a = t, o = S(() => r.options.findIndex((e) => e.value === r.modelValue)), s = S(() => `translateX(${Math.max(o.value, 0) * 100}%)`);
37
+ return (t, r) => (i(), p("div", {
38
+ role: "radiogroup",
39
+ class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
40
+ style: C({
41
+ gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
42
+ backgroundColor: "var(--tpl-bg-hover)"
43
+ })
44
+ }, [o.value >= 0 ? (i(), p("div", {
45
+ key: 0,
46
+ class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
47
+ style: C({
48
+ left: "4px",
49
+ width: `calc((100% - 8px) / ${e.options.length})`,
50
+ transform: s.value,
51
+ backgroundColor: "var(--tpl-bg)",
52
+ boxShadow: "var(--tpl-shadow)",
53
+ transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
54
+ })
55
+ }, null, 4)) : _("", !0), (i(!0), p(E, null, c(e.options, (t) => (i(), p("button", {
56
+ key: t.value,
57
+ role: "radio",
58
+ "aria-checked": e.modelValue === t.value,
59
+ "aria-label": t.label,
60
+ disabled: t.disabled,
61
+ "aria-disabled": t.disabled ? "true" : void 0,
62
+ class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:disabled:cursor-not-allowed tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:py-[5px] tpl:text-xs tpl:font-medium",
63
+ style: C({
64
+ color: t.disabled ? "var(--tpl-text-dim)" : e.modelValue === t.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
65
+ transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
66
+ }),
67
+ title: t.label,
68
+ onClick: (e) => t.disabled || a("update:modelValue", t.value)
69
+ }, [t.icon ? (i(), v(n(t.icon), {
70
+ key: 0,
71
+ size: 14,
72
+ "stroke-width": 2
73
+ })) : (i(), p("span", pt, b(t.label), 1))], 12, ft))), 128))], 4));
74
+ }
75
+ }), mt = { class: "tpl:flex tpl:items-stretch" }, ht = [
76
+ "data-testid",
77
+ "value",
78
+ "min",
79
+ "max"
80
+ ], gt = /* @__PURE__ */ r({
81
+ __name: "NumberWithSuffix",
82
+ props: {
83
+ modelValue: {},
84
+ min: {},
85
+ max: {},
86
+ suffix: {},
87
+ testid: {}
88
+ },
89
+ emits: ["update:modelValue"],
90
+ setup(e, { emit: t }) {
91
+ let n = t;
92
+ function r(e) {
93
+ let t = e.target;
94
+ t.validity?.badInput || n("update:modelValue", Number(t.value));
95
+ }
96
+ return (t, n) => (i(), p("div", mt, [y("input", {
97
+ type: "number",
98
+ "data-testid": e.testid,
99
+ class: g(h(G)),
100
+ value: e.modelValue,
101
+ min: e.min,
102
+ max: e.max,
103
+ onInput: r
104
+ }, null, 42, ht), y("span", { class: g(h(W)) }, b(e.suffix), 3)]));
105
+ }
106
+ }), _t = [
107
+ "aria-pressed",
108
+ "aria-label",
109
+ "title",
110
+ "data-testid"
111
+ ], vt = /* @__PURE__ */ r({
112
+ __name: "LinkToggle",
113
+ props: {
114
+ linked: { type: Boolean },
115
+ linkLabel: {},
116
+ unlinkLabel: {},
117
+ testid: {}
118
+ },
119
+ emits: ["toggle"],
120
+ setup(e, { emit: t }) {
121
+ let n = t;
122
+ return (t, r) => (i(), p("button", {
123
+ type: "button",
124
+ class: g(["tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", e.linked ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
125
+ "aria-pressed": e.linked ? "true" : "false",
126
+ "aria-label": e.linked ? e.unlinkLabel : e.linkLabel,
127
+ title: e.linked ? e.unlinkLabel : e.linkLabel,
128
+ "data-testid": e.testid,
129
+ onClick: r[0] ||= (e) => n("toggle")
130
+ }, [e.linked ? (i(), v(h(Fe), {
131
+ key: 0,
132
+ size: 14,
133
+ "stroke-width": 2
134
+ })) : (i(), v(h(ke), {
135
+ key: 1,
136
+ size: 14,
137
+ "stroke-width": 2
138
+ }))], 10, _t));
139
+ }
140
+ }), yt = {
141
+ key: 0,
142
+ class: "tpl:mb-3.5"
143
+ }, bt = { class: "tpl:mb-3.5" }, xt = { class: "tpl:mb-3.5" }, St = /* @__PURE__ */ r({
144
+ __name: "BorderControl",
145
+ props: {
146
+ path: {},
147
+ modelValue: {},
148
+ testidPrefix: {}
149
+ },
150
+ emits: ["update:modelValue"],
151
+ setup(e, { emit: t }) {
152
+ let n = e, r = t, { t: s } = U(), c = {
153
+ width: 0,
154
+ style: "solid",
155
+ color: "#000000"
156
+ };
157
+ function l(e, t) {
158
+ return e.width === t.width && e.style === t.style && e.color === t.color;
159
+ }
160
+ let u = S(() => {
161
+ let e = n.modelValue;
162
+ return !e || L.every((t) => l(e[t], e.top));
163
+ }), d = T(u.value);
164
+ o(u, (e) => {
165
+ !e && d.value && (d.value = !1);
166
+ });
167
+ let f = T("top"), m = S(() => n.modelValue?.[d.value ? "top" : f.value] ?? c), x = (e) => !!e && e.width > 0;
168
+ function C(e) {
169
+ if (d.value) {
170
+ r("update:modelValue", x(e) ? ie(e) : void 0);
171
+ return;
172
+ }
173
+ let t = {
174
+ ...n.modelValue ?? ie(c),
175
+ [f.value]: e
176
+ }, i = L.some((e) => x(t[e]));
177
+ r("update:modelValue", i ? t : void 0);
178
+ }
179
+ function w(e) {
180
+ C({
181
+ ...m.value,
182
+ width: e > 0 ? e : 0
183
+ });
184
+ }
185
+ function D(e) {
186
+ C({
187
+ ...m.value,
188
+ ...e
189
+ });
190
+ }
191
+ function k() {
192
+ if (d.value) {
193
+ d.value = !1;
194
+ return;
195
+ }
196
+ d.value = !0;
197
+ let e = n.modelValue;
198
+ if (!e) return;
199
+ let t = x(e[f.value]) ? e[f.value] : L.map((t) => e[t]).find(x);
200
+ r("update:modelValue", t ? ie(t) : void 0);
201
+ }
202
+ let A = S(() => L.map((e) => ({
203
+ value: e,
204
+ label: s.spacingControl[e]
205
+ })));
206
+ return (t, n) => (i(), v(J, {
207
+ path: e.path,
208
+ label: h(s).blockSettings.border
209
+ }, {
210
+ "label-actions": a(() => [O(vt, {
211
+ linked: d.value,
212
+ "link-label": h(s).blockSettings.linkSides,
213
+ "unlink-label": h(s).blockSettings.unlinkSides,
214
+ testid: `${e.testidPrefix}-border-link`,
215
+ onToggle: k
216
+ }, null, 8, [
217
+ "linked",
218
+ "link-label",
219
+ "unlink-label",
220
+ "testid"
221
+ ])]),
222
+ default: a(() => [
223
+ d.value ? _("", !0) : (i(), p("div", yt, [y("label", { class: g(h(q)) }, b(h(s).blockSettings.borderSide), 3), O(Q, {
224
+ options: A.value,
225
+ "model-value": f.value,
226
+ "onUpdate:modelValue": n[0] ||= (e) => f.value = e
227
+ }, null, 8, ["options", "model-value"])])),
228
+ y("div", bt, [y("label", { class: g(h(q)) }, b(h(s).blockSettings.borderWidth), 3), O(gt, {
229
+ "model-value": m.value.width,
230
+ min: 0,
231
+ suffix: "px",
232
+ testid: `${e.testidPrefix}-border-width-input`,
233
+ "onUpdate:modelValue": w
234
+ }, null, 8, ["model-value", "testid"])]),
235
+ m.value.width > 0 ? (i(), p(E, { key: 1 }, [y("div", xt, [y("label", { class: g(h(q)) }, b(h(s).blockSettings.borderStyle), 3), O(Q, {
236
+ options: [
237
+ {
238
+ value: "solid",
239
+ label: h(s).divider.solid
240
+ },
241
+ {
242
+ value: "dashed",
243
+ label: h(s).divider.dashed
244
+ },
245
+ {
246
+ value: "dotted",
247
+ label: h(s).divider.dotted
248
+ }
249
+ ],
250
+ "model-value": m.value.style,
251
+ "onUpdate:modelValue": n[1] ||= (e) => D({ style: e })
252
+ }, null, 8, ["options", "model-value"])]), y("div", null, [y("label", { class: g(h(q)) }, b(h(s).blockSettings.borderColor), 3), O(Y, {
253
+ "model-value": m.value.color,
254
+ "onUpdate:modelValue": n[2] ||= (e) => D({ color: e })
255
+ }, null, 8, ["model-value"])])], 64)) : _("", !0)
256
+ ]),
257
+ _: 1
258
+ }, 8, ["path", "label"]));
259
+ }
260
+ }), Ct = {
261
+ key: 1,
262
+ class: "tpl:grid tpl:grid-cols-2 tpl:gap-2"
263
+ }, wt = { class: "tpl:mb-1 tpl:block tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Tt = /* @__PURE__ */ r({
264
+ __name: "RadiusControl",
265
+ props: {
266
+ path: {},
267
+ modelValue: {},
268
+ label: {},
269
+ testidPrefix: {},
270
+ max: {}
271
+ },
272
+ emits: ["update:modelValue"],
273
+ setup(e, { emit: t }) {
274
+ let n = e, r = t, { t: s } = U(), l = {
275
+ topLeft: "cornerTopLeft",
276
+ topRight: "cornerTopRight",
277
+ bottomRight: "cornerBottomRight",
278
+ bottomLeft: "cornerBottomLeft"
279
+ }, u = [
280
+ "topLeft",
281
+ "topRight",
282
+ "bottomLeft",
283
+ "bottomRight"
284
+ ], d = S(() => {
285
+ let e = n.modelValue ?? 0;
286
+ return typeof e == "number" ? {
287
+ topLeft: e,
288
+ topRight: e,
289
+ bottomRight: e,
290
+ bottomLeft: e
291
+ } : e;
292
+ }), f = S(() => z.every((e) => d.value[e] === d.value.topLeft)), m = T(f.value);
293
+ o(f, (e) => {
294
+ !e && m.value && (m.value = !1);
295
+ });
296
+ function g(e) {
297
+ return Number.isFinite(e) && e >= 0;
298
+ }
299
+ function _(e) {
300
+ g(e) && r("update:modelValue", e);
301
+ }
302
+ function x(e, t) {
303
+ g(t) && r("update:modelValue", {
304
+ ...d.value,
305
+ [e]: t
306
+ });
307
+ }
308
+ function C() {
309
+ m.value = !m.value, m.value && r("update:modelValue", d.value.topLeft);
310
+ }
311
+ return (t, n) => (i(), v(J, {
312
+ path: e.path,
313
+ label: e.label
314
+ }, {
315
+ "label-actions": a(() => [O(vt, {
316
+ linked: m.value,
317
+ "link-label": h(s).blockSettings.linkCorners,
318
+ "unlink-label": h(s).blockSettings.unlinkCorners,
319
+ testid: `${e.testidPrefix}-border-radius-link`,
320
+ onToggle: C
321
+ }, null, 8, [
322
+ "linked",
323
+ "link-label",
324
+ "unlink-label",
325
+ "testid"
326
+ ])]),
327
+ default: a(() => [m.value ? (i(), v(gt, {
328
+ key: 0,
329
+ "model-value": d.value.topLeft,
330
+ min: 0,
331
+ max: e.max,
332
+ suffix: "px",
333
+ testid: `${e.testidPrefix}-border-radius-input`,
334
+ "onUpdate:modelValue": _
335
+ }, null, 8, [
336
+ "model-value",
337
+ "max",
338
+ "testid"
339
+ ])) : (i(), p("div", Ct, [(i(), p(E, null, c(u, (t) => y("div", { key: t }, [y("label", wt, b(h(s).blockSettings[l[t]]), 1), O(gt, {
340
+ "model-value": d.value[t],
341
+ min: 0,
342
+ max: e.max,
343
+ suffix: "px",
344
+ testid: `${e.testidPrefix}-border-radius-${t}-input`,
345
+ "onUpdate:modelValue": (e) => x(t, e)
346
+ }, null, 8, [
347
+ "model-value",
348
+ "max",
349
+ "testid",
350
+ "onUpdate:modelValue"
351
+ ])])), 64))]))]),
352
+ _: 1
353
+ }, 8, ["path", "label"]));
354
+ }
355
+ }), Et = ["value"], Dt = { value: "" }, Ot = ["value"], kt = { class: "tpl:flex tpl:items-stretch" }, At = ["value"], jt = ["value"], Mt = { value: "auto" }, Nt = { value: "full" }, Pt = { value: "custom" }, Ft = {
356
+ key: 0,
357
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
358
+ }, It = ["value"], Lt = 200, Rt = /* @__PURE__ */ r({
359
+ __name: "ButtonToolbar",
360
+ props: {
361
+ block: {},
362
+ fontFamilies: {}
363
+ },
364
+ emits: ["update"],
365
+ setup(e, { emit: t }) {
366
+ let n = e, r = t, { t: o } = U(), s = S(() => n.block.width === "full" ? "full" : typeof n.block.width == "number" ? "custom" : "auto");
367
+ function l(e, t) {
368
+ r("update", { [e]: t });
369
+ }
370
+ function u(e) {
371
+ e === "full" ? l("width", "full") : e === "custom" ? l("width", typeof n.block.width == "number" ? n.block.width : Lt) : l("width", void 0);
372
+ }
373
+ function d(e) {
374
+ let t = Number(e);
375
+ !Number.isFinite(t) || t <= 0 || l("width", t);
376
+ }
377
+ return (t, n) => (i(), p(E, null, [
378
+ O(J, {
379
+ label: h(o).button.fontFamily,
380
+ class: "tpl:mb-3.5",
381
+ path: "fontFamily"
382
+ }, {
383
+ default: a(() => [y("select", {
384
+ class: g(h(K)),
385
+ value: h(dt)(e.block.fontFamily),
386
+ onChange: n[0] ||= (e) => l("fontFamily", e.target.value || void 0)
387
+ }, [y("option", Dt, b(h(o).button.inheritFont), 1), (i(!0), p(E, null, c(e.fontFamilies, (e) => (i(), p("option", {
388
+ key: e.value,
389
+ value: e.value
390
+ }, b(e.label), 9, Ot))), 128))], 42, Et)]),
391
+ _: 1
392
+ }, 8, ["label"]),
393
+ O(J, {
394
+ label: h(o).button.text,
395
+ class: "tpl:mb-3.5",
396
+ path: "text"
397
+ }, {
398
+ default: a(() => [O(Z, {
399
+ "model-value": e.block.text,
400
+ type: "text",
401
+ "onUpdate:modelValue": n[1] ||= (e) => l("text", e)
402
+ }, null, 8, ["model-value"])]),
403
+ _: 1
404
+ }, 8, ["label"]),
405
+ O(J, {
406
+ label: h(o).button.url,
407
+ class: "tpl:mb-3.5",
408
+ path: "url"
409
+ }, {
410
+ default: a(() => [O(Z, {
411
+ "model-value": e.block.url,
412
+ type: "url",
413
+ placeholder: h(o).button.urlPlaceholder,
414
+ "onUpdate:modelValue": n[2] ||= (e) => l("url", e)
415
+ }, null, 8, ["model-value", "placeholder"]), e.block.url ? (i(), v(J, {
416
+ key: 0,
417
+ path: "openInNewTab",
418
+ label: h(o).button.openInNewTab
419
+ }, {
420
+ "label-actions": a(({ controlId: t }) => [O(X, {
421
+ "control-id": t,
422
+ "hide-label": "",
423
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
424
+ "model-value": e.block.openInNewTab ?? !1,
425
+ label: h(o).button.openInNewTab,
426
+ "onUpdate:modelValue": n[3] ||= (e) => l("openInNewTab", e)
427
+ }, null, 8, [
428
+ "control-id",
429
+ "model-value",
430
+ "label"
431
+ ])]),
432
+ _: 1
433
+ }, 8, ["label"])) : _("", !0)]),
434
+ _: 1
435
+ }, 8, ["label"]),
436
+ O(J, {
437
+ label: h(o).button.background,
438
+ class: "tpl:mb-3.5",
439
+ path: "backgroundColor"
440
+ }, {
441
+ default: a(() => [O(Y, {
442
+ "model-value": e.block.backgroundColor,
443
+ "allow-transparent": "",
444
+ "onUpdate:modelValue": n[4] ||= (e) => l("backgroundColor", e)
445
+ }, null, 8, ["model-value"])]),
446
+ _: 1
447
+ }, 8, ["label"]),
448
+ O(J, {
449
+ label: h(o).button.textColor,
450
+ class: "tpl:mb-3.5",
451
+ path: "textColor"
452
+ }, {
453
+ default: a(() => [O(Y, {
454
+ "model-value": e.block.textColor,
455
+ "onUpdate:modelValue": n[5] ||= (e) => l("textColor", e)
456
+ }, null, 8, ["model-value"])]),
457
+ _: 1
458
+ }, 8, ["label"]),
459
+ O(St, {
460
+ path: "border",
461
+ "model-value": e.block.border,
462
+ "testid-prefix": "button",
463
+ "onUpdate:modelValue": n[6] ||= (e) => l("border", e)
464
+ }, null, 8, ["model-value"]),
465
+ O(Tt, {
466
+ path: "borderRadius",
467
+ "model-value": e.block.borderRadius,
468
+ label: h(o).button.borderRadius,
469
+ max: 50,
470
+ "testid-prefix": "button",
471
+ "onUpdate:modelValue": n[7] ||= (e) => l("borderRadius", e)
472
+ }, null, 8, ["model-value", "label"]),
473
+ O(J, {
474
+ label: h(o).button.fontSize,
475
+ class: "tpl:mb-3.5",
476
+ path: "fontSize"
477
+ }, {
478
+ default: a(() => [y("div", kt, [y("input", {
479
+ type: "number",
480
+ class: g(h(G)),
481
+ value: e.block.fontSize,
482
+ min: "10",
483
+ max: "36",
484
+ onInput: n[8] ||= (e) => l("fontSize", Number(e.target.value))
485
+ }, null, 42, At), y("span", { class: g(h(W)) }, "px", 2)])]),
486
+ _: 1
487
+ }, 8, ["label"]),
488
+ O(J, {
489
+ label: h(o).button.width,
490
+ class: "tpl:mb-3.5",
491
+ path: "width"
492
+ }, {
493
+ default: a(() => [y("select", {
494
+ class: g(h(K)),
495
+ value: s.value,
496
+ onChange: n[9] ||= (e) => u(e.target.value)
497
+ }, [
498
+ y("option", Mt, b(h(o).button.widthAuto), 1),
499
+ y("option", Nt, b(h(o).button.fullWidth), 1),
500
+ y("option", Pt, b(h(o).button.widthCustom), 1)
501
+ ], 42, jt), s.value === "custom" ? (i(), p("div", Ft, [y("input", {
502
+ type: "number",
503
+ class: g(h(G)),
504
+ value: typeof e.block.width == "number" ? e.block.width : Lt,
505
+ min: "20",
506
+ onInput: n[10] ||= (e) => d(e.target.value)
507
+ }, null, 42, It), y("span", { class: g(h(W)) }, "px", 2)])) : _("", !0)]),
508
+ _: 1
509
+ }, 8, ["label"]),
510
+ O(J, {
511
+ label: h(o).title.align,
512
+ class: "tpl:mb-3.5",
513
+ path: "align"
514
+ }, {
515
+ default: a(() => [O(Q, {
516
+ options: [
517
+ {
518
+ value: "left",
519
+ label: h(o).title.alignLeft
520
+ },
521
+ {
522
+ value: "center",
523
+ label: h(o).title.alignCenter
524
+ },
525
+ {
526
+ value: "right",
527
+ label: h(o).title.alignRight
528
+ }
529
+ ],
530
+ "model-value": e.block.align ?? "center",
531
+ "onUpdate:modelValue": n[11] ||= (e) => l("align", e)
532
+ }, null, 8, ["options", "model-value"])]),
533
+ _: 1
534
+ }, 8, ["label"])
535
+ ], 64));
536
+ }
537
+ }), zt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Bt = { class: "tpl:flex tpl:items-center" }, Vt = ["aria-label"], Ht = ["value", "aria-label"], Ut = ["aria-label"], Wt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Gt = { class: "tpl:flex tpl:items-center" }, Kt = ["aria-label"], qt = ["value", "aria-label"], Jt = ["aria-label"], Yt = ["aria-label", "title"], Xt = { class: "tpl:flex tpl:items-center" }, Zt = ["aria-label"], Qt = ["value", "aria-label"], $t = ["aria-label"], en = { class: "tpl:flex tpl:items-center" }, tn = ["aria-label"], nn = ["value", "aria-label"], rn = ["aria-label"], $ = "tpl:flex tpl:items-center tpl:justify-center tpl:w-8 tpl:h-8 tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:cursor-pointer tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)] tpl:active:bg-[var(--tpl-bg-active)]", an = "tpl:w-10 tpl:h-8 tpl:text-center tpl:text-xs tpl:font-medium tpl:border-y tpl:border-x-0 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", on = /*#__PURE__*/ V(/* @__PURE__ */ r({
538
+ __name: "SpacingControl",
539
+ props: {
540
+ path: {},
541
+ modelValue: {},
542
+ label: {}
543
+ },
544
+ emits: ["update:modelValue"],
545
+ setup(e, { emit: t }) {
546
+ let n = e, r = t, { t: s } = U(), c = S(() => n.modelValue.top === n.modelValue.right && n.modelValue.right === n.modelValue.bottom && n.modelValue.bottom === n.modelValue.left), l = T(c.value);
547
+ o(c, (e) => {
548
+ !e && l.value && (l.value = !1);
549
+ });
550
+ function u(e, t) {
551
+ let i = Math.max(0, n.modelValue[e] + t);
552
+ l.value ? r("update:modelValue", {
553
+ top: i,
554
+ right: i,
555
+ bottom: i,
556
+ left: i
557
+ }) : r("update:modelValue", {
558
+ ...n.modelValue,
559
+ [e]: i
560
+ });
561
+ }
562
+ function d(e, t) {
563
+ let i = Math.max(0, t);
564
+ l.value ? r("update:modelValue", {
565
+ top: i,
566
+ right: i,
567
+ bottom: i,
568
+ left: i
569
+ }) : r("update:modelValue", {
570
+ ...n.modelValue,
571
+ [e]: i
572
+ });
573
+ }
574
+ function f() {
575
+ if (l.value = !l.value, l.value) {
576
+ let e = n.modelValue.top;
577
+ r("update:modelValue", {
578
+ top: e,
579
+ right: e,
580
+ bottom: e,
581
+ left: e
582
+ });
583
+ }
584
+ }
585
+ return (t, n) => (i(), v(J, {
586
+ class: "spacing-control",
587
+ path: e.path,
588
+ label: e.label
589
+ }, {
590
+ default: a(() => [y("div", zt, [
591
+ y("div", Bt, [
592
+ y("button", {
593
+ "aria-label": h(s).spacingControl.decreaseTop,
594
+ class: g([$, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
595
+ onClick: n[0] ||= (e) => u("top", -1)
596
+ }, [O(h(Ae), {
597
+ size: 12,
598
+ "stroke-width": 2
599
+ })], 10, Vt),
600
+ y("input", {
601
+ type: "number",
602
+ class: g(an),
603
+ value: e.modelValue.top,
604
+ "aria-label": h(s).spacingControl.top,
605
+ min: "0",
606
+ onInput: n[1] ||= (e) => d("top", Number(e.target.value))
607
+ }, null, 40, Ht),
608
+ y("button", {
609
+ "aria-label": h(s).spacingControl.increaseTop,
610
+ class: g([$, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
611
+ onClick: n[2] ||= (e) => u("top", 1)
612
+ }, [O(h(H), {
613
+ size: 12,
614
+ "stroke-width": 2
615
+ })], 10, Ut)
616
+ ]),
617
+ y("div", Wt, [
618
+ y("div", Gt, [
619
+ y("button", {
620
+ "aria-label": h(s).spacingControl.decreaseLeft,
621
+ class: g([$, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
622
+ onClick: n[3] ||= (e) => u("left", -1)
623
+ }, [O(h(Ae), {
624
+ size: 12,
625
+ "stroke-width": 2
626
+ })], 10, Kt),
627
+ y("input", {
628
+ type: "number",
629
+ class: g(an),
630
+ value: e.modelValue.left,
631
+ "aria-label": h(s).spacingControl.left,
632
+ min: "0",
633
+ onInput: n[4] ||= (e) => d("left", Number(e.target.value))
634
+ }, null, 40, qt),
635
+ y("button", {
636
+ "aria-label": h(s).spacingControl.increaseLeft,
637
+ class: g([$, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
638
+ onClick: n[5] ||= (e) => u("left", 1)
639
+ }, [O(h(H), {
640
+ size: 12,
641
+ "stroke-width": 2
642
+ })], 10, Jt)
643
+ ]),
644
+ y("button", {
645
+ class: g(["tpl:flex tpl:h-8 tpl:w-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", l.value ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
646
+ "aria-label": l.value ? h(s).spacingControl.unlock : h(s).spacingControl.lockAll,
647
+ title: l.value ? h(s).spacingControl.unlock : h(s).spacingControl.lockAll,
648
+ onClick: f
649
+ }, [l.value ? (i(), v(h(Ie), {
650
+ key: 0,
651
+ size: 14,
652
+ "stroke-width": 2
653
+ })) : (i(), v(h(Pe), {
654
+ key: 1,
655
+ size: 14,
656
+ "stroke-width": 2
657
+ }))], 10, Yt),
658
+ y("div", Xt, [
659
+ y("button", {
660
+ "aria-label": h(s).spacingControl.decreaseRight,
661
+ class: g([$, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
662
+ onClick: n[6] ||= (e) => u("right", -1)
663
+ }, [O(h(Ae), {
664
+ size: 12,
665
+ "stroke-width": 2
666
+ })], 10, Zt),
667
+ y("input", {
668
+ type: "number",
669
+ class: g(an),
670
+ value: e.modelValue.right,
671
+ "aria-label": h(s).spacingControl.right,
672
+ min: "0",
673
+ onInput: n[7] ||= (e) => d("right", Number(e.target.value))
674
+ }, null, 40, Qt),
675
+ y("button", {
676
+ "aria-label": h(s).spacingControl.increaseRight,
677
+ class: g([$, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
678
+ onClick: n[8] ||= (e) => u("right", 1)
679
+ }, [O(h(H), {
680
+ size: 12,
681
+ "stroke-width": 2
682
+ })], 10, $t)
683
+ ])
684
+ ]),
685
+ y("div", en, [
686
+ y("button", {
687
+ "aria-label": h(s).spacingControl.decreaseBottom,
688
+ class: g([$, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
689
+ onClick: n[9] ||= (e) => u("bottom", -1)
690
+ }, [O(h(Ae), {
691
+ size: 12,
692
+ "stroke-width": 2
693
+ })], 10, tn),
694
+ y("input", {
695
+ type: "number",
696
+ class: g(an),
697
+ value: e.modelValue.bottom,
698
+ "aria-label": h(s).spacingControl.bottom,
699
+ min: "0",
700
+ onInput: n[10] ||= (e) => d("bottom", Number(e.target.value))
701
+ }, null, 40, nn),
702
+ y("button", {
703
+ "aria-label": h(s).spacingControl.increaseBottom,
704
+ class: g([$, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
705
+ onClick: n[11] ||= (e) => u("bottom", 1)
706
+ }, [O(h(H), {
707
+ size: 12,
708
+ "stroke-width": 2
709
+ })], 10, rn)
710
+ ])
711
+ ])]),
712
+ _: 1
713
+ }, 8, ["path", "label"]));
714
+ }
715
+ }), [["__scopeId", "data-v-94c2e6ff"]]);
716
+ // src/composables/useNaturalImageSize.ts
717
+ function sn(e) {
718
+ let t = T(null), n = () => {};
719
+ return o(e, (e) => {
720
+ n(), t.value = null, e && (n = ge(e, (e) => {
721
+ t.value = e;
722
+ }));
723
+ }, { immediate: !0 }), t;
724
+ }
725
+ function cn() {
726
+ let e = l(Be, null);
727
+ return async (t) => he(e ? await ln(e, t) : t);
728
+ }
729
+ function ln(e, t) {
730
+ let n = (e) => typeof e == "string" && e.length > 0 ? e : t;
731
+ e.lookup(t);
732
+ let r = e.get(t);
733
+ return r === void 0 ? new Promise((r) => {
734
+ let i = o(() => e.get(t), (e) => {
735
+ e !== void 0 && (i(), r(n(e)));
736
+ });
737
+ }) : Promise.resolve(n(r));
738
+ }
739
+ // src/components/toolbar/BackgroundImageControl.vue?vue&type=script&setup=true&lang.ts
740
+ var un = { class: "tpl:space-y-3.5" }, dn = ["data-testid"], fn = ["data-testid"], pn = ["data-testid"], mn = ["aria-label", "data-testid"], hn = [
741
+ "aria-label",
742
+ "title",
743
+ "aria-pressed",
744
+ "data-testid",
745
+ "onClick"
746
+ ], gn = ["data-testid"], _n = /* @__PURE__ */ r({
747
+ __name: "BackgroundImageControl",
748
+ props: {
749
+ hideLabel: { type: Boolean },
750
+ modelValue: {},
751
+ testidPrefix: {},
752
+ measure: { type: Boolean },
753
+ heroMode: { type: Boolean }
754
+ },
755
+ emits: ["update:modelValue"],
756
+ setup(e, { emit: t }) {
757
+ let n = e, r = t, { t: a } = U(), o = l(ze, R.liquid), s = S(() => typeof n.modelValue?.url == "string" ? n.modelValue.url : ""), d = S(() => s.value.trim() !== ""), f = cn(), x;
758
+ u(() => clearTimeout(x));
759
+ function C(e) {
760
+ n.measure && !te(e, o) && (x = setTimeout(async () => {
761
+ let t = await f(e), i = n.modelValue;
762
+ t && i?.url === e && r("update:modelValue", {
763
+ ...i,
764
+ ...fe(t)
765
+ });
766
+ }, 300));
767
+ }
768
+ function w(e, t = null) {
769
+ if (clearTimeout(x), e.trim() === "") {
770
+ r("update:modelValue", void 0);
771
+ return;
772
+ }
773
+ let { naturalWidth: i, naturalHeight: a, ...o } = n.modelValue ?? re(e), s = n.measure ? t : null;
774
+ r("update:modelValue", {
775
+ ...o,
776
+ url: e,
777
+ ...s ? fe(s) : {}
778
+ }), s || C(e);
779
+ }
780
+ function D(e) {
781
+ n.modelValue && r("update:modelValue", {
782
+ ...n.modelValue,
783
+ ...e
784
+ });
785
+ }
786
+ let k = S(() => [
787
+ {
788
+ value: "cover",
789
+ label: a.blockSettings.backgroundSizeCover
790
+ },
791
+ {
792
+ value: "contain",
793
+ label: a.blockSettings.backgroundSizeContain
794
+ },
795
+ {
796
+ value: "auto",
797
+ label: a.blockSettings.backgroundSizeAuto
798
+ }
799
+ ]), A = S(() => ({
800
+ "top-left": a.blockSettings.backgroundPositionTopLeft,
801
+ "top-center": a.blockSettings.backgroundPositionTopCenter,
802
+ "top-right": a.blockSettings.backgroundPositionTopRight,
803
+ "center-left": a.blockSettings.backgroundPositionCenterLeft,
804
+ "center-center": a.blockSettings.backgroundPositionCenter,
805
+ "center-right": a.blockSettings.backgroundPositionCenterRight,
806
+ "bottom-left": a.blockSettings.backgroundPositionBottomLeft,
807
+ "bottom-center": a.blockSettings.backgroundPositionBottomCenter,
808
+ "bottom-right": a.blockSettings.backgroundPositionBottomRight
809
+ })), j = S(() => I.flatMap((e) => M.map((t) => ({
810
+ x: t,
811
+ y: e,
812
+ label: A.value[`${e}-${t}`]
813
+ }))));
814
+ function N(e) {
815
+ return n.modelValue?.position?.x === e.x && n.modelValue?.position?.y === e.y;
816
+ }
817
+ let P = T(), { canBrowse: F, isUploading: L, showOverlay: ee, openMediaBrowser: z } = ve({
818
+ target: P,
819
+ blocked: () => te(s.value, o),
820
+ apply: (e) => w(e.url, se(e.width, e.height))
821
+ });
822
+ return (t, n) => (i(), p("div", un, [y("div", null, [e.hideLabel ? _("", !0) : (i(), p("label", {
823
+ key: 0,
824
+ class: g(h(q))
825
+ }, b(h(a).blockSettings.backgroundImage), 3)), y("div", {
826
+ ref_key: "dropZoneRef",
827
+ ref: P,
828
+ class: "tpl:relative",
829
+ "data-testid": `${e.testidPrefix}-bg-url`
830
+ }, [
831
+ h(ee) ? (i(), v(ue, {
832
+ key: 0,
833
+ uploading: h(L)
834
+ }, null, 8, ["uploading"])) : _("", !0),
835
+ O(Z, {
836
+ "model-value": s.value,
837
+ type: "url",
838
+ placeholder: h(a).blockSettings.backgroundImagePlaceholder,
839
+ "onUpdate:modelValue": w
840
+ }, null, 8, ["model-value", "placeholder"]),
841
+ h(F) ? (i(), p("button", {
842
+ key: 1,
843
+ type: "button",
844
+ "data-testid": `${e.testidPrefix}-bg-browse`,
845
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all",
846
+ style: {
847
+ "border-color": "var(--tpl-border)",
848
+ color: "var(--tpl-primary)",
849
+ "background-color": "var(--tpl-bg)"
850
+ },
851
+ onClick: n[0] ||= (...e) => h(z) && h(z)(...e)
852
+ }, [O(h(Oe), {
853
+ size: 14,
854
+ "stroke-width": 1.5
855
+ }), m(" " + b(h(a).image.browseMedia), 1)], 8, fn)) : _("", !0)
856
+ ], 8, dn)]), d.value && e.modelValue ? (i(), p(E, { key: 0 }, [
857
+ e.heroMode ? _("", !0) : (i(), p("div", {
858
+ key: 0,
859
+ "data-testid": `${e.testidPrefix}-bg-size`
860
+ }, [y("label", { class: g(h(q)) }, b(h(a).blockSettings.backgroundSize), 3), O(Q, {
861
+ options: k.value,
862
+ "model-value": e.modelValue.size,
863
+ "onUpdate:modelValue": n[1] ||= (e) => D({ size: e })
864
+ }, null, 8, ["options", "model-value"])], 8, pn)),
865
+ y("div", null, [y("label", { class: g(h(q)) }, b(h(a).blockSettings.backgroundPosition), 3), y("div", {
866
+ role: "group",
867
+ "aria-label": h(a).blockSettings.backgroundPosition,
868
+ "data-testid": `${e.testidPrefix}-bg-position`,
869
+ class: "tpl:grid tpl:w-24 tpl:grid-cols-3 tpl:gap-1"
870
+ }, [(i(!0), p(E, null, c(j.value, (t) => (i(), p("button", {
871
+ key: `${t.y}-${t.x}`,
872
+ type: "button",
873
+ "aria-label": t.label,
874
+ title: t.label,
875
+ "aria-pressed": N(t),
876
+ "data-testid": `${e.testidPrefix}-bg-position-${t.y}-${t.x}`,
877
+ class: g(["tpl:flex tpl:h-6 tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:transition-colors", N(t) ? "tpl:border-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:hover:border-[var(--tpl-text-dim)]"]),
878
+ onClick: (e) => D({ position: {
879
+ x: t.x,
880
+ y: t.y
881
+ } })
882
+ }, [y("span", { class: g(["tpl:block tpl:h-1.5 tpl:w-1.5 tpl:rounded-full", N(t) ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-text-dim)]"]) }, null, 2)], 10, hn))), 128))], 8, mn)]),
883
+ e.heroMode ? _("", !0) : (i(), p("div", {
884
+ key: 1,
885
+ "data-testid": `${e.testidPrefix}-bg-repeat`
886
+ }, [O(X, {
887
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
888
+ "model-value": e.modelValue.repeat,
889
+ label: h(a).blockSettings.backgroundRepeat,
890
+ "onUpdate:modelValue": n[2] ||= (e) => D({ repeat: e })
891
+ }, null, 8, ["model-value", "label"])], 8, gn))
892
+ ], 64)) : _("", !0)]));
893
+ }
894
+ }), vn = ["data-testid"], yn = { class: "tpl:mt-3" }, bn = /* @__PURE__ */ r({
895
+ __name: "CollapsibleSection",
896
+ props: {
897
+ title: {},
898
+ open: { type: Boolean },
899
+ noBorder: { type: Boolean },
900
+ headerTestId: {}
901
+ },
902
+ emits: ["toggle"],
903
+ setup(e) {
904
+ return (t, n) => (i(), p("div", { class: g(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [y("button", {
905
+ type: "button",
906
+ "data-testid": e.headerTestId,
907
+ class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
908
+ onClick: n[0] ||= (e) => t.$emit("toggle")
909
+ }, [O(h(Se), {
910
+ class: g(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
911
+ size: 12,
912
+ "stroke-width": 2
913
+ }, null, 8, ["class"]), y("span", null, b(e.title), 1)], 8, vn), s(y("div", yn, [d(t.$slots, "default")], 512), [[w, e.open]])], 2));
914
+ }
915
+ }), xn = {
916
+ key: 0,
917
+ "data-testid": "section-hero-columns-note",
918
+ class: "tpl:mt-3.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
919
+ }, Sn = {
920
+ key: 1,
921
+ "data-testid": "section-hero",
922
+ class: "tpl:mt-3.5 tpl:space-y-3.5"
923
+ }, Cn = { "data-testid": "section-hero-height" }, wn = {
924
+ key: 0,
925
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
926
+ }, Tn = {
927
+ key: 1,
928
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
929
+ }, En = {
930
+ key: 1,
931
+ "data-testid": "section-hero-align"
932
+ }, Dn = 300, On = /* @__PURE__ */ r({
933
+ __name: "HeroControl",
934
+ props: { section: {} },
935
+ emits: ["update"],
936
+ setup(e, { emit: t }) {
937
+ function n(e) {
938
+ return typeof e == "number" && Number.isFinite(e) && e >= 1;
939
+ }
940
+ let r = e, a = t, { t: o } = U(), s = l(ze, R.liquid), c = l(Ze, null), u = l(He, void 0), d = cn(), f = S(() => typeof r.section.backgroundImage?.url == "string" ? r.section.backgroundImage.url : ""), m = S(() => f.value.trim() !== ""), x = S(() => te(f.value, s)), C = S(() => r.section.hero), w = S(() => r.section.columns === "1"), T = S(() => C.value ? n(C.value.height) ? "fixed" : "image" : "fit"), E = S(() => n(C.value?.height) ? C.value.height : Dn), D = S(() => [
941
+ {
942
+ value: "fit",
943
+ label: o.blockSettings.heroHeightFit
944
+ },
945
+ {
946
+ value: "image",
947
+ label: o.blockSettings.heroHeightImage,
948
+ disabled: x.value
949
+ },
950
+ {
951
+ value: "fixed",
952
+ label: o.blockSettings.heroHeightFixed
953
+ }
954
+ ]), k = S(() => [
955
+ {
956
+ value: "top",
957
+ label: o.blockSettings.heroAlignTop
958
+ },
959
+ {
960
+ value: "middle",
961
+ label: o.blockSettings.heroAlignMiddle
962
+ },
963
+ {
964
+ value: "bottom",
965
+ label: o.blockSettings.heroAlignBottom
966
+ }
967
+ ]), A = S(() => T.value === "image" && m.value && !x.value && ee(r.section.backgroundImage) === null);
968
+ function j() {
969
+ return (c ? B(c.content.value, r.section.id, u, c.activeLocale?.value ?? void 0) : null) ?? me(c?.state.content.settings);
970
+ }
971
+ function M(e) {
972
+ let t = C.value?.verticalAlign ?? "middle";
973
+ if (e === "image") {
974
+ T.value !== "image" && a("update", { hero: {
975
+ height: "image",
976
+ verticalAlign: t
977
+ } }), N();
978
+ return;
979
+ }
980
+ if (e === T.value) return;
981
+ if (e === "fit") {
982
+ a("update", { hero: void 0 });
983
+ return;
984
+ }
985
+ let n = ee(r.section.backgroundImage), i = n === null ? Dn : Math.round(j() * n);
986
+ a("update", { hero: {
987
+ height: i,
988
+ verticalAlign: t
989
+ } });
990
+ }
991
+ async function N() {
992
+ let e = r.section.backgroundImage;
993
+ if (!e || !m.value || x.value || ee(e) !== null) return;
994
+ let t = e.url, n = await d(t), i = r.section.backgroundImage;
995
+ n && i && i.url === t && a("update", { backgroundImage: {
996
+ ...i,
997
+ ...fe(n)
998
+ } });
999
+ }
1000
+ function P(e) {
1001
+ !C.value || !Number.isFinite(e) || e < 1 || a("update", { hero: {
1002
+ ...C.value,
1003
+ height: Math.round(e)
1004
+ } });
1005
+ }
1006
+ function F(e) {
1007
+ C.value && a("update", { hero: {
1008
+ ...C.value,
1009
+ verticalAlign: e
1010
+ } });
1011
+ }
1012
+ return (e, t) => !w.value && C.value ? (i(), p("p", xn, b(h(o).section.heroNeedsOneColumn), 1)) : w.value && (m.value || C.value) ? (i(), p("div", Sn, [
1013
+ y("div", Cn, [
1014
+ y("label", { class: g(h(q)) }, b(h(o).blockSettings.heroHeight), 3),
1015
+ O(Q, {
1016
+ options: D.value,
1017
+ "model-value": T.value,
1018
+ "onUpdate:modelValue": M
1019
+ }, null, 8, ["options", "model-value"]),
1020
+ x.value ? (i(), p("p", wn, b(h(o).blockSettings.heroMatchImageMergeTag), 1)) : A.value ? (i(), p("p", Tn, b(h(o).blockSettings.heroSizeUnknown), 1)) : _("", !0)
1021
+ ]),
1022
+ T.value === "fixed" ? (i(), v(gt, {
1023
+ key: 0,
1024
+ "model-value": E.value,
1025
+ min: 1,
1026
+ suffix: "px",
1027
+ testid: "section-hero-height-px",
1028
+ "onUpdate:modelValue": P
1029
+ }, null, 8, ["model-value"])) : _("", !0),
1030
+ C.value ? (i(), p("div", En, [y("label", { class: g(h(q)) }, b(h(o).blockSettings.heroAlign), 3), O(Q, {
1031
+ options: k.value,
1032
+ "model-value": C.value.verticalAlign,
1033
+ "onUpdate:modelValue": F
1034
+ }, null, 8, ["options", "model-value"])])) : _("", !0)
1035
+ ])) : _("", !0);
1036
+ }
1037
+ }), kn = { class: "tpl:space-y-2" }, An = { class: "tpl:flex tpl:items-center tpl:gap-2" }, jn = { class: "tpl:space-y-2" }, Mn = ["value"], Nn = { value: "" }, Pn = ["label"], Fn = ["value"], In = ["value"], Ln = {
1038
+ key: 0,
1039
+ value: "__custom__"
1040
+ }, Rn = {
1041
+ key: 0,
1042
+ class: "tpl:space-y-2"
1043
+ }, zn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Bn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Vn = { class: "tpl:flex tpl:justify-end" }, Hn = ["disabled"], Un = {
1044
+ key: 0,
1045
+ class: "tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
1046
+ }, Wn = { class: "tpl:space-y-1" }, Gn = { class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]" }, Kn = {
1047
+ key: 0,
1048
+ class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
1049
+ }, qn = /* @__PURE__ */ r({
1050
+ __name: "CommonBlockSettings",
1051
+ props: {
1052
+ block: {},
1053
+ isFirstSection: { type: Boolean }
1054
+ },
1055
+ emits: ["update"],
1056
+ setup(e, { emit: r }) {
1057
+ let u = e, d = r, { t: f, format: C } = U(), w = l(Ze, null), D = l(Ve, void 0), k = S(() => w?.activeLocale?.value), A = S(() => !!(k.value && w?.selectedBlock?.value?.l10n?.[k.value]?.hidden)), j = l(Ge, []), M = l(Xe, !1), N = t(/* @__PURE__ */ new Set()), P = T(!1), F = T(""), I = T(""), L = [{
1058
+ key: "desktop",
1059
+ icon: be,
1060
+ labelKey: "showOnDesktop"
1061
+ }, {
1062
+ key: "mobile",
1063
+ icon: Te,
1064
+ labelKey: "showOnMobile"
1065
+ }];
1066
+ function R(e) {
1067
+ N.has(e) ? N.delete(e) : N.add(e);
1068
+ }
1069
+ let ee = S(() => j.length > 0 || M), z = S(() => u.block.displayCondition ? !j.some((e) => e.label === u.block.displayCondition?.label) : !1);
1070
+ function te() {
1071
+ P.value = !0, z.value && u.block.displayCondition ? (F.value = u.block.displayCondition.before, I.value = u.block.displayCondition.after ?? "") : (F.value = "", I.value = "");
1072
+ }
1073
+ function re() {
1074
+ let e = F.value.trim(), t = I.value.trim();
1075
+ e && (d("update", { displayCondition: {
1076
+ label: f.blockSettings.customCondition,
1077
+ before: e,
1078
+ after: t
1079
+ } }), P.value = !1, F.value = e, I.value = t);
1080
+ }
1081
+ o([
1082
+ () => w?.state?.template?.id,
1083
+ () => u.block.id,
1084
+ () => u.block.displayCondition?.label,
1085
+ () => u.block.displayCondition?.before,
1086
+ () => u.block.displayCondition?.after
1087
+ ], () => {
1088
+ let e = u.block.displayCondition;
1089
+ !e || !z.value ? (P.value = !1, F.value = "", I.value = "") : (F.value = e.before, I.value = e.after ?? "");
1090
+ }, { immediate: !0 });
1091
+ let ie = S(() => {
1092
+ let e = {};
1093
+ for (let t of j) {
1094
+ let n = t.group ?? "";
1095
+ e[n] || (e[n] = []), e[n].push(t);
1096
+ }
1097
+ return e;
1098
+ }), ae = S(() => u.block.type === "section" && ne(u.block)?.applied === !0);
1099
+ function oe(e, t) {
1100
+ d("update", { styles: {
1101
+ ...u.block.styles,
1102
+ [e]: t
1103
+ } });
1104
+ }
1105
+ function se(e) {
1106
+ return u.block.visibility?.[e] !== !1;
1107
+ }
1108
+ function ce(e) {
1109
+ let t = {
1110
+ desktop: se("desktop"),
1111
+ mobile: se("mobile")
1112
+ };
1113
+ t[e] = !t[e], d("update", { visibility: t });
1114
+ }
1115
+ return (t, r) => (i(), p("div", { class: g(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
1116
+ O(bn, {
1117
+ title: h(f).blockSettings.spacing,
1118
+ open: N.has("spacing"),
1119
+ "no-border": e.isFirstSection,
1120
+ onToggle: r[1] ||= (e) => R("spacing")
1121
+ }, {
1122
+ default: a(() => [O(on, {
1123
+ path: "styles.padding",
1124
+ label: h(f).blockSettings.padding,
1125
+ "model-value": e.block.styles.padding,
1126
+ "onUpdate:modelValue": r[0] ||= (e) => oe("padding", e)
1127
+ }, null, 8, ["label", "model-value"])]),
1128
+ _: 1
1129
+ }, 8, [
1130
+ "title",
1131
+ "open",
1132
+ "no-border"
1133
+ ]),
1134
+ O(bn, {
1135
+ title: h(f).blockSettings.background,
1136
+ open: N.has("bg"),
1137
+ "header-test-id": "block-settings-background",
1138
+ onToggle: r[5] ||= (e) => R("bg")
1139
+ }, {
1140
+ default: a(() => [
1141
+ O(J, {
1142
+ path: "styles.backgroundColor",
1143
+ label: h(f).blockSettings.color
1144
+ }, {
1145
+ default: a(() => [O(Y, {
1146
+ "model-value": e.block.styles.backgroundColor ?? "",
1147
+ "allow-transparent": "",
1148
+ "onUpdate:modelValue": r[2] ||= (e) => oe("backgroundColor", e)
1149
+ }, null, 8, ["model-value"])]),
1150
+ _: 1
1151
+ }, 8, ["label"]),
1152
+ e.block.type === "section" ? (i(), v(J, {
1153
+ key: 0,
1154
+ path: "backgroundImage",
1155
+ label: h(f).blockSettings.backgroundImage
1156
+ }, {
1157
+ default: a(() => [O(_n, {
1158
+ "hide-label": "",
1159
+ class: "tpl:mt-3.5",
1160
+ "model-value": e.block.backgroundImage,
1161
+ "testid-prefix": "section",
1162
+ measure: "",
1163
+ "hero-mode": ae.value,
1164
+ "onUpdate:modelValue": r[3] ||= (e) => d("update", { backgroundImage: e })
1165
+ }, null, 8, ["model-value", "hero-mode"])]),
1166
+ _: 1
1167
+ }, 8, ["label"])) : _("", !0),
1168
+ e.block.type === "section" ? (i(), v(J, {
1169
+ key: 1,
1170
+ path: "hero",
1171
+ label: h(f).blocks.hero
1172
+ }, {
1173
+ default: a(() => [O(On, {
1174
+ section: e.block,
1175
+ onUpdate: r[4] ||= (e) => d("update", e)
1176
+ }, null, 8, ["section"])]),
1177
+ _: 1
1178
+ }, 8, ["label"])) : _("", !0)
1179
+ ]),
1180
+ _: 1
1181
+ }, 8, ["title", "open"]),
1182
+ O(bn, {
1183
+ title: h(f).blockSettings.display,
1184
+ open: N.has("display"),
1185
+ onToggle: r[7] ||= (e) => R("display")
1186
+ }, {
1187
+ default: a(() => [y("div", kn, [k.value && h(D) ? (i(), v(X, {
1188
+ key: 0,
1189
+ "data-testid": "locale-hide",
1190
+ disabled: !h(D).locales.includes(k.value),
1191
+ "model-value": A.value,
1192
+ label: h(C)(h(f).localization.hide, { language: h($e)(k.value) }),
1193
+ "onUpdate:modelValue": r[6] ||= (t) => h(w)?.setBlockHidden?.(e.block.id, t)
1194
+ }, null, 8, [
1195
+ "disabled",
1196
+ "model-value",
1197
+ "label"
1198
+ ])) : _("", !0), (i(), p(E, null, c(L, (e) => O(J, {
1199
+ key: e.key,
1200
+ path: `visibility.${e.key}`,
1201
+ label: h(f).blockSettings[e.labelKey]
1202
+ }, {
1203
+ label: a(() => [y("span", An, [(i(), v(n(e.icon), {
1204
+ size: 14,
1205
+ "stroke-width": 1.5
1206
+ })), m(" " + b(h(f).blockSettings[e.labelKey]), 1)])]),
1207
+ "label-actions": a(({ controlId: t }) => [O(X, {
1208
+ "control-id": t,
1209
+ "hide-label": "",
1210
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
1211
+ "model-value": se(e.key),
1212
+ label: h(f).blockSettings[e.labelKey],
1213
+ "onUpdate:modelValue": (t) => ce(e.key)
1214
+ }, null, 8, [
1215
+ "control-id",
1216
+ "model-value",
1217
+ "label",
1218
+ "onUpdate:modelValue"
1219
+ ])]),
1220
+ _: 2
1221
+ }, 1032, ["path", "label"])), 64))])]),
1222
+ _: 1
1223
+ }, 8, ["title", "open"]),
1224
+ ee.value ? (i(), v(bn, {
1225
+ key: 0,
1226
+ "header-test-id": "display-condition-section",
1227
+ title: h(f).blockSettings.displayCondition,
1228
+ open: N.has("condition"),
1229
+ onToggle: r[11] ||= (e) => R("condition")
1230
+ }, {
1231
+ default: a(() => [y("div", jn, [O(J, {
1232
+ path: "displayCondition",
1233
+ label: h(f).blockSettings.displayCondition
1234
+ }, {
1235
+ default: a(() => [y("select", {
1236
+ "data-testid": "display-condition-select",
1237
+ class: g(["tpl:w-full tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:outline-none tpl:transition-all tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", e.block.displayCondition ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-text)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"]),
1238
+ value: P.value || z.value ? "__custom__" : e.block.displayCondition?.label ?? "",
1239
+ onChange: r[8] ||= (e) => {
1240
+ let t = e.target.value;
1241
+ if (t === "__custom__") {
1242
+ te();
1243
+ return;
1244
+ }
1245
+ if (P.value = !1, !t) {
1246
+ d("update", { displayCondition: void 0 });
1247
+ return;
1248
+ }
1249
+ let n = h(j).find((e) => e.label === t);
1250
+ n && d("update", { displayCondition: n });
1251
+ }
1252
+ }, [
1253
+ y("option", Nn, b(h(f).blockSettings.noCondition), 1),
1254
+ (i(!0), p(E, null, c(ie.value, (e, t) => (i(), p(E, { key: t }, [t ? (i(), p("optgroup", {
1255
+ key: 0,
1256
+ label: String(t)
1257
+ }, [(i(!0), p(E, null, c(e, (e) => (i(), p("option", {
1258
+ key: e.label,
1259
+ value: e.label
1260
+ }, b(e.label), 9, Fn))), 128))], 8, Pn)) : (i(!0), p(E, { key: 1 }, c(e, (e) => (i(), p("option", {
1261
+ key: e.label,
1262
+ value: e.label
1263
+ }, b(e.label), 9, In))), 128))], 64))), 128)),
1264
+ h(M) ? (i(), p("option", Ln, b(h(f).blockSettings.customCondition), 1)) : _("", !0)
1265
+ ], 42, Mn)]),
1266
+ _: 1
1267
+ }, 8, ["label"]), P.value || z.value ? (i(), p("div", Rn, [
1268
+ y("div", null, [y("label", zn, b(h(f).blockSettings.customConditionBefore), 1), s(y("textarea", {
1269
+ "onUpdate:modelValue": r[9] ||= (e) => F.value = e,
1270
+ rows: "2",
1271
+ class: g(h(it))
1272
+ }, null, 2), [[x, F.value]])]),
1273
+ y("div", null, [y("label", Bn, b(h(f).blockSettings.customConditionAfter), 1), s(y("textarea", {
1274
+ "onUpdate:modelValue": r[10] ||= (e) => I.value = e,
1275
+ rows: "2",
1276
+ class: g(h(it))
1277
+ }, null, 2), [[x, I.value]])]),
1278
+ y("div", Vn, [y("button", {
1279
+ type: "button",
1280
+ class: g(h(tt)),
1281
+ disabled: !F.value.trim(),
1282
+ onClick: re
1283
+ }, b(h(f).blockSettings.applyCondition), 11, Hn)])
1284
+ ])) : e.block.displayCondition && !z.value ? (i(), p(E, { key: 1 }, [e.block.displayCondition.description ? (i(), p("p", Un, b(e.block.displayCondition.description), 1)) : _("", !0), y("div", Wn, [y("pre", Gn, b(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (i(), p("pre", Kn, b(e.block.displayCondition.after), 1)) : _("", !0)])], 64)) : _("", !0)])]),
1285
+ _: 1
1286
+ }, 8, ["title", "open"])) : _("", !0)
1287
+ ], 2));
1288
+ }
1289
+ }), Jn = ["title"], Yn = { class: "tpl-sr-only" }, Xn = ["title"], Zn = { class: "tpl-sr-only" }, Qn = /* @__PURE__ */ r({
1290
+ __name: "FieldLabel",
1291
+ props: {
1292
+ label: {},
1293
+ required: { type: Boolean },
1294
+ readOnly: { type: Boolean }
1295
+ },
1296
+ setup(e) {
1297
+ let { t } = U();
1298
+ return (n, r) => (i(), p("span", null, [
1299
+ m(b(e.label) + " ", 1),
1300
+ e.readOnly ? (i(), p("span", {
1301
+ key: 0,
1302
+ title: h(t).customBlocks.dataSource.readOnlyTooltip
1303
+ }, [O(h(Ie), {
1304
+ size: 12,
1305
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]",
1306
+ "aria-hidden": "true"
1307
+ }), y("span", Yn, b(h(t).customBlocks.dataSource.readOnlyTooltip), 1)], 8, Jn)) : _("", !0),
1308
+ e.required ? (i(), p("span", {
1309
+ key: 1,
1310
+ class: "tpl:text-[var(--tpl-danger)]",
1311
+ title: h(t).customBlocks.fields.required
1312
+ }, [r[0] ||= y("span", { "aria-hidden": "true" }, "*", -1), y("span", Zn, b(h(t).customBlocks.fields.required), 1)], 8, Xn)) : _("", !0)
1313
+ ]));
1314
+ }
1315
+ }), $n = ["title"], er = /* @__PURE__ */ r({
1316
+ __name: "BooleanField",
1317
+ props: {
1318
+ field: {},
1319
+ modelValue: { type: Boolean },
1320
+ readOnly: { type: Boolean },
1321
+ hideLabel: { type: Boolean },
1322
+ controlId: {}
1323
+ },
1324
+ emits: ["update:modelValue"],
1325
+ setup(e, { emit: t }) {
1326
+ let n = t, { t: r } = U();
1327
+ return (t, o) => (i(), p("div", {
1328
+ class: "tpl:mb-3.5",
1329
+ title: e.readOnly ? h(r).customBlocks.dataSource.readOnlyTooltip : void 0
1330
+ }, [O(X, {
1331
+ "hide-label": e.hideLabel,
1332
+ "control-id": e.controlId,
1333
+ class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
1334
+ "model-value": e.modelValue,
1335
+ label: e.field.label,
1336
+ required: e.field.required,
1337
+ disabled: e.readOnly,
1338
+ "onUpdate:modelValue": o[0] ||= (e) => n("update:modelValue", e)
1339
+ }, {
1340
+ default: a(() => [m(b(e.field.label) + " ", 1), e.readOnly ? (i(), v(h(Ie), {
1341
+ key: 0,
1342
+ size: 12,
1343
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
1344
+ })) : _("", !0)]),
1345
+ _: 1
1346
+ }, 8, [
1347
+ "hide-label",
1348
+ "control-id",
1349
+ "model-value",
1350
+ "label",
1351
+ "required",
1352
+ "disabled"
1353
+ ])], 8, $n));
1354
+ }
1355
+ }), tr = { class: "tpl:mb-3.5" }, nr = /* @__PURE__ */ r({
1356
+ __name: "FieldWrapper",
1357
+ props: {
1358
+ label: {},
1359
+ hideLabel: { type: Boolean },
1360
+ required: { type: Boolean },
1361
+ readOnly: { type: Boolean }
1362
+ },
1363
+ setup(e) {
1364
+ return (t, n) => (i(), p("div", tr, [e.hideLabel ? _("", !0) : (i(), p("label", {
1365
+ key: 0,
1366
+ class: g(h(q))
1367
+ }, [O(Qn, {
1368
+ label: e.label,
1369
+ required: e.required,
1370
+ "read-only": e.readOnly
1371
+ }, null, 8, [
1372
+ "label",
1373
+ "required",
1374
+ "read-only"
1375
+ ])], 2)), d(t.$slots, "default")]));
1376
+ }
1377
+ }), rr = /* @__PURE__ */ r({
1378
+ __name: "ColorField",
1379
+ props: {
1380
+ field: {},
1381
+ modelValue: {},
1382
+ readOnly: { type: Boolean },
1383
+ hideLabel: { type: Boolean }
1384
+ },
1385
+ emits: ["update:modelValue"],
1386
+ setup(e, { emit: t }) {
1387
+ let n = e, r = t, { t: o } = U(), s = l(Ye, st), c = S(() => ye(n.field, s));
1388
+ return (t, n) => (i(), v(nr, {
1389
+ "hide-label": e.hideLabel,
1390
+ label: e.field.label,
1391
+ required: e.field.required,
1392
+ "read-only": e.readOnly
1393
+ }, {
1394
+ default: a(() => [O(Y, {
1395
+ "model-value": e.modelValue,
1396
+ placeholder: e.field.placeholder,
1397
+ disabled: e.readOnly,
1398
+ presets: c.value.presets,
1399
+ "allow-custom": c.value.allowCustom,
1400
+ title: e.readOnly ? h(o).customBlocks.dataSource.readOnlyTooltip : void 0,
1401
+ "onUpdate:modelValue": n[0] ||= (e) => r("update:modelValue", e)
1402
+ }, null, 8, [
1403
+ "model-value",
1404
+ "placeholder",
1405
+ "disabled",
1406
+ "presets",
1407
+ "allow-custom",
1408
+ "title"
1409
+ ])]),
1410
+ _: 1
1411
+ }, 8, [
1412
+ "hide-label",
1413
+ "label",
1414
+ "required",
1415
+ "read-only"
1416
+ ]));
1417
+ }
1418
+ }), ir = [
1419
+ "value",
1420
+ "placeholder",
1421
+ "title"
1422
+ ], ar = ["value", "placeholder"], or = /* @__PURE__ */ r({
1423
+ __name: "ImageField",
1424
+ props: {
1425
+ field: {},
1426
+ modelValue: {},
1427
+ readOnly: { type: Boolean },
1428
+ hideLabel: { type: Boolean }
1429
+ },
1430
+ emits: ["update:modelValue"],
1431
+ setup(e, { emit: t }) {
1432
+ let n = e, r = t, { t: o } = U(), s = T(), { canBrowse: c, isUploading: l, showOverlay: u, openMediaBrowser: d } = ve({
1433
+ target: s,
1434
+ blocked: () => !!n.readOnly,
1435
+ apply: (e) => r("update:modelValue", e.url)
1436
+ });
1437
+ return (t, n) => (i(), v(nr, {
1438
+ "hide-label": e.hideLabel,
1439
+ label: e.field.label,
1440
+ required: e.field.required,
1441
+ "read-only": e.readOnly
1442
+ }, {
1443
+ default: a(() => [y("div", {
1444
+ ref_key: "dropZoneRef",
1445
+ ref: s,
1446
+ class: "tpl:relative"
1447
+ }, [
1448
+ h(u) ? (i(), v(ue, {
1449
+ key: 0,
1450
+ uploading: h(l)
1451
+ }, null, 8, ["uploading"])) : _("", !0),
1452
+ e.readOnly ? (i(), p("input", {
1453
+ key: 1,
1454
+ type: "url",
1455
+ class: g([h(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1456
+ value: e.modelValue,
1457
+ placeholder: e.field.placeholder || "https://...",
1458
+ disabled: "",
1459
+ title: h(o).customBlocks.dataSource.readOnlyTooltip
1460
+ }, null, 10, ir)) : (i(), p("input", {
1461
+ key: 2,
1462
+ type: "url",
1463
+ class: g(h(K)),
1464
+ value: e.modelValue,
1465
+ placeholder: e.field.placeholder || "https://...",
1466
+ onInput: n[0] ||= (e) => r("update:modelValue", e.target.value)
1467
+ }, null, 42, ar)),
1468
+ h(c) && !e.readOnly ? (i(), p("button", {
1469
+ key: 3,
1470
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
1471
+ onClick: n[1] ||= (e) => h(d)()
1472
+ }, [O(h(Oe), {
1473
+ size: 14,
1474
+ "stroke-width": 1.5
1475
+ }), m(" " + b(h(o).image.browseMedia), 1)])) : _("", !0)
1476
+ ], 512)]),
1477
+ _: 1
1478
+ }, 8, [
1479
+ "hide-label",
1480
+ "label",
1481
+ "required",
1482
+ "read-only"
1483
+ ]));
1484
+ }
1485
+ }), sr = [
1486
+ "value",
1487
+ "placeholder",
1488
+ "min",
1489
+ "max",
1490
+ "step",
1491
+ "disabled",
1492
+ "title"
1493
+ ], cr = /* @__PURE__ */ r({
1494
+ __name: "NumberField",
1495
+ props: {
1496
+ field: {},
1497
+ modelValue: {},
1498
+ readOnly: { type: Boolean },
1499
+ hideLabel: { type: Boolean }
1500
+ },
1501
+ emits: ["update:modelValue"],
1502
+ setup(e, { emit: t }) {
1503
+ let n = t, { t: r } = U();
1504
+ return (t, o) => (i(), v(nr, {
1505
+ "hide-label": e.hideLabel,
1506
+ label: e.field.label,
1507
+ required: e.field.required,
1508
+ "read-only": e.readOnly
1509
+ }, {
1510
+ default: a(() => [y("input", {
1511
+ type: "number",
1512
+ class: g([h(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1513
+ value: e.modelValue,
1514
+ placeholder: e.field.placeholder,
1515
+ min: e.field.min,
1516
+ max: e.field.max,
1517
+ step: e.field.step,
1518
+ disabled: e.readOnly,
1519
+ title: e.readOnly ? h(r).customBlocks.dataSource.readOnlyTooltip : void 0,
1520
+ onInput: o[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
1521
+ }, null, 42, sr)]),
1522
+ _: 1
1523
+ }, 8, [
1524
+ "hide-label",
1525
+ "label",
1526
+ "required",
1527
+ "read-only"
1528
+ ]));
1529
+ }
1530
+ }), lr = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ur = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, dr = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, fr = ["title", "onClick"], pr = {
1531
+ key: 1,
1532
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1533
+ }, mr = {
1534
+ key: 2,
1535
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1536
+ }, hr = /* @__PURE__ */ r({
1537
+ __name: "RepeatableField",
1538
+ props: {
1539
+ field: {},
1540
+ modelValue: {},
1541
+ readOnly: { type: Boolean },
1542
+ hideLabel: { type: Boolean }
1543
+ },
1544
+ emits: ["update:modelValue"],
1545
+ setup(e, { emit: t }) {
1546
+ let r = e, o = t, { t: s, format: l } = U(), u = S(() => r.modelValue || []), d = S(() => !r.field.maxItems || u.value.length < r.field.maxItems), f = S(() => !r.field.minItems || u.value.length > r.field.minItems);
1547
+ function x() {
1548
+ if (!d.value || r.readOnly) return;
1549
+ let e = {};
1550
+ for (let t of r.field.fields) e[t.key] = t.default ?? "";
1551
+ o("update:modelValue", [...u.value, e]);
1552
+ }
1553
+ function C(e) {
1554
+ if (!f.value || r.readOnly) return;
1555
+ let t = [...u.value];
1556
+ t.splice(e, 1), o("update:modelValue", t);
1557
+ }
1558
+ function w(e, t, n) {
1559
+ let r = u.value.map((r, i) => i === e ? {
1560
+ ...r,
1561
+ [t]: n
1562
+ } : r);
1563
+ o("update:modelValue", r);
1564
+ }
1565
+ return (t, r) => (i(), v(nr, {
1566
+ "hide-label": e.hideLabel,
1567
+ label: e.field.label,
1568
+ required: e.field.required,
1569
+ "read-only": e.readOnly
1570
+ }, {
1571
+ default: a(() => [y("div", lr, [
1572
+ (i(!0), p(E, null, c(u.value, (t, r) => (i(), p("div", {
1573
+ key: `${e.field.key}-${r}`,
1574
+ class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
1575
+ }, [y("div", ur, [y("span", dr, " #" + b(r + 1), 1), f.value && !e.readOnly ? (i(), p("button", {
1576
+ key: 0,
1577
+ type: "button",
1578
+ class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
1579
+ title: h(s).customBlocks.fields.removeItem,
1580
+ onClick: (e) => C(r)
1581
+ }, [O(h(je), {
1582
+ size: 12,
1583
+ "stroke-width": 2
1584
+ })], 8, fr)) : _("", !0)]), (i(!0), p(E, null, c(e.field.fields, (a) => (i(), v(n(h(wr)(a.type)), {
1585
+ key: a.key,
1586
+ field: a,
1587
+ "model-value": t[a.key],
1588
+ "read-only": e.readOnly,
1589
+ "onUpdate:modelValue": (e) => w(r, a.key, e)
1590
+ }, null, 8, [
1591
+ "field",
1592
+ "model-value",
1593
+ "read-only",
1594
+ "onUpdate:modelValue"
1595
+ ]))), 128))]))), 128)),
1596
+ d.value && !e.readOnly ? (i(), p("button", {
1597
+ key: 0,
1598
+ type: "button",
1599
+ class: g(h(nt)),
1600
+ onClick: x
1601
+ }, [O(h(H), {
1602
+ size: 14,
1603
+ "stroke-width": 2
1604
+ }), m(" " + b(h(s).customBlocks.fields.addItem), 1)], 2)) : _("", !0),
1605
+ !d.value && !e.readOnly ? (i(), p("p", pr, b(h(s).customBlocks.fields.maxItemsReached), 1)) : _("", !0),
1606
+ !f.value && !e.readOnly ? (i(), p("p", mr, b(h(l)(h(s).customBlocks.fields.minItemsRequired, { count: e.field.minItems ?? 0 })), 1)) : _("", !0)
1607
+ ])]),
1608
+ _: 1
1609
+ }, 8, [
1610
+ "hide-label",
1611
+ "label",
1612
+ "required",
1613
+ "read-only"
1614
+ ]));
1615
+ }
1616
+ }), gr = [
1617
+ "value",
1618
+ "disabled",
1619
+ "title"
1620
+ ], _r = ["value"], vr = /* @__PURE__ */ r({
1621
+ __name: "SelectField",
1622
+ props: {
1623
+ field: {},
1624
+ modelValue: {},
1625
+ readOnly: { type: Boolean },
1626
+ hideLabel: { type: Boolean }
1627
+ },
1628
+ emits: ["update:modelValue"],
1629
+ setup(e, { emit: t }) {
1630
+ let n = t, { t: r } = U();
1631
+ return (t, o) => (i(), v(nr, {
1632
+ "hide-label": e.hideLabel,
1633
+ label: e.field.label,
1634
+ required: e.field.required,
1635
+ "read-only": e.readOnly
1636
+ }, {
1637
+ default: a(() => [y("select", {
1638
+ class: g([h(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1639
+ value: e.modelValue,
1640
+ disabled: e.readOnly,
1641
+ title: e.readOnly ? h(r).customBlocks.dataSource.readOnlyTooltip : void 0,
1642
+ onChange: o[0] ||= (t) => !e.readOnly && n("update:modelValue", t.target.value)
1643
+ }, [(i(!0), p(E, null, c(e.field.options, (e) => (i(), p("option", {
1644
+ key: e.value,
1645
+ value: e.value
1646
+ }, b(e.label), 9, _r))), 128))], 42, gr)]),
1647
+ _: 1
1648
+ }, 8, [
1649
+ "hide-label",
1650
+ "label",
1651
+ "required",
1652
+ "read-only"
1653
+ ]));
1654
+ }
1655
+ }), yr = [
1656
+ "value",
1657
+ "placeholder",
1658
+ "title"
1659
+ ], br = /* @__PURE__ */ r({
1660
+ __name: "TextField",
1661
+ props: {
1662
+ field: {},
1663
+ modelValue: {},
1664
+ readOnly: { type: Boolean },
1665
+ hideLabel: { type: Boolean }
1666
+ },
1667
+ emits: ["update:modelValue"],
1668
+ setup(e, { emit: t }) {
1669
+ let n = t, { t: r } = U();
1670
+ return (t, o) => (i(), v(nr, {
1671
+ "hide-label": e.hideLabel,
1672
+ label: e.field.label,
1673
+ required: e.field.required,
1674
+ "read-only": e.readOnly
1675
+ }, {
1676
+ default: a(() => [e.readOnly ? (i(), p("input", {
1677
+ key: 0,
1678
+ type: "text",
1679
+ class: g([h(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1680
+ value: e.modelValue,
1681
+ placeholder: e.field.placeholder,
1682
+ disabled: "",
1683
+ title: h(r).customBlocks.dataSource.readOnlyTooltip
1684
+ }, null, 10, yr)) : (i(), v(Z, {
1685
+ key: 1,
1686
+ "model-value": e.modelValue,
1687
+ placeholder: e.field.placeholder,
1688
+ "onUpdate:modelValue": o[0] ||= (e) => n("update:modelValue", e)
1689
+ }, null, 8, ["model-value", "placeholder"]))]),
1690
+ _: 1
1691
+ }, 8, [
1692
+ "hide-label",
1693
+ "label",
1694
+ "required",
1695
+ "read-only"
1696
+ ]));
1697
+ }
1698
+ }), xr = [
1699
+ "value",
1700
+ "placeholder",
1701
+ "title"
1702
+ ], Sr = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:opacity-60 tpl:cursor-not-allowed", Cr = {
1703
+ text: br,
1704
+ textarea: /* @__PURE__ */ r({
1705
+ __name: "TextareaField",
1706
+ props: {
1707
+ field: {},
1708
+ modelValue: {},
1709
+ readOnly: { type: Boolean },
1710
+ hideLabel: { type: Boolean }
1711
+ },
1712
+ emits: ["update:modelValue"],
1713
+ setup(e, { emit: t }) {
1714
+ let n = t, { t: r } = U();
1715
+ return (t, o) => (i(), v(nr, {
1716
+ "hide-label": e.hideLabel,
1717
+ label: e.field.label,
1718
+ required: e.field.required,
1719
+ "read-only": e.readOnly
1720
+ }, {
1721
+ default: a(() => [e.readOnly ? (i(), p("textarea", {
1722
+ key: 0,
1723
+ value: e.modelValue,
1724
+ placeholder: e.field.placeholder,
1725
+ rows: "3",
1726
+ disabled: "",
1727
+ title: h(r).customBlocks.dataSource.readOnlyTooltip,
1728
+ class: g(Sr)
1729
+ }, null, 8, xr)) : (i(), v(lt, {
1730
+ key: 1,
1731
+ "model-value": e.modelValue,
1732
+ placeholder: e.field.placeholder,
1733
+ "onUpdate:modelValue": o[0] ||= (e) => n("update:modelValue", e)
1734
+ }, null, 8, ["model-value", "placeholder"]))]),
1735
+ _: 1
1736
+ }, 8, [
1737
+ "hide-label",
1738
+ "label",
1739
+ "required",
1740
+ "read-only"
1741
+ ]));
1742
+ }
1743
+ }),
1744
+ image: or,
1745
+ color: rr,
1746
+ number: cr,
1747
+ select: vr,
1748
+ boolean: er,
1749
+ repeatable: hr
1750
+ };
1751
+ function wr(e) {
1752
+ return Cr[e] ?? br;
1753
+ }
1754
+ // src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
1755
+ var Tr = {
1756
+ key: 0,
1757
+ class: "tpl:p-4"
1758
+ }, Er = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Dr = { key: 1 }, Or = {
1759
+ key: 0,
1760
+ class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1761
+ }, kr = {
1762
+ key: 1,
1763
+ class: "tpl:mb-4"
1764
+ }, Ar = {
1765
+ key: 1,
1766
+ class: "tpl:flex tpl:h-[32px] tpl:items-center"
1767
+ }, jr = {
1768
+ key: 0,
1769
+ class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1770
+ }, Mr = {
1771
+ key: 2,
1772
+ class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
1773
+ }, Nr = /* @__PURE__ */ r({
1774
+ __name: "CustomBlockToolbar",
1775
+ props: { block: {} },
1776
+ emits: ["updateFieldValues", "updateDataSourceFetched"],
1777
+ setup(e, { emit: t }) {
1778
+ let r = e, o = t, { t: s } = U(), u = l(qe, []), d = S(() => u.find((e) => e.type === r.block.customType)), f = S(() => r.block), { isFetching: g, fetchError: x, fetch: C, hasDataSource: w, needsFetch: T } = ae({
1779
+ definition: d,
1780
+ block: f,
1781
+ onUpdate: (e, t) => {
1782
+ o("updateFieldValues", e), o("updateDataSourceFetched", t);
1783
+ }
1784
+ });
1785
+ function D(e) {
1786
+ return e.readOnly === !0 && w.value && !!r.block.dataSourceFetched;
1787
+ }
1788
+ function k(e, t) {
1789
+ o("updateFieldValues", {
1790
+ ...r.block.fieldValues,
1791
+ [e]: t
1792
+ });
1793
+ }
1794
+ return (t, r) => d.value ? (i(), p("div", Dr, [
1795
+ d.value.description ? (i(), p("p", Or, b(d.value.description), 1)) : _("", !0),
1796
+ h(w) ? (i(), p("div", kr, [h(T) && !h(g) ? (i(), p("button", {
1797
+ key: 0,
1798
+ type: "button",
1799
+ class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-md tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-on-primary)] tpl:transition-all tpl:bg-[var(--tpl-primary)]",
1800
+ onClick: r[0] ||= (...e) => h(C) && h(C)(...e)
1801
+ }, b(d.value?.dataSource?.label || h(s).customBlocks.dataSource.fetchButton), 1)) : (i(), p("div", Ar, [h(g) ? (i(), p("div", jr, b(h(s).customBlocks.dataSource.fetching), 1)) : (i(), p("button", {
1802
+ key: 1,
1803
+ type: "button",
1804
+ class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]",
1805
+ onClick: r[1] ||= (...e) => h(C) && h(C)(...e)
1806
+ }, [O(h(Ee), { size: 12 }), m(" " + b(h(s).customBlocks.dataSource.changeButton), 1)]))])), h(x) ? (i(), p("p", Mr, [O(h(Ce), {
1807
+ size: 14,
1808
+ class: "tpl:shrink-0"
1809
+ }), m(" " + b(h(s).customBlocks.dataSource.fetchError), 1)])) : _("", !0)])) : _("", !0),
1810
+ (i(!0), p(E, null, c(d.value.fields, (t) => (i(), v(J, {
1811
+ key: t.key,
1812
+ path: `fieldValues.${t.key}`,
1813
+ label: t.label
1814
+ }, {
1815
+ label: a(() => [O(Qn, {
1816
+ label: t.label,
1817
+ required: t.required,
1818
+ "read-only": D(t)
1819
+ }, null, 8, [
1820
+ "label",
1821
+ "required",
1822
+ "read-only"
1823
+ ])]),
1824
+ default: a(({ controlId: r }) => [(i(), v(n(h(wr)(t.type)), {
1825
+ "control-id": t.type === "boolean" ? r : void 0,
1826
+ field: t,
1827
+ "hide-label": "",
1828
+ "model-value": e.block.fieldValues[t.key],
1829
+ "read-only": D(t),
1830
+ "onUpdate:modelValue": (e) => k(t.key, e)
1831
+ }, null, 8, [
1832
+ "control-id",
1833
+ "field",
1834
+ "model-value",
1835
+ "read-only",
1836
+ "onUpdate:modelValue"
1837
+ ]))]),
1838
+ _: 2
1839
+ }, 1032, ["path", "label"]))), 128))
1840
+ ])) : (i(), p("div", Tr, [y("p", Er, b(h(s).customBlocks.toolbar.noDefinition), 1)]));
1841
+ }
1842
+ }), Pr = { class: "tpl:flex tpl:items-stretch" }, Fr = ["value"], Ir = /* @__PURE__ */ r({
1843
+ __name: "DividerToolbar",
1844
+ props: { block: {} },
1845
+ emits: ["update"],
1846
+ setup(e, { emit: t }) {
1847
+ let n = t, { t: r } = U();
1848
+ function o(e, t) {
1849
+ n("update", { [e]: t });
1850
+ }
1851
+ return (t, n) => (i(), p(E, null, [
1852
+ O(J, {
1853
+ label: h(r).divider.style,
1854
+ class: "tpl:mb-3.5",
1855
+ path: "lineStyle"
1856
+ }, {
1857
+ default: a(() => [O(Q, {
1858
+ options: [
1859
+ {
1860
+ value: "solid",
1861
+ label: h(r).divider.solid
1862
+ },
1863
+ {
1864
+ value: "dashed",
1865
+ label: h(r).divider.dashed
1866
+ },
1867
+ {
1868
+ value: "dotted",
1869
+ label: h(r).divider.dotted
1870
+ }
1871
+ ],
1872
+ "model-value": e.block.lineStyle,
1873
+ "onUpdate:modelValue": n[0] ||= (e) => o("lineStyle", e)
1874
+ }, null, 8, ["options", "model-value"])]),
1875
+ _: 1
1876
+ }, 8, ["label"]),
1877
+ O(J, {
1878
+ label: h(r).divider.color,
1879
+ class: "tpl:mb-3.5",
1880
+ path: "color"
1881
+ }, {
1882
+ default: a(() => [O(Y, {
1883
+ "model-value": e.block.color,
1884
+ "onUpdate:modelValue": n[1] ||= (e) => o("color", e)
1885
+ }, null, 8, ["model-value"])]),
1886
+ _: 1
1887
+ }, 8, ["label"]),
1888
+ O(J, {
1889
+ label: h(r).divider.thickness,
1890
+ class: "tpl:mb-3.5",
1891
+ path: "thickness"
1892
+ }, {
1893
+ default: a(() => [y("div", Pr, [y("input", {
1894
+ type: "number",
1895
+ class: g(h(G)),
1896
+ value: e.block.thickness,
1897
+ min: "1",
1898
+ max: "10",
1899
+ onInput: n[2] ||= (e) => o("thickness", Number(e.target.value))
1900
+ }, null, 42, Fr), y("span", { class: g(h(W)) }, "px", 2)])]),
1901
+ _: 1
1902
+ }, 8, ["label"])
1903
+ ], 64));
1904
+ }
1905
+ }), Lr = ["value"], Rr = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, zr = /* @__PURE__ */ r({
1906
+ __name: "HtmlToolbar",
1907
+ props: { block: {} },
1908
+ emits: ["update"],
1909
+ setup(e, { emit: t }) {
1910
+ let n = t, { t: r } = U();
1911
+ return (t, o) => (i(), v(J, {
1912
+ label: h(r).html.content,
1913
+ class: "tpl:mb-3.5",
1914
+ path: "content"
1915
+ }, {
1916
+ default: a(() => [y("textarea", {
1917
+ value: e.block.content,
1918
+ placeholder: "<div>...</div>",
1919
+ rows: "10",
1920
+ class: g(h(it)),
1921
+ onInput: o[0] ||= (e) => n("update", { content: e.target.value })
1922
+ }, null, 42, Lr), y("p", Rr, [O(h(Me), {
1923
+ size: 12,
1924
+ class: "tpl:mt-0.5 tpl:shrink-0"
1925
+ }), m(" " + b(h(r).html.sanitizationHint), 1)])]),
1926
+ _: 1
1927
+ }, 8, ["label"]));
1928
+ }
1929
+ });
1930
+ // src/composables/useImageAspectLock.ts
1931
+ function Br(e) {
1932
+ let t = T(!1), n = T(null);
1933
+ o(() => e.block().id, () => {
1934
+ t.value = !1, n.value = null;
1935
+ });
1936
+ let r = S(() => de(e.block()) ?? e.measured()), i = S(() => {
1937
+ let t = e.block().width;
1938
+ return t === "full" ? e.room() : t;
1939
+ }), a = S(() => {
1940
+ let e = r.value, t = i.value;
1941
+ return !e || t === null ? null : Math.round(t * e.height / e.width);
1942
+ }), s = S(() => r.value !== null), c = S(() => {
1943
+ let t = e.block().height;
1944
+ return t === void 0 || a.value !== null && Math.abs(a.value - t) <= 1;
1945
+ }), l = S(() => s.value && !t.value && c.value);
1946
+ function u() {
1947
+ if (de(e.block())) return {};
1948
+ let t = e.measured();
1949
+ return t ? fe(t) : {};
1950
+ }
1951
+ function d(r) {
1952
+ if (n.value = null, !r) return t.value = !0, null;
1953
+ if (t.value = !1, !s.value) return null;
1954
+ let i = { ...u() };
1955
+ return e.block().height !== void 0 && (i.height = void 0), Object.keys(i).length > 0 ? i : null;
1956
+ }
1957
+ function f(e) {
1958
+ return n.value = null, l.value ? {
1959
+ width: e,
1960
+ height: void 0,
1961
+ ...u()
1962
+ } : { width: e };
1963
+ }
1964
+ function p(t) {
1965
+ let i = r.value;
1966
+ if (!l.value || !i || !Number.isFinite(t) || t <= 0) return null;
1967
+ let a = Math.round(t * i.width / i.height);
1968
+ if (a < 1) return null;
1969
+ let o = e.room();
1970
+ return o !== null && a >= o ? (n.value = Math.round(o * i.height / i.width), {
1971
+ width: "full",
1972
+ height: void 0,
1973
+ ...u()
1974
+ }) : (n.value = null, {
1975
+ width: a,
1976
+ height: void 0,
1977
+ ...u()
1978
+ });
1979
+ }
1980
+ return {
1981
+ available: s,
1982
+ locked: l,
1983
+ derivedHeight: a,
1984
+ cappedHeight: n,
1985
+ setLocked: d,
1986
+ widthUpdates: f,
1987
+ heightUpdates: p
1988
+ };
1989
+ }
1990
+ // src/components/toolbar/ImageToolbar.vue?vue&type=script&setup=true&lang.ts
1991
+ var Vr = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Hr = [
1992
+ "value",
1993
+ "placeholder",
1994
+ "title"
1995
+ ], Ur = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, Wr = ["value"], Gr = { value: "full" }, Kr = { value: "custom" }, qr = {
1996
+ key: 0,
1997
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1998
+ }, Jr = ["value"], Yr = { class: "tpl:flex tpl:items-stretch" }, Xr = ["value"], Zr = {
1999
+ key: 0,
2000
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
2001
+ role: "status",
2002
+ "data-testid": "image-height-capped"
2003
+ }, Qr = ["value"], $r = { value: "auto" }, ei = { value: "custom" }, ti = {
2004
+ key: 2,
2005
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2006
+ }, ni = ["value"], ri = 350, ii = 200, ai = /* @__PURE__ */ r({
2007
+ __name: "ImageToolbar",
2008
+ props: { block: {} },
2009
+ emits: ["update"],
2010
+ setup(e, { emit: t }) {
2011
+ let n = e, r = t, { t: o, format: s } = U(), c = l(ze, R.liquid), u = l(Ze, null), d = u ? Qe(u) : null, f = l(He, void 0), x = T(!1), C = T(!1), { start: w } = at(() => {
2012
+ x.value = !1, C.value = !1;
2013
+ }, 1e3, { immediate: !1 }), k = [
2014
+ 300,
2015
+ 400,
2016
+ 500
2017
+ ], A = S(() => {
2018
+ let e = n.block.width;
2019
+ return e === "full" ? "full" : k.includes(e) ? String(e) : "custom";
2020
+ }), M = S(() => typeof n.block.height == "number" ? "custom" : "auto");
2021
+ function N(e, t) {
2022
+ r("update", { [e]: t });
2023
+ }
2024
+ function P(e) {
2025
+ if (e === "custom") {
2026
+ let e = n.block.width;
2027
+ (typeof e != "number" || k.includes(e)) && r("update", B.widthUpdates(ri));
2028
+ } else r("update", B.widthUpdates(e === "full" ? "full" : Number(e)));
2029
+ }
2030
+ function F(e) {
2031
+ N("height", e === "custom" ? ii : void 0);
2032
+ }
2033
+ function I(e) {
2034
+ let t = Number(e);
2035
+ !Number.isFinite(t) || t <= 0 || N("height", t);
2036
+ }
2037
+ function L(e) {
2038
+ N("borderRadius", j(e) === null ? void 0 : e);
2039
+ }
2040
+ function ee(e) {
2041
+ let t = Number(e);
2042
+ !Number.isFinite(t) || t <= 0 || r("update", B.widthUpdates(t));
2043
+ }
2044
+ function z(e) {
2045
+ e !== n.block.src && r("update", {
2046
+ src: e,
2047
+ ...fe(null)
2048
+ });
2049
+ }
2050
+ function ne(e) {
2051
+ r("update", {
2052
+ src: e.url,
2053
+ ...fe(se(e.width, e.height))
2054
+ }), e.alt && (N("alt", e.alt), C.value = !0), x.value = !0, w();
2055
+ }
2056
+ let re = T(), ie = S(() => te(n.block.src, c)), { canBrowse: ae, isUploading: ce, showOverlay: le, openMediaBrowser: me } = ve({
2057
+ target: re,
2058
+ blocked: ie,
2059
+ apply: ne
2060
+ }), he = oe(() => ie.value || !n.block.src || de(n.block) ? void 0 : n.block.src), ge = sn(() => he.value), _e = S(() => d ? pe(d.content.value, n.block.id, f) : null), B = Br({
2061
+ block: () => n.block,
2062
+ room: () => _e.value,
2063
+ measured: () => ge.value
2064
+ }), { available: ye, locked: V, derivedHeight: be, cappedHeight: xe } = B;
2065
+ function Se() {
2066
+ let e = B.setLocked(!V.value);
2067
+ e && r("update", e);
2068
+ }
2069
+ let H = T(null);
2070
+ function Ce(e) {
2071
+ H.value = e;
2072
+ let t = B.heightUpdates(Number(e));
2073
+ t && r("update", t);
2074
+ }
2075
+ return (t, n) => (i(), p(E, null, [
2076
+ O(J, {
2077
+ label: h(o).image.imageUrl,
2078
+ class: "tpl:mb-3.5",
2079
+ path: "src"
2080
+ }, {
2081
+ default: a(() => [y("div", {
2082
+ ref_key: "dropZoneRef",
2083
+ ref: re,
2084
+ class: "tpl:relative"
2085
+ }, [
2086
+ h(le) ? (i(), v(ue, {
2087
+ key: 0,
2088
+ uploading: h(ce)
2089
+ }, null, 8, ["uploading"])) : _("", !0),
2090
+ O(Z, {
2091
+ "model-value": e.block.src,
2092
+ type: "url",
2093
+ placeholder: h(o).image.imageUrlPlaceholder,
2094
+ pulse: x.value,
2095
+ "onUpdate:modelValue": n[0] ||= (e) => z(e)
2096
+ }, null, 8, [
2097
+ "model-value",
2098
+ "placeholder",
2099
+ "pulse"
2100
+ ]),
2101
+ h(ae) ? (i(), p("button", {
2102
+ key: 1,
2103
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all",
2104
+ style: {
2105
+ "border-color": "var(--tpl-border)",
2106
+ color: "var(--tpl-primary)",
2107
+ "background-color": "var(--tpl-bg)"
2108
+ },
2109
+ onClick: n[1] ||= (...e) => h(me) && h(me)(...e)
2110
+ }, [O(h(Oe), {
2111
+ size: 14,
2112
+ "stroke-width": 1.5
2113
+ }), m(" " + b(h(o).image.browseMedia), 1)])) : _("", !0)
2114
+ ], 512)]),
2115
+ _: 1
2116
+ }, 8, ["label"]),
2117
+ h(te)(e.block.src, h(c)) ? (i(), v(J, {
2118
+ key: 0,
2119
+ class: "tpl:mb-3.5",
2120
+ path: "placeholderUrl"
2121
+ }, {
2122
+ label: a(() => [m(b(h(o).image.placeholderUrl) + " ", 1), y("span", Vr, b(h(o).image.optional), 1)]),
2123
+ default: a(() => [y("input", {
2124
+ type: "url",
2125
+ class: g(h(K)),
2126
+ value: e.block.placeholderUrl || "",
2127
+ placeholder: h(o).image.placeholderUrlPlaceholder,
2128
+ title: h(o).image.placeholderUrlTooltip,
2129
+ onInput: n[2] ||= (e) => N("placeholderUrl", e.target.value)
2130
+ }, null, 42, Hr)]),
2131
+ _: 1
2132
+ })) : _("", !0),
2133
+ O(J, {
2134
+ label: h(o).image.altText,
2135
+ class: "tpl:mb-3.5",
2136
+ path: "alt"
2137
+ }, {
2138
+ default: a(() => [O(Z, {
2139
+ "model-value": e.block.alt,
2140
+ type: "text",
2141
+ placeholder: h(o).image.altTextPlaceholder,
2142
+ pulse: C.value,
2143
+ disabled: e.block.decorative === !0,
2144
+ "onUpdate:modelValue": n[3] ||= (e) => N("alt", e)
2145
+ }, null, 8, [
2146
+ "model-value",
2147
+ "placeholder",
2148
+ "pulse",
2149
+ "disabled"
2150
+ ]), O(J, {
2151
+ path: "decorative",
2152
+ label: h(o).image.decorative
2153
+ }, {
2154
+ label: a(() => [y("span", null, [m(b(h(o).image.decorative) + " ", 1), y("span", Ur, b(h(o).image.decorativeHint), 1)])]),
2155
+ "label-actions": a(({ controlId: t }) => [O(X, {
2156
+ "control-id": t,
2157
+ "hide-label": "",
2158
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2159
+ "model-value": e.block.decorative === !0,
2160
+ label: h(o).image.decorative,
2161
+ "onUpdate:modelValue": n[4] ||= (e) => N("decorative", e)
2162
+ }, null, 8, [
2163
+ "control-id",
2164
+ "model-value",
2165
+ "label"
2166
+ ])]),
2167
+ _: 1
2168
+ }, 8, ["label"])]),
2169
+ _: 1
2170
+ }, 8, ["label"]),
2171
+ O(J, {
2172
+ label: h(o).image.width,
2173
+ class: "tpl:mb-3.5",
2174
+ path: "width"
2175
+ }, {
2176
+ default: a(() => [y("select", {
2177
+ class: g(h(K)),
2178
+ "data-testid": "image-width-mode",
2179
+ value: A.value,
2180
+ onChange: n[5] ||= (e) => P(e.target.value)
2181
+ }, [
2182
+ y("option", Gr, b(h(o).image.fullWidth), 1),
2183
+ n[15] ||= y("option", { value: "300" }, "300px", -1),
2184
+ n[16] ||= y("option", { value: "400" }, "400px", -1),
2185
+ n[17] ||= y("option", { value: "500" }, "500px", -1),
2186
+ y("option", Kr, b(h(o).image.widthCustom), 1)
2187
+ ], 42, Wr), A.value === "custom" ? (i(), p("div", qr, [y("input", {
2188
+ type: "number",
2189
+ "data-testid": "image-width-input",
2190
+ class: g(h(G)),
2191
+ value: typeof e.block.width == "number" ? e.block.width : ri,
2192
+ min: "20",
2193
+ onInput: n[6] ||= (e) => ee(e.target.value)
2194
+ }, null, 42, Jr), y("span", { class: g(h(W)) }, "px", 2)])) : _("", !0)]),
2195
+ _: 1
2196
+ }, 8, ["label"]),
2197
+ O(J, {
2198
+ class: "tpl:mb-3.5",
2199
+ path: "height",
2200
+ label: h(o).image.height
2201
+ }, D({
2202
+ default: a(() => [
2203
+ h(V) ? (i(), p(E, { key: 0 }, [y("div", Yr, [y("input", {
2204
+ type: "number",
2205
+ "data-testid": "image-locked-height-input",
2206
+ class: g(h(G)),
2207
+ value: H.value ?? h(be) ?? "",
2208
+ min: "1",
2209
+ onInput: n[7] ||= (e) => Ce(e.target.value),
2210
+ onBlur: n[8] ||= (e) => H.value = null
2211
+ }, null, 42, Xr), y("span", { class: g(h(W)) }, "px", 2)]), h(xe) === null ? _("", !0) : (i(), p("p", Zr, b(h(s)(h(o).image.heightCapped, { height: h(xe) })), 1))], 64)) : _("", !0),
2212
+ h(V) ? _("", !0) : (i(), p("select", {
2213
+ key: 1,
2214
+ class: g(h(K)),
2215
+ "data-testid": "image-height-mode",
2216
+ value: M.value,
2217
+ onChange: n[9] ||= (e) => F(e.target.value)
2218
+ }, [y("option", $r, b(h(o).image.heightAuto), 1), y("option", ei, b(h(o).image.heightCustom), 1)], 42, Qr)),
2219
+ !h(V) && M.value === "custom" ? (i(), p("div", ti, [y("input", {
2220
+ type: "number",
2221
+ "data-testid": "image-height-input",
2222
+ class: g(h(G)),
2223
+ value: e.block.height,
2224
+ min: "20",
2225
+ onInput: n[10] ||= (e) => I(e.target.value)
2226
+ }, null, 42, ni), y("span", { class: g(h(W)) }, "px", 2)])) : _("", !0)
2227
+ ]),
2228
+ _: 2
2229
+ }, [h(ye) ? {
2230
+ name: "label-actions",
2231
+ fn: a(() => [O(vt, {
2232
+ linked: h(V),
2233
+ "link-label": h(o).image.lockAspectRatio,
2234
+ "unlink-label": h(o).image.unlockAspectRatio,
2235
+ testid: "image-aspect-lock",
2236
+ onToggle: Se
2237
+ }, null, 8, [
2238
+ "linked",
2239
+ "link-label",
2240
+ "unlink-label"
2241
+ ])]),
2242
+ key: "0"
2243
+ } : void 0]), 1032, ["label"]),
2244
+ O(Tt, {
2245
+ path: "borderRadius",
2246
+ "model-value": e.block.borderRadius,
2247
+ label: h(o).image.borderRadius,
2248
+ "testid-prefix": "image",
2249
+ "onUpdate:modelValue": L
2250
+ }, null, 8, ["model-value", "label"]),
2251
+ O(St, {
2252
+ path: "border",
2253
+ "model-value": e.block.border,
2254
+ "testid-prefix": "image",
2255
+ "onUpdate:modelValue": n[11] ||= (e) => N("border", e)
2256
+ }, null, 8, ["model-value"]),
2257
+ O(J, {
2258
+ label: h(o).title.align,
2259
+ class: "tpl:mb-3.5",
2260
+ path: "align"
2261
+ }, {
2262
+ default: a(() => [O(Q, {
2263
+ options: [
2264
+ {
2265
+ value: "left",
2266
+ label: h(o).title.alignLeft
2267
+ },
2268
+ {
2269
+ value: "center",
2270
+ label: h(o).title.alignCenter
2271
+ },
2272
+ {
2273
+ value: "right",
2274
+ label: h(o).title.alignRight
2275
+ }
2276
+ ],
2277
+ "model-value": e.block.align,
2278
+ "onUpdate:modelValue": n[12] ||= (e) => N("align", e)
2279
+ }, null, 8, ["options", "model-value"])]),
2280
+ _: 1
2281
+ }, 8, ["label"]),
2282
+ O(J, {
2283
+ label: h(o).image.linkUrl,
2284
+ class: "tpl:mb-3.5",
2285
+ path: "linkUrl"
2286
+ }, {
2287
+ default: a(() => [O(Z, {
2288
+ "model-value": e.block.linkUrl || "",
2289
+ type: "url",
2290
+ placeholder: h(o).image.imageUrlPlaceholder,
2291
+ "onUpdate:modelValue": n[13] ||= (e) => N("linkUrl", e)
2292
+ }, null, 8, ["model-value", "placeholder"]), e.block.linkUrl ? (i(), v(J, {
2293
+ key: 0,
2294
+ path: "linkOpenInNewTab",
2295
+ label: h(o).image.openInNewTab
2296
+ }, {
2297
+ "label-actions": a(({ controlId: t }) => [O(X, {
2298
+ "control-id": t,
2299
+ "hide-label": "",
2300
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2301
+ "model-value": e.block.linkOpenInNewTab ?? !1,
2302
+ label: h(o).image.openInNewTab,
2303
+ "onUpdate:modelValue": n[14] ||= (e) => N("linkOpenInNewTab", e)
2304
+ }, null, 8, [
2305
+ "control-id",
2306
+ "model-value",
2307
+ "label"
2308
+ ])]),
2309
+ _: 1
2310
+ }, 8, ["label"])) : _("", !0)]),
2311
+ _: 1
2312
+ }, 8, ["label"])
2313
+ ], 64));
2314
+ }
2315
+ }), oi = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, si = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ci = [
2316
+ "value",
2317
+ "placeholder",
2318
+ "onInput"
2319
+ ], li = ["title", "onClick"], ui = { class: "tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-x-3 tpl:gap-y-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, di = { class: "tpl:flex tpl:items-center tpl:gap-2" }, fi = ["value"], pi = { value: "" }, mi = ["value"], hi = ["value"], gi = /* @__PURE__ */ r({
2320
+ __name: "MenuToolbar",
2321
+ props: {
2322
+ block: {},
2323
+ fontFamilies: {}
2324
+ },
2325
+ emits: ["update"],
2326
+ setup(e, { emit: t }) {
2327
+ let n = e, r = t, { t: o } = U(), s = S(() => [
2328
+ {
2329
+ key: "openInNewTab",
2330
+ label: o.menu.openInNewTab
2331
+ },
2332
+ {
2333
+ key: "bold",
2334
+ label: o.menu.bold
2335
+ },
2336
+ {
2337
+ key: "underline",
2338
+ label: o.menu.underline
2339
+ }
2340
+ ]), l = S(() => [
2341
+ {
2342
+ value: "left",
2343
+ label: o.title.alignLeft,
2344
+ icon: Ne
2345
+ },
2346
+ {
2347
+ value: "center",
2348
+ label: o.title.alignCenter,
2349
+ icon: De
2350
+ },
2351
+ {
2352
+ value: "right",
2353
+ label: o.title.alignRight,
2354
+ icon: Re
2355
+ }
2356
+ ]);
2357
+ function u(e, t) {
2358
+ r("update", { [e]: t });
2359
+ }
2360
+ function d() {
2361
+ let e = {
2362
+ id: A(),
2363
+ text: "",
2364
+ url: "",
2365
+ openInNewTab: !1,
2366
+ bold: !1,
2367
+ underline: !1
2368
+ };
2369
+ r("update", { items: [...n.block.items, e] });
2370
+ }
2371
+ function f(e, t, i) {
2372
+ let a = n.block.items.map((n) => n.id === e ? {
2373
+ ...n,
2374
+ [t]: i
2375
+ } : n);
2376
+ r("update", { items: a });
2377
+ }
2378
+ function _(e) {
2379
+ r("update", { items: n.block.items.filter((t) => t.id !== e) });
2380
+ }
2381
+ return (t, n) => (i(), p(E, null, [
2382
+ O(J, { label: h(o).menu.items }, {
2383
+ default: a(() => [y("div", oi, [(i(!0), p(E, null, c(e.block.items, (t) => (i(), p("div", {
2384
+ key: t.id,
2385
+ class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
2386
+ }, [
2387
+ y("div", si, [O(J, {
2388
+ path: t.id.includes(".") ? void 0 : `items.${t.id}.text`,
2389
+ label: h(o).menu.text
2390
+ }, {
2391
+ default: a(() => [y("input", {
2392
+ type: "text",
2393
+ class: g([h(K), "tpl:flex-1"]),
2394
+ value: t.text,
2395
+ placeholder: h(o).menu.text,
2396
+ onInput: (e) => f(t.id, "text", e.target.value)
2397
+ }, null, 42, ci)]),
2398
+ _: 2
2399
+ }, 1032, ["path", "label"]), y("button", {
2400
+ class: g(h(et)),
2401
+ title: h(o).menu.removeItem,
2402
+ onClick: (e) => _(t.id)
2403
+ }, [O(h(Le), {
2404
+ size: 14,
2405
+ "stroke-width": 2
2406
+ })], 10, li)]),
2407
+ O(J, {
2408
+ path: t.id.includes(".") ? void 0 : `items.${t.id}.url`,
2409
+ label: h(o).button.url
2410
+ }, {
2411
+ default: a(() => [O(Z, {
2412
+ "model-value": t.url,
2413
+ type: "url",
2414
+ placeholder: h(o).menu.urlPlaceholder,
2415
+ "onUpdate:modelValue": (e) => f(t.id, "url", e)
2416
+ }, null, 8, [
2417
+ "model-value",
2418
+ "placeholder",
2419
+ "onUpdate:modelValue"
2420
+ ])]),
2421
+ _: 2
2422
+ }, 1032, ["path", "label"]),
2423
+ y("div", ui, [(i(!0), p(E, null, c(s.value, (e) => (i(), v(J, {
2424
+ key: e.key,
2425
+ path: t.id.includes(".") ? void 0 : `items.${t.id}.${e.key}`,
2426
+ label: e.label
2427
+ }, {
2428
+ "label-actions": a(({ controlId: n }) => [O(X, {
2429
+ "control-id": n,
2430
+ "hide-label": "",
2431
+ "model-value": t[e.key],
2432
+ label: e.label,
2433
+ "onUpdate:modelValue": (n) => f(t.id, e.key, n)
2434
+ }, null, 8, [
2435
+ "control-id",
2436
+ "model-value",
2437
+ "label",
2438
+ "onUpdate:modelValue"
2439
+ ])]),
2440
+ _: 2
2441
+ }, 1032, ["path", "label"]))), 128))]),
2442
+ y("div", di, [O(J, {
2443
+ path: t.id.includes(".") ? void 0 : `items.${t.id}.color`,
2444
+ label: h(o).menu.color
2445
+ }, {
2446
+ default: a(() => [O(Y, {
2447
+ "swatch-only": "",
2448
+ "model-value": t.color || e.block.linkColor || e.block.color || "",
2449
+ "onUpdate:modelValue": (e) => f(t.id, "color", e)
2450
+ }, null, 8, ["model-value", "onUpdate:modelValue"])]),
2451
+ _: 2
2452
+ }, 1032, ["path", "label"])])
2453
+ ]))), 128)), y("button", {
2454
+ class: g(h(nt)),
2455
+ onClick: d
2456
+ }, [O(h(H), {
2457
+ size: 14,
2458
+ "stroke-width": 2
2459
+ }), m(" " + b(h(o).menu.addItem), 1)], 2)])]),
2460
+ _: 1
2461
+ }, 8, ["label"]),
2462
+ O(J, {
2463
+ path: "fontFamily",
2464
+ label: h(o).menu.fontFamily
2465
+ }, {
2466
+ default: a(() => [y("select", {
2467
+ class: g(h(K)),
2468
+ value: h(dt)(e.block.fontFamily),
2469
+ onChange: n[0] ||= (e) => u("fontFamily", e.target.value || void 0)
2470
+ }, [y("option", pi, b(h(o).title.inheritFont), 1), (i(!0), p(E, null, c(e.fontFamilies, (e) => (i(), p("option", {
2471
+ key: e.value,
2472
+ value: e.value
2473
+ }, b(e.label), 9, mi))), 128))], 42, fi)]),
2474
+ _: 1
2475
+ }, 8, ["label"]),
2476
+ O(J, {
2477
+ path: "fontSize",
2478
+ label: h(o).menu.fontSize
2479
+ }, {
2480
+ default: a(() => [O(gt, {
2481
+ "model-value": e.block.fontSize,
2482
+ min: 8,
2483
+ max: 48,
2484
+ suffix: "px",
2485
+ "onUpdate:modelValue": n[1] ||= (e) => u("fontSize", e)
2486
+ }, null, 8, ["model-value"])]),
2487
+ _: 1
2488
+ }, 8, ["label"]),
2489
+ O(J, {
2490
+ path: "color",
2491
+ label: h(o).menu.color
2492
+ }, {
2493
+ default: a(() => [O(Y, {
2494
+ "model-value": e.block.color ?? "",
2495
+ "onUpdate:modelValue": n[2] ||= (e) => u("color", e || void 0)
2496
+ }, null, 8, ["model-value"])]),
2497
+ _: 1
2498
+ }, 8, ["label"]),
2499
+ O(J, {
2500
+ path: "linkColor",
2501
+ label: h(o).menu.linkColor
2502
+ }, {
2503
+ default: a(() => [O(Y, {
2504
+ "model-value": e.block.linkColor || e.block.color || "",
2505
+ "onUpdate:modelValue": n[3] ||= (e) => u("linkColor", e || void 0)
2506
+ }, null, 8, ["model-value"])]),
2507
+ _: 1
2508
+ }, 8, ["label"]),
2509
+ O(J, {
2510
+ path: "textAlign",
2511
+ label: h(o).menu.textAlign
2512
+ }, {
2513
+ default: a(() => [O(Q, {
2514
+ options: l.value,
2515
+ "model-value": e.block.textAlign,
2516
+ "onUpdate:modelValue": n[4] ||= (e) => u("textAlign", e)
2517
+ }, null, 8, ["options", "model-value"])]),
2518
+ _: 1
2519
+ }, 8, ["label"]),
2520
+ O(J, {
2521
+ path: "separator",
2522
+ label: h(o).menu.separator
2523
+ }, {
2524
+ default: a(() => [y("input", {
2525
+ type: "text",
2526
+ class: g(h(K)),
2527
+ value: e.block.separator,
2528
+ onInput: n[5] ||= (e) => u("separator", e.target.value)
2529
+ }, null, 42, hi)]),
2530
+ _: 1
2531
+ }, 8, ["label"]),
2532
+ O(J, {
2533
+ path: "separatorColor",
2534
+ label: h(o).menu.separatorColor
2535
+ }, {
2536
+ default: a(() => [O(Y, {
2537
+ "model-value": e.block.separatorColor,
2538
+ "onUpdate:modelValue": n[6] ||= (e) => u("separatorColor", e)
2539
+ }, null, 8, ["model-value"])]),
2540
+ _: 1
2541
+ }, 8, ["label"]),
2542
+ O(J, {
2543
+ path: "spacing",
2544
+ label: h(o).menu.spacing
2545
+ }, {
2546
+ default: a(() => [O(gt, {
2547
+ "model-value": e.block.spacing,
2548
+ min: 0,
2549
+ max: 50,
2550
+ suffix: "px",
2551
+ "onUpdate:modelValue": n[7] ||= (e) => u("spacing", e)
2552
+ }, null, 8, ["model-value"])]),
2553
+ _: 1
2554
+ }, 8, ["label"])
2555
+ ], 64));
2556
+ }
2557
+ }), _i = { class: "tpl:flex tpl:items-stretch" }, vi = ["value"], yi = /* @__PURE__ */ r({
2558
+ __name: "ParagraphToolbar",
2559
+ props: { block: {} },
2560
+ emits: ["update"],
2561
+ setup(e, { emit: t }) {
2562
+ let n = t, { t: r } = U();
2563
+ return (t, o) => (i(), v(J, {
2564
+ label: h(r).paragraph.paragraphSpacing,
2565
+ class: "tpl:mb-3.5",
2566
+ "data-testid": "paragraph-spacing",
2567
+ path: "paragraphSpacing"
2568
+ }, {
2569
+ default: a(() => [y("div", _i, [y("input", {
2570
+ type: "number",
2571
+ class: g(h(G)),
2572
+ value: e.block.paragraphSpacing ?? h(N).paragraphGap,
2573
+ min: "0",
2574
+ max: "64",
2575
+ onInput: o[0] ||= (e) => n("update", { paragraphSpacing: Number(e.target.value) })
2576
+ }, null, 42, vi), y("span", { class: g(h(W)) }, "px", 2)])]),
2577
+ _: 1
2578
+ }, 8, ["label"]));
2579
+ }
2580
+ });
2581
+ // src/utils/rebalanceColumnChildren.ts
2582
+ function bi(e, t) {
2583
+ let n = k(t);
2584
+ if (e.length === n) return e;
2585
+ if (e.length < n) {
2586
+ let t = Array.from({ length: n - e.length }, () => []);
2587
+ return [...e, ...t];
2588
+ }
2589
+ let r = e.slice(0, n), i = e.slice(n).flat(), a = [...r[n - 1], ...i];
2590
+ return [...r.slice(0, n - 1), a];
2591
+ }
2592
+ // src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
2593
+ var xi = { class: "tpl:mb-3.5" }, Si = ["value"], Ci = ["value"], wi = {
2594
+ key: 2,
2595
+ class: "tpl:mb-3.5"
2596
+ }, Ti = {
2597
+ key: 0,
2598
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
2599
+ }, Ei = {
2600
+ key: 1,
2601
+ class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
2602
+ }, Di = /* @__PURE__ */ r({
2603
+ __name: "SectionToolbar",
2604
+ props: { block: {} },
2605
+ emits: ["update"],
2606
+ setup(e, { emit: t }) {
2607
+ let n = e, r = t, { t: o } = U(), s = l(He, void 0), u = l(We, void 0), d = s !== void 0 && F(s), f = S(() => u !== !1 || !!n.block.wrapper), m = S(() => d && !n.block.wrapper), x = S(() => d && f.value), C = S(() => ne(n.block)?.applied === !0), w = S(() => [
2608
+ {
2609
+ value: "1",
2610
+ label: o.section.column1
2611
+ },
2612
+ {
2613
+ value: "2",
2614
+ label: o.section.column2
2615
+ },
2616
+ {
2617
+ value: "3",
2618
+ label: o.section.column3
2619
+ },
2620
+ {
2621
+ value: "1-2",
2622
+ label: o.section.ratio12
2623
+ },
2624
+ {
2625
+ value: "2-1",
2626
+ label: o.section.ratio21
2627
+ }
2628
+ ]);
2629
+ function T(e) {
2630
+ let t = e.target.value, i = bi(n.block.children, t);
2631
+ r("update", {
2632
+ columns: t,
2633
+ children: i
2634
+ });
2635
+ }
2636
+ function D(e) {
2637
+ r("update", { stackOnMobile: e });
2638
+ }
2639
+ function k(e) {
2640
+ r("update", { borderRadius: e });
2641
+ }
2642
+ function A(e) {
2643
+ r("update", { wrapper: e ? { padding: {
2644
+ top: 20,
2645
+ right: 20,
2646
+ bottom: 20,
2647
+ left: 20
2648
+ } } : void 0 });
2649
+ }
2650
+ function j(e) {
2651
+ r("update", { wrapper: {
2652
+ ...n.block.wrapper,
2653
+ ...e
2654
+ } });
2655
+ }
2656
+ function M(e) {
2657
+ j({ padding: e });
2658
+ }
2659
+ function N(e) {
2660
+ j({ borderRadius: e });
2661
+ }
2662
+ return (t, n) => (i(), p(E, null, [
2663
+ y("div", xi, [y("label", { class: g(h(q)) }, b(h(o).section.columns), 3), y("select", {
2664
+ class: g(h(K)),
2665
+ value: e.block.columns,
2666
+ onChange: T
2667
+ }, [(i(!0), p(E, null, c(w.value, (e) => (i(), p("option", {
2668
+ key: e.value,
2669
+ value: e.value
2670
+ }, b(e.label), 9, Ci))), 128))], 42, Si)]),
2671
+ e.block.columns === "1" ? _("", !0) : (i(), v(J, {
2672
+ key: 0,
2673
+ class: "tpl:mb-3.5",
2674
+ path: "stackOnMobile",
2675
+ label: h(o).section.stackOnMobile
2676
+ }, {
2677
+ "label-actions": a(({ controlId: t }) => [O(X, {
2678
+ "control-id": t,
2679
+ "hide-label": "",
2680
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2681
+ "model-value": e.block.stackOnMobile !== !1,
2682
+ label: h(o).section.stackOnMobile,
2683
+ "onUpdate:modelValue": n[0] ||= (e) => D(e)
2684
+ }, null, 8, [
2685
+ "control-id",
2686
+ "model-value",
2687
+ "label"
2688
+ ])]),
2689
+ _: 1
2690
+ }, 8, ["label"])),
2691
+ O(Tt, {
2692
+ path: "borderRadius",
2693
+ "model-value": e.block.borderRadius,
2694
+ label: h(o).section.borderRadius,
2695
+ max: 50,
2696
+ "testid-prefix": "section",
2697
+ "onUpdate:modelValue": k
2698
+ }, null, 8, ["model-value", "label"]),
2699
+ C.value ? _("", !0) : (i(), v(St, {
2700
+ key: 1,
2701
+ path: "border",
2702
+ "model-value": e.block.border,
2703
+ "testid-prefix": "section",
2704
+ "onUpdate:modelValue": n[1] ||= (e) => r("update", { border: e })
2705
+ }, null, 8, ["model-value"])),
2706
+ f.value ? (i(), p("div", wi, [
2707
+ O(J, {
2708
+ path: "wrapper",
2709
+ label: h(o).section.wrapperEnable
2710
+ }, {
2711
+ "label-actions": a(({ controlId: t }) => [O(X, {
2712
+ "control-id": t,
2713
+ "hide-label": "",
2714
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2715
+ "model-value": !!e.block.wrapper,
2716
+ label: h(o).section.wrapperEnable,
2717
+ disabled: m.value,
2718
+ "onUpdate:modelValue": n[2] ||= (e) => A(e)
2719
+ }, null, 8, [
2720
+ "control-id",
2721
+ "model-value",
2722
+ "label",
2723
+ "disabled"
2724
+ ])]),
2725
+ _: 1
2726
+ }, 8, ["label"]),
2727
+ x.value ? (i(), p("p", Ti, b(h(o).section.wrapperLayoutConflict), 1)) : _("", !0),
2728
+ e.block.wrapper ? (i(), p("div", Ei, [
2729
+ y("div", null, [O(J, {
2730
+ path: "wrapper.backgroundColor",
2731
+ label: h(o).blockSettings.color
2732
+ }, {
2733
+ default: a(() => [O(Y, {
2734
+ "model-value": e.block.wrapper.backgroundColor ?? "",
2735
+ "allow-transparent": "",
2736
+ "onUpdate:modelValue": n[3] ||= (e) => j({ backgroundColor: e })
2737
+ }, null, 8, ["model-value"])]),
2738
+ _: 1
2739
+ }, 8, ["label"])]),
2740
+ O(J, {
2741
+ path: "wrapper.backgroundImage",
2742
+ label: h(o).blockSettings.backgroundImage
2743
+ }, {
2744
+ default: a(() => [O(_n, {
2745
+ "hide-label": "",
2746
+ "model-value": e.block.wrapper.backgroundImage,
2747
+ "testid-prefix": "section-wrapper",
2748
+ "onUpdate:modelValue": n[4] ||= (e) => j({ backgroundImage: e })
2749
+ }, null, 8, ["model-value"])]),
2750
+ _: 1
2751
+ }, 8, ["label"]),
2752
+ O(on, {
2753
+ path: "wrapper.padding",
2754
+ label: h(o).blockSettings.padding,
2755
+ "model-value": e.block.wrapper.padding ?? {
2756
+ top: 0,
2757
+ right: 0,
2758
+ bottom: 0,
2759
+ left: 0
2760
+ },
2761
+ "onUpdate:modelValue": M
2762
+ }, null, 8, ["label", "model-value"]),
2763
+ O(Tt, {
2764
+ path: "wrapper.borderRadius",
2765
+ "model-value": e.block.wrapper.borderRadius,
2766
+ label: h(o).section.borderRadius,
2767
+ max: 50,
2768
+ "testid-prefix": "section-wrapper",
2769
+ "onUpdate:modelValue": N
2770
+ }, null, 8, ["model-value", "label"])
2771
+ ])) : _("", !0)
2772
+ ])) : _("", !0)
2773
+ ], 64));
2774
+ }
2775
+ }), Oi = { class: "tpl:mb-3.5" }, ki = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ai = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ji = ["value", "onChange"], Mi = ["value"], Ni = ["title", "onClick"], Pi = ["value"], Fi = { value: "solid" }, Ii = { value: "outlined" }, Li = { value: "rounded" }, Ri = { value: "square" }, zi = { value: "circle" }, Bi = { value: "plain" }, Vi = ["value"], Hi = { value: "brand" }, Ui = { value: "dark" }, Wi = { value: "light" }, Gi = { class: "tpl:flex tpl:items-stretch" }, Ki = ["value"], qi = /* @__PURE__ */ r({
2776
+ __name: "SocialToolbar",
2777
+ props: { block: {} },
2778
+ emits: ["update"],
2779
+ setup(e, { emit: t }) {
2780
+ let n = e, r = t, { t: o } = U();
2781
+ function s(e, t) {
2782
+ r("update", { [e]: t });
2783
+ }
2784
+ function l() {
2785
+ let e = {
2786
+ id: A(),
2787
+ platform: "facebook",
2788
+ url: ""
2789
+ };
2790
+ r("update", { icons: [...n.block.icons, e] });
2791
+ }
2792
+ function u(e, t, i) {
2793
+ let a = n.block.icons.map((n) => n.id === e ? {
2794
+ ...n,
2795
+ [t]: i
2796
+ } : n);
2797
+ r("update", { icons: a });
2798
+ }
2799
+ function d(e) {
2800
+ r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
2801
+ }
2802
+ return (t, n) => (i(), p(E, null, [
2803
+ y("div", Oi, [y("label", { class: g(h(q)) }, b(h(o).social.icons), 3), y("div", ki, [(i(!0), p(E, null, c(e.block.icons, (e) => (i(), p("div", {
2804
+ key: e.id,
2805
+ class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
2806
+ }, [y("div", Ai, [O(J, {
2807
+ path: e.id.includes(".") ? void 0 : `icons.${e.id}.platform`,
2808
+ label: h(o).social.icons
2809
+ }, {
2810
+ default: a(() => [y("select", {
2811
+ "data-testid": "social-platform-select",
2812
+ class: g([h(K), "tpl:flex-1"]),
2813
+ value: e.platform,
2814
+ onChange: (t) => u(e.id, "platform", t.target.value)
2815
+ }, [(i(!0), p(E, null, c(h(_e), (e) => (i(), p("option", {
2816
+ key: e,
2817
+ value: e
2818
+ }, b(h(o).social.platforms[e]), 9, Mi))), 128))], 42, ji)]),
2819
+ _: 2
2820
+ }, 1032, ["path", "label"]), y("button", {
2821
+ class: g(h(et)),
2822
+ title: h(o).social.removeIcon,
2823
+ onClick: (t) => d(e.id)
2824
+ }, [O(h(Le), {
2825
+ size: 14,
2826
+ "stroke-width": 2
2827
+ })], 10, Ni)]), O(J, {
2828
+ path: e.id.includes(".") ? void 0 : `icons.${e.id}.url`,
2829
+ label: h(o).button.url
2830
+ }, {
2831
+ default: a(() => [O(Z, {
2832
+ "model-value": e.url,
2833
+ type: "url",
2834
+ placeholder: h(o).social.urlPlaceholder,
2835
+ "onUpdate:modelValue": (t) => u(e.id, "url", t)
2836
+ }, null, 8, [
2837
+ "model-value",
2838
+ "placeholder",
2839
+ "onUpdate:modelValue"
2840
+ ])]),
2841
+ _: 2
2842
+ }, 1032, ["path", "label"])]))), 128)), y("button", {
2843
+ class: g(h(nt)),
2844
+ onClick: l
2845
+ }, [O(h(H), {
2846
+ size: 14,
2847
+ "stroke-width": 2
2848
+ }), m(" " + b(h(o).social.addIcon), 1)], 2)])]),
2849
+ O(J, {
2850
+ label: h(o).social.style,
2851
+ class: "tpl:mb-3.5",
2852
+ path: "iconStyle"
2853
+ }, {
2854
+ default: a(() => [y("select", {
2855
+ class: g(h(K)),
2856
+ value: e.block.iconStyle,
2857
+ onChange: n[0] ||= (e) => s("iconStyle", e.target.value)
2858
+ }, [
2859
+ y("option", Fi, b(h(o).social.styleSolid), 1),
2860
+ y("option", Ii, b(h(o).social.styleOutlined), 1),
2861
+ y("option", Li, b(h(o).social.styleRounded), 1),
2862
+ y("option", Ri, b(h(o).social.styleSquare), 1),
2863
+ y("option", zi, b(h(o).social.styleCircle), 1),
2864
+ y("option", Bi, b(h(o).social.stylePlain), 1)
2865
+ ], 42, Pi)]),
2866
+ _: 1
2867
+ }, 8, ["label"]),
2868
+ O(J, {
2869
+ label: h(o).social.color,
2870
+ class: "tpl:mb-3.5",
2871
+ path: "iconTone"
2872
+ }, {
2873
+ default: a(() => [y("select", {
2874
+ "data-testid": "social-tone-select",
2875
+ class: g(h(K)),
2876
+ value: e.block.iconTone ?? "brand",
2877
+ onChange: n[1] ||= (e) => s("iconTone", e.target.value)
2878
+ }, [
2879
+ y("option", Hi, b(h(o).social.colorBrand), 1),
2880
+ y("option", Ui, b(h(o).social.colorDark), 1),
2881
+ y("option", Wi, b(h(o).social.colorLight), 1)
2882
+ ], 42, Vi)]),
2883
+ _: 1
2884
+ }, 8, ["label"]),
2885
+ O(J, {
2886
+ label: h(o).social.size,
2887
+ class: "tpl:mb-3.5",
2888
+ path: "iconSize"
2889
+ }, {
2890
+ default: a(() => [O(Q, {
2891
+ options: [
2892
+ {
2893
+ value: "small",
2894
+ label: h(o).social.sizeSmall
2895
+ },
2896
+ {
2897
+ value: "medium",
2898
+ label: h(o).social.sizeMedium
2899
+ },
2900
+ {
2901
+ value: "large",
2902
+ label: h(o).social.sizeLarge
2903
+ }
2904
+ ],
2905
+ "model-value": e.block.iconSize,
2906
+ "onUpdate:modelValue": n[2] ||= (e) => s("iconSize", e)
2907
+ }, null, 8, ["options", "model-value"])]),
2908
+ _: 1
2909
+ }, 8, ["label"]),
2910
+ O(J, {
2911
+ label: h(o).social.spacing,
2912
+ class: "tpl:mb-3.5",
2913
+ path: "spacing"
2914
+ }, {
2915
+ default: a(() => [y("div", Gi, [y("input", {
2916
+ type: "number",
2917
+ class: g(h(G)),
2918
+ value: e.block.spacing,
2919
+ min: "0",
2920
+ max: "50",
2921
+ onInput: n[3] ||= (e) => s("spacing", Number(e.target.value))
2922
+ }, null, 42, Ki), y("span", { class: g(h(W)) }, "px", 2)])]),
2923
+ _: 1
2924
+ }, 8, ["label"]),
2925
+ O(J, {
2926
+ label: h(o).social.align,
2927
+ class: "tpl:mb-3.5",
2928
+ path: "align"
2929
+ }, {
2930
+ default: a(() => [O(Q, {
2931
+ options: [
2932
+ {
2933
+ value: "left",
2934
+ label: h(o).title.alignLeft,
2935
+ icon: h(Ne)
2936
+ },
2937
+ {
2938
+ value: "center",
2939
+ label: h(o).title.alignCenter,
2940
+ icon: h(De)
2941
+ },
2942
+ {
2943
+ value: "right",
2944
+ label: h(o).title.alignRight,
2945
+ icon: h(Re)
2946
+ }
2947
+ ],
2948
+ "model-value": e.block.align,
2949
+ "onUpdate:modelValue": n[4] ||= (e) => s("align", e)
2950
+ }, null, 8, ["options", "model-value"])]),
2951
+ _: 1
2952
+ }, 8, ["label"])
2953
+ ], 64));
2954
+ }
2955
+ }), Ji = { class: "tpl:flex tpl:items-stretch" }, Yi = ["value"], Xi = ["value"], Zi = /* @__PURE__ */ r({
2956
+ __name: "SpacerToolbar",
2957
+ props: { block: {} },
2958
+ emits: ["update"],
2959
+ setup(e, { emit: t }) {
2960
+ let n = t, { t: r } = U();
2961
+ return (t, o) => (i(), v(J, {
2962
+ label: h(r).spacer.height,
2963
+ class: "tpl:mb-3.5",
2964
+ path: "height"
2965
+ }, {
2966
+ default: a(() => [y("div", Ji, [y("input", {
2967
+ type: "number",
2968
+ class: g(h(G)),
2969
+ value: e.block.height,
2970
+ min: "10",
2971
+ max: "100",
2972
+ onInput: o[0] ||= (e) => n("update", { height: Number(e.target.value) })
2973
+ }, null, 42, Yi), y("span", { class: g(h(W)) }, "px", 2)]), y("input", {
2974
+ type: "range",
2975
+ class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
2976
+ value: e.block.height,
2977
+ min: "10",
2978
+ max: "100",
2979
+ onInput: o[1] ||= (e) => n("update", { height: Number(e.target.value) })
2980
+ }, null, 40, Xi)]),
2981
+ _: 1
2982
+ }, 8, ["label"]));
2983
+ }
2984
+ }), Qi = { class: "tpl:mb-3.5" }, $i = { class: "tpl:flex tpl:items-center tpl:gap-3" }, ea = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ta = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, na = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, ra = ["disabled"], ia = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, aa = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, oa = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, sa = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, ca = ["disabled"], la = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ua = { class: "tpl:flex tpl:items-stretch" }, da = ["value"], fa = { class: "tpl:flex tpl:items-stretch" }, pa = ["value"], ma = ["value"], ha = { value: "" }, ga = ["value"], _a = { class: "tpl:flex tpl:items-stretch" }, va = ["value"], ya = /* @__PURE__ */ r({
2985
+ __name: "TableToolbar",
2986
+ props: {
2987
+ block: {},
2988
+ fontFamilies: {}
2989
+ },
2990
+ emits: ["update"],
2991
+ setup(e, { emit: t }) {
2992
+ let n = e, r = t, { t: o } = U(), s = S(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
2993
+ function l(e, t) {
2994
+ r("update", { [e]: t });
2995
+ }
2996
+ function u() {
2997
+ let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
2998
+ id: A(),
2999
+ cells: Array.from({ length: e }, () => ({
3000
+ id: A(),
3001
+ content: ""
3002
+ }))
3003
+ };
3004
+ r("update", { rows: [...n.block.rows, t] });
3005
+ }
3006
+ function d(e) {
3007
+ r("update", { rows: n.block.rows.filter((t) => t.id !== e) });
3008
+ }
3009
+ function f() {
3010
+ let e = n.block.rows.map((e) => ({
3011
+ ...e,
3012
+ cells: [...e.cells, {
3013
+ id: A(),
3014
+ content: ""
3015
+ }]
3016
+ }));
3017
+ r("update", { rows: e });
3018
+ }
3019
+ function m(e) {
3020
+ let t = n.block.rows.map((t) => ({
3021
+ ...t,
3022
+ cells: t.cells.filter((t, n) => n !== e)
3023
+ }));
3024
+ r("update", { rows: t });
3025
+ }
3026
+ return (t, n) => (i(), p(E, null, [
3027
+ y("div", Qi, [y("label", { class: g(h(q)) }, b(h(o).table.dimensions), 3), y("div", $i, [y("div", ea, [y("span", ta, b(h(o).table.rows), 1), y("div", na, [
3028
+ y("button", {
3029
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
3030
+ disabled: e.block.rows.length <= 1,
3031
+ onClick: n[0] ||= (t) => d(e.block.rows[e.block.rows.length - 1].id)
3032
+ }, [O(h(Ae), {
3033
+ size: 12,
3034
+ "stroke-width": 2
3035
+ })], 8, ra),
3036
+ y("span", ia, b(e.block.rows.length), 1),
3037
+ y("button", {
3038
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)]",
3039
+ onClick: u
3040
+ }, [O(h(H), {
3041
+ size: 12,
3042
+ "stroke-width": 2
3043
+ })])
3044
+ ])]), y("div", aa, [y("span", oa, b(h(o).table.columns), 1), y("div", sa, [
3045
+ y("button", {
3046
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
3047
+ disabled: s.value <= 1,
3048
+ onClick: n[1] ||= (e) => m(s.value - 1)
3049
+ }, [O(h(Ae), {
3050
+ size: 12,
3051
+ "stroke-width": 2
3052
+ })], 8, ca),
3053
+ y("span", la, b(s.value), 1),
3054
+ y("button", {
3055
+ class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)]",
3056
+ onClick: f
3057
+ }, [O(h(H), {
3058
+ size: 12,
3059
+ "stroke-width": 2
3060
+ })])
3061
+ ])])])]),
3062
+ O(J, {
3063
+ class: "tpl:mb-3.5",
3064
+ path: "hasHeaderRow",
3065
+ label: h(o).table.hasHeaderRow
3066
+ }, {
3067
+ "label-actions": a(({ controlId: t }) => [O(X, {
3068
+ "control-id": t,
3069
+ "hide-label": "",
3070
+ class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
3071
+ "model-value": e.block.hasHeaderRow,
3072
+ label: h(o).table.hasHeaderRow,
3073
+ "onUpdate:modelValue": n[2] ||= (e) => l("hasHeaderRow", e)
3074
+ }, null, 8, [
3075
+ "control-id",
3076
+ "model-value",
3077
+ "label"
3078
+ ])]),
3079
+ _: 1
3080
+ }, 8, ["label"]),
3081
+ e.block.hasHeaderRow ? (i(), v(J, {
3082
+ key: 0,
3083
+ label: h(o).table.headerBackgroundColor,
3084
+ class: "tpl:mb-3.5",
3085
+ path: "headerBackgroundColor"
3086
+ }, {
3087
+ default: a(() => [O(Y, {
3088
+ "model-value": e.block.headerBackgroundColor ?? "",
3089
+ "seed-color": h(rt),
3090
+ placeholder: h(o).table.noHeaderBg,
3091
+ "onUpdate:modelValue": n[3] ||= (e) => l("headerBackgroundColor", e || null)
3092
+ }, null, 8, [
3093
+ "model-value",
3094
+ "seed-color",
3095
+ "placeholder"
3096
+ ])]),
3097
+ _: 1
3098
+ }, 8, ["label"])) : _("", !0),
3099
+ O(J, {
3100
+ label: h(o).table.borderColor,
3101
+ class: "tpl:mb-3.5",
3102
+ path: "borderColor"
3103
+ }, {
3104
+ default: a(() => [O(Y, {
3105
+ "model-value": e.block.borderColor,
3106
+ "onUpdate:modelValue": n[4] ||= (e) => l("borderColor", e)
3107
+ }, null, 8, ["model-value"])]),
3108
+ _: 1
3109
+ }, 8, ["label"]),
3110
+ O(J, {
3111
+ label: h(o).table.borderWidth,
3112
+ class: "tpl:mb-3.5",
3113
+ path: "borderWidth"
3114
+ }, {
3115
+ default: a(() => [y("div", ua, [y("input", {
3116
+ type: "number",
3117
+ class: g(h(G)),
3118
+ value: e.block.borderWidth,
3119
+ min: "0",
3120
+ max: "10",
3121
+ onInput: n[5] ||= (e) => l("borderWidth", Number(e.target.value))
3122
+ }, null, 42, da), y("span", { class: g(h(W)) }, "px", 2)])]),
3123
+ _: 1
3124
+ }, 8, ["label"]),
3125
+ O(J, {
3126
+ label: h(o).table.cellPadding,
3127
+ class: "tpl:mb-3.5",
3128
+ path: "cellPadding"
3129
+ }, {
3130
+ default: a(() => [y("div", fa, [y("input", {
3131
+ type: "number",
3132
+ class: g(h(G)),
3133
+ value: e.block.cellPadding,
3134
+ min: "0",
3135
+ max: "30",
3136
+ onInput: n[6] ||= (e) => l("cellPadding", Number(e.target.value))
3137
+ }, null, 42, pa), y("span", { class: g(h(W)) }, "px", 2)])]),
3138
+ _: 1
3139
+ }, 8, ["label"]),
3140
+ O(J, {
3141
+ label: h(o).table.fontFamily,
3142
+ class: "tpl:mb-3.5",
3143
+ path: "fontFamily"
3144
+ }, {
3145
+ default: a(() => [y("select", {
3146
+ class: g(h(K)),
3147
+ value: h(dt)(e.block.fontFamily),
3148
+ onChange: n[7] ||= (e) => l("fontFamily", e.target.value || void 0)
3149
+ }, [y("option", ha, b(h(o).title.inheritFont), 1), (i(!0), p(E, null, c(e.fontFamilies, (e) => (i(), p("option", {
3150
+ key: e.value,
3151
+ value: e.value
3152
+ }, b(e.label), 9, ga))), 128))], 42, ma)]),
3153
+ _: 1
3154
+ }, 8, ["label"]),
3155
+ O(J, {
3156
+ label: h(o).table.fontSize,
3157
+ class: "tpl:mb-3.5",
3158
+ path: "fontSize"
3159
+ }, {
3160
+ default: a(() => [y("div", _a, [y("input", {
3161
+ type: "number",
3162
+ class: g(h(G)),
3163
+ value: e.block.fontSize,
3164
+ min: "10",
3165
+ max: "32",
3166
+ onInput: n[8] ||= (e) => l("fontSize", Number(e.target.value))
3167
+ }, null, 42, va), y("span", { class: g(h(W)) }, "px", 2)])]),
3168
+ _: 1
3169
+ }, 8, ["label"]),
3170
+ O(J, {
3171
+ label: h(o).table.color,
3172
+ class: "tpl:mb-3.5",
3173
+ path: "color"
3174
+ }, {
3175
+ default: a(() => [O(Y, {
3176
+ "model-value": e.block.color ?? "",
3177
+ "onUpdate:modelValue": n[9] ||= (e) => l("color", e || void 0)
3178
+ }, null, 8, ["model-value"])]),
3179
+ _: 1
3180
+ }, 8, ["label"]),
3181
+ O(J, {
3182
+ label: h(o).table.textAlign,
3183
+ class: "tpl:mb-3.5",
3184
+ path: "textAlign"
3185
+ }, {
3186
+ default: a(() => [O(Q, {
3187
+ options: [
3188
+ {
3189
+ value: "left",
3190
+ label: h(o).title.alignLeft,
3191
+ icon: h(Ne)
3192
+ },
3193
+ {
3194
+ value: "center",
3195
+ label: h(o).title.alignCenter,
3196
+ icon: h(De)
3197
+ },
3198
+ {
3199
+ value: "right",
3200
+ label: h(o).title.alignRight,
3201
+ icon: h(Re)
3202
+ }
3203
+ ],
3204
+ "model-value": e.block.textAlign,
3205
+ "onUpdate:modelValue": n[10] ||= (e) => l("textAlign", e)
3206
+ }, null, 8, ["options", "model-value"])]),
3207
+ _: 1
3208
+ }, 8, ["label"])
3209
+ ], 64));
3210
+ }
3211
+ }), ba = ["value"], xa = { value: 1 }, Sa = { value: 2 }, Ca = { value: 3 }, wa = { value: 4 }, Ta = ["value"], Ea = { value: "" }, Da = ["value"], Oa = /* @__PURE__ */ r({
3212
+ __name: "TitleToolbar",
3213
+ props: {
3214
+ block: {},
3215
+ fontFamilies: {}
3216
+ },
3217
+ emits: ["update"],
3218
+ setup(e, { emit: t }) {
3219
+ let n = t, { t: r } = U();
3220
+ function o(e, t) {
3221
+ n("update", { [e]: t });
3222
+ }
3223
+ return (t, n) => (i(), p(E, null, [
3224
+ O(J, {
3225
+ label: h(r).title.level,
3226
+ class: "tpl:mb-3.5",
3227
+ path: "level"
3228
+ }, {
3229
+ default: a(() => [y("select", {
3230
+ class: g(h(K)),
3231
+ value: e.block.level,
3232
+ onChange: n[0] ||= (e) => o("level", Number(e.target.value))
3233
+ }, [
3234
+ y("option", xa, b(h(r).title.heading1), 1),
3235
+ y("option", Sa, b(h(r).title.heading2), 1),
3236
+ y("option", Ca, b(h(r).title.heading3), 1),
3237
+ y("option", wa, b(h(r).title.heading4), 1)
3238
+ ], 42, ba)]),
3239
+ _: 1
3240
+ }, 8, ["label"]),
3241
+ O(J, {
3242
+ label: h(r).title.fontFamily,
3243
+ class: "tpl:mb-3.5",
3244
+ path: "fontFamily"
3245
+ }, {
3246
+ default: a(() => [y("select", {
3247
+ class: g(h(K)),
3248
+ value: h(dt)(e.block.fontFamily),
3249
+ onChange: n[1] ||= (e) => o("fontFamily", e.target.value || void 0)
3250
+ }, [y("option", Ea, b(h(r).title.inheritFont), 1), (i(!0), p(E, null, c(e.fontFamilies, (e) => (i(), p("option", {
3251
+ key: e.value,
3252
+ value: e.value
3253
+ }, b(e.label), 9, Da))), 128))], 42, Ta)]),
3254
+ _: 1
3255
+ }, 8, ["label"]),
3256
+ O(J, {
3257
+ label: h(r).title.color,
3258
+ class: "tpl:mb-3.5",
3259
+ path: "color"
3260
+ }, {
3261
+ default: a(() => [O(Y, {
3262
+ "model-value": e.block.color ?? "",
3263
+ "onUpdate:modelValue": n[2] ||= (e) => o("color", e || void 0)
3264
+ }, null, 8, ["model-value"])]),
3265
+ _: 1
3266
+ }, 8, ["label"]),
3267
+ O(J, {
3268
+ label: h(r).title.align,
3269
+ class: "tpl:mb-3.5",
3270
+ path: "textAlign"
3271
+ }, {
3272
+ default: a(() => [O(Q, {
3273
+ options: [
3274
+ {
3275
+ value: "left",
3276
+ label: h(r).title.alignLeft,
3277
+ icon: h(Ne)
3278
+ },
3279
+ {
3280
+ value: "center",
3281
+ label: h(r).title.alignCenter,
3282
+ icon: h(De)
3283
+ },
3284
+ {
3285
+ value: "right",
3286
+ label: h(r).title.alignRight,
3287
+ icon: h(Re)
3288
+ }
3289
+ ],
3290
+ "model-value": e.block.textAlign,
3291
+ "onUpdate:modelValue": n[3] ||= (e) => o("textAlign", e)
3292
+ }, null, 8, ["options", "model-value"])]),
3293
+ _: 1
3294
+ }, 8, ["label"])
3295
+ ], 64));
3296
+ }
3297
+ }), ka = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Aa = [
3298
+ "value",
3299
+ "placeholder",
3300
+ "title"
3301
+ ], ja = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Ma = ["value"], Na = { value: "full" }, Pa = { value: "custom" }, Fa = {
3302
+ key: 0,
3303
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
3304
+ }, Ia = ["value"], La = ["value"], Ra = { value: "auto" }, za = { value: "custom" }, Ba = {
3305
+ key: 0,
3306
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
3307
+ }, Va = ["value"], Ha = 350, Ua = 200, Wa = /* @__PURE__ */ r({
3308
+ __name: "VideoToolbar",
3309
+ props: { block: {} },
3310
+ emits: ["update"],
3311
+ setup(e, { emit: t }) {
3312
+ let n = e, r = t, { t: o } = U(), s = l(Ue, null), c = l(ze, R.liquid), u = le(), d = [
3313
+ 300,
3314
+ 400,
3315
+ 500
3316
+ ], f = S(() => !!s), x = S(() => te(n.block.url, c)), C = S(() => {
3317
+ let e = n.block.width;
3318
+ return e === "full" ? "full" : d.includes(e) ? String(e) : "custom";
3319
+ }), w = S(() => typeof n.block.height == "number" ? "custom" : "auto"), D = T(!1), { start: k } = at(() => {
3320
+ D.value = !1;
3321
+ }, 1e3, { immediate: !1 });
3322
+ function A(e, t) {
3323
+ r("update", { [e]: t });
3324
+ }
3325
+ function j(e) {
3326
+ if (e === "custom") {
3327
+ let e = n.block.width;
3328
+ (typeof e != "number" || d.includes(e)) && A("width", Ha);
3329
+ } else A("width", e === "full" ? "full" : Number(e));
3330
+ }
3331
+ function M(e) {
3332
+ let t = Number(e);
3333
+ !Number.isFinite(t) || t <= 0 || A("width", t);
3334
+ }
3335
+ function N(e) {
3336
+ A("height", e === "custom" ? Ua : void 0);
3337
+ }
3338
+ function P(e) {
3339
+ let t = Number(e);
3340
+ !Number.isFinite(t) || t <= 0 || A("height", t);
3341
+ }
3342
+ async function F() {
3343
+ let e = await s?.({ accept: ["images"] });
3344
+ u.alive && e && (A("thumbnailUrl", e.url), D.value = !0, k());
3345
+ }
3346
+ return (t, n) => (i(), p(E, null, [
3347
+ O(J, {
3348
+ label: h(o).video.videoUrl,
3349
+ class: "tpl:mb-3.5",
3350
+ path: "url"
3351
+ }, {
3352
+ default: a(() => [O(Z, {
3353
+ "model-value": e.block.url,
3354
+ type: "url",
3355
+ placeholder: h(o).video.videoUrlPlaceholder,
3356
+ "onUpdate:modelValue": n[0] ||= (e) => A("url", e)
3357
+ }, null, 8, ["model-value", "placeholder"]), e.block.url ? (i(), v(J, {
3358
+ key: 0,
3359
+ path: "openInNewTab",
3360
+ label: h(o).video.openInNewTab
3361
+ }, {
3362
+ "label-actions": a(({ controlId: t }) => [O(X, {
3363
+ "control-id": t,
3364
+ "hide-label": "",
3365
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
3366
+ "model-value": e.block.openInNewTab ?? !1,
3367
+ label: h(o).video.openInNewTab,
3368
+ "onUpdate:modelValue": n[1] ||= (e) => A("openInNewTab", e)
3369
+ }, null, 8, [
3370
+ "control-id",
3371
+ "model-value",
3372
+ "label"
3373
+ ])]),
3374
+ _: 1
3375
+ }, 8, ["label"])) : _("", !0)]),
3376
+ _: 1
3377
+ }, 8, ["label"]),
3378
+ x.value ? (i(), v(J, {
3379
+ key: 0,
3380
+ class: "tpl:mb-3.5",
3381
+ path: "placeholderUrl"
3382
+ }, {
3383
+ label: a(() => [m(b(h(o).video.placeholderUrl) + " ", 1), y("span", ka, b(h(o).video.optional), 1)]),
3384
+ default: a(() => [y("input", {
3385
+ type: "url",
3386
+ class: g(h(K)),
3387
+ value: e.block.placeholderUrl || "",
3388
+ placeholder: h(o).video.placeholderUrlPlaceholder,
3389
+ title: h(o).video.placeholderUrlTooltip,
3390
+ onInput: n[2] ||= (e) => A("placeholderUrl", e.target.value)
3391
+ }, null, 42, Aa)]),
3392
+ _: 1
3393
+ })) : _("", !0),
3394
+ O(J, {
3395
+ class: "tpl:mb-3.5",
3396
+ path: "thumbnailUrl"
3397
+ }, {
3398
+ label: a(() => [m(b(h(o).video.customThumbnail) + " ", 1), y("span", ja, b(h(o).video.optional), 1)]),
3399
+ default: a(() => [O(Z, {
3400
+ "model-value": e.block.thumbnailUrl,
3401
+ type: "url",
3402
+ placeholder: h(o).video.thumbnailPlaceholder,
3403
+ pulse: D.value,
3404
+ "onUpdate:modelValue": n[3] ||= (e) => A("thumbnailUrl", e)
3405
+ }, null, 8, [
3406
+ "model-value",
3407
+ "placeholder",
3408
+ "pulse"
3409
+ ]), f.value ? (i(), p("button", {
3410
+ key: 0,
3411
+ class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all",
3412
+ style: {
3413
+ "border-color": "var(--tpl-border)",
3414
+ color: "var(--tpl-primary)",
3415
+ "background-color": "var(--tpl-bg)"
3416
+ },
3417
+ onClick: F
3418
+ }, [O(h(Oe), {
3419
+ size: 14,
3420
+ "stroke-width": 1.5
3421
+ }), m(" " + b(h(o).image.browseMedia), 1)])) : _("", !0)]),
3422
+ _: 1
3423
+ }),
3424
+ O(J, {
3425
+ label: h(o).video.altText,
3426
+ class: "tpl:mb-3.5",
3427
+ path: "alt"
3428
+ }, {
3429
+ default: a(() => [O(Z, {
3430
+ "model-value": e.block.alt,
3431
+ type: "text",
3432
+ placeholder: h(o).video.altTextPlaceholder,
3433
+ "onUpdate:modelValue": n[4] ||= (e) => A("alt", e)
3434
+ }, null, 8, ["model-value", "placeholder"])]),
3435
+ _: 1
3436
+ }, 8, ["label"]),
3437
+ O(J, {
3438
+ label: h(o).video.width,
3439
+ class: "tpl:mb-3.5",
3440
+ path: "width"
3441
+ }, {
3442
+ default: a(() => [y("select", {
3443
+ class: g(h(K)),
3444
+ "data-testid": "video-width-mode",
3445
+ value: C.value,
3446
+ onChange: n[5] ||= (e) => j(e.target.value)
3447
+ }, [
3448
+ y("option", Na, b(h(o).video.fullWidth), 1),
3449
+ n[10] ||= y("option", { value: "300" }, "300px", -1),
3450
+ n[11] ||= y("option", { value: "400" }, "400px", -1),
3451
+ n[12] ||= y("option", { value: "500" }, "500px", -1),
3452
+ y("option", Pa, b(h(o).video.widthCustom), 1)
3453
+ ], 42, Ma), C.value === "custom" ? (i(), p("div", Fa, [y("input", {
3454
+ type: "number",
3455
+ "data-testid": "video-width-input",
3456
+ class: g(h(G)),
3457
+ value: e.block.width,
3458
+ min: "20",
3459
+ onInput: n[6] ||= (e) => M(e.target.value)
3460
+ }, null, 42, Ia), y("span", { class: g(h(W)) }, "px", 2)])) : _("", !0)]),
3461
+ _: 1
3462
+ }, 8, ["label"]),
3463
+ O(J, {
3464
+ label: h(o).video.height,
3465
+ class: "tpl:mb-3.5",
3466
+ path: "height"
3467
+ }, {
3468
+ default: a(() => [y("select", {
3469
+ class: g(h(K)),
3470
+ "data-testid": "video-height-mode",
3471
+ value: w.value,
3472
+ onChange: n[7] ||= (e) => N(e.target.value)
3473
+ }, [y("option", Ra, b(h(o).video.heightAuto), 1), y("option", za, b(h(o).video.heightCustom), 1)], 42, La), w.value === "custom" ? (i(), p("div", Ba, [y("input", {
3474
+ type: "number",
3475
+ "data-testid": "video-height-input",
3476
+ class: g(h(G)),
3477
+ value: e.block.height,
3478
+ min: "20",
3479
+ onInput: n[8] ||= (e) => P(e.target.value)
3480
+ }, null, 42, Va), y("span", { class: g(h(W)) }, "px", 2)])) : _("", !0)]),
3481
+ _: 1
3482
+ }, 8, ["label"]),
3483
+ O(J, {
3484
+ label: h(o).title.align,
3485
+ class: "tpl:mb-3.5",
3486
+ path: "align"
3487
+ }, {
3488
+ default: a(() => [O(Q, {
3489
+ options: [
3490
+ {
3491
+ value: "left",
3492
+ label: h(o).title.alignLeft
3493
+ },
3494
+ {
3495
+ value: "center",
3496
+ label: h(o).title.alignCenter
3497
+ },
3498
+ {
3499
+ value: "right",
3500
+ label: h(o).title.alignRight
3501
+ }
3502
+ ],
3503
+ "model-value": e.block.align,
3504
+ "onUpdate:modelValue": n[9] ||= (e) => A("align", e)
3505
+ }, null, 8, ["options", "model-value"])]),
3506
+ _: 1
3507
+ }, 8, ["label"])
3508
+ ], 64));
3509
+ }
3510
+ }), Ga = ["aria-label"], Ka = ["disabled", "inert"], qa = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Ja = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Ya = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Xa = { class: "tpl:flex tpl:gap-1" }, Za = ["title"], Qa = ["title"], $a = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, eo = /*@__PURE__*/ r({
3511
+ __name: "Toolbar",
3512
+ props: { block: {} },
3513
+ emits: [
3514
+ "update",
3515
+ "delete",
3516
+ "duplicate"
3517
+ ],
3518
+ setup(e, { emit: t }) {
3519
+ let r = f(() => import("./CountdownToolbar-CNgsNL5-.js")), a = e, o = t, { t: s } = U(), c = ot(), u = Je(Ke, "Toolbar"), d = l(qe, []), m = S(() => a.block.type), g = S(() => P(a.block)), x = S(() => {
3520
+ if (g.value) return d.find((e) => e.type === a.block.customType);
3521
+ }), C = S(() => g.value ? x.value?.name ?? a.block.customType : ce(m.value, s)), w = S(() => ut(u.fonts.value, "fontFamily" in a.block ? a.block.fontFamily : void 0));
3522
+ function T(e) {
3523
+ c.value && o("update", e);
3524
+ }
3525
+ return (t, a) => (i(), p("aside", {
3526
+ "data-testid": "block-toolbar",
3527
+ "aria-label": h(s).landmarks.blockToolbar,
3528
+ class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
3529
+ }, [y("fieldset", {
3530
+ disabled: !h(c),
3531
+ inert: !h(c),
3532
+ class: "tpl:contents"
3533
+ }, [y("div", qa, [y("div", Ja, [h(ct)[m.value] ? (i(), v(n(h(ct)[m.value]), {
3534
+ key: 0,
3535
+ size: 16,
3536
+ "stroke-width": 1.5
3537
+ })) : g.value ? (i(), v(h(we), {
3538
+ key: 1,
3539
+ size: 16,
3540
+ "stroke-width": 1.5
3541
+ })) : _("", !0), y("h3", Ya, b(C.value), 1)]), y("div", Xa, [y("button", {
3542
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)] tpl:hover:text-[var(--tpl-text)]",
3543
+ title: h(s).toolbar.duplicate,
3544
+ onClick: a[0] ||= (e) => o("duplicate")
3545
+ }, [O(h(xe), {
3546
+ size: 14,
3547
+ "stroke-width": 2
3548
+ })], 8, Za), y("button", {
3549
+ class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
3550
+ title: h(s).toolbar.delete,
3551
+ onClick: a[1] ||= (e) => o("delete")
3552
+ }, [O(h(je), {
3553
+ size: 14,
3554
+ "stroke-width": 2
3555
+ })], 8, Qa)])]), y("div", $a, [g.value ? (i(), v(Nr, {
3556
+ key: 0,
3557
+ block: e.block,
3558
+ onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
3559
+ onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
3560
+ }, null, 8, ["block"])) : m.value === "section" ? (i(), v(Di, {
3561
+ key: 1,
3562
+ block: e.block,
3563
+ onUpdate: T
3564
+ }, null, 8, ["block"])) : m.value === "title" ? (i(), v(Oa, {
3565
+ key: 2,
3566
+ block: e.block,
3567
+ "font-families": w.value,
3568
+ onUpdate: T
3569
+ }, null, 8, ["block", "font-families"])) : m.value === "paragraph" ? (i(), v(yi, {
3570
+ key: 3,
3571
+ block: e.block,
3572
+ onUpdate: T
3573
+ }, null, 8, ["block"])) : m.value === "image" ? (i(), v(ai, {
3574
+ key: 4,
3575
+ block: e.block,
3576
+ onUpdate: T
3577
+ }, null, 8, ["block"])) : m.value === "video" ? (i(), v(Wa, {
3578
+ key: 5,
3579
+ block: e.block,
3580
+ onUpdate: T
3581
+ }, null, 8, ["block"])) : m.value === "button" ? (i(), v(Rt, {
3582
+ key: 6,
3583
+ block: e.block,
3584
+ "font-families": w.value,
3585
+ onUpdate: T
3586
+ }, null, 8, ["block", "font-families"])) : m.value === "divider" ? (i(), v(Ir, {
3587
+ key: 7,
3588
+ block: e.block,
3589
+ onUpdate: T
3590
+ }, null, 8, ["block"])) : m.value === "social" ? (i(), v(qi, {
3591
+ key: 8,
3592
+ block: e.block,
3593
+ onUpdate: T
3594
+ }, null, 8, ["block"])) : m.value === "menu" ? (i(), v(gi, {
3595
+ key: 9,
3596
+ block: e.block,
3597
+ "font-families": w.value,
3598
+ onUpdate: T
3599
+ }, null, 8, ["block", "font-families"])) : m.value === "table" ? (i(), v(ya, {
3600
+ key: 10,
3601
+ block: e.block,
3602
+ "font-families": w.value,
3603
+ onUpdate: T
3604
+ }, null, 8, ["block", "font-families"])) : m.value === "spacer" ? (i(), v(Zi, {
3605
+ key: 11,
3606
+ block: e.block,
3607
+ onUpdate: T
3608
+ }, null, 8, ["block"])) : m.value === "html" ? (i(), v(zr, {
3609
+ key: 12,
3610
+ block: e.block,
3611
+ onUpdate: T
3612
+ }, null, 8, ["block"])) : m.value === "countdown" ? (i(), v(h(r), {
3613
+ key: 13,
3614
+ block: e.block,
3615
+ "font-families": w.value,
3616
+ onUpdate: T
3617
+ }, null, 8, ["block", "font-families"])) : _("", !0), O(qn, {
3618
+ block: e.block,
3619
+ "is-first-section": m.value === "paragraph",
3620
+ onUpdate: T
3621
+ }, null, 8, ["block", "is-first-section"])])], 8, Ka)], 8, Ga));
3622
+ }
3623
+ }), to = /* @__PURE__ */ e({ default: () => no }), no = /*#__PURE__*/ V(eo, [["__scopeId", "data-v-206f038f"]]);
3624
+ export { no as default, gt as n, Q as r, to as t };
3625
+
3626
+ //# sourceMappingURL=Toolbar-BlWVQRcA.js.map