@templatical/editor 0.47.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +1 -1
  2. package/dist/{AiChatSidebar-BPOv5Ra8.js → AiChatSidebar-CdjTb9ej.js} +14 -14
  3. package/dist/{AiFeatureMenu-H_WT4YR8.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
  4. package/dist/{BlockIssueBadge-AgO5abEB.js → BlockIssueBadge-BdpJwim0.js} +5 -5
  5. package/dist/BlockPreviewCanvas-D_sowkf0.js +141 -0
  6. package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
  7. package/dist/{CloudPanels-H_GdbOfZ.js → CloudPanels-1hwFiJ0G.js} +39 -68
  8. package/dist/CollaborationNotices-BWpKzueF.js +73 -0
  9. package/dist/CollaboratorBar-D87phJsw.js +123 -0
  10. package/dist/{CommentsPanel-CMgsG_yh.js → CommentsPanel-BUvUzO3T.js} +2 -2
  11. package/dist/{CommentsSidebar-DCh8DTP8.js → CommentsSidebar-J65znlrH.js} +14 -14
  12. package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
  13. package/dist/{CountdownToolbar-DVuucA3v.js → CountdownToolbar-CLMIwfK7.js} +7 -7
  14. package/dist/{DesignReferenceSidebar-DxNV4lQp.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
  15. package/dist/{IssuesPanel-CUpW54P4.js → IssuesPanel-DeeVsfG7.js} +8 -8
  16. package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
  17. package/dist/{LogicTagInsertButton-DDYKnqmj.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
  18. package/dist/{MediaEditModal-D_we0Scr.js → MediaEditModal-C_wxoUMG.js} +3 -3
  19. package/dist/{MediaPanels-L95BwWV1.js → MediaPanels-BVXDkqtH.js} +2 -2
  20. package/dist/{MergeTagInput-DAL998tx.js → MergeTagInput-BEw_r0PJ.js} +3 -3
  21. package/dist/{MergeTagModeToggle-CjHO26rb.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
  22. package/dist/{ParagraphEditor-CcEN1N6n.js → ParagraphEditor-zLV44z-R.js} +135 -135
  23. package/dist/{RestoreVersionDialog-B2OH5rgs.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
  24. package/dist/{RichTextEditorContent-BGeTg-QL.js → RichTextEditorContent-CsvniFlI.js} +9 -9
  25. package/dist/{SaveBlockDialog-CCVyU-7y.js → SaveBlockDialog-DzWURF_e.js} +34 -35
  26. package/dist/{SavedBlocksBrowserModal-_WmSeqIh.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
  27. package/dist/{SavedBlocksPanels-DVX_ruQ7.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
  28. package/dist/{SavedBlocksPickBar-DVJC28hP.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
  29. package/dist/{TemplateScoringPanel-U0QFiwdI.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
  30. package/dist/{TemplateSettings-CdhTm9JQ.js → TemplateSettings-Cu5X9DgA.js} +11 -11
  31. package/dist/{TestEmailModal-BqToA_ls.js → TestEmailModal-BeRYV3eg.js} +14 -14
  32. package/dist/{TestEmailPanel-Cn4Ptq0j.js → TestEmailPanel-B8c3fQi2.js} +2 -2
  33. package/dist/{TitleEditor-CZdqeltH.js → TitleEditor-CvpNUoAp.js} +13 -13
  34. package/dist/{ToggleSwitch-BR8Sgzib.js → ToggleSwitch-DHweVJOr.js} +2 -2
  35. package/dist/Toolbar-BadDSkkF.js +3153 -0
  36. package/dist/{TplModal-CoczSDma.js → TplModal-BZgi9Tes.js} +5 -5
  37. package/dist/{VersionHistoryMenu-DY5z5FZr.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
  38. package/dist/{VersionHistoryPanels-DowHeDAQ.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
  39. package/dist/{VersionPreviewBanner-Bo8NxBbh.js → VersionPreviewBanner-F-811aps.js} +4 -4
  40. package/dist/WrapperBlock-DiiaxpMb.js +45 -0
  41. package/dist/{blockTypeIcons-4E1U8f99.js → blockTypeIcons-CayLluou.js} +49 -19
  42. package/dist/bundle-stats.json +7 -7
  43. package/dist/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +40 -2
  44. package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js → AiChatSidebar-yXJ85Zcg.js} +12 -12
  45. package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
  46. package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
  47. package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
  48. package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
  49. package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
  50. package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js +143 -0
  51. package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js.map +1 -0
  52. package/dist/cdn/chunks/{CloudHeaderExtras-DJXLTUHc.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
  53. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
  54. package/dist/cdn/chunks/{CloudPanels-D1fPLjG8.js → CloudPanels-XufhBZYF.js} +38 -67
  55. package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
  56. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
  57. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
  58. package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
  59. package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
  60. package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js → CommentsPanel-R8YLLO3v.js} +3 -3
  61. package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
  62. package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js → CommentsSidebar-96NZHVq3.js} +16 -16
  63. package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
  64. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
  65. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
  66. package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js → CountdownToolbar-tmiTPEXm.js} +8 -8
  67. package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
  68. package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js → DesignReferenceSidebar-D14IIu_P.js} +40 -40
  69. package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
  70. package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js → IssuesPanel-BoPiCLGc.js} +6 -6
  71. package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
  72. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
  73. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
  74. package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js → LogicTagInsertButton-BJ2t2vxC.js} +98 -98
  75. package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
  76. package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js → MediaEditModal-DD0SZ-S3.js} +3 -3
  77. package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
  78. package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js → MediaPanels-CkdJ_kGp.js} +3 -3
  79. package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
  80. package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js → MergeTagInput-7wXX71DH.js} +4 -4
  81. package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
  82. package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
  83. package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
  84. package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js → ParagraphEditor-CJQjRHXV.js} +52 -52
  85. package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
  86. package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js → RestoreVersionDialog-C5cxBRKi.js} +8 -8
  87. package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
  88. package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
  89. package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
  90. package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js → SaveBlockDialog-BKbjUnPM.js} +25 -26
  91. package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
  93. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
  94. package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
  95. package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
  96. package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
  97. package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
  98. package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js → TemplateScoringPanel-BBPnHILC.js} +10 -10
  99. package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
  100. package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js → TemplateSettings-CtrzzQWl.js} +14 -14
  101. package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
  102. package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js → TestEmailModal-DuZKYMWD.js} +15 -15
  103. package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
  104. package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js → TestEmailPanel-DERaCdpG.js} +3 -3
  105. package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
  106. package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js → TitleEditor-CEgxjtUX.js} +20 -20
  107. package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
  108. package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
  109. package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
  110. package/dist/cdn/chunks/Toolbar-GFIZQHzw.js +3070 -0
  111. package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
  112. package/dist/cdn/chunks/{TplModal-WIBiBrGy.js → TplModal-DDrbWJcE.js} +5 -5
  113. package/dist/cdn/chunks/{TplModal-WIBiBrGy.js.map → TplModal-DDrbWJcE.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js → VersionHistoryMenu-MlxsUmuT.js} +11 -11
  115. package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
  116. package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
  117. package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
  118. package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
  119. package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
  120. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +47 -0
  121. package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js.map +1 -0
  122. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +22 -0
  123. package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js.map +1 -0
  124. package/dist/cdn/chunks/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +41 -3
  125. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
  126. package/dist/{cloud-DwjaAdwK.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
  127. package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
  128. package/dist/cdn/chunks/{createCloudRuntime-DtIZ2Lee.js → createCloudRuntime-DiYCJ21w.js} +127 -169
  129. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
  130. package/dist/{de-DgAelLbM.js → cdn/chunks/de-CBE6O79z.js} +42 -2
  131. package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
  132. package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
  133. package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
  134. package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
  135. package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
  136. package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
  137. package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
  138. package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
  139. package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
  140. package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js → editor-modal-HJBy9kLj.js} +69 -69
  141. package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
  142. package/dist/cdn/chunks/{en-Dekrl7HA.js → en-CDexnk0p.js} +41 -3
  143. package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
  144. package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
  145. package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
  146. package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
  147. package/dist/{es-BaZzyidV.js → cdn/chunks/es-BE42B6uN.js} +42 -2
  148. package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
  149. package/dist/cdn/chunks/{extensions-T-t8MKDb.js → extensions-koOuDeZS.js} +23 -23
  150. package/dist/cdn/chunks/{extensions-T-t8MKDb.js.map → extensions-koOuDeZS.js.map} +1 -1
  151. package/dist/{fr-C5ucb1HK.js → cdn/chunks/fr-DlJFPDQR.js} +42 -2
  152. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
  153. package/dist/cdn/chunks/{icons-C4fX9Bwy.js → icons-CjlNV8xD.js} +121 -92
  154. package/dist/cdn/chunks/icons-CjlNV8xD.js.map +1 -0
  155. package/dist/{ja-CUgR3mV0.js → cdn/chunks/ja-CUT8gkNI.js} +42 -2
  156. package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
  157. package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
  158. package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
  159. package/dist/{nl-qrLY7hMS.js → cdn/chunks/nl-bXWqqRyS.js} +42 -2
  160. package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
  161. package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
  162. package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
  163. package/dist/{pt-BR-C6hMTQYi.js → cdn/chunks/pt-BR-2_H4-wlb.js} +42 -2
  164. package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
  165. package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
  166. package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
  167. package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
  168. package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
  169. package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
  170. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
  171. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
  172. package/dist/cdn/chunks/{src-CHlVFp7r.js → src-B1e5SSYP.js} +312 -286
  173. package/dist/cdn/chunks/src-B1e5SSYP.js.map +1 -0
  174. package/dist/cdn/chunks/src-B77z1iw4.js +649 -0
  175. package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
  176. package/dist/cdn/chunks/{src-BnJlDuyB.js → src-CvLTYGdO.js} +555 -283
  177. package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
  178. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
  179. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
  180. package/dist/cdn/chunks/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +2 -2
  181. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
  182. package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
  183. package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
  184. package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
  185. package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
  186. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
  187. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
  188. package/dist/cdn/chunks/{useEditorCore-Bf2d1DKI.js → useEditorCore-DpCFvHg_.js} +758 -732
  189. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
  190. package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
  191. package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
  192. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
  193. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
  194. package/dist/cdn/chunks/{useLogicTag-3S63go4E.js → useLogicTag-X8bc5qNl.js} +4 -4
  195. package/dist/cdn/chunks/{useLogicTag-3S63go4E.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
  196. package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js → useMergeTag-DFoOexIQ.js} +6 -6
  197. package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
  198. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
  199. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
  200. package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
  201. package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
  202. package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js → withCurrentFont-D-f61ghC.js} +2 -2
  203. package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
  204. package/dist/cdn/editor.css +1 -1
  205. package/dist/cdn/editor.js +1328 -1069
  206. package/dist/cdn/editor.js.map +1 -1
  207. package/dist/{check-B5R4zXr7.js → check-DQQzkmIC.js} +1 -1
  208. package/dist/{chevron-down-BKyl85NV.js → chevron-down-CIF4bdon.js} +1 -1
  209. package/dist/{chevron-right-BmToZ8qX.js → chevron-right-Cg7Xu-ev.js} +1 -1
  210. package/dist/{chevron-up-DNYdOxPC.js → chevron-up-Csu7ISD-.js} +1 -1
  211. package/dist/{circle-alert-Dx9ju3YZ.js → circle-alert-YUvIJAgY.js} +1 -1
  212. package/dist/{clock-Dv9bxsSH.js → clock-CnSIGKQW.js} +1 -1
  213. package/dist/{cdn/chunks/cloud-Cd7ptfhL.js → cloud-YUYDtdHt.js} +308 -569
  214. package/dist/{copy-BsKl4dcy.js → copy-CUC43md_.js} +1 -1
  215. package/dist/{createCloudRuntime-C8gpPsSi.js → createCloudRuntime-BMDRjL0k.js} +126 -168
  216. package/dist/{createLucideIcon-DziKp5iU.js → createLucideIcon-BcP1sjdp.js} +6 -6
  217. package/dist/{cdn/chunks/de-DgAelLbM.js → de-CBE6O79z.js} +40 -4
  218. package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
  219. package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
  220. package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
  221. package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
  222. package/dist/{dist-C8koXLhl.js → dist-DBG3nh3k.js} +550 -284
  223. package/dist/{editor-modal-BwyIUnV_.js → editor-modal--7_9A6j-.js} +27 -27
  224. package/dist/en-BHCMzqib.js +1 -0
  225. package/dist/{en-Dekrl7HA.js → en-CDexnk0p.js} +40 -2
  226. package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
  227. package/dist/{cdn/chunks/es-BaZzyidV.js → es-BE42B6uN.js} +40 -4
  228. package/dist/{extensions-DHyKjsNZ.js → extensions-zwsZlWjH.js} +23 -23
  229. package/dist/{eye-DQuinb9k.js → eye-B1bua-ck.js} +1 -1
  230. package/dist/{cdn/chunks/fr-C5ucb1HK.js → fr-DlJFPDQR.js} +40 -4
  231. package/dist/{image-up-yTfLjOrj.js → image-up-BqiO7KCO.js} +1 -1
  232. package/dist/index.d.ts +356 -38
  233. package/dist/{info-C7OjlS11.js → info-x26nGOo2.js} +1 -1
  234. package/dist/{cdn/chunks/ja-CUgR3mV0.js → ja-CUT8gkNI.js} +40 -4
  235. package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
  236. package/dist/{link-CrUFaZ0t.js → link-CezhndyR.js} +1 -1
  237. package/dist/{list-CLgv6M-k.js → list-DQqdptI0.js} +1 -1
  238. package/dist/{loader-circle-BXM5VO0K.js → loader-circle-DCEeoYoi.js} +1 -1
  239. package/dist/{message-circle-BisdQ8H9.js → message-circle-BLGzfv_7.js} +1 -1
  240. package/dist/{cdn/chunks/nl-qrLY7hMS.js → nl-bXWqqRyS.js} +40 -4
  241. package/dist/{package-C1T4AxV1.js → package-D_kEQCMU.js} +1 -1
  242. package/dist/{pencil-oo2mwf4C.js → pencil-Dct8zGLy.js} +1 -1
  243. package/dist/{plus-BIilXopD.js → plus-BDd0gTEm.js} +1 -1
  244. package/dist/{preRenderCustomBlocks-lFX0HHiV.js → preRenderCustomBlocks-CtKJecE-.js} +1 -1
  245. package/dist/{cdn/chunks/pt-BR-C6hMTQYi.js → pt-BR-2_H4-wlb.js} +40 -4
  246. package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
  247. package/dist/{refresh-cw-DrLlkEVC.js → refresh-cw-tGMRDxr8.js} +1 -1
  248. package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
  249. package/dist/{search-DNu9lImk.js → search-Bm2cCQpe.js} +1 -1
  250. package/dist/{send-DDNh3LoJ.js → send-sVLaKZ7f.js} +1 -1
  251. package/dist/{shield-check-aXM3o14f.js → shield-check-YhsbXfQc.js} +1 -1
  252. package/dist/{smartphone-isccgDee.js → smartphone-B2W81p02.js} +1 -1
  253. package/dist/socialIcons-Bwv-49EB.js +2167 -0
  254. package/dist/{sparkles-CIMfFxKv.js → sparkles-a1qkBZ8X.js} +1 -1
  255. package/dist/style.css +1 -1
  256. package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
  257. package/dist/templatical-editor.js +1448 -1189
  258. package/dist/{text-align-start-C4JFeqsq.js → text-align-start-CTuwQ5YW.js} +1 -1
  259. package/dist/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +1 -1
  260. package/dist/{trash-8ZD9pK_c.js → trash-I3D2peFQ.js} +1 -1
  261. package/dist/{triangle-alert-pq45xEHl.js → triangle-alert-CenxmLRE.js} +1 -1
  262. package/dist/{upload-DrNFmVes.js → upload-uU2cK0Ce.js} +1 -1
  263. package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
  264. package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
  265. package/dist/{useEditorCore-BcT7UI4e.js → useEditorCore-DRbMRe8F.js} +1103 -1076
  266. package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
  267. package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
  268. package/dist/{useLogicTag-D-dI8H6p.js → useLogicTag-zcI6BWIf.js} +3 -3
  269. package/dist/{useMergeTag-5wMeDBi-.js → useMergeTag-C-iBLlp0.js} +5 -5
  270. package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
  271. package/dist/{useScrollToBlock-Do3suaqp.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
  272. package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
  273. package/dist/{withCurrentFont-B4YnsG_2.js → withCurrentFont-D62njRLu.js} +1 -1
  274. package/dist/{x-CBFKGLB1.js → x-KFQ4S-Kz.js} +1 -1
  275. package/package.json +12 -12
  276. package/dist/BlockPreviewCanvas-CZDBSPoG.js +0 -136
  277. package/dist/CloudHeaderExtras-gXsTYoGG.js +0 -59
  278. package/dist/CollaboratorBar-BazGNMqN.js +0 -103
  279. package/dist/Toolbar-OGakTBEg.js +0 -2851
  280. package/dist/WrapperBlock-BOABSX9W.js +0 -46
  281. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +0 -138
  282. package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +0 -1
  283. package/dist/cdn/chunks/CloudHeaderExtras-DJXLTUHc.js.map +0 -1
  284. package/dist/cdn/chunks/CloudPanels-D1fPLjG8.js.map +0 -1
  285. package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js +0 -52
  286. package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js.map +0 -1
  287. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js +0 -2767
  288. package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +0 -1
  289. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +0 -48
  290. package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +0 -1
  291. package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js +0 -21
  292. package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js.map +0 -1
  293. package/dist/cdn/chunks/ca-DMoGGP9L.js.map +0 -1
  294. package/dist/cdn/chunks/cloud-Cd7ptfhL.js.map +0 -1
  295. package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +0 -1
  296. package/dist/cdn/chunks/de-DgAelLbM.js.map +0 -1
  297. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
  298. package/dist/cdn/chunks/en-BANFWZdr.js +0 -1
  299. package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
  300. package/dist/cdn/chunks/en-Dekrl7HA.js.map +0 -1
  301. package/dist/cdn/chunks/es-BaZzyidV.js.map +0 -1
  302. package/dist/cdn/chunks/fr-C5ucb1HK.js.map +0 -1
  303. package/dist/cdn/chunks/icons-C4fX9Bwy.js.map +0 -1
  304. package/dist/cdn/chunks/ja-CUgR3mV0.js.map +0 -1
  305. package/dist/cdn/chunks/nl-qrLY7hMS.js.map +0 -1
  306. package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +0 -1
  307. package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
  308. package/dist/cdn/chunks/socialIcons-DACw1wA8.js +0 -1103
  309. package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +0 -1
  310. package/dist/cdn/chunks/src-BnJlDuyB.js.map +0 -1
  311. package/dist/cdn/chunks/src-Bu0qBpbf.js +0 -616
  312. package/dist/cdn/chunks/src-Bu0qBpbf.js.map +0 -1
  313. package/dist/cdn/chunks/src-CHlVFp7r.js.map +0 -1
  314. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
  315. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
  316. package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +0 -1
  317. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
  318. package/dist/en-CC-57eC_.js +0 -1
  319. package/dist/socialIcons-BctavKBN.js +0 -1180
@@ -74,7 +74,7 @@ function ee(e) {
74
74
  repeat: !1
75
75
  };
76
76
  }
77
- function p(e) {
77
+ function te(e) {
78
78
  let t = "";
79
79
  for (let n of e) {
80
80
  let e = n.charCodeAt(0);
@@ -82,18 +82,54 @@ function p(e) {
82
82
  }
83
83
  return t;
84
84
  }
85
- function te(e) {
85
+ function ne(e) {
86
86
  let t = typeof e?.url == "string" ? e.url.trim() : "";
87
87
  if (!e || !t) return null;
88
88
  let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r && f.includes(r.y) ? r.y : "center";
89
89
  return {
90
- url: p(t),
90
+ url: te(t),
91
91
  size: n,
92
92
  position: `${i} ${a}`,
93
93
  repeat: e.repeat ? "repeat" : "no-repeat"
94
94
  };
95
95
  }
96
- var m = {
96
+ var re = [
97
+ "top",
98
+ "middle",
99
+ "bottom"
100
+ ];
101
+ function ie(e) {
102
+ let t = e.hero;
103
+ if (!t || typeof t != "object") return null;
104
+ if (e.columns !== "1") return {
105
+ applied: !1,
106
+ reason: "columns"
107
+ };
108
+ let n = ne(e.backgroundImage);
109
+ if (n === null) return {
110
+ applied: !1,
111
+ reason: "image"
112
+ };
113
+ let r = oe(e.backgroundImage), i = ae(t.height) ? Math.round(t.height) : "image";
114
+ return i === "image" && r === null ? {
115
+ applied: !1,
116
+ reason: "size"
117
+ } : {
118
+ applied: !0,
119
+ image: n,
120
+ height: i,
121
+ verticalAlign: re.includes(t.verticalAlign) ? t.verticalAlign : "middle",
122
+ aspectRatio: r
123
+ };
124
+ }
125
+ function ae(e) {
126
+ return typeof e == "number" && Number.isFinite(e) && e >= 1;
127
+ }
128
+ function oe(e) {
129
+ let t = e?.naturalWidth, n = e?.naturalHeight;
130
+ return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
131
+ }
132
+ var p = {
97
133
  facebook: {
98
134
  color: "#1877F2",
99
135
  path: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"
@@ -162,52 +198,305 @@ var m = {
162
198
  color: "#1769FF",
163
199
  path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
164
200
  }
165
- }, h = {
201
+ }, m = {
166
202
  dark: "#1f1f1f",
167
203
  light: "#ffffff"
168
204
  };
169
- function g(e) {
205
+ function h(e) {
170
206
  return e === "dark" || e === "light" ? e : void 0;
171
207
  }
172
- function ne(e, t) {
173
- let n = g(t);
208
+ function se(e, t) {
209
+ let n = h(t);
174
210
  return {
175
- fill: n ? h[n] : m[e].color,
176
- onFill: n === "light" ? h.dark : "#ffffff"
211
+ fill: n ? m[n] : p[e].color,
212
+ onFill: n === "light" ? m.dark : "#ffffff"
177
213
  };
178
214
  }
179
- function re(e, t) {
180
- if (g(t) === "dark" && (e === "plain" || e === "outlined")) return {
181
- color: h.light,
215
+ function ce(e, t) {
216
+ if (h(t) === "dark" && (e === "plain" || e === "outlined")) return {
217
+ color: m.light,
182
218
  opacity: .6,
183
219
  width: 1.4
184
220
  };
185
221
  }
186
- function ie(e) {
222
+ function le(e) {
187
223
  return e === "plain" ? .84 : .6;
188
224
  }
189
- function _(e) {
225
+ function g(e) {
226
+ let t = [];
227
+ return JSON.parse(JSON.stringify(e, function(e, n) {
228
+ if (typeof n != "object" || !n) return n;
229
+ for (; t.length > 0 && t[t.length - 1] !== this;) t.pop();
230
+ if (!t.includes(n)) return t.push(n), n;
231
+ }));
232
+ }
233
+ function ue(e) {
234
+ return typeof e == "object" && !!e && !Array.isArray(e);
235
+ }
236
+ function _(e, t) {
237
+ if (e === t) return !0;
238
+ if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => _(e, t[n]));
239
+ if (ue(e)) {
240
+ if (!ue(t)) return !1;
241
+ let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
242
+ for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !_(e[r], t[r])) return !1;
243
+ return !0;
244
+ }
245
+ return !1;
246
+ }
247
+ var de = class extends Error {
248
+ code;
249
+ opIndex;
250
+ blockId;
251
+ constructor(e, t, n, r) {
252
+ super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
253
+ }
254
+ };
255
+ function fe(e) {
256
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
257
+ }
258
+ function pe(e, t, n = {}) {
259
+ let r = g(e);
260
+ return me(r, t, n), r;
261
+ }
262
+ function me(e, t, n = {}) {
263
+ let r = {
264
+ locks: n.locks ?? [],
265
+ session: n.session ?? null
266
+ };
267
+ t.forEach((t, n) => xe(e, t, n, r));
268
+ }
269
+ var he = /* @__PURE__ */ new Set([
270
+ "id",
271
+ "type",
272
+ "children"
273
+ ]), ge = /* @__PURE__ */ new Set();
274
+ function v(e, t, n, r) {
275
+ throw new de(e, t, n, r);
276
+ }
277
+ function y(e) {
278
+ return typeof e == "object" && !!e && !Array.isArray(e);
279
+ }
280
+ function b(e) {
190
281
  return e.type === "section";
191
282
  }
192
- function ae(e) {
283
+ function _e(e) {
284
+ return Array.isArray(e.blocks) ? e.blocks : [];
285
+ }
286
+ function ve(e) {
287
+ let t = e.children;
288
+ return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
289
+ }
290
+ function x(e, t) {
291
+ let n = _e(e);
292
+ for (let e = 0; e < n.length; e++) {
293
+ let r = n[e];
294
+ if (!y(r)) continue;
295
+ if (r.id === t) return {
296
+ block: r,
297
+ list: n,
298
+ index: e,
299
+ parent: null
300
+ };
301
+ if (!b(r) || typeof r.id != "string") continue;
302
+ let i = r.children;
303
+ if (Array.isArray(i)) for (let e = 0; e < i.length; e++) {
304
+ let n = i[e];
305
+ if (Array.isArray(n)) for (let i = 0; i < n.length; i++) {
306
+ let a = n[i];
307
+ if (y(a) && a.id === t) return {
308
+ block: a,
309
+ list: n,
310
+ index: i,
311
+ parent: {
312
+ sectionId: r.id,
313
+ column: e
314
+ }
315
+ };
316
+ }
317
+ }
318
+ }
319
+ return null;
320
+ }
321
+ function S(e) {
322
+ let t = typeof e.id == "string" ? [e.id] : [];
323
+ if (b(e)) for (let n of ve(e)) t.push(...ye(n));
324
+ return t;
325
+ }
326
+ function ye(e) {
327
+ return e.flatMap((e) => y(e) ? S(e) : []);
328
+ }
329
+ function C(e, t) {
330
+ return typeof e.blockId != "string" || e.blockId === "" ? v("invalid_operation", t, "blockId must be a block id.") : e.blockId;
331
+ }
332
+ function w(e, t) {
333
+ let n = e.parent;
334
+ return n === null ? null : y(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
335
+ sectionId: n.sectionId,
336
+ column: n.column
337
+ } : v("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
338
+ }
339
+ function T(e, t) {
340
+ let n = e.after;
341
+ return n === null ? null : typeof n == "string" && n !== "" ? n : v("invalid_operation", t, "after must be null or a block id.");
342
+ }
343
+ function E(e, t) {
344
+ let n = e.expect;
345
+ return n == null ? null : y(n) ? n : v("invalid_operation", t, "expect must be an object.");
346
+ }
347
+ function D(e, t, n) {
348
+ let r = e.set ?? null, i = e.unset ?? [];
349
+ (r !== null && !y(r) || !Array.isArray(i) || !i.every((e) => typeof e == "string")) && v("invalid_operation", t, "set must be an object and unset a list of keys.");
350
+ let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
351
+ o.length === 0 && i.length === 0 && v("invalid_operation", t, "Set or unset at least one key.");
352
+ for (let e of [...o, ...i]) n.has(e) && v("invalid_operation", t, `"${e}" can't be set or unset.`);
353
+ let s = i.find((e) => o.includes(e));
354
+ return s !== void 0 && v("invalid_operation", t, `"${s}" is both set and unset.`), {
355
+ set: Object.fromEntries(o.map((e) => [e, a[e]])),
356
+ unset: i
357
+ };
358
+ }
359
+ function O(e, t, n) {
360
+ if ((!y(e) || typeof e.id != "string" || e.id === "" || typeof e.type != "string") && v("invalid_operation", t, "A block needs a non-empty string id and a string type."), !b(e)) return;
361
+ n && v("invalid_operation", t, "Sections can only be placed at the top level.");
362
+ let r = e.children;
363
+ (!Array.isArray(r) || !r.every((e) => Array.isArray(e))) && v("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
364
+ for (let e of r) for (let n of e) O(n, t, !0);
365
+ }
366
+ function k(e, t) {
367
+ return e.session === null || t.sessionId !== e.session;
368
+ }
369
+ function A(e, t, n) {
370
+ let r = e.locks.find((n) => t.includes(n.blockId) && k(e, n));
371
+ r && v("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
372
+ }
373
+ function j(e, t, n, r) {
374
+ for (let [i, a] of Object.entries(t)) a !== void 0 && (_(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || v("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
375
+ }
376
+ function M(e, t, n) {
377
+ if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
378
+ let r = x(e, t.sectionId);
379
+ if (!r) return v("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
380
+ if (!b(r.block)) return v("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
381
+ let i = r.block.children;
382
+ return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? v("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
383
+ }
384
+ function N(e, t, n) {
385
+ if (t === null) return 0;
386
+ let r = e.findIndex((e) => y(e) && e.id === t);
387
+ return r === -1 ? v("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
388
+ }
389
+ function be(e, t, n, r) {
390
+ let i = fe(t), a = Array.isArray(e.children) ? e.children : [];
391
+ for (let e = i; e < a.length; e++) {
392
+ let t = a[e];
393
+ Array.isArray(t) && t.length > 0 && v("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
394
+ }
395
+ let o = a.slice(0, i);
396
+ for (; o.length < i;) o.push([]);
397
+ e.children = o;
398
+ }
399
+ function P(e, t, n) {
400
+ for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
401
+ value: g(r),
402
+ writable: !0,
403
+ enumerable: !0,
404
+ configurable: !0
405
+ }) : e[n] = g(r);
406
+ for (let t of n) delete e[t];
407
+ }
408
+ function xe(e, t, n, r) {
409
+ let i = t;
410
+ switch ((!y(i) || typeof i.op != "string") && v("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
411
+ case "addBlock": return Se(e, i, n);
412
+ case "moveBlock": return Ce(e, i, n, r);
413
+ case "deleteBlock": return we(e, i, n, r);
414
+ case "updateBlock": return Te(e, i, n, r);
415
+ case "updateSettings": return Ee(e, i, n);
416
+ case "setContent": return De(e, i, n, r);
417
+ default: v("invalid_operation", n, `Unknown operation "${i.op}".`);
418
+ }
419
+ }
420
+ function Se(e, t, n) {
421
+ let r = w(t, n), i = T(t, n), a = t.block;
422
+ O(a, n, r !== null);
423
+ let o = new Set(ye(_e(e))), s = /* @__PURE__ */ new Set();
424
+ for (let e of S(a)) (o.has(e) || s.has(e)) && v("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
425
+ let c = M(e, r, n);
426
+ c.splice(N(c, i, n), 0, g(a));
427
+ }
428
+ function Ce(e, t, n, r) {
429
+ let i = C(t, n), a = w(t, n), o = T(t, n), s = E(t, n), c = x(e, i);
430
+ if (!c) return v("block_missing", n, `No block with id "${i}".`, i);
431
+ if (A(r, S(c.block), n), s) {
432
+ let e = c.index > 0 ? c.list[c.index - 1] : null, t = y(e) ? e.id ?? null : null;
433
+ (!_(c.parent, s.parent ?? null) || !_(t, s.after ?? null)) && v("precondition_failed", n, `Block "${i}" has moved since.`, i);
434
+ }
435
+ b(c.block) && a !== null && v("invalid_operation", n, "Sections can only be placed at the top level."), o === i && v("invalid_operation", n, "A block can't be placed after itself.");
436
+ let l = M(e, a, n);
437
+ c.list.splice(c.index, 1), l.splice(N(l, o, n), 0, c.block);
438
+ }
439
+ function we(e, t, n, r) {
440
+ let i = C(t, n), a = E(t, n), o = x(e, i);
441
+ if (!o) return v("block_missing", n, `No block with id "${i}".`, i);
442
+ A(r, S(o.block), n), a && !_(o.block, a.block ?? null) && v("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
443
+ }
444
+ function Te(e, t, n, r) {
445
+ let i = C(t, n), { set: a, unset: o } = D(t, n, he), s = E(t, n), c = x(e, i);
446
+ if (!c) return v("block_missing", n, `No block with id "${i}".`, i);
447
+ let l = c.block, u = b(l);
448
+ u && o.includes("columns") && v("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), A(r, [i], n), s && j(l, s, n, i), u && Object.hasOwn(a, "columns") && be(l, a.columns, n, i), P(l, a, o);
449
+ }
450
+ function Ee(e, t, n) {
451
+ let { set: r, unset: i } = D(t, n, ge), a = E(t, n);
452
+ y(e.settings) || (e.settings = {});
453
+ let o = e.settings;
454
+ a && j(o, a, n), P(o, r, i);
455
+ }
456
+ function De(e, t, n, r) {
457
+ let i = t.content;
458
+ if (!y(i) || !Array.isArray(i.blocks) || !y(i.settings)) return v("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
459
+ let a = r.locks.find((e) => k(r, e));
460
+ a && v("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = g(i.blocks), e.settings = g(i.settings);
461
+ }
462
+ var Oe = class extends Error {
463
+ statusCode;
464
+ code;
465
+ constructor(e, t, n) {
466
+ super(e), this.statusCode = t, this.code = n, this.name = "SdkError";
467
+ }
468
+ get isNotFound() {
469
+ return this.statusCode === 404;
470
+ }
471
+ get isUnauthorized() {
472
+ return this.statusCode === 401;
473
+ }
474
+ get isServerError() {
475
+ return this.statusCode !== void 0 && this.statusCode >= 500;
476
+ }
477
+ };
478
+ function F(e) {
479
+ return e.type === "section";
480
+ }
481
+ function ke(e) {
193
482
  return e.type === "custom";
194
483
  }
195
- function v(e) {
484
+ function I(e) {
196
485
  return e.type === "slot";
197
486
  }
198
- function y(e) {
487
+ function L(e) {
199
488
  return e.type === "wrapper";
200
489
  }
201
- var b = {
490
+ var R = {
202
491
  content: "<p>Enter your title</p>",
203
492
  level: 2,
204
493
  textAlign: "left"
205
- }, x = { content: "<p>Enter your text here</p>" }, S = {
494
+ }, Ae = { content: "<p>Enter your text here</p>" }, je = {
206
495
  src: "",
207
496
  alt: "",
208
497
  width: "full",
209
498
  align: "center"
210
- }, oe = {
499
+ }, Me = {
211
500
  text: "Click Here",
212
501
  url: "",
213
502
  backgroundColor: "#333333",
@@ -221,36 +510,36 @@ var b = {
221
510
  left: 24
222
511
  },
223
512
  align: "center"
224
- }, se = {
513
+ }, Ne = {
225
514
  lineStyle: "solid",
226
515
  color: "#e0e0e0",
227
516
  thickness: 1,
228
517
  width: "full"
229
- }, ce = { columns: "1" }, le = {
518
+ }, Pe = { columns: "1" }, Fe = {
230
519
  url: "",
231
520
  thumbnailUrl: "",
232
521
  alt: "Video",
233
522
  width: "full",
234
523
  align: "center"
235
- }, ue = {
524
+ }, Ie = {
236
525
  iconStyle: "solid",
237
526
  iconSize: "medium",
238
527
  spacing: 10,
239
528
  align: "center"
240
- }, de = { height: 24 }, fe = { content: "" }, pe = {
529
+ }, Le = { height: 24 }, Re = { content: "" }, ze = {
241
530
  fontSize: 15,
242
531
  textAlign: "center",
243
532
  separator: "|",
244
533
  separatorColor: "#e0e0e0",
245
534
  spacing: 10
246
- }, me = {
535
+ }, Be = {
247
536
  hasHeaderRow: !0,
248
537
  borderColor: "#e0e0e0",
249
538
  borderWidth: 1,
250
539
  cellPadding: 8,
251
540
  fontSize: 15,
252
541
  textAlign: "left"
253
- }, he = {
542
+ }, Ve = {
254
543
  targetDate: "",
255
544
  timezone: "UTC",
256
545
  showDays: !0,
@@ -270,21 +559,21 @@ var b = {
270
559
  expiredMessage: "This offer has expired",
271
560
  expiredImageUrl: "",
272
561
  hideOnExpiry: !1
273
- }, ge = {
274
- title: b,
275
- paragraph: x,
276
- image: S,
277
- button: oe,
278
- divider: se,
279
- section: ce,
280
- video: le,
281
- social: ue,
282
- spacer: de,
283
- html: fe,
284
- menu: pe,
285
- table: me,
286
- countdown: he
287
- }, C = {
562
+ }, He = {
563
+ title: R,
564
+ paragraph: Ae,
565
+ image: je,
566
+ button: Me,
567
+ divider: Ne,
568
+ section: Pe,
569
+ video: Fe,
570
+ social: Ie,
571
+ spacer: Le,
572
+ html: Re,
573
+ menu: ze,
574
+ table: Be,
575
+ countdown: Ve
576
+ }, Ue = {
288
577
  width: 600,
289
578
  backgroundColor: "#ffffff",
290
579
  textColor: "#1a1a1a",
@@ -292,28 +581,28 @@ var b = {
292
581
  fontFamily: "Arial",
293
582
  locale: "en"
294
583
  };
295
- function w(e) {
584
+ function We(e) {
296
585
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
297
586
  }
298
- function T(e, t) {
587
+ function z(e, t) {
299
588
  let n = { ...e };
300
589
  for (let r of Object.keys(t)) {
301
590
  let i = e[r], a = t[r];
302
- a !== void 0 && (n[r] = w(i) && w(a) ? T(i, a) : a);
591
+ a !== void 0 && (n[r] = We(i) && We(a) ? z(i, a) : a);
303
592
  }
304
593
  return n;
305
594
  }
306
- function _e(e = "Arial", t) {
595
+ function Ge(e = "Arial", t) {
307
596
  return {
308
597
  blocks: [],
309
598
  settings: {
310
- ...C,
599
+ ...Ue,
311
600
  fontFamily: e,
312
601
  ...t
313
602
  }
314
603
  };
315
604
  }
316
- var ve = [
605
+ var Ke = [
317
606
  "ar",
318
607
  "he",
319
608
  "iw",
@@ -327,32 +616,24 @@ var ve = [
327
616
  "ckb",
328
617
  "ks"
329
618
  ];
330
- function ye(e) {
619
+ function qe(e) {
331
620
  let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
332
- return !!t && ve.includes(t);
333
- }
334
- function be(e) {
335
- return e.direction === "ltr" || e.direction === "rtl" ? e.direction : ye(e.locale) ? "rtl" : "ltr";
621
+ return !!t && Ke.includes(t);
336
622
  }
337
- function E(e) {
338
- let t = [];
339
- return JSON.parse(JSON.stringify(e, function(e, n) {
340
- if (typeof n != "object" || !n) return n;
341
- for (; t.length > 0 && t[t.length - 1] !== this;) t.pop();
342
- if (!t.includes(n)) return t.push(n), n;
343
- }));
623
+ function Je(e) {
624
+ return e.direction === "ltr" || e.direction === "rtl" ? e.direction : qe(e.locale) ? "rtl" : "ltr";
344
625
  }
345
- function D(e, t) {
346
- let n = E(e);
347
- return !t || Object.keys(t).length === 0 ? n : T(n, t);
626
+ function B(e, t) {
627
+ let n = g(e);
628
+ return !t || Object.keys(t).length === 0 ? n : z(n, t);
348
629
  }
349
- function O(e) {
350
- return e === void 0 ? void 0 : E(e);
630
+ function V(e) {
631
+ return e === void 0 ? void 0 : g(e);
351
632
  }
352
- function k() {
633
+ function H() {
353
634
  return crypto.randomUUID();
354
635
  }
355
- function xe(e = 0) {
636
+ function Ye(e = 0) {
356
637
  return {
357
638
  top: e,
358
639
  right: e,
@@ -360,135 +641,135 @@ function xe(e = 0) {
360
641
  left: e
361
642
  };
362
643
  }
363
- function A(e = 10) {
364
- return { padding: xe(e) };
644
+ function U(e = 10) {
645
+ return { padding: Ye(e) };
365
646
  }
366
- function j(e = {}) {
367
- return D({
368
- id: k(),
647
+ function Xe(e = {}) {
648
+ return B({
649
+ id: H(),
369
650
  type: "title",
370
- ...b,
371
- styles: A()
651
+ ...R,
652
+ styles: U()
372
653
  }, e);
373
654
  }
374
- function M(e = {}) {
375
- return D({
376
- id: k(),
655
+ function Ze(e = {}) {
656
+ return B({
657
+ id: H(),
377
658
  type: "paragraph",
378
- ...x,
379
- styles: A()
659
+ ...Ae,
660
+ styles: U()
380
661
  }, e);
381
662
  }
382
- function N(e = {}) {
383
- return D({
384
- id: k(),
663
+ function Qe(e = {}) {
664
+ return B({
665
+ id: H(),
385
666
  type: "image",
386
- ...S,
387
- styles: A()
667
+ ...je,
668
+ styles: U()
388
669
  }, e);
389
670
  }
390
- function P(e = {}) {
391
- return D({
392
- id: k(),
671
+ function $e(e = {}) {
672
+ return B({
673
+ id: H(),
393
674
  type: "button",
394
- ...oe,
395
- styles: A()
675
+ ...Me,
676
+ styles: U()
396
677
  }, e);
397
678
  }
398
- function F(e = {}) {
399
- return D({
400
- id: k(),
679
+ function W(e = {}) {
680
+ return B({
681
+ id: H(),
401
682
  type: "divider",
402
- ...se,
403
- styles: A(20)
683
+ ...Ne,
684
+ styles: U(20)
404
685
  }, e);
405
686
  }
406
- function I(e = {}) {
407
- return D({
408
- id: k(),
687
+ function et(e = {}) {
688
+ return B({
689
+ id: H(),
409
690
  type: "section",
410
- ...ce,
691
+ ...Pe,
411
692
  children: [[]],
412
- styles: A(20)
693
+ styles: U(20)
413
694
  }, e);
414
695
  }
415
- function L(e = {}) {
416
- return D({
417
- id: k(),
696
+ function tt(e = {}) {
697
+ return B({
698
+ id: H(),
418
699
  type: "video",
419
- ...le,
420
- styles: A()
700
+ ...Fe,
701
+ styles: U()
421
702
  }, e);
422
703
  }
423
- function R(e = {}) {
424
- return D({
425
- id: k(),
704
+ function nt(e = {}) {
705
+ return B({
706
+ id: H(),
426
707
  type: "social",
427
708
  icons: [],
428
- ...ue,
429
- styles: A()
709
+ ...Ie,
710
+ styles: U()
430
711
  }, e);
431
712
  }
432
- function z(e = {}) {
433
- return D({
434
- id: k(),
713
+ function rt(e = {}) {
714
+ return B({
715
+ id: H(),
435
716
  type: "spacer",
436
- ...de,
437
- styles: A(0)
717
+ ...Le,
718
+ styles: U(0)
438
719
  }, e);
439
720
  }
440
- function B(e = {}) {
441
- return D({
442
- id: k(),
721
+ function it(e = {}) {
722
+ return B({
723
+ id: H(),
443
724
  type: "html",
444
- ...fe,
445
- styles: A()
725
+ ...Re,
726
+ styles: U()
446
727
  }, e);
447
728
  }
448
- function V(e = {}) {
449
- return D({
450
- id: k(),
729
+ function at(e = {}) {
730
+ return B({
731
+ id: H(),
451
732
  type: "menu",
452
733
  items: [],
453
- ...pe,
454
- styles: A()
734
+ ...ze,
735
+ styles: U()
455
736
  }, e);
456
737
  }
457
- function Se(e, t) {
738
+ function ot(e, t) {
458
739
  return Array.from({ length: t }, () => ({
459
- id: k(),
740
+ id: H(),
460
741
  cells: Array.from({ length: e }, () => ({
461
- id: k(),
742
+ id: H(),
462
743
  content: ""
463
744
  }))
464
745
  }));
465
746
  }
466
- function H(e = {}) {
467
- return D({
468
- id: k(),
747
+ function st(e = {}) {
748
+ return B({
749
+ id: H(),
469
750
  type: "table",
470
- rows: Se(3, 3),
471
- ...me,
472
- styles: A()
751
+ rows: ot(3, 3),
752
+ ...Be,
753
+ styles: U()
473
754
  }, e);
474
755
  }
475
- function Ce(e = {}) {
476
- return D({
477
- id: k(),
756
+ function ct(e = {}) {
757
+ return B({
758
+ id: H(),
478
759
  type: "countdown",
479
- ...he,
480
- styles: A()
760
+ ...Ve,
761
+ styles: U()
481
762
  }, e);
482
763
  }
483
- function we(e) {
764
+ function lt(e) {
484
765
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
485
766
  }
486
- function Te(e) {
767
+ function ut(e) {
487
768
  let t = {};
488
- for (let n of e.fields) t[n.key] = O(we(n));
489
- let n = D(A(), O(e.defaultStyles));
769
+ for (let n of e.fields) t[n.key] = V(lt(n));
770
+ let n = B(U(), V(e.defaultStyles));
490
771
  return {
491
- id: k(),
772
+ id: H(),
492
773
  type: "custom",
493
774
  customType: e.type,
494
775
  fieldValues: t,
@@ -496,144 +777,144 @@ function Te(e) {
496
777
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
497
778
  };
498
779
  }
499
- function Ee() {
780
+ function dt() {
500
781
  return {
501
- id: k(),
782
+ id: H(),
502
783
  type: "slot",
503
- styles: A(0)
784
+ styles: U(0)
504
785
  };
505
786
  }
506
- function De(e = {}) {
507
- return D({
508
- id: k(),
787
+ function ft(e = {}) {
788
+ return B({
789
+ id: H(),
509
790
  type: "wrapper",
510
791
  children: [],
511
- styles: A(0)
792
+ styles: U(0)
512
793
  }, e);
513
794
  }
514
- function Oe(e, t) {
795
+ function pt(e, t) {
515
796
  switch (e) {
516
- case "section": return I(O(t?.section));
517
- case "title": return j(O(t?.title));
518
- case "paragraph": return M(O(t?.paragraph));
519
- case "image": return N(O(t?.image));
520
- case "button": return P(O(t?.button));
521
- case "divider": return F(O(t?.divider));
522
- case "video": return L(O(t?.video));
523
- case "social": return R(O(t?.social));
524
- case "spacer": return z(O(t?.spacer));
525
- case "html": return B(O(t?.html));
526
- case "menu": return V(O(t?.menu));
527
- case "table": return H(O(t?.table));
528
- case "countdown": return Ce(O(t?.countdown));
797
+ case "section": return et(V(t?.section));
798
+ case "title": return Xe(V(t?.title));
799
+ case "paragraph": return Ze(V(t?.paragraph));
800
+ case "image": return Qe(V(t?.image));
801
+ case "button": return $e(V(t?.button));
802
+ case "divider": return W(V(t?.divider));
803
+ case "video": return tt(V(t?.video));
804
+ case "social": return nt(V(t?.social));
805
+ case "spacer": return rt(V(t?.spacer));
806
+ case "html": return it(V(t?.html));
807
+ case "menu": return at(V(t?.menu));
808
+ case "table": return st(V(t?.table));
809
+ case "countdown": return ct(V(t?.countdown));
529
810
  case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
530
811
  case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
531
812
  default: throw Error(`Unknown block type: ${e}`);
532
813
  }
533
814
  }
534
- function U(e) {
815
+ function G(e) {
535
816
  let t = JSON.parse(JSON.stringify(e));
536
- if (t.id = k(), t.type === "table") for (let e of t.rows) {
537
- e.id = k();
538
- for (let t of e.cells) t.id = k();
817
+ if (t.id = H(), t.type === "table") for (let e of t.rows) {
818
+ e.id = H();
819
+ for (let t of e.cells) t.id = H();
539
820
  }
540
- if (t.type === "menu") for (let e of t.items) e.id = k();
541
- if (t.type === "social") for (let e of t.icons) e.id = k();
542
- return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => U(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => U(e))), t;
821
+ if (t.type === "menu") for (let e of t.items) e.id = H();
822
+ if (t.type === "social") for (let e of t.icons) e.id = H();
823
+ return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => G(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => G(e))), t;
543
824
  }
544
- var W = "[Templatical] layout: must contain exactly one slot block", ke = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Ae = "[Templatical] layout: a wrapper cannot contain a wrapper", je = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Me = "[Templatical] slot is not a valid content block", Ne = "[Templatical] wrapper is not a valid content block";
545
- function G(e, t, n = null, r = !1) {
546
- for (let i of e) if (t(i, n, r), _(i)) for (let e of i.children) G(e, t, i, !0);
547
- else y(i) && G(i.children, t, i, r);
825
+ var mt = "[Templatical] layout: must contain exactly one slot block", ht = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", gt = "[Templatical] layout: a wrapper cannot contain a wrapper", _t = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", vt = "[Templatical] slot is not a valid content block", yt = "[Templatical] wrapper is not a valid content block";
826
+ function K(e, t, n = null, r = !1) {
827
+ for (let i of e) if (t(i, n, r), F(i)) for (let e of i.children) K(e, t, i, !0);
828
+ else L(i) && K(i.children, t, i, r);
548
829
  }
549
- function Pe(e) {
830
+ function bt(e) {
550
831
  let t = 0;
551
- if (G(e.blocks, (e, n, r) => {
552
- if (v(e) && (t += 1, r)) throw Error(ke);
553
- if (y(e)) {
554
- if (r) throw Error(ke);
555
- if (e.children.some(y)) throw Error(Ae);
832
+ if (K(e.blocks, (e, n, r) => {
833
+ if (I(e) && (t += 1, r)) throw Error(ht);
834
+ if (L(e)) {
835
+ if (r) throw Error(ht);
836
+ if (e.children.some(L)) throw Error(gt);
556
837
  }
557
- }), t !== 1) throw Error(W);
838
+ }), t !== 1) throw Error(mt);
558
839
  }
559
- function Fe(e) {
560
- G(e.blocks, (e) => {
561
- if (v(e)) throw Error(Me);
840
+ function xt(e) {
841
+ K(e.blocks, (e) => {
842
+ if (I(e)) throw Error(vt);
562
843
  });
563
844
  }
564
- function Ie(e) {
565
- G(e.blocks, (e) => {
566
- if (y(e)) throw Error(Ne);
845
+ function St(e) {
846
+ K(e.blocks, (e) => {
847
+ if (L(e)) throw Error(yt);
567
848
  });
568
849
  }
569
- function Le(e) {
850
+ function Ct(e) {
570
851
  let t = !1;
571
- return G(e.blocks, (e, n) => {
572
- v(e) && n !== null && y(n) && (t = !0);
852
+ return K(e.blocks, (e, n) => {
853
+ I(e) && n !== null && L(n) && (t = !0);
573
854
  }), t;
574
855
  }
575
- function Re(e) {
576
- if (v(e)) return e;
577
- if (y(e)) {
578
- let t = U({
856
+ function wt(e) {
857
+ if (I(e)) return e;
858
+ if (L(e)) {
859
+ let t = G({
579
860
  ...e,
580
861
  children: []
581
862
  });
582
- return t.children = e.children.map(Re), t;
863
+ return t.children = e.children.map(wt), t;
583
864
  }
584
- return U(e);
865
+ return G(e);
585
866
  }
586
- function ze(e) {
867
+ function Tt(e) {
587
868
  for (let t = 0; t < e.length; t++) {
588
869
  let n = e[t];
589
- if (v(n)) return {
870
+ if (I(n)) return {
590
871
  parent: e,
591
872
  index: t
592
873
  };
593
- if (y(n)) {
594
- let e = ze(n.children);
874
+ if (L(n)) {
875
+ let e = Tt(n.children);
595
876
  if (e) return e;
596
877
  }
597
878
  }
598
879
  return null;
599
880
  }
600
- function Be(e) {
601
- for (let t of e) if (_(t)) {
881
+ function Et(e) {
882
+ for (let t of e) if (F(t)) {
602
883
  if (t.wrapper) return !0;
603
- for (let e of t.children) if (Be(e)) return !0;
884
+ for (let e of t.children) if (Et(e)) return !0;
604
885
  }
605
886
  return !1;
606
887
  }
607
- function Ve(e, t) {
608
- if (Pe(e), Fe(t), Ie(t), Le(e) && Be(t.blocks)) throw Error(je);
609
- let n = e.blocks.map(Re), r = ze(n);
610
- if (!r) throw Error(W);
611
- return r.parent.splice(r.index, 1, ...E(t.blocks)), {
888
+ function Dt(e, t) {
889
+ if (bt(e), xt(t), St(t), Ct(e) && Et(t.blocks)) throw Error(_t);
890
+ let n = e.blocks.map(wt), r = Tt(n);
891
+ if (!r) throw Error(mt);
892
+ return r.parent.splice(r.index, 1, ...g(t.blocks)), {
612
893
  blocks: n,
613
894
  settings: {
614
- ...E(t.settings),
895
+ ...g(t.settings),
615
896
  backgroundColor: e.settings.backgroundColor
616
897
  }
617
898
  };
618
899
  }
619
- var He = /* @__PURE__ */ new Set(["\"", "'"]);
620
- function Ue(e, t) {
900
+ var Ot = /* @__PURE__ */ new Set(["\"", "'"]);
901
+ function kt(e, t) {
621
902
  let n = null;
622
903
  for (let r = t; r < e.length; r++) {
623
904
  let t = e[r];
624
905
  if (n !== null) t === n && (n = null);
625
- else if (He.has(t)) n = t;
906
+ else if (Ot.has(t)) n = t;
626
907
  else if (t === ">") return r;
627
908
  }
628
909
  return -1;
629
910
  }
630
- function We(e) {
911
+ function At(e) {
631
912
  return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
632
913
  }
633
- function K(e) {
914
+ function q(e) {
634
915
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
635
916
  }
636
- var Ge = {
917
+ var jt = {
637
918
  amp: "&",
638
919
  lt: "<",
639
920
  gt: ">",
@@ -641,52 +922,52 @@ var Ge = {
641
922
  apos: "'",
642
923
  nbsp: "\xA0"
643
924
  };
644
- function Ke(e) {
925
+ function Mt(e) {
645
926
  return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
646
927
  if (t[0] === "#") {
647
928
  let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
648
929
  return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
649
930
  }
650
- return Ge[t.toLowerCase()] ?? e;
931
+ return jt[t.toLowerCase()] ?? e;
651
932
  }) : e;
652
933
  }
653
- function qe(e, t) {
934
+ function Nt(e, t) {
654
935
  let n = t.toLowerCase(), r = 0;
655
936
  for (; r < e.length;) {
656
- for (; r < e.length && (K(e[r]) || e[r] === "/");) r++;
937
+ for (; r < e.length && (q(e[r]) || e[r] === "/");) r++;
657
938
  if (r >= e.length) break;
658
939
  let t = r;
659
- for (; r < e.length && We(e[r]);) r++;
940
+ for (; r < e.length && At(e[r]);) r++;
660
941
  let i = e.substring(t, r).toLowerCase();
661
942
  if (i === "") {
662
943
  r++;
663
944
  continue;
664
945
  }
665
- for (; r < e.length && K(e[r]);) r++;
946
+ for (; r < e.length && q(e[r]);) r++;
666
947
  if (e[r] !== "=") continue;
667
- for (r++; r < e.length && K(e[r]);) r++;
948
+ for (r++; r < e.length && q(e[r]);) r++;
668
949
  let a = e[r];
669
- if (He.has(a)) {
950
+ if (Ot.has(a)) {
670
951
  let t = r + 1, o = e.indexOf(a, t);
671
952
  if (o === -1) return null;
672
- if (i === n) return Ke(e.substring(t, o));
953
+ if (i === n) return Mt(e.substring(t, o));
673
954
  r = o + 1;
674
955
  continue;
675
956
  }
676
957
  let o = r;
677
- for (; r < e.length && !K(e[r]) && e[r] !== ">";) r++;
678
- if (i === n) return Ke(e.substring(o, r));
958
+ for (; r < e.length && !q(e[r]) && e[r] !== ">";) r++;
959
+ if (i === n) return Mt(e.substring(o, r));
679
960
  }
680
961
  return null;
681
962
  }
682
- var Je = /<\/?p\b[^<>]*>/gi, Ye = /<p\b([^<>]*)>\s*<\/p>/gi;
683
- function Xe(e) {
684
- return e.replace(Je, "").trim() === "";
963
+ var Pt = /<\/?p\b[^<>]*>/gi, Ft = /<p\b([^<>]*)>\s*<\/p>/gi;
964
+ function It(e) {
965
+ return e.replace(Pt, "").trim() === "";
685
966
  }
686
- function Ze(e) {
687
- return Xe(e) ? e : e.replace(Ye, "<p$1>&nbsp;</p>");
967
+ function Lt(e) {
968
+ return It(e) ? e : e.replace(Ft, "<p$1>&nbsp;</p>");
688
969
  }
689
- var Qe = {
970
+ var Rt = {
690
971
  arial: "Arial, sans-serif",
691
972
  helvetica: "Helvetica, sans-serif",
692
973
  georgia: "Georgia, serif",
@@ -695,13 +976,13 @@ var Qe = {
695
976
  "trebuchet ms": "'Trebuchet MS', sans-serif",
696
977
  "courier new": "'Courier New', monospace",
697
978
  tahoma: "Tahoma, sans-serif"
698
- }, $e = /* @__PURE__ */ new Set([
979
+ }, zt = /* @__PURE__ */ new Set([
699
980
  "inherit",
700
981
  "initial",
701
982
  "unset",
702
983
  "revert",
703
984
  "revert-layer"
704
- ]), et = /* @__PURE__ */ new Set([
985
+ ]), Bt = /* @__PURE__ */ new Set([
705
986
  "serif",
706
987
  "sans-serif",
707
988
  "monospace",
@@ -716,14 +997,14 @@ var Qe = {
716
997
  "math",
717
998
  "fangsong"
718
999
  ]);
719
- function q(e) {
1000
+ function Vt(e) {
720
1001
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
721
1002
  }
722
1003
  function J(e) {
723
1004
  if (typeof e != "string") return [];
724
1005
  let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
725
1006
  for (;;) {
726
- for (; r < t.length && q(t[r]);) r++;
1007
+ for (; r < t.length && Vt(t[r]);) r++;
727
1008
  if (r >= t.length) return [];
728
1009
  let e = t[r];
729
1010
  if (e === "\"" || e === "'") {
@@ -740,7 +1021,7 @@ function J(e) {
740
1021
  }
741
1022
  }
742
1023
  if (!o) return [];
743
- for (; a < t.length && q(t[a]);) a++;
1024
+ for (; a < t.length && Vt(t[a]);) a++;
744
1025
  if (a < t.length && t[a] !== ",") return [];
745
1026
  n.push({
746
1027
  name: i,
@@ -748,7 +1029,7 @@ function J(e) {
748
1029
  }), r = a;
749
1030
  } else {
750
1031
  let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
751
- if (a === "" || a.includes("\"") || a.includes("'") || $e.has(a.toLowerCase())) return [];
1032
+ if (a === "" || a.includes("\"") || a.includes("'") || zt.has(a.toLowerCase())) return [];
752
1033
  n.push({
753
1034
  name: a,
754
1035
  quoted: !1
@@ -758,22 +1039,22 @@ function J(e) {
758
1039
  r++;
759
1040
  }
760
1041
  }
761
- function tt(e) {
1042
+ function Ht(e) {
762
1043
  return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
763
1044
  }
764
- function nt(e) {
765
- return !e.quoted && et.has(e.name.toLowerCase());
1045
+ function Ut(e) {
1046
+ return !e.quoted && Bt.has(e.name.toLowerCase());
766
1047
  }
767
- function rt(e) {
1048
+ function Wt(e) {
768
1049
  return J(e)[0]?.name ?? "";
769
1050
  }
770
- function it(e, t) {
771
- let n = (e) => `${tt(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
1051
+ function Gt(e, t) {
1052
+ let n = (e) => `${Ht(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
772
1053
  if (i) return n(i);
773
1054
  let a = J(e);
774
1055
  if (a.length !== 1) return e;
775
1056
  let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
776
- return c ? n(c) : Qe[s] || (nt(o) ? e : `${tt(o.name)}, ${t.defaultFallback}`);
1057
+ return c ? n(c) : Rt[s] || (Ut(o) ? e : `${Ht(o.name)}, ${t.defaultFallback}`);
777
1058
  }
778
1059
  var Y = {
779
1060
  liquid: {
@@ -792,33 +1073,33 @@ var Y = {
792
1073
  value: /%%=.+?=%%/g,
793
1074
  logic: /%%\[\s*(\w+).*?\]%%/g
794
1075
  }
795
- }, at = {
1076
+ }, Kt = {
796
1077
  liquid: "{{",
797
1078
  handlebars: "{{",
798
1079
  mailchimp: "*|",
799
1080
  ampscript: "%%="
800
- }, ot = {
1081
+ }, qt = {
801
1082
  liquid: "}}",
802
1083
  handlebars: "}}",
803
1084
  mailchimp: "|*",
804
1085
  ampscript: "=%%"
805
1086
  };
806
- function st(e) {
807
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return at[t];
1087
+ function Jt(e) {
1088
+ for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return Kt[t];
808
1089
  return null;
809
1090
  }
810
- function ct(e) {
811
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return ot[t];
1091
+ function Yt(e) {
1092
+ for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return qt[t];
812
1093
  return null;
813
1094
  }
814
- function lt(e) {
1095
+ function Xt(e) {
815
1096
  return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
816
1097
  }
817
1098
  function X(e) {
818
1099
  let t = e.source, n = e.flags.replace("g", "");
819
1100
  return RegExp(`^${t}$`, n);
820
1101
  }
821
- function ut(e, t) {
1102
+ function Zt(e, t) {
822
1103
  let n = e?.trim() || "";
823
1104
  return !X(t.logic).test(n) && X(t.value).test(n);
824
1105
  }
@@ -826,41 +1107,41 @@ function Z(e, t) {
826
1107
  let n = t.find((t) => t.value === e);
827
1108
  return n ? n.label : e;
828
1109
  }
829
- function dt(e, t) {
1110
+ function Qt(e, t) {
830
1111
  return $(e, "data-merge-tag", (e) => Z(e, t));
831
1112
  }
832
1113
  function Q(e, t) {
833
1114
  return t.find((t) => t.value === e)?.sample;
834
1115
  }
835
- function ft(e, t) {
836
- return $(e, "data-merge-tag", (e) => ht(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
1116
+ function $t(e, t) {
1117
+ return $(e, "data-merge-tag", (e) => nn(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
837
1118
  }
838
- function pt(e) {
1119
+ function en(e) {
839
1120
  return e.some((e) => e.sample !== void 0);
840
1121
  }
841
- function mt(e, t) {
1122
+ function tn(e, t) {
842
1123
  if (!e) return e;
843
1124
  let n = e;
844
1125
  for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
845
1126
  return n;
846
1127
  }
847
- function ht(e) {
1128
+ function nn(e) {
848
1129
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
849
1130
  }
850
- function gt(e, t) {
1131
+ function rn(e, t) {
851
1132
  if (!e) return !1;
852
1133
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
853
1134
  return n.test(e) || r.test(e);
854
1135
  }
855
- function _t(e, t) {
1136
+ function an(e, t) {
856
1137
  return X(t.logic).test(e?.trim() || "");
857
1138
  }
858
- function vt(e, t) {
1139
+ function on(e, t) {
859
1140
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
860
1141
  return r && r[1] ? r[1].toUpperCase() : e;
861
1142
  }
862
- function yt(e, t) {
863
- return $(e, "data-logic-merge-tag", (e) => vt(e, t));
1143
+ function sn(e, t) {
1144
+ return $(e, "data-logic-merge-tag", (e) => on(e, t));
864
1145
  }
865
1146
  function $(e, t, n, r) {
866
1147
  let i = "", a = 0;
@@ -875,7 +1156,7 @@ function $(e, t, n, r) {
875
1156
  i += e.substring(a, o + 5), a = o + 5;
876
1157
  continue;
877
1158
  }
878
- let c = Ue(e, o + 5);
1159
+ let c = kt(e, o + 5);
879
1160
  if (c === -1) {
880
1161
  i += e.substring(a);
881
1162
  break;
@@ -885,7 +1166,7 @@ function $(e, t, n, r) {
885
1166
  i += e.substring(a);
886
1167
  break;
887
1168
  }
888
- let u = qe(e.substring(o + 5, c), t);
1169
+ let u = Nt(e.substring(o + 5, c), t);
889
1170
  if (u === null) {
890
1171
  i += e.substring(a, o + 5), a = o + 5;
891
1172
  continue;
@@ -895,25 +1176,10 @@ function $(e, t, n, r) {
895
1176
  }
896
1177
  return i;
897
1178
  }
898
- function bt(e) {
1179
+ function cn(e) {
899
1180
  if (typeof e != "object" || !e) return !1;
900
1181
  let t = e;
901
1182
  return Array.isArray(t.blocks);
902
1183
  }
903
- var xt = class extends Error {
904
- statusCode;
905
- constructor(e, t) {
906
- super(e), this.statusCode = t, this.name = "SdkError";
907
- }
908
- get isNotFound() {
909
- return this.statusCode === 404;
910
- }
911
- get isUnauthorized() {
912
- return this.statusCode === 401;
913
- }
914
- get isServerError() {
915
- return this.statusCode !== void 0 && this.statusCode >= 500;
916
- }
917
- };
918
1184
  //#endregion
919
- export { v as $, Ee as A, rt as B, _e as C, V as D, N as E, L as F, ct as G, vt as H, De as I, ae as J, st as K, T as L, z as M, H as N, M as O, j as P, _ as Q, p as R, Te as S, B as T, Z as U, k as V, Q as W, ut as X, _t as Y, bt as Z, gt as _, o as _t, ge as a, it as at, P as b, l as c, lt as ct, xt as d, ie as dt, y as et, c as f, re as ft, U as g, r as gt, Ie as h, n as ht, e as i, be as it, R as j, I as k, m as l, E as lt, Fe as m, mt, f as n, J as nt, C as o, yt as ot, Ve as p, ft as pt, pt as q, i as r, te as rt, s, dt as st, d as t, Le as tt, Y as u, ne as ut, ee as v, t as vt, F as w, Ce as x, Oe as y, Pe as yt, Ze as z };
1185
+ export { oe as $, at as A, _ as B, $e as C, r as Ct, W as D, Ge as E, bt as Et, rt as F, H as G, te as H, st as I, Z as J, fe as K, Xe as L, et as M, dt as N, it as O, nt as P, en as Q, tt as R, pt as S, n as St, ut as T, t as Tt, Lt as U, z as V, Wt as W, Yt as X, Q as Y, Jt as Z, xt as _, se as _t, He as a, I as at, rn as b, $t as bt, de as c, J as ct, Y as d, Gt as dt, ke as et, Oe as f, ie as ft, me as g, g as gt, pe as h, Xt as ht, e as i, F as it, Ze as j, Qe as k, l, ne as lt, Dt as m, Qt as mt, f as n, Zt as nt, Ue as o, L as ot, c as p, sn as pt, on as q, i as r, cn as rt, s, Ct as st, d as t, an as tt, p as u, Je as ut, St as v, le as vt, ct as w, o as wt, ee as x, tn as xt, G as y, ce as yt, ft as z };