@templatical/editor 0.31.0 → 0.33.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-DYDtzTDd.js → AiChatSidebar-J7WsHRDS.js} +15 -15
- package/dist/{AiFeatureMenu-BJ882XCi.js → AiFeatureMenu-C9mxL_7U.js} +7 -7
- package/dist/{BlockIssueBadge-D6y8vQpL.js → BlockIssueBadge-BI6v_eol.js} +5 -5
- package/dist/{BlockPreviewCanvas-DQNxLy7u.js → BlockPreviewCanvas-mZIr9mY2.js} +20 -19
- package/dist/{CloudHeaderExtras-CqG3RaKw.js → CloudHeaderExtras-CLtTtK12.js} +5 -5
- package/dist/{CloudPanels-B6xrk7kN.js → CloudPanels-BbLAX1jH.js} +7 -7
- package/dist/{CollaboratorBar-by16gXQH.js → CollaboratorBar-OBbLOhLK.js} +4 -4
- package/dist/{ColorPicker-E5gqlCZE.js → ColorPicker-Cs7iK01u.js} +7 -7
- package/dist/{CommentsPanel-B_kzvTHR.js → CommentsPanel-G_uNzi1a.js} +2 -2
- package/dist/{CommentsSidebar-gfzUX7cd.js → CommentsSidebar-DlFlpfkU.js} +14 -14
- package/dist/{CountdownBlock-BgNK7fZY.js → CountdownBlock-Bdt8qZi1.js} +3 -3
- package/dist/{CountdownToolbar-DU8UHx9A.js → CountdownToolbar-BWLYViOm.js} +4 -4
- package/dist/{DesignReferenceSidebar-DgndMB4H.js → DesignReferenceSidebar-CK_xTLh2.js} +11 -11
- package/dist/{FieldRow-0-UbQR4a.js → FieldRow-BWt7ECqo.js} +1 -1
- package/dist/{IssuesPanel-DmJTb_SZ.js → IssuesPanel-DIbJ_jaa.js} +8 -8
- package/dist/{LoadingTrack-5KBr5cE8.js → LoadingTrack-SQXoZVf2.js} +1 -1
- package/dist/{MergeTagModeToggle-CZnJ2Gz_.js → MergeTagModeToggle-DeI65T5k.js} +6 -6
- package/dist/{MergeTagSuggestion-DyUcY_9e.js → MergeTagSuggestion-CoCuzEmW.js} +4 -4
- package/dist/{ParagraphEditor-CnB4kXle.js → ParagraphEditor-Dr-u72hu.js} +26 -26
- package/dist/{RestoreVersionDialog-BpOphPiE.js → RestoreVersionDialog-6sBYYt9f.js} +5 -5
- package/dist/{RichTextEditorContent-ChPNgHQ_.js → RichTextEditorContent-DKLVe6Io.js} +8 -8
- package/dist/{SaveBlockDialog-CKw4Va6j.js → SaveBlockDialog-DABN4-Jf.js} +25 -25
- package/dist/SavedBlocksBrowserModal-BoylzTEq.js +322 -0
- package/dist/{SavedBlocksPanels-ChV8bOgM.js → SavedBlocksPanels-2np4Yu1H.js} +2 -2
- package/dist/{SavedBlocksPickBar-BbEeD5RB.js → SavedBlocksPickBar-BM7aTSK2.js} +4 -4
- package/dist/{TemplateScoringPanel-De8BZpRU.js → TemplateScoringPanel-CzWoSM1V.js} +15 -15
- package/dist/{TestEmailModal-4d2pXeHU.js → TestEmailModal-Cb0n7Dhj.js} +11 -11
- package/dist/{TestEmailPanel-DEgCesNP.js → TestEmailPanel-52HjvuU7.js} +2 -2
- package/dist/{TitleEditor-89pmKLVY.js → TitleEditor-_taBpBfB.js} +13 -13
- package/dist/{TplModal-DswccJRJ.js → TplModal-CEYnwBBk.js} +5 -5
- package/dist/VersionHistoryMenu-CsGlLSO8.js +157 -0
- package/dist/{VersionHistoryPanels-CFLHDH9P.js → VersionHistoryPanels-DPmYk00L.js} +2 -2
- package/dist/{VersionPreviewBanner-DhG5RcRt.js → VersionPreviewBanner-VGJbEoXj.js} +3 -3
- package/dist/{blockTypeIcons-dpKs5GQc.js → blockTypeIcons-IhdBwbxp.js} +2 -2
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +5 -0
- package/dist/cdn/chunks/{AiChatSidebar-DmYDRmvX.js → AiChatSidebar-6S5LPyRW.js} +9 -9
- package/dist/cdn/chunks/{AiChatSidebar-DmYDRmvX.js.map → AiChatSidebar-6S5LPyRW.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-C0Rt08qb.js → AiFeatureMenu-BHCtjIfV.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-C0Rt08qb.js.map → AiFeatureMenu-BHCtjIfV.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BBog2CMy.js → BlockIssueBadge-2-os120N.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-BBog2CMy.js.map → BlockIssueBadge-2-os120N.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DNBjBKBI.js → BlockPreviewCanvas-CYNs-Yn-.js} +21 -20
- package/dist/cdn/chunks/BlockPreviewCanvas-CYNs-Yn-.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-Ditfv7y9.js → CloudHeaderExtras-DrbFk6Fy.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-Ditfv7y9.js.map → CloudHeaderExtras-DrbFk6Fy.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-C4U5bJO6.js → CloudPanels-CpzYrAPQ.js} +7 -7
- package/dist/cdn/chunks/{CloudPanels-C4U5bJO6.js.map → CloudPanels-CpzYrAPQ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-B79JR9NH.js → CollaboratorBar-VMTCYn_z.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-B79JR9NH.js.map → CollaboratorBar-VMTCYn_z.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-C-ZiwUV3.js → ColorPicker-B0l_UF8G.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-C-ZiwUV3.js.map → ColorPicker-B0l_UF8G.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-D1Ke8PbO.js → CommentsPanel-CXMMdLrO.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-D1Ke8PbO.js.map → CommentsPanel-CXMMdLrO.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-B-UyhIZN.js → CommentsSidebar-CGkhAJUW.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-B-UyhIZN.js.map → CommentsSidebar-CGkhAJUW.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js → CountdownBlock-CPe1ulzk.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js.map → CountdownBlock-CPe1ulzk.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DyOHOu44.js → CountdownToolbar-D5xyNd5V.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-DyOHOu44.js.map → CountdownToolbar-D5xyNd5V.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BCCX1FtP.js → DesignReferenceSidebar-D1NH1WRv.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-BCCX1FtP.js.map → DesignReferenceSidebar-D1NH1WRv.js.map} +1 -1
- package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js → FieldRow-D9OJhYeb.js} +2 -2
- package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js.map → FieldRow-D9OJhYeb.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-3vD3ImHF.js → IssuesPanel-07SBSZVN.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-3vD3ImHF.js.map → IssuesPanel-07SBSZVN.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js → LoadingTrack-Cm3TDKb3.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js.map → LoadingTrack-Cm3TDKb3.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BU0SDRow.js → MergeTagModeToggle-Bg8eO5nc.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-BU0SDRow.js.map → MergeTagModeToggle-Bg8eO5nc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-B9vL0VaG.js → MergeTagSuggestion-t8Uj00Er.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-B9vL0VaG.js.map → MergeTagSuggestion-t8Uj00Er.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CSwIuvoF.js → ParagraphEditor-x2LTi6DN.js} +23 -23
- package/dist/cdn/chunks/{ParagraphEditor-CSwIuvoF.js.map → ParagraphEditor-x2LTi6DN.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-Bvg2WvJN.js → RestoreVersionDialog--SjTV0_4.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-Bvg2WvJN.js.map → RestoreVersionDialog--SjTV0_4.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DdkmEEpK.js → RichTextEditorContent-CzdMJ1c9.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-DdkmEEpK.js.map → RichTextEditorContent-CzdMJ1c9.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-D-QO3LuR.js → SaveBlockDialog-CS1lqdsQ.js} +9 -9
- package/dist/cdn/chunks/{SaveBlockDialog-D-QO3LuR.js.map → SaveBlockDialog-CS1lqdsQ.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BRdN56r7.js → SavedBlocksBrowserModal-D6nDZ4rq.js} +110 -111
- package/dist/cdn/chunks/SavedBlocksBrowserModal-D6nDZ4rq.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-D9GTlLgb.js → SavedBlocksPanels-DdkwvYRR.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-D9GTlLgb.js.map → SavedBlocksPanels-DdkwvYRR.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DSRcUeIo.js → SavedBlocksPickBar-BLQr_6WM.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-DSRcUeIo.js.map → SavedBlocksPickBar-BLQr_6WM.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-Dy5oOVhB.js → TemplateScoringPanel-CDC-JC6C.js} +50 -50
- package/dist/cdn/chunks/{TemplateScoringPanel-Dy5oOVhB.js.map → TemplateScoringPanel-CDC-JC6C.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-B4L2lmIV.js → TestEmailModal-B2LcU11Y.js} +10 -10
- package/dist/cdn/chunks/{TestEmailModal-B4L2lmIV.js.map → TestEmailModal-B2LcU11Y.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-cTPgEf-D.js → TestEmailPanel-ByqDSx8B.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-cTPgEf-D.js.map → TestEmailPanel-ByqDSx8B.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BKjL2Zs1.js → TitleEditor-DCoulgN8.js} +13 -13
- package/dist/cdn/chunks/{TitleEditor-BKjL2Zs1.js.map → TitleEditor-DCoulgN8.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DxrgNmt9.js → TplModal-CxQDl-tN.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DxrgNmt9.js.map → TplModal-CxQDl-tN.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryMenu-BOy8aMB6.js +150 -0
- package/dist/cdn/chunks/VersionHistoryMenu-BOy8aMB6.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-CxIFBJsz.js → VersionHistoryPanels-BPLhzW9c.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-CxIFBJsz.js.map → VersionHistoryPanels-BPLhzW9c.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CdsZvVYF.js → VersionPreviewBanner-CYC9qP2i.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-CdsZvVYF.js.map → VersionPreviewBanner-CYC9qP2i.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-DXPd_hd1.js → blockTypeIcons-ZEzEpCti.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-DXPd_hd1.js.map → blockTypeIcons-ZEzEpCti.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +6 -1
- package/dist/cdn/chunks/ca-C0hfqt4U.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CITqEHEc.js → cloud-BP5-6__d.js} +4 -4
- package/dist/cdn/chunks/{cloud-CITqEHEc.js.map → cloud-BP5-6__d.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-DwIXvrb0.js → createCloudRuntime-CbSqoOba.js} +10 -10
- package/dist/cdn/chunks/{createCloudRuntime-DwIXvrb0.js.map → createCloudRuntime-CbSqoOba.js.map} +1 -1
- package/dist/{de-DbayqpK-.js → cdn/chunks/de-C6J2Iae8.js} +7 -0
- package/dist/cdn/chunks/de-C6J2Iae8.js.map +1 -0
- package/dist/cdn/chunks/{dist-CgR3inPR.js → dist-BW6Y49zE.js} +2 -2
- package/dist/cdn/chunks/{dist-CgR3inPR.js.map → dist-BW6Y49zE.js.map} +1 -1
- package/dist/cdn/chunks/{dist-El3fQnfk.js → dist-CAFTQ6Y2.js} +5 -5
- package/dist/cdn/chunks/{dist-El3fQnfk.js.map → dist-CAFTQ6Y2.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-D2vo-aQI.js → draggable-kbOhCgnk.js} +12 -13
- package/dist/cdn/chunks/{draggable-D2vo-aQI.js.map → draggable-kbOhCgnk.js.map} +1 -1
- package/dist/cdn/chunks/{en-l0ib5X0f.js → en-BaUYOQi8.js} +6 -1
- package/dist/cdn/chunks/en-BaUYOQi8.js.map +1 -0
- package/dist/cdn/chunks/en-mEKGL1PX.js +2 -0
- package/dist/cdn/chunks/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +6 -1
- package/dist/cdn/chunks/es-CKDYfJYn.js.map +1 -0
- package/dist/cdn/chunks/{extensions-C87Z6_23.js → extensions-CeP0iOPC.js} +7 -7
- package/dist/cdn/chunks/{extensions-C87Z6_23.js.map → extensions-CeP0iOPC.js.map} +1 -1
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js +15 -0
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js.map +1 -0
- package/dist/{fr-DNXmZWAq.js → cdn/chunks/fr-L8DR73mK.js} +7 -0
- package/dist/cdn/chunks/fr-L8DR73mK.js.map +1 -0
- package/dist/cdn/chunks/{icons-ciivb5BS.js → icons-SP5Itd-A.js} +9 -9
- package/dist/cdn/chunks/icons-SP5Itd-A.js.map +1 -0
- package/dist/cdn/chunks/keys-O8clwJ41.js +12 -0
- package/dist/cdn/chunks/keys-O8clwJ41.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js → liquid.browser-BypTT2oc.js} +4 -4
- package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js.map → liquid.browser-BypTT2oc.js.map} +1 -1
- package/dist/{nl-BylRRHYJ.js → cdn/chunks/nl-GDWeuX18.js} +7 -0
- package/dist/cdn/chunks/nl-GDWeuX18.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js → preRenderCustomBlocks-LFB-e-0m.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js.map → preRenderCustomBlocks-LFB-e-0m.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +6 -1
- package/dist/cdn/chunks/pt-BR-B1AVVhWj.js.map +1 -0
- package/dist/cdn/chunks/{src-6J-yyZoD.js → src-BM3f9I7t.js} +268 -268
- package/dist/cdn/chunks/{src-6J-yyZoD.js.map → src-BM3f9I7t.js.map} +1 -1
- package/dist/cdn/chunks/{src-Cf0ohOog.js → src-C1lP5sIe.js} +19 -19
- package/dist/cdn/chunks/src-C1lP5sIe.js.map +1 -0
- package/dist/cdn/chunks/{src-BD60gqPW.js → src-CLoCCDfs.js} +26 -26
- package/dist/cdn/chunks/{src-BD60gqPW.js.map → src-CLoCCDfs.js.map} +1 -1
- package/dist/cdn/chunks/{src-Bid3cmHa.js → src-Cxl-9O-L.js} +699 -684
- package/dist/cdn/chunks/src-Cxl-9O-L.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-Ey0FpaX7.js → tiptap-Epe8m3Vo.js} +2636 -2629
- package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js → useAliveFlag-CT9gjvO_.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js.map → useAliveFlag-CT9gjvO_.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js → useCloudI18n-ZBEJvkf4.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js.map → useCloudI18n-ZBEJvkf4.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CTNB2Mkl.js → useEditorCore-CZxGbZmY.js} +591 -413
- package/dist/cdn/chunks/useEditorCore-CZxGbZmY.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-DVV-EsNI.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-BFGRBGts.js.map → useEditorRoot-DVV-EsNI.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DIhawILp.js → useI18n-DCbvHv6W.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DIhawILp.js.map → useI18n-DCbvHv6W.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-lWo7So18.js → useMergeTag-CbuagYNK.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-lWo7So18.js.map → useMergeTag-CbuagYNK.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js → usePopoverPosition-Ozg5iU3y.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js.map → usePopoverPosition-Ozg5iU3y.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js → useScrollToBlock-CrUCYsIc.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js.map → useScrollToBlock-CrUCYsIc.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1191 -1181
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-80E6ZGin.js → check-JK8Uacq0.js} +1 -1
- package/dist/{chevron-down-BmkLsn2c.js → chevron-down-a-fb_Ijn.js} +1 -1
- package/dist/{chevron-up-DJSAzlUU.js → chevron-up-x4l0et_Y.js} +1 -1
- package/dist/{circle-alert-BsCfZryY.js → circle-alert-CJDW5LZo.js} +1 -1
- package/dist/{clock-BcLIngSK.js → clock-BW6rXk2f.js} +1 -1
- package/dist/{cloud-DwJ8ebNl.js → cloud-BMzRKCbk.js} +3 -3
- package/dist/{createCloudRuntime-CdXQdl34.js → createCloudRuntime-j6a9Z-vL.js} +8 -8
- package/dist/{createLucideIcon-eeetEgBb.js → createLucideIcon-Bvw1Zx56.js} +3 -3
- package/dist/{cdn/chunks/de-DbayqpK-.js → de-C6J2Iae8.js} +5 -2
- package/dist/{dist-BFcAowKZ.js → dist-BxFbxpgW.js} +5 -5
- package/dist/{dist-Do83S47T.js → dist-ByT5fgKq.js} +2 -2
- package/dist/{dist-CQ9T1yi-.js → dist-C1tsW_99.js} +2 -2
- package/dist/{dist-Cd0LvUlh.js → dist-CtF9STPS.js} +2 -2
- package/dist/{dist-CvW1nNzy.js → dist-CtMXAH7a.js} +2 -2
- package/dist/dist-D08oVYhr.js +5 -0
- package/dist/{dist-prgdllHG.js → dist-D7WY8VPq.js} +2 -2
- package/dist/{dist-D8MekYFl.js → dist-DC-3T0ED.js} +2 -2
- package/dist/{dist-BC1y_U2m.js → dist-DL9334yz.js} +1418 -1411
- package/dist/{dist-BkAVGSRr.js → dist-DkcA6epL.js} +7 -7
- package/dist/dist-DzdeVn-W.js +5 -0
- package/dist/{dist-CzVIVbSa.js → dist-PL6vP4SC.js} +61 -61
- package/dist/{dist-CuuPnIMy.js → dist-dNiknO7j.js} +4 -4
- package/dist/{dist-CWC5t5J3.js → dist-f7HXo6j6.js} +2 -2
- package/dist/{dist-BUpBA58N.js → dist-heatwAdo.js} +1 -1
- package/dist/{en-l0ib5X0f.js → en-BaUYOQi8.js} +5 -0
- package/dist/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +5 -0
- package/dist/{extensions-BYImwYeO.js → extensions-5xeZR9U9.js} +21 -21
- package/dist/formatAbsoluteDateTime-DMmop3C-.js +13 -0
- package/dist/{cdn/chunks/fr-DNXmZWAq.js → fr-L8DR73mK.js} +5 -2
- package/dist/{image-up-BfxY85ar.js → image-up-CuzFc1mu.js} +1 -1
- package/dist/index.d.ts +41 -0
- package/dist/{info-LX4QFBr6.js → info-DybAwcA3.js} +1 -1
- package/dist/keys-BJJ4hJ4z.js +10 -0
- package/dist/{liquid.browser-CJgDDvQz.js → liquid.browser-wPG0n4Cs.js} +3 -3
- package/dist/{loader-circle-Bwima0v8.js → loader-circle-t-SVgmJ3.js} +1 -1
- package/dist/{message-circle-Box-mf2k.js → message-circle-DtwKrlhN.js} +1 -1
- package/dist/{cdn/chunks/nl-BylRRHYJ.js → nl-GDWeuX18.js} +5 -2
- package/dist/{pencil-BM9gSq_J.js → pencil-2qhC-Y4q.js} +1 -1
- package/dist/{preRenderCustomBlocks-2KyBJocY.js → preRenderCustomBlocks-CSIF-HyJ.js} +1 -1
- package/dist/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +5 -0
- package/dist/{refresh-cw-BuzFX0wH.js → refresh-cw-C8SBuPdg.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-Co_SPqAz.js → runtime-dom.esm-bundler-BuG03jBM.js} +3 -3
- package/dist/{scan-line-Duq1WXoG.js → scan-line-E7w4yQyv.js} +1 -1
- package/dist/{send-DZ4nOnIA.js → send-BoqJliF6.js} +1 -1
- package/dist/{shield-check-Cz4BRYdv.js → shield-check-D0dMaHtE.js} +1 -1
- package/dist/{sparkles-DP8RqOeL.js → sparkles-Dy2BJjiX.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1031 -1022
- package/dist/{text-align-start-D7tXhjUP.js → text-align-start-DrxjxvIy.js} +1 -1
- package/dist/{trash-2-BS7lZeyb.js → trash-rYMzzHZd.js} +2 -2
- package/dist/{triangle-alert-Cx4mQGjx.js → triangle-alert-DxnFj4-B.js} +1 -1
- package/dist/{upload-L8tLVM10.js → upload-DZu1adQz.js} +1 -1
- package/dist/{useAliveFlag-AFbwfHlJ.js → useAliveFlag-PVmp95MT.js} +1 -1
- package/dist/{useCloudI18n-BA69BpQ_.js → useCloudI18n-DaKcDMDz.js} +2 -2
- package/dist/{useEditorCore-CtR46sbJ.js → useEditorCore-BWrxHVKW.js} +1246 -1067
- package/dist/{useEditorRoot-Cdo8Vhxa.js → useEditorRoot-E-oxHaEI.js} +2 -2
- package/dist/{useI18n-B135ASaG.js → useI18n-DUVIAju4.js} +2 -2
- package/dist/{useMergeTag-Cx36rtrt.js → useMergeTag-CuZZeiSE.js} +3 -3
- package/dist/{usePopoverPosition-DAOHr_iM.js → usePopoverPosition-APlWgXoQ.js} +2 -2
- package/dist/{useScrollToBlock-tndC8vKo.js → useScrollToBlock--AzCOzlg.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-BhOUdXMi.js → vue.runtime.esm-bundler-D9JUcKrV.js} +4 -4
- package/dist/{x-ChIQ7HwK.js → x-DJOd1hS4.js} +1 -1
- package/package.json +23 -23
- package/dist/SavedBlocksBrowserModal-SST-7EMK.js +0 -323
- package/dist/VersionHistoryMenu-DBxSJR1k.js +0 -155
- package/dist/cdn/chunks/BlockPreviewCanvas-DNBjBKBI.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BRdN56r7.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-CMqZFUHE.js +0 -148
- package/dist/cdn/chunks/VersionHistoryMenu-CMqZFUHE.js.map +0 -1
- package/dist/cdn/chunks/ca-DZSrLNXK.js.map +0 -1
- package/dist/cdn/chunks/de-DbayqpK-.js.map +0 -1
- package/dist/cdn/chunks/en-BzFt4b80.js +0 -2
- package/dist/cdn/chunks/en-l0ib5X0f.js.map +0 -1
- package/dist/cdn/chunks/es-CMQ-5PJP.js.map +0 -1
- package/dist/cdn/chunks/fr-DNXmZWAq.js.map +0 -1
- package/dist/cdn/chunks/icons-ciivb5BS.js.map +0 -1
- package/dist/cdn/chunks/keys-BJ770Mwm.js +0 -12
- package/dist/cdn/chunks/keys-BJ770Mwm.js.map +0 -1
- package/dist/cdn/chunks/nl-BylRRHYJ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BVoJhpie.js.map +0 -1
- package/dist/cdn/chunks/src-Bid3cmHa.js.map +0 -1
- package/dist/cdn/chunks/src-Cf0ohOog.js.map +0 -1
- package/dist/cdn/chunks/tiptap-Ey0FpaX7.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CTNB2Mkl.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BFGRBGts.js +0 -10
- package/dist/dist-BQqIUwvB.js +0 -5
- package/dist/dist-waDcdb1l.js +0 -5
- package/dist/keys-BJtoezGU.js +0 -10
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as
|
|
2
|
-
import { c as
|
|
3
|
-
import { B as oe, C as se, D as ce, E as le, F as ue, H as de, I as fe, L as pe, M as me, N as he, O as ge, P as _e, R as ve, S as ye, T as be,
|
|
4
|
-
import { f as Ke, g as qe, h as Je, m as Ye } from "./dist-
|
|
5
|
-
import { a as Xe, i as Ze, n as Qe, r as $e } from "./dist-
|
|
6
|
-
import { A as et, B as tt, C as nt, D as rt, E as it, F as at,
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t 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 "./useCloudI18n-
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
1
|
+
import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as j, q as M, r as N, rt as P, s as F, tt as ee, u as I, v as L, y as te, z as ne } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { c as R, o as re, s as ie } from "./runtime-dom.esm-bundler-BuG03jBM.js";
|
|
3
|
+
import { A as ae, B as oe, C as se, D as ce, E as le, F as ue, H as de, I as fe, L as pe, M as me, N as he, O as ge, P as _e, R as ve, S as ye, T as be, U as xe, V as Se, _ as Ce, a as we, b as Te, d as Ee, f as De, g as Oe, h as ke, i as Ae, k as je, l as Me, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, s as Re, t as ze, u as Be, v as Ve, w as He, x as Ue, y as We, z as Ge } from "./dist-PL6vP4SC.js";
|
|
4
|
+
import { f as Ke, g as qe, h as Je, m as Ye } from "./dist-heatwAdo.js";
|
|
5
|
+
import { a as Xe, i as Ze, n as Qe, r as $e } from "./dist-dNiknO7j.js";
|
|
6
|
+
import { A as et, B as tt, C as nt, D as rt, E as it, F as at, G as ot, H as st, I as ct, K as lt, M as ut, N as dt, O as ft, P as pt, S as mt, T as ht, U as gt, V as _t, W as vt, _ as yt, a as bt, b as xt, c as St, d as Ct, f as wt, g as Tt, h as Et, j as Dt, k as Ot, m as kt, n as At, o as jt, p as Mt, r as Nt, s as Pt, u as Ft, v as It, w as Lt, x as Rt, y as zt, z as Bt } from "./keys-BJJ4hJ4z.js";
|
|
7
|
+
import { t as Vt } from "./useI18n-DUVIAju4.js";
|
|
8
|
+
import { t as Ht } from "./logger-BBlvSn6q.js";
|
|
9
|
+
import { a as Ut, i as Wt, o as Gt, r as Kt, t as qt } from "./usePopoverPosition-APlWgXoQ.js";
|
|
10
|
+
import { t as Jt } from "./createLucideIcon-Bvw1Zx56.js";
|
|
11
|
+
import { t as Yt } from "./loader-circle-t-SVgmJ3.js";
|
|
12
|
+
import { t as Xt } from "./message-circle-DtwKrlhN.js";
|
|
13
|
+
import { t as Zt } from "./trash-rYMzzHZd.js";
|
|
14
|
+
import { t as Qt } from "./triangle-alert-DxnFj4-B.js";
|
|
15
|
+
import { t as $t } from "./upload-DZu1adQz.js";
|
|
16
|
+
import { t as en } from "./LoadingTrack-SQXoZVf2.js";
|
|
17
|
+
import { t as tn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
18
|
+
import { t as nn } from "./useEditorRoot-E-oxHaEI.js";
|
|
19
|
+
import "./useCloudI18n-DaKcDMDz.js";
|
|
20
|
+
import { t as rn } from "./useMergeTag-CuZZeiSE.js";
|
|
21
|
+
import { t as an } from "./useAliveFlag-PVmp95MT.js";
|
|
22
22
|
//#region ../core/dist/index.js
|
|
23
|
-
function
|
|
23
|
+
function on(e) {
|
|
24
24
|
return e instanceof Error ? e : Error(String(e), { cause: e });
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function sn(e, t) {
|
|
27
27
|
try {
|
|
28
28
|
t();
|
|
29
29
|
} catch (t) {
|
|
30
|
-
e?.(
|
|
30
|
+
e?.(on(t));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function cn(e) {
|
|
34
34
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function ln(e) {
|
|
37
37
|
let t = o({
|
|
38
38
|
template: null,
|
|
39
39
|
content: e.content ?? Ne(e.defaultFontFamily, e.templateDefaults),
|
|
@@ -131,7 +131,7 @@ function sn(e) {
|
|
|
131
131
|
if (u(n)) return;
|
|
132
132
|
let r = s(t.content.blocks, n);
|
|
133
133
|
if (r && r.type === "section") {
|
|
134
|
-
if (i < 0 || i >=
|
|
134
|
+
if (i < 0 || i >= cn(r.columns)) return;
|
|
135
135
|
r.children[i] = r.children[i] || [];
|
|
136
136
|
let t = r.children[i];
|
|
137
137
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -164,7 +164,7 @@ function sn(e) {
|
|
|
164
164
|
let d;
|
|
165
165
|
if (i) {
|
|
166
166
|
let e = s(t.content.blocks, i);
|
|
167
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
167
|
+
if (!e || e.type !== "section" || a < 0 || a >= cn(e.columns)) return;
|
|
168
168
|
e.children[a] = e.children[a] || [], d = e.children[a];
|
|
169
169
|
} else d = t.content.blocks;
|
|
170
170
|
let [f] = o.blocks.splice(c, 1);
|
|
@@ -177,7 +177,7 @@ function sn(e) {
|
|
|
177
177
|
throw new Re(`[Templatical] Templates: ${e} ${t}`);
|
|
178
178
|
}
|
|
179
179
|
function D(t) {
|
|
180
|
-
|
|
180
|
+
sn(e.onError, t);
|
|
181
181
|
}
|
|
182
182
|
function O(t) {
|
|
183
183
|
let { templates: n } = e;
|
|
@@ -208,7 +208,7 @@ function sn(e) {
|
|
|
208
208
|
}
|
|
209
209
|
return D(() => i.onCreated?.(o)), o;
|
|
210
210
|
}
|
|
211
|
-
async function
|
|
211
|
+
async function j(n) {
|
|
212
212
|
let r = O("load()"), i;
|
|
213
213
|
t.isLoading = !0;
|
|
214
214
|
try {
|
|
@@ -220,7 +220,7 @@ function sn(e) {
|
|
|
220
220
|
}
|
|
221
221
|
return D(() => r.onLoaded?.(i)), i;
|
|
222
222
|
}
|
|
223
|
-
async function
|
|
223
|
+
async function M(r = "api") {
|
|
224
224
|
let i = O("save()"), { save: a } = i;
|
|
225
225
|
typeof a != "function" && E("save()", "is disabled by the provider — its `save` is `false`.");
|
|
226
226
|
let o = t.template;
|
|
@@ -247,7 +247,7 @@ function sn(e) {
|
|
|
247
247
|
}
|
|
248
248
|
return D(() => i.onSaved?.(c, { trigger: r })), c;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function N() {
|
|
251
251
|
return t.template?.id !== void 0;
|
|
252
252
|
}
|
|
253
253
|
return {
|
|
@@ -270,16 +270,16 @@ function sn(e) {
|
|
|
270
270
|
findBlockLocation: d,
|
|
271
271
|
setName: k,
|
|
272
272
|
create: A,
|
|
273
|
-
load:
|
|
274
|
-
save:
|
|
275
|
-
hasTemplate:
|
|
273
|
+
load: j,
|
|
274
|
+
save: M,
|
|
275
|
+
hasTemplate: N
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
278
|
+
var un = 50, dn = 300, fn = 1500;
|
|
279
|
+
function pn(e) {
|
|
280
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = un } = e, a = _([]), o = _([]), s = _(!1), c = null, l = null, u = g(() => a.value.length > 0), d = g(() => o.value.length > 0);
|
|
281
281
|
function f() {
|
|
282
|
-
return
|
|
282
|
+
return Se(t.value);
|
|
283
283
|
}
|
|
284
284
|
function p(e) {
|
|
285
285
|
a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
|
|
@@ -295,21 +295,21 @@ function dn(e) {
|
|
|
295
295
|
if (l && l.blockId === e) {
|
|
296
296
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
297
297
|
l = null;
|
|
298
|
-
},
|
|
298
|
+
}, dn);
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
m(), p(f()), o.value = [], l = {
|
|
302
302
|
blockId: e,
|
|
303
303
|
timeoutId: setTimeout(() => {
|
|
304
304
|
l = null;
|
|
305
|
-
},
|
|
305
|
+
}, dn)
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
function y() {
|
|
310
310
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
311
311
|
s.value = !1, c = null;
|
|
312
|
-
},
|
|
312
|
+
}, fn);
|
|
313
313
|
}
|
|
314
314
|
function b() {
|
|
315
315
|
if (a.value.length === 0) return;
|
|
@@ -341,33 +341,33 @@ function dn(e) {
|
|
|
341
341
|
destroy: C
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function mn(e) {
|
|
345
345
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
346
346
|
...e,
|
|
347
|
-
id:
|
|
347
|
+
id: ce(),
|
|
348
348
|
cells: e.cells.map((e) => ({
|
|
349
349
|
...e,
|
|
350
|
-
id:
|
|
350
|
+
id: ce()
|
|
351
351
|
}))
|
|
352
352
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
353
353
|
...e,
|
|
354
|
-
id:
|
|
354
|
+
id: ce()
|
|
355
355
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
356
356
|
...e,
|
|
357
|
-
id:
|
|
357
|
+
id: ce()
|
|
358
358
|
})));
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function hn(e) {
|
|
361
361
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
362
362
|
function o(n, r, a) {
|
|
363
|
-
let o = Be(n,
|
|
364
|
-
return t(
|
|
363
|
+
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = Be(n, o);
|
|
364
|
+
return t(s, r, a), i(s.id), s;
|
|
365
365
|
}
|
|
366
366
|
function s(e, n, r) {
|
|
367
367
|
let o = JSON.parse(JSON.stringify(e));
|
|
368
|
-
if (o.id =
|
|
368
|
+
if (o.id = ce(), mn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
369
369
|
let t = JSON.parse(JSON.stringify(e));
|
|
370
|
-
return t.id =
|
|
370
|
+
return t.id = ce(), mn(t), t;
|
|
371
371
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
372
372
|
else {
|
|
373
373
|
let i = a?.(e.id) ?? null;
|
|
@@ -388,9 +388,9 @@ function pn(e) {
|
|
|
388
388
|
updateBlockProperty: l
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
var
|
|
392
|
-
function
|
|
393
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
391
|
+
var gn = 2e3;
|
|
392
|
+
function _n(e) {
|
|
393
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = gn, enabled: a = !0 } = e, o = null, s = !1;
|
|
394
394
|
function c() {
|
|
395
395
|
return typeof a == "function" ? a() : a;
|
|
396
396
|
}
|
|
@@ -407,7 +407,7 @@ function hn(e) {
|
|
|
407
407
|
d(), n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
408
408
|
}
|
|
409
409
|
function p() {
|
|
410
|
-
|
|
410
|
+
c() && !s && (d(), o = setTimeout(() => {
|
|
411
411
|
o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
412
412
|
}, i));
|
|
413
413
|
}
|
|
@@ -425,7 +425,7 @@ function hn(e) {
|
|
|
425
425
|
destroy: h
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function vn(e) {
|
|
429
429
|
let t = o(/* @__PURE__ */ new Set()), n = g(() => t.size > 0);
|
|
430
430
|
function r(e) {
|
|
431
431
|
return t.has(e);
|
|
@@ -443,7 +443,7 @@ function gn(e) {
|
|
|
443
443
|
hasHiddenBlocks: n
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function yn(e) {
|
|
447
447
|
let t = _(!1), n = _(!1), r = g(() => !!e.definition.value?.dataSource), i = g(() => r.value && !e.block.value.dataSourceFetched);
|
|
448
448
|
async function a() {
|
|
449
449
|
let r = e.definition.value;
|
|
@@ -473,7 +473,7 @@ function _n(e) {
|
|
|
473
473
|
needsFetch: i
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function bn(e, t) {
|
|
477
477
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
478
478
|
e.addBlock = (r, i, a, o) => {
|
|
479
479
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -487,15 +487,15 @@ function vn(e, t) {
|
|
|
487
487
|
t.record(), o(e);
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
let { provider: t } = e, n = _([]), r = _(!1), i =
|
|
490
|
+
function xn(e) {
|
|
491
|
+
let { provider: t } = e, n = _([]), r = _(!1), i = F(() => {
|
|
492
492
|
let e = /* @__PURE__ */ new Set();
|
|
493
493
|
for (let t of n.value) {
|
|
494
494
|
let n = t.category?.trim();
|
|
495
495
|
n && e.add(n);
|
|
496
496
|
}
|
|
497
497
|
return [...e].sort((e, t) => e.localeCompare(t));
|
|
498
|
-
}), a =
|
|
498
|
+
}), a = F(() => typeof t.create == "function"), o = F(() => typeof t.update == "function"), s = F(() => typeof t.delete == "function");
|
|
499
499
|
function c(e) {
|
|
500
500
|
return o.value && e.canUpdate !== !1;
|
|
501
501
|
}
|
|
@@ -506,7 +506,7 @@ function yn(e) {
|
|
|
506
506
|
throw new Re(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
507
507
|
}
|
|
508
508
|
function d(t) {
|
|
509
|
-
|
|
509
|
+
sn(e.onError, t);
|
|
510
510
|
}
|
|
511
511
|
async function f(i) {
|
|
512
512
|
r.value = !0;
|
|
@@ -573,9 +573,9 @@ function yn(e) {
|
|
|
573
573
|
remove: h
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
function
|
|
578
|
-
let t = e.key ??
|
|
576
|
+
var Sn = "templatical:saved-blocks";
|
|
577
|
+
function Cn(e = {}) {
|
|
578
|
+
let t = e.key ?? Sn;
|
|
579
579
|
function n() {
|
|
580
580
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
581
581
|
return localStorage;
|
|
@@ -600,7 +600,7 @@ function xn(e = {}) {
|
|
|
600
600
|
},
|
|
601
601
|
async create(e) {
|
|
602
602
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
603
|
-
id:
|
|
603
|
+
id: ce(),
|
|
604
604
|
name: e.name,
|
|
605
605
|
content: e.content,
|
|
606
606
|
...e.category ? { category: e.category } : {},
|
|
@@ -626,8 +626,8 @@ function xn(e = {}) {
|
|
|
626
626
|
}
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c =
|
|
629
|
+
function wn(e) {
|
|
630
|
+
let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c = F(() => typeof t.create == "function"), l = F(() => typeof t.restore == "function");
|
|
631
631
|
function u(e) {
|
|
632
632
|
let t = n();
|
|
633
633
|
if (!t) throw new Re(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
|
|
@@ -637,7 +637,7 @@ function Sn(e) {
|
|
|
637
637
|
throw new Re(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
638
638
|
}
|
|
639
639
|
function f(t) {
|
|
640
|
-
|
|
640
|
+
sn(e.onError, t);
|
|
641
641
|
}
|
|
642
642
|
async function p(n) {
|
|
643
643
|
let o = u("list");
|
|
@@ -704,8 +704,8 @@ function Sn(e) {
|
|
|
704
704
|
restore: v
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s =
|
|
707
|
+
function Tn(e) {
|
|
708
|
+
let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s = F(() => typeof t.create == "function"), c = F(() => typeof t.update == "function"), l = F(() => typeof t.delete == "function"), u = F(() => typeof t.setResolved == "function"), d = F(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), f = F(() => i.value.filter((e) => !e.resolvedAt).length), p = F(() => {
|
|
709
709
|
let e = /* @__PURE__ */ new Map();
|
|
710
710
|
for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
711
711
|
return e;
|
|
@@ -735,11 +735,11 @@ function Cn(e) {
|
|
|
735
735
|
return t !== null && e.author.id === t.id;
|
|
736
736
|
}
|
|
737
737
|
function b(t) {
|
|
738
|
-
let n =
|
|
738
|
+
let n = on(t);
|
|
739
739
|
throw e.onError?.(n), n;
|
|
740
740
|
}
|
|
741
741
|
function x(t) {
|
|
742
|
-
|
|
742
|
+
sn(e.onError, t);
|
|
743
743
|
}
|
|
744
744
|
function S(e, t, n) {
|
|
745
745
|
return [
|
|
@@ -846,13 +846,13 @@ function Cn(e) {
|
|
|
846
846
|
o.value = !1;
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function j(e) {
|
|
850
850
|
w(e) && x(() => t.onCreated?.(e, { origin: "remote" }));
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function M(e) {
|
|
853
853
|
w(e) && x(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function N(e, n) {
|
|
856
856
|
let r = T(e, n);
|
|
857
857
|
r && x(() => t.onDeleted?.(r, { origin: "remote" }));
|
|
858
858
|
}
|
|
@@ -874,12 +874,12 @@ function Cn(e) {
|
|
|
874
874
|
setResolved: A,
|
|
875
875
|
find: v,
|
|
876
876
|
isOwn: y,
|
|
877
|
-
applyRemoteCreate:
|
|
878
|
-
applyRemoteUpdate:
|
|
879
|
-
applyRemoteDelete:
|
|
877
|
+
applyRemoteCreate: j,
|
|
878
|
+
applyRemoteUpdate: M,
|
|
879
|
+
applyRemoteDelete: N
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function En(e) {
|
|
883
883
|
let { comments: t, provider: n, getTemplateId: r } = e, { subscribe: i } = n;
|
|
884
884
|
if (typeof i != "function") return;
|
|
885
885
|
let a = null;
|
|
@@ -898,31 +898,31 @@ function wn(e) {
|
|
|
898
898
|
case "deleted": t.applyRemoteDelete(e.commentId, e.parentId);
|
|
899
899
|
}
|
|
900
900
|
}));
|
|
901
|
-
}, { immediate: !0 }),
|
|
901
|
+
}, { immediate: !0 }), M(o);
|
|
902
902
|
}
|
|
903
903
|
//#endregion
|
|
904
904
|
//#region src/utils/activeEditorTracker.ts
|
|
905
|
-
var
|
|
906
|
-
function
|
|
907
|
-
let e = ++
|
|
908
|
-
return
|
|
905
|
+
var Dn = /* @__PURE__ */ new Set(), On = 0, kn = 0;
|
|
906
|
+
function An() {
|
|
907
|
+
let e = ++kn;
|
|
908
|
+
return Dn.add(e), On === 0 && (On = e), {
|
|
909
909
|
id: e,
|
|
910
|
-
isActive: () =>
|
|
910
|
+
isActive: () => Dn.size <= 1 || On === e,
|
|
911
911
|
claim: () => {
|
|
912
|
-
|
|
912
|
+
On = e;
|
|
913
913
|
},
|
|
914
914
|
dispose: () => {
|
|
915
|
-
if (
|
|
916
|
-
let e = Array.from(
|
|
917
|
-
|
|
915
|
+
if (Dn.delete(e), On === e) {
|
|
916
|
+
let e = Array.from(Dn);
|
|
917
|
+
On = e[e.length - 1] ?? 0;
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
};
|
|
921
921
|
}
|
|
922
922
|
//#endregion
|
|
923
923
|
//#region src/composables/usePreviewResolution.ts
|
|
924
|
-
var
|
|
925
|
-
function
|
|
924
|
+
var jn = 500;
|
|
925
|
+
function Mn(e) {
|
|
926
926
|
let t = typeof e.resolvePreview == "function", n = _(null), r = _(!1), i = _(!1), a = 0, o = null;
|
|
927
927
|
function c() {
|
|
928
928
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -933,13 +933,13 @@ function An(e) {
|
|
|
933
933
|
let o = ++a;
|
|
934
934
|
r.value = !0;
|
|
935
935
|
let s = {
|
|
936
|
-
content:
|
|
936
|
+
content: Se(e.getContent()),
|
|
937
937
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
938
938
|
};
|
|
939
939
|
try {
|
|
940
940
|
let e = await t(s);
|
|
941
941
|
if (o !== a) return;
|
|
942
|
-
if (!
|
|
942
|
+
if (!pe(e)) {
|
|
943
943
|
i.value = !0;
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
@@ -959,7 +959,7 @@ function An(e) {
|
|
|
959
959
|
}
|
|
960
960
|
o = setTimeout(() => {
|
|
961
961
|
o = null, l();
|
|
962
|
-
},
|
|
962
|
+
}, jn);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
return s(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -968,20 +968,20 @@ function An(e) {
|
|
|
968
968
|
return;
|
|
969
969
|
}
|
|
970
970
|
u();
|
|
971
|
-
}, { immediate: !0 }),
|
|
971
|
+
}, { immediate: !0 }), M(() => {
|
|
972
972
|
c(), a++;
|
|
973
973
|
}), {
|
|
974
974
|
isConfigured: t,
|
|
975
|
-
content:
|
|
975
|
+
content: F(() => n.value ?? e.getContent()),
|
|
976
976
|
isResolving: r,
|
|
977
|
-
isInitialResolve:
|
|
977
|
+
isInitialResolve: F(() => r.value && n.value === null),
|
|
978
978
|
hasFailed: i,
|
|
979
|
-
supersedesSamples:
|
|
979
|
+
supersedesSamples: F(() => t)
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
982
|
//#endregion
|
|
983
983
|
//#region src/composables/useImageUrlResolver.ts
|
|
984
|
-
function
|
|
984
|
+
function Nn(e) {
|
|
985
985
|
let t = o(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
986
986
|
function r(e) {
|
|
987
987
|
return t.get(e);
|
|
@@ -1014,19 +1014,19 @@ function jn(e) {
|
|
|
1014
1014
|
lookup: a
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let t = p(
|
|
1017
|
+
function Pn(e) {
|
|
1018
|
+
let t = p(xt, null), n = F(e);
|
|
1019
1019
|
if (!t) return n;
|
|
1020
1020
|
let r;
|
|
1021
1021
|
function i() {
|
|
1022
1022
|
r !== void 0 && (clearTimeout(r), r = void 0);
|
|
1023
1023
|
}
|
|
1024
|
-
h() &&
|
|
1024
|
+
h() && M(i);
|
|
1025
1025
|
let a = !0;
|
|
1026
1026
|
return s(n, (e) => {
|
|
1027
1027
|
i();
|
|
1028
1028
|
let n = a;
|
|
1029
|
-
if (a = !1,
|
|
1029
|
+
if (a = !1, e && !t.has(e)) {
|
|
1030
1030
|
if (n) {
|
|
1031
1031
|
t.lookup(e);
|
|
1032
1032
|
return;
|
|
@@ -1035,7 +1035,7 @@ function Mn(e) {
|
|
|
1035
1035
|
r = void 0, t.lookup(e);
|
|
1036
1036
|
}, 300);
|
|
1037
1037
|
}
|
|
1038
|
-
}, { immediate: !0 }),
|
|
1038
|
+
}, { immediate: !0 }), F(() => {
|
|
1039
1039
|
let e = n.value;
|
|
1040
1040
|
if (!e) return e;
|
|
1041
1041
|
let r = t.get(e);
|
|
@@ -1044,7 +1044,7 @@ function Mn(e) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
//#endregion
|
|
1046
1046
|
//#region src/composables/useMergeTagPicker.ts
|
|
1047
|
-
function
|
|
1047
|
+
function Fn() {
|
|
1048
1048
|
let e = _(!1), t = _([]), n = null;
|
|
1049
1049
|
function r(r) {
|
|
1050
1050
|
if (n) {
|
|
@@ -1059,7 +1059,7 @@ function Nn() {
|
|
|
1059
1059
|
let i = n;
|
|
1060
1060
|
n = null, e.value = !1, t.value = [], i && i(r);
|
|
1061
1061
|
}
|
|
1062
|
-
return h() &&
|
|
1062
|
+
return h() && M(() => {
|
|
1063
1063
|
if (n) {
|
|
1064
1064
|
let e = n;
|
|
1065
1065
|
n = null, e(null);
|
|
@@ -1074,7 +1074,7 @@ function Nn() {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region src/composables/useLogicTagPicker.ts
|
|
1077
|
-
function
|
|
1077
|
+
function In() {
|
|
1078
1078
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
1079
1079
|
function i(i, a) {
|
|
1080
1080
|
if (r) {
|
|
@@ -1089,7 +1089,7 @@ function Pn() {
|
|
|
1089
1089
|
let a = r;
|
|
1090
1090
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
1091
1091
|
}
|
|
1092
|
-
return h() &&
|
|
1092
|
+
return h() && M(() => {
|
|
1093
1093
|
if (r) {
|
|
1094
1094
|
let e = r;
|
|
1095
1095
|
r = null, e(null);
|
|
@@ -1105,11 +1105,11 @@ function Pn() {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
//#endregion
|
|
1107
1107
|
//#region src/composables/useTemplateLint.ts
|
|
1108
|
-
function
|
|
1108
|
+
function Ln(e) {
|
|
1109
1109
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1112
|
-
let t = _([]), n = _(!1), r = _(!1), i = f(null), a =
|
|
1111
|
+
function Rn(e) {
|
|
1112
|
+
let t = _([]), n = _(!1), r = _(!1), i = f(null), a = Ln(e.options), o = null, c = !1;
|
|
1113
1113
|
a || l();
|
|
1114
1114
|
async function l() {
|
|
1115
1115
|
try {
|
|
@@ -1150,17 +1150,17 @@ function In(e) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
//#endregion
|
|
1152
1152
|
//#region src/utils/blockTypeLabels.ts
|
|
1153
|
-
function
|
|
1153
|
+
function zn(e, t) {
|
|
1154
1154
|
return t.blocks[e] ?? e;
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1157
|
-
if (e.type !== "custom") return
|
|
1156
|
+
function Bn(e, t, n = []) {
|
|
1157
|
+
if (e.type !== "custom") return zn(e.type, t);
|
|
1158
1158
|
let { customType: r } = e;
|
|
1159
1159
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
1160
1160
|
}
|
|
1161
1161
|
//#endregion
|
|
1162
1162
|
//#region src/composables/useKeyboardReorder.ts
|
|
1163
|
-
function
|
|
1163
|
+
function Vn(e, t, n = []) {
|
|
1164
1164
|
let r = _(null), i = _(""), a = null;
|
|
1165
1165
|
function o(t) {
|
|
1166
1166
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1187,7 +1187,7 @@ function zn(e, t, n = []) {
|
|
|
1187
1187
|
let i = o(r);
|
|
1188
1188
|
if (!i) return "";
|
|
1189
1189
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
1190
|
-
return a ?
|
|
1190
|
+
return a ? Bn(a, t.t, n) : "";
|
|
1191
1191
|
}
|
|
1192
1192
|
function c(t, n) {
|
|
1193
1193
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1256,13 +1256,13 @@ function zn(e, t, n = []) {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
//#endregion
|
|
1258
1258
|
//#region src/composables/useUiTheme.ts
|
|
1259
|
-
function
|
|
1259
|
+
function Hn(e) {
|
|
1260
1260
|
let t = Xe("(prefers-color-scheme: dark)");
|
|
1261
|
-
return { resolvedTheme:
|
|
1261
|
+
return { resolvedTheme: F(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1262
1262
|
}
|
|
1263
1263
|
//#endregion
|
|
1264
1264
|
//#region src/composables/useThemeStyles.ts
|
|
1265
|
-
var
|
|
1265
|
+
var Un = {
|
|
1266
1266
|
bg: "--tpl-bg",
|
|
1267
1267
|
bgElevated: "--tpl-bg-elevated",
|
|
1268
1268
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1286,10 +1286,10 @@ var Vn = {
|
|
|
1286
1286
|
dangerLight: "--tpl-danger-light",
|
|
1287
1287
|
canvasBg: "--tpl-canvas-bg"
|
|
1288
1288
|
};
|
|
1289
|
-
function
|
|
1290
|
-
return { themeStyles:
|
|
1289
|
+
function Wn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1290
|
+
return { themeStyles: F(() => {
|
|
1291
1291
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1292
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1292
|
+
if (a) for (let [e, t] of Object.entries(Un)) {
|
|
1293
1293
|
let n = a[e];
|
|
1294
1294
|
n && (r[t] = n);
|
|
1295
1295
|
}
|
|
@@ -1298,10 +1298,10 @@ function Hn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
//#endregion
|
|
1300
1300
|
//#region src/composables/useBlockRegistry.ts
|
|
1301
|
-
function
|
|
1301
|
+
function Gn() {
|
|
1302
1302
|
let e = f(/* @__PURE__ */ new Map());
|
|
1303
1303
|
function t(t, n) {
|
|
1304
|
-
e.value.set(t, n),
|
|
1304
|
+
e.value.set(t, n), j(e);
|
|
1305
1305
|
}
|
|
1306
1306
|
function n(t, n) {
|
|
1307
1307
|
let r = `custom:${t.type}`, i = {
|
|
@@ -1309,7 +1309,7 @@ function Un() {
|
|
|
1309
1309
|
createBlock: () => Ie(t),
|
|
1310
1310
|
definition: t
|
|
1311
1311
|
};
|
|
1312
|
-
e.value.set(r, i),
|
|
1312
|
+
e.value.set(r, i), j(e);
|
|
1313
1313
|
}
|
|
1314
1314
|
function r(t) {
|
|
1315
1315
|
if (t.type === "custom") {
|
|
@@ -1332,13 +1332,13 @@ function Un() {
|
|
|
1332
1332
|
let t = a(e.customType);
|
|
1333
1333
|
if (!t) return o("Block definition not found");
|
|
1334
1334
|
try {
|
|
1335
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
1335
|
+
let { Liquid: n } = await import("./liquid.browser-wPG0n4Cs.js");
|
|
1336
1336
|
return await new n({
|
|
1337
1337
|
strictVariables: !1,
|
|
1338
1338
|
strictFilters: !1
|
|
1339
1339
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1340
1340
|
} catch (t) {
|
|
1341
|
-
return
|
|
1341
|
+
return Ht.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
function c(t) {
|
|
@@ -1356,9 +1356,9 @@ function Un() {
|
|
|
1356
1356
|
}
|
|
1357
1357
|
//#endregion
|
|
1358
1358
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1359
|
-
function
|
|
1360
|
-
return
|
|
1361
|
-
let n =
|
|
1359
|
+
function Kn(e, t) {
|
|
1360
|
+
return F(() => {
|
|
1361
|
+
let n = qn(e.value.blocks);
|
|
1362
1362
|
if (n.size === 0) return [];
|
|
1363
1363
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1364
1364
|
for (let e of n) {
|
|
@@ -1370,29 +1370,29 @@ function Wn(e, t) {
|
|
|
1370
1370
|
return i;
|
|
1371
1371
|
});
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function qn(e) {
|
|
1374
1374
|
let t = /* @__PURE__ */ new Set();
|
|
1375
|
-
return
|
|
1375
|
+
return Jn(e, t), t;
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function Jn(e, t) {
|
|
1378
1378
|
for (let n of e) {
|
|
1379
|
-
if (
|
|
1379
|
+
if (_e(n)) {
|
|
1380
1380
|
t.add(n.customType);
|
|
1381
1381
|
continue;
|
|
1382
1382
|
}
|
|
1383
1383
|
if (n.type === "section") {
|
|
1384
1384
|
let e = n.children;
|
|
1385
1385
|
if (!e) continue;
|
|
1386
|
-
for (let n of e)
|
|
1386
|
+
for (let n of e) Jn(n, t);
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
//#endregion
|
|
1391
1391
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1392
|
-
var
|
|
1392
|
+
var Yn = [
|
|
1393
1393
|
{
|
|
1394
1394
|
type: "section",
|
|
1395
|
-
createBlock:
|
|
1395
|
+
createBlock: Te
|
|
1396
1396
|
},
|
|
1397
1397
|
{
|
|
1398
1398
|
type: "title",
|
|
@@ -1404,15 +1404,15 @@ var qn = [
|
|
|
1404
1404
|
},
|
|
1405
1405
|
{
|
|
1406
1406
|
type: "image",
|
|
1407
|
-
createBlock:
|
|
1407
|
+
createBlock: Ce
|
|
1408
1408
|
},
|
|
1409
1409
|
{
|
|
1410
1410
|
type: "button",
|
|
1411
|
-
createBlock:
|
|
1411
|
+
createBlock: Ee
|
|
1412
1412
|
},
|
|
1413
1413
|
{
|
|
1414
1414
|
type: "divider",
|
|
1415
|
-
createBlock:
|
|
1415
|
+
createBlock: ke
|
|
1416
1416
|
},
|
|
1417
1417
|
{
|
|
1418
1418
|
type: "video",
|
|
@@ -1436,15 +1436,15 @@ var qn = [
|
|
|
1436
1436
|
},
|
|
1437
1437
|
{
|
|
1438
1438
|
type: "html",
|
|
1439
|
-
createBlock:
|
|
1439
|
+
createBlock: Oe
|
|
1440
1440
|
},
|
|
1441
1441
|
{
|
|
1442
1442
|
type: "countdown",
|
|
1443
|
-
createBlock:
|
|
1443
|
+
createBlock: De
|
|
1444
1444
|
}
|
|
1445
1445
|
];
|
|
1446
|
-
function
|
|
1447
|
-
for (let n of
|
|
1446
|
+
function Xn(e, t) {
|
|
1447
|
+
for (let n of Yn) {
|
|
1448
1448
|
let r = t[n.type];
|
|
1449
1449
|
r && e.registerBuiltIn(n.type, {
|
|
1450
1450
|
component: r,
|
|
@@ -1454,23 +1454,55 @@ function Jn(e, t) {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
//#endregion
|
|
1456
1456
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1457
|
-
function
|
|
1457
|
+
function Zn(e) {
|
|
1458
1458
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1459
1459
|
}
|
|
1460
1460
|
//#endregion
|
|
1461
|
+
//#region src/utils/templateSettingsFields.ts
|
|
1462
|
+
var Qn = {
|
|
1463
|
+
width: "layout",
|
|
1464
|
+
backgroundColor: "appearance",
|
|
1465
|
+
textColor: "appearance",
|
|
1466
|
+
linkColor: "appearance",
|
|
1467
|
+
linkUnderline: "appearance",
|
|
1468
|
+
fontFamily: "appearance",
|
|
1469
|
+
locale: "language",
|
|
1470
|
+
preheaderText: "preheader"
|
|
1471
|
+
}, $n = Object.keys(Qn);
|
|
1472
|
+
function er(e) {
|
|
1473
|
+
return Object.prototype.hasOwnProperty.call(Qn, e);
|
|
1474
|
+
}
|
|
1475
|
+
function tr(e) {
|
|
1476
|
+
let t = e?.fields;
|
|
1477
|
+
if (t === void 0 || t === !0) return {
|
|
1478
|
+
fields: new Set($n),
|
|
1479
|
+
unknown: []
|
|
1480
|
+
};
|
|
1481
|
+
if (t === !1) return {
|
|
1482
|
+
fields: /* @__PURE__ */ new Set(),
|
|
1483
|
+
unknown: []
|
|
1484
|
+
};
|
|
1485
|
+
let n = /* @__PURE__ */ new Set(), r = [];
|
|
1486
|
+
for (let e of t) er(e) ? n.add(e) : r.push(String(e));
|
|
1487
|
+
return {
|
|
1488
|
+
fields: n,
|
|
1489
|
+
unknown: r
|
|
1490
|
+
};
|
|
1491
|
+
}
|
|
1492
|
+
//#endregion
|
|
1461
1493
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1462
|
-
function
|
|
1494
|
+
function nr(e) {
|
|
1463
1495
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1464
1496
|
}
|
|
1465
|
-
function
|
|
1466
|
-
let r = new Set(e.map((e) =>
|
|
1467
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1497
|
+
function rr(e, t, n) {
|
|
1498
|
+
let r = new Set(e.map((e) => Kt(e))), i = [], a = (e, t) => {
|
|
1499
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Kt(o)) && i.push(`${t}.${n}: ${o}`) : nr(o) && a(o, `${t}.${n}`);
|
|
1468
1500
|
}, o = t;
|
|
1469
1501
|
for (let [e, t] of Object.entries(ze)) {
|
|
1470
1502
|
let n = o?.[e];
|
|
1471
1503
|
a({
|
|
1472
1504
|
...t,
|
|
1473
|
-
...
|
|
1505
|
+
...nr(n) ? n : {}
|
|
1474
1506
|
}, e);
|
|
1475
1507
|
}
|
|
1476
1508
|
return a({
|
|
@@ -1479,9 +1511,155 @@ function Zn(e, t, n) {
|
|
|
1479
1511
|
}, "template"), i;
|
|
1480
1512
|
}
|
|
1481
1513
|
//#endregion
|
|
1514
|
+
//#region src/utils/localizedBlockDefaults.ts
|
|
1515
|
+
function ir(e) {
|
|
1516
|
+
return {
|
|
1517
|
+
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1518
|
+
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
1519
|
+
button: { text: e.blockDefaults.button }
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1522
|
+
//#endregion
|
|
1523
|
+
//#region src/i18n/index.ts
|
|
1524
|
+
var ar = /* #__PURE__ */ Object.assign({
|
|
1525
|
+
"./locales/ca.ts": () => import("./ca-C0hfqt4U.js"),
|
|
1526
|
+
"./locales/de.ts": () => import("./de-C6J2Iae8.js"),
|
|
1527
|
+
"./locales/en.ts": () => import("./en-BaUYOQi8.js"),
|
|
1528
|
+
"./locales/es.ts": () => import("./es-CKDYfJYn.js"),
|
|
1529
|
+
"./locales/fr.ts": () => import("./fr-L8DR73mK.js"),
|
|
1530
|
+
"./locales/nl.ts": () => import("./nl-GDWeuX18.js"),
|
|
1531
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-B1AVVhWj.js")
|
|
1532
|
+
}), or = /* #__PURE__ */ Object.assign({
|
|
1533
|
+
"./locales/cloud/de.ts": () => import("./de-BytZwgn6.js"),
|
|
1534
|
+
"./locales/cloud/en.ts": () => import("./en-DyOSV0lY.js"),
|
|
1535
|
+
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-C1WLSGDh.js")
|
|
1536
|
+
});
|
|
1537
|
+
function sr(e) {
|
|
1538
|
+
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1539
|
+
}
|
|
1540
|
+
var cr = sr(ar), lr = sr(or);
|
|
1541
|
+
function ur(e) {
|
|
1542
|
+
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1543
|
+
}
|
|
1544
|
+
function dr(e, t) {
|
|
1545
|
+
let n = ur(e);
|
|
1546
|
+
return t.find((e) => ur(e) === n);
|
|
1547
|
+
}
|
|
1548
|
+
function fr(e) {
|
|
1549
|
+
return ur(e).split("-")[0];
|
|
1550
|
+
}
|
|
1551
|
+
function pr(e, t) {
|
|
1552
|
+
return dr(e, t) ?? dr(fr(e), t);
|
|
1553
|
+
}
|
|
1554
|
+
function mr(e, t) {
|
|
1555
|
+
return pr(e, t) ?? "en";
|
|
1556
|
+
}
|
|
1557
|
+
async function hr(e) {
|
|
1558
|
+
let t = ar[`./locales/${mr(e, cr)}.ts`];
|
|
1559
|
+
return (await t()).default;
|
|
1560
|
+
}
|
|
1561
|
+
async function gr(e) {
|
|
1562
|
+
let t = or[`./locales/cloud/${mr(e, lr)}.ts`];
|
|
1563
|
+
return (await t()).default;
|
|
1564
|
+
}
|
|
1565
|
+
function _r(e) {
|
|
1566
|
+
return pr(e, cr) !== void 0;
|
|
1567
|
+
}
|
|
1568
|
+
function vr(e) {
|
|
1569
|
+
return pr(e, lr) !== void 0;
|
|
1570
|
+
}
|
|
1571
|
+
function yr() {
|
|
1572
|
+
return [...cr];
|
|
1573
|
+
}
|
|
1574
|
+
function br() {
|
|
1575
|
+
return [...lr];
|
|
1576
|
+
}
|
|
1577
|
+
//#endregion
|
|
1578
|
+
//#region src/i18n/contentDefaults.ts
|
|
1579
|
+
var xr = {
|
|
1580
|
+
en: {
|
|
1581
|
+
video: "Video",
|
|
1582
|
+
days: "Days",
|
|
1583
|
+
hours: "Hours",
|
|
1584
|
+
minutes: "Minutes",
|
|
1585
|
+
seconds: "Seconds",
|
|
1586
|
+
expired: "This offer has expired"
|
|
1587
|
+
},
|
|
1588
|
+
de: {
|
|
1589
|
+
video: "Video",
|
|
1590
|
+
days: "Tage",
|
|
1591
|
+
hours: "Stunden",
|
|
1592
|
+
minutes: "Minuten",
|
|
1593
|
+
seconds: "Sekunden",
|
|
1594
|
+
expired: "Dieses Angebot ist abgelaufen"
|
|
1595
|
+
},
|
|
1596
|
+
es: {
|
|
1597
|
+
video: "Vídeo",
|
|
1598
|
+
days: "Días",
|
|
1599
|
+
hours: "Horas",
|
|
1600
|
+
minutes: "Minutos",
|
|
1601
|
+
seconds: "Segundos",
|
|
1602
|
+
expired: "Esta oferta ha expirado"
|
|
1603
|
+
},
|
|
1604
|
+
fr: {
|
|
1605
|
+
video: "Vidéo",
|
|
1606
|
+
days: "Jours",
|
|
1607
|
+
hours: "Heures",
|
|
1608
|
+
minutes: "Minutes",
|
|
1609
|
+
seconds: "Secondes",
|
|
1610
|
+
expired: "Cette offre a expiré"
|
|
1611
|
+
},
|
|
1612
|
+
nl: {
|
|
1613
|
+
video: "Video",
|
|
1614
|
+
days: "Dagen",
|
|
1615
|
+
hours: "Uren",
|
|
1616
|
+
minutes: "Minuten",
|
|
1617
|
+
seconds: "Seconden",
|
|
1618
|
+
expired: "Deze aanbieding is verlopen"
|
|
1619
|
+
},
|
|
1620
|
+
"pt-BR": {
|
|
1621
|
+
video: "Vídeo",
|
|
1622
|
+
days: "Dias",
|
|
1623
|
+
hours: "Horas",
|
|
1624
|
+
minutes: "Minutos",
|
|
1625
|
+
seconds: "Segundos",
|
|
1626
|
+
expired: "Esta oferta expirou"
|
|
1627
|
+
},
|
|
1628
|
+
ca: {
|
|
1629
|
+
video: "Vídeo",
|
|
1630
|
+
days: "Dies",
|
|
1631
|
+
hours: "Hores",
|
|
1632
|
+
minutes: "Minuts",
|
|
1633
|
+
seconds: "Segons",
|
|
1634
|
+
expired: "Aquesta oferta ha caducat"
|
|
1635
|
+
}
|
|
1636
|
+
};
|
|
1637
|
+
Object.keys(xr);
|
|
1638
|
+
var Sr = new Map(Object.keys(xr).map((e) => [e.toLowerCase(), e]));
|
|
1639
|
+
function Cr(e) {
|
|
1640
|
+
if (!e) return xr.en;
|
|
1641
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Sr.get(t);
|
|
1642
|
+
if (n) return xr[n];
|
|
1643
|
+
let r = Sr.get(fr(t));
|
|
1644
|
+
return r ? xr[r] : xr.en;
|
|
1645
|
+
}
|
|
1646
|
+
function wr(e) {
|
|
1647
|
+
let t = Cr(e);
|
|
1648
|
+
return {
|
|
1649
|
+
video: { alt: t.video },
|
|
1650
|
+
countdown: {
|
|
1651
|
+
labelDays: t.days,
|
|
1652
|
+
labelHours: t.hours,
|
|
1653
|
+
labelMinutes: t.minutes,
|
|
1654
|
+
labelSeconds: t.seconds,
|
|
1655
|
+
expiredMessage: t.expired
|
|
1656
|
+
}
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1659
|
+
//#endregion
|
|
1482
1660
|
//#region src/utils/resolveFieldColors.ts
|
|
1483
|
-
function
|
|
1484
|
-
let n =
|
|
1661
|
+
function Tr(e, t) {
|
|
1662
|
+
let n = Gt({ presets: e.presets }, Ut), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
1485
1663
|
return {
|
|
1486
1664
|
presets: r ? t.presets : n.presets,
|
|
1487
1665
|
allowCustom: t.allowCustom !== !1 && i,
|
|
@@ -1493,9 +1671,9 @@ function Qn(e, t) {
|
|
|
1493
1671
|
}
|
|
1494
1672
|
//#endregion
|
|
1495
1673
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1496
|
-
function
|
|
1674
|
+
function Er(e, t) {
|
|
1497
1675
|
let n = [], r = (r, i) => {
|
|
1498
|
-
let a =
|
|
1676
|
+
let a = Tr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1499
1677
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1500
1678
|
id: s("invalid-presets"),
|
|
1501
1679
|
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." : "")
|
|
@@ -1506,8 +1684,8 @@ function $n(e, t) {
|
|
|
1506
1684
|
id: s("allow-custom-ignored"),
|
|
1507
1685
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1508
1686
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1509
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1510
|
-
e !== "" && !t.has(
|
|
1687
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Kt(e)));
|
|
1688
|
+
e !== "" && !t.has(Kt(e)) && n.push({
|
|
1511
1689
|
id: s("off-palette-default"),
|
|
1512
1690
|
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.`
|
|
1513
1691
|
});
|
|
@@ -1519,7 +1697,7 @@ function $n(e, t) {
|
|
|
1519
1697
|
}
|
|
1520
1698
|
//#endregion
|
|
1521
1699
|
//#region src/utils/keyboardShortcuts.ts
|
|
1522
|
-
function
|
|
1700
|
+
function Dr(e) {
|
|
1523
1701
|
for (let t of e.composedPath()) {
|
|
1524
1702
|
if (!(t instanceof HTMLElement)) continue;
|
|
1525
1703
|
if (t.isContentEditable) return !0;
|
|
@@ -1528,18 +1706,18 @@ function er(e) {
|
|
|
1528
1706
|
}
|
|
1529
1707
|
return !1;
|
|
1530
1708
|
}
|
|
1531
|
-
function
|
|
1709
|
+
function Or(e, t) {
|
|
1532
1710
|
let n = e.metaKey || e.ctrlKey;
|
|
1533
1711
|
if (n && e.key.toLowerCase() === "s") {
|
|
1534
1712
|
e.preventDefault(), t.onSave?.();
|
|
1535
1713
|
return;
|
|
1536
1714
|
}
|
|
1537
1715
|
if (n && e.key.toLowerCase() === "z") {
|
|
1538
|
-
if (
|
|
1716
|
+
if (Dr(e)) return;
|
|
1539
1717
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1540
1718
|
return;
|
|
1541
1719
|
}
|
|
1542
|
-
if (t.isPicking?.() && !
|
|
1720
|
+
if (t.isPicking?.() && !Dr(e)) {
|
|
1543
1721
|
if (e.key === "Escape") {
|
|
1544
1722
|
e.preventDefault(), t.onCancelPick?.();
|
|
1545
1723
|
return;
|
|
@@ -1557,11 +1735,11 @@ function tr(e, t) {
|
|
|
1557
1735
|
t.selectBlock(null);
|
|
1558
1736
|
return;
|
|
1559
1737
|
}
|
|
1560
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1738
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Dr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1561
1739
|
}
|
|
1562
1740
|
//#endregion
|
|
1563
1741
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1564
|
-
function
|
|
1742
|
+
function kr(e, t, n, r = !1) {
|
|
1565
1743
|
if (!e) return [];
|
|
1566
1744
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1567
1745
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1570,18 +1748,18 @@ function nr(e, t, n, r = !1) {
|
|
|
1570
1748
|
value: e.slice(o, s.index)
|
|
1571
1749
|
});
|
|
1572
1750
|
let i = s[0];
|
|
1573
|
-
if (
|
|
1574
|
-
let e = r ?
|
|
1751
|
+
if (fe(i, n)) {
|
|
1752
|
+
let e = r ? ae(i, t) : void 0;
|
|
1575
1753
|
a.push(e === void 0 ? {
|
|
1576
1754
|
type: "tag",
|
|
1577
|
-
value:
|
|
1755
|
+
value: je(i, t)
|
|
1578
1756
|
} : {
|
|
1579
1757
|
type: "text",
|
|
1580
1758
|
value: e
|
|
1581
1759
|
});
|
|
1582
|
-
} else
|
|
1760
|
+
} else ue(i, n) ? a.push({
|
|
1583
1761
|
type: "tag",
|
|
1584
|
-
value:
|
|
1762
|
+
value: ge(i, n)
|
|
1585
1763
|
}) : a.push({
|
|
1586
1764
|
type: "text",
|
|
1587
1765
|
value: i
|
|
@@ -1595,27 +1773,27 @@ function nr(e, t, n, r = !1) {
|
|
|
1595
1773
|
}
|
|
1596
1774
|
//#endregion
|
|
1597
1775
|
//#region src/components/MergeTagPreviewText.vue
|
|
1598
|
-
var
|
|
1776
|
+
var Ar = L({
|
|
1599
1777
|
name: "MergeTagPreviewText",
|
|
1600
1778
|
props: { text: {
|
|
1601
1779
|
type: String,
|
|
1602
1780
|
required: !0
|
|
1603
1781
|
} },
|
|
1604
1782
|
setup(e) {
|
|
1605
|
-
let t = p(
|
|
1783
|
+
let t = p(ht, []), n = p(Ot, Fe.liquid), r = p(ot, null), i = F(() => kr(e.text, t, n, r?.value ?? !1));
|
|
1606
1784
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
1607
1785
|
key: t,
|
|
1608
1786
|
class: "tpl-merge-tag-label"
|
|
1609
1787
|
}, e.value) : e.value);
|
|
1610
1788
|
}
|
|
1611
|
-
}),
|
|
1789
|
+
}), jr = ["href"], Mr = /* @__PURE__ */ L({
|
|
1612
1790
|
__name: "ButtonBlock",
|
|
1613
1791
|
props: {
|
|
1614
1792
|
block: {},
|
|
1615
1793
|
viewport: {}
|
|
1616
1794
|
},
|
|
1617
1795
|
setup(e) {
|
|
1618
|
-
let t = e, n =
|
|
1796
|
+
let t = e, n = F(() => {
|
|
1619
1797
|
let e = {
|
|
1620
1798
|
display: "inline-block",
|
|
1621
1799
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -1628,18 +1806,18 @@ var rr = I({
|
|
|
1628
1806
|
textAlign: "center"
|
|
1629
1807
|
};
|
|
1630
1808
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1631
|
-
}), r =
|
|
1809
|
+
}), r = F(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1632
1810
|
return (t, i) => (O(), S("div", { style: u(r.value) }, [x("a", {
|
|
1633
1811
|
href: e.block.url || "#",
|
|
1634
1812
|
style: u(n.value),
|
|
1635
1813
|
class: "tpl:cursor-default",
|
|
1636
|
-
onClick: i[0] ||=
|
|
1637
|
-
}, [w(
|
|
1814
|
+
onClick: i[0] ||= R(() => {}, ["prevent"])
|
|
1815
|
+
}, [w(Ar, { text: e.block.text }, null, 8, ["text"])], 12, jr)], 4));
|
|
1638
1816
|
}
|
|
1639
|
-
}),
|
|
1817
|
+
}), Nr = Jt("bookmark", [["path", {
|
|
1640
1818
|
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",
|
|
1641
1819
|
key: "oz39mx"
|
|
1642
|
-
}]]),
|
|
1820
|
+
}]]), Pr = Jt("box", [
|
|
1643
1821
|
["path", {
|
|
1644
1822
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1645
1823
|
key: "hh9hay"
|
|
@@ -1652,13 +1830,13 @@ var rr = I({
|
|
|
1652
1830
|
d: "M12 22V12",
|
|
1653
1831
|
key: "d0xqtd"
|
|
1654
1832
|
}]
|
|
1655
|
-
]),
|
|
1833
|
+
]), Fr = Jt("code", [["path", {
|
|
1656
1834
|
d: "m16 18 6-6-6-6",
|
|
1657
1835
|
key: "eg8j8"
|
|
1658
1836
|
}], ["path", {
|
|
1659
1837
|
d: "m8 6-6 6 6 6",
|
|
1660
1838
|
key: "ppft3o"
|
|
1661
|
-
}]]),
|
|
1839
|
+
}]]), Ir = Jt("copy", [["rect", {
|
|
1662
1840
|
width: "14",
|
|
1663
1841
|
height: "14",
|
|
1664
1842
|
x: "8",
|
|
@@ -1669,7 +1847,7 @@ var rr = I({
|
|
|
1669
1847
|
}], ["path", {
|
|
1670
1848
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1671
1849
|
key: "zix9uf"
|
|
1672
|
-
}]]),
|
|
1850
|
+
}]]), Lr = Jt("eye-off", [
|
|
1673
1851
|
["path", {
|
|
1674
1852
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1675
1853
|
key: "ct8e1f"
|
|
@@ -1686,10 +1864,10 @@ var rr = I({
|
|
|
1686
1864
|
d: "m2 2 20 20",
|
|
1687
1865
|
key: "1ooewy"
|
|
1688
1866
|
}]
|
|
1689
|
-
]),
|
|
1867
|
+
]), Rr = Jt("funnel", [["path", {
|
|
1690
1868
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
1691
1869
|
key: "sc7q7i"
|
|
1692
|
-
}]]),
|
|
1870
|
+
}]]), zr = Jt("grip-vertical", [
|
|
1693
1871
|
["circle", {
|
|
1694
1872
|
cx: "9",
|
|
1695
1873
|
cy: "12",
|
|
@@ -1726,7 +1904,7 @@ var rr = I({
|
|
|
1726
1904
|
r: "1",
|
|
1727
1905
|
key: "f4zoj3"
|
|
1728
1906
|
}]
|
|
1729
|
-
]),
|
|
1907
|
+
]), Br = Jt("image", [
|
|
1730
1908
|
["rect", {
|
|
1731
1909
|
width: "18",
|
|
1732
1910
|
height: "18",
|
|
@@ -1746,13 +1924,13 @@ var rr = I({
|
|
|
1746
1924
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1747
1925
|
key: "1xmnt7"
|
|
1748
1926
|
}]
|
|
1749
|
-
]),
|
|
1927
|
+
]), Vr = Jt("navigation", [["polygon", {
|
|
1750
1928
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1751
1929
|
key: "1ltx0t"
|
|
1752
|
-
}]]),
|
|
1930
|
+
}]]), Hr = Jt("puzzle", [["path", {
|
|
1753
1931
|
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",
|
|
1754
1932
|
key: "w46dr5"
|
|
1755
|
-
}]]),
|
|
1933
|
+
}]]), Ur = Jt("share-2", [
|
|
1756
1934
|
["circle", {
|
|
1757
1935
|
cx: "18",
|
|
1758
1936
|
cy: "5",
|
|
@@ -1785,7 +1963,7 @@ var rr = I({
|
|
|
1785
1963
|
y2: "10.49",
|
|
1786
1964
|
key: "1n3mei"
|
|
1787
1965
|
}]
|
|
1788
|
-
]),
|
|
1966
|
+
]), Wr = Jt("table", [
|
|
1789
1967
|
["path", {
|
|
1790
1968
|
d: "M12 3v18",
|
|
1791
1969
|
key: "108xh3"
|
|
@@ -1806,7 +1984,7 @@ var rr = I({
|
|
|
1806
1984
|
d: "M3 15h18",
|
|
1807
1985
|
key: "5xshup"
|
|
1808
1986
|
}]
|
|
1809
|
-
]),
|
|
1987
|
+
]), Gr = Jt("video", [["path", {
|
|
1810
1988
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1811
1989
|
key: "ftymec"
|
|
1812
1990
|
}], ["rect", {
|
|
@@ -1816,18 +1994,18 @@ var rr = I({
|
|
|
1816
1994
|
height: "12",
|
|
1817
1995
|
rx: "2",
|
|
1818
1996
|
key: "158x01"
|
|
1819
|
-
}]]),
|
|
1997
|
+
}]]), Kr = ["innerHTML"], qr = [
|
|
1820
1998
|
"src",
|
|
1821
1999
|
"width",
|
|
1822
2000
|
"height"
|
|
1823
|
-
],
|
|
2001
|
+
], Jr = /* @__PURE__ */ L({
|
|
1824
2002
|
__name: "CustomBlockIcon",
|
|
1825
2003
|
props: {
|
|
1826
2004
|
icon: {},
|
|
1827
2005
|
size: {}
|
|
1828
2006
|
},
|
|
1829
2007
|
setup(e) {
|
|
1830
|
-
let t = e, n =
|
|
2008
|
+
let t = e, n = F(() => t.size ?? 20), r = F(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = F(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
1831
2009
|
return (t, a) => r.value ? (O(), S("span", {
|
|
1832
2010
|
key: 0,
|
|
1833
2011
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1836,24 +2014,24 @@ var rr = I({
|
|
|
1836
2014
|
height: `${n.value}px`
|
|
1837
2015
|
}),
|
|
1838
2016
|
innerHTML: e.icon
|
|
1839
|
-
}, null, 12,
|
|
2017
|
+
}, null, 12, Kr)) : i.value ? (O(), S("img", {
|
|
1840
2018
|
key: 1,
|
|
1841
2019
|
src: e.icon,
|
|
1842
2020
|
width: n.value,
|
|
1843
2021
|
height: n.value,
|
|
1844
2022
|
class: "tpl:inline-block",
|
|
1845
2023
|
alt: ""
|
|
1846
|
-
}, null, 8,
|
|
2024
|
+
}, null, 8, qr)) : (O(), A(P(Pr), {
|
|
1847
2025
|
key: 2,
|
|
1848
2026
|
size: n.value,
|
|
1849
2027
|
"stroke-width": 1.5
|
|
1850
2028
|
}, null, 8, ["size"]));
|
|
1851
2029
|
}
|
|
1852
|
-
}),
|
|
1853
|
-
function
|
|
1854
|
-
let n =
|
|
2030
|
+
}), Yr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2031
|
+
function Xr(e, t) {
|
|
2032
|
+
let n = nn(), r = null, i = null, a = null;
|
|
1855
2033
|
function o() {
|
|
1856
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2034
|
+
return e.value ? Array.from(e.value.querySelectorAll(Yr)).filter((e) => e.offsetParent !== null) : [];
|
|
1857
2035
|
}
|
|
1858
2036
|
function c(e) {
|
|
1859
2037
|
if (e.key !== "Tab") return;
|
|
@@ -1877,15 +2055,15 @@ function Cr(e, t) {
|
|
|
1877
2055
|
let d = s([t, e], ([e, t]) => {
|
|
1878
2056
|
e && t ? l() : u();
|
|
1879
2057
|
}, { flush: "post" });
|
|
1880
|
-
|
|
2058
|
+
M(() => {
|
|
1881
2059
|
d(), u();
|
|
1882
2060
|
});
|
|
1883
2061
|
}
|
|
1884
2062
|
//#endregion
|
|
1885
2063
|
//#region src/composables/useEmoji.ts
|
|
1886
|
-
function
|
|
2064
|
+
function Zr() {
|
|
1887
2065
|
let [e, t] = Je(!1), n = f([]), r = !1;
|
|
1888
|
-
|
|
2066
|
+
M(() => {
|
|
1889
2067
|
r = !0;
|
|
1890
2068
|
}), s(e, async (e) => {
|
|
1891
2069
|
if (e && n.value.length === 0) {
|
|
@@ -1909,7 +2087,7 @@ function wr() {
|
|
|
1909
2087
|
}
|
|
1910
2088
|
//#endregion
|
|
1911
2089
|
//#region src/composables/useFonts.ts
|
|
1912
|
-
var
|
|
2090
|
+
var Qr = [
|
|
1913
2091
|
{
|
|
1914
2092
|
value: "Arial",
|
|
1915
2093
|
label: "Arial"
|
|
@@ -1938,7 +2116,7 @@ var Tr = [
|
|
|
1938
2116
|
value: "Courier New",
|
|
1939
2117
|
label: "Courier New"
|
|
1940
2118
|
}
|
|
1941
|
-
],
|
|
2119
|
+
], $r = {
|
|
1942
2120
|
arial: "Arial, sans-serif",
|
|
1943
2121
|
helvetica: "Helvetica, sans-serif",
|
|
1944
2122
|
georgia: "Georgia, serif",
|
|
@@ -1946,23 +2124,23 @@ var Tr = [
|
|
|
1946
2124
|
verdana: "Verdana, sans-serif",
|
|
1947
2125
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1948
2126
|
"courier new": "'Courier New', monospace"
|
|
1949
|
-
},
|
|
1950
|
-
function
|
|
1951
|
-
if (e === void 0 || e === !0) return [...
|
|
2127
|
+
}, ei = "Arial, sans-serif";
|
|
2128
|
+
function ti(e) {
|
|
2129
|
+
if (e === void 0 || e === !0) return [...Qr];
|
|
1952
2130
|
if (e === !1) return [];
|
|
1953
2131
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1954
2132
|
for (let i of e) {
|
|
1955
|
-
let e = i.toLowerCase(), a =
|
|
2133
|
+
let e = i.toLowerCase(), a = Qr.find((t) => t.value.toLowerCase() === e);
|
|
1956
2134
|
if (!a) {
|
|
1957
|
-
r.has(e) || (r.add(e),
|
|
2135
|
+
r.has(e) || (r.add(e), Ht.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Qr.map((e) => e.value).join(", ")}.`));
|
|
1958
2136
|
continue;
|
|
1959
2137
|
}
|
|
1960
2138
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1961
2139
|
}
|
|
1962
2140
|
return t;
|
|
1963
2141
|
}
|
|
1964
|
-
function
|
|
1965
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r =
|
|
2142
|
+
function ni(e) {
|
|
2143
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = ti(e?.builtIns), i = F(() => e?.defaultFallback ?? ei), a = F(() => {
|
|
1966
2144
|
let e = [...r], n = t.value.map((e) => ({
|
|
1967
2145
|
value: e.name,
|
|
1968
2146
|
label: e.name,
|
|
@@ -1973,16 +2151,16 @@ function kr(e) {
|
|
|
1973
2151
|
function o(e) {
|
|
1974
2152
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1975
2153
|
}
|
|
1976
|
-
let s = e?.defaultFont ??
|
|
1977
|
-
o(s) ||
|
|
2154
|
+
let s = e?.defaultFont ?? ei.split(",")[0].trim();
|
|
2155
|
+
o(s) || Ht.warn(`config.fonts: new templates seed "${s}", 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.`);
|
|
1978
2156
|
function c() {
|
|
1979
2157
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1980
2158
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1981
2159
|
if (t) return t.value;
|
|
1982
2160
|
}
|
|
1983
|
-
return
|
|
2161
|
+
return ei;
|
|
1984
2162
|
}
|
|
1985
|
-
let l =
|
|
2163
|
+
let l = F(() => c());
|
|
1986
2164
|
function u(e) {
|
|
1987
2165
|
if (!e) return i.value;
|
|
1988
2166
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
@@ -1990,7 +2168,7 @@ function kr(e) {
|
|
|
1990
2168
|
let e = n.fallback ?? i.value;
|
|
1991
2169
|
return `'${n.name}', ${e}`;
|
|
1992
2170
|
}
|
|
1993
|
-
return
|
|
2171
|
+
return $r[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1994
2172
|
}
|
|
1995
2173
|
let d = [], f = !1;
|
|
1996
2174
|
async function p() {
|
|
@@ -2006,7 +2184,7 @@ function kr(e) {
|
|
|
2006
2184
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2007
2185
|
});
|
|
2008
2186
|
} catch (t) {
|
|
2009
|
-
|
|
2187
|
+
Ht.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2010
2188
|
}
|
|
2011
2189
|
});
|
|
2012
2190
|
await Promise.allSettled(e), !f && (n.value = !0);
|
|
@@ -2015,7 +2193,7 @@ function kr(e) {
|
|
|
2015
2193
|
for (let e of d) e.remove();
|
|
2016
2194
|
d.length = 0;
|
|
2017
2195
|
}
|
|
2018
|
-
return h() &&
|
|
2196
|
+
return h() && M(() => {
|
|
2019
2197
|
f = !0, m();
|
|
2020
2198
|
}), {
|
|
2021
2199
|
fonts: a,
|
|
@@ -2031,8 +2209,8 @@ function kr(e) {
|
|
|
2031
2209
|
}
|
|
2032
2210
|
//#endregion
|
|
2033
2211
|
//#region src/composables/useLogicTag.ts
|
|
2034
|
-
function
|
|
2035
|
-
let e = p(nt, []), t = p(
|
|
2212
|
+
function ri() {
|
|
2213
|
+
let e = p(nt, []), t = p(mt, []), n = p(Ot, Fe.liquid), r = p(et, null), i = p(Lt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
2036
2214
|
async function c() {
|
|
2037
2215
|
if (r) {
|
|
2038
2216
|
a.value = !0;
|
|
@@ -2063,12 +2241,12 @@ function Ar() {
|
|
|
2063
2241
|
}
|
|
2064
2242
|
//#endregion
|
|
2065
2243
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
2066
|
-
function
|
|
2067
|
-
return
|
|
2244
|
+
function ii(e, t, n) {
|
|
2245
|
+
return ue(e, n) ? {
|
|
2068
2246
|
type: "logicMergeTagNode",
|
|
2069
2247
|
attrs: {
|
|
2070
2248
|
value: e,
|
|
2071
|
-
keyword:
|
|
2249
|
+
keyword: ge(e, n)
|
|
2072
2250
|
}
|
|
2073
2251
|
} : {
|
|
2074
2252
|
type: "mergeTagNode",
|
|
@@ -2080,15 +2258,15 @@ function jr(e, t, n) {
|
|
|
2080
2258
|
}
|
|
2081
2259
|
//#endregion
|
|
2082
2260
|
//#region src/utils/insertLogicTag.ts
|
|
2083
|
-
function
|
|
2261
|
+
function ai(e) {
|
|
2084
2262
|
return "before" in e && "after" in e;
|
|
2085
2263
|
}
|
|
2086
|
-
function
|
|
2087
|
-
if (!
|
|
2088
|
-
e.chain().focus().insertContent(
|
|
2264
|
+
function oi(e, t, n) {
|
|
2265
|
+
if (!ai(t)) {
|
|
2266
|
+
e.chain().focus().insertContent(ii(t.value, t.label, n)).run();
|
|
2089
2267
|
return;
|
|
2090
2268
|
}
|
|
2091
|
-
let r =
|
|
2269
|
+
let r = ii(t.before, t.label, n), i = ii(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
2092
2270
|
if (a !== o) {
|
|
2093
2271
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
2094
2272
|
return;
|
|
@@ -2097,20 +2275,20 @@ function Nr(e, t, n) {
|
|
|
2097
2275
|
}
|
|
2098
2276
|
//#endregion
|
|
2099
2277
|
//#region src/utils/linkColorExtension.ts
|
|
2100
|
-
function
|
|
2278
|
+
function si(e) {
|
|
2101
2279
|
if (!e) return null;
|
|
2102
2280
|
let t = e.trim();
|
|
2103
2281
|
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;
|
|
2104
2282
|
}
|
|
2105
|
-
function
|
|
2283
|
+
function ci(e) {
|
|
2106
2284
|
return e.extend({ addAttributes() {
|
|
2107
2285
|
return {
|
|
2108
2286
|
...this.parent?.(),
|
|
2109
2287
|
color: {
|
|
2110
2288
|
default: null,
|
|
2111
|
-
parseHTML: (e) =>
|
|
2289
|
+
parseHTML: (e) => si(Wt(e.style.color)),
|
|
2112
2290
|
renderHTML: (e) => {
|
|
2113
|
-
let t =
|
|
2291
|
+
let t = si(e.color);
|
|
2114
2292
|
return t ? { style: `color: ${t}` } : {};
|
|
2115
2293
|
}
|
|
2116
2294
|
}
|
|
@@ -2119,9 +2297,9 @@ function Fr(e) {
|
|
|
2119
2297
|
}
|
|
2120
2298
|
//#endregion
|
|
2121
2299
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2122
|
-
function
|
|
2300
|
+
function li(e) {
|
|
2123
2301
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
2124
|
-
|
|
2302
|
+
Xr(i, t);
|
|
2125
2303
|
function a() {
|
|
2126
2304
|
let i = e.value?.getAttributes("link") ?? {};
|
|
2127
2305
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -2130,7 +2308,7 @@ function Ir(e) {
|
|
|
2130
2308
|
if (n.value) {
|
|
2131
2309
|
let t = c(n.value);
|
|
2132
2310
|
if (t !== null) {
|
|
2133
|
-
let n =
|
|
2311
|
+
let n = si(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
2134
2312
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
2135
2313
|
}
|
|
2136
2314
|
}
|
|
@@ -2177,10 +2355,10 @@ function Ir(e) {
|
|
|
2177
2355
|
}
|
|
2178
2356
|
//#endregion
|
|
2179
2357
|
//#region src/composables/useRichTextEditor.ts
|
|
2180
|
-
function
|
|
2181
|
-
let t = p(
|
|
2182
|
-
async function
|
|
2183
|
-
|
|
2358
|
+
function ui(e) {
|
|
2359
|
+
let t = p(Et, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = rn(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = ri(), g = p(st, null), v = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = me(l), b = f(null), { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = li(b), { start: A, stop: j } = Ye(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), M = f(null), N = _(!0), P = _(null), F = !1;
|
|
2360
|
+
async function ee() {
|
|
2361
|
+
P.value = null, N.value = !0;
|
|
2184
2362
|
try {
|
|
2185
2363
|
let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
|
|
2186
2364
|
mergeTags: n,
|
|
@@ -2189,8 +2367,8 @@ function Lr(e) {
|
|
|
2189
2367
|
autocompleteEnabled: u,
|
|
2190
2368
|
suggestionEmptyText: v
|
|
2191
2369
|
});
|
|
2192
|
-
if (
|
|
2193
|
-
|
|
2370
|
+
if (F) return;
|
|
2371
|
+
M.value = i;
|
|
2194
2372
|
let o = /* @__PURE__ */ new Map();
|
|
2195
2373
|
a.forEach((e, t) => o.set(e.name, t));
|
|
2196
2374
|
let s = new r({
|
|
@@ -2198,27 +2376,27 @@ function Lr(e) {
|
|
|
2198
2376
|
content: e.blockContent(),
|
|
2199
2377
|
editable: !0,
|
|
2200
2378
|
onUpdate: ({ editor: n }) => {
|
|
2201
|
-
|
|
2379
|
+
F || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
2202
2380
|
}
|
|
2203
2381
|
});
|
|
2204
|
-
if (
|
|
2382
|
+
if (F) {
|
|
2205
2383
|
s.destroy();
|
|
2206
2384
|
return;
|
|
2207
2385
|
}
|
|
2208
|
-
b.value = s,
|
|
2386
|
+
b.value = s, N.value = !1, A();
|
|
2209
2387
|
} catch (t) {
|
|
2210
|
-
if (
|
|
2211
|
-
|
|
2388
|
+
if (F) return;
|
|
2389
|
+
Ht.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), P.value = t instanceof Error ? t.message : "Failed to load editor", N.value = !1;
|
|
2212
2390
|
}
|
|
2213
2391
|
}
|
|
2214
|
-
function
|
|
2215
|
-
b.value?.destroy(), b.value = null,
|
|
2392
|
+
function I() {
|
|
2393
|
+
b.value?.destroy(), b.value = null, ee();
|
|
2216
2394
|
}
|
|
2217
|
-
|
|
2218
|
-
let
|
|
2395
|
+
ee();
|
|
2396
|
+
let L = s(() => e.blockContent(), (e) => {
|
|
2219
2397
|
b.value && b.value.getHTML() !== e && b.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2220
2398
|
});
|
|
2221
|
-
function
|
|
2399
|
+
function te(t) {
|
|
2222
2400
|
if (o.value || m.value) return;
|
|
2223
2401
|
let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
2224
2402
|
if (!r) return;
|
|
@@ -2226,26 +2404,26 @@ function Lr(e) {
|
|
|
2226
2404
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
2227
2405
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
2228
2406
|
}
|
|
2229
|
-
Ze(document, "mousedown",
|
|
2230
|
-
|
|
2407
|
+
Ze(document, "mousedown", te), i(() => {
|
|
2408
|
+
F = !0, L(), j(), b.value?.destroy();
|
|
2231
2409
|
});
|
|
2232
|
-
async function
|
|
2410
|
+
async function ne() {
|
|
2233
2411
|
let e = await c();
|
|
2234
|
-
|
|
2412
|
+
F || (e && b.value ? b.value.chain().focus().insertMergeTag({
|
|
2235
2413
|
label: e.label,
|
|
2236
2414
|
value: e.value
|
|
2237
2415
|
}).run() : b.value?.commands.focus());
|
|
2238
2416
|
}
|
|
2239
|
-
async function
|
|
2417
|
+
async function R() {
|
|
2240
2418
|
let e = await h();
|
|
2241
|
-
|
|
2419
|
+
F || (e && b.value ? oi(b.value, e, l) : b.value?.commands.focus());
|
|
2242
2420
|
}
|
|
2243
2421
|
return {
|
|
2244
2422
|
editor: b,
|
|
2245
|
-
EditorContent:
|
|
2246
|
-
isLoading:
|
|
2247
|
-
initError:
|
|
2248
|
-
retry:
|
|
2423
|
+
EditorContent: M,
|
|
2424
|
+
isLoading: N,
|
|
2425
|
+
initError: P,
|
|
2426
|
+
retry: I,
|
|
2249
2427
|
showLinkDialog: x,
|
|
2250
2428
|
linkUrl: S,
|
|
2251
2429
|
linkColor: C,
|
|
@@ -2261,36 +2439,36 @@ function Lr(e) {
|
|
|
2261
2439
|
removeLink: D,
|
|
2262
2440
|
closeLinkDialog: O,
|
|
2263
2441
|
handleLinkKeydown: k,
|
|
2264
|
-
handleAddMergeTag:
|
|
2265
|
-
handleAddLogicTag:
|
|
2442
|
+
handleAddMergeTag: ne,
|
|
2443
|
+
handleAddLogicTag: R
|
|
2266
2444
|
};
|
|
2267
2445
|
}
|
|
2268
2446
|
//#endregion
|
|
2269
2447
|
//#region src/composables/useSmallScreenNotice.ts
|
|
2270
|
-
var
|
|
2271
|
-
function
|
|
2272
|
-
let t = Xe(
|
|
2448
|
+
var di = "(max-width: 767px)";
|
|
2449
|
+
function fi(e) {
|
|
2450
|
+
let t = Xe(di);
|
|
2273
2451
|
return {
|
|
2274
2452
|
isSmallScreen: t,
|
|
2275
|
-
showNotice:
|
|
2453
|
+
showNotice: F(() => (ee(e) ?? !0) && t.value)
|
|
2276
2454
|
};
|
|
2277
2455
|
}
|
|
2278
2456
|
//#endregion
|
|
2279
2457
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2280
|
-
var
|
|
2458
|
+
var pi = { class: "tpl:w-full" }, mi = {
|
|
2281
2459
|
key: 0,
|
|
2282
2460
|
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)]"
|
|
2283
|
-
},
|
|
2461
|
+
}, hi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, gi = {
|
|
2284
2462
|
key: 1,
|
|
2285
2463
|
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)]"
|
|
2286
|
-
},
|
|
2464
|
+
}, _i = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, vi = {
|
|
2287
2465
|
key: 2,
|
|
2288
2466
|
class: "tpl:relative"
|
|
2289
|
-
},
|
|
2467
|
+
}, yi = ["innerHTML"], bi = {
|
|
2290
2468
|
key: 0,
|
|
2291
2469
|
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]",
|
|
2292
2470
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2293
|
-
},
|
|
2471
|
+
}, xi = /* @__PURE__ */ L({
|
|
2294
2472
|
__name: "CustomBlock",
|
|
2295
2473
|
props: {
|
|
2296
2474
|
block: {},
|
|
@@ -2298,19 +2476,19 @@ var Br = { class: "tpl:w-full" }, Vr = {
|
|
|
2298
2476
|
},
|
|
2299
2477
|
emits: ["fetchData"],
|
|
2300
2478
|
setup(e, { emit: t }) {
|
|
2301
|
-
let r = e, i = t, { t: a } =
|
|
2479
|
+
let r = e, i = t, { t: a } = Vt(), o = p(Pt, null), c = _(""), l = _(!1), u = F(() => o?.getDefinition(r.block.customType)), d = F(() => !!u.value), { isFetching: f, fetch: m, needsFetch: h, hasDataSource: g } = yn({
|
|
2302
2480
|
definition: u,
|
|
2303
|
-
block:
|
|
2481
|
+
block: F(() => r.block),
|
|
2304
2482
|
onUpdate: (e, t) => {
|
|
2305
2483
|
i("fetchData", {
|
|
2306
2484
|
fieldValues: e,
|
|
2307
2485
|
dataSourceFetched: t
|
|
2308
2486
|
});
|
|
2309
2487
|
}
|
|
2310
|
-
}), v = p(
|
|
2488
|
+
}), v = p(ht, []), y = p(ot, null), b = F(() => {
|
|
2311
2489
|
if (!y?.value) return r.block;
|
|
2312
2490
|
let e = {};
|
|
2313
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
2491
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? xe(n, v) : n;
|
|
2314
2492
|
return {
|
|
2315
2493
|
...r.block,
|
|
2316
2494
|
fieldValues: e
|
|
@@ -2334,60 +2512,60 @@ var Br = { class: "tpl:w-full" }, Vr = {
|
|
|
2334
2512
|
E();
|
|
2335
2513
|
}, { deep: !0 }), s(() => y?.value, () => {
|
|
2336
2514
|
E();
|
|
2337
|
-
}), (e, t) => (O(), S("div",
|
|
2515
|
+
}), (e, t) => (O(), S("div", pi, [d.value ? l.value ? (O(), S("div", gi, [w(P(Qt), {
|
|
2338
2516
|
size: 24,
|
|
2339
2517
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2340
|
-
}), x("span",
|
|
2518
|
+
}), x("span", _i, k(P(a).customBlocks.renderError), 1)])) : (O(), S("div", vi, [x("div", { innerHTML: c.value }, null, 8, yi), P(g) && P(h) ? (O(), S("div", bi, [P(f) ? (O(), A(en, {
|
|
2341
2519
|
key: 1,
|
|
2342
2520
|
class: "tpl:w-48"
|
|
2343
2521
|
})) : (O(), S("button", {
|
|
2344
2522
|
key: 0,
|
|
2345
2523
|
type: "button",
|
|
2346
2524
|
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)]",
|
|
2347
|
-
onClick: t[0] ||=
|
|
2348
|
-
}, [u.value?.icon ? (O(), A(
|
|
2525
|
+
onClick: t[0] ||= R((...e) => P(m) && P(m)(...e), ["stop"])
|
|
2526
|
+
}, [u.value?.icon ? (O(), A(Jr, {
|
|
2349
2527
|
key: 0,
|
|
2350
2528
|
icon: u.value.icon,
|
|
2351
2529
|
size: 16
|
|
2352
|
-
}, null, 8, ["icon"])) :
|
|
2530
|
+
}, null, 8, ["icon"])) : I("", !0), T(" " + k(u.value?.dataSource?.label || P(a).customBlocks.dataSource.fetchButton), 1)]))])) : I("", !0)])) : (O(), S("div", mi, [w(P(Hr), {
|
|
2353
2531
|
size: 24,
|
|
2354
2532
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2355
|
-
}), x("span",
|
|
2533
|
+
}), x("span", hi, k(P(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2356
2534
|
}
|
|
2357
|
-
}),
|
|
2535
|
+
}), Si = { class: "tpl:w-full" }, Ci = /* @__PURE__ */ L({
|
|
2358
2536
|
__name: "DividerBlock",
|
|
2359
2537
|
props: {
|
|
2360
2538
|
block: {},
|
|
2361
2539
|
viewport: {}
|
|
2362
2540
|
},
|
|
2363
2541
|
setup(e) {
|
|
2364
|
-
let t = e, n =
|
|
2542
|
+
let t = e, n = F(() => ({
|
|
2365
2543
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
2366
2544
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2367
2545
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2368
2546
|
}));
|
|
2369
|
-
return (e, t) => (O(), S("div",
|
|
2547
|
+
return (e, t) => (O(), S("div", Si, [x("hr", {
|
|
2370
2548
|
class: "tpl:m-0 tpl:border-none",
|
|
2371
2549
|
style: u(n.value)
|
|
2372
2550
|
}, null, 4)]));
|
|
2373
2551
|
}
|
|
2374
|
-
}),
|
|
2552
|
+
}), wi = { class: "tpl:w-full" }, Ti = ["srcdoc", "title"], Ei = {
|
|
2375
2553
|
key: 1,
|
|
2376
2554
|
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)]"
|
|
2377
|
-
},
|
|
2555
|
+
}, Di = {
|
|
2378
2556
|
key: 0,
|
|
2379
2557
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2380
|
-
},
|
|
2558
|
+
}, Oi = {
|
|
2381
2559
|
key: 1,
|
|
2382
2560
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2383
|
-
},
|
|
2561
|
+
}, ki = /* @__PURE__ */ L({
|
|
2384
2562
|
__name: "HtmlBlock",
|
|
2385
2563
|
props: {
|
|
2386
2564
|
block: {},
|
|
2387
2565
|
viewport: {}
|
|
2388
2566
|
},
|
|
2389
2567
|
setup(e) {
|
|
2390
|
-
let t = e, { t: n } =
|
|
2568
|
+
let t = e, { t: n } = Vt(), r = p(zt, !1), a = F(() => t.block.content.trim().length > 0), o = F(() => r && a.value), c = p(ht, []), l = p(ot, null), d = F(() => l?.value ? xe(t.block.content, c) : t.block.content), f = _(null), m = _(60), h = null;
|
|
2391
2569
|
function g() {
|
|
2392
2570
|
let e = f.value?.contentDocument;
|
|
2393
2571
|
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -2401,46 +2579,46 @@ var Br = { class: "tpl:w-full" }, Vr = {
|
|
|
2401
2579
|
e || (h?.disconnect(), h = null);
|
|
2402
2580
|
}), i(() => {
|
|
2403
2581
|
h?.disconnect(), h = null;
|
|
2404
|
-
}), (e, t) => (O(), S("div",
|
|
2582
|
+
}), (e, t) => (O(), S("div", wi, [o.value ? (O(), S("iframe", {
|
|
2405
2583
|
key: 0,
|
|
2406
2584
|
ref_key: "iframeRef",
|
|
2407
2585
|
ref: f,
|
|
2408
2586
|
srcdoc: d.value,
|
|
2409
2587
|
sandbox: "allow-same-origin",
|
|
2410
|
-
title:
|
|
2588
|
+
title: P(n).html.preview,
|
|
2411
2589
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2412
2590
|
style: u({ height: `${m.value}px` }),
|
|
2413
2591
|
onLoad: v
|
|
2414
|
-
}, null, 44,
|
|
2592
|
+
}, null, 44, Ti)) : (O(), S("div", Ei, [w(P(Fr), {
|
|
2415
2593
|
size: 24,
|
|
2416
2594
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2417
|
-
}), a.value ? (O(), S("span",
|
|
2595
|
+
}), a.value ? (O(), S("span", Di, k(P(n).html.preview), 1)) : (O(), S("span", Oi, k(P(n).html.empty), 1))]))]));
|
|
2418
2596
|
}
|
|
2419
|
-
}),
|
|
2420
|
-
function
|
|
2421
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 ||
|
|
2597
|
+
}), Ai = "image/";
|
|
2598
|
+
function ji(e) {
|
|
2599
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || ee(r), { isOverDropZone: a } = Qe(t, {
|
|
2422
2600
|
preventDefaultForUnhandled: !0,
|
|
2423
2601
|
onDrop: (e) => {
|
|
2424
2602
|
if (!i()) return;
|
|
2425
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2603
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Ai));
|
|
2426
2604
|
t.length > 0 && n([t[0]]);
|
|
2427
2605
|
}
|
|
2428
2606
|
});
|
|
2429
|
-
return { isOver:
|
|
2607
|
+
return { isOver: F(() => i() && a.value) };
|
|
2430
2608
|
}
|
|
2431
2609
|
//#endregion
|
|
2432
2610
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2433
|
-
var
|
|
2611
|
+
var Mi = {
|
|
2434
2612
|
key: 0,
|
|
2435
2613
|
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)]",
|
|
2436
2614
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
2437
|
-
},
|
|
2615
|
+
}, Ni = ["href"], Pi = ["src", "alt"], Fi = ["src", "alt"], Ii = {
|
|
2438
2616
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2439
2617
|
style: { opacity: "0.7" }
|
|
2440
|
-
},
|
|
2618
|
+
}, Li = ["href"], Ri = ["src", "alt"], zi = ["src", "alt"], Bi = {
|
|
2441
2619
|
key: 4,
|
|
2442
2620
|
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)]"
|
|
2443
|
-
},
|
|
2621
|
+
}, Vi = ["aria-label"], Hi = { key: 1 }, Ui = /* @__PURE__ */ L({
|
|
2444
2622
|
__name: "ImageBlock",
|
|
2445
2623
|
props: {
|
|
2446
2624
|
block: {},
|
|
@@ -2448,7 +2626,7 @@ var ai = {
|
|
|
2448
2626
|
},
|
|
2449
2627
|
emits: ["update"],
|
|
2450
2628
|
setup(e, { emit: t }) {
|
|
2451
|
-
let n = e, r = t, { t: i } =
|
|
2629
|
+
let n = e, r = t, { t: i } = Vt(), { syntax: a } = rn(), o = p(Dt, null), s = F(() => !!o), c = an();
|
|
2452
2630
|
async function l() {
|
|
2453
2631
|
let e = await o?.({ accept: ["images"] });
|
|
2454
2632
|
if (c.alive && e) {
|
|
@@ -2456,7 +2634,7 @@ var ai = {
|
|
|
2456
2634
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
2457
2635
|
}
|
|
2458
2636
|
}
|
|
2459
|
-
let d = _(), f = _(!1), m =
|
|
2637
|
+
let d = _(), f = _(!1), m = F(() => s.value && !f.value && !b.value);
|
|
2460
2638
|
async function h(e) {
|
|
2461
2639
|
if (o) {
|
|
2462
2640
|
f.value = !0;
|
|
@@ -2475,11 +2653,11 @@ var ai = {
|
|
|
2475
2653
|
}
|
|
2476
2654
|
}
|
|
2477
2655
|
}
|
|
2478
|
-
let { isOver: g } =
|
|
2656
|
+
let { isOver: g } = ji({
|
|
2479
2657
|
target: d,
|
|
2480
2658
|
enabled: m,
|
|
2481
2659
|
onFiles: h
|
|
2482
|
-
}), v =
|
|
2660
|
+
}), v = F(() => ({ textAlign: n.block.align })), y = F(() => {
|
|
2483
2661
|
let e = n.block.align;
|
|
2484
2662
|
return {
|
|
2485
2663
|
maxWidth: "100%",
|
|
@@ -2490,86 +2668,86 @@ var ai = {
|
|
|
2490
2668
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2491
2669
|
marginRight: e === "center" ? "auto" : void 0
|
|
2492
2670
|
};
|
|
2493
|
-
}), b =
|
|
2671
|
+
}), b = F(() => Me(n.block.src, a)), C = Pn(() => b.value ? void 0 : n.block.src), E = Pn(() => b.value ? n.block.placeholderUrl : void 0);
|
|
2494
2672
|
return (t, n) => (O(), S("div", {
|
|
2495
2673
|
ref_key: "dropZoneRef",
|
|
2496
2674
|
ref: d,
|
|
2497
2675
|
"data-testid": "image-drop-zone",
|
|
2498
2676
|
class: "tpl:relative tpl:w-full",
|
|
2499
2677
|
style: u(v.value)
|
|
2500
|
-
}, [m.value && (
|
|
2678
|
+
}, [m.value && (P(g) || f.value) ? (O(), S("div", Mi, [f.value ? (O(), S(N, { key: 0 }, [w(P(Yt), {
|
|
2501
2679
|
class: "tpl-spinner",
|
|
2502
2680
|
size: 20,
|
|
2503
2681
|
"stroke-width": 2
|
|
2504
|
-
}), T(" " + k(
|
|
2682
|
+
}), T(" " + k(P(i).image.uploading), 1)], 64)) : (O(), S(N, { key: 1 }, [w(P($t), {
|
|
2505
2683
|
size: 20,
|
|
2506
2684
|
"stroke-width": 1.5
|
|
2507
|
-
}), T(" " + k(
|
|
2685
|
+
}), T(" " + k(P(i).image.dropToUpload), 1)], 64))])) : I("", !0), e.block.src && b.value && e.block.placeholderUrl ? (O(), S(N, { key: 1 }, [e.block.linkUrl ? (O(), S("a", {
|
|
2508
2686
|
key: 0,
|
|
2509
2687
|
href: e.block.linkUrl,
|
|
2510
2688
|
target: "_blank",
|
|
2511
2689
|
rel: "noopener noreferrer",
|
|
2512
|
-
onClick: n[0] ||=
|
|
2690
|
+
onClick: n[0] ||= R(() => {}, ["prevent"])
|
|
2513
2691
|
}, [x("img", {
|
|
2514
2692
|
class: "tpl:border-0",
|
|
2515
2693
|
loading: "lazy",
|
|
2516
|
-
src:
|
|
2517
|
-
alt: e.block.alt ||
|
|
2694
|
+
src: P(E),
|
|
2695
|
+
alt: e.block.alt || P(i).image.altTextPlaceholder,
|
|
2518
2696
|
style: u(y.value)
|
|
2519
|
-
}, null, 12,
|
|
2697
|
+
}, null, 12, Pi)], 8, Ni)) : (O(), S("img", {
|
|
2520
2698
|
key: 1,
|
|
2521
2699
|
class: "tpl:border-0",
|
|
2522
|
-
src:
|
|
2700
|
+
src: P(E),
|
|
2523
2701
|
alt: e.block.alt,
|
|
2524
2702
|
style: u(y.value)
|
|
2525
|
-
}, null, 12,
|
|
2703
|
+
}, null, 12, Fi))], 64)) : e.block.src && b.value ? (O(), S("div", {
|
|
2526
2704
|
key: 2,
|
|
2527
2705
|
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)]",
|
|
2528
2706
|
style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
|
|
2529
|
-
}, [w(
|
|
2707
|
+
}, [w(P(Br), {
|
|
2530
2708
|
size: 32,
|
|
2531
2709
|
"stroke-width": 1.5,
|
|
2532
2710
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2533
2711
|
style: { opacity: "0.5" }
|
|
2534
|
-
}), x("span",
|
|
2712
|
+
}), x("span", Ii, [w(Ar, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (O(), S(N, { key: 3 }, [e.block.linkUrl ? (O(), S("a", {
|
|
2535
2713
|
key: 0,
|
|
2536
2714
|
href: e.block.linkUrl,
|
|
2537
2715
|
target: "_blank",
|
|
2538
2716
|
rel: "noopener noreferrer",
|
|
2539
|
-
onClick: n[1] ||=
|
|
2717
|
+
onClick: n[1] ||= R(() => {}, ["prevent"])
|
|
2540
2718
|
}, [x("img", {
|
|
2541
2719
|
class: "tpl:border-0",
|
|
2542
2720
|
loading: "lazy",
|
|
2543
|
-
src:
|
|
2544
|
-
alt: e.block.alt ||
|
|
2721
|
+
src: P(C),
|
|
2722
|
+
alt: e.block.alt || P(i).image.altTextPlaceholder,
|
|
2545
2723
|
style: u(y.value)
|
|
2546
|
-
}, null, 12,
|
|
2724
|
+
}, null, 12, Ri)], 8, Li)) : (O(), S("img", {
|
|
2547
2725
|
key: 1,
|
|
2548
2726
|
class: "tpl:border-0",
|
|
2549
|
-
src:
|
|
2727
|
+
src: P(C),
|
|
2550
2728
|
alt: e.block.alt,
|
|
2551
2729
|
style: u(y.value)
|
|
2552
|
-
}, null, 12,
|
|
2730
|
+
}, null, 12, zi))], 64)) : (O(), S("div", Bi, [s.value ? (O(), S("button", {
|
|
2553
2731
|
key: 0,
|
|
2554
|
-
"aria-label":
|
|
2732
|
+
"aria-label": P(i).image.browseMedia,
|
|
2555
2733
|
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)]",
|
|
2556
|
-
onClick:
|
|
2557
|
-
}, [w(
|
|
2734
|
+
onClick: R(l, ["stop"])
|
|
2735
|
+
}, [w(P(Br), {
|
|
2558
2736
|
size: 14,
|
|
2559
2737
|
"stroke-width": 1.5
|
|
2560
|
-
}), T(" " + k(
|
|
2738
|
+
}), T(" " + k(P(i).image.browseMedia), 1)], 8, Vi)) : (O(), S("span", Hi, k(P(i).image.clickToAdd), 1))]))], 4));
|
|
2561
2739
|
}
|
|
2562
|
-
}),
|
|
2740
|
+
}), Wi = { class: "tpl:w-full" }, Gi = ["href"], Ki = {
|
|
2563
2741
|
key: 1,
|
|
2564
2742
|
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)]"
|
|
2565
|
-
},
|
|
2743
|
+
}, qi = /* @__PURE__ */ L({
|
|
2566
2744
|
__name: "MenuBlock",
|
|
2567
2745
|
props: {
|
|
2568
2746
|
block: {},
|
|
2569
2747
|
viewport: {}
|
|
2570
2748
|
},
|
|
2571
2749
|
setup(e) {
|
|
2572
|
-
let t = e, { t: n } =
|
|
2750
|
+
let t = e, { t: n } = Vt(), r = F(() => ({
|
|
2573
2751
|
display: "flex",
|
|
2574
2752
|
flexWrap: "wrap",
|
|
2575
2753
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2577,14 +2755,14 @@ var ai = {
|
|
|
2577
2755
|
fontSize: `${t.block.fontSize}px`,
|
|
2578
2756
|
fontFamily: t.block.fontFamily || "inherit",
|
|
2579
2757
|
alignItems: "center"
|
|
2580
|
-
})), i =
|
|
2758
|
+
})), i = F(() => t.block.items.length > 0);
|
|
2581
2759
|
function a(e) {
|
|
2582
2760
|
return e || t.block.linkColor || t.block.color;
|
|
2583
2761
|
}
|
|
2584
|
-
return (t, o) => (O(), S("div",
|
|
2762
|
+
return (t, o) => (O(), S("div", Wi, [i.value ? (O(), S("div", {
|
|
2585
2763
|
key: 0,
|
|
2586
2764
|
style: u(r.value)
|
|
2587
|
-
}, [(O(!0), S(
|
|
2765
|
+
}, [(O(!0), S(N, null, D(e.block.items, (t, n) => (O(), S(N, { key: t.id }, [x("a", {
|
|
2588
2766
|
href: t.url || "#",
|
|
2589
2767
|
class: "tpl:cursor-default tpl:no-underline",
|
|
2590
2768
|
style: u({
|
|
@@ -2592,16 +2770,16 @@ var ai = {
|
|
|
2592
2770
|
fontWeight: t.bold ? "bold" : "normal",
|
|
2593
2771
|
textDecoration: t.underline ? "underline" : "none"
|
|
2594
2772
|
}),
|
|
2595
|
-
onClick: o[0] ||=
|
|
2596
|
-
}, [w(
|
|
2773
|
+
onClick: o[0] ||= R(() => {}, ["prevent"])
|
|
2774
|
+
}, [w(Ar, { text: t.text || "..." }, null, 8, ["text"])], 12, Gi), n < e.block.items.length - 1 ? (O(), S("span", {
|
|
2597
2775
|
key: 0,
|
|
2598
2776
|
style: u({
|
|
2599
2777
|
color: e.block.separatorColor,
|
|
2600
2778
|
padding: `0 ${e.block.spacing}px`
|
|
2601
2779
|
})
|
|
2602
|
-
}, k(e.block.separator), 5)) :
|
|
2780
|
+
}, k(e.block.separator), 5)) : I("", !0)], 64))), 128))], 4)) : (O(), S("div", Ki, [w(P(Vr), { size: 16 }), x("span", null, k(P(n).menu.addLinks), 1)]))]));
|
|
2603
2781
|
}
|
|
2604
|
-
}),
|
|
2782
|
+
}), Ji = /* @__PURE__ */ new Set([
|
|
2605
2783
|
"http",
|
|
2606
2784
|
"https",
|
|
2607
2785
|
"mailto",
|
|
@@ -2611,7 +2789,7 @@ var ai = {
|
|
|
2611
2789
|
"sms",
|
|
2612
2790
|
"xmpp",
|
|
2613
2791
|
"cid"
|
|
2614
|
-
]),
|
|
2792
|
+
]), Yi = /* @__PURE__ */ new Set([
|
|
2615
2793
|
"SCRIPT",
|
|
2616
2794
|
"STYLE",
|
|
2617
2795
|
"IFRAME",
|
|
@@ -2621,7 +2799,7 @@ var ai = {
|
|
|
2621
2799
|
"META",
|
|
2622
2800
|
"BASE",
|
|
2623
2801
|
"FORM"
|
|
2624
|
-
]),
|
|
2802
|
+
]), Xi = /* @__PURE__ */ new Set([
|
|
2625
2803
|
"href",
|
|
2626
2804
|
"xlink:href",
|
|
2627
2805
|
"formaction",
|
|
@@ -2630,16 +2808,16 @@ var ai = {
|
|
|
2630
2808
|
"background",
|
|
2631
2809
|
"poster"
|
|
2632
2810
|
]);
|
|
2633
|
-
function
|
|
2811
|
+
function Zi(e, t) {
|
|
2634
2812
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2635
2813
|
if (!n || n.startsWith("#")) return !0;
|
|
2636
2814
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2637
2815
|
if (!r) return !0;
|
|
2638
2816
|
let i = r[1].toLowerCase();
|
|
2639
|
-
return
|
|
2817
|
+
return Ji.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2640
2818
|
}
|
|
2641
|
-
function
|
|
2642
|
-
if (
|
|
2819
|
+
function Qi(e) {
|
|
2820
|
+
if (Yi.has(e.tagName)) {
|
|
2643
2821
|
e.remove();
|
|
2644
2822
|
return;
|
|
2645
2823
|
}
|
|
@@ -2651,29 +2829,29 @@ function Ti(e) {
|
|
|
2651
2829
|
e.removeAttribute(n);
|
|
2652
2830
|
continue;
|
|
2653
2831
|
}
|
|
2654
|
-
if (
|
|
2655
|
-
|
|
2832
|
+
if (Xi.has(t)) {
|
|
2833
|
+
Zi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2656
2834
|
continue;
|
|
2657
2835
|
}
|
|
2658
2836
|
if (t === "src") {
|
|
2659
|
-
|
|
2837
|
+
Zi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2660
2838
|
continue;
|
|
2661
2839
|
}
|
|
2662
2840
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2663
2841
|
}
|
|
2664
2842
|
let n = Array.from(e.children);
|
|
2665
|
-
for (let e of n)
|
|
2843
|
+
for (let e of n) Qi(e);
|
|
2666
2844
|
}
|
|
2667
|
-
function
|
|
2845
|
+
function $i(e) {
|
|
2668
2846
|
if (typeof DOMParser > "u") return e;
|
|
2669
2847
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2670
|
-
for (let e of n)
|
|
2848
|
+
for (let e of n) Qi(e);
|
|
2671
2849
|
return t.innerHTML;
|
|
2672
2850
|
}
|
|
2673
2851
|
//#endregion
|
|
2674
2852
|
//#region src/composables/useEditableTextBlock.ts
|
|
2675
|
-
function
|
|
2676
|
-
let t = p(
|
|
2853
|
+
function ea(e) {
|
|
2854
|
+
let t = p(ht, []), n = p(ot, null), { syntax: r } = rn(), i = F(() => n?.value ? de(e(), t) : Ge(e(), t)), a = F(() => $i(ve(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = $e(s), { toLocal: u } = qt(), d = F(() => u({
|
|
2677
2855
|
top: c.value - 8,
|
|
2678
2856
|
left: l.value
|
|
2679
2857
|
}));
|
|
@@ -2694,24 +2872,24 @@ function Di(e) {
|
|
|
2694
2872
|
}
|
|
2695
2873
|
//#endregion
|
|
2696
2874
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2697
|
-
var
|
|
2875
|
+
var ta = ["innerHTML"], na = /* @__PURE__ */ L({
|
|
2698
2876
|
__name: "ParagraphBlock",
|
|
2699
2877
|
props: {
|
|
2700
2878
|
block: {},
|
|
2701
2879
|
viewport: {}
|
|
2702
2880
|
},
|
|
2703
2881
|
setup(e) {
|
|
2704
|
-
let t = e, n = y(() => import("./ParagraphEditor-
|
|
2882
|
+
let t = e, n = y(() => import("./ParagraphEditor-Dr-u72hu.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ea(() => t.block.content);
|
|
2705
2883
|
return (t, l) => (O(), S("div", {
|
|
2706
2884
|
ref_key: "blockRef",
|
|
2707
2885
|
ref: i,
|
|
2708
2886
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2709
|
-
onDblclick: l[0] ||= (...e) =>
|
|
2710
|
-
}, [
|
|
2887
|
+
onDblclick: l[0] ||= (...e) => P(s) && P(s)(...e)
|
|
2888
|
+
}, [P(r) ? (O(), A(P(n), {
|
|
2711
2889
|
key: 0,
|
|
2712
2890
|
block: e.block,
|
|
2713
|
-
"toolbar-position":
|
|
2714
|
-
onDone:
|
|
2891
|
+
"toolbar-position": P(a),
|
|
2892
|
+
onDone: P(c)
|
|
2715
2893
|
}, null, 8, [
|
|
2716
2894
|
"block",
|
|
2717
2895
|
"toolbar-position",
|
|
@@ -2719,55 +2897,55 @@ var Oi = ["innerHTML"], ki = /* @__PURE__ */ I({
|
|
|
2719
2897
|
])) : (O(), S("div", {
|
|
2720
2898
|
key: 1,
|
|
2721
2899
|
class: "tpl-text-content tpl:outline-none",
|
|
2722
|
-
innerHTML:
|
|
2723
|
-
}, null, 8,
|
|
2900
|
+
innerHTML: P(o)
|
|
2901
|
+
}, null, 8, ta))], 544));
|
|
2724
2902
|
}
|
|
2725
2903
|
});
|
|
2726
2904
|
//#endregion
|
|
2727
2905
|
//#region src/utils/blockComponentResolver.ts
|
|
2728
|
-
function
|
|
2906
|
+
function ra(e) {
|
|
2729
2907
|
let t = { fontFamily: e.fontFamily };
|
|
2730
2908
|
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;
|
|
2731
2909
|
}
|
|
2732
|
-
function
|
|
2910
|
+
function ia(e, t, n) {
|
|
2733
2911
|
if (t) {
|
|
2734
2912
|
let n = t.getComponent(e);
|
|
2735
2913
|
if (n) return n;
|
|
2736
2914
|
}
|
|
2737
2915
|
return n[e.type] ?? null;
|
|
2738
2916
|
}
|
|
2739
|
-
function
|
|
2917
|
+
function aa(e) {
|
|
2740
2918
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2741
2919
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2742
2920
|
backgroundColor: n || "transparent"
|
|
2743
2921
|
};
|
|
2744
|
-
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
2922
|
+
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;
|
|
2745
2923
|
}
|
|
2746
|
-
function
|
|
2924
|
+
function oa(e) {
|
|
2747
2925
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2748
2926
|
let t = e.wrapper, n = {};
|
|
2749
2927
|
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;
|
|
2750
2928
|
}
|
|
2751
2929
|
//#endregion
|
|
2752
2930
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2753
|
-
var
|
|
2931
|
+
var sa = [
|
|
2754
2932
|
"data-block-id",
|
|
2755
2933
|
"data-block-type",
|
|
2756
2934
|
"data-tpl-picked"
|
|
2757
|
-
],
|
|
2935
|
+
], ca = ["aria-label"], la = [
|
|
2758
2936
|
"aria-label",
|
|
2759
2937
|
"aria-pressed",
|
|
2760
2938
|
"title"
|
|
2761
|
-
],
|
|
2939
|
+
], ua = ["aria-label", "title"], da = ["aria-label", "title"], fa = ["aria-label", "title"], pa = {
|
|
2762
2940
|
key: 1,
|
|
2763
2941
|
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"
|
|
2764
|
-
},
|
|
2942
|
+
}, ma = { 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)]" }, ha = {
|
|
2765
2943
|
key: 2,
|
|
2766
2944
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2767
|
-
},
|
|
2945
|
+
}, ga = ["aria-label", "title"], _a = {
|
|
2768
2946
|
key: 3,
|
|
2769
2947
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2770
|
-
},
|
|
2948
|
+
}, va = ["aria-label"], ya = /*#__PURE__*/ tn(/* @__PURE__ */ L({
|
|
2771
2949
|
__name: "BlockWrapper",
|
|
2772
2950
|
props: {
|
|
2773
2951
|
block: {},
|
|
@@ -2779,7 +2957,7 @@ var Pi = [
|
|
|
2779
2957
|
},
|
|
2780
2958
|
emits: ["select"],
|
|
2781
2959
|
setup(e, { emit: t }) {
|
|
2782
|
-
let n = y(() => import("./BlockIssueBadge-
|
|
2960
|
+
let n = y(() => import("./BlockIssueBadge-BI6v_eol.js")), i = e, a = t, { t: o, format: s } = Vt(), l = p(Rt, null), d = _(null), f = F(() => l?.liftedBlockId.value === i.block.id), h = F(() => f.value ? s(o.blockActions.dragLifted, { block: i.block.type }) : o.blockActions.drag);
|
|
2783
2961
|
async function g() {
|
|
2784
2962
|
await m(), d.value?.focus();
|
|
2785
2963
|
}
|
|
@@ -2802,26 +2980,26 @@ var Pi = [
|
|
|
2802
2980
|
}
|
|
2803
2981
|
}
|
|
2804
2982
|
}
|
|
2805
|
-
let b =
|
|
2983
|
+
let b = F(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), C = F(() => i.previewMode === !0 && b.value), E = F(() => i.viewport ? {
|
|
2806
2984
|
desktop: o.viewport.desktop,
|
|
2807
2985
|
mobile: o.viewport.mobile
|
|
2808
|
-
}[i.viewport] ?? i.viewport : ""), D =
|
|
2809
|
-
function
|
|
2986
|
+
}[i.viewport] ?? i.viewport : ""), D = F(() => !!i.block.displayCondition), A = p(bt, null), j = p(Ct, null), M = p(St, {}), N = F(() => M.savedBlocks?.isPicking.value === !0), ee = F(() => !i.nested && M.savedBlocks?.isAvailable.value === !0 && M.savedBlocks?.canCreate.value === !0), L = F(() => i.isSelected && !N.value), te = F(() => M.comments?.getBlockCount(i.block.id) ?? 0), ne = F(() => aa(i.block)), re = F(() => oa(i.block));
|
|
2987
|
+
function ie(e) {
|
|
2810
2988
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2811
2989
|
}
|
|
2812
|
-
function
|
|
2990
|
+
function ae() {
|
|
2813
2991
|
A?.deleteBlock(i.block.id);
|
|
2814
2992
|
}
|
|
2815
|
-
function
|
|
2993
|
+
function oe() {
|
|
2816
2994
|
A?.duplicateBlock(i.block);
|
|
2817
2995
|
}
|
|
2818
|
-
function
|
|
2819
|
-
|
|
2996
|
+
function se() {
|
|
2997
|
+
M.savedBlocks?.startPicking(i.block.id);
|
|
2820
2998
|
}
|
|
2821
|
-
function
|
|
2822
|
-
|
|
2999
|
+
function ce() {
|
|
3000
|
+
j?.toggleBlock(i.block.id);
|
|
2823
3001
|
}
|
|
2824
|
-
return (t, i) => C.value ?
|
|
3002
|
+
return (t, i) => C.value ? I("", !0) : (O(), S("div", {
|
|
2825
3003
|
key: 0,
|
|
2826
3004
|
class: r(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2827
3005
|
"tpl-block--selected": e.isSelected,
|
|
@@ -2832,13 +3010,13 @@ var Pi = [
|
|
|
2832
3010
|
"data-block-id": e.block.id,
|
|
2833
3011
|
"data-block-type": e.block.type,
|
|
2834
3012
|
"data-tpl-picked": e.picked || void 0,
|
|
2835
|
-
onClick:
|
|
3013
|
+
onClick: ie
|
|
2836
3014
|
}, [
|
|
2837
|
-
w(
|
|
2838
|
-
|
|
3015
|
+
w(P(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
3016
|
+
L.value ? (O(), S("div", {
|
|
2839
3017
|
key: 0,
|
|
2840
3018
|
role: "toolbar",
|
|
2841
|
-
"aria-label":
|
|
3019
|
+
"aria-label": P(o).blockActions.drag,
|
|
2842
3020
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2843
3021
|
}, [
|
|
2844
3022
|
x("button", {
|
|
@@ -2848,111 +3026,111 @@ var Pi = [
|
|
|
2848
3026
|
"aria-label": h.value,
|
|
2849
3027
|
"aria-pressed": f.value,
|
|
2850
3028
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2851
|
-
title:
|
|
3029
|
+
title: P(o).blockActions.drag,
|
|
2852
3030
|
onKeydown: v
|
|
2853
|
-
}, [w(
|
|
3031
|
+
}, [w(P(zr), {
|
|
2854
3032
|
size: 14,
|
|
2855
3033
|
"stroke-width": 1.5
|
|
2856
|
-
})], 40,
|
|
3034
|
+
})], 40, la),
|
|
2857
3035
|
x("button", {
|
|
2858
3036
|
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",
|
|
2859
|
-
"aria-label":
|
|
2860
|
-
title:
|
|
2861
|
-
onClick:
|
|
2862
|
-
}, [w(
|
|
3037
|
+
"aria-label": P(o).blockActions.duplicate,
|
|
3038
|
+
title: P(o).blockActions.duplicate,
|
|
3039
|
+
onClick: R(oe, ["stop"])
|
|
3040
|
+
}, [w(P(Ir), {
|
|
2863
3041
|
size: 14,
|
|
2864
3042
|
"stroke-width": 1.5
|
|
2865
|
-
})], 8,
|
|
2866
|
-
|
|
3043
|
+
})], 8, ua),
|
|
3044
|
+
ee.value ? (O(), S("button", {
|
|
2867
3045
|
key: 0,
|
|
2868
3046
|
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",
|
|
2869
|
-
"aria-label":
|
|
2870
|
-
title:
|
|
2871
|
-
onClick:
|
|
2872
|
-
}, [w(
|
|
3047
|
+
"aria-label": P(o).blockActions.saveAsBlock,
|
|
3048
|
+
title: P(o).blockActions.saveAsBlock,
|
|
3049
|
+
onClick: R(se, ["stop"])
|
|
3050
|
+
}, [w(P(Nr), {
|
|
2873
3051
|
size: 14,
|
|
2874
3052
|
"stroke-width": 1.5
|
|
2875
|
-
})], 8,
|
|
3053
|
+
})], 8, da)) : I("", !0),
|
|
2876
3054
|
x("button", {
|
|
2877
3055
|
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",
|
|
2878
|
-
"aria-label":
|
|
2879
|
-
title:
|
|
2880
|
-
onClick:
|
|
2881
|
-
}, [w(
|
|
3056
|
+
"aria-label": P(o).blockActions.delete,
|
|
3057
|
+
title: P(o).blockActions.delete,
|
|
3058
|
+
onClick: R(ae, ["stop"])
|
|
3059
|
+
}, [w(P(Zt), {
|
|
2882
3060
|
size: 14,
|
|
2883
3061
|
"stroke-width": 1.5
|
|
2884
|
-
})], 8,
|
|
2885
|
-
], 8,
|
|
2886
|
-
b.value ? (O(), S("div",
|
|
3062
|
+
})], 8, fa)
|
|
3063
|
+
], 8, ca)) : I("", !0),
|
|
3064
|
+
b.value ? (O(), S("div", pa, [x("span", ma, [w(P(Lr), {
|
|
2887
3065
|
size: 12,
|
|
2888
3066
|
"stroke-width": 1.5
|
|
2889
|
-
}), T(" " + k(
|
|
2890
|
-
D.value && !b.value ? (O(), S("div",
|
|
3067
|
+
}), T(" " + k(P(s)(P(o).blockActions.hiddenOnViewport, { viewport: E.value })), 1)])])) : I("", !0),
|
|
3068
|
+
D.value && !b.value ? (O(), S("div", ha, [x("button", {
|
|
2891
3069
|
"data-testid": "condition-toggle",
|
|
2892
3070
|
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)]",
|
|
2893
|
-
"aria-label":
|
|
3071
|
+
"aria-label": P(o).blockActions.conditionToggle,
|
|
2894
3072
|
title: e.block.displayCondition?.label,
|
|
2895
|
-
onClick:
|
|
2896
|
-
}, [w(
|
|
3073
|
+
onClick: R(ce, ["stop"])
|
|
3074
|
+
}, [w(P(Rr), {
|
|
2897
3075
|
size: 12,
|
|
2898
3076
|
"stroke-width": 2
|
|
2899
|
-
})], 8,
|
|
2900
|
-
|
|
3077
|
+
})], 8, ga)])) : I("", !0),
|
|
3078
|
+
te.value > 0 && !b.value ? (O(), S("div", _a, [x("button", {
|
|
2901
3079
|
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)]",
|
|
2902
|
-
"aria-label":
|
|
2903
|
-
onClick: i[0] ||=
|
|
2904
|
-
}, [w(
|
|
3080
|
+
"aria-label": P(s)(P(o).blockActions.comments, { count: String(te.value) }),
|
|
3081
|
+
onClick: i[0] ||= R((t) => P(M).comments?.openForBlock(e.block.id), ["stop"])
|
|
3082
|
+
}, [w(P(Xt), {
|
|
2905
3083
|
size: 12,
|
|
2906
3084
|
"stroke-width": 2.5
|
|
2907
|
-
}), T(" " + k(
|
|
2908
|
-
|
|
3085
|
+
}), T(" " + k(te.value), 1)], 8, va)])) : I("", !0),
|
|
3086
|
+
re.value ? (O(), S("div", {
|
|
2909
3087
|
key: 4,
|
|
2910
3088
|
class: "tpl-section-wrapper",
|
|
2911
|
-
style: u(
|
|
3089
|
+
style: u(re.value)
|
|
2912
3090
|
}, [x("div", {
|
|
2913
3091
|
class: "tpl-block-content",
|
|
2914
|
-
style: u(
|
|
3092
|
+
style: u(ne.value)
|
|
2915
3093
|
}, [c(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (O(), S("div", {
|
|
2916
3094
|
key: 5,
|
|
2917
3095
|
class: "tpl-block-content",
|
|
2918
|
-
style: u(
|
|
3096
|
+
style: u(ne.value)
|
|
2919
3097
|
}, [c(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2920
|
-
], 10,
|
|
3098
|
+
], 10, sa));
|
|
2921
3099
|
}
|
|
2922
3100
|
}), [["__scopeId", "data-v-2c239048"]]);
|
|
2923
3101
|
//#endregion
|
|
2924
3102
|
//#region src/utils/unwrapParagraph.ts
|
|
2925
|
-
function
|
|
3103
|
+
function ba(e) {
|
|
2926
3104
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2927
3105
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2928
3106
|
}
|
|
2929
3107
|
//#endregion
|
|
2930
3108
|
//#region src/components/blocks/TitleBlock.vue
|
|
2931
|
-
var
|
|
3109
|
+
var xa = /* @__PURE__ */ L({
|
|
2932
3110
|
__name: "TitleBlock",
|
|
2933
3111
|
props: {
|
|
2934
3112
|
block: {},
|
|
2935
3113
|
viewport: {}
|
|
2936
3114
|
},
|
|
2937
3115
|
setup(e) {
|
|
2938
|
-
let t = e, n = y(() => import("./TitleEditor-
|
|
3116
|
+
let t = e, n = y(() => import("./TitleEditor-_taBpBfB.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ea(() => t.block.content), l = F(() => {
|
|
2939
3117
|
let e = {
|
|
2940
3118
|
fontSize: `${Le[t.block.level]}px`,
|
|
2941
3119
|
textAlign: t.block.textAlign
|
|
2942
3120
|
};
|
|
2943
3121
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2944
|
-
}), f =
|
|
3122
|
+
}), f = F(() => `h${t.block.level}`), p = F(() => ba(o.value));
|
|
2945
3123
|
return (t, o) => (O(), S("div", {
|
|
2946
3124
|
ref_key: "blockRef",
|
|
2947
3125
|
ref: i,
|
|
2948
3126
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2949
3127
|
style: u(l.value),
|
|
2950
|
-
onDblclick: o[0] ||= (...e) =>
|
|
2951
|
-
}, [
|
|
3128
|
+
onDblclick: o[0] ||= (...e) => P(s) && P(s)(...e)
|
|
3129
|
+
}, [P(r) ? (O(), A(P(n), {
|
|
2952
3130
|
key: 0,
|
|
2953
3131
|
block: e.block,
|
|
2954
|
-
"toolbar-position":
|
|
2955
|
-
onDone:
|
|
3132
|
+
"toolbar-position": P(a),
|
|
3133
|
+
onDone: P(c)
|
|
2956
3134
|
}, null, 8, [
|
|
2957
3135
|
"block",
|
|
2958
3136
|
"toolbar-position",
|
|
@@ -2967,88 +3145,88 @@ var Ji = /* @__PURE__ */ I({
|
|
|
2967
3145
|
});
|
|
2968
3146
|
//#endregion
|
|
2969
3147
|
//#region src/utils/sectionColumnDrop.ts
|
|
2970
|
-
function
|
|
3148
|
+
function Sa(e) {
|
|
2971
3149
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2972
3150
|
}
|
|
2973
3151
|
//#endregion
|
|
2974
3152
|
//#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
|
|
2975
|
-
var
|
|
3153
|
+
var Ca = Object.defineProperty, wa = Object.getOwnPropertySymbols, Ta = Object.prototype.hasOwnProperty, Ea = Object.prototype.propertyIsEnumerable, Da = (e, t, n) => t in e ? Ca(e, t, {
|
|
2976
3154
|
enumerable: !0,
|
|
2977
3155
|
configurable: !0,
|
|
2978
3156
|
writable: !0,
|
|
2979
3157
|
value: n
|
|
2980
|
-
}) : e[t] = n,
|
|
2981
|
-
for (var n in t ||= {})
|
|
2982
|
-
if (
|
|
3158
|
+
}) : e[t] = n, Oa = (e, t) => {
|
|
3159
|
+
for (var n in t ||= {}) Ta.call(t, n) && Da(e, n, t[n]);
|
|
3160
|
+
if (wa) for (var n of wa(t)) Ea.call(t, n) && Da(e, n, t[n]);
|
|
2983
3161
|
return e;
|
|
2984
|
-
},
|
|
3162
|
+
}, ka = (e, t) => {
|
|
2985
3163
|
var n = {};
|
|
2986
|
-
for (var r in e)
|
|
2987
|
-
if (e != null &&
|
|
3164
|
+
for (var r in e) Ta.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
3165
|
+
if (e != null && wa) for (var r of wa(e)) t.indexOf(r) < 0 && Ea.call(e, r) && (n[r] = e[r]);
|
|
2988
3166
|
return n;
|
|
2989
|
-
},
|
|
2990
|
-
function
|
|
2991
|
-
console.warn(
|
|
3167
|
+
}, Aa = "[vue-draggable-plus]: ";
|
|
3168
|
+
function ja(e) {
|
|
3169
|
+
console.warn(Aa + e);
|
|
2992
3170
|
}
|
|
2993
|
-
function
|
|
2994
|
-
console.error(
|
|
3171
|
+
function Ma(e) {
|
|
3172
|
+
console.error(Aa + e);
|
|
2995
3173
|
}
|
|
2996
|
-
function
|
|
3174
|
+
function Na(e, t, n) {
|
|
2997
3175
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2998
3176
|
}
|
|
2999
|
-
function
|
|
3177
|
+
function Pa(e) {
|
|
3000
3178
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
3001
3179
|
}
|
|
3002
|
-
function
|
|
3003
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
3180
|
+
function Fa(e) {
|
|
3181
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Pa(n)] = e[n]), t), {});
|
|
3004
3182
|
}
|
|
3005
|
-
function
|
|
3183
|
+
function Ia(e, t) {
|
|
3006
3184
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
3007
3185
|
}
|
|
3008
|
-
function
|
|
3186
|
+
function La(e, t, n) {
|
|
3009
3187
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
3010
3188
|
}
|
|
3011
|
-
function
|
|
3189
|
+
function Ra(e) {
|
|
3012
3190
|
return e === void 0;
|
|
3013
3191
|
}
|
|
3014
|
-
function
|
|
3192
|
+
function za(e) {
|
|
3015
3193
|
return typeof e == "string";
|
|
3016
3194
|
}
|
|
3017
|
-
function
|
|
3195
|
+
function Ba(e, t, n) {
|
|
3018
3196
|
let r = e.children[n];
|
|
3019
3197
|
e.insertBefore(t, r);
|
|
3020
3198
|
}
|
|
3021
|
-
function
|
|
3199
|
+
function Va(e) {
|
|
3022
3200
|
e.parentNode && e.parentNode.removeChild(e);
|
|
3023
3201
|
}
|
|
3024
|
-
function
|
|
3202
|
+
function Ha(e, t = document) {
|
|
3025
3203
|
let n = null;
|
|
3026
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
3204
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || ja(`Element not found: ${e}`), n;
|
|
3027
3205
|
}
|
|
3028
|
-
function
|
|
3206
|
+
function Ua(e, t, n = null) {
|
|
3029
3207
|
return function(...r) {
|
|
3030
3208
|
return e.apply(n, r), t.apply(n, r);
|
|
3031
3209
|
};
|
|
3032
3210
|
}
|
|
3033
|
-
function
|
|
3034
|
-
let n =
|
|
3211
|
+
function Wa(e, t) {
|
|
3212
|
+
let n = Oa({}, e);
|
|
3035
3213
|
return Object.keys(t).forEach((r) => {
|
|
3036
|
-
n[r] ? n[r] =
|
|
3214
|
+
n[r] ? n[r] = Ua(e[r], t[r]) : n[r] = t[r];
|
|
3037
3215
|
}), n;
|
|
3038
3216
|
}
|
|
3039
|
-
function
|
|
3217
|
+
function Ga(e) {
|
|
3040
3218
|
return e instanceof HTMLElement;
|
|
3041
3219
|
}
|
|
3042
|
-
function
|
|
3220
|
+
function Ka(e, t) {
|
|
3043
3221
|
Object.keys(e).forEach((n) => {
|
|
3044
3222
|
t(n, e[n]);
|
|
3045
3223
|
});
|
|
3046
3224
|
}
|
|
3047
|
-
function
|
|
3225
|
+
function qa(e) {
|
|
3048
3226
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
3049
3227
|
}
|
|
3050
|
-
var
|
|
3051
|
-
function
|
|
3228
|
+
var Ja = Object.assign;
|
|
3229
|
+
function Ya(e, t) {
|
|
3052
3230
|
var n = Object.keys(e);
|
|
3053
3231
|
if (Object.getOwnPropertySymbols) {
|
|
3054
3232
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -3058,26 +3236,26 @@ function Sa(e, t) {
|
|
|
3058
3236
|
}
|
|
3059
3237
|
return n;
|
|
3060
3238
|
}
|
|
3061
|
-
function
|
|
3239
|
+
function Xa(e) {
|
|
3062
3240
|
for (var t = 1; t < arguments.length; t++) {
|
|
3063
3241
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
3064
|
-
t % 2 ?
|
|
3065
|
-
|
|
3066
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
3242
|
+
t % 2 ? Ya(Object(n), !0).forEach(function(t) {
|
|
3243
|
+
Qa(e, t, n[t]);
|
|
3244
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ya(Object(n)).forEach(function(t) {
|
|
3067
3245
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
3068
3246
|
});
|
|
3069
3247
|
}
|
|
3070
3248
|
return e;
|
|
3071
3249
|
}
|
|
3072
|
-
function
|
|
3250
|
+
function Za(e) {
|
|
3073
3251
|
"@babel/helpers - typeof";
|
|
3074
|
-
return
|
|
3252
|
+
return Za = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
3075
3253
|
return typeof e;
|
|
3076
3254
|
} : function(e) {
|
|
3077
3255
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3078
|
-
},
|
|
3256
|
+
}, Za(e);
|
|
3079
3257
|
}
|
|
3080
|
-
function
|
|
3258
|
+
function Qa(e, t, n) {
|
|
3081
3259
|
return t in e ? Object.defineProperty(e, t, {
|
|
3082
3260
|
value: n,
|
|
3083
3261
|
enumerable: !0,
|
|
@@ -3085,45 +3263,44 @@ function Ta(e, t, n) {
|
|
|
3085
3263
|
writable: !0
|
|
3086
3264
|
}) : e[t] = n, e;
|
|
3087
3265
|
}
|
|
3088
|
-
function
|
|
3089
|
-
return
|
|
3266
|
+
function $a() {
|
|
3267
|
+
return $a = Object.assign || function(e) {
|
|
3090
3268
|
for (var t = 1; t < arguments.length; t++) {
|
|
3091
3269
|
var n = arguments[t];
|
|
3092
3270
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3093
3271
|
}
|
|
3094
3272
|
return e;
|
|
3095
|
-
},
|
|
3273
|
+
}, $a.apply(this, arguments);
|
|
3096
3274
|
}
|
|
3097
|
-
function
|
|
3275
|
+
function eo(e, t) {
|
|
3098
3276
|
if (e == null) return {};
|
|
3099
|
-
var n = {}, r = Object.keys(e), i, a;
|
|
3100
|
-
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
3277
|
+
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]);
|
|
3101
3278
|
return n;
|
|
3102
3279
|
}
|
|
3103
|
-
function
|
|
3280
|
+
function to(e, t) {
|
|
3104
3281
|
if (e == null) return {};
|
|
3105
|
-
var n =
|
|
3282
|
+
var n = eo(e, t), r, i;
|
|
3106
3283
|
if (Object.getOwnPropertySymbols) {
|
|
3107
3284
|
var a = Object.getOwnPropertySymbols(e);
|
|
3108
3285
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
3109
3286
|
}
|
|
3110
3287
|
return n;
|
|
3111
3288
|
}
|
|
3112
|
-
var
|
|
3113
|
-
function
|
|
3289
|
+
var no = "1.15.2";
|
|
3290
|
+
function ro(e) {
|
|
3114
3291
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
3115
3292
|
}
|
|
3116
|
-
var
|
|
3293
|
+
var io = ro(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ao = ro(/Edge/i), oo = ro(/firefox/i), so = ro(/safari/i) && !ro(/chrome/i) && !ro(/android/i), co = ro(/iP(ad|od|hone)/i), lo = ro(/chrome/i) && ro(/android/i), uo = {
|
|
3117
3294
|
capture: !1,
|
|
3118
3295
|
passive: !1
|
|
3119
3296
|
};
|
|
3120
|
-
function R(e, t, n) {
|
|
3121
|
-
e.addEventListener(t, n, !ja && La);
|
|
3122
|
-
}
|
|
3123
3297
|
function z(e, t, n) {
|
|
3124
|
-
e.
|
|
3298
|
+
e.addEventListener(t, n, !io && uo);
|
|
3299
|
+
}
|
|
3300
|
+
function B(e, t, n) {
|
|
3301
|
+
e.removeEventListener(t, n, !io && uo);
|
|
3125
3302
|
}
|
|
3126
|
-
function
|
|
3303
|
+
function fo(e, t) {
|
|
3127
3304
|
if (t) {
|
|
3128
3305
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
3129
3306
|
if (e.matches) return e.matches(t);
|
|
@@ -3135,41 +3312,41 @@ function Ra(e, t) {
|
|
|
3135
3312
|
return !1;
|
|
3136
3313
|
}
|
|
3137
3314
|
}
|
|
3138
|
-
function
|
|
3315
|
+
function po(e) {
|
|
3139
3316
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
3140
3317
|
}
|
|
3141
|
-
function
|
|
3318
|
+
function mo(e, t, n, r) {
|
|
3142
3319
|
if (e) {
|
|
3143
3320
|
n ||= document;
|
|
3144
3321
|
do {
|
|
3145
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
3322
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && fo(e, t) : fo(e, t)) || r && e === n) return e;
|
|
3146
3323
|
if (e === n) break;
|
|
3147
|
-
} while (e =
|
|
3324
|
+
} while (e = po(e));
|
|
3148
3325
|
}
|
|
3149
3326
|
return null;
|
|
3150
3327
|
}
|
|
3151
|
-
var
|
|
3152
|
-
function
|
|
3153
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
3328
|
+
var ho = /\s+/g;
|
|
3329
|
+
function go(e, t, n) {
|
|
3330
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ho, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ho, " "));
|
|
3154
3331
|
}
|
|
3155
|
-
function
|
|
3332
|
+
function V(e, t, n) {
|
|
3156
3333
|
var r = e && e.style;
|
|
3157
3334
|
if (r) {
|
|
3158
3335
|
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];
|
|
3159
3336
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
3160
3337
|
}
|
|
3161
3338
|
}
|
|
3162
|
-
function
|
|
3339
|
+
function _o(e, t) {
|
|
3163
3340
|
var n = "";
|
|
3164
3341
|
if (typeof e == "string") n = e;
|
|
3165
3342
|
else do {
|
|
3166
|
-
var r =
|
|
3343
|
+
var r = V(e, "transform");
|
|
3167
3344
|
r && r !== "none" && (n = r + " " + n);
|
|
3168
3345
|
} while (!t && (e = e.parentNode));
|
|
3169
3346
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
3170
3347
|
return i && new i(n);
|
|
3171
3348
|
}
|
|
3172
|
-
function
|
|
3349
|
+
function vo(e, t, n) {
|
|
3173
3350
|
if (e) {
|
|
3174
3351
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
3175
3352
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -3177,21 +3354,21 @@ function Wa(e, t, n) {
|
|
|
3177
3354
|
}
|
|
3178
3355
|
return [];
|
|
3179
3356
|
}
|
|
3180
|
-
function
|
|
3357
|
+
function yo() {
|
|
3181
3358
|
return document.scrollingElement || document.documentElement;
|
|
3182
3359
|
}
|
|
3183
|
-
function
|
|
3184
|
-
if (
|
|
3360
|
+
function H(e, t, n, r, i) {
|
|
3361
|
+
if (e.getBoundingClientRect || e === window) {
|
|
3185
3362
|
var a, o, s, c, l, u, d;
|
|
3186
|
-
if (e !== window && e.parentNode && e !==
|
|
3187
|
-
if (i && i.getBoundingClientRect && (
|
|
3363
|
+
if (e !== window && e.parentNode && e !== yo() ? (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, !io)) do
|
|
3364
|
+
if (i && i.getBoundingClientRect && (V(i, "transform") !== "none" || n && V(i, "position") !== "static")) {
|
|
3188
3365
|
var f = i.getBoundingClientRect();
|
|
3189
|
-
o -= f.top + parseInt(
|
|
3366
|
+
o -= f.top + parseInt(V(i, "border-top-width")), s -= f.left + parseInt(V(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
3190
3367
|
break;
|
|
3191
3368
|
}
|
|
3192
3369
|
while (i = i.parentNode);
|
|
3193
3370
|
if (r && e !== window) {
|
|
3194
|
-
var p =
|
|
3371
|
+
var p = _o(i || e), m = p && p.a, h = p && p.d;
|
|
3195
3372
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
3196
3373
|
}
|
|
3197
3374
|
return {
|
|
@@ -3204,18 +3381,18 @@ function V(e, t, n, r, i) {
|
|
|
3204
3381
|
};
|
|
3205
3382
|
}
|
|
3206
3383
|
}
|
|
3207
|
-
function
|
|
3208
|
-
for (var r =
|
|
3209
|
-
var a =
|
|
3384
|
+
function bo(e, t, n) {
|
|
3385
|
+
for (var r = Eo(e, !0), i = H(e)[t]; r;) {
|
|
3386
|
+
var a = H(r)[n], o = void 0;
|
|
3210
3387
|
if (o = i >= a, !o) return r;
|
|
3211
|
-
if (r ===
|
|
3212
|
-
r =
|
|
3388
|
+
if (r === yo()) break;
|
|
3389
|
+
r = Eo(r, !1);
|
|
3213
3390
|
}
|
|
3214
3391
|
return !1;
|
|
3215
3392
|
}
|
|
3216
|
-
function
|
|
3393
|
+
function xo(e, t, n, r) {
|
|
3217
3394
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
3218
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
3395
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && mo(o[a], n.draggable, e, !1)) {
|
|
3219
3396
|
if (i === t) return o[a];
|
|
3220
3397
|
i++;
|
|
3221
3398
|
}
|
|
@@ -3223,96 +3400,96 @@ function qa(e, t, n, r) {
|
|
|
3223
3400
|
}
|
|
3224
3401
|
return null;
|
|
3225
3402
|
}
|
|
3226
|
-
function
|
|
3227
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
3403
|
+
function So(e, t) {
|
|
3404
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || V(n, "display") === "none" || t && !fo(n, t));) n = n.previousElementSibling;
|
|
3228
3405
|
return n || null;
|
|
3229
3406
|
}
|
|
3230
|
-
function
|
|
3407
|
+
function Co(e, t) {
|
|
3231
3408
|
var n = 0;
|
|
3232
3409
|
if (!e || !e.parentNode) return -1;
|
|
3233
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
3410
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || fo(e, t)) && n++;
|
|
3234
3411
|
return n;
|
|
3235
3412
|
}
|
|
3236
|
-
function
|
|
3237
|
-
var t = 0, n = 0, r =
|
|
3413
|
+
function wo(e) {
|
|
3414
|
+
var t = 0, n = 0, r = yo();
|
|
3238
3415
|
if (e) do {
|
|
3239
|
-
var i =
|
|
3416
|
+
var i = _o(e), a = i.a, o = i.d;
|
|
3240
3417
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
3241
3418
|
} while (e !== r && (e = e.parentNode));
|
|
3242
3419
|
return [t, n];
|
|
3243
3420
|
}
|
|
3244
|
-
function
|
|
3421
|
+
function To(e, t) {
|
|
3245
3422
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
3246
3423
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
3247
3424
|
}
|
|
3248
3425
|
return -1;
|
|
3249
3426
|
}
|
|
3250
|
-
function
|
|
3251
|
-
if (!e || !e.getBoundingClientRect) return
|
|
3427
|
+
function Eo(e, t) {
|
|
3428
|
+
if (!e || !e.getBoundingClientRect) return yo();
|
|
3252
3429
|
var n = e, r = !1;
|
|
3253
3430
|
do
|
|
3254
3431
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
3255
|
-
var i =
|
|
3432
|
+
var i = V(n);
|
|
3256
3433
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
3257
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
3434
|
+
if (!n.getBoundingClientRect || n === document.body) return yo();
|
|
3258
3435
|
if (r || t) return n;
|
|
3259
3436
|
r = !0;
|
|
3260
3437
|
}
|
|
3261
3438
|
}
|
|
3262
3439
|
while (n = n.parentNode);
|
|
3263
|
-
return
|
|
3440
|
+
return yo();
|
|
3264
3441
|
}
|
|
3265
|
-
function
|
|
3442
|
+
function Do(e, t) {
|
|
3266
3443
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
3267
3444
|
return e;
|
|
3268
3445
|
}
|
|
3269
|
-
function
|
|
3446
|
+
function Oo(e, t) {
|
|
3270
3447
|
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);
|
|
3271
3448
|
}
|
|
3272
|
-
var
|
|
3273
|
-
function
|
|
3449
|
+
var ko;
|
|
3450
|
+
function Ao(e, t) {
|
|
3274
3451
|
return function() {
|
|
3275
|
-
if (!
|
|
3452
|
+
if (!ko) {
|
|
3276
3453
|
var n = arguments, r = this;
|
|
3277
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
3278
|
-
|
|
3454
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), ko = setTimeout(function() {
|
|
3455
|
+
ko = void 0;
|
|
3279
3456
|
}, t);
|
|
3280
3457
|
}
|
|
3281
3458
|
};
|
|
3282
3459
|
}
|
|
3283
|
-
function
|
|
3284
|
-
clearTimeout(
|
|
3460
|
+
function jo() {
|
|
3461
|
+
clearTimeout(ko), ko = void 0;
|
|
3285
3462
|
}
|
|
3286
|
-
function
|
|
3463
|
+
function Mo(e, t, n) {
|
|
3287
3464
|
e.scrollLeft += t, e.scrollTop += n;
|
|
3288
3465
|
}
|
|
3289
|
-
function
|
|
3466
|
+
function No(e) {
|
|
3290
3467
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
3291
3468
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
3292
3469
|
}
|
|
3293
|
-
function
|
|
3470
|
+
function Po(e, t, n) {
|
|
3294
3471
|
var r = {};
|
|
3295
3472
|
return Array.from(e.children).forEach(function(i) {
|
|
3296
|
-
if (
|
|
3297
|
-
var a =
|
|
3473
|
+
if (mo(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
3474
|
+
var a = H(i);
|
|
3298
3475
|
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);
|
|
3299
3476
|
}
|
|
3300
3477
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
3301
3478
|
}
|
|
3302
|
-
var
|
|
3303
|
-
function
|
|
3479
|
+
var Fo = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
3480
|
+
function Io() {
|
|
3304
3481
|
var e = [], t;
|
|
3305
3482
|
return {
|
|
3306
3483
|
captureAnimationState: function() {
|
|
3307
3484
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
3308
|
-
if (
|
|
3485
|
+
if (V(t, "display") !== "none" && t !== Q.ghost) {
|
|
3309
3486
|
e.push({
|
|
3310
3487
|
target: t,
|
|
3311
|
-
rect:
|
|
3488
|
+
rect: H(t)
|
|
3312
3489
|
});
|
|
3313
|
-
var n =
|
|
3490
|
+
var n = Xa({}, e[e.length - 1].rect);
|
|
3314
3491
|
if (t.thisAnimationDuration) {
|
|
3315
|
-
var r =
|
|
3492
|
+
var r = _o(t, !0);
|
|
3316
3493
|
r && (n.top -= r.f, n.left -= r.e);
|
|
3317
3494
|
}
|
|
3318
3495
|
t.fromRect = n;
|
|
@@ -3323,7 +3500,7 @@ function co() {
|
|
|
3323
3500
|
e.push(t);
|
|
3324
3501
|
},
|
|
3325
3502
|
removeAnimationState: function(t) {
|
|
3326
|
-
e.splice(
|
|
3503
|
+
e.splice(To(e, { target: t }), 1);
|
|
3327
3504
|
},
|
|
3328
3505
|
animateAll: function(n) {
|
|
3329
3506
|
var r = this;
|
|
@@ -3333,8 +3510,8 @@ function co() {
|
|
|
3333
3510
|
}
|
|
3334
3511
|
var i = !1, a = 0;
|
|
3335
3512
|
e.forEach(function(e) {
|
|
3336
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
3337
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
3513
|
+
var t = 0, n = e.target, o = n.fromRect, s = H(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = _o(n, !0);
|
|
3514
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Oo(c, s) && !Oo(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ro(u, c, l, r.options)), Oo(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() {
|
|
3338
3515
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
3339
3516
|
}, t), n.thisAnimationDuration = t);
|
|
3340
3517
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -3343,27 +3520,27 @@ function co() {
|
|
|
3343
3520
|
},
|
|
3344
3521
|
animate: function(e, t, n, r) {
|
|
3345
3522
|
if (r) {
|
|
3346
|
-
|
|
3347
|
-
var i =
|
|
3348
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
3349
|
-
|
|
3523
|
+
V(e, "transition", ""), V(e, "transform", "");
|
|
3524
|
+
var i = _o(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
3525
|
+
e.animatingX = !!s, e.animatingY = !!c, V(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Lo(e), V(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), V(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
3526
|
+
V(e, "transition", ""), V(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
3350
3527
|
}, r);
|
|
3351
3528
|
}
|
|
3352
3529
|
}
|
|
3353
3530
|
};
|
|
3354
3531
|
}
|
|
3355
|
-
function
|
|
3532
|
+
function Lo(e) {
|
|
3356
3533
|
return e.offsetWidth;
|
|
3357
3534
|
}
|
|
3358
|
-
function
|
|
3535
|
+
function Ro(e, t, n, r) {
|
|
3359
3536
|
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;
|
|
3360
3537
|
}
|
|
3361
|
-
var
|
|
3538
|
+
var zo = [], Bo = { initializeByDefault: !0 }, Vo = {
|
|
3362
3539
|
mount: function(e) {
|
|
3363
|
-
for (var t in
|
|
3364
|
-
|
|
3540
|
+
for (var t in Bo) Bo.hasOwnProperty(t) && !(t in e) && (e[t] = Bo[t]);
|
|
3541
|
+
zo.forEach(function(t) {
|
|
3365
3542
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
3366
|
-
}),
|
|
3543
|
+
}), zo.push(e);
|
|
3367
3544
|
},
|
|
3368
3545
|
pluginEvent: function(e, t, n) {
|
|
3369
3546
|
var r = this;
|
|
@@ -3371,16 +3548,16 @@ var fo = [], po = { initializeByDefault: !0 }, mo = {
|
|
|
3371
3548
|
r.eventCanceled = !0;
|
|
3372
3549
|
};
|
|
3373
3550
|
var i = e + "Global";
|
|
3374
|
-
|
|
3375
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
3551
|
+
zo.forEach(function(r) {
|
|
3552
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Xa({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Xa({ sortable: t }, n)));
|
|
3376
3553
|
});
|
|
3377
3554
|
},
|
|
3378
3555
|
initializePlugins: function(e, t, n, r) {
|
|
3379
|
-
for (var i in
|
|
3556
|
+
for (var i in zo.forEach(function(r) {
|
|
3380
3557
|
var i = r.pluginName;
|
|
3381
|
-
if (
|
|
3558
|
+
if (e.options[i] || r.initializeByDefault) {
|
|
3382
3559
|
var a = new r(e, t, e.options);
|
|
3383
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
3560
|
+
a.sortable = e, a.options = e.options, e[i] = a, $a(n, a.defaults);
|
|
3384
3561
|
}
|
|
3385
3562
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
3386
3563
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -3389,59 +3566,59 @@ var fo = [], po = { initializeByDefault: !0 }, mo = {
|
|
|
3389
3566
|
},
|
|
3390
3567
|
getEventProperties: function(e, t) {
|
|
3391
3568
|
var n = {};
|
|
3392
|
-
return
|
|
3393
|
-
typeof r.eventProperties == "function" &&
|
|
3569
|
+
return zo.forEach(function(r) {
|
|
3570
|
+
typeof r.eventProperties == "function" && $a(n, r.eventProperties.call(t[r.pluginName], e));
|
|
3394
3571
|
}), n;
|
|
3395
3572
|
},
|
|
3396
3573
|
modifyOption: function(e, t, n) {
|
|
3397
3574
|
var r;
|
|
3398
|
-
return
|
|
3575
|
+
return zo.forEach(function(i) {
|
|
3399
3576
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
3400
3577
|
}), r;
|
|
3401
3578
|
}
|
|
3402
3579
|
};
|
|
3403
|
-
function
|
|
3580
|
+
function Ho(e) {
|
|
3404
3581
|
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;
|
|
3405
|
-
if (t ||= n && n[
|
|
3582
|
+
if (t ||= n && n[Fo], t) {
|
|
3406
3583
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
3407
|
-
window.CustomEvent && !
|
|
3584
|
+
window.CustomEvent && !io && !ao ? h = new CustomEvent(r, {
|
|
3408
3585
|
bubbles: !0,
|
|
3409
3586
|
cancelable: !0
|
|
3410
3587
|
}) : (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;
|
|
3411
|
-
var v =
|
|
3588
|
+
var v = Xa(Xa({}, m), Vo.getEventProperties(r, t));
|
|
3412
3589
|
for (var y in v) h[y] = v[y];
|
|
3413
3590
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
3414
3591
|
}
|
|
3415
3592
|
}
|
|
3416
|
-
var
|
|
3417
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
3418
|
-
|
|
3419
|
-
dragEl:
|
|
3420
|
-
parentEl:
|
|
3421
|
-
ghostEl:
|
|
3422
|
-
rootEl:
|
|
3423
|
-
nextEl:
|
|
3424
|
-
lastDownEl:
|
|
3425
|
-
cloneEl:
|
|
3426
|
-
cloneHidden:
|
|
3427
|
-
dragStarted:
|
|
3593
|
+
var Uo = ["evt"], U = function(e, t) {
|
|
3594
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = to(n, Uo);
|
|
3595
|
+
Vo.pluginEvent.bind(Q)(e, t, Xa({
|
|
3596
|
+
dragEl: G,
|
|
3597
|
+
parentEl: K,
|
|
3598
|
+
ghostEl: q,
|
|
3599
|
+
rootEl: J,
|
|
3600
|
+
nextEl: Wo,
|
|
3601
|
+
lastDownEl: Go,
|
|
3602
|
+
cloneEl: Y,
|
|
3603
|
+
cloneHidden: Ko,
|
|
3604
|
+
dragStarted: ss,
|
|
3428
3605
|
putSortable: X,
|
|
3429
3606
|
activeSortable: Q.active,
|
|
3430
3607
|
originalEvent: r,
|
|
3431
|
-
oldIndex:
|
|
3432
|
-
oldDraggableIndex:
|
|
3433
|
-
newIndex:
|
|
3434
|
-
newDraggableIndex:
|
|
3435
|
-
hideGhostForTarget:
|
|
3436
|
-
unhideGhostForTarget:
|
|
3608
|
+
oldIndex: qo,
|
|
3609
|
+
oldDraggableIndex: Yo,
|
|
3610
|
+
newIndex: Jo,
|
|
3611
|
+
newDraggableIndex: Xo,
|
|
3612
|
+
hideGhostForTarget: Ts,
|
|
3613
|
+
unhideGhostForTarget: Es,
|
|
3437
3614
|
cloneNowHidden: function() {
|
|
3438
|
-
|
|
3615
|
+
Ko = !0;
|
|
3439
3616
|
},
|
|
3440
3617
|
cloneNowShown: function() {
|
|
3441
|
-
|
|
3618
|
+
Ko = !1;
|
|
3442
3619
|
},
|
|
3443
3620
|
dispatchSortableEvent: function(e) {
|
|
3444
|
-
|
|
3621
|
+
W({
|
|
3445
3622
|
sortable: t,
|
|
3446
3623
|
name: e,
|
|
3447
3624
|
originalEvent: r
|
|
@@ -3449,46 +3626,46 @@ var go = ["evt"], H = function(e, t) {
|
|
|
3449
3626
|
}
|
|
3450
3627
|
}, i));
|
|
3451
3628
|
};
|
|
3452
|
-
function
|
|
3453
|
-
|
|
3629
|
+
function W(e) {
|
|
3630
|
+
Ho(Xa({
|
|
3454
3631
|
putSortable: X,
|
|
3455
|
-
cloneEl:
|
|
3456
|
-
targetEl:
|
|
3457
|
-
rootEl:
|
|
3458
|
-
oldIndex:
|
|
3459
|
-
oldDraggableIndex:
|
|
3460
|
-
newIndex:
|
|
3461
|
-
newDraggableIndex:
|
|
3632
|
+
cloneEl: Y,
|
|
3633
|
+
targetEl: G,
|
|
3634
|
+
rootEl: J,
|
|
3635
|
+
oldIndex: qo,
|
|
3636
|
+
oldDraggableIndex: Yo,
|
|
3637
|
+
newIndex: Jo,
|
|
3638
|
+
newDraggableIndex: Xo
|
|
3462
3639
|
}, e));
|
|
3463
3640
|
}
|
|
3464
|
-
var
|
|
3465
|
-
if (
|
|
3466
|
-
if (
|
|
3641
|
+
var G, K, q, J, Wo, Go, Y, Ko, qo, Jo, Yo, Xo, Zo, X, Qo = !1, $o = !1, es = [], ts, ns, rs, is, as, os, ss, cs, ls, us = !1, ds = !1, fs, Z, ps = [], ms = !1, hs = [], gs = typeof document < "u", _s = co, vs = ao || io ? "cssFloat" : "float", ys = gs && !lo && !co && "draggable" in document.createElement("div"), bs = function() {
|
|
3642
|
+
if (gs) {
|
|
3643
|
+
if (io) return !1;
|
|
3467
3644
|
var e = document.createElement("x");
|
|
3468
3645
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3469
3646
|
}
|
|
3470
|
-
}(),
|
|
3471
|
-
var n =
|
|
3647
|
+
}(), xs = function(e, t) {
|
|
3648
|
+
var n = V(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = xo(e, 0, t), a = xo(e, 1, t), o = i && V(i), s = a && V(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + H(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + H(a).width;
|
|
3472
3649
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3473
3650
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3474
3651
|
if (i && o.float && o.float !== "none") {
|
|
3475
3652
|
var u = o.float === "left" ? "left" : "right";
|
|
3476
3653
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3477
3654
|
}
|
|
3478
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3479
|
-
},
|
|
3655
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[vs] === "none" || a && n[vs] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3656
|
+
}, Ss = function(e, t, n) {
|
|
3480
3657
|
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;
|
|
3481
3658
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3482
|
-
},
|
|
3659
|
+
}, Cs = function(e, t) {
|
|
3483
3660
|
var n;
|
|
3484
|
-
return
|
|
3485
|
-
var i = r[
|
|
3486
|
-
if (
|
|
3487
|
-
var a =
|
|
3661
|
+
return es.some(function(r) {
|
|
3662
|
+
var i = r[Fo].options.emptyInsertThreshold;
|
|
3663
|
+
if (i && !So(r)) {
|
|
3664
|
+
var a = H(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3488
3665
|
if (o && s) return n = r;
|
|
3489
3666
|
}
|
|
3490
3667
|
}), n;
|
|
3491
|
-
},
|
|
3668
|
+
}, ws = function(e) {
|
|
3492
3669
|
function t(e, n) {
|
|
3493
3670
|
return function(r, i, a, o) {
|
|
3494
3671
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3501,31 +3678,31 @@ var W, G, K, q, _o, vo, J, yo, bo, Y, xo, So, Co, X, wo = !1, To = !1, Eo = [],
|
|
|
3501
3678
|
};
|
|
3502
3679
|
}
|
|
3503
3680
|
var n = {}, r = e.group;
|
|
3504
|
-
(!r ||
|
|
3505
|
-
},
|
|
3506
|
-
!
|
|
3507
|
-
},
|
|
3508
|
-
!
|
|
3681
|
+
(!r || Za(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;
|
|
3682
|
+
}, Ts = function() {
|
|
3683
|
+
!bs && q && V(q, "display", "none");
|
|
3684
|
+
}, Es = function() {
|
|
3685
|
+
!bs && q && V(q, "display", "");
|
|
3509
3686
|
};
|
|
3510
|
-
|
|
3511
|
-
if (
|
|
3687
|
+
gs && !lo && document.addEventListener("click", function(e) {
|
|
3688
|
+
if ($o) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), $o = !1, !1;
|
|
3512
3689
|
}, !0);
|
|
3513
|
-
var
|
|
3514
|
-
if (
|
|
3690
|
+
var Ds = function(e) {
|
|
3691
|
+
if (G) {
|
|
3515
3692
|
e = e.touches ? e.touches[0] : e;
|
|
3516
|
-
var t =
|
|
3693
|
+
var t = Cs(e.clientX, e.clientY);
|
|
3517
3694
|
if (t) {
|
|
3518
3695
|
var n = {};
|
|
3519
3696
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3520
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3697
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[Fo]._onDragOver(n);
|
|
3521
3698
|
}
|
|
3522
3699
|
}
|
|
3523
|
-
},
|
|
3524
|
-
|
|
3700
|
+
}, Os = function(e) {
|
|
3701
|
+
G && G.parentNode[Fo]._isOutsideThisEl(e.target);
|
|
3525
3702
|
};
|
|
3526
3703
|
function Q(e, t) {
|
|
3527
3704
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3528
|
-
this.el = e, this.options = t =
|
|
3705
|
+
this.el = e, this.options = t = $a({}, t), e[Fo] = this;
|
|
3529
3706
|
var n = {
|
|
3530
3707
|
group: null,
|
|
3531
3708
|
sort: !0,
|
|
@@ -3538,7 +3715,7 @@ function Q(e, t) {
|
|
|
3538
3715
|
invertedSwapThreshold: null,
|
|
3539
3716
|
removeCloneOnHide: !0,
|
|
3540
3717
|
direction: function() {
|
|
3541
|
-
return
|
|
3718
|
+
return xs(e, this.options);
|
|
3542
3719
|
},
|
|
3543
3720
|
ghostClass: "sortable-ghost",
|
|
3544
3721
|
chosenClass: "sortable-chosen",
|
|
@@ -3565,80 +3742,80 @@ function Q(e, t) {
|
|
|
3565
3742
|
x: 0,
|
|
3566
3743
|
y: 0
|
|
3567
3744
|
},
|
|
3568
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3745
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !so,
|
|
3569
3746
|
emptyInsertThreshold: 5
|
|
3570
3747
|
};
|
|
3571
|
-
for (var r in
|
|
3572
|
-
for (var i in
|
|
3573
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3748
|
+
for (var r in Vo.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3749
|
+
for (var i in ws(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3750
|
+
this.nativeDraggable = !t.forceFallback && ys, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? z(e, "pointerdown", this._onTapStart) : (z(e, "mousedown", this._onTapStart), z(e, "touchstart", this._onTapStart)), this.nativeDraggable && (z(e, "dragover", this), z(e, "dragenter", this)), es.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), $a(this, Io());
|
|
3574
3751
|
}
|
|
3575
3752
|
Q.prototype = {
|
|
3576
3753
|
constructor: Q,
|
|
3577
3754
|
_isOutsideThisEl: function(e) {
|
|
3578
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3755
|
+
!this.el.contains(e) && e !== this.el && (cs = null);
|
|
3579
3756
|
},
|
|
3580
3757
|
_getDirection: function(e, t) {
|
|
3581
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
3758
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
3582
3759
|
},
|
|
3583
3760
|
_onTapStart: function(e) {
|
|
3584
3761
|
if (e.cancelable) {
|
|
3585
3762
|
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;
|
|
3586
|
-
if (
|
|
3587
|
-
if (
|
|
3763
|
+
if (Rs(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && so && s && s.tagName.toUpperCase() === "SELECT") && (s = mo(s, r.draggable, n, !1), !(s && s.animated) && Go !== s)) {
|
|
3764
|
+
if (qo = Co(s), Yo = Co(s, r.draggable), typeof l == "function") {
|
|
3588
3765
|
if (l.call(this, e, s, this)) {
|
|
3589
|
-
|
|
3766
|
+
W({
|
|
3590
3767
|
sortable: t,
|
|
3591
3768
|
rootEl: c,
|
|
3592
3769
|
name: "filter",
|
|
3593
3770
|
targetEl: s,
|
|
3594
3771
|
toEl: n,
|
|
3595
3772
|
fromEl: n
|
|
3596
|
-
}),
|
|
3773
|
+
}), U("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3597
3774
|
return;
|
|
3598
3775
|
}
|
|
3599
3776
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3600
|
-
if (r =
|
|
3777
|
+
if (r = mo(c, r.trim(), n, !1), r) return W({
|
|
3601
3778
|
sortable: t,
|
|
3602
3779
|
rootEl: r,
|
|
3603
3780
|
name: "filter",
|
|
3604
3781
|
targetEl: s,
|
|
3605
3782
|
fromEl: n,
|
|
3606
3783
|
toEl: n
|
|
3607
|
-
}),
|
|
3784
|
+
}), U("filter", t, { evt: e }), !0;
|
|
3608
3785
|
}), l)) {
|
|
3609
3786
|
i && e.cancelable && e.preventDefault();
|
|
3610
3787
|
return;
|
|
3611
3788
|
}
|
|
3612
|
-
r.handle && !
|
|
3789
|
+
r.handle && !mo(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3613
3790
|
}
|
|
3614
3791
|
}
|
|
3615
3792
|
},
|
|
3616
3793
|
_prepareDragStart: function(e, t, n) {
|
|
3617
3794
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3618
|
-
if (n && !
|
|
3619
|
-
var c =
|
|
3620
|
-
if (
|
|
3621
|
-
target:
|
|
3795
|
+
if (n && !G && n.parentNode === i) {
|
|
3796
|
+
var c = H(n);
|
|
3797
|
+
if (J = i, G = n, K = G.parentNode, Wo = G.nextSibling, Go = n, Zo = a.group, Q.dragged = G, ts = {
|
|
3798
|
+
target: G,
|
|
3622
3799
|
clientX: (t || e).clientX,
|
|
3623
3800
|
clientY: (t || e).clientY
|
|
3624
|
-
},
|
|
3625
|
-
if (
|
|
3801
|
+
}, as = ts.clientX - c.left, os = ts.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
3802
|
+
if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
3626
3803
|
r._onDrop();
|
|
3627
3804
|
return;
|
|
3628
3805
|
}
|
|
3629
|
-
r._disableDelayedDragEvents(), !
|
|
3806
|
+
r._disableDelayedDragEvents(), !oo && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
3630
3807
|
sortable: r,
|
|
3631
3808
|
name: "choose",
|
|
3632
3809
|
originalEvent: e
|
|
3633
|
-
}),
|
|
3810
|
+
}), go(G, a.chosenClass, !0);
|
|
3634
3811
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3635
|
-
|
|
3636
|
-
}),
|
|
3812
|
+
vo(G, e.trim(), js);
|
|
3813
|
+
}), z(o, "dragover", Ds), z(o, "mousemove", Ds), z(o, "touchmove", Ds), z(o, "mouseup", r._onDrop), z(o, "touchend", r._onDrop), z(o, "touchcancel", r._onDrop), oo && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ao || io))) {
|
|
3637
3814
|
if (Q.eventCanceled) {
|
|
3638
3815
|
this._onDrop();
|
|
3639
3816
|
return;
|
|
3640
3817
|
}
|
|
3641
|
-
|
|
3818
|
+
z(o, "mouseup", r._disableDelayedDrag), z(o, "touchend", r._disableDelayedDrag), z(o, "touchcancel", r._disableDelayedDrag), z(o, "mousemove", r._delayedDragTouchMoveHandler), z(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && z(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
3642
3819
|
} else s();
|
|
3643
3820
|
}
|
|
3644
3821
|
},
|
|
@@ -3647,25 +3824,25 @@ Q.prototype = {
|
|
|
3647
3824
|
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();
|
|
3648
3825
|
},
|
|
3649
3826
|
_disableDelayedDrag: function() {
|
|
3650
|
-
|
|
3827
|
+
G && js(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3651
3828
|
},
|
|
3652
3829
|
_disableDelayedDragEvents: function() {
|
|
3653
3830
|
var e = this.el.ownerDocument;
|
|
3654
|
-
|
|
3831
|
+
B(e, "mouseup", this._disableDelayedDrag), B(e, "touchend", this._disableDelayedDrag), B(e, "touchcancel", this._disableDelayedDrag), B(e, "mousemove", this._delayedDragTouchMoveHandler), B(e, "touchmove", this._delayedDragTouchMoveHandler), B(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3655
3832
|
},
|
|
3656
3833
|
_triggerDragStart: function(e, t) {
|
|
3657
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
3834
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? z(document, "pointermove", this._onTouchMove) : t ? z(document, "touchmove", this._onTouchMove) : z(document, "mousemove", this._onTouchMove) : (z(G, "dragend", this), z(J, "dragstart", this._onDragStart));
|
|
3658
3835
|
try {
|
|
3659
|
-
document.selection ?
|
|
3836
|
+
document.selection ? zs(function() {
|
|
3660
3837
|
document.selection.empty();
|
|
3661
3838
|
}) : window.getSelection().removeAllRanges();
|
|
3662
3839
|
} catch {}
|
|
3663
3840
|
},
|
|
3664
3841
|
_dragStarted: function(e, t) {
|
|
3665
|
-
if (
|
|
3666
|
-
|
|
3842
|
+
if (Qo = !1, J && G) {
|
|
3843
|
+
U("dragStarted", this, { evt: t }), this.nativeDraggable && z(document, "dragover", Os);
|
|
3667
3844
|
var n = this.options;
|
|
3668
|
-
!e &&
|
|
3845
|
+
!e && go(G, n.dragClass, !1), go(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
3669
3846
|
sortable: this,
|
|
3670
3847
|
name: "start",
|
|
3671
3848
|
originalEvent: t
|
|
@@ -3673,33 +3850,33 @@ Q.prototype = {
|
|
|
3673
3850
|
} else this._nulling();
|
|
3674
3851
|
},
|
|
3675
3852
|
_emulateDragOver: function() {
|
|
3676
|
-
if (
|
|
3677
|
-
this._lastX =
|
|
3678
|
-
for (var e = document.elementFromPoint(
|
|
3679
|
-
if (
|
|
3680
|
-
if (t[
|
|
3853
|
+
if (ns) {
|
|
3854
|
+
this._lastX = ns.clientX, this._lastY = ns.clientY, Ts();
|
|
3855
|
+
for (var e = document.elementFromPoint(ns.clientX, ns.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ns.clientX, ns.clientY), e !== t);) t = e;
|
|
3856
|
+
if (G.parentNode[Fo]._isOutsideThisEl(e), t) do {
|
|
3857
|
+
if (t[Fo]) {
|
|
3681
3858
|
var n = void 0;
|
|
3682
|
-
if (n = t[
|
|
3683
|
-
clientX:
|
|
3684
|
-
clientY:
|
|
3859
|
+
if (n = t[Fo]._onDragOver({
|
|
3860
|
+
clientX: ns.clientX,
|
|
3861
|
+
clientY: ns.clientY,
|
|
3685
3862
|
target: e,
|
|
3686
3863
|
rootEl: t
|
|
3687
3864
|
}), n && !this.options.dragoverBubble) break;
|
|
3688
3865
|
}
|
|
3689
3866
|
e = t;
|
|
3690
3867
|
} while (t = t.parentNode);
|
|
3691
|
-
|
|
3868
|
+
Es();
|
|
3692
3869
|
}
|
|
3693
3870
|
},
|
|
3694
3871
|
_onTouchMove: function(e) {
|
|
3695
|
-
if (
|
|
3696
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
3697
|
-
if (!Q.active && !
|
|
3872
|
+
if (ts) {
|
|
3873
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && _o(q, !0), o = q && a && a.a, s = q && a && a.d, c = _s && Z && wo(Z), l = (i.clientX - ts.clientX + r.x) / (o || 1) + (c ? c[0] - ps[0] : 0) / (o || 1), u = (i.clientY - ts.clientY + r.y) / (s || 1) + (c ? c[1] - ps[1] : 0) / (s || 1);
|
|
3874
|
+
if (!Q.active && !Qo) {
|
|
3698
3875
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3699
3876
|
this._onDragStart(e, !0);
|
|
3700
3877
|
}
|
|
3701
|
-
if (
|
|
3702
|
-
a ? (a.e += l - (
|
|
3878
|
+
if (q) {
|
|
3879
|
+
a ? (a.e += l - (rs || 0), a.f += u - (is || 0)) : a = {
|
|
3703
3880
|
a: 1,
|
|
3704
3881
|
b: 0,
|
|
3705
3882
|
c: 0,
|
|
@@ -3708,39 +3885,39 @@ Q.prototype = {
|
|
|
3708
3885
|
f: u
|
|
3709
3886
|
};
|
|
3710
3887
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3711
|
-
|
|
3888
|
+
V(q, "webkitTransform", d), V(q, "mozTransform", d), V(q, "msTransform", d), V(q, "transform", d), rs = l, is = u, ns = i;
|
|
3712
3889
|
}
|
|
3713
3890
|
e.cancelable && e.preventDefault();
|
|
3714
3891
|
}
|
|
3715
3892
|
},
|
|
3716
3893
|
_appendGhost: function() {
|
|
3717
|
-
if (!
|
|
3718
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
3719
|
-
if (
|
|
3720
|
-
for (Z = e;
|
|
3721
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3894
|
+
if (!q) {
|
|
3895
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = H(G, !0, _s, !0, e), n = this.options;
|
|
3896
|
+
if (_s) {
|
|
3897
|
+
for (Z = e; V(Z, "position") === "static" && V(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3898
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = yo()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = yo(), ps = wo(Z);
|
|
3722
3899
|
}
|
|
3723
|
-
|
|
3900
|
+
q = G.cloneNode(!0), go(q, n.ghostClass, !1), go(q, n.fallbackClass, !0), go(q, n.dragClass, !0), V(q, "transition", ""), V(q, "transform", ""), V(q, "box-sizing", "border-box"), V(q, "margin", 0), V(q, "top", t.top), V(q, "left", t.left), V(q, "width", t.width), V(q, "height", t.height), V(q, "opacity", "0.8"), V(q, "position", _s ? "absolute" : "fixed"), V(q, "zIndex", "100000"), V(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), V(q, "transform-origin", as / parseInt(q.style.width) * 100 + "% " + os / parseInt(q.style.height) * 100 + "%");
|
|
3724
3901
|
}
|
|
3725
3902
|
},
|
|
3726
3903
|
_onDragStart: function(e, t) {
|
|
3727
3904
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3728
|
-
if (
|
|
3905
|
+
if (U("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
3729
3906
|
this._onDrop();
|
|
3730
3907
|
return;
|
|
3731
3908
|
}
|
|
3732
|
-
|
|
3733
|
-
|
|
3909
|
+
U("setupClone", this), Q.eventCanceled || (Y = No(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), go(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = zs(function() {
|
|
3910
|
+
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
3734
3911
|
sortable: n,
|
|
3735
3912
|
name: "clone"
|
|
3736
3913
|
}));
|
|
3737
|
-
}), !t &&
|
|
3914
|
+
}), !t && go(G, i.dragClass, !0), t ? ($o = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (B(document, "mouseup", n._onDrop), B(document, "touchend", n._onDrop), B(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), z(document, "drop", n), V(G, "transform", "translateZ(0)")), Qo = !0, n._dragStartId = zs(n._dragStarted.bind(n, t, e)), z(document, "selectstart", n), ss = !0, so && V(document.body, "user-select", "none");
|
|
3738
3915
|
},
|
|
3739
3916
|
_onDragOver: function(e) {
|
|
3740
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3741
|
-
if (
|
|
3917
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Zo === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3918
|
+
if (ms) return;
|
|
3742
3919
|
function h(o, s) {
|
|
3743
|
-
|
|
3920
|
+
U(o, p, Xa({
|
|
3744
3921
|
evt: e,
|
|
3745
3922
|
isOwner: l,
|
|
3746
3923
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3752,7 +3929,7 @@ Q.prototype = {
|
|
|
3752
3929
|
target: n,
|
|
3753
3930
|
completed: _,
|
|
3754
3931
|
onMove: function(n, i) {
|
|
3755
|
-
return
|
|
3932
|
+
return As(J, t, G, r, n, H(n), e, i);
|
|
3756
3933
|
},
|
|
3757
3934
|
changed: v
|
|
3758
3935
|
}, s));
|
|
@@ -3761,119 +3938,119 @@ Q.prototype = {
|
|
|
3761
3938
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3762
3939
|
}
|
|
3763
3940
|
function _(r) {
|
|
3764
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3941
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (go(G, X ? X.options.ghostClass : c.options.ghostClass, !1), go(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3765
3942
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3766
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
3943
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (cs = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[Fo]._isOutsideThisEl(e.target), !r && Ds(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3767
3944
|
}
|
|
3768
3945
|
function v() {
|
|
3769
|
-
|
|
3946
|
+
Jo = Co(G), Xo = Co(G, o.draggable), W({
|
|
3770
3947
|
sortable: p,
|
|
3771
3948
|
name: "change",
|
|
3772
3949
|
toEl: t,
|
|
3773
|
-
newIndex:
|
|
3774
|
-
newDraggableIndex:
|
|
3950
|
+
newIndex: Jo,
|
|
3951
|
+
newDraggableIndex: Xo,
|
|
3775
3952
|
originalEvent: e
|
|
3776
3953
|
});
|
|
3777
3954
|
}
|
|
3778
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3779
|
-
if (
|
|
3780
|
-
if (
|
|
3781
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
3782
|
-
if (a) return
|
|
3783
|
-
var y =
|
|
3784
|
-
if (!y ||
|
|
3785
|
-
if (y ===
|
|
3786
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
3787
|
-
} else if (y &&
|
|
3788
|
-
var b =
|
|
3789
|
-
if (b ===
|
|
3790
|
-
if (n = b, i =
|
|
3955
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = mo(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3956
|
+
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3957
|
+
if ($o = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = Zo.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
3958
|
+
if (f = this._getDirection(e, n) === "vertical", r = H(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3959
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Wo ? J.insertBefore(G, Wo) : J.appendChild(G)), _(!0);
|
|
3960
|
+
var y = So(t, o.draggable);
|
|
3961
|
+
if (!y || Ps(e, f, this) && !y.animated) {
|
|
3962
|
+
if (y === G) return _(!1);
|
|
3963
|
+
if (y && t === e.target && (n = y), n && (i = H(n)), As(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
|
|
3964
|
+
} else if (y && Ns(e, f, this)) {
|
|
3965
|
+
var b = xo(t, 0, o, !0);
|
|
3966
|
+
if (b === G) return _(!1);
|
|
3967
|
+
if (n = b, i = H(n), As(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
3791
3968
|
} else if (n.parentNode === t) {
|
|
3792
|
-
i =
|
|
3793
|
-
var x = 0, S, C =
|
|
3794
|
-
|
|
3969
|
+
i = H(n);
|
|
3970
|
+
var x = 0, S, C = G.parentNode !== t, w = !Ss(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = bo(n, "top", "top") || bo(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3971
|
+
cs !== n && (S = i[T], us = !1, ds = !w && o.invertSwap || C), x = Fs(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, ds, cs === n);
|
|
3795
3972
|
var O;
|
|
3796
3973
|
if (x !== 0) {
|
|
3797
|
-
var k =
|
|
3974
|
+
var k = Co(G);
|
|
3798
3975
|
do
|
|
3799
|
-
k -= x, O =
|
|
3800
|
-
while (O && (
|
|
3976
|
+
k -= x, O = K.children[k];
|
|
3977
|
+
while (O && (V(O, "display") === "none" || O === q));
|
|
3801
3978
|
}
|
|
3802
3979
|
if (x === 0 || O === n) return _(!1);
|
|
3803
|
-
|
|
3804
|
-
var A = n.nextElementSibling,
|
|
3805
|
-
|
|
3806
|
-
var
|
|
3807
|
-
if (
|
|
3980
|
+
cs = n, ls = x;
|
|
3981
|
+
var A = n.nextElementSibling, j = !1;
|
|
3982
|
+
j = x === 1;
|
|
3983
|
+
var M = As(J, t, G, r, n, i, e, j);
|
|
3984
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), ms = !0, setTimeout(Ms, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Mo(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !ds && (fs = Math.abs(S - H(n)[T])), v(), _(!0);
|
|
3808
3985
|
}
|
|
3809
|
-
if (t.contains(
|
|
3986
|
+
if (t.contains(G)) return _(!1);
|
|
3810
3987
|
}
|
|
3811
3988
|
return !1;
|
|
3812
3989
|
},
|
|
3813
3990
|
_ignoreWhileAnimating: null,
|
|
3814
3991
|
_offMoveEvents: function() {
|
|
3815
|
-
|
|
3992
|
+
B(document, "mousemove", this._onTouchMove), B(document, "touchmove", this._onTouchMove), B(document, "pointermove", this._onTouchMove), B(document, "dragover", Ds), B(document, "mousemove", Ds), B(document, "touchmove", Ds);
|
|
3816
3993
|
},
|
|
3817
3994
|
_offUpEvents: function() {
|
|
3818
3995
|
var e = this.el.ownerDocument;
|
|
3819
|
-
|
|
3996
|
+
B(e, "mouseup", this._onDrop), B(e, "touchend", this._onDrop), B(e, "pointerup", this._onDrop), B(e, "touchcancel", this._onDrop), B(document, "selectstart", this);
|
|
3820
3997
|
},
|
|
3821
3998
|
_onDrop: function(e) {
|
|
3822
3999
|
var t = this.el, n = this.options;
|
|
3823
|
-
if (
|
|
4000
|
+
if (Jo = Co(G), Xo = Co(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, Jo = Co(G), Xo = Co(G, n.draggable), Q.eventCanceled) {
|
|
3824
4001
|
this._nulling();
|
|
3825
4002
|
return;
|
|
3826
4003
|
}
|
|
3827
|
-
|
|
4004
|
+
Qo = !1, ds = !1, us = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Bs(this.cloneId), Bs(this._dragStartId), this.nativeDraggable && (B(document, "drop", this), B(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), so && V(document.body, "user-select", ""), V(G, "transform", ""), e && (ss && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && B(G, "dragend", this), js(G), G.style["will-change"] = "", ss && !Qo && go(G, X ? X.options.ghostClass : this.options.ghostClass, !1), go(G, this.options.chosenClass, !1), W({
|
|
3828
4005
|
sortable: this,
|
|
3829
4006
|
name: "unchoose",
|
|
3830
|
-
toEl:
|
|
4007
|
+
toEl: K,
|
|
3831
4008
|
newIndex: null,
|
|
3832
4009
|
newDraggableIndex: null,
|
|
3833
4010
|
originalEvent: e
|
|
3834
|
-
}),
|
|
4011
|
+
}), J === K ? Jo !== qo && Jo >= 0 && (W({
|
|
3835
4012
|
sortable: this,
|
|
3836
4013
|
name: "update",
|
|
3837
|
-
toEl:
|
|
4014
|
+
toEl: K,
|
|
3838
4015
|
originalEvent: e
|
|
3839
|
-
}),
|
|
4016
|
+
}), W({
|
|
3840
4017
|
sortable: this,
|
|
3841
4018
|
name: "sort",
|
|
3842
|
-
toEl:
|
|
4019
|
+
toEl: K,
|
|
3843
4020
|
originalEvent: e
|
|
3844
|
-
})) : (
|
|
3845
|
-
rootEl:
|
|
4021
|
+
})) : (Jo >= 0 && (W({
|
|
4022
|
+
rootEl: K,
|
|
3846
4023
|
name: "add",
|
|
3847
|
-
toEl:
|
|
3848
|
-
fromEl:
|
|
4024
|
+
toEl: K,
|
|
4025
|
+
fromEl: J,
|
|
3849
4026
|
originalEvent: e
|
|
3850
|
-
}),
|
|
4027
|
+
}), W({
|
|
3851
4028
|
sortable: this,
|
|
3852
4029
|
name: "remove",
|
|
3853
|
-
toEl:
|
|
4030
|
+
toEl: K,
|
|
3854
4031
|
originalEvent: e
|
|
3855
|
-
}),
|
|
3856
|
-
rootEl:
|
|
4032
|
+
}), W({
|
|
4033
|
+
rootEl: K,
|
|
3857
4034
|
name: "sort",
|
|
3858
|
-
toEl:
|
|
3859
|
-
fromEl:
|
|
4035
|
+
toEl: K,
|
|
4036
|
+
fromEl: J,
|
|
3860
4037
|
originalEvent: e
|
|
3861
|
-
}),
|
|
4038
|
+
}), W({
|
|
3862
4039
|
sortable: this,
|
|
3863
4040
|
name: "sort",
|
|
3864
|
-
toEl:
|
|
4041
|
+
toEl: K,
|
|
3865
4042
|
originalEvent: e
|
|
3866
|
-
})), X && X.save()), Q.active && ((
|
|
4043
|
+
})), X && X.save()), Q.active && ((Jo == null || Jo === -1) && (Jo = qo, Xo = Yo), W({
|
|
3867
4044
|
sortable: this,
|
|
3868
4045
|
name: "end",
|
|
3869
|
-
toEl:
|
|
4046
|
+
toEl: K,
|
|
3870
4047
|
originalEvent: e
|
|
3871
4048
|
}), this.save()))), this._nulling();
|
|
3872
4049
|
},
|
|
3873
4050
|
_nulling: function() {
|
|
3874
|
-
|
|
4051
|
+
U("nulling", this), J = G = K = q = Wo = Y = Go = Ko = ts = ns = ss = Jo = Xo = qo = Yo = cs = ls = X = Zo = Q.dragged = Q.ghost = Q.clone = Q.active = null, hs.forEach(function(e) {
|
|
3875
4052
|
e.checked = !0;
|
|
3876
|
-
}),
|
|
4053
|
+
}), hs.length = rs = is = 0;
|
|
3877
4054
|
},
|
|
3878
4055
|
handleEvent: function(e) {
|
|
3879
4056
|
switch (e.type) {
|
|
@@ -3883,20 +4060,20 @@ Q.prototype = {
|
|
|
3883
4060
|
break;
|
|
3884
4061
|
case "dragenter":
|
|
3885
4062
|
case "dragover":
|
|
3886
|
-
|
|
4063
|
+
G && (this._onDragOver(e), ks(e));
|
|
3887
4064
|
break;
|
|
3888
4065
|
case "selectstart": e.preventDefault();
|
|
3889
4066
|
}
|
|
3890
4067
|
},
|
|
3891
4068
|
toArray: function() {
|
|
3892
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
4069
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], mo(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ls(t));
|
|
3893
4070
|
return e;
|
|
3894
4071
|
},
|
|
3895
4072
|
sort: function(e, t) {
|
|
3896
4073
|
var n = {}, r = this.el;
|
|
3897
4074
|
this.toArray().forEach(function(e, t) {
|
|
3898
4075
|
var i = r.children[t];
|
|
3899
|
-
|
|
4076
|
+
mo(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3900
4077
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3901
4078
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3902
4079
|
}), t && this.animateAll();
|
|
@@ -3906,25 +4083,25 @@ Q.prototype = {
|
|
|
3906
4083
|
e && e.set && e.set(this);
|
|
3907
4084
|
},
|
|
3908
4085
|
closest: function(e, t) {
|
|
3909
|
-
return
|
|
4086
|
+
return mo(e, t || this.options.draggable, this.el, !1);
|
|
3910
4087
|
},
|
|
3911
4088
|
option: function(e, t) {
|
|
3912
4089
|
var n = this.options;
|
|
3913
4090
|
if (t === void 0) return n[e];
|
|
3914
|
-
var r =
|
|
3915
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
4091
|
+
var r = Vo.modifyOption(this, e, t);
|
|
4092
|
+
n[e] = r === void 0 ? t : r, e === "group" && ws(n);
|
|
3916
4093
|
},
|
|
3917
4094
|
destroy: function() {
|
|
3918
|
-
|
|
4095
|
+
U("destroy", this);
|
|
3919
4096
|
var e = this.el;
|
|
3920
|
-
e[
|
|
4097
|
+
e[Fo] = null, B(e, "mousedown", this._onTapStart), B(e, "touchstart", this._onTapStart), B(e, "pointerdown", this._onTapStart), this.nativeDraggable && (B(e, "dragover", this), B(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3921
4098
|
e.removeAttribute("draggable");
|
|
3922
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
4099
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), es.splice(es.indexOf(this.el), 1), this.el = e = null;
|
|
3923
4100
|
},
|
|
3924
4101
|
_hideClone: function() {
|
|
3925
|
-
if (!
|
|
3926
|
-
if (
|
|
3927
|
-
|
|
4102
|
+
if (!Ko) {
|
|
4103
|
+
if (U("hideClone", this), Q.eventCanceled) return;
|
|
4104
|
+
V(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), Ko = !0;
|
|
3928
4105
|
}
|
|
3929
4106
|
},
|
|
3930
4107
|
_showClone: function(e) {
|
|
@@ -3932,99 +4109,99 @@ Q.prototype = {
|
|
|
3932
4109
|
this._hideClone();
|
|
3933
4110
|
return;
|
|
3934
4111
|
}
|
|
3935
|
-
if (
|
|
3936
|
-
if (
|
|
3937
|
-
|
|
4112
|
+
if (Ko) {
|
|
4113
|
+
if (U("showClone", this), Q.eventCanceled) return;
|
|
4114
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : Wo ? J.insertBefore(Y, Wo) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), V(Y, "display", ""), Ko = !1;
|
|
3938
4115
|
}
|
|
3939
4116
|
}
|
|
3940
4117
|
};
|
|
3941
|
-
function
|
|
4118
|
+
function ks(e) {
|
|
3942
4119
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3943
4120
|
}
|
|
3944
|
-
function
|
|
3945
|
-
var c, l = e[
|
|
3946
|
-
return window.CustomEvent && !
|
|
4121
|
+
function As(e, t, n, r, i, a, o, s) {
|
|
4122
|
+
var c, l = e[Fo], u = l.options.onMove, d;
|
|
4123
|
+
return window.CustomEvent && !io && !ao ? c = new CustomEvent("move", {
|
|
3947
4124
|
bubbles: !0,
|
|
3948
4125
|
cancelable: !0
|
|
3949
|
-
}) : (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 ||
|
|
4126
|
+
}) : (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 || H(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3950
4127
|
}
|
|
3951
|
-
function
|
|
4128
|
+
function js(e) {
|
|
3952
4129
|
e.draggable = !1;
|
|
3953
4130
|
}
|
|
3954
|
-
function
|
|
3955
|
-
|
|
4131
|
+
function Ms() {
|
|
4132
|
+
ms = !1;
|
|
3956
4133
|
}
|
|
3957
|
-
function
|
|
3958
|
-
var r =
|
|
4134
|
+
function Ns(e, t, n) {
|
|
4135
|
+
var r = H(xo(n.el, 0, n.options, !0)), i = Po(n.el, n.options, q), a = 10;
|
|
3959
4136
|
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;
|
|
3960
4137
|
}
|
|
3961
|
-
function
|
|
3962
|
-
var r =
|
|
4138
|
+
function Ps(e, t, n) {
|
|
4139
|
+
var r = H(So(n.el, n.options.draggable)), i = Po(n.el, n.options, q), a = 10;
|
|
3963
4140
|
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;
|
|
3964
4141
|
}
|
|
3965
|
-
function
|
|
4142
|
+
function Fs(e, t, n, r, i, a, o, s) {
|
|
3966
4143
|
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;
|
|
3967
4144
|
if (!o) {
|
|
3968
|
-
if (s &&
|
|
3969
|
-
if (!
|
|
3970
|
-
else if (
|
|
3971
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
4145
|
+
if (s && fs < l * i) {
|
|
4146
|
+
if (!us && (ls === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (us = !0), us) f = !0;
|
|
4147
|
+
else if (ls === 1 ? c < u + fs : c > d - fs) return -ls;
|
|
4148
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Is(t);
|
|
3972
4149
|
}
|
|
3973
4150
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3974
4151
|
}
|
|
3975
|
-
function
|
|
3976
|
-
return
|
|
4152
|
+
function Is(e) {
|
|
4153
|
+
return Co(G) < Co(e) ? 1 : -1;
|
|
3977
4154
|
}
|
|
3978
|
-
function
|
|
4155
|
+
function Ls(e) {
|
|
3979
4156
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3980
4157
|
return r.toString(36);
|
|
3981
4158
|
}
|
|
3982
|
-
function
|
|
3983
|
-
|
|
4159
|
+
function Rs(e) {
|
|
4160
|
+
hs.length = 0;
|
|
3984
4161
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3985
4162
|
var r = t[n];
|
|
3986
|
-
r.checked &&
|
|
4163
|
+
r.checked && hs.push(r);
|
|
3987
4164
|
}
|
|
3988
4165
|
}
|
|
3989
|
-
function
|
|
4166
|
+
function zs(e) {
|
|
3990
4167
|
return setTimeout(e, 0);
|
|
3991
4168
|
}
|
|
3992
|
-
function
|
|
4169
|
+
function Bs(e) {
|
|
3993
4170
|
return clearTimeout(e);
|
|
3994
4171
|
}
|
|
3995
|
-
|
|
3996
|
-
(Q.active ||
|
|
4172
|
+
gs && z(document, "touchmove", function(e) {
|
|
4173
|
+
(Q.active || Qo) && e.cancelable && e.preventDefault();
|
|
3997
4174
|
}), Q.utils = {
|
|
3998
|
-
on:
|
|
3999
|
-
off:
|
|
4000
|
-
css:
|
|
4001
|
-
find:
|
|
4175
|
+
on: z,
|
|
4176
|
+
off: B,
|
|
4177
|
+
css: V,
|
|
4178
|
+
find: vo,
|
|
4002
4179
|
is: function(e, t) {
|
|
4003
|
-
return !!
|
|
4180
|
+
return !!mo(e, t, e, !1);
|
|
4004
4181
|
},
|
|
4005
|
-
extend:
|
|
4006
|
-
throttle:
|
|
4007
|
-
closest:
|
|
4008
|
-
toggleClass:
|
|
4009
|
-
clone:
|
|
4010
|
-
index:
|
|
4011
|
-
nextTick:
|
|
4012
|
-
cancelNextTick:
|
|
4013
|
-
detectDirection:
|
|
4014
|
-
getChild:
|
|
4182
|
+
extend: Do,
|
|
4183
|
+
throttle: Ao,
|
|
4184
|
+
closest: mo,
|
|
4185
|
+
toggleClass: go,
|
|
4186
|
+
clone: No,
|
|
4187
|
+
index: Co,
|
|
4188
|
+
nextTick: zs,
|
|
4189
|
+
cancelNextTick: Bs,
|
|
4190
|
+
detectDirection: xs,
|
|
4191
|
+
getChild: xo
|
|
4015
4192
|
}, Q.get = function(e) {
|
|
4016
|
-
return e[
|
|
4193
|
+
return e[Fo];
|
|
4017
4194
|
}, Q.mount = function() {
|
|
4018
4195
|
var e = [...arguments];
|
|
4019
4196
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
4020
4197
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
4021
|
-
e.utils && (Q.utils =
|
|
4198
|
+
e.utils && (Q.utils = Xa(Xa({}, Q.utils), e.utils)), Vo.mount(e);
|
|
4022
4199
|
});
|
|
4023
4200
|
}, Q.create = function(e, t) {
|
|
4024
4201
|
return new Q(e, t);
|
|
4025
|
-
}, Q.version =
|
|
4026
|
-
var $ = [],
|
|
4027
|
-
function
|
|
4202
|
+
}, Q.version = no;
|
|
4203
|
+
var $ = [], Vs, Hs, Us = !1, Ws, Gs, Ks, qs;
|
|
4204
|
+
function Js() {
|
|
4028
4205
|
function e() {
|
|
4029
4206
|
for (var e in this.defaults = {
|
|
4030
4207
|
scroll: !0,
|
|
@@ -4037,70 +4214,70 @@ function bs() {
|
|
|
4037
4214
|
return e.prototype = {
|
|
4038
4215
|
dragStarted: function(e) {
|
|
4039
4216
|
var t = e.originalEvent;
|
|
4040
|
-
this.sortable.nativeDraggable ?
|
|
4217
|
+
this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? z(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? z(document, "touchmove", this._handleFallbackAutoScroll) : z(document, "mousemove", this._handleFallbackAutoScroll);
|
|
4041
4218
|
},
|
|
4042
4219
|
dragOverCompleted: function(e) {
|
|
4043
4220
|
var t = e.originalEvent;
|
|
4044
4221
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
4045
4222
|
},
|
|
4046
4223
|
drop: function() {
|
|
4047
|
-
this.sortable.nativeDraggable ?
|
|
4224
|
+
this.sortable.nativeDraggable ? B(document, "dragover", this._handleAutoScroll) : (B(document, "pointermove", this._handleFallbackAutoScroll), B(document, "touchmove", this._handleFallbackAutoScroll), B(document, "mousemove", this._handleFallbackAutoScroll)), Xs(), Ys(), jo();
|
|
4048
4225
|
},
|
|
4049
4226
|
nulling: function() {
|
|
4050
|
-
|
|
4227
|
+
Ks = Hs = Vs = Us = qs = Ws = Gs = null, $.length = 0;
|
|
4051
4228
|
},
|
|
4052
4229
|
_handleFallbackAutoScroll: function(e) {
|
|
4053
4230
|
this._handleAutoScroll(e, !0);
|
|
4054
4231
|
},
|
|
4055
4232
|
_handleAutoScroll: function(e, t) {
|
|
4056
4233
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
4057
|
-
if (
|
|
4058
|
-
|
|
4059
|
-
var o =
|
|
4060
|
-
|
|
4061
|
-
var a =
|
|
4062
|
-
a !== o && (o = a,
|
|
4063
|
-
}, 10),
|
|
4234
|
+
if (Ks = e, t || this.options.forceAutoScrollFallback || ao || io || so) {
|
|
4235
|
+
Zs(e, this.options, a, t);
|
|
4236
|
+
var o = Eo(a, !0);
|
|
4237
|
+
Us && (!qs || r !== Ws || i !== Gs) && (qs && Xs(), qs = setInterval(function() {
|
|
4238
|
+
var a = Eo(document.elementFromPoint(r, i), !0);
|
|
4239
|
+
a !== o && (o = a, Ys()), Zs(e, n.options, a, t);
|
|
4240
|
+
}, 10), Ws = r, Gs = i);
|
|
4064
4241
|
} else {
|
|
4065
|
-
if (!this.options.bubbleScroll ||
|
|
4066
|
-
|
|
4242
|
+
if (!this.options.bubbleScroll || Eo(a, !0) === yo()) {
|
|
4243
|
+
Ys();
|
|
4067
4244
|
return;
|
|
4068
4245
|
}
|
|
4069
|
-
|
|
4246
|
+
Zs(e, this.options, Eo(a, !1), !1);
|
|
4070
4247
|
}
|
|
4071
4248
|
}
|
|
4072
|
-
},
|
|
4249
|
+
}, $a(e, {
|
|
4073
4250
|
pluginName: "scroll",
|
|
4074
4251
|
initializeByDefault: !0
|
|
4075
4252
|
});
|
|
4076
4253
|
}
|
|
4077
|
-
function
|
|
4254
|
+
function Ys() {
|
|
4078
4255
|
$.forEach(function(e) {
|
|
4079
4256
|
clearInterval(e.pid);
|
|
4080
4257
|
}), $ = [];
|
|
4081
4258
|
}
|
|
4082
|
-
function
|
|
4083
|
-
clearInterval(
|
|
4259
|
+
function Xs() {
|
|
4260
|
+
clearInterval(qs);
|
|
4084
4261
|
}
|
|
4085
|
-
var
|
|
4262
|
+
var Zs = Ao(function(e, t, n, r) {
|
|
4086
4263
|
if (t.scroll) {
|
|
4087
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
4088
|
-
|
|
4089
|
-
var d = 0, f =
|
|
4264
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = yo(), l = !1, u;
|
|
4265
|
+
Hs !== n && (Hs = n, Ys(), Vs = t.scroll, u = t.scrollFn, Vs === !0 && (Vs = Eo(n, !0)));
|
|
4266
|
+
var d = 0, f = Vs;
|
|
4090
4267
|
do {
|
|
4091
|
-
var p = f, m =
|
|
4268
|
+
var p = f, m = H(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 = V(p), E = p.scrollLeft, D = p.scrollTop;
|
|
4092
4269
|
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"));
|
|
4093
4270
|
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);
|
|
4094
4271
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
4095
4272
|
($[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() {
|
|
4096
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
4273
|
+
r && this.layer === 0 && Q.active._onTouchMove(Ks);
|
|
4097
4274
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
4098
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
4275
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[Fo], n, t, e, Ks, $[this.layer].el) !== "continue" || Mo($[this.layer].el, n, t);
|
|
4099
4276
|
}.bind({ layer: d }), 24))), d++;
|
|
4100
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
4101
|
-
|
|
4277
|
+
} while (t.bubbleScroll && f !== c && (f = Eo(f, !1)));
|
|
4278
|
+
Us = l;
|
|
4102
4279
|
}
|
|
4103
|
-
}, 30),
|
|
4280
|
+
}, 30), Qs = function(e) {
|
|
4104
4281
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
4105
4282
|
if (t) {
|
|
4106
4283
|
var c = n || i;
|
|
@@ -4112,8 +4289,8 @@ var Cs = no(function(e, t, n, r) {
|
|
|
4112
4289
|
}));
|
|
4113
4290
|
}
|
|
4114
4291
|
};
|
|
4115
|
-
function
|
|
4116
|
-
|
|
4292
|
+
function $s() {}
|
|
4293
|
+
$s.prototype = {
|
|
4117
4294
|
startIndex: null,
|
|
4118
4295
|
dragStart: function(e) {
|
|
4119
4296
|
var t = e.oldDraggableIndex;
|
|
@@ -4122,72 +4299,72 @@ Ts.prototype = {
|
|
|
4122
4299
|
onSpill: function(e) {
|
|
4123
4300
|
var t = e.dragEl, n = e.putSortable;
|
|
4124
4301
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
4125
|
-
var r =
|
|
4302
|
+
var r = xo(this.sortable.el, this.startIndex, this.options);
|
|
4126
4303
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
4127
4304
|
},
|
|
4128
|
-
drop:
|
|
4129
|
-
},
|
|
4130
|
-
function
|
|
4131
|
-
|
|
4305
|
+
drop: Qs
|
|
4306
|
+
}, $a($s, { pluginName: "revertOnSpill" });
|
|
4307
|
+
function ec() {}
|
|
4308
|
+
ec.prototype = {
|
|
4132
4309
|
onSpill: function(e) {
|
|
4133
4310
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
4134
4311
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
4135
4312
|
},
|
|
4136
|
-
drop:
|
|
4137
|
-
},
|
|
4138
|
-
function
|
|
4313
|
+
drop: Qs
|
|
4314
|
+
}, $a(ec, { pluginName: "removeOnSpill" }), Q.mount(new Js()), Q.mount(ec, $s);
|
|
4315
|
+
function tc(e) {
|
|
4139
4316
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
4140
4317
|
}
|
|
4141
|
-
function
|
|
4142
|
-
|
|
4318
|
+
function nc(e) {
|
|
4319
|
+
te() && l(e);
|
|
4143
4320
|
}
|
|
4144
|
-
function
|
|
4145
|
-
|
|
4321
|
+
function rc(e) {
|
|
4322
|
+
te() ? n(e) : m(e);
|
|
4146
4323
|
}
|
|
4147
|
-
var
|
|
4148
|
-
function
|
|
4149
|
-
|
|
4324
|
+
var ic = null, ac = null;
|
|
4325
|
+
function oc(e = null, t = null) {
|
|
4326
|
+
ic = e, ac = t;
|
|
4150
4327
|
}
|
|
4151
|
-
function
|
|
4328
|
+
function sc() {
|
|
4152
4329
|
return {
|
|
4153
|
-
data:
|
|
4154
|
-
clonedData:
|
|
4330
|
+
data: ic,
|
|
4331
|
+
clonedData: ac
|
|
4155
4332
|
};
|
|
4156
4333
|
}
|
|
4157
|
-
var
|
|
4158
|
-
function
|
|
4159
|
-
let t =
|
|
4160
|
-
Array.isArray(
|
|
4161
|
-
let c = null, { immediate: l = !0, clone: u =
|
|
4334
|
+
var cc = Symbol("cloneElement");
|
|
4335
|
+
function lc(...e) {
|
|
4336
|
+
let t = te()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
4337
|
+
Array.isArray(P(i)) || (o = i, i = null);
|
|
4338
|
+
let c = null, { immediate: l = !0, clone: u = tc, forceFallback: d, fallbackOnBody: f, customUpdate: p } = P(o) ?? {};
|
|
4162
4339
|
function h(e) {
|
|
4163
4340
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
4164
4341
|
n = d && !f ? o.slice(0, -1) : o;
|
|
4165
|
-
let s =
|
|
4166
|
-
|
|
4342
|
+
let s = P(P(i)?.[r]), c = u(s);
|
|
4343
|
+
oc(s, c), a[cc] = c;
|
|
4167
4344
|
}
|
|
4168
4345
|
function g(e) {
|
|
4169
|
-
let t = e.item[
|
|
4170
|
-
if (!
|
|
4171
|
-
if (
|
|
4172
|
-
let n = [...
|
|
4173
|
-
i.value =
|
|
4346
|
+
let t = e.item[cc];
|
|
4347
|
+
if (!Ra(t)) {
|
|
4348
|
+
if (Va(e.item), a(i)) {
|
|
4349
|
+
let n = [...P(i)];
|
|
4350
|
+
i.value = La(n, e.newDraggableIndex, t);
|
|
4174
4351
|
return;
|
|
4175
4352
|
}
|
|
4176
|
-
|
|
4353
|
+
La(P(i), e.newDraggableIndex, t);
|
|
4177
4354
|
}
|
|
4178
4355
|
}
|
|
4179
4356
|
function _(e) {
|
|
4180
4357
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, pullMode: s, clone: c } = e;
|
|
4181
|
-
if (
|
|
4182
|
-
|
|
4358
|
+
if (Ba(t, n, r), s === "clone") {
|
|
4359
|
+
Va(c);
|
|
4183
4360
|
return;
|
|
4184
4361
|
}
|
|
4185
4362
|
if (a(i)) {
|
|
4186
|
-
let e = [...
|
|
4187
|
-
i.value =
|
|
4363
|
+
let e = [...P(i)];
|
|
4364
|
+
i.value = Ia(e, o);
|
|
4188
4365
|
return;
|
|
4189
4366
|
}
|
|
4190
|
-
|
|
4367
|
+
Ia(P(i), o);
|
|
4191
4368
|
}
|
|
4192
4369
|
function v(e) {
|
|
4193
4370
|
if (p) {
|
|
@@ -4195,12 +4372,12 @@ function Fs(...e) {
|
|
|
4195
4372
|
return;
|
|
4196
4373
|
}
|
|
4197
4374
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, newDraggableIndex: s } = e;
|
|
4198
|
-
if (
|
|
4199
|
-
let e = [...
|
|
4200
|
-
i.value =
|
|
4375
|
+
if (Va(n), Ba(t, n, r), a(i)) {
|
|
4376
|
+
let e = [...P(i)];
|
|
4377
|
+
i.value = Na(e, o, s);
|
|
4201
4378
|
return;
|
|
4202
4379
|
}
|
|
4203
|
-
|
|
4380
|
+
Na(P(i), o, s);
|
|
4204
4381
|
}
|
|
4205
4382
|
function y(e) {
|
|
4206
4383
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -4219,7 +4396,7 @@ function Fs(...e) {
|
|
|
4219
4396
|
n = null;
|
|
4220
4397
|
}
|
|
4221
4398
|
m(() => {
|
|
4222
|
-
if (
|
|
4399
|
+
if (oc(), o) throw o;
|
|
4223
4400
|
});
|
|
4224
4401
|
}
|
|
4225
4402
|
let b = {
|
|
@@ -4230,20 +4407,20 @@ function Fs(...e) {
|
|
|
4230
4407
|
onEnd: y
|
|
4231
4408
|
};
|
|
4232
4409
|
function x(e) {
|
|
4233
|
-
let n =
|
|
4234
|
-
return e ||=
|
|
4410
|
+
let n = P(r);
|
|
4411
|
+
return e ||= za(n) ? Ha(n, t?.$el) : n, e && !Ga(e) && (e = e.$el), e || Ma("Root element not found"), e;
|
|
4235
4412
|
}
|
|
4236
4413
|
function S() {
|
|
4237
|
-
let e =
|
|
4238
|
-
return
|
|
4239
|
-
|
|
4240
|
-
}),
|
|
4414
|
+
let e = P(o) ?? {}, { immediate: t, clone: n } = e, r = ka(e, ["immediate", "clone"]);
|
|
4415
|
+
return Ka(r, (e, t) => {
|
|
4416
|
+
qa(e) && (r[e] = (e, ...n) => (Ja(e, sc()), t(e, ...n)));
|
|
4417
|
+
}), Wa(i === null ? {} : b, r);
|
|
4241
4418
|
}
|
|
4242
4419
|
let C = (e) => {
|
|
4243
4420
|
e = x(e), c && w.destroy(), c = new Q(e, S());
|
|
4244
4421
|
};
|
|
4245
4422
|
s(() => o, () => {
|
|
4246
|
-
c &&
|
|
4423
|
+
c && Ka(S(), (e, t) => {
|
|
4247
4424
|
c?.option(e, t);
|
|
4248
4425
|
});
|
|
4249
4426
|
}, { deep: !0 });
|
|
@@ -4256,15 +4433,15 @@ function Fs(...e) {
|
|
|
4256
4433
|
toArray: () => c?.toArray(),
|
|
4257
4434
|
closest: (...e) => c?.closest(...e)
|
|
4258
4435
|
};
|
|
4259
|
-
return
|
|
4436
|
+
return rc(() => {
|
|
4260
4437
|
l && C();
|
|
4261
|
-
}),
|
|
4438
|
+
}), nc(w.destroy), Oa({
|
|
4262
4439
|
start: C,
|
|
4263
4440
|
pause: () => w?.option("disabled", !0),
|
|
4264
4441
|
resume: () => w?.option("disabled", !1)
|
|
4265
4442
|
}, w);
|
|
4266
4443
|
}
|
|
4267
|
-
var
|
|
4444
|
+
var uc = [
|
|
4268
4445
|
"update",
|
|
4269
4446
|
"start",
|
|
4270
4447
|
"add",
|
|
@@ -4277,7 +4454,7 @@ var Is = [
|
|
|
4277
4454
|
"clone",
|
|
4278
4455
|
"move",
|
|
4279
4456
|
"change"
|
|
4280
|
-
],
|
|
4457
|
+
], dc = [
|
|
4281
4458
|
"clone",
|
|
4282
4459
|
"animation",
|
|
4283
4460
|
"ghostClass",
|
|
@@ -4321,43 +4498,43 @@ var Is = [
|
|
|
4321
4498
|
"tag",
|
|
4322
4499
|
"target",
|
|
4323
4500
|
"customUpdate",
|
|
4324
|
-
...
|
|
4325
|
-
],
|
|
4501
|
+
...uc.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
4502
|
+
], fc = L({
|
|
4326
4503
|
name: "VueDraggable",
|
|
4327
4504
|
model: {
|
|
4328
4505
|
prop: "modelValue",
|
|
4329
4506
|
event: "update:modelValue"
|
|
4330
4507
|
},
|
|
4331
|
-
props:
|
|
4332
|
-
emits: ["update:modelValue", ...
|
|
4508
|
+
props: dc,
|
|
4509
|
+
emits: ["update:modelValue", ...uc],
|
|
4333
4510
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
4334
|
-
let a =
|
|
4511
|
+
let a = uc.reduce((e, t) => {
|
|
4335
4512
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
4336
4513
|
return e[r] = (...e) => n(t, ...e), e;
|
|
4337
|
-
}, {}), s =
|
|
4338
|
-
let t = C(e), { modelValue: n } = t, r =
|
|
4339
|
-
let r =
|
|
4514
|
+
}, {}), s = F(() => {
|
|
4515
|
+
let t = C(e), { modelValue: n } = t, r = ka(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
4516
|
+
let r = P(n);
|
|
4340
4517
|
return r !== void 0 && (e[t] = r), e;
|
|
4341
4518
|
}, {});
|
|
4342
|
-
return
|
|
4343
|
-
}), c =
|
|
4519
|
+
return Oa(Oa({}, a), Fa(Oa(Oa({}, i), o)));
|
|
4520
|
+
}), c = F({
|
|
4344
4521
|
get: () => e.modelValue,
|
|
4345
4522
|
set: (e) => n("update:modelValue", e)
|
|
4346
|
-
}), l = _(), u = o(
|
|
4523
|
+
}), l = _(), u = o(lc(e.target || l, c, s));
|
|
4347
4524
|
return r(u), () => b(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
4348
4525
|
}
|
|
4349
|
-
}),
|
|
4526
|
+
}), pc = {
|
|
4350
4527
|
mounted: "mounted",
|
|
4351
4528
|
unmounted: "unmounted"
|
|
4352
4529
|
};
|
|
4353
|
-
|
|
4530
|
+
pc.mounted, pc.unmounted;
|
|
4354
4531
|
//#endregion
|
|
4355
4532
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4356
|
-
var
|
|
4533
|
+
var mc = { class: "tpl:w-full" }, hc = {
|
|
4357
4534
|
key: 0,
|
|
4358
4535
|
"data-testid": "section-drop-hint",
|
|
4359
4536
|
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)]"
|
|
4360
|
-
},
|
|
4537
|
+
}, gc = /* @__PURE__ */ L({
|
|
4361
4538
|
__name: "SectionBlock",
|
|
4362
4539
|
props: {
|
|
4363
4540
|
block: {},
|
|
@@ -4365,13 +4542,13 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4365
4542
|
},
|
|
4366
4543
|
setup(e) {
|
|
4367
4544
|
let n = {
|
|
4368
|
-
title:
|
|
4369
|
-
paragraph:
|
|
4370
|
-
image:
|
|
4371
|
-
button:
|
|
4372
|
-
divider:
|
|
4373
|
-
custom:
|
|
4374
|
-
}, i = e, { t: a } =
|
|
4545
|
+
title: xa,
|
|
4546
|
+
paragraph: na,
|
|
4547
|
+
image: Ui,
|
|
4548
|
+
button: Mr,
|
|
4549
|
+
divider: Ci,
|
|
4550
|
+
custom: xi
|
|
4551
|
+
}, i = e, { t: a } = Vt(), o = lt(Et, "SectionBlock"), s = p(Ct, null), c = p(Pt, null), l = p(St, {}), f = p(Nt, null);
|
|
4375
4552
|
function m(e) {
|
|
4376
4553
|
let t = l.savedBlocks;
|
|
4377
4554
|
if (t?.isPicking.value) {
|
|
@@ -4380,7 +4557,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4380
4557
|
}
|
|
4381
4558
|
o.selectBlock(e);
|
|
4382
4559
|
}
|
|
4383
|
-
let h =
|
|
4560
|
+
let h = F(() => {
|
|
4384
4561
|
switch (i.block.columns) {
|
|
4385
4562
|
case "2": return ["50%", "50%"];
|
|
4386
4563
|
case "3": return [
|
|
@@ -4392,11 +4569,11 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4392
4569
|
case "2-1": return ["66.67%", "33.33%"];
|
|
4393
4570
|
default: return ["100%"];
|
|
4394
4571
|
}
|
|
4395
|
-
}), g =
|
|
4572
|
+
}), g = F(() => {
|
|
4396
4573
|
let e = h.value.length, t = [...i.block.children];
|
|
4397
4574
|
for (; t.length < e;) t.push([]);
|
|
4398
4575
|
return t.slice(0, e);
|
|
4399
|
-
}), _ =
|
|
4576
|
+
}), _ = F(() => i.viewport === "mobile" && i.block.stackOnMobile !== !1);
|
|
4400
4577
|
function v(e) {
|
|
4401
4578
|
return g.value[e] || [];
|
|
4402
4579
|
}
|
|
@@ -4406,7 +4583,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4406
4583
|
r[e] = n, o.updateBlock(i.block.id, { children: r });
|
|
4407
4584
|
}
|
|
4408
4585
|
function b(e) {
|
|
4409
|
-
return
|
|
4586
|
+
return ia(e, c, n);
|
|
4410
4587
|
}
|
|
4411
4588
|
function C(e, t) {
|
|
4412
4589
|
e.type === "custom" && o.updateBlock(e.id, {
|
|
@@ -4414,16 +4591,16 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4414
4591
|
dataSourceFetched: t.dataSourceFetched
|
|
4415
4592
|
});
|
|
4416
4593
|
}
|
|
4417
|
-
return (n, i) => (O(), S("div",
|
|
4594
|
+
return (n, i) => (O(), S("div", mc, [x("div", { class: r(["tpl:flex tpl:gap-0", { "tpl:flex-col": _.value }]) }, [(O(!0), S(N, null, D(g.value, (n, i) => (O(), S("div", {
|
|
4418
4595
|
key: i,
|
|
4419
4596
|
class: r(["tpl:relative tpl:min-h-[60px] tpl:rounded", v(i).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4420
4597
|
style: u({ width: _.value ? "100%" : h.value[i] })
|
|
4421
|
-
}, [w(
|
|
4598
|
+
}, [w(P(fc), {
|
|
4422
4599
|
"model-value": v(i),
|
|
4423
4600
|
group: {
|
|
4424
4601
|
name: "blocks",
|
|
4425
4602
|
pull: !0,
|
|
4426
|
-
put: (e, t, n) =>
|
|
4603
|
+
put: (e, t, n) => P(Sa)(n)
|
|
4427
4604
|
},
|
|
4428
4605
|
animation: 150,
|
|
4429
4606
|
"ghost-class": "tpl-ghost",
|
|
@@ -4436,19 +4613,19 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4436
4613
|
class: "tpl:min-h-[60px]",
|
|
4437
4614
|
"onUpdate:modelValue": (e) => y(i, e)
|
|
4438
4615
|
}, {
|
|
4439
|
-
default:
|
|
4616
|
+
default: ne(() => [(O(!0), S(N, null, D(v(i), (n) => t((O(), S("div", { key: n.id }, [w(ya, {
|
|
4440
4617
|
block: n,
|
|
4441
|
-
"is-selected":
|
|
4618
|
+
"is-selected": P(o).state.selectedBlockId === n.id,
|
|
4442
4619
|
viewport: e.viewport,
|
|
4443
|
-
"preview-mode":
|
|
4620
|
+
"preview-mode": P(o).state.previewMode,
|
|
4444
4621
|
nested: "",
|
|
4445
4622
|
onSelect: (e) => m(n.id)
|
|
4446
4623
|
}, {
|
|
4447
|
-
default:
|
|
4624
|
+
default: ne(() => [(O(), A(d(b(n)), {
|
|
4448
4625
|
block: n,
|
|
4449
4626
|
viewport: e.viewport,
|
|
4450
4627
|
onFetchData: (e) => C(n, e),
|
|
4451
|
-
onUpdate: (e) =>
|
|
4628
|
+
onUpdate: (e) => P(o).updateBlock(n.id, e)
|
|
4452
4629
|
}, null, 40, [
|
|
4453
4630
|
"block",
|
|
4454
4631
|
"viewport",
|
|
@@ -4462,19 +4639,19 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4462
4639
|
"viewport",
|
|
4463
4640
|
"preview-mode",
|
|
4464
4641
|
"onSelect"
|
|
4465
|
-
])])), [[
|
|
4642
|
+
])])), [[re, P(f) === !1 || !P(s)?.isHidden(n.id)]])), 128))]),
|
|
4466
4643
|
_: 2
|
|
4467
4644
|
}, 1032, [
|
|
4468
4645
|
"model-value",
|
|
4469
4646
|
"group",
|
|
4470
4647
|
"onUpdate:modelValue"
|
|
4471
|
-
]), v(i).length === 0 ? (O(), S("div",
|
|
4648
|
+
]), v(i).length === 0 ? (O(), S("div", hc, [x("span", null, k(P(a).section.dropHere), 1)])) : I("", !0)], 6))), 128))], 2)]));
|
|
4472
4649
|
}
|
|
4473
|
-
}),
|
|
4650
|
+
}), _c = we, vc = {
|
|
4474
4651
|
small: 24,
|
|
4475
4652
|
medium: 32,
|
|
4476
4653
|
large: 48
|
|
4477
|
-
},
|
|
4654
|
+
}, yc = [
|
|
4478
4655
|
"facebook",
|
|
4479
4656
|
"twitter",
|
|
4480
4657
|
"instagram",
|
|
@@ -4492,11 +4669,11 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4492
4669
|
"github",
|
|
4493
4670
|
"dribbble",
|
|
4494
4671
|
"behance"
|
|
4495
|
-
],
|
|
4672
|
+
], bc = [
|
|
4496
4673
|
"width",
|
|
4497
4674
|
"height",
|
|
4498
4675
|
"fill"
|
|
4499
|
-
],
|
|
4676
|
+
], xc = ["d"], Sc = /* @__PURE__ */ L({
|
|
4500
4677
|
__name: "SocialIconSvg",
|
|
4501
4678
|
props: {
|
|
4502
4679
|
platform: {},
|
|
@@ -4504,7 +4681,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4504
4681
|
iconSize: {}
|
|
4505
4682
|
},
|
|
4506
4683
|
setup(e) {
|
|
4507
|
-
let t = e, n =
|
|
4684
|
+
let t = e, n = F(() => _c[t.platform]), r = F(() => vc[t.iconSize]), i = F(() => {
|
|
4508
4685
|
let e = {
|
|
4509
4686
|
display: "inline-flex",
|
|
4510
4687
|
alignItems: "center",
|
|
@@ -4541,40 +4718,40 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4541
4718
|
};
|
|
4542
4719
|
default: return e;
|
|
4543
4720
|
}
|
|
4544
|
-
}), a =
|
|
4721
|
+
}), a = F(() => Math.floor(r.value * .6)), o = F(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
4545
4722
|
return (e, t) => (O(), S("span", { style: u(i.value) }, [(O(), S("svg", {
|
|
4546
4723
|
width: a.value,
|
|
4547
4724
|
height: a.value,
|
|
4548
4725
|
viewBox: "0 0 24 24",
|
|
4549
4726
|
fill: o.value,
|
|
4550
4727
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4551
|
-
}, [x("path", { d: n.value.path }, null, 8,
|
|
4728
|
+
}, [x("path", { d: n.value.path }, null, 8, xc)], 8, bc))], 4));
|
|
4552
4729
|
}
|
|
4553
|
-
}),
|
|
4730
|
+
}), Cc = { class: "tpl:w-full" }, wc = ["href"], Tc = {
|
|
4554
4731
|
key: 1,
|
|
4555
4732
|
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)]"
|
|
4556
|
-
},
|
|
4733
|
+
}, Ec = /* @__PURE__ */ L({
|
|
4557
4734
|
__name: "SocialIconsBlock",
|
|
4558
4735
|
props: {
|
|
4559
4736
|
block: {},
|
|
4560
4737
|
viewport: {}
|
|
4561
4738
|
},
|
|
4562
4739
|
setup(e) {
|
|
4563
|
-
let t = e, { t: n } =
|
|
4740
|
+
let t = e, { t: n } = Vt(), r = F(() => ({
|
|
4564
4741
|
display: "flex",
|
|
4565
4742
|
flexWrap: "wrap",
|
|
4566
4743
|
gap: `${t.block.spacing}px`,
|
|
4567
4744
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4568
|
-
})), i =
|
|
4569
|
-
return (t, a) => (O(), S("div",
|
|
4745
|
+
})), i = F(() => t.block.icons.length > 0);
|
|
4746
|
+
return (t, a) => (O(), S("div", Cc, [i.value ? (O(), S("div", {
|
|
4570
4747
|
key: 0,
|
|
4571
4748
|
style: u(r.value)
|
|
4572
|
-
}, [(O(!0), S(
|
|
4749
|
+
}, [(O(!0), S(N, null, D(e.block.icons, (t) => (O(), S("a", {
|
|
4573
4750
|
key: t.id,
|
|
4574
4751
|
href: t.url || "#",
|
|
4575
4752
|
class: "tpl:cursor-default",
|
|
4576
|
-
onClick: a[0] ||=
|
|
4577
|
-
}, [w(
|
|
4753
|
+
onClick: a[0] ||= R(() => {}, ["prevent"])
|
|
4754
|
+
}, [w(Sc, {
|
|
4578
4755
|
platform: t.platform,
|
|
4579
4756
|
"icon-style": e.block.iconStyle,
|
|
4580
4757
|
"icon-size": e.block.iconSize
|
|
@@ -4582,44 +4759,44 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4582
4759
|
"platform",
|
|
4583
4760
|
"icon-style",
|
|
4584
4761
|
"icon-size"
|
|
4585
|
-
])], 8,
|
|
4762
|
+
])], 8, wc))), 128))], 4)) : (O(), S("div", Tc, [w(P(Ur), { size: 16 }), x("span", null, k(P(n).social.addIcons), 1)]))]));
|
|
4586
4763
|
}
|
|
4587
|
-
}),
|
|
4764
|
+
}), Dc = { class: "tpl:w-full" }, Oc = {
|
|
4588
4765
|
key: 0,
|
|
4589
4766
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4590
4767
|
style: {
|
|
4591
4768
|
"background-color": "var(--tpl-bg-hover)",
|
|
4592
4769
|
color: "var(--tpl-text-dim)"
|
|
4593
4770
|
}
|
|
4594
|
-
},
|
|
4771
|
+
}, kc = /* @__PURE__ */ L({
|
|
4595
4772
|
__name: "SpacerBlock",
|
|
4596
4773
|
props: {
|
|
4597
4774
|
block: {},
|
|
4598
4775
|
viewport: {}
|
|
4599
4776
|
},
|
|
4600
4777
|
setup(e) {
|
|
4601
|
-
let t = e, n =
|
|
4778
|
+
let t = e, n = lt(Et, "SpacerBlock"), i = F(() => ({
|
|
4602
4779
|
height: `${t.block.height}px`,
|
|
4603
4780
|
minHeight: `${t.block.height}px`,
|
|
4604
4781
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4605
4782
|
}));
|
|
4606
|
-
return (t, a) => (O(), S("div",
|
|
4783
|
+
return (t, a) => (O(), S("div", Dc, [x("div", {
|
|
4607
4784
|
style: u(i.value),
|
|
4608
|
-
class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !
|
|
4609
|
-
}, [
|
|
4785
|
+
class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !P(n).state.previewMode }])
|
|
4786
|
+
}, [P(n).state.previewMode ? I("", !0) : (O(), S("span", Oc, k(e.block.height) + "px ", 1))], 6)]));
|
|
4610
4787
|
}
|
|
4611
|
-
}),
|
|
4788
|
+
}), Ac = { class: "tpl:w-full" }, jc = { key: 0 }, Mc = [
|
|
4612
4789
|
"aria-label",
|
|
4613
4790
|
"data-placeholder",
|
|
4614
4791
|
"onBlur"
|
|
4615
|
-
],
|
|
4792
|
+
], Nc = [
|
|
4616
4793
|
"aria-label",
|
|
4617
4794
|
"data-placeholder",
|
|
4618
4795
|
"onBlur"
|
|
4619
|
-
],
|
|
4796
|
+
], Pc = {
|
|
4620
4797
|
key: 1,
|
|
4621
4798
|
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)]"
|
|
4622
|
-
},
|
|
4799
|
+
}, Fc = /*#__PURE__*/ tn(/* @__PURE__ */ L({
|
|
4623
4800
|
__name: "TableBlock",
|
|
4624
4801
|
props: {
|
|
4625
4802
|
block: {},
|
|
@@ -4633,7 +4810,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4633
4810
|
updated(e, t) {
|
|
4634
4811
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4635
4812
|
}
|
|
4636
|
-
}, r = e, { t: i } =
|
|
4813
|
+
}, r = e, { t: i } = Vt(), a = lt(Et, "TableBlock"), o = F(() => r.block.rows.length > 0), s = F(() => {
|
|
4637
4814
|
let e = {
|
|
4638
4815
|
width: "100%",
|
|
4639
4816
|
borderCollapse: "collapse",
|
|
@@ -4642,15 +4819,15 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4642
4819
|
fontFamily: r.block.fontFamily || "inherit"
|
|
4643
4820
|
};
|
|
4644
4821
|
return r.block.color && (e.color = r.block.color), e;
|
|
4645
|
-
}), c =
|
|
4822
|
+
}), c = F(() => ({
|
|
4646
4823
|
border: `${r.block.borderWidth}px solid ${r.block.borderColor}`,
|
|
4647
4824
|
padding: `${r.block.cellPadding}px`,
|
|
4648
4825
|
textAlign: r.block.textAlign
|
|
4649
|
-
})), l =
|
|
4826
|
+
})), l = F(() => ({
|
|
4650
4827
|
...c.value,
|
|
4651
4828
|
fontWeight: "bold",
|
|
4652
4829
|
backgroundColor: r.block.headerBackgroundColor || "transparent"
|
|
4653
|
-
})), d =
|
|
4830
|
+
})), d = F(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), f = F(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
|
|
4654
4831
|
function p() {
|
|
4655
4832
|
a.selectBlock(r.block.id);
|
|
4656
4833
|
}
|
|
@@ -4664,31 +4841,31 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4664
4841
|
} : n);
|
|
4665
4842
|
a.updateBlock(r.block.id, { rows: o });
|
|
4666
4843
|
}
|
|
4667
|
-
return (e, r) => (O(), S("div",
|
|
4844
|
+
return (e, r) => (O(), S("div", Ac, [o.value ? (O(), S("table", {
|
|
4668
4845
|
key: 0,
|
|
4669
4846
|
style: u(s.value),
|
|
4670
4847
|
class: "tpl-table-editable"
|
|
4671
|
-
}, [d.value ? (O(), S("thead",
|
|
4848
|
+
}, [d.value ? (O(), S("thead", jc, [x("tr", null, [(O(!0), S(N, null, D(d.value.cells, (e) => t((O(), S("th", {
|
|
4672
4849
|
key: e.id,
|
|
4673
4850
|
style: u(l.value),
|
|
4674
|
-
"aria-label":
|
|
4851
|
+
"aria-label": P(i).table.cellPlaceholder,
|
|
4675
4852
|
contenteditable: "true",
|
|
4676
|
-
"data-placeholder":
|
|
4853
|
+
"data-placeholder": P(i).table.cellPlaceholder,
|
|
4677
4854
|
onBlur: (t) => m(d.value.id, e.id, t),
|
|
4678
|
-
onKeydown: r[0] ||=
|
|
4679
|
-
onClick:
|
|
4680
|
-
}, null, 44,
|
|
4855
|
+
onKeydown: r[0] ||= ie(R((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4856
|
+
onClick: R(p, ["stop"])
|
|
4857
|
+
}, null, 44, Mc)), [[n, e.content]])), 128))])])) : I("", !0), x("tbody", null, [(O(!0), S(N, null, D(f.value, (e) => (O(), S("tr", { key: e.id }, [(O(!0), S(N, null, D(e.cells, (a) => t((O(), S("td", {
|
|
4681
4858
|
key: a.id,
|
|
4682
4859
|
style: u(c.value),
|
|
4683
|
-
"aria-label":
|
|
4860
|
+
"aria-label": P(i).table.cellPlaceholder,
|
|
4684
4861
|
contenteditable: "true",
|
|
4685
|
-
"data-placeholder":
|
|
4862
|
+
"data-placeholder": P(i).table.cellPlaceholder,
|
|
4686
4863
|
onBlur: (t) => m(e.id, a.id, t),
|
|
4687
|
-
onKeydown: r[1] ||=
|
|
4688
|
-
onClick:
|
|
4689
|
-
}, null, 44,
|
|
4864
|
+
onKeydown: r[1] ||= ie(R((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4865
|
+
onClick: R(p, ["stop"])
|
|
4866
|
+
}, null, 44, Nc)), [[n, a.content]])), 128))]))), 128))])], 4)) : (O(), S("div", Pc, [w(P(Wr), { size: 16 }), x("span", null, k(P(i).table.empty), 1)]))]));
|
|
4690
4867
|
}
|
|
4691
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4868
|
+
}), [["__scopeId", "data-v-963ac422"]]), Ic = /* @__PURE__ */ L({
|
|
4692
4869
|
__name: "VideoPlayButton",
|
|
4693
4870
|
props: { hoverEffect: {
|
|
4694
4871
|
type: Boolean,
|
|
@@ -4706,7 +4883,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4706
4883
|
});
|
|
4707
4884
|
//#endregion
|
|
4708
4885
|
//#region src/utils/videoThumbnail.ts
|
|
4709
|
-
function
|
|
4886
|
+
function Lc(e) {
|
|
4710
4887
|
if (!e) return {
|
|
4711
4888
|
platform: "unknown",
|
|
4712
4889
|
videoId: null,
|
|
@@ -4738,25 +4915,25 @@ function lc(e) {
|
|
|
4738
4915
|
thumbnailUrl: null
|
|
4739
4916
|
};
|
|
4740
4917
|
}
|
|
4741
|
-
function
|
|
4742
|
-
return t ||
|
|
4918
|
+
function Rc(e, t) {
|
|
4919
|
+
return t || Lc(e).thumbnailUrl;
|
|
4743
4920
|
}
|
|
4744
4921
|
//#endregion
|
|
4745
4922
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4746
|
-
var
|
|
4923
|
+
var zc = ["src", "alt"], Bc = {
|
|
4747
4924
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4748
4925
|
style: { opacity: "0.7" }
|
|
4749
|
-
},
|
|
4926
|
+
}, Vc = ["href"], Hc = ["src", "alt"], Uc = ["src", "alt"], Wc = {
|
|
4750
4927
|
key: 3,
|
|
4751
4928
|
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)]"
|
|
4752
|
-
},
|
|
4929
|
+
}, Gc = /* @__PURE__ */ L({
|
|
4753
4930
|
__name: "VideoBlock",
|
|
4754
4931
|
props: {
|
|
4755
4932
|
block: {},
|
|
4756
4933
|
viewport: {}
|
|
4757
4934
|
},
|
|
4758
4935
|
setup(e) {
|
|
4759
|
-
let t = e, { t: n } =
|
|
4936
|
+
let t = e, { t: n } = Vt(), { syntax: r } = rn(), i = F(() => Me(t.block.url, r) || Me(t.block.thumbnailUrl, r)), a = Pn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Pn(() => i.value ? t.block.placeholderUrl : void 0), s = F(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Rc(t.block.url)), c = F(() => ({ textAlign: t.block.align })), l = F(() => {
|
|
4760
4937
|
let e = t.block.align;
|
|
4761
4938
|
return {
|
|
4762
4939
|
maxWidth: "100%",
|
|
@@ -4766,7 +4943,7 @@ var dc = ["src", "alt"], fc = {
|
|
|
4766
4943
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4767
4944
|
marginRight: e === "center" ? "auto" : void 0
|
|
4768
4945
|
};
|
|
4769
|
-
}), d =
|
|
4946
|
+
}), d = F(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = F(() => Me(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4770
4947
|
return (t, r) => (O(), S("div", {
|
|
4771
4948
|
class: "tpl:w-full",
|
|
4772
4949
|
style: u(c.value)
|
|
@@ -4776,32 +4953,32 @@ var dc = ["src", "alt"], fc = {
|
|
|
4776
4953
|
style: u(l.value)
|
|
4777
4954
|
}, [x("img", {
|
|
4778
4955
|
class: "tpl:w-full tpl:border-0",
|
|
4779
|
-
src:
|
|
4956
|
+
src: P(o),
|
|
4780
4957
|
alt: e.block.alt,
|
|
4781
4958
|
style: u(d.value)
|
|
4782
|
-
}, null, 12,
|
|
4959
|
+
}, null, 12, zc), w(Ic)], 4)) : i.value ? (O(), S("div", {
|
|
4783
4960
|
key: 1,
|
|
4784
4961
|
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)]",
|
|
4785
4962
|
style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, l.value])
|
|
4786
|
-
}, [w(
|
|
4963
|
+
}, [w(P(Gr), {
|
|
4787
4964
|
size: 36,
|
|
4788
4965
|
"stroke-width": 1.5,
|
|
4789
4966
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4790
4967
|
style: { opacity: "0.5" }
|
|
4791
|
-
}), x("span",
|
|
4968
|
+
}), x("span", Bc, [w(Ar, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (O(), S(N, { key: 2 }, [e.block.url ? (O(), S("a", {
|
|
4792
4969
|
key: 0,
|
|
4793
4970
|
href: e.block.url,
|
|
4794
4971
|
target: "_blank",
|
|
4795
4972
|
rel: "noopener noreferrer",
|
|
4796
4973
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
4797
4974
|
style: u(l.value),
|
|
4798
|
-
onClick: r[0] ||=
|
|
4975
|
+
onClick: r[0] ||= R(() => {}, ["prevent"])
|
|
4799
4976
|
}, [x("img", {
|
|
4800
4977
|
class: "tpl:w-full tpl:border-0",
|
|
4801
4978
|
src: s.value,
|
|
4802
4979
|
alt: e.block.alt,
|
|
4803
4980
|
style: u(d.value)
|
|
4804
|
-
}, null, 12,
|
|
4981
|
+
}, null, 12, Hc), w(Ic, { "hover-effect": "" })], 12, Vc)) : (O(), S("div", {
|
|
4805
4982
|
key: 1,
|
|
4806
4983
|
class: "tpl:relative tpl:inline-block",
|
|
4807
4984
|
style: u(l.value)
|
|
@@ -4810,153 +4987,155 @@ var dc = ["src", "alt"], fc = {
|
|
|
4810
4987
|
src: s.value,
|
|
4811
4988
|
alt: e.block.alt,
|
|
4812
4989
|
style: u(d.value)
|
|
4813
|
-
}, null, 12,
|
|
4990
|
+
}, null, 12, Uc), w(Ic)], 4))], 64)) : (O(), S("div", Wc, [w(P(Gr), {
|
|
4814
4991
|
size: 40,
|
|
4815
4992
|
"stroke-width": 1.5,
|
|
4816
4993
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4817
|
-
}), x("span", null, k(
|
|
4818
|
-
}
|
|
4819
|
-
}),
|
|
4820
|
-
section:
|
|
4821
|
-
title:
|
|
4822
|
-
paragraph:
|
|
4823
|
-
image:
|
|
4824
|
-
button:
|
|
4825
|
-
divider:
|
|
4826
|
-
video:
|
|
4827
|
-
social:
|
|
4828
|
-
menu:
|
|
4829
|
-
table:
|
|
4830
|
-
spacer:
|
|
4831
|
-
html:
|
|
4832
|
-
countdown: y(() => import("./CountdownBlock-
|
|
4994
|
+
}), x("span", null, k(P(n).video.addVideo), 1)]))], 4));
|
|
4995
|
+
}
|
|
4996
|
+
}), Kc = {
|
|
4997
|
+
section: gc,
|
|
4998
|
+
title: xa,
|
|
4999
|
+
paragraph: na,
|
|
5000
|
+
image: Ui,
|
|
5001
|
+
button: Mr,
|
|
5002
|
+
divider: Ci,
|
|
5003
|
+
video: Gc,
|
|
5004
|
+
social: Ec,
|
|
5005
|
+
menu: qi,
|
|
5006
|
+
table: Fc,
|
|
5007
|
+
spacer: kc,
|
|
5008
|
+
html: ki,
|
|
5009
|
+
countdown: y(() => import("./CountdownBlock-Bdt8qZi1.js"))
|
|
4833
5010
|
};
|
|
4834
|
-
function
|
|
4835
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
5011
|
+
function qc(t) {
|
|
5012
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = Vt(i), l = F(() => le(le(ir(i), wr(n.content.value.settings?.locale)), r.blockDefaults ?? {}));
|
|
4836
5013
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4837
|
-
let { resolvedTheme:
|
|
4838
|
-
themeOverrides:
|
|
4839
|
-
resolvedTheme:
|
|
5014
|
+
let { resolvedTheme: u } = Hn(F(() => n.state.uiTheme)), d = _(r.theme ?? {}), { themeStyles: f } = Wn({
|
|
5015
|
+
themeOverrides: d,
|
|
5016
|
+
resolvedTheme: u,
|
|
4840
5017
|
extraStyles: () => ({
|
|
4841
5018
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
4842
5019
|
...t.themeExtraStyles?.()
|
|
4843
5020
|
})
|
|
4844
|
-
}),
|
|
5021
|
+
}), p = pn({
|
|
4845
5022
|
content: n.content,
|
|
4846
5023
|
setContent: (e, t) => n.setContent(e, t),
|
|
4847
5024
|
...t.historyOptions
|
|
4848
5025
|
});
|
|
4849
|
-
|
|
4850
|
-
let
|
|
5026
|
+
bn(n, p);
|
|
5027
|
+
let m = hn({
|
|
4851
5028
|
addBlock: n.addBlock,
|
|
4852
5029
|
removeBlock: n.removeBlock,
|
|
4853
5030
|
updateBlock: n.updateBlock,
|
|
4854
5031
|
selectBlock: n.selectBlock,
|
|
4855
5032
|
findBlockLocation: n.findBlockLocation,
|
|
4856
|
-
blockDefaults:
|
|
4857
|
-
}),
|
|
5033
|
+
blockDefaults: () => l.value
|
|
5034
|
+
}), g = vn(n), v = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? _n({
|
|
4858
5035
|
content: n.content,
|
|
4859
5036
|
isDirty: () => n.state.isDirty,
|
|
4860
5037
|
...t.autoSaveOptions
|
|
4861
|
-
}) : null,
|
|
4862
|
-
|
|
4863
|
-
e ?
|
|
5038
|
+
}) : null, y = null;
|
|
5039
|
+
v && (y = s(p.isNavigating, (e) => {
|
|
5040
|
+
e ? v.pause() : v.resume();
|
|
4864
5041
|
}));
|
|
4865
|
-
let
|
|
5042
|
+
let b = Vn(n, {
|
|
4866
5043
|
t: o,
|
|
4867
5044
|
format: c
|
|
4868
|
-
}, r.customBlocks ?? []),
|
|
4869
|
-
if (
|
|
4870
|
-
let e =
|
|
4871
|
-
e.length > 0 &&
|
|
4872
|
-
}
|
|
4873
|
-
let
|
|
4874
|
-
|
|
4875
|
-
let
|
|
4876
|
-
|
|
5045
|
+
}, r.customBlocks ?? []), x = Gt(r.colors);
|
|
5046
|
+
if (x.allowCustomIgnored && Ht.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), x.invalidPresets.length > 0 && Ht.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
|
|
5047
|
+
let e = rr(x.presets, r.blockDefaults, r.templateDefaults);
|
|
5048
|
+
e.length > 0 && Ht.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.`);
|
|
5049
|
+
}
|
|
5050
|
+
let S = tr(r.templateSettings);
|
|
5051
|
+
for (let e of S.unknown) Ht.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${$n.join(", ")}) — skipping it.`);
|
|
5052
|
+
let C = Gn();
|
|
5053
|
+
Xn(C, Kc);
|
|
5054
|
+
let w = /* @__PURE__ */ new Set();
|
|
5055
|
+
function T(e) {
|
|
4877
5056
|
for (let t of e) {
|
|
4878
|
-
|
|
4879
|
-
for (let e of
|
|
5057
|
+
C.registerCustom(t, xi);
|
|
5058
|
+
for (let e of Er(t, x)) w.has(e.id) || (w.add(e.id), Ht.warn(e.message));
|
|
4880
5059
|
}
|
|
4881
5060
|
}
|
|
4882
|
-
r.customBlocks?.length &&
|
|
4883
|
-
let
|
|
4884
|
-
if (h() &&
|
|
5061
|
+
r.customBlocks?.length && T(r.customBlocks);
|
|
5062
|
+
let E = An();
|
|
5063
|
+
if (h() && M(E.dispose), t.containerEl) {
|
|
4885
5064
|
let e = t.containerEl;
|
|
4886
5065
|
Ze(document, "pointerdown", (t) => {
|
|
4887
5066
|
let n = e.value;
|
|
4888
|
-
n && (t.composedPath?.() ?? []).includes(n) &&
|
|
5067
|
+
n && (t.composedPath?.() ?? []).includes(n) && E.claim();
|
|
4889
5068
|
}, { capture: !0 });
|
|
4890
5069
|
}
|
|
4891
|
-
function
|
|
5070
|
+
function D() {
|
|
4892
5071
|
let e = t.capabilities?.templates;
|
|
4893
5072
|
if (e) {
|
|
4894
5073
|
e.save();
|
|
4895
5074
|
return;
|
|
4896
5075
|
}
|
|
4897
|
-
|
|
5076
|
+
v?.flush();
|
|
4898
5077
|
}
|
|
4899
|
-
function
|
|
4900
|
-
|
|
4901
|
-
history:
|
|
5078
|
+
function O(e) {
|
|
5079
|
+
E.isActive() && Or(e, {
|
|
5080
|
+
history: p,
|
|
4902
5081
|
selectBlock: (e) => n.selectBlock(e),
|
|
4903
5082
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
4904
5083
|
removeBlock: (e) => n.removeBlock(e),
|
|
4905
|
-
onSave:
|
|
5084
|
+
onSave: D,
|
|
4906
5085
|
onBeforeUndo: t.keyboardOptions?.onBeforeUndo,
|
|
4907
5086
|
isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
4908
5087
|
onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
|
|
4909
5088
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4910
5089
|
});
|
|
4911
5090
|
}
|
|
4912
|
-
Ze(document, "keydown",
|
|
4913
|
-
let
|
|
4914
|
-
e(
|
|
4915
|
-
let
|
|
4916
|
-
e(
|
|
4917
|
-
let
|
|
4918
|
-
e(
|
|
4919
|
-
let
|
|
5091
|
+
Ze(document, "keydown", O);
|
|
5092
|
+
let k = _(null);
|
|
5093
|
+
e(Tt, t.editorRoot ?? document), e(pt, k), e(st, i), e(Et, n), e(It, p), e(bt, m), e(Ct, g), e(yt, a), e(_t, f), e(vt, u), e(jt, l), e(gt, r.locale), e(Pt, C), e(wt, r.customBlocks ?? []), e(dt, r.paletteBlocks), e(zt, Zn(r.htmlBlockPreview)), e(Ft, x), e(tt, S.fields), e(Mt, Kn(n.content, C));
|
|
5094
|
+
let A = oe(r.mergeTags?.syntax);
|
|
5095
|
+
e(ht, r.mergeTags?.tags ?? []), e(Ot, A), e(ut, r.mergeTags?.onRequest ?? null), e(it, r.mergeTags?.autocomplete !== !1);
|
|
5096
|
+
let j = _(he(r.mergeTags?.tags ?? []));
|
|
5097
|
+
e(ft, j);
|
|
5098
|
+
let N = Mn({
|
|
4920
5099
|
resolvePreview: r.resolvePreview,
|
|
4921
5100
|
getContent: () => n.content.value,
|
|
4922
5101
|
isActive: () => n.state.previewMode
|
|
4923
5102
|
});
|
|
4924
|
-
e(at,
|
|
4925
|
-
let
|
|
4926
|
-
e(
|
|
4927
|
-
let
|
|
4928
|
-
e(rt,
|
|
4929
|
-
let
|
|
5103
|
+
e(at, N), e(ct, r.resolvePreview);
|
|
5104
|
+
let P = F(() => !(n.state.previewMode && N.isConfigured));
|
|
5105
|
+
e(Nt, P);
|
|
5106
|
+
let ee = Fn();
|
|
5107
|
+
e(rt, ee), e(nt, r.logicTags?.tags ?? []), e(mt, r.logicTags?.pairs ?? []), e(et, r.logicTags?.onRequest ?? null), e(Lt, In()), e(Dt, r.onRequestMedia ?? null), e(xt, r.resolveImageUrl ? Nn(r.resolveImageUrl) : null), e(kt, r.displayConditions?.conditions ?? []), e(At, r.displayConditions?.allowCustom ?? !1), e(St, t.capabilities ?? {}), e(Rt, b);
|
|
5108
|
+
let I = Ln(r.lint) ? null : Rn({
|
|
4930
5109
|
content: n.content,
|
|
4931
5110
|
options: r.lint ?? {},
|
|
4932
5111
|
updateBlock: n.updateBlock,
|
|
4933
5112
|
updateSettings: n.updateSettings,
|
|
4934
5113
|
removeBlock: n.removeBlock
|
|
4935
5114
|
});
|
|
4936
|
-
e(
|
|
4937
|
-
function
|
|
4938
|
-
|
|
5115
|
+
e(Bt, I);
|
|
5116
|
+
function L() {
|
|
5117
|
+
y?.(), I?.destroy(), v?.destroy(), p.destroy();
|
|
4939
5118
|
}
|
|
4940
5119
|
return {
|
|
4941
5120
|
t: o,
|
|
4942
5121
|
format: c,
|
|
4943
|
-
history:
|
|
4944
|
-
blockActions:
|
|
4945
|
-
conditionPreview:
|
|
4946
|
-
autoSave:
|
|
4947
|
-
resolvedTheme:
|
|
4948
|
-
themeStyles:
|
|
4949
|
-
themeOverrides:
|
|
4950
|
-
registry:
|
|
4951
|
-
keyboardReorder:
|
|
4952
|
-
templateLint:
|
|
4953
|
-
popoverRoot:
|
|
4954
|
-
mergeTagSampleMode:
|
|
4955
|
-
previewResolution:
|
|
4956
|
-
appliesConditionFilter:
|
|
4957
|
-
registerCustomBlocks:
|
|
4958
|
-
destroy:
|
|
5122
|
+
history: p,
|
|
5123
|
+
blockActions: m,
|
|
5124
|
+
conditionPreview: g,
|
|
5125
|
+
autoSave: v,
|
|
5126
|
+
resolvedTheme: u,
|
|
5127
|
+
themeStyles: f,
|
|
5128
|
+
themeOverrides: d,
|
|
5129
|
+
registry: C,
|
|
5130
|
+
keyboardReorder: b,
|
|
5131
|
+
templateLint: I,
|
|
5132
|
+
popoverRoot: k,
|
|
5133
|
+
mergeTagSampleMode: j,
|
|
5134
|
+
previewResolution: N,
|
|
5135
|
+
appliesConditionFilter: P,
|
|
5136
|
+
registerCustomBlocks: T,
|
|
5137
|
+
destroy: L
|
|
4959
5138
|
};
|
|
4960
5139
|
}
|
|
4961
5140
|
//#endregion
|
|
4962
|
-
export {
|
|
5141
|
+
export { Cn as $, Ur as A, fr as B, ci as C, Xr as D, Zr as E, Ir as F, gr as G, yr as H, Fr as I, Qn as J, hr as K, Nr as L, Br as M, zr as N, Jr as O, Lr as P, gn as Q, Mr as R, ui as S, ni as T, vr as U, br as V, _r as W, zn as X, Bn as Y, Mn as Z, ji as _, Ec as a, wn as at, xi as b, fc as c, aa as d, En as et, ra as f, Ui as g, qi as h, kc as i, xn as it, Vr as j, Wr as k, xa as l, na as m, Gc as n, yn as nt, yc as o, ia as p, $n as q, Fc as r, ln as rt, gc as s, qc as t, Tn as tt, ya as u, ki as v, ri as w, fi as x, Ci as y, Tr as z };
|