@templatical/editor 0.39.4 → 0.40.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/dist/{AiChatSidebar-5qqrS6uy.js → AiChatSidebar-a8TPBAl2.js} +3 -3
- package/dist/{AiFeatureMenu-BBO_Ojlp.js → AiFeatureMenu-CbgDjLqk.js} +3 -3
- package/dist/{BlockIssueBadge-D5oGxOQP.js → BlockIssueBadge-D8KsGWY6.js} +2 -2
- package/dist/BlockPreviewCanvas-XNV83YGg.js +133 -0
- package/dist/{CloudHeaderExtras-Cg6uF-yQ.js → CloudHeaderExtras-C-tbLyfE.js} +2 -2
- package/dist/{CloudPanels-D1Gg4qrG.js → CloudPanels-DnWDrgnQ.js} +4 -4
- package/dist/{CollaboratorBar-Cmn0LccS.js → CollaboratorBar-DUmeCkyD.js} +2 -2
- package/dist/{CommentsPanel-twNhYUqZ.js → CommentsPanel-9k1q-79y.js} +1 -1
- package/dist/{CommentsSidebar-DDO0Qx8U.js → CommentsSidebar-Bc7nORmD.js} +2 -2
- package/dist/{CountdownBlock-DSvbf3qU.js → CountdownBlock-C6R-hn7D.js} +1 -1
- package/dist/{CountdownToolbar-nvHxu8Gu.js → CountdownToolbar-DkC-qSgq.js} +4 -4
- package/dist/{DesignReferenceSidebar-C8ohNhOd.js → DesignReferenceSidebar-OoiYJAKS.js} +3 -3
- package/dist/{IssuesPanel-Ck0EGoV5.js → IssuesPanel-Dnns3O9z.js} +3 -3
- package/dist/{LogicTagInsertButton-D8IwH-9Z.js → LogicTagInsertButton-BimKobaG.js} +67 -67
- package/dist/{MergeTagInput-QI-5KG2R.js → MergeTagInput-DqpVzhy7.js} +1 -1
- package/dist/{MergeTagModeToggle-D793Bj_E.js → MergeTagModeToggle-BkIiAgpQ.js} +4 -4
- package/dist/{ParagraphEditor-D6FRxr8Y.js → ParagraphEditor-D67Cqh-T.js} +19 -19
- package/dist/{RestoreVersionDialog--b0qfNaK.js → RestoreVersionDialog-BaKDuPCX.js} +2 -2
- package/dist/{RichTextEditorContent-BC5UTVnb.js → RichTextEditorContent-AEtfKvLz.js} +5 -5
- package/dist/{SaveBlockDialog-C0BdEGeL.js → SaveBlockDialog-BxkI52fN.js} +8 -8
- package/dist/{SavedBlocksBrowserModal-BzDgXtr4.js → SavedBlocksBrowserModal-C4_25Kvn.js} +6 -6
- package/dist/{SavedBlocksPanels-DN-bDZzy.js → SavedBlocksPanels-DQ0w9G1O.js} +1 -1
- package/dist/{SavedBlocksPickBar-pEi9Et8Q.js → SavedBlocksPickBar-CtH-sfxh.js} +2 -2
- package/dist/{TemplateScoringPanel-B1wcfE0w.js → TemplateScoringPanel-Cs0TGtRF.js} +3 -3
- package/dist/{TemplateSettings-C_5leDdF.js → TemplateSettings-BD1WNP4C.js} +7 -7
- package/dist/{TestEmailModal-maM8SLBV.js → TestEmailModal-DZi58FU9.js} +70 -65
- package/dist/{TestEmailPanel-8iAZYpCK.js → TestEmailPanel-D__9Wvgz.js} +1 -1
- package/dist/{TitleEditor-L26QXwna.js → TitleEditor-v5p89Djs.js} +9 -9
- package/dist/{ToggleSwitch-JvQ_CmI1.js → ToggleSwitch-CJfQ8u57.js} +1 -1
- package/dist/{Toolbar-B2kDLFhn.js → Toolbar-C7SjilzH.js} +540 -525
- package/dist/{TplModal-DVMS_nAn.js → TplModal-B8uLyoXE.js} +3 -3
- package/dist/{VersionHistoryMenu-BVQityes.js → VersionHistoryMenu-b0A8mS2_.js} +2 -2
- package/dist/{VersionHistoryPanels-D8f8KvKX.js → VersionHistoryPanels-DfNrRT6y.js} +1 -1
- package/dist/{VersionPreviewBanner-BaMSgA1O.js → VersionPreviewBanner-xB9r83r0.js} +1 -1
- package/dist/WrapperBlock-yGmKw0T-.js +34 -0
- package/dist/{blockTypeIcons-CdXugKyV.js → blockTypeIcons-B0Bq1WT1.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-Bqeygp1_.js → ca-Ckgw9yd0.js} +1 -0
- package/dist/cdn/chunks/{AiChatSidebar-ctfIU4i0.js → AiChatSidebar-mKImUXi6.js} +7 -7
- package/dist/cdn/chunks/{AiChatSidebar-ctfIU4i0.js.map → AiChatSidebar-mKImUXi6.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-ByygdH_9.js → AiFeatureMenu-23HCL517.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-ByygdH_9.js.map → AiFeatureMenu-23HCL517.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-9hHpaXb9.js → BlockIssueBadge-DS1pUf5g.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-9hHpaXb9.js.map → BlockIssueBadge-DS1pUf5g.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-DObWyQfh.js +135 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-DObWyQfh.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-BxsMpvVr.js → CloudHeaderExtras-DOB_uWpt.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-BxsMpvVr.js.map → CloudHeaderExtras-DOB_uWpt.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DmxmqAS_.js → CloudPanels-DcAn5QW7.js} +5 -5
- package/dist/cdn/chunks/{CloudPanels-DmxmqAS_.js.map → CloudPanels-DcAn5QW7.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-B8ttqAqX.js → CollaboratorBar-C0M8c2Vv.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-B8ttqAqX.js.map → CollaboratorBar-C0M8c2Vv.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-C8ibhaiK.js → CommentsPanel-BtAGZfF6.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-C8ibhaiK.js.map → CommentsPanel-BtAGZfF6.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CybWfZ3V.js → CommentsSidebar-Ws07MXYj.js} +3 -3
- package/dist/cdn/chunks/{CommentsSidebar-CybWfZ3V.js.map → CommentsSidebar-Ws07MXYj.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DdC8Lg5F.js → CountdownBlock-sVDjKkRw.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-DdC8Lg5F.js.map → CountdownBlock-sVDjKkRw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DRESXiVD.js → CountdownToolbar-Bu93WiS8.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DRESXiVD.js.map → CountdownToolbar-Bu93WiS8.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-CtaoY-hl.js → DesignReferenceSidebar-BlSdh5B7.js} +4 -4
- package/dist/cdn/chunks/{DesignReferenceSidebar-CtaoY-hl.js.map → DesignReferenceSidebar-BlSdh5B7.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C6RlIxoi.js → IssuesPanel-CKkv9z9g.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-C6RlIxoi.js.map → IssuesPanel-CKkv9z9g.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-DpyPozop.js → LogicTagInsertButton-CHc1yZ9v.js} +165 -165
- package/dist/cdn/chunks/{LogicTagInsertButton-DpyPozop.js.map → LogicTagInsertButton-CHc1yZ9v.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-ERJr7bP_.js → MergeTagInput--qTYfCWk.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-ERJr7bP_.js.map → MergeTagInput--qTYfCWk.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-n3nvSNeQ.js → MergeTagModeToggle-CdWIGo3Q.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-n3nvSNeQ.js.map → MergeTagModeToggle-CdWIGo3Q.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-R2ph_UOo.js → ParagraphEditor-BilbVtrG.js} +17 -17
- package/dist/cdn/chunks/{ParagraphEditor-R2ph_UOo.js.map → ParagraphEditor-BilbVtrG.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-C-dwbb7T.js → RestoreVersionDialog-Q-a44Vjv.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-C-dwbb7T.js.map → RestoreVersionDialog-Q-a44Vjv.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Ch5zeyZ7.js → RichTextEditorContent-Fzuu9pLP.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-Ch5zeyZ7.js.map → RichTextEditorContent-Fzuu9pLP.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-C_BPjVv6.js → SaveBlockDialog-DeW_M6kh.js} +9 -9
- package/dist/cdn/chunks/{SaveBlockDialog-C_BPjVv6.js.map → SaveBlockDialog-DeW_M6kh.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CrrGEfFb.js → SavedBlocksBrowserModal-BzQWibKG.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CrrGEfFb.js.map → SavedBlocksBrowserModal-BzQWibKG.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DfTaMPAr.js → SavedBlocksPanels-Ce1RePjk.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DfTaMPAr.js.map → SavedBlocksPanels-Ce1RePjk.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DziwHYSu.js → SavedBlocksPickBar-DIDl6xfy.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-DziwHYSu.js.map → SavedBlocksPickBar-DIDl6xfy.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-CR6RG6dZ.js → TemplateScoringPanel-d_Ppowsq.js} +49 -49
- package/dist/cdn/chunks/{TemplateScoringPanel-CR6RG6dZ.js.map → TemplateScoringPanel-d_Ppowsq.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-DjXiiiNr.js → TemplateSettings-Dr5OJ0Gi.js} +8 -8
- package/dist/cdn/chunks/{TemplateSettings-DjXiiiNr.js.map → TemplateSettings-Dr5OJ0Gi.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DId9Og-N.js → TestEmailModal-CWTmaJuT.js} +56 -51
- package/dist/cdn/chunks/TestEmailModal-CWTmaJuT.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-B8LwXmeX.js → TestEmailPanel-BdYsVHXA.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-B8LwXmeX.js.map → TestEmailPanel-BdYsVHXA.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C7KMzX1e.js → TitleEditor-pJeeZ-PX.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-C7KMzX1e.js.map → TitleEditor-pJeeZ-PX.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-CDy8OfcB.js → ToggleSwitch-0dGCYnRY.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-CDy8OfcB.js.map → ToggleSwitch-0dGCYnRY.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-DqFhWxgW.js → Toolbar-BsiHW9gY.js} +493 -478
- package/dist/cdn/chunks/{Toolbar-DqFhWxgW.js.map → Toolbar-BsiHW9gY.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BKqDFLq3.js → TplModal-CEuGD7pt.js} +4 -4
- package/dist/cdn/chunks/{TplModal-BKqDFLq3.js.map → TplModal-CEuGD7pt.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-Dij1pTEb.js → VersionHistoryMenu-B3-hNu9c.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-Dij1pTEb.js.map → VersionHistoryMenu-B3-hNu9c.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DcCFFDK6.js → VersionHistoryPanels-C1yck5gT.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-DcCFFDK6.js.map → VersionHistoryPanels-C1yck5gT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-Df3FVlig.js → VersionPreviewBanner-PzVQSBJE.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-Df3FVlig.js.map → VersionPreviewBanner-PzVQSBJE.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DGkbmj06.js +36 -0
- package/dist/cdn/chunks/WrapperBlock-DGkbmj06.js.map +1 -0
- package/dist/cdn/chunks/{ca-Bqeygp1_.js → ca-Ckgw9yd0.js} +2 -1
- package/dist/cdn/chunks/ca-Ckgw9yd0.js.map +1 -0
- package/dist/cdn/chunks/{cloud-eaXyxZ8l.js → cloud-CIT4yPp4.js} +2 -2
- package/dist/cdn/chunks/{cloud-eaXyxZ8l.js.map → cloud-CIT4yPp4.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-D5bXzcTe.js → createCloudRuntime-COUxbPvd.js} +49 -40
- package/dist/cdn/chunks/createCloudRuntime-COUxbPvd.js.map +1 -0
- package/dist/cdn/chunks/{de-CY6SlqBx.js → de-D4dweQw8.js} +2 -1
- package/dist/cdn/chunks/de-D4dweQw8.js.map +1 -0
- package/dist/{en-8V-2kDcp.js → cdn/chunks/en-VE7R7NyL.js} +3 -0
- package/dist/cdn/chunks/en-VE7R7NyL.js.map +1 -0
- package/dist/{es-Cmn1rT3l.js → cdn/chunks/es-B9OhP8H3.js} +3 -0
- package/dist/cdn/chunks/es-B9OhP8H3.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Bhu8UEE5.js → extensions-CafoGF65.js} +5 -5
- package/dist/cdn/chunks/{extensions-Bhu8UEE5.js.map → extensions-CafoGF65.js.map} +1 -1
- package/dist/cdn/chunks/{fr-2yDa4zXM.js → fr-wrXhIi00.js} +2 -1
- package/dist/cdn/chunks/fr-wrXhIi00.js.map +1 -0
- package/dist/cdn/chunks/keys-DCWeHkSF.js +12 -0
- package/dist/cdn/chunks/keys-DCWeHkSF.js.map +1 -0
- package/dist/{nl-Bzk2zRI8.js → cdn/chunks/nl-DeFatKJe.js} +3 -0
- package/dist/cdn/chunks/nl-DeFatKJe.js.map +1 -0
- package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js +21 -0
- package/dist/cdn/chunks/preRenderCustomBlocks-Dpj-_cOj.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-DqtSCTUi.js → pt-BR-Bh1J8ey6.js} +2 -1
- package/dist/cdn/chunks/pt-BR-Bh1J8ey6.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-9VrG8X3m.js → socialIcons-BvYNMn1G.js} +264 -258
- package/dist/cdn/chunks/socialIcons-BvYNMn1G.js.map +1 -0
- package/dist/cdn/chunks/{src-CqYYKcCI.js → src-CbGCES0u.js} +175 -168
- package/dist/cdn/chunks/src-CbGCES0u.js.map +1 -0
- package/dist/cdn/chunks/{src-CaNsA_WX.js → src-Cnc5E71L.js} +258 -247
- package/dist/cdn/chunks/src-Cnc5E71L.js.map +1 -0
- package/dist/cdn/chunks/{src-Dwgq7hf4.js → src-DveVYoWS.js} +281 -181
- package/dist/cdn/chunks/src-DveVYoWS.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-C09JcFS0.js → useCloudI18n-CrjWbpbu.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-C09JcFS0.js.map → useCloudI18n-CrjWbpbu.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CXYI14ux.js → useEditorCore-CQraU2s_.js} +421 -408
- package/dist/cdn/chunks/useEditorCore-CQraU2s_.js.map +1 -0
- package/dist/cdn/chunks/{useEditorRoot-DFx2fXJP.js → useEditorRoot-CshefZLP.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-DFx2fXJP.js.map → useEditorRoot-CshefZLP.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DTZ9sIcv.js → useI18n-CyO_Nmca.js} +2 -2
- package/dist/cdn/chunks/{useI18n-DTZ9sIcv.js.map → useI18n-CyO_Nmca.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-E2V0Xdcb.js → useLogicTag-DF7-l66G.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-E2V0Xdcb.js.map → useLogicTag-DF7-l66G.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BE8oDoha.js → useMergeTag-DbIHw4NG.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-BE8oDoha.js.map → useMergeTag-DbIHw4NG.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-gB9q-ql7.js → usePopoverPosition-BJRvAb-h.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-gB9q-ql7.js.map → usePopoverPosition-BJRvAb-h.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CtTXwmiU.js → useScrollToBlock-DgHZJvID.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CtTXwmiU.js.map → useScrollToBlock-DgHZJvID.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +484 -460
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cloud-C9xWZXhg.js → cloud-DsqqUfzh.js} +1 -1
- package/dist/{createCloudRuntime-BGd5--Bq.js → createCloudRuntime-iLflkYzP.js} +47 -38
- package/dist/{de-CY6SlqBx.js → de-D4dweQw8.js} +1 -0
- package/dist/{dist-tGkjkX-v.js → dist-DbUZvK04.js} +277 -176
- package/dist/{cdn/chunks/en-8V-2kDcp.js → en-VE7R7NyL.js} +1 -2
- package/dist/{cdn/chunks/es-Cmn1rT3l.js → es-B9OhP8H3.js} +1 -2
- package/dist/{extensions-DRN-elXT.js → extensions-DDhjuVKy.js} +4 -4
- package/dist/{fr-2yDa4zXM.js → fr-wrXhIi00.js} +1 -0
- package/dist/index.d.ts +65 -0
- package/dist/keys-CDqfZIRt.js +10 -0
- package/dist/{cdn/chunks/nl-Bzk2zRI8.js → nl-DeFatKJe.js} +1 -2
- package/dist/preRenderCustomBlocks-BBSqQgke.js +19 -0
- package/dist/{pt-BR-DqtSCTUi.js → pt-BR-Bh1J8ey6.js} +1 -0
- package/dist/{socialIcons-DkGcpEwC.js → socialIcons-O7PZCW2P.js} +245 -239
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +520 -496
- package/dist/{useCloudI18n-D1iedlP3.js → useCloudI18n-DpEsiLeR.js} +1 -1
- package/dist/{useEditorCore-BUVbQgwb.js → useEditorCore-Dt_VWNqX.js} +817 -804
- package/dist/{useEditorRoot-BOxn5EfP.js → useEditorRoot-CkB_5d0h.js} +1 -1
- package/dist/{useI18n-Ds_-druD.js → useI18n-B_CdcBwG.js} +1 -1
- package/dist/{useLogicTag-DoHfc08B.js → useLogicTag-D9pvgxQR.js} +3 -3
- package/dist/{useMergeTag-DXyum3kG.js → useMergeTag-BaVFPdlq.js} +5 -5
- package/dist/{usePopoverPosition-Du-Ah8E9.js → usePopoverPosition-DH7z3Ghm.js} +1 -1
- package/dist/{useScrollToBlock-DXQYPCnJ.js → useScrollToBlock-Dj4v3rxr.js} +1 -1
- package/package.json +7 -7
- package/dist/BlockPreviewCanvas-BMC16_QU.js +0 -131
- package/dist/cdn/chunks/BlockPreviewCanvas-DeS7Sa--.js +0 -133
- package/dist/cdn/chunks/BlockPreviewCanvas-DeS7Sa--.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DId9Og-N.js.map +0 -1
- package/dist/cdn/chunks/ca-Bqeygp1_.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-D5bXzcTe.js.map +0 -1
- package/dist/cdn/chunks/de-CY6SlqBx.js.map +0 -1
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js +0 -8
- package/dist/cdn/chunks/emailFrameWidth-BmFCN2dp.js.map +0 -1
- package/dist/cdn/chunks/en-8V-2kDcp.js.map +0 -1
- package/dist/cdn/chunks/es-Cmn1rT3l.js.map +0 -1
- package/dist/cdn/chunks/fr-2yDa4zXM.js.map +0 -1
- package/dist/cdn/chunks/keys-dJbD1QPs.js +0 -12
- package/dist/cdn/chunks/keys-dJbD1QPs.js.map +0 -1
- package/dist/cdn/chunks/nl-Bzk2zRI8.js.map +0 -1
- package/dist/cdn/chunks/preRenderCustomBlocks-Bdpiiw4A.js +0 -23
- package/dist/cdn/chunks/preRenderCustomBlocks-Bdpiiw4A.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DqtSCTUi.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +0 -1
- package/dist/cdn/chunks/src-CaNsA_WX.js.map +0 -1
- package/dist/cdn/chunks/src-CqYYKcCI.js.map +0 -1
- package/dist/cdn/chunks/src-Dwgq7hf4.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CXYI14ux.js.map +0 -1
- package/dist/emailFrameWidth-BmFCN2dp.js +0 -6
- package/dist/keys-BdoSgsz9.js +0 -10
- package/dist/preRenderCustomBlocks-DFXH54Zr.js +0 -21
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { $ as e, A as t, At as n, B as r, D as i, E as a, F as o, J as s, K as c, M as l, N as u, O as d, R as f, S as p, V as m, W as h, Y as g, Z as _, _ as v, at as y, b, c as x, d as S, g as C, h as w, it as T, j as E, jt as D, k as O, kt as k, l as A, nt as j, r as M, rt as ee, s as N, u as P, v as F, y as te } from "./vue.runtime.esm-bundler-CyqhBwpY.js";
|
|
2
2
|
import { c as I, o as ne, s as re } from "./runtime-dom.esm-bundler-BGbPz4-g.js";
|
|
3
|
-
import {
|
|
4
|
-
import { C as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { a as
|
|
7
|
-
import { A as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { i as
|
|
11
|
-
import { r as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import "./useCloudI18n-
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
3
|
+
import { $ as ie, B as ae, C as oe, D as se, E as ce, F as le, G as ue, H as de, J as fe, L as pe, N as me, O as he, P as ge, Q as _e, R as ve, S as ye, T as be, V as xe, X as Se, Y as Ce, Z as we, b as Te, c as Ee, f as De, g as Oe, h as ke, i as Ae, j as je, k as Me, m as Ne, n as Pe, o as Fe, q as Ie, r as Le, t as Re, v as ze, x as Be, y as Ve, z as He } from "./dist-DbUZvK04.js";
|
|
4
|
+
import { C as Ue, _ as We, a as Ge, b as Ke, c as qe, d as Je, g as Ye, i as Xe, l as Ze, n as Qe, o as $e, s as et, t as tt, u as nt, w as rt, x as it } from "./socialIcons-O7PZCW2P.js";
|
|
5
|
+
import { _ as at, h as ot, v as st, y as ct } from "./dist-8VFzbeu9.js";
|
|
6
|
+
import { a as lt, c as ut, i as dt } from "./dist-BDuPwOyn.js";
|
|
7
|
+
import { $ as ft, A as pt, B as mt, C as ht, D as gt, E as _t, F as vt, G as yt, H as bt, I as xt, J as St, K as Ct, L as wt, M as Tt, N as Et, O as Dt, P as Ot, Q as kt, R as At, S as jt, T as Mt, V as Nt, X as Pt, Y as Ft, Z as It, _ as Lt, a as Rt, b as zt, c as Bt, d as Vt, f as Ht, g as Ut, h as Wt, j as Gt, k as Kt, l as qt, m as Jt, n as Yt, o as Xt, p as Zt, q as Qt, r as $t, s as en, v as tn, w as nn, x as rn, y as an, z as on } from "./keys-CDqfZIRt.js";
|
|
8
|
+
import { t as sn } from "./useI18n-B_CdcBwG.js";
|
|
9
|
+
import { t as cn } from "./logger-BBlvSn6q.js";
|
|
10
|
+
import { i as ln, o as un, r as dn, t as fn } from "./usePopoverPosition-DH7z3Ghm.js";
|
|
11
|
+
import { r as pn, t as mn } from "./templateSettingsFields-YCFVBVYh.js";
|
|
12
|
+
import { t as hn } from "./createLucideIcon-BxY5yz5u.js";
|
|
13
|
+
import { t as gn } from "./copy-mw6PVnOJ.js";
|
|
14
|
+
import { t as _n } from "./loader-circle-z5eeqasv.js";
|
|
15
|
+
import { t as vn } from "./message-circle-BsQ9hEup.js";
|
|
16
|
+
import { t as yn } from "./trash-DnOkfu2V.js";
|
|
17
|
+
import { t as bn } from "./triangle-alert-DGLAyXnh.js";
|
|
18
|
+
import { t as xn } from "./upload-BBDme2cy.js";
|
|
19
|
+
import { t as Sn } from "./LoadingTrack-C1Epulqq.js";
|
|
20
|
+
import { t as Cn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
21
|
+
import { t as wn } from "./useEditorRoot-CkB_5d0h.js";
|
|
22
|
+
import "./useCloudI18n-DpEsiLeR.js";
|
|
23
|
+
import { t as Tn } from "./useMergeTag-BaVFPdlq.js";
|
|
24
|
+
import { t as En } from "./useLogicTag-D9pvgxQR.js";
|
|
25
|
+
import { t as Dn } from "./useAliveFlag-BkKyhkwZ.js";
|
|
26
26
|
//#region src/utils/activeEditorTracker.ts
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
let e = ++
|
|
30
|
-
return
|
|
27
|
+
var On = /* @__PURE__ */ new Set(), kn = 0, An = 0;
|
|
28
|
+
function jn() {
|
|
29
|
+
let e = ++An;
|
|
30
|
+
return On.add(e), kn === 0 && (kn = e), {
|
|
31
31
|
id: e,
|
|
32
|
-
isActive: () =>
|
|
32
|
+
isActive: () => On.size <= 1 || kn === e,
|
|
33
33
|
claim: () => {
|
|
34
|
-
|
|
34
|
+
kn = e;
|
|
35
35
|
},
|
|
36
36
|
dispose: () => {
|
|
37
|
-
if (
|
|
38
|
-
let e = Array.from(
|
|
39
|
-
|
|
37
|
+
if (On.delete(e), kn === e) {
|
|
38
|
+
let e = Array.from(On);
|
|
39
|
+
kn = e[e.length - 1] ?? 0;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/composables/usePreviewResolution.ts
|
|
46
|
-
var
|
|
47
|
-
function
|
|
46
|
+
var Mn = 500;
|
|
47
|
+
function Nn(e) {
|
|
48
48
|
let t = typeof e.resolvePreview == "function", n = _(null), r = _(!1), i = _(!1), a = 0, o = null;
|
|
49
49
|
function c() {
|
|
50
50
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -55,7 +55,7 @@ function kn(e) {
|
|
|
55
55
|
let o = ++a;
|
|
56
56
|
r.value = !0;
|
|
57
57
|
let s = {
|
|
58
|
-
content:
|
|
58
|
+
content: we(e.getContent()),
|
|
59
59
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
60
60
|
};
|
|
61
61
|
try {
|
|
@@ -81,7 +81,7 @@ function kn(e) {
|
|
|
81
81
|
}
|
|
82
82
|
o = setTimeout(() => {
|
|
83
83
|
o = null, l();
|
|
84
|
-
},
|
|
84
|
+
}, Mn);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
return f(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -103,7 +103,7 @@ function kn(e) {
|
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/composables/useImageUrlResolver.ts
|
|
106
|
-
function
|
|
106
|
+
function Pn(e) {
|
|
107
107
|
let t = g(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
108
108
|
function r(e) {
|
|
109
109
|
return t.get(e);
|
|
@@ -136,8 +136,8 @@ function An(e) {
|
|
|
136
136
|
lookup: a
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
let t = p(
|
|
139
|
+
function Fn(e) {
|
|
140
|
+
let t = p(rn, null), n = N(e);
|
|
141
141
|
if (!t) return n;
|
|
142
142
|
let r;
|
|
143
143
|
function i() {
|
|
@@ -166,7 +166,7 @@ function jn(e) {
|
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
168
|
//#region src/composables/useMergeTagPicker.ts
|
|
169
|
-
function
|
|
169
|
+
function In() {
|
|
170
170
|
let e = _(!1), t = _([]), n = _(null), r = null;
|
|
171
171
|
function i(i, a) {
|
|
172
172
|
if (r) {
|
|
@@ -197,7 +197,7 @@ function Mn() {
|
|
|
197
197
|
}
|
|
198
198
|
//#endregion
|
|
199
199
|
//#region src/composables/useLogicTagPicker.ts
|
|
200
|
-
function
|
|
200
|
+
function Ln() {
|
|
201
201
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
202
202
|
function i(i, a) {
|
|
203
203
|
if (r) {
|
|
@@ -228,17 +228,17 @@ function Nn() {
|
|
|
228
228
|
}
|
|
229
229
|
//#endregion
|
|
230
230
|
//#region src/composables/useTemplateLint.ts
|
|
231
|
-
function
|
|
231
|
+
function Rn(e) {
|
|
232
232
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
let n = _([]), r = _(!1), i = _(!1), a = e(null), o =
|
|
234
|
+
function zn(t) {
|
|
235
|
+
let n = _([]), r = _(!1), i = _(!1), a = e(null), o = Rn(t.options), s = null, c = !1;
|
|
236
236
|
o || l();
|
|
237
237
|
async function l() {
|
|
238
238
|
try {
|
|
239
239
|
let e = await import("@templatical/quality");
|
|
240
240
|
if (c) return;
|
|
241
|
-
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s =
|
|
241
|
+
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s = ct(t.content, u, {
|
|
242
242
|
debounce: t.debounce ?? 500,
|
|
243
243
|
deep: !0
|
|
244
244
|
});
|
|
@@ -273,7 +273,7 @@ function Fn(t) {
|
|
|
273
273
|
}
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region src/composables/useKeyboardReorder.ts
|
|
276
|
-
function
|
|
276
|
+
function Bn(e, t, n = []) {
|
|
277
277
|
let r = _(null), i = _(""), a = null;
|
|
278
278
|
function o(t) {
|
|
279
279
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -300,7 +300,7 @@ function In(e, t, n = []) {
|
|
|
300
300
|
let i = o(r);
|
|
301
301
|
if (!i) return "";
|
|
302
302
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
303
|
-
return a ?
|
|
303
|
+
return a ? Je(a, t.t, n) : "";
|
|
304
304
|
}
|
|
305
305
|
function c(t, n) {
|
|
306
306
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -369,13 +369,13 @@ function In(e, t, n = []) {
|
|
|
369
369
|
}
|
|
370
370
|
//#endregion
|
|
371
371
|
//#region src/composables/useUiTheme.ts
|
|
372
|
-
function
|
|
373
|
-
let t =
|
|
372
|
+
function Vn(e) {
|
|
373
|
+
let t = ut("(prefers-color-scheme: dark)");
|
|
374
374
|
return { resolvedTheme: N(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
375
375
|
}
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region src/composables/useThemeStyles.ts
|
|
378
|
-
var
|
|
378
|
+
var Hn = {
|
|
379
379
|
bg: "--tpl-bg",
|
|
380
380
|
bgElevated: "--tpl-bg-elevated",
|
|
381
381
|
bgHover: "--tpl-bg-hover",
|
|
@@ -399,10 +399,10 @@ var Rn = {
|
|
|
399
399
|
dangerLight: "--tpl-danger-light",
|
|
400
400
|
canvasBg: "--tpl-canvas-bg"
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function Un({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
403
403
|
return { themeStyles: N(() => {
|
|
404
404
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
405
|
-
if (a) for (let [e, t] of Object.entries(
|
|
405
|
+
if (a) for (let [e, t] of Object.entries(Hn)) {
|
|
406
406
|
let n = a[e];
|
|
407
407
|
n && (r[t] = n);
|
|
408
408
|
}
|
|
@@ -411,7 +411,7 @@ function zn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
411
411
|
}
|
|
412
412
|
//#endregion
|
|
413
413
|
//#region src/composables/useBlockRegistry.ts
|
|
414
|
-
function
|
|
414
|
+
function Wn() {
|
|
415
415
|
let t = e(/* @__PURE__ */ new Map());
|
|
416
416
|
function n(e, n) {
|
|
417
417
|
t.value.set(e, n), T(t);
|
|
@@ -419,7 +419,7 @@ function Bn() {
|
|
|
419
419
|
function r(e, n) {
|
|
420
420
|
let r = `custom:${e.type}`, i = {
|
|
421
421
|
component: n,
|
|
422
|
-
createBlock: () =>
|
|
422
|
+
createBlock: () => Oe(e),
|
|
423
423
|
definition: e
|
|
424
424
|
};
|
|
425
425
|
t.value.set(r, i), T(t);
|
|
@@ -451,7 +451,7 @@ function Bn() {
|
|
|
451
451
|
strictFilters: !1
|
|
452
452
|
}).parseAndRender(t.template, e.fieldValues);
|
|
453
453
|
} catch (t) {
|
|
454
|
-
return
|
|
454
|
+
return cn.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
function l(e) {
|
|
@@ -469,9 +469,9 @@ function Bn() {
|
|
|
469
469
|
}
|
|
470
470
|
//#endregion
|
|
471
471
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
472
|
-
function
|
|
472
|
+
function Gn(e, t) {
|
|
473
473
|
return N(() => {
|
|
474
|
-
let n =
|
|
474
|
+
let n = Kn(e.value.blocks);
|
|
475
475
|
if (n.size === 0) return [];
|
|
476
476
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
477
477
|
for (let e of n) {
|
|
@@ -483,81 +483,81 @@ function Vn(e, t) {
|
|
|
483
483
|
return i;
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Kn(e) {
|
|
487
487
|
let t = /* @__PURE__ */ new Set();
|
|
488
|
-
return
|
|
488
|
+
return qn(e, t), t;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function qn(e, t) {
|
|
491
491
|
for (let n of e) {
|
|
492
|
-
if (
|
|
492
|
+
if (He(n)) {
|
|
493
493
|
t.add(n.customType);
|
|
494
494
|
continue;
|
|
495
495
|
}
|
|
496
496
|
if (n.type === "section") {
|
|
497
497
|
let e = n.children;
|
|
498
498
|
if (!e) continue;
|
|
499
|
-
for (let n of e)
|
|
500
|
-
}
|
|
499
|
+
for (let n of e) qn(n, t);
|
|
500
|
+
} else ue(n) && qn(n.children, t);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
//#endregion
|
|
504
504
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
505
|
-
var
|
|
505
|
+
var Jn = [
|
|
506
506
|
{
|
|
507
507
|
type: "section",
|
|
508
|
-
createBlock:
|
|
508
|
+
createBlock: oe
|
|
509
509
|
},
|
|
510
510
|
{
|
|
511
511
|
type: "title",
|
|
512
|
-
createBlock:
|
|
512
|
+
createBlock: he
|
|
513
513
|
},
|
|
514
514
|
{
|
|
515
515
|
type: "paragraph",
|
|
516
|
-
createBlock:
|
|
516
|
+
createBlock: ye
|
|
517
517
|
},
|
|
518
518
|
{
|
|
519
519
|
type: "image",
|
|
520
|
-
createBlock:
|
|
520
|
+
createBlock: Te
|
|
521
521
|
},
|
|
522
522
|
{
|
|
523
523
|
type: "button",
|
|
524
|
-
createBlock:
|
|
524
|
+
createBlock: Ne
|
|
525
525
|
},
|
|
526
526
|
{
|
|
527
527
|
type: "divider",
|
|
528
|
-
createBlock:
|
|
528
|
+
createBlock: ze
|
|
529
529
|
},
|
|
530
530
|
{
|
|
531
531
|
type: "video",
|
|
532
|
-
createBlock:
|
|
532
|
+
createBlock: Me
|
|
533
533
|
},
|
|
534
534
|
{
|
|
535
535
|
type: "social",
|
|
536
|
-
createBlock:
|
|
536
|
+
createBlock: be
|
|
537
537
|
},
|
|
538
538
|
{
|
|
539
539
|
type: "menu",
|
|
540
|
-
createBlock:
|
|
540
|
+
createBlock: Be
|
|
541
541
|
},
|
|
542
542
|
{
|
|
543
543
|
type: "table",
|
|
544
|
-
createBlock:
|
|
544
|
+
createBlock: se
|
|
545
545
|
},
|
|
546
546
|
{
|
|
547
547
|
type: "spacer",
|
|
548
|
-
createBlock:
|
|
548
|
+
createBlock: ce
|
|
549
549
|
},
|
|
550
550
|
{
|
|
551
551
|
type: "html",
|
|
552
|
-
createBlock:
|
|
552
|
+
createBlock: Ve
|
|
553
553
|
},
|
|
554
554
|
{
|
|
555
555
|
type: "countdown",
|
|
556
|
-
createBlock:
|
|
556
|
+
createBlock: ke
|
|
557
557
|
}
|
|
558
558
|
];
|
|
559
|
-
function
|
|
560
|
-
for (let n of
|
|
559
|
+
function Yn(e, t) {
|
|
560
|
+
for (let n of Jn) {
|
|
561
561
|
let r = t[n.type];
|
|
562
562
|
r && e.registerBuiltIn(n.type, {
|
|
563
563
|
component: r,
|
|
@@ -567,33 +567,33 @@ function Gn(e, t) {
|
|
|
567
567
|
}
|
|
568
568
|
//#endregion
|
|
569
569
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
570
|
-
function
|
|
570
|
+
function Xn(e) {
|
|
571
571
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
572
572
|
}
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
575
|
-
function
|
|
575
|
+
function Zn(e) {
|
|
576
576
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
let r = new Set(e.map((e) =>
|
|
580
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
578
|
+
function Qn(e, t, n) {
|
|
579
|
+
let r = new Set(e.map((e) => dn(e))), i = [], a = (e, t) => {
|
|
580
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(dn(o)) && i.push(`${t}.${n}: ${o}`) : Zn(o) && a(o, `${t}.${n}`);
|
|
581
581
|
}, o = t;
|
|
582
|
-
for (let [e, t] of Object.entries(
|
|
582
|
+
for (let [e, t] of Object.entries(Re)) {
|
|
583
583
|
let n = o?.[e];
|
|
584
584
|
a({
|
|
585
585
|
...t,
|
|
586
|
-
...
|
|
586
|
+
...Zn(n) ? n : {}
|
|
587
587
|
}, e);
|
|
588
588
|
}
|
|
589
589
|
return a({
|
|
590
|
-
...
|
|
590
|
+
...Pe,
|
|
591
591
|
...n ?? {}
|
|
592
592
|
}, "template"), i;
|
|
593
593
|
}
|
|
594
594
|
//#endregion
|
|
595
595
|
//#region src/utils/localizedBlockDefaults.ts
|
|
596
|
-
function
|
|
596
|
+
function $n(e) {
|
|
597
597
|
return {
|
|
598
598
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
599
599
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -602,62 +602,62 @@ function Yn(e) {
|
|
|
602
602
|
}
|
|
603
603
|
//#endregion
|
|
604
604
|
//#region src/i18n/index.ts
|
|
605
|
-
var
|
|
606
|
-
"./locales/ca.ts": () => import("./ca-
|
|
607
|
-
"./locales/de.ts": () => import("./de-
|
|
608
|
-
"./locales/en.ts": () => import("./en-
|
|
609
|
-
"./locales/es.ts": () => import("./es-
|
|
610
|
-
"./locales/fr.ts": () => import("./fr-
|
|
611
|
-
"./locales/nl.ts": () => import("./nl-
|
|
612
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
613
|
-
}),
|
|
605
|
+
var er = /* #__PURE__ */ Object.assign({
|
|
606
|
+
"./locales/ca.ts": () => import("./ca-Ckgw9yd0.js"),
|
|
607
|
+
"./locales/de.ts": () => import("./de-D4dweQw8.js"),
|
|
608
|
+
"./locales/en.ts": () => import("./en-VE7R7NyL.js"),
|
|
609
|
+
"./locales/es.ts": () => import("./es-B9OhP8H3.js"),
|
|
610
|
+
"./locales/fr.ts": () => import("./fr-wrXhIi00.js"),
|
|
611
|
+
"./locales/nl.ts": () => import("./nl-DeFatKJe.js"),
|
|
612
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-Bh1J8ey6.js")
|
|
613
|
+
}), tr = /* #__PURE__ */ Object.assign({
|
|
614
614
|
"./locales/cloud/de.ts": () => import("./de-mMY5yQJu.js"),
|
|
615
615
|
"./locales/cloud/en.ts": () => import("./en-ChVeGQBY.js"),
|
|
616
616
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-CoCwRUi0.js")
|
|
617
617
|
});
|
|
618
|
-
function
|
|
618
|
+
function nr(e) {
|
|
619
619
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
620
620
|
}
|
|
621
|
-
var
|
|
622
|
-
function
|
|
621
|
+
var rr = nr(er), ir = nr(tr);
|
|
622
|
+
function ar(e) {
|
|
623
623
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
624
624
|
}
|
|
625
|
-
function
|
|
626
|
-
let n =
|
|
627
|
-
return t.find((e) =>
|
|
625
|
+
function or(e, t) {
|
|
626
|
+
let n = ar(e);
|
|
627
|
+
return t.find((e) => ar(e) === n);
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
629
|
+
function sr(e) {
|
|
630
|
+
return ar(e).split("-")[0];
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
632
|
+
function cr(e, t) {
|
|
633
|
+
return or(e, t) ?? or(sr(e), t);
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
return
|
|
635
|
+
function lr(e, t) {
|
|
636
|
+
return cr(e, t) ?? "en";
|
|
637
637
|
}
|
|
638
|
-
async function
|
|
639
|
-
let t =
|
|
638
|
+
async function ur(e) {
|
|
639
|
+
let t = er[`./locales/${lr(e, rr)}.ts`];
|
|
640
640
|
return (await t()).default;
|
|
641
641
|
}
|
|
642
|
-
async function
|
|
643
|
-
let t =
|
|
642
|
+
async function dr(e) {
|
|
643
|
+
let t = tr[`./locales/cloud/${lr(e, ir)}.ts`];
|
|
644
644
|
return (await t()).default;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
646
|
+
function fr(e) {
|
|
647
|
+
return cr(e, rr) !== void 0;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
649
|
+
function pr(e) {
|
|
650
|
+
return cr(e, ir) !== void 0;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
return [
|
|
652
|
+
function mr() {
|
|
653
|
+
return [...rr];
|
|
654
654
|
}
|
|
655
|
-
function
|
|
656
|
-
return [...
|
|
655
|
+
function hr() {
|
|
656
|
+
return [...ir];
|
|
657
657
|
}
|
|
658
658
|
//#endregion
|
|
659
659
|
//#region src/i18n/contentDefaults.ts
|
|
660
|
-
var
|
|
660
|
+
var gr = {
|
|
661
661
|
en: {
|
|
662
662
|
video: "Video",
|
|
663
663
|
days: "Days",
|
|
@@ -715,17 +715,17 @@ var fr = {
|
|
|
715
715
|
expired: "Aquesta oferta ha caducat"
|
|
716
716
|
}
|
|
717
717
|
};
|
|
718
|
-
Object.keys(
|
|
719
|
-
var
|
|
720
|
-
function
|
|
721
|
-
if (!e) return
|
|
722
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
723
|
-
if (n) return
|
|
724
|
-
let r =
|
|
725
|
-
return r ?
|
|
726
|
-
}
|
|
727
|
-
function
|
|
728
|
-
let t =
|
|
718
|
+
Object.keys(gr);
|
|
719
|
+
var _r = new Map(Object.keys(gr).map((e) => [e.toLowerCase(), e]));
|
|
720
|
+
function vr(e) {
|
|
721
|
+
if (!e) return gr.en;
|
|
722
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = _r.get(t);
|
|
723
|
+
if (n) return gr[n];
|
|
724
|
+
let r = _r.get(sr(t));
|
|
725
|
+
return r ? gr[r] : gr.en;
|
|
726
|
+
}
|
|
727
|
+
function yr(e) {
|
|
728
|
+
let t = vr(e);
|
|
729
729
|
return {
|
|
730
730
|
video: { alt: t.video },
|
|
731
731
|
countdown: {
|
|
@@ -739,9 +739,9 @@ function hr(e) {
|
|
|
739
739
|
}
|
|
740
740
|
//#endregion
|
|
741
741
|
//#region src/utils/collectColorFieldIssues.ts
|
|
742
|
-
function
|
|
742
|
+
function br(e, t) {
|
|
743
743
|
let n = [], r = (r, i) => {
|
|
744
|
-
let a =
|
|
744
|
+
let a = nt(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
745
745
|
if (a.invalidPresets.length > 0 && n.push({
|
|
746
746
|
id: s("invalid-presets"),
|
|
747
747
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -752,8 +752,8 @@ function gr(e, t) {
|
|
|
752
752
|
id: s("allow-custom-ignored"),
|
|
753
753
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
754
754
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
755
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
756
|
-
e !== "" && !t.has(
|
|
755
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => dn(e)));
|
|
756
|
+
e !== "" && !t.has(dn(e)) && n.push({
|
|
757
757
|
id: s("off-palette-default"),
|
|
758
758
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
759
759
|
});
|
|
@@ -765,7 +765,7 @@ function gr(e, t) {
|
|
|
765
765
|
}
|
|
766
766
|
//#endregion
|
|
767
767
|
//#region src/utils/keyboardShortcuts.ts
|
|
768
|
-
function
|
|
768
|
+
function xr(e) {
|
|
769
769
|
for (let t of e.composedPath()) {
|
|
770
770
|
if (!(t instanceof HTMLElement)) continue;
|
|
771
771
|
if (t.isContentEditable) return !0;
|
|
@@ -774,18 +774,18 @@ function _r(e) {
|
|
|
774
774
|
}
|
|
775
775
|
return !1;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function Sr(e, t) {
|
|
778
778
|
let n = e.metaKey || e.ctrlKey;
|
|
779
779
|
if (n && e.key.toLowerCase() === "s") {
|
|
780
780
|
e.preventDefault(), t.onSave?.();
|
|
781
781
|
return;
|
|
782
782
|
}
|
|
783
783
|
if (n && e.key.toLowerCase() === "z") {
|
|
784
|
-
if (
|
|
784
|
+
if (xr(e)) return;
|
|
785
785
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
786
786
|
return;
|
|
787
787
|
}
|
|
788
|
-
if (t.isPicking?.() && !
|
|
788
|
+
if (t.isPicking?.() && !xr(e)) {
|
|
789
789
|
if (e.key === "Escape") {
|
|
790
790
|
e.preventDefault(), t.onCancelPick?.();
|
|
791
791
|
return;
|
|
@@ -803,11 +803,11 @@ function vr(e, t) {
|
|
|
803
803
|
t.selectBlock(null);
|
|
804
804
|
return;
|
|
805
805
|
}
|
|
806
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
806
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !xr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
807
807
|
}
|
|
808
808
|
//#endregion
|
|
809
809
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
810
|
-
function
|
|
810
|
+
function Cr(e, t, n, r = !1) {
|
|
811
811
|
if (!e) return [];
|
|
812
812
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
813
813
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -816,16 +816,16 @@ function yr(e, t, n, r = !1) {
|
|
|
816
816
|
value: e.slice(o, s.index)
|
|
817
817
|
});
|
|
818
818
|
let i = s[0];
|
|
819
|
-
if (
|
|
820
|
-
let e = r ?
|
|
819
|
+
if (xe(i, n)) {
|
|
820
|
+
let e = r ? le(i, t) : void 0;
|
|
821
821
|
a.push(e === void 0 ? {
|
|
822
822
|
type: "tag",
|
|
823
|
-
value:
|
|
823
|
+
value: ge(i, t)
|
|
824
824
|
} : {
|
|
825
825
|
type: "text",
|
|
826
826
|
value: e
|
|
827
827
|
});
|
|
828
|
-
} else
|
|
828
|
+
} else ae(i, n) ? a.push({
|
|
829
829
|
type: "tag",
|
|
830
830
|
value: me(i, n)
|
|
831
831
|
}) : a.push({
|
|
@@ -841,20 +841,20 @@ function yr(e, t, n, r = !1) {
|
|
|
841
841
|
}
|
|
842
842
|
//#endregion
|
|
843
843
|
//#region src/components/MergeTagPreviewText.vue
|
|
844
|
-
var
|
|
844
|
+
var wr = F({
|
|
845
845
|
name: "MergeTagPreviewText",
|
|
846
846
|
props: { text: {
|
|
847
847
|
type: String,
|
|
848
848
|
required: !0
|
|
849
849
|
} },
|
|
850
850
|
setup(e) {
|
|
851
|
-
let t = p(
|
|
851
|
+
let t = p(Dt, vt), n = p(Ot, Fe.liquid), r = p(kt, null), i = N(() => Cr(e.text, t.value, n, r?.value ?? !1));
|
|
852
852
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
853
853
|
key: t,
|
|
854
854
|
class: "tpl-merge-tag-label"
|
|
855
855
|
}, e.value) : e.value);
|
|
856
856
|
}
|
|
857
|
-
}),
|
|
857
|
+
}), Tr = ["href"], Er = /* @__PURE__ */ F({
|
|
858
858
|
__name: "ButtonBlock",
|
|
859
859
|
props: {
|
|
860
860
|
block: {},
|
|
@@ -880,16 +880,16 @@ var br = F({
|
|
|
880
880
|
style: n(i.value),
|
|
881
881
|
class: "tpl:cursor-default",
|
|
882
882
|
onClick: o[0] ||= I(() => {}, ["prevent"])
|
|
883
|
-
}, [C(
|
|
883
|
+
}, [C(wr, { text: e.block.text }, null, 8, ["text"])], 12, Tr)], 4));
|
|
884
884
|
}
|
|
885
|
-
}),
|
|
885
|
+
}), Dr = hn({
|
|
886
886
|
name: "bookmark",
|
|
887
887
|
size: 24,
|
|
888
888
|
node: [["path", {
|
|
889
889
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
890
890
|
key: "oz39mx"
|
|
891
891
|
}]]
|
|
892
|
-
}),
|
|
892
|
+
}), Or = hn({
|
|
893
893
|
name: "box",
|
|
894
894
|
size: 24,
|
|
895
895
|
node: [
|
|
@@ -906,7 +906,7 @@ var br = F({
|
|
|
906
906
|
key: "d0xqtd"
|
|
907
907
|
}]
|
|
908
908
|
]
|
|
909
|
-
}),
|
|
909
|
+
}), kr = hn({
|
|
910
910
|
name: "eye-off",
|
|
911
911
|
size: 24,
|
|
912
912
|
node: [
|
|
@@ -927,7 +927,7 @@ var br = F({
|
|
|
927
927
|
key: "1ooewy"
|
|
928
928
|
}]
|
|
929
929
|
]
|
|
930
|
-
}),
|
|
930
|
+
}), Ar = hn({
|
|
931
931
|
name: "funnel",
|
|
932
932
|
size: 24,
|
|
933
933
|
node: [["path", {
|
|
@@ -935,7 +935,7 @@ var br = F({
|
|
|
935
935
|
key: "sc7q7i"
|
|
936
936
|
}]],
|
|
937
937
|
aliases: ["filter"]
|
|
938
|
-
}),
|
|
938
|
+
}), jr = hn({
|
|
939
939
|
name: "grip-vertical",
|
|
940
940
|
size: 24,
|
|
941
941
|
node: [
|
|
@@ -976,14 +976,14 @@ var br = F({
|
|
|
976
976
|
key: "f4zoj3"
|
|
977
977
|
}]
|
|
978
978
|
]
|
|
979
|
-
}),
|
|
979
|
+
}), Mr = hn({
|
|
980
980
|
name: "puzzle",
|
|
981
981
|
size: 24,
|
|
982
982
|
node: [["path", {
|
|
983
983
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
984
984
|
key: "w46dr5"
|
|
985
985
|
}]]
|
|
986
|
-
}),
|
|
986
|
+
}), Nr = hn({
|
|
987
987
|
name: "video",
|
|
988
988
|
size: 24,
|
|
989
989
|
node: [["path", {
|
|
@@ -997,11 +997,11 @@ var br = F({
|
|
|
997
997
|
rx: "2",
|
|
998
998
|
key: "158x01"
|
|
999
999
|
}]]
|
|
1000
|
-
}),
|
|
1000
|
+
}), Pr = ["innerHTML"], Fr = [
|
|
1001
1001
|
"src",
|
|
1002
1002
|
"width",
|
|
1003
1003
|
"height"
|
|
1004
|
-
],
|
|
1004
|
+
], Ir = /* @__PURE__ */ F({
|
|
1005
1005
|
__name: "CustomBlockIcon",
|
|
1006
1006
|
props: {
|
|
1007
1007
|
icon: {},
|
|
@@ -1017,24 +1017,24 @@ var br = F({
|
|
|
1017
1017
|
height: `${i.value}px`
|
|
1018
1018
|
}),
|
|
1019
1019
|
innerHTML: e.icon
|
|
1020
|
-
}, null, 12,
|
|
1020
|
+
}, null, 12, Pr)) : o.value ? (t(), S("img", {
|
|
1021
1021
|
key: 1,
|
|
1022
1022
|
src: e.icon,
|
|
1023
1023
|
width: i.value,
|
|
1024
1024
|
height: i.value,
|
|
1025
1025
|
class: "tpl:inline-block",
|
|
1026
1026
|
alt: ""
|
|
1027
|
-
}, null, 8,
|
|
1027
|
+
}, null, 8, Fr)) : (t(), A(y(Or), {
|
|
1028
1028
|
key: 2,
|
|
1029
1029
|
size: i.value,
|
|
1030
1030
|
"stroke-width": 1.5
|
|
1031
1031
|
}, null, 8, ["size"]));
|
|
1032
1032
|
}
|
|
1033
|
-
}),
|
|
1034
|
-
function
|
|
1035
|
-
let n =
|
|
1033
|
+
}), Lr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1034
|
+
function Rr(e, t) {
|
|
1035
|
+
let n = wn(), r = null, i = null, a = null;
|
|
1036
1036
|
function o() {
|
|
1037
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1037
|
+
return e.value ? Array.from(e.value.querySelectorAll(Lr)).filter((e) => e.offsetParent !== null) : [];
|
|
1038
1038
|
}
|
|
1039
1039
|
function c(e) {
|
|
1040
1040
|
if (e.key !== "Tab") return;
|
|
@@ -1049,7 +1049,7 @@ function Pr(e, t) {
|
|
|
1049
1049
|
a = null;
|
|
1050
1050
|
let t = o();
|
|
1051
1051
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1052
|
-
}), i =
|
|
1052
|
+
}), i = lt(e, "keydown", c);
|
|
1053
1053
|
}
|
|
1054
1054
|
function u(e = {}) {
|
|
1055
1055
|
let t = e.restoreFocus !== !1;
|
|
@@ -1064,8 +1064,8 @@ function Pr(e, t) {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
//#endregion
|
|
1066
1066
|
//#region src/composables/useEmoji.ts
|
|
1067
|
-
function
|
|
1068
|
-
let [t, n] =
|
|
1067
|
+
function zr() {
|
|
1068
|
+
let [t, n] = st(!1), r = e([]), i = !1;
|
|
1069
1069
|
s(() => {
|
|
1070
1070
|
i = !0;
|
|
1071
1071
|
}), f(t, async (e) => {
|
|
@@ -1090,7 +1090,7 @@ function Fr() {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
//#endregion
|
|
1092
1092
|
//#region src/composables/useFonts.ts
|
|
1093
|
-
var
|
|
1093
|
+
var Br = [
|
|
1094
1094
|
{
|
|
1095
1095
|
value: "Arial",
|
|
1096
1096
|
label: "Arial"
|
|
@@ -1119,7 +1119,7 @@ var Ir = [
|
|
|
1119
1119
|
value: "Courier New",
|
|
1120
1120
|
label: "Courier New"
|
|
1121
1121
|
}
|
|
1122
|
-
],
|
|
1122
|
+
], Vr = {
|
|
1123
1123
|
arial: "Arial, sans-serif",
|
|
1124
1124
|
helvetica: "Helvetica, sans-serif",
|
|
1125
1125
|
georgia: "Georgia, serif",
|
|
@@ -1127,23 +1127,23 @@ var Ir = [
|
|
|
1127
1127
|
verdana: "Verdana, sans-serif",
|
|
1128
1128
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1129
1129
|
"courier new": "'Courier New', monospace"
|
|
1130
|
-
},
|
|
1131
|
-
function
|
|
1132
|
-
if (e === void 0 || e === !0) return [...
|
|
1130
|
+
}, Hr = "Arial, sans-serif";
|
|
1131
|
+
function Ur(e) {
|
|
1132
|
+
if (e === void 0 || e === !0) return [...Br];
|
|
1133
1133
|
if (e === !1) return [];
|
|
1134
1134
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1135
1135
|
for (let i of e) {
|
|
1136
|
-
let e = i.toLowerCase(), a =
|
|
1136
|
+
let e = i.toLowerCase(), a = Br.find((t) => t.value.toLowerCase() === e);
|
|
1137
1137
|
if (!a) {
|
|
1138
|
-
r.has(e) || (r.add(e),
|
|
1138
|
+
r.has(e) || (r.add(e), cn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Br.map((e) => e.value).join(", ")}.`));
|
|
1139
1139
|
continue;
|
|
1140
1140
|
}
|
|
1141
1141
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1142
1142
|
}
|
|
1143
1143
|
return t;
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r =
|
|
1145
|
+
function Wr(e) {
|
|
1146
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = Ur(e?.builtIns), i = N(() => e?.defaultFallback ?? Hr), a = N(() => {
|
|
1147
1147
|
let e = [...r], n = t.value.map((e) => ({
|
|
1148
1148
|
value: e.name,
|
|
1149
1149
|
label: e.name,
|
|
@@ -1154,14 +1154,14 @@ function Br(e) {
|
|
|
1154
1154
|
function o(e) {
|
|
1155
1155
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1156
1156
|
}
|
|
1157
|
-
let c = e?.defaultFont ??
|
|
1158
|
-
o(c) ||
|
|
1157
|
+
let c = e?.defaultFont ?? Hr.split(",")[0].trim();
|
|
1158
|
+
o(c) || cn.warn(`config.fonts: new templates seed "${c}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
1159
1159
|
function l() {
|
|
1160
1160
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1161
1161
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1162
1162
|
if (t) return t.value;
|
|
1163
1163
|
}
|
|
1164
|
-
return
|
|
1164
|
+
return Hr;
|
|
1165
1165
|
}
|
|
1166
1166
|
let u = N(() => l());
|
|
1167
1167
|
function d(e) {
|
|
@@ -1171,7 +1171,7 @@ function Br(e) {
|
|
|
1171
1171
|
let e = n.fallback ?? i.value;
|
|
1172
1172
|
return `'${n.name}', ${e}`;
|
|
1173
1173
|
}
|
|
1174
|
-
return
|
|
1174
|
+
return Vr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1175
1175
|
}
|
|
1176
1176
|
let f = [], p = !1;
|
|
1177
1177
|
async function m() {
|
|
@@ -1187,7 +1187,7 @@ function Br(e) {
|
|
|
1187
1187
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1188
1188
|
});
|
|
1189
1189
|
} catch (t) {
|
|
1190
|
-
|
|
1190
|
+
cn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1191
1191
|
}
|
|
1192
1192
|
});
|
|
1193
1193
|
await Promise.allSettled(e), !p && (n.value = !0);
|
|
@@ -1212,8 +1212,8 @@ function Br(e) {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
//#endregion
|
|
1214
1214
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1215
|
-
function
|
|
1216
|
-
return
|
|
1215
|
+
function Gr(e, t, n) {
|
|
1216
|
+
return ae(e, n) ? {
|
|
1217
1217
|
type: "logicMergeTagNode",
|
|
1218
1218
|
attrs: {
|
|
1219
1219
|
value: e,
|
|
@@ -1229,15 +1229,15 @@ function Vr(e, t, n) {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
//#endregion
|
|
1231
1231
|
//#region src/utils/insertLogicTag.ts
|
|
1232
|
-
function
|
|
1232
|
+
function Kr(e) {
|
|
1233
1233
|
return "before" in e && "after" in e;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
if (!
|
|
1237
|
-
e.chain().focus().insertContent(
|
|
1235
|
+
function qr(e, t, n) {
|
|
1236
|
+
if (!Kr(t)) {
|
|
1237
|
+
e.chain().focus().insertContent(Gr(t.value, t.label, n)).run();
|
|
1238
1238
|
return;
|
|
1239
1239
|
}
|
|
1240
|
-
let r =
|
|
1240
|
+
let r = Gr(t.before, t.label, n), i = Gr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1241
1241
|
if (a !== o) {
|
|
1242
1242
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1243
1243
|
return;
|
|
@@ -1246,20 +1246,20 @@ function Ur(e, t, n) {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
//#endregion
|
|
1248
1248
|
//#region src/utils/linkColorExtension.ts
|
|
1249
|
-
function
|
|
1249
|
+
function Jr(e) {
|
|
1250
1250
|
if (!e) return null;
|
|
1251
1251
|
let t = e.trim();
|
|
1252
1252
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
1253
1253
|
}
|
|
1254
|
-
function
|
|
1254
|
+
function Yr(e) {
|
|
1255
1255
|
return e.extend({ addAttributes() {
|
|
1256
1256
|
return {
|
|
1257
1257
|
...this.parent?.(),
|
|
1258
1258
|
color: {
|
|
1259
1259
|
default: null,
|
|
1260
|
-
parseHTML: (e) =>
|
|
1260
|
+
parseHTML: (e) => Jr(ln(e.style.color)),
|
|
1261
1261
|
renderHTML: (e) => {
|
|
1262
|
-
let t =
|
|
1262
|
+
let t = Jr(e.color);
|
|
1263
1263
|
return t ? { style: `color: ${t}` } : {};
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
@@ -1268,9 +1268,9 @@ function Gr(e) {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
//#endregion
|
|
1270
1270
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1271
|
-
function
|
|
1271
|
+
function Xr(e, t = Fe.liquid) {
|
|
1272
1272
|
let n = _(!1), r = _(""), i = _(""), a = _(null);
|
|
1273
|
-
|
|
1273
|
+
Rr(a, n);
|
|
1274
1274
|
function o() {
|
|
1275
1275
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1276
1276
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -1279,7 +1279,7 @@ function Kr(e, t = Me.liquid) {
|
|
|
1279
1279
|
if (r.value) {
|
|
1280
1280
|
let t = u(r.value);
|
|
1281
1281
|
if (t !== null) {
|
|
1282
|
-
let n =
|
|
1282
|
+
let n = Jr(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1283
1283
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
@@ -1329,13 +1329,13 @@ function Kr(e, t = Me.liquid) {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
//#endregion
|
|
1331
1331
|
//#region src/composables/useRichTextEditor.ts
|
|
1332
|
-
function
|
|
1333
|
-
let n = p(
|
|
1332
|
+
function Zr(t) {
|
|
1333
|
+
let n = p(Ut, null), { mergeTags: r, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: l, autocomplete: u } = Tn(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = En(), g = p(Ft, null), v = (c(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = pe(l), b = e(null), x = () => Ie(n?.content?.value?.settings ?? { locale: "en" });
|
|
1334
1334
|
f(x, (e) => {
|
|
1335
1335
|
let t = b.value?.view.dom;
|
|
1336
1336
|
t && t.setAttribute("dir", e);
|
|
1337
1337
|
});
|
|
1338
|
-
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } =
|
|
1338
|
+
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } = Xr(b, l), { start: j, stop: M } = at(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), ee = e(null), N = _(!0), P = _(null), F = !1;
|
|
1339
1339
|
async function te() {
|
|
1340
1340
|
P.value = null, N.value = !0;
|
|
1341
1341
|
try {
|
|
@@ -1366,7 +1366,7 @@ function qr(t) {
|
|
|
1366
1366
|
b.value = s, N.value = !1, j();
|
|
1367
1367
|
} catch (e) {
|
|
1368
1368
|
if (F) return;
|
|
1369
|
-
|
|
1369
|
+
cn.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), P.value = e instanceof Error ? e.message : "Failed to load editor", N.value = !1;
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
1372
|
function I() {
|
|
@@ -1384,7 +1384,7 @@ function qr(t) {
|
|
|
1384
1384
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1385
1385
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
1386
1386
|
}
|
|
1387
|
-
|
|
1387
|
+
lt(document, "mousedown", re), i(() => {
|
|
1388
1388
|
F = !0, ne(), M(), b.value?.destroy();
|
|
1389
1389
|
});
|
|
1390
1390
|
async function ie() {
|
|
@@ -1396,7 +1396,7 @@ function qr(t) {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
async function ae() {
|
|
1398
1398
|
let e = await h();
|
|
1399
|
-
F || (e && b.value ?
|
|
1399
|
+
F || (e && b.value ? qr(b.value, e, l) : b.value?.commands.focus());
|
|
1400
1400
|
}
|
|
1401
1401
|
return {
|
|
1402
1402
|
editor: b,
|
|
@@ -1425,9 +1425,9 @@ function qr(t) {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
//#endregion
|
|
1427
1427
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1428
|
-
var
|
|
1429
|
-
function
|
|
1430
|
-
let t =
|
|
1428
|
+
var Qr = "(max-width: 767px)";
|
|
1429
|
+
function $r(e) {
|
|
1430
|
+
let t = ut(Qr);
|
|
1431
1431
|
return {
|
|
1432
1432
|
isSmallScreen: t,
|
|
1433
1433
|
showNotice: N(() => (ee(e) ?? !0) && t.value)
|
|
@@ -1435,20 +1435,20 @@ function Yr(e) {
|
|
|
1435
1435
|
}
|
|
1436
1436
|
//#endregion
|
|
1437
1437
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1438
|
-
var
|
|
1438
|
+
var ei = { class: "tpl:w-full" }, ti = {
|
|
1439
1439
|
key: 0,
|
|
1440
1440
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1441
|
-
},
|
|
1441
|
+
}, ni = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ri = {
|
|
1442
1442
|
key: 1,
|
|
1443
1443
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1444
|
-
},
|
|
1444
|
+
}, ii = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ai = {
|
|
1445
1445
|
key: 2,
|
|
1446
1446
|
class: "tpl:relative"
|
|
1447
|
-
},
|
|
1447
|
+
}, oi = ["innerHTML"], si = {
|
|
1448
1448
|
key: 0,
|
|
1449
1449
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1450
1450
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1451
|
-
},
|
|
1451
|
+
}, ci = /* @__PURE__ */ F({
|
|
1452
1452
|
__name: "CustomBlock",
|
|
1453
1453
|
props: {
|
|
1454
1454
|
block: {},
|
|
@@ -1456,7 +1456,7 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1456
1456
|
},
|
|
1457
1457
|
emits: ["fetchData"],
|
|
1458
1458
|
setup(e, { emit: n }) {
|
|
1459
|
-
let r = e, i = n, { t: a } =
|
|
1459
|
+
let r = e, i = n, { t: a } = sn(), o = p(en, null), s = _(""), c = _(!1), l = N(() => o?.getDefinition(r.block.customType)), u = N(() => !!l.value), m = N(() => r.block), { isFetching: h, fetch: g, needsFetch: v, hasDataSource: b } = it({
|
|
1460
1460
|
definition: l,
|
|
1461
1461
|
block: m,
|
|
1462
1462
|
onUpdate: (e, t) => {
|
|
@@ -1465,10 +1465,10 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1465
1465
|
dataSourceFetched: t
|
|
1466
1466
|
});
|
|
1467
1467
|
}
|
|
1468
|
-
}), T = p(
|
|
1468
|
+
}), T = p(Dt, vt), E = p(kt, null), O = N(() => {
|
|
1469
1469
|
if (!E?.value) return r.block;
|
|
1470
1470
|
let e = {};
|
|
1471
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1471
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? ie(n, T.value) : n;
|
|
1472
1472
|
return {
|
|
1473
1473
|
...r.block,
|
|
1474
1474
|
fieldValues: e
|
|
@@ -1485,17 +1485,17 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
|
-
let j =
|
|
1488
|
+
let j = ot(k, 150);
|
|
1489
1489
|
return d(() => {
|
|
1490
1490
|
k();
|
|
1491
1491
|
}), f(() => r.block.fieldValues, () => {
|
|
1492
1492
|
j();
|
|
1493
1493
|
}, { deep: !0 }), f(() => E?.value, () => {
|
|
1494
1494
|
j();
|
|
1495
|
-
}), (e, n) => (t(), S("div",
|
|
1495
|
+
}), (e, n) => (t(), S("div", ei, [u.value ? c.value ? (t(), S("div", ri, [C(y(bn), {
|
|
1496
1496
|
size: 24,
|
|
1497
1497
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1498
|
-
}), x("span",
|
|
1498
|
+
}), x("span", ii, D(y(a).customBlocks.renderError), 1)])) : (t(), S("div", ai, [x("div", { innerHTML: s.value }, null, 8, oi), y(b) && y(v) ? (t(), S("div", si, [y(h) ? (t(), A(Sn, {
|
|
1499
1499
|
key: 1,
|
|
1500
1500
|
class: "tpl:w-48"
|
|
1501
1501
|
})) : (t(), S("button", {
|
|
@@ -1503,16 +1503,16 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1503
1503
|
type: "button",
|
|
1504
1504
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1505
1505
|
onClick: n[0] ||= I((...e) => y(g) && y(g)(...e), ["stop"])
|
|
1506
|
-
}, [l.value?.icon ? (t(), A(
|
|
1506
|
+
}, [l.value?.icon ? (t(), A(Ir, {
|
|
1507
1507
|
key: 0,
|
|
1508
1508
|
icon: l.value.icon,
|
|
1509
1509
|
size: 16
|
|
1510
|
-
}, null, 8, ["icon"])) : P("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : P("", !0)])) : (t(), S("div",
|
|
1510
|
+
}, null, 8, ["icon"])) : P("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : P("", !0)])) : (t(), S("div", ti, [C(y(Mr), {
|
|
1511
1511
|
size: 24,
|
|
1512
1512
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1513
|
-
}), x("span",
|
|
1513
|
+
}), x("span", ni, D(y(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1514
1514
|
}
|
|
1515
|
-
}),
|
|
1515
|
+
}), li = { class: "tpl:w-full" }, ui = /* @__PURE__ */ F({
|
|
1516
1516
|
__name: "DividerBlock",
|
|
1517
1517
|
props: {
|
|
1518
1518
|
block: {},
|
|
@@ -1524,28 +1524,28 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1524
1524
|
width: r.block.width === "full" ? "100%" : `${r.block.width}px`,
|
|
1525
1525
|
margin: r.block.width === "full" ? "0" : "0 auto"
|
|
1526
1526
|
}));
|
|
1527
|
-
return (e, r) => (t(), S("div",
|
|
1527
|
+
return (e, r) => (t(), S("div", li, [x("hr", {
|
|
1528
1528
|
class: "tpl:m-0 tpl:border-none",
|
|
1529
1529
|
style: n(i.value)
|
|
1530
1530
|
}, null, 4)]));
|
|
1531
1531
|
}
|
|
1532
|
-
}),
|
|
1532
|
+
}), di = { class: "tpl:w-full" }, fi = ["srcdoc", "title"], pi = {
|
|
1533
1533
|
key: 1,
|
|
1534
1534
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
1535
|
-
},
|
|
1535
|
+
}, mi = {
|
|
1536
1536
|
key: 0,
|
|
1537
1537
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1538
|
-
},
|
|
1538
|
+
}, hi = {
|
|
1539
1539
|
key: 1,
|
|
1540
1540
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1541
|
-
},
|
|
1541
|
+
}, gi = /* @__PURE__ */ F({
|
|
1542
1542
|
__name: "HtmlBlock",
|
|
1543
1543
|
props: {
|
|
1544
1544
|
block: {},
|
|
1545
1545
|
viewport: {}
|
|
1546
1546
|
},
|
|
1547
1547
|
setup(e) {
|
|
1548
|
-
let r = e, { t: a } =
|
|
1548
|
+
let r = e, { t: a } = sn(), o = p(zt, !1), s = N(() => r.block.content.trim().length > 0), c = N(() => o && s.value), l = p(Dt, vt), u = p(kt, null), d = N(() => u?.value ? ie(r.block.content, l.value) : r.block.content), m = _(null), h = _(60), g = null;
|
|
1549
1549
|
function v() {
|
|
1550
1550
|
let e = m.value?.contentDocument;
|
|
1551
1551
|
e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1559,7 +1559,7 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1559
1559
|
e || (g?.disconnect(), g = null);
|
|
1560
1560
|
}), i(() => {
|
|
1561
1561
|
g?.disconnect(), g = null;
|
|
1562
|
-
}), (e, r) => (t(), S("div",
|
|
1562
|
+
}), (e, r) => (t(), S("div", di, [c.value ? (t(), S("iframe", {
|
|
1563
1563
|
key: 0,
|
|
1564
1564
|
ref_key: "iframeRef",
|
|
1565
1565
|
ref: m,
|
|
@@ -1569,22 +1569,22 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1569
1569
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1570
1570
|
style: n({ height: `${h.value}px` }),
|
|
1571
1571
|
onLoad: b
|
|
1572
|
-
}, null, 44,
|
|
1572
|
+
}, null, 44, fi)) : (t(), S("div", pi, [C(y(Ze), {
|
|
1573
1573
|
size: 24,
|
|
1574
1574
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1575
|
-
}), s.value ? (t(), S("span",
|
|
1575
|
+
}), s.value ? (t(), S("span", mi, D(y(a).html.preview), 1)) : (t(), S("span", hi, D(y(a).html.empty), 1))]))]));
|
|
1576
1576
|
}
|
|
1577
|
-
}),
|
|
1577
|
+
}), _i = ["data-drop-enabled"], vi = {
|
|
1578
1578
|
key: 0,
|
|
1579
1579
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1580
1580
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1581
|
-
},
|
|
1581
|
+
}, yi = ["href"], bi = ["src", "alt"], xi = ["src", "alt"], Si = {
|
|
1582
1582
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1583
1583
|
style: { opacity: "0.7" }
|
|
1584
|
-
},
|
|
1584
|
+
}, Ci = ["href"], wi = ["src", "alt"], Ti = ["src", "alt"], Ei = {
|
|
1585
1585
|
key: 4,
|
|
1586
1586
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1587
|
-
},
|
|
1587
|
+
}, Di = ["aria-label"], Oi = { key: 1 }, ki = /* @__PURE__ */ F({
|
|
1588
1588
|
__name: "ImageBlock",
|
|
1589
1589
|
props: {
|
|
1590
1590
|
block: {},
|
|
@@ -1592,7 +1592,7 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1592
1592
|
},
|
|
1593
1593
|
emits: ["update"],
|
|
1594
1594
|
setup(e, { emit: r }) {
|
|
1595
|
-
let i = e, a = r, { t: o } =
|
|
1595
|
+
let i = e, a = r, { t: o } = sn(), { syntax: s } = Tn(), c = p(wt, null), l = p(Bt, null), u = N(() => !!c), d = Dn();
|
|
1596
1596
|
async function f() {
|
|
1597
1597
|
let e = await c?.({ accept: ["images"] });
|
|
1598
1598
|
if (d.alive && e) {
|
|
@@ -1619,7 +1619,7 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
|
-
let { isOver: b } =
|
|
1622
|
+
let { isOver: b } = Xe({
|
|
1623
1623
|
target: m,
|
|
1624
1624
|
enabled: g,
|
|
1625
1625
|
onFiles: v
|
|
@@ -1634,7 +1634,7 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1634
1634
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1635
1635
|
marginRight: e === "center" ? "auto" : void 0
|
|
1636
1636
|
};
|
|
1637
|
-
}), O = N(() =>
|
|
1637
|
+
}), O = N(() => De(i.block.src, s)), k = Fn(() => O.value ? void 0 : i.block.src), A = Fn(() => O.value ? i.block.placeholderUrl : void 0);
|
|
1638
1638
|
return (r, i) => (t(), S("div", {
|
|
1639
1639
|
ref_key: "dropZoneRef",
|
|
1640
1640
|
ref: m,
|
|
@@ -1642,11 +1642,11 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1642
1642
|
"data-drop-enabled": g.value,
|
|
1643
1643
|
class: "tpl:relative tpl:w-full",
|
|
1644
1644
|
style: n(T.value)
|
|
1645
|
-
}, [g.value && (y(b) || h.value) ? (t(), S("div",
|
|
1645
|
+
}, [g.value && (y(b) || h.value) ? (t(), S("div", vi, [h.value ? (t(), S(M, { key: 0 }, [C(y(_n), {
|
|
1646
1646
|
class: "tpl-spinner",
|
|
1647
1647
|
size: 20,
|
|
1648
1648
|
"stroke-width": 2
|
|
1649
|
-
}), w(" " + D(y(o).image.uploading), 1)], 64)) : (t(), S(M, { key: 1 }, [C(y(
|
|
1649
|
+
}), w(" " + D(y(o).image.uploading), 1)], 64)) : (t(), S(M, { key: 1 }, [C(y(xn), {
|
|
1650
1650
|
size: 20,
|
|
1651
1651
|
"stroke-width": 1.5
|
|
1652
1652
|
}), w(" " + D(y(o).image.dropToUpload), 1)], 64))])) : P("", !0), e.block.src && O.value && e.block.placeholderUrl ? (t(), S(M, { key: 1 }, [e.block.linkUrl ? (t(), S("a", {
|
|
@@ -1661,22 +1661,22 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1661
1661
|
src: y(A),
|
|
1662
1662
|
alt: e.block.alt || y(o).image.altTextPlaceholder,
|
|
1663
1663
|
style: n(E.value)
|
|
1664
|
-
}, null, 12,
|
|
1664
|
+
}, null, 12, bi)], 8, yi)) : (t(), S("img", {
|
|
1665
1665
|
key: 1,
|
|
1666
1666
|
class: "tpl:border-0",
|
|
1667
1667
|
src: y(A),
|
|
1668
1668
|
alt: e.block.alt,
|
|
1669
1669
|
style: n(E.value)
|
|
1670
|
-
}, null, 12,
|
|
1670
|
+
}, null, 12, xi))], 64)) : e.block.src && O.value ? (t(), S("div", {
|
|
1671
1671
|
key: 2,
|
|
1672
1672
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1673
1673
|
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, E.value])
|
|
1674
|
-
}, [C(y(
|
|
1674
|
+
}, [C(y(qe), {
|
|
1675
1675
|
size: 32,
|
|
1676
1676
|
"stroke-width": 1.5,
|
|
1677
1677
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1678
1678
|
style: { opacity: "0.5" }
|
|
1679
|
-
}), x("span",
|
|
1679
|
+
}), x("span", Si, [C(wr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (t(), S(M, { key: 3 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1680
1680
|
key: 0,
|
|
1681
1681
|
href: e.block.linkUrl,
|
|
1682
1682
|
target: "_blank",
|
|
@@ -1688,33 +1688,33 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1688
1688
|
src: y(k),
|
|
1689
1689
|
alt: e.block.alt || y(o).image.altTextPlaceholder,
|
|
1690
1690
|
style: n(E.value)
|
|
1691
|
-
}, null, 12,
|
|
1691
|
+
}, null, 12, wi)], 8, Ci)) : (t(), S("img", {
|
|
1692
1692
|
key: 1,
|
|
1693
1693
|
class: "tpl:border-0",
|
|
1694
1694
|
src: y(k),
|
|
1695
1695
|
alt: e.block.alt,
|
|
1696
1696
|
style: n(E.value)
|
|
1697
|
-
}, null, 12,
|
|
1697
|
+
}, null, 12, Ti))], 64)) : (t(), S("div", Ei, [u.value ? (t(), S("button", {
|
|
1698
1698
|
key: 0,
|
|
1699
1699
|
"aria-label": y(o).image.browseMedia,
|
|
1700
1700
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1701
1701
|
onClick: I(f, ["stop"])
|
|
1702
|
-
}, [C(y(
|
|
1702
|
+
}, [C(y(qe), {
|
|
1703
1703
|
size: 14,
|
|
1704
1704
|
"stroke-width": 1.5
|
|
1705
|
-
}), w(" " + D(y(o).image.browseMedia), 1)], 8,
|
|
1705
|
+
}), w(" " + D(y(o).image.browseMedia), 1)], 8, Di)) : (t(), S("span", Oi, D(y(o).image.clickToAdd), 1))]))], 12, _i));
|
|
1706
1706
|
}
|
|
1707
|
-
}),
|
|
1707
|
+
}), Ai = { class: "tpl:w-full" }, ji = ["href"], Mi = {
|
|
1708
1708
|
key: 1,
|
|
1709
1709
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
1710
|
-
},
|
|
1710
|
+
}, Ni = /* @__PURE__ */ F({
|
|
1711
1711
|
__name: "MenuBlock",
|
|
1712
1712
|
props: {
|
|
1713
1713
|
block: {},
|
|
1714
1714
|
viewport: {}
|
|
1715
1715
|
},
|
|
1716
1716
|
setup(e) {
|
|
1717
|
-
let r = e, { t: i } =
|
|
1717
|
+
let r = e, { t: i } = sn(), a = N(() => ({
|
|
1718
1718
|
display: "flex",
|
|
1719
1719
|
flexWrap: "wrap",
|
|
1720
1720
|
gap: `0 ${r.block.spacing}px`,
|
|
@@ -1726,7 +1726,7 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1726
1726
|
function s(e) {
|
|
1727
1727
|
return e || r.block.linkColor || r.block.color;
|
|
1728
1728
|
}
|
|
1729
|
-
return (r, c) => (t(), S("div",
|
|
1729
|
+
return (r, c) => (t(), S("div", Ai, [o.value ? (t(), S("div", {
|
|
1730
1730
|
key: 0,
|
|
1731
1731
|
style: n(a.value)
|
|
1732
1732
|
}, [(t(!0), S(M, null, l(e.block.items, (r, i) => (t(), S(M, { key: r.id }, [x("a", {
|
|
@@ -1738,15 +1738,15 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1738
1738
|
textDecoration: r.underline ? "underline" : "none"
|
|
1739
1739
|
}),
|
|
1740
1740
|
onClick: c[0] ||= I(() => {}, ["prevent"])
|
|
1741
|
-
}, [C(
|
|
1741
|
+
}, [C(wr, { text: r.text || "..." }, null, 8, ["text"])], 12, ji), i < e.block.items.length - 1 ? (t(), S("span", {
|
|
1742
1742
|
key: 0,
|
|
1743
1743
|
style: n({
|
|
1744
1744
|
color: e.block.separatorColor,
|
|
1745
1745
|
padding: `0 ${e.block.spacing}px`
|
|
1746
1746
|
})
|
|
1747
|
-
}, D(e.block.separator), 5)) : P("", !0)], 64))), 128))], 4)) : (t(), S("div",
|
|
1747
|
+
}, D(e.block.separator), 5)) : P("", !0)], 64))), 128))], 4)) : (t(), S("div", Mi, [C(y(et), { size: 16 }), x("span", null, D(y(i).menu.addLinks), 1)]))]));
|
|
1748
1748
|
}
|
|
1749
|
-
}),
|
|
1749
|
+
}), Pi = /* @__PURE__ */ new Set([
|
|
1750
1750
|
"http",
|
|
1751
1751
|
"https",
|
|
1752
1752
|
"mailto",
|
|
@@ -1756,7 +1756,7 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1756
1756
|
"sms",
|
|
1757
1757
|
"xmpp",
|
|
1758
1758
|
"cid"
|
|
1759
|
-
]),
|
|
1759
|
+
]), Fi = /* @__PURE__ */ new Set([
|
|
1760
1760
|
"SCRIPT",
|
|
1761
1761
|
"STYLE",
|
|
1762
1762
|
"IFRAME",
|
|
@@ -1766,7 +1766,7 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1766
1766
|
"META",
|
|
1767
1767
|
"BASE",
|
|
1768
1768
|
"FORM"
|
|
1769
|
-
]),
|
|
1769
|
+
]), Ii = /* @__PURE__ */ new Set([
|
|
1770
1770
|
"href",
|
|
1771
1771
|
"xlink:href",
|
|
1772
1772
|
"formaction",
|
|
@@ -1775,16 +1775,16 @@ var Xr = { class: "tpl:w-full" }, Zr = {
|
|
|
1775
1775
|
"background",
|
|
1776
1776
|
"poster"
|
|
1777
1777
|
]);
|
|
1778
|
-
function
|
|
1778
|
+
function Li(e, t) {
|
|
1779
1779
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1780
1780
|
if (!n || n.startsWith("#")) return !0;
|
|
1781
1781
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1782
1782
|
if (!r) return !0;
|
|
1783
1783
|
let i = r[1].toLowerCase();
|
|
1784
|
-
return
|
|
1784
|
+
return Pi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1785
1785
|
}
|
|
1786
|
-
function
|
|
1787
|
-
if (
|
|
1786
|
+
function Ri(e) {
|
|
1787
|
+
if (Fi.has(e.tagName)) {
|
|
1788
1788
|
e.remove();
|
|
1789
1789
|
return;
|
|
1790
1790
|
}
|
|
@@ -1796,29 +1796,29 @@ function Pi(e) {
|
|
|
1796
1796
|
e.removeAttribute(n);
|
|
1797
1797
|
continue;
|
|
1798
1798
|
}
|
|
1799
|
-
if (
|
|
1800
|
-
|
|
1799
|
+
if (Ii.has(t)) {
|
|
1800
|
+
Li(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1801
1801
|
continue;
|
|
1802
1802
|
}
|
|
1803
1803
|
if (t === "src") {
|
|
1804
|
-
|
|
1804
|
+
Li(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1805
1805
|
continue;
|
|
1806
1806
|
}
|
|
1807
1807
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1808
1808
|
}
|
|
1809
1809
|
let n = Array.from(e.children);
|
|
1810
|
-
for (let e of n)
|
|
1810
|
+
for (let e of n) Ri(e);
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1812
|
+
function zi(e) {
|
|
1813
1813
|
if (typeof DOMParser > "u") return e;
|
|
1814
1814
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1815
|
-
for (let e of n)
|
|
1815
|
+
for (let e of n) Ri(e);
|
|
1816
1816
|
return t.innerHTML;
|
|
1817
1817
|
}
|
|
1818
1818
|
//#endregion
|
|
1819
1819
|
//#region src/composables/useEditableTextBlock.ts
|
|
1820
|
-
function
|
|
1821
|
-
let t = p(
|
|
1820
|
+
function Bi(e) {
|
|
1821
|
+
let t = p(Dt, vt), n = p(kt, null), { syntax: r } = Tn(), i = N(() => n?.value ? _e(e(), t.value) : Ce(e(), t.value)), a = N(() => zi(fe(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = dt(s), { toLocal: u } = fn(), d = N(() => u({
|
|
1822
1822
|
top: c.value - 8,
|
|
1823
1823
|
left: l.value
|
|
1824
1824
|
}));
|
|
@@ -1839,14 +1839,14 @@ function Ii(e) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
//#endregion
|
|
1841
1841
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1842
|
-
var
|
|
1842
|
+
var Vi = ["innerHTML"], Hi = /* @__PURE__ */ F({
|
|
1843
1843
|
__name: "ParagraphBlock",
|
|
1844
1844
|
props: {
|
|
1845
1845
|
block: {},
|
|
1846
1846
|
viewport: {}
|
|
1847
1847
|
},
|
|
1848
1848
|
setup(e) {
|
|
1849
|
-
let n = e, r = v(() => import("./ParagraphEditor-
|
|
1849
|
+
let n = e, r = v(() => import("./ParagraphEditor-D67Cqh-T.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Bi(() => n.block.content);
|
|
1850
1850
|
return (n, u) => (t(), S("div", {
|
|
1851
1851
|
ref_key: "blockRef",
|
|
1852
1852
|
ref: a,
|
|
@@ -1865,54 +1865,64 @@ var Li = ["innerHTML"], Ri = /* @__PURE__ */ F({
|
|
|
1865
1865
|
key: 1,
|
|
1866
1866
|
class: "tpl-text-content tpl:outline-none",
|
|
1867
1867
|
innerHTML: y(s)
|
|
1868
|
-
}, null, 8,
|
|
1868
|
+
}, null, 8, Vi))], 544));
|
|
1869
1869
|
}
|
|
1870
1870
|
});
|
|
1871
1871
|
//#endregion
|
|
1872
1872
|
//#region src/utils/blockComponentResolver.ts
|
|
1873
|
-
function
|
|
1873
|
+
function Ui(e) {
|
|
1874
1874
|
let t = { fontFamily: e.fontFamily };
|
|
1875
1875
|
return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
|
|
1876
1876
|
}
|
|
1877
|
-
function
|
|
1877
|
+
function Wi(e, t, n) {
|
|
1878
1878
|
if (t) {
|
|
1879
1879
|
let n = t.getComponent(e);
|
|
1880
1880
|
if (n) return n;
|
|
1881
1881
|
}
|
|
1882
1882
|
return n[e.type] ?? null;
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1884
|
+
function Gi(e) {
|
|
1885
|
+
if (e.type === "wrapper") return {};
|
|
1885
1886
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
1886
1887
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
1887
1888
|
backgroundColor: n || "transparent"
|
|
1888
1889
|
};
|
|
1889
|
-
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1890
|
+
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ae.paragraphGap : Ae.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
1890
1891
|
}
|
|
1891
|
-
function
|
|
1892
|
+
function Ki(e) {
|
|
1892
1893
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1893
1894
|
let t = e.wrapper, n = {};
|
|
1894
1895
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
1895
1896
|
}
|
|
1897
|
+
function qi(e) {
|
|
1898
|
+
if (e.type !== "wrapper") return null;
|
|
1899
|
+
let t = {};
|
|
1900
|
+
if (e.styles.backgroundColor && (t.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
1901
|
+
let n = e.styles.padding;
|
|
1902
|
+
t.padding = `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`;
|
|
1903
|
+
}
|
|
1904
|
+
return e.borderRadius && e.borderRadius > 0 && (t.borderRadius = `${e.borderRadius}px`), t;
|
|
1905
|
+
}
|
|
1896
1906
|
//#endregion
|
|
1897
1907
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1898
|
-
var
|
|
1908
|
+
var Ji = [
|
|
1899
1909
|
"data-block-id",
|
|
1900
1910
|
"data-block-type",
|
|
1901
1911
|
"data-tpl-picked"
|
|
1902
|
-
],
|
|
1912
|
+
], Yi = ["aria-label"], Xi = [
|
|
1903
1913
|
"aria-label",
|
|
1904
1914
|
"aria-pressed",
|
|
1905
1915
|
"title"
|
|
1906
|
-
],
|
|
1916
|
+
], Zi = ["aria-label", "title"], Qi = ["aria-label", "title"], $i = ["aria-label", "title"], ea = {
|
|
1907
1917
|
key: 1,
|
|
1908
1918
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
1909
|
-
},
|
|
1919
|
+
}, ta = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, na = {
|
|
1910
1920
|
key: 2,
|
|
1911
1921
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1912
|
-
},
|
|
1922
|
+
}, ra = ["aria-label", "title"], ia = {
|
|
1913
1923
|
key: 3,
|
|
1914
1924
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1915
|
-
},
|
|
1925
|
+
}, aa = ["aria-label"], oa = /*#__PURE__*/ Cn(/* @__PURE__ */ F({
|
|
1916
1926
|
__name: "BlockWrapper",
|
|
1917
1927
|
props: {
|
|
1918
1928
|
block: {},
|
|
@@ -1924,7 +1934,7 @@ var Ui = [
|
|
|
1924
1934
|
},
|
|
1925
1935
|
emits: ["select"],
|
|
1926
1936
|
setup(e, { emit: r }) {
|
|
1927
|
-
let i = v(() => import("./BlockIssueBadge-
|
|
1937
|
+
let i = v(() => import("./BlockIssueBadge-D8KsGWY6.js")), o = e, s = r, { t: c, format: l } = sn(), d = p(jt, null), f = _(null), m = N(() => d?.liftedBlockId.value === o.block.id), h = N(() => m.value ? l(c.blockActions.dragLifted, { block: o.block.type }) : c.blockActions.drag);
|
|
1928
1938
|
async function g() {
|
|
1929
1939
|
await a(), f.value?.focus();
|
|
1930
1940
|
}
|
|
@@ -1950,7 +1960,7 @@ var Ui = [
|
|
|
1950
1960
|
let T = N(() => !o.viewport || !o.block.visibility ? !1 : o.block.visibility[o.viewport] === !1), E = N(() => o.previewMode === !0 && T.value), O = N(() => o.viewport ? {
|
|
1951
1961
|
desktop: c.viewport.desktop,
|
|
1952
1962
|
mobile: c.viewport.mobile
|
|
1953
|
-
}[o.viewport] ?? o.viewport : ""), A = N(() => !!o.block.displayCondition), j = p(
|
|
1963
|
+
}[o.viewport] ?? o.viewport : ""), A = N(() => !!o.block.displayCondition), j = p(Rt, null), M = p(Ht, null), ee = p(qt, {}), F = N(() => ee.savedBlocks?.isPicking.value === !0), te = N(() => !o.nested && ee.savedBlocks?.isAvailable.value === !0 && ee.savedBlocks?.canCreate.value === !0), ne = N(() => o.isSelected && !F.value), re = N(() => ee.comments?.getBlockCount(o.block.id) ?? 0), ie = N(() => Gi(o.block)), ae = N(() => Ki(o.block));
|
|
1954
1964
|
function oe(e) {
|
|
1955
1965
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
1956
1966
|
}
|
|
@@ -1995,61 +2005,61 @@ var Ui = [
|
|
|
1995
2005
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1996
2006
|
title: y(c).blockActions.drag,
|
|
1997
2007
|
onKeydown: b
|
|
1998
|
-
}, [C(y(
|
|
2008
|
+
}, [C(y(jr), {
|
|
1999
2009
|
size: 14,
|
|
2000
2010
|
"stroke-width": 1.5
|
|
2001
|
-
})], 40,
|
|
2011
|
+
})], 40, Xi),
|
|
2002
2012
|
x("button", {
|
|
2003
2013
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2004
2014
|
"aria-label": y(c).blockActions.duplicate,
|
|
2005
2015
|
title: y(c).blockActions.duplicate,
|
|
2006
2016
|
onClick: I(ce, ["stop"])
|
|
2007
|
-
}, [C(y(
|
|
2017
|
+
}, [C(y(gn), {
|
|
2008
2018
|
size: 14,
|
|
2009
2019
|
"stroke-width": 1.5
|
|
2010
|
-
})], 8,
|
|
2020
|
+
})], 8, Zi),
|
|
2011
2021
|
te.value ? (t(), S("button", {
|
|
2012
2022
|
key: 0,
|
|
2013
2023
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2014
2024
|
"aria-label": y(c).blockActions.saveAsBlock,
|
|
2015
2025
|
title: y(c).blockActions.saveAsBlock,
|
|
2016
2026
|
onClick: I(le, ["stop"])
|
|
2017
|
-
}, [C(y(
|
|
2027
|
+
}, [C(y(Dr), {
|
|
2018
2028
|
size: 14,
|
|
2019
2029
|
"stroke-width": 1.5
|
|
2020
|
-
})], 8,
|
|
2030
|
+
})], 8, Qi)) : P("", !0),
|
|
2021
2031
|
x("button", {
|
|
2022
2032
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2023
2033
|
"aria-label": y(c).blockActions.delete,
|
|
2024
2034
|
title: y(c).blockActions.delete,
|
|
2025
2035
|
onClick: I(se, ["stop"])
|
|
2026
|
-
}, [C(y(
|
|
2036
|
+
}, [C(y(yn), {
|
|
2027
2037
|
size: 14,
|
|
2028
2038
|
"stroke-width": 1.5
|
|
2029
|
-
})], 8,
|
|
2030
|
-
], 8,
|
|
2031
|
-
T.value ? (t(), S("div",
|
|
2039
|
+
})], 8, $i)
|
|
2040
|
+
], 8, Yi)) : P("", !0),
|
|
2041
|
+
T.value ? (t(), S("div", ea, [x("span", ta, [C(y(kr), {
|
|
2032
2042
|
size: 12,
|
|
2033
2043
|
"stroke-width": 1.5
|
|
2034
2044
|
}), w(" " + D(y(l)(y(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : P("", !0),
|
|
2035
|
-
A.value && !T.value ? (t(), S("div",
|
|
2045
|
+
A.value && !T.value ? (t(), S("div", na, [x("button", {
|
|
2036
2046
|
"data-testid": "condition-toggle",
|
|
2037
2047
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2038
2048
|
"aria-label": y(c).blockActions.conditionToggle,
|
|
2039
2049
|
title: e.block.displayCondition?.label,
|
|
2040
2050
|
onClick: I(ue, ["stop"])
|
|
2041
|
-
}, [C(y(
|
|
2051
|
+
}, [C(y(Ar), {
|
|
2042
2052
|
size: 12,
|
|
2043
2053
|
"stroke-width": 2
|
|
2044
|
-
})], 8,
|
|
2045
|
-
re.value > 0 && !T.value ? (t(), S("div",
|
|
2054
|
+
})], 8, ra)])) : P("", !0),
|
|
2055
|
+
re.value > 0 && !T.value ? (t(), S("div", ia, [x("button", {
|
|
2046
2056
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2047
2057
|
"aria-label": y(l)(y(c).blockActions.comments, { count: String(re.value) }),
|
|
2048
2058
|
onClick: a[0] ||= I((t) => y(ee).comments?.openForBlock(e.block.id), ["stop"])
|
|
2049
|
-
}, [C(y(
|
|
2059
|
+
}, [C(y(vn), {
|
|
2050
2060
|
size: 12,
|
|
2051
2061
|
"stroke-width": 2.5
|
|
2052
|
-
}), w(" " + D(re.value), 1)], 8,
|
|
2062
|
+
}), w(" " + D(re.value), 1)], 8, aa)])) : P("", !0),
|
|
2053
2063
|
ae.value ? (t(), S("div", {
|
|
2054
2064
|
key: 4,
|
|
2055
2065
|
class: "tpl-section-wrapper",
|
|
@@ -2062,31 +2072,31 @@ var Ui = [
|
|
|
2062
2072
|
class: "tpl-block-content",
|
|
2063
2073
|
style: n(ie.value)
|
|
2064
2074
|
}, [u(r.$slots, "default", {}, void 0, !0)], 4))
|
|
2065
|
-
], 10,
|
|
2075
|
+
], 10, Ji));
|
|
2066
2076
|
}
|
|
2067
2077
|
}), [["__scopeId", "data-v-2c239048"]]);
|
|
2068
2078
|
//#endregion
|
|
2069
2079
|
//#region src/utils/unwrapParagraph.ts
|
|
2070
|
-
function
|
|
2080
|
+
function sa(e) {
|
|
2071
2081
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2072
2082
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2073
2083
|
}
|
|
2074
2084
|
//#endregion
|
|
2075
2085
|
//#region src/components/blocks/TitleBlock.vue
|
|
2076
|
-
var
|
|
2086
|
+
var ca = /* @__PURE__ */ F({
|
|
2077
2087
|
__name: "TitleBlock",
|
|
2078
2088
|
props: {
|
|
2079
2089
|
block: {},
|
|
2080
2090
|
viewport: {}
|
|
2081
2091
|
},
|
|
2082
2092
|
setup(e) {
|
|
2083
|
-
let r = e, i = v(() => import("./TitleEditor-
|
|
2093
|
+
let r = e, i = v(() => import("./TitleEditor-v5p89Djs.js")), { isEditing: a, blockRef: s, toolbarPosition: c, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Bi(() => r.block.content), f = N(() => {
|
|
2084
2094
|
let e = {
|
|
2085
|
-
fontSize: `${
|
|
2095
|
+
fontSize: `${Le[r.block.level]}px`,
|
|
2086
2096
|
textAlign: r.block.textAlign
|
|
2087
2097
|
};
|
|
2088
2098
|
return r.block.color && (e.color = r.block.color), r.block.fontFamily && (e.fontFamily = r.block.fontFamily), e;
|
|
2089
|
-
}), p = N(() => `h${r.block.level}`), m = N(() =>
|
|
2099
|
+
}), p = N(() => `h${r.block.level}`), m = N(() => sa(l.value));
|
|
2090
2100
|
return (r, l) => (t(), S("div", {
|
|
2091
2101
|
ref_key: "blockRef",
|
|
2092
2102
|
ref: s,
|
|
@@ -2112,88 +2122,88 @@ var ra = /* @__PURE__ */ F({
|
|
|
2112
2122
|
});
|
|
2113
2123
|
//#endregion
|
|
2114
2124
|
//#region src/utils/sectionColumnDrop.ts
|
|
2115
|
-
function
|
|
2125
|
+
function la(e) {
|
|
2116
2126
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2117
2127
|
}
|
|
2118
2128
|
//#endregion
|
|
2119
2129
|
//#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2120
|
-
var
|
|
2130
|
+
var ua = Object.defineProperty, da = Object.getOwnPropertySymbols, fa = Object.prototype.hasOwnProperty, pa = Object.prototype.propertyIsEnumerable, ma = (e, t, n) => t in e ? ua(e, t, {
|
|
2121
2131
|
enumerable: !0,
|
|
2122
2132
|
configurable: !0,
|
|
2123
2133
|
writable: !0,
|
|
2124
2134
|
value: n
|
|
2125
|
-
}) : e[t] = n,
|
|
2126
|
-
for (var n in t ||= {})
|
|
2127
|
-
if (
|
|
2135
|
+
}) : e[t] = n, ha = (e, t) => {
|
|
2136
|
+
for (var n in t ||= {}) fa.call(t, n) && ma(e, n, t[n]);
|
|
2137
|
+
if (da) for (var n of da(t)) pa.call(t, n) && ma(e, n, t[n]);
|
|
2128
2138
|
return e;
|
|
2129
|
-
},
|
|
2139
|
+
}, ga = (e, t) => {
|
|
2130
2140
|
var n = {};
|
|
2131
|
-
for (var r in e)
|
|
2132
|
-
if (e != null &&
|
|
2141
|
+
for (var r in e) fa.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2142
|
+
if (e != null && da) for (var r of da(e)) t.indexOf(r) < 0 && pa.call(e, r) && (n[r] = e[r]);
|
|
2133
2143
|
return n;
|
|
2134
|
-
},
|
|
2135
|
-
function
|
|
2136
|
-
console.warn(
|
|
2144
|
+
}, _a = "[vue-draggable-plus]: ";
|
|
2145
|
+
function va(e) {
|
|
2146
|
+
console.warn(_a + e);
|
|
2137
2147
|
}
|
|
2138
|
-
function
|
|
2139
|
-
console.error(
|
|
2148
|
+
function ya(e) {
|
|
2149
|
+
console.error(_a + e);
|
|
2140
2150
|
}
|
|
2141
|
-
function
|
|
2151
|
+
function ba(e, t, n) {
|
|
2142
2152
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2143
2153
|
}
|
|
2144
|
-
function
|
|
2154
|
+
function xa(e) {
|
|
2145
2155
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2146
2156
|
}
|
|
2147
|
-
function
|
|
2148
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2157
|
+
function Sa(e) {
|
|
2158
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[xa(n)] = e[n]), t), {});
|
|
2149
2159
|
}
|
|
2150
|
-
function
|
|
2160
|
+
function Ca(e, t) {
|
|
2151
2161
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2152
2162
|
}
|
|
2153
|
-
function
|
|
2163
|
+
function wa(e, t, n) {
|
|
2154
2164
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2155
2165
|
}
|
|
2156
|
-
function
|
|
2166
|
+
function Ta(e) {
|
|
2157
2167
|
return e === void 0;
|
|
2158
2168
|
}
|
|
2159
|
-
function
|
|
2169
|
+
function Ea(e) {
|
|
2160
2170
|
return typeof e == "string";
|
|
2161
2171
|
}
|
|
2162
|
-
function
|
|
2172
|
+
function Da(e, t, n) {
|
|
2163
2173
|
let r = e.children[n];
|
|
2164
2174
|
e.insertBefore(t, r);
|
|
2165
2175
|
}
|
|
2166
|
-
function
|
|
2176
|
+
function Oa(e) {
|
|
2167
2177
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2168
2178
|
}
|
|
2169
|
-
function
|
|
2179
|
+
function ka(e, t = document) {
|
|
2170
2180
|
let n = null;
|
|
2171
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2181
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || va(`Element not found: ${e}`), n;
|
|
2172
2182
|
}
|
|
2173
|
-
function
|
|
2183
|
+
function Aa(e, t, n = null) {
|
|
2174
2184
|
return function(...r) {
|
|
2175
2185
|
return e.apply(n, r), t.apply(n, r);
|
|
2176
2186
|
};
|
|
2177
2187
|
}
|
|
2178
|
-
function
|
|
2179
|
-
let n =
|
|
2188
|
+
function ja(e, t) {
|
|
2189
|
+
let n = ha({}, e);
|
|
2180
2190
|
return Object.keys(t).forEach((r) => {
|
|
2181
|
-
n[r] ? n[r] =
|
|
2191
|
+
n[r] ? n[r] = Aa(e[r], t[r]) : n[r] = t[r];
|
|
2182
2192
|
}), n;
|
|
2183
2193
|
}
|
|
2184
|
-
function
|
|
2194
|
+
function Ma(e) {
|
|
2185
2195
|
return e instanceof HTMLElement;
|
|
2186
2196
|
}
|
|
2187
|
-
function
|
|
2197
|
+
function Na(e, t) {
|
|
2188
2198
|
Object.keys(e).forEach((n) => {
|
|
2189
2199
|
t(n, e[n]);
|
|
2190
2200
|
});
|
|
2191
2201
|
}
|
|
2192
|
-
function
|
|
2202
|
+
function Pa(e) {
|
|
2193
2203
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2194
2204
|
}
|
|
2195
|
-
var
|
|
2196
|
-
function
|
|
2205
|
+
var Fa = Object.assign;
|
|
2206
|
+
function Ia(e, t) {
|
|
2197
2207
|
var n = Object.keys(e);
|
|
2198
2208
|
if (Object.getOwnPropertySymbols) {
|
|
2199
2209
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2203,26 +2213,26 @@ function ja(e, t) {
|
|
|
2203
2213
|
}
|
|
2204
2214
|
return n;
|
|
2205
2215
|
}
|
|
2206
|
-
function
|
|
2216
|
+
function La(e) {
|
|
2207
2217
|
for (var t = 1; t < arguments.length; t++) {
|
|
2208
2218
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2209
|
-
t % 2 ?
|
|
2210
|
-
|
|
2211
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2219
|
+
t % 2 ? Ia(Object(n), !0).forEach(function(t) {
|
|
2220
|
+
za(e, t, n[t]);
|
|
2221
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ia(Object(n)).forEach(function(t) {
|
|
2212
2222
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2213
2223
|
});
|
|
2214
2224
|
}
|
|
2215
2225
|
return e;
|
|
2216
2226
|
}
|
|
2217
|
-
function
|
|
2227
|
+
function Ra(e) {
|
|
2218
2228
|
"@babel/helpers - typeof";
|
|
2219
|
-
return
|
|
2229
|
+
return Ra = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2220
2230
|
return typeof e;
|
|
2221
2231
|
} : function(e) {
|
|
2222
2232
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2223
|
-
},
|
|
2233
|
+
}, Ra(e);
|
|
2224
2234
|
}
|
|
2225
|
-
function
|
|
2235
|
+
function za(e, t, n) {
|
|
2226
2236
|
return t in e ? Object.defineProperty(e, t, {
|
|
2227
2237
|
value: n,
|
|
2228
2238
|
enumerable: !0,
|
|
@@ -2230,44 +2240,44 @@ function Pa(e, t, n) {
|
|
|
2230
2240
|
writable: !0
|
|
2231
2241
|
}) : e[t] = n, e;
|
|
2232
2242
|
}
|
|
2233
|
-
function
|
|
2234
|
-
return
|
|
2243
|
+
function Ba() {
|
|
2244
|
+
return Ba = Object.assign || function(e) {
|
|
2235
2245
|
for (var t = 1; t < arguments.length; t++) {
|
|
2236
2246
|
var n = arguments[t];
|
|
2237
2247
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2238
2248
|
}
|
|
2239
2249
|
return e;
|
|
2240
|
-
},
|
|
2250
|
+
}, Ba.apply(this, arguments);
|
|
2241
2251
|
}
|
|
2242
|
-
function
|
|
2252
|
+
function Va(e, t) {
|
|
2243
2253
|
if (e == null) return {};
|
|
2244
2254
|
for (var n = {}, r = Object.keys(e), i, a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2245
2255
|
return n;
|
|
2246
2256
|
}
|
|
2247
|
-
function
|
|
2257
|
+
function Ha(e, t) {
|
|
2248
2258
|
if (e == null) return {};
|
|
2249
|
-
var n =
|
|
2259
|
+
var n = Va(e, t), r, i;
|
|
2250
2260
|
if (Object.getOwnPropertySymbols) {
|
|
2251
2261
|
var a = Object.getOwnPropertySymbols(e);
|
|
2252
2262
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2253
2263
|
}
|
|
2254
2264
|
return n;
|
|
2255
2265
|
}
|
|
2256
|
-
var
|
|
2257
|
-
function
|
|
2266
|
+
var Ua = "1.15.2";
|
|
2267
|
+
function Wa(e) {
|
|
2258
2268
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2259
2269
|
}
|
|
2260
|
-
var
|
|
2270
|
+
var Ga = Wa(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ka = Wa(/Edge/i), qa = Wa(/firefox/i), Ja = Wa(/safari/i) && !Wa(/chrome/i) && !Wa(/android/i), Ya = Wa(/iP(ad|od|hone)/i), Xa = Wa(/chrome/i) && Wa(/android/i), Za = {
|
|
2261
2271
|
capture: !1,
|
|
2262
2272
|
passive: !1
|
|
2263
2273
|
};
|
|
2264
2274
|
function L(e, t, n) {
|
|
2265
|
-
e.addEventListener(t, n, !
|
|
2275
|
+
e.addEventListener(t, n, !Ga && Za);
|
|
2266
2276
|
}
|
|
2267
2277
|
function R(e, t, n) {
|
|
2268
|
-
e.removeEventListener(t, n, !
|
|
2278
|
+
e.removeEventListener(t, n, !Ga && Za);
|
|
2269
2279
|
}
|
|
2270
|
-
function
|
|
2280
|
+
function Qa(e, t) {
|
|
2271
2281
|
if (t) {
|
|
2272
2282
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2273
2283
|
if (e.matches) return e.matches(t);
|
|
@@ -2279,41 +2289,41 @@ function qa(e, t) {
|
|
|
2279
2289
|
return !1;
|
|
2280
2290
|
}
|
|
2281
2291
|
}
|
|
2282
|
-
function
|
|
2292
|
+
function $a(e) {
|
|
2283
2293
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2284
2294
|
}
|
|
2285
|
-
function
|
|
2295
|
+
function eo(e, t, n, r) {
|
|
2286
2296
|
if (e) {
|
|
2287
2297
|
n ||= document;
|
|
2288
2298
|
do {
|
|
2289
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2299
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Qa(e, t) : Qa(e, t)) || r && e === n) return e;
|
|
2290
2300
|
if (e === n) break;
|
|
2291
|
-
} while (e =
|
|
2301
|
+
} while (e = $a(e));
|
|
2292
2302
|
}
|
|
2293
2303
|
return null;
|
|
2294
2304
|
}
|
|
2295
|
-
var
|
|
2296
|
-
function Za(e, t, n) {
|
|
2297
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Xa, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Xa, " "));
|
|
2298
|
-
}
|
|
2305
|
+
var to = /\s+/g;
|
|
2299
2306
|
function z(e, t, n) {
|
|
2307
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(to, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(to, " "));
|
|
2308
|
+
}
|
|
2309
|
+
function B(e, t, n) {
|
|
2300
2310
|
var r = e && e.style;
|
|
2301
2311
|
if (r) {
|
|
2302
2312
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
2303
2313
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2304
2314
|
}
|
|
2305
2315
|
}
|
|
2306
|
-
function
|
|
2316
|
+
function no(e, t) {
|
|
2307
2317
|
var n = "";
|
|
2308
2318
|
if (typeof e == "string") n = e;
|
|
2309
2319
|
else do {
|
|
2310
|
-
var r =
|
|
2320
|
+
var r = B(e, "transform");
|
|
2311
2321
|
r && r !== "none" && (n = r + " " + n);
|
|
2312
2322
|
} while (!t && (e = e.parentNode));
|
|
2313
2323
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2314
2324
|
return i && new i(n);
|
|
2315
2325
|
}
|
|
2316
|
-
function
|
|
2326
|
+
function ro(e, t, n) {
|
|
2317
2327
|
if (e) {
|
|
2318
2328
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2319
2329
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2321,21 +2331,21 @@ function $a(e, t, n) {
|
|
|
2321
2331
|
}
|
|
2322
2332
|
return [];
|
|
2323
2333
|
}
|
|
2324
|
-
function
|
|
2334
|
+
function io() {
|
|
2325
2335
|
return document.scrollingElement || document.documentElement;
|
|
2326
2336
|
}
|
|
2327
|
-
function
|
|
2337
|
+
function V(e, t, n, r, i) {
|
|
2328
2338
|
if (e.getBoundingClientRect || e === window) {
|
|
2329
2339
|
var a, o, s, c, l, u, d;
|
|
2330
|
-
if (e !== window && e.parentNode && e !==
|
|
2331
|
-
if (i && i.getBoundingClientRect && (
|
|
2340
|
+
if (e !== window && e.parentNode && e !== io() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Ga)) do
|
|
2341
|
+
if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
|
|
2332
2342
|
var f = i.getBoundingClientRect();
|
|
2333
|
-
o -= f.top + parseInt(
|
|
2343
|
+
o -= f.top + parseInt(B(i, "border-top-width")), s -= f.left + parseInt(B(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
2334
2344
|
break;
|
|
2335
2345
|
}
|
|
2336
2346
|
while (i = i.parentNode);
|
|
2337
2347
|
if (r && e !== window) {
|
|
2338
|
-
var p =
|
|
2348
|
+
var p = no(i || e), m = p && p.a, h = p && p.d;
|
|
2339
2349
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2340
2350
|
}
|
|
2341
2351
|
return {
|
|
@@ -2348,18 +2358,18 @@ function B(e, t, n, r, i) {
|
|
|
2348
2358
|
};
|
|
2349
2359
|
}
|
|
2350
2360
|
}
|
|
2351
|
-
function
|
|
2352
|
-
for (var r =
|
|
2353
|
-
var a =
|
|
2361
|
+
function ao(e, t, n) {
|
|
2362
|
+
for (var r = fo(e, !0), i = V(e)[t]; r;) {
|
|
2363
|
+
var a = V(r)[n], o = void 0;
|
|
2354
2364
|
if (o = i >= a, !o) return r;
|
|
2355
|
-
if (r ===
|
|
2356
|
-
r =
|
|
2365
|
+
if (r === io()) break;
|
|
2366
|
+
r = fo(r, !1);
|
|
2357
2367
|
}
|
|
2358
2368
|
return !1;
|
|
2359
2369
|
}
|
|
2360
|
-
function
|
|
2370
|
+
function oo(e, t, n, r) {
|
|
2361
2371
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2362
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2372
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && eo(o[a], n.draggable, e, !1)) {
|
|
2363
2373
|
if (i === t) return o[a];
|
|
2364
2374
|
i++;
|
|
2365
2375
|
}
|
|
@@ -2367,96 +2377,96 @@ function no(e, t, n, r) {
|
|
|
2367
2377
|
}
|
|
2368
2378
|
return null;
|
|
2369
2379
|
}
|
|
2370
|
-
function
|
|
2371
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2380
|
+
function so(e, t) {
|
|
2381
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !Qa(n, t));) n = n.previousElementSibling;
|
|
2372
2382
|
return n || null;
|
|
2373
2383
|
}
|
|
2374
|
-
function
|
|
2384
|
+
function co(e, t) {
|
|
2375
2385
|
var n = 0;
|
|
2376
2386
|
if (!e || !e.parentNode) return -1;
|
|
2377
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2387
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Qa(e, t)) && n++;
|
|
2378
2388
|
return n;
|
|
2379
2389
|
}
|
|
2380
|
-
function
|
|
2381
|
-
var t = 0, n = 0, r =
|
|
2390
|
+
function lo(e) {
|
|
2391
|
+
var t = 0, n = 0, r = io();
|
|
2382
2392
|
if (e) do {
|
|
2383
|
-
var i =
|
|
2393
|
+
var i = no(e), a = i.a, o = i.d;
|
|
2384
2394
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2385
2395
|
} while (e !== r && (e = e.parentNode));
|
|
2386
2396
|
return [t, n];
|
|
2387
2397
|
}
|
|
2388
|
-
function
|
|
2398
|
+
function uo(e, t) {
|
|
2389
2399
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2390
2400
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2391
2401
|
}
|
|
2392
2402
|
return -1;
|
|
2393
2403
|
}
|
|
2394
|
-
function
|
|
2395
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2404
|
+
function fo(e, t) {
|
|
2405
|
+
if (!e || !e.getBoundingClientRect) return io();
|
|
2396
2406
|
var n = e, r = !1;
|
|
2397
2407
|
do
|
|
2398
2408
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2399
|
-
var i =
|
|
2409
|
+
var i = B(n);
|
|
2400
2410
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2401
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2411
|
+
if (!n.getBoundingClientRect || n === document.body) return io();
|
|
2402
2412
|
if (r || t) return n;
|
|
2403
2413
|
r = !0;
|
|
2404
2414
|
}
|
|
2405
2415
|
}
|
|
2406
2416
|
while (n = n.parentNode);
|
|
2407
|
-
return
|
|
2417
|
+
return io();
|
|
2408
2418
|
}
|
|
2409
|
-
function
|
|
2419
|
+
function po(e, t) {
|
|
2410
2420
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2411
2421
|
return e;
|
|
2412
2422
|
}
|
|
2413
|
-
function
|
|
2423
|
+
function mo(e, t) {
|
|
2414
2424
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
2415
2425
|
}
|
|
2416
|
-
var
|
|
2417
|
-
function
|
|
2426
|
+
var ho;
|
|
2427
|
+
function go(e, t) {
|
|
2418
2428
|
return function() {
|
|
2419
|
-
if (!
|
|
2429
|
+
if (!ho) {
|
|
2420
2430
|
var n = arguments, r = this;
|
|
2421
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2422
|
-
|
|
2431
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), ho = setTimeout(function() {
|
|
2432
|
+
ho = void 0;
|
|
2423
2433
|
}, t);
|
|
2424
2434
|
}
|
|
2425
2435
|
};
|
|
2426
2436
|
}
|
|
2427
|
-
function
|
|
2428
|
-
clearTimeout(
|
|
2437
|
+
function _o() {
|
|
2438
|
+
clearTimeout(ho), ho = void 0;
|
|
2429
2439
|
}
|
|
2430
|
-
function
|
|
2440
|
+
function vo(e, t, n) {
|
|
2431
2441
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2432
2442
|
}
|
|
2433
|
-
function
|
|
2443
|
+
function yo(e) {
|
|
2434
2444
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2435
2445
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2436
2446
|
}
|
|
2437
|
-
function
|
|
2447
|
+
function bo(e, t, n) {
|
|
2438
2448
|
var r = {};
|
|
2439
2449
|
return Array.from(e.children).forEach(function(i) {
|
|
2440
|
-
if (
|
|
2441
|
-
var a =
|
|
2450
|
+
if (eo(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2451
|
+
var a = V(i);
|
|
2442
2452
|
r.left = Math.min(r.left ?? 1 / 0, a.left), r.top = Math.min(r.top ?? 1 / 0, a.top), r.right = Math.max(r.right ?? -1 / 0, a.right), r.bottom = Math.max(r.bottom ?? -1 / 0, a.bottom);
|
|
2443
2453
|
}
|
|
2444
2454
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2445
2455
|
}
|
|
2446
|
-
var
|
|
2447
|
-
function
|
|
2456
|
+
var xo = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2457
|
+
function So() {
|
|
2448
2458
|
var e = [], t;
|
|
2449
2459
|
return {
|
|
2450
2460
|
captureAnimationState: function() {
|
|
2451
2461
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2452
|
-
if (
|
|
2462
|
+
if (B(t, "display") !== "none" && t !== Q.ghost) {
|
|
2453
2463
|
e.push({
|
|
2454
2464
|
target: t,
|
|
2455
|
-
rect:
|
|
2465
|
+
rect: V(t)
|
|
2456
2466
|
});
|
|
2457
|
-
var n =
|
|
2467
|
+
var n = La({}, e[e.length - 1].rect);
|
|
2458
2468
|
if (t.thisAnimationDuration) {
|
|
2459
|
-
var r =
|
|
2469
|
+
var r = no(t, !0);
|
|
2460
2470
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2461
2471
|
}
|
|
2462
2472
|
t.fromRect = n;
|
|
@@ -2467,7 +2477,7 @@ function _o() {
|
|
|
2467
2477
|
e.push(t);
|
|
2468
2478
|
},
|
|
2469
2479
|
removeAnimationState: function(t) {
|
|
2470
|
-
e.splice(
|
|
2480
|
+
e.splice(uo(e, { target: t }), 1);
|
|
2471
2481
|
},
|
|
2472
2482
|
animateAll: function(n) {
|
|
2473
2483
|
var r = this;
|
|
@@ -2477,8 +2487,8 @@ function _o() {
|
|
|
2477
2487
|
}
|
|
2478
2488
|
var i = !1, a = 0;
|
|
2479
2489
|
e.forEach(function(e) {
|
|
2480
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2481
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2490
|
+
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = no(n, !0);
|
|
2491
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && mo(c, s) && !mo(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = wo(u, c, l, r.options)), mo(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
2482
2492
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2483
2493
|
}, t), n.thisAnimationDuration = t);
|
|
2484
2494
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2487,27 +2497,27 @@ function _o() {
|
|
|
2487
2497
|
},
|
|
2488
2498
|
animate: function(e, t, n, r) {
|
|
2489
2499
|
if (r) {
|
|
2490
|
-
|
|
2491
|
-
var i =
|
|
2492
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2493
|
-
|
|
2500
|
+
B(e, "transition", ""), B(e, "transform", "");
|
|
2501
|
+
var i = no(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2502
|
+
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Co(e), B(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), B(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2503
|
+
B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2494
2504
|
}, r);
|
|
2495
2505
|
}
|
|
2496
2506
|
}
|
|
2497
2507
|
};
|
|
2498
2508
|
}
|
|
2499
|
-
function
|
|
2509
|
+
function Co(e) {
|
|
2500
2510
|
return e.offsetWidth;
|
|
2501
2511
|
}
|
|
2502
|
-
function
|
|
2512
|
+
function wo(e, t, n, r) {
|
|
2503
2513
|
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
2504
2514
|
}
|
|
2505
|
-
var
|
|
2515
|
+
var To = [], Eo = { initializeByDefault: !0 }, Do = {
|
|
2506
2516
|
mount: function(e) {
|
|
2507
|
-
for (var t in
|
|
2508
|
-
|
|
2517
|
+
for (var t in Eo) Eo.hasOwnProperty(t) && !(t in e) && (e[t] = Eo[t]);
|
|
2518
|
+
To.forEach(function(t) {
|
|
2509
2519
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2510
|
-
}),
|
|
2520
|
+
}), To.push(e);
|
|
2511
2521
|
},
|
|
2512
2522
|
pluginEvent: function(e, t, n) {
|
|
2513
2523
|
var r = this;
|
|
@@ -2515,16 +2525,16 @@ var bo = [], xo = { initializeByDefault: !0 }, So = {
|
|
|
2515
2525
|
r.eventCanceled = !0;
|
|
2516
2526
|
};
|
|
2517
2527
|
var i = e + "Global";
|
|
2518
|
-
|
|
2519
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2528
|
+
To.forEach(function(r) {
|
|
2529
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](La({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](La({ sortable: t }, n)));
|
|
2520
2530
|
});
|
|
2521
2531
|
},
|
|
2522
2532
|
initializePlugins: function(e, t, n, r) {
|
|
2523
|
-
for (var i in
|
|
2533
|
+
for (var i in To.forEach(function(r) {
|
|
2524
2534
|
var i = r.pluginName;
|
|
2525
2535
|
if (e.options[i] || r.initializeByDefault) {
|
|
2526
2536
|
var a = new r(e, t, e.options);
|
|
2527
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2537
|
+
a.sortable = e, a.options = e.options, e[i] = a, Ba(n, a.defaults);
|
|
2528
2538
|
}
|
|
2529
2539
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2530
2540
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2533,56 +2543,56 @@ var bo = [], xo = { initializeByDefault: !0 }, So = {
|
|
|
2533
2543
|
},
|
|
2534
2544
|
getEventProperties: function(e, t) {
|
|
2535
2545
|
var n = {};
|
|
2536
|
-
return
|
|
2537
|
-
typeof r.eventProperties == "function" &&
|
|
2546
|
+
return To.forEach(function(r) {
|
|
2547
|
+
typeof r.eventProperties == "function" && Ba(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2538
2548
|
}), n;
|
|
2539
2549
|
},
|
|
2540
2550
|
modifyOption: function(e, t, n) {
|
|
2541
2551
|
var r;
|
|
2542
|
-
return
|
|
2552
|
+
return To.forEach(function(i) {
|
|
2543
2553
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2544
2554
|
}), r;
|
|
2545
2555
|
}
|
|
2546
2556
|
};
|
|
2547
|
-
function
|
|
2557
|
+
function Oo(e) {
|
|
2548
2558
|
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
2549
|
-
if (t ||= n && n[
|
|
2559
|
+
if (t ||= n && n[xo], t) {
|
|
2550
2560
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2551
|
-
window.CustomEvent && !
|
|
2561
|
+
window.CustomEvent && !Ga && !Ka ? h = new CustomEvent(r, {
|
|
2552
2562
|
bubbles: !0,
|
|
2553
2563
|
cancelable: !0
|
|
2554
2564
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
2555
|
-
var v =
|
|
2565
|
+
var v = La(La({}, m), Do.getEventProperties(r, t));
|
|
2556
2566
|
for (var y in v) h[y] = v[y];
|
|
2557
2567
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2558
2568
|
}
|
|
2559
2569
|
}
|
|
2560
|
-
var
|
|
2561
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2562
|
-
|
|
2570
|
+
var ko = ["evt"], H = function(e, t) {
|
|
2571
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Ha(n, ko);
|
|
2572
|
+
Do.pluginEvent.bind(Q)(e, t, La({
|
|
2563
2573
|
dragEl: W,
|
|
2564
2574
|
parentEl: G,
|
|
2565
2575
|
ghostEl: K,
|
|
2566
2576
|
rootEl: q,
|
|
2567
|
-
nextEl:
|
|
2568
|
-
lastDownEl:
|
|
2577
|
+
nextEl: Ao,
|
|
2578
|
+
lastDownEl: jo,
|
|
2569
2579
|
cloneEl: J,
|
|
2570
|
-
cloneHidden:
|
|
2571
|
-
dragStarted:
|
|
2580
|
+
cloneHidden: Mo,
|
|
2581
|
+
dragStarted: Ko,
|
|
2572
2582
|
putSortable: X,
|
|
2573
2583
|
activeSortable: Q.active,
|
|
2574
2584
|
originalEvent: r,
|
|
2575
|
-
oldIndex:
|
|
2576
|
-
oldDraggableIndex:
|
|
2585
|
+
oldIndex: No,
|
|
2586
|
+
oldDraggableIndex: Po,
|
|
2577
2587
|
newIndex: Y,
|
|
2578
|
-
newDraggableIndex:
|
|
2579
|
-
hideGhostForTarget:
|
|
2580
|
-
unhideGhostForTarget:
|
|
2588
|
+
newDraggableIndex: Fo,
|
|
2589
|
+
hideGhostForTarget: us,
|
|
2590
|
+
unhideGhostForTarget: ds,
|
|
2581
2591
|
cloneNowHidden: function() {
|
|
2582
|
-
|
|
2592
|
+
Mo = !0;
|
|
2583
2593
|
},
|
|
2584
2594
|
cloneNowShown: function() {
|
|
2585
|
-
|
|
2595
|
+
Mo = !1;
|
|
2586
2596
|
},
|
|
2587
2597
|
dispatchSortableEvent: function(e) {
|
|
2588
2598
|
U({
|
|
@@ -2594,45 +2604,45 @@ var wo = ["evt"], H = function(e, t) {
|
|
|
2594
2604
|
}, i));
|
|
2595
2605
|
};
|
|
2596
2606
|
function U(e) {
|
|
2597
|
-
|
|
2607
|
+
Oo(La({
|
|
2598
2608
|
putSortable: X,
|
|
2599
2609
|
cloneEl: J,
|
|
2600
2610
|
targetEl: W,
|
|
2601
2611
|
rootEl: q,
|
|
2602
|
-
oldIndex:
|
|
2603
|
-
oldDraggableIndex:
|
|
2612
|
+
oldIndex: No,
|
|
2613
|
+
oldDraggableIndex: Po,
|
|
2604
2614
|
newIndex: Y,
|
|
2605
|
-
newDraggableIndex:
|
|
2615
|
+
newDraggableIndex: Fo
|
|
2606
2616
|
}, e));
|
|
2607
2617
|
}
|
|
2608
|
-
var W, G, K, q,
|
|
2609
|
-
if (
|
|
2610
|
-
if (
|
|
2618
|
+
var W, G, K, q, Ao, jo, J, Mo, No, Y, Po, Fo, Io, X, Lo = !1, Ro = !1, zo = [], Bo, Vo, Ho, Uo, Wo, Go, Ko, qo, Jo, Yo = !1, Xo = !1, Zo, Z, Qo = [], $o = !1, es = [], ts = typeof document < "u", ns = Ya, rs = Ka || Ga ? "cssFloat" : "float", is = ts && !Xa && !Ya && "draggable" in document.createElement("div"), as = function() {
|
|
2619
|
+
if (ts) {
|
|
2620
|
+
if (Ga) return !1;
|
|
2611
2621
|
var e = document.createElement("x");
|
|
2612
2622
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2613
2623
|
}
|
|
2614
|
-
}(),
|
|
2615
|
-
var n =
|
|
2624
|
+
}(), os = function(e, t) {
|
|
2625
|
+
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = oo(e, 0, t), a = oo(e, 1, t), o = i && B(i), s = a && B(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + V(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + V(a).width;
|
|
2616
2626
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2617
2627
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2618
2628
|
if (i && o.float && o.float !== "none") {
|
|
2619
2629
|
var u = o.float === "left" ? "left" : "right";
|
|
2620
2630
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2621
2631
|
}
|
|
2622
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2623
|
-
},
|
|
2632
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[rs] === "none" || a && n[rs] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2633
|
+
}, ss = function(e, t, n) {
|
|
2624
2634
|
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
2625
2635
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2626
|
-
},
|
|
2636
|
+
}, cs = function(e, t) {
|
|
2627
2637
|
var n;
|
|
2628
|
-
return
|
|
2629
|
-
var i = r[
|
|
2630
|
-
if (i && !
|
|
2631
|
-
var a =
|
|
2638
|
+
return zo.some(function(r) {
|
|
2639
|
+
var i = r[xo].options.emptyInsertThreshold;
|
|
2640
|
+
if (i && !so(r)) {
|
|
2641
|
+
var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2632
2642
|
if (o && s) return n = r;
|
|
2633
2643
|
}
|
|
2634
2644
|
}), n;
|
|
2635
|
-
},
|
|
2645
|
+
}, ls = function(e) {
|
|
2636
2646
|
function t(e, n) {
|
|
2637
2647
|
return function(r, i, a, o) {
|
|
2638
2648
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2645,31 +2655,31 @@ var W, G, K, q, To, Eo, J, Do, Oo, Y, ko, Ao, jo, X, Mo = !1, No = !1, Po = [],
|
|
|
2645
2655
|
};
|
|
2646
2656
|
}
|
|
2647
2657
|
var n = {}, r = e.group;
|
|
2648
|
-
(!r ||
|
|
2649
|
-
},
|
|
2650
|
-
!
|
|
2651
|
-
},
|
|
2652
|
-
!
|
|
2658
|
+
(!r || Ra(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
2659
|
+
}, us = function() {
|
|
2660
|
+
!as && K && B(K, "display", "none");
|
|
2661
|
+
}, ds = function() {
|
|
2662
|
+
!as && K && B(K, "display", "");
|
|
2653
2663
|
};
|
|
2654
|
-
|
|
2655
|
-
if (
|
|
2664
|
+
ts && !Xa && document.addEventListener("click", function(e) {
|
|
2665
|
+
if (Ro) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ro = !1, !1;
|
|
2656
2666
|
}, !0);
|
|
2657
|
-
var
|
|
2667
|
+
var fs = function(e) {
|
|
2658
2668
|
if (W) {
|
|
2659
2669
|
e = e.touches ? e.touches[0] : e;
|
|
2660
|
-
var t =
|
|
2670
|
+
var t = cs(e.clientX, e.clientY);
|
|
2661
2671
|
if (t) {
|
|
2662
2672
|
var n = {};
|
|
2663
2673
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2664
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
2674
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[xo]._onDragOver(n);
|
|
2665
2675
|
}
|
|
2666
2676
|
}
|
|
2667
|
-
},
|
|
2668
|
-
W && W.parentNode[
|
|
2677
|
+
}, ps = function(e) {
|
|
2678
|
+
W && W.parentNode[xo]._isOutsideThisEl(e.target);
|
|
2669
2679
|
};
|
|
2670
2680
|
function Q(e, t) {
|
|
2671
2681
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2672
|
-
this.el = e, this.options = t =
|
|
2682
|
+
this.el = e, this.options = t = Ba({}, t), e[xo] = this;
|
|
2673
2683
|
var n = {
|
|
2674
2684
|
group: null,
|
|
2675
2685
|
sort: !0,
|
|
@@ -2682,7 +2692,7 @@ function Q(e, t) {
|
|
|
2682
2692
|
invertedSwapThreshold: null,
|
|
2683
2693
|
removeCloneOnHide: !0,
|
|
2684
2694
|
direction: function() {
|
|
2685
|
-
return
|
|
2695
|
+
return os(e, this.options);
|
|
2686
2696
|
},
|
|
2687
2697
|
ghostClass: "sortable-ghost",
|
|
2688
2698
|
chosenClass: "sortable-chosen",
|
|
@@ -2709,17 +2719,17 @@ function Q(e, t) {
|
|
|
2709
2719
|
x: 0,
|
|
2710
2720
|
y: 0
|
|
2711
2721
|
},
|
|
2712
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2722
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Ja,
|
|
2713
2723
|
emptyInsertThreshold: 5
|
|
2714
2724
|
};
|
|
2715
|
-
for (var r in
|
|
2716
|
-
for (var i in
|
|
2717
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
2725
|
+
for (var r in Do.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2726
|
+
for (var i in ls(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2727
|
+
this.nativeDraggable = !t.forceFallback && is, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), zo.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Ba(this, So());
|
|
2718
2728
|
}
|
|
2719
2729
|
Q.prototype = {
|
|
2720
2730
|
constructor: Q,
|
|
2721
2731
|
_isOutsideThisEl: function(e) {
|
|
2722
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2732
|
+
!this.el.contains(e) && e !== this.el && (qo = null);
|
|
2723
2733
|
},
|
|
2724
2734
|
_getDirection: function(e, t) {
|
|
2725
2735
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2727,8 +2737,8 @@ Q.prototype = {
|
|
|
2727
2737
|
_onTapStart: function(e) {
|
|
2728
2738
|
if (e.cancelable) {
|
|
2729
2739
|
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
2730
|
-
if (
|
|
2731
|
-
if (
|
|
2740
|
+
if (Cs(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ja && s && s.tagName.toUpperCase() === "SELECT") && (s = eo(s, r.draggable, n, !1), !(s && s.animated) && jo !== s)) {
|
|
2741
|
+
if (No = co(s), Po = co(s, r.draggable), typeof l == "function") {
|
|
2732
2742
|
if (l.call(this, e, s, this)) {
|
|
2733
2743
|
U({
|
|
2734
2744
|
sortable: t,
|
|
@@ -2741,7 +2751,7 @@ Q.prototype = {
|
|
|
2741
2751
|
return;
|
|
2742
2752
|
}
|
|
2743
2753
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2744
|
-
if (r =
|
|
2754
|
+
if (r = eo(c, r.trim(), n, !1), r) return U({
|
|
2745
2755
|
sortable: t,
|
|
2746
2756
|
rootEl: r,
|
|
2747
2757
|
name: "filter",
|
|
@@ -2753,31 +2763,31 @@ Q.prototype = {
|
|
|
2753
2763
|
i && e.cancelable && e.preventDefault();
|
|
2754
2764
|
return;
|
|
2755
2765
|
}
|
|
2756
|
-
r.handle && !
|
|
2766
|
+
r.handle && !eo(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2757
2767
|
}
|
|
2758
2768
|
}
|
|
2759
2769
|
},
|
|
2760
2770
|
_prepareDragStart: function(e, t, n) {
|
|
2761
2771
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2762
2772
|
if (n && !W && n.parentNode === i) {
|
|
2763
|
-
var c =
|
|
2764
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2773
|
+
var c = V(n);
|
|
2774
|
+
if (q = i, W = n, G = W.parentNode, Ao = W.nextSibling, jo = n, Io = a.group, Q.dragged = W, Bo = {
|
|
2765
2775
|
target: W,
|
|
2766
2776
|
clientX: (t || e).clientX,
|
|
2767
2777
|
clientY: (t || e).clientY
|
|
2768
|
-
},
|
|
2778
|
+
}, Wo = Bo.clientX - c.left, Go = Bo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2769
2779
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2770
2780
|
r._onDrop();
|
|
2771
2781
|
return;
|
|
2772
2782
|
}
|
|
2773
|
-
r._disableDelayedDragEvents(), !
|
|
2783
|
+
r._disableDelayedDragEvents(), !qa && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2774
2784
|
sortable: r,
|
|
2775
2785
|
name: "choose",
|
|
2776
2786
|
originalEvent: e
|
|
2777
|
-
}),
|
|
2787
|
+
}), z(W, a.chosenClass, !0);
|
|
2778
2788
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2779
|
-
|
|
2780
|
-
}), L(o, "dragover",
|
|
2789
|
+
ro(W, e.trim(), gs);
|
|
2790
|
+
}), L(o, "dragover", fs), L(o, "mousemove", fs), L(o, "touchmove", fs), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), qa && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ka || Ga))) {
|
|
2781
2791
|
if (Q.eventCanceled) {
|
|
2782
2792
|
this._onDrop();
|
|
2783
2793
|
return;
|
|
@@ -2791,7 +2801,7 @@ Q.prototype = {
|
|
|
2791
2801
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
2792
2802
|
},
|
|
2793
2803
|
_disableDelayedDrag: function() {
|
|
2794
|
-
W &&
|
|
2804
|
+
W && gs(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2795
2805
|
},
|
|
2796
2806
|
_disableDelayedDragEvents: function() {
|
|
2797
2807
|
var e = this.el.ownerDocument;
|
|
@@ -2800,16 +2810,16 @@ Q.prototype = {
|
|
|
2800
2810
|
_triggerDragStart: function(e, t) {
|
|
2801
2811
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(W, "dragend", this), L(q, "dragstart", this._onDragStart));
|
|
2802
2812
|
try {
|
|
2803
|
-
document.selection ?
|
|
2813
|
+
document.selection ? ws(function() {
|
|
2804
2814
|
document.selection.empty();
|
|
2805
2815
|
}) : window.getSelection().removeAllRanges();
|
|
2806
2816
|
} catch {}
|
|
2807
2817
|
},
|
|
2808
2818
|
_dragStarted: function(e, t) {
|
|
2809
|
-
if (
|
|
2810
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover",
|
|
2819
|
+
if (Lo = !1, q && W) {
|
|
2820
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", ps);
|
|
2811
2821
|
var n = this.options;
|
|
2812
|
-
!e &&
|
|
2822
|
+
!e && z(W, n.dragClass, !1), z(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2813
2823
|
sortable: this,
|
|
2814
2824
|
name: "start",
|
|
2815
2825
|
originalEvent: t
|
|
@@ -2817,33 +2827,33 @@ Q.prototype = {
|
|
|
2817
2827
|
} else this._nulling();
|
|
2818
2828
|
},
|
|
2819
2829
|
_emulateDragOver: function() {
|
|
2820
|
-
if (
|
|
2821
|
-
this._lastX =
|
|
2822
|
-
for (var e = document.elementFromPoint(
|
|
2823
|
-
if (W.parentNode[
|
|
2824
|
-
if (t[
|
|
2830
|
+
if (Vo) {
|
|
2831
|
+
this._lastX = Vo.clientX, this._lastY = Vo.clientY, us();
|
|
2832
|
+
for (var e = document.elementFromPoint(Vo.clientX, Vo.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Vo.clientX, Vo.clientY), e !== t);) t = e;
|
|
2833
|
+
if (W.parentNode[xo]._isOutsideThisEl(e), t) do {
|
|
2834
|
+
if (t[xo]) {
|
|
2825
2835
|
var n = void 0;
|
|
2826
|
-
if (n = t[
|
|
2827
|
-
clientX:
|
|
2828
|
-
clientY:
|
|
2836
|
+
if (n = t[xo]._onDragOver({
|
|
2837
|
+
clientX: Vo.clientX,
|
|
2838
|
+
clientY: Vo.clientY,
|
|
2829
2839
|
target: e,
|
|
2830
2840
|
rootEl: t
|
|
2831
2841
|
}), n && !this.options.dragoverBubble) break;
|
|
2832
2842
|
}
|
|
2833
2843
|
e = t;
|
|
2834
2844
|
} while (t = t.parentNode);
|
|
2835
|
-
|
|
2845
|
+
ds();
|
|
2836
2846
|
}
|
|
2837
2847
|
},
|
|
2838
2848
|
_onTouchMove: function(e) {
|
|
2839
|
-
if (
|
|
2840
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2841
|
-
if (!Q.active && !
|
|
2849
|
+
if (Bo) {
|
|
2850
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && no(K, !0), o = K && a && a.a, s = K && a && a.d, c = ns && Z && lo(Z), l = (i.clientX - Bo.clientX + r.x) / (o || 1) + (c ? c[0] - Qo[0] : 0) / (o || 1), u = (i.clientY - Bo.clientY + r.y) / (s || 1) + (c ? c[1] - Qo[1] : 0) / (s || 1);
|
|
2851
|
+
if (!Q.active && !Lo) {
|
|
2842
2852
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2843
2853
|
this._onDragStart(e, !0);
|
|
2844
2854
|
}
|
|
2845
2855
|
if (K) {
|
|
2846
|
-
a ? (a.e += l - (
|
|
2856
|
+
a ? (a.e += l - (Ho || 0), a.f += u - (Uo || 0)) : a = {
|
|
2847
2857
|
a: 1,
|
|
2848
2858
|
b: 0,
|
|
2849
2859
|
c: 0,
|
|
@@ -2852,19 +2862,19 @@ Q.prototype = {
|
|
|
2852
2862
|
f: u
|
|
2853
2863
|
};
|
|
2854
2864
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2855
|
-
|
|
2865
|
+
B(K, "webkitTransform", d), B(K, "mozTransform", d), B(K, "msTransform", d), B(K, "transform", d), Ho = l, Uo = u, Vo = i;
|
|
2856
2866
|
}
|
|
2857
2867
|
e.cancelable && e.preventDefault();
|
|
2858
2868
|
}
|
|
2859
2869
|
},
|
|
2860
2870
|
_appendGhost: function() {
|
|
2861
2871
|
if (!K) {
|
|
2862
|
-
var e = this.options.fallbackOnBody ? document.body : q, t =
|
|
2863
|
-
if (
|
|
2864
|
-
for (Z = e;
|
|
2865
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2872
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = V(W, !0, ns, !0, e), n = this.options;
|
|
2873
|
+
if (ns) {
|
|
2874
|
+
for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2875
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = io()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = io(), Qo = lo(Z);
|
|
2866
2876
|
}
|
|
2867
|
-
K = W.cloneNode(!0),
|
|
2877
|
+
K = W.cloneNode(!0), z(K, n.ghostClass, !1), z(K, n.fallbackClass, !0), z(K, n.dragClass, !0), B(K, "transition", ""), B(K, "transform", ""), B(K, "box-sizing", "border-box"), B(K, "margin", 0), B(K, "top", t.top), B(K, "left", t.left), B(K, "width", t.width), B(K, "height", t.height), B(K, "opacity", "0.8"), B(K, "position", ns ? "absolute" : "fixed"), B(K, "zIndex", "100000"), B(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), B(K, "transform-origin", Wo / parseInt(K.style.width) * 100 + "% " + Go / parseInt(K.style.height) * 100 + "%");
|
|
2868
2878
|
}
|
|
2869
2879
|
},
|
|
2870
2880
|
_onDragStart: function(e, t) {
|
|
@@ -2873,18 +2883,18 @@ Q.prototype = {
|
|
|
2873
2883
|
this._onDrop();
|
|
2874
2884
|
return;
|
|
2875
2885
|
}
|
|
2876
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
2886
|
+
H("setupClone", this), Q.eventCanceled || (J = yo(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), z(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = ws(function() {
|
|
2877
2887
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
2878
2888
|
sortable: n,
|
|
2879
2889
|
name: "clone"
|
|
2880
2890
|
}));
|
|
2881
|
-
}), !t &&
|
|
2891
|
+
}), !t && z(W, i.dragClass, !0), t ? (Ro = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), L(document, "drop", n), B(W, "transform", "translateZ(0)")), Lo = !0, n._dragStartId = ws(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), Ko = !0, Ja && B(document.body, "user-select", "none");
|
|
2882
2892
|
},
|
|
2883
2893
|
_onDragOver: function(e) {
|
|
2884
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2885
|
-
if (
|
|
2894
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Io === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2895
|
+
if ($o) return;
|
|
2886
2896
|
function h(o, s) {
|
|
2887
|
-
H(o, p,
|
|
2897
|
+
H(o, p, La({
|
|
2888
2898
|
evt: e,
|
|
2889
2899
|
isOwner: l,
|
|
2890
2900
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2896,7 +2906,7 @@ Q.prototype = {
|
|
|
2896
2906
|
target: n,
|
|
2897
2907
|
completed: _,
|
|
2898
2908
|
onMove: function(n, i) {
|
|
2899
|
-
return
|
|
2909
|
+
return hs(q, t, W, r, n, V(n), e, i);
|
|
2900
2910
|
},
|
|
2901
2911
|
changed: v
|
|
2902
2912
|
}, s));
|
|
@@ -2905,50 +2915,50 @@ Q.prototype = {
|
|
|
2905
2915
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2906
2916
|
}
|
|
2907
2917
|
function _(r) {
|
|
2908
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2918
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(W, X ? X.options.ghostClass : c.options.ghostClass, !1), z(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
2909
2919
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2910
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
2920
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (qo = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[xo]._isOutsideThisEl(e.target), !r && fs(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2911
2921
|
}
|
|
2912
2922
|
function v() {
|
|
2913
|
-
Y =
|
|
2923
|
+
Y = co(W), Fo = co(W, o.draggable), U({
|
|
2914
2924
|
sortable: p,
|
|
2915
2925
|
name: "change",
|
|
2916
2926
|
toEl: t,
|
|
2917
2927
|
newIndex: Y,
|
|
2918
|
-
newDraggableIndex:
|
|
2928
|
+
newDraggableIndex: Fo,
|
|
2919
2929
|
originalEvent: e
|
|
2920
2930
|
});
|
|
2921
2931
|
}
|
|
2922
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2932
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = eo(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2923
2933
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2924
|
-
if (
|
|
2925
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
2926
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2927
|
-
var y =
|
|
2928
|
-
if (!y ||
|
|
2934
|
+
if (Ro = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Io.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
2935
|
+
if (f = this._getDirection(e, n) === "vertical", r = V(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2936
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Ao ? q.insertBefore(W, Ao) : q.appendChild(W)), _(!0);
|
|
2937
|
+
var y = so(t, o.draggable);
|
|
2938
|
+
if (!y || ys(e, f, this) && !y.animated) {
|
|
2929
2939
|
if (y === W) return _(!1);
|
|
2930
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2931
|
-
} else if (y &&
|
|
2932
|
-
var b =
|
|
2940
|
+
if (y && t === e.target && (n = y), n && (i = V(n)), hs(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
|
|
2941
|
+
} else if (y && vs(e, f, this)) {
|
|
2942
|
+
var b = oo(t, 0, o, !0);
|
|
2933
2943
|
if (b === W) return _(!1);
|
|
2934
|
-
if (n = b, i =
|
|
2944
|
+
if (n = b, i = V(n), hs(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
2935
2945
|
} else if (n.parentNode === t) {
|
|
2936
|
-
i =
|
|
2937
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
2938
|
-
|
|
2946
|
+
i = V(n);
|
|
2947
|
+
var x = 0, S, C = W.parentNode !== t, w = !ss(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ao(n, "top", "top") || ao(W, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
2948
|
+
qo !== n && (S = i[T], Yo = !1, Xo = !w && o.invertSwap || C), x = bs(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Xo, qo === n);
|
|
2939
2949
|
var O;
|
|
2940
2950
|
if (x !== 0) {
|
|
2941
|
-
var k =
|
|
2951
|
+
var k = co(W);
|
|
2942
2952
|
do
|
|
2943
2953
|
k -= x, O = G.children[k];
|
|
2944
|
-
while (O && (
|
|
2954
|
+
while (O && (B(O, "display") === "none" || O === K));
|
|
2945
2955
|
}
|
|
2946
2956
|
if (x === 0 || O === n) return _(!1);
|
|
2947
|
-
|
|
2957
|
+
qo = n, Jo = x;
|
|
2948
2958
|
var A = n.nextElementSibling, j = !1;
|
|
2949
2959
|
j = x === 1;
|
|
2950
|
-
var M =
|
|
2951
|
-
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1),
|
|
2960
|
+
var M = hs(q, t, W, r, n, i, e, j);
|
|
2961
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), $o = !0, setTimeout(_s, 30), g(), j && !A ? t.appendChild(W) : n.parentNode.insertBefore(W, j ? A : n), E && vo(E, 0, D - E.scrollTop), G = W.parentNode, S !== void 0 && !Xo && (Zo = Math.abs(S - V(n)[T])), v(), _(!0);
|
|
2952
2962
|
}
|
|
2953
2963
|
if (t.contains(W)) return _(!1);
|
|
2954
2964
|
}
|
|
@@ -2956,7 +2966,7 @@ Q.prototype = {
|
|
|
2956
2966
|
},
|
|
2957
2967
|
_ignoreWhileAnimating: null,
|
|
2958
2968
|
_offMoveEvents: function() {
|
|
2959
|
-
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover",
|
|
2969
|
+
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", fs), R(document, "mousemove", fs), R(document, "touchmove", fs);
|
|
2960
2970
|
},
|
|
2961
2971
|
_offUpEvents: function() {
|
|
2962
2972
|
var e = this.el.ownerDocument;
|
|
@@ -2964,18 +2974,18 @@ Q.prototype = {
|
|
|
2964
2974
|
},
|
|
2965
2975
|
_onDrop: function(e) {
|
|
2966
2976
|
var t = this.el, n = this.options;
|
|
2967
|
-
if (Y =
|
|
2977
|
+
if (Y = co(W), Fo = co(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = co(W), Fo = co(W, n.draggable), Q.eventCanceled) {
|
|
2968
2978
|
this._nulling();
|
|
2969
2979
|
return;
|
|
2970
2980
|
}
|
|
2971
|
-
|
|
2981
|
+
Lo = !1, Xo = !1, Yo = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ts(this.cloneId), Ts(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ja && B(document.body, "user-select", ""), B(W, "transform", ""), e && (Ko && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && R(W, "dragend", this), gs(W), W.style["will-change"] = "", Ko && !Lo && z(W, X ? X.options.ghostClass : this.options.ghostClass, !1), z(W, this.options.chosenClass, !1), U({
|
|
2972
2982
|
sortable: this,
|
|
2973
2983
|
name: "unchoose",
|
|
2974
2984
|
toEl: G,
|
|
2975
2985
|
newIndex: null,
|
|
2976
2986
|
newDraggableIndex: null,
|
|
2977
2987
|
originalEvent: e
|
|
2978
|
-
}), q === G ? Y !==
|
|
2988
|
+
}), q === G ? Y !== No && Y >= 0 && (U({
|
|
2979
2989
|
sortable: this,
|
|
2980
2990
|
name: "update",
|
|
2981
2991
|
toEl: G,
|
|
@@ -3007,7 +3017,7 @@ Q.prototype = {
|
|
|
3007
3017
|
name: "sort",
|
|
3008
3018
|
toEl: G,
|
|
3009
3019
|
originalEvent: e
|
|
3010
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
3020
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = No, Fo = Po), U({
|
|
3011
3021
|
sortable: this,
|
|
3012
3022
|
name: "end",
|
|
3013
3023
|
toEl: G,
|
|
@@ -3015,9 +3025,9 @@ Q.prototype = {
|
|
|
3015
3025
|
}), this.save()))), this._nulling();
|
|
3016
3026
|
},
|
|
3017
3027
|
_nulling: function() {
|
|
3018
|
-
H("nulling", this), q = W = G = K =
|
|
3028
|
+
H("nulling", this), q = W = G = K = Ao = J = jo = Mo = Bo = Vo = Ko = Y = Fo = No = Po = qo = Jo = X = Io = Q.dragged = Q.ghost = Q.clone = Q.active = null, es.forEach(function(e) {
|
|
3019
3029
|
e.checked = !0;
|
|
3020
|
-
}),
|
|
3030
|
+
}), es.length = Ho = Uo = 0;
|
|
3021
3031
|
},
|
|
3022
3032
|
handleEvent: function(e) {
|
|
3023
3033
|
switch (e.type) {
|
|
@@ -3027,20 +3037,20 @@ Q.prototype = {
|
|
|
3027
3037
|
break;
|
|
3028
3038
|
case "dragenter":
|
|
3029
3039
|
case "dragover":
|
|
3030
|
-
W && (this._onDragOver(e),
|
|
3040
|
+
W && (this._onDragOver(e), ms(e));
|
|
3031
3041
|
break;
|
|
3032
3042
|
case "selectstart": e.preventDefault();
|
|
3033
3043
|
}
|
|
3034
3044
|
},
|
|
3035
3045
|
toArray: function() {
|
|
3036
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3046
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], eo(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ss(t));
|
|
3037
3047
|
return e;
|
|
3038
3048
|
},
|
|
3039
3049
|
sort: function(e, t) {
|
|
3040
3050
|
var n = {}, r = this.el;
|
|
3041
3051
|
this.toArray().forEach(function(e, t) {
|
|
3042
3052
|
var i = r.children[t];
|
|
3043
|
-
|
|
3053
|
+
eo(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3044
3054
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3045
3055
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3046
3056
|
}), t && this.animateAll();
|
|
@@ -3050,25 +3060,25 @@ Q.prototype = {
|
|
|
3050
3060
|
e && e.set && e.set(this);
|
|
3051
3061
|
},
|
|
3052
3062
|
closest: function(e, t) {
|
|
3053
|
-
return
|
|
3063
|
+
return eo(e, t || this.options.draggable, this.el, !1);
|
|
3054
3064
|
},
|
|
3055
3065
|
option: function(e, t) {
|
|
3056
3066
|
var n = this.options;
|
|
3057
3067
|
if (t === void 0) return n[e];
|
|
3058
|
-
var r =
|
|
3059
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3068
|
+
var r = Do.modifyOption(this, e, t);
|
|
3069
|
+
n[e] = r === void 0 ? t : r, e === "group" && ls(n);
|
|
3060
3070
|
},
|
|
3061
3071
|
destroy: function() {
|
|
3062
3072
|
H("destroy", this);
|
|
3063
3073
|
var e = this.el;
|
|
3064
|
-
e[
|
|
3074
|
+
e[xo] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3065
3075
|
e.removeAttribute("draggable");
|
|
3066
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3076
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), zo.splice(zo.indexOf(this.el), 1), this.el = e = null;
|
|
3067
3077
|
},
|
|
3068
3078
|
_hideClone: function() {
|
|
3069
|
-
if (!
|
|
3079
|
+
if (!Mo) {
|
|
3070
3080
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
3071
|
-
|
|
3081
|
+
B(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Mo = !0;
|
|
3072
3082
|
}
|
|
3073
3083
|
},
|
|
3074
3084
|
_showClone: function(e) {
|
|
@@ -3076,99 +3086,99 @@ Q.prototype = {
|
|
|
3076
3086
|
this._hideClone();
|
|
3077
3087
|
return;
|
|
3078
3088
|
}
|
|
3079
|
-
if (
|
|
3089
|
+
if (Mo) {
|
|
3080
3090
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
3081
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
3091
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Ao ? q.insertBefore(J, Ao) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), B(J, "display", ""), Mo = !1;
|
|
3082
3092
|
}
|
|
3083
3093
|
}
|
|
3084
3094
|
};
|
|
3085
|
-
function
|
|
3095
|
+
function ms(e) {
|
|
3086
3096
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3087
3097
|
}
|
|
3088
|
-
function
|
|
3089
|
-
var c, l = e[
|
|
3090
|
-
return window.CustomEvent && !
|
|
3098
|
+
function hs(e, t, n, r, i, a, o, s) {
|
|
3099
|
+
var c, l = e[xo], u = l.options.onMove, d;
|
|
3100
|
+
return window.CustomEvent && !Ga && !Ka ? c = new CustomEvent("move", {
|
|
3091
3101
|
bubbles: !0,
|
|
3092
3102
|
cancelable: !0
|
|
3093
|
-
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a ||
|
|
3103
|
+
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || V(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3094
3104
|
}
|
|
3095
|
-
function
|
|
3105
|
+
function gs(e) {
|
|
3096
3106
|
e.draggable = !1;
|
|
3097
3107
|
}
|
|
3098
|
-
function
|
|
3099
|
-
|
|
3108
|
+
function _s() {
|
|
3109
|
+
$o = !1;
|
|
3100
3110
|
}
|
|
3101
|
-
function
|
|
3102
|
-
var r =
|
|
3111
|
+
function vs(e, t, n) {
|
|
3112
|
+
var r = V(oo(n.el, 0, n.options, !0)), i = bo(n.el, n.options, K), a = 10;
|
|
3103
3113
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
3104
3114
|
}
|
|
3105
|
-
function
|
|
3106
|
-
var r =
|
|
3115
|
+
function ys(e, t, n) {
|
|
3116
|
+
var r = V(so(n.el, n.options.draggable)), i = bo(n.el, n.options, K), a = 10;
|
|
3107
3117
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
3108
3118
|
}
|
|
3109
|
-
function
|
|
3119
|
+
function bs(e, t, n, r, i, a, o, s) {
|
|
3110
3120
|
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
3111
3121
|
if (!o) {
|
|
3112
|
-
if (s &&
|
|
3113
|
-
if (!
|
|
3114
|
-
else if (
|
|
3115
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3122
|
+
if (s && Zo < l * i) {
|
|
3123
|
+
if (!Yo && (Jo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Yo = !0), Yo) f = !0;
|
|
3124
|
+
else if (Jo === 1 ? c < u + Zo : c > d - Zo) return -Jo;
|
|
3125
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return xs(t);
|
|
3116
3126
|
}
|
|
3117
3127
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3118
3128
|
}
|
|
3119
|
-
function
|
|
3120
|
-
return
|
|
3129
|
+
function xs(e) {
|
|
3130
|
+
return co(W) < co(e) ? 1 : -1;
|
|
3121
3131
|
}
|
|
3122
|
-
function
|
|
3132
|
+
function Ss(e) {
|
|
3123
3133
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3124
3134
|
return r.toString(36);
|
|
3125
3135
|
}
|
|
3126
|
-
function
|
|
3127
|
-
|
|
3136
|
+
function Cs(e) {
|
|
3137
|
+
es.length = 0;
|
|
3128
3138
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3129
3139
|
var r = t[n];
|
|
3130
|
-
r.checked &&
|
|
3140
|
+
r.checked && es.push(r);
|
|
3131
3141
|
}
|
|
3132
3142
|
}
|
|
3133
|
-
function
|
|
3143
|
+
function ws(e) {
|
|
3134
3144
|
return setTimeout(e, 0);
|
|
3135
3145
|
}
|
|
3136
|
-
function
|
|
3146
|
+
function Ts(e) {
|
|
3137
3147
|
return clearTimeout(e);
|
|
3138
3148
|
}
|
|
3139
|
-
|
|
3140
|
-
(Q.active ||
|
|
3149
|
+
ts && L(document, "touchmove", function(e) {
|
|
3150
|
+
(Q.active || Lo) && e.cancelable && e.preventDefault();
|
|
3141
3151
|
}), Q.utils = {
|
|
3142
3152
|
on: L,
|
|
3143
3153
|
off: R,
|
|
3144
|
-
css:
|
|
3145
|
-
find:
|
|
3154
|
+
css: B,
|
|
3155
|
+
find: ro,
|
|
3146
3156
|
is: function(e, t) {
|
|
3147
|
-
return !!
|
|
3157
|
+
return !!eo(e, t, e, !1);
|
|
3148
3158
|
},
|
|
3149
|
-
extend:
|
|
3150
|
-
throttle:
|
|
3151
|
-
closest:
|
|
3152
|
-
toggleClass:
|
|
3153
|
-
clone:
|
|
3154
|
-
index:
|
|
3155
|
-
nextTick:
|
|
3156
|
-
cancelNextTick:
|
|
3157
|
-
detectDirection:
|
|
3158
|
-
getChild:
|
|
3159
|
+
extend: po,
|
|
3160
|
+
throttle: go,
|
|
3161
|
+
closest: eo,
|
|
3162
|
+
toggleClass: z,
|
|
3163
|
+
clone: yo,
|
|
3164
|
+
index: co,
|
|
3165
|
+
nextTick: ws,
|
|
3166
|
+
cancelNextTick: Ts,
|
|
3167
|
+
detectDirection: os,
|
|
3168
|
+
getChild: oo
|
|
3159
3169
|
}, Q.get = function(e) {
|
|
3160
|
-
return e[
|
|
3170
|
+
return e[xo];
|
|
3161
3171
|
}, Q.mount = function() {
|
|
3162
3172
|
var e = [...arguments];
|
|
3163
3173
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3164
3174
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3165
|
-
e.utils && (Q.utils =
|
|
3175
|
+
e.utils && (Q.utils = La(La({}, Q.utils), e.utils)), Do.mount(e);
|
|
3166
3176
|
});
|
|
3167
3177
|
}, Q.create = function(e, t) {
|
|
3168
3178
|
return new Q(e, t);
|
|
3169
|
-
}, Q.version =
|
|
3170
|
-
var $ = [],
|
|
3171
|
-
function
|
|
3179
|
+
}, Q.version = Ua;
|
|
3180
|
+
var $ = [], Es, Ds, Os = !1, ks, As, js, Ms;
|
|
3181
|
+
function Ns() {
|
|
3172
3182
|
function e() {
|
|
3173
3183
|
for (var e in this.defaults = {
|
|
3174
3184
|
scroll: !0,
|
|
@@ -3188,63 +3198,63 @@ function Os() {
|
|
|
3188
3198
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3189
3199
|
},
|
|
3190
3200
|
drop: function() {
|
|
3191
|
-
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3201
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), Fs(), Ps(), _o();
|
|
3192
3202
|
},
|
|
3193
3203
|
nulling: function() {
|
|
3194
|
-
|
|
3204
|
+
js = Ds = Es = Os = Ms = ks = As = null, $.length = 0;
|
|
3195
3205
|
},
|
|
3196
3206
|
_handleFallbackAutoScroll: function(e) {
|
|
3197
3207
|
this._handleAutoScroll(e, !0);
|
|
3198
3208
|
},
|
|
3199
3209
|
_handleAutoScroll: function(e, t) {
|
|
3200
3210
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3201
|
-
if (
|
|
3202
|
-
|
|
3203
|
-
var o =
|
|
3204
|
-
|
|
3205
|
-
var a =
|
|
3206
|
-
a !== o && (o = a,
|
|
3207
|
-
}, 10),
|
|
3211
|
+
if (js = e, t || this.options.forceAutoScrollFallback || Ka || Ga || Ja) {
|
|
3212
|
+
Is(e, this.options, a, t);
|
|
3213
|
+
var o = fo(a, !0);
|
|
3214
|
+
Os && (!Ms || r !== ks || i !== As) && (Ms && Fs(), Ms = setInterval(function() {
|
|
3215
|
+
var a = fo(document.elementFromPoint(r, i), !0);
|
|
3216
|
+
a !== o && (o = a, Ps()), Is(e, n.options, a, t);
|
|
3217
|
+
}, 10), ks = r, As = i);
|
|
3208
3218
|
} else {
|
|
3209
|
-
if (!this.options.bubbleScroll ||
|
|
3210
|
-
|
|
3219
|
+
if (!this.options.bubbleScroll || fo(a, !0) === io()) {
|
|
3220
|
+
Ps();
|
|
3211
3221
|
return;
|
|
3212
3222
|
}
|
|
3213
|
-
|
|
3223
|
+
Is(e, this.options, fo(a, !1), !1);
|
|
3214
3224
|
}
|
|
3215
3225
|
}
|
|
3216
|
-
},
|
|
3226
|
+
}, Ba(e, {
|
|
3217
3227
|
pluginName: "scroll",
|
|
3218
3228
|
initializeByDefault: !0
|
|
3219
3229
|
});
|
|
3220
3230
|
}
|
|
3221
|
-
function
|
|
3231
|
+
function Ps() {
|
|
3222
3232
|
$.forEach(function(e) {
|
|
3223
3233
|
clearInterval(e.pid);
|
|
3224
3234
|
}), $ = [];
|
|
3225
3235
|
}
|
|
3226
|
-
function
|
|
3227
|
-
clearInterval(
|
|
3236
|
+
function Fs() {
|
|
3237
|
+
clearInterval(Ms);
|
|
3228
3238
|
}
|
|
3229
|
-
var
|
|
3239
|
+
var Is = go(function(e, t, n, r) {
|
|
3230
3240
|
if (t.scroll) {
|
|
3231
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3232
|
-
|
|
3233
|
-
var d = 0, f =
|
|
3241
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = io(), l = !1, u;
|
|
3242
|
+
Ds !== n && (Ds = n, Ps(), Es = t.scroll, u = t.scrollFn, Es === !0 && (Es = fo(n, !0)));
|
|
3243
|
+
var d = 0, f = Es;
|
|
3234
3244
|
do {
|
|
3235
|
-
var p = f, m =
|
|
3245
|
+
var p = f, m = V(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = B(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3236
3246
|
p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
|
|
3237
3247
|
var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
|
|
3238
3248
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3239
3249
|
($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3240
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3250
|
+
r && this.layer === 0 && Q.active._onTouchMove(js);
|
|
3241
3251
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3242
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3252
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[xo], n, t, e, js, $[this.layer].el) !== "continue" || vo($[this.layer].el, n, t);
|
|
3243
3253
|
}.bind({ layer: d }), 24))), d++;
|
|
3244
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3245
|
-
|
|
3254
|
+
} while (t.bubbleScroll && f !== c && (f = fo(f, !1)));
|
|
3255
|
+
Os = l;
|
|
3246
3256
|
}
|
|
3247
|
-
}, 30),
|
|
3257
|
+
}, 30), Ls = function(e) {
|
|
3248
3258
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3249
3259
|
if (t) {
|
|
3250
3260
|
var c = n || i;
|
|
@@ -3256,8 +3266,8 @@ var js = fo(function(e, t, n, r) {
|
|
|
3256
3266
|
}));
|
|
3257
3267
|
}
|
|
3258
3268
|
};
|
|
3259
|
-
function
|
|
3260
|
-
|
|
3269
|
+
function Rs() {}
|
|
3270
|
+
Rs.prototype = {
|
|
3261
3271
|
startIndex: null,
|
|
3262
3272
|
dragStart: function(e) {
|
|
3263
3273
|
var t = e.oldDraggableIndex;
|
|
@@ -3266,72 +3276,72 @@ Ns.prototype = {
|
|
|
3266
3276
|
onSpill: function(e) {
|
|
3267
3277
|
var t = e.dragEl, n = e.putSortable;
|
|
3268
3278
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3269
|
-
var r =
|
|
3279
|
+
var r = oo(this.sortable.el, this.startIndex, this.options);
|
|
3270
3280
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3271
3281
|
},
|
|
3272
|
-
drop:
|
|
3273
|
-
},
|
|
3274
|
-
function
|
|
3275
|
-
|
|
3282
|
+
drop: Ls
|
|
3283
|
+
}, Ba(Rs, { pluginName: "revertOnSpill" });
|
|
3284
|
+
function zs() {}
|
|
3285
|
+
zs.prototype = {
|
|
3276
3286
|
onSpill: function(e) {
|
|
3277
3287
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3278
3288
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3279
3289
|
},
|
|
3280
|
-
drop:
|
|
3281
|
-
},
|
|
3282
|
-
function
|
|
3290
|
+
drop: Ls
|
|
3291
|
+
}, Ba(zs, { pluginName: "removeOnSpill" }), Q.mount(new Ns()), Q.mount(zs, Rs);
|
|
3292
|
+
function Bs(e) {
|
|
3283
3293
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3284
3294
|
}
|
|
3285
|
-
function
|
|
3295
|
+
function Vs(e) {
|
|
3286
3296
|
te() && O(e);
|
|
3287
3297
|
}
|
|
3288
|
-
function
|
|
3298
|
+
function Hs(e) {
|
|
3289
3299
|
te() ? d(e) : a(e);
|
|
3290
3300
|
}
|
|
3291
|
-
var
|
|
3292
|
-
function
|
|
3293
|
-
|
|
3301
|
+
var Us = null, Ws = null;
|
|
3302
|
+
function Gs(e = null, t = null) {
|
|
3303
|
+
Us = e, Ws = t;
|
|
3294
3304
|
}
|
|
3295
|
-
function
|
|
3305
|
+
function Ks() {
|
|
3296
3306
|
return {
|
|
3297
|
-
data:
|
|
3298
|
-
clonedData:
|
|
3307
|
+
data: Us,
|
|
3308
|
+
clonedData: Ws
|
|
3299
3309
|
};
|
|
3300
3310
|
}
|
|
3301
|
-
var
|
|
3302
|
-
function
|
|
3311
|
+
var qs = Symbol("cloneElement");
|
|
3312
|
+
function Js(...e) {
|
|
3303
3313
|
let t = te()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
3304
3314
|
Array.isArray(y(i)) || (o = i, i = null);
|
|
3305
|
-
let s = null, { immediate: l = !0, clone: u =
|
|
3315
|
+
let s = null, { immediate: l = !0, clone: u = Bs, forceFallback: d, fallbackOnBody: p, customUpdate: m } = y(o) ?? {};
|
|
3306
3316
|
function h(e) {
|
|
3307
3317
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3308
3318
|
n = d && !p ? o.slice(0, -1) : o;
|
|
3309
3319
|
let s = y(y(i)?.[r]), c = u(s);
|
|
3310
|
-
|
|
3320
|
+
Gs(s, c), a[qs] = c;
|
|
3311
3321
|
}
|
|
3312
3322
|
function g(e) {
|
|
3313
|
-
let t = e.item[
|
|
3314
|
-
if (!
|
|
3315
|
-
if (
|
|
3323
|
+
let t = e.item[qs];
|
|
3324
|
+
if (!Ta(t)) {
|
|
3325
|
+
if (Oa(e.item), c(i)) {
|
|
3316
3326
|
let n = [...y(i)];
|
|
3317
|
-
i.value =
|
|
3327
|
+
i.value = wa(n, e.newDraggableIndex, t);
|
|
3318
3328
|
return;
|
|
3319
3329
|
}
|
|
3320
|
-
|
|
3330
|
+
wa(y(i), e.newDraggableIndex, t);
|
|
3321
3331
|
}
|
|
3322
3332
|
}
|
|
3323
3333
|
function _(e) {
|
|
3324
3334
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3325
|
-
if (
|
|
3326
|
-
|
|
3335
|
+
if (Da(t, n, r), o === "clone") {
|
|
3336
|
+
Oa(s);
|
|
3327
3337
|
return;
|
|
3328
3338
|
}
|
|
3329
3339
|
if (c(i)) {
|
|
3330
3340
|
let e = [...y(i)];
|
|
3331
|
-
i.value =
|
|
3341
|
+
i.value = Ca(e, a);
|
|
3332
3342
|
return;
|
|
3333
3343
|
}
|
|
3334
|
-
|
|
3344
|
+
Ca(y(i), a);
|
|
3335
3345
|
}
|
|
3336
3346
|
function v(e) {
|
|
3337
3347
|
if (m) {
|
|
@@ -3339,12 +3349,12 @@ function Us(...e) {
|
|
|
3339
3349
|
return;
|
|
3340
3350
|
}
|
|
3341
3351
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3342
|
-
if (
|
|
3352
|
+
if (Oa(n), Da(t, n, r), c(i)) {
|
|
3343
3353
|
let e = [...y(i)];
|
|
3344
|
-
i.value =
|
|
3354
|
+
i.value = ba(e, a, o);
|
|
3345
3355
|
return;
|
|
3346
3356
|
}
|
|
3347
|
-
|
|
3357
|
+
ba(y(i), a, o);
|
|
3348
3358
|
}
|
|
3349
3359
|
function b(e) {
|
|
3350
3360
|
let { newIndex: t, oldIndex: r, from: i, to: o } = e, s = null, c = t === r && i === o;
|
|
@@ -3363,7 +3373,7 @@ function Us(...e) {
|
|
|
3363
3373
|
n = null;
|
|
3364
3374
|
}
|
|
3365
3375
|
a(() => {
|
|
3366
|
-
if (
|
|
3376
|
+
if (Gs(), s) throw s;
|
|
3367
3377
|
});
|
|
3368
3378
|
}
|
|
3369
3379
|
let x = {
|
|
@@ -3375,19 +3385,19 @@ function Us(...e) {
|
|
|
3375
3385
|
};
|
|
3376
3386
|
function S(e) {
|
|
3377
3387
|
let n = y(r);
|
|
3378
|
-
return e ||=
|
|
3388
|
+
return e ||= Ea(n) ? ka(n, t?.$el) : n, e && !Ma(e) && (e = e.$el), e || ya("Root element not found"), e;
|
|
3379
3389
|
}
|
|
3380
3390
|
function C() {
|
|
3381
|
-
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3382
|
-
return
|
|
3383
|
-
|
|
3384
|
-
}),
|
|
3391
|
+
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r = ga(e, ["immediate", "clone"]);
|
|
3392
|
+
return Na(r, (e, t) => {
|
|
3393
|
+
Pa(e) && (r[e] = (e, ...n) => (Fa(e, Ks()), t(e, ...n)));
|
|
3394
|
+
}), ja(i === null ? {} : x, r);
|
|
3385
3395
|
}
|
|
3386
3396
|
let w = (e) => {
|
|
3387
3397
|
e = S(e), s && T.destroy(), s = new Q(e, C());
|
|
3388
3398
|
};
|
|
3389
3399
|
f(() => o, () => {
|
|
3390
|
-
s &&
|
|
3400
|
+
s && Na(C(), (e, t) => {
|
|
3391
3401
|
s?.option(e, t);
|
|
3392
3402
|
});
|
|
3393
3403
|
}, { deep: !0 });
|
|
@@ -3400,15 +3410,15 @@ function Us(...e) {
|
|
|
3400
3410
|
toArray: () => s?.toArray(),
|
|
3401
3411
|
closest: (...e) => s?.closest(...e)
|
|
3402
3412
|
};
|
|
3403
|
-
return
|
|
3413
|
+
return Hs(() => {
|
|
3404
3414
|
l && w();
|
|
3405
|
-
}),
|
|
3415
|
+
}), Vs(T.destroy), ha({
|
|
3406
3416
|
start: w,
|
|
3407
3417
|
pause: () => T?.option("disabled", !0),
|
|
3408
3418
|
resume: () => T?.option("disabled", !1)
|
|
3409
3419
|
}, T);
|
|
3410
3420
|
}
|
|
3411
|
-
var
|
|
3421
|
+
var Ys = [
|
|
3412
3422
|
"update",
|
|
3413
3423
|
"start",
|
|
3414
3424
|
"add",
|
|
@@ -3421,7 +3431,7 @@ var Ws = [
|
|
|
3421
3431
|
"clone",
|
|
3422
3432
|
"move",
|
|
3423
3433
|
"change"
|
|
3424
|
-
],
|
|
3434
|
+
], Xs = [
|
|
3425
3435
|
"clone",
|
|
3426
3436
|
"animation",
|
|
3427
3437
|
"ghostClass",
|
|
@@ -3465,43 +3475,43 @@ var Ws = [
|
|
|
3465
3475
|
"tag",
|
|
3466
3476
|
"target",
|
|
3467
3477
|
"customUpdate",
|
|
3468
|
-
...
|
|
3469
|
-
],
|
|
3478
|
+
...Ys.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3479
|
+
], Zs = F({
|
|
3470
3480
|
name: "VueDraggable",
|
|
3471
3481
|
model: {
|
|
3472
3482
|
prop: "modelValue",
|
|
3473
3483
|
event: "update:modelValue"
|
|
3474
3484
|
},
|
|
3475
|
-
props:
|
|
3476
|
-
emits: ["update:modelValue", ...
|
|
3485
|
+
props: Xs,
|
|
3486
|
+
emits: ["update:modelValue", ...Ys],
|
|
3477
3487
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3478
|
-
let a =
|
|
3488
|
+
let a = Ys.reduce((e, t) => {
|
|
3479
3489
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3480
3490
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3481
3491
|
}, {}), o = N(() => {
|
|
3482
|
-
let t = j(e), { modelValue: n } = t, r =
|
|
3492
|
+
let t = j(e), { modelValue: n } = t, r = ga(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3483
3493
|
let r = y(n);
|
|
3484
3494
|
return r !== void 0 && (e[t] = r), e;
|
|
3485
3495
|
}, {});
|
|
3486
|
-
return
|
|
3496
|
+
return ha(ha({}, a), Sa(ha(ha({}, i), o)));
|
|
3487
3497
|
}), s = N({
|
|
3488
3498
|
get: () => e.modelValue,
|
|
3489
3499
|
set: (e) => n("update:modelValue", e)
|
|
3490
|
-
}), c = _(), l = g(
|
|
3500
|
+
}), c = _(), l = g(Js(e.target || c, s, o));
|
|
3491
3501
|
return r(l), () => b(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3492
3502
|
}
|
|
3493
|
-
}),
|
|
3503
|
+
}), Qs = {
|
|
3494
3504
|
mounted: "mounted",
|
|
3495
3505
|
unmounted: "unmounted"
|
|
3496
3506
|
};
|
|
3497
|
-
|
|
3507
|
+
Qs.mounted, Qs.unmounted;
|
|
3498
3508
|
//#endregion
|
|
3499
3509
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3500
|
-
var
|
|
3510
|
+
var $s = { class: "tpl:w-full" }, ec = {
|
|
3501
3511
|
key: 0,
|
|
3502
3512
|
"data-testid": "section-drop-hint",
|
|
3503
3513
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3504
|
-
},
|
|
3514
|
+
}, tc = /* @__PURE__ */ F({
|
|
3505
3515
|
__name: "SectionBlock",
|
|
3506
3516
|
props: {
|
|
3507
3517
|
block: {},
|
|
@@ -3509,13 +3519,13 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3509
3519
|
},
|
|
3510
3520
|
setup(e) {
|
|
3511
3521
|
let i = {
|
|
3512
|
-
title:
|
|
3513
|
-
paragraph:
|
|
3514
|
-
image:
|
|
3515
|
-
button:
|
|
3516
|
-
divider:
|
|
3517
|
-
custom:
|
|
3518
|
-
}, a = e, { t: s } =
|
|
3522
|
+
title: ca,
|
|
3523
|
+
paragraph: Hi,
|
|
3524
|
+
image: ki,
|
|
3525
|
+
button: Er,
|
|
3526
|
+
divider: ui,
|
|
3527
|
+
custom: ci
|
|
3528
|
+
}, a = e, { t: s } = sn(), c = ft(Ut, "SectionBlock"), u = p(Ht, null), d = p(en, null), f = p(qt, {}), h = p($t, null);
|
|
3519
3529
|
function g(e) {
|
|
3520
3530
|
let t = f.savedBlocks;
|
|
3521
3531
|
if (t?.isPicking.value) {
|
|
@@ -3550,7 +3560,7 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3550
3560
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
3551
3561
|
}
|
|
3552
3562
|
function E(e) {
|
|
3553
|
-
return
|
|
3563
|
+
return Wi(e, d, i);
|
|
3554
3564
|
}
|
|
3555
3565
|
function O(e, t) {
|
|
3556
3566
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
@@ -3558,16 +3568,16 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3558
3568
|
dataSourceFetched: t.dataSourceFetched
|
|
3559
3569
|
});
|
|
3560
3570
|
}
|
|
3561
|
-
return (i, a) => (t(), S("div",
|
|
3571
|
+
return (i, a) => (t(), S("div", $s, [x("div", { class: k(["tpl:flex tpl:gap-0", { "tpl:flex-col": b.value }]) }, [(t(!0), S(M, null, l(v.value, (i, a) => (t(), S("div", {
|
|
3562
3572
|
key: a,
|
|
3563
3573
|
class: k(["tpl:relative tpl:min-h-[60px] tpl:rounded", w(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3564
3574
|
style: n({ width: b.value ? "100%" : _.value[a] })
|
|
3565
|
-
}, [C(y(
|
|
3575
|
+
}, [C(y(Zs), {
|
|
3566
3576
|
"model-value": w(a),
|
|
3567
3577
|
group: {
|
|
3568
3578
|
name: "blocks",
|
|
3569
3579
|
pull: !0,
|
|
3570
|
-
put: (e, t, n) => y(
|
|
3580
|
+
put: (e, t, n) => y(la)(n)
|
|
3571
3581
|
},
|
|
3572
3582
|
animation: 150,
|
|
3573
3583
|
"ghost-class": "tpl-ghost",
|
|
@@ -3580,7 +3590,7 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3580
3590
|
class: "tpl:min-h-[60px]",
|
|
3581
3591
|
"onUpdate:modelValue": (e) => T(a, e)
|
|
3582
3592
|
}, {
|
|
3583
|
-
default: r(() => [(t(!0), S(M, null, l(w(a), (n) => m((t(), S("div", { key: n.id }, [C(
|
|
3593
|
+
default: r(() => [(t(!0), S(M, null, l(w(a), (n) => m((t(), S("div", { key: n.id }, [C(oa, {
|
|
3584
3594
|
block: n,
|
|
3585
3595
|
"is-selected": y(c).state.selectedBlockId === n.id,
|
|
3586
3596
|
viewport: e.viewport,
|
|
@@ -3612,13 +3622,13 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3612
3622
|
"model-value",
|
|
3613
3623
|
"group",
|
|
3614
3624
|
"onUpdate:modelValue"
|
|
3615
|
-
]), w(a).length === 0 ? (t(), S("div",
|
|
3625
|
+
]), w(a).length === 0 ? (t(), S("div", ec, [x("span", null, D(y(s).section.dropHere), 1)])) : P("", !0)], 6))), 128))], 2)]));
|
|
3616
3626
|
}
|
|
3617
|
-
}),
|
|
3627
|
+
}), nc = [
|
|
3618
3628
|
"width",
|
|
3619
3629
|
"height",
|
|
3620
3630
|
"fill"
|
|
3621
|
-
],
|
|
3631
|
+
], rc = ["d"], ic = /* @__PURE__ */ F({
|
|
3622
3632
|
__name: "SocialIconSvg",
|
|
3623
3633
|
props: {
|
|
3624
3634
|
platform: {},
|
|
@@ -3626,7 +3636,7 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3626
3636
|
iconSize: {}
|
|
3627
3637
|
},
|
|
3628
3638
|
setup(e) {
|
|
3629
|
-
let r = e, i = N(() =>
|
|
3639
|
+
let r = e, i = N(() => Qe[r.platform]), a = N(() => tt[r.iconSize]), o = N(() => {
|
|
3630
3640
|
let e = {
|
|
3631
3641
|
display: "inline-flex",
|
|
3632
3642
|
alignItems: "center",
|
|
@@ -3670,25 +3680,25 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3670
3680
|
viewBox: "0 0 24 24",
|
|
3671
3681
|
fill: c.value,
|
|
3672
3682
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3673
|
-
}, [x("path", { d: i.value.path }, null, 8,
|
|
3683
|
+
}, [x("path", { d: i.value.path }, null, 8, rc)], 8, nc))], 4));
|
|
3674
3684
|
}
|
|
3675
|
-
}),
|
|
3685
|
+
}), ac = { class: "tpl:w-full" }, oc = ["href"], sc = {
|
|
3676
3686
|
key: 1,
|
|
3677
3687
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3678
|
-
},
|
|
3688
|
+
}, cc = /* @__PURE__ */ F({
|
|
3679
3689
|
__name: "SocialIconsBlock",
|
|
3680
3690
|
props: {
|
|
3681
3691
|
block: {},
|
|
3682
3692
|
viewport: {}
|
|
3683
3693
|
},
|
|
3684
3694
|
setup(e) {
|
|
3685
|
-
let r = e, { t: i } =
|
|
3695
|
+
let r = e, { t: i } = sn(), a = N(() => ({
|
|
3686
3696
|
display: "flex",
|
|
3687
3697
|
flexWrap: "wrap",
|
|
3688
3698
|
gap: `${r.block.spacing}px`,
|
|
3689
3699
|
justifyContent: r.block.align === "left" ? "flex-start" : r.block.align === "right" ? "flex-end" : "center"
|
|
3690
3700
|
})), o = N(() => r.block.icons.length > 0);
|
|
3691
|
-
return (r, s) => (t(), S("div",
|
|
3701
|
+
return (r, s) => (t(), S("div", ac, [o.value ? (t(), S("div", {
|
|
3692
3702
|
key: 0,
|
|
3693
3703
|
style: n(a.value)
|
|
3694
3704
|
}, [(t(!0), S(M, null, l(e.block.icons, (n) => (t(), S("a", {
|
|
@@ -3696,7 +3706,7 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3696
3706
|
href: n.url || "#",
|
|
3697
3707
|
class: "tpl:cursor-default",
|
|
3698
3708
|
onClick: s[0] ||= I(() => {}, ["prevent"])
|
|
3699
|
-
}, [C(
|
|
3709
|
+
}, [C(ic, {
|
|
3700
3710
|
platform: n.platform,
|
|
3701
3711
|
"icon-style": e.block.iconStyle,
|
|
3702
3712
|
"icon-size": e.block.iconSize
|
|
@@ -3704,44 +3714,44 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3704
3714
|
"platform",
|
|
3705
3715
|
"icon-style",
|
|
3706
3716
|
"icon-size"
|
|
3707
|
-
])], 8,
|
|
3717
|
+
])], 8, oc))), 128))], 4)) : (t(), S("div", sc, [C(y($e), { size: 16 }), x("span", null, D(y(i).social.addIcons), 1)]))]));
|
|
3708
3718
|
}
|
|
3709
|
-
}),
|
|
3719
|
+
}), lc = { class: "tpl:w-full" }, uc = {
|
|
3710
3720
|
key: 0,
|
|
3711
3721
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3712
3722
|
style: {
|
|
3713
3723
|
"background-color": "var(--tpl-bg-hover)",
|
|
3714
3724
|
color: "var(--tpl-text-dim)"
|
|
3715
3725
|
}
|
|
3716
|
-
},
|
|
3726
|
+
}, dc = /* @__PURE__ */ F({
|
|
3717
3727
|
__name: "SpacerBlock",
|
|
3718
3728
|
props: {
|
|
3719
3729
|
block: {},
|
|
3720
3730
|
viewport: {}
|
|
3721
3731
|
},
|
|
3722
3732
|
setup(e) {
|
|
3723
|
-
let r = e, i =
|
|
3733
|
+
let r = e, i = ft(Ut, "SpacerBlock"), a = N(() => ({
|
|
3724
3734
|
height: `${r.block.height}px`,
|
|
3725
3735
|
minHeight: `${r.block.height}px`,
|
|
3726
3736
|
...i.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3727
3737
|
}));
|
|
3728
|
-
return (r, o) => (t(), S("div",
|
|
3738
|
+
return (r, o) => (t(), S("div", lc, [x("div", {
|
|
3729
3739
|
style: n(a.value),
|
|
3730
3740
|
class: k(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !y(i).state.previewMode }])
|
|
3731
|
-
}, [y(i).state.previewMode ? P("", !0) : (t(), S("span",
|
|
3741
|
+
}, [y(i).state.previewMode ? P("", !0) : (t(), S("span", uc, D(e.block.height) + "px ", 1))], 6)]));
|
|
3732
3742
|
}
|
|
3733
|
-
}),
|
|
3743
|
+
}), fc = { class: "tpl:w-full" }, pc = { key: 0 }, mc = [
|
|
3734
3744
|
"aria-label",
|
|
3735
3745
|
"data-placeholder",
|
|
3736
3746
|
"onBlur"
|
|
3737
|
-
],
|
|
3747
|
+
], hc = [
|
|
3738
3748
|
"aria-label",
|
|
3739
3749
|
"data-placeholder",
|
|
3740
3750
|
"onBlur"
|
|
3741
|
-
],
|
|
3751
|
+
], gc = {
|
|
3742
3752
|
key: 1,
|
|
3743
3753
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3744
|
-
},
|
|
3754
|
+
}, _c = /*#__PURE__*/ Cn(/* @__PURE__ */ F({
|
|
3745
3755
|
__name: "TableBlock",
|
|
3746
3756
|
props: {
|
|
3747
3757
|
block: {},
|
|
@@ -3755,7 +3765,7 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3755
3765
|
updated(e, t) {
|
|
3756
3766
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3757
3767
|
}
|
|
3758
|
-
}, i = e, { t: a } =
|
|
3768
|
+
}, i = e, { t: a } = sn(), o = ft(Ut, "TableBlock"), s = N(() => i.block.rows.length > 0), c = N(() => {
|
|
3759
3769
|
let e = {
|
|
3760
3770
|
width: "100%",
|
|
3761
3771
|
borderCollapse: "collapse",
|
|
@@ -3786,11 +3796,11 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3786
3796
|
} : n);
|
|
3787
3797
|
o.updateBlock(i.block.id, { rows: a });
|
|
3788
3798
|
}
|
|
3789
|
-
return (e, i) => (t(), S("div",
|
|
3799
|
+
return (e, i) => (t(), S("div", fc, [s.value ? (t(), S("table", {
|
|
3790
3800
|
key: 0,
|
|
3791
3801
|
style: n(c.value),
|
|
3792
3802
|
class: "tpl-table-editable"
|
|
3793
|
-
}, [f.value ? (t(), S("thead",
|
|
3803
|
+
}, [f.value ? (t(), S("thead", pc, [x("tr", null, [(t(!0), S(M, null, l(f.value.cells, (e) => m((t(), S("th", {
|
|
3794
3804
|
key: e.id,
|
|
3795
3805
|
style: n(d.value),
|
|
3796
3806
|
"aria-label": y(a).table.cellPlaceholder,
|
|
@@ -3799,7 +3809,7 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3799
3809
|
onBlur: (t) => g(f.value.id, e.id, t),
|
|
3800
3810
|
onKeydown: i[0] ||= re(I((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3801
3811
|
onClick: I(h, ["stop"])
|
|
3802
|
-
}, null, 44,
|
|
3812
|
+
}, null, 44, mc)), [[r, e.content]])), 128))])])) : P("", !0), x("tbody", null, [(t(!0), S(M, null, l(p.value, (e) => (t(), S("tr", { key: e.id }, [(t(!0), S(M, null, l(e.cells, (o) => m((t(), S("td", {
|
|
3803
3813
|
key: o.id,
|
|
3804
3814
|
style: n(u.value),
|
|
3805
3815
|
"aria-label": y(a).table.cellPlaceholder,
|
|
@@ -3808,9 +3818,9 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3808
3818
|
onBlur: (t) => g(e.id, o.id, t),
|
|
3809
3819
|
onKeydown: i[1] ||= re(I((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3810
3820
|
onClick: I(h, ["stop"])
|
|
3811
|
-
}, null, 44,
|
|
3821
|
+
}, null, 44, hc)), [[r, o.content]])), 128))]))), 128))])], 4)) : (t(), S("div", gc, [C(y(Ge), { size: 16 }), x("span", null, D(y(a).table.empty), 1)]))]));
|
|
3812
3822
|
}
|
|
3813
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
3823
|
+
}), [["__scopeId", "data-v-963ac422"]]), vc = /* @__PURE__ */ F({
|
|
3814
3824
|
__name: "VideoPlayButton",
|
|
3815
3825
|
props: { hoverEffect: {
|
|
3816
3826
|
type: Boolean,
|
|
@@ -3828,7 +3838,7 @@ var Js = { class: "tpl:w-full" }, Ys = {
|
|
|
3828
3838
|
});
|
|
3829
3839
|
//#endregion
|
|
3830
3840
|
//#region src/utils/videoThumbnail.ts
|
|
3831
|
-
function
|
|
3841
|
+
function yc(e) {
|
|
3832
3842
|
if (!e) return {
|
|
3833
3843
|
platform: "unknown",
|
|
3834
3844
|
videoId: null,
|
|
@@ -3860,25 +3870,25 @@ function mc(e) {
|
|
|
3860
3870
|
thumbnailUrl: null
|
|
3861
3871
|
};
|
|
3862
3872
|
}
|
|
3863
|
-
function
|
|
3864
|
-
return t ||
|
|
3873
|
+
function bc(e, t) {
|
|
3874
|
+
return t || yc(e).thumbnailUrl;
|
|
3865
3875
|
}
|
|
3866
3876
|
//#endregion
|
|
3867
3877
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3868
|
-
var
|
|
3878
|
+
var xc = ["src", "alt"], Sc = {
|
|
3869
3879
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3870
3880
|
style: { opacity: "0.7" }
|
|
3871
|
-
},
|
|
3881
|
+
}, Cc = ["href"], wc = ["src", "alt"], Tc = ["src", "alt"], Ec = {
|
|
3872
3882
|
key: 3,
|
|
3873
3883
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
3874
|
-
},
|
|
3884
|
+
}, Dc = /* @__PURE__ */ F({
|
|
3875
3885
|
__name: "VideoBlock",
|
|
3876
3886
|
props: {
|
|
3877
3887
|
block: {},
|
|
3878
3888
|
viewport: {}
|
|
3879
3889
|
},
|
|
3880
3890
|
setup(e) {
|
|
3881
|
-
let r = e, { t: i } =
|
|
3891
|
+
let r = e, { t: i } = sn(), { syntax: a } = Tn(), o = N(() => De(r.block.url, a) || De(r.block.thumbnailUrl, a)), s = Fn(() => o.value ? void 0 : r.block.thumbnailUrl || void 0), c = Fn(() => o.value ? r.block.placeholderUrl : void 0), l = N(() => o.value ? null : r.block.thumbnailUrl ? s.value ?? null : bc(r.block.url)), u = N(() => ({ textAlign: r.block.align })), d = N(() => {
|
|
3882
3892
|
let e = r.block.align;
|
|
3883
3893
|
return {
|
|
3884
3894
|
maxWidth: "100%",
|
|
@@ -3888,7 +3898,7 @@ var gc = ["src", "alt"], _c = {
|
|
|
3888
3898
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3889
3899
|
marginRight: e === "center" ? "auto" : void 0
|
|
3890
3900
|
};
|
|
3891
|
-
}), f = N(() => ({ height: r.block.height ? `${r.block.height}px` : void 0 })), p = N(() =>
|
|
3901
|
+
}), f = N(() => ({ height: r.block.height ? `${r.block.height}px` : void 0 })), p = N(() => De(r.block.url, a) ? r.block.url : r.block.thumbnailUrl);
|
|
3892
3902
|
return (r, a) => (t(), S("div", {
|
|
3893
3903
|
class: "tpl:w-full",
|
|
3894
3904
|
style: n(u.value)
|
|
@@ -3901,16 +3911,16 @@ var gc = ["src", "alt"], _c = {
|
|
|
3901
3911
|
src: y(c),
|
|
3902
3912
|
alt: e.block.alt,
|
|
3903
3913
|
style: n(f.value)
|
|
3904
|
-
}, null, 12,
|
|
3914
|
+
}, null, 12, xc), C(vc)], 4)) : o.value ? (t(), S("div", {
|
|
3905
3915
|
key: 1,
|
|
3906
3916
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
3907
3917
|
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
3908
|
-
}, [C(y(
|
|
3918
|
+
}, [C(y(Nr), {
|
|
3909
3919
|
size: 36,
|
|
3910
3920
|
"stroke-width": 1.5,
|
|
3911
3921
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3912
3922
|
style: { opacity: "0.5" }
|
|
3913
|
-
}), x("span",
|
|
3923
|
+
}), x("span", Sc, [C(wr, { text: p.value }, null, 8, ["text"])])], 4)) : l.value ? (t(), S(M, { key: 2 }, [e.block.url ? (t(), S("a", {
|
|
3914
3924
|
key: 0,
|
|
3915
3925
|
href: e.block.url,
|
|
3916
3926
|
target: "_blank",
|
|
@@ -3923,7 +3933,7 @@ var gc = ["src", "alt"], _c = {
|
|
|
3923
3933
|
src: l.value,
|
|
3924
3934
|
alt: e.block.alt,
|
|
3925
3935
|
style: n(f.value)
|
|
3926
|
-
}, null, 12,
|
|
3936
|
+
}, null, 12, wc), C(vc, { "hover-effect": "" })], 12, Cc)) : (t(), S("div", {
|
|
3927
3937
|
key: 1,
|
|
3928
3938
|
class: "tpl:relative tpl:inline-block",
|
|
3929
3939
|
style: n(d.value)
|
|
@@ -3932,54 +3942,54 @@ var gc = ["src", "alt"], _c = {
|
|
|
3932
3942
|
src: l.value,
|
|
3933
3943
|
alt: e.block.alt,
|
|
3934
3944
|
style: n(f.value)
|
|
3935
|
-
}, null, 12,
|
|
3945
|
+
}, null, 12, Tc), C(vc)], 4))], 64)) : (t(), S("div", Ec, [C(y(Nr), {
|
|
3936
3946
|
size: 40,
|
|
3937
3947
|
"stroke-width": 1.5,
|
|
3938
3948
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3939
3949
|
}), x("span", null, D(y(i).video.addVideo), 1)]))], 4));
|
|
3940
3950
|
}
|
|
3941
|
-
}),
|
|
3942
|
-
section:
|
|
3943
|
-
title:
|
|
3944
|
-
paragraph:
|
|
3945
|
-
image:
|
|
3946
|
-
button:
|
|
3947
|
-
divider:
|
|
3948
|
-
video:
|
|
3949
|
-
social:
|
|
3950
|
-
menu:
|
|
3951
|
-
table:
|
|
3952
|
-
spacer:
|
|
3953
|
-
html:
|
|
3954
|
-
countdown: v(() => import("./CountdownBlock-
|
|
3951
|
+
}), Oc = {
|
|
3952
|
+
section: tc,
|
|
3953
|
+
title: ca,
|
|
3954
|
+
paragraph: Hi,
|
|
3955
|
+
image: ki,
|
|
3956
|
+
button: Er,
|
|
3957
|
+
divider: ui,
|
|
3958
|
+
video: Dc,
|
|
3959
|
+
social: cc,
|
|
3960
|
+
menu: Ni,
|
|
3961
|
+
table: _c,
|
|
3962
|
+
spacer: dc,
|
|
3963
|
+
html: gi,
|
|
3964
|
+
countdown: v(() => import("./CountdownBlock-C6R-hn7D.js"))
|
|
3955
3965
|
};
|
|
3956
|
-
function
|
|
3957
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
3966
|
+
function kc(t) {
|
|
3967
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = sn(i), l = N(() => je(je(je($n(i), yr(n.content.value.settings?.locale)), Ie(n.content.value.settings) === "rtl" ? {
|
|
3958
3968
|
title: { textAlign: "right" },
|
|
3959
3969
|
table: { textAlign: "right" }
|
|
3960
3970
|
} : {}), r.blockDefaults ?? {}));
|
|
3961
3971
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
3962
|
-
let { resolvedTheme: u } =
|
|
3972
|
+
let { resolvedTheme: u } = Vn(N(() => n.state.uiTheme)), d = _(r.theme ?? {}), { themeStyles: p } = Un({
|
|
3963
3973
|
themeOverrides: d,
|
|
3964
3974
|
resolvedTheme: u,
|
|
3965
3975
|
extraStyles: () => ({
|
|
3966
3976
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
3967
3977
|
...t.themeExtraStyles?.()
|
|
3968
3978
|
})
|
|
3969
|
-
}), m =
|
|
3979
|
+
}), m = Ue({
|
|
3970
3980
|
content: n.content,
|
|
3971
3981
|
setContent: (e, t) => n.setContent(e, t),
|
|
3972
3982
|
...t.historyOptions
|
|
3973
3983
|
});
|
|
3974
|
-
|
|
3975
|
-
let g =
|
|
3984
|
+
rt(n, m);
|
|
3985
|
+
let g = We({
|
|
3976
3986
|
addBlock: n.addBlock,
|
|
3977
3987
|
removeBlock: n.removeBlock,
|
|
3978
3988
|
updateBlock: n.updateBlock,
|
|
3979
3989
|
selectBlock: n.selectBlock,
|
|
3980
3990
|
findBlockLocation: n.findBlockLocation,
|
|
3981
3991
|
blockDefaults: () => l.value
|
|
3982
|
-
}), v =
|
|
3992
|
+
}), v = Ke(n), y = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? Ye({
|
|
3983
3993
|
content: n.content,
|
|
3984
3994
|
isDirty: () => n.state.isDirty,
|
|
3985
3995
|
...t.autoSaveOptions
|
|
@@ -3987,30 +3997,30 @@ function wc(t) {
|
|
|
3987
3997
|
y && (b = f(m.isNavigating, (e) => {
|
|
3988
3998
|
e ? y.pause() : y.resume();
|
|
3989
3999
|
}));
|
|
3990
|
-
let x =
|
|
4000
|
+
let x = Bn(n, {
|
|
3991
4001
|
t: o,
|
|
3992
4002
|
format: c
|
|
3993
|
-
}, r.customBlocks ?? []), S =
|
|
3994
|
-
if (S.allowCustomIgnored &&
|
|
3995
|
-
let e =
|
|
3996
|
-
e.length > 0 &&
|
|
3997
|
-
}
|
|
3998
|
-
let C =
|
|
3999
|
-
for (let e of C.unknown)
|
|
4000
|
-
let w =
|
|
4001
|
-
|
|
4003
|
+
}, r.customBlocks ?? []), S = un(r.colors);
|
|
4004
|
+
if (S.allowCustomIgnored && cn.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), S.invalidPresets.length > 0 && cn.warn(`config.colors.presets skipped invalid entries: ${S.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), S.allowCustom === !1) {
|
|
4005
|
+
let e = Qn(S.presets, r.blockDefaults, r.templateDefaults);
|
|
4006
|
+
e.length > 0 && cn.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
4007
|
+
}
|
|
4008
|
+
let C = pn(r.templateSettings);
|
|
4009
|
+
for (let e of C.unknown) cn.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${mn.join(", ")}) — skipping it.`);
|
|
4010
|
+
let w = Wn();
|
|
4011
|
+
Yn(w, Oc);
|
|
4002
4012
|
let T = /* @__PURE__ */ new Set();
|
|
4003
4013
|
function D(e) {
|
|
4004
4014
|
for (let t of e) {
|
|
4005
|
-
w.registerCustom(t,
|
|
4006
|
-
for (let e of
|
|
4015
|
+
w.registerCustom(t, ci);
|
|
4016
|
+
for (let e of br(t, S)) T.has(e.id) || (T.add(e.id), cn.warn(e.message));
|
|
4007
4017
|
}
|
|
4008
4018
|
}
|
|
4009
4019
|
r.customBlocks?.length && D(r.customBlocks);
|
|
4010
|
-
let O =
|
|
4020
|
+
let O = jn();
|
|
4011
4021
|
if (h() && s(O.dispose), t.containerEl) {
|
|
4012
4022
|
let e = t.containerEl;
|
|
4013
|
-
|
|
4023
|
+
lt(document, "pointerdown", (t) => {
|
|
4014
4024
|
let n = e.value;
|
|
4015
4025
|
n && (t.composedPath?.() ?? []).includes(n) && O.claim();
|
|
4016
4026
|
}, { capture: !0 });
|
|
@@ -4024,7 +4034,7 @@ function wc(t) {
|
|
|
4024
4034
|
y?.flush();
|
|
4025
4035
|
}
|
|
4026
4036
|
function A(e) {
|
|
4027
|
-
O.isActive() &&
|
|
4037
|
+
O.isActive() && Sr(e, {
|
|
4028
4038
|
history: m,
|
|
4029
4039
|
selectBlock: (e) => n.selectBlock(e),
|
|
4030
4040
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4036,38 +4046,41 @@ function wc(t) {
|
|
|
4036
4046
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4037
4047
|
});
|
|
4038
4048
|
}
|
|
4039
|
-
|
|
4049
|
+
lt(document, "keydown", A);
|
|
4040
4050
|
let j = _(null);
|
|
4041
|
-
E(
|
|
4042
|
-
let M =
|
|
4051
|
+
E(Lt, t.editorRoot ?? document), E(mt, j), E(Ft, i), E(Ut, n), E(an, m), E(Rt, g), E(Ht, v), E(tn, a), E(St, p), E(It, u), E(Xt, l), E(Pt, r.locale), E(en, w), E(Zt, r.customBlocks ?? []), E(on, r.paletteBlocks), E(zt, Xn(r.htmlBlockPreview)), E(ht, r.layout), E(yt, r.sectionWrapper), E(Vt, S), E(Qt, C.fields), E(Jt, Gn(n.content, w));
|
|
4052
|
+
let M = Se(r.mergeTags?.syntax), ee = e(r.mergeTags?.tags ?? []);
|
|
4043
4053
|
function P(e) {
|
|
4044
4054
|
if (!Array.isArray(e)) {
|
|
4045
|
-
|
|
4055
|
+
cn.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4046
4056
|
return;
|
|
4047
4057
|
}
|
|
4048
4058
|
ee.value = e;
|
|
4049
4059
|
}
|
|
4050
|
-
E(
|
|
4051
|
-
let F = _(
|
|
4052
|
-
E(
|
|
4053
|
-
let te =
|
|
4060
|
+
E(Dt, ee), E(Ot, M), E(At, r.mergeTags?.onRequest ?? null), E(Kt, r.mergeTags?.autocomplete !== !1), E(Et, r.mergeTags?.showRawValue !== !1);
|
|
4061
|
+
let F = _(ve(r.mergeTags?.tags ?? []));
|
|
4062
|
+
E(Tt, F);
|
|
4063
|
+
let te = Nn({
|
|
4054
4064
|
resolvePreview: r.resolvePreview,
|
|
4055
|
-
getContent: () =>
|
|
4065
|
+
getContent: () => {
|
|
4066
|
+
let e = n.content.value;
|
|
4067
|
+
return r.layout && n.state.previewMode ? Ee(r.layout, e) : e;
|
|
4068
|
+
},
|
|
4056
4069
|
isActive: () => n.state.previewMode
|
|
4057
4070
|
});
|
|
4058
|
-
E(
|
|
4071
|
+
E(Nt, te), E(bt, r.resolvePreview);
|
|
4059
4072
|
let I = N(() => !(n.state.previewMode && te.isConfigured));
|
|
4060
|
-
E(
|
|
4061
|
-
let ne =
|
|
4062
|
-
E(
|
|
4063
|
-
let re =
|
|
4073
|
+
E($t, I);
|
|
4074
|
+
let ne = In();
|
|
4075
|
+
E(pt, ne), E(Gt, _(!1)), E(gt, _(!1)), E(Mt, r.logicTags?.tags ?? []), E(nn, r.logicTags?.pairs ?? []), E(xt, r.logicTags?.onRequest ?? null), E(_t, Ln()), E(wt, r.onRequestMedia ?? null), E(Bt, r.canDropMedia ?? null), E(rn, r.resolveImageUrl ? Pn(r.resolveImageUrl) : null), E(Wt, r.displayConditions?.conditions ?? []), E(Yt, r.displayConditions?.allowCustom ?? !1), E(qt, t.capabilities ?? {}), E(jt, x);
|
|
4076
|
+
let re = Rn(r.lint) ? null : zn({
|
|
4064
4077
|
content: n.content,
|
|
4065
4078
|
options: r.lint ?? {},
|
|
4066
4079
|
updateBlock: n.updateBlock,
|
|
4067
4080
|
updateSettings: n.updateSettings,
|
|
4068
4081
|
removeBlock: n.removeBlock
|
|
4069
4082
|
});
|
|
4070
|
-
E(
|
|
4083
|
+
E(Ct, re);
|
|
4071
4084
|
function ie() {
|
|
4072
4085
|
b?.(), re?.destroy(), y?.destroy(), m.destroy();
|
|
4073
4086
|
}
|
|
@@ -4094,4 +4107,4 @@ function wc(t) {
|
|
|
4094
4107
|
};
|
|
4095
4108
|
}
|
|
4096
4109
|
//#endregion
|
|
4097
|
-
export {
|
|
4110
|
+
export { Er as A, Wr as C, jr as D, Ir as E, fr as F, dr as I, ur as L, hr as M, mr as N, kr as O, pr as P, Nn as R, Yr as S, Rr as T, gi as _, cc as a, $r as b, ca as c, Ui as d, qi as f, ki as g, Ni as h, dc as i, sr as j, Dr as k, oa as l, Hi as m, Dc as n, tc as o, Wi as p, _c as r, Zs as s, kc as t, Gi as u, ui as v, zr as w, Zr as x, ci as y };
|