@templatical/editor 0.47.0 → 0.49.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 (319) hide show
  1. package/README.md +1 -1
  2. package/dist/{AiChatSidebar-BPOv5Ra8.js → AiChatSidebar-CdjTb9ej.js} +14 -14
  3. package/dist/{AiFeatureMenu-H_WT4YR8.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
  4. package/dist/{BlockIssueBadge-AgO5abEB.js → BlockIssueBadge-BdpJwim0.js} +5 -5
  5. package/dist/BlockPreviewCanvas-D_sowkf0.js +141 -0
  6. package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
  7. package/dist/{CloudPanels-H_GdbOfZ.js → CloudPanels-1hwFiJ0G.js} +39 -68
  8. package/dist/CollaborationNotices-BWpKzueF.js +73 -0
  9. package/dist/CollaboratorBar-D87phJsw.js +123 -0
  10. package/dist/{CommentsPanel-CMgsG_yh.js → CommentsPanel-BUvUzO3T.js} +2 -2
  11. package/dist/{CommentsSidebar-DCh8DTP8.js → CommentsSidebar-J65znlrH.js} +14 -14
  12. package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
  13. package/dist/{CountdownToolbar-DVuucA3v.js → CountdownToolbar-CLMIwfK7.js} +7 -7
  14. package/dist/{DesignReferenceSidebar-DxNV4lQp.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
  15. package/dist/{IssuesPanel-CUpW54P4.js → IssuesPanel-DeeVsfG7.js} +8 -8
  16. package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
  17. package/dist/{LogicTagInsertButton-DDYKnqmj.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
  18. package/dist/{MediaEditModal-D_we0Scr.js → MediaEditModal-C_wxoUMG.js} +3 -3
  19. package/dist/{MediaPanels-L95BwWV1.js → MediaPanels-BVXDkqtH.js} +2 -2
  20. package/dist/{MergeTagInput-DAL998tx.js → MergeTagInput-BEw_r0PJ.js} +3 -3
  21. package/dist/{MergeTagModeToggle-CjHO26rb.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
  22. package/dist/{ParagraphEditor-CcEN1N6n.js → ParagraphEditor-zLV44z-R.js} +135 -135
  23. package/dist/{RestoreVersionDialog-B2OH5rgs.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
  24. package/dist/{RichTextEditorContent-BGeTg-QL.js → RichTextEditorContent-CsvniFlI.js} +9 -9
  25. package/dist/{SaveBlockDialog-CCVyU-7y.js → SaveBlockDialog-DzWURF_e.js} +34 -35
  26. package/dist/{SavedBlocksBrowserModal-_WmSeqIh.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
  27. package/dist/{SavedBlocksPanels-DVX_ruQ7.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
  28. package/dist/{SavedBlocksPickBar-DVJC28hP.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
  29. package/dist/{TemplateScoringPanel-U0QFiwdI.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
  30. package/dist/{TemplateSettings-CdhTm9JQ.js → TemplateSettings-Cu5X9DgA.js} +11 -11
  31. package/dist/{TestEmailModal-BqToA_ls.js → TestEmailModal-BeRYV3eg.js} +14 -14
  32. package/dist/{TestEmailPanel-Cn4Ptq0j.js → TestEmailPanel-B8c3fQi2.js} +2 -2
  33. package/dist/{TitleEditor-CZdqeltH.js → TitleEditor-CvpNUoAp.js} +13 -13
  34. package/dist/{ToggleSwitch-BR8Sgzib.js → ToggleSwitch-DHweVJOr.js} +2 -2
  35. package/dist/Toolbar-BadDSkkF.js +3153 -0
  36. package/dist/{TplModal-CoczSDma.js → TplModal-BZgi9Tes.js} +5 -5
  37. package/dist/{VersionHistoryMenu-DY5z5FZr.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
  38. package/dist/{VersionHistoryPanels-DowHeDAQ.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
  39. package/dist/{VersionPreviewBanner-Bo8NxBbh.js → VersionPreviewBanner-F-811aps.js} +4 -4
  40. package/dist/WrapperBlock-DiiaxpMb.js +45 -0
  41. package/dist/{blockTypeIcons-4E1U8f99.js → blockTypeIcons-CayLluou.js} +49 -19
  42. package/dist/bundle-stats.json +7 -7
  43. package/dist/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +40 -2
  44. package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js → AiChatSidebar-yXJ85Zcg.js} +12 -12
  45. package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
  46. package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
  47. package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
  48. package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
  49. package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
  50. package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js +143 -0
  51. package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js.map +1 -0
  52. package/dist/cdn/chunks/{CloudHeaderExtras-DJXLTUHc.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
  53. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
  54. package/dist/cdn/chunks/{CloudPanels-D1fPLjG8.js → CloudPanels-XufhBZYF.js} +38 -67
  55. package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
  56. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
  57. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
  58. package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
  59. package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
  60. package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js → CommentsPanel-R8YLLO3v.js} +3 -3
  61. package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
  62. package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js → CommentsSidebar-96NZHVq3.js} +16 -16
  63. package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
  64. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
  65. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
  66. package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js → CountdownToolbar-tmiTPEXm.js} +8 -8
  67. package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
  68. package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js → DesignReferenceSidebar-D14IIu_P.js} +40 -40
  69. package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
  70. package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js → IssuesPanel-BoPiCLGc.js} +6 -6
  71. package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
  72. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
  73. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
  74. package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js → LogicTagInsertButton-BJ2t2vxC.js} +98 -98
  75. package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
  76. package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js → MediaEditModal-DD0SZ-S3.js} +3 -3
  77. package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
  78. package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js → MediaPanels-CkdJ_kGp.js} +3 -3
  79. package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
  80. package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js → MergeTagInput-7wXX71DH.js} +4 -4
  81. package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
  82. package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
  83. package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
  84. package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js → ParagraphEditor-CJQjRHXV.js} +52 -52
  85. package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
  86. package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js → RestoreVersionDialog-C5cxBRKi.js} +8 -8
  87. package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
  88. package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
  89. package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
  90. package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js → SaveBlockDialog-BKbjUnPM.js} +25 -26
  91. package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
  93. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
  94. package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
  95. package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
  96. package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
  97. package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
  98. package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js → TemplateScoringPanel-BBPnHILC.js} +10 -10
  99. package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
  100. package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js → TemplateSettings-CtrzzQWl.js} +14 -14
  101. package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
  102. package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js → TestEmailModal-DuZKYMWD.js} +15 -15
  103. package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
  104. package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js → TestEmailPanel-DERaCdpG.js} +3 -3
  105. package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
  106. package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js → TitleEditor-CEgxjtUX.js} +20 -20
  107. package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
  108. package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
  109. package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
  110. package/dist/cdn/chunks/Toolbar-GFIZQHzw.js +3070 -0
  111. package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
  112. package/dist/cdn/chunks/{TplModal-WIBiBrGy.js → TplModal-DDrbWJcE.js} +5 -5
  113. package/dist/cdn/chunks/{TplModal-WIBiBrGy.js.map → TplModal-DDrbWJcE.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js → VersionHistoryMenu-MlxsUmuT.js} +11 -11
  115. package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
  116. package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
  117. package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
  118. package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
  119. package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
  120. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +47 -0
  121. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js.map +1 -0
  122. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +22 -0
  123. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js.map +1 -0
  124. package/dist/cdn/chunks/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +41 -3
  125. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
  126. package/dist/{cloud-DwjaAdwK.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
  127. package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
  128. package/dist/cdn/chunks/{createCloudRuntime-DtIZ2Lee.js → createCloudRuntime-DiYCJ21w.js} +127 -169
  129. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
  130. package/dist/{de-DgAelLbM.js → cdn/chunks/de-CBE6O79z.js} +42 -2
  131. package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
  132. package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
  133. package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
  134. package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
  135. package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
  136. package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
  137. package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
  138. package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
  139. package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
  140. package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js → editor-modal-HJBy9kLj.js} +69 -69
  141. package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
  142. package/dist/cdn/chunks/{en-Dekrl7HA.js → en-CDexnk0p.js} +41 -3
  143. package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
  144. package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
  145. package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
  146. package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
  147. package/dist/{es-BaZzyidV.js → cdn/chunks/es-BE42B6uN.js} +42 -2
  148. package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
  149. package/dist/cdn/chunks/{extensions-T-t8MKDb.js → extensions-koOuDeZS.js} +23 -23
  150. package/dist/cdn/chunks/{extensions-T-t8MKDb.js.map → extensions-koOuDeZS.js.map} +1 -1
  151. package/dist/{fr-C5ucb1HK.js → cdn/chunks/fr-DlJFPDQR.js} +42 -2
  152. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
  153. package/dist/cdn/chunks/{icons-C4fX9Bwy.js → icons-CjlNV8xD.js} +121 -92
  154. package/dist/cdn/chunks/icons-CjlNV8xD.js.map +1 -0
  155. package/dist/{ja-CUgR3mV0.js → cdn/chunks/ja-CUT8gkNI.js} +42 -2
  156. package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
  157. package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
  158. package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
  159. package/dist/{nl-qrLY7hMS.js → cdn/chunks/nl-bXWqqRyS.js} +42 -2
  160. package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
  161. package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
  162. package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
  163. package/dist/{pt-BR-C6hMTQYi.js → cdn/chunks/pt-BR-2_H4-wlb.js} +42 -2
  164. package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
  165. package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
  166. package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
  167. package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
  168. package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
  169. package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
  170. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
  171. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
  172. package/dist/cdn/chunks/{src-CHlVFp7r.js → src-B1e5SSYP.js} +312 -286
  173. package/dist/cdn/chunks/src-B1e5SSYP.js.map +1 -0
  174. package/dist/cdn/chunks/src-B77z1iw4.js +649 -0
  175. package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
  176. package/dist/cdn/chunks/{src-BnJlDuyB.js → src-CvLTYGdO.js} +555 -283
  177. package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
  178. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
  179. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
  180. package/dist/cdn/chunks/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +2 -2
  181. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
  182. package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
  183. package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
  184. package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
  185. package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
  186. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
  187. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
  188. package/dist/cdn/chunks/{useEditorCore-Bf2d1DKI.js → useEditorCore-DpCFvHg_.js} +758 -732
  189. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
  190. package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
  191. package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
  192. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
  193. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
  194. package/dist/cdn/chunks/{useLogicTag-3S63go4E.js → useLogicTag-X8bc5qNl.js} +4 -4
  195. package/dist/cdn/chunks/{useLogicTag-3S63go4E.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
  196. package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js → useMergeTag-DFoOexIQ.js} +6 -6
  197. package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
  198. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
  199. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
  200. package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
  201. package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
  202. package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js → withCurrentFont-D-f61ghC.js} +2 -2
  203. package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
  204. package/dist/cdn/editor.css +1 -1
  205. package/dist/cdn/editor.js +1328 -1069
  206. package/dist/cdn/editor.js.map +1 -1
  207. package/dist/{check-B5R4zXr7.js → check-DQQzkmIC.js} +1 -1
  208. package/dist/{chevron-down-BKyl85NV.js → chevron-down-CIF4bdon.js} +1 -1
  209. package/dist/{chevron-right-BmToZ8qX.js → chevron-right-Cg7Xu-ev.js} +1 -1
  210. package/dist/{chevron-up-DNYdOxPC.js → chevron-up-Csu7ISD-.js} +1 -1
  211. package/dist/{circle-alert-Dx9ju3YZ.js → circle-alert-YUvIJAgY.js} +1 -1
  212. package/dist/{clock-Dv9bxsSH.js → clock-CnSIGKQW.js} +1 -1
  213. package/dist/{cdn/chunks/cloud-Cd7ptfhL.js → cloud-YUYDtdHt.js} +308 -569
  214. package/dist/{copy-BsKl4dcy.js → copy-CUC43md_.js} +1 -1
  215. package/dist/{createCloudRuntime-C8gpPsSi.js → createCloudRuntime-BMDRjL0k.js} +126 -168
  216. package/dist/{createLucideIcon-DziKp5iU.js → createLucideIcon-BcP1sjdp.js} +6 -6
  217. package/dist/{cdn/chunks/de-DgAelLbM.js → de-CBE6O79z.js} +40 -4
  218. package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
  219. package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
  220. package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
  221. package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
  222. package/dist/{dist-C8koXLhl.js → dist-DBG3nh3k.js} +550 -284
  223. package/dist/{editor-modal-BwyIUnV_.js → editor-modal--7_9A6j-.js} +27 -27
  224. package/dist/en-BHCMzqib.js +1 -0
  225. package/dist/{en-Dekrl7HA.js → en-CDexnk0p.js} +40 -2
  226. package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
  227. package/dist/{cdn/chunks/es-BaZzyidV.js → es-BE42B6uN.js} +40 -4
  228. package/dist/{extensions-DHyKjsNZ.js → extensions-zwsZlWjH.js} +23 -23
  229. package/dist/{eye-DQuinb9k.js → eye-B1bua-ck.js} +1 -1
  230. package/dist/{cdn/chunks/fr-C5ucb1HK.js → fr-DlJFPDQR.js} +40 -4
  231. package/dist/{image-up-yTfLjOrj.js → image-up-BqiO7KCO.js} +1 -1
  232. package/dist/index.d.ts +356 -38
  233. package/dist/{info-C7OjlS11.js → info-x26nGOo2.js} +1 -1
  234. package/dist/{cdn/chunks/ja-CUgR3mV0.js → ja-CUT8gkNI.js} +40 -4
  235. package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
  236. package/dist/{link-CrUFaZ0t.js → link-CezhndyR.js} +1 -1
  237. package/dist/{list-CLgv6M-k.js → list-DQqdptI0.js} +1 -1
  238. package/dist/{loader-circle-BXM5VO0K.js → loader-circle-DCEeoYoi.js} +1 -1
  239. package/dist/{message-circle-BisdQ8H9.js → message-circle-BLGzfv_7.js} +1 -1
  240. package/dist/{cdn/chunks/nl-qrLY7hMS.js → nl-bXWqqRyS.js} +40 -4
  241. package/dist/{package-C1T4AxV1.js → package-D_kEQCMU.js} +1 -1
  242. package/dist/{pencil-oo2mwf4C.js → pencil-Dct8zGLy.js} +1 -1
  243. package/dist/{plus-BIilXopD.js → plus-BDd0gTEm.js} +1 -1
  244. package/dist/{preRenderCustomBlocks-lFX0HHiV.js → preRenderCustomBlocks-CtKJecE-.js} +1 -1
  245. package/dist/{cdn/chunks/pt-BR-C6hMTQYi.js → pt-BR-2_H4-wlb.js} +40 -4
  246. package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
  247. package/dist/{refresh-cw-DrLlkEVC.js → refresh-cw-tGMRDxr8.js} +1 -1
  248. package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
  249. package/dist/{search-DNu9lImk.js → search-Bm2cCQpe.js} +1 -1
  250. package/dist/{send-DDNh3LoJ.js → send-sVLaKZ7f.js} +1 -1
  251. package/dist/{shield-check-aXM3o14f.js → shield-check-YhsbXfQc.js} +1 -1
  252. package/dist/{smartphone-isccgDee.js → smartphone-B2W81p02.js} +1 -1
  253. package/dist/socialIcons-Bwv-49EB.js +2167 -0
  254. package/dist/{sparkles-CIMfFxKv.js → sparkles-a1qkBZ8X.js} +1 -1
  255. package/dist/style.css +1 -1
  256. package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
  257. package/dist/templatical-editor.js +1448 -1189
  258. package/dist/{text-align-start-C4JFeqsq.js → text-align-start-CTuwQ5YW.js} +1 -1
  259. package/dist/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +1 -1
  260. package/dist/{trash-8ZD9pK_c.js → trash-I3D2peFQ.js} +1 -1
  261. package/dist/{triangle-alert-pq45xEHl.js → triangle-alert-CenxmLRE.js} +1 -1
  262. package/dist/{upload-DrNFmVes.js → upload-uU2cK0Ce.js} +1 -1
  263. package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
  264. package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
  265. package/dist/{useEditorCore-BcT7UI4e.js → useEditorCore-DRbMRe8F.js} +1103 -1076
  266. package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
  267. package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
  268. package/dist/{useLogicTag-D-dI8H6p.js → useLogicTag-zcI6BWIf.js} +3 -3
  269. package/dist/{useMergeTag-5wMeDBi-.js → useMergeTag-C-iBLlp0.js} +5 -5
  270. package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
  271. package/dist/{useScrollToBlock-Do3suaqp.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
  272. package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
  273. package/dist/{withCurrentFont-B4YnsG_2.js → withCurrentFont-D62njRLu.js} +1 -1
  274. package/dist/{x-CBFKGLB1.js → x-KFQ4S-Kz.js} +1 -1
  275. package/package.json +12 -12
  276. package/dist/BlockPreviewCanvas-CZDBSPoG.js +0 -136
  277. package/dist/CloudHeaderExtras-gXsTYoGG.js +0 -59
  278. package/dist/CollaboratorBar-BazGNMqN.js +0 -103
  279. package/dist/Toolbar-OGakTBEg.js +0 -2851
  280. package/dist/WrapperBlock-BOABSX9W.js +0 -46
  281. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +0 -138
  282. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +0 -1
  283. package/dist/cdn/chunks/CloudHeaderExtras-DJXLTUHc.js.map +0 -1
  284. package/dist/cdn/chunks/CloudPanels-D1fPLjG8.js.map +0 -1
  285. package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js +0 -52
  286. package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js.map +0 -1
  287. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js +0 -2767
  288. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +0 -1
  289. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +0 -48
  290. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +0 -1
  291. package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js +0 -21
  292. package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js.map +0 -1
  293. package/dist/cdn/chunks/ca-DMoGGP9L.js.map +0 -1
  294. package/dist/cdn/chunks/cloud-Cd7ptfhL.js.map +0 -1
  295. package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +0 -1
  296. package/dist/cdn/chunks/de-DgAelLbM.js.map +0 -1
  297. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
  298. package/dist/cdn/chunks/en-BANFWZdr.js +0 -1
  299. package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
  300. package/dist/cdn/chunks/en-Dekrl7HA.js.map +0 -1
  301. package/dist/cdn/chunks/es-BaZzyidV.js.map +0 -1
  302. package/dist/cdn/chunks/fr-C5ucb1HK.js.map +0 -1
  303. package/dist/cdn/chunks/icons-C4fX9Bwy.js.map +0 -1
  304. package/dist/cdn/chunks/ja-CUgR3mV0.js.map +0 -1
  305. package/dist/cdn/chunks/nl-qrLY7hMS.js.map +0 -1
  306. package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +0 -1
  307. package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
  308. package/dist/cdn/chunks/socialIcons-DACw1wA8.js +0 -1103
  309. package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +0 -1
  310. package/dist/cdn/chunks/src-BnJlDuyB.js.map +0 -1
  311. package/dist/cdn/chunks/src-Bu0qBpbf.js +0 -616
  312. package/dist/cdn/chunks/src-Bu0qBpbf.js.map +0 -1
  313. package/dist/cdn/chunks/src-CHlVFp7r.js.map +0 -1
  314. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
  315. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
  316. package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +0 -1
  317. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
  318. package/dist/en-CC-57eC_.js +0 -1
  319. package/dist/socialIcons-BctavKBN.js +0 -1180
@@ -0,0 +1,3070 @@
1
+ import { n as e } from "./rolldown-runtime-Y_bBpyJl.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-akeQH_JP.js";
3
+ import { At as O, Bt as k, D as A, Dt as j, Et as M, It as N, Nt as P, Ot as ee, Pt as F, Vt as te, et as ne, kt as re, n as ie, q as I, r as L, vt as ae } from "./src-CvLTYGdO.js";
4
+ import { C as oe, M as se, c as ce, d as le, f as ue, g as de, h as fe, i as pe, l as me, m as he, o as ge, p as R, r as z, u as _e, v as ve } from "./socialIcons-CkZSYpoG.js";
5
+ import { _ as ye } from "./dist-Doy3r07H.js";
6
+ import { $ as be, C as xe, G as Se, L as Ce, P as we, d as Te, g as Ee, h as De, n as Oe, p as ke, v as Ae, x as je } from "./keys-UAWhQ3zW.js";
7
+ import "./timeouts-o5Y9BuqI.js";
8
+ import { t as B } from "./useI18n-DEqtEgOs.js";
9
+ import { o as Me } from "./usePopoverPosition-Cz9-XiXR.js";
10
+ import { At as Ne, B as Pe, O as Fe, Ot as Ie, Pt as Le, Rt as Re, W as V, _ as ze, et as Be, f as Ve, h as He, it as Ue, lt as We, mt as Ge, n as Ke, pt as qe, rt as Je, s as Ye, tt as Xe, v as Ze } from "./icons-CjlNV8xD.js";
11
+ import { t as Qe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
+ import { t as $e } from "./useAliveFlag-PuXh83UK.js";
13
+ import { _ as et, b as tt, c as nt, g as H, h as U, m as W, p as G, r as rt, v as it } from "./styleConstants-v1dNKgJf.js";
14
+ import { t as at } from "./blockTypeIcons-BnAd8qsP.js";
15
+ import { c as K } from "./LogicTagInsertButton-BJ2t2vxC.js";
16
+ import { n as ot, t as q } from "./ToggleSwitch-DGQ7iRc-.js";
17
+ import { n as st, t as ct } from "./withCurrentFont-D-f61ghC.js";
18
+ import { t as J } from "./MergeTagInput-7wXX71DH.js";
19
+ //#region src/components/SlidingPillSelect.vue?vue&type=script&setup=true&lang.ts
20
+ var lt = [
21
+ "aria-checked",
22
+ "aria-label",
23
+ "disabled",
24
+ "aria-disabled",
25
+ "title",
26
+ "onClick"
27
+ ], ut = { 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", ut, T(t.label), 1))], 12, lt))), 128))], 4));
73
+ }
74
+ }), dt = { class: "tpl:flex tpl:items-stretch" }, ft = [
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", dt, [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, ft), S("span", { class: h(p(U)) }, T(e.suffix), 3)]));
104
+ }
105
+ }), pt = [
106
+ "aria-pressed",
107
+ "aria-label",
108
+ "title",
109
+ "data-testid"
110
+ ], mt = /* @__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(We), {
130
+ key: 0,
131
+ size: 14,
132
+ "stroke-width": 2
133
+ })) : (o(), b(p(Ye), {
134
+ key: 1,
135
+ size: 14,
136
+ "stroke-width": 2
137
+ }))], 10, pt));
138
+ }
139
+ }), ht = { class: "tpl:mb-3.5" }, gt = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, _t = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, vt = {
140
+ key: 0,
141
+ class: "tpl:mb-3.5"
142
+ }, yt = { class: "tpl:mb-3.5" }, bt = { class: "tpl:mb-3.5" }, xt = /* @__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) ? te(e) : void 0);
169
+ return;
170
+ }
171
+ let t = {
172
+ ...r.modelValue ?? te(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 ? te(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", ht, [
205
+ S("div", gt, [S("span", _t, T(p(a).blockSettings.border), 1), m(mt, {
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", vt, [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", yt, [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", bt, [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
+ }), St = { class: "tpl:mb-3.5" }, Ct = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, wt = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Tt = {
253
+ key: 1,
254
+ class: "tpl:grid tpl:grid-cols-2 tpl:gap-2"
255
+ }, Et = { class: "tpl:mb-1 tpl:block tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Dt = /* @__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(() => P.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", St, [S("div", Ct, [S("span", wt, T(e.label), 1), m(mt, {
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", Tt, [(o(), _(w, null, r(u, (t) => S("div", { key: t }, [S("label", Et, 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
+ }), Ot = { class: "tpl:mb-3.5" }, kt = ["value"], At = { value: "" }, jt = ["value"], 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:mb-3.5" }, Lt = { class: "tpl:flex tpl:items-stretch" }, Rt = ["value"], zt = { class: "tpl:mb-3.5" }, Bt = ["value"], Vt = { value: "auto" }, Ht = { value: "full" }, Ut = { value: "custom" }, Wt = {
340
+ key: 0,
341
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
342
+ }, Gt = ["value"], Kt = { class: "tpl:mb-3.5" }, qt = 200, Jt = /* @__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 : qt) : 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", Ot, [S("label", { class: h(p(H)) }, T(p(a).button.fontFamily), 3), S("select", {
363
+ class: h(p(G)),
364
+ value: p(ct)(e.block.fontFamily),
365
+ onChange: n[0] ||= (e) => c("fontFamily", e.target.value || void 0)
366
+ }, [S("option", At, 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, jt))), 128))], 42, kt)]),
370
+ S("div", Mt, [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", Nt, [
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", Pt, [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", Ft, [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(xt, {
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(Dt, {
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", It, [S("label", { class: h(p(H)) }, T(p(a).button.fontSize), 3), S("div", Lt, [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, Rt), S("span", { class: h(p(U)) }, "px", 2)])]),
420
+ S("div", zt, [
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", Vt, T(p(a).button.widthAuto), 1),
428
+ S("option", Ht, T(p(a).button.fullWidth), 1),
429
+ S("option", Ut, T(p(a).button.widthCustom), 1)
430
+ ], 42, Bt),
431
+ s.value === "custom" ? (o(), _("div", Wt, [S("input", {
432
+ type: "number",
433
+ class: h(p(W)),
434
+ value: typeof e.block.width == "number" ? e.block.width : qt,
435
+ min: "20",
436
+ onInput: n[10] ||= (e) => u(e.target.value)
437
+ }, null, 42, Gt), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
438
+ ]),
439
+ S("div", Kt, [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
+ }), Yt = { class: "spacing-control" }, Xt = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Zt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Qt = { class: "tpl:flex tpl:items-center" }, $t = ["aria-label"], en = ["value", "aria-label"], tn = ["aria-label"], nn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, rn = { class: "tpl:flex tpl:items-center" }, an = ["aria-label"], on = ["value", "aria-label"], sn = ["aria-label"], cn = ["aria-label", "title"], ln = { class: "tpl:flex tpl:items-center" }, un = ["aria-label"], dn = ["value", "aria-label"], fn = ["aria-label"], pn = { class: "tpl:flex tpl:items-center" }, mn = ["aria-label"], hn = ["value", "aria-label"], gn = ["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)]", _n = "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)]", vn = /*#__PURE__*/ Qe(/* @__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", Yt, [S("label", Xt, T(e.label), 1), S("div", Zt, [
507
+ S("div", Qt, [
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(Xe), {
513
+ size: 12,
514
+ "stroke-width": 2
515
+ })], 10, $t),
516
+ S("input", {
517
+ type: "number",
518
+ class: h(_n),
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, en),
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, tn)
532
+ ]),
533
+ S("div", nn, [
534
+ S("div", rn, [
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(Xe), {
540
+ size: 12,
541
+ "stroke-width": 2
542
+ })], 10, an),
543
+ S("input", {
544
+ type: "number",
545
+ class: h(_n),
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, on),
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, sn)
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(Ue), {
570
+ key: 1,
571
+ size: 14,
572
+ "stroke-width": 2
573
+ }))], 10, cn),
574
+ S("div", ln, [
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(Xe), {
580
+ size: 12,
581
+ "stroke-width": 2
582
+ })], 10, un),
583
+ S("input", {
584
+ type: "number",
585
+ class: h(_n),
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, dn),
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, fn)
599
+ ])
600
+ ]),
601
+ S("div", pn, [
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(Xe), {
607
+ size: 12,
608
+ "stroke-width": 2
609
+ })], 10, mn),
610
+ S("input", {
611
+ type: "number",
612
+ class: h(_n),
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, hn),
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, gn)
626
+ ])
627
+ ])]));
628
+ }
629
+ }), [["__scopeId", "data-v-69591c1e"]]);
630
+ //#endregion
631
+ //#region src/composables/useNaturalImageSize.ts
632
+ function yn(e) {
633
+ let n = s(null), r = () => {};
634
+ return t(e, (e) => {
635
+ r(), n.value = null, e && (r = le(e, (e) => {
636
+ n.value = e;
637
+ }));
638
+ }, { immediate: !0 }), n;
639
+ }
640
+ function bn() {
641
+ let e = n(je, null);
642
+ return async (t) => ue(e ? await xn(e, t) : t);
643
+ }
644
+ function xn(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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"], Tn = ["data-testid"], En = ["aria-label", "data-testid"], Dn = [
657
+ "aria-label",
658
+ "title",
659
+ "aria-pressed",
660
+ "data-testid",
661
+ "onClick"
662
+ ], On = ["data-testid"], kn = /* @__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(we, ie.liquid), u = g(() => typeof i.modelValue?.url == "string" ? i.modelValue.url : ""), d = g(() => u.value.trim() !== ""), y = bn(), x;
673
+ f(() => clearTimeout(x));
674
+ function C(e) {
675
+ i.measure && !L(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
+ ...R(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 ?? O(e), s = i.measure ? t : null;
689
+ a("update:modelValue", {
690
+ ...o,
691
+ url: e,
692
+ ...s ? R(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
+ })), M = g(() => re.flatMap((e) => ee.map((t) => ({
725
+ x: t,
726
+ y: e,
727
+ label: j.value[`${e}-${t}`]
728
+ }))));
729
+ function N(e) {
730
+ return i.modelValue?.position?.x === e.x && i.modelValue?.position?.y === e.y;
731
+ }
732
+ let P = s(), { canBrowse: F, isUploading: te, showOverlay: ne, openMediaBrowser: I } = me({
733
+ target: P,
734
+ blocked: () => L(u.value, l),
735
+ apply: (e) => E(e.url, fe(e.width, e.height))
736
+ });
737
+ return (t, n) => (o(), _("div", Sn, [S("div", null, [S("label", { class: h(p(H)) }, T(p(c).blockSettings.backgroundImage), 3), S("div", {
738
+ ref_key: "dropZoneRef",
739
+ ref: P,
740
+ class: "tpl:relative",
741
+ "data-testid": `${e.testidPrefix}-bg-url`
742
+ }, [
743
+ p(ne) ? (o(), b(_e, {
744
+ key: 0,
745
+ uploading: p(te)
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(F) ? (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, wn)) : v("", !0)
768
+ ], 8, Cn)]), 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, Tn)),
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(M.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": N(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", N(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", N(t) ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-text-dim)]"]) }, null, 2)], 10, Dn))), 128))], 8, En)]),
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, On))
804
+ ], 64)) : v("", !0)]));
805
+ }
806
+ }), An = ["data-testid"], jn = { class: "tpl:mt-3" }, Mn = /* @__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(Re), {
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, An), u(S("div", jn, [a(t.$slots, "default")], 512), [[C, e.open]])], 2));
826
+ }
827
+ }), Nn = {
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
+ }, Pn = {
832
+ key: 1,
833
+ "data-testid": "section-hero",
834
+ class: "tpl:mt-3.5 tpl:space-y-3.5"
835
+ }, Fn = { "data-testid": "section-hero-height" }, In = {
836
+ key: 0,
837
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
838
+ }, Ln = {
839
+ key: 1,
840
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
841
+ }, Rn = {
842
+ key: 1,
843
+ "data-testid": "section-hero-align"
844
+ }, zn = 300, Bn = /* @__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(we, ie.liquid), l = n(Ee, null), u = n(xe, void 0), d = bn(), f = g(() => typeof i.section.backgroundImage?.url == "string" ? i.section.backgroundImage.url : ""), y = g(() => f.value.trim() !== ""), x = g(() => L(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 : zn), 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 && M(i.section.backgroundImage) === null);
880
+ function j() {
881
+ return (l ? ge(l.content.value, i.section.id, u) : null) ?? ce(l?.state.content.settings);
882
+ }
883
+ function N(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
+ } }), P();
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 = M(i.section.backgroundImage), r = n === null ? zn : Math.round(j() * n);
898
+ a("update", { hero: {
899
+ height: r,
900
+ verticalAlign: t
901
+ } });
902
+ }
903
+ async function P() {
904
+ let e = i.section.backgroundImage;
905
+ if (!e || !y.value || x.value || M(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
+ ...R(n)
910
+ } });
911
+ }
912
+ function ee(e) {
913
+ !C.value || !Number.isFinite(e) || e < 1 || a("update", { hero: {
914
+ ...C.value,
915
+ height: Math.round(e)
916
+ } });
917
+ }
918
+ function F(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", Nn, T(p(s).section.heroNeedsOneColumn), 1)) : w.value && (y.value || C.value) ? (o(), _("div", Pn, [
925
+ S("div", Fn, [
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": N
931
+ }, null, 8, ["options", "model-value"]),
932
+ x.value ? (o(), _("p", In, T(p(s).blockSettings.heroMatchImageMergeTag), 1)) : A.value ? (o(), _("p", Ln, 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": ee
941
+ }, null, 8, ["model-value"])) : v("", !0),
942
+ C.value ? (o(), _("div", Rn, [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": F
946
+ }, null, 8, ["options", "model-value"])])) : v("", !0)
947
+ ])) : v("", !0);
948
+ }
949
+ }), Vn = { class: "tpl:space-y-2" }, Hn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Un = { class: "tpl:space-y-2" }, Wn = ["value"], Gn = { value: "" }, Kn = ["label"], qn = ["value"], Jn = ["value"], Yn = {
950
+ key: 0,
951
+ value: "__custom__"
952
+ }, Xn = {
953
+ key: 0,
954
+ class: "tpl:space-y-2"
955
+ }, Zn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, $n = { class: "tpl:flex tpl:justify-end" }, er = ["disabled"], tr = {
956
+ key: 0,
957
+ class: "tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
958
+ }, nr = { class: "tpl:space-y-1" }, rr = { 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)]" }, ir = {
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
+ }, ar = /* @__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(De, []), E = n(Oe, !1), O = d(/* @__PURE__ */ new Set()), k = s(!1), A = s(""), M = s(""), N = [{
970
+ key: "desktop",
971
+ icon: Be,
972
+ labelKey: "showOnDesktop"
973
+ }, {
974
+ key: "mobile",
975
+ icon: Fe,
976
+ labelKey: "showOnMobile"
977
+ }];
978
+ function P(e) {
979
+ O.has(e) ? O.delete(e) : O.add(e);
980
+ }
981
+ let ee = g(() => C.length > 0 || E), F = g(() => l.block.displayCondition ? !C.some((e) => e.label === l.block.displayCondition?.label) : !1);
982
+ function te() {
983
+ k.value = !0, F.value && l.block.displayCondition ? (A.value = l.block.displayCondition.before, M.value = l.block.displayCondition.after ?? "") : (A.value = "", M.value = "");
984
+ }
985
+ function ne() {
986
+ A.value.trim() && (f("update", { displayCondition: {
987
+ label: y.blockSettings.customCondition,
988
+ before: A.value.trim(),
989
+ after: M.value.trim()
990
+ } }), k.value = !1, A.value = "", M.value = "");
991
+ }
992
+ t(() => l.block.displayCondition, (e) => {
993
+ e ? F.value && (A.value = e.before, M.value = e.after ?? "") : (k.value = !1, A.value = "", M.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" && j(l.block)?.applied === !0);
1003
+ function I(e, t) {
1004
+ f("update", { styles: {
1005
+ ...l.block.styles,
1006
+ [e]: t
1007
+ } });
1008
+ }
1009
+ function L(e) {
1010
+ return l.block.visibility?.[e] !== !1;
1011
+ }
1012
+ function ae(e) {
1013
+ let t = {
1014
+ desktop: L("desktop"),
1015
+ mobile: L("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(Mn, {
1021
+ title: p(y).blockSettings.spacing,
1022
+ open: O.has("spacing"),
1023
+ "no-border": e.isFirstSection,
1024
+ onToggle: n[1] ||= (e) => P("spacing")
1025
+ }, {
1026
+ default: i(() => [m(vn, {
1027
+ label: p(y).blockSettings.padding,
1028
+ "model-value": e.block.styles.padding,
1029
+ "onUpdate:modelValue": n[0] ||= (e) => I("padding", e)
1030
+ }, null, 8, ["label", "model-value"])]),
1031
+ _: 1
1032
+ }, 8, [
1033
+ "title",
1034
+ "open",
1035
+ "no-border"
1036
+ ]),
1037
+ m(Mn, {
1038
+ title: p(y).blockSettings.background,
1039
+ open: O.has("bg"),
1040
+ "header-test-id": "block-settings-background",
1041
+ onToggle: n[5] ||= (e) => P("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) => I("backgroundColor", e)
1049
+ }, null, 8, ["model-value"]),
1050
+ e.block.type === "section" ? (o(), b(kn, {
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(Bn, {
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(Mn, {
1068
+ title: p(y).blockSettings.display,
1069
+ open: O.has("display"),
1070
+ onToggle: n[6] ||= (e) => P("display")
1071
+ }, {
1072
+ default: i(() => [S("div", Vn, [(o(), _(w, null, r(N, (e) => m(q, {
1073
+ key: e.key,
1074
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
1075
+ "model-value": L(e.key),
1076
+ label: p(y).blockSettings[e.labelKey],
1077
+ "onUpdate:modelValue": (t) => ae(e.key)
1078
+ }, {
1079
+ default: i(() => [S("span", Hn, [(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
+ ee.value ? (o(), b(Mn, {
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) => P("condition")
1097
+ }, {
1098
+ default: i(() => [S("div", Un, [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 || F.value ? "__custom__" : e.block.displayCondition?.label ?? "",
1102
+ onChange: n[7] ||= (e) => {
1103
+ let t = e.target.value;
1104
+ if (t === "__custom__") {
1105
+ te();
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", Gn, 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, qn))), 128))], 8, Kn)) : (o(!0), _(w, { key: 1 }, r(e, (e) => (o(), _("option", {
1124
+ key: e.label,
1125
+ value: e.label
1126
+ }, T(e.label), 9, Jn))), 128))], 64))), 128)),
1127
+ p(E) ? (o(), _("option", Yn, T(p(y).blockSettings.customCondition), 1)) : v("", !0)
1128
+ ], 42, Wn), k.value || F.value ? (o(), _("div", Xn, [
1129
+ S("div", null, [S("label", Zn, 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(et))
1133
+ }, null, 2), [[x, A.value]])]),
1134
+ S("div", null, [S("label", Qn, T(p(y).blockSettings.customConditionAfter), 1), u(S("textarea", {
1135
+ "onUpdate:modelValue": n[9] ||= (e) => M.value = e,
1136
+ rows: "2",
1137
+ class: h(p(et))
1138
+ }, null, 2), [[x, M.value]])]),
1139
+ S("div", $n, [S("button", {
1140
+ type: "button",
1141
+ class: h(p(it)),
1142
+ disabled: !A.value.trim(),
1143
+ onClick: ne
1144
+ }, T(p(y).blockSettings.applyCondition), 11, er)])
1145
+ ])) : e.block.displayCondition && !F.value ? (o(), _(w, { key: 1 }, [e.block.displayCondition.description ? (o(), _("p", tr, T(e.block.displayCondition.description), 1)) : v("", !0), S("div", nr, [S("pre", rr, T(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (o(), _("pre", ir, T(e.block.displayCondition.after), 1)) : v("", !0)])], 64)) : v("", !0)])]),
1146
+ _: 1
1147
+ }, 8, ["title", "open"])) : v("", !0)
1148
+ ], 2));
1149
+ }
1150
+ }), or = ["title"], sr = /* @__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, or));
1183
+ }
1184
+ }), cr = { class: "tpl:mb-3.5" }, lr = ["title"], ur = { class: "tpl-sr-only" }, dr = ["title"], fr = { 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", cr, [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", ur, T(p(t).customBlocks.dataSource.readOnlyTooltip), 1)], 8, lr)) : 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", fr, T(p(t).customBlocks.fields.required), 1)], 8, dr)) : v("", !0)
1208
+ ], 2), a(n.$slots, "default")]));
1209
+ }
1210
+ }), pr = /* @__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(Te, Me), l = g(() => de(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
+ }), mr = [
1249
+ "value",
1250
+ "placeholder",
1251
+ "title"
1252
+ ], hr = ["value", "placeholder"], gr = /* @__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(_e, {
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, mr)) : (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, hr)),
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
+ }), _r = [
1313
+ "value",
1314
+ "placeholder",
1315
+ "min",
1316
+ "max",
1317
+ "step",
1318
+ "disabled",
1319
+ "title"
1320
+ ], vr = /* @__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, _r)]),
1347
+ _: 1
1348
+ }, 8, [
1349
+ "label",
1350
+ "required",
1351
+ "read-only"
1352
+ ]));
1353
+ }
1354
+ }), yr = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, br = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, xr = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Sr = ["title", "onClick"], Cr = {
1355
+ key: 1,
1356
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1357
+ }, wr = {
1358
+ key: 2,
1359
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1360
+ }, Tr = /* @__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", yr, [
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", br, [S("span", xr, " #" + 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(Ve), {
1404
+ size: 12,
1405
+ "stroke-width": 2
1406
+ })], 8, Sr)) : v("", !0)]), (o(!0), _(w, null, r(e.field.fields, (r) => (o(), b(c(p(Pr)(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(nt)),
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", Cr, T(p(s).customBlocks.fields.maxItemsReached), 1)) : v("", !0),
1428
+ !f.value && !e.readOnly ? (o(), _("p", wr, 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
+ }), Er = [
1438
+ "value",
1439
+ "disabled",
1440
+ "title"
1441
+ ], Dr = ["value"], Or = /* @__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, Dr))), 128))], 42, Er)]),
1466
+ _: 1
1467
+ }, 8, [
1468
+ "label",
1469
+ "required",
1470
+ "read-only"
1471
+ ]));
1472
+ }
1473
+ }), kr = [
1474
+ "value",
1475
+ "placeholder",
1476
+ "title"
1477
+ ], Ar = /* @__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, kr)) : (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
+ }), jr = [
1514
+ "value",
1515
+ "placeholder",
1516
+ "title"
1517
+ ], Mr = "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", Nr = {
1518
+ text: Ar,
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(Mr)
1542
+ }, null, 8, jr)) : (o(), b(ot, {
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: gr,
1557
+ color: pr,
1558
+ number: vr,
1559
+ select: Or,
1560
+ boolean: sr,
1561
+ repeatable: Tr
1562
+ };
1563
+ function Pr(e) {
1564
+ return Nr[e] ?? Ar;
1565
+ }
1566
+ //#endregion
1567
+ //#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
1568
+ var Fr = {
1569
+ key: 0,
1570
+ class: "tpl:p-4"
1571
+ }, Ir = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Lr = { key: 1 }, Rr = {
1572
+ key: 0,
1573
+ class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1574
+ }, zr = {
1575
+ key: 1,
1576
+ class: "tpl:mb-4"
1577
+ }, Br = {
1578
+ key: 1,
1579
+ class: "tpl:flex tpl:h-[32px] tpl:items-center"
1580
+ }, Vr = {
1581
+ key: 0,
1582
+ class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1583
+ }, Hr = {
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
+ }, Ur = /* @__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(ke, []), u = g(() => l.find((e) => e.type === i.block.customType)), d = g(() => i.block), { isFetching: f, fetchError: h, fetch: y, hasDataSource: x, needsFetch: C } = se({
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", Lr, [
1608
+ u.value.description ? (o(), _("p", Rr, T(u.value.description), 1)) : v("", !0),
1609
+ p(x) ? (o(), _("div", zr, [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", Br, [p(f) ? (o(), _("div", Vr, 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(Pe), { size: 12 }), D(" " + T(p(s).customBlocks.dataSource.changeButton), 1)]))])), p(h) ? (o(), _("p", Hr, [m(p(Le), {
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(Pr)(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", Fr, [S("p", Ir, T(p(s).customBlocks.toolbar.noDefinition), 1)]));
1636
+ }
1637
+ }), Wr = { class: "tpl:mb-3.5" }, Gr = { class: "tpl:mb-3.5" }, Kr = { class: "tpl:mb-3.5" }, qr = { class: "tpl:flex tpl:items-stretch" }, Jr = ["value"], Yr = /* @__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", Wr, [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", Gr, [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", Kr, [S("label", { class: h(p(H)) }, T(p(r).divider.thickness), 3), S("div", qr, [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, Jr), S("span", { class: h(p(U)) }, "px", 2)])])
1677
+ ], 64));
1678
+ }
1679
+ }), Xr = { class: "tpl:mb-3.5" }, Zr = ["value"], Qr = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, $r = /* @__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", Xr, [
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(et)),
1692
+ onInput: i[0] ||= (e) => n("update", { content: e.target.value })
1693
+ }, null, 42, Zr),
1694
+ S("p", Qr, [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 ei(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 ? R(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 ti = { class: "tpl:mb-3.5" }, ni = {
1765
+ key: 0,
1766
+ class: "tpl:mb-3.5"
1767
+ }, ri = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ii = [
1768
+ "value",
1769
+ "placeholder",
1770
+ "title"
1771
+ ], ai = { class: "tpl:mb-3.5" }, oi = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, si = { class: "tpl:mb-3.5" }, ci = ["value"], li = { value: "full" }, ui = { value: "custom" }, di = {
1772
+ key: 0,
1773
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1774
+ }, fi = ["value"], pi = { class: "tpl:mb-3.5" }, mi = {
1775
+ key: 0,
1776
+ class: "tpl:mb-1.5 tpl:flex tpl:items-center tpl:justify-between"
1777
+ }, hi = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, gi = { class: "tpl:flex tpl:items-stretch" }, _i = ["value"], vi = {
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
+ }, yi = ["value"], bi = { value: "auto" }, xi = { value: "custom" }, Si = {
1783
+ key: 4,
1784
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1785
+ }, Ci = ["value"], wi = { class: "tpl:mb-3.5" }, Ti = { class: "tpl:mb-3.5" }, Ei = 350, Di = 200, Oi = /* @__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(we, ie.liquid), d = n(Ee, 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 M(e) {
1804
+ if (e === "custom") {
1805
+ let e = r.block.width;
1806
+ (typeof e != "number" || E.includes(e)) && a("update", z.widthUpdates(Ei));
1807
+ } else a("update", z.widthUpdates(e === "full" ? "full" : Number(e)));
1808
+ }
1809
+ function N(e) {
1810
+ j("height", e === "custom" ? Di : void 0);
1811
+ }
1812
+ function P(e) {
1813
+ let t = Number(e);
1814
+ !Number.isFinite(t) || t <= 0 || j("height", t);
1815
+ }
1816
+ function ee(e) {
1817
+ j("borderRadius", k(e) === null ? void 0 : e);
1818
+ }
1819
+ function F(e) {
1820
+ let t = Number(e);
1821
+ !Number.isFinite(t) || t <= 0 || a("update", z.widthUpdates(t));
1822
+ }
1823
+ function te(e) {
1824
+ e !== r.block.src && a("update", {
1825
+ src: e,
1826
+ ...R(null)
1827
+ });
1828
+ }
1829
+ function ne(e) {
1830
+ a("update", {
1831
+ src: e.url,
1832
+ ...R(fe(e.width, e.height))
1833
+ }), e.alt && (j("alt", e.alt), x.value = !0), y.value = !0, C();
1834
+ }
1835
+ let re = s(), I = g(() => L(r.block.src, u)), { canBrowse: ae, isUploading: se, showOverlay: ce, openMediaBrowser: le } = me({
1836
+ target: re,
1837
+ blocked: I,
1838
+ apply: ne
1839
+ }), ue = oe(() => I.value || !r.block.src || he(r.block) ? void 0 : r.block.src), de = yn(() => ue.value), ge = g(() => d ? pe(d.content.value, r.block.id, f) : null), z = ei({
1840
+ block: () => r.block,
1841
+ room: () => ge.value,
1842
+ measured: () => de.value
1843
+ }), { available: ve, locked: be, derivedHeight: Se, cappedHeight: Ce } = z;
1844
+ function Te() {
1845
+ let e = z.setLocked(!be.value);
1846
+ e && a("update", e);
1847
+ }
1848
+ let De = s(null);
1849
+ function Oe(e) {
1850
+ De.value = e;
1851
+ let t = z.heightUpdates(Number(e));
1852
+ t && a("update", t);
1853
+ }
1854
+ return (t, n) => (o(), _(w, null, [
1855
+ S("div", ti, [S("label", { class: h(p(H)) }, T(p(c).image.imageUrl), 3), S("div", {
1856
+ ref_key: "dropZoneRef",
1857
+ ref: re,
1858
+ class: "tpl:relative"
1859
+ }, [
1860
+ p(ce) ? (o(), b(_e, {
1861
+ key: 0,
1862
+ uploading: p(se)
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) => te(e)
1870
+ }, null, 8, [
1871
+ "model-value",
1872
+ "placeholder",
1873
+ "pulse"
1874
+ ]),
1875
+ p(ae) ? (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(le) && p(le)(...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(L)(e.block.src, p(u)) ? (o(), _("div", ni, [S("label", { class: h(p(H)) }, [D(T(p(c).image.placeholderUrl) + " ", 1), S("span", ri, 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, ii)])) : v("", !0),
1897
+ S("div", ai, [
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", oi, T(p(c).image.decorativeHint), 1)])]),
1919
+ _: 1
1920
+ }, 8, ["model-value", "label"])
1921
+ ]),
1922
+ S("div", si, [
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) => M(e.target.value)
1929
+ }, [
1930
+ S("option", li, 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", ui, T(p(c).image.widthCustom), 1)
1935
+ ], 42, ci),
1936
+ O.value === "custom" ? (o(), _("div", di, [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 : Ei,
1941
+ min: "20",
1942
+ onInput: n[6] ||= (e) => F(e.target.value)
1943
+ }, null, 42, fi), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
1944
+ ]),
1945
+ S("div", pi, [
1946
+ p(ve) ? (o(), _("div", mi, [S("span", hi, T(p(c).image.height), 1), m(mt, {
1947
+ linked: p(be),
1948
+ "link-label": p(c).image.lockAspectRatio,
1949
+ "unlink-label": p(c).image.unlockAspectRatio,
1950
+ testid: "image-aspect-lock",
1951
+ onToggle: Te
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(be) ? (o(), _(w, { key: 2 }, [S("div", gi, [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, _i), S("span", { class: h(p(U)) }, "px", 2)]), p(Ce) === null ? v("", !0) : (o(), _("p", vi, T(p(l)(p(c).image.heightCapped, { height: p(Ce) })), 1))], 64)) : v("", !0),
1969
+ p(be) ? 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) => N(e.target.value)
1975
+ }, [S("option", bi, T(p(c).image.heightAuto), 1), S("option", xi, T(p(c).image.heightCustom), 1)], 42, yi)),
1976
+ !p(be) && A.value === "custom" ? (o(), _("div", Si, [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) => P(e.target.value)
1983
+ }, null, 42, Ci), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
1984
+ ]),
1985
+ m(Dt, {
1986
+ "model-value": e.block.borderRadius,
1987
+ label: p(c).image.borderRadius,
1988
+ "testid-prefix": "image",
1989
+ "onUpdate:modelValue": ee
1990
+ }, null, 8, ["model-value", "label"]),
1991
+ m(xt, {
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", wi, [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", Ti, [
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
+ }), ki = { class: "tpl:mb-3.5" }, $ = /* @__PURE__ */ l({
2033
+ __name: "FieldRow",
2034
+ props: { label: {} },
2035
+ setup(e) {
2036
+ return (t, n) => (o(), _("div", ki, [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
+ }), Ai = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ji = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Mi = [
2042
+ "value",
2043
+ "placeholder",
2044
+ "onInput"
2045
+ ], Ni = ["title", "onClick"], Pi = { 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)]" }, Fi = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ii = ["value"], Li = { value: "" }, Ri = ["value"], zi = ["value"], Bi = /* @__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: He
2071
+ },
2072
+ {
2073
+ value: "center",
2074
+ label: s.title.alignCenter,
2075
+ icon: Ze
2076
+ },
2077
+ {
2078
+ value: "right",
2079
+ label: s.title.alignRight,
2080
+ icon: ze
2081
+ }
2082
+ ]);
2083
+ function u(e, t) {
2084
+ a("update", { [e]: t });
2085
+ }
2086
+ function d() {
2087
+ let e = {
2088
+ id: I(),
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", Ai, [(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", ji, [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, Mi), S("button", {
2120
+ class: h(p(tt)),
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, Ni)]),
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", Pi, [(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", Fi, [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(nt)),
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(ct)(e.block.fontFamily),
2165
+ onChange: n[0] ||= (e) => u("fontFamily", e.target.value || void 0)
2166
+ }, [S("option", Li, 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, Ri))), 128))], 42, Ii)]),
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, zi)]),
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
+ }), Vi = {
2233
+ class: "tpl:mb-3.5",
2234
+ "data-testid": "paragraph-spacing"
2235
+ }, Hi = { class: "tpl:flex tpl:items-stretch" }, Ui = ["value"], Wi = /* @__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", Vi, [S("label", { class: h(p(H)) }, T(p(r).paragraph.paragraphSpacing), 3), S("div", Hi, [S("input", {
2242
+ type: "number",
2243
+ class: h(p(W)),
2244
+ value: e.block.paragraphSpacing ?? p(N).paragraphGap,
2245
+ min: "0",
2246
+ max: "64",
2247
+ onInput: i[0] ||= (e) => n("update", { paragraphSpacing: Number(e.target.value) })
2248
+ }, null, 42, Ui), S("span", { class: h(p(U)) }, "px", 2)])]));
2249
+ }
2250
+ });
2251
+ //#endregion
2252
+ //#region src/utils/rebalanceColumnChildren.ts
2253
+ function Gi(e, t) {
2254
+ let n = ae(t);
2255
+ if (e.length === n) return e;
2256
+ if (e.length < n) {
2257
+ let t = Array.from({ length: n - e.length }, () => []);
2258
+ return [...e, ...t];
2259
+ }
2260
+ let r = e.slice(0, n), i = e.slice(n).flat(), a = [...r[n - 1], ...i];
2261
+ return [...r.slice(0, n - 1), a];
2262
+ }
2263
+ //#endregion
2264
+ //#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
2265
+ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
2266
+ key: 0,
2267
+ class: "tpl:mb-3.5"
2268
+ }, Xi = {
2269
+ key: 2,
2270
+ class: "tpl:mb-3.5"
2271
+ }, Zi = {
2272
+ key: 0,
2273
+ class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
2274
+ }, Qi = {
2275
+ key: 1,
2276
+ class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
2277
+ }, $i = /* @__PURE__ */ l({
2278
+ __name: "SectionToolbar",
2279
+ props: { block: {} },
2280
+ emits: ["update"],
2281
+ setup(e, { emit: t }) {
2282
+ let i = e, a = t, { t: s } = B(), c = n(xe, void 0), l = n(Se, void 0), u = c !== void 0 && A(c), d = g(() => l !== !1 || !!i.block.wrapper), f = g(() => u && !i.block.wrapper), y = g(() => u && d.value), x = g(() => j(i.block)?.applied === !0), C = g(() => [
2283
+ {
2284
+ value: "1",
2285
+ label: s.section.column1
2286
+ },
2287
+ {
2288
+ value: "2",
2289
+ label: s.section.column2
2290
+ },
2291
+ {
2292
+ value: "3",
2293
+ label: s.section.column3
2294
+ },
2295
+ {
2296
+ value: "1-2",
2297
+ label: s.section.ratio12
2298
+ },
2299
+ {
2300
+ value: "2-1",
2301
+ label: s.section.ratio21
2302
+ }
2303
+ ]);
2304
+ function E(e) {
2305
+ let t = e.target.value, n = Gi(i.block.children, t);
2306
+ a("update", {
2307
+ columns: t,
2308
+ children: n
2309
+ });
2310
+ }
2311
+ function D(e) {
2312
+ a("update", { stackOnMobile: e });
2313
+ }
2314
+ function O(e) {
2315
+ a("update", { borderRadius: e });
2316
+ }
2317
+ function k(e) {
2318
+ a("update", { wrapper: e ? { padding: {
2319
+ top: 20,
2320
+ right: 20,
2321
+ bottom: 20,
2322
+ left: 20
2323
+ } } : void 0 });
2324
+ }
2325
+ function M(e) {
2326
+ a("update", { wrapper: {
2327
+ ...i.block.wrapper,
2328
+ ...e
2329
+ } });
2330
+ }
2331
+ function N(e) {
2332
+ M({ padding: e });
2333
+ }
2334
+ function P(e) {
2335
+ M({ borderRadius: e });
2336
+ }
2337
+ return (t, n) => (o(), _(w, null, [
2338
+ S("div", Ki, [S("label", { class: h(p(H)) }, T(p(s).section.columns), 3), S("select", {
2339
+ class: h(p(G)),
2340
+ value: e.block.columns,
2341
+ onChange: E
2342
+ }, [(o(!0), _(w, null, r(C.value, (e) => (o(), _("option", {
2343
+ key: e.value,
2344
+ value: e.value
2345
+ }, T(e.label), 9, Ji))), 128))], 42, qi)]),
2346
+ e.block.columns === "1" ? v("", !0) : (o(), _("div", Yi, [m(q, {
2347
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2348
+ "model-value": e.block.stackOnMobile !== !1,
2349
+ label: p(s).section.stackOnMobile,
2350
+ "onUpdate:modelValue": n[0] ||= (e) => D(e)
2351
+ }, null, 8, ["model-value", "label"])])),
2352
+ m(Dt, {
2353
+ "model-value": e.block.borderRadius,
2354
+ label: p(s).section.borderRadius,
2355
+ max: 50,
2356
+ "testid-prefix": "section",
2357
+ "onUpdate:modelValue": O
2358
+ }, null, 8, ["model-value", "label"]),
2359
+ x.value ? v("", !0) : (o(), b(xt, {
2360
+ key: 1,
2361
+ "model-value": e.block.border,
2362
+ "testid-prefix": "section",
2363
+ "onUpdate:modelValue": n[1] ||= (e) => a("update", { border: e })
2364
+ }, null, 8, ["model-value"])),
2365
+ d.value ? (o(), _("div", Xi, [
2366
+ m(q, {
2367
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2368
+ "model-value": !!e.block.wrapper,
2369
+ label: p(s).section.wrapperEnable,
2370
+ disabled: f.value,
2371
+ "onUpdate:modelValue": n[2] ||= (e) => k(e)
2372
+ }, null, 8, [
2373
+ "model-value",
2374
+ "label",
2375
+ "disabled"
2376
+ ]),
2377
+ y.value ? (o(), _("p", Zi, T(p(s).section.wrapperLayoutConflict), 1)) : v("", !0),
2378
+ e.block.wrapper ? (o(), _("div", Qi, [
2379
+ S("div", null, [S("label", { class: h(p(H)) }, T(p(s).blockSettings.color), 3), m(K, {
2380
+ "model-value": e.block.wrapper.backgroundColor ?? "",
2381
+ "allow-transparent": "",
2382
+ "onUpdate:modelValue": n[3] ||= (e) => M({ backgroundColor: e })
2383
+ }, null, 8, ["model-value"])]),
2384
+ m(kn, {
2385
+ "model-value": e.block.wrapper.backgroundImage,
2386
+ "testid-prefix": "section-wrapper",
2387
+ "onUpdate:modelValue": n[4] ||= (e) => M({ backgroundImage: e })
2388
+ }, null, 8, ["model-value"]),
2389
+ m(vn, {
2390
+ label: p(s).blockSettings.padding,
2391
+ "model-value": e.block.wrapper.padding ?? {
2392
+ top: 0,
2393
+ right: 0,
2394
+ bottom: 0,
2395
+ left: 0
2396
+ },
2397
+ "onUpdate:modelValue": N
2398
+ }, null, 8, ["label", "model-value"]),
2399
+ m(Dt, {
2400
+ "model-value": e.block.wrapper.borderRadius,
2401
+ label: p(s).section.borderRadius,
2402
+ max: 50,
2403
+ "testid-prefix": "section-wrapper",
2404
+ "onUpdate:modelValue": P
2405
+ }, null, 8, ["model-value", "label"])
2406
+ ])) : v("", !0)
2407
+ ])) : v("", !0)
2408
+ ], 64));
2409
+ }
2410
+ }), 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({
2411
+ __name: "SocialToolbar",
2412
+ props: { block: {} },
2413
+ emits: ["update"],
2414
+ setup(e, { emit: t }) {
2415
+ let n = e, i = t, { t: a } = B();
2416
+ function s(e, t) {
2417
+ i("update", { [e]: t });
2418
+ }
2419
+ function c() {
2420
+ let e = {
2421
+ id: I(),
2422
+ platform: "facebook",
2423
+ url: ""
2424
+ };
2425
+ i("update", { icons: [...n.block.icons, e] });
2426
+ }
2427
+ function l(e, t, r) {
2428
+ let a = n.block.icons.map((n) => n.id === e ? {
2429
+ ...n,
2430
+ [t]: r
2431
+ } : n);
2432
+ i("update", { icons: a });
2433
+ }
2434
+ function u(e) {
2435
+ i("update", { icons: n.block.icons.filter((t) => t.id !== e) });
2436
+ }
2437
+ return (t, n) => (o(), _(w, null, [
2438
+ 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", {
2439
+ key: e.id,
2440
+ 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"
2441
+ }, [S("div", na, [S("select", {
2442
+ "data-testid": "social-platform-select",
2443
+ class: h([p(G), "tpl:flex-1"]),
2444
+ value: e.platform,
2445
+ onChange: (t) => l(e.id, "platform", t.target.value)
2446
+ }, [(o(!0), _(w, null, r(p(z), (e) => (o(), _("option", {
2447
+ key: e,
2448
+ value: e
2449
+ }, T(p(a).social.platforms[e]), 9, ia))), 128))], 42, ra), S("button", {
2450
+ class: h(p(tt)),
2451
+ title: p(a).social.removeIcon,
2452
+ onClick: (t) => u(e.id)
2453
+ }, [m(p(Ke), {
2454
+ size: 14,
2455
+ "stroke-width": 2
2456
+ })], 10, aa)]), m(J, {
2457
+ "model-value": e.url,
2458
+ type: "url",
2459
+ placeholder: p(a).social.urlPlaceholder,
2460
+ "onUpdate:modelValue": (t) => l(e.id, "url", t)
2461
+ }, null, 8, [
2462
+ "model-value",
2463
+ "placeholder",
2464
+ "onUpdate:modelValue"
2465
+ ])]))), 128)), S("button", {
2466
+ class: h(p(nt)),
2467
+ onClick: c
2468
+ }, [m(p(V), {
2469
+ size: 14,
2470
+ "stroke-width": 2
2471
+ }), D(" " + T(p(a).social.addIcon), 1)], 2)])]),
2472
+ S("div", oa, [S("label", { class: h(p(H)) }, T(p(a).social.style), 3), S("select", {
2473
+ class: h(p(G)),
2474
+ value: e.block.iconStyle,
2475
+ onChange: n[0] ||= (e) => s("iconStyle", e.target.value)
2476
+ }, [
2477
+ S("option", ca, T(p(a).social.styleSolid), 1),
2478
+ S("option", la, T(p(a).social.styleOutlined), 1),
2479
+ S("option", ua, T(p(a).social.styleRounded), 1),
2480
+ S("option", da, T(p(a).social.styleSquare), 1),
2481
+ S("option", fa, T(p(a).social.styleCircle), 1),
2482
+ S("option", pa, T(p(a).social.stylePlain), 1)
2483
+ ], 42, sa)]),
2484
+ S("div", ma, [S("label", { class: h(p(H)) }, T(p(a).social.color), 3), S("select", {
2485
+ "data-testid": "social-tone-select",
2486
+ class: h(p(G)),
2487
+ value: e.block.iconTone ?? "brand",
2488
+ onChange: n[1] ||= (e) => s("iconTone", e.target.value)
2489
+ }, [
2490
+ S("option", ga, T(p(a).social.colorBrand), 1),
2491
+ S("option", _a, T(p(a).social.colorDark), 1),
2492
+ S("option", va, T(p(a).social.colorLight), 1)
2493
+ ], 42, ha)]),
2494
+ S("div", ya, [S("label", { class: h(p(H)) }, T(p(a).social.size), 3), m(Y, {
2495
+ options: [
2496
+ {
2497
+ value: "small",
2498
+ label: p(a).social.sizeSmall
2499
+ },
2500
+ {
2501
+ value: "medium",
2502
+ label: p(a).social.sizeMedium
2503
+ },
2504
+ {
2505
+ value: "large",
2506
+ label: p(a).social.sizeLarge
2507
+ }
2508
+ ],
2509
+ "model-value": e.block.iconSize,
2510
+ "onUpdate:modelValue": n[2] ||= (e) => s("iconSize", e)
2511
+ }, null, 8, ["options", "model-value"])]),
2512
+ S("div", ba, [S("label", { class: h(p(H)) }, T(p(a).social.spacing), 3), S("div", xa, [S("input", {
2513
+ type: "number",
2514
+ class: h(p(W)),
2515
+ value: e.block.spacing,
2516
+ min: "0",
2517
+ max: "50",
2518
+ onInput: n[3] ||= (e) => s("spacing", Number(e.target.value))
2519
+ }, null, 42, Sa), S("span", { class: h(p(U)) }, "px", 2)])]),
2520
+ S("div", Ca, [S("label", { class: h(p(H)) }, T(p(a).social.align), 3), m(Y, {
2521
+ options: [
2522
+ {
2523
+ value: "left",
2524
+ label: p(a).title.alignLeft,
2525
+ icon: p(He)
2526
+ },
2527
+ {
2528
+ value: "center",
2529
+ label: p(a).title.alignCenter,
2530
+ icon: p(Ze)
2531
+ },
2532
+ {
2533
+ value: "right",
2534
+ label: p(a).title.alignRight,
2535
+ icon: p(ze)
2536
+ }
2537
+ ],
2538
+ "model-value": e.block.align,
2539
+ "onUpdate:modelValue": n[4] ||= (e) => s("align", e)
2540
+ }, null, 8, ["options", "model-value"])])
2541
+ ], 64));
2542
+ }
2543
+ }), Ta = { class: "tpl:mb-3.5" }, Ea = { class: "tpl:flex tpl:items-stretch" }, Da = ["value"], Oa = ["value"], ka = /* @__PURE__ */ l({
2544
+ __name: "SpacerToolbar",
2545
+ props: { block: {} },
2546
+ emits: ["update"],
2547
+ setup(e, { emit: t }) {
2548
+ let n = t, { t: r } = B();
2549
+ return (t, i) => (o(), _("div", Ta, [
2550
+ S("label", { class: h(p(H)) }, T(p(r).spacer.height), 3),
2551
+ S("div", Ea, [S("input", {
2552
+ type: "number",
2553
+ class: h(p(W)),
2554
+ value: e.block.height,
2555
+ min: "10",
2556
+ max: "100",
2557
+ onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
2558
+ }, null, 42, Da), S("span", { class: h(p(U)) }, "px", 2)]),
2559
+ S("input", {
2560
+ type: "range",
2561
+ class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
2562
+ value: e.block.height,
2563
+ min: "10",
2564
+ max: "100",
2565
+ onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
2566
+ }, null, 40, Oa)
2567
+ ]));
2568
+ }
2569
+ }), 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 = {
2570
+ key: 0,
2571
+ class: "tpl:mb-3.5"
2572
+ }, 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({
2573
+ __name: "TableToolbar",
2574
+ props: {
2575
+ block: {},
2576
+ fontFamilies: {}
2577
+ },
2578
+ emits: ["update"],
2579
+ setup(e, { emit: t }) {
2580
+ let n = e, i = t, { t: a } = B(), s = g(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
2581
+ function c(e, t) {
2582
+ i("update", { [e]: t });
2583
+ }
2584
+ function l() {
2585
+ let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
2586
+ id: I(),
2587
+ cells: Array.from({ length: e }, () => ({
2588
+ id: I(),
2589
+ content: ""
2590
+ }))
2591
+ };
2592
+ i("update", { rows: [...n.block.rows, t] });
2593
+ }
2594
+ function u(e) {
2595
+ i("update", { rows: n.block.rows.filter((t) => t.id !== e) });
2596
+ }
2597
+ function d() {
2598
+ let e = n.block.rows.map((e) => ({
2599
+ ...e,
2600
+ cells: [...e.cells, {
2601
+ id: I(),
2602
+ content: ""
2603
+ }]
2604
+ }));
2605
+ i("update", { rows: e });
2606
+ }
2607
+ function f(e) {
2608
+ let t = n.block.rows.map((t) => ({
2609
+ ...t,
2610
+ cells: t.cells.filter((t, n) => n !== e)
2611
+ }));
2612
+ i("update", { rows: t });
2613
+ }
2614
+ return (t, n) => (o(), _(w, null, [
2615
+ 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, [
2616
+ S("button", {
2617
+ 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",
2618
+ disabled: e.block.rows.length <= 1,
2619
+ onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
2620
+ }, [m(p(Xe), {
2621
+ size: 12,
2622
+ "stroke-width": 2
2623
+ })], 8, Fa),
2624
+ S("span", Ia, T(e.block.rows.length), 1),
2625
+ S("button", {
2626
+ 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)]",
2627
+ onClick: l
2628
+ }, [m(p(V), {
2629
+ size: 12,
2630
+ "stroke-width": 2
2631
+ })])
2632
+ ])]), S("div", La, [S("span", Ra, T(p(a).table.columns), 1), S("div", za, [
2633
+ S("button", {
2634
+ 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",
2635
+ disabled: s.value <= 1,
2636
+ onClick: n[1] ||= (e) => f(s.value - 1)
2637
+ }, [m(p(Xe), {
2638
+ size: 12,
2639
+ "stroke-width": 2
2640
+ })], 8, Ba),
2641
+ S("span", Va, T(s.value), 1),
2642
+ S("button", {
2643
+ 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)]",
2644
+ onClick: d
2645
+ }, [m(p(V), {
2646
+ size: 12,
2647
+ "stroke-width": 2
2648
+ })])
2649
+ ])])])]),
2650
+ S("div", Ha, [m(q, {
2651
+ class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
2652
+ "model-value": e.block.hasHeaderRow,
2653
+ label: p(a).table.hasHeaderRow,
2654
+ "onUpdate:modelValue": n[2] ||= (e) => c("hasHeaderRow", e)
2655
+ }, null, 8, ["model-value", "label"])]),
2656
+ e.block.hasHeaderRow ? (o(), _("div", Ua, [S("label", { class: h(p(H)) }, T(p(a).table.headerBackgroundColor), 3), m(K, {
2657
+ "model-value": e.block.headerBackgroundColor ?? "",
2658
+ "seed-color": p(rt),
2659
+ placeholder: p(a).table.noHeaderBg,
2660
+ "onUpdate:modelValue": n[3] ||= (e) => c("headerBackgroundColor", e || null)
2661
+ }, null, 8, [
2662
+ "model-value",
2663
+ "seed-color",
2664
+ "placeholder"
2665
+ ])])) : v("", !0),
2666
+ S("div", Wa, [S("label", { class: h(p(H)) }, T(p(a).table.borderColor), 3), m(K, {
2667
+ "model-value": e.block.borderColor,
2668
+ "onUpdate:modelValue": n[4] ||= (e) => c("borderColor", e)
2669
+ }, null, 8, ["model-value"])]),
2670
+ S("div", Ga, [S("label", { class: h(p(H)) }, T(p(a).table.borderWidth), 3), S("div", Ka, [S("input", {
2671
+ type: "number",
2672
+ class: h(p(W)),
2673
+ value: e.block.borderWidth,
2674
+ min: "0",
2675
+ max: "10",
2676
+ onInput: n[5] ||= (e) => c("borderWidth", Number(e.target.value))
2677
+ }, null, 42, qa), S("span", { class: h(p(U)) }, "px", 2)])]),
2678
+ S("div", Ja, [S("label", { class: h(p(H)) }, T(p(a).table.cellPadding), 3), S("div", Ya, [S("input", {
2679
+ type: "number",
2680
+ class: h(p(W)),
2681
+ value: e.block.cellPadding,
2682
+ min: "0",
2683
+ max: "30",
2684
+ onInput: n[6] ||= (e) => c("cellPadding", Number(e.target.value))
2685
+ }, null, 42, Xa), S("span", { class: h(p(U)) }, "px", 2)])]),
2686
+ S("div", Za, [S("label", { class: h(p(H)) }, T(p(a).table.fontFamily), 3), S("select", {
2687
+ class: h(p(G)),
2688
+ value: p(ct)(e.block.fontFamily),
2689
+ onChange: n[7] ||= (e) => c("fontFamily", e.target.value || void 0)
2690
+ }, [S("option", $a, T(p(a).title.inheritFont), 1), (o(!0), _(w, null, r(e.fontFamilies, (e) => (o(), _("option", {
2691
+ key: e.value,
2692
+ value: e.value
2693
+ }, T(e.label), 9, eo))), 128))], 42, Qa)]),
2694
+ S("div", to, [S("label", { class: h(p(H)) }, T(p(a).table.fontSize), 3), S("div", no, [S("input", {
2695
+ type: "number",
2696
+ class: h(p(W)),
2697
+ value: e.block.fontSize,
2698
+ min: "10",
2699
+ max: "32",
2700
+ onInput: n[8] ||= (e) => c("fontSize", Number(e.target.value))
2701
+ }, null, 42, ro), S("span", { class: h(p(U)) }, "px", 2)])]),
2702
+ S("div", io, [S("label", { class: h(p(H)) }, T(p(a).table.color), 3), m(K, {
2703
+ "model-value": e.block.color ?? "",
2704
+ "onUpdate:modelValue": n[9] ||= (e) => c("color", e || void 0)
2705
+ }, null, 8, ["model-value"])]),
2706
+ S("div", ao, [S("label", { class: h(p(H)) }, T(p(a).table.textAlign), 3), m(Y, {
2707
+ options: [
2708
+ {
2709
+ value: "left",
2710
+ label: p(a).title.alignLeft,
2711
+ icon: p(He)
2712
+ },
2713
+ {
2714
+ value: "center",
2715
+ label: p(a).title.alignCenter,
2716
+ icon: p(Ze)
2717
+ },
2718
+ {
2719
+ value: "right",
2720
+ label: p(a).title.alignRight,
2721
+ icon: p(ze)
2722
+ }
2723
+ ],
2724
+ "model-value": e.block.textAlign,
2725
+ "onUpdate:modelValue": n[10] ||= (e) => c("textAlign", e)
2726
+ }, null, 8, ["options", "model-value"])])
2727
+ ], 64));
2728
+ }
2729
+ }), 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({
2730
+ __name: "TitleToolbar",
2731
+ props: {
2732
+ block: {},
2733
+ fontFamilies: {}
2734
+ },
2735
+ emits: ["update"],
2736
+ setup(e, { emit: t }) {
2737
+ let n = t, { t: i } = B();
2738
+ function a(e, t) {
2739
+ n("update", { [e]: t });
2740
+ }
2741
+ return (t, n) => (o(), _(w, null, [
2742
+ S("div", so, [S("label", { class: h(p(H)) }, T(p(i).title.level), 3), S("select", {
2743
+ class: h(p(G)),
2744
+ value: e.block.level,
2745
+ onChange: n[0] ||= (e) => a("level", Number(e.target.value))
2746
+ }, [
2747
+ S("option", lo, T(p(i).title.heading1), 1),
2748
+ S("option", uo, T(p(i).title.heading2), 1),
2749
+ S("option", fo, T(p(i).title.heading3), 1),
2750
+ S("option", po, T(p(i).title.heading4), 1)
2751
+ ], 42, co)]),
2752
+ S("div", mo, [S("label", { class: h(p(H)) }, T(p(i).title.fontFamily), 3), S("select", {
2753
+ class: h(p(G)),
2754
+ value: p(ct)(e.block.fontFamily),
2755
+ onChange: n[1] ||= (e) => a("fontFamily", e.target.value || void 0)
2756
+ }, [S("option", go, T(p(i).title.inheritFont), 1), (o(!0), _(w, null, r(e.fontFamilies, (e) => (o(), _("option", {
2757
+ key: e.value,
2758
+ value: e.value
2759
+ }, T(e.label), 9, _o))), 128))], 42, ho)]),
2760
+ S("div", vo, [S("label", { class: h(p(H)) }, T(p(i).title.color), 3), m(K, {
2761
+ "model-value": e.block.color ?? "",
2762
+ "onUpdate:modelValue": n[2] ||= (e) => a("color", e || void 0)
2763
+ }, null, 8, ["model-value"])]),
2764
+ S("div", yo, [S("label", { class: h(p(H)) }, T(p(i).title.align), 3), m(Y, {
2765
+ options: [
2766
+ {
2767
+ value: "left",
2768
+ label: p(i).title.alignLeft,
2769
+ icon: p(He)
2770
+ },
2771
+ {
2772
+ value: "center",
2773
+ label: p(i).title.alignCenter,
2774
+ icon: p(Ze)
2775
+ },
2776
+ {
2777
+ value: "right",
2778
+ label: p(i).title.alignRight,
2779
+ icon: p(ze)
2780
+ }
2781
+ ],
2782
+ "model-value": e.block.textAlign,
2783
+ "onUpdate:modelValue": n[3] ||= (e) => a("textAlign", e)
2784
+ }, null, 8, ["options", "model-value"])])
2785
+ ], 64));
2786
+ }
2787
+ }), xo = { class: "tpl:mb-3.5" }, So = {
2788
+ key: 0,
2789
+ class: "tpl:mb-3.5"
2790
+ }, Co = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, wo = [
2791
+ "value",
2792
+ "placeholder",
2793
+ "title"
2794
+ ], 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 = {
2795
+ key: 0,
2796
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2797
+ }, No = ["value"], Po = { class: "tpl:mb-3.5" }, Fo = ["value"], Io = { value: "auto" }, Lo = { value: "custom" }, Ro = {
2798
+ key: 0,
2799
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2800
+ }, zo = ["value"], Bo = { class: "tpl:mb-3.5" }, Vo = 350, Ho = 200, Uo = /* @__PURE__ */ l({
2801
+ __name: "VideoToolbar",
2802
+ props: { block: {} },
2803
+ emits: ["update"],
2804
+ setup(e, { emit: t }) {
2805
+ let r = e, i = t, { t: a } = B(), c = n(Ce, null), l = n(we, ie.liquid), u = $e(), d = [
2806
+ 300,
2807
+ 400,
2808
+ 500
2809
+ ], f = g(() => !!c), y = g(() => L(r.block.url, l)), x = g(() => {
2810
+ let e = r.block.width;
2811
+ return e === "full" ? "full" : d.includes(e) ? String(e) : "custom";
2812
+ }), C = g(() => typeof r.block.height == "number" ? "custom" : "auto"), E = s(!1), { start: O } = ye(() => {
2813
+ E.value = !1;
2814
+ }, 1e3, { immediate: !1 });
2815
+ function k(e, t) {
2816
+ i("update", { [e]: t });
2817
+ }
2818
+ function A(e) {
2819
+ if (e === "custom") {
2820
+ let e = r.block.width;
2821
+ (typeof e != "number" || d.includes(e)) && k("width", Vo);
2822
+ } else k("width", e === "full" ? "full" : Number(e));
2823
+ }
2824
+ function j(e) {
2825
+ let t = Number(e);
2826
+ !Number.isFinite(t) || t <= 0 || k("width", t);
2827
+ }
2828
+ function M(e) {
2829
+ k("height", e === "custom" ? Ho : void 0);
2830
+ }
2831
+ function N(e) {
2832
+ let t = Number(e);
2833
+ !Number.isFinite(t) || t <= 0 || k("height", t);
2834
+ }
2835
+ async function P() {
2836
+ let e = await c?.({ accept: ["images"] });
2837
+ u.alive && e && (k("thumbnailUrl", e.url), E.value = !0, O());
2838
+ }
2839
+ return (t, n) => (o(), _(w, null, [
2840
+ S("div", xo, [
2841
+ S("label", { class: h(p(H)) }, T(p(a).video.videoUrl), 3),
2842
+ m(J, {
2843
+ "model-value": e.block.url,
2844
+ type: "url",
2845
+ placeholder: p(a).video.videoUrlPlaceholder,
2846
+ "onUpdate:modelValue": n[0] ||= (e) => k("url", e)
2847
+ }, null, 8, ["model-value", "placeholder"]),
2848
+ e.block.url ? (o(), b(q, {
2849
+ key: 0,
2850
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2851
+ "model-value": e.block.openInNewTab ?? !1,
2852
+ label: p(a).video.openInNewTab,
2853
+ "onUpdate:modelValue": n[1] ||= (e) => k("openInNewTab", e)
2854
+ }, null, 8, ["model-value", "label"])) : v("", !0)
2855
+ ]),
2856
+ 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", {
2857
+ type: "url",
2858
+ class: h(p(G)),
2859
+ value: e.block.placeholderUrl || "",
2860
+ placeholder: p(a).video.placeholderUrlPlaceholder,
2861
+ title: p(a).video.placeholderUrlTooltip,
2862
+ onInput: n[2] ||= (e) => k("placeholderUrl", e.target.value)
2863
+ }, null, 42, wo)])) : v("", !0),
2864
+ S("div", To, [
2865
+ S("label", { class: h(p(H)) }, [D(T(p(a).video.customThumbnail) + " ", 1), S("span", Eo, T(p(a).video.optional), 1)], 2),
2866
+ m(J, {
2867
+ "model-value": e.block.thumbnailUrl,
2868
+ type: "url",
2869
+ placeholder: p(a).video.thumbnailPlaceholder,
2870
+ pulse: E.value,
2871
+ "onUpdate:modelValue": n[3] ||= (e) => k("thumbnailUrl", e)
2872
+ }, null, 8, [
2873
+ "model-value",
2874
+ "placeholder",
2875
+ "pulse"
2876
+ ]),
2877
+ f.value ? (o(), _("button", {
2878
+ key: 0,
2879
+ 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",
2880
+ style: {
2881
+ "border-color": "var(--tpl-border)",
2882
+ color: "var(--tpl-primary)",
2883
+ "background-color": "var(--tpl-bg)"
2884
+ },
2885
+ onClick: P
2886
+ }, [m(p(Ge), {
2887
+ size: 14,
2888
+ "stroke-width": 1.5
2889
+ }), D(" " + T(p(a).image.browseMedia), 1)])) : v("", !0)
2890
+ ]),
2891
+ S("div", Do, [S("label", { class: h(p(H)) }, T(p(a).video.altText), 3), m(J, {
2892
+ "model-value": e.block.alt,
2893
+ type: "text",
2894
+ placeholder: p(a).video.altTextPlaceholder,
2895
+ "onUpdate:modelValue": n[4] ||= (e) => k("alt", e)
2896
+ }, null, 8, ["model-value", "placeholder"])]),
2897
+ S("div", Oo, [
2898
+ S("label", { class: h(p(H)) }, T(p(a).video.width), 3),
2899
+ S("select", {
2900
+ class: h(p(G)),
2901
+ "data-testid": "video-width-mode",
2902
+ value: x.value,
2903
+ onChange: n[5] ||= (e) => A(e.target.value)
2904
+ }, [
2905
+ S("option", Ao, T(p(a).video.fullWidth), 1),
2906
+ n[10] ||= S("option", { value: "300" }, "300px", -1),
2907
+ n[11] ||= S("option", { value: "400" }, "400px", -1),
2908
+ n[12] ||= S("option", { value: "500" }, "500px", -1),
2909
+ S("option", jo, T(p(a).video.widthCustom), 1)
2910
+ ], 42, ko),
2911
+ x.value === "custom" ? (o(), _("div", Mo, [S("input", {
2912
+ type: "number",
2913
+ "data-testid": "video-width-input",
2914
+ class: h(p(W)),
2915
+ value: e.block.width,
2916
+ min: "20",
2917
+ onInput: n[6] ||= (e) => j(e.target.value)
2918
+ }, null, 42, No), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
2919
+ ]),
2920
+ S("div", Po, [
2921
+ S("label", { class: h(p(H)) }, T(p(a).video.height), 3),
2922
+ S("select", {
2923
+ class: h(p(G)),
2924
+ "data-testid": "video-height-mode",
2925
+ value: C.value,
2926
+ onChange: n[7] ||= (e) => M(e.target.value)
2927
+ }, [S("option", Io, T(p(a).video.heightAuto), 1), S("option", Lo, T(p(a).video.heightCustom), 1)], 42, Fo),
2928
+ C.value === "custom" ? (o(), _("div", Ro, [S("input", {
2929
+ type: "number",
2930
+ "data-testid": "video-height-input",
2931
+ class: h(p(W)),
2932
+ value: e.block.height,
2933
+ min: "20",
2934
+ onInput: n[8] ||= (e) => N(e.target.value)
2935
+ }, null, 42, zo), S("span", { class: h(p(U)) }, "px", 2)])) : v("", !0)
2936
+ ]),
2937
+ S("div", Bo, [S("label", { class: h(p(H)) }, T(p(a).title.align), 3), m(Y, {
2938
+ options: [
2939
+ {
2940
+ value: "left",
2941
+ label: p(a).title.alignLeft
2942
+ },
2943
+ {
2944
+ value: "center",
2945
+ label: p(a).title.alignCenter
2946
+ },
2947
+ {
2948
+ value: "right",
2949
+ label: p(a).title.alignRight
2950
+ }
2951
+ ],
2952
+ "model-value": e.block.align,
2953
+ "onUpdate:modelValue": n[9] ||= (e) => k("align", e)
2954
+ }, null, 8, ["options", "model-value"])])
2955
+ ], 64));
2956
+ }
2957
+ }), 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({
2958
+ __name: "Toolbar",
2959
+ props: { block: {} },
2960
+ emits: [
2961
+ "update",
2962
+ "delete",
2963
+ "duplicate"
2964
+ ],
2965
+ setup(e, { emit: t }) {
2966
+ let r = E(() => import("./CountdownToolbar-tmiTPEXm.js")), i = e, a = t, { t: s } = B(), l = be(Ae, "Toolbar"), u = n(ke, []), d = g(() => i.block.type), f = g(() => ne(i.block)), h = g(() => {
2967
+ if (f.value) return u.find((e) => e.type === i.block.customType);
2968
+ }), y = g(() => f.value ? h.value?.name ?? i.block.customType : ve(d.value, s)), x = g(() => st(l.fonts.value, "fontFamily" in i.block ? i.block.fontFamily : void 0));
2969
+ function C(e) {
2970
+ a("update", e);
2971
+ }
2972
+ return (t, n) => (o(), _("aside", {
2973
+ "data-testid": "block-toolbar",
2974
+ "aria-label": p(s).landmarks.blockToolbar,
2975
+ class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
2976
+ }, [S("div", Go, [S("div", Ko, [p(at)[d.value] ? (o(), b(c(p(at)[d.value]), {
2977
+ key: 0,
2978
+ size: 16,
2979
+ "stroke-width": 1.5
2980
+ })) : f.value ? (o(), b(p(Ne), {
2981
+ key: 1,
2982
+ size: 16,
2983
+ "stroke-width": 1.5
2984
+ })) : v("", !0), S("h3", qo, T(y.value), 1)]), S("div", Jo, [S("button", {
2985
+ 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)]",
2986
+ title: p(s).toolbar.duplicate,
2987
+ onClick: n[0] ||= (e) => a("duplicate")
2988
+ }, [m(p(Ie), {
2989
+ size: 14,
2990
+ "stroke-width": 2
2991
+ })], 8, Yo), S("button", {
2992
+ 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)]",
2993
+ title: p(s).toolbar.delete,
2994
+ onClick: n[1] ||= (e) => a("delete")
2995
+ }, [m(p(Ve), {
2996
+ size: 14,
2997
+ "stroke-width": 2
2998
+ })], 8, Xo)])]), S("div", Zo, [f.value ? (o(), b(Ur, {
2999
+ key: 0,
3000
+ block: e.block,
3001
+ onUpdateFieldValues: n[2] ||= (e) => a("update", { fieldValues: e }),
3002
+ onUpdateDataSourceFetched: n[3] ||= (e) => a("update", { dataSourceFetched: e })
3003
+ }, null, 8, ["block"])) : d.value === "section" ? (o(), b($i, {
3004
+ key: 1,
3005
+ block: e.block,
3006
+ onUpdate: C
3007
+ }, null, 8, ["block"])) : d.value === "title" ? (o(), b(bo, {
3008
+ key: 2,
3009
+ block: e.block,
3010
+ "font-families": x.value,
3011
+ onUpdate: C
3012
+ }, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), b(Wi, {
3013
+ key: 3,
3014
+ block: e.block,
3015
+ onUpdate: C
3016
+ }, null, 8, ["block"])) : d.value === "image" ? (o(), b(Oi, {
3017
+ key: 4,
3018
+ block: e.block,
3019
+ onUpdate: C
3020
+ }, null, 8, ["block"])) : d.value === "video" ? (o(), b(Uo, {
3021
+ key: 5,
3022
+ block: e.block,
3023
+ onUpdate: C
3024
+ }, null, 8, ["block"])) : d.value === "button" ? (o(), b(Jt, {
3025
+ key: 6,
3026
+ block: e.block,
3027
+ "font-families": x.value,
3028
+ onUpdate: C
3029
+ }, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), b(Yr, {
3030
+ key: 7,
3031
+ block: e.block,
3032
+ onUpdate: C
3033
+ }, null, 8, ["block"])) : d.value === "social" ? (o(), b(wa, {
3034
+ key: 8,
3035
+ block: e.block,
3036
+ onUpdate: C
3037
+ }, null, 8, ["block"])) : d.value === "menu" ? (o(), b(Bi, {
3038
+ key: 9,
3039
+ block: e.block,
3040
+ "font-families": x.value,
3041
+ onUpdate: C
3042
+ }, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), b(oo, {
3043
+ key: 10,
3044
+ block: e.block,
3045
+ "font-families": x.value,
3046
+ onUpdate: C
3047
+ }, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), b(ka, {
3048
+ key: 11,
3049
+ block: e.block,
3050
+ onUpdate: C
3051
+ }, null, 8, ["block"])) : d.value === "html" ? (o(), b($r, {
3052
+ key: 12,
3053
+ block: e.block,
3054
+ onUpdate: C
3055
+ }, null, 8, ["block"])) : d.value === "countdown" ? (o(), b(p(r), {
3056
+ key: 13,
3057
+ block: e.block,
3058
+ "font-families": x.value,
3059
+ onUpdate: C
3060
+ }, null, 8, ["block", "font-families"])) : v("", !0), m(ar, {
3061
+ block: e.block,
3062
+ "is-first-section": d.value === "paragraph",
3063
+ onUpdate: C
3064
+ }, null, 8, ["block", "is-first-section"])])], 8, Wo));
3065
+ }
3066
+ }), $o = /* @__PURE__ */ e({ default: () => es }), es = /*#__PURE__*/ Qe(Qo, [["__scopeId", "data-v-e2d2c22f"]]);
3067
+ //#endregion
3068
+ export { es as default, Y as i, $ as n, X as r, $o as t };
3069
+
3070
+ //# sourceMappingURL=Toolbar-GFIZQHzw.js.map