@templatical/editor 0.48.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.
- package/README.md +1 -1
- package/dist/{AiChatSidebar-DxPHFNoT.js → AiChatSidebar-CdjTb9ej.js} +14 -14
- package/dist/{AiFeatureMenu-C8GVqu1d.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
- package/dist/{BlockIssueBadge-BShkuJis.js → BlockIssueBadge-BdpJwim0.js} +5 -5
- package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-D_sowkf0.js} +8 -8
- package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
- package/dist/{CloudPanels-Dgw7tb4R.js → CloudPanels-1hwFiJ0G.js} +39 -68
- package/dist/CollaborationNotices-BWpKzueF.js +73 -0
- package/dist/CollaboratorBar-D87phJsw.js +123 -0
- package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-BUvUzO3T.js} +2 -2
- package/dist/{CommentsSidebar-BOqj16Al.js → CommentsSidebar-J65znlrH.js} +14 -14
- package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
- package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CLMIwfK7.js} +7 -7
- package/dist/{DesignReferenceSidebar-BWAi3eQQ.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
- package/dist/{IssuesPanel-C-x3I012.js → IssuesPanel-DeeVsfG7.js} +8 -8
- package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
- package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
- package/dist/{MediaEditModal-ByOvznRC.js → MediaEditModal-C_wxoUMG.js} +3 -3
- package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-BVXDkqtH.js} +2 -2
- package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-BEw_r0PJ.js} +3 -3
- package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
- package/dist/{ParagraphEditor-BVjOwwHx.js → ParagraphEditor-zLV44z-R.js} +19 -19
- package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
- package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-CsvniFlI.js} +9 -9
- package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-DzWURF_e.js} +12 -12
- package/dist/{SavedBlocksBrowserModal-DbmIS5uK.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
- package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
- package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
- package/dist/{TemplateScoringPanel-ynbGl-sr.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
- package/dist/{TemplateSettings-Bi01S3H3.js → TemplateSettings-Cu5X9DgA.js} +11 -11
- package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-BeRYV3eg.js} +14 -14
- package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-B8c3fQi2.js} +2 -2
- package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-CvpNUoAp.js} +11 -11
- package/dist/{ToggleSwitch-Ozc7YU38.js → ToggleSwitch-DHweVJOr.js} +2 -2
- package/dist/{Toolbar-B-2lO0I8.js → Toolbar-BadDSkkF.js} +426 -429
- package/dist/{TplModal-Bz4-IZ9R.js → TplModal-BZgi9Tes.js} +5 -5
- package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
- package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
- package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-F-811aps.js} +4 -4
- package/dist/{WrapperBlock-D0qgNqjD.js → WrapperBlock-DiiaxpMb.js} +5 -5
- package/dist/{blockTypeIcons-CEDZytqP.js → blockTypeIcons-CayLluou.js} +2 -2
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-CbNzJM3I.js → ca-DSJwJ5ov.js} +23 -1
- package/dist/cdn/chunks/{AiChatSidebar-Dk0rJBQN.js → AiChatSidebar-yXJ85Zcg.js} +8 -8
- package/dist/cdn/chunks/{AiChatSidebar-Dk0rJBQN.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B7b0w8ZS.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B7b0w8ZS.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-m2tWRyWv.js} +8 -8
- package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js.map → BlockPreviewCanvas-m2tWRyWv.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-B4fhuwc_.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-awqHfJqC.js → CloudPanels-XufhBZYF.js} +38 -67
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js → CommentsPanel-R8YLLO3v.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js → CommentsSidebar-96NZHVq3.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-tmiTPEXm.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BW9cHnA9.js → DesignReferenceSidebar-D14IIu_P.js} +39 -39
- package/dist/cdn/chunks/{DesignReferenceSidebar-BW9cHnA9.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-cXf9ywA4.js → IssuesPanel-BoPiCLGc.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-cXf9ywA4.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-BJ2t2vxC.js} +20 -20
- package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-zXfcArr4.js → MediaEditModal-DD0SZ-S3.js} +3 -3
- package/dist/cdn/chunks/{MediaEditModal-zXfcArr4.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js → MediaPanels-CkdJ_kGp.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-7wXX71DH.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D4aq9eeC.js → ParagraphEditor-CJQjRHXV.js} +29 -29
- package/dist/cdn/chunks/{ParagraphEditor-D4aq9eeC.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js → RestoreVersionDialog-C5cxBRKi.js} +6 -6
- package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-BKbjUnPM.js} +10 -10
- package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-BrWqJCSP.js → TemplateScoringPanel-BBPnHILC.js} +6 -6
- package/dist/cdn/chunks/{TemplateScoringPanel-BrWqJCSP.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js → TemplateSettings-CtrzzQWl.js} +10 -10
- package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-DuZKYMWD.js} +13 -13
- package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js → TestEmailPanel-DERaCdpG.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js → TitleEditor-CEgxjtUX.js} +14 -14
- package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-BB-bQADJ.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-BB-bQADJ.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-C_x2TfFk.js → Toolbar-GFIZQHzw.js} +440 -443
- package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-DDrbWJcE.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-DDrbWJcE.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-MlxsUmuT.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js → WrapperBlock-CFuP4R0c.js} +6 -6
- package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js.map → WrapperBlock-CFuP4R0c.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js → blockTypeIcons-BnAd8qsP.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js.map → blockTypeIcons-BnAd8qsP.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CbNzJM3I.js → ca-DSJwJ5ov.js} +24 -2
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
- package/dist/{cloud-B5xwm_4X.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-Vd0N4elZ.js → createCloudRuntime-DiYCJ21w.js} +127 -169
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
- package/dist/{de-DMquBpZM.js → cdn/chunks/de-CBE6O79z.js} +25 -1
- package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
- package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
- package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
- package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
- package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
- package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-HJBy9kLj.js} +88 -88
- package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
- package/dist/cdn/chunks/{en-C8Mp71sO.js → en-CDexnk0p.js} +24 -2
- package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
- package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
- package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
- package/dist/{es-Byq4tthI.js → cdn/chunks/es-BE42B6uN.js} +25 -1
- package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
- package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-koOuDeZS.js} +23 -23
- package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-koOuDeZS.js.map} +1 -1
- package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-DlJFPDQR.js} +25 -1
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
- package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-CjlNV8xD.js} +46 -46
- package/dist/cdn/chunks/{icons-aTYwH5-g.js.map → icons-CjlNV8xD.js.map} +1 -1
- package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-CUT8gkNI.js} +25 -1
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
- package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
- package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
- package/dist/{nl-ClJ3BY3F.js → cdn/chunks/nl-bXWqqRyS.js} +25 -1
- package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DibcXcmv.js → pt-BR-2_H4-wlb.js} +24 -2
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
- package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
- package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
- package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
- package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
- package/dist/cdn/chunks/{src-DlFlC9Tt.js → src-B1e5SSYP.js} +84 -84
- package/dist/cdn/chunks/{src-DlFlC9Tt.js.map → src-B1e5SSYP.js.map} +1 -1
- package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-B77z1iw4.js} +117 -117
- package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
- package/dist/cdn/chunks/{src-DYCDeBDM.js → src-CvLTYGdO.js} +549 -315
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +6 -0
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
- package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-Bb2UcB20.js → useEditorCore-DpCFvHg_.js} +440 -419
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-X8bc5qNl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-DFoOexIQ.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js → withCurrentFont-D-f61ghC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1319 -1066
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ClwqRMgv.js → check-DQQzkmIC.js} +1 -1
- package/dist/{chevron-down-te6qn-zE.js → chevron-down-CIF4bdon.js} +1 -1
- package/dist/{chevron-right-W2hbH1FM.js → chevron-right-Cg7Xu-ev.js} +1 -1
- package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-Csu7ISD-.js} +1 -1
- package/dist/{circle-alert-CIEGV5DN.js → circle-alert-YUvIJAgY.js} +1 -1
- package/dist/{clock-Y4cx0gkJ.js → clock-CnSIGKQW.js} +1 -1
- package/dist/{cdn/chunks/cloud-BHClP3e2.js → cloud-YUYDtdHt.js} +308 -569
- package/dist/{copy-BEcsAlfB.js → copy-CUC43md_.js} +1 -1
- package/dist/{createCloudRuntime-zNPkF6T9.js → createCloudRuntime-BMDRjL0k.js} +126 -168
- package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-BcP1sjdp.js} +6 -6
- package/dist/{cdn/chunks/de-DMquBpZM.js → de-CBE6O79z.js} +23 -3
- package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
- package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
- package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
- package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
- package/dist/{dist-tsmnQugO.js → dist-DBG3nh3k.js} +503 -273
- package/dist/{editor-modal-AlVLkU91.js → editor-modal--7_9A6j-.js} +20 -20
- package/dist/en-BHCMzqib.js +1 -0
- package/dist/{en-C8Mp71sO.js → en-CDexnk0p.js} +23 -1
- package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
- package/dist/{cdn/chunks/es-Byq4tthI.js → es-BE42B6uN.js} +23 -3
- package/dist/{extensions-pjO8VGkM.js → extensions-zwsZlWjH.js} +23 -23
- package/dist/{eye-Ddnz8nnm.js → eye-B1bua-ck.js} +1 -1
- package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-DlJFPDQR.js} +23 -3
- package/dist/{image-up-CM_HC0Dx.js → image-up-BqiO7KCO.js} +1 -1
- package/dist/index.d.ts +290 -35
- package/dist/{info-DXLmzoeY.js → info-x26nGOo2.js} +1 -1
- package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-CUT8gkNI.js} +23 -3
- package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
- package/dist/{link-Cel46wgo.js → link-CezhndyR.js} +1 -1
- package/dist/{list-Cl0GwiV9.js → list-DQqdptI0.js} +1 -1
- package/dist/{loader-circle-uAwpvfys.js → loader-circle-DCEeoYoi.js} +1 -1
- package/dist/{message-circle-DWU1pTM_.js → message-circle-BLGzfv_7.js} +1 -1
- package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-bXWqqRyS.js} +23 -3
- package/dist/{package-CbyG_yU_.js → package-D_kEQCMU.js} +1 -1
- package/dist/{pencil-BzoDcwKu.js → pencil-Dct8zGLy.js} +1 -1
- package/dist/{plus-8cDvoCjZ.js → plus-BDd0gTEm.js} +1 -1
- package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-CtKJecE-.js} +3 -3
- package/dist/{pt-BR-DibcXcmv.js → pt-BR-2_H4-wlb.js} +23 -1
- package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
- package/dist/{refresh-cw-9WinWixo.js → refresh-cw-tGMRDxr8.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
- package/dist/{search-CqgGq1gG.js → search-Bm2cCQpe.js} +1 -1
- package/dist/{send-Ceo3c9Db.js → send-sVLaKZ7f.js} +1 -1
- package/dist/{shield-check-uDAwur5D.js → shield-check-YhsbXfQc.js} +1 -1
- package/dist/{smartphone-CcLaCpGK.js → smartphone-B2W81p02.js} +1 -1
- package/dist/socialIcons-Bwv-49EB.js +2167 -0
- package/dist/{sparkles-Do9XjAuT.js → sparkles-a1qkBZ8X.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
- package/dist/templatical-editor.js +1409 -1156
- package/dist/{text-align-start-DvzC0HQA.js → text-align-start-CTuwQ5YW.js} +1 -1
- package/dist/timeouts-o5Y9BuqI.js +4 -0
- package/dist/{trash-vlINTx32.js → trash-I3D2peFQ.js} +1 -1
- package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CenxmLRE.js} +1 -1
- package/dist/{upload-CtNOI6J2.js → upload-uU2cK0Ce.js} +1 -1
- package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
- package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
- package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-DRbMRe8F.js} +806 -785
- package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
- package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
- package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-zcI6BWIf.js} +3 -3
- package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-C-iBLlp0.js} +5 -5
- package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
- package/dist/{useScrollToBlock-CXmcHQQN.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
- package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-D62njRLu.js} +1 -1
- package/dist/{x-Cd6SFw8r.js → x-KFQ4S-Kz.js} +1 -1
- package/package.json +12 -12
- package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
- package/dist/CollaboratorBar-5rfopCPx.js +0 -103
- package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
- package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
- package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
- package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
- package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
- package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
- package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
- package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
- package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
- package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
- package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
- package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
- package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
- package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
- package/dist/en-B0FUfNwz.js +0 -1
- package/dist/socialIcons-PTiwhLoC.js +0 -1359
- package/dist/timeouts-Cv2jvusx.js +0 -4
|
@@ -58,12 +58,12 @@ var s = {
|
|
|
58
58
|
"left",
|
|
59
59
|
"center",
|
|
60
60
|
"right"
|
|
61
|
-
],
|
|
61
|
+
], ee = [
|
|
62
62
|
"top",
|
|
63
63
|
"center",
|
|
64
64
|
"bottom"
|
|
65
65
|
];
|
|
66
|
-
function
|
|
66
|
+
function te(e) {
|
|
67
67
|
return {
|
|
68
68
|
url: e,
|
|
69
69
|
size: "cover",
|
|
@@ -74,7 +74,7 @@ function ee(e) {
|
|
|
74
74
|
repeat: !1
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function ne(e) {
|
|
78
78
|
let t = "";
|
|
79
79
|
for (let n of e) {
|
|
80
80
|
let e = n.charCodeAt(0);
|
|
@@ -82,12 +82,12 @@ function p(e) {
|
|
|
82
82
|
}
|
|
83
83
|
return t;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function re(e) {
|
|
86
86
|
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
87
87
|
if (!e || !t) return null;
|
|
88
|
-
let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r &&
|
|
88
|
+
let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r && ee.includes(r.y) ? r.y : "center";
|
|
89
89
|
return {
|
|
90
|
-
url:
|
|
90
|
+
url: ne(t),
|
|
91
91
|
size: n,
|
|
92
92
|
position: `${i} ${a}`,
|
|
93
93
|
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
@@ -95,24 +95,24 @@ function m(e) {
|
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
97
|
//#region ../types/src/hero.ts
|
|
98
|
-
var
|
|
98
|
+
var ie = [
|
|
99
99
|
"top",
|
|
100
100
|
"middle",
|
|
101
101
|
"bottom"
|
|
102
102
|
];
|
|
103
|
-
function
|
|
103
|
+
function ae(e) {
|
|
104
104
|
let t = e.hero;
|
|
105
105
|
if (!t || typeof t != "object") return null;
|
|
106
106
|
if (e.columns !== "1") return {
|
|
107
107
|
applied: !1,
|
|
108
108
|
reason: "columns"
|
|
109
109
|
};
|
|
110
|
-
let n =
|
|
110
|
+
let n = re(e.backgroundImage);
|
|
111
111
|
if (n === null) return {
|
|
112
112
|
applied: !1,
|
|
113
113
|
reason: "image"
|
|
114
114
|
};
|
|
115
|
-
let r =
|
|
115
|
+
let r = f(e.backgroundImage), i = oe(t.height) ? Math.round(t.height) : "image";
|
|
116
116
|
return i === "image" && r === null ? {
|
|
117
117
|
applied: !1,
|
|
118
118
|
reason: "size"
|
|
@@ -120,20 +120,20 @@ function ne(e) {
|
|
|
120
120
|
applied: !0,
|
|
121
121
|
image: n,
|
|
122
122
|
height: i,
|
|
123
|
-
verticalAlign:
|
|
123
|
+
verticalAlign: ie.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
124
124
|
aspectRatio: r
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function oe(e) {
|
|
128
128
|
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function f(e) {
|
|
131
131
|
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
132
132
|
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region ../types/src/social.ts
|
|
136
|
-
var
|
|
136
|
+
var p = {
|
|
137
137
|
facebook: {
|
|
138
138
|
color: "#1877F2",
|
|
139
139
|
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"
|
|
@@ -202,93 +202,354 @@ var g = {
|
|
|
202
202
|
color: "#1769FF",
|
|
203
203
|
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"
|
|
204
204
|
}
|
|
205
|
-
},
|
|
205
|
+
}, m = {
|
|
206
206
|
dark: "#1f1f1f",
|
|
207
207
|
light: "#ffffff"
|
|
208
208
|
};
|
|
209
|
-
function
|
|
209
|
+
function h(e) {
|
|
210
210
|
return e === "dark" || e === "light" ? e : void 0;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
let n =
|
|
212
|
+
function se(e, t) {
|
|
213
|
+
let n = h(t);
|
|
214
214
|
return {
|
|
215
|
-
fill: n ?
|
|
216
|
-
onFill: n === "light" ?
|
|
215
|
+
fill: n ? m[n] : p[e].color,
|
|
216
|
+
onFill: n === "light" ? m.dark : "#ffffff"
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
let n =
|
|
219
|
+
function ce(e, t) {
|
|
220
|
+
let n = h(t);
|
|
221
221
|
return n ? `${e}-${n}` : e;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
if (
|
|
225
|
-
color:
|
|
223
|
+
function le(e, t) {
|
|
224
|
+
if (h(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
225
|
+
color: m.light,
|
|
226
226
|
opacity: .6,
|
|
227
227
|
width: 1.4
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ue(e) {
|
|
231
231
|
return e === "plain" ? .84 : .6;
|
|
232
232
|
}
|
|
233
233
|
//#endregion
|
|
234
|
+
//#region ../types/src/clone.ts
|
|
235
|
+
function g(e) {
|
|
236
|
+
let t = [];
|
|
237
|
+
return JSON.parse(JSON.stringify(e, function(e, n) {
|
|
238
|
+
if (typeof n != "object" || !n) return n;
|
|
239
|
+
for (; t.length > 0 && t[t.length - 1] !== this;) t.pop();
|
|
240
|
+
if (!t.includes(n)) return t.push(n), n;
|
|
241
|
+
}));
|
|
242
|
+
}
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region ../types/src/deep-equal.ts
|
|
245
|
+
function de(e) {
|
|
246
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
247
|
+
}
|
|
248
|
+
function _(e, t) {
|
|
249
|
+
if (e === t) return !0;
|
|
250
|
+
if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => _(e, t[n]));
|
|
251
|
+
if (de(e)) {
|
|
252
|
+
if (!de(t)) return !1;
|
|
253
|
+
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
254
|
+
for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !_(e[r], t[r])) return !1;
|
|
255
|
+
return !0;
|
|
256
|
+
}
|
|
257
|
+
return !1;
|
|
258
|
+
}
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region ../types/src/operations.ts
|
|
261
|
+
var fe = class extends Error {
|
|
262
|
+
code;
|
|
263
|
+
opIndex;
|
|
264
|
+
blockId;
|
|
265
|
+
constructor(e, t, n, r) {
|
|
266
|
+
super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
function pe(e) {
|
|
270
|
+
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
271
|
+
}
|
|
272
|
+
function me(e, t, n = {}) {
|
|
273
|
+
let r = g(e);
|
|
274
|
+
return v(r, t, n), r;
|
|
275
|
+
}
|
|
276
|
+
function v(e, t, n = {}) {
|
|
277
|
+
let r = {
|
|
278
|
+
locks: n.locks ?? [],
|
|
279
|
+
session: n.session ?? null
|
|
280
|
+
};
|
|
281
|
+
t.forEach((t, n) => be(e, t, n, r));
|
|
282
|
+
}
|
|
283
|
+
var he = /* @__PURE__ */ new Set([
|
|
284
|
+
"id",
|
|
285
|
+
"type",
|
|
286
|
+
"children"
|
|
287
|
+
]), ge = /* @__PURE__ */ new Set();
|
|
288
|
+
function y(e, t, n, r) {
|
|
289
|
+
throw new fe(e, t, n, r);
|
|
290
|
+
}
|
|
291
|
+
function b(e) {
|
|
292
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
293
|
+
}
|
|
294
|
+
function x(e) {
|
|
295
|
+
return e.type === "section";
|
|
296
|
+
}
|
|
297
|
+
function S(e) {
|
|
298
|
+
return Array.isArray(e.blocks) ? e.blocks : [];
|
|
299
|
+
}
|
|
300
|
+
function _e(e) {
|
|
301
|
+
let t = e.children;
|
|
302
|
+
return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
|
|
303
|
+
}
|
|
304
|
+
function C(e, t) {
|
|
305
|
+
let n = S(e);
|
|
306
|
+
for (let e = 0; e < n.length; e++) {
|
|
307
|
+
let r = n[e];
|
|
308
|
+
if (!b(r)) continue;
|
|
309
|
+
if (r.id === t) return {
|
|
310
|
+
block: r,
|
|
311
|
+
list: n,
|
|
312
|
+
index: e,
|
|
313
|
+
parent: null
|
|
314
|
+
};
|
|
315
|
+
if (!x(r) || typeof r.id != "string") continue;
|
|
316
|
+
let i = r.children;
|
|
317
|
+
if (Array.isArray(i)) for (let e = 0; e < i.length; e++) {
|
|
318
|
+
let n = i[e];
|
|
319
|
+
if (Array.isArray(n)) for (let i = 0; i < n.length; i++) {
|
|
320
|
+
let a = n[i];
|
|
321
|
+
if (b(a) && a.id === t) return {
|
|
322
|
+
block: a,
|
|
323
|
+
list: n,
|
|
324
|
+
index: i,
|
|
325
|
+
parent: {
|
|
326
|
+
sectionId: r.id,
|
|
327
|
+
column: e
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return null;
|
|
334
|
+
}
|
|
335
|
+
function w(e) {
|
|
336
|
+
let t = typeof e.id == "string" ? [e.id] : [];
|
|
337
|
+
if (x(e)) for (let n of _e(e)) t.push(...T(n));
|
|
338
|
+
return t;
|
|
339
|
+
}
|
|
340
|
+
function T(e) {
|
|
341
|
+
return e.flatMap((e) => b(e) ? w(e) : []);
|
|
342
|
+
}
|
|
343
|
+
function E(e, t) {
|
|
344
|
+
return typeof e.blockId != "string" || e.blockId === "" ? y("invalid_operation", t, "blockId must be a block id.") : e.blockId;
|
|
345
|
+
}
|
|
346
|
+
function D(e, t) {
|
|
347
|
+
let n = e.parent;
|
|
348
|
+
return n === null ? null : b(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
|
|
349
|
+
sectionId: n.sectionId,
|
|
350
|
+
column: n.column
|
|
351
|
+
} : y("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
|
|
352
|
+
}
|
|
353
|
+
function O(e, t) {
|
|
354
|
+
let n = e.after;
|
|
355
|
+
return n === null ? null : typeof n == "string" && n !== "" ? n : y("invalid_operation", t, "after must be null or a block id.");
|
|
356
|
+
}
|
|
357
|
+
function k(e, t) {
|
|
358
|
+
let n = e.expect;
|
|
359
|
+
return n == null ? null : b(n) ? n : y("invalid_operation", t, "expect must be an object.");
|
|
360
|
+
}
|
|
361
|
+
function A(e, t, n) {
|
|
362
|
+
let r = e.set ?? null, i = e.unset ?? [];
|
|
363
|
+
(r !== null && !b(r) || !Array.isArray(i) || !i.every((e) => typeof e == "string")) && y("invalid_operation", t, "set must be an object and unset a list of keys.");
|
|
364
|
+
let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
|
|
365
|
+
o.length === 0 && i.length === 0 && y("invalid_operation", t, "Set or unset at least one key.");
|
|
366
|
+
for (let e of [...o, ...i]) n.has(e) && y("invalid_operation", t, `"${e}" can't be set or unset.`);
|
|
367
|
+
let s = i.find((e) => o.includes(e));
|
|
368
|
+
return s !== void 0 && y("invalid_operation", t, `"${s}" is both set and unset.`), {
|
|
369
|
+
set: Object.fromEntries(o.map((e) => [e, a[e]])),
|
|
370
|
+
unset: i
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
function j(e, t, n) {
|
|
374
|
+
if ((!b(e) || typeof e.id != "string" || e.id === "" || typeof e.type != "string") && y("invalid_operation", t, "A block needs a non-empty string id and a string type."), !x(e)) return;
|
|
375
|
+
n && y("invalid_operation", t, "Sections can only be placed at the top level.");
|
|
376
|
+
let r = e.children;
|
|
377
|
+
(!Array.isArray(r) || !r.every((e) => Array.isArray(e))) && y("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
|
|
378
|
+
for (let e of r) for (let n of e) j(n, t, !0);
|
|
379
|
+
}
|
|
380
|
+
function ve(e, t) {
|
|
381
|
+
return e.session === null || t.sessionId !== e.session;
|
|
382
|
+
}
|
|
383
|
+
function M(e, t, n) {
|
|
384
|
+
let r = e.locks.find((n) => t.includes(n.blockId) && ve(e, n));
|
|
385
|
+
r && y("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
|
|
386
|
+
}
|
|
387
|
+
function N(e, t, n, r) {
|
|
388
|
+
for (let [i, a] of Object.entries(t)) a !== void 0 && (_(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || y("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
|
|
389
|
+
}
|
|
390
|
+
function P(e, t, n) {
|
|
391
|
+
if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
|
|
392
|
+
let r = C(e, t.sectionId);
|
|
393
|
+
if (!r) return y("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
|
|
394
|
+
if (!x(r.block)) return y("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
|
|
395
|
+
let i = r.block.children;
|
|
396
|
+
return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? y("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
|
|
397
|
+
}
|
|
398
|
+
function F(e, t, n) {
|
|
399
|
+
if (t === null) return 0;
|
|
400
|
+
let r = e.findIndex((e) => b(e) && e.id === t);
|
|
401
|
+
return r === -1 ? y("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
|
|
402
|
+
}
|
|
403
|
+
function ye(e, t, n, r) {
|
|
404
|
+
let i = pe(t), a = Array.isArray(e.children) ? e.children : [];
|
|
405
|
+
for (let e = i; e < a.length; e++) {
|
|
406
|
+
let t = a[e];
|
|
407
|
+
Array.isArray(t) && t.length > 0 && y("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
|
|
408
|
+
}
|
|
409
|
+
let o = a.slice(0, i);
|
|
410
|
+
for (; o.length < i;) o.push([]);
|
|
411
|
+
e.children = o;
|
|
412
|
+
}
|
|
413
|
+
function I(e, t, n) {
|
|
414
|
+
for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
|
|
415
|
+
value: g(r),
|
|
416
|
+
writable: !0,
|
|
417
|
+
enumerable: !0,
|
|
418
|
+
configurable: !0
|
|
419
|
+
}) : e[n] = g(r);
|
|
420
|
+
for (let t of n) delete e[t];
|
|
421
|
+
}
|
|
422
|
+
function be(e, t, n, r) {
|
|
423
|
+
let i = t;
|
|
424
|
+
switch ((!b(i) || typeof i.op != "string") && y("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
|
|
425
|
+
case "addBlock": return xe(e, i, n);
|
|
426
|
+
case "moveBlock": return Se(e, i, n, r);
|
|
427
|
+
case "deleteBlock": return Ce(e, i, n, r);
|
|
428
|
+
case "updateBlock": return we(e, i, n, r);
|
|
429
|
+
case "updateSettings": return Te(e, i, n);
|
|
430
|
+
case "setContent": return Ee(e, i, n, r);
|
|
431
|
+
default: y("invalid_operation", n, `Unknown operation "${i.op}".`);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
function xe(e, t, n) {
|
|
435
|
+
let r = D(t, n), i = O(t, n), a = t.block;
|
|
436
|
+
j(a, n, r !== null);
|
|
437
|
+
let o = new Set(T(S(e))), s = /* @__PURE__ */ new Set();
|
|
438
|
+
for (let e of w(a)) (o.has(e) || s.has(e)) && y("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
|
|
439
|
+
let c = P(e, r, n);
|
|
440
|
+
c.splice(F(c, i, n), 0, g(a));
|
|
441
|
+
}
|
|
442
|
+
function Se(e, t, n, r) {
|
|
443
|
+
let i = E(t, n), a = D(t, n), o = O(t, n), s = k(t, n), c = C(e, i);
|
|
444
|
+
if (!c) return y("block_missing", n, `No block with id "${i}".`, i);
|
|
445
|
+
if (M(r, w(c.block), n), s) {
|
|
446
|
+
let e = c.index > 0 ? c.list[c.index - 1] : null, t = b(e) ? e.id ?? null : null;
|
|
447
|
+
(!_(c.parent, s.parent ?? null) || !_(t, s.after ?? null)) && y("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
448
|
+
}
|
|
449
|
+
x(c.block) && a !== null && y("invalid_operation", n, "Sections can only be placed at the top level."), o === i && y("invalid_operation", n, "A block can't be placed after itself.");
|
|
450
|
+
let l = P(e, a, n);
|
|
451
|
+
c.list.splice(c.index, 1), l.splice(F(l, o, n), 0, c.block);
|
|
452
|
+
}
|
|
453
|
+
function Ce(e, t, n, r) {
|
|
454
|
+
let i = E(t, n), a = k(t, n), o = C(e, i);
|
|
455
|
+
if (!o) return y("block_missing", n, `No block with id "${i}".`, i);
|
|
456
|
+
M(r, w(o.block), n), a && !_(o.block, a.block ?? null) && y("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
|
|
457
|
+
}
|
|
458
|
+
function we(e, t, n, r) {
|
|
459
|
+
let i = E(t, n), { set: a, unset: o } = A(t, n, he), s = k(t, n), c = C(e, i);
|
|
460
|
+
if (!c) return y("block_missing", n, `No block with id "${i}".`, i);
|
|
461
|
+
let l = c.block, u = x(l);
|
|
462
|
+
u && o.includes("columns") && y("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), M(r, [i], n), s && N(l, s, n, i), u && Object.hasOwn(a, "columns") && ye(l, a.columns, n, i), I(l, a, o);
|
|
463
|
+
}
|
|
464
|
+
function Te(e, t, n) {
|
|
465
|
+
let { set: r, unset: i } = A(t, n, ge), a = k(t, n);
|
|
466
|
+
b(e.settings) || (e.settings = {});
|
|
467
|
+
let o = e.settings;
|
|
468
|
+
a && N(o, a, n), I(o, r, i);
|
|
469
|
+
}
|
|
470
|
+
function Ee(e, t, n, r) {
|
|
471
|
+
let i = t.content;
|
|
472
|
+
if (!b(i) || !Array.isArray(i.blocks) || !b(i.settings)) return y("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
|
|
473
|
+
let a = r.locks.find((e) => ve(r, e));
|
|
474
|
+
a && y("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = g(i.blocks), e.settings = g(i.settings);
|
|
475
|
+
}
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region ../types/src/config.ts
|
|
478
|
+
var De = class extends Error {
|
|
479
|
+
statusCode;
|
|
480
|
+
code;
|
|
481
|
+
constructor(e, t, n) {
|
|
482
|
+
super(e), this.statusCode = t, this.code = n, this.name = "SdkError";
|
|
483
|
+
}
|
|
484
|
+
get isNotFound() {
|
|
485
|
+
return this.statusCode === 404;
|
|
486
|
+
}
|
|
487
|
+
get isUnauthorized() {
|
|
488
|
+
return this.statusCode === 401;
|
|
489
|
+
}
|
|
490
|
+
get isServerError() {
|
|
491
|
+
return this.statusCode !== void 0 && this.statusCode >= 500;
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
//#endregion
|
|
234
495
|
//#region ../types/src/guards.ts
|
|
235
|
-
function
|
|
496
|
+
function L(e) {
|
|
236
497
|
return e.type === "section";
|
|
237
498
|
}
|
|
238
|
-
function
|
|
499
|
+
function Oe(e) {
|
|
239
500
|
return e.type === "title";
|
|
240
501
|
}
|
|
241
|
-
function
|
|
502
|
+
function ke(e) {
|
|
242
503
|
return e.type === "paragraph";
|
|
243
504
|
}
|
|
244
|
-
function
|
|
505
|
+
function Ae(e) {
|
|
245
506
|
return e.type === "image";
|
|
246
507
|
}
|
|
247
|
-
function
|
|
508
|
+
function je(e) {
|
|
248
509
|
return e.type === "button";
|
|
249
510
|
}
|
|
250
|
-
function
|
|
511
|
+
function Me(e) {
|
|
251
512
|
return e.type === "divider";
|
|
252
513
|
}
|
|
253
|
-
function
|
|
514
|
+
function Ne(e) {
|
|
254
515
|
return e.type === "video";
|
|
255
516
|
}
|
|
256
|
-
function
|
|
517
|
+
function Pe(e) {
|
|
257
518
|
return e.type === "social";
|
|
258
519
|
}
|
|
259
|
-
function
|
|
520
|
+
function Fe(e) {
|
|
260
521
|
return e.type === "spacer";
|
|
261
522
|
}
|
|
262
|
-
function
|
|
523
|
+
function Ie(e) {
|
|
263
524
|
return e.type === "html";
|
|
264
525
|
}
|
|
265
|
-
function
|
|
526
|
+
function Le(e) {
|
|
266
527
|
return e.type === "menu";
|
|
267
528
|
}
|
|
268
|
-
function
|
|
529
|
+
function Re(e) {
|
|
269
530
|
return e.type === "table";
|
|
270
531
|
}
|
|
271
|
-
function
|
|
532
|
+
function ze(e) {
|
|
272
533
|
return e.type === "custom";
|
|
273
534
|
}
|
|
274
|
-
function
|
|
535
|
+
function R(e) {
|
|
275
536
|
return e.type === "slot";
|
|
276
537
|
}
|
|
277
|
-
function
|
|
538
|
+
function z(e) {
|
|
278
539
|
return e.type === "wrapper";
|
|
279
540
|
}
|
|
280
541
|
//#endregion
|
|
281
542
|
//#region ../types/src/defaults.ts
|
|
282
|
-
var
|
|
543
|
+
var Be = {
|
|
283
544
|
content: "<p>Enter your title</p>",
|
|
284
545
|
level: 2,
|
|
285
546
|
textAlign: "left"
|
|
286
|
-
},
|
|
547
|
+
}, Ve = { content: "<p>Enter your text here</p>" }, He = {
|
|
287
548
|
src: "",
|
|
288
549
|
alt: "",
|
|
289
550
|
width: "full",
|
|
290
551
|
align: "center"
|
|
291
|
-
},
|
|
552
|
+
}, Ue = {
|
|
292
553
|
text: "Click Here",
|
|
293
554
|
url: "",
|
|
294
555
|
backgroundColor: "#333333",
|
|
@@ -302,36 +563,36 @@ var S = {
|
|
|
302
563
|
left: 24
|
|
303
564
|
},
|
|
304
565
|
align: "center"
|
|
305
|
-
},
|
|
566
|
+
}, We = {
|
|
306
567
|
lineStyle: "solid",
|
|
307
568
|
color: "#e0e0e0",
|
|
308
569
|
thickness: 1,
|
|
309
570
|
width: "full"
|
|
310
|
-
},
|
|
571
|
+
}, Ge = { columns: "1" }, Ke = {
|
|
311
572
|
url: "",
|
|
312
573
|
thumbnailUrl: "",
|
|
313
574
|
alt: "Video",
|
|
314
575
|
width: "full",
|
|
315
576
|
align: "center"
|
|
316
|
-
},
|
|
577
|
+
}, qe = {
|
|
317
578
|
iconStyle: "solid",
|
|
318
579
|
iconSize: "medium",
|
|
319
580
|
spacing: 10,
|
|
320
581
|
align: "center"
|
|
321
|
-
},
|
|
582
|
+
}, Je = { height: 24 }, Ye = { content: "" }, Xe = {
|
|
322
583
|
fontSize: 15,
|
|
323
584
|
textAlign: "center",
|
|
324
585
|
separator: "|",
|
|
325
586
|
separatorColor: "#e0e0e0",
|
|
326
587
|
spacing: 10
|
|
327
|
-
},
|
|
588
|
+
}, Ze = {
|
|
328
589
|
hasHeaderRow: !0,
|
|
329
590
|
borderColor: "#e0e0e0",
|
|
330
591
|
borderWidth: 1,
|
|
331
592
|
cellPadding: 8,
|
|
332
593
|
fontSize: 15,
|
|
333
594
|
textAlign: "left"
|
|
334
|
-
},
|
|
595
|
+
}, Qe = {
|
|
335
596
|
targetDate: "",
|
|
336
597
|
timezone: "UTC",
|
|
337
598
|
showDays: !0,
|
|
@@ -351,21 +612,21 @@ var S = {
|
|
|
351
612
|
expiredMessage: "This offer has expired",
|
|
352
613
|
expiredImageUrl: "",
|
|
353
614
|
hideOnExpiry: !1
|
|
354
|
-
},
|
|
355
|
-
title:
|
|
356
|
-
paragraph:
|
|
357
|
-
image:
|
|
358
|
-
button:
|
|
359
|
-
divider:
|
|
360
|
-
section:
|
|
361
|
-
video:
|
|
362
|
-
social:
|
|
363
|
-
spacer:
|
|
364
|
-
html:
|
|
365
|
-
menu:
|
|
366
|
-
table:
|
|
367
|
-
countdown:
|
|
368
|
-
},
|
|
615
|
+
}, $e = {
|
|
616
|
+
title: Be,
|
|
617
|
+
paragraph: Ve,
|
|
618
|
+
image: He,
|
|
619
|
+
button: Ue,
|
|
620
|
+
divider: We,
|
|
621
|
+
section: Ge,
|
|
622
|
+
video: Ke,
|
|
623
|
+
social: qe,
|
|
624
|
+
spacer: Je,
|
|
625
|
+
html: Ye,
|
|
626
|
+
menu: Xe,
|
|
627
|
+
table: Ze,
|
|
628
|
+
countdown: Qe
|
|
629
|
+
}, et = {
|
|
369
630
|
width: 600,
|
|
370
631
|
backgroundColor: "#ffffff",
|
|
371
632
|
textColor: "#1a1a1a",
|
|
@@ -373,24 +634,24 @@ var S = {
|
|
|
373
634
|
fontFamily: "Arial",
|
|
374
635
|
locale: "en"
|
|
375
636
|
};
|
|
376
|
-
function
|
|
637
|
+
function tt(e) {
|
|
377
638
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
378
639
|
}
|
|
379
|
-
function
|
|
640
|
+
function B(e, t) {
|
|
380
641
|
let n = { ...e };
|
|
381
642
|
for (let r of Object.keys(t)) {
|
|
382
643
|
let i = e[r], a = t[r];
|
|
383
|
-
a !== void 0 && (n[r] =
|
|
644
|
+
a !== void 0 && (n[r] = tt(i) && tt(a) ? B(i, a) : a);
|
|
384
645
|
}
|
|
385
646
|
return n;
|
|
386
647
|
}
|
|
387
648
|
//#endregion
|
|
388
649
|
//#region ../types/src/template.ts
|
|
389
|
-
function
|
|
650
|
+
function nt(e = "Arial", t) {
|
|
390
651
|
return {
|
|
391
652
|
blocks: [],
|
|
392
653
|
settings: {
|
|
393
|
-
...
|
|
654
|
+
...et,
|
|
394
655
|
fontFamily: e,
|
|
395
656
|
...t
|
|
396
657
|
}
|
|
@@ -398,7 +659,7 @@ function Ne(e = "Arial", t) {
|
|
|
398
659
|
}
|
|
399
660
|
//#endregion
|
|
400
661
|
//#region ../types/src/direction.ts
|
|
401
|
-
var
|
|
662
|
+
var rt = [
|
|
402
663
|
"ar",
|
|
403
664
|
"he",
|
|
404
665
|
"iw",
|
|
@@ -412,36 +673,26 @@ var Pe = [
|
|
|
412
673
|
"ckb",
|
|
413
674
|
"ks"
|
|
414
675
|
];
|
|
415
|
-
function
|
|
676
|
+
function it(e) {
|
|
416
677
|
let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
|
|
417
|
-
return !!t &&
|
|
678
|
+
return !!t && rt.includes(t);
|
|
418
679
|
}
|
|
419
|
-
function
|
|
420
|
-
return e.direction === "ltr" || e.direction === "rtl" ? e.direction :
|
|
421
|
-
}
|
|
422
|
-
//#endregion
|
|
423
|
-
//#region ../types/src/clone.ts
|
|
424
|
-
function E(e) {
|
|
425
|
-
let t = [];
|
|
426
|
-
return JSON.parse(JSON.stringify(e, function(e, n) {
|
|
427
|
-
if (typeof n != "object" || !n) return n;
|
|
428
|
-
for (; t.length > 0 && t[t.length - 1] !== this;) t.pop();
|
|
429
|
-
if (!t.includes(n)) return t.push(n), n;
|
|
430
|
-
}));
|
|
680
|
+
function at(e) {
|
|
681
|
+
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : it(e.locale) ? "rtl" : "ltr";
|
|
431
682
|
}
|
|
432
683
|
//#endregion
|
|
433
684
|
//#region ../types/src/factory.ts
|
|
434
|
-
function
|
|
435
|
-
let n =
|
|
436
|
-
return !t || Object.keys(t).length === 0 ? n :
|
|
685
|
+
function V(e, t) {
|
|
686
|
+
let n = g(e);
|
|
687
|
+
return !t || Object.keys(t).length === 0 ? n : B(n, t);
|
|
437
688
|
}
|
|
438
|
-
function
|
|
439
|
-
return e === void 0 ? void 0 :
|
|
689
|
+
function H(e) {
|
|
690
|
+
return e === void 0 ? void 0 : g(e);
|
|
440
691
|
}
|
|
441
|
-
function
|
|
692
|
+
function U() {
|
|
442
693
|
return crypto.randomUUID();
|
|
443
694
|
}
|
|
444
|
-
function
|
|
695
|
+
function ot(e = 0) {
|
|
445
696
|
return {
|
|
446
697
|
top: e,
|
|
447
698
|
right: e,
|
|
@@ -449,135 +700,135 @@ function Le(e = 0) {
|
|
|
449
700
|
left: e
|
|
450
701
|
};
|
|
451
702
|
}
|
|
452
|
-
function
|
|
453
|
-
return { padding:
|
|
703
|
+
function W(e = 10) {
|
|
704
|
+
return { padding: ot(e) };
|
|
454
705
|
}
|
|
455
|
-
function
|
|
456
|
-
return
|
|
457
|
-
id:
|
|
706
|
+
function st(e = {}) {
|
|
707
|
+
return V({
|
|
708
|
+
id: U(),
|
|
458
709
|
type: "title",
|
|
459
|
-
...
|
|
460
|
-
styles:
|
|
710
|
+
...Be,
|
|
711
|
+
styles: W()
|
|
461
712
|
}, e);
|
|
462
713
|
}
|
|
463
|
-
function
|
|
464
|
-
return
|
|
465
|
-
id:
|
|
714
|
+
function ct(e = {}) {
|
|
715
|
+
return V({
|
|
716
|
+
id: U(),
|
|
466
717
|
type: "paragraph",
|
|
467
|
-
...
|
|
468
|
-
styles:
|
|
718
|
+
...Ve,
|
|
719
|
+
styles: W()
|
|
469
720
|
}, e);
|
|
470
721
|
}
|
|
471
|
-
function
|
|
472
|
-
return
|
|
473
|
-
id:
|
|
722
|
+
function lt(e = {}) {
|
|
723
|
+
return V({
|
|
724
|
+
id: U(),
|
|
474
725
|
type: "image",
|
|
475
|
-
...
|
|
476
|
-
styles:
|
|
726
|
+
...He,
|
|
727
|
+
styles: W()
|
|
477
728
|
}, e);
|
|
478
729
|
}
|
|
479
|
-
function
|
|
480
|
-
return
|
|
481
|
-
id:
|
|
730
|
+
function ut(e = {}) {
|
|
731
|
+
return V({
|
|
732
|
+
id: U(),
|
|
482
733
|
type: "button",
|
|
483
|
-
...
|
|
484
|
-
styles:
|
|
734
|
+
...Ue,
|
|
735
|
+
styles: W()
|
|
485
736
|
}, e);
|
|
486
737
|
}
|
|
487
|
-
function
|
|
488
|
-
return
|
|
489
|
-
id:
|
|
738
|
+
function dt(e = {}) {
|
|
739
|
+
return V({
|
|
740
|
+
id: U(),
|
|
490
741
|
type: "divider",
|
|
491
|
-
...
|
|
492
|
-
styles:
|
|
742
|
+
...We,
|
|
743
|
+
styles: W(20)
|
|
493
744
|
}, e);
|
|
494
745
|
}
|
|
495
|
-
function
|
|
496
|
-
return
|
|
497
|
-
id:
|
|
746
|
+
function ft(e = {}) {
|
|
747
|
+
return V({
|
|
748
|
+
id: U(),
|
|
498
749
|
type: "section",
|
|
499
|
-
...
|
|
750
|
+
...Ge,
|
|
500
751
|
children: [[]],
|
|
501
|
-
styles:
|
|
752
|
+
styles: W(20)
|
|
502
753
|
}, e);
|
|
503
754
|
}
|
|
504
|
-
function
|
|
505
|
-
return
|
|
506
|
-
id:
|
|
755
|
+
function pt(e = {}) {
|
|
756
|
+
return V({
|
|
757
|
+
id: U(),
|
|
507
758
|
type: "video",
|
|
508
|
-
...
|
|
509
|
-
styles:
|
|
759
|
+
...Ke,
|
|
760
|
+
styles: W()
|
|
510
761
|
}, e);
|
|
511
762
|
}
|
|
512
|
-
function
|
|
513
|
-
return
|
|
514
|
-
id:
|
|
763
|
+
function mt(e = {}) {
|
|
764
|
+
return V({
|
|
765
|
+
id: U(),
|
|
515
766
|
type: "social",
|
|
516
767
|
icons: [],
|
|
517
|
-
...
|
|
518
|
-
styles:
|
|
768
|
+
...qe,
|
|
769
|
+
styles: W()
|
|
519
770
|
}, e);
|
|
520
771
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
523
|
-
id:
|
|
772
|
+
function ht(e = {}) {
|
|
773
|
+
return V({
|
|
774
|
+
id: U(),
|
|
524
775
|
type: "spacer",
|
|
525
|
-
...
|
|
526
|
-
styles:
|
|
776
|
+
...Je,
|
|
777
|
+
styles: W(0)
|
|
527
778
|
}, e);
|
|
528
779
|
}
|
|
529
|
-
function
|
|
530
|
-
return
|
|
531
|
-
id:
|
|
780
|
+
function gt(e = {}) {
|
|
781
|
+
return V({
|
|
782
|
+
id: U(),
|
|
532
783
|
type: "html",
|
|
533
|
-
...
|
|
534
|
-
styles:
|
|
784
|
+
...Ye,
|
|
785
|
+
styles: W()
|
|
535
786
|
}, e);
|
|
536
787
|
}
|
|
537
|
-
function
|
|
538
|
-
return
|
|
539
|
-
id:
|
|
788
|
+
function _t(e = {}) {
|
|
789
|
+
return V({
|
|
790
|
+
id: U(),
|
|
540
791
|
type: "menu",
|
|
541
792
|
items: [],
|
|
542
|
-
...
|
|
543
|
-
styles:
|
|
793
|
+
...Xe,
|
|
794
|
+
styles: W()
|
|
544
795
|
}, e);
|
|
545
796
|
}
|
|
546
|
-
function
|
|
797
|
+
function vt(e, t) {
|
|
547
798
|
return Array.from({ length: t }, () => ({
|
|
548
|
-
id:
|
|
799
|
+
id: U(),
|
|
549
800
|
cells: Array.from({ length: e }, () => ({
|
|
550
|
-
id:
|
|
801
|
+
id: U(),
|
|
551
802
|
content: ""
|
|
552
803
|
}))
|
|
553
804
|
}));
|
|
554
805
|
}
|
|
555
|
-
function
|
|
556
|
-
return
|
|
557
|
-
id:
|
|
806
|
+
function yt(e = {}) {
|
|
807
|
+
return V({
|
|
808
|
+
id: U(),
|
|
558
809
|
type: "table",
|
|
559
|
-
rows:
|
|
560
|
-
...
|
|
561
|
-
styles:
|
|
810
|
+
rows: vt(3, 3),
|
|
811
|
+
...Ze,
|
|
812
|
+
styles: W()
|
|
562
813
|
}, e);
|
|
563
814
|
}
|
|
564
|
-
function
|
|
565
|
-
return
|
|
566
|
-
id:
|
|
815
|
+
function bt(e = {}) {
|
|
816
|
+
return V({
|
|
817
|
+
id: U(),
|
|
567
818
|
type: "countdown",
|
|
568
|
-
...
|
|
569
|
-
styles:
|
|
819
|
+
...Qe,
|
|
820
|
+
styles: W()
|
|
570
821
|
}, e);
|
|
571
822
|
}
|
|
572
|
-
function
|
|
823
|
+
function xt(e) {
|
|
573
824
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
574
825
|
}
|
|
575
|
-
function
|
|
826
|
+
function St(e) {
|
|
576
827
|
let t = {};
|
|
577
|
-
for (let n of e.fields) t[n.key] =
|
|
578
|
-
let n =
|
|
828
|
+
for (let n of e.fields) t[n.key] = H(xt(n));
|
|
829
|
+
let n = V(W(), H(e.defaultStyles));
|
|
579
830
|
return {
|
|
580
|
-
id:
|
|
831
|
+
id: U(),
|
|
581
832
|
type: "custom",
|
|
582
833
|
customType: e.type,
|
|
583
834
|
fieldValues: t,
|
|
@@ -585,148 +836,148 @@ function Be(e) {
|
|
|
585
836
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
586
837
|
};
|
|
587
838
|
}
|
|
588
|
-
function
|
|
839
|
+
function Ct() {
|
|
589
840
|
return {
|
|
590
|
-
id:
|
|
841
|
+
id: U(),
|
|
591
842
|
type: "slot",
|
|
592
|
-
styles:
|
|
843
|
+
styles: W(0)
|
|
593
844
|
};
|
|
594
845
|
}
|
|
595
|
-
function
|
|
596
|
-
return
|
|
597
|
-
id:
|
|
846
|
+
function wt(e = {}) {
|
|
847
|
+
return V({
|
|
848
|
+
id: U(),
|
|
598
849
|
type: "wrapper",
|
|
599
850
|
children: [],
|
|
600
|
-
styles:
|
|
851
|
+
styles: W(0)
|
|
601
852
|
}, e);
|
|
602
853
|
}
|
|
603
|
-
function
|
|
854
|
+
function Tt(e, t) {
|
|
604
855
|
switch (e) {
|
|
605
|
-
case "section": return
|
|
606
|
-
case "title": return
|
|
607
|
-
case "paragraph": return
|
|
608
|
-
case "image": return
|
|
609
|
-
case "button": return
|
|
610
|
-
case "divider": return
|
|
611
|
-
case "video": return
|
|
612
|
-
case "social": return
|
|
613
|
-
case "spacer": return
|
|
614
|
-
case "html": return
|
|
615
|
-
case "menu": return
|
|
616
|
-
case "table": return H(
|
|
617
|
-
case "countdown": return
|
|
856
|
+
case "section": return ft(H(t?.section));
|
|
857
|
+
case "title": return st(H(t?.title));
|
|
858
|
+
case "paragraph": return ct(H(t?.paragraph));
|
|
859
|
+
case "image": return lt(H(t?.image));
|
|
860
|
+
case "button": return ut(H(t?.button));
|
|
861
|
+
case "divider": return dt(H(t?.divider));
|
|
862
|
+
case "video": return pt(H(t?.video));
|
|
863
|
+
case "social": return mt(H(t?.social));
|
|
864
|
+
case "spacer": return ht(H(t?.spacer));
|
|
865
|
+
case "html": return gt(H(t?.html));
|
|
866
|
+
case "menu": return _t(H(t?.menu));
|
|
867
|
+
case "table": return yt(H(t?.table));
|
|
868
|
+
case "countdown": return bt(H(t?.countdown));
|
|
618
869
|
case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
|
|
619
870
|
case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
|
|
620
871
|
default: throw Error(`Unknown block type: ${e}`);
|
|
621
872
|
}
|
|
622
873
|
}
|
|
623
|
-
function
|
|
874
|
+
function G(e) {
|
|
624
875
|
let t = JSON.parse(JSON.stringify(e));
|
|
625
|
-
if (t.id =
|
|
626
|
-
e.id =
|
|
627
|
-
for (let t of e.cells) t.id =
|
|
876
|
+
if (t.id = U(), t.type === "table") for (let e of t.rows) {
|
|
877
|
+
e.id = U();
|
|
878
|
+
for (let t of e.cells) t.id = U();
|
|
628
879
|
}
|
|
629
|
-
if (t.type === "menu") for (let e of t.items) e.id =
|
|
630
|
-
if (t.type === "social") for (let e of t.icons) e.id =
|
|
631
|
-
return t.type === "section" && (t.children = t.children.map((e) => e.map((e) =>
|
|
880
|
+
if (t.type === "menu") for (let e of t.items) e.id = U();
|
|
881
|
+
if (t.type === "social") for (let e of t.icons) e.id = U();
|
|
882
|
+
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;
|
|
632
883
|
}
|
|
633
884
|
//#endregion
|
|
634
885
|
//#region ../types/src/layout.ts
|
|
635
|
-
var
|
|
636
|
-
function
|
|
637
|
-
for (let i of e) if (t(i, n, r),
|
|
638
|
-
else
|
|
886
|
+
var Et = "[Templatical] layout: must contain exactly one slot block", Dt = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Ot = "[Templatical] layout: a wrapper cannot contain a wrapper", kt = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", At = "[Templatical] slot is not a valid content block", jt = "[Templatical] wrapper is not a valid content block";
|
|
887
|
+
function K(e, t, n = null, r = !1) {
|
|
888
|
+
for (let i of e) if (t(i, n, r), L(i)) for (let e of i.children) K(e, t, i, !0);
|
|
889
|
+
else z(i) && K(i.children, t, i, r);
|
|
639
890
|
}
|
|
640
|
-
function
|
|
891
|
+
function Mt(e) {
|
|
641
892
|
let t = 0;
|
|
642
|
-
if (
|
|
643
|
-
if (
|
|
644
|
-
if (
|
|
645
|
-
if (r) throw Error(
|
|
646
|
-
if (e.children.some(
|
|
893
|
+
if (K(e.blocks, (e, n, r) => {
|
|
894
|
+
if (R(e) && (t += 1, r)) throw Error(Dt);
|
|
895
|
+
if (z(e)) {
|
|
896
|
+
if (r) throw Error(Dt);
|
|
897
|
+
if (e.children.some(z)) throw Error(Ot);
|
|
647
898
|
}
|
|
648
|
-
}), t !== 1) throw Error(
|
|
899
|
+
}), t !== 1) throw Error(Et);
|
|
649
900
|
}
|
|
650
|
-
function
|
|
651
|
-
|
|
652
|
-
if (
|
|
901
|
+
function Nt(e) {
|
|
902
|
+
K(e.blocks, (e) => {
|
|
903
|
+
if (R(e)) throw Error(At);
|
|
653
904
|
});
|
|
654
905
|
}
|
|
655
|
-
function
|
|
656
|
-
|
|
657
|
-
if (
|
|
906
|
+
function Pt(e) {
|
|
907
|
+
K(e.blocks, (e) => {
|
|
908
|
+
if (z(e)) throw Error(jt);
|
|
658
909
|
});
|
|
659
910
|
}
|
|
660
|
-
function
|
|
911
|
+
function Ft(e) {
|
|
661
912
|
let t = !1;
|
|
662
|
-
return
|
|
663
|
-
|
|
913
|
+
return K(e.blocks, (e, n) => {
|
|
914
|
+
R(e) && n !== null && z(n) && (t = !0);
|
|
664
915
|
}), t;
|
|
665
916
|
}
|
|
666
|
-
function
|
|
667
|
-
if (
|
|
668
|
-
if (
|
|
669
|
-
let t =
|
|
917
|
+
function It(e) {
|
|
918
|
+
if (R(e)) return e;
|
|
919
|
+
if (z(e)) {
|
|
920
|
+
let t = G({
|
|
670
921
|
...e,
|
|
671
922
|
children: []
|
|
672
923
|
});
|
|
673
|
-
return t.children = e.children.map(
|
|
924
|
+
return t.children = e.children.map(It), t;
|
|
674
925
|
}
|
|
675
|
-
return
|
|
926
|
+
return G(e);
|
|
676
927
|
}
|
|
677
|
-
function
|
|
928
|
+
function Lt(e) {
|
|
678
929
|
for (let t = 0; t < e.length; t++) {
|
|
679
930
|
let n = e[t];
|
|
680
|
-
if (
|
|
931
|
+
if (R(n)) return {
|
|
681
932
|
parent: e,
|
|
682
933
|
index: t
|
|
683
934
|
};
|
|
684
|
-
if (
|
|
685
|
-
let e =
|
|
935
|
+
if (z(n)) {
|
|
936
|
+
let e = Lt(n.children);
|
|
686
937
|
if (e) return e;
|
|
687
938
|
}
|
|
688
939
|
}
|
|
689
940
|
return null;
|
|
690
941
|
}
|
|
691
|
-
function
|
|
692
|
-
for (let t of e) if (
|
|
942
|
+
function Rt(e) {
|
|
943
|
+
for (let t of e) if (L(t)) {
|
|
693
944
|
if (t.wrapper) return !0;
|
|
694
|
-
for (let e of t.children) if (
|
|
945
|
+
for (let e of t.children) if (Rt(e)) return !0;
|
|
695
946
|
}
|
|
696
947
|
return !1;
|
|
697
948
|
}
|
|
698
|
-
function
|
|
699
|
-
if (
|
|
700
|
-
let n = e.blocks.map(
|
|
701
|
-
if (!r) throw Error(
|
|
702
|
-
return r.parent.splice(r.index, 1, ...
|
|
949
|
+
function zt(e, t) {
|
|
950
|
+
if (Mt(e), Nt(t), Pt(t), Ft(e) && Rt(t.blocks)) throw Error(kt);
|
|
951
|
+
let n = e.blocks.map(It), r = Lt(n);
|
|
952
|
+
if (!r) throw Error(Et);
|
|
953
|
+
return r.parent.splice(r.index, 1, ...g(t.blocks)), {
|
|
703
954
|
blocks: n,
|
|
704
955
|
settings: {
|
|
705
|
-
...
|
|
956
|
+
...g(t.settings),
|
|
706
957
|
backgroundColor: e.settings.backgroundColor
|
|
707
958
|
}
|
|
708
959
|
};
|
|
709
960
|
}
|
|
710
961
|
//#endregion
|
|
711
962
|
//#region ../types/src/html-scan.ts
|
|
712
|
-
var
|
|
713
|
-
function
|
|
963
|
+
var Bt = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
964
|
+
function Vt(e, t) {
|
|
714
965
|
let n = null;
|
|
715
966
|
for (let r = t; r < e.length; r++) {
|
|
716
967
|
let t = e[r];
|
|
717
968
|
if (n !== null) t === n && (n = null);
|
|
718
|
-
else if (
|
|
969
|
+
else if (Bt.has(t)) n = t;
|
|
719
970
|
else if (t === ">") return r;
|
|
720
971
|
}
|
|
721
972
|
return -1;
|
|
722
973
|
}
|
|
723
|
-
function
|
|
974
|
+
function Ht(e) {
|
|
724
975
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
725
976
|
}
|
|
726
|
-
function
|
|
977
|
+
function q(e) {
|
|
727
978
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
728
979
|
}
|
|
729
|
-
var
|
|
980
|
+
var Ut = {
|
|
730
981
|
amp: "&",
|
|
731
982
|
lt: "<",
|
|
732
983
|
gt: ">",
|
|
@@ -734,56 +985,56 @@ var st = {
|
|
|
734
985
|
apos: "'",
|
|
735
986
|
nbsp: "\xA0"
|
|
736
987
|
};
|
|
737
|
-
function
|
|
988
|
+
function Wt(e) {
|
|
738
989
|
return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
|
|
739
990
|
if (t[0] === "#") {
|
|
740
991
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
741
992
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
742
993
|
}
|
|
743
|
-
return
|
|
994
|
+
return Ut[t.toLowerCase()] ?? e;
|
|
744
995
|
}) : e;
|
|
745
996
|
}
|
|
746
|
-
function
|
|
997
|
+
function Gt(e, t) {
|
|
747
998
|
let n = t.toLowerCase(), r = 0;
|
|
748
999
|
for (; r < e.length;) {
|
|
749
|
-
for (; r < e.length && (
|
|
1000
|
+
for (; r < e.length && (q(e[r]) || e[r] === "/");) r++;
|
|
750
1001
|
if (r >= e.length) break;
|
|
751
1002
|
let t = r;
|
|
752
|
-
for (; r < e.length &&
|
|
1003
|
+
for (; r < e.length && Ht(e[r]);) r++;
|
|
753
1004
|
let i = e.substring(t, r).toLowerCase();
|
|
754
1005
|
if (i === "") {
|
|
755
1006
|
r++;
|
|
756
1007
|
continue;
|
|
757
1008
|
}
|
|
758
|
-
for (; r < e.length &&
|
|
1009
|
+
for (; r < e.length && q(e[r]);) r++;
|
|
759
1010
|
if (e[r] !== "=") continue;
|
|
760
|
-
for (r++; r < e.length &&
|
|
1011
|
+
for (r++; r < e.length && q(e[r]);) r++;
|
|
761
1012
|
let a = e[r];
|
|
762
|
-
if (
|
|
1013
|
+
if (Bt.has(a)) {
|
|
763
1014
|
let t = r + 1, o = e.indexOf(a, t);
|
|
764
1015
|
if (o === -1) return null;
|
|
765
|
-
if (i === n) return
|
|
1016
|
+
if (i === n) return Wt(e.substring(t, o));
|
|
766
1017
|
r = o + 1;
|
|
767
1018
|
continue;
|
|
768
1019
|
}
|
|
769
1020
|
let o = r;
|
|
770
|
-
for (; r < e.length && !
|
|
771
|
-
if (i === n) return
|
|
1021
|
+
for (; r < e.length && !q(e[r]) && e[r] !== ">";) r++;
|
|
1022
|
+
if (i === n) return Wt(e.substring(o, r));
|
|
772
1023
|
}
|
|
773
1024
|
return null;
|
|
774
1025
|
}
|
|
775
1026
|
//#endregion
|
|
776
1027
|
//#region ../types/src/rich-text.ts
|
|
777
|
-
var
|
|
778
|
-
function
|
|
779
|
-
return e.replace(
|
|
1028
|
+
var Kt = /<\/?p\b[^<>]*>/gi, qt = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
1029
|
+
function Jt(e) {
|
|
1030
|
+
return e.replace(Kt, "").trim() === "";
|
|
780
1031
|
}
|
|
781
|
-
function
|
|
782
|
-
return
|
|
1032
|
+
function Yt(e) {
|
|
1033
|
+
return Jt(e) ? e : e.replace(qt, "<p$1> </p>");
|
|
783
1034
|
}
|
|
784
1035
|
//#endregion
|
|
785
1036
|
//#region ../types/src/fonts.ts
|
|
786
|
-
var
|
|
1037
|
+
var Xt = {
|
|
787
1038
|
arial: "Arial, sans-serif",
|
|
788
1039
|
helvetica: "Helvetica, sans-serif",
|
|
789
1040
|
georgia: "Georgia, serif",
|
|
@@ -792,13 +1043,13 @@ var mt = {
|
|
|
792
1043
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
793
1044
|
"courier new": "'Courier New', monospace",
|
|
794
1045
|
tahoma: "Tahoma, sans-serif"
|
|
795
|
-
},
|
|
1046
|
+
}, Zt = /* @__PURE__ */ new Set([
|
|
796
1047
|
"inherit",
|
|
797
1048
|
"initial",
|
|
798
1049
|
"unset",
|
|
799
1050
|
"revert",
|
|
800
1051
|
"revert-layer"
|
|
801
|
-
]),
|
|
1052
|
+
]), Qt = /* @__PURE__ */ new Set([
|
|
802
1053
|
"serif",
|
|
803
1054
|
"sans-serif",
|
|
804
1055
|
"monospace",
|
|
@@ -813,14 +1064,14 @@ var mt = {
|
|
|
813
1064
|
"math",
|
|
814
1065
|
"fangsong"
|
|
815
1066
|
]);
|
|
816
|
-
function
|
|
1067
|
+
function $t(e) {
|
|
817
1068
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
818
1069
|
}
|
|
819
|
-
function
|
|
1070
|
+
function J(e) {
|
|
820
1071
|
if (typeof e != "string") return [];
|
|
821
1072
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
822
1073
|
for (;;) {
|
|
823
|
-
for (; r < t.length &&
|
|
1074
|
+
for (; r < t.length && $t(t[r]);) r++;
|
|
824
1075
|
if (r >= t.length) return [];
|
|
825
1076
|
let e = t[r];
|
|
826
1077
|
if (e === "\"" || e === "'") {
|
|
@@ -837,7 +1088,7 @@ function q(e) {
|
|
|
837
1088
|
}
|
|
838
1089
|
}
|
|
839
1090
|
if (!o) return [];
|
|
840
|
-
for (; a < t.length &&
|
|
1091
|
+
for (; a < t.length && $t(t[a]);) a++;
|
|
841
1092
|
if (a < t.length && t[a] !== ",") return [];
|
|
842
1093
|
n.push({
|
|
843
1094
|
name: i,
|
|
@@ -845,7 +1096,7 @@ function q(e) {
|
|
|
845
1096
|
}), r = a;
|
|
846
1097
|
} else {
|
|
847
1098
|
let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
|
|
848
|
-
if (a === "" || a.includes("\"") || a.includes("'") ||
|
|
1099
|
+
if (a === "" || a.includes("\"") || a.includes("'") || Zt.has(a.toLowerCase())) return [];
|
|
849
1100
|
n.push({
|
|
850
1101
|
name: a,
|
|
851
1102
|
quoted: !1
|
|
@@ -855,22 +1106,22 @@ function q(e) {
|
|
|
855
1106
|
r++;
|
|
856
1107
|
}
|
|
857
1108
|
}
|
|
858
|
-
function
|
|
1109
|
+
function en(e) {
|
|
859
1110
|
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
860
1111
|
}
|
|
861
|
-
function
|
|
862
|
-
return !e.quoted &&
|
|
1112
|
+
function tn(e) {
|
|
1113
|
+
return !e.quoted && Qt.has(e.name.toLowerCase());
|
|
863
1114
|
}
|
|
864
|
-
function
|
|
865
|
-
return
|
|
1115
|
+
function nn(e) {
|
|
1116
|
+
return J(e)[0]?.name ?? "";
|
|
866
1117
|
}
|
|
867
|
-
function
|
|
868
|
-
let n = (e) => `${
|
|
1118
|
+
function rn(e, t) {
|
|
1119
|
+
let n = (e) => `${en(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
|
|
869
1120
|
if (i) return n(i);
|
|
870
|
-
let a =
|
|
1121
|
+
let a = J(e);
|
|
871
1122
|
if (a.length !== 1) return e;
|
|
872
1123
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
873
|
-
return c ? n(c) :
|
|
1124
|
+
return c ? n(c) : Xt[s] || (tn(o) ? e : `${en(o.name)}, ${t.defaultFallback}`);
|
|
874
1125
|
}
|
|
875
1126
|
//#endregion
|
|
876
1127
|
//#region ../types/src/merge-tags.ts
|
|
@@ -891,33 +1142,33 @@ var Y = {
|
|
|
891
1142
|
value: /%%=.+?=%%/g,
|
|
892
1143
|
logic: /%%\[\s*(\w+).*?\]%%/g
|
|
893
1144
|
}
|
|
894
|
-
},
|
|
1145
|
+
}, an = {
|
|
895
1146
|
liquid: "{{",
|
|
896
1147
|
handlebars: "{{",
|
|
897
1148
|
mailchimp: "*|",
|
|
898
1149
|
ampscript: "%%="
|
|
899
|
-
},
|
|
1150
|
+
}, on = {
|
|
900
1151
|
liquid: "}}",
|
|
901
1152
|
handlebars: "}}",
|
|
902
1153
|
mailchimp: "|*",
|
|
903
1154
|
ampscript: "=%%"
|
|
904
1155
|
};
|
|
905
|
-
function
|
|
906
|
-
for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return
|
|
1156
|
+
function sn(e) {
|
|
1157
|
+
for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return an[t];
|
|
907
1158
|
return null;
|
|
908
1159
|
}
|
|
909
|
-
function
|
|
910
|
-
for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return
|
|
1160
|
+
function cn(e) {
|
|
1161
|
+
for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return on[t];
|
|
911
1162
|
return null;
|
|
912
1163
|
}
|
|
913
|
-
function
|
|
1164
|
+
function ln(e) {
|
|
914
1165
|
return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
|
|
915
1166
|
}
|
|
916
1167
|
function X(e) {
|
|
917
1168
|
let t = e.source, n = e.flags.replace("g", "");
|
|
918
1169
|
return RegExp(`^${t}$`, n);
|
|
919
1170
|
}
|
|
920
|
-
function
|
|
1171
|
+
function un(e, t) {
|
|
921
1172
|
let n = e?.trim() || "";
|
|
922
1173
|
return !X(t.logic).test(n) && X(t.value).test(n);
|
|
923
1174
|
}
|
|
@@ -925,41 +1176,41 @@ function Z(e, t) {
|
|
|
925
1176
|
let n = t.find((t) => t.value === e);
|
|
926
1177
|
return n ? n.label : e;
|
|
927
1178
|
}
|
|
928
|
-
function
|
|
1179
|
+
function dn(e, t) {
|
|
929
1180
|
return $(e, "data-merge-tag", (e) => Z(e, t));
|
|
930
1181
|
}
|
|
931
1182
|
function Q(e, t) {
|
|
932
1183
|
return t.find((t) => t.value === e)?.sample;
|
|
933
1184
|
}
|
|
934
|
-
function
|
|
935
|
-
return $(e, "data-merge-tag", (e) =>
|
|
1185
|
+
function fn(e, t) {
|
|
1186
|
+
return $(e, "data-merge-tag", (e) => hn(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
|
|
936
1187
|
}
|
|
937
|
-
function
|
|
1188
|
+
function pn(e) {
|
|
938
1189
|
return e.some((e) => e.sample !== void 0);
|
|
939
1190
|
}
|
|
940
|
-
function
|
|
1191
|
+
function mn(e, t) {
|
|
941
1192
|
if (!e) return e;
|
|
942
1193
|
let n = e;
|
|
943
1194
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
944
1195
|
return n;
|
|
945
1196
|
}
|
|
946
|
-
function
|
|
1197
|
+
function hn(e) {
|
|
947
1198
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
948
1199
|
}
|
|
949
|
-
function
|
|
1200
|
+
function gn(e, t) {
|
|
950
1201
|
if (!e) return !1;
|
|
951
1202
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
952
1203
|
return n.test(e) || r.test(e);
|
|
953
1204
|
}
|
|
954
|
-
function
|
|
1205
|
+
function _n(e, t) {
|
|
955
1206
|
return X(t.logic).test(e?.trim() || "");
|
|
956
1207
|
}
|
|
957
|
-
function
|
|
1208
|
+
function vn(e, t) {
|
|
958
1209
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
959
1210
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
960
1211
|
}
|
|
961
|
-
function
|
|
962
|
-
return $(e, "data-logic-merge-tag", (e) =>
|
|
1212
|
+
function yn(e, t) {
|
|
1213
|
+
return $(e, "data-logic-merge-tag", (e) => vn(e, t));
|
|
963
1214
|
}
|
|
964
1215
|
function $(e, t, n, r) {
|
|
965
1216
|
let i = "", a = 0;
|
|
@@ -974,7 +1225,7 @@ function $(e, t, n, r) {
|
|
|
974
1225
|
i += e.substring(a, o + 5), a = o + 5;
|
|
975
1226
|
continue;
|
|
976
1227
|
}
|
|
977
|
-
let c =
|
|
1228
|
+
let c = Vt(e, o + 5);
|
|
978
1229
|
if (c === -1) {
|
|
979
1230
|
i += e.substring(a);
|
|
980
1231
|
break;
|
|
@@ -984,7 +1235,7 @@ function $(e, t, n, r) {
|
|
|
984
1235
|
i += e.substring(a);
|
|
985
1236
|
break;
|
|
986
1237
|
}
|
|
987
|
-
let u =
|
|
1238
|
+
let u = Gt(e.substring(o + 5, c), t);
|
|
988
1239
|
if (u === null) {
|
|
989
1240
|
i += e.substring(a, o + 5), a = o + 5;
|
|
990
1241
|
continue;
|
|
@@ -996,27 +1247,10 @@ function $(e, t, n, r) {
|
|
|
996
1247
|
}
|
|
997
1248
|
//#endregion
|
|
998
1249
|
//#region ../types/src/preview-resolution.ts
|
|
999
|
-
function
|
|
1250
|
+
function bn(e) {
|
|
1000
1251
|
return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
|
|
1001
1252
|
}
|
|
1002
1253
|
//#endregion
|
|
1003
|
-
|
|
1004
|
-
var Lt = class extends Error {
|
|
1005
|
-
statusCode;
|
|
1006
|
-
constructor(e, t) {
|
|
1007
|
-
super(e), this.statusCode = t, this.name = "SdkError";
|
|
1008
|
-
}
|
|
1009
|
-
get isNotFound() {
|
|
1010
|
-
return this.statusCode === 404;
|
|
1011
|
-
}
|
|
1012
|
-
get isUnauthorized() {
|
|
1013
|
-
return this.statusCode === 401;
|
|
1014
|
-
}
|
|
1015
|
-
get isServerError() {
|
|
1016
|
-
return this.statusCode !== void 0 && this.statusCode >= 500;
|
|
1017
|
-
}
|
|
1018
|
-
};
|
|
1019
|
-
//#endregion
|
|
1020
|
-
export { C as $, W as A, s as At, I as B, at as C, d as Ct, Qe as D, m as Dt, Ze as E, p as Et, F, o as Ft, j as G, R as H, B as I, t as It, k as J, L as K, N as L, P as M, c as Mt, U as N, n as Nt, $e as O, i as Ot, Be as P, r as Pt, Me as Q, V as R, ft as S, ne as St, rt as T, ee as Tt, z as U, Ve as V, H as W, Ie as X, E as Y, Ne as Z, At as _, ae as _t, Pt as a, ue as at, bt as b, oe as bt, wt as c, y as ct, Nt as d, he as dt, T as et, Et as f, ve as ft, Ot as g, g as gt, Tt as h, x as ht, Mt as i, ge as it, Ue as j, l as jt, Xe as k, e as kt, Ct as l, b as lt, Dt as m, pe as mt, It as n, ye as nt, Z as o, _e as ot, Ft as p, ce as pt, He as q, Y as r, fe as rt, Q as s, le as st, Lt as t, de as tt, kt as u, me as ut, yt as v, ie as vt, lt as w, f as wt, pt as x, h as xt, q as y, se as yt, M as z };
|
|
1254
|
+
export { je as $, Tt as A, te as At, Ct as B, o as Bt, Gt as C, se as Ct, Ft as D, ae as Dt, Pt as E, f as Et, gt as F, s as Ft, pt as G, ht as H, lt as I, l as It, at as J, wt as K, _t as L, c as Lt, bt as M, re as Mt, St as N, i as Nt, Mt as O, d as Ot, dt as P, e as Pt, B as Q, ct as R, n as Rt, Vt as S, ce as St, Nt as T, le as Tt, yt as U, mt as V, t as Vt, st as W, $e as X, nt as Y, et as Z, nn as _, v as _t, Z as a, ke as at, Yt as b, g as bt, sn as c, Pe as ct, un as d, Oe as dt, ze as et, yn as f, Ne as ft, mn as g, me as gt, fn as h, fe as ht, vn as i, Le as it, ut as j, ne as jt, G as k, ee as kt, pn as l, Fe as lt, ln as m, De as mt, Y as n, Ie as nt, Q as o, L as ot, dn as p, z as pt, U as q, gn as r, Ae as rt, cn as s, R as st, bn as t, Me as tt, _n as u, Re as ut, J as v, pe as vt, zt as w, ue as wt, Jt as x, p as xt, rn as y, _ as yt, ft as z, r as zt };
|
|
1021
1255
|
|
|
1022
|
-
//# sourceMappingURL=src-
|
|
1256
|
+
//# sourceMappingURL=src-CvLTYGdO.js.map
|