@templatical/editor 0.46.0 → 0.48.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 (317) hide show
  1. package/dist/{AiChatSidebar-DGcH4Lyo.js → AiChatSidebar-DxPHFNoT.js} +14 -14
  2. package/dist/{AiFeatureMenu-B4q-0g1S.js → AiFeatureMenu-C8GVqu1d.js} +7 -7
  3. package/dist/{BlockIssueBadge-CZA1XvAh.js → BlockIssueBadge-BShkuJis.js} +5 -5
  4. package/dist/BlockPreviewCanvas-tzAtDkXH.js +141 -0
  5. package/dist/{CloudHeaderExtras-ehMYJP68.js → CloudHeaderExtras-CUSftQdm.js} +5 -5
  6. package/dist/{CloudPanels-BwOaAlKz.js → CloudPanels-Dgw7tb4R.js} +9 -9
  7. package/dist/{CollaboratorBar-qOZFRNPx.js → CollaboratorBar-5rfopCPx.js} +4 -4
  8. package/dist/{CommentsPanel-Bn6P5crU.js → CommentsPanel-DiWzYtnZ.js} +2 -2
  9. package/dist/{CommentsSidebar-B8wT932T.js → CommentsSidebar-BOqj16Al.js} +14 -14
  10. package/dist/CountdownBlock-zx39Dyby.js +92 -0
  11. package/dist/{CountdownToolbar-BeF21SeB.js → CountdownToolbar-C4y3Ft7H.js} +7 -7
  12. package/dist/{DesignReferenceSidebar-zH93uB15.js → DesignReferenceSidebar-BWAi3eQQ.js} +13 -13
  13. package/dist/{IssuesPanel-Dltw9haP.js → IssuesPanel-C-x3I012.js} +8 -8
  14. package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
  15. package/dist/{LogicTagInsertButton-CHa-UD76.js → LogicTagInsertButton-B1_Wy0AN.js} +13 -13
  16. package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-ByOvznRC.js} +4 -4
  17. package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-9mDBv4aL.js} +2 -2
  18. package/dist/{MergeTagInput-B3ntd4dN.js → MergeTagInput-fOewuF27.js} +3 -3
  19. package/dist/{MergeTagModeToggle-C_06ZL0Q.js → MergeTagModeToggle-BXamLcv7.js} +7 -7
  20. package/dist/{ParagraphEditor-CxuW3TV0.js → ParagraphEditor-BVjOwwHx.js} +100 -85
  21. package/dist/{RestoreVersionDialog-B1n37M1Z.js → RestoreVersionDialog-BEKXx9xk.js} +6 -6
  22. package/dist/{RichTextEditorContent-CP_uULWB.js → RichTextEditorContent-D7kp7iig.js} +12 -12
  23. package/dist/{SaveBlockDialog-BSKX_7_v.js → SaveBlockDialog-SJu0lecx.js} +34 -35
  24. package/dist/{SavedBlocksBrowserModal-CHKrH1gO.js → SavedBlocksBrowserModal-DbmIS5uK.js} +14 -14
  25. package/dist/{SavedBlocksPanels-B-xDqBcz.js → SavedBlocksPanels-Dr5Fxx9Z.js} +2 -2
  26. package/dist/{SavedBlocksPickBar-D2J-g82g.js → SavedBlocksPickBar-DnEWBZJy.js} +5 -5
  27. package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-ynbGl-sr.js} +16 -16
  28. package/dist/{TemplateSettings-D07K_Y4m.js → TemplateSettings-Bi01S3H3.js} +12 -12
  29. package/dist/{TestEmailModal-BNPw_lID.js → TestEmailModal-CbRY8HQx.js} +14 -14
  30. package/dist/{TestEmailPanel-8klWo8hE.js → TestEmailPanel-NAOmt3xi.js} +2 -2
  31. package/dist/{TitleEditor-CmC9OuhA.js → TitleEditor-Cc3DHbuN.js} +15 -15
  32. package/dist/{ToggleSwitch-COeyWGfT.js → ToggleSwitch-Ozc7YU38.js} +2 -2
  33. package/dist/Toolbar-B-2lO0I8.js +3156 -0
  34. package/dist/{TplModal-BGFawHY9.js → TplModal-Bz4-IZ9R.js} +6 -6
  35. package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-CjV1d1zk.js} +10 -10
  36. package/dist/{VersionHistoryPanels-DdbGjEOR.js → VersionHistoryPanels-BtwxrKJn.js} +2 -2
  37. package/dist/{VersionPreviewBanner-BUKb9gc6.js → VersionPreviewBanner-BLAei1kj.js} +4 -4
  38. package/dist/WrapperBlock-D0qgNqjD.js +45 -0
  39. package/dist/{blockTypeIcons-CVKo6V_v.js → blockTypeIcons-CEDZytqP.js} +50 -20
  40. package/dist/bundle-stats.json +8 -8
  41. package/dist/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +38 -1
  42. package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js → AiChatSidebar-Dk0rJBQN.js} +8 -8
  43. package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js.map → AiChatSidebar-Dk0rJBQN.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js → AiFeatureMenu-B7b0w8ZS.js} +6 -6
  45. package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js.map → AiFeatureMenu-B7b0w8ZS.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js → BlockIssueBadge-C7sdnkrF.js} +5 -5
  47. package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js.map → BlockIssueBadge-C7sdnkrF.js.map} +1 -1
  48. package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js +143 -0
  49. package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js.map +1 -0
  50. package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js → CloudHeaderExtras-B4fhuwc_.js} +5 -5
  51. package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js.map → CloudHeaderExtras-B4fhuwc_.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js → CloudPanels-awqHfJqC.js} +8 -8
  53. package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js.map → CloudPanels-awqHfJqC.js.map} +1 -1
  54. package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js → CollaboratorBar-CS0ivqkr.js} +5 -5
  55. package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js.map → CollaboratorBar-CS0ivqkr.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js → CommentsPanel-CbzxwsyI.js} +3 -3
  57. package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js.map → CommentsPanel-CbzxwsyI.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js → CommentsSidebar-DWPHZuQm.js} +8 -8
  59. package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js.map → CommentsSidebar-DWPHZuQm.js.map} +1 -1
  60. package/dist/cdn/chunks/CountdownBlock-Dasj191h.js +94 -0
  61. package/dist/cdn/chunks/CountdownBlock-Dasj191h.js.map +1 -0
  62. package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js → CountdownToolbar-Cqg8FUH-.js} +8 -8
  63. package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js.map → CountdownToolbar-Cqg8FUH-.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js → DesignReferenceSidebar-BW9cHnA9.js} +12 -12
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js.map → DesignReferenceSidebar-BW9cHnA9.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js → IssuesPanel-cXf9ywA4.js} +8 -8
  67. package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js.map → IssuesPanel-cXf9ywA4.js.map} +1 -1
  68. package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js → LoadingTrack-DbH97JR9.js} +2 -2
  69. package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js.map → LoadingTrack-DbH97JR9.js.map} +1 -1
  70. package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js → LogicTagInsertButton-BMB9vShs.js} +89 -89
  71. package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js.map → LogicTagInsertButton-BMB9vShs.js.map} +1 -1
  72. package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js → MediaEditModal-zXfcArr4.js} +4 -4
  73. package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js.map → MediaEditModal-zXfcArr4.js.map} +1 -1
  74. package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js → MediaPanels-Cp4XB_dH.js} +3 -3
  75. package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js.map → MediaPanels-Cp4XB_dH.js.map} +1 -1
  76. package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js → MergeTagInput-DLqrA9co.js} +4 -4
  77. package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js.map → MergeTagInput-DLqrA9co.js.map} +1 -1
  78. package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js → MergeTagModeToggle-BRiJzzn5.js} +6 -6
  79. package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js.map → MergeTagModeToggle-BRiJzzn5.js.map} +1 -1
  80. package/dist/cdn/chunks/{ParagraphEditor-DndEFXmR.js → ParagraphEditor-D4aq9eeC.js} +116 -101
  81. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +1 -0
  82. package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js → RestoreVersionDialog-BgR6RXSb.js} +6 -6
  83. package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js.map → RestoreVersionDialog-BgR6RXSb.js.map} +1 -1
  84. package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js → RichTextEditorContent-C4DMAn0g.js} +11 -11
  85. package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js.map → RichTextEditorContent-C4DMAn0g.js.map} +1 -1
  86. package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js → SaveBlockDialog-BaIsQd09.js} +41 -42
  87. package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js.map → SaveBlockDialog-BaIsQd09.js.map} +1 -1
  88. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js → SavedBlocksBrowserModal-CtnB58p_.js} +10 -10
  89. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js.map → SavedBlocksBrowserModal-CtnB58p_.js.map} +1 -1
  90. package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js → SavedBlocksPanels-BhEOMzEQ.js} +3 -3
  91. package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js.map → SavedBlocksPanels-BhEOMzEQ.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js → SavedBlocksPickBar-CcdqTEIp.js} +6 -6
  93. package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js.map → SavedBlocksPickBar-CcdqTEIp.js.map} +1 -1
  94. package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js → TemplateScoringPanel-BrWqJCSP.js} +9 -9
  95. package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js.map → TemplateScoringPanel-BrWqJCSP.js.map} +1 -1
  96. package/dist/cdn/chunks/{TemplateSettings-rZiHmq24.js → TemplateSettings-BkkWTDHD.js} +14 -14
  97. package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js.map +1 -0
  98. package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js → TestEmailModal-V5mwHsUV.js} +13 -13
  99. package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js.map → TestEmailModal-V5mwHsUV.js.map} +1 -1
  100. package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js → TestEmailPanel-DxrKuctP.js} +3 -3
  101. package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js.map → TestEmailPanel-DxrKuctP.js.map} +1 -1
  102. package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js → TitleEditor-CsZiG3TT.js} +19 -19
  103. package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js.map → TitleEditor-CsZiG3TT.js.map} +1 -1
  104. package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js → ToggleSwitch-BB-bQADJ.js} +3 -3
  105. package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js.map → ToggleSwitch-BB-bQADJ.js.map} +1 -1
  106. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js +3073 -0
  107. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +1 -0
  108. package/dist/cdn/chunks/{TplModal-CYBbPCHL.js → TplModal-DC_eodTV.js} +6 -6
  109. package/dist/cdn/chunks/TplModal-DC_eodTV.js.map +1 -0
  110. package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js → VersionHistoryMenu-DXnM5Df2.js} +11 -11
  111. package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js.map → VersionHistoryMenu-DXnM5Df2.js.map} +1 -1
  112. package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js → VersionHistoryPanels-DXSqmaLS.js} +3 -3
  113. package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js.map → VersionHistoryPanels-DXSqmaLS.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js → VersionPreviewBanner-DKyN6BhO.js} +5 -5
  115. package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js.map → VersionPreviewBanner-DKyN6BhO.js.map} +1 -1
  116. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +47 -0
  117. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js.map +1 -0
  118. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +22 -0
  119. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js.map +1 -0
  120. package/dist/cdn/chunks/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +39 -2
  121. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +1 -0
  122. package/dist/cdn/chunks/{cloud-h1vaHp2p.js → cloud-BHClP3e2.js} +3 -3
  123. package/dist/cdn/chunks/{cloud-h1vaHp2p.js.map → cloud-BHClP3e2.js.map} +1 -1
  124. package/dist/cdn/chunks/{createCloudRuntime-bJN9EM1H.js → createCloudRuntime-Vd0N4elZ.js} +18 -9
  125. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +1 -0
  126. package/dist/cdn/chunks/{de-CGjbQ2mt.js → de-DMquBpZM.js} +39 -2
  127. package/dist/cdn/chunks/de-DMquBpZM.js.map +1 -0
  128. package/dist/cdn/chunks/{dist-B7W-Lb65.js → dist-CjL6JHML.js} +3 -3
  129. package/dist/cdn/chunks/{dist-B7W-Lb65.js.map → dist-CjL6JHML.js.map} +1 -1
  130. package/dist/cdn/chunks/{dist-C5nRd_ua.js → dist-MNQYSEWU.js} +4 -4
  131. package/dist/cdn/chunks/{dist-C5nRd_ua.js.map → dist-MNQYSEWU.js.map} +1 -1
  132. package/dist/cdn/chunks/{draggable-BUTN5vZC.js → draggable-DrsNwZuB.js} +1673 -1595
  133. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +1 -0
  134. package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js → editor-modal-vEEmZ8Tu.js} +93 -93
  135. package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js.map → editor-modal-vEEmZ8Tu.js.map} +1 -1
  136. package/dist/cdn/chunks/{en-BTiiAC-B.js → en-C8Mp71sO.js} +39 -2
  137. package/dist/cdn/chunks/en-C8Mp71sO.js.map +1 -0
  138. package/dist/cdn/chunks/en-eWpiXyZu.js +1 -0
  139. package/dist/cdn/chunks/{es-CdTOcSTf.js → es-Byq4tthI.js} +39 -2
  140. package/dist/cdn/chunks/es-Byq4tthI.js.map +1 -0
  141. package/dist/cdn/chunks/{extensions-CrmXF4MW.js → extensions-hJ9VqzDc.js} +7 -7
  142. package/dist/cdn/chunks/{extensions-CrmXF4MW.js.map → extensions-hJ9VqzDc.js.map} +1 -1
  143. package/dist/cdn/chunks/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +39 -2
  144. package/dist/cdn/chunks/fr-B3j35HEw.js.map +1 -0
  145. package/dist/cdn/chunks/{icons-Dr9erFGs.js → icons-aTYwH5-g.js} +107 -78
  146. package/dist/cdn/chunks/icons-aTYwH5-g.js.map +1 -0
  147. package/dist/{ja-BhdkqENz.js → cdn/chunks/ja-D7txAuGS.js} +40 -1
  148. package/dist/cdn/chunks/ja-D7txAuGS.js.map +1 -0
  149. package/dist/cdn/chunks/{keys-BKu-LOk5.js → keys-HI-INbkz.js} +2 -2
  150. package/dist/cdn/chunks/{keys-BKu-LOk5.js.map → keys-HI-INbkz.js.map} +1 -1
  151. package/dist/{nl-CE3YItYg.js → cdn/chunks/nl-ClJ3BY3F.js} +40 -1
  152. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +1 -0
  153. package/dist/cdn/chunks/{preRenderCustomBlocks-CyGB3lZr.js → preRenderCustomBlocks-ByfuSjtL.js} +4 -2
  154. package/dist/cdn/chunks/preRenderCustomBlocks-ByfuSjtL.js.map +1 -0
  155. package/dist/{pt-BR-CUIT4rq4.js → cdn/chunks/pt-BR-DibcXcmv.js} +40 -1
  156. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +1 -0
  157. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +1279 -0
  158. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +1 -0
  159. package/dist/{dist-BI_LeQGl.js → cdn/chunks/src-DYCDeBDM.js} +437 -256
  160. package/dist/cdn/chunks/src-DYCDeBDM.js.map +1 -0
  161. package/dist/cdn/chunks/{src-B0pZeTYO.js → src-DlFlC9Tt.js} +334 -268
  162. package/dist/cdn/chunks/src-DlFlC9Tt.js.map +1 -0
  163. package/dist/cdn/chunks/src-dZ4D_tuP.js +649 -0
  164. package/dist/cdn/chunks/src-dZ4D_tuP.js.map +1 -0
  165. package/dist/{styleConstants-C_YAPdQS.js → cdn/chunks/styleConstants-D1Jz-TFU.js} +9 -28
  166. package/dist/cdn/chunks/{styleConstants-C_YAPdQS.js.map → styleConstants-D1Jz-TFU.js.map} +1 -1
  167. package/dist/cdn/chunks/timeouts-Cv2jvusx.js +6 -0
  168. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +1 -0
  169. package/dist/cdn/chunks/{tiptap-CYDXLO17.js → tiptap-BPigZk5G.js} +3258 -3098
  170. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +1 -0
  171. package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js → useAliveFlag-DCB96vzR.js} +2 -2
  172. package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js.map → useAliveFlag-DCB96vzR.js.map} +1 -1
  173. package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js → useCloudI18n-BBF4waXO.js} +3 -3
  174. package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js.map → useCloudI18n-BBF4waXO.js.map} +1 -1
  175. package/dist/cdn/chunks/{useEditorCore-DuC7kVti.js → useEditorCore-Bb2UcB20.js} +780 -764
  176. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +1 -0
  177. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +10 -0
  178. package/dist/cdn/chunks/{useEditorRoot-DDPIcEOO.js.map → useEditorRoot-CTc6O8al.js.map} +1 -1
  179. package/dist/cdn/chunks/{useI18n-DO4NTunW.js → useI18n-DUlyyIJJ.js} +3 -3
  180. package/dist/cdn/chunks/{useI18n-DO4NTunW.js.map → useI18n-DUlyyIJJ.js.map} +1 -1
  181. package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js → useLogicTag-HsyUCQtl.js} +4 -4
  182. package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js.map → useLogicTag-HsyUCQtl.js.map} +1 -1
  183. package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js → useMergeTag-Dg9pE85U.js} +4 -4
  184. package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js.map → useMergeTag-Dg9pE85U.js.map} +1 -1
  185. package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js → usePopoverPosition-IbaW6-Ao.js} +3 -3
  186. package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js.map → usePopoverPosition-IbaW6-Ao.js.map} +1 -1
  187. package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js → useScrollToBlock-uUa601I4.js} +3 -3
  188. package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js.map → useScrollToBlock-uUa601I4.js.map} +1 -1
  189. package/dist/cdn/chunks/withCurrentFont-oLcATrQ8.js +21 -0
  190. package/dist/cdn/chunks/{withCurrentFont-isIyuezD.js.map → withCurrentFont-oLcATrQ8.js.map} +1 -1
  191. package/dist/cdn/editor.css +1 -1
  192. package/dist/cdn/editor.js +641 -631
  193. package/dist/cdn/editor.js.map +1 -1
  194. package/dist/{check-ZKvtMdpe.js → check-ClwqRMgv.js} +1 -1
  195. package/dist/{chevron-down-RrwkYMlp.js → chevron-down-te6qn-zE.js} +1 -1
  196. package/dist/{chevron-right-CklHaa1U.js → chevron-right-W2hbH1FM.js} +1 -1
  197. package/dist/{chevron-up-DjN2NTbo.js → chevron-up-Bf5Zo7o4.js} +1 -1
  198. package/dist/{circle-alert-BR1_Yfb-.js → circle-alert-CIEGV5DN.js} +1 -1
  199. package/dist/{clock-BEagNj21.js → clock-Y4cx0gkJ.js} +1 -1
  200. package/dist/{cloud-DPGjMGfv.js → cloud-B5xwm_4X.js} +2 -2
  201. package/dist/{copy-D6DNoSq1.js → copy-BEcsAlfB.js} +1 -1
  202. package/dist/{createCloudRuntime-D0RRgWab.js → createCloudRuntime-zNPkF6T9.js} +17 -8
  203. package/dist/{createLucideIcon-BAPyioGd.js → createLucideIcon-CYHXK9hn.js} +6 -6
  204. package/dist/{de-CGjbQ2mt.js → de-DMquBpZM.js} +38 -1
  205. package/dist/{dist-Bd7khQsg.js → dist-3HpYixwF.js} +2 -2
  206. package/dist/{dist-lL3nVbxV.js → dist-BC-ZEYLd.js} +2 -2
  207. package/dist/dist-BPFcLKTw.js +5 -0
  208. package/dist/{dist-C-VFTX82.js → dist-CUWI-IvA.js} +2 -2
  209. package/dist/{dist-Bc30883t.js → dist-Cr7RPxI9.js} +5 -5
  210. package/dist/{dist-DapsJxn_.js → dist-CuLwJF7H.js} +2 -2
  211. package/dist/{dist-5KNKxglR.js → dist-CyBwSiAa.js} +2 -2
  212. package/dist/dist-D7Yj7E-F.js +5 -0
  213. package/dist/{dist-B_vYjCsk.js → dist-DAAJogrx.js} +3 -3
  214. package/dist/{dist-CMcFD7gP.js → dist-DBxgrOeo.js} +1906 -1746
  215. package/dist/{dist-DHensKDY.js → dist-DPcf6XZ8.js} +2 -2
  216. package/dist/{dist-5DAb7bYT.js → dist-DVNjPKsH.js} +2 -2
  217. package/dist/{dist-C3eH9-N2.js → dist-DXyGqIDE.js} +2 -2
  218. package/dist/{dist-1H4cnaoD.js → dist-DuufrR8O.js} +4 -4
  219. package/dist/{cdn/chunks/src-Bh0MoJ67.js → dist-tsmnQugO.js} +207 -174
  220. package/dist/{editor-modal-oRmkDlUs.js → editor-modal-AlVLkU91.js} +20 -20
  221. package/dist/en-B0FUfNwz.js +1 -0
  222. package/dist/{en-BTiiAC-B.js → en-C8Mp71sO.js} +38 -1
  223. package/dist/{es-CdTOcSTf.js → es-Byq4tthI.js} +38 -1
  224. package/dist/{extensions-CYigjb1g.js → extensions-pjO8VGkM.js} +9 -9
  225. package/dist/{eye-DvsTBI57.js → eye-Ddnz8nnm.js} +1 -1
  226. package/dist/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +38 -1
  227. package/dist/{image-up-BoFGZm5Q.js → image-up-CM_HC0Dx.js} +1 -1
  228. package/dist/index.d.ts +124 -11
  229. package/dist/{info-0bQQGjTV.js → info-DXLmzoeY.js} +1 -1
  230. package/dist/{cdn/chunks/ja-BhdkqENz.js → ja-D7txAuGS.js} +38 -3
  231. package/dist/{keys-injl74ob.js → keys-BKFq19a2.js} +1 -1
  232. package/dist/{link-Cstrr3Ep.js → link-Cel46wgo.js} +1 -1
  233. package/dist/{list-Dx9Rmy5s.js → list-Cl0GwiV9.js} +1 -1
  234. package/dist/{loader-circle-D8Qqs0MG.js → loader-circle-uAwpvfys.js} +1 -1
  235. package/dist/{message-circle-D78ELX6I.js → message-circle-DWU1pTM_.js} +1 -1
  236. package/dist/{cdn/chunks/nl-CE3YItYg.js → nl-ClJ3BY3F.js} +38 -3
  237. package/dist/{package-DOvM9sHE.js → package-CbyG_yU_.js} +1 -1
  238. package/dist/{pencil-B6m0OG0n.js → pencil-BzoDcwKu.js} +1 -1
  239. package/dist/{plus-D-nEKxTc.js → plus-8cDvoCjZ.js} +1 -1
  240. package/dist/{preRenderCustomBlocks-DokBGA_M.js → preRenderCustomBlocks-DMP5RuHl.js} +6 -4
  241. package/dist/{cdn/chunks/pt-BR-CUIT4rq4.js → pt-BR-DibcXcmv.js} +38 -3
  242. package/dist/{refresh-cw-CXZS-R1U.js → refresh-cw-9WinWixo.js} +1 -1
  243. package/dist/{runtime-dom.esm-bundler-CO67ema2.js → runtime-dom.esm-bundler-lFF-QG3j.js} +3 -3
  244. package/dist/{search-DSvil0jo.js → search-CqgGq1gG.js} +1 -1
  245. package/dist/{send-BBR28V94.js → send-Ceo3c9Db.js} +1 -1
  246. package/dist/{shield-check-ByxUnaU9.js → shield-check-uDAwur5D.js} +1 -1
  247. package/dist/{smartphone-CNOwGf5T.js → smartphone-CcLaCpGK.js} +1 -1
  248. package/dist/socialIcons-PTiwhLoC.js +1359 -0
  249. package/dist/{sparkles-DO1hzwzf.js → sparkles-Do9XjAuT.js} +1 -1
  250. package/dist/style.css +1 -1
  251. package/dist/{cdn/chunks/styleConstants-C_YAPdQS.js → styleConstants-D1Jz-TFU.js} +7 -30
  252. package/dist/templatical-editor.js +519 -509
  253. package/dist/{text-align-start-BKEKMheq.js → text-align-start-DvzC0HQA.js} +1 -1
  254. package/dist/timeouts-Cv2jvusx.js +4 -0
  255. package/dist/{trash-CKEQH4vH.js → trash-vlINTx32.js} +1 -1
  256. package/dist/{triangle-alert-BHnfd3fV.js → triangle-alert-MRYSJ9T2.js} +1 -1
  257. package/dist/{upload-C8uO7KsR.js → upload-CtNOI6J2.js} +1 -1
  258. package/dist/{useAliveFlag-6PtarpNZ.js → useAliveFlag-Dd06mRxe.js} +1 -1
  259. package/dist/{useCloudI18n-GvIOLziA.js → useCloudI18n-Nwqo7pI_.js} +2 -2
  260. package/dist/{useEditorCore-BJAQMvNW.js → useEditorCore-PvErWWsp.js} +1002 -991
  261. package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
  262. package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
  263. package/dist/{useLogicTag-B5gjcMzn.js → useLogicTag-BHn67tDd.js} +3 -3
  264. package/dist/{useMergeTag-BwsBIDzR.js → useMergeTag-CRkm5Ig6.js} +5 -5
  265. package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
  266. package/dist/{useScrollToBlock-JRxhT1u_.js → useScrollToBlock-CXmcHQQN.js} +3 -3
  267. package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
  268. package/dist/{withCurrentFont-C9vqrduu.js → withCurrentFont-CxRGeHO3.js} +1 -1
  269. package/dist/{x-gEC0yMci.js → x-Cd6SFw8r.js} +1 -1
  270. package/package.json +23 -23
  271. package/dist/BlockPreviewCanvas-DIZ0KgUD.js +0 -133
  272. package/dist/CountdownBlock-RNx3hIu0.js +0 -91
  273. package/dist/Toolbar-CqhRb6EM.js +0 -2732
  274. package/dist/WrapperBlock-CTkmA887.js +0 -34
  275. package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js +0 -135
  276. package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js.map +0 -1
  277. package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js +0 -93
  278. package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js.map +0 -1
  279. package/dist/cdn/chunks/ParagraphEditor-DndEFXmR.js.map +0 -1
  280. package/dist/cdn/chunks/TemplateSettings-rZiHmq24.js.map +0 -1
  281. package/dist/cdn/chunks/Toolbar-C_5HfUQq.js +0 -2646
  282. package/dist/cdn/chunks/Toolbar-C_5HfUQq.js.map +0 -1
  283. package/dist/cdn/chunks/TplModal-CYBbPCHL.js.map +0 -1
  284. package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js +0 -36
  285. package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js.map +0 -1
  286. package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js +0 -21
  287. package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js.map +0 -1
  288. package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
  289. package/dist/cdn/chunks/createCloudRuntime-bJN9EM1H.js.map +0 -1
  290. package/dist/cdn/chunks/de-CGjbQ2mt.js.map +0 -1
  291. package/dist/cdn/chunks/draggable-BUTN5vZC.js.map +0 -1
  292. package/dist/cdn/chunks/en-BTiiAC-B.js.map +0 -1
  293. package/dist/cdn/chunks/en-CAt6y87e.js +0 -1
  294. package/dist/cdn/chunks/es-CdTOcSTf.js.map +0 -1
  295. package/dist/cdn/chunks/fr-B6lcLLzC.js.map +0 -1
  296. package/dist/cdn/chunks/icons-Dr9erFGs.js.map +0 -1
  297. package/dist/cdn/chunks/ja-BhdkqENz.js.map +0 -1
  298. package/dist/cdn/chunks/nl-CE3YItYg.js.map +0 -1
  299. package/dist/cdn/chunks/preRenderCustomBlocks-CyGB3lZr.js.map +0 -1
  300. package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
  301. package/dist/cdn/chunks/socialIcons-ClJVDZwt.js +0 -1031
  302. package/dist/cdn/chunks/socialIcons-ClJVDZwt.js.map +0 -1
  303. package/dist/cdn/chunks/src-B0pZeTYO.js.map +0 -1
  304. package/dist/cdn/chunks/src-BMw3u-iV.js +0 -614
  305. package/dist/cdn/chunks/src-BMw3u-iV.js.map +0 -1
  306. package/dist/cdn/chunks/src-Bh0MoJ67.js.map +0 -1
  307. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +0 -6
  308. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
  309. package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
  310. package/dist/cdn/chunks/useEditorCore-DuC7kVti.js.map +0 -1
  311. package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
  312. package/dist/cdn/chunks/withCurrentFont-isIyuezD.js +0 -21
  313. package/dist/dist-CFC4pg2o.js +0 -5
  314. package/dist/dist-j2FavQmU.js +0 -5
  315. package/dist/en-Bk4iCfjp.js +0 -1
  316. package/dist/socialIcons-Ct_IoqPQ.js +0 -1107
  317. package/dist/timeouts-DHPZQ0G3.js +0 -4
@@ -0,0 +1,3073 @@
1
+ import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
2
+ import { B as t, E as n, F as r, H as i, I as a, N as o, Q as s, R as c, S as l, U as u, X as d, Y as f, at as p, b as m, ct as h, f as g, g as _, h as v, lt as y, m as b, o as x, p as S, s as C, u as w, ut as T, x as E, y as D } from "./draggable-DrsNwZuB.js";
3
+ import { Ct as O, Ft as k, It as A, J as j, O as ee, Ot as M, St as N, Tt as te, i as P, jt as ne, kt as F, nt as re, r as ie, wt as ae, xt as I } from "./src-DYCDeBDM.js";
4
+ import { C as oe, c as se, d as ce, f as le, g as ue, h as de, i as fe, j as pe, l as me, m as he, o as ge, p as L, r as _e, u as ve, v as R } from "./socialIcons-C_lnkpG6.js";
5
+ import { _ as ye } from "./dist-CjL6JHML.js";
6
+ import { $ as be, C as xe, G as z, L as Se, P as Ce, d as we, g as Te, h as Ee, n as De, p as Oe, v as ke, x as Ae } from "./keys-HI-INbkz.js";
7
+ import "./timeouts-Cv2jvusx.js";
8
+ import { t as B } from "./useI18n-DUlyyIJJ.js";
9
+ import { o as je } from "./usePopoverPosition-IbaW6-Ao.js";
10
+ import { At as Me, B as Ne, O as Pe, Ot as Fe, Pt as Ie, Rt as Le, W as V, _ as Re, c as ze, ct as Be, et as Ve, f as He, h as Ue, it as We, mt as Ge, n as Ke, pt as qe, rt as Je, tt as Ye, v as Xe } from "./icons-aTYwH5-g.js";
11
+ import { t as Ze } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
+ import { t as Qe } from "./useAliveFlag-DCB96vzR.js";
13
+ import { _ as $e, b as et, c as tt, g as H, h as U, m as W, p as G, r as nt, v as rt } from "./styleConstants-D1Jz-TFU.js";
14
+ import { t as it } from "./blockTypeIcons-HrMJDfVg.js";
15
+ import { c as K } from "./LogicTagInsertButton-BMB9vShs.js";
16
+ import { n as at, t as q } from "./ToggleSwitch-BB-bQADJ.js";
17
+ import { n as ot, t as st } from "./withCurrentFont-oLcATrQ8.js";
18
+ import { t as J } from "./MergeTagInput-DLqrA9co.js";
19
+ //#region src/components/SlidingPillSelect.vue?vue&type=script&setup=true&lang.ts
20
+ var ct = [
21
+ "aria-checked",
22
+ "aria-label",
23
+ "disabled",
24
+ "aria-disabled",
25
+ "title",
26
+ "onClick"
27
+ ], lt = { key: 1 }, Y = /* @__PURE__ */ l({
28
+ __name: "SlidingPillSelect",
29
+ props: {
30
+ options: {},
31
+ modelValue: {}
32
+ },
33
+ emits: ["update:modelValue"],
34
+ setup(e, { emit: t }) {
35
+ let n = e, i = t, a = g(() => n.options.findIndex((e) => e.value === n.modelValue)), s = g(() => `translateX(${Math.max(a.value, 0) * 100}%)`);
36
+ return (t, n) => (o(), _("div", {
37
+ role: "radiogroup",
38
+ class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
39
+ style: y({
40
+ gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
41
+ backgroundColor: "var(--tpl-bg-hover)"
42
+ })
43
+ }, [a.value >= 0 ? (o(), _("div", {
44
+ key: 0,
45
+ class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
46
+ style: y({
47
+ left: "4px",
48
+ width: `calc((100% - 8px) / ${e.options.length})`,
49
+ transform: s.value,
50
+ backgroundColor: "var(--tpl-bg)",
51
+ boxShadow: "var(--tpl-shadow)",
52
+ transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
53
+ })
54
+ }, null, 4)) : v("", !0), (o(!0), _(w, null, r(e.options, (t) => (o(), _("button", {
55
+ key: t.value,
56
+ role: "radio",
57
+ "aria-checked": e.modelValue === t.value,
58
+ "aria-label": t.label,
59
+ disabled: t.disabled,
60
+ "aria-disabled": t.disabled ? "true" : void 0,
61
+ 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",
62
+ style: y({
63
+ color: t.disabled ? "var(--tpl-text-dim)" : e.modelValue === t.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
64
+ transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
65
+ }),
66
+ title: t.label,
67
+ onClick: (e) => t.disabled || i("update:modelValue", t.value)
68
+ }, [t.icon ? (o(), b(c(t.icon), {
69
+ key: 0,
70
+ size: 14,
71
+ "stroke-width": 2
72
+ })) : (o(), _("span", lt, T(t.label), 1))], 12, ct))), 128))], 4));
73
+ }
74
+ }), ut = { class: "tpl:flex tpl:items-stretch" }, dt = [
75
+ "data-testid",
76
+ "value",
77
+ "min",
78
+ "max"
79
+ ], X = /* @__PURE__ */ l({
80
+ __name: "NumberWithSuffix",
81
+ props: {
82
+ modelValue: {},
83
+ min: {},
84
+ max: {},
85
+ suffix: {},
86
+ testid: {}
87
+ },
88
+ emits: ["update:modelValue"],
89
+ setup(e, { emit: t }) {
90
+ let n = t;
91
+ function r(e) {
92
+ let t = e.target;
93
+ t.validity?.badInput || n("update:modelValue", Number(t.value));
94
+ }
95
+ return (t, n) => (o(), _("div", ut, [S("input", {
96
+ type: "number",
97
+ "data-testid": e.testid,
98
+ class: h(p(W)),
99
+ value: e.modelValue,
100
+ min: e.min,
101
+ max: e.max,
102
+ onInput: r
103
+ }, null, 42, dt), S("span", { class: h(p(U)) }, T(e.suffix), 3)]));
104
+ }
105
+ }), ft = [
106
+ "aria-pressed",
107
+ "aria-label",
108
+ "title",
109
+ "data-testid"
110
+ ], pt = /* @__PURE__ */ l({
111
+ __name: "LinkToggle",
112
+ props: {
113
+ linked: { type: Boolean },
114
+ linkLabel: {},
115
+ unlinkLabel: {},
116
+ testid: {}
117
+ },
118
+ emits: ["toggle"],
119
+ setup(e, { emit: t }) {
120
+ let n = t;
121
+ return (t, r) => (o(), _("button", {
122
+ type: "button",
123
+ class: h(["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)]"]),
124
+ "aria-pressed": e.linked ? "true" : "false",
125
+ "aria-label": e.linked ? e.unlinkLabel : e.linkLabel,
126
+ title: e.linked ? e.unlinkLabel : e.linkLabel,
127
+ "data-testid": e.testid,
128
+ onClick: r[0] ||= (e) => n("toggle")
129
+ }, [e.linked ? (o(), b(p(Be), {
130
+ key: 0,
131
+ size: 14,
132
+ "stroke-width": 2
133
+ })) : (o(), b(p(ze), {
134
+ key: 1,
135
+ size: 14,
136
+ "stroke-width": 2
137
+ }))], 10, ft));
138
+ }
139
+ }), mt = { class: "tpl:mb-3.5" }, ht = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, gt = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, _t = {
140
+ key: 0,
141
+ class: "tpl:mb-3.5"
142
+ }, vt = { class: "tpl:mb-3.5" }, yt = { class: "tpl:mb-3.5" }, bt = /* @__PURE__ */ l({
143
+ __name: "BorderControl",
144
+ props: {
145
+ modelValue: {},
146
+ testidPrefix: {}
147
+ },
148
+ emits: ["update:modelValue"],
149
+ setup(e, { emit: n }) {
150
+ let r = e, i = n, { t: a } = B(), c = {
151
+ width: 0,
152
+ style: "solid",
153
+ color: "#000000"
154
+ };
155
+ function l(e, t) {
156
+ return e.width === t.width && e.style === t.style && e.color === t.color;
157
+ }
158
+ let u = g(() => {
159
+ let e = r.modelValue;
160
+ return !e || F.every((t) => l(e[t], e.top));
161
+ }), d = s(u.value);
162
+ t(u, (e) => {
163
+ !e && d.value && (d.value = !1);
164
+ });
165
+ let f = s("top"), y = g(() => r.modelValue?.[d.value ? "top" : f.value] ?? c), b = (e) => !!e && e.width > 0;
166
+ function x(e) {
167
+ if (d.value) {
168
+ i("update:modelValue", b(e) ? A(e) : void 0);
169
+ return;
170
+ }
171
+ let t = {
172
+ ...r.modelValue ?? A(c),
173
+ [f.value]: e
174
+ }, n = F.some((e) => b(t[e]));
175
+ i("update:modelValue", n ? t : void 0);
176
+ }
177
+ function C(e) {
178
+ x({
179
+ ...y.value,
180
+ width: e > 0 ? e : 0
181
+ });
182
+ }
183
+ function E(e) {
184
+ x({
185
+ ...y.value,
186
+ ...e
187
+ });
188
+ }
189
+ function D() {
190
+ if (d.value) {
191
+ d.value = !1;
192
+ return;
193
+ }
194
+ d.value = !0;
195
+ let e = r.modelValue;
196
+ if (!e) return;
197
+ let t = b(e[f.value]) ? e[f.value] : F.map((t) => e[t]).find(b);
198
+ i("update:modelValue", t ? A(t) : void 0);
199
+ }
200
+ let O = g(() => F.map((e) => ({
201
+ value: e,
202
+ label: a.spacingControl[e]
203
+ })));
204
+ return (t, n) => (o(), _("div", mt, [
205
+ S("div", ht, [S("span", gt, T(p(a).blockSettings.border), 1), m(pt, {
206
+ linked: d.value,
207
+ "link-label": p(a).blockSettings.linkSides,
208
+ "unlink-label": p(a).blockSettings.unlinkSides,
209
+ testid: `${e.testidPrefix}-border-link`,
210
+ onToggle: D
211
+ }, null, 8, [
212
+ "linked",
213
+ "link-label",
214
+ "unlink-label",
215
+ "testid"
216
+ ])]),
217
+ d.value ? v("", !0) : (o(), _("div", _t, [S("label", { class: h(p(H)) }, T(p(a).blockSettings.borderSide), 3), m(Y, {
218
+ options: O.value,
219
+ "model-value": f.value,
220
+ "onUpdate:modelValue": n[0] ||= (e) => f.value = e
221
+ }, null, 8, ["options", "model-value"])])),
222
+ S("div", vt, [S("label", { class: h(p(H)) }, T(p(a).blockSettings.borderWidth), 3), m(X, {
223
+ "model-value": y.value.width,
224
+ min: 0,
225
+ suffix: "px",
226
+ testid: `${e.testidPrefix}-border-width-input`,
227
+ "onUpdate:modelValue": C
228
+ }, null, 8, ["model-value", "testid"])]),
229
+ y.value.width > 0 ? (o(), _(w, { key: 1 }, [S("div", yt, [S("label", { class: h(p(H)) }, T(p(a).blockSettings.borderStyle), 3), m(Y, {
230
+ options: [
231
+ {
232
+ value: "solid",
233
+ label: p(a).divider.solid
234
+ },
235
+ {
236
+ value: "dashed",
237
+ label: p(a).divider.dashed
238
+ },
239
+ {
240
+ value: "dotted",
241
+ label: p(a).divider.dotted
242
+ }
243
+ ],
244
+ "model-value": y.value.style,
245
+ "onUpdate:modelValue": n[1] ||= (e) => E({ style: e })
246
+ }, null, 8, ["options", "model-value"])]), S("div", null, [S("label", { class: h(p(H)) }, T(p(a).blockSettings.borderColor), 3), m(K, {
247
+ "model-value": y.value.color,
248
+ "onUpdate:modelValue": n[2] ||= (e) => E({ color: e })
249
+ }, null, 8, ["model-value"])])], 64)) : v("", !0)
250
+ ]));
251
+ }
252
+ }), xt = { class: "tpl:mb-3.5" }, St = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, Ct = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, wt = {
253
+ key: 1,
254
+ class: "tpl:grid tpl:grid-cols-2 tpl:gap-2"
255
+ }, Tt = { class: "tpl:mb-1 tpl:block tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Et = /* @__PURE__ */ l({
256
+ __name: "RadiusControl",
257
+ props: {
258
+ modelValue: {},
259
+ label: {},
260
+ testidPrefix: {},
261
+ max: {}
262
+ },
263
+ emits: ["update:modelValue"],
264
+ setup(e, { emit: n }) {
265
+ let i = e, a = n, { t: c } = B(), l = {
266
+ topLeft: "cornerTopLeft",
267
+ topRight: "cornerTopRight",
268
+ bottomRight: "cornerBottomRight",
269
+ bottomLeft: "cornerBottomLeft"
270
+ }, u = [
271
+ "topLeft",
272
+ "topRight",
273
+ "bottomLeft",
274
+ "bottomRight"
275
+ ], d = g(() => {
276
+ let e = i.modelValue ?? 0;
277
+ return typeof e == "number" ? {
278
+ topLeft: e,
279
+ topRight: e,
280
+ bottomRight: e,
281
+ bottomLeft: e
282
+ } : e;
283
+ }), f = g(() => M.every((e) => d.value[e] === d.value.topLeft)), h = s(f.value);
284
+ t(f, (e) => {
285
+ !e && h.value && (h.value = !1);
286
+ });
287
+ function v(e) {
288
+ return Number.isFinite(e) && e >= 0;
289
+ }
290
+ function y(e) {
291
+ v(e) && a("update:modelValue", e);
292
+ }
293
+ function x(e, t) {
294
+ v(t) && a("update:modelValue", {
295
+ ...d.value,
296
+ [e]: t
297
+ });
298
+ }
299
+ function C() {
300
+ h.value = !h.value, h.value && a("update:modelValue", d.value.topLeft);
301
+ }
302
+ return (t, n) => (o(), _("div", xt, [S("div", St, [S("span", Ct, T(e.label), 1), m(pt, {
303
+ linked: h.value,
304
+ "link-label": p(c).blockSettings.linkCorners,
305
+ "unlink-label": p(c).blockSettings.unlinkCorners,
306
+ testid: `${e.testidPrefix}-border-radius-link`,
307
+ onToggle: C
308
+ }, null, 8, [
309
+ "linked",
310
+ "link-label",
311
+ "unlink-label",
312
+ "testid"
313
+ ])]), h.value ? (o(), b(X, {
314
+ key: 0,
315
+ "model-value": d.value.topLeft,
316
+ min: 0,
317
+ max: e.max,
318
+ suffix: "px",
319
+ testid: `${e.testidPrefix}-border-radius-input`,
320
+ "onUpdate:modelValue": y
321
+ }, null, 8, [
322
+ "model-value",
323
+ "max",
324
+ "testid"
325
+ ])) : (o(), _("div", wt, [(o(), _(w, null, r(u, (t) => S("div", { key: t }, [S("label", Tt, T(p(c).blockSettings[l[t]]), 1), m(X, {
326
+ "model-value": d.value[t],
327
+ min: 0,
328
+ max: e.max,
329
+ suffix: "px",
330
+ testid: `${e.testidPrefix}-border-radius-${t}-input`,
331
+ "onUpdate:modelValue": (e) => x(t, e)
332
+ }, null, 8, [
333
+ "model-value",
334
+ "max",
335
+ "testid",
336
+ "onUpdate:modelValue"
337
+ ])])), 64))]))]));
338
+ }
339
+ }), Dt = { class: "tpl:mb-3.5" }, Ot = ["value"], kt = { value: "" }, At = ["value"], jt = { class: "tpl:mb-3.5" }, Mt = { class: "tpl:mb-3.5" }, Nt = { class: "tpl:mb-3.5" }, Pt = { class: "tpl:mb-3.5" }, Ft = { class: "tpl:mb-3.5" }, It = { class: "tpl:flex tpl:items-stretch" }, Lt = ["value"], Rt = { class: "tpl:mb-3.5" }, zt = ["value"], Bt = { value: "auto" }, Vt = { value: "full" }, Ht = { value: "custom" }, Ut = {
340
+ key: 0,
341
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
342
+ }, Wt = ["value"], Gt = { class: "tpl:mb-3.5" }, Kt = 200, qt = /* @__PURE__ */ l({
343
+ __name: "ButtonToolbar",
344
+ props: {
345
+ block: {},
346
+ fontFamilies: {}
347
+ },
348
+ emits: ["update"],
349
+ setup(e, { emit: t }) {
350
+ let n = e, i = t, { t: a } = B(), s = g(() => n.block.width === "full" ? "full" : typeof n.block.width == "number" ? "custom" : "auto");
351
+ function c(e, t) {
352
+ i("update", { [e]: t });
353
+ }
354
+ function l(e) {
355
+ e === "full" ? c("width", "full") : e === "custom" ? c("width", typeof n.block.width == "number" ? n.block.width : Kt) : c("width", void 0);
356
+ }
357
+ function u(e) {
358
+ let t = Number(e);
359
+ !Number.isFinite(t) || t <= 0 || c("width", t);
360
+ }
361
+ return (t, n) => (o(), _(w, null, [
362
+ S("div", Dt, [S("label", { class: h(p(H)) }, T(p(a).button.fontFamily), 3), S("select", {
363
+ class: h(p(G)),
364
+ value: p(st)(e.block.fontFamily),
365
+ onChange: n[0] ||= (e) => c("fontFamily", e.target.value || void 0)
366
+ }, [S("option", kt, T(p(a).button.inheritFont), 1), (o(!0), _(w, null, r(e.fontFamilies, (e) => (o(), _("option", {
367
+ key: e.value,
368
+ value: e.value
369
+ }, T(e.label), 9, At))), 128))], 42, Ot)]),
370
+ S("div", jt, [S("label", { class: h(p(H)) }, T(p(a).button.text), 3), m(J, {
371
+ "model-value": e.block.text,
372
+ type: "text",
373
+ "onUpdate:modelValue": n[1] ||= (e) => c("text", e)
374
+ }, null, 8, ["model-value"])]),
375
+ S("div", Mt, [
376
+ S("label", { class: h(p(H)) }, T(p(a).button.url), 3),
377
+ m(J, {
378
+ "model-value": e.block.url,
379
+ type: "url",
380
+ placeholder: p(a).button.urlPlaceholder,
381
+ "onUpdate:modelValue": n[2] ||= (e) => c("url", e)
382
+ }, null, 8, ["model-value", "placeholder"]),
383
+ e.block.url ? (o(), b(q, {
384
+ key: 0,
385
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
386
+ "model-value": e.block.openInNewTab ?? !1,
387
+ label: p(a).button.openInNewTab,
388
+ "onUpdate:modelValue": n[3] ||= (e) => c("openInNewTab", e)
389
+ }, null, 8, ["model-value", "label"])) : v("", !0)
390
+ ]),
391
+ S("div", Nt, [S("label", { class: h(p(H)) }, T(p(a).button.background), 3), m(K, {
392
+ "model-value": e.block.backgroundColor,
393
+ "allow-transparent": "",
394
+ "onUpdate:modelValue": n[4] ||= (e) => c("backgroundColor", e)
395
+ }, null, 8, ["model-value"])]),
396
+ S("div", Pt, [S("label", { class: h(p(H)) }, T(p(a).button.textColor), 3), m(K, {
397
+ "model-value": e.block.textColor,
398
+ "onUpdate:modelValue": n[5] ||= (e) => c("textColor", e)
399
+ }, null, 8, ["model-value"])]),
400
+ m(bt, {
401
+ "model-value": e.block.border,
402
+ "testid-prefix": "button",
403
+ "onUpdate:modelValue": n[6] ||= (e) => c("border", e)
404
+ }, null, 8, ["model-value"]),
405
+ m(Et, {
406
+ "model-value": e.block.borderRadius,
407
+ label: p(a).button.borderRadius,
408
+ max: 50,
409
+ "testid-prefix": "button",
410
+ "onUpdate:modelValue": n[7] ||= (e) => c("borderRadius", e)
411
+ }, null, 8, ["model-value", "label"]),
412
+ S("div", Ft, [S("label", { class: h(p(H)) }, T(p(a).button.fontSize), 3), S("div", It, [S("input", {
413
+ type: "number",
414
+ class: h(p(W)),
415
+ value: e.block.fontSize,
416
+ min: "10",
417
+ max: "36",
418
+ onInput: n[8] ||= (e) => c("fontSize", Number(e.target.value))
419
+ }, null, 42, Lt), S("span", { class: h(p(U)) }, "px", 2)])]),
420
+ S("div", Rt, [
421
+ S("label", { class: h(p(H)) }, T(p(a).button.width), 3),
422
+ S("select", {
423
+ class: h(p(G)),
424
+ value: s.value,
425
+ onChange: n[9] ||= (e) => l(e.target.value)
426
+ }, [
427
+ S("option", Bt, T(p(a).button.widthAuto), 1),
428
+ S("option", Vt, T(p(a).button.fullWidth), 1),
429
+ S("option", Ht, T(p(a).button.widthCustom), 1)
430
+ ], 42, zt),
431
+ s.value === "custom" ? (o(), _("div", Ut, [S("input", {
432
+ type: "number",
433
+ class: h(p(W)),
434
+ value: typeof e.block.width == "number" ? e.block.width : Kt,
435
+ min: "20",
436
+ onInput: n[10] ||= (e) => u(e.target.value)
437
+ }, null, 42, Wt), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
438
+ ]),
439
+ S("div", Gt, [S("label", { class: h(p(H)) }, T(p(a).title.align), 3), m(Y, {
440
+ options: [
441
+ {
442
+ value: "left",
443
+ label: p(a).title.alignLeft
444
+ },
445
+ {
446
+ value: "center",
447
+ label: p(a).title.alignCenter
448
+ },
449
+ {
450
+ value: "right",
451
+ label: p(a).title.alignRight
452
+ }
453
+ ],
454
+ "model-value": e.block.align ?? "center",
455
+ "onUpdate:modelValue": n[11] ||= (e) => c("align", e)
456
+ }, null, 8, ["options", "model-value"])])
457
+ ], 64));
458
+ }
459
+ }), Jt = { class: "spacing-control" }, Yt = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Xt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Zt = { class: "tpl:flex tpl:items-center" }, Qt = ["aria-label"], $t = ["value", "aria-label"], en = ["aria-label"], tn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, nn = { class: "tpl:flex tpl:items-center" }, rn = ["aria-label"], an = ["value", "aria-label"], on = ["aria-label"], sn = ["aria-label", "title"], cn = { class: "tpl:flex tpl:items-center" }, ln = ["aria-label"], un = ["value", "aria-label"], dn = ["aria-label"], fn = { class: "tpl:flex tpl:items-center" }, pn = ["aria-label"], mn = ["value", "aria-label"], hn = ["aria-label"], Z = "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)]", gn = "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)]", _n = /*#__PURE__*/ Ze(/* @__PURE__ */ l({
460
+ __name: "SpacingControl",
461
+ props: {
462
+ modelValue: {},
463
+ label: {}
464
+ },
465
+ emits: ["update:modelValue"],
466
+ setup(e, { emit: n }) {
467
+ let r = e, i = n, { t: a } = B(), c = g(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), l = s(c.value);
468
+ t(c, (e) => {
469
+ !e && l.value && (l.value = !1);
470
+ });
471
+ function u(e, t) {
472
+ let n = Math.max(0, r.modelValue[e] + t);
473
+ l.value ? i("update:modelValue", {
474
+ top: n,
475
+ right: n,
476
+ bottom: n,
477
+ left: n
478
+ }) : i("update:modelValue", {
479
+ ...r.modelValue,
480
+ [e]: n
481
+ });
482
+ }
483
+ function d(e, t) {
484
+ let n = Math.max(0, t);
485
+ l.value ? i("update:modelValue", {
486
+ top: n,
487
+ right: n,
488
+ bottom: n,
489
+ left: n
490
+ }) : i("update:modelValue", {
491
+ ...r.modelValue,
492
+ [e]: n
493
+ });
494
+ }
495
+ function f() {
496
+ if (l.value = !l.value, l.value) {
497
+ let e = r.modelValue.top;
498
+ i("update:modelValue", {
499
+ top: e,
500
+ right: e,
501
+ bottom: e,
502
+ left: e
503
+ });
504
+ }
505
+ }
506
+ return (t, n) => (o(), _("div", Jt, [S("label", Yt, T(e.label), 1), S("div", Xt, [
507
+ S("div", Zt, [
508
+ S("button", {
509
+ "aria-label": p(a).spacingControl.decreaseTop,
510
+ class: h([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
511
+ onClick: n[0] ||= (e) => u("top", -1)
512
+ }, [m(p(Ye), {
513
+ size: 12,
514
+ "stroke-width": 2
515
+ })], 10, Qt),
516
+ S("input", {
517
+ type: "number",
518
+ class: h(gn),
519
+ value: e.modelValue.top,
520
+ "aria-label": p(a).spacingControl.top,
521
+ min: "0",
522
+ onInput: n[1] ||= (e) => d("top", Number(e.target.value))
523
+ }, null, 40, $t),
524
+ S("button", {
525
+ "aria-label": p(a).spacingControl.increaseTop,
526
+ class: h([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
527
+ onClick: n[2] ||= (e) => u("top", 1)
528
+ }, [m(p(V), {
529
+ size: 12,
530
+ "stroke-width": 2
531
+ })], 10, en)
532
+ ]),
533
+ S("div", tn, [
534
+ S("div", nn, [
535
+ S("button", {
536
+ "aria-label": p(a).spacingControl.decreaseLeft,
537
+ class: h([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
538
+ onClick: n[3] ||= (e) => u("left", -1)
539
+ }, [m(p(Ye), {
540
+ size: 12,
541
+ "stroke-width": 2
542
+ })], 10, rn),
543
+ S("input", {
544
+ type: "number",
545
+ class: h(gn),
546
+ value: e.modelValue.left,
547
+ "aria-label": p(a).spacingControl.left,
548
+ min: "0",
549
+ onInput: n[4] ||= (e) => d("left", Number(e.target.value))
550
+ }, null, 40, an),
551
+ S("button", {
552
+ "aria-label": p(a).spacingControl.increaseLeft,
553
+ class: h([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
554
+ onClick: n[5] ||= (e) => u("left", 1)
555
+ }, [m(p(V), {
556
+ size: 12,
557
+ "stroke-width": 2
558
+ })], 10, on)
559
+ ]),
560
+ S("button", {
561
+ class: h(["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)]"]),
562
+ "aria-label": l.value ? p(a).spacingControl.unlock : p(a).spacingControl.lockAll,
563
+ title: l.value ? p(a).spacingControl.unlock : p(a).spacingControl.lockAll,
564
+ onClick: f
565
+ }, [l.value ? (o(), b(p(Je), {
566
+ key: 0,
567
+ size: 14,
568
+ "stroke-width": 2
569
+ })) : (o(), b(p(We), {
570
+ key: 1,
571
+ size: 14,
572
+ "stroke-width": 2
573
+ }))], 10, sn),
574
+ S("div", cn, [
575
+ S("button", {
576
+ "aria-label": p(a).spacingControl.decreaseRight,
577
+ class: h([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
578
+ onClick: n[6] ||= (e) => u("right", -1)
579
+ }, [m(p(Ye), {
580
+ size: 12,
581
+ "stroke-width": 2
582
+ })], 10, ln),
583
+ S("input", {
584
+ type: "number",
585
+ class: h(gn),
586
+ value: e.modelValue.right,
587
+ "aria-label": p(a).spacingControl.right,
588
+ min: "0",
589
+ onInput: n[7] ||= (e) => d("right", Number(e.target.value))
590
+ }, null, 40, un),
591
+ S("button", {
592
+ "aria-label": p(a).spacingControl.increaseRight,
593
+ class: h([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
594
+ onClick: n[8] ||= (e) => u("right", 1)
595
+ }, [m(p(V), {
596
+ size: 12,
597
+ "stroke-width": 2
598
+ })], 10, dn)
599
+ ])
600
+ ]),
601
+ S("div", fn, [
602
+ S("button", {
603
+ "aria-label": p(a).spacingControl.decreaseBottom,
604
+ class: h([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
605
+ onClick: n[9] ||= (e) => u("bottom", -1)
606
+ }, [m(p(Ye), {
607
+ size: 12,
608
+ "stroke-width": 2
609
+ })], 10, pn),
610
+ S("input", {
611
+ type: "number",
612
+ class: h(gn),
613
+ value: e.modelValue.bottom,
614
+ "aria-label": p(a).spacingControl.bottom,
615
+ min: "0",
616
+ onInput: n[10] ||= (e) => d("bottom", Number(e.target.value))
617
+ }, null, 40, mn),
618
+ S("button", {
619
+ "aria-label": p(a).spacingControl.increaseBottom,
620
+ class: h([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
621
+ onClick: n[11] ||= (e) => u("bottom", 1)
622
+ }, [m(p(V), {
623
+ size: 12,
624
+ "stroke-width": 2
625
+ })], 10, hn)
626
+ ])
627
+ ])]));
628
+ }
629
+ }), [["__scopeId", "data-v-69591c1e"]]);
630
+ //#endregion
631
+ //#region src/composables/useNaturalImageSize.ts
632
+ function vn(e) {
633
+ let n = s(null), r = () => {};
634
+ return t(e, (e) => {
635
+ r(), n.value = null, e && (r = ce(e, (e) => {
636
+ n.value = e;
637
+ }));
638
+ }, { immediate: !0 }), n;
639
+ }
640
+ function yn() {
641
+ let e = n(Ae, null);
642
+ return async (t) => le(e ? await bn(e, t) : t);
643
+ }
644
+ function bn(e, n) {
645
+ let r = (e) => typeof e == "string" && e.length > 0 ? e : n;
646
+ e.lookup(n);
647
+ let i = e.get(n);
648
+ return i === void 0 ? new Promise((i) => {
649
+ let a = t(() => e.get(n), (e) => {
650
+ e !== void 0 && (a(), i(r(e)));
651
+ });
652
+ }) : Promise.resolve(r(i));
653
+ }
654
+ //#endregion
655
+ //#region src/components/toolbar/BackgroundImageControl.vue?vue&type=script&setup=true&lang.ts
656
+ var xn = { class: "tpl:space-y-3.5" }, Sn = ["data-testid"], Cn = ["data-testid"], wn = ["data-testid"], Tn = ["aria-label", "data-testid"], En = [
657
+ "aria-label",
658
+ "title",
659
+ "aria-pressed",
660
+ "data-testid",
661
+ "onClick"
662
+ ], Dn = ["data-testid"], On = /* @__PURE__ */ l({
663
+ __name: "BackgroundImageControl",
664
+ props: {
665
+ modelValue: {},
666
+ testidPrefix: {},
667
+ measure: { type: Boolean },
668
+ heroMode: { type: Boolean }
669
+ },
670
+ emits: ["update:modelValue"],
671
+ setup(e, { emit: t }) {
672
+ let i = e, a = t, { t: c } = B(), l = n(Ce, ie.liquid), u = g(() => typeof i.modelValue?.url == "string" ? i.modelValue.url : ""), d = g(() => u.value.trim() !== ""), y = yn(), x;
673
+ f(() => clearTimeout(x));
674
+ function C(e) {
675
+ i.measure && !P(e, l) && (x = setTimeout(async () => {
676
+ let t = await y(e), n = i.modelValue;
677
+ t && n?.url === e && a("update:modelValue", {
678
+ ...n,
679
+ ...L(t)
680
+ });
681
+ }, 300));
682
+ }
683
+ function E(e, t = null) {
684
+ if (clearTimeout(x), e.trim() === "") {
685
+ a("update:modelValue", void 0);
686
+ return;
687
+ }
688
+ let { naturalWidth: n, naturalHeight: r, ...o } = i.modelValue ?? te(e), s = i.measure ? t : null;
689
+ a("update:modelValue", {
690
+ ...o,
691
+ url: e,
692
+ ...s ? L(s) : {}
693
+ }), s || C(e);
694
+ }
695
+ function k(e) {
696
+ i.modelValue && a("update:modelValue", {
697
+ ...i.modelValue,
698
+ ...e
699
+ });
700
+ }
701
+ let A = g(() => [
702
+ {
703
+ value: "cover",
704
+ label: c.blockSettings.backgroundSizeCover
705
+ },
706
+ {
707
+ value: "contain",
708
+ label: c.blockSettings.backgroundSizeContain
709
+ },
710
+ {
711
+ value: "auto",
712
+ label: c.blockSettings.backgroundSizeAuto
713
+ }
714
+ ]), j = g(() => ({
715
+ "top-left": c.blockSettings.backgroundPositionTopLeft,
716
+ "top-center": c.blockSettings.backgroundPositionTopCenter,
717
+ "top-right": c.blockSettings.backgroundPositionTopRight,
718
+ "center-left": c.blockSettings.backgroundPositionCenterLeft,
719
+ "center-center": c.blockSettings.backgroundPositionCenter,
720
+ "center-right": c.blockSettings.backgroundPositionCenterRight,
721
+ "bottom-left": c.blockSettings.backgroundPositionBottomLeft,
722
+ "bottom-center": c.blockSettings.backgroundPositionBottomCenter,
723
+ "bottom-right": c.blockSettings.backgroundPositionBottomRight
724
+ })), ee = g(() => ae.flatMap((e) => O.map((t) => ({
725
+ x: t,
726
+ y: e,
727
+ label: j.value[`${e}-${t}`]
728
+ }))));
729
+ function M(e) {
730
+ return i.modelValue?.position?.x === e.x && i.modelValue?.position?.y === e.y;
731
+ }
732
+ let N = s(), { canBrowse: ne, isUploading: F, showOverlay: re, openMediaBrowser: I } = me({
733
+ target: N,
734
+ blocked: () => P(u.value, l),
735
+ apply: (e) => E(e.url, de(e.width, e.height))
736
+ });
737
+ return (t, n) => (o(), _("div", xn, [S("div", null, [S("label", { class: h(p(H)) }, T(p(c).blockSettings.backgroundImage), 3), S("div", {
738
+ ref_key: "dropZoneRef",
739
+ ref: N,
740
+ class: "tpl:relative",
741
+ "data-testid": `${e.testidPrefix}-bg-url`
742
+ }, [
743
+ p(re) ? (o(), b(ve, {
744
+ key: 0,
745
+ uploading: p(F)
746
+ }, null, 8, ["uploading"])) : v("", !0),
747
+ m(J, {
748
+ "model-value": u.value,
749
+ type: "url",
750
+ placeholder: p(c).blockSettings.backgroundImagePlaceholder,
751
+ "onUpdate:modelValue": E
752
+ }, null, 8, ["model-value", "placeholder"]),
753
+ p(ne) ? (o(), _("button", {
754
+ key: 1,
755
+ type: "button",
756
+ "data-testid": `${e.testidPrefix}-bg-browse`,
757
+ 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",
758
+ style: {
759
+ "border-color": "var(--tpl-border)",
760
+ color: "var(--tpl-primary)",
761
+ "background-color": "var(--tpl-bg)"
762
+ },
763
+ onClick: n[0] ||= (...e) => p(I) && p(I)(...e)
764
+ }, [m(p(Ge), {
765
+ size: 14,
766
+ "stroke-width": 1.5
767
+ }), D(" " + T(p(c).image.browseMedia), 1)], 8, Cn)) : v("", !0)
768
+ ], 8, Sn)]), d.value && e.modelValue ? (o(), _(w, { key: 0 }, [
769
+ e.heroMode ? v("", !0) : (o(), _("div", {
770
+ key: 0,
771
+ "data-testid": `${e.testidPrefix}-bg-size`
772
+ }, [S("label", { class: h(p(H)) }, T(p(c).blockSettings.backgroundSize), 3), m(Y, {
773
+ options: A.value,
774
+ "model-value": e.modelValue.size,
775
+ "onUpdate:modelValue": n[1] ||= (e) => k({ size: e })
776
+ }, null, 8, ["options", "model-value"])], 8, wn)),
777
+ S("div", null, [S("label", { class: h(p(H)) }, T(p(c).blockSettings.backgroundPosition), 3), S("div", {
778
+ role: "group",
779
+ "aria-label": p(c).blockSettings.backgroundPosition,
780
+ "data-testid": `${e.testidPrefix}-bg-position`,
781
+ class: "tpl:grid tpl:w-24 tpl:grid-cols-3 tpl:gap-1"
782
+ }, [(o(!0), _(w, null, r(ee.value, (t) => (o(), _("button", {
783
+ key: `${t.y}-${t.x}`,
784
+ type: "button",
785
+ "aria-label": t.label,
786
+ title: t.label,
787
+ "aria-pressed": M(t),
788
+ "data-testid": `${e.testidPrefix}-bg-position-${t.y}-${t.x}`,
789
+ class: h(["tpl:flex tpl:h-6 tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:transition-colors", M(t) ? "tpl:border-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:hover:border-[var(--tpl-text-dim)]"]),
790
+ onClick: (e) => k({ position: {
791
+ x: t.x,
792
+ y: t.y
793
+ } })
794
+ }, [S("span", { class: h(["tpl:block tpl:h-1.5 tpl:w-1.5 tpl:rounded-full", M(t) ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-text-dim)]"]) }, null, 2)], 10, En))), 128))], 8, Tn)]),
795
+ e.heroMode ? v("", !0) : (o(), _("div", {
796
+ key: 1,
797
+ "data-testid": `${e.testidPrefix}-bg-repeat`
798
+ }, [m(q, {
799
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
800
+ "model-value": e.modelValue.repeat,
801
+ label: p(c).blockSettings.backgroundRepeat,
802
+ "onUpdate:modelValue": n[2] ||= (e) => k({ repeat: e })
803
+ }, null, 8, ["model-value", "label"])], 8, Dn))
804
+ ], 64)) : v("", !0)]));
805
+ }
806
+ }), kn = ["data-testid"], An = { class: "tpl:mt-3" }, jn = /* @__PURE__ */ l({
807
+ __name: "CollapsibleSection",
808
+ props: {
809
+ title: {},
810
+ open: { type: Boolean },
811
+ noBorder: { type: Boolean },
812
+ headerTestId: {}
813
+ },
814
+ emits: ["toggle"],
815
+ setup(e) {
816
+ return (t, n) => (o(), _("div", { class: h(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [S("button", {
817
+ type: "button",
818
+ "data-testid": e.headerTestId,
819
+ 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)]",
820
+ onClick: n[0] ||= (e) => t.$emit("toggle")
821
+ }, [m(p(Le), {
822
+ class: h(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
823
+ size: 12,
824
+ "stroke-width": 2
825
+ }, null, 8, ["class"]), S("span", null, T(e.title), 1)], 8, kn), u(S("div", An, [a(t.$slots, "default")], 512), [[C, e.open]])], 2));
826
+ }
827
+ }), Mn = {
828
+ key: 0,
829
+ "data-testid": "section-hero-columns-note",
830
+ class: "tpl:mt-3.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
831
+ }, Nn = {
832
+ key: 1,
833
+ "data-testid": "section-hero",
834
+ class: "tpl:mt-3.5 tpl:space-y-3.5"
835
+ }, Pn = { "data-testid": "section-hero-height" }, Fn = {
836
+ key: 0,
837
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
838
+ }, In = {
839
+ key: 1,
840
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
841
+ }, Ln = {
842
+ key: 1,
843
+ "data-testid": "section-hero-align"
844
+ }, Rn = 300, zn = /* @__PURE__ */ l({
845
+ __name: "HeroControl",
846
+ props: { section: {} },
847
+ emits: ["update"],
848
+ setup(e, { emit: t }) {
849
+ function r(e) {
850
+ return typeof e == "number" && Number.isFinite(e) && e >= 1;
851
+ }
852
+ let i = e, a = t, { t: s } = B(), c = n(Ce, ie.liquid), l = n(Te, null), u = n(xe, void 0), d = yn(), f = g(() => typeof i.section.backgroundImage?.url == "string" ? i.section.backgroundImage.url : ""), y = g(() => f.value.trim() !== ""), x = g(() => P(f.value, c)), C = g(() => i.section.hero), w = g(() => i.section.columns === "1"), E = g(() => C.value ? r(C.value.height) ? "fixed" : "image" : "fit"), D = g(() => r(C.value?.height) ? C.value.height : Rn), O = g(() => [
853
+ {
854
+ value: "fit",
855
+ label: s.blockSettings.heroHeightFit
856
+ },
857
+ {
858
+ value: "image",
859
+ label: s.blockSettings.heroHeightImage,
860
+ disabled: x.value
861
+ },
862
+ {
863
+ value: "fixed",
864
+ label: s.blockSettings.heroHeightFixed
865
+ }
866
+ ]), k = g(() => [
867
+ {
868
+ value: "top",
869
+ label: s.blockSettings.heroAlignTop
870
+ },
871
+ {
872
+ value: "middle",
873
+ label: s.blockSettings.heroAlignMiddle
874
+ },
875
+ {
876
+ value: "bottom",
877
+ label: s.blockSettings.heroAlignBottom
878
+ }
879
+ ]), A = g(() => E.value === "image" && y.value && !x.value && I(i.section.backgroundImage) === null);
880
+ function j() {
881
+ return (l ? ge(l.content.value, i.section.id, u) : null) ?? se(l?.state.content.settings);
882
+ }
883
+ function ee(e) {
884
+ let t = C.value?.verticalAlign ?? "middle";
885
+ if (e === "image") {
886
+ E.value !== "image" && a("update", { hero: {
887
+ height: "image",
888
+ verticalAlign: t
889
+ } }), M();
890
+ return;
891
+ }
892
+ if (e === E.value) return;
893
+ if (e === "fit") {
894
+ a("update", { hero: void 0 });
895
+ return;
896
+ }
897
+ let n = I(i.section.backgroundImage), r = n === null ? Rn : Math.round(j() * n);
898
+ a("update", { hero: {
899
+ height: r,
900
+ verticalAlign: t
901
+ } });
902
+ }
903
+ async function M() {
904
+ let e = i.section.backgroundImage;
905
+ if (!e || !y.value || x.value || I(e) !== null) return;
906
+ let t = e.url, n = await d(t), r = i.section.backgroundImage;
907
+ n && r && r.url === t && a("update", { backgroundImage: {
908
+ ...r,
909
+ ...L(n)
910
+ } });
911
+ }
912
+ function N(e) {
913
+ !C.value || !Number.isFinite(e) || e < 1 || a("update", { hero: {
914
+ ...C.value,
915
+ height: Math.round(e)
916
+ } });
917
+ }
918
+ function te(e) {
919
+ C.value && a("update", { hero: {
920
+ ...C.value,
921
+ verticalAlign: e
922
+ } });
923
+ }
924
+ return (e, t) => !w.value && C.value ? (o(), _("p", Mn, T(p(s).section.heroNeedsOneColumn), 1)) : w.value && (y.value || C.value) ? (o(), _("div", Nn, [
925
+ S("div", Pn, [
926
+ S("label", { class: h(p(H)) }, T(p(s).blockSettings.heroHeight), 3),
927
+ m(Y, {
928
+ options: O.value,
929
+ "model-value": E.value,
930
+ "onUpdate:modelValue": ee
931
+ }, null, 8, ["options", "model-value"]),
932
+ x.value ? (o(), _("p", Fn, T(p(s).blockSettings.heroMatchImageMergeTag), 1)) : A.value ? (o(), _("p", In, T(p(s).blockSettings.heroSizeUnknown), 1)) : v("", !0)
933
+ ]),
934
+ E.value === "fixed" ? (o(), b(X, {
935
+ key: 0,
936
+ "model-value": D.value,
937
+ min: 1,
938
+ suffix: "px",
939
+ testid: "section-hero-height-px",
940
+ "onUpdate:modelValue": N
941
+ }, null, 8, ["model-value"])) : v("", !0),
942
+ C.value ? (o(), _("div", Ln, [S("label", { class: h(p(H)) }, T(p(s).blockSettings.heroAlign), 3), m(Y, {
943
+ options: k.value,
944
+ "model-value": C.value.verticalAlign,
945
+ "onUpdate:modelValue": te
946
+ }, null, 8, ["options", "model-value"])])) : v("", !0)
947
+ ])) : v("", !0);
948
+ }
949
+ }), Bn = { class: "tpl:space-y-2" }, Vn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Hn = { class: "tpl:space-y-2" }, Un = ["value"], Wn = { value: "" }, Gn = ["label"], Kn = ["value"], qn = ["value"], Jn = {
950
+ key: 0,
951
+ value: "__custom__"
952
+ }, Yn = {
953
+ key: 0,
954
+ class: "tpl:space-y-2"
955
+ }, Xn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Zn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qn = { class: "tpl:flex tpl:justify-end" }, $n = ["disabled"], er = {
956
+ key: 0,
957
+ class: "tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
958
+ }, tr = { class: "tpl:space-y-1" }, nr = { 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)]" }, rr = {
959
+ key: 0,
960
+ 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)]"
961
+ }, ir = /* @__PURE__ */ l({
962
+ __name: "CommonBlockSettings",
963
+ props: {
964
+ block: {},
965
+ isFirstSection: { type: Boolean }
966
+ },
967
+ emits: ["update"],
968
+ setup(e, { emit: a }) {
969
+ let l = e, f = a, { t: y } = B(), C = n(Ee, []), E = n(De, !1), O = d(/* @__PURE__ */ new Set()), k = s(!1), A = s(""), j = s(""), ee = [{
970
+ key: "desktop",
971
+ icon: Ve,
972
+ labelKey: "showOnDesktop"
973
+ }, {
974
+ key: "mobile",
975
+ icon: Pe,
976
+ labelKey: "showOnMobile"
977
+ }];
978
+ function M(e) {
979
+ O.has(e) ? O.delete(e) : O.add(e);
980
+ }
981
+ let te = g(() => C.length > 0 || E), P = g(() => l.block.displayCondition ? !C.some((e) => e.label === l.block.displayCondition?.label) : !1);
982
+ function ne() {
983
+ k.value = !0, P.value && l.block.displayCondition ? (A.value = l.block.displayCondition.before, j.value = l.block.displayCondition.after ?? "") : (A.value = "", j.value = "");
984
+ }
985
+ function F() {
986
+ A.value.trim() && (f("update", { displayCondition: {
987
+ label: y.blockSettings.customCondition,
988
+ before: A.value.trim(),
989
+ after: j.value.trim()
990
+ } }), k.value = !1, A.value = "", j.value = "");
991
+ }
992
+ t(() => l.block.displayCondition, (e) => {
993
+ e ? P.value && (A.value = e.before, j.value = e.after ?? "") : (k.value = !1, A.value = "", j.value = "");
994
+ }, { immediate: !0 });
995
+ let re = g(() => {
996
+ let e = {};
997
+ for (let t of C) {
998
+ let n = t.group ?? "";
999
+ e[n] || (e[n] = []), e[n].push(t);
1000
+ }
1001
+ return e;
1002
+ }), ie = g(() => l.block.type === "section" && N(l.block)?.applied === !0);
1003
+ function ae(e, t) {
1004
+ f("update", { styles: {
1005
+ ...l.block.styles,
1006
+ [e]: t
1007
+ } });
1008
+ }
1009
+ function I(e) {
1010
+ return l.block.visibility?.[e] !== !1;
1011
+ }
1012
+ function oe(e) {
1013
+ let t = {
1014
+ desktop: I("desktop"),
1015
+ mobile: I("mobile")
1016
+ };
1017
+ t[e] = !t[e], f("update", { visibility: t });
1018
+ }
1019
+ return (t, n) => (o(), _("div", { class: h(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
1020
+ m(jn, {
1021
+ title: p(y).blockSettings.spacing,
1022
+ open: O.has("spacing"),
1023
+ "no-border": e.isFirstSection,
1024
+ onToggle: n[1] ||= (e) => M("spacing")
1025
+ }, {
1026
+ default: i(() => [m(_n, {
1027
+ label: p(y).blockSettings.padding,
1028
+ "model-value": e.block.styles.padding,
1029
+ "onUpdate:modelValue": n[0] ||= (e) => ae("padding", e)
1030
+ }, null, 8, ["label", "model-value"])]),
1031
+ _: 1
1032
+ }, 8, [
1033
+ "title",
1034
+ "open",
1035
+ "no-border"
1036
+ ]),
1037
+ m(jn, {
1038
+ title: p(y).blockSettings.background,
1039
+ open: O.has("bg"),
1040
+ "header-test-id": "block-settings-background",
1041
+ onToggle: n[5] ||= (e) => M("bg")
1042
+ }, {
1043
+ default: i(() => [
1044
+ S("label", { class: h(p(H)) }, T(p(y).blockSettings.color), 3),
1045
+ m(K, {
1046
+ "model-value": e.block.styles.backgroundColor ?? "",
1047
+ "allow-transparent": "",
1048
+ "onUpdate:modelValue": n[2] ||= (e) => ae("backgroundColor", e)
1049
+ }, null, 8, ["model-value"]),
1050
+ e.block.type === "section" ? (o(), b(On, {
1051
+ key: 0,
1052
+ class: "tpl:mt-3.5",
1053
+ "model-value": e.block.backgroundImage,
1054
+ "testid-prefix": "section",
1055
+ measure: "",
1056
+ "hero-mode": ie.value,
1057
+ "onUpdate:modelValue": n[3] ||= (e) => f("update", { backgroundImage: e })
1058
+ }, null, 8, ["model-value", "hero-mode"])) : v("", !0),
1059
+ e.block.type === "section" ? (o(), b(zn, {
1060
+ key: 1,
1061
+ section: e.block,
1062
+ onUpdate: n[4] ||= (e) => f("update", e)
1063
+ }, null, 8, ["section"])) : v("", !0)
1064
+ ]),
1065
+ _: 1
1066
+ }, 8, ["title", "open"]),
1067
+ m(jn, {
1068
+ title: p(y).blockSettings.display,
1069
+ open: O.has("display"),
1070
+ onToggle: n[6] ||= (e) => M("display")
1071
+ }, {
1072
+ default: i(() => [S("div", Bn, [(o(), _(w, null, r(ee, (e) => m(q, {
1073
+ key: e.key,
1074
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
1075
+ "model-value": I(e.key),
1076
+ label: p(y).blockSettings[e.labelKey],
1077
+ "onUpdate:modelValue": (t) => oe(e.key)
1078
+ }, {
1079
+ default: i(() => [S("span", Vn, [(o(), b(c(e.icon), {
1080
+ size: 14,
1081
+ "stroke-width": 1.5
1082
+ })), D(" " + T(p(y).blockSettings[e.labelKey]), 1)])]),
1083
+ _: 2
1084
+ }, 1032, [
1085
+ "model-value",
1086
+ "label",
1087
+ "onUpdate:modelValue"
1088
+ ])), 64))])]),
1089
+ _: 1
1090
+ }, 8, ["title", "open"]),
1091
+ te.value ? (o(), b(jn, {
1092
+ key: 0,
1093
+ "header-test-id": "display-condition-section",
1094
+ title: p(y).blockSettings.displayCondition,
1095
+ open: O.has("condition"),
1096
+ onToggle: n[10] ||= (e) => M("condition")
1097
+ }, {
1098
+ default: i(() => [S("div", Hn, [S("select", {
1099
+ "data-testid": "display-condition-select",
1100
+ class: h(["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)]"]),
1101
+ value: k.value || P.value ? "__custom__" : e.block.displayCondition?.label ?? "",
1102
+ onChange: n[7] ||= (e) => {
1103
+ let t = e.target.value;
1104
+ if (t === "__custom__") {
1105
+ ne();
1106
+ return;
1107
+ }
1108
+ if (k.value = !1, !t) {
1109
+ f("update", { displayCondition: void 0 });
1110
+ return;
1111
+ }
1112
+ let n = p(C).find((e) => e.label === t);
1113
+ n && f("update", { displayCondition: n });
1114
+ }
1115
+ }, [
1116
+ S("option", Wn, T(p(y).blockSettings.noCondition), 1),
1117
+ (o(!0), _(w, null, r(re.value, (e, t) => (o(), _(w, { key: t }, [t ? (o(), _("optgroup", {
1118
+ key: 0,
1119
+ label: String(t)
1120
+ }, [(o(!0), _(w, null, r(e, (e) => (o(), _("option", {
1121
+ key: e.label,
1122
+ value: e.label
1123
+ }, T(e.label), 9, Kn))), 128))], 8, Gn)) : (o(!0), _(w, { key: 1 }, r(e, (e) => (o(), _("option", {
1124
+ key: e.label,
1125
+ value: e.label
1126
+ }, T(e.label), 9, qn))), 128))], 64))), 128)),
1127
+ p(E) ? (o(), _("option", Jn, T(p(y).blockSettings.customCondition), 1)) : v("", !0)
1128
+ ], 42, Un), k.value || P.value ? (o(), _("div", Yn, [
1129
+ S("div", null, [S("label", Xn, T(p(y).blockSettings.customConditionBefore), 1), u(S("textarea", {
1130
+ "onUpdate:modelValue": n[8] ||= (e) => A.value = e,
1131
+ rows: "2",
1132
+ class: h(p($e))
1133
+ }, null, 2), [[x, A.value]])]),
1134
+ S("div", null, [S("label", Zn, T(p(y).blockSettings.customConditionAfter), 1), u(S("textarea", {
1135
+ "onUpdate:modelValue": n[9] ||= (e) => j.value = e,
1136
+ rows: "2",
1137
+ class: h(p($e))
1138
+ }, null, 2), [[x, j.value]])]),
1139
+ S("div", Qn, [S("button", {
1140
+ type: "button",
1141
+ class: h(p(rt)),
1142
+ disabled: !A.value.trim(),
1143
+ onClick: F
1144
+ }, T(p(y).blockSettings.applyCondition), 11, $n)])
1145
+ ])) : e.block.displayCondition && !P.value ? (o(), _(w, { key: 1 }, [e.block.displayCondition.description ? (o(), _("p", er, T(e.block.displayCondition.description), 1)) : v("", !0), S("div", tr, [S("pre", nr, T(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (o(), _("pre", rr, T(e.block.displayCondition.after), 1)) : v("", !0)])], 64)) : v("", !0)])]),
1146
+ _: 1
1147
+ }, 8, ["title", "open"])) : v("", !0)
1148
+ ], 2));
1149
+ }
1150
+ }), ar = ["title"], or = /* @__PURE__ */ l({
1151
+ __name: "BooleanField",
1152
+ props: {
1153
+ field: {},
1154
+ modelValue: { type: Boolean },
1155
+ readOnly: { type: Boolean }
1156
+ },
1157
+ emits: ["update:modelValue"],
1158
+ setup(e, { emit: t }) {
1159
+ let n = t, { t: r } = B();
1160
+ return (t, a) => (o(), _("div", {
1161
+ class: "tpl:mb-3.5",
1162
+ title: e.readOnly ? p(r).customBlocks.dataSource.readOnlyTooltip : void 0
1163
+ }, [m(q, {
1164
+ class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
1165
+ "model-value": e.modelValue,
1166
+ label: e.field.label,
1167
+ required: e.field.required,
1168
+ disabled: e.readOnly,
1169
+ "onUpdate:modelValue": a[0] ||= (e) => n("update:modelValue", e)
1170
+ }, {
1171
+ default: i(() => [D(T(e.field.label) + " ", 1), e.readOnly ? (o(), b(p(Je), {
1172
+ key: 0,
1173
+ size: 12,
1174
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
1175
+ })) : v("", !0)]),
1176
+ _: 1
1177
+ }, 8, [
1178
+ "model-value",
1179
+ "label",
1180
+ "required",
1181
+ "disabled"
1182
+ ])], 8, ar));
1183
+ }
1184
+ }), sr = { class: "tpl:mb-3.5" }, cr = ["title"], lr = { class: "tpl-sr-only" }, ur = ["title"], dr = { class: "tpl-sr-only" }, Q = /* @__PURE__ */ l({
1185
+ __name: "FieldWrapper",
1186
+ props: {
1187
+ label: {},
1188
+ required: { type: Boolean },
1189
+ readOnly: { type: Boolean }
1190
+ },
1191
+ setup(e) {
1192
+ let { t } = B();
1193
+ return (n, r) => (o(), _("div", sr, [S("label", { class: h(p(H)) }, [
1194
+ D(T(e.label) + " ", 1),
1195
+ e.readOnly ? (o(), _("span", {
1196
+ key: 0,
1197
+ title: p(t).customBlocks.dataSource.readOnlyTooltip
1198
+ }, [m(p(Je), {
1199
+ size: 12,
1200
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]",
1201
+ "aria-hidden": "true"
1202
+ }), S("span", lr, T(p(t).customBlocks.dataSource.readOnlyTooltip), 1)], 8, cr)) : v("", !0),
1203
+ e.required ? (o(), _("span", {
1204
+ key: 1,
1205
+ class: "tpl:text-[var(--tpl-danger)]",
1206
+ title: p(t).customBlocks.fields.required
1207
+ }, [r[0] ||= S("span", { "aria-hidden": "true" }, "*", -1), S("span", dr, T(p(t).customBlocks.fields.required), 1)], 8, ur)) : v("", !0)
1208
+ ], 2), a(n.$slots, "default")]));
1209
+ }
1210
+ }), fr = /* @__PURE__ */ l({
1211
+ __name: "ColorField",
1212
+ props: {
1213
+ field: {},
1214
+ modelValue: {},
1215
+ readOnly: { type: Boolean }
1216
+ },
1217
+ emits: ["update:modelValue"],
1218
+ setup(e, { emit: t }) {
1219
+ let r = e, a = t, { t: s } = B(), c = n(we, je), l = g(() => ue(r.field, c));
1220
+ return (t, n) => (o(), b(Q, {
1221
+ label: e.field.label,
1222
+ required: e.field.required,
1223
+ "read-only": e.readOnly
1224
+ }, {
1225
+ default: i(() => [m(K, {
1226
+ "model-value": e.modelValue,
1227
+ placeholder: e.field.placeholder,
1228
+ disabled: e.readOnly,
1229
+ presets: l.value.presets,
1230
+ "allow-custom": l.value.allowCustom,
1231
+ title: e.readOnly ? p(s).customBlocks.dataSource.readOnlyTooltip : void 0,
1232
+ "onUpdate:modelValue": n[0] ||= (e) => a("update:modelValue", e)
1233
+ }, null, 8, [
1234
+ "model-value",
1235
+ "placeholder",
1236
+ "disabled",
1237
+ "presets",
1238
+ "allow-custom",
1239
+ "title"
1240
+ ])]),
1241
+ _: 1
1242
+ }, 8, [
1243
+ "label",
1244
+ "required",
1245
+ "read-only"
1246
+ ]));
1247
+ }
1248
+ }), pr = [
1249
+ "value",
1250
+ "placeholder",
1251
+ "title"
1252
+ ], mr = ["value", "placeholder"], hr = /* @__PURE__ */ l({
1253
+ __name: "ImageField",
1254
+ props: {
1255
+ field: {},
1256
+ modelValue: {},
1257
+ readOnly: { type: Boolean }
1258
+ },
1259
+ emits: ["update:modelValue"],
1260
+ setup(e, { emit: t }) {
1261
+ let n = e, r = t, { t: a } = B(), c = s(), { canBrowse: l, isUploading: u, showOverlay: d, openMediaBrowser: f } = me({
1262
+ target: c,
1263
+ blocked: () => !!n.readOnly,
1264
+ apply: (e) => r("update:modelValue", e.url)
1265
+ });
1266
+ return (t, n) => (o(), b(Q, {
1267
+ label: e.field.label,
1268
+ required: e.field.required,
1269
+ "read-only": e.readOnly
1270
+ }, {
1271
+ default: i(() => [S("div", {
1272
+ ref_key: "dropZoneRef",
1273
+ ref: c,
1274
+ class: "tpl:relative"
1275
+ }, [
1276
+ p(d) ? (o(), b(ve, {
1277
+ key: 0,
1278
+ uploading: p(u)
1279
+ }, null, 8, ["uploading"])) : v("", !0),
1280
+ e.readOnly ? (o(), _("input", {
1281
+ key: 1,
1282
+ type: "url",
1283
+ class: h([p(G), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1284
+ value: e.modelValue,
1285
+ placeholder: e.field.placeholder || "https://...",
1286
+ disabled: "",
1287
+ title: p(a).customBlocks.dataSource.readOnlyTooltip
1288
+ }, null, 10, pr)) : (o(), _("input", {
1289
+ key: 2,
1290
+ type: "url",
1291
+ class: h(p(G)),
1292
+ value: e.modelValue,
1293
+ placeholder: e.field.placeholder || "https://...",
1294
+ onInput: n[0] ||= (e) => r("update:modelValue", e.target.value)
1295
+ }, null, 42, mr)),
1296
+ p(l) && !e.readOnly ? (o(), _("button", {
1297
+ key: 3,
1298
+ 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)]",
1299
+ onClick: n[1] ||= (e) => p(f)()
1300
+ }, [m(p(Ge), {
1301
+ size: 14,
1302
+ "stroke-width": 1.5
1303
+ }), D(" " + T(p(a).image.browseMedia), 1)])) : v("", !0)
1304
+ ], 512)]),
1305
+ _: 1
1306
+ }, 8, [
1307
+ "label",
1308
+ "required",
1309
+ "read-only"
1310
+ ]));
1311
+ }
1312
+ }), gr = [
1313
+ "value",
1314
+ "placeholder",
1315
+ "min",
1316
+ "max",
1317
+ "step",
1318
+ "disabled",
1319
+ "title"
1320
+ ], _r = /* @__PURE__ */ l({
1321
+ __name: "NumberField",
1322
+ props: {
1323
+ field: {},
1324
+ modelValue: {},
1325
+ readOnly: { type: Boolean }
1326
+ },
1327
+ emits: ["update:modelValue"],
1328
+ setup(e, { emit: t }) {
1329
+ let n = t, { t: r } = B();
1330
+ return (t, a) => (o(), b(Q, {
1331
+ label: e.field.label,
1332
+ required: e.field.required,
1333
+ "read-only": e.readOnly
1334
+ }, {
1335
+ default: i(() => [S("input", {
1336
+ type: "number",
1337
+ class: h([p(G), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1338
+ value: e.modelValue,
1339
+ placeholder: e.field.placeholder,
1340
+ min: e.field.min,
1341
+ max: e.field.max,
1342
+ step: e.field.step,
1343
+ disabled: e.readOnly,
1344
+ title: e.readOnly ? p(r).customBlocks.dataSource.readOnlyTooltip : void 0,
1345
+ onInput: a[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
1346
+ }, null, 42, gr)]),
1347
+ _: 1
1348
+ }, 8, [
1349
+ "label",
1350
+ "required",
1351
+ "read-only"
1352
+ ]));
1353
+ }
1354
+ }), vr = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, yr = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, br = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, xr = ["title", "onClick"], Sr = {
1355
+ key: 1,
1356
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1357
+ }, Cr = {
1358
+ key: 2,
1359
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1360
+ }, wr = /* @__PURE__ */ l({
1361
+ __name: "RepeatableField",
1362
+ props: {
1363
+ field: {},
1364
+ modelValue: {},
1365
+ readOnly: { type: Boolean }
1366
+ },
1367
+ emits: ["update:modelValue"],
1368
+ setup(e, { emit: t }) {
1369
+ let n = e, a = t, { t: s, format: l } = B(), u = g(() => n.modelValue || []), d = g(() => !n.field.maxItems || u.value.length < n.field.maxItems), f = g(() => !n.field.minItems || u.value.length > n.field.minItems);
1370
+ function y() {
1371
+ if (!d.value || n.readOnly) return;
1372
+ let e = {};
1373
+ for (let t of n.field.fields) e[t.key] = t.default ?? "";
1374
+ a("update:modelValue", [...u.value, e]);
1375
+ }
1376
+ function x(e) {
1377
+ if (!f.value || n.readOnly) return;
1378
+ let t = [...u.value];
1379
+ t.splice(e, 1), a("update:modelValue", t);
1380
+ }
1381
+ function C(e, t, n) {
1382
+ let r = u.value.map((r, i) => i === e ? {
1383
+ ...r,
1384
+ [t]: n
1385
+ } : r);
1386
+ a("update:modelValue", r);
1387
+ }
1388
+ return (t, n) => (o(), b(Q, {
1389
+ label: e.field.label,
1390
+ required: e.field.required,
1391
+ "read-only": e.readOnly
1392
+ }, {
1393
+ default: i(() => [S("div", vr, [
1394
+ (o(!0), _(w, null, r(u.value, (t, n) => (o(), _("div", {
1395
+ key: `${e.field.key}-${n}`,
1396
+ class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
1397
+ }, [S("div", yr, [S("span", br, " #" + T(n + 1), 1), f.value && !e.readOnly ? (o(), _("button", {
1398
+ key: 0,
1399
+ type: "button",
1400
+ 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)]",
1401
+ title: p(s).customBlocks.fields.removeItem,
1402
+ onClick: (e) => x(n)
1403
+ }, [m(p(He), {
1404
+ size: 12,
1405
+ "stroke-width": 2
1406
+ })], 8, xr)) : v("", !0)]), (o(!0), _(w, null, r(e.field.fields, (r) => (o(), b(c(p(Nr)(r.type)), {
1407
+ key: r.key,
1408
+ field: r,
1409
+ "model-value": t[r.key],
1410
+ "read-only": e.readOnly,
1411
+ "onUpdate:modelValue": (e) => C(n, r.key, e)
1412
+ }, null, 8, [
1413
+ "field",
1414
+ "model-value",
1415
+ "read-only",
1416
+ "onUpdate:modelValue"
1417
+ ]))), 128))]))), 128)),
1418
+ d.value && !e.readOnly ? (o(), _("button", {
1419
+ key: 0,
1420
+ type: "button",
1421
+ class: h(p(tt)),
1422
+ onClick: y
1423
+ }, [m(p(V), {
1424
+ size: 14,
1425
+ "stroke-width": 2
1426
+ }), D(" " + T(p(s).customBlocks.fields.addItem), 1)], 2)) : v("", !0),
1427
+ !d.value && !e.readOnly ? (o(), _("p", Sr, T(p(s).customBlocks.fields.maxItemsReached), 1)) : v("", !0),
1428
+ !f.value && !e.readOnly ? (o(), _("p", Cr, T(p(l)(p(s).customBlocks.fields.minItemsRequired, { count: e.field.minItems ?? 0 })), 1)) : v("", !0)
1429
+ ])]),
1430
+ _: 1
1431
+ }, 8, [
1432
+ "label",
1433
+ "required",
1434
+ "read-only"
1435
+ ]));
1436
+ }
1437
+ }), Tr = [
1438
+ "value",
1439
+ "disabled",
1440
+ "title"
1441
+ ], Er = ["value"], Dr = /* @__PURE__ */ l({
1442
+ __name: "SelectField",
1443
+ props: {
1444
+ field: {},
1445
+ modelValue: {},
1446
+ readOnly: { type: Boolean }
1447
+ },
1448
+ emits: ["update:modelValue"],
1449
+ setup(e, { emit: t }) {
1450
+ let n = t, { t: a } = B();
1451
+ return (t, s) => (o(), b(Q, {
1452
+ label: e.field.label,
1453
+ required: e.field.required,
1454
+ "read-only": e.readOnly
1455
+ }, {
1456
+ default: i(() => [S("select", {
1457
+ class: h([p(G), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1458
+ value: e.modelValue,
1459
+ disabled: e.readOnly,
1460
+ title: e.readOnly ? p(a).customBlocks.dataSource.readOnlyTooltip : void 0,
1461
+ onChange: s[0] ||= (t) => !e.readOnly && n("update:modelValue", t.target.value)
1462
+ }, [(o(!0), _(w, null, r(e.field.options, (e) => (o(), _("option", {
1463
+ key: e.value,
1464
+ value: e.value
1465
+ }, T(e.label), 9, Er))), 128))], 42, Tr)]),
1466
+ _: 1
1467
+ }, 8, [
1468
+ "label",
1469
+ "required",
1470
+ "read-only"
1471
+ ]));
1472
+ }
1473
+ }), Or = [
1474
+ "value",
1475
+ "placeholder",
1476
+ "title"
1477
+ ], kr = /* @__PURE__ */ l({
1478
+ __name: "TextField",
1479
+ props: {
1480
+ field: {},
1481
+ modelValue: {},
1482
+ readOnly: { type: Boolean }
1483
+ },
1484
+ emits: ["update:modelValue"],
1485
+ setup(e, { emit: t }) {
1486
+ let n = t, { t: r } = B();
1487
+ return (t, a) => (o(), b(Q, {
1488
+ label: e.field.label,
1489
+ required: e.field.required,
1490
+ "read-only": e.readOnly
1491
+ }, {
1492
+ default: i(() => [e.readOnly ? (o(), _("input", {
1493
+ key: 0,
1494
+ type: "text",
1495
+ class: h([p(G), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1496
+ value: e.modelValue,
1497
+ placeholder: e.field.placeholder,
1498
+ disabled: "",
1499
+ title: p(r).customBlocks.dataSource.readOnlyTooltip
1500
+ }, null, 10, Or)) : (o(), b(J, {
1501
+ key: 1,
1502
+ "model-value": e.modelValue,
1503
+ placeholder: e.field.placeholder,
1504
+ "onUpdate:modelValue": a[0] ||= (e) => n("update:modelValue", e)
1505
+ }, null, 8, ["model-value", "placeholder"]))]),
1506
+ _: 1
1507
+ }, 8, [
1508
+ "label",
1509
+ "required",
1510
+ "read-only"
1511
+ ]));
1512
+ }
1513
+ }), Ar = [
1514
+ "value",
1515
+ "placeholder",
1516
+ "title"
1517
+ ], jr = "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", Mr = {
1518
+ text: kr,
1519
+ textarea: /* @__PURE__ */ l({
1520
+ __name: "TextareaField",
1521
+ props: {
1522
+ field: {},
1523
+ modelValue: {},
1524
+ readOnly: { type: Boolean }
1525
+ },
1526
+ emits: ["update:modelValue"],
1527
+ setup(e, { emit: t }) {
1528
+ let n = t, { t: r } = B();
1529
+ return (t, a) => (o(), b(Q, {
1530
+ label: e.field.label,
1531
+ required: e.field.required,
1532
+ "read-only": e.readOnly
1533
+ }, {
1534
+ default: i(() => [e.readOnly ? (o(), _("textarea", {
1535
+ key: 0,
1536
+ value: e.modelValue,
1537
+ placeholder: e.field.placeholder,
1538
+ rows: "3",
1539
+ disabled: "",
1540
+ title: p(r).customBlocks.dataSource.readOnlyTooltip,
1541
+ class: h(jr)
1542
+ }, null, 8, Ar)) : (o(), b(at, {
1543
+ key: 1,
1544
+ "model-value": e.modelValue,
1545
+ placeholder: e.field.placeholder,
1546
+ "onUpdate:modelValue": a[0] ||= (e) => n("update:modelValue", e)
1547
+ }, null, 8, ["model-value", "placeholder"]))]),
1548
+ _: 1
1549
+ }, 8, [
1550
+ "label",
1551
+ "required",
1552
+ "read-only"
1553
+ ]));
1554
+ }
1555
+ }),
1556
+ image: hr,
1557
+ color: fr,
1558
+ number: _r,
1559
+ select: Dr,
1560
+ boolean: or,
1561
+ repeatable: wr
1562
+ };
1563
+ function Nr(e) {
1564
+ return Mr[e] ?? kr;
1565
+ }
1566
+ //#endregion
1567
+ //#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
1568
+ var Pr = {
1569
+ key: 0,
1570
+ class: "tpl:p-4"
1571
+ }, Fr = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ir = { key: 1 }, Lr = {
1572
+ key: 0,
1573
+ class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1574
+ }, Rr = {
1575
+ key: 1,
1576
+ class: "tpl:mb-4"
1577
+ }, zr = {
1578
+ key: 1,
1579
+ class: "tpl:flex tpl:h-[32px] tpl:items-center"
1580
+ }, Br = {
1581
+ key: 0,
1582
+ class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1583
+ }, Vr = {
1584
+ key: 2,
1585
+ class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
1586
+ }, Hr = /* @__PURE__ */ l({
1587
+ __name: "CustomBlockToolbar",
1588
+ props: { block: {} },
1589
+ emits: ["updateFieldValues", "updateDataSourceFetched"],
1590
+ setup(e, { emit: t }) {
1591
+ let i = e, a = t, { t: s } = B(), l = n(Oe, []), u = g(() => l.find((e) => e.type === i.block.customType)), d = g(() => i.block), { isFetching: f, fetchError: h, fetch: y, hasDataSource: x, needsFetch: C } = pe({
1592
+ definition: u,
1593
+ block: d,
1594
+ onUpdate: (e, t) => {
1595
+ a("updateFieldValues", e), a("updateDataSourceFetched", t);
1596
+ }
1597
+ });
1598
+ function E(e) {
1599
+ return e.readOnly === !0 && x.value && !!i.block.dataSourceFetched;
1600
+ }
1601
+ function O(e, t) {
1602
+ a("updateFieldValues", {
1603
+ ...i.block.fieldValues,
1604
+ [e]: t
1605
+ });
1606
+ }
1607
+ return (t, n) => u.value ? (o(), _("div", Ir, [
1608
+ u.value.description ? (o(), _("p", Lr, T(u.value.description), 1)) : v("", !0),
1609
+ p(x) ? (o(), _("div", Rr, [p(C) && !p(f) ? (o(), _("button", {
1610
+ key: 0,
1611
+ type: "button",
1612
+ 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)]",
1613
+ onClick: n[0] ||= (...e) => p(y) && p(y)(...e)
1614
+ }, T(u.value?.dataSource?.label || p(s).customBlocks.dataSource.fetchButton), 1)) : (o(), _("div", zr, [p(f) ? (o(), _("div", Br, T(p(s).customBlocks.dataSource.fetching), 1)) : (o(), _("button", {
1615
+ key: 1,
1616
+ type: "button",
1617
+ 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)]",
1618
+ onClick: n[1] ||= (...e) => p(y) && p(y)(...e)
1619
+ }, [m(p(Ne), { size: 12 }), D(" " + T(p(s).customBlocks.dataSource.changeButton), 1)]))])), p(h) ? (o(), _("p", Vr, [m(p(Ie), {
1620
+ size: 14,
1621
+ class: "tpl:shrink-0"
1622
+ }), D(" " + T(p(s).customBlocks.dataSource.fetchError), 1)])) : v("", !0)])) : v("", !0),
1623
+ (o(!0), _(w, null, r(u.value.fields, (t) => (o(), b(c(p(Nr)(t.type)), {
1624
+ key: t.key,
1625
+ field: t,
1626
+ "model-value": e.block.fieldValues[t.key],
1627
+ "read-only": E(t),
1628
+ "onUpdate:modelValue": (e) => O(t.key, e)
1629
+ }, null, 8, [
1630
+ "field",
1631
+ "model-value",
1632
+ "read-only",
1633
+ "onUpdate:modelValue"
1634
+ ]))), 128))
1635
+ ])) : (o(), _("div", Pr, [S("p", Fr, T(p(s).customBlocks.toolbar.noDefinition), 1)]));
1636
+ }
1637
+ }), Ur = { class: "tpl:mb-3.5" }, Wr = { class: "tpl:mb-3.5" }, Gr = { class: "tpl:mb-3.5" }, Kr = { class: "tpl:flex tpl:items-stretch" }, qr = ["value"], Jr = /* @__PURE__ */ l({
1638
+ __name: "DividerToolbar",
1639
+ props: { block: {} },
1640
+ emits: ["update"],
1641
+ setup(e, { emit: t }) {
1642
+ let n = t, { t: r } = B();
1643
+ function i(e, t) {
1644
+ n("update", { [e]: t });
1645
+ }
1646
+ return (t, n) => (o(), _(w, null, [
1647
+ S("div", Ur, [S("label", { class: h(p(H)) }, T(p(r).divider.style), 3), m(Y, {
1648
+ options: [
1649
+ {
1650
+ value: "solid",
1651
+ label: p(r).divider.solid
1652
+ },
1653
+ {
1654
+ value: "dashed",
1655
+ label: p(r).divider.dashed
1656
+ },
1657
+ {
1658
+ value: "dotted",
1659
+ label: p(r).divider.dotted
1660
+ }
1661
+ ],
1662
+ "model-value": e.block.lineStyle,
1663
+ "onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
1664
+ }, null, 8, ["options", "model-value"])]),
1665
+ S("div", Wr, [S("label", { class: h(p(H)) }, T(p(r).divider.color), 3), m(K, {
1666
+ "model-value": e.block.color,
1667
+ "onUpdate:modelValue": n[1] ||= (e) => i("color", e)
1668
+ }, null, 8, ["model-value"])]),
1669
+ S("div", Gr, [S("label", { class: h(p(H)) }, T(p(r).divider.thickness), 3), S("div", Kr, [S("input", {
1670
+ type: "number",
1671
+ class: h(p(W)),
1672
+ value: e.block.thickness,
1673
+ min: "1",
1674
+ max: "10",
1675
+ onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
1676
+ }, null, 42, qr), S("span", { class: h(p(U)) }, "px", 2)])])
1677
+ ], 64));
1678
+ }
1679
+ }), Yr = { class: "tpl:mb-3.5" }, Xr = ["value"], Zr = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Qr = /* @__PURE__ */ l({
1680
+ __name: "HtmlToolbar",
1681
+ props: { block: {} },
1682
+ emits: ["update"],
1683
+ setup(e, { emit: t }) {
1684
+ let n = t, { t: r } = B();
1685
+ return (t, i) => (o(), _("div", Yr, [
1686
+ S("label", { class: h(p(H)) }, T(p(r).html.content), 3),
1687
+ S("textarea", {
1688
+ value: e.block.content,
1689
+ placeholder: "<div>...</div>",
1690
+ rows: "10",
1691
+ class: h(p($e)),
1692
+ onInput: i[0] ||= (e) => n("update", { content: e.target.value })
1693
+ }, null, 42, Xr),
1694
+ S("p", Zr, [m(p(qe), {
1695
+ size: 12,
1696
+ class: "tpl:mt-0.5 tpl:shrink-0"
1697
+ }), D(" " + T(p(r).html.sanitizationHint), 1)])
1698
+ ]));
1699
+ }
1700
+ });
1701
+ //#endregion
1702
+ //#region src/composables/useImageAspectLock.ts
1703
+ function $r(e) {
1704
+ let n = s(!1), r = s(null);
1705
+ t(() => e.block().id, () => {
1706
+ n.value = !1, r.value = null;
1707
+ });
1708
+ let i = g(() => he(e.block()) ?? e.measured()), a = g(() => {
1709
+ let t = e.block().width;
1710
+ return t === "full" ? e.room() : t;
1711
+ }), o = g(() => {
1712
+ let e = i.value, t = a.value;
1713
+ return !e || t === null ? null : Math.round(t * e.height / e.width);
1714
+ }), c = g(() => i.value !== null), l = g(() => {
1715
+ let t = e.block().height;
1716
+ return t === void 0 || o.value !== null && Math.abs(o.value - t) <= 1;
1717
+ }), u = g(() => c.value && !n.value && l.value);
1718
+ function d() {
1719
+ if (he(e.block())) return {};
1720
+ let t = e.measured();
1721
+ return t ? L(t) : {};
1722
+ }
1723
+ function f(t) {
1724
+ if (r.value = null, !t) return n.value = !0, null;
1725
+ if (n.value = !1, !c.value) return null;
1726
+ let i = { ...d() };
1727
+ return e.block().height !== void 0 && (i.height = void 0), Object.keys(i).length > 0 ? i : null;
1728
+ }
1729
+ function p(e) {
1730
+ return r.value = null, u.value ? {
1731
+ width: e,
1732
+ height: void 0,
1733
+ ...d()
1734
+ } : { width: e };
1735
+ }
1736
+ function m(t) {
1737
+ let n = i.value;
1738
+ if (!u.value || !n || !Number.isFinite(t) || t <= 0) return null;
1739
+ let a = Math.round(t * n.width / n.height);
1740
+ if (a < 1) return null;
1741
+ let o = e.room();
1742
+ return o !== null && a >= o ? (r.value = Math.round(o * n.height / n.width), {
1743
+ width: "full",
1744
+ height: void 0,
1745
+ ...d()
1746
+ }) : (r.value = null, {
1747
+ width: a,
1748
+ height: void 0,
1749
+ ...d()
1750
+ });
1751
+ }
1752
+ return {
1753
+ available: c,
1754
+ locked: u,
1755
+ derivedHeight: o,
1756
+ cappedHeight: r,
1757
+ setLocked: f,
1758
+ widthUpdates: p,
1759
+ heightUpdates: m
1760
+ };
1761
+ }
1762
+ //#endregion
1763
+ //#region src/components/toolbar/ImageToolbar.vue?vue&type=script&setup=true&lang.ts
1764
+ var ei = { class: "tpl:mb-3.5" }, ti = {
1765
+ key: 0,
1766
+ class: "tpl:mb-3.5"
1767
+ }, ni = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ri = [
1768
+ "value",
1769
+ "placeholder",
1770
+ "title"
1771
+ ], ii = { class: "tpl:mb-3.5" }, ai = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, oi = { class: "tpl:mb-3.5" }, si = ["value"], ci = { value: "full" }, li = { value: "custom" }, ui = {
1772
+ key: 0,
1773
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1774
+ }, di = ["value"], fi = { class: "tpl:mb-3.5" }, pi = {
1775
+ key: 0,
1776
+ class: "tpl:mb-1.5 tpl:flex tpl:items-center tpl:justify-between"
1777
+ }, mi = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, hi = { class: "tpl:flex tpl:items-stretch" }, gi = ["value"], _i = {
1778
+ key: 0,
1779
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
1780
+ role: "status",
1781
+ "data-testid": "image-height-capped"
1782
+ }, vi = ["value"], yi = { value: "auto" }, bi = { value: "custom" }, xi = {
1783
+ key: 4,
1784
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1785
+ }, Si = ["value"], Ci = { class: "tpl:mb-3.5" }, wi = { class: "tpl:mb-3.5" }, Ti = 350, Ei = 200, Di = /* @__PURE__ */ l({
1786
+ __name: "ImageToolbar",
1787
+ props: { block: {} },
1788
+ emits: ["update"],
1789
+ setup(e, { emit: t }) {
1790
+ let r = e, a = t, { t: c, format: l } = B(), u = n(Ce, ie.liquid), d = n(Te, null), f = n(xe, void 0), y = s(!1), x = s(!1), { start: C } = ye(() => {
1791
+ y.value = !1, x.value = !1;
1792
+ }, 1e3, { immediate: !1 }), E = [
1793
+ 300,
1794
+ 400,
1795
+ 500
1796
+ ], O = g(() => {
1797
+ let e = r.block.width;
1798
+ return e === "full" ? "full" : E.includes(e) ? String(e) : "custom";
1799
+ }), A = g(() => typeof r.block.height == "number" ? "custom" : "auto");
1800
+ function j(e, t) {
1801
+ a("update", { [e]: t });
1802
+ }
1803
+ function ee(e) {
1804
+ if (e === "custom") {
1805
+ let e = r.block.width;
1806
+ (typeof e != "number" || E.includes(e)) && a("update", R.widthUpdates(Ti));
1807
+ } else a("update", R.widthUpdates(e === "full" ? "full" : Number(e)));
1808
+ }
1809
+ function M(e) {
1810
+ j("height", e === "custom" ? Ei : void 0);
1811
+ }
1812
+ function N(e) {
1813
+ let t = Number(e);
1814
+ !Number.isFinite(t) || t <= 0 || j("height", t);
1815
+ }
1816
+ function te(e) {
1817
+ j("borderRadius", k(e) === null ? void 0 : e);
1818
+ }
1819
+ function ne(e) {
1820
+ let t = Number(e);
1821
+ !Number.isFinite(t) || t <= 0 || a("update", R.widthUpdates(t));
1822
+ }
1823
+ function F(e) {
1824
+ e !== r.block.src && a("update", {
1825
+ src: e,
1826
+ ...L(null)
1827
+ });
1828
+ }
1829
+ function re(e) {
1830
+ a("update", {
1831
+ src: e.url,
1832
+ ...L(de(e.width, e.height))
1833
+ }), e.alt && (j("alt", e.alt), x.value = !0), y.value = !0, C();
1834
+ }
1835
+ let ae = s(), I = g(() => P(r.block.src, u)), { canBrowse: se, isUploading: ce, showOverlay: le, openMediaBrowser: ue } = me({
1836
+ target: ae,
1837
+ blocked: I,
1838
+ apply: re
1839
+ }), pe = oe(() => I.value || !r.block.src || he(r.block) ? void 0 : r.block.src), ge = vn(() => pe.value), _e = g(() => d ? fe(d.content.value, r.block.id, f) : null), R = $r({
1840
+ block: () => r.block,
1841
+ room: () => _e.value,
1842
+ measured: () => ge.value
1843
+ }), { available: be, locked: z, derivedHeight: Se, cappedHeight: we } = R;
1844
+ function Ee() {
1845
+ let e = R.setLocked(!z.value);
1846
+ e && a("update", e);
1847
+ }
1848
+ let De = s(null);
1849
+ function Oe(e) {
1850
+ De.value = e;
1851
+ let t = R.heightUpdates(Number(e));
1852
+ t && a("update", t);
1853
+ }
1854
+ return (t, n) => (o(), _(w, null, [
1855
+ S("div", ei, [S("label", { class: h(p(H)) }, T(p(c).image.imageUrl), 3), S("div", {
1856
+ ref_key: "dropZoneRef",
1857
+ ref: ae,
1858
+ class: "tpl:relative"
1859
+ }, [
1860
+ p(le) ? (o(), b(ve, {
1861
+ key: 0,
1862
+ uploading: p(ce)
1863
+ }, null, 8, ["uploading"])) : v("", !0),
1864
+ m(J, {
1865
+ "model-value": e.block.src,
1866
+ type: "url",
1867
+ placeholder: p(c).image.imageUrlPlaceholder,
1868
+ pulse: y.value,
1869
+ "onUpdate:modelValue": n[0] ||= (e) => F(e)
1870
+ }, null, 8, [
1871
+ "model-value",
1872
+ "placeholder",
1873
+ "pulse"
1874
+ ]),
1875
+ p(se) ? (o(), _("button", {
1876
+ key: 1,
1877
+ 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",
1878
+ style: {
1879
+ "border-color": "var(--tpl-border)",
1880
+ color: "var(--tpl-primary)",
1881
+ "background-color": "var(--tpl-bg)"
1882
+ },
1883
+ onClick: n[1] ||= (...e) => p(ue) && p(ue)(...e)
1884
+ }, [m(p(Ge), {
1885
+ size: 14,
1886
+ "stroke-width": 1.5
1887
+ }), D(" " + T(p(c).image.browseMedia), 1)])) : v("", !0)
1888
+ ], 512)]),
1889
+ p(P)(e.block.src, p(u)) ? (o(), _("div", ti, [S("label", { class: h(p(H)) }, [D(T(p(c).image.placeholderUrl) + " ", 1), S("span", ni, T(p(c).image.optional), 1)], 2), S("input", {
1890
+ type: "url",
1891
+ class: h(p(G)),
1892
+ value: e.block.placeholderUrl || "",
1893
+ placeholder: p(c).image.placeholderUrlPlaceholder,
1894
+ title: p(c).image.placeholderUrlTooltip,
1895
+ onInput: n[2] ||= (e) => j("placeholderUrl", e.target.value)
1896
+ }, null, 42, ri)])) : v("", !0),
1897
+ S("div", ii, [
1898
+ S("label", { class: h(p(H)) }, T(p(c).image.altText), 3),
1899
+ m(J, {
1900
+ "model-value": e.block.alt,
1901
+ type: "text",
1902
+ placeholder: p(c).image.altTextPlaceholder,
1903
+ pulse: x.value,
1904
+ disabled: e.block.decorative === !0,
1905
+ "onUpdate:modelValue": n[3] ||= (e) => j("alt", e)
1906
+ }, null, 8, [
1907
+ "model-value",
1908
+ "placeholder",
1909
+ "pulse",
1910
+ "disabled"
1911
+ ]),
1912
+ m(q, {
1913
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
1914
+ "model-value": e.block.decorative === !0,
1915
+ label: p(c).image.decorative,
1916
+ "onUpdate:modelValue": n[4] ||= (e) => j("decorative", e)
1917
+ }, {
1918
+ default: i(() => [S("span", null, [D(T(p(c).image.decorative) + " ", 1), S("span", ai, T(p(c).image.decorativeHint), 1)])]),
1919
+ _: 1
1920
+ }, 8, ["model-value", "label"])
1921
+ ]),
1922
+ S("div", oi, [
1923
+ S("label", { class: h(p(H)) }, T(p(c).image.width), 3),
1924
+ S("select", {
1925
+ class: h(p(G)),
1926
+ "data-testid": "image-width-mode",
1927
+ value: O.value,
1928
+ onChange: n[5] ||= (e) => ee(e.target.value)
1929
+ }, [
1930
+ S("option", ci, T(p(c).image.fullWidth), 1),
1931
+ n[15] ||= S("option", { value: "300" }, "300px", -1),
1932
+ n[16] ||= S("option", { value: "400" }, "400px", -1),
1933
+ n[17] ||= S("option", { value: "500" }, "500px", -1),
1934
+ S("option", li, T(p(c).image.widthCustom), 1)
1935
+ ], 42, si),
1936
+ O.value === "custom" ? (o(), _("div", ui, [S("input", {
1937
+ type: "number",
1938
+ "data-testid": "image-width-input",
1939
+ class: h(p(W)),
1940
+ value: typeof e.block.width == "number" ? e.block.width : Ti,
1941
+ min: "20",
1942
+ onInput: n[6] ||= (e) => ne(e.target.value)
1943
+ }, null, 42, di), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
1944
+ ]),
1945
+ S("div", fi, [
1946
+ p(be) ? (o(), _("div", pi, [S("span", mi, T(p(c).image.height), 1), m(pt, {
1947
+ linked: p(z),
1948
+ "link-label": p(c).image.lockAspectRatio,
1949
+ "unlink-label": p(c).image.unlockAspectRatio,
1950
+ testid: "image-aspect-lock",
1951
+ onToggle: Ee
1952
+ }, null, 8, [
1953
+ "linked",
1954
+ "link-label",
1955
+ "unlink-label"
1956
+ ])])) : (o(), _("label", {
1957
+ key: 1,
1958
+ class: h(p(H))
1959
+ }, T(p(c).image.height), 3)),
1960
+ p(z) ? (o(), _(w, { key: 2 }, [S("div", hi, [S("input", {
1961
+ type: "number",
1962
+ "data-testid": "image-locked-height-input",
1963
+ class: h(p(W)),
1964
+ value: De.value ?? p(Se) ?? "",
1965
+ min: "1",
1966
+ onInput: n[7] ||= (e) => Oe(e.target.value),
1967
+ onBlur: n[8] ||= (e) => De.value = null
1968
+ }, null, 42, gi), S("span", { class: h(p(U)) }, "px", 2)]), p(we) === null ? v("", !0) : (o(), _("p", _i, T(p(l)(p(c).image.heightCapped, { height: p(we) })), 1))], 64)) : v("", !0),
1969
+ p(z) ? v("", !0) : (o(), _("select", {
1970
+ key: 3,
1971
+ class: h(p(G)),
1972
+ "data-testid": "image-height-mode",
1973
+ value: A.value,
1974
+ onChange: n[9] ||= (e) => M(e.target.value)
1975
+ }, [S("option", yi, T(p(c).image.heightAuto), 1), S("option", bi, T(p(c).image.heightCustom), 1)], 42, vi)),
1976
+ !p(z) && A.value === "custom" ? (o(), _("div", xi, [S("input", {
1977
+ type: "number",
1978
+ "data-testid": "image-height-input",
1979
+ class: h(p(W)),
1980
+ value: e.block.height,
1981
+ min: "20",
1982
+ onInput: n[10] ||= (e) => N(e.target.value)
1983
+ }, null, 42, Si), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
1984
+ ]),
1985
+ m(Et, {
1986
+ "model-value": e.block.borderRadius,
1987
+ label: p(c).image.borderRadius,
1988
+ "testid-prefix": "image",
1989
+ "onUpdate:modelValue": te
1990
+ }, null, 8, ["model-value", "label"]),
1991
+ m(bt, {
1992
+ "model-value": e.block.border,
1993
+ "testid-prefix": "image",
1994
+ "onUpdate:modelValue": n[11] ||= (e) => j("border", e)
1995
+ }, null, 8, ["model-value"]),
1996
+ S("div", Ci, [S("label", { class: h(p(H)) }, T(p(c).title.align), 3), m(Y, {
1997
+ options: [
1998
+ {
1999
+ value: "left",
2000
+ label: p(c).title.alignLeft
2001
+ },
2002
+ {
2003
+ value: "center",
2004
+ label: p(c).title.alignCenter
2005
+ },
2006
+ {
2007
+ value: "right",
2008
+ label: p(c).title.alignRight
2009
+ }
2010
+ ],
2011
+ "model-value": e.block.align,
2012
+ "onUpdate:modelValue": n[12] ||= (e) => j("align", e)
2013
+ }, null, 8, ["options", "model-value"])]),
2014
+ S("div", wi, [
2015
+ S("label", { class: h(p(H)) }, T(p(c).image.linkUrl), 3),
2016
+ m(J, {
2017
+ "model-value": e.block.linkUrl || "",
2018
+ type: "url",
2019
+ placeholder: p(c).image.imageUrlPlaceholder,
2020
+ "onUpdate:modelValue": n[13] ||= (e) => j("linkUrl", e)
2021
+ }, null, 8, ["model-value", "placeholder"]),
2022
+ e.block.linkUrl ? (o(), b(q, {
2023
+ key: 0,
2024
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2025
+ "model-value": e.block.linkOpenInNewTab ?? !1,
2026
+ label: p(c).image.openInNewTab,
2027
+ "onUpdate:modelValue": n[14] ||= (e) => j("linkOpenInNewTab", e)
2028
+ }, null, 8, ["model-value", "label"])) : v("", !0)
2029
+ ])
2030
+ ], 64));
2031
+ }
2032
+ }), Oi = { class: "tpl:mb-3.5" }, $ = /* @__PURE__ */ l({
2033
+ __name: "FieldRow",
2034
+ props: { label: {} },
2035
+ setup(e) {
2036
+ return (t, n) => (o(), _("div", Oi, [e.label ? (o(), _("label", {
2037
+ key: 0,
2038
+ class: h(p(H))
2039
+ }, T(e.label), 3)) : v("", !0), a(t.$slots, "default")]));
2040
+ }
2041
+ }), ki = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ai = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ji = [
2042
+ "value",
2043
+ "placeholder",
2044
+ "onInput"
2045
+ ], Mi = ["title", "onClick"], Ni = { 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)]" }, Pi = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Fi = ["value"], Ii = { value: "" }, Li = ["value"], Ri = ["value"], zi = /* @__PURE__ */ l({
2046
+ __name: "MenuToolbar",
2047
+ props: {
2048
+ block: {},
2049
+ fontFamilies: {}
2050
+ },
2051
+ emits: ["update"],
2052
+ setup(e, { emit: t }) {
2053
+ let n = e, a = t, { t: s } = B(), c = g(() => [
2054
+ {
2055
+ key: "openInNewTab",
2056
+ label: s.menu.openInNewTab
2057
+ },
2058
+ {
2059
+ key: "bold",
2060
+ label: s.menu.bold
2061
+ },
2062
+ {
2063
+ key: "underline",
2064
+ label: s.menu.underline
2065
+ }
2066
+ ]), l = g(() => [
2067
+ {
2068
+ value: "left",
2069
+ label: s.title.alignLeft,
2070
+ icon: Ue
2071
+ },
2072
+ {
2073
+ value: "center",
2074
+ label: s.title.alignCenter,
2075
+ icon: Xe
2076
+ },
2077
+ {
2078
+ value: "right",
2079
+ label: s.title.alignRight,
2080
+ icon: Re
2081
+ }
2082
+ ]);
2083
+ function u(e, t) {
2084
+ a("update", { [e]: t });
2085
+ }
2086
+ function d() {
2087
+ let e = {
2088
+ id: j(),
2089
+ text: "",
2090
+ url: "",
2091
+ openInNewTab: !1,
2092
+ bold: !1,
2093
+ underline: !1
2094
+ };
2095
+ a("update", { items: [...n.block.items, e] });
2096
+ }
2097
+ function f(e, t, r) {
2098
+ let i = n.block.items.map((n) => n.id === e ? {
2099
+ ...n,
2100
+ [t]: r
2101
+ } : n);
2102
+ a("update", { items: i });
2103
+ }
2104
+ function v(e) {
2105
+ a("update", { items: n.block.items.filter((t) => t.id !== e) });
2106
+ }
2107
+ return (t, n) => (o(), _(w, null, [
2108
+ m($, { label: p(s).menu.items }, {
2109
+ default: i(() => [S("div", ki, [(o(!0), _(w, null, r(e.block.items, (t) => (o(), _("div", {
2110
+ key: t.id,
2111
+ 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"
2112
+ }, [
2113
+ S("div", Ai, [S("input", {
2114
+ type: "text",
2115
+ class: h([p(G), "tpl:flex-1"]),
2116
+ value: t.text,
2117
+ placeholder: p(s).menu.text,
2118
+ onInput: (e) => f(t.id, "text", e.target.value)
2119
+ }, null, 42, ji), S("button", {
2120
+ class: h(p(et)),
2121
+ title: p(s).menu.removeItem,
2122
+ onClick: (e) => v(t.id)
2123
+ }, [m(p(Ke), {
2124
+ size: 14,
2125
+ "stroke-width": 2
2126
+ })], 10, Mi)]),
2127
+ m(J, {
2128
+ "model-value": t.url,
2129
+ type: "url",
2130
+ placeholder: p(s).menu.urlPlaceholder,
2131
+ "onUpdate:modelValue": (e) => f(t.id, "url", e)
2132
+ }, null, 8, [
2133
+ "model-value",
2134
+ "placeholder",
2135
+ "onUpdate:modelValue"
2136
+ ]),
2137
+ S("div", Ni, [(o(!0), _(w, null, r(c.value, (e) => (o(), b(q, {
2138
+ key: e.key,
2139
+ "model-value": t[e.key],
2140
+ label: e.label,
2141
+ "onUpdate:modelValue": (n) => f(t.id, e.key, n)
2142
+ }, null, 8, [
2143
+ "model-value",
2144
+ "label",
2145
+ "onUpdate:modelValue"
2146
+ ]))), 128))]),
2147
+ S("div", Pi, [S("label", { class: h([p(H), "tpl:!mb-0"]) }, T(p(s).menu.color), 3), m(K, {
2148
+ "swatch-only": "",
2149
+ "model-value": t.color || e.block.linkColor || e.block.color || "",
2150
+ "onUpdate:modelValue": (e) => f(t.id, "color", e)
2151
+ }, null, 8, ["model-value", "onUpdate:modelValue"])])
2152
+ ]))), 128)), S("button", {
2153
+ class: h(p(tt)),
2154
+ onClick: d
2155
+ }, [m(p(V), {
2156
+ size: 14,
2157
+ "stroke-width": 2
2158
+ }), D(" " + T(p(s).menu.addItem), 1)], 2)])]),
2159
+ _: 1
2160
+ }, 8, ["label"]),
2161
+ m($, { label: p(s).menu.fontFamily }, {
2162
+ default: i(() => [S("select", {
2163
+ class: h(p(G)),
2164
+ value: p(st)(e.block.fontFamily),
2165
+ onChange: n[0] ||= (e) => u("fontFamily", e.target.value || void 0)
2166
+ }, [S("option", Ii, T(p(s).title.inheritFont), 1), (o(!0), _(w, null, r(e.fontFamilies, (e) => (o(), _("option", {
2167
+ key: e.value,
2168
+ value: e.value
2169
+ }, T(e.label), 9, Li))), 128))], 42, Fi)]),
2170
+ _: 1
2171
+ }, 8, ["label"]),
2172
+ m($, { label: p(s).menu.fontSize }, {
2173
+ default: i(() => [m(X, {
2174
+ "model-value": e.block.fontSize,
2175
+ min: 8,
2176
+ max: 48,
2177
+ suffix: "px",
2178
+ "onUpdate:modelValue": n[1] ||= (e) => u("fontSize", e)
2179
+ }, null, 8, ["model-value"])]),
2180
+ _: 1
2181
+ }, 8, ["label"]),
2182
+ m($, { label: p(s).menu.color }, {
2183
+ default: i(() => [m(K, {
2184
+ "model-value": e.block.color ?? "",
2185
+ "onUpdate:modelValue": n[2] ||= (e) => u("color", e || void 0)
2186
+ }, null, 8, ["model-value"])]),
2187
+ _: 1
2188
+ }, 8, ["label"]),
2189
+ m($, { label: p(s).menu.linkColor }, {
2190
+ default: i(() => [m(K, {
2191
+ "model-value": e.block.linkColor || e.block.color || "",
2192
+ "onUpdate:modelValue": n[3] ||= (e) => u("linkColor", e || void 0)
2193
+ }, null, 8, ["model-value"])]),
2194
+ _: 1
2195
+ }, 8, ["label"]),
2196
+ m($, { label: p(s).menu.textAlign }, {
2197
+ default: i(() => [m(Y, {
2198
+ options: l.value,
2199
+ "model-value": e.block.textAlign,
2200
+ "onUpdate:modelValue": n[4] ||= (e) => u("textAlign", e)
2201
+ }, null, 8, ["options", "model-value"])]),
2202
+ _: 1
2203
+ }, 8, ["label"]),
2204
+ m($, { label: p(s).menu.separator }, {
2205
+ default: i(() => [S("input", {
2206
+ type: "text",
2207
+ class: h(p(G)),
2208
+ value: e.block.separator,
2209
+ onInput: n[5] ||= (e) => u("separator", e.target.value)
2210
+ }, null, 42, Ri)]),
2211
+ _: 1
2212
+ }, 8, ["label"]),
2213
+ m($, { label: p(s).menu.separatorColor }, {
2214
+ default: i(() => [m(K, {
2215
+ "model-value": e.block.separatorColor,
2216
+ "onUpdate:modelValue": n[6] ||= (e) => u("separatorColor", e)
2217
+ }, null, 8, ["model-value"])]),
2218
+ _: 1
2219
+ }, 8, ["label"]),
2220
+ m($, { label: p(s).menu.spacing }, {
2221
+ default: i(() => [m(X, {
2222
+ "model-value": e.block.spacing,
2223
+ min: 0,
2224
+ max: 50,
2225
+ suffix: "px",
2226
+ "onUpdate:modelValue": n[7] ||= (e) => u("spacing", e)
2227
+ }, null, 8, ["model-value"])]),
2228
+ _: 1
2229
+ }, 8, ["label"])
2230
+ ], 64));
2231
+ }
2232
+ }), Bi = {
2233
+ class: "tpl:mb-3.5",
2234
+ "data-testid": "paragraph-spacing"
2235
+ }, Vi = { class: "tpl:flex tpl:items-stretch" }, Hi = ["value"], Ui = /* @__PURE__ */ l({
2236
+ __name: "ParagraphToolbar",
2237
+ props: { block: {} },
2238
+ emits: ["update"],
2239
+ setup(e, { emit: t }) {
2240
+ let n = t, { t: r } = B();
2241
+ return (t, i) => (o(), _("div", Bi, [S("label", { class: h(p(H)) }, T(p(r).paragraph.paragraphSpacing), 3), S("div", Vi, [S("input", {
2242
+ type: "number",
2243
+ class: h(p(W)),
2244
+ value: e.block.paragraphSpacing ?? p(ne).paragraphGap,
2245
+ min: "0",
2246
+ max: "64",
2247
+ onInput: i[0] ||= (e) => n("update", { paragraphSpacing: Number(e.target.value) })
2248
+ }, null, 42, Hi), S("span", { class: h(p(U)) }, "px", 2)])]));
2249
+ }
2250
+ });
2251
+ //#endregion
2252
+ //#region src/utils/rebalanceColumnChildren.ts
2253
+ function Wi(e) {
2254
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
2255
+ }
2256
+ function Gi(e, t) {
2257
+ let n = Wi(t);
2258
+ if (e.length === n) return e;
2259
+ if (e.length < n) {
2260
+ let t = Array.from({ length: n - e.length }, () => []);
2261
+ return [...e, ...t];
2262
+ }
2263
+ let r = e.slice(0, n), i = e.slice(n).flat(), a = [...r[n - 1], ...i];
2264
+ return [...r.slice(0, n - 1), a];
2265
+ }
2266
+ //#endregion
2267
+ //#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
2268
+ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
2269
+ key: 0,
2270
+ class: "tpl:mb-3.5"
2271
+ }, Xi = {
2272
+ key: 2,
2273
+ class: "tpl:mb-3.5"
2274
+ }, Zi = {
2275
+ key: 0,
2276
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
2277
+ }, Qi = {
2278
+ key: 1,
2279
+ class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
2280
+ }, $i = /* @__PURE__ */ l({
2281
+ __name: "SectionToolbar",
2282
+ props: { block: {} },
2283
+ emits: ["update"],
2284
+ setup(e, { emit: t }) {
2285
+ let i = e, a = t, { t: s } = B(), c = n(xe, void 0), l = n(z, void 0), u = c !== void 0 && ee(c), d = g(() => l !== !1 || !!i.block.wrapper), f = g(() => u && !i.block.wrapper), y = g(() => u && d.value), x = g(() => N(i.block)?.applied === !0), C = g(() => [
2286
+ {
2287
+ value: "1",
2288
+ label: s.section.column1
2289
+ },
2290
+ {
2291
+ value: "2",
2292
+ label: s.section.column2
2293
+ },
2294
+ {
2295
+ value: "3",
2296
+ label: s.section.column3
2297
+ },
2298
+ {
2299
+ value: "1-2",
2300
+ label: s.section.ratio12
2301
+ },
2302
+ {
2303
+ value: "2-1",
2304
+ label: s.section.ratio21
2305
+ }
2306
+ ]);
2307
+ function E(e) {
2308
+ let t = e.target.value, n = Gi(i.block.children, t);
2309
+ a("update", {
2310
+ columns: t,
2311
+ children: n
2312
+ });
2313
+ }
2314
+ function D(e) {
2315
+ a("update", { stackOnMobile: e });
2316
+ }
2317
+ function O(e) {
2318
+ a("update", { borderRadius: e });
2319
+ }
2320
+ function k(e) {
2321
+ a("update", { wrapper: e ? { padding: {
2322
+ top: 20,
2323
+ right: 20,
2324
+ bottom: 20,
2325
+ left: 20
2326
+ } } : void 0 });
2327
+ }
2328
+ function A(e) {
2329
+ a("update", { wrapper: {
2330
+ ...i.block.wrapper,
2331
+ ...e
2332
+ } });
2333
+ }
2334
+ function j(e) {
2335
+ A({ padding: e });
2336
+ }
2337
+ function M(e) {
2338
+ A({ borderRadius: e });
2339
+ }
2340
+ return (t, n) => (o(), _(w, null, [
2341
+ S("div", Ki, [S("label", { class: h(p(H)) }, T(p(s).section.columns), 3), S("select", {
2342
+ class: h(p(G)),
2343
+ value: e.block.columns,
2344
+ onChange: E
2345
+ }, [(o(!0), _(w, null, r(C.value, (e) => (o(), _("option", {
2346
+ key: e.value,
2347
+ value: e.value
2348
+ }, T(e.label), 9, Ji))), 128))], 42, qi)]),
2349
+ e.block.columns === "1" ? v("", !0) : (o(), _("div", Yi, [m(q, {
2350
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2351
+ "model-value": e.block.stackOnMobile !== !1,
2352
+ label: p(s).section.stackOnMobile,
2353
+ "onUpdate:modelValue": n[0] ||= (e) => D(e)
2354
+ }, null, 8, ["model-value", "label"])])),
2355
+ m(Et, {
2356
+ "model-value": e.block.borderRadius,
2357
+ label: p(s).section.borderRadius,
2358
+ max: 50,
2359
+ "testid-prefix": "section",
2360
+ "onUpdate:modelValue": O
2361
+ }, null, 8, ["model-value", "label"]),
2362
+ x.value ? v("", !0) : (o(), b(bt, {
2363
+ key: 1,
2364
+ "model-value": e.block.border,
2365
+ "testid-prefix": "section",
2366
+ "onUpdate:modelValue": n[1] ||= (e) => a("update", { border: e })
2367
+ }, null, 8, ["model-value"])),
2368
+ d.value ? (o(), _("div", Xi, [
2369
+ m(q, {
2370
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2371
+ "model-value": !!e.block.wrapper,
2372
+ label: p(s).section.wrapperEnable,
2373
+ disabled: f.value,
2374
+ "onUpdate:modelValue": n[2] ||= (e) => k(e)
2375
+ }, null, 8, [
2376
+ "model-value",
2377
+ "label",
2378
+ "disabled"
2379
+ ]),
2380
+ y.value ? (o(), _("p", Zi, T(p(s).section.wrapperLayoutConflict), 1)) : v("", !0),
2381
+ e.block.wrapper ? (o(), _("div", Qi, [
2382
+ S("div", null, [S("label", { class: h(p(H)) }, T(p(s).blockSettings.color), 3), m(K, {
2383
+ "model-value": e.block.wrapper.backgroundColor ?? "",
2384
+ "allow-transparent": "",
2385
+ "onUpdate:modelValue": n[3] ||= (e) => A({ backgroundColor: e })
2386
+ }, null, 8, ["model-value"])]),
2387
+ m(On, {
2388
+ "model-value": e.block.wrapper.backgroundImage,
2389
+ "testid-prefix": "section-wrapper",
2390
+ "onUpdate:modelValue": n[4] ||= (e) => A({ backgroundImage: e })
2391
+ }, null, 8, ["model-value"]),
2392
+ m(_n, {
2393
+ label: p(s).blockSettings.padding,
2394
+ "model-value": e.block.wrapper.padding ?? {
2395
+ top: 0,
2396
+ right: 0,
2397
+ bottom: 0,
2398
+ left: 0
2399
+ },
2400
+ "onUpdate:modelValue": j
2401
+ }, null, 8, ["label", "model-value"]),
2402
+ m(Et, {
2403
+ "model-value": e.block.wrapper.borderRadius,
2404
+ label: p(s).section.borderRadius,
2405
+ max: 50,
2406
+ "testid-prefix": "section-wrapper",
2407
+ "onUpdate:modelValue": M
2408
+ }, null, 8, ["model-value", "label"])
2409
+ ])) : v("", !0)
2410
+ ])) : v("", !0)
2411
+ ], 64));
2412
+ }
2413
+ }), ea = { class: "tpl:mb-3.5" }, ta = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, na = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ra = ["value", "onChange"], ia = ["value"], aa = ["title", "onClick"], oa = { class: "tpl:mb-3.5" }, sa = ["value"], ca = { value: "solid" }, la = { value: "outlined" }, ua = { value: "rounded" }, da = { value: "square" }, fa = { value: "circle" }, pa = { value: "plain" }, ma = { class: "tpl:mb-3.5" }, ha = ["value"], ga = { value: "brand" }, _a = { value: "dark" }, va = { value: "light" }, ya = { class: "tpl:mb-3.5" }, ba = { class: "tpl:mb-3.5" }, xa = { class: "tpl:flex tpl:items-stretch" }, Sa = ["value"], Ca = { class: "tpl:mb-3.5" }, wa = /* @__PURE__ */ l({
2414
+ __name: "SocialToolbar",
2415
+ props: { block: {} },
2416
+ emits: ["update"],
2417
+ setup(e, { emit: t }) {
2418
+ let n = e, i = t, { t: a } = B();
2419
+ function s(e, t) {
2420
+ i("update", { [e]: t });
2421
+ }
2422
+ function c() {
2423
+ let e = {
2424
+ id: j(),
2425
+ platform: "facebook",
2426
+ url: ""
2427
+ };
2428
+ i("update", { icons: [...n.block.icons, e] });
2429
+ }
2430
+ function l(e, t, r) {
2431
+ let a = n.block.icons.map((n) => n.id === e ? {
2432
+ ...n,
2433
+ [t]: r
2434
+ } : n);
2435
+ i("update", { icons: a });
2436
+ }
2437
+ function u(e) {
2438
+ i("update", { icons: n.block.icons.filter((t) => t.id !== e) });
2439
+ }
2440
+ return (t, n) => (o(), _(w, null, [
2441
+ S("div", ea, [S("label", { class: h(p(H)) }, T(p(a).social.icons), 3), S("div", ta, [(o(!0), _(w, null, r(e.block.icons, (e) => (o(), _("div", {
2442
+ key: e.id,
2443
+ 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"
2444
+ }, [S("div", na, [S("select", {
2445
+ "data-testid": "social-platform-select",
2446
+ class: h([p(G), "tpl:flex-1"]),
2447
+ value: e.platform,
2448
+ onChange: (t) => l(e.id, "platform", t.target.value)
2449
+ }, [(o(!0), _(w, null, r(p(_e), (e) => (o(), _("option", {
2450
+ key: e,
2451
+ value: e
2452
+ }, T(p(a).social.platforms[e]), 9, ia))), 128))], 42, ra), S("button", {
2453
+ class: h(p(et)),
2454
+ title: p(a).social.removeIcon,
2455
+ onClick: (t) => u(e.id)
2456
+ }, [m(p(Ke), {
2457
+ size: 14,
2458
+ "stroke-width": 2
2459
+ })], 10, aa)]), m(J, {
2460
+ "model-value": e.url,
2461
+ type: "url",
2462
+ placeholder: p(a).social.urlPlaceholder,
2463
+ "onUpdate:modelValue": (t) => l(e.id, "url", t)
2464
+ }, null, 8, [
2465
+ "model-value",
2466
+ "placeholder",
2467
+ "onUpdate:modelValue"
2468
+ ])]))), 128)), S("button", {
2469
+ class: h(p(tt)),
2470
+ onClick: c
2471
+ }, [m(p(V), {
2472
+ size: 14,
2473
+ "stroke-width": 2
2474
+ }), D(" " + T(p(a).social.addIcon), 1)], 2)])]),
2475
+ S("div", oa, [S("label", { class: h(p(H)) }, T(p(a).social.style), 3), S("select", {
2476
+ class: h(p(G)),
2477
+ value: e.block.iconStyle,
2478
+ onChange: n[0] ||= (e) => s("iconStyle", e.target.value)
2479
+ }, [
2480
+ S("option", ca, T(p(a).social.styleSolid), 1),
2481
+ S("option", la, T(p(a).social.styleOutlined), 1),
2482
+ S("option", ua, T(p(a).social.styleRounded), 1),
2483
+ S("option", da, T(p(a).social.styleSquare), 1),
2484
+ S("option", fa, T(p(a).social.styleCircle), 1),
2485
+ S("option", pa, T(p(a).social.stylePlain), 1)
2486
+ ], 42, sa)]),
2487
+ S("div", ma, [S("label", { class: h(p(H)) }, T(p(a).social.color), 3), S("select", {
2488
+ "data-testid": "social-tone-select",
2489
+ class: h(p(G)),
2490
+ value: e.block.iconTone ?? "brand",
2491
+ onChange: n[1] ||= (e) => s("iconTone", e.target.value)
2492
+ }, [
2493
+ S("option", ga, T(p(a).social.colorBrand), 1),
2494
+ S("option", _a, T(p(a).social.colorDark), 1),
2495
+ S("option", va, T(p(a).social.colorLight), 1)
2496
+ ], 42, ha)]),
2497
+ S("div", ya, [S("label", { class: h(p(H)) }, T(p(a).social.size), 3), m(Y, {
2498
+ options: [
2499
+ {
2500
+ value: "small",
2501
+ label: p(a).social.sizeSmall
2502
+ },
2503
+ {
2504
+ value: "medium",
2505
+ label: p(a).social.sizeMedium
2506
+ },
2507
+ {
2508
+ value: "large",
2509
+ label: p(a).social.sizeLarge
2510
+ }
2511
+ ],
2512
+ "model-value": e.block.iconSize,
2513
+ "onUpdate:modelValue": n[2] ||= (e) => s("iconSize", e)
2514
+ }, null, 8, ["options", "model-value"])]),
2515
+ S("div", ba, [S("label", { class: h(p(H)) }, T(p(a).social.spacing), 3), S("div", xa, [S("input", {
2516
+ type: "number",
2517
+ class: h(p(W)),
2518
+ value: e.block.spacing,
2519
+ min: "0",
2520
+ max: "50",
2521
+ onInput: n[3] ||= (e) => s("spacing", Number(e.target.value))
2522
+ }, null, 42, Sa), S("span", { class: h(p(U)) }, "px", 2)])]),
2523
+ S("div", Ca, [S("label", { class: h(p(H)) }, T(p(a).social.align), 3), m(Y, {
2524
+ options: [
2525
+ {
2526
+ value: "left",
2527
+ label: p(a).title.alignLeft,
2528
+ icon: p(Ue)
2529
+ },
2530
+ {
2531
+ value: "center",
2532
+ label: p(a).title.alignCenter,
2533
+ icon: p(Xe)
2534
+ },
2535
+ {
2536
+ value: "right",
2537
+ label: p(a).title.alignRight,
2538
+ icon: p(Re)
2539
+ }
2540
+ ],
2541
+ "model-value": e.block.align,
2542
+ "onUpdate:modelValue": n[4] ||= (e) => s("align", e)
2543
+ }, null, 8, ["options", "model-value"])])
2544
+ ], 64));
2545
+ }
2546
+ }), Ta = { class: "tpl:mb-3.5" }, Ea = { class: "tpl:flex tpl:items-stretch" }, Da = ["value"], Oa = ["value"], ka = /* @__PURE__ */ l({
2547
+ __name: "SpacerToolbar",
2548
+ props: { block: {} },
2549
+ emits: ["update"],
2550
+ setup(e, { emit: t }) {
2551
+ let n = t, { t: r } = B();
2552
+ return (t, i) => (o(), _("div", Ta, [
2553
+ S("label", { class: h(p(H)) }, T(p(r).spacer.height), 3),
2554
+ S("div", Ea, [S("input", {
2555
+ type: "number",
2556
+ class: h(p(W)),
2557
+ value: e.block.height,
2558
+ min: "10",
2559
+ max: "100",
2560
+ onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
2561
+ }, null, 42, Da), S("span", { class: h(p(U)) }, "px", 2)]),
2562
+ S("input", {
2563
+ type: "range",
2564
+ class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
2565
+ value: e.block.height,
2566
+ min: "10",
2567
+ max: "100",
2568
+ onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
2569
+ }, null, 40, Oa)
2570
+ ]));
2571
+ }
2572
+ }), Aa = { class: "tpl:mb-3.5" }, ja = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Ma = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Na = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Pa = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Fa = ["disabled"], Ia = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, La = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Ra = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, za = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ba = ["disabled"], Va = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ha = { class: "tpl:mb-3.5" }, Ua = {
2573
+ key: 0,
2574
+ class: "tpl:mb-3.5"
2575
+ }, Wa = { class: "tpl:mb-3.5" }, Ga = { class: "tpl:mb-3.5" }, Ka = { class: "tpl:flex tpl:items-stretch" }, qa = ["value"], Ja = { class: "tpl:mb-3.5" }, Ya = { class: "tpl:flex tpl:items-stretch" }, Xa = ["value"], Za = { class: "tpl:mb-3.5" }, Qa = ["value"], $a = { value: "" }, eo = ["value"], to = { class: "tpl:mb-3.5" }, no = { class: "tpl:flex tpl:items-stretch" }, ro = ["value"], io = { class: "tpl:mb-3.5" }, ao = { class: "tpl:mb-3.5" }, oo = /* @__PURE__ */ l({
2576
+ __name: "TableToolbar",
2577
+ props: {
2578
+ block: {},
2579
+ fontFamilies: {}
2580
+ },
2581
+ emits: ["update"],
2582
+ setup(e, { emit: t }) {
2583
+ let n = e, i = t, { t: a } = B(), s = g(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
2584
+ function c(e, t) {
2585
+ i("update", { [e]: t });
2586
+ }
2587
+ function l() {
2588
+ let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
2589
+ id: j(),
2590
+ cells: Array.from({ length: e }, () => ({
2591
+ id: j(),
2592
+ content: ""
2593
+ }))
2594
+ };
2595
+ i("update", { rows: [...n.block.rows, t] });
2596
+ }
2597
+ function u(e) {
2598
+ i("update", { rows: n.block.rows.filter((t) => t.id !== e) });
2599
+ }
2600
+ function d() {
2601
+ let e = n.block.rows.map((e) => ({
2602
+ ...e,
2603
+ cells: [...e.cells, {
2604
+ id: j(),
2605
+ content: ""
2606
+ }]
2607
+ }));
2608
+ i("update", { rows: e });
2609
+ }
2610
+ function f(e) {
2611
+ let t = n.block.rows.map((t) => ({
2612
+ ...t,
2613
+ cells: t.cells.filter((t, n) => n !== e)
2614
+ }));
2615
+ i("update", { rows: t });
2616
+ }
2617
+ return (t, n) => (o(), _(w, null, [
2618
+ S("div", Aa, [S("label", { class: h(p(H)) }, T(p(a).table.dimensions), 3), S("div", ja, [S("div", Ma, [S("span", Na, T(p(a).table.rows), 1), S("div", Pa, [
2619
+ S("button", {
2620
+ 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",
2621
+ disabled: e.block.rows.length <= 1,
2622
+ onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
2623
+ }, [m(p(Ye), {
2624
+ size: 12,
2625
+ "stroke-width": 2
2626
+ })], 8, Fa),
2627
+ S("span", Ia, T(e.block.rows.length), 1),
2628
+ S("button", {
2629
+ 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)]",
2630
+ onClick: l
2631
+ }, [m(p(V), {
2632
+ size: 12,
2633
+ "stroke-width": 2
2634
+ })])
2635
+ ])]), S("div", La, [S("span", Ra, T(p(a).table.columns), 1), S("div", za, [
2636
+ S("button", {
2637
+ 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",
2638
+ disabled: s.value <= 1,
2639
+ onClick: n[1] ||= (e) => f(s.value - 1)
2640
+ }, [m(p(Ye), {
2641
+ size: 12,
2642
+ "stroke-width": 2
2643
+ })], 8, Ba),
2644
+ S("span", Va, T(s.value), 1),
2645
+ S("button", {
2646
+ 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)]",
2647
+ onClick: d
2648
+ }, [m(p(V), {
2649
+ size: 12,
2650
+ "stroke-width": 2
2651
+ })])
2652
+ ])])])]),
2653
+ S("div", Ha, [m(q, {
2654
+ class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
2655
+ "model-value": e.block.hasHeaderRow,
2656
+ label: p(a).table.hasHeaderRow,
2657
+ "onUpdate:modelValue": n[2] ||= (e) => c("hasHeaderRow", e)
2658
+ }, null, 8, ["model-value", "label"])]),
2659
+ e.block.hasHeaderRow ? (o(), _("div", Ua, [S("label", { class: h(p(H)) }, T(p(a).table.headerBackgroundColor), 3), m(K, {
2660
+ "model-value": e.block.headerBackgroundColor ?? "",
2661
+ "seed-color": p(nt),
2662
+ placeholder: p(a).table.noHeaderBg,
2663
+ "onUpdate:modelValue": n[3] ||= (e) => c("headerBackgroundColor", e || null)
2664
+ }, null, 8, [
2665
+ "model-value",
2666
+ "seed-color",
2667
+ "placeholder"
2668
+ ])])) : v("", !0),
2669
+ S("div", Wa, [S("label", { class: h(p(H)) }, T(p(a).table.borderColor), 3), m(K, {
2670
+ "model-value": e.block.borderColor,
2671
+ "onUpdate:modelValue": n[4] ||= (e) => c("borderColor", e)
2672
+ }, null, 8, ["model-value"])]),
2673
+ S("div", Ga, [S("label", { class: h(p(H)) }, T(p(a).table.borderWidth), 3), S("div", Ka, [S("input", {
2674
+ type: "number",
2675
+ class: h(p(W)),
2676
+ value: e.block.borderWidth,
2677
+ min: "0",
2678
+ max: "10",
2679
+ onInput: n[5] ||= (e) => c("borderWidth", Number(e.target.value))
2680
+ }, null, 42, qa), S("span", { class: h(p(U)) }, "px", 2)])]),
2681
+ S("div", Ja, [S("label", { class: h(p(H)) }, T(p(a).table.cellPadding), 3), S("div", Ya, [S("input", {
2682
+ type: "number",
2683
+ class: h(p(W)),
2684
+ value: e.block.cellPadding,
2685
+ min: "0",
2686
+ max: "30",
2687
+ onInput: n[6] ||= (e) => c("cellPadding", Number(e.target.value))
2688
+ }, null, 42, Xa), S("span", { class: h(p(U)) }, "px", 2)])]),
2689
+ S("div", Za, [S("label", { class: h(p(H)) }, T(p(a).table.fontFamily), 3), S("select", {
2690
+ class: h(p(G)),
2691
+ value: p(st)(e.block.fontFamily),
2692
+ onChange: n[7] ||= (e) => c("fontFamily", e.target.value || void 0)
2693
+ }, [S("option", $a, T(p(a).title.inheritFont), 1), (o(!0), _(w, null, r(e.fontFamilies, (e) => (o(), _("option", {
2694
+ key: e.value,
2695
+ value: e.value
2696
+ }, T(e.label), 9, eo))), 128))], 42, Qa)]),
2697
+ S("div", to, [S("label", { class: h(p(H)) }, T(p(a).table.fontSize), 3), S("div", no, [S("input", {
2698
+ type: "number",
2699
+ class: h(p(W)),
2700
+ value: e.block.fontSize,
2701
+ min: "10",
2702
+ max: "32",
2703
+ onInput: n[8] ||= (e) => c("fontSize", Number(e.target.value))
2704
+ }, null, 42, ro), S("span", { class: h(p(U)) }, "px", 2)])]),
2705
+ S("div", io, [S("label", { class: h(p(H)) }, T(p(a).table.color), 3), m(K, {
2706
+ "model-value": e.block.color ?? "",
2707
+ "onUpdate:modelValue": n[9] ||= (e) => c("color", e || void 0)
2708
+ }, null, 8, ["model-value"])]),
2709
+ S("div", ao, [S("label", { class: h(p(H)) }, T(p(a).table.textAlign), 3), m(Y, {
2710
+ options: [
2711
+ {
2712
+ value: "left",
2713
+ label: p(a).title.alignLeft,
2714
+ icon: p(Ue)
2715
+ },
2716
+ {
2717
+ value: "center",
2718
+ label: p(a).title.alignCenter,
2719
+ icon: p(Xe)
2720
+ },
2721
+ {
2722
+ value: "right",
2723
+ label: p(a).title.alignRight,
2724
+ icon: p(Re)
2725
+ }
2726
+ ],
2727
+ "model-value": e.block.textAlign,
2728
+ "onUpdate:modelValue": n[10] ||= (e) => c("textAlign", e)
2729
+ }, null, 8, ["options", "model-value"])])
2730
+ ], 64));
2731
+ }
2732
+ }), so = { class: "tpl:mb-3.5" }, co = ["value"], lo = { value: 1 }, uo = { value: 2 }, fo = { value: 3 }, po = { value: 4 }, mo = { class: "tpl:mb-3.5" }, ho = ["value"], go = { value: "" }, _o = ["value"], vo = { class: "tpl:mb-3.5" }, yo = { class: "tpl:mb-3.5" }, bo = /* @__PURE__ */ l({
2733
+ __name: "TitleToolbar",
2734
+ props: {
2735
+ block: {},
2736
+ fontFamilies: {}
2737
+ },
2738
+ emits: ["update"],
2739
+ setup(e, { emit: t }) {
2740
+ let n = t, { t: i } = B();
2741
+ function a(e, t) {
2742
+ n("update", { [e]: t });
2743
+ }
2744
+ return (t, n) => (o(), _(w, null, [
2745
+ S("div", so, [S("label", { class: h(p(H)) }, T(p(i).title.level), 3), S("select", {
2746
+ class: h(p(G)),
2747
+ value: e.block.level,
2748
+ onChange: n[0] ||= (e) => a("level", Number(e.target.value))
2749
+ }, [
2750
+ S("option", lo, T(p(i).title.heading1), 1),
2751
+ S("option", uo, T(p(i).title.heading2), 1),
2752
+ S("option", fo, T(p(i).title.heading3), 1),
2753
+ S("option", po, T(p(i).title.heading4), 1)
2754
+ ], 42, co)]),
2755
+ S("div", mo, [S("label", { class: h(p(H)) }, T(p(i).title.fontFamily), 3), S("select", {
2756
+ class: h(p(G)),
2757
+ value: p(st)(e.block.fontFamily),
2758
+ onChange: n[1] ||= (e) => a("fontFamily", e.target.value || void 0)
2759
+ }, [S("option", go, T(p(i).title.inheritFont), 1), (o(!0), _(w, null, r(e.fontFamilies, (e) => (o(), _("option", {
2760
+ key: e.value,
2761
+ value: e.value
2762
+ }, T(e.label), 9, _o))), 128))], 42, ho)]),
2763
+ S("div", vo, [S("label", { class: h(p(H)) }, T(p(i).title.color), 3), m(K, {
2764
+ "model-value": e.block.color ?? "",
2765
+ "onUpdate:modelValue": n[2] ||= (e) => a("color", e || void 0)
2766
+ }, null, 8, ["model-value"])]),
2767
+ S("div", yo, [S("label", { class: h(p(H)) }, T(p(i).title.align), 3), m(Y, {
2768
+ options: [
2769
+ {
2770
+ value: "left",
2771
+ label: p(i).title.alignLeft,
2772
+ icon: p(Ue)
2773
+ },
2774
+ {
2775
+ value: "center",
2776
+ label: p(i).title.alignCenter,
2777
+ icon: p(Xe)
2778
+ },
2779
+ {
2780
+ value: "right",
2781
+ label: p(i).title.alignRight,
2782
+ icon: p(Re)
2783
+ }
2784
+ ],
2785
+ "model-value": e.block.textAlign,
2786
+ "onUpdate:modelValue": n[3] ||= (e) => a("textAlign", e)
2787
+ }, null, 8, ["options", "model-value"])])
2788
+ ], 64));
2789
+ }
2790
+ }), xo = { class: "tpl:mb-3.5" }, So = {
2791
+ key: 0,
2792
+ class: "tpl:mb-3.5"
2793
+ }, Co = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, wo = [
2794
+ "value",
2795
+ "placeholder",
2796
+ "title"
2797
+ ], To = { class: "tpl:mb-3.5" }, Eo = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Do = { class: "tpl:mb-3.5" }, Oo = { class: "tpl:mb-3.5" }, ko = ["value"], Ao = { value: "full" }, jo = { value: "custom" }, Mo = {
2798
+ key: 0,
2799
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2800
+ }, No = ["value"], Po = { class: "tpl:mb-3.5" }, Fo = ["value"], Io = { value: "auto" }, Lo = { value: "custom" }, Ro = {
2801
+ key: 0,
2802
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2803
+ }, zo = ["value"], Bo = { class: "tpl:mb-3.5" }, Vo = 350, Ho = 200, Uo = /* @__PURE__ */ l({
2804
+ __name: "VideoToolbar",
2805
+ props: { block: {} },
2806
+ emits: ["update"],
2807
+ setup(e, { emit: t }) {
2808
+ let r = e, i = t, { t: a } = B(), c = n(Se, null), l = n(Ce, ie.liquid), u = Qe(), d = [
2809
+ 300,
2810
+ 400,
2811
+ 500
2812
+ ], f = g(() => !!c), y = g(() => P(r.block.url, l)), x = g(() => {
2813
+ let e = r.block.width;
2814
+ return e === "full" ? "full" : d.includes(e) ? String(e) : "custom";
2815
+ }), C = g(() => typeof r.block.height == "number" ? "custom" : "auto"), E = s(!1), { start: O } = ye(() => {
2816
+ E.value = !1;
2817
+ }, 1e3, { immediate: !1 });
2818
+ function k(e, t) {
2819
+ i("update", { [e]: t });
2820
+ }
2821
+ function A(e) {
2822
+ if (e === "custom") {
2823
+ let e = r.block.width;
2824
+ (typeof e != "number" || d.includes(e)) && k("width", Vo);
2825
+ } else k("width", e === "full" ? "full" : Number(e));
2826
+ }
2827
+ function j(e) {
2828
+ let t = Number(e);
2829
+ !Number.isFinite(t) || t <= 0 || k("width", t);
2830
+ }
2831
+ function ee(e) {
2832
+ k("height", e === "custom" ? Ho : void 0);
2833
+ }
2834
+ function M(e) {
2835
+ let t = Number(e);
2836
+ !Number.isFinite(t) || t <= 0 || k("height", t);
2837
+ }
2838
+ async function N() {
2839
+ let e = await c?.({ accept: ["images"] });
2840
+ u.alive && e && (k("thumbnailUrl", e.url), E.value = !0, O());
2841
+ }
2842
+ return (t, n) => (o(), _(w, null, [
2843
+ S("div", xo, [
2844
+ S("label", { class: h(p(H)) }, T(p(a).video.videoUrl), 3),
2845
+ m(J, {
2846
+ "model-value": e.block.url,
2847
+ type: "url",
2848
+ placeholder: p(a).video.videoUrlPlaceholder,
2849
+ "onUpdate:modelValue": n[0] ||= (e) => k("url", e)
2850
+ }, null, 8, ["model-value", "placeholder"]),
2851
+ e.block.url ? (o(), b(q, {
2852
+ key: 0,
2853
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2854
+ "model-value": e.block.openInNewTab ?? !1,
2855
+ label: p(a).video.openInNewTab,
2856
+ "onUpdate:modelValue": n[1] ||= (e) => k("openInNewTab", e)
2857
+ }, null, 8, ["model-value", "label"])) : v("", !0)
2858
+ ]),
2859
+ y.value ? (o(), _("div", So, [S("label", { class: h(p(H)) }, [D(T(p(a).video.placeholderUrl) + " ", 1), S("span", Co, T(p(a).video.optional), 1)], 2), S("input", {
2860
+ type: "url",
2861
+ class: h(p(G)),
2862
+ value: e.block.placeholderUrl || "",
2863
+ placeholder: p(a).video.placeholderUrlPlaceholder,
2864
+ title: p(a).video.placeholderUrlTooltip,
2865
+ onInput: n[2] ||= (e) => k("placeholderUrl", e.target.value)
2866
+ }, null, 42, wo)])) : v("", !0),
2867
+ S("div", To, [
2868
+ S("label", { class: h(p(H)) }, [D(T(p(a).video.customThumbnail) + " ", 1), S("span", Eo, T(p(a).video.optional), 1)], 2),
2869
+ m(J, {
2870
+ "model-value": e.block.thumbnailUrl,
2871
+ type: "url",
2872
+ placeholder: p(a).video.thumbnailPlaceholder,
2873
+ pulse: E.value,
2874
+ "onUpdate:modelValue": n[3] ||= (e) => k("thumbnailUrl", e)
2875
+ }, null, 8, [
2876
+ "model-value",
2877
+ "placeholder",
2878
+ "pulse"
2879
+ ]),
2880
+ f.value ? (o(), _("button", {
2881
+ key: 0,
2882
+ 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",
2883
+ style: {
2884
+ "border-color": "var(--tpl-border)",
2885
+ color: "var(--tpl-primary)",
2886
+ "background-color": "var(--tpl-bg)"
2887
+ },
2888
+ onClick: N
2889
+ }, [m(p(Ge), {
2890
+ size: 14,
2891
+ "stroke-width": 1.5
2892
+ }), D(" " + T(p(a).image.browseMedia), 1)])) : v("", !0)
2893
+ ]),
2894
+ S("div", Do, [S("label", { class: h(p(H)) }, T(p(a).video.altText), 3), m(J, {
2895
+ "model-value": e.block.alt,
2896
+ type: "text",
2897
+ placeholder: p(a).video.altTextPlaceholder,
2898
+ "onUpdate:modelValue": n[4] ||= (e) => k("alt", e)
2899
+ }, null, 8, ["model-value", "placeholder"])]),
2900
+ S("div", Oo, [
2901
+ S("label", { class: h(p(H)) }, T(p(a).video.width), 3),
2902
+ S("select", {
2903
+ class: h(p(G)),
2904
+ "data-testid": "video-width-mode",
2905
+ value: x.value,
2906
+ onChange: n[5] ||= (e) => A(e.target.value)
2907
+ }, [
2908
+ S("option", Ao, T(p(a).video.fullWidth), 1),
2909
+ n[10] ||= S("option", { value: "300" }, "300px", -1),
2910
+ n[11] ||= S("option", { value: "400" }, "400px", -1),
2911
+ n[12] ||= S("option", { value: "500" }, "500px", -1),
2912
+ S("option", jo, T(p(a).video.widthCustom), 1)
2913
+ ], 42, ko),
2914
+ x.value === "custom" ? (o(), _("div", Mo, [S("input", {
2915
+ type: "number",
2916
+ "data-testid": "video-width-input",
2917
+ class: h(p(W)),
2918
+ value: e.block.width,
2919
+ min: "20",
2920
+ onInput: n[6] ||= (e) => j(e.target.value)
2921
+ }, null, 42, No), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
2922
+ ]),
2923
+ S("div", Po, [
2924
+ S("label", { class: h(p(H)) }, T(p(a).video.height), 3),
2925
+ S("select", {
2926
+ class: h(p(G)),
2927
+ "data-testid": "video-height-mode",
2928
+ value: C.value,
2929
+ onChange: n[7] ||= (e) => ee(e.target.value)
2930
+ }, [S("option", Io, T(p(a).video.heightAuto), 1), S("option", Lo, T(p(a).video.heightCustom), 1)], 42, Fo),
2931
+ C.value === "custom" ? (o(), _("div", Ro, [S("input", {
2932
+ type: "number",
2933
+ "data-testid": "video-height-input",
2934
+ class: h(p(W)),
2935
+ value: e.block.height,
2936
+ min: "20",
2937
+ onInput: n[8] ||= (e) => M(e.target.value)
2938
+ }, null, 42, zo), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
2939
+ ]),
2940
+ S("div", Bo, [S("label", { class: h(p(H)) }, T(p(a).title.align), 3), m(Y, {
2941
+ options: [
2942
+ {
2943
+ value: "left",
2944
+ label: p(a).title.alignLeft
2945
+ },
2946
+ {
2947
+ value: "center",
2948
+ label: p(a).title.alignCenter
2949
+ },
2950
+ {
2951
+ value: "right",
2952
+ label: p(a).title.alignRight
2953
+ }
2954
+ ],
2955
+ "model-value": e.block.align,
2956
+ "onUpdate:modelValue": n[9] ||= (e) => k("align", e)
2957
+ }, null, 8, ["options", "model-value"])])
2958
+ ], 64));
2959
+ }
2960
+ }), Wo = ["aria-label"], Go = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Ko = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, qo = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Jo = { class: "tpl:flex tpl:gap-1" }, Yo = ["title"], Xo = ["title"], Zo = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Qo = /*@__PURE__*/ l({
2961
+ __name: "Toolbar",
2962
+ props: { block: {} },
2963
+ emits: [
2964
+ "update",
2965
+ "delete",
2966
+ "duplicate"
2967
+ ],
2968
+ setup(e, { emit: t }) {
2969
+ let r = E(() => import("./CountdownToolbar-Cqg8FUH-.js")), i = e, a = t, { t: s } = B(), l = be(ke, "Toolbar"), u = n(Oe, []), d = g(() => i.block.type), f = g(() => re(i.block)), h = g(() => {
2970
+ if (f.value) return u.find((e) => e.type === i.block.customType);
2971
+ }), y = g(() => f.value ? h.value?.name ?? i.block.customType : R(d.value, s)), x = g(() => ot(l.fonts.value, "fontFamily" in i.block ? i.block.fontFamily : void 0));
2972
+ function C(e) {
2973
+ a("update", e);
2974
+ }
2975
+ return (t, n) => (o(), _("aside", {
2976
+ "data-testid": "block-toolbar",
2977
+ "aria-label": p(s).landmarks.blockToolbar,
2978
+ class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
2979
+ }, [S("div", Go, [S("div", Ko, [p(it)[d.value] ? (o(), b(c(p(it)[d.value]), {
2980
+ key: 0,
2981
+ size: 16,
2982
+ "stroke-width": 1.5
2983
+ })) : f.value ? (o(), b(p(Me), {
2984
+ key: 1,
2985
+ size: 16,
2986
+ "stroke-width": 1.5
2987
+ })) : v("", !0), S("h3", qo, T(y.value), 1)]), S("div", Jo, [S("button", {
2988
+ 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)]",
2989
+ title: p(s).toolbar.duplicate,
2990
+ onClick: n[0] ||= (e) => a("duplicate")
2991
+ }, [m(p(Fe), {
2992
+ size: 14,
2993
+ "stroke-width": 2
2994
+ })], 8, Yo), S("button", {
2995
+ 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)]",
2996
+ title: p(s).toolbar.delete,
2997
+ onClick: n[1] ||= (e) => a("delete")
2998
+ }, [m(p(He), {
2999
+ size: 14,
3000
+ "stroke-width": 2
3001
+ })], 8, Xo)])]), S("div", Zo, [f.value ? (o(), b(Hr, {
3002
+ key: 0,
3003
+ block: e.block,
3004
+ onUpdateFieldValues: n[2] ||= (e) => a("update", { fieldValues: e }),
3005
+ onUpdateDataSourceFetched: n[3] ||= (e) => a("update", { dataSourceFetched: e })
3006
+ }, null, 8, ["block"])) : d.value === "section" ? (o(), b($i, {
3007
+ key: 1,
3008
+ block: e.block,
3009
+ onUpdate: C
3010
+ }, null, 8, ["block"])) : d.value === "title" ? (o(), b(bo, {
3011
+ key: 2,
3012
+ block: e.block,
3013
+ "font-families": x.value,
3014
+ onUpdate: C
3015
+ }, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), b(Ui, {
3016
+ key: 3,
3017
+ block: e.block,
3018
+ onUpdate: C
3019
+ }, null, 8, ["block"])) : d.value === "image" ? (o(), b(Di, {
3020
+ key: 4,
3021
+ block: e.block,
3022
+ onUpdate: C
3023
+ }, null, 8, ["block"])) : d.value === "video" ? (o(), b(Uo, {
3024
+ key: 5,
3025
+ block: e.block,
3026
+ onUpdate: C
3027
+ }, null, 8, ["block"])) : d.value === "button" ? (o(), b(qt, {
3028
+ key: 6,
3029
+ block: e.block,
3030
+ "font-families": x.value,
3031
+ onUpdate: C
3032
+ }, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), b(Jr, {
3033
+ key: 7,
3034
+ block: e.block,
3035
+ onUpdate: C
3036
+ }, null, 8, ["block"])) : d.value === "social" ? (o(), b(wa, {
3037
+ key: 8,
3038
+ block: e.block,
3039
+ onUpdate: C
3040
+ }, null, 8, ["block"])) : d.value === "menu" ? (o(), b(zi, {
3041
+ key: 9,
3042
+ block: e.block,
3043
+ "font-families": x.value,
3044
+ onUpdate: C
3045
+ }, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), b(oo, {
3046
+ key: 10,
3047
+ block: e.block,
3048
+ "font-families": x.value,
3049
+ onUpdate: C
3050
+ }, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), b(ka, {
3051
+ key: 11,
3052
+ block: e.block,
3053
+ onUpdate: C
3054
+ }, null, 8, ["block"])) : d.value === "html" ? (o(), b(Qr, {
3055
+ key: 12,
3056
+ block: e.block,
3057
+ onUpdate: C
3058
+ }, null, 8, ["block"])) : d.value === "countdown" ? (o(), b(p(r), {
3059
+ key: 13,
3060
+ block: e.block,
3061
+ "font-families": x.value,
3062
+ onUpdate: C
3063
+ }, null, 8, ["block", "font-families"])) : v("", !0), m(ir, {
3064
+ block: e.block,
3065
+ "is-first-section": d.value === "paragraph",
3066
+ onUpdate: C
3067
+ }, null, 8, ["block", "is-first-section"])])], 8, Wo));
3068
+ }
3069
+ }), $o = /* @__PURE__ */ e({ default: () => es }), es = /*#__PURE__*/ Ze(Qo, [["__scopeId", "data-v-e2d2c22f"]]);
3070
+ //#endregion
3071
+ export { es as default, Y as i, $ as n, X as r, $o as t };
3072
+
3073
+ //# sourceMappingURL=Toolbar-C_x2TfFk.js.map