@templatical/editor 0.48.0 → 0.50.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 (396) hide show
  1. package/README.md +4 -2
  2. package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
  3. package/dist/AiAltTextReview-DoBEudnE.js +206 -0
  4. package/dist/AiChatPanel-Bs6sES3b.js +550 -0
  5. package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
  6. package/dist/AiPanels-CfN7A-ZA.js +33 -0
  7. package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
  8. package/dist/{BlockIssueBadge-BShkuJis.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
  9. package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
  10. package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
  11. package/dist/CloudPanels-B4F5m7vy.js +168 -0
  12. package/dist/CollaborationNotices-CNuDp7Y2.js +76 -0
  13. package/dist/CollaboratorBar-BtHPiuHq.js +123 -0
  14. package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-CyCM-BvT.js} +4 -4
  15. package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
  16. package/dist/{cdn/chunks/CountdownBlock-Dasj191h.js → CountdownBlock-DR4Xm2-T.js} +24 -26
  17. package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CEIMPojJ.js} +56 -56
  18. package/dist/IssuesPanel-C8nMUccy.js +360 -0
  19. package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-B0RKQWq3.js} +2 -2
  20. package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CqfU52CO.js} +272 -267
  21. package/dist/{cdn/chunks/MediaEditModal-zXfcArr4.js → MediaEditModal-DHtkZ4OU.js} +202 -186
  22. package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-CGcOB2pR.js} +4 -4
  23. package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-YnEkorTZ.js} +26 -26
  24. package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
  25. package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
  26. package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
  27. package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-Bq_IGOLJ.js} +22 -22
  28. package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-AOM6fylS.js} +48 -48
  29. package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-C8GngfQx.js} +88 -88
  30. package/dist/{cdn/chunks/SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
  31. package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
  32. package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-BjcTiV87.js} +14 -14
  33. package/dist/TemplateSettings-BVBWpiDU.js +237 -0
  34. package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-SyhO9bn3.js} +57 -57
  35. package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-BDd2Rtav.js} +4 -4
  36. package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-pxD53y_l.js} +75 -75
  37. package/dist/ToggleSwitch-D51U9cmR.js +37 -0
  38. package/dist/Toolbar-CZSPZYbj.js +3153 -0
  39. package/dist/{TplModal-Bz4-IZ9R.js → TplModal-DCzBzicE.js} +19 -19
  40. package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
  41. package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
  42. package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-DUGF0tUJ.js} +10 -10
  43. package/dist/WrapperBlock-BO619LAb.js +45 -0
  44. package/dist/aiErrors-D5UOoYOt.js +41 -0
  45. package/dist/aiImageContext-BH4Ss1h3.js +48 -0
  46. package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
  47. package/dist/{blockTypeIcons-CEDZytqP.js → blockTypeIcons-NzaYvAI4.js} +15 -14
  48. package/dist/bundle-stats.json +8 -8
  49. package/dist/{cdn/chunks/ca-CbNzJM3I.js → ca-C7mTzW1r.js} +147 -8
  50. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
  51. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
  52. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
  53. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
  54. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
  55. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
  56. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
  57. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
  58. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
  59. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
  60. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
  61. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
  62. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
  63. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-D0--EQkP.js} +39 -39
  65. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
  66. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
  67. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
  68. package/dist/cdn/chunks/{CloudPanels-awqHfJqC.js → CloudPanels-C3jsxo_f.js} +52 -100
  69. package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
  70. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js +78 -0
  71. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
  72. package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js +72 -0
  73. package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js.map +1 -0
  74. package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
  75. package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
  76. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
  77. package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
  78. package/dist/{CountdownBlock-zx39Dyby.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
  79. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
  80. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-Cjud2Tos.js} +71 -71
  81. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
  82. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
  83. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
  84. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-BIcL4NiY.js} +2 -2
  85. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
  86. package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-CsL2JDOG.js} +374 -369
  87. package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
  88. package/dist/{MediaEditModal-ByOvznRC.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
  89. package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
  90. package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
  91. package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
  92. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-C8U-7LxL.js} +34 -34
  93. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
  94. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
  95. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
  96. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
  97. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
  98. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
  99. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
  100. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js → RestoreVersionDialog-CdA5osuA.js} +26 -26
  101. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
  102. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
  103. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
  104. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-CijargAy.js} +78 -78
  105. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
  106. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
  107. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
  108. package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
  109. package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-BPRaJBv3.js} +19 -19
  111. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
  112. package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
  113. package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
  114. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-BUVTj3Ic.js} +54 -54
  115. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
  116. package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
  117. package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
  118. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
  119. package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
  120. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
  121. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
  122. package/dist/cdn/chunks/{Toolbar-C_x2TfFk.js → Toolbar-DoprRgTn.js} +1097 -1101
  123. package/dist/cdn/chunks/Toolbar-DoprRgTn.js.map +1 -0
  124. package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-BXQzmsJX.js} +21 -21
  125. package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-BXQzmsJX.js.map} +1 -1
  126. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
  127. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
  128. package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
  129. package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
  130. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BaGcn-b1.js} +13 -13
  131. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
  132. package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
  133. package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
  134. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
  135. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
  136. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
  137. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
  138. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
  139. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
  140. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
  141. package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
  142. package/dist/{ca-CbNzJM3I.js → cdn/chunks/ca-C7mTzW1r.js} +149 -6
  143. package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
  144. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js +1408 -0
  145. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
  146. package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
  147. package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
  148. package/dist/{de-DMquBpZM.js → cdn/chunks/de-DNuYQTmS.js} +149 -6
  149. package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
  150. package/dist/{dist-CUWI-IvA.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
  151. package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Bo8Thh8v.js.map} +1 -1
  152. package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
  153. package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-S-rLGqax.js.map} +1 -1
  154. package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-DZ0gwUJ6.js} +1359 -1266
  155. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
  156. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-CI6EfeMd.js} +881 -881
  157. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
  158. package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
  159. package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
  160. package/dist/{en-C8Mp71sO.js → cdn/chunks/en-CW71OK66.js} +149 -6
  161. package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
  162. package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
  163. package/dist/{es-Byq4tthI.js → cdn/chunks/es-DdK7zQfi.js} +149 -6
  164. package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
  165. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-taJTZlLK.js} +71 -71
  166. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-taJTZlLK.js.map} +1 -1
  167. package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-Dz5Bgb7-.js} +149 -6
  168. package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
  169. package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-DNX6StSs.js} +183 -150
  170. package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
  171. package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-Di-zJiT8.js} +149 -6
  172. package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
  173. package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
  174. package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
  175. package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
  176. package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
  177. package/dist/{nl-ClJ3BY3F.js → cdn/chunks/nl-CvVuHYFL.js} +149 -6
  178. package/dist/cdn/chunks/nl-CvVuHYFL.js.map +1 -0
  179. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
  180. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
  181. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
  182. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
  183. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
  184. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
  185. package/dist/{pt-BR-DibcXcmv.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +149 -6
  186. package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
  187. package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
  188. package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
  189. package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
  190. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
  191. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
  192. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
  193. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
  194. package/dist/cdn/chunks/{src-DYCDeBDM.js → src-BNFnxfrA.js} +694 -329
  195. package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
  196. package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-BcTUmgLe.js} +181 -181
  197. package/dist/cdn/chunks/src-BcTUmgLe.js.map +1 -0
  198. package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
  199. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  200. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
  201. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
  202. package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-CtVrAViq.js} +44 -44
  203. package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +1 -0
  204. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-AVXhzbhQ.js} +4 -4
  205. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
  206. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
  207. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
  208. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
  209. package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
  210. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-CbVubQhM.js} +3 -3
  211. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-CbVubQhM.js.map} +1 -1
  212. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-B49Nc53Y.js} +5 -5
  213. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
  214. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-B0KryMj8.js} +7 -7
  215. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
  216. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-C829ps5i.js} +4 -4
  217. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
  218. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
  219. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
  220. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js → withCurrentFont-DFPXeVfG.js} +2 -2
  221. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
  222. package/dist/cdn/editor.css +1 -1
  223. package/dist/cdn/editor.js +2235 -1311
  224. package/dist/cdn/editor.js.map +1 -1
  225. package/dist/{check-ClwqRMgv.js → check-yYsp5Xpk.js} +1 -1
  226. package/dist/{chevron-down-te6qn-zE.js → chevron-down-DTmD06_j.js} +1 -1
  227. package/dist/{chevron-right-W2hbH1FM.js → chevron-right-BSeYZOxc.js} +1 -1
  228. package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-BOApwrxi.js} +1 -1
  229. package/dist/{circle-alert-CIEGV5DN.js → circle-alert-BMszY8im.js} +1 -1
  230. package/dist/{clock-Y4cx0gkJ.js → clock-HADxnl6-.js} +1 -1
  231. package/dist/createCloudRuntime-DVQI_ReU.js +1379 -0
  232. package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-0lYYH3EW.js} +6 -6
  233. package/dist/de-DBOTcDj2.js +20 -0
  234. package/dist/{cdn/chunks/de-DMquBpZM.js → de-DNuYQTmS.js} +147 -8
  235. package/dist/{cdn/chunks/dist-CjL6JHML.js → dist-C7EtxNCb.js} +49 -51
  236. package/dist/{dist-DuufrR8O.js → dist-C_dV9QAx.js} +130 -130
  237. package/dist/{cdn/chunks/dist-MNQYSEWU.js → dist-DI4_YSnG.js} +111 -110
  238. package/dist/{dist-tsmnQugO.js → dist-DtOF3bDW.js} +648 -294
  239. package/dist/{editor-modal-AlVLkU91.js → editor-modal-Bzhl-PgI.js} +832 -834
  240. package/dist/en-CDhWRrF_.js +20 -0
  241. package/dist/{cdn/chunks/en-C8Mp71sO.js → en-CW71OK66.js} +147 -8
  242. package/dist/en-DwV15ltA.js +1 -0
  243. package/dist/{cdn/chunks/es-Byq4tthI.js → es-DdK7zQfi.js} +147 -8
  244. package/dist/{extensions-pjO8VGkM.js → extensions-CdyweA50.js} +54 -54
  245. package/dist/{eye-Ddnz8nnm.js → eye-DWkSvYpj.js} +1 -1
  246. package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-Dz5Bgb7-.js} +147 -8
  247. package/dist/image-DesWjcZ4.js +28 -0
  248. package/dist/index.d.ts +640 -48
  249. package/dist/{info-DXLmzoeY.js → info-ClWJGoZy.js} +1 -1
  250. package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-Di-zJiT8.js} +147 -8
  251. package/dist/keys-Zd9KWRD1.js +10 -0
  252. package/dist/{link-Cel46wgo.js → link-BqRicFTA.js} +1 -1
  253. package/dist/{list-Cl0GwiV9.js → list-bojQr9bn.js} +1 -1
  254. package/dist/{loader-circle-uAwpvfys.js → loader-circle-B2B8LbUu.js} +1 -1
  255. package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
  256. package/dist/{message-circle-DWU1pTM_.js → message-circle-BEuiNsyZ.js} +1 -1
  257. package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-CvVuHYFL.js} +147 -8
  258. package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
  259. package/dist/{package-CbyG_yU_.js → package-DCROB4aM.js} +1 -1
  260. package/dist/{pencil-BzoDcwKu.js → pencil-CEotCKbf.js} +1 -1
  261. package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-D8rr61_z.js} +3 -3
  262. package/dist/pt-BR-CHM-ZKvE.js +20 -0
  263. package/dist/{cdn/chunks/pt-BR-DibcXcmv.js → pt-BR-ZhO4vgyq.js} +147 -8
  264. package/dist/{refresh-cw-9WinWixo.js → refresh-cw-C6M2mHNC.js} +12 -2
  265. package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
  266. package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
  267. package/dist/{search-CqgGq1gG.js → search-Cy99zPYf.js} +1 -1
  268. package/dist/{send-Ceo3c9Db.js → send-BDLJFsf3.js} +1 -1
  269. package/dist/{smartphone-CcLaCpGK.js → smartphone-CVvQaNA4.js} +1 -1
  270. package/dist/socialIcons-Dd-jRiVe.js +2086 -0
  271. package/dist/{sparkles-Do9XjAuT.js → sparkles-Ce0Qz0ox.js} +1 -1
  272. package/dist/square-BWlolnXe.js +15 -0
  273. package/dist/style.css +1 -1
  274. package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
  275. package/dist/templatical-editor.js +2272 -1327
  276. package/dist/{text-align-start-DvzC0HQA.js → text-align-start-D1V5gPTy.js} +1 -1
  277. package/dist/{trash-vlINTx32.js → trash-CZfiUFmw.js} +1 -1
  278. package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CFDzyFC7.js} +1 -1
  279. package/dist/upload-BJfvdIrD.js +36 -0
  280. package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-Dcjua65H.js} +5 -5
  281. package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-BTLeAVlM.js} +1534 -1549
  282. package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-DUy67lJu.js} +2 -2
  283. package/dist/{useI18n-CxVEpurs.js → useI18n-BdoY7xDE.js} +4 -4
  284. package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-DKLZ1T9H.js} +3 -3
  285. package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-Bhdx7AKk.js} +5 -5
  286. package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-BZea45XK.js} +2 -2
  287. package/dist/useScrollToBlock-FmNMALM_.js +74 -0
  288. package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1182 -1087
  289. package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-BATJHNve.js} +1 -1
  290. package/dist/{x-Cd6SFw8r.js → x-CZ0Js0hA.js} +1 -1
  291. package/package.json +17 -15
  292. package/dist/AiChatSidebar-DxPHFNoT.js +0 -230
  293. package/dist/AiFeatureMenu-C8GVqu1d.js +0 -57
  294. package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
  295. package/dist/CloudPanels-Dgw7tb4R.js +0 -216
  296. package/dist/CollaboratorBar-5rfopCPx.js +0 -103
  297. package/dist/CommentsSidebar-BOqj16Al.js +0 -500
  298. package/dist/DesignReferenceSidebar-BWAi3eQQ.js +0 -279
  299. package/dist/IssuesPanel-C-x3I012.js +0 -117
  300. package/dist/ParagraphEditor-BVjOwwHx.js +0 -797
  301. package/dist/SavedBlocksBrowserModal-DbmIS5uK.js +0 -360
  302. package/dist/TemplateScoringPanel-ynbGl-sr.js +0 -273
  303. package/dist/TemplateSettings-Bi01S3H3.js +0 -246
  304. package/dist/ToggleSwitch-Ozc7YU38.js +0 -102
  305. package/dist/Toolbar-B-2lO0I8.js +0 -3156
  306. package/dist/WrapperBlock-D0qgNqjD.js +0 -45
  307. package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js +0 -205
  308. package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js.map +0 -1
  309. package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js +0 -57
  310. package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js.map +0 -1
  311. package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js +0 -60
  312. package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
  313. package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
  314. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
  315. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
  316. package/dist/cdn/chunks/CommentsPanel-CbzxwsyI.js +0 -20
  317. package/dist/cdn/chunks/CommentsSidebar-DWPHZuQm.js +0 -470
  318. package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js +0 -229
  319. package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js.map +0 -1
  320. package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js +0 -100
  321. package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js.map +0 -1
  322. package/dist/cdn/chunks/LogicTagInsertButton-BMB9vShs.js.map +0 -1
  323. package/dist/cdn/chunks/MediaEditModal-zXfcArr4.js.map +0 -1
  324. package/dist/cdn/chunks/MediaPanels-Cp4XB_dH.js +0 -45
  325. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js +0 -632
  326. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +0 -1
  327. package/dist/cdn/chunks/SavedBlocksPanels-BhEOMzEQ.js +0 -38
  328. package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js +0 -237
  329. package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js.map +0 -1
  330. package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js +0 -208
  331. package/dist/cdn/chunks/TestEmailPanel-DxrKuctP.js +0 -35
  332. package/dist/cdn/chunks/TitleEditor-CsZiG3TT.js +0 -199
  333. package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js +0 -104
  334. package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js.map +0 -1
  335. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
  336. package/dist/cdn/chunks/VersionHistoryPanels-DXSqmaLS.js +0 -48
  337. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +0 -47
  338. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +0 -22
  339. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
  340. package/dist/cdn/chunks/cloud-BHClP3e2.js +0 -1736
  341. package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
  342. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js +0 -400
  343. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
  344. package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
  345. package/dist/cdn/chunks/de-mMY5yQJu.js +0 -93
  346. package/dist/cdn/chunks/de-mMY5yQJu.js.map +0 -1
  347. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
  348. package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
  349. package/dist/cdn/chunks/en-ChVeGQBY.js +0 -93
  350. package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
  351. package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
  352. package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
  353. package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
  354. package/dist/cdn/chunks/icons-aTYwH5-g.js.map +0 -1
  355. package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
  356. package/dist/cdn/chunks/keys-HI-INbkz.js +0 -12
  357. package/dist/cdn/chunks/keys-HI-INbkz.js.map +0 -1
  358. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
  359. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
  360. package/dist/cdn/chunks/pt-BR-CoCwRUi0.js +0 -93
  361. package/dist/cdn/chunks/pt-BR-CoCwRUi0.js.map +0 -1
  362. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
  363. package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
  364. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
  365. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
  366. package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
  367. package/dist/cdn/chunks/src-DlFlC9Tt.js +0 -1272
  368. package/dist/cdn/chunks/src-DlFlC9Tt.js.map +0 -1
  369. package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
  370. package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
  371. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
  372. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
  373. package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js +0 -12
  374. package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js.map +0 -1
  375. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js +0 -2602
  376. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
  377. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
  378. package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js +0 -21
  379. package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js.map +0 -1
  380. package/dist/cloud-B5xwm_4X.js +0 -1689
  381. package/dist/copy-BEcsAlfB.js +0 -19
  382. package/dist/createCloudRuntime-zNPkF6T9.js +0 -398
  383. package/dist/de-mMY5yQJu.js +0 -91
  384. package/dist/dist-DAAJogrx.js +0 -407
  385. package/dist/en-B0FUfNwz.js +0 -1
  386. package/dist/en-ChVeGQBY.js +0 -91
  387. package/dist/image-up-CM_HC0Dx.js +0 -27
  388. package/dist/keys-BKFq19a2.js +0 -10
  389. package/dist/plus-8cDvoCjZ.js +0 -14
  390. package/dist/pt-BR-CoCwRUi0.js +0 -91
  391. package/dist/shield-check-uDAwur5D.js +0 -14
  392. package/dist/socialIcons-PTiwhLoC.js +0 -1359
  393. package/dist/timeouts-Cv2jvusx.js +0 -4
  394. package/dist/upload-CtNOI6J2.js +0 -21
  395. package/dist/useAliveFlag-Dd06mRxe.js +0 -10
  396. package/dist/useScrollToBlock-CXmcHQQN.js +0 -47
@@ -0,0 +1,1408 @@
1
+ import { r as e } from "./rolldown-runtime-Y_bBpyJl.js";
2
+ import { $ as t, F as n, V as r, p as i } from "./draggable-DZ0gwUJ6.js";
3
+ import { gt as a } from "./src-BNFnxfrA.js";
4
+ import { i as o, u as s } from "./keys-BTpmg2Tt.js";
5
+ import { t as c } from "./logger-Tj0RPskW.js";
6
+ import { t as l } from "./preRenderCustomBlocks-Dc-QLntG.js";
7
+ //#region ../core/src/cloud/auth.ts
8
+ function u(e) {
9
+ let t = e instanceof a ? e.statusCode : void 0;
10
+ return t !== void 0 && t >= 400 && t < 500;
11
+ }
12
+ var d = class e {
13
+ static DEFAULT_BASE_URL = "https://templatical.com";
14
+ accessToken = null;
15
+ expiresAt = null;
16
+ _projectId = null;
17
+ _tenantId = null;
18
+ _tenantSlug = null;
19
+ _testEmailConfig = null;
20
+ _userConfig = null;
21
+ url;
22
+ baseUrl;
23
+ requestOptions;
24
+ onError;
25
+ refreshPromise = null;
26
+ static REFRESH_THRESHOLD_MS = 6e4;
27
+ constructor(t) {
28
+ this.url = t.url, this.baseUrl = (t.baseUrl ?? e.DEFAULT_BASE_URL).replace(/\/$/, ""), this.requestOptions = t.requestOptions ?? {}, this.onError = t.onError;
29
+ }
30
+ resolveUrl(e) {
31
+ if (e.startsWith("http://") || e.startsWith("https://")) return e;
32
+ let t = e.startsWith("/") ? e : `/${e}`;
33
+ return `${this.baseUrl}${t}`;
34
+ }
35
+ get projectId() {
36
+ if (!this._projectId) throw Error("Project ID not available. Call initialize() first.");
37
+ return this._projectId;
38
+ }
39
+ get tenantId() {
40
+ if (!this._tenantId) throw Error("Tenant ID not available. Call initialize() first.");
41
+ return this._tenantId;
42
+ }
43
+ get tenantSlug() {
44
+ if (!this._tenantSlug) throw Error("Tenant slug not available. Call initialize() first.");
45
+ return this._tenantSlug;
46
+ }
47
+ get testEmailConfig() {
48
+ return this._testEmailConfig;
49
+ }
50
+ get userConfig() {
51
+ return this._userConfig;
52
+ }
53
+ get accessTokenValue() {
54
+ return this.accessToken;
55
+ }
56
+ async initialize() {
57
+ await this.ensureToken();
58
+ }
59
+ async ensureToken() {
60
+ return this.accessToken && !this.isTokenExpiringSoon() ? this.accessToken : this.refreshToken();
61
+ }
62
+ isTokenExpiringSoon() {
63
+ return !this.expiresAt || this.expiresAt.getTime() - Date.now() < e.REFRESH_THRESHOLD_MS;
64
+ }
65
+ async refreshToken() {
66
+ if (this.refreshPromise) return this.refreshPromise;
67
+ this.refreshPromise = this.performRefresh();
68
+ try {
69
+ return await this.refreshPromise;
70
+ } finally {
71
+ this.refreshPromise = null;
72
+ }
73
+ }
74
+ async performRefresh() {
75
+ try {
76
+ let e = this.requestOptions.method ?? "POST", t = {
77
+ Accept: "application/json",
78
+ ...this.requestOptions.headers
79
+ }, n = {
80
+ method: e,
81
+ headers: t,
82
+ credentials: this.requestOptions.credentials ?? "include"
83
+ };
84
+ e === "POST" && this.requestOptions.body && (t["Content-Type"] = "application/json", n.body = JSON.stringify(this.requestOptions.body));
85
+ let r = await fetch(this.url, n);
86
+ if (!r.ok) throw new a(`Token refresh failed: ${r.status}`, r.status);
87
+ let i = await r.json();
88
+ if (!i.token || !i.expiresAt || !i.projectId || !i.tenant) throw Error("Invalid token response: missing token, expiresAt, projectId, or tenant");
89
+ return this.accessToken = i.token, this.expiresAt = /* @__PURE__ */ new Date(i.expiresAt * 1e3), this._projectId = i.projectId, this._tenantSlug = i.tenant, this._testEmailConfig = i.testEmail?.allowedEmails && i.testEmail?.signature ? {
90
+ allowedEmails: i.testEmail.allowedEmails,
91
+ signature: i.testEmail.signature
92
+ } : null, this._userConfig = i.user?.id && i.user?.name && i.user?.signature ? {
93
+ id: i.user.id,
94
+ name: i.user.name,
95
+ signature: i.user.signature
96
+ } : null, this.accessToken;
97
+ } catch (e) {
98
+ let t = e instanceof Error ? e : Error("Token refresh failed", { cause: e });
99
+ throw this.onError?.(t), t;
100
+ }
101
+ }
102
+ async authenticatedFetch(e, t = {}) {
103
+ let n = await this.ensureToken(), r = this.resolveUrl(e), i = async (e) => fetch(r, {
104
+ ...t,
105
+ headers: {
106
+ ...t.headers,
107
+ Authorization: `Bearer ${e}`
108
+ }
109
+ }), a = await i(n);
110
+ return a.status === 401 && (a = await i(await this.refreshToken())), a;
111
+ }
112
+ };
113
+ //#endregion
114
+ //#region ../core/src/cloud/url-builder.ts
115
+ function f(e, t) {
116
+ return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
117
+ }
118
+ var p = "/api/v1/projects/{project}/tenants/{tenant}", m = `${p}/templates/{template}`, h = `${p}/media`, g = `${h}/folders`, _ = `${p}/saved-modules`, v = {
119
+ health: "/api/v1/health",
120
+ "projects.config": `${p}/config`,
121
+ "broadcasting.auth": `${p}/broadcasting/auth`,
122
+ "templates.store": `${p}/templates`,
123
+ "templates.show": `${m}`,
124
+ "templates.update": `${m}`,
125
+ "templates.destroy": `${m}`,
126
+ "templates.export": `${m}/export`,
127
+ "templates.importFromBeefree": `${p}/templates/import/from-beefree`,
128
+ "templates.sendTestEmail": `${m}/send-test-email`,
129
+ "versions.index": `${m}/versions`,
130
+ "versions.store": `${m}/versions`,
131
+ "versions.show": `${m}/versions/{version}`,
132
+ "versions.restore": `${m}/versions/{version}/restore`,
133
+ "comments.index": `${m}/comments`,
134
+ "comments.store": `${m}/comments`,
135
+ "comments.update": `${m}/comments/{comment}`,
136
+ "comments.destroy": `${m}/comments/{comment}`,
137
+ "comments.resolve": `${m}/comments/{comment}/resolve`,
138
+ "media.upload": `${h}/upload`,
139
+ "media.browse": `${h}/browse`,
140
+ "media.delete": `${h}/delete`,
141
+ "media.move": `${h}/move`,
142
+ "media.update": `${h}/{media}`,
143
+ "media.replace": `${h}/{media}/replace`,
144
+ "media.checkUsage": `${h}/check-usage`,
145
+ "media.frequentlyUsed": `${h}/frequently-used`,
146
+ "media.importFromUrl": `${h}/import-from-url`,
147
+ "folders.index": `${g}`,
148
+ "folders.store": `${g}`,
149
+ "folders.update": `${g}/{mediaFolder}`,
150
+ "folders.destroy": `${g}/{mediaFolder}`,
151
+ "savedModules.index": `${_}`,
152
+ "savedModules.store": `${_}`,
153
+ "savedModules.update": `${_}/{savedModule}`,
154
+ "savedModules.destroy": `${_}/{savedModule}`
155
+ }, y = class {
156
+ authManager;
157
+ constructor(e) {
158
+ this.authManager = e;
159
+ }
160
+ get projectId() {
161
+ return this.authManager.projectId;
162
+ }
163
+ get tenantSlug() {
164
+ return this.authManager.tenantSlug;
165
+ }
166
+ get baseParams() {
167
+ return {
168
+ project: this.projectId,
169
+ tenant: this.tenantSlug
170
+ };
171
+ }
172
+ async request(e, t = {}) {
173
+ let n = await this.authManager.authenticatedFetch(e, {
174
+ ...t,
175
+ headers: {
176
+ "Content-Type": "application/json",
177
+ Accept: "application/json",
178
+ ...t.headers
179
+ }
180
+ });
181
+ if (!n.ok) {
182
+ let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` })), t = this.extractFirstValidationError(e);
183
+ throw new a(t, n.status);
184
+ }
185
+ if (n.status !== 204) return (await n.json()).data;
186
+ }
187
+ extractFirstValidationError(e) {
188
+ if (e.errors) {
189
+ let t = Object.keys(e.errors)[0];
190
+ if (t && e.errors[t]?.length > 0) return e.errors[t][0];
191
+ }
192
+ return e.message;
193
+ }
194
+ async createTemplate(e, t) {
195
+ return this.request(f(v["templates.store"], this.baseParams), {
196
+ method: "POST",
197
+ body: JSON.stringify(t === void 0 ? { content: e } : {
198
+ content: e,
199
+ name: t
200
+ })
201
+ });
202
+ }
203
+ async getTemplate(e) {
204
+ return this.request(f(v["templates.show"], {
205
+ ...this.baseParams,
206
+ template: e
207
+ }));
208
+ }
209
+ async updateTemplate(e, t) {
210
+ return this.request(f(v["templates.update"], {
211
+ ...this.baseParams,
212
+ template: e
213
+ }), {
214
+ method: "PUT",
215
+ body: JSON.stringify(t)
216
+ });
217
+ }
218
+ async createVersion(e, t, n) {
219
+ return this.request(f(v["versions.store"], {
220
+ ...this.baseParams,
221
+ template: e
222
+ }), {
223
+ method: "POST",
224
+ body: JSON.stringify(n === void 0 ? { content: t } : {
225
+ content: t,
226
+ label: n
227
+ })
228
+ });
229
+ }
230
+ async deleteTemplate(e) {
231
+ return this.request(f(v["templates.destroy"], {
232
+ ...this.baseParams,
233
+ template: e
234
+ }), { method: "DELETE" });
235
+ }
236
+ async getVersions(e) {
237
+ return this.request(f(v["versions.index"], {
238
+ ...this.baseParams,
239
+ template: e
240
+ }));
241
+ }
242
+ async getVersion(e, t) {
243
+ return this.request(f(v["versions.show"], {
244
+ ...this.baseParams,
245
+ template: e,
246
+ version: t
247
+ }));
248
+ }
249
+ async restoreVersion(e, t) {
250
+ return this.request(f(v["versions.restore"], {
251
+ ...this.baseParams,
252
+ template: e,
253
+ version: t
254
+ }), { method: "POST" });
255
+ }
256
+ async exportTemplate(e, t) {
257
+ let n = t ? JSON.stringify({
258
+ custom_fonts: t.customFonts,
259
+ default_fallback: t.defaultFallback
260
+ }) : void 0;
261
+ return this.request(f(v["templates.export"], {
262
+ ...this.baseParams,
263
+ template: e
264
+ }), {
265
+ method: "POST",
266
+ body: n
267
+ });
268
+ }
269
+ async sendTestEmail(e, t) {
270
+ await this.request(f(v["templates.sendTestEmail"], {
271
+ ...this.baseParams,
272
+ template: e
273
+ }), {
274
+ method: "POST",
275
+ body: JSON.stringify(t)
276
+ });
277
+ }
278
+ commentsUrl(e, t) {
279
+ return t ? f(v["comments.update"], {
280
+ ...this.baseParams,
281
+ template: e,
282
+ comment: t
283
+ }) : f(v["comments.index"], {
284
+ ...this.baseParams,
285
+ template: e
286
+ });
287
+ }
288
+ async getComments(e) {
289
+ return this.request(this.commentsUrl(e));
290
+ }
291
+ async createComment(e, t, n) {
292
+ return this.request(this.commentsUrl(e), {
293
+ method: "POST",
294
+ body: JSON.stringify(t),
295
+ headers: n
296
+ });
297
+ }
298
+ async updateComment(e, t, n, r) {
299
+ return this.request(this.commentsUrl(e, t), {
300
+ method: "PUT",
301
+ body: JSON.stringify(n),
302
+ headers: r
303
+ });
304
+ }
305
+ async deleteComment(e, t, n, r) {
306
+ return this.request(this.commentsUrl(e, t), {
307
+ method: "DELETE",
308
+ body: JSON.stringify(n),
309
+ headers: r
310
+ });
311
+ }
312
+ async resolveComment(e, t, n, r) {
313
+ return this.request(f(v["comments.resolve"], {
314
+ ...this.baseParams,
315
+ template: e,
316
+ comment: t
317
+ }), {
318
+ method: "POST",
319
+ body: JSON.stringify(n),
320
+ headers: r
321
+ });
322
+ }
323
+ async fetchConfig() {
324
+ return this.request(f(v["projects.config"], this.baseParams));
325
+ }
326
+ async listModules(e, t) {
327
+ let n = f(v["savedModules.index"], this.baseParams), r = new URLSearchParams();
328
+ e && r.set("search", e), t && r.set("category", t);
329
+ let i = r.size > 0 ? `?${r}` : "";
330
+ return this.request(`${n}${i}`);
331
+ }
332
+ async createModule(e) {
333
+ return this.request(f(v["savedModules.store"], this.baseParams), {
334
+ method: "POST",
335
+ body: JSON.stringify(e)
336
+ });
337
+ }
338
+ async updateModule(e, t) {
339
+ return this.request(f(v["savedModules.update"], {
340
+ ...this.baseParams,
341
+ savedModule: e
342
+ }), {
343
+ method: "PUT",
344
+ body: JSON.stringify(t)
345
+ });
346
+ }
347
+ async deleteModule(e) {
348
+ return this.request(f(v["savedModules.destroy"], {
349
+ ...this.baseParams,
350
+ savedModule: e
351
+ }), { method: "DELETE" });
352
+ }
353
+ }, b = class {
354
+ authManager;
355
+ constructor(e) {
356
+ this.authManager = e;
357
+ }
358
+ get projectId() {
359
+ return this.authManager.projectId;
360
+ }
361
+ get tenantSlug() {
362
+ return this.authManager.tenantSlug;
363
+ }
364
+ get baseParams() {
365
+ return {
366
+ project: this.projectId,
367
+ tenant: this.tenantSlug
368
+ };
369
+ }
370
+ async request(e, t = {}) {
371
+ let n = await this.authManager.authenticatedFetch(e, {
372
+ ...t,
373
+ headers: {
374
+ "Content-Type": "application/json",
375
+ Accept: "application/json",
376
+ ...t.headers
377
+ }
378
+ });
379
+ if (!n.ok) {
380
+ let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` }));
381
+ throw Error(e.message, { cause: e });
382
+ }
383
+ if (n.status !== 204) return (await n.json()).data;
384
+ }
385
+ async browseMedia(e) {
386
+ let t = new URLSearchParams();
387
+ e.folderId && t.set("folderId", e.folderId), e.search && t.set("search", e.search), e.category && t.set("category", e.category), e.sort && t.set("sort", e.sort), e.cursor && t.set("cursor", e.cursor);
388
+ let n = t.toString(), r = `${f(v["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
389
+ if (!i.ok) {
390
+ let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
391
+ throw Error(e.message, { cause: e });
392
+ }
393
+ return i.json();
394
+ }
395
+ async uploadMedia(e, t) {
396
+ let n = new FormData();
397
+ n.append("file", e), t && n.append("folderId", t);
398
+ let r = f(v["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
399
+ method: "POST",
400
+ headers: { Accept: "application/json" },
401
+ body: n
402
+ });
403
+ if (!i.ok) {
404
+ let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
405
+ throw Error(e.message, { cause: e });
406
+ }
407
+ return (await i.json()).data;
408
+ }
409
+ async updateMedia(e, t, n) {
410
+ let r = {};
411
+ return t !== void 0 && (r.filename = t), n !== void 0 && (r.alt = n), this.request(f(v["media.update"], {
412
+ ...this.baseParams,
413
+ media: e
414
+ }), {
415
+ method: "PUT",
416
+ body: JSON.stringify(r)
417
+ });
418
+ }
419
+ async deleteMedia(e) {
420
+ return this.request(f(v["media.delete"], this.baseParams), {
421
+ method: "POST",
422
+ body: JSON.stringify({ ids: e })
423
+ });
424
+ }
425
+ async moveMedia(e, t) {
426
+ return this.request(f(v["media.move"], this.baseParams), {
427
+ method: "POST",
428
+ body: JSON.stringify({
429
+ ids: e,
430
+ folderId: t
431
+ })
432
+ });
433
+ }
434
+ async getMediaFolders() {
435
+ return this.request(f(v["folders.index"], this.baseParams));
436
+ }
437
+ async createMediaFolder(e, t) {
438
+ return this.request(f(v["folders.store"], this.baseParams), {
439
+ method: "POST",
440
+ body: JSON.stringify({
441
+ name: e,
442
+ parentId: t ?? null
443
+ })
444
+ });
445
+ }
446
+ async renameMediaFolder(e, t) {
447
+ return this.request(f(v["folders.update"], {
448
+ ...this.baseParams,
449
+ mediaFolder: e
450
+ }), {
451
+ method: "PUT",
452
+ body: JSON.stringify({ name: t })
453
+ });
454
+ }
455
+ async deleteMediaFolder(e) {
456
+ return this.request(f(v["folders.destroy"], {
457
+ ...this.baseParams,
458
+ mediaFolder: e
459
+ }), { method: "DELETE" });
460
+ }
461
+ async checkMediaUsage(e) {
462
+ let t = await this.authManager.authenticatedFetch(f(v["media.checkUsage"], this.baseParams), {
463
+ method: "POST",
464
+ headers: {
465
+ "Content-Type": "application/json",
466
+ Accept: "application/json"
467
+ },
468
+ body: JSON.stringify({ ids: e })
469
+ });
470
+ if (!t.ok) {
471
+ let e = await t.json().catch(() => ({ message: `HTTP error ${t.status}` }));
472
+ throw Error(e.message, { cause: e });
473
+ }
474
+ return t.json();
475
+ }
476
+ async getFrequentlyUsed() {
477
+ return this.request(f(v["media.frequentlyUsed"], this.baseParams));
478
+ }
479
+ async importFromUrl(e, t) {
480
+ return this.request(f(v["media.importFromUrl"], this.baseParams), {
481
+ method: "POST",
482
+ body: JSON.stringify({
483
+ url: e,
484
+ folderId: t ?? null
485
+ })
486
+ });
487
+ }
488
+ async replaceMedia(e, t) {
489
+ let n = new FormData();
490
+ n.append("file", t);
491
+ let r = f(v["media.replace"], {
492
+ ...this.baseParams,
493
+ media: e
494
+ }), i = await this.authManager.authenticatedFetch(r, {
495
+ method: "POST",
496
+ headers: { Accept: "application/json" },
497
+ body: n
498
+ });
499
+ if (!i.ok) {
500
+ let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
501
+ throw Error(e.message, { cause: e });
502
+ }
503
+ return (await i.json()).data;
504
+ }
505
+ };
506
+ //#endregion
507
+ //#region ../core/src/cloud/websocket-client.ts
508
+ function x(e) {
509
+ return {
510
+ host: e.host,
511
+ port: e.port,
512
+ appKey: e.appKey
513
+ };
514
+ }
515
+ var S = class {
516
+ pusher = null;
517
+ authManager;
518
+ config;
519
+ onError;
520
+ constructor(e) {
521
+ this.authManager = e.authManager, this.config = e.config, this.onError = e.onError;
522
+ }
523
+ async connect() {
524
+ if (this.pusher) return;
525
+ let t;
526
+ try {
527
+ ({default: t} = await import("./pusher-Cs4GGEtd.js").then((t) => /* @__PURE__ */ e(t.t(), 1)));
528
+ } catch {
529
+ throw Error("[Templatical] Cloud features require the optional peer dependency 'pusher-js'. Please install it.");
530
+ }
531
+ let { host: n, port: r, appKey: i } = this.config, a = this.authManager.resolveUrl(f(v["broadcasting.auth"], {
532
+ project: this.authManager.projectId,
533
+ tenant: this.authManager.tenantSlug
534
+ }));
535
+ this.pusher = new t(i, {
536
+ wsHost: n,
537
+ wsPort: r,
538
+ wssPort: r,
539
+ forceTLS: !0,
540
+ disableStats: !0,
541
+ enabledTransports: ["ws", "wss"],
542
+ cluster: "",
543
+ channelAuthorization: {
544
+ transport: "ajax",
545
+ endpoint: a,
546
+ headers: {
547
+ Authorization: `Bearer ${this.authManager.accessTokenValue}`,
548
+ Accept: "application/json"
549
+ },
550
+ params: {
551
+ userId: this.authManager.userConfig?.id ?? "",
552
+ userName: this.authManager.userConfig?.name ?? "",
553
+ userSignature: this.authManager.userConfig?.signature ?? ""
554
+ }
555
+ }
556
+ }), this.pusher.connection.bind("error", (e) => {
557
+ this.onError?.(e instanceof Error ? e : /* @__PURE__ */ Error("WebSocket connection error"));
558
+ });
559
+ }
560
+ subscribePresence(e) {
561
+ if (!this.pusher) throw Error("WebSocketClient not connected. Call connect() first.");
562
+ return this.pusher.subscribe(e);
563
+ }
564
+ unsubscribe(e) {
565
+ this.pusher?.unsubscribe(e);
566
+ }
567
+ getChannel(e) {
568
+ return this.pusher?.channel(e);
569
+ }
570
+ disconnect() {
571
+ this.pusher &&= (this.pusher.disconnect(), null);
572
+ }
573
+ getSocketId() {
574
+ return this.pusher?.connection.socket_id ?? null;
575
+ }
576
+ get isConnected() {
577
+ return this.pusher?.connection.state === "connected";
578
+ }
579
+ }, C = "comment-broadcast";
580
+ function w(e) {
581
+ let t = {
582
+ id: e.id,
583
+ body: e.body,
584
+ author: e.author,
585
+ createdAt: e.createdAt,
586
+ blockId: e.blockId,
587
+ parentId: e.parentId,
588
+ resolvedAt: e.resolvedAt
589
+ };
590
+ return e.updatedAt !== e.createdAt && (t.updatedAt = e.updatedAt), e.resolvedBy && (t.resolvedBy = e.resolvedBy), e.replies?.length && (t.replies = e.replies.map(w)), t;
591
+ }
592
+ function ee(e) {
593
+ let { authManager: t, channel: n, getSocketId: i } = e, a = new y(t);
594
+ function o() {
595
+ let e = t.userConfig;
596
+ if (!e) throw Error("[Templatical] Cloud comments need a signed user in the auth token. The project's token endpoint must include a `user` claim.");
597
+ return {
598
+ userId: e.id,
599
+ userName: e.name,
600
+ userSignature: e.signature
601
+ };
602
+ }
603
+ function s() {
604
+ let e = i?.();
605
+ return e ? { "X-Socket-ID": e } : void 0;
606
+ }
607
+ return {
608
+ async list(e) {
609
+ return (await a.getComments(e)).map(w);
610
+ },
611
+ async create(e, t) {
612
+ return w(await a.createComment(e, {
613
+ body: t.body,
614
+ blockId: t.blockId,
615
+ parentId: t.parentId,
616
+ ...o()
617
+ }, s()));
618
+ },
619
+ async update(e, t, n) {
620
+ if (n.body === void 0) throw Error("[Templatical] Cloud comments: update() needs a `body` in the patch.");
621
+ return w(await a.updateComment(e, t, {
622
+ body: n.body,
623
+ ...o()
624
+ }, s()));
625
+ },
626
+ async delete(e, t) {
627
+ await a.deleteComment(e, t, o(), s());
628
+ },
629
+ async setResolved(e, t, n) {
630
+ return w(await a.resolveComment(e, t, o(), s()));
631
+ },
632
+ subscribe(e, t) {
633
+ function i(e) {
634
+ let n = w(e.comment);
635
+ switch (e.action) {
636
+ case "commentCreated":
637
+ t({
638
+ type: "created",
639
+ comment: n
640
+ });
641
+ break;
642
+ case "commentDeleted":
643
+ t({
644
+ type: "deleted",
645
+ commentId: n.id,
646
+ parentId: n.parentId
647
+ });
648
+ break;
649
+ case "commentUpdated":
650
+ case "commentResolved":
651
+ case "commentUnresolved": t({
652
+ type: "updated",
653
+ comment: n
654
+ });
655
+ }
656
+ }
657
+ let a = r(n, (e, t) => {
658
+ t?.unbind(C, i), e?.bind(C, i);
659
+ }, { immediate: !0 });
660
+ return () => {
661
+ a(), n.value?.unbind(C, i);
662
+ };
663
+ }
664
+ };
665
+ }
666
+ //#endregion
667
+ //#region ../core/src/cloud/web-socket.ts
668
+ function te(e) {
669
+ let { authManager: n, onError: r } = e, i = t(null), a = t(!1), o = null, s = null;
670
+ async function c(e, t) {
671
+ if (o) return;
672
+ o = new S({
673
+ authManager: n,
674
+ config: t,
675
+ onError: r
676
+ }), await o.connect(), s = `presence-template.${e}`;
677
+ let c = o.subscribePresence(s);
678
+ c.bind("pusher:subscription_succeeded", () => {
679
+ a.value = !0, i.value = c;
680
+ }), c.bind("pusher:subscription_error", (e) => {
681
+ a.value = !1, i.value = null, r?.(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to subscribe to template channel"));
682
+ });
683
+ }
684
+ function l() {
685
+ s && o && o.unsubscribe(s), o?.disconnect(), o = null, s = null, i.value = null, a.value = !1;
686
+ }
687
+ function u() {
688
+ return o?.getSocketId() ?? null;
689
+ }
690
+ return {
691
+ channel: i,
692
+ isConnected: a,
693
+ connect: c,
694
+ disconnect: l,
695
+ getSocketId: u
696
+ };
697
+ }
698
+ //#endregion
699
+ //#region ../core/src/cloud/saved-blocks-provider.ts
700
+ function ne(e) {
701
+ let t = new y(e);
702
+ return {
703
+ list(e) {
704
+ return t.listModules(e?.search, e?.category);
705
+ },
706
+ create(e) {
707
+ return t.createModule(e);
708
+ },
709
+ update(e, n) {
710
+ return t.updateModule(e, n);
711
+ },
712
+ delete(e) {
713
+ return t.deleteModule(e);
714
+ }
715
+ };
716
+ }
717
+ //#endregion
718
+ //#region ../core/src/cloud/media-provider.ts
719
+ function T(e) {
720
+ let t = {
721
+ id: e.id,
722
+ url: e.url,
723
+ filename: e.filename,
724
+ alt: e.alt,
725
+ mimeType: e.mimeType,
726
+ folderId: e.folderId,
727
+ createdAt: e.createdAt,
728
+ updatedAt: e.updatedAt,
729
+ size: e.size
730
+ };
731
+ return e.width != null && (t.width = e.width), e.height != null && (t.height = e.height), e.thumbnailUrl != null && (t.thumbnailUrl = e.thumbnailUrl), t;
732
+ }
733
+ function E(e, t = null) {
734
+ return {
735
+ id: e.id,
736
+ name: e.name,
737
+ parentId: e.parentId === void 0 ? t : e.parentId
738
+ };
739
+ }
740
+ function D(e, t = null) {
741
+ let n = [];
742
+ for (let r of e) n.push(E(r, t)), r.children?.length && n.push(...D(r.children, r.id));
743
+ return n;
744
+ }
745
+ function O(e) {
746
+ let t = e?.media?.categories;
747
+ if (!t) return;
748
+ let n = {};
749
+ for (let [e, r] of Object.entries(t)) n[e] = r.mimeTypes;
750
+ return n;
751
+ }
752
+ function k(e, t) {
753
+ let n = new b(e);
754
+ return {
755
+ async list(e) {
756
+ let t = await n.browseMedia({
757
+ search: e?.search,
758
+ cursor: e?.cursor,
759
+ folderId: e?.folderId,
760
+ category: e?.category
761
+ }), r = { items: t.data.map(T) };
762
+ return t.meta.nextCursor && (r.nextCursor = t.meta.nextCursor), r;
763
+ },
764
+ async create(e) {
765
+ return T(await n.uploadMedia(e.file, e.folderId));
766
+ },
767
+ async update(e, t) {
768
+ return T(await n.updateMedia(e, t.filename, t.alt));
769
+ },
770
+ delete(e) {
771
+ return n.deleteMedia(e);
772
+ },
773
+ folders: {
774
+ async list() {
775
+ return D(await n.getMediaFolders());
776
+ },
777
+ async create(e) {
778
+ return E(await n.createMediaFolder(e.name, e.parentId));
779
+ },
780
+ async update(e, t) {
781
+ return E(await n.renameMediaFolder(e, t.name));
782
+ },
783
+ delete(e) {
784
+ return n.deleteMediaFolder(e);
785
+ },
786
+ async move(e, t) {
787
+ return (await n.moveMedia(e, t)).map(T);
788
+ }
789
+ },
790
+ async replace(e, t) {
791
+ return T(await n.replaceMedia(e, t));
792
+ },
793
+ async importFromUrl(e, t) {
794
+ return T(await n.importFromUrl(e, t));
795
+ },
796
+ async checkUsage(e) {
797
+ let t = await n.checkMediaUsage(e), r = {};
798
+ for (let [e, n] of Object.entries(t.data)) r[e] = {
799
+ templateCount: n.templateCount,
800
+ templateNames: n.templateNames
801
+ };
802
+ return r;
803
+ },
804
+ async frequentlyUsed() {
805
+ return (await n.getFrequentlyUsed()).map(T);
806
+ },
807
+ async storage() {
808
+ return t?.()?.storage ?? null;
809
+ },
810
+ get maxFileSize() {
811
+ return t?.()?.media?.maxFileSize;
812
+ },
813
+ get mimeTypes() {
814
+ return O(t?.() ?? null);
815
+ }
816
+ };
817
+ }
818
+ //#endregion
819
+ //#region ../core/src/cloud/templates-provider.ts
820
+ var A = 6e4;
821
+ function re(e) {
822
+ let t = new y(e), n = 0;
823
+ function r(e, r) {
824
+ let i = Date.now();
825
+ i - n < A || (n = i, t.createVersion(e, r).catch((e) => {
826
+ console.warn("[Templatical] Automatic version not recorded — the save itself succeeded:", e);
827
+ }));
828
+ }
829
+ return {
830
+ load(e) {
831
+ return t.getTemplate(e);
832
+ },
833
+ create(e) {
834
+ return t.createTemplate(e.content, e.name);
835
+ },
836
+ async save(e, n) {
837
+ let i = await t.updateTemplate(e, n);
838
+ return n.content && r(e, n.content), i;
839
+ }
840
+ };
841
+ }
842
+ //#endregion
843
+ //#region ../core/src/cloud/export.ts
844
+ function ie(e) {
845
+ return {
846
+ customFonts: e?.customFonts ?? [],
847
+ defaultFallback: e?.defaultFallback ?? "Arial, sans-serif"
848
+ };
849
+ }
850
+ function j(e) {
851
+ let t = new y(e.authManager);
852
+ async function n(e, n) {
853
+ let r = await t.exportTemplate(e, n);
854
+ return {
855
+ html: r.html,
856
+ mjml: r.mjml
857
+ };
858
+ }
859
+ async function r(e, n) {
860
+ return (await t.exportTemplate(e, n)).mjml;
861
+ }
862
+ return {
863
+ exportHtml: n,
864
+ getMjmlSource: r
865
+ };
866
+ }
867
+ //#endregion
868
+ //#region ../core/src/cloud/render-provider.ts
869
+ function M(e) {
870
+ let t = j({ authManager: e.authManager });
871
+ function n(e) {
872
+ return {
873
+ customFonts: e.fonts?.customFonts ?? [],
874
+ defaultFallback: e.fonts?.defaultFallback ?? "Arial, sans-serif"
875
+ };
876
+ }
877
+ async function r() {
878
+ if (e.getTemplateId() === null) throw Error("[Templatical] Cloud renders from the saved template, so one must exist first. Call create() or load() before toMjml() / toHtml().");
879
+ return (await e.save()).id;
880
+ }
881
+ return {
882
+ async toMjml(e) {
883
+ let i = n(e), a = await r();
884
+ return t.getMjmlSource(a, i);
885
+ },
886
+ async toHtml(e) {
887
+ let i = n(e), a = await r(), { html: o } = await t.exportHtml(a, i);
888
+ return o;
889
+ }
890
+ };
891
+ }
892
+ //#endregion
893
+ //#region ../core/src/cloud/version-history-provider.ts
894
+ function N(e) {
895
+ return {
896
+ id: e.id,
897
+ createdAt: e.createdAt,
898
+ isAutomatic: e.isAutomatic,
899
+ content: e.content
900
+ };
901
+ }
902
+ function ae(e) {
903
+ let t = new y(e);
904
+ return {
905
+ async list(e) {
906
+ return { versions: (await t.getVersions(e)).map(N) };
907
+ },
908
+ async get(e, n) {
909
+ return (await t.getVersion(e, n)).content;
910
+ },
911
+ async create(e, n, r) {
912
+ return N(await t.createVersion(e, n, r?.label));
913
+ },
914
+ restore(e, n) {
915
+ return t.restoreVersion(e, n);
916
+ }
917
+ };
918
+ }
919
+ //#endregion
920
+ //#region ../core/src/cloud/test-email.ts
921
+ function oe(e) {
922
+ let { authManager: n, isAuthReady: a } = e, o = t(null);
923
+ a && r(a, (e) => {
924
+ e && (o.value = n.testEmailConfig);
925
+ }, { immediate: !0 });
926
+ let s = i(() => o.value !== null), c = i(() => o.value?.allowedEmails ?? []);
927
+ function l() {
928
+ return o.value?.signature ?? null;
929
+ }
930
+ return {
931
+ isEnabled: s,
932
+ allowedEmails: c,
933
+ getSignature: l
934
+ };
935
+ }
936
+ //#endregion
937
+ //#region ../core/src/cloud/test-email-provider.ts
938
+ function se(e) {
939
+ let t = new y(e.authManager);
940
+ return {
941
+ get allowedRecipients() {
942
+ return e.allowedEmails.value;
943
+ },
944
+ async send({ recipient: n }) {
945
+ let r = e.getSignature();
946
+ if (r === null) throw Error("Test email is not enabled for this project");
947
+ let i = e.getTemplateId();
948
+ if (i === null) throw Error("Template must be saved before sending a test email");
949
+ await e.save();
950
+ let { html: a } = await e.exportHtml(i);
951
+ e.onBeforeTestEmail && (a = await e.onBeforeTestEmail(a)), await t.sendTestEmail(i, {
952
+ recipient: n,
953
+ html: a,
954
+ allowedEmails: e.allowedEmails.value,
955
+ signature: r
956
+ });
957
+ }
958
+ };
959
+ }
960
+ //#endregion
961
+ //#region ../core/src/cloud/plan-config.ts
962
+ function ce(e) {
963
+ let { authManager: n, onError: r } = e, a = t(null), o = t(!1), s = new y(n), c = i(() => a.value?.features ?? null);
964
+ function l(e) {
965
+ return a.value?.features[e] ?? !1;
966
+ }
967
+ async function u() {
968
+ if (!o.value) {
969
+ o.value = !0;
970
+ try {
971
+ a.value = await s.fetchConfig();
972
+ } catch (e) {
973
+ r?.(e instanceof Error ? e : Error("Failed to fetch config", { cause: e }));
974
+ } finally {
975
+ o.value = !1;
976
+ }
977
+ }
978
+ }
979
+ return {
980
+ config: a,
981
+ isLoading: o,
982
+ hasFeature: l,
983
+ features: c,
984
+ fetchConfig: u
985
+ };
986
+ }
987
+ //#endregion
988
+ //#region ../core/src/cloud/health-check.ts
989
+ var P = 5e3;
990
+ function F(e) {
991
+ return e.authManager ? e.authManager.resolveUrl(v.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${v.health}`;
992
+ }
993
+ async function I(e, t) {
994
+ let n = performance.now();
995
+ try {
996
+ let r = t ? await t.authenticatedFetch(v.health, {
997
+ method: "GET",
998
+ headers: { Accept: "application/json" }
999
+ }) : await fetch(e, {
1000
+ method: "GET",
1001
+ headers: { Accept: "application/json" }
1002
+ }), i = Math.round(performance.now() - n);
1003
+ if (r.status === 401) return {
1004
+ api: {
1005
+ ok: !0,
1006
+ latency: i
1007
+ },
1008
+ auth: {
1009
+ ok: !1,
1010
+ error: "HTTP 401"
1011
+ }
1012
+ };
1013
+ if (!r.ok) return {
1014
+ api: {
1015
+ ok: !1,
1016
+ latency: i
1017
+ },
1018
+ auth: {
1019
+ ok: !t,
1020
+ error: t ? `HTTP ${r.status}` : void 0
1021
+ }
1022
+ };
1023
+ let a = await r.json();
1024
+ return {
1025
+ api: {
1026
+ ok: a.status === "ok",
1027
+ latency: i
1028
+ },
1029
+ auth: { ok: !0 },
1030
+ wsConfig: a.websocket
1031
+ };
1032
+ } catch (e) {
1033
+ return {
1034
+ api: {
1035
+ ok: !1,
1036
+ latency: Math.round(performance.now() - n)
1037
+ },
1038
+ auth: {
1039
+ ok: !t,
1040
+ error: t ? e instanceof Error ? e.message : "Authentication check failed" : void 0
1041
+ }
1042
+ };
1043
+ }
1044
+ }
1045
+ async function L(e) {
1046
+ if (!e?.host || !e?.appKey) return {
1047
+ ok: !1,
1048
+ error: "WebSocket configuration not available"
1049
+ };
1050
+ if (typeof WebSocket > "u") return {
1051
+ ok: !1,
1052
+ error: "WebSocket not supported in this environment"
1053
+ };
1054
+ let t = `${e.port === 443 ? "wss" : "ws"}://${e.host}:${e.port}/app/${e.appKey}?protocol=7&client=js&version=8.4.0-rc2&flash=false`;
1055
+ return new Promise((e) => {
1056
+ let n = null, r = setTimeout(() => {
1057
+ n?.close(), e({
1058
+ ok: !1,
1059
+ error: "WebSocket connection timed out"
1060
+ });
1061
+ }, P);
1062
+ try {
1063
+ n = new WebSocket(t);
1064
+ } catch (t) {
1065
+ clearTimeout(r), e({
1066
+ ok: !1,
1067
+ error: t instanceof Error ? t.message : "WebSocket connection failed"
1068
+ });
1069
+ return;
1070
+ }
1071
+ n.onopen = () => {
1072
+ clearTimeout(r), n?.close(), e({ ok: !0 });
1073
+ }, n.onerror = () => {
1074
+ clearTimeout(r), e({
1075
+ ok: !1,
1076
+ error: "WebSocket connection failed"
1077
+ });
1078
+ };
1079
+ });
1080
+ }
1081
+ async function R(e = {}) {
1082
+ let t = await I(F(e), e.authManager), n = await L(t.wsConfig);
1083
+ return {
1084
+ api: t.api,
1085
+ websocket: n,
1086
+ auth: t.auth,
1087
+ overall: t.api.ok && t.auth.ok
1088
+ };
1089
+ }
1090
+ //#endregion
1091
+ //#region src/cloud/composables/useCloudFeatureFlags.ts
1092
+ function z(e) {
1093
+ let { planConfigInstance: t, getTemplateId: n } = e;
1094
+ return {
1095
+ canSendTestEmail: i(() => t.hasFeature("testEmail")),
1096
+ hasTemplateSaved: i(() => n() !== null),
1097
+ templateLimit: i(() => t.config.value?.limits.maxTemplates ?? null),
1098
+ templateCount: i(() => t.config.value?.templateCount ?? 0)
1099
+ };
1100
+ }
1101
+ //#endregion
1102
+ //#region src/cloud/composables/useCloudPanelState.ts
1103
+ function B() {
1104
+ let e = t(null);
1105
+ return {
1106
+ activePanel: e,
1107
+ commentsOpen: i({
1108
+ get: () => e.value === "comments",
1109
+ set: (t) => e.value = t ? "comments" : null
1110
+ }),
1111
+ rightPanelOpen: i(() => e.value !== null)
1112
+ };
1113
+ }
1114
+ //#endregion
1115
+ //#region src/cloud/composables/useCloudSaveGate.ts
1116
+ function V(e) {
1117
+ let n = t(!1), r = null, a = i(() => e.planConfig.value?.accessibility?.blockOnError === !0), o = i(() => a.value ? e.issues.value.filter((e) => e.severity === "error") : []), s = i(() => o.value.length > 0);
1118
+ async function c(e) {
1119
+ return s.value ? (r = e, n.value = !0, !1) : (await e(), !0);
1120
+ }
1121
+ async function l(e) {
1122
+ return !s.value && (await e(), !0);
1123
+ }
1124
+ async function u() {
1125
+ let e = r;
1126
+ r = null, n.value = !1, e && await e();
1127
+ }
1128
+ function d() {
1129
+ r = null, n.value = !1;
1130
+ }
1131
+ return {
1132
+ shouldBlock: s,
1133
+ blockingIssues: o,
1134
+ modalOpen: n,
1135
+ tryRunSave: c,
1136
+ runUnlessBlocked: l,
1137
+ confirmAndSave: u,
1138
+ cancel: d
1139
+ };
1140
+ }
1141
+ //#endregion
1142
+ //#region src/cloud/collectSavedBlockIds.ts
1143
+ function H(e) {
1144
+ let t = /* @__PURE__ */ new Set();
1145
+ return U(e?.content?.blocks, t), t;
1146
+ }
1147
+ function U(e, t) {
1148
+ if (e) {
1149
+ for (let n of e) if (t.add(n.id), n.children) {
1150
+ if (n.type === "section") for (let e of n.children) U(e, t);
1151
+ else n.type === "wrapper" && U(n.children, t);
1152
+ }
1153
+ }
1154
+ }
1155
+ //#endregion
1156
+ //#region src/cloud/createCloudRuntime.ts
1157
+ function W(e) {
1158
+ if (!e) return {};
1159
+ let { onSaved: t, onCreated: n, onLoaded: r } = e;
1160
+ return {
1161
+ ...typeof t == "function" ? { onSaved: t } : {},
1162
+ ...typeof n == "function" ? { onCreated: n } : {},
1163
+ ...typeof r == "function" ? { onLoaded: r } : {}
1164
+ };
1165
+ }
1166
+ function le(e) {
1167
+ if (!e) return {};
1168
+ let { onCreated: t, onUpdated: n, onDeleted: r, onResolved: i, onUnresolved: a } = e;
1169
+ return {
1170
+ ...typeof t == "function" ? { onCreated: t } : {},
1171
+ ...typeof n == "function" ? { onUpdated: n } : {},
1172
+ ...typeof r == "function" ? { onDeleted: r } : {},
1173
+ ...typeof i == "function" ? { onResolved: i } : {},
1174
+ ...typeof a == "function" ? { onUnresolved: a } : {}
1175
+ };
1176
+ }
1177
+ function ue(e) {
1178
+ if (typeof e != "object" || !e) return {};
1179
+ let { onCreated: t, onUpdated: n, onDeleted: r } = e;
1180
+ return {
1181
+ ...typeof t == "function" ? { onCreated: t } : {},
1182
+ ...typeof n == "function" ? { onUpdated: n } : {},
1183
+ ...typeof r == "function" ? { onDeleted: r } : {}
1184
+ };
1185
+ }
1186
+ function de(e) {
1187
+ if (typeof e != "object" || !e) return {};
1188
+ let { onSent: t, defaultRecipient: n } = e;
1189
+ return {
1190
+ ...typeof t == "function" ? { onSent: t } : {},
1191
+ ...typeof n == "string" ? { defaultRecipient: n } : {}
1192
+ };
1193
+ }
1194
+ function fe(e) {
1195
+ if (typeof e != "object" || !e) return {};
1196
+ let { onCreated: t, onUpdated: n, onDeleted: r } = e;
1197
+ return {
1198
+ ...typeof t == "function" ? { onCreated: t } : {},
1199
+ ...typeof n == "function" ? { onUpdated: n } : {},
1200
+ ...typeof r == "function" ? { onDeleted: r } : {}
1201
+ };
1202
+ }
1203
+ function pe(e) {
1204
+ if (!e) return {};
1205
+ let { onCreated: t, onRestored: n } = e;
1206
+ return {
1207
+ ...typeof t == "function" ? { onCreated: t } : {},
1208
+ ...typeof n == "function" ? { onRestored: n } : {}
1209
+ };
1210
+ }
1211
+ function G(e) {
1212
+ return e.length < 2 ? e.join("") : e.length === 2 ? e.join(" and ") : `${e.slice(0, -1).join(", ")} and ${e[e.length - 1]}`;
1213
+ }
1214
+ async function K(e) {
1215
+ let { config: i, cloudTranslations: a } = e, f = null, p = null, m = null, h = null, g = t(null), _ = t(null);
1216
+ function v() {
1217
+ if (!f) throw Error("[Templatical] The Cloud editor is not mounted yet.");
1218
+ return f;
1219
+ }
1220
+ function y() {
1221
+ return f?.state.template?.id ?? null;
1222
+ }
1223
+ let b = new d({
1224
+ ...i.auth,
1225
+ onError: (e) => {
1226
+ u(e) && (g.value = e), i.onError?.(e);
1227
+ }
1228
+ }), S = ce({
1229
+ authManager: b,
1230
+ onError: i.onError
1231
+ });
1232
+ await b.initialize();
1233
+ let C = await R({ authManager: b });
1234
+ if (!C.api.ok) throw Error("Health check failed: API is not reachable");
1235
+ if (!C.auth.ok) throw Error(`Health check failed: authentication error${C.auth.error ? ` - ${C.auth.error}` : ""}`);
1236
+ C.websocket.ok || c.warn("WebSocket health check failed:", C.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await S.fetchConfig(), g.value = null;
1237
+ let w = i.templates, T = [
1238
+ "load",
1239
+ "create",
1240
+ "save"
1241
+ ].filter((e) => w?.[e] !== void 0);
1242
+ T.length > 0 && c.warn(`initCloud ignores ${G(T.map((e) => `templates.${e}`))} — the template id is the join key for version history, comments and the server-side export, so an id Cloud never issued would break them. Your event handlers were kept. Use init() to bring your own storage.`);
1243
+ let E = i.versionHistory, D = [
1244
+ "list",
1245
+ "get",
1246
+ "create",
1247
+ "restore"
1248
+ ].filter((e) => E?.[e] !== void 0);
1249
+ D.length > 0 && c.warn(`initCloud ignores ${G(D.map((e) => `versionHistory.${e}`))} — a version is keyed to a template id Cloud issued, so Cloud owns its history. Your event handlers were kept. Use init() to bring your own storage.`);
1250
+ let O = i.comments, A = [
1251
+ "list",
1252
+ "create",
1253
+ "update",
1254
+ "delete",
1255
+ "setResolved",
1256
+ "subscribe"
1257
+ ].filter((e) => O?.[e] !== void 0);
1258
+ A.length > 0 && c.warn(`initCloud ignores ${G(A.map((e) => `comments.${e}`))} — a comment is keyed to a template id Cloud issued, and its author is signed by the auth token, so Cloud owns the conversation. Your event handlers were kept. Use init() to bring your own storage.`), i.render && c.warn("initCloud does not accept a `render` provider — Cloud renders server-side for test email, sends and exports, so a supplied renderer would change only what you preview and export, never what Cloud delivers. The supplied provider is ignored. For your own MJML, call renderToMjml(editor.getContent()) from @templatical/renderer."), i.ai !== void 0 && c.warn("initCloud does not take an `ai` key yet — Cloud's AI arrives as its own provider in a later release. The key is ignored. To bring your own AI backend, use init({ ai }).");
1259
+ function N(e) {
1260
+ let t = S.config.value?.websocket;
1261
+ m && t && m.connect(e.id, x(t));
1262
+ }
1263
+ let P = re(b), F = P.create, I = P.save, L = {
1264
+ ...W(i.templates),
1265
+ load: async (e) => {
1266
+ let t = await P.load(e);
1267
+ return N(t), t;
1268
+ },
1269
+ create: typeof F == "function" ? async (e) => {
1270
+ let t = await F(e);
1271
+ return N(t), t;
1272
+ } : !1,
1273
+ save: typeof I == "function" ? async (e, t) => {
1274
+ if (p && f) {
1275
+ let e = p.registry;
1276
+ await l(f.content.value, {
1277
+ renderCustomBlock: e.renderCustomBlock,
1278
+ getCustomBlockStylesheet: (t) => e.getDefinition(t)?.stylesheet
1279
+ });
1280
+ }
1281
+ return I(e, t);
1282
+ } : !1
1283
+ }, U = M({
1284
+ authManager: b,
1285
+ getTemplateId: y,
1286
+ save: () => v().save()
1287
+ }), K = {
1288
+ ...pe(i.versionHistory),
1289
+ ...ae(b)
1290
+ }, me = {
1291
+ ...le(i.comments),
1292
+ ...ee({
1293
+ authManager: b,
1294
+ channel: _,
1295
+ getSocketId: () => m?.getSocketId() ?? null
1296
+ })
1297
+ }, he = b.userConfig ? {
1298
+ id: b.userConfig.id,
1299
+ name: b.userConfig.name
1300
+ } : void 0, q = typeof i.savedBlocks?.list == "function" ? i.savedBlocks : null;
1301
+ if (q === null && typeof i.savedBlocks == "object" && i.savedBlocks !== null) {
1302
+ let e = i.savedBlocks, t = [
1303
+ "list",
1304
+ "create",
1305
+ "update",
1306
+ "delete"
1307
+ ].filter((t) => e[t] !== void 0);
1308
+ t.length > 0 && c.warn(`initCloud ignores ${G(t.map((e) => `savedBlocks.${e}`))} — a provider needs a working list to replace Cloud's store, and this value has none, so it configures Cloud's own store instead. Your event handlers were kept. Use init() to bring your own storage.`);
1309
+ }
1310
+ let J = i.savedBlocks === !1 ? void 0 : q ?? {
1311
+ ...ue(i.savedBlocks),
1312
+ ...ne(b)
1313
+ }, Y = oe({
1314
+ authManager: b,
1315
+ isAuthReady: t(!0)
1316
+ }), ge = j({ authManager: b }), X = typeof i.testEmail?.send == "function" ? i.testEmail : null;
1317
+ if (X === null && typeof i.testEmail == "object" && i.testEmail !== null) {
1318
+ let e = i.testEmail, t = [
1319
+ "send",
1320
+ "includeMjml",
1321
+ "allowedRecipients"
1322
+ ].filter((t) => e[t] !== void 0);
1323
+ t.length > 0 && c.warn(`initCloud ignores ${G(t.map((e) => `testEmail.${e}`))} — a provider needs a working send to replace Cloud's sender outright, and Cloud renders server-side with the signed allowlist from your project's JWT either way, so none of these apply here. Your event handlers were kept.`);
1324
+ }
1325
+ let _e = X ?? Object.assign(se({
1326
+ authManager: b,
1327
+ getTemplateId: y,
1328
+ save: () => v().save(),
1329
+ exportHtml: (e) => ge.exportHtml(e, ie(i.fonts)),
1330
+ allowedEmails: Y.allowedEmails,
1331
+ getSignature: Y.getSignature,
1332
+ onBeforeTestEmail: i.onBeforeTestEmail
1333
+ }), de(i.testEmail)), Z = typeof i.media?.list == "function" ? i.media : null;
1334
+ if (Z === null && typeof i.media == "object" && i.media !== null) {
1335
+ let e = i.media, t = [
1336
+ "list",
1337
+ "create",
1338
+ "update",
1339
+ "delete"
1340
+ ].filter((t) => e[t] !== void 0);
1341
+ t.length > 0 && c.warn(`initCloud ignores ${G(t.map((e) => `media.${e}`))} — a provider needs a working list to replace Cloud's store, and this value has none, so it configures Cloud's own store instead. Your event handlers were kept. Use init() to bring your own storage.`);
1342
+ let n = ["maxFileSize", "mimeTypes"].filter((t) => e[t] !== void 0);
1343
+ n.length > 0 && c.warn(`initCloud ignores ${G(n.map((e) => `media.${e}`))} — Cloud's plan owns those limits whenever Cloud's store is in play. Your event handlers were kept.`);
1344
+ }
1345
+ let Q = i.media === !1 ? void 0 : Z ?? Object.assign(k(b, () => S.config.value), fe(i.media)), $ = z({
1346
+ planConfigInstance: S,
1347
+ getTemplateId: y
1348
+ });
1349
+ function ve(e) {
1350
+ f = e.editor, n(s, a), n(o, b);
1351
+ let t = te({
1352
+ authManager: b,
1353
+ onError: i.onError
1354
+ });
1355
+ return m = t, r(t.channel, (e) => {
1356
+ _.value = e;
1357
+ }, { immediate: !0 }), {
1358
+ websocket: t,
1359
+ panelState: B(),
1360
+ featureFlags: $
1361
+ };
1362
+ }
1363
+ function ye(e) {
1364
+ let { core: n, capabilities: r } = e;
1365
+ return p = n, h = V({
1366
+ issues: n.templateLint ? n.templateLint.issues : t([]),
1367
+ planConfig: S.config
1368
+ }), r.plan = S, i.customBlocks?.length && n.registerCustomBlocks(i.customBlocks), i.theme && (n.themeOverrides.value = i.theme), {
1369
+ saveGate: h,
1370
+ sessionError: g,
1371
+ retry: async () => {
1372
+ try {
1373
+ await b.initialize(), g.value = null;
1374
+ } catch (e) {
1375
+ g.value = e instanceof Error ? e : /* @__PURE__ */ Error("Authentication failed");
1376
+ }
1377
+ }
1378
+ };
1379
+ }
1380
+ return {
1381
+ runtime: {
1382
+ isSavedBlocksAvailable: q ? () => !0 : () => i.savedBlocks !== !1 && S.hasFeature("savedModules"),
1383
+ isTestEmailAvailable: X ? () => !0 : () => Y.isEnabled.value && $.canSendTestEmail.value && $.hasTemplateSaved.value,
1384
+ isCommentsAvailable: () => i.comments !== !1 && S.hasFeature("commenting") && $.hasTemplateSaved.value,
1385
+ isBlockSaved: (e) => H(f?.state.template ?? null).has(e),
1386
+ getSaveGate: () => h,
1387
+ attach: ve,
1388
+ ready: ye,
1389
+ destroy() {
1390
+ m?.disconnect(), i.onUnmount?.();
1391
+ }
1392
+ },
1393
+ providers: {
1394
+ templates: L,
1395
+ render: U,
1396
+ versionHistory: K,
1397
+ ...J ? { savedBlocks: J } : {},
1398
+ testEmail: _e,
1399
+ comments: me,
1400
+ ...Q ? { media: Q } : {}
1401
+ },
1402
+ user: he
1403
+ };
1404
+ }
1405
+ //#endregion
1406
+ export { K as bootstrapCloud };
1407
+
1408
+ //# sourceMappingURL=createCloudRuntime-DpBWhrv3.js.map