@templatical/editor 0.38.0 → 0.39.1

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 (289) hide show
  1. package/README.md +2 -4
  2. package/dist/{AiChatSidebar-tu4eLcf_.js → AiChatSidebar-pOxCZWz9.js} +67 -67
  3. package/dist/{AiFeatureMenu-BF0i0vA4.js → AiFeatureMenu-Bljk6Qjv.js} +7 -7
  4. package/dist/{BlockIssueBadge-DT-FqKeC.js → BlockIssueBadge-D5oGxOQP.js} +5 -5
  5. package/dist/{BlockPreviewCanvas-DDCmMram.js → BlockPreviewCanvas-DXGjUECG.js} +27 -27
  6. package/dist/{CloudHeaderExtras-NPhudovT.js → CloudHeaderExtras-DaocwNmy.js} +5 -5
  7. package/dist/{CloudPanels-Iwnky0iA.js → CloudPanels-CyZAnSJY.js} +7 -7
  8. package/dist/{CollaboratorBar-DAITu0hz.js → CollaboratorBar-C7Zca3g1.js} +4 -4
  9. package/dist/{CommentsPanel-CDvgmWP1.js → CommentsPanel-CNOb7YCm.js} +2 -2
  10. package/dist/{CommentsSidebar-X_xqM3dR.js → CommentsSidebar-VmwjU9va.js} +14 -14
  11. package/dist/{CountdownBlock-ZFJIdbP6.js → CountdownBlock-DSvbf3qU.js} +3 -3
  12. package/dist/{CountdownToolbar-DBFoG3a6.js → CountdownToolbar-C2kfS6Oy.js} +31 -30
  13. package/dist/{DesignReferenceSidebar--QtXjLrw.js → DesignReferenceSidebar-QC4gEUWp.js} +11 -11
  14. package/dist/{IssuesPanel-BLbNFMSX.js → IssuesPanel-DL2Xr14_.js} +8 -8
  15. package/dist/{LoadingTrack-BlTL4zFv.js → LoadingTrack-C2jKCU2d.js} +1 -1
  16. package/dist/LogicTagInsertButton-D8IwH-9Z.js +1071 -0
  17. package/dist/{MediaPanels-CMTAhDXB.js → MediaPanels-Cc4UkfG1.js} +2 -2
  18. package/dist/MergeTagInput-QI-5KG2R.js +81 -0
  19. package/dist/{MergeTagModeToggle-DKN6ihI5.js → MergeTagModeToggle-D793Bj_E.js} +32 -73
  20. package/dist/{ParagraphEditor-1E9yzOfk.js → ParagraphEditor-DkkPSexG.js} +50 -51
  21. package/dist/{RestoreVersionDialog-BMGUkcd8.js → RestoreVersionDialog-BgueZnZr.js} +5 -5
  22. package/dist/{RichTextEditorContent-BnxbQUV9.js → RichTextEditorContent-BC5UTVnb.js} +12 -12
  23. package/dist/{SaveBlockDialog-WKASpCCT.js → SaveBlockDialog-BuTuVlLr.js} +12 -11
  24. package/dist/{SavedBlocksBrowserModal-AYEXTMtQ.js → SavedBlocksBrowserModal-Srhix8BB.js} +17 -16
  25. package/dist/{SavedBlocksPanels-D_CpacTl.js → SavedBlocksPanels-B2iScCS-.js} +2 -2
  26. package/dist/{SavedBlocksPickBar-BHMwg-1G.js → SavedBlocksPickBar-cI7bDQQi.js} +4 -4
  27. package/dist/{TemplateScoringPanel-CSin43YM.js → TemplateScoringPanel-C2Rdlyn6.js} +104 -104
  28. package/dist/TemplateSettings-C_5leDdF.js +245 -0
  29. package/dist/{TestEmailModal-BxizsRCd.js → TestEmailModal-DJ5q_u4N.js} +55 -55
  30. package/dist/{TestEmailPanel-vd2e5HzT.js → TestEmailPanel-CP24UGst.js} +2 -2
  31. package/dist/{TitleEditor-CLJ68Ty4.js → TitleEditor-QBBOXtxx.js} +18 -18
  32. package/dist/ToggleSwitch-JvQ_CmI1.js +102 -0
  33. package/dist/Toolbar-COD2TW20.js +2426 -0
  34. package/dist/{TplModal-Q9fDgS1M.js → TplModal-C8xGjC1l.js} +5 -5
  35. package/dist/{VersionHistoryMenu-eGYVhM4H.js → VersionHistoryMenu-BVQityes.js} +10 -10
  36. package/dist/{VersionHistoryPanels-C7Ntrrfq.js → VersionHistoryPanels-BrK6na4A.js} +2 -2
  37. package/dist/{VersionPreviewBanner-BbQXnR0M.js → VersionPreviewBanner-BaMSgA1O.js} +3 -3
  38. package/dist/{blockTypeIcons-5qD4bB76.js → blockTypeIcons-CdXugKyV.js} +16 -37
  39. package/dist/bundle-stats.json +8 -8
  40. package/dist/{cdn/chunks/ca-D9S-UCfZ.js → ca-YlPDhElv.js} +5 -3
  41. package/dist/cdn/chunks/{AiChatSidebar-dyqqHAcI.js → AiChatSidebar-CjSEoK4x.js} +54 -54
  42. package/dist/cdn/chunks/AiChatSidebar-CjSEoK4x.js.map +1 -0
  43. package/dist/cdn/chunks/{AiFeatureMenu-BjVMwhW8.js → AiFeatureMenu-l0K5TOSn.js} +6 -6
  44. package/dist/cdn/chunks/{AiFeatureMenu-BjVMwhW8.js.map → AiFeatureMenu-l0K5TOSn.js.map} +1 -1
  45. package/dist/cdn/chunks/{BlockIssueBadge-BJ__oEtm.js → BlockIssueBadge-9hHpaXb9.js} +5 -5
  46. package/dist/cdn/chunks/{BlockIssueBadge-BJ__oEtm.js.map → BlockIssueBadge-9hHpaXb9.js.map} +1 -1
  47. package/dist/cdn/chunks/{BlockPreviewCanvas-B5f26eLE.js → BlockPreviewCanvas-lQrAdgG3.js} +30 -30
  48. package/dist/cdn/chunks/{BlockPreviewCanvas-B5f26eLE.js.map → BlockPreviewCanvas-lQrAdgG3.js.map} +1 -1
  49. package/dist/cdn/chunks/{CloudHeaderExtras-D5P5IEKA.js → CloudHeaderExtras-CXNe7Q-4.js} +5 -5
  50. package/dist/cdn/chunks/{CloudHeaderExtras-D5P5IEKA.js.map → CloudHeaderExtras-CXNe7Q-4.js.map} +1 -1
  51. package/dist/cdn/chunks/{CloudPanels-DkmR05nB.js → CloudPanels-bHhh9AUA.js} +6 -6
  52. package/dist/cdn/chunks/{CloudPanels-DkmR05nB.js.map → CloudPanels-bHhh9AUA.js.map} +1 -1
  53. package/dist/cdn/chunks/{CollaboratorBar-Yn7KSpt4.js → CollaboratorBar-DgqcaGGI.js} +5 -5
  54. package/dist/cdn/chunks/{CollaboratorBar-Yn7KSpt4.js.map → CollaboratorBar-DgqcaGGI.js.map} +1 -1
  55. package/dist/cdn/chunks/{CommentsPanel-CntwwocI.js → CommentsPanel-Cy4TlTHC.js} +3 -3
  56. package/dist/cdn/chunks/{CommentsPanel-CntwwocI.js.map → CommentsPanel-Cy4TlTHC.js.map} +1 -1
  57. package/dist/cdn/chunks/{CommentsSidebar-BLDKnKy7.js → CommentsSidebar-C7oAP3Mx.js} +5 -5
  58. package/dist/cdn/chunks/{CommentsSidebar-BLDKnKy7.js.map → CommentsSidebar-C7oAP3Mx.js.map} +1 -1
  59. package/dist/cdn/chunks/{CountdownBlock-B4AfqJwb.js → CountdownBlock-DdC8Lg5F.js} +4 -4
  60. package/dist/cdn/chunks/{CountdownBlock-B4AfqJwb.js.map → CountdownBlock-DdC8Lg5F.js.map} +1 -1
  61. package/dist/cdn/chunks/{CountdownToolbar-CA1dpuOI.js → CountdownToolbar-CN9h4nlC.js} +22 -21
  62. package/dist/cdn/chunks/{CountdownToolbar-CA1dpuOI.js.map → CountdownToolbar-CN9h4nlC.js.map} +1 -1
  63. package/dist/cdn/chunks/{DesignReferenceSidebar-D1Y9Hswe.js → DesignReferenceSidebar-Bjo0M-AY.js} +7 -7
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-D1Y9Hswe.js.map → DesignReferenceSidebar-Bjo0M-AY.js.map} +1 -1
  65. package/dist/cdn/chunks/{IssuesPanel-Q62LTqvd.js → IssuesPanel-DdFk-Blf.js} +6 -6
  66. package/dist/cdn/chunks/{IssuesPanel-Q62LTqvd.js.map → IssuesPanel-DdFk-Blf.js.map} +1 -1
  67. package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js → LoadingTrack-Ba5xh5HD.js} +2 -2
  68. package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js.map → LoadingTrack-Ba5xh5HD.js.map} +1 -1
  69. package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js +1035 -0
  70. package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js.map +1 -0
  71. package/dist/cdn/chunks/{MediaPanels-D21M6shx.js → MediaPanels-kX9AZQ7K.js} +3 -3
  72. package/dist/cdn/chunks/{MediaPanels-D21M6shx.js.map → MediaPanels-kX9AZQ7K.js.map} +1 -1
  73. package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js +83 -0
  74. package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js.map +1 -0
  75. package/dist/cdn/chunks/{MergeTagModeToggle-DYxkAGtA.js → MergeTagModeToggle-n3nvSNeQ.js} +33 -33
  76. package/dist/cdn/chunks/{MergeTagModeToggle-DYxkAGtA.js.map → MergeTagModeToggle-n3nvSNeQ.js.map} +1 -1
  77. package/dist/cdn/chunks/{ParagraphEditor-Bd-GQXee.js → ParagraphEditor-DO4RzP8l.js} +43 -43
  78. package/dist/cdn/chunks/{ParagraphEditor-Bd-GQXee.js.map → ParagraphEditor-DO4RzP8l.js.map} +1 -1
  79. package/dist/cdn/chunks/{RestoreVersionDialog-2X9RpM9A.js → RestoreVersionDialog-CzZ_sFnz.js} +5 -5
  80. package/dist/cdn/chunks/{RestoreVersionDialog-2X9RpM9A.js.map → RestoreVersionDialog-CzZ_sFnz.js.map} +1 -1
  81. package/dist/cdn/chunks/{RichTextEditorContent-D_rb0rmU.js → RichTextEditorContent-Ch5zeyZ7.js} +9 -9
  82. package/dist/cdn/chunks/{RichTextEditorContent-D_rb0rmU.js.map → RichTextEditorContent-Ch5zeyZ7.js.map} +1 -1
  83. package/dist/cdn/chunks/{SaveBlockDialog-CufdTomT.js → SaveBlockDialog-LgxYrXyx.js} +10 -9
  84. package/dist/cdn/chunks/{SaveBlockDialog-CufdTomT.js.map → SaveBlockDialog-LgxYrXyx.js.map} +1 -1
  85. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CqpaNsk7.js → SavedBlocksBrowserModal-CdeSsTpb.js} +9 -9
  86. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CqpaNsk7.js.map → SavedBlocksBrowserModal-CdeSsTpb.js.map} +1 -1
  87. package/dist/cdn/chunks/{SavedBlocksPanels-DpxYxddo.js → SavedBlocksPanels-B5hakNJj.js} +3 -3
  88. package/dist/cdn/chunks/{SavedBlocksPanels-DpxYxddo.js.map → SavedBlocksPanels-B5hakNJj.js.map} +1 -1
  89. package/dist/cdn/chunks/{SavedBlocksPickBar-Drpoav1B.js → SavedBlocksPickBar-Cl6PLwwV.js} +5 -5
  90. package/dist/cdn/chunks/{SavedBlocksPickBar-Drpoav1B.js.map → SavedBlocksPickBar-Cl6PLwwV.js.map} +1 -1
  91. package/dist/cdn/chunks/{TemplateScoringPanel-DBjUNULq.js → TemplateScoringPanel--JxR6CsQ.js} +86 -86
  92. package/dist/cdn/chunks/TemplateScoringPanel--JxR6CsQ.js.map +1 -0
  93. package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js +207 -0
  94. package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js.map +1 -0
  95. package/dist/cdn/chunks/{TestEmailModal-BTNlSW6f.js → TestEmailModal-BAuDxJtD.js} +53 -53
  96. package/dist/cdn/chunks/TestEmailModal-BAuDxJtD.js.map +1 -0
  97. package/dist/cdn/chunks/{TestEmailPanel-D0A9Zgxr.js → TestEmailPanel-GUGZisLp.js} +3 -3
  98. package/dist/cdn/chunks/{TestEmailPanel-D0A9Zgxr.js.map → TestEmailPanel-GUGZisLp.js.map} +1 -1
  99. package/dist/cdn/chunks/{TitleEditor-CrnuIq62.js → TitleEditor-uKu33Nwr.js} +16 -16
  100. package/dist/cdn/chunks/TitleEditor-uKu33Nwr.js.map +1 -0
  101. package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js +104 -0
  102. package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js.map +1 -0
  103. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js +2385 -0
  104. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js.map +1 -0
  105. package/dist/cdn/chunks/{TplModal-DYXrTz42.js → TplModal-DuwS2ifK.js} +5 -5
  106. package/dist/cdn/chunks/{TplModal-DYXrTz42.js.map → TplModal-DuwS2ifK.js.map} +1 -1
  107. package/dist/cdn/chunks/{VersionHistoryMenu-bDGnE4hb.js → VersionHistoryMenu-Dij1pTEb.js} +6 -6
  108. package/dist/cdn/chunks/{VersionHistoryMenu-bDGnE4hb.js.map → VersionHistoryMenu-Dij1pTEb.js.map} +1 -1
  109. package/dist/cdn/chunks/{VersionHistoryPanels-82P0Q0HM.js → VersionHistoryPanels-GeR6MStB.js} +3 -3
  110. package/dist/cdn/chunks/{VersionHistoryPanels-82P0Q0HM.js.map → VersionHistoryPanels-GeR6MStB.js.map} +1 -1
  111. package/dist/cdn/chunks/{VersionPreviewBanner-BJiwKkVC.js → VersionPreviewBanner-Df3FVlig.js} +4 -4
  112. package/dist/cdn/chunks/{VersionPreviewBanner-BJiwKkVC.js.map → VersionPreviewBanner-Df3FVlig.js.map} +1 -1
  113. package/dist/cdn/chunks/{blockTypeIcons-CNjJSFun.js → blockTypeIcons-raBjStuv.js} +2 -2
  114. package/dist/cdn/chunks/{blockTypeIcons-CNjJSFun.js.map → blockTypeIcons-raBjStuv.js.map} +1 -1
  115. package/dist/{ca-D9S-UCfZ.js → cdn/chunks/ca-YlPDhElv.js} +7 -1
  116. package/dist/cdn/chunks/{ca-D9S-UCfZ.js.map → ca-YlPDhElv.js.map} +1 -1
  117. package/dist/cdn/chunks/{cloud-BLgCKP7Z.js → cloud-eaXyxZ8l.js} +2 -2
  118. package/dist/cdn/chunks/{cloud-BLgCKP7Z.js.map → cloud-eaXyxZ8l.js.map} +1 -1
  119. package/dist/cdn/chunks/{createCloudRuntime-U-qCH-dq.js → createCloudRuntime-D5bXzcTe.js} +6 -6
  120. package/dist/cdn/chunks/{createCloudRuntime-U-qCH-dq.js.map → createCloudRuntime-D5bXzcTe.js.map} +1 -1
  121. package/dist/cdn/chunks/{de-BUPszLpi.js → de-CONjnzrF.js} +6 -2
  122. package/dist/cdn/chunks/{de-BUPszLpi.js.map → de-CONjnzrF.js.map} +1 -1
  123. package/dist/cdn/chunks/{dist-BW6Y49zE.js → dist-BRZhN8qJ.js} +4 -4
  124. package/dist/cdn/chunks/dist-BRZhN8qJ.js.map +1 -0
  125. package/dist/cdn/chunks/{dist-CAFTQ6Y2.js → dist-CXB2_kBa.js} +27 -22
  126. package/dist/cdn/chunks/dist-CXB2_kBa.js.map +1 -0
  127. package/dist/cdn/chunks/{draggable-kbOhCgnk.js → draggable-IB4x6w2O.js} +1477 -1470
  128. package/dist/cdn/chunks/draggable-IB4x6w2O.js.map +1 -0
  129. package/dist/cdn/chunks/{editor-modal-MXgtarMl.js → editor-modal-C_xYN_66.js} +7 -7
  130. package/dist/cdn/chunks/{editor-modal-MXgtarMl.js.map → editor-modal-C_xYN_66.js.map} +1 -1
  131. package/dist/cdn/chunks/{en-BbOC5x3w.js → en-BAMooiOF.js} +6 -2
  132. package/dist/cdn/chunks/{en-BbOC5x3w.js.map → en-BAMooiOF.js.map} +1 -1
  133. package/dist/cdn/chunks/en-BwfjKb4M.js +2 -0
  134. package/dist/{es-0bCDcT9p.js → cdn/chunks/es-I47lHs2m.js} +7 -1
  135. package/dist/cdn/chunks/{es-0bCDcT9p.js.map → es-I47lHs2m.js.map} +1 -1
  136. package/dist/cdn/chunks/{extensions-B8_jnIkD.js → extensions-Bhu8UEE5.js} +185 -100
  137. package/dist/cdn/chunks/extensions-Bhu8UEE5.js.map +1 -0
  138. package/dist/cdn/chunks/{fr-Brr8mJ9e.js → fr-B8MIKjT4.js} +6 -2
  139. package/dist/cdn/chunks/{fr-Brr8mJ9e.js.map → fr-B8MIKjT4.js.map} +1 -1
  140. package/dist/cdn/chunks/htmlparser-ClUZ6waR.js +1113 -0
  141. package/dist/cdn/chunks/htmlparser-ClUZ6waR.js.map +1 -0
  142. package/dist/cdn/chunks/{icons-BUlqGSgd.js → icons-BKkJ-5xF.js} +36 -36
  143. package/dist/cdn/chunks/{icons-BUlqGSgd.js.map → icons-BKkJ-5xF.js.map} +1 -1
  144. package/dist/cdn/chunks/keys-dJbD1QPs.js +12 -0
  145. package/dist/cdn/chunks/keys-dJbD1QPs.js.map +1 -0
  146. package/dist/{nl-Co3_RL0M.js → cdn/chunks/nl-CBLxcb-0.js} +7 -1
  147. package/dist/cdn/chunks/{nl-Co3_RL0M.js.map → nl-CBLxcb-0.js.map} +1 -1
  148. package/dist/{pt-BR-BECez5b0.js → cdn/chunks/pt-BR-CMSRfX7t.js} +7 -1
  149. package/dist/cdn/chunks/{pt-BR-BECez5b0.js.map → pt-BR-CMSRfX7t.js.map} +1 -1
  150. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js +1054 -0
  151. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +1 -0
  152. package/dist/cdn/chunks/{src-IGLRmUar.js → src-CZ-W8YBa.js} +4 -4
  153. package/dist/cdn/chunks/{src-IGLRmUar.js.map → src-CZ-W8YBa.js.map} +1 -1
  154. package/dist/cdn/chunks/{src-CUvZWL6Y.js → src-CaNsA_WX.js} +2 -2
  155. package/dist/cdn/chunks/{src-CUvZWL6Y.js.map → src-CaNsA_WX.js.map} +1 -1
  156. package/dist/cdn/chunks/src-Dwgq7hf4.js.map +1 -1
  157. package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js +36 -0
  158. package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js.map +1 -0
  159. package/dist/cdn/chunks/{tiptap-Epe8m3Vo.js → tiptap-DhLuKyDc.js} +2776 -2773
  160. package/dist/cdn/chunks/tiptap-DhLuKyDc.js.map +1 -0
  161. package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js → useAliveFlag-DAlQLbM2.js} +2 -2
  162. package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js.map → useAliveFlag-DAlQLbM2.js.map} +1 -1
  163. package/dist/cdn/chunks/{useCloudI18n-DSWSGj-A.js → useCloudI18n-C09JcFS0.js} +3 -3
  164. package/dist/cdn/chunks/{useCloudI18n-DSWSGj-A.js.map → useCloudI18n-C09JcFS0.js.map} +1 -1
  165. package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js +2592 -0
  166. package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js.map +1 -0
  167. package/dist/cdn/chunks/useEditorRoot-DFx2fXJP.js +10 -0
  168. package/dist/cdn/chunks/{useEditorRoot-B0zW2nT4.js.map → useEditorRoot-DFx2fXJP.js.map} +1 -1
  169. package/dist/cdn/chunks/{useI18n-Dlo7R9RA.js → useI18n-DTZ9sIcv.js} +3 -3
  170. package/dist/cdn/chunks/{useI18n-Dlo7R9RA.js.map → useI18n-DTZ9sIcv.js.map} +1 -1
  171. package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js +38 -0
  172. package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js.map +1 -0
  173. package/dist/cdn/chunks/useMergeTag-BE8oDoha.js +60 -0
  174. package/dist/cdn/chunks/useMergeTag-BE8oDoha.js.map +1 -0
  175. package/dist/cdn/chunks/{usePopoverPosition-ElP3ABaV.js → usePopoverPosition-gB9q-ql7.js} +3 -3
  176. package/dist/cdn/chunks/{usePopoverPosition-ElP3ABaV.js.map → usePopoverPosition-gB9q-ql7.js.map} +1 -1
  177. package/dist/cdn/chunks/{useScrollToBlock-nTbWkgaU.js → useScrollToBlock-CtTXwmiU.js} +3 -3
  178. package/dist/cdn/chunks/{useScrollToBlock-nTbWkgaU.js.map → useScrollToBlock-CtTXwmiU.js.map} +1 -1
  179. package/dist/cdn/editor.css +1 -1
  180. package/dist/cdn/editor.js +856 -3347
  181. package/dist/cdn/editor.js.map +1 -1
  182. package/dist/{check-DWtkBzBU.js → check-eqb2JhqU.js} +1 -1
  183. package/dist/{chevron-down-C-Fjxcqj.js → chevron-down-Dkr-7Ywl.js} +1 -1
  184. package/dist/{chevron-right-SOkn2d4P.js → chevron-right-Bge4XF_B.js} +1 -1
  185. package/dist/{chevron-up-lntU1ypp.js → chevron-up-CQAyl0kC.js} +1 -1
  186. package/dist/{circle-alert-CjzUTwy3.js → circle-alert-CYgTHKWr.js} +1 -1
  187. package/dist/{clock-pB2QKPsJ.js → clock-BgSJZJP5.js} +1 -1
  188. package/dist/{cloud-DdidMW6f.js → cloud-C9xWZXhg.js} +1 -1
  189. package/dist/{copy-CId1E038.js → copy-mw6PVnOJ.js} +1 -1
  190. package/dist/{createCloudRuntime-x5WZm3p8.js → createCloudRuntime-BGd5--Bq.js} +5 -5
  191. package/dist/{createLucideIcon-Cwf_nTzE.js → createLucideIcon-BxY5yz5u.js} +6 -6
  192. package/dist/{de-BUPszLpi.js → de-CONjnzrF.js} +5 -1
  193. package/dist/{dist-D8i1ixHK.js → dist-8VFzbeu9.js} +3 -3
  194. package/dist/{dist-DBirAJIs.js → dist-BDuPwOyn.js} +26 -21
  195. package/dist/{dist-CtF9STPS.js → dist-BJM3eFyT.js} +1 -1
  196. package/dist/{dist-DkcA6epL.js → dist-BdHF7nyq.js} +3 -3
  197. package/dist/{dist-ByT5fgKq.js → dist-Bl4rxpX9.js} +1 -1
  198. package/dist/{dist-BVqAYoRB.js → dist-BmsLcnrO.js} +4 -4
  199. package/dist/{dist-CtMXAH7a.js → dist-BxVnMgXZ.js} +1 -1
  200. package/dist/{dist-DC-3T0ED.js → dist-CQSVro7b.js} +1 -1
  201. package/dist/{dist-f7HXo6j6.js → dist-DQbOebGW.js} +1 -1
  202. package/dist/{dist-DL9334yz.js → dist-DerFNpDY.js} +3 -3
  203. package/dist/{dist-D08oVYhr.js → dist-Djmzp6wi.js} +1 -1
  204. package/dist/{dist-D7WY8VPq.js → dist-DyrEOKEJ.js} +1 -1
  205. package/dist/{dist-DzdeVn-W.js → dist-EDkj3Ub1.js} +1 -1
  206. package/dist/{dist-C1tsW_99.js → dist-wyXxj3R1.js} +1 -1
  207. package/dist/{editor-modal-B_LaQf0s.js → editor-modal-OPhP71YO.js} +20 -20
  208. package/dist/{en-BbOC5x3w.js → en-BAMooiOF.js} +5 -1
  209. package/dist/en-CjNopehs.js +2 -0
  210. package/dist/{cdn/chunks/es-0bCDcT9p.js → es-I47lHs2m.js} +5 -3
  211. package/dist/extensions-DRN-elXT.js +1645 -0
  212. package/dist/{eye-BuGtFUoJ.js → eye-DphkRtAD.js} +1 -1
  213. package/dist/{fr-Brr8mJ9e.js → fr-B8MIKjT4.js} +5 -1
  214. package/dist/{image-up-gH4JEpU5.js → image-up-Qi2BXD7T.js} +1 -1
  215. package/dist/index.d.ts +15 -0
  216. package/dist/{info-BQ60P82u.js → info-VSyAs02q.js} +1 -1
  217. package/dist/keys-BdoSgsz9.js +10 -0
  218. package/dist/{link-3R8it3J7.js → link-CNuozGqD.js} +1 -1
  219. package/dist/{list-Ccdgj46T.js → list-BA0I5Wmu.js} +1 -1
  220. package/dist/{loader-circle-B_tAD4k6.js → loader-circle-z5eeqasv.js} +1 -1
  221. package/dist/{message-circle-P-KSc6V0.js → message-circle-BsQ9hEup.js} +1 -1
  222. package/dist/{cdn/chunks/nl-Co3_RL0M.js → nl-CBLxcb-0.js} +5 -3
  223. package/dist/package-OkXfuRoO.js +25 -0
  224. package/dist/{pencil-9ZiwqS4r.js → pencil-DFVFA7Dj.js} +1 -1
  225. package/dist/{plus-BwJEzCaO.js → plus-D8bkVjZ7.js} +1 -1
  226. package/dist/{cdn/chunks/pt-BR-BECez5b0.js → pt-BR-CMSRfX7t.js} +5 -3
  227. package/dist/{refresh-cw-DEgfb2FK.js → refresh-cw-DPB7YFuz.js} +1 -1
  228. package/dist/{runtime-dom.esm-bundler-PnoZU512.js → runtime-dom.esm-bundler-BGbPz4-g.js} +2 -2
  229. package/dist/{search-DqQ8Li5E.js → search-C-dCgqIa.js} +1 -1
  230. package/dist/{send-CE6uvqop.js → send-Cm2fy2zm.js} +1 -1
  231. package/dist/{shield-check-DhD1Z3rd.js → shield-check-COgBYFDF.js} +1 -1
  232. package/dist/smartphone-v0u_MOEV.js +46 -0
  233. package/dist/socialIcons-DkGcpEwC.js +1130 -0
  234. package/dist/{sparkles-R0ZQHa6F.js → sparkles-Ds0RF8Iu.js} +1 -1
  235. package/dist/style.css +1 -1
  236. package/dist/templateSettingsFields-YCFVBVYh.js +34 -0
  237. package/dist/templatical-editor.js +945 -3511
  238. package/dist/{text-align-start-DSux2UNn.js → text-align-start-DiavaIm6.js} +1 -1
  239. package/dist/{trash-Cf_SqsER.js → trash-DnOkfu2V.js} +1 -1
  240. package/dist/{triangle-alert-C6tGa6jw.js → triangle-alert-DGLAyXnh.js} +1 -1
  241. package/dist/{upload-DusKjpVr.js → upload-BBDme2cy.js} +1 -1
  242. package/dist/{useAliveFlag-oyByIcjy.js → useAliveFlag-BkKyhkwZ.js} +1 -1
  243. package/dist/{useCloudI18n-BLyh_e2T.js → useCloudI18n-D1iedlP3.js} +2 -2
  244. package/dist/useEditorCore-C5APBjjV.js +4097 -0
  245. package/dist/{useEditorRoot-ds57-l6F.js → useEditorRoot-BOxn5EfP.js} +2 -2
  246. package/dist/{useI18n-BbdxxpOE.js → useI18n-Ds_-druD.js} +2 -2
  247. package/dist/useLogicTag-DoHfc08B.js +36 -0
  248. package/dist/useMergeTag-DXyum3kG.js +58 -0
  249. package/dist/{usePopoverPosition-CprM5p-c.js → usePopoverPosition-Du-Ah8E9.js} +2 -2
  250. package/dist/{useScrollToBlock-BTFw0b9O.js → useScrollToBlock-DXQYPCnJ.js} +3 -3
  251. package/dist/{vue.runtime.esm-bundler-DShF3P6k.js → vue.runtime.esm-bundler-CyqhBwpY.js} +1133 -1126
  252. package/dist/{x-D_-42Ukq.js → x-3BHV3Q6K.js} +1 -1
  253. package/package.json +16 -16
  254. package/dist/ColorPicker-BqlZ_TqG.js +0 -501
  255. package/dist/FieldRow-C8nOknr_.js +0 -128
  256. package/dist/MergeTagInput-BEjzj4Iu.js +0 -457
  257. package/dist/MergeTagSuggestion-DKoLEeoj.js +0 -1329
  258. package/dist/cdn/chunks/AiChatSidebar-dyqqHAcI.js.map +0 -1
  259. package/dist/cdn/chunks/ColorPicker-LcrzgMoW.js +0 -502
  260. package/dist/cdn/chunks/ColorPicker-LcrzgMoW.js.map +0 -1
  261. package/dist/cdn/chunks/FieldRow-D9OJhYeb.js +0 -130
  262. package/dist/cdn/chunks/FieldRow-D9OJhYeb.js.map +0 -1
  263. package/dist/cdn/chunks/MergeTagInput-l7paaAml.js +0 -419
  264. package/dist/cdn/chunks/MergeTagInput-l7paaAml.js.map +0 -1
  265. package/dist/cdn/chunks/MergeTagSuggestion-t8Uj00Er.js +0 -215
  266. package/dist/cdn/chunks/MergeTagSuggestion-t8Uj00Er.js.map +0 -1
  267. package/dist/cdn/chunks/TemplateScoringPanel-DBjUNULq.js.map +0 -1
  268. package/dist/cdn/chunks/TestEmailModal-BTNlSW6f.js.map +0 -1
  269. package/dist/cdn/chunks/TitleEditor-CrnuIq62.js.map +0 -1
  270. package/dist/cdn/chunks/dist-BW6Y49zE.js.map +0 -1
  271. package/dist/cdn/chunks/dist-CAFTQ6Y2.js.map +0 -1
  272. package/dist/cdn/chunks/draggable-kbOhCgnk.js.map +0 -1
  273. package/dist/cdn/chunks/en-C9U7N77n.js +0 -2
  274. package/dist/cdn/chunks/extensions-B8_jnIkD.js.map +0 -1
  275. package/dist/cdn/chunks/htmlparser-DTML8Gvz.js +0 -1007
  276. package/dist/cdn/chunks/htmlparser-DTML8Gvz.js.map +0 -1
  277. package/dist/cdn/chunks/keys-DBFhDFng.js +0 -12
  278. package/dist/cdn/chunks/keys-DBFhDFng.js.map +0 -1
  279. package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +0 -1
  280. package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js +0 -3689
  281. package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +0 -1
  282. package/dist/cdn/chunks/useEditorRoot-B0zW2nT4.js +0 -10
  283. package/dist/cdn/chunks/useMergeTag-BYAifvh8.js +0 -46
  284. package/dist/cdn/chunks/useMergeTag-BYAifvh8.js.map +0 -1
  285. package/dist/en-DcmpWV53.js +0 -2
  286. package/dist/extensions-CHOBZRab.js +0 -445
  287. package/dist/keys-DQA2i1k1.js +0 -10
  288. package/dist/useEditorCore-DhlKOYwe.js +0 -5273
  289. package/dist/useMergeTag-DlvOBW_B.js +0 -44
@@ -0,0 +1,2426 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { A as t, At as n, B as r, F as i, M as a, N as o, R as s, S as c, V as l, Y as u, Z as d, _ as f, at as p, c as m, d as h, g, h as _, jt as v, kt as y, l as b, r as x, s as S, u as C, v as w } from "./vue.runtime.esm-bundler-CyqhBwpY.js";
3
+ import { a as T, o as E } from "./runtime-dom.esm-bundler-BGbPz4-g.js";
4
+ import { D, P as O, i as k, l as A, o as j } from "./dist-tGkjkX-v.js";
5
+ import { c as ee, f as M, i as te, l as N, r as ne, u as re, x as ie } from "./socialIcons-DkGcpEwC.js";
6
+ import { _ as P } from "./dist-8VFzbeu9.js";
7
+ import { I as F, N as ae, Z as oe, c as se, d as ce, h as le, n as ue, p as I, v as de } from "./keys-BdoSgsz9.js";
8
+ import { t as L } from "./useI18n-Ds_-druD.js";
9
+ import { a as fe } from "./usePopoverPosition-Du-Ah8E9.js";
10
+ import { t as pe } from "./createLucideIcon-BxY5yz5u.js";
11
+ import { c as R } from "./LogicTagInsertButton-D8IwH-9Z.js";
12
+ import { t as me } from "./chevron-down-Dkr-7Ywl.js";
13
+ import { t as he } from "./circle-alert-CYgTHKWr.js";
14
+ import { n as z, t as ge } from "./blockTypeIcons-CdXugKyV.js";
15
+ import { t as _e } from "./copy-mw6PVnOJ.js";
16
+ import { t as ve } from "./info-VSyAs02q.js";
17
+ import { t as ye } from "./loader-circle-z5eeqasv.js";
18
+ import { n as be, t as xe } from "./smartphone-v0u_MOEV.js";
19
+ import { t as B } from "./plus-D8bkVjZ7.js";
20
+ import { t as Se } from "./refresh-cw-DPB7YFuz.js";
21
+ import { n as V, r as H, t as U } from "./text-align-start-DiavaIm6.js";
22
+ import { t as Ce } from "./trash-DnOkfu2V.js";
23
+ import { t as we } from "./upload-BBDme2cy.js";
24
+ import { t as Te } from "./x-3BHV3Q6K.js";
25
+ import { t as Ee } from "./_plugin-vue_export-helper-B3ysoDQm.js";
26
+ import { t as De } from "./useAliveFlag-BkKyhkwZ.js";
27
+ import { _ as Oe, b as ke, c as Ae, g as W, h as G, m as K, p as q, r as je } from "./styleConstants-C_YAPdQS.js";
28
+ import { n as Me, t as J } from "./ToggleSwitch-JvQ_CmI1.js";
29
+ import { t as Y } from "./MergeTagInput-QI-5KG2R.js";
30
+ var Ne = pe({
31
+ name: "lock-open",
32
+ size: 24,
33
+ node: [["rect", {
34
+ width: "18",
35
+ height: "11",
36
+ x: "3",
37
+ y: "11",
38
+ rx: "2",
39
+ ry: "2",
40
+ key: "1w4ew1"
41
+ }], ["path", {
42
+ d: "M7 11V7a5 5 0 0 1 9.9-1",
43
+ key: "1mm8w8"
44
+ }]],
45
+ aliases: ["unlock"]
46
+ }), Pe = pe({
47
+ name: "lock",
48
+ size: 24,
49
+ node: [["rect", {
50
+ width: "18",
51
+ height: "11",
52
+ x: "3",
53
+ y: "11",
54
+ rx: "2",
55
+ ry: "2",
56
+ key: "1w4ew1"
57
+ }], ["path", {
58
+ d: "M7 11V7a5 5 0 0 1 10 0v4",
59
+ key: "fwvmzm"
60
+ }]]
61
+ }), Fe = [
62
+ "aria-checked",
63
+ "aria-label",
64
+ "title",
65
+ "onClick"
66
+ ], Ie = { key: 1 }, X = /* @__PURE__ */ w({
67
+ __name: "SlidingPillSelect",
68
+ props: {
69
+ options: {},
70
+ modelValue: {}
71
+ },
72
+ emits: ["update:modelValue"],
73
+ setup(e, { emit: r }) {
74
+ let o = e, s = r, c = S(() => o.options.findIndex((e) => e.value === o.modelValue)), l = S(() => `translateX(${Math.max(c.value, 0) * 100}%)`);
75
+ return (r, o) => (t(), h("div", {
76
+ role: "radiogroup",
77
+ class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
78
+ style: n({
79
+ gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
80
+ backgroundColor: "var(--tpl-bg-hover)"
81
+ })
82
+ }, [c.value >= 0 ? (t(), h("div", {
83
+ key: 0,
84
+ class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
85
+ style: n({
86
+ left: "4px",
87
+ width: `calc((100% - 8px) / ${e.options.length})`,
88
+ transform: l.value,
89
+ backgroundColor: "var(--tpl-bg)",
90
+ boxShadow: "var(--tpl-shadow)",
91
+ transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
92
+ })
93
+ }, null, 4)) : C("", !0), (t(!0), h(x, null, a(e.options, (r) => (t(), h("button", {
94
+ key: r.value,
95
+ role: "radio",
96
+ "aria-checked": e.modelValue === r.value,
97
+ "aria-label": r.label,
98
+ class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer 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",
99
+ style: n({
100
+ color: e.modelValue === r.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
101
+ transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
102
+ }),
103
+ title: r.label,
104
+ onClick: (e) => s("update:modelValue", r.value)
105
+ }, [r.icon ? (t(), b(i(r.icon), {
106
+ key: 0,
107
+ size: 14,
108
+ "stroke-width": 2
109
+ })) : (t(), h("span", Ie, v(r.label), 1))], 12, Fe))), 128))], 4));
110
+ }
111
+ }), Le = { class: "tpl:mb-3.5" }, Re = ["value"], ze = { value: "" }, Be = ["value"], Ve = { class: "tpl:mb-3.5" }, He = { class: "tpl:mb-3.5" }, Ue = { class: "tpl:mb-3.5" }, We = { class: "tpl:mb-3.5" }, Ge = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, Ke = { class: "tpl:mb-3.5" }, qe = { class: "tpl:flex tpl:items-stretch" }, Je = ["value"], Ye = { class: "tpl:mb-3.5" }, Xe = { class: "tpl:flex tpl:items-stretch" }, Ze = ["value"], Qe = { class: "tpl:mb-3.5" }, $e = ["value"], et = { value: "auto" }, tt = { value: "full" }, nt = { value: "custom" }, rt = {
112
+ key: 0,
113
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
114
+ }, it = ["value"], at = { class: "tpl:mb-3.5" }, ot = 200, st = /* @__PURE__ */ w({
115
+ __name: "ButtonToolbar",
116
+ props: {
117
+ block: {},
118
+ fontFamilies: {}
119
+ },
120
+ emits: ["update"],
121
+ setup(e, { emit: n }) {
122
+ let r = e, i = n, { t: o } = L(), s = S(() => r.block.width === "full" ? "full" : typeof r.block.width == "number" ? "custom" : "auto");
123
+ function c(e, t) {
124
+ i("update", { [e]: t });
125
+ }
126
+ function l(e) {
127
+ if (e === "full") {
128
+ c("width", "full");
129
+ return;
130
+ }
131
+ if (e === "custom") {
132
+ c("width", typeof r.block.width == "number" ? r.block.width : ot);
133
+ return;
134
+ }
135
+ c("width", void 0);
136
+ }
137
+ function u(e) {
138
+ let t = Number(e);
139
+ !Number.isFinite(t) || t <= 0 || c("width", t);
140
+ }
141
+ return (n, r) => (t(), h(x, null, [
142
+ m("div", Le, [m("label", { class: y(p(W)) }, v(p(o).button.fontFamily), 3), m("select", {
143
+ class: y(p(q)),
144
+ value: e.block.fontFamily || "",
145
+ onChange: r[0] ||= (e) => c("fontFamily", e.target.value || void 0)
146
+ }, [m("option", ze, v(p(o).button.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
147
+ key: e.value,
148
+ value: e.value
149
+ }, v(e.label), 9, Be))), 128))], 42, Re)]),
150
+ m("div", Ve, [m("label", { class: y(p(W)) }, v(p(o).button.text), 3), g(Y, {
151
+ "model-value": e.block.text,
152
+ type: "text",
153
+ "onUpdate:modelValue": r[1] ||= (e) => c("text", e)
154
+ }, null, 8, ["model-value"])]),
155
+ m("div", He, [
156
+ m("label", { class: y(p(W)) }, v(p(o).button.url), 3),
157
+ g(Y, {
158
+ "model-value": e.block.url,
159
+ type: "url",
160
+ placeholder: p(o).button.urlPlaceholder,
161
+ "onUpdate:modelValue": r[2] ||= (e) => c("url", e)
162
+ }, null, 8, ["model-value", "placeholder"]),
163
+ e.block.url ? (t(), b(J, {
164
+ key: 0,
165
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
166
+ "model-value": e.block.openInNewTab ?? !1,
167
+ label: p(o).button.openInNewTab,
168
+ "onUpdate:modelValue": r[3] ||= (e) => c("openInNewTab", e)
169
+ }, null, 8, ["model-value", "label"])) : C("", !0)
170
+ ]),
171
+ m("div", Ue, [m("label", { class: y(p(W)) }, v(p(o).button.background), 3), g(R, {
172
+ "model-value": e.block.backgroundColor,
173
+ "onUpdate:modelValue": r[4] ||= (e) => c("backgroundColor", e)
174
+ }, null, 8, ["model-value"])]),
175
+ m("div", We, [m("label", { class: y(p(W)) }, v(p(o).button.textColor), 3), g(R, {
176
+ "model-value": e.block.textColor,
177
+ "onUpdate:modelValue": r[5] ||= (e) => c("textColor", e)
178
+ }, null, 8, ["model-value"])]),
179
+ m("div", Ge, [m("div", Ke, [m("label", { class: y(p(W)) }, v(p(o).button.borderRadius), 3), m("div", qe, [m("input", {
180
+ type: "number",
181
+ class: y(p(K)),
182
+ value: e.block.borderRadius,
183
+ min: "0",
184
+ max: "50",
185
+ onInput: r[6] ||= (e) => c("borderRadius", Number(e.target.value))
186
+ }, null, 42, Je), m("span", { class: y(p(G)) }, "px", 2)])]), m("div", Ye, [m("label", { class: y(p(W)) }, v(p(o).button.fontSize), 3), m("div", Xe, [m("input", {
187
+ type: "number",
188
+ class: y(p(K)),
189
+ value: e.block.fontSize,
190
+ min: "10",
191
+ max: "36",
192
+ onInput: r[7] ||= (e) => c("fontSize", Number(e.target.value))
193
+ }, null, 42, Ze), m("span", { class: y(p(G)) }, "px", 2)])])]),
194
+ m("div", Qe, [
195
+ m("label", { class: y(p(W)) }, v(p(o).button.width), 3),
196
+ m("select", {
197
+ class: y(p(q)),
198
+ value: s.value,
199
+ onChange: r[8] ||= (e) => l(e.target.value)
200
+ }, [
201
+ m("option", et, v(p(o).button.widthAuto), 1),
202
+ m("option", tt, v(p(o).button.fullWidth), 1),
203
+ m("option", nt, v(p(o).button.widthCustom), 1)
204
+ ], 42, $e),
205
+ s.value === "custom" ? (t(), h("div", rt, [m("input", {
206
+ type: "number",
207
+ class: y(p(K)),
208
+ value: typeof e.block.width == "number" ? e.block.width : ot,
209
+ min: "20",
210
+ onInput: r[9] ||= (e) => u(e.target.value)
211
+ }, null, 42, it), m("span", { class: y(p(G)) }, "px", 2)])) : C("", !0)
212
+ ]),
213
+ m("div", at, [m("label", { class: y(p(W)) }, v(p(o).title.align), 3), g(X, {
214
+ options: [
215
+ {
216
+ value: "left",
217
+ label: p(o).title.alignLeft
218
+ },
219
+ {
220
+ value: "center",
221
+ label: p(o).title.alignCenter
222
+ },
223
+ {
224
+ value: "right",
225
+ label: p(o).title.alignRight
226
+ }
227
+ ],
228
+ "model-value": e.block.align ?? "center",
229
+ "onUpdate:modelValue": r[10] ||= (e) => c("align", e)
230
+ }, null, 8, ["options", "model-value"])])
231
+ ], 64));
232
+ }
233
+ }), ct = { class: "spacing-control" }, lt = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ut = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, dt = { class: "tpl:flex tpl:items-center" }, ft = ["aria-label"], pt = ["value", "aria-label"], mt = ["aria-label"], ht = { class: "tpl:flex tpl:items-center tpl:gap-2" }, gt = { class: "tpl:flex tpl:items-center" }, _t = ["aria-label"], vt = ["value", "aria-label"], yt = ["aria-label"], bt = ["aria-label", "title"], xt = { class: "tpl:flex tpl:items-center" }, St = ["aria-label"], Ct = ["value", "aria-label"], wt = ["aria-label"], Tt = { class: "tpl:flex tpl:items-center" }, Et = ["aria-label"], Dt = ["value", "aria-label"], Ot = ["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)]", kt = "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)]", At = /*#__PURE__*/ Ee(/* @__PURE__ */ w({
234
+ __name: "SpacingControl",
235
+ props: {
236
+ modelValue: {},
237
+ label: {}
238
+ },
239
+ emits: ["update:modelValue"],
240
+ setup(e, { emit: n }) {
241
+ let r = e, i = n, { t: a } = L(), o = S(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), c = d(o.value);
242
+ s(o, (e) => {
243
+ !e && c.value && (c.value = !1);
244
+ });
245
+ function l(e, t) {
246
+ let n = r.modelValue[e], a = Math.max(0, n + t);
247
+ c.value ? i("update:modelValue", {
248
+ top: a,
249
+ right: a,
250
+ bottom: a,
251
+ left: a
252
+ }) : i("update:modelValue", {
253
+ ...r.modelValue,
254
+ [e]: a
255
+ });
256
+ }
257
+ function u(e, t) {
258
+ let n = Math.max(0, t);
259
+ c.value ? i("update:modelValue", {
260
+ top: n,
261
+ right: n,
262
+ bottom: n,
263
+ left: n
264
+ }) : i("update:modelValue", {
265
+ ...r.modelValue,
266
+ [e]: n
267
+ });
268
+ }
269
+ function f() {
270
+ if (c.value = !c.value, c.value) {
271
+ let e = r.modelValue.top;
272
+ i("update:modelValue", {
273
+ top: e,
274
+ right: e,
275
+ bottom: e,
276
+ left: e
277
+ });
278
+ }
279
+ }
280
+ return (n, r) => (t(), h("div", ct, [m("label", lt, v(e.label), 1), m("div", ut, [
281
+ m("div", dt, [
282
+ m("button", {
283
+ "aria-label": p(a).spacingControl.decreaseTop,
284
+ class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
285
+ onClick: r[0] ||= (e) => l("top", -1)
286
+ }, [g(p(z), {
287
+ size: 12,
288
+ "stroke-width": 2
289
+ })], 10, ft),
290
+ m("input", {
291
+ type: "number",
292
+ class: y(kt),
293
+ value: e.modelValue.top,
294
+ "aria-label": p(a).spacingControl.top,
295
+ min: "0",
296
+ onInput: r[1] ||= (e) => u("top", Number(e.target.value))
297
+ }, null, 40, pt),
298
+ m("button", {
299
+ "aria-label": p(a).spacingControl.increaseTop,
300
+ class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
301
+ onClick: r[2] ||= (e) => l("top", 1)
302
+ }, [g(p(B), {
303
+ size: 12,
304
+ "stroke-width": 2
305
+ })], 10, mt)
306
+ ]),
307
+ m("div", ht, [
308
+ m("div", gt, [
309
+ m("button", {
310
+ "aria-label": p(a).spacingControl.decreaseLeft,
311
+ class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
312
+ onClick: r[3] ||= (e) => l("left", -1)
313
+ }, [g(p(z), {
314
+ size: 12,
315
+ "stroke-width": 2
316
+ })], 10, _t),
317
+ m("input", {
318
+ type: "number",
319
+ class: y(kt),
320
+ value: e.modelValue.left,
321
+ "aria-label": p(a).spacingControl.left,
322
+ min: "0",
323
+ onInput: r[4] ||= (e) => u("left", Number(e.target.value))
324
+ }, null, 40, vt),
325
+ m("button", {
326
+ "aria-label": p(a).spacingControl.increaseLeft,
327
+ class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
328
+ onClick: r[5] ||= (e) => l("left", 1)
329
+ }, [g(p(B), {
330
+ size: 12,
331
+ "stroke-width": 2
332
+ })], 10, yt)
333
+ ]),
334
+ m("button", {
335
+ class: y(["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)]", c.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)]"]),
336
+ "aria-label": c.value ? p(a).spacingControl.unlock : p(a).spacingControl.lockAll,
337
+ title: c.value ? p(a).spacingControl.unlock : p(a).spacingControl.lockAll,
338
+ onClick: f
339
+ }, [c.value ? (t(), b(p(Pe), {
340
+ key: 0,
341
+ size: 14,
342
+ "stroke-width": 2
343
+ })) : (t(), b(p(Ne), {
344
+ key: 1,
345
+ size: 14,
346
+ "stroke-width": 2
347
+ }))], 10, bt),
348
+ m("div", xt, [
349
+ m("button", {
350
+ "aria-label": p(a).spacingControl.decreaseRight,
351
+ class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
352
+ onClick: r[6] ||= (e) => l("right", -1)
353
+ }, [g(p(z), {
354
+ size: 12,
355
+ "stroke-width": 2
356
+ })], 10, St),
357
+ m("input", {
358
+ type: "number",
359
+ class: y(kt),
360
+ value: e.modelValue.right,
361
+ "aria-label": p(a).spacingControl.right,
362
+ min: "0",
363
+ onInput: r[7] ||= (e) => u("right", Number(e.target.value))
364
+ }, null, 40, Ct),
365
+ m("button", {
366
+ "aria-label": p(a).spacingControl.increaseRight,
367
+ class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
368
+ onClick: r[8] ||= (e) => l("right", 1)
369
+ }, [g(p(B), {
370
+ size: 12,
371
+ "stroke-width": 2
372
+ })], 10, wt)
373
+ ])
374
+ ]),
375
+ m("div", Tt, [
376
+ m("button", {
377
+ "aria-label": p(a).spacingControl.decreaseBottom,
378
+ class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
379
+ onClick: r[9] ||= (e) => l("bottom", -1)
380
+ }, [g(p(z), {
381
+ size: 12,
382
+ "stroke-width": 2
383
+ })], 10, Et),
384
+ m("input", {
385
+ type: "number",
386
+ class: y(kt),
387
+ value: e.modelValue.bottom,
388
+ "aria-label": p(a).spacingControl.bottom,
389
+ min: "0",
390
+ onInput: r[10] ||= (e) => u("bottom", Number(e.target.value))
391
+ }, null, 40, Dt),
392
+ m("button", {
393
+ "aria-label": p(a).spacingControl.increaseBottom,
394
+ class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
395
+ onClick: r[11] ||= (e) => l("bottom", 1)
396
+ }, [g(p(B), {
397
+ size: 12,
398
+ "stroke-width": 2
399
+ })], 10, Ot)
400
+ ])
401
+ ])]));
402
+ }
403
+ }), [["__scopeId", "data-v-69591c1e"]]), jt = ["data-testid"], Mt = { class: "tpl:mt-3" }, Nt = /* @__PURE__ */ w({
404
+ __name: "CollapsibleSection",
405
+ props: {
406
+ title: {},
407
+ open: { type: Boolean },
408
+ noBorder: { type: Boolean },
409
+ headerTestId: {}
410
+ },
411
+ emits: ["toggle"],
412
+ setup(e) {
413
+ return (n, r) => (t(), h("div", { class: y(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [m("button", {
414
+ type: "button",
415
+ "data-testid": e.headerTestId,
416
+ 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)]",
417
+ onClick: r[0] ||= (e) => n.$emit("toggle")
418
+ }, [g(p(me), {
419
+ class: y(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
420
+ size: 12,
421
+ "stroke-width": 2
422
+ }, null, 8, ["class"]), m("span", null, v(e.title), 1)], 8, jt), l(m("div", Mt, [o(n.$slots, "default")], 512), [[E, e.open]])], 2));
423
+ }
424
+ }), Pt = { class: "tpl:space-y-2" }, Ft = { class: "tpl:flex tpl:items-center tpl:gap-2" }, It = { class: "tpl:space-y-2" }, Lt = ["value"], Rt = { value: "" }, zt = ["label"], Bt = ["value"], Vt = ["value"], Ht = {
425
+ key: 0,
426
+ value: "__custom__"
427
+ }, Ut = {
428
+ key: 0,
429
+ class: "tpl:space-y-2"
430
+ }, Wt = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Gt = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Kt = { class: "tpl:flex tpl:justify-end" }, qt = ["disabled"], Jt = {
431
+ key: 0,
432
+ class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
433
+ }, Yt = { class: "tpl:space-y-1" }, Xt = { 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)]" }, Zt = {
434
+ key: 0,
435
+ 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)]"
436
+ }, Qt = /* @__PURE__ */ w({
437
+ __name: "CommonBlockSettings",
438
+ props: {
439
+ block: {},
440
+ isFirstSection: { type: Boolean }
441
+ },
442
+ emits: ["update"],
443
+ setup(e, { emit: n }) {
444
+ let o = e, f = n, { t: w } = L(), E = c(le, []), D = c(ue, !1), O = u(/* @__PURE__ */ new Set()), k = d(!1), A = d(""), j = d(""), ee = [{
445
+ key: "desktop",
446
+ icon: be,
447
+ labelKey: "showOnDesktop"
448
+ }, {
449
+ key: "mobile",
450
+ icon: xe,
451
+ labelKey: "showOnMobile"
452
+ }];
453
+ function M(e) {
454
+ O.has(e) ? O.delete(e) : O.add(e);
455
+ }
456
+ let te = S(() => E.length > 0 || D), N = S(() => o.block.displayCondition ? !E.some((e) => e.label === o.block.displayCondition?.label) : !1);
457
+ function ne() {
458
+ k.value = !0, N.value && o.block.displayCondition ? (A.value = o.block.displayCondition.before, j.value = o.block.displayCondition.after ?? "") : (A.value = "", j.value = "");
459
+ }
460
+ function re() {
461
+ A.value.trim() && (f("update", { displayCondition: {
462
+ label: w.blockSettings.customCondition,
463
+ before: A.value.trim(),
464
+ after: j.value.trim()
465
+ } }), k.value = !1, A.value = "", j.value = "");
466
+ }
467
+ s(() => o.block.displayCondition, (e) => {
468
+ if (!e) {
469
+ k.value = !1, A.value = "", j.value = "";
470
+ return;
471
+ }
472
+ N.value && (A.value = e.before, j.value = e.after ?? "");
473
+ }, { immediate: !0 });
474
+ let ie = S(() => {
475
+ let e = {};
476
+ for (let t of E) {
477
+ let n = t.group ?? "";
478
+ e[n] || (e[n] = []), e[n].push(t);
479
+ }
480
+ return e;
481
+ });
482
+ function P(e, t) {
483
+ f("update", { styles: {
484
+ ...o.block.styles,
485
+ [e]: t
486
+ } });
487
+ }
488
+ function F(e) {
489
+ return o.block.visibility?.[e] !== !1;
490
+ }
491
+ function ae(e) {
492
+ let t = {
493
+ desktop: F("desktop"),
494
+ mobile: F("mobile")
495
+ };
496
+ t[e] = !t[e], f("update", { visibility: t });
497
+ }
498
+ return (n, o) => (t(), h("div", { class: y(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
499
+ g(Nt, {
500
+ title: p(w).blockSettings.spacing,
501
+ open: O.has("spacing"),
502
+ "no-border": e.isFirstSection,
503
+ onToggle: o[1] ||= (e) => M("spacing")
504
+ }, {
505
+ default: r(() => [g(At, {
506
+ label: p(w).blockSettings.padding,
507
+ "model-value": e.block.styles.padding,
508
+ "onUpdate:modelValue": o[0] ||= (e) => P("padding", e)
509
+ }, null, 8, ["label", "model-value"])]),
510
+ _: 1
511
+ }, 8, [
512
+ "title",
513
+ "open",
514
+ "no-border"
515
+ ]),
516
+ g(Nt, {
517
+ title: p(w).blockSettings.background,
518
+ open: O.has("bg"),
519
+ onToggle: o[3] ||= (e) => M("bg")
520
+ }, {
521
+ default: r(() => [m("label", { class: y(p(W)) }, v(p(w).blockSettings.color), 3), g(R, {
522
+ "model-value": e.block.styles.backgroundColor ?? "",
523
+ "onUpdate:modelValue": o[2] ||= (e) => P("backgroundColor", e)
524
+ }, null, 8, ["model-value"])]),
525
+ _: 1
526
+ }, 8, ["title", "open"]),
527
+ g(Nt, {
528
+ title: p(w).blockSettings.display,
529
+ open: O.has("display"),
530
+ onToggle: o[4] ||= (e) => M("display")
531
+ }, {
532
+ default: r(() => [m("div", Pt, [(t(), h(x, null, a(ee, (e) => g(J, {
533
+ key: e.key,
534
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
535
+ "model-value": F(e.key),
536
+ label: p(w).blockSettings[e.labelKey],
537
+ "onUpdate:modelValue": (t) => ae(e.key)
538
+ }, {
539
+ default: r(() => [m("span", Ft, [(t(), b(i(e.icon), {
540
+ size: 14,
541
+ "stroke-width": 1.5
542
+ })), _(" " + v(p(w).blockSettings[e.labelKey]), 1)])]),
543
+ _: 2
544
+ }, 1032, [
545
+ "model-value",
546
+ "label",
547
+ "onUpdate:modelValue"
548
+ ])), 64))])]),
549
+ _: 1
550
+ }, 8, ["title", "open"]),
551
+ te.value ? (t(), b(Nt, {
552
+ key: 0,
553
+ "header-test-id": "display-condition-section",
554
+ title: p(w).blockSettings.displayCondition,
555
+ open: O.has("condition"),
556
+ onToggle: o[8] ||= (e) => M("condition")
557
+ }, {
558
+ default: r(() => [m("div", It, [m("select", {
559
+ "data-testid": "display-condition-select",
560
+ class: y(["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)]"]),
561
+ value: k.value || N.value ? "__custom__" : e.block.displayCondition?.label ?? "",
562
+ onChange: o[5] ||= (e) => {
563
+ let t = e.target.value;
564
+ if (t === "__custom__") {
565
+ ne();
566
+ return;
567
+ }
568
+ if (k.value = !1, !t) {
569
+ f("update", { displayCondition: void 0 });
570
+ return;
571
+ }
572
+ let n = p(E).find((e) => e.label === t);
573
+ n && f("update", { displayCondition: n });
574
+ }
575
+ }, [
576
+ m("option", Rt, v(p(w).blockSettings.noCondition), 1),
577
+ (t(!0), h(x, null, a(ie.value, (e, n) => (t(), h(x, { key: n }, [n ? (t(), h("optgroup", {
578
+ key: 0,
579
+ label: String(n)
580
+ }, [(t(!0), h(x, null, a(e, (e) => (t(), h("option", {
581
+ key: e.label,
582
+ value: e.label
583
+ }, v(e.label), 9, Bt))), 128))], 8, zt)) : (t(!0), h(x, { key: 1 }, a(e, (e) => (t(), h("option", {
584
+ key: e.label,
585
+ value: e.label
586
+ }, v(e.label), 9, Vt))), 128))], 64))), 128)),
587
+ p(D) ? (t(), h("option", Ht, v(p(w).blockSettings.customCondition), 1)) : C("", !0)
588
+ ], 42, Lt), k.value || N.value ? (t(), h("div", Ut, [
589
+ m("div", null, [m("label", Wt, v(p(w).blockSettings.customConditionBefore), 1), l(m("textarea", {
590
+ "onUpdate:modelValue": o[6] ||= (e) => A.value = e,
591
+ rows: "2",
592
+ class: y(p(Oe))
593
+ }, null, 2), [[T, A.value]])]),
594
+ m("div", null, [m("label", Gt, v(p(w).blockSettings.customConditionAfter), 1), l(m("textarea", {
595
+ "onUpdate:modelValue": o[7] ||= (e) => j.value = e,
596
+ rows: "2",
597
+ class: y(p(Oe))
598
+ }, null, 2), [[T, j.value]])]),
599
+ m("div", Kt, [m("button", {
600
+ type: "button",
601
+ class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-on-primary)] tpl:transition-all tpl:hover:opacity-90 tpl:disabled:opacity-50",
602
+ disabled: !A.value.trim(),
603
+ onClick: re
604
+ }, v(p(w).blockSettings.applyCondition), 9, qt)])
605
+ ])) : e.block.displayCondition && !N.value ? (t(), h(x, { key: 1 }, [e.block.displayCondition.description ? (t(), h("p", Jt, v(e.block.displayCondition.description), 1)) : C("", !0), m("div", Yt, [m("pre", Xt, v(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (t(), h("pre", Zt, v(e.block.displayCondition.after), 1)) : C("", !0)])], 64)) : C("", !0)])]),
606
+ _: 1
607
+ }, 8, ["title", "open"])) : C("", !0)
608
+ ], 2));
609
+ }
610
+ }), $t = ["title"], en = /* @__PURE__ */ w({
611
+ __name: "BooleanField",
612
+ props: {
613
+ field: {},
614
+ modelValue: { type: Boolean },
615
+ readOnly: { type: Boolean }
616
+ },
617
+ emits: ["update:modelValue"],
618
+ setup(e, { emit: n }) {
619
+ let i = n, { t: a } = L();
620
+ return (n, o) => (t(), h("div", {
621
+ class: "tpl:mb-3.5",
622
+ title: e.readOnly ? p(a).customBlocks.dataSource.readOnlyTooltip : void 0
623
+ }, [g(J, {
624
+ class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
625
+ "model-value": e.modelValue,
626
+ label: e.field.label,
627
+ required: e.field.required,
628
+ disabled: e.readOnly,
629
+ "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
630
+ }, {
631
+ default: r(() => [_(v(e.field.label) + " ", 1), e.readOnly ? (t(), b(p(Pe), {
632
+ key: 0,
633
+ size: 12,
634
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
635
+ })) : C("", !0)]),
636
+ _: 1
637
+ }, 8, [
638
+ "model-value",
639
+ "label",
640
+ "required",
641
+ "disabled"
642
+ ])], 8, $t));
643
+ }
644
+ }), tn = { class: "tpl:mb-3.5" }, nn = ["title"], rn = { class: "tpl-sr-only" }, an = ["title"], on = { class: "tpl-sr-only" }, Q = /* @__PURE__ */ w({
645
+ __name: "FieldWrapper",
646
+ props: {
647
+ label: {},
648
+ required: { type: Boolean },
649
+ readOnly: { type: Boolean }
650
+ },
651
+ setup(e) {
652
+ let { t: n } = L();
653
+ return (r, i) => (t(), h("div", tn, [m("label", { class: y(p(W)) }, [
654
+ _(v(e.label) + " ", 1),
655
+ e.readOnly ? (t(), h("span", {
656
+ key: 0,
657
+ title: p(n).customBlocks.dataSource.readOnlyTooltip
658
+ }, [g(p(Pe), {
659
+ size: 12,
660
+ class: "tpl:inline tpl:text-[var(--tpl-text-dim)]",
661
+ "aria-hidden": "true"
662
+ }), m("span", rn, v(p(n).customBlocks.dataSource.readOnlyTooltip), 1)], 8, nn)) : C("", !0),
663
+ e.required ? (t(), h("span", {
664
+ key: 1,
665
+ class: "tpl:text-[var(--tpl-danger)]",
666
+ title: p(n).customBlocks.fields.required
667
+ }, [i[0] ||= m("span", { "aria-hidden": "true" }, "*", -1), m("span", on, v(p(n).customBlocks.fields.required), 1)], 8, an)) : C("", !0)
668
+ ], 2), o(r.$slots, "default")]));
669
+ }
670
+ }), sn = /* @__PURE__ */ w({
671
+ __name: "ColorField",
672
+ props: {
673
+ field: {},
674
+ modelValue: {},
675
+ readOnly: { type: Boolean }
676
+ },
677
+ emits: ["update:modelValue"],
678
+ setup(e, { emit: n }) {
679
+ let i = e, a = n, { t: o } = L(), s = c(ce, fe), l = S(() => re(i.field, s));
680
+ return (n, i) => (t(), b(Q, {
681
+ label: e.field.label,
682
+ required: e.field.required,
683
+ "read-only": e.readOnly
684
+ }, {
685
+ default: r(() => [g(R, {
686
+ "model-value": e.modelValue,
687
+ placeholder: e.field.placeholder,
688
+ disabled: e.readOnly,
689
+ presets: l.value.presets,
690
+ "allow-custom": l.value.allowCustom,
691
+ title: e.readOnly ? p(o).customBlocks.dataSource.readOnlyTooltip : void 0,
692
+ "onUpdate:modelValue": i[0] ||= (e) => a("update:modelValue", e)
693
+ }, null, 8, [
694
+ "model-value",
695
+ "placeholder",
696
+ "disabled",
697
+ "presets",
698
+ "allow-custom",
699
+ "title"
700
+ ])]),
701
+ _: 1
702
+ }, 8, [
703
+ "label",
704
+ "required",
705
+ "read-only"
706
+ ]));
707
+ }
708
+ }), cn = {
709
+ key: 0,
710
+ class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
711
+ style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
712
+ }, ln = [
713
+ "value",
714
+ "placeholder",
715
+ "title"
716
+ ], un = ["value", "placeholder"], dn = /* @__PURE__ */ w({
717
+ __name: "ImageField",
718
+ props: {
719
+ field: {},
720
+ modelValue: {},
721
+ readOnly: { type: Boolean }
722
+ },
723
+ emits: ["update:modelValue"],
724
+ setup(e, { emit: n }) {
725
+ let i = e, a = n, { t: o } = L(), s = c(F, null), l = c(se, null), u = De(), f = S(() => !!s);
726
+ async function w() {
727
+ let e = await s?.({ accept: ["images"] });
728
+ u.alive && e && a("update:modelValue", e.url);
729
+ }
730
+ let T = d(), E = d(!1), D = S(() => (l?.value ?? !!s) && !E.value && !i.readOnly);
731
+ async function O(e) {
732
+ if (s) {
733
+ E.value = !0;
734
+ try {
735
+ let t = await s({
736
+ accept: ["images"],
737
+ files: e
738
+ });
739
+ if (!u.alive) return;
740
+ t && a("update:modelValue", t.url);
741
+ } finally {
742
+ u.alive && (E.value = !1);
743
+ }
744
+ }
745
+ }
746
+ let { isOver: k } = te({
747
+ target: T,
748
+ enabled: D,
749
+ onFiles: O
750
+ });
751
+ return (n, i) => (t(), b(Q, {
752
+ label: e.field.label,
753
+ required: e.field.required,
754
+ "read-only": e.readOnly
755
+ }, {
756
+ default: r(() => [m("div", {
757
+ ref_key: "dropZoneRef",
758
+ ref: T,
759
+ class: "tpl:relative"
760
+ }, [
761
+ D.value && (p(k) || E.value) ? (t(), h("div", cn, [E.value ? (t(), h(x, { key: 0 }, [g(p(ye), {
762
+ class: "tpl-spinner",
763
+ size: 18,
764
+ "stroke-width": 2
765
+ }), _(" " + v(p(o).image.uploading), 1)], 64)) : (t(), h(x, { key: 1 }, [g(p(we), {
766
+ size: 18,
767
+ "stroke-width": 1.5
768
+ }), _(" " + v(p(o).image.dropToUpload), 1)], 64))])) : C("", !0),
769
+ e.readOnly ? (t(), h("input", {
770
+ key: 1,
771
+ type: "url",
772
+ class: y([p(q), "tpl:opacity-60 tpl:cursor-not-allowed"]),
773
+ value: e.modelValue,
774
+ placeholder: e.field.placeholder || "https://...",
775
+ disabled: "",
776
+ title: p(o).customBlocks.dataSource.readOnlyTooltip
777
+ }, null, 10, ln)) : (t(), h("input", {
778
+ key: 2,
779
+ type: "url",
780
+ class: y(p(q)),
781
+ value: e.modelValue,
782
+ placeholder: e.field.placeholder || "https://...",
783
+ onInput: i[0] ||= (e) => a("update:modelValue", e.target.value)
784
+ }, null, 42, un)),
785
+ f.value && !e.readOnly ? (t(), h("button", {
786
+ key: 3,
787
+ 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)]",
788
+ onClick: i[1] ||= (e) => w()
789
+ }, [g(p(ee), {
790
+ size: 14,
791
+ "stroke-width": 1.5
792
+ }), _(" " + v(p(o).image.browseMedia), 1)])) : C("", !0)
793
+ ], 512)]),
794
+ _: 1
795
+ }, 8, [
796
+ "label",
797
+ "required",
798
+ "read-only"
799
+ ]));
800
+ }
801
+ }), fn = [
802
+ "value",
803
+ "placeholder",
804
+ "min",
805
+ "max",
806
+ "step",
807
+ "disabled",
808
+ "title"
809
+ ], pn = /* @__PURE__ */ w({
810
+ __name: "NumberField",
811
+ props: {
812
+ field: {},
813
+ modelValue: {},
814
+ readOnly: { type: Boolean }
815
+ },
816
+ emits: ["update:modelValue"],
817
+ setup(e, { emit: n }) {
818
+ let i = n, { t: a } = L();
819
+ return (n, o) => (t(), b(Q, {
820
+ label: e.field.label,
821
+ required: e.field.required,
822
+ "read-only": e.readOnly
823
+ }, {
824
+ default: r(() => [m("input", {
825
+ type: "number",
826
+ class: y([p(q), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
827
+ value: e.modelValue,
828
+ placeholder: e.field.placeholder,
829
+ min: e.field.min,
830
+ max: e.field.max,
831
+ step: e.field.step,
832
+ disabled: e.readOnly,
833
+ title: e.readOnly ? p(a).customBlocks.dataSource.readOnlyTooltip : void 0,
834
+ onInput: o[0] ||= (t) => !e.readOnly && i("update:modelValue", Number(t.target.value))
835
+ }, null, 42, fn)]),
836
+ _: 1
837
+ }, 8, [
838
+ "label",
839
+ "required",
840
+ "read-only"
841
+ ]));
842
+ }
843
+ }), mn = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, hn = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, gn = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, _n = ["title", "onClick"], vn = {
844
+ key: 1,
845
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
846
+ }, yn = {
847
+ key: 2,
848
+ class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
849
+ }, bn = /* @__PURE__ */ w({
850
+ __name: "RepeatableField",
851
+ props: {
852
+ field: {},
853
+ modelValue: {},
854
+ readOnly: { type: Boolean }
855
+ },
856
+ emits: ["update:modelValue"],
857
+ setup(e, { emit: n }) {
858
+ let o = e, s = n, { t: c, format: l } = L(), u = S(() => o.modelValue || []), d = S(() => !o.field.maxItems || u.value.length < o.field.maxItems), f = S(() => !o.field.minItems || u.value.length > o.field.minItems);
859
+ function w() {
860
+ if (!d.value || o.readOnly) return;
861
+ let e = {};
862
+ for (let t of o.field.fields) e[t.key] = t.default ?? "";
863
+ s("update:modelValue", [...u.value, e]);
864
+ }
865
+ function T(e) {
866
+ if (!f.value || o.readOnly) return;
867
+ let t = [...u.value];
868
+ t.splice(e, 1), s("update:modelValue", t);
869
+ }
870
+ function E(e, t, n) {
871
+ let r = u.value.map((r, i) => i === e ? {
872
+ ...r,
873
+ [t]: n
874
+ } : r);
875
+ s("update:modelValue", r);
876
+ }
877
+ return (n, o) => (t(), b(Q, {
878
+ label: e.field.label,
879
+ required: e.field.required,
880
+ "read-only": e.readOnly
881
+ }, {
882
+ default: r(() => [m("div", mn, [
883
+ (t(!0), h(x, null, a(u.value, (n, r) => (t(), h("div", {
884
+ key: `${e.field.key}-${r}`,
885
+ class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
886
+ }, [m("div", hn, [m("span", gn, " #" + v(r + 1), 1), f.value && !e.readOnly ? (t(), h("button", {
887
+ key: 0,
888
+ type: "button",
889
+ 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)]",
890
+ title: p(c).customBlocks.fields.removeItem,
891
+ onClick: (e) => T(r)
892
+ }, [g(p(Ce), {
893
+ size: 12,
894
+ "stroke-width": 2
895
+ })], 8, _n)) : C("", !0)]), (t(!0), h(x, null, a(e.field.fields, (a) => (t(), b(i(p(kn)(a.type)), {
896
+ key: a.key,
897
+ field: a,
898
+ "model-value": n[a.key],
899
+ "read-only": e.readOnly,
900
+ "onUpdate:modelValue": (e) => E(r, a.key, e)
901
+ }, null, 8, [
902
+ "field",
903
+ "model-value",
904
+ "read-only",
905
+ "onUpdate:modelValue"
906
+ ]))), 128))]))), 128)),
907
+ d.value && !e.readOnly ? (t(), h("button", {
908
+ key: 0,
909
+ type: "button",
910
+ class: y(p(Ae)),
911
+ onClick: w
912
+ }, [g(p(B), {
913
+ size: 14,
914
+ "stroke-width": 2
915
+ }), _(" " + v(p(c).customBlocks.fields.addItem), 1)], 2)) : C("", !0),
916
+ !d.value && !e.readOnly ? (t(), h("p", vn, v(p(c).customBlocks.fields.maxItemsReached), 1)) : C("", !0),
917
+ !f.value && !e.readOnly ? (t(), h("p", yn, v(p(l)(p(c).customBlocks.fields.minItemsRequired, { count: e.field.minItems ?? 0 })), 1)) : C("", !0)
918
+ ])]),
919
+ _: 1
920
+ }, 8, [
921
+ "label",
922
+ "required",
923
+ "read-only"
924
+ ]));
925
+ }
926
+ }), xn = [
927
+ "value",
928
+ "disabled",
929
+ "title"
930
+ ], Sn = ["value"], Cn = /* @__PURE__ */ w({
931
+ __name: "SelectField",
932
+ props: {
933
+ field: {},
934
+ modelValue: {},
935
+ readOnly: { type: Boolean }
936
+ },
937
+ emits: ["update:modelValue"],
938
+ setup(e, { emit: n }) {
939
+ let i = n, { t: o } = L();
940
+ return (n, s) => (t(), b(Q, {
941
+ label: e.field.label,
942
+ required: e.field.required,
943
+ "read-only": e.readOnly
944
+ }, {
945
+ default: r(() => [m("select", {
946
+ class: y([p(q), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
947
+ value: e.modelValue,
948
+ disabled: e.readOnly,
949
+ title: e.readOnly ? p(o).customBlocks.dataSource.readOnlyTooltip : void 0,
950
+ onChange: s[0] ||= (t) => !e.readOnly && i("update:modelValue", t.target.value)
951
+ }, [(t(!0), h(x, null, a(e.field.options, (e) => (t(), h("option", {
952
+ key: e.value,
953
+ value: e.value
954
+ }, v(e.label), 9, Sn))), 128))], 42, xn)]),
955
+ _: 1
956
+ }, 8, [
957
+ "label",
958
+ "required",
959
+ "read-only"
960
+ ]));
961
+ }
962
+ }), wn = [
963
+ "value",
964
+ "placeholder",
965
+ "title"
966
+ ], Tn = /* @__PURE__ */ w({
967
+ __name: "TextField",
968
+ props: {
969
+ field: {},
970
+ modelValue: {},
971
+ readOnly: { type: Boolean }
972
+ },
973
+ emits: ["update:modelValue"],
974
+ setup(e, { emit: n }) {
975
+ let i = n, { t: a } = L();
976
+ return (n, o) => (t(), b(Q, {
977
+ label: e.field.label,
978
+ required: e.field.required,
979
+ "read-only": e.readOnly
980
+ }, {
981
+ default: r(() => [e.readOnly ? (t(), h("input", {
982
+ key: 0,
983
+ type: "text",
984
+ class: y([p(q), "tpl:opacity-60 tpl:cursor-not-allowed"]),
985
+ value: e.modelValue,
986
+ placeholder: e.field.placeholder,
987
+ disabled: "",
988
+ title: p(a).customBlocks.dataSource.readOnlyTooltip
989
+ }, null, 10, wn)) : (t(), b(Y, {
990
+ key: 1,
991
+ "model-value": e.modelValue,
992
+ placeholder: e.field.placeholder,
993
+ "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
994
+ }, null, 8, ["model-value", "placeholder"]))]),
995
+ _: 1
996
+ }, 8, [
997
+ "label",
998
+ "required",
999
+ "read-only"
1000
+ ]));
1001
+ }
1002
+ }), En = [
1003
+ "value",
1004
+ "placeholder",
1005
+ "title"
1006
+ ], Dn = "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", On = {
1007
+ text: Tn,
1008
+ textarea: /* @__PURE__ */ w({
1009
+ __name: "TextareaField",
1010
+ props: {
1011
+ field: {},
1012
+ modelValue: {},
1013
+ readOnly: { type: Boolean }
1014
+ },
1015
+ emits: ["update:modelValue"],
1016
+ setup(e, { emit: n }) {
1017
+ let i = n, { t: a } = L();
1018
+ return (n, o) => (t(), b(Q, {
1019
+ label: e.field.label,
1020
+ required: e.field.required,
1021
+ "read-only": e.readOnly
1022
+ }, {
1023
+ default: r(() => [e.readOnly ? (t(), h("textarea", {
1024
+ key: 0,
1025
+ value: e.modelValue,
1026
+ placeholder: e.field.placeholder,
1027
+ rows: "3",
1028
+ disabled: "",
1029
+ title: p(a).customBlocks.dataSource.readOnlyTooltip,
1030
+ class: y(Dn)
1031
+ }, null, 8, En)) : (t(), b(Me, {
1032
+ key: 1,
1033
+ "model-value": e.modelValue,
1034
+ placeholder: e.field.placeholder,
1035
+ "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
1036
+ }, null, 8, ["model-value", "placeholder"]))]),
1037
+ _: 1
1038
+ }, 8, [
1039
+ "label",
1040
+ "required",
1041
+ "read-only"
1042
+ ]));
1043
+ }
1044
+ }),
1045
+ image: dn,
1046
+ color: sn,
1047
+ number: pn,
1048
+ select: Cn,
1049
+ boolean: en,
1050
+ repeatable: bn
1051
+ };
1052
+ function kn(e) {
1053
+ return On[e] ?? Tn;
1054
+ }
1055
+ //#endregion
1056
+ //#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
1057
+ var An = {
1058
+ key: 0,
1059
+ class: "tpl:p-4"
1060
+ }, jn = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Mn = { key: 1 }, Nn = {
1061
+ key: 0,
1062
+ class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1063
+ }, Pn = {
1064
+ key: 1,
1065
+ class: "tpl:mb-4"
1066
+ }, Fn = {
1067
+ key: 1,
1068
+ class: "tpl:flex tpl:h-[32px] tpl:items-center"
1069
+ }, In = {
1070
+ key: 0,
1071
+ class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1072
+ }, Ln = {
1073
+ key: 2,
1074
+ class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
1075
+ }, Rn = /* @__PURE__ */ w({
1076
+ __name: "CustomBlockToolbar",
1077
+ props: { block: {} },
1078
+ emits: ["updateFieldValues", "updateDataSourceFetched"],
1079
+ setup(e, { emit: n }) {
1080
+ let r = e, o = n, { t: s } = L(), l = c(I, []), u = S(() => l.find((e) => e.type === r.block.customType)), d = S(() => r.block), { isFetching: f, fetchError: y, fetch: w, hasDataSource: T, needsFetch: E } = ie({
1081
+ definition: u,
1082
+ block: d,
1083
+ onUpdate: (e, t) => {
1084
+ o("updateFieldValues", e), o("updateDataSourceFetched", t);
1085
+ }
1086
+ });
1087
+ function D(e) {
1088
+ return e.readOnly === !0 && T.value && !!r.block.dataSourceFetched;
1089
+ }
1090
+ function O(e, t) {
1091
+ o("updateFieldValues", {
1092
+ ...r.block.fieldValues,
1093
+ [e]: t
1094
+ });
1095
+ }
1096
+ return (n, r) => u.value ? (t(), h("div", Mn, [
1097
+ u.value.description ? (t(), h("p", Nn, v(u.value.description), 1)) : C("", !0),
1098
+ p(T) ? (t(), h("div", Pn, [p(E) && !p(f) ? (t(), h("button", {
1099
+ key: 0,
1100
+ type: "button",
1101
+ 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)]",
1102
+ onClick: r[0] ||= (...e) => p(w) && p(w)(...e)
1103
+ }, v(u.value?.dataSource?.label || p(s).customBlocks.dataSource.fetchButton), 1)) : (t(), h("div", Fn, [p(f) ? (t(), h("div", In, v(p(s).customBlocks.dataSource.fetching), 1)) : (t(), h("button", {
1104
+ key: 1,
1105
+ type: "button",
1106
+ 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)]",
1107
+ onClick: r[1] ||= (...e) => p(w) && p(w)(...e)
1108
+ }, [g(p(Se), { size: 12 }), _(" " + v(p(s).customBlocks.dataSource.changeButton), 1)]))])), p(y) ? (t(), h("p", Ln, [g(p(he), {
1109
+ size: 14,
1110
+ class: "tpl:shrink-0"
1111
+ }), _(" " + v(p(s).customBlocks.dataSource.fetchError), 1)])) : C("", !0)])) : C("", !0),
1112
+ (t(!0), h(x, null, a(u.value.fields, (n) => (t(), b(i(p(kn)(n.type)), {
1113
+ key: n.key,
1114
+ field: n,
1115
+ "model-value": e.block.fieldValues[n.key],
1116
+ "read-only": D(n),
1117
+ "onUpdate:modelValue": (e) => O(n.key, e)
1118
+ }, null, 8, [
1119
+ "field",
1120
+ "model-value",
1121
+ "read-only",
1122
+ "onUpdate:modelValue"
1123
+ ]))), 128))
1124
+ ])) : (t(), h("div", An, [m("p", jn, v(p(s).customBlocks.toolbar.noDefinition), 1)]));
1125
+ }
1126
+ }), zn = { class: "tpl:mb-3.5" }, Bn = { class: "tpl:mb-3.5" }, Vn = { class: "tpl:mb-3.5" }, Hn = { class: "tpl:flex tpl:items-stretch" }, Un = ["value"], Wn = /* @__PURE__ */ w({
1127
+ __name: "DividerToolbar",
1128
+ props: { block: {} },
1129
+ emits: ["update"],
1130
+ setup(e, { emit: n }) {
1131
+ let r = n, { t: i } = L();
1132
+ function a(e, t) {
1133
+ r("update", { [e]: t });
1134
+ }
1135
+ return (n, r) => (t(), h(x, null, [
1136
+ m("div", zn, [m("label", { class: y(p(W)) }, v(p(i).divider.style), 3), g(X, {
1137
+ options: [
1138
+ {
1139
+ value: "solid",
1140
+ label: p(i).divider.solid
1141
+ },
1142
+ {
1143
+ value: "dashed",
1144
+ label: p(i).divider.dashed
1145
+ },
1146
+ {
1147
+ value: "dotted",
1148
+ label: p(i).divider.dotted
1149
+ }
1150
+ ],
1151
+ "model-value": e.block.lineStyle,
1152
+ "onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
1153
+ }, null, 8, ["options", "model-value"])]),
1154
+ m("div", Bn, [m("label", { class: y(p(W)) }, v(p(i).divider.color), 3), g(R, {
1155
+ "model-value": e.block.color,
1156
+ "onUpdate:modelValue": r[1] ||= (e) => a("color", e)
1157
+ }, null, 8, ["model-value"])]),
1158
+ m("div", Vn, [m("label", { class: y(p(W)) }, v(p(i).divider.thickness), 3), m("div", Hn, [m("input", {
1159
+ type: "number",
1160
+ class: y(p(K)),
1161
+ value: e.block.thickness,
1162
+ min: "1",
1163
+ max: "10",
1164
+ onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
1165
+ }, null, 42, Un), m("span", { class: y(p(G)) }, "px", 2)])])
1166
+ ], 64));
1167
+ }
1168
+ }), Gn = { class: "tpl:mb-3.5" }, Kn = ["value"], qn = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Jn = /* @__PURE__ */ w({
1169
+ __name: "HtmlToolbar",
1170
+ props: { block: {} },
1171
+ emits: ["update"],
1172
+ setup(e, { emit: n }) {
1173
+ let r = n, { t: i } = L();
1174
+ return (n, a) => (t(), h("div", Gn, [
1175
+ m("label", { class: y(p(W)) }, v(p(i).html.content), 3),
1176
+ m("textarea", {
1177
+ value: e.block.content,
1178
+ placeholder: "<div>...</div>",
1179
+ rows: "10",
1180
+ class: y(p(Oe)),
1181
+ onInput: a[0] ||= (e) => r("update", { content: e.target.value })
1182
+ }, null, 42, Kn),
1183
+ m("p", qn, [g(p(ve), {
1184
+ size: 12,
1185
+ class: "tpl:mt-0.5 tpl:shrink-0"
1186
+ }), _(" " + v(p(i).html.sanitizationHint), 1)])
1187
+ ]));
1188
+ }
1189
+ }), Yn = { class: "tpl:flex tpl:items-stretch" }, Xn = [
1190
+ "data-testid",
1191
+ "value",
1192
+ "min",
1193
+ "max"
1194
+ ], Zn = /* @__PURE__ */ w({
1195
+ __name: "NumberWithSuffix",
1196
+ props: {
1197
+ modelValue: {},
1198
+ min: {},
1199
+ max: {},
1200
+ suffix: {},
1201
+ testid: {}
1202
+ },
1203
+ emits: ["update:modelValue"],
1204
+ setup(e, { emit: n }) {
1205
+ let r = n;
1206
+ function i(e) {
1207
+ let t = e.target;
1208
+ t.validity?.badInput || r("update:modelValue", Number(t.value));
1209
+ }
1210
+ return (n, r) => (t(), h("div", Yn, [m("input", {
1211
+ type: "number",
1212
+ "data-testid": e.testid,
1213
+ class: y(p(K)),
1214
+ value: e.modelValue,
1215
+ min: e.min,
1216
+ max: e.max,
1217
+ onInput: i
1218
+ }, null, 42, Xn), m("span", { class: y(p(G)) }, v(e.suffix), 3)]));
1219
+ }
1220
+ }), Qn = { class: "tpl:mb-3.5" }, $n = {
1221
+ key: 0,
1222
+ class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
1223
+ style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
1224
+ }, er = {
1225
+ key: 0,
1226
+ class: "tpl:mb-3.5"
1227
+ }, tr = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, nr = [
1228
+ "value",
1229
+ "placeholder",
1230
+ "title"
1231
+ ], rr = { class: "tpl:mb-3.5" }, ir = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, ar = { class: "tpl:mb-3.5" }, or = ["value"], sr = { value: "full" }, cr = { value: "custom" }, lr = {
1232
+ key: 0,
1233
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1234
+ }, ur = ["value"], dr = { class: "tpl:mb-3.5" }, fr = ["value"], pr = { value: "auto" }, mr = { value: "custom" }, hr = {
1235
+ key: 0,
1236
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1237
+ }, gr = ["value"], _r = { class: "tpl:mb-3.5" }, vr = { class: "tpl:mb-3.5" }, yr = { class: "tpl:mb-3.5" }, br = 350, xr = 200, Sr = /* @__PURE__ */ w({
1238
+ __name: "ImageToolbar",
1239
+ props: { block: {} },
1240
+ emits: ["update"],
1241
+ setup(e, { emit: n }) {
1242
+ let i = e, a = n, { t: o } = L(), s = c(F, null), l = c(se, null), u = c(ae, j.liquid), f = De(), w = S(() => !!s), T = d(!1), E = d(!1), { start: D } = P(() => {
1243
+ T.value = !1;
1244
+ }, 1e3, { immediate: !1 }), O = [
1245
+ 300,
1246
+ 400,
1247
+ 500
1248
+ ], k = S(() => {
1249
+ let e = i.block.width;
1250
+ return e === "full" ? "full" : O.includes(e) ? String(e) : "custom";
1251
+ }), M = S(() => typeof i.block.height == "number" ? "custom" : "auto");
1252
+ function N(e, t) {
1253
+ a("update", { [e]: t });
1254
+ }
1255
+ function ne(e) {
1256
+ if (e === "custom") {
1257
+ let e = i.block.width;
1258
+ (typeof e != "number" || O.includes(e)) && N("width", br);
1259
+ return;
1260
+ }
1261
+ N("width", e === "full" ? "full" : Number(e));
1262
+ }
1263
+ function re(e) {
1264
+ N("height", e === "custom" ? xr : void 0);
1265
+ }
1266
+ function ie(e) {
1267
+ let t = Number(e);
1268
+ !Number.isFinite(t) || t <= 0 || N("height", t);
1269
+ }
1270
+ function oe(e) {
1271
+ !Number.isFinite(e) || e < 0 || N("borderRadius", e > 0 ? e : void 0);
1272
+ }
1273
+ function ce(e) {
1274
+ let t = Number(e);
1275
+ !Number.isFinite(t) || t <= 0 || N("width", t);
1276
+ }
1277
+ async function le() {
1278
+ let e = await s?.({ accept: ["images"] });
1279
+ f.alive && e && (N("src", e.url), e.alt && (N("alt", e.alt), E.value = !0), T.value = !0, D());
1280
+ }
1281
+ let ue = d(), I = d(!1), de = S(() => A(i.block.src, u)), fe = S(() => (l?.value ?? !!s) && !I.value && !de.value);
1282
+ async function pe(e) {
1283
+ if (s) {
1284
+ I.value = !0;
1285
+ try {
1286
+ let t = await s({
1287
+ accept: ["images"],
1288
+ files: e
1289
+ });
1290
+ if (!f.alive) return;
1291
+ t && (N("src", t.url), t.alt && (N("alt", t.alt), E.value = !0), T.value = !0, D());
1292
+ } finally {
1293
+ f.alive && (I.value = !1);
1294
+ }
1295
+ }
1296
+ }
1297
+ let { isOver: R } = te({
1298
+ target: ue,
1299
+ enabled: fe,
1300
+ onFiles: pe
1301
+ });
1302
+ return (n, i) => (t(), h(x, null, [
1303
+ m("div", Qn, [m("label", { class: y(p(W)) }, v(p(o).image.imageUrl), 3), m("div", {
1304
+ ref_key: "dropZoneRef",
1305
+ ref: ue,
1306
+ class: "tpl:relative"
1307
+ }, [
1308
+ fe.value && (p(R) || I.value) ? (t(), h("div", $n, [I.value ? (t(), h(x, { key: 0 }, [g(p(ye), {
1309
+ class: "tpl-spinner",
1310
+ size: 18,
1311
+ "stroke-width": 2
1312
+ }), _(" " + v(p(o).image.uploading), 1)], 64)) : (t(), h(x, { key: 1 }, [g(p(we), {
1313
+ size: 18,
1314
+ "stroke-width": 1.5
1315
+ }), _(" " + v(p(o).image.dropToUpload), 1)], 64))])) : C("", !0),
1316
+ g(Y, {
1317
+ "model-value": e.block.src,
1318
+ type: "url",
1319
+ placeholder: p(o).image.imageUrlPlaceholder,
1320
+ pulse: T.value,
1321
+ "onUpdate:modelValue": i[0] ||= (e) => N("src", e)
1322
+ }, null, 8, [
1323
+ "model-value",
1324
+ "placeholder",
1325
+ "pulse"
1326
+ ]),
1327
+ w.value ? (t(), h("button", {
1328
+ key: 1,
1329
+ 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",
1330
+ style: {
1331
+ "border-color": "var(--tpl-border)",
1332
+ color: "var(--tpl-primary)",
1333
+ "background-color": "var(--tpl-bg)"
1334
+ },
1335
+ onClick: le
1336
+ }, [g(p(ee), {
1337
+ size: 14,
1338
+ "stroke-width": 1.5
1339
+ }), _(" " + v(p(o).image.browseMedia), 1)])) : C("", !0)
1340
+ ], 512)]),
1341
+ p(A)(e.block.src, p(u)) ? (t(), h("div", er, [m("label", { class: y(p(W)) }, [_(v(p(o).image.placeholderUrl) + " ", 1), m("span", tr, v(p(o).image.optional), 1)], 2), m("input", {
1342
+ type: "url",
1343
+ class: y(p(q)),
1344
+ value: e.block.placeholderUrl || "",
1345
+ placeholder: p(o).image.placeholderUrlPlaceholder,
1346
+ title: p(o).image.placeholderUrlTooltip,
1347
+ onInput: i[1] ||= (e) => N("placeholderUrl", e.target.value)
1348
+ }, null, 42, nr)])) : C("", !0),
1349
+ m("div", rr, [
1350
+ m("label", { class: y(p(W)) }, v(p(o).image.altText), 3),
1351
+ g(Y, {
1352
+ "model-value": e.block.alt,
1353
+ type: "text",
1354
+ placeholder: p(o).image.altTextPlaceholder,
1355
+ pulse: E.value,
1356
+ disabled: e.block.decorative === !0,
1357
+ "onUpdate:modelValue": i[2] ||= (e) => N("alt", e)
1358
+ }, null, 8, [
1359
+ "model-value",
1360
+ "placeholder",
1361
+ "pulse",
1362
+ "disabled"
1363
+ ]),
1364
+ g(J, {
1365
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
1366
+ "model-value": e.block.decorative === !0,
1367
+ label: p(o).image.decorative,
1368
+ "onUpdate:modelValue": i[3] ||= (e) => N("decorative", e)
1369
+ }, {
1370
+ default: r(() => [m("span", null, [_(v(p(o).image.decorative) + " ", 1), m("span", ir, v(p(o).image.decorativeHint), 1)])]),
1371
+ _: 1
1372
+ }, 8, ["model-value", "label"])
1373
+ ]),
1374
+ m("div", ar, [
1375
+ m("label", { class: y(p(W)) }, v(p(o).image.width), 3),
1376
+ m("select", {
1377
+ class: y(p(q)),
1378
+ value: k.value,
1379
+ onChange: i[4] ||= (e) => ne(e.target.value)
1380
+ }, [
1381
+ m("option", sr, v(p(o).image.fullWidth), 1),
1382
+ i[11] ||= m("option", { value: "300" }, "300px", -1),
1383
+ i[12] ||= m("option", { value: "400" }, "400px", -1),
1384
+ i[13] ||= m("option", { value: "500" }, "500px", -1),
1385
+ m("option", cr, v(p(o).image.widthCustom), 1)
1386
+ ], 42, or),
1387
+ k.value === "custom" ? (t(), h("div", lr, [m("input", {
1388
+ type: "number",
1389
+ class: y(p(K)),
1390
+ value: typeof e.block.width == "number" ? e.block.width : br,
1391
+ min: "20",
1392
+ onInput: i[5] ||= (e) => ce(e.target.value)
1393
+ }, null, 42, ur), m("span", { class: y(p(G)) }, "px", 2)])) : C("", !0)
1394
+ ]),
1395
+ m("div", dr, [
1396
+ m("label", { class: y(p(W)) }, v(p(o).image.height), 3),
1397
+ m("select", {
1398
+ class: y(p(q)),
1399
+ "data-testid": "image-height-mode",
1400
+ value: M.value,
1401
+ onChange: i[6] ||= (e) => re(e.target.value)
1402
+ }, [m("option", pr, v(p(o).image.heightAuto), 1), m("option", mr, v(p(o).image.heightCustom), 1)], 42, fr),
1403
+ M.value === "custom" ? (t(), h("div", hr, [m("input", {
1404
+ type: "number",
1405
+ "data-testid": "image-height-input",
1406
+ class: y(p(K)),
1407
+ value: e.block.height,
1408
+ min: "20",
1409
+ onInput: i[7] ||= (e) => ie(e.target.value)
1410
+ }, null, 42, gr), m("span", { class: y(p(G)) }, "px", 2)])) : C("", !0)
1411
+ ]),
1412
+ m("div", _r, [m("label", { class: y(p(W)) }, v(p(o).image.borderRadius), 3), g(Zn, {
1413
+ "model-value": e.block.borderRadius ?? 0,
1414
+ min: 0,
1415
+ suffix: "px",
1416
+ testid: "image-border-radius-input",
1417
+ "onUpdate:modelValue": oe
1418
+ }, null, 8, ["model-value"])]),
1419
+ m("div", vr, [m("label", { class: y(p(W)) }, v(p(o).title.align), 3), g(X, {
1420
+ options: [
1421
+ {
1422
+ value: "left",
1423
+ label: p(o).title.alignLeft
1424
+ },
1425
+ {
1426
+ value: "center",
1427
+ label: p(o).title.alignCenter
1428
+ },
1429
+ {
1430
+ value: "right",
1431
+ label: p(o).title.alignRight
1432
+ }
1433
+ ],
1434
+ "model-value": e.block.align,
1435
+ "onUpdate:modelValue": i[8] ||= (e) => N("align", e)
1436
+ }, null, 8, ["options", "model-value"])]),
1437
+ m("div", yr, [
1438
+ m("label", { class: y(p(W)) }, v(p(o).image.linkUrl), 3),
1439
+ g(Y, {
1440
+ "model-value": e.block.linkUrl || "",
1441
+ type: "url",
1442
+ placeholder: p(o).image.imageUrlPlaceholder,
1443
+ "onUpdate:modelValue": i[9] ||= (e) => N("linkUrl", e)
1444
+ }, null, 8, ["model-value", "placeholder"]),
1445
+ e.block.linkUrl ? (t(), b(J, {
1446
+ key: 0,
1447
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
1448
+ "model-value": e.block.linkOpenInNewTab ?? !1,
1449
+ label: p(o).image.openInNewTab,
1450
+ "onUpdate:modelValue": i[10] ||= (e) => N("linkOpenInNewTab", e)
1451
+ }, null, 8, ["model-value", "label"])) : C("", !0)
1452
+ ])
1453
+ ], 64));
1454
+ }
1455
+ }), Cr = { class: "tpl:mb-3.5" }, $ = /* @__PURE__ */ w({
1456
+ __name: "FieldRow",
1457
+ props: { label: {} },
1458
+ setup(e) {
1459
+ return (n, r) => (t(), h("div", Cr, [e.label ? (t(), h("label", {
1460
+ key: 0,
1461
+ class: y(p(W))
1462
+ }, v(e.label), 3)) : C("", !0), o(n.$slots, "default")]));
1463
+ }
1464
+ }), wr = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Tr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Er = [
1465
+ "value",
1466
+ "placeholder",
1467
+ "onInput"
1468
+ ], Dr = ["title", "onClick"], Or = { 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)]" }, kr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ar = ["value"], jr = { value: "" }, Mr = ["value"], Nr = ["value"], Pr = /* @__PURE__ */ w({
1469
+ __name: "MenuToolbar",
1470
+ props: {
1471
+ block: {},
1472
+ fontFamilies: {}
1473
+ },
1474
+ emits: ["update"],
1475
+ setup(e, { emit: n }) {
1476
+ let i = e, o = n, { t: s } = L(), c = S(() => [
1477
+ {
1478
+ key: "openInNewTab",
1479
+ label: s.menu.openInNewTab
1480
+ },
1481
+ {
1482
+ key: "bold",
1483
+ label: s.menu.bold
1484
+ },
1485
+ {
1486
+ key: "underline",
1487
+ label: s.menu.underline
1488
+ }
1489
+ ]), l = S(() => [
1490
+ {
1491
+ value: "left",
1492
+ label: s.title.alignLeft,
1493
+ icon: U
1494
+ },
1495
+ {
1496
+ value: "center",
1497
+ label: s.title.alignCenter,
1498
+ icon: H
1499
+ },
1500
+ {
1501
+ value: "right",
1502
+ label: s.title.alignRight,
1503
+ icon: V
1504
+ }
1505
+ ]);
1506
+ function u(e, t) {
1507
+ o("update", { [e]: t });
1508
+ }
1509
+ function d() {
1510
+ let e = {
1511
+ id: D(),
1512
+ text: "",
1513
+ url: "",
1514
+ openInNewTab: !1,
1515
+ bold: !1,
1516
+ underline: !1
1517
+ };
1518
+ o("update", { items: [...i.block.items, e] });
1519
+ }
1520
+ function f(e, t, n) {
1521
+ let r = i.block.items.map((r) => r.id === e ? {
1522
+ ...r,
1523
+ [t]: n
1524
+ } : r);
1525
+ o("update", { items: r });
1526
+ }
1527
+ function C(e) {
1528
+ o("update", { items: i.block.items.filter((t) => t.id !== e) });
1529
+ }
1530
+ return (n, i) => (t(), h(x, null, [
1531
+ g($, { label: p(s).menu.items }, {
1532
+ default: r(() => [m("div", wr, [(t(!0), h(x, null, a(e.block.items, (n) => (t(), h("div", {
1533
+ key: n.id,
1534
+ 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"
1535
+ }, [
1536
+ m("div", Tr, [m("input", {
1537
+ type: "text",
1538
+ class: y([p(q), "tpl:flex-1"]),
1539
+ value: n.text,
1540
+ placeholder: p(s).menu.text,
1541
+ onInput: (e) => f(n.id, "text", e.target.value)
1542
+ }, null, 42, Er), m("button", {
1543
+ class: y(p(ke)),
1544
+ title: p(s).menu.removeItem,
1545
+ onClick: (e) => C(n.id)
1546
+ }, [g(p(Te), {
1547
+ size: 14,
1548
+ "stroke-width": 2
1549
+ })], 10, Dr)]),
1550
+ g(Y, {
1551
+ "model-value": n.url,
1552
+ type: "url",
1553
+ placeholder: p(s).menu.urlPlaceholder,
1554
+ "onUpdate:modelValue": (e) => f(n.id, "url", e)
1555
+ }, null, 8, [
1556
+ "model-value",
1557
+ "placeholder",
1558
+ "onUpdate:modelValue"
1559
+ ]),
1560
+ m("div", Or, [(t(!0), h(x, null, a(c.value, (e) => (t(), b(J, {
1561
+ key: e.key,
1562
+ "model-value": n[e.key],
1563
+ label: e.label,
1564
+ "onUpdate:modelValue": (t) => f(n.id, e.key, t)
1565
+ }, null, 8, [
1566
+ "model-value",
1567
+ "label",
1568
+ "onUpdate:modelValue"
1569
+ ]))), 128))]),
1570
+ m("div", kr, [m("label", { class: y([p(W), "tpl:!mb-0"]) }, v(p(s).menu.color), 3), g(R, {
1571
+ "swatch-only": "",
1572
+ "model-value": n.color || e.block.linkColor || e.block.color || "",
1573
+ "onUpdate:modelValue": (e) => f(n.id, "color", e)
1574
+ }, null, 8, ["model-value", "onUpdate:modelValue"])])
1575
+ ]))), 128)), m("button", {
1576
+ class: y(p(Ae)),
1577
+ onClick: d
1578
+ }, [g(p(B), {
1579
+ size: 14,
1580
+ "stroke-width": 2
1581
+ }), _(" " + v(p(s).menu.addItem), 1)], 2)])]),
1582
+ _: 1
1583
+ }, 8, ["label"]),
1584
+ g($, { label: p(s).menu.fontFamily }, {
1585
+ default: r(() => [m("select", {
1586
+ class: y(p(q)),
1587
+ value: e.block.fontFamily || "",
1588
+ onChange: i[0] ||= (e) => u("fontFamily", e.target.value || void 0)
1589
+ }, [m("option", jr, v(p(s).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
1590
+ key: e.value,
1591
+ value: e.value
1592
+ }, v(e.label), 9, Mr))), 128))], 42, Ar)]),
1593
+ _: 1
1594
+ }, 8, ["label"]),
1595
+ g($, { label: p(s).menu.fontSize }, {
1596
+ default: r(() => [g(Zn, {
1597
+ "model-value": e.block.fontSize,
1598
+ min: 8,
1599
+ max: 48,
1600
+ suffix: "px",
1601
+ "onUpdate:modelValue": i[1] ||= (e) => u("fontSize", e)
1602
+ }, null, 8, ["model-value"])]),
1603
+ _: 1
1604
+ }, 8, ["label"]),
1605
+ g($, { label: p(s).menu.color }, {
1606
+ default: r(() => [g(R, {
1607
+ "model-value": e.block.color ?? "",
1608
+ "onUpdate:modelValue": i[2] ||= (e) => u("color", e || void 0)
1609
+ }, null, 8, ["model-value"])]),
1610
+ _: 1
1611
+ }, 8, ["label"]),
1612
+ g($, { label: p(s).menu.linkColor }, {
1613
+ default: r(() => [g(R, {
1614
+ "model-value": e.block.linkColor || e.block.color || "",
1615
+ "onUpdate:modelValue": i[3] ||= (e) => u("linkColor", e || void 0)
1616
+ }, null, 8, ["model-value"])]),
1617
+ _: 1
1618
+ }, 8, ["label"]),
1619
+ g($, { label: p(s).menu.textAlign }, {
1620
+ default: r(() => [g(X, {
1621
+ options: l.value,
1622
+ "model-value": e.block.textAlign,
1623
+ "onUpdate:modelValue": i[4] ||= (e) => u("textAlign", e)
1624
+ }, null, 8, ["options", "model-value"])]),
1625
+ _: 1
1626
+ }, 8, ["label"]),
1627
+ g($, { label: p(s).menu.separator }, {
1628
+ default: r(() => [m("input", {
1629
+ type: "text",
1630
+ class: y(p(q)),
1631
+ value: e.block.separator,
1632
+ onInput: i[5] ||= (e) => u("separator", e.target.value)
1633
+ }, null, 42, Nr)]),
1634
+ _: 1
1635
+ }, 8, ["label"]),
1636
+ g($, { label: p(s).menu.separatorColor }, {
1637
+ default: r(() => [g(R, {
1638
+ "model-value": e.block.separatorColor,
1639
+ "onUpdate:modelValue": i[6] ||= (e) => u("separatorColor", e)
1640
+ }, null, 8, ["model-value"])]),
1641
+ _: 1
1642
+ }, 8, ["label"]),
1643
+ g($, { label: p(s).menu.spacing }, {
1644
+ default: r(() => [g(Zn, {
1645
+ "model-value": e.block.spacing,
1646
+ min: 0,
1647
+ max: 50,
1648
+ suffix: "px",
1649
+ "onUpdate:modelValue": i[7] ||= (e) => u("spacing", e)
1650
+ }, null, 8, ["model-value"])]),
1651
+ _: 1
1652
+ }, 8, ["label"])
1653
+ ], 64));
1654
+ }
1655
+ }), Fr = {
1656
+ class: "tpl:mb-3.5",
1657
+ "data-testid": "paragraph-spacing"
1658
+ }, Ir = { class: "tpl:flex tpl:items-stretch" }, Lr = ["value"], Rr = /* @__PURE__ */ w({
1659
+ __name: "ParagraphToolbar",
1660
+ props: { block: {} },
1661
+ emits: ["update"],
1662
+ setup(e, { emit: n }) {
1663
+ let r = n, { t: i } = L();
1664
+ return (n, a) => (t(), h("div", Fr, [m("label", { class: y(p(W)) }, v(p(i).paragraph.paragraphSpacing), 3), m("div", Ir, [m("input", {
1665
+ type: "number",
1666
+ class: y(p(K)),
1667
+ value: e.block.paragraphSpacing ?? p(k).paragraphGap,
1668
+ min: "0",
1669
+ max: "64",
1670
+ onInput: a[0] ||= (e) => r("update", { paragraphSpacing: Number(e.target.value) })
1671
+ }, null, 42, Lr), m("span", { class: y(p(G)) }, "px", 2)])]));
1672
+ }
1673
+ });
1674
+ //#endregion
1675
+ //#region src/utils/rebalanceColumnChildren.ts
1676
+ function zr(e) {
1677
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
1678
+ }
1679
+ function Br(e, t) {
1680
+ let n = zr(t);
1681
+ if (e.length === n) return e;
1682
+ if (e.length < n) {
1683
+ let t = Array.from({ length: n - e.length }, () => []);
1684
+ return [...e, ...t];
1685
+ }
1686
+ let r = e.slice(0, n), i = e.slice(n).flat(), a = [...r[n - 1], ...i];
1687
+ return [...r.slice(0, n - 1), a];
1688
+ }
1689
+ //#endregion
1690
+ //#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
1691
+ var Vr = { class: "tpl:mb-3.5" }, Hr = ["value"], Ur = ["value"], Wr = {
1692
+ key: 0,
1693
+ class: "tpl:mb-3.5"
1694
+ }, Gr = { class: "tpl:mb-3.5" }, Kr = { class: "tpl:flex tpl:items-stretch" }, qr = ["value"], Jr = { class: "tpl:mb-3.5" }, Yr = {
1695
+ key: 0,
1696
+ class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
1697
+ }, Xr = { class: "tpl:flex tpl:items-stretch" }, Zr = ["value"], Qr = /* @__PURE__ */ w({
1698
+ __name: "SectionToolbar",
1699
+ props: { block: {} },
1700
+ emits: ["update"],
1701
+ setup(e, { emit: n }) {
1702
+ let r = e, i = n, { t: o } = L(), s = S(() => [
1703
+ {
1704
+ value: "1",
1705
+ label: o.section.column1
1706
+ },
1707
+ {
1708
+ value: "2",
1709
+ label: o.section.column2
1710
+ },
1711
+ {
1712
+ value: "3",
1713
+ label: o.section.column3
1714
+ },
1715
+ {
1716
+ value: "1-2",
1717
+ label: o.section.ratio12
1718
+ },
1719
+ {
1720
+ value: "2-1",
1721
+ label: o.section.ratio21
1722
+ }
1723
+ ]);
1724
+ function c(e) {
1725
+ let t = e.target.value, n = Br(r.block.children, t);
1726
+ i("update", {
1727
+ columns: t,
1728
+ children: n
1729
+ });
1730
+ }
1731
+ function l(e) {
1732
+ i("update", { stackOnMobile: e });
1733
+ }
1734
+ function u(e) {
1735
+ let t = Number(e.target.value);
1736
+ i("update", { borderRadius: t });
1737
+ }
1738
+ function d(e) {
1739
+ i("update", { wrapper: e ? { padding: {
1740
+ top: 20,
1741
+ right: 20,
1742
+ bottom: 20,
1743
+ left: 20
1744
+ } } : void 0 });
1745
+ }
1746
+ function f(e) {
1747
+ i("update", { wrapper: {
1748
+ ...r.block.wrapper,
1749
+ ...e
1750
+ } });
1751
+ }
1752
+ function _(e) {
1753
+ f({ padding: e });
1754
+ }
1755
+ function b(e) {
1756
+ f({ borderRadius: Number(e.target.value) });
1757
+ }
1758
+ return (n, r) => (t(), h(x, null, [
1759
+ m("div", Vr, [m("label", { class: y(p(W)) }, v(p(o).section.columns), 3), m("select", {
1760
+ class: y(p(q)),
1761
+ value: e.block.columns,
1762
+ onChange: c
1763
+ }, [(t(!0), h(x, null, a(s.value, (e) => (t(), h("option", {
1764
+ key: e.value,
1765
+ value: e.value
1766
+ }, v(e.label), 9, Ur))), 128))], 42, Hr)]),
1767
+ e.block.columns === "1" ? C("", !0) : (t(), h("div", Wr, [g(J, {
1768
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
1769
+ "model-value": e.block.stackOnMobile !== !1,
1770
+ label: p(o).section.stackOnMobile,
1771
+ "onUpdate:modelValue": r[0] ||= (e) => l(e)
1772
+ }, null, 8, ["model-value", "label"])])),
1773
+ m("div", Gr, [m("label", { class: y(p(W)) }, v(p(o).section.borderRadius), 3), m("div", Kr, [m("input", {
1774
+ type: "number",
1775
+ class: y(p(K)),
1776
+ value: e.block.borderRadius ?? 0,
1777
+ min: "0",
1778
+ max: "50",
1779
+ onInput: u
1780
+ }, null, 42, qr), m("span", { class: y(p(G)) }, "px", 2)])]),
1781
+ m("div", Jr, [g(J, {
1782
+ class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
1783
+ "model-value": !!e.block.wrapper,
1784
+ label: p(o).section.wrapperEnable,
1785
+ "onUpdate:modelValue": r[1] ||= (e) => d(e)
1786
+ }, null, 8, ["model-value", "label"]), e.block.wrapper ? (t(), h("div", Yr, [
1787
+ m("div", null, [m("label", { class: y(p(W)) }, v(p(o).blockSettings.color), 3), g(R, {
1788
+ "model-value": e.block.wrapper.backgroundColor ?? "",
1789
+ "onUpdate:modelValue": r[2] ||= (e) => f({ backgroundColor: e })
1790
+ }, null, 8, ["model-value"])]),
1791
+ g(At, {
1792
+ label: p(o).blockSettings.padding,
1793
+ "model-value": e.block.wrapper.padding ?? {
1794
+ top: 0,
1795
+ right: 0,
1796
+ bottom: 0,
1797
+ left: 0
1798
+ },
1799
+ "onUpdate:modelValue": _
1800
+ }, null, 8, ["label", "model-value"]),
1801
+ m("div", null, [m("label", { class: y(p(W)) }, v(p(o).section.borderRadius), 3), m("div", Xr, [m("input", {
1802
+ type: "number",
1803
+ class: y(p(K)),
1804
+ value: e.block.wrapper.borderRadius ?? 0,
1805
+ min: "0",
1806
+ max: "50",
1807
+ onInput: b
1808
+ }, null, 42, Zr), m("span", { class: y(p(G)) }, "px", 2)])])
1809
+ ])) : C("", !0)])
1810
+ ], 64));
1811
+ }
1812
+ }), $r = { class: "tpl:mb-3.5" }, ei = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ti = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ni = ["value", "onChange"], ri = ["value"], ii = ["title", "onClick"], ai = { class: "tpl:mb-3.5" }, oi = ["value"], si = { value: "solid" }, ci = { value: "outlined" }, li = { value: "rounded" }, ui = { value: "square" }, di = { value: "circle" }, fi = { class: "tpl:mb-3.5" }, pi = { class: "tpl:mb-3.5" }, mi = { class: "tpl:flex tpl:items-stretch" }, hi = ["value"], gi = { class: "tpl:mb-3.5" }, _i = /* @__PURE__ */ w({
1813
+ __name: "SocialToolbar",
1814
+ props: { block: {} },
1815
+ emits: ["update"],
1816
+ setup(e, { emit: n }) {
1817
+ let r = e, i = n, { t: o } = L();
1818
+ function s(e, t) {
1819
+ i("update", { [e]: t });
1820
+ }
1821
+ function c() {
1822
+ let e = {
1823
+ id: D(),
1824
+ platform: "facebook",
1825
+ url: ""
1826
+ };
1827
+ i("update", { icons: [...r.block.icons, e] });
1828
+ }
1829
+ function l(e, t, n) {
1830
+ let a = r.block.icons.map((r) => r.id === e ? {
1831
+ ...r,
1832
+ [t]: n
1833
+ } : r);
1834
+ i("update", { icons: a });
1835
+ }
1836
+ function u(e) {
1837
+ i("update", { icons: r.block.icons.filter((t) => t.id !== e) });
1838
+ }
1839
+ return (n, r) => (t(), h(x, null, [
1840
+ m("div", $r, [m("label", { class: y(p(W)) }, v(p(o).social.icons), 3), m("div", ei, [(t(!0), h(x, null, a(e.block.icons, (e) => (t(), h("div", {
1841
+ key: e.id,
1842
+ 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"
1843
+ }, [m("div", ti, [m("select", {
1844
+ "data-testid": "social-platform-select",
1845
+ class: y([p(q), "tpl:flex-1"]),
1846
+ value: e.platform,
1847
+ onChange: (t) => l(e.id, "platform", t.target.value)
1848
+ }, [(t(!0), h(x, null, a(p(ne), (e) => (t(), h("option", {
1849
+ key: e,
1850
+ value: e
1851
+ }, v(p(o).social.platforms[e]), 9, ri))), 128))], 42, ni), m("button", {
1852
+ class: y(p(ke)),
1853
+ title: p(o).social.removeIcon,
1854
+ onClick: (t) => u(e.id)
1855
+ }, [g(p(Te), {
1856
+ size: 14,
1857
+ "stroke-width": 2
1858
+ })], 10, ii)]), g(Y, {
1859
+ "model-value": e.url,
1860
+ type: "url",
1861
+ placeholder: p(o).social.urlPlaceholder,
1862
+ "onUpdate:modelValue": (t) => l(e.id, "url", t)
1863
+ }, null, 8, [
1864
+ "model-value",
1865
+ "placeholder",
1866
+ "onUpdate:modelValue"
1867
+ ])]))), 128)), m("button", {
1868
+ class: y(p(Ae)),
1869
+ onClick: c
1870
+ }, [g(p(B), {
1871
+ size: 14,
1872
+ "stroke-width": 2
1873
+ }), _(" " + v(p(o).social.addIcon), 1)], 2)])]),
1874
+ m("div", ai, [m("label", { class: y(p(W)) }, v(p(o).social.style), 3), m("select", {
1875
+ class: y(p(q)),
1876
+ value: e.block.iconStyle,
1877
+ onChange: r[0] ||= (e) => s("iconStyle", e.target.value)
1878
+ }, [
1879
+ m("option", si, v(p(o).social.styleSolid), 1),
1880
+ m("option", ci, v(p(o).social.styleOutlined), 1),
1881
+ m("option", li, v(p(o).social.styleRounded), 1),
1882
+ m("option", ui, v(p(o).social.styleSquare), 1),
1883
+ m("option", di, v(p(o).social.styleCircle), 1)
1884
+ ], 42, oi)]),
1885
+ m("div", fi, [m("label", { class: y(p(W)) }, v(p(o).social.size), 3), g(X, {
1886
+ options: [
1887
+ {
1888
+ value: "small",
1889
+ label: p(o).social.sizeSmall
1890
+ },
1891
+ {
1892
+ value: "medium",
1893
+ label: p(o).social.sizeMedium
1894
+ },
1895
+ {
1896
+ value: "large",
1897
+ label: p(o).social.sizeLarge
1898
+ }
1899
+ ],
1900
+ "model-value": e.block.iconSize,
1901
+ "onUpdate:modelValue": r[1] ||= (e) => s("iconSize", e)
1902
+ }, null, 8, ["options", "model-value"])]),
1903
+ m("div", pi, [m("label", { class: y(p(W)) }, v(p(o).social.spacing), 3), m("div", mi, [m("input", {
1904
+ type: "number",
1905
+ class: y(p(K)),
1906
+ value: e.block.spacing,
1907
+ min: "0",
1908
+ max: "50",
1909
+ onInput: r[2] ||= (e) => s("spacing", Number(e.target.value))
1910
+ }, null, 42, hi), m("span", { class: y(p(G)) }, "px", 2)])]),
1911
+ m("div", gi, [m("label", { class: y(p(W)) }, v(p(o).social.align), 3), g(X, {
1912
+ options: [
1913
+ {
1914
+ value: "left",
1915
+ label: p(o).title.alignLeft,
1916
+ icon: p(U)
1917
+ },
1918
+ {
1919
+ value: "center",
1920
+ label: p(o).title.alignCenter,
1921
+ icon: p(H)
1922
+ },
1923
+ {
1924
+ value: "right",
1925
+ label: p(o).title.alignRight,
1926
+ icon: p(V)
1927
+ }
1928
+ ],
1929
+ "model-value": e.block.align,
1930
+ "onUpdate:modelValue": r[3] ||= (e) => s("align", e)
1931
+ }, null, 8, ["options", "model-value"])])
1932
+ ], 64));
1933
+ }
1934
+ }), vi = { class: "tpl:mb-3.5" }, yi = { class: "tpl:flex tpl:items-stretch" }, bi = ["value"], xi = ["value"], Si = /* @__PURE__ */ w({
1935
+ __name: "SpacerToolbar",
1936
+ props: { block: {} },
1937
+ emits: ["update"],
1938
+ setup(e, { emit: n }) {
1939
+ let r = n, { t: i } = L();
1940
+ return (n, a) => (t(), h("div", vi, [
1941
+ m("label", { class: y(p(W)) }, v(p(i).spacer.height), 3),
1942
+ m("div", yi, [m("input", {
1943
+ type: "number",
1944
+ class: y(p(K)),
1945
+ value: e.block.height,
1946
+ min: "10",
1947
+ max: "100",
1948
+ onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
1949
+ }, null, 42, bi), m("span", { class: y(p(G)) }, "px", 2)]),
1950
+ m("input", {
1951
+ type: "range",
1952
+ class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
1953
+ value: e.block.height,
1954
+ min: "10",
1955
+ max: "100",
1956
+ onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
1957
+ }, null, 40, xi)
1958
+ ]));
1959
+ }
1960
+ }), Ci = { class: "tpl:mb-3.5" }, wi = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Ti = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Ei = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Di = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Oi = ["disabled"], ki = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ai = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ji = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Mi = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ni = ["disabled"], Pi = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Fi = { class: "tpl:mb-3.5" }, Ii = {
1961
+ key: 0,
1962
+ class: "tpl:mb-3.5"
1963
+ }, Li = { class: "tpl:mb-3.5" }, Ri = { class: "tpl:mb-3.5" }, zi = { class: "tpl:flex tpl:items-stretch" }, Bi = ["value"], Vi = { class: "tpl:mb-3.5" }, Hi = { class: "tpl:flex tpl:items-stretch" }, Ui = ["value"], Wi = { class: "tpl:mb-3.5" }, Gi = ["value"], Ki = { value: "" }, qi = ["value"], Ji = { class: "tpl:mb-3.5" }, Yi = { class: "tpl:flex tpl:items-stretch" }, Xi = ["value"], Zi = { class: "tpl:mb-3.5" }, Qi = { class: "tpl:mb-3.5" }, $i = /* @__PURE__ */ w({
1964
+ __name: "TableToolbar",
1965
+ props: {
1966
+ block: {},
1967
+ fontFamilies: {}
1968
+ },
1969
+ emits: ["update"],
1970
+ setup(e, { emit: n }) {
1971
+ let r = e, i = n, { t: o } = L(), s = S(() => r.block.rows.length > 0 ? r.block.rows[0].cells.length : 0);
1972
+ function c(e, t) {
1973
+ i("update", { [e]: t });
1974
+ }
1975
+ function l() {
1976
+ let e = r.block.rows.length > 0 ? r.block.rows[0].cells.length : 3, t = {
1977
+ id: D(),
1978
+ cells: Array.from({ length: e }, () => ({
1979
+ id: D(),
1980
+ content: ""
1981
+ }))
1982
+ };
1983
+ i("update", { rows: [...r.block.rows, t] });
1984
+ }
1985
+ function u(e) {
1986
+ i("update", { rows: r.block.rows.filter((t) => t.id !== e) });
1987
+ }
1988
+ function d() {
1989
+ let e = r.block.rows.map((e) => ({
1990
+ ...e,
1991
+ cells: [...e.cells, {
1992
+ id: D(),
1993
+ content: ""
1994
+ }]
1995
+ }));
1996
+ i("update", { rows: e });
1997
+ }
1998
+ function f(e) {
1999
+ let t = r.block.rows.map((t) => ({
2000
+ ...t,
2001
+ cells: t.cells.filter((t, n) => n !== e)
2002
+ }));
2003
+ i("update", { rows: t });
2004
+ }
2005
+ return (n, r) => (t(), h(x, null, [
2006
+ m("div", Ci, [m("label", { class: y(p(W)) }, v(p(o).table.dimensions), 3), m("div", wi, [m("div", Ti, [m("span", Ei, v(p(o).table.rows), 1), m("div", Di, [
2007
+ m("button", {
2008
+ 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",
2009
+ disabled: e.block.rows.length <= 1,
2010
+ onClick: r[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
2011
+ }, [g(p(z), {
2012
+ size: 12,
2013
+ "stroke-width": 2
2014
+ })], 8, Oi),
2015
+ m("span", ki, v(e.block.rows.length), 1),
2016
+ m("button", {
2017
+ 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)]",
2018
+ onClick: l
2019
+ }, [g(p(B), {
2020
+ size: 12,
2021
+ "stroke-width": 2
2022
+ })])
2023
+ ])]), m("div", Ai, [m("span", ji, v(p(o).table.columns), 1), m("div", Mi, [
2024
+ m("button", {
2025
+ 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",
2026
+ disabled: s.value <= 1,
2027
+ onClick: r[1] ||= (e) => f(s.value - 1)
2028
+ }, [g(p(z), {
2029
+ size: 12,
2030
+ "stroke-width": 2
2031
+ })], 8, Ni),
2032
+ m("span", Pi, v(s.value), 1),
2033
+ m("button", {
2034
+ 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)]",
2035
+ onClick: d
2036
+ }, [g(p(B), {
2037
+ size: 12,
2038
+ "stroke-width": 2
2039
+ })])
2040
+ ])])])]),
2041
+ m("div", Fi, [g(J, {
2042
+ class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
2043
+ "model-value": e.block.hasHeaderRow,
2044
+ label: p(o).table.hasHeaderRow,
2045
+ "onUpdate:modelValue": r[2] ||= (e) => c("hasHeaderRow", e)
2046
+ }, null, 8, ["model-value", "label"])]),
2047
+ e.block.hasHeaderRow ? (t(), h("div", Ii, [m("label", { class: y(p(W)) }, v(p(o).table.headerBackgroundColor), 3), g(R, {
2048
+ "model-value": e.block.headerBackgroundColor ?? "",
2049
+ "seed-color": p(je),
2050
+ placeholder: p(o).table.noHeaderBg,
2051
+ "onUpdate:modelValue": r[3] ||= (e) => c("headerBackgroundColor", e || null)
2052
+ }, null, 8, [
2053
+ "model-value",
2054
+ "seed-color",
2055
+ "placeholder"
2056
+ ])])) : C("", !0),
2057
+ m("div", Li, [m("label", { class: y(p(W)) }, v(p(o).table.borderColor), 3), g(R, {
2058
+ "model-value": e.block.borderColor,
2059
+ "onUpdate:modelValue": r[4] ||= (e) => c("borderColor", e)
2060
+ }, null, 8, ["model-value"])]),
2061
+ m("div", Ri, [m("label", { class: y(p(W)) }, v(p(o).table.borderWidth), 3), m("div", zi, [m("input", {
2062
+ type: "number",
2063
+ class: y(p(K)),
2064
+ value: e.block.borderWidth,
2065
+ min: "0",
2066
+ max: "10",
2067
+ onInput: r[5] ||= (e) => c("borderWidth", Number(e.target.value))
2068
+ }, null, 42, Bi), m("span", { class: y(p(G)) }, "px", 2)])]),
2069
+ m("div", Vi, [m("label", { class: y(p(W)) }, v(p(o).table.cellPadding), 3), m("div", Hi, [m("input", {
2070
+ type: "number",
2071
+ class: y(p(K)),
2072
+ value: e.block.cellPadding,
2073
+ min: "0",
2074
+ max: "30",
2075
+ onInput: r[6] ||= (e) => c("cellPadding", Number(e.target.value))
2076
+ }, null, 42, Ui), m("span", { class: y(p(G)) }, "px", 2)])]),
2077
+ m("div", Wi, [m("label", { class: y(p(W)) }, v(p(o).table.fontFamily), 3), m("select", {
2078
+ class: y(p(q)),
2079
+ value: e.block.fontFamily || "",
2080
+ onChange: r[7] ||= (e) => c("fontFamily", e.target.value || void 0)
2081
+ }, [m("option", Ki, v(p(o).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
2082
+ key: e.value,
2083
+ value: e.value
2084
+ }, v(e.label), 9, qi))), 128))], 42, Gi)]),
2085
+ m("div", Ji, [m("label", { class: y(p(W)) }, v(p(o).table.fontSize), 3), m("div", Yi, [m("input", {
2086
+ type: "number",
2087
+ class: y(p(K)),
2088
+ value: e.block.fontSize,
2089
+ min: "10",
2090
+ max: "32",
2091
+ onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
2092
+ }, null, 42, Xi), m("span", { class: y(p(G)) }, "px", 2)])]),
2093
+ m("div", Zi, [m("label", { class: y(p(W)) }, v(p(o).table.color), 3), g(R, {
2094
+ "model-value": e.block.color ?? "",
2095
+ "onUpdate:modelValue": r[9] ||= (e) => c("color", e || void 0)
2096
+ }, null, 8, ["model-value"])]),
2097
+ m("div", Qi, [m("label", { class: y(p(W)) }, v(p(o).table.textAlign), 3), g(X, {
2098
+ options: [
2099
+ {
2100
+ value: "left",
2101
+ label: p(o).title.alignLeft,
2102
+ icon: p(U)
2103
+ },
2104
+ {
2105
+ value: "center",
2106
+ label: p(o).title.alignCenter,
2107
+ icon: p(H)
2108
+ },
2109
+ {
2110
+ value: "right",
2111
+ label: p(o).title.alignRight,
2112
+ icon: p(V)
2113
+ }
2114
+ ],
2115
+ "model-value": e.block.textAlign,
2116
+ "onUpdate:modelValue": r[10] ||= (e) => c("textAlign", e)
2117
+ }, null, 8, ["options", "model-value"])])
2118
+ ], 64));
2119
+ }
2120
+ }), ea = { class: "tpl:mb-3.5" }, ta = ["value"], na = { value: 1 }, ra = { value: 2 }, ia = { value: 3 }, aa = { value: 4 }, oa = { class: "tpl:mb-3.5" }, sa = ["value"], ca = { value: "" }, la = ["value"], ua = { class: "tpl:mb-3.5" }, da = { class: "tpl:mb-3.5" }, fa = /* @__PURE__ */ w({
2121
+ __name: "TitleToolbar",
2122
+ props: {
2123
+ block: {},
2124
+ fontFamilies: {}
2125
+ },
2126
+ emits: ["update"],
2127
+ setup(e, { emit: n }) {
2128
+ let r = n, { t: i } = L();
2129
+ function o(e, t) {
2130
+ r("update", { [e]: t });
2131
+ }
2132
+ return (n, r) => (t(), h(x, null, [
2133
+ m("div", ea, [m("label", { class: y(p(W)) }, v(p(i).title.level), 3), m("select", {
2134
+ class: y(p(q)),
2135
+ value: e.block.level,
2136
+ onChange: r[0] ||= (e) => o("level", Number(e.target.value))
2137
+ }, [
2138
+ m("option", na, v(p(i).title.heading1), 1),
2139
+ m("option", ra, v(p(i).title.heading2), 1),
2140
+ m("option", ia, v(p(i).title.heading3), 1),
2141
+ m("option", aa, v(p(i).title.heading4), 1)
2142
+ ], 42, ta)]),
2143
+ m("div", oa, [m("label", { class: y(p(W)) }, v(p(i).title.fontFamily), 3), m("select", {
2144
+ class: y(p(q)),
2145
+ value: e.block.fontFamily || "",
2146
+ onChange: r[1] ||= (e) => o("fontFamily", e.target.value || void 0)
2147
+ }, [m("option", ca, v(p(i).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
2148
+ key: e.value,
2149
+ value: e.value
2150
+ }, v(e.label), 9, la))), 128))], 42, sa)]),
2151
+ m("div", ua, [m("label", { class: y(p(W)) }, v(p(i).title.color), 3), g(R, {
2152
+ "model-value": e.block.color ?? "",
2153
+ "onUpdate:modelValue": r[2] ||= (e) => o("color", e || void 0)
2154
+ }, null, 8, ["model-value"])]),
2155
+ m("div", da, [m("label", { class: y(p(W)) }, v(p(i).title.align), 3), g(X, {
2156
+ options: [
2157
+ {
2158
+ value: "left",
2159
+ label: p(i).title.alignLeft,
2160
+ icon: p(U)
2161
+ },
2162
+ {
2163
+ value: "center",
2164
+ label: p(i).title.alignCenter,
2165
+ icon: p(H)
2166
+ },
2167
+ {
2168
+ value: "right",
2169
+ label: p(i).title.alignRight,
2170
+ icon: p(V)
2171
+ }
2172
+ ],
2173
+ "model-value": e.block.textAlign,
2174
+ "onUpdate:modelValue": r[3] ||= (e) => o("textAlign", e)
2175
+ }, null, 8, ["options", "model-value"])])
2176
+ ], 64));
2177
+ }
2178
+ }), pa = { class: "tpl:mb-3.5" }, ma = {
2179
+ key: 0,
2180
+ class: "tpl:mb-3.5"
2181
+ }, ha = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ga = [
2182
+ "value",
2183
+ "placeholder",
2184
+ "title"
2185
+ ], _a = { class: "tpl:mb-3.5" }, va = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ya = { class: "tpl:mb-3.5" }, ba = { class: "tpl:mb-3.5" }, xa = ["value"], Sa = { value: "full" }, Ca = { class: "tpl:mb-3.5" }, wa = ["value"], Ta = { value: "auto" }, Ea = { value: "custom" }, Da = {
2186
+ key: 0,
2187
+ class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2188
+ }, Oa = ["value"], ka = { class: "tpl:mb-3.5" }, Aa = 200, ja = /* @__PURE__ */ w({
2189
+ __name: "VideoToolbar",
2190
+ props: { block: {} },
2191
+ emits: ["update"],
2192
+ setup(e, { emit: n }) {
2193
+ let r = e, i = n, { t: a } = L(), o = c(F, null), s = c(ae, j.liquid), l = De(), u = S(() => !!o), f = S(() => A(r.block.url, s)), w = S(() => typeof r.block.height == "number" ? "custom" : "auto"), T = d(!1), { start: E } = P(() => {
2194
+ T.value = !1;
2195
+ }, 1e3, { immediate: !1 });
2196
+ function D(e, t) {
2197
+ i("update", { [e]: t });
2198
+ }
2199
+ function O(e) {
2200
+ D("height", e === "custom" ? Aa : void 0);
2201
+ }
2202
+ function k(e) {
2203
+ let t = Number(e);
2204
+ !Number.isFinite(t) || t <= 0 || D("height", t);
2205
+ }
2206
+ async function M() {
2207
+ let e = await o?.({ accept: ["images"] });
2208
+ l.alive && e && (D("thumbnailUrl", e.url), T.value = !0, E());
2209
+ }
2210
+ return (n, r) => (t(), h(x, null, [
2211
+ m("div", pa, [
2212
+ m("label", { class: y(p(W)) }, v(p(a).video.videoUrl), 3),
2213
+ g(Y, {
2214
+ "model-value": e.block.url,
2215
+ type: "url",
2216
+ placeholder: p(a).video.videoUrlPlaceholder,
2217
+ "onUpdate:modelValue": r[0] ||= (e) => D("url", e)
2218
+ }, null, 8, ["model-value", "placeholder"]),
2219
+ e.block.url ? (t(), b(J, {
2220
+ key: 0,
2221
+ class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2222
+ "model-value": e.block.openInNewTab ?? !1,
2223
+ label: p(a).video.openInNewTab,
2224
+ "onUpdate:modelValue": r[1] ||= (e) => D("openInNewTab", e)
2225
+ }, null, 8, ["model-value", "label"])) : C("", !0)
2226
+ ]),
2227
+ f.value ? (t(), h("div", ma, [m("label", { class: y(p(W)) }, [_(v(p(a).video.placeholderUrl) + " ", 1), m("span", ha, v(p(a).video.optional), 1)], 2), m("input", {
2228
+ type: "url",
2229
+ class: y(p(q)),
2230
+ value: e.block.placeholderUrl || "",
2231
+ placeholder: p(a).video.placeholderUrlPlaceholder,
2232
+ title: p(a).video.placeholderUrlTooltip,
2233
+ onInput: r[2] ||= (e) => D("placeholderUrl", e.target.value)
2234
+ }, null, 42, ga)])) : C("", !0),
2235
+ m("div", _a, [
2236
+ m("label", { class: y(p(W)) }, [_(v(p(a).video.customThumbnail) + " ", 1), m("span", va, v(p(a).video.optional), 1)], 2),
2237
+ g(Y, {
2238
+ "model-value": e.block.thumbnailUrl,
2239
+ type: "url",
2240
+ placeholder: p(a).video.thumbnailPlaceholder,
2241
+ pulse: T.value,
2242
+ "onUpdate:modelValue": r[3] ||= (e) => D("thumbnailUrl", e)
2243
+ }, null, 8, [
2244
+ "model-value",
2245
+ "placeholder",
2246
+ "pulse"
2247
+ ]),
2248
+ u.value ? (t(), h("button", {
2249
+ key: 0,
2250
+ 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",
2251
+ style: {
2252
+ "border-color": "var(--tpl-border)",
2253
+ color: "var(--tpl-primary)",
2254
+ "background-color": "var(--tpl-bg)"
2255
+ },
2256
+ onClick: M
2257
+ }, [g(p(ee), {
2258
+ size: 14,
2259
+ "stroke-width": 1.5
2260
+ }), _(" " + v(p(a).image.browseMedia), 1)])) : C("", !0)
2261
+ ]),
2262
+ m("div", ya, [m("label", { class: y(p(W)) }, v(p(a).video.altText), 3), g(Y, {
2263
+ "model-value": e.block.alt,
2264
+ type: "text",
2265
+ placeholder: p(a).video.altTextPlaceholder,
2266
+ "onUpdate:modelValue": r[4] ||= (e) => D("alt", e)
2267
+ }, null, 8, ["model-value", "placeholder"])]),
2268
+ m("div", ba, [m("label", { class: y(p(W)) }, v(p(a).video.width), 3), m("select", {
2269
+ class: y(p(q)),
2270
+ value: e.block.width,
2271
+ onChange: r[5] ||= (e) => D("width", e.target.value === "full" ? "full" : Number(e.target.value))
2272
+ }, [
2273
+ m("option", Sa, v(p(a).video.fullWidth), 1),
2274
+ r[9] ||= m("option", { value: "300" }, "300px", -1),
2275
+ r[10] ||= m("option", { value: "400" }, "400px", -1),
2276
+ r[11] ||= m("option", { value: "500" }, "500px", -1)
2277
+ ], 42, xa)]),
2278
+ m("div", Ca, [
2279
+ m("label", { class: y(p(W)) }, v(p(a).video.height), 3),
2280
+ m("select", {
2281
+ class: y(p(q)),
2282
+ "data-testid": "video-height-mode",
2283
+ value: w.value,
2284
+ onChange: r[6] ||= (e) => O(e.target.value)
2285
+ }, [m("option", Ta, v(p(a).video.heightAuto), 1), m("option", Ea, v(p(a).video.heightCustom), 1)], 42, wa),
2286
+ w.value === "custom" ? (t(), h("div", Da, [m("input", {
2287
+ type: "number",
2288
+ "data-testid": "video-height-input",
2289
+ class: y(p(K)),
2290
+ value: e.block.height,
2291
+ min: "20",
2292
+ onInput: r[7] ||= (e) => k(e.target.value)
2293
+ }, null, 42, Oa), m("span", { class: y(p(G)) }, "px", 2)])) : C("", !0)
2294
+ ]),
2295
+ m("div", ka, [m("label", { class: y(p(W)) }, v(p(a).title.align), 3), g(X, {
2296
+ options: [
2297
+ {
2298
+ value: "left",
2299
+ label: p(a).title.alignLeft
2300
+ },
2301
+ {
2302
+ value: "center",
2303
+ label: p(a).title.alignCenter
2304
+ },
2305
+ {
2306
+ value: "right",
2307
+ label: p(a).title.alignRight
2308
+ }
2309
+ ],
2310
+ "model-value": e.block.align,
2311
+ "onUpdate:modelValue": r[8] ||= (e) => D("align", e)
2312
+ }, null, 8, ["options", "model-value"])])
2313
+ ], 64));
2314
+ }
2315
+ }), Ma = ["aria-label"], Na = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, Pa = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Fa = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ia = { class: "tpl:flex tpl:gap-1" }, La = ["title"], Ra = ["title"], za = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Ba = /*@__PURE__*/ w({
2316
+ __name: "Toolbar",
2317
+ props: { block: {} },
2318
+ emits: [
2319
+ "update",
2320
+ "delete",
2321
+ "duplicate"
2322
+ ],
2323
+ setup(e, { emit: n }) {
2324
+ let r = f(() => import("./CountdownToolbar-C2kfS6Oy.js")), a = e, o = n, { t: s } = L(), l = oe(de, "Toolbar"), u = c(I, []), d = S(() => a.block.type), _ = S(() => O(a.block)), y = S(() => {
2325
+ if (_.value) return u.find((e) => e.type === a.block.customType);
2326
+ }), x = S(() => _.value ? y.value?.name ?? a.block.customType : M(d.value, s)), w = l.fonts;
2327
+ function T(e) {
2328
+ o("update", e);
2329
+ }
2330
+ return (n, a) => (t(), h("aside", {
2331
+ "data-testid": "block-toolbar",
2332
+ "aria-label": p(s).landmarks.blockToolbar,
2333
+ class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
2334
+ }, [m("div", Na, [m("div", Pa, [p(ge)[d.value] ? (t(), b(i(p(ge)[d.value]), {
2335
+ key: 0,
2336
+ size: 16,
2337
+ "stroke-width": 1.5
2338
+ })) : _.value ? (t(), b(p(N), {
2339
+ key: 1,
2340
+ size: 16,
2341
+ "stroke-width": 1.5
2342
+ })) : C("", !0), m("h3", Fa, v(x.value), 1)]), m("div", Ia, [m("button", {
2343
+ 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)]",
2344
+ title: p(s).toolbar.duplicate,
2345
+ onClick: a[0] ||= (e) => o("duplicate")
2346
+ }, [g(p(_e), {
2347
+ size: 14,
2348
+ "stroke-width": 2
2349
+ })], 8, La), m("button", {
2350
+ 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)]",
2351
+ title: p(s).toolbar.delete,
2352
+ onClick: a[1] ||= (e) => o("delete")
2353
+ }, [g(p(Ce), {
2354
+ size: 14,
2355
+ "stroke-width": 2
2356
+ })], 8, Ra)])]), m("div", za, [_.value ? (t(), b(Rn, {
2357
+ key: 0,
2358
+ block: e.block,
2359
+ onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
2360
+ onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
2361
+ }, null, 8, ["block"])) : d.value === "section" ? (t(), b(Qr, {
2362
+ key: 1,
2363
+ block: e.block,
2364
+ onUpdate: T
2365
+ }, null, 8, ["block"])) : d.value === "title" ? (t(), b(fa, {
2366
+ key: 2,
2367
+ block: e.block,
2368
+ "font-families": p(w),
2369
+ onUpdate: T
2370
+ }, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (t(), b(Rr, {
2371
+ key: 3,
2372
+ block: e.block,
2373
+ onUpdate: T
2374
+ }, null, 8, ["block"])) : d.value === "image" ? (t(), b(Sr, {
2375
+ key: 4,
2376
+ block: e.block,
2377
+ onUpdate: T
2378
+ }, null, 8, ["block"])) : d.value === "video" ? (t(), b(ja, {
2379
+ key: 5,
2380
+ block: e.block,
2381
+ onUpdate: T
2382
+ }, null, 8, ["block"])) : d.value === "button" ? (t(), b(st, {
2383
+ key: 6,
2384
+ block: e.block,
2385
+ "font-families": p(w),
2386
+ onUpdate: T
2387
+ }, null, 8, ["block", "font-families"])) : d.value === "divider" ? (t(), b(Wn, {
2388
+ key: 7,
2389
+ block: e.block,
2390
+ onUpdate: T
2391
+ }, null, 8, ["block"])) : d.value === "social" ? (t(), b(_i, {
2392
+ key: 8,
2393
+ block: e.block,
2394
+ onUpdate: T
2395
+ }, null, 8, ["block"])) : d.value === "menu" ? (t(), b(Pr, {
2396
+ key: 9,
2397
+ block: e.block,
2398
+ "font-families": p(w),
2399
+ onUpdate: T
2400
+ }, null, 8, ["block", "font-families"])) : d.value === "table" ? (t(), b($i, {
2401
+ key: 10,
2402
+ block: e.block,
2403
+ "font-families": p(w),
2404
+ onUpdate: T
2405
+ }, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (t(), b(Si, {
2406
+ key: 11,
2407
+ block: e.block,
2408
+ onUpdate: T
2409
+ }, null, 8, ["block"])) : d.value === "html" ? (t(), b(Jn, {
2410
+ key: 12,
2411
+ block: e.block,
2412
+ onUpdate: T
2413
+ }, null, 8, ["block"])) : d.value === "countdown" ? (t(), b(p(r), {
2414
+ key: 13,
2415
+ block: e.block,
2416
+ "font-families": p(w),
2417
+ onUpdate: T
2418
+ }, null, 8, ["block", "font-families"])) : C("", !0), g(Qt, {
2419
+ block: e.block,
2420
+ "is-first-section": d.value === "paragraph",
2421
+ onUpdate: T
2422
+ }, null, 8, ["block", "is-first-section"])])], 8, Ma));
2423
+ }
2424
+ }), Va = /* @__PURE__ */ e({ default: () => Ha }), Ha = /*#__PURE__*/ Ee(Ba, [["__scopeId", "data-v-1038bf62"]]);
2425
+ //#endregion
2426
+ export { Ha as default, X as i, $ as n, Zn as r, Va as t };