@templatical/editor 0.48.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{AiChatSidebar-DxPHFNoT.js → AiChatSidebar-CdjTb9ej.js} +14 -14
- package/dist/{AiFeatureMenu-C8GVqu1d.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
- package/dist/{BlockIssueBadge-BShkuJis.js → BlockIssueBadge-BdpJwim0.js} +5 -5
- package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-D_sowkf0.js} +8 -8
- package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
- package/dist/{CloudPanels-Dgw7tb4R.js → CloudPanels-1hwFiJ0G.js} +39 -68
- package/dist/CollaborationNotices-BWpKzueF.js +73 -0
- package/dist/CollaboratorBar-D87phJsw.js +123 -0
- package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-BUvUzO3T.js} +2 -2
- package/dist/{CommentsSidebar-BOqj16Al.js → CommentsSidebar-J65znlrH.js} +14 -14
- package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
- package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CLMIwfK7.js} +7 -7
- package/dist/{DesignReferenceSidebar-BWAi3eQQ.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
- package/dist/{IssuesPanel-C-x3I012.js → IssuesPanel-DeeVsfG7.js} +8 -8
- package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
- package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
- package/dist/{MediaEditModal-ByOvznRC.js → MediaEditModal-C_wxoUMG.js} +3 -3
- package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-BVXDkqtH.js} +2 -2
- package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-BEw_r0PJ.js} +3 -3
- package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
- package/dist/{ParagraphEditor-BVjOwwHx.js → ParagraphEditor-zLV44z-R.js} +19 -19
- package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
- package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-CsvniFlI.js} +9 -9
- package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-DzWURF_e.js} +12 -12
- package/dist/{SavedBlocksBrowserModal-DbmIS5uK.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
- package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
- package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
- package/dist/{TemplateScoringPanel-ynbGl-sr.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
- package/dist/{TemplateSettings-Bi01S3H3.js → TemplateSettings-Cu5X9DgA.js} +11 -11
- package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-BeRYV3eg.js} +14 -14
- package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-B8c3fQi2.js} +2 -2
- package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-CvpNUoAp.js} +11 -11
- package/dist/{ToggleSwitch-Ozc7YU38.js → ToggleSwitch-DHweVJOr.js} +2 -2
- package/dist/{Toolbar-B-2lO0I8.js → Toolbar-BadDSkkF.js} +426 -429
- package/dist/{TplModal-Bz4-IZ9R.js → TplModal-BZgi9Tes.js} +5 -5
- package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
- package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
- package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-F-811aps.js} +4 -4
- package/dist/{WrapperBlock-D0qgNqjD.js → WrapperBlock-DiiaxpMb.js} +5 -5
- package/dist/{blockTypeIcons-CEDZytqP.js → blockTypeIcons-CayLluou.js} +2 -2
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-CbNzJM3I.js → ca-DSJwJ5ov.js} +23 -1
- package/dist/cdn/chunks/{AiChatSidebar-Dk0rJBQN.js → AiChatSidebar-yXJ85Zcg.js} +8 -8
- package/dist/cdn/chunks/{AiChatSidebar-Dk0rJBQN.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B7b0w8ZS.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B7b0w8ZS.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-m2tWRyWv.js} +8 -8
- package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js.map → BlockPreviewCanvas-m2tWRyWv.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-B4fhuwc_.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-awqHfJqC.js → CloudPanels-XufhBZYF.js} +38 -67
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js → CommentsPanel-R8YLLO3v.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js → CommentsSidebar-96NZHVq3.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-tmiTPEXm.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BW9cHnA9.js → DesignReferenceSidebar-D14IIu_P.js} +39 -39
- package/dist/cdn/chunks/{DesignReferenceSidebar-BW9cHnA9.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-cXf9ywA4.js → IssuesPanel-BoPiCLGc.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-cXf9ywA4.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-BJ2t2vxC.js} +20 -20
- package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-zXfcArr4.js → MediaEditModal-DD0SZ-S3.js} +3 -3
- package/dist/cdn/chunks/{MediaEditModal-zXfcArr4.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js → MediaPanels-CkdJ_kGp.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-7wXX71DH.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D4aq9eeC.js → ParagraphEditor-CJQjRHXV.js} +29 -29
- package/dist/cdn/chunks/{ParagraphEditor-D4aq9eeC.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js → RestoreVersionDialog-C5cxBRKi.js} +6 -6
- package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-BKbjUnPM.js} +10 -10
- package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-BrWqJCSP.js → TemplateScoringPanel-BBPnHILC.js} +6 -6
- package/dist/cdn/chunks/{TemplateScoringPanel-BrWqJCSP.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js → TemplateSettings-CtrzzQWl.js} +10 -10
- package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-DuZKYMWD.js} +13 -13
- package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js → TestEmailPanel-DERaCdpG.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js → TitleEditor-CEgxjtUX.js} +14 -14
- package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-BB-bQADJ.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-BB-bQADJ.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-C_x2TfFk.js → Toolbar-GFIZQHzw.js} +440 -443
- package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-DDrbWJcE.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-DDrbWJcE.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-MlxsUmuT.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js → WrapperBlock-CFuP4R0c.js} +6 -6
- package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js.map → WrapperBlock-CFuP4R0c.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js → blockTypeIcons-BnAd8qsP.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js.map → blockTypeIcons-BnAd8qsP.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CbNzJM3I.js → ca-DSJwJ5ov.js} +24 -2
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
- package/dist/{cloud-B5xwm_4X.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-Vd0N4elZ.js → createCloudRuntime-DiYCJ21w.js} +127 -169
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
- package/dist/{de-DMquBpZM.js → cdn/chunks/de-CBE6O79z.js} +25 -1
- package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
- package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
- package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
- package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
- package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
- package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-HJBy9kLj.js} +88 -88
- package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
- package/dist/cdn/chunks/{en-C8Mp71sO.js → en-CDexnk0p.js} +24 -2
- package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
- package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
- package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
- package/dist/{es-Byq4tthI.js → cdn/chunks/es-BE42B6uN.js} +25 -1
- package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
- package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-koOuDeZS.js} +23 -23
- package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-koOuDeZS.js.map} +1 -1
- package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-DlJFPDQR.js} +25 -1
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
- package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-CjlNV8xD.js} +46 -46
- package/dist/cdn/chunks/{icons-aTYwH5-g.js.map → icons-CjlNV8xD.js.map} +1 -1
- package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-CUT8gkNI.js} +25 -1
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
- package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
- package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
- package/dist/{nl-ClJ3BY3F.js → cdn/chunks/nl-bXWqqRyS.js} +25 -1
- package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DibcXcmv.js → pt-BR-2_H4-wlb.js} +24 -2
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
- package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
- package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
- package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
- package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
- package/dist/cdn/chunks/{src-DlFlC9Tt.js → src-B1e5SSYP.js} +84 -84
- package/dist/cdn/chunks/{src-DlFlC9Tt.js.map → src-B1e5SSYP.js.map} +1 -1
- package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-B77z1iw4.js} +117 -117
- package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
- package/dist/cdn/chunks/{src-DYCDeBDM.js → src-CvLTYGdO.js} +549 -315
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +6 -0
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
- package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-Bb2UcB20.js → useEditorCore-DpCFvHg_.js} +440 -419
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-X8bc5qNl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-DFoOexIQ.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js → withCurrentFont-D-f61ghC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1319 -1066
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ClwqRMgv.js → check-DQQzkmIC.js} +1 -1
- package/dist/{chevron-down-te6qn-zE.js → chevron-down-CIF4bdon.js} +1 -1
- package/dist/{chevron-right-W2hbH1FM.js → chevron-right-Cg7Xu-ev.js} +1 -1
- package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-Csu7ISD-.js} +1 -1
- package/dist/{circle-alert-CIEGV5DN.js → circle-alert-YUvIJAgY.js} +1 -1
- package/dist/{clock-Y4cx0gkJ.js → clock-CnSIGKQW.js} +1 -1
- package/dist/{cdn/chunks/cloud-BHClP3e2.js → cloud-YUYDtdHt.js} +308 -569
- package/dist/{copy-BEcsAlfB.js → copy-CUC43md_.js} +1 -1
- package/dist/{createCloudRuntime-zNPkF6T9.js → createCloudRuntime-BMDRjL0k.js} +126 -168
- package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-BcP1sjdp.js} +6 -6
- package/dist/{cdn/chunks/de-DMquBpZM.js → de-CBE6O79z.js} +23 -3
- package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
- package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
- package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
- package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
- package/dist/{dist-tsmnQugO.js → dist-DBG3nh3k.js} +503 -273
- package/dist/{editor-modal-AlVLkU91.js → editor-modal--7_9A6j-.js} +20 -20
- package/dist/en-BHCMzqib.js +1 -0
- package/dist/{en-C8Mp71sO.js → en-CDexnk0p.js} +23 -1
- package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
- package/dist/{cdn/chunks/es-Byq4tthI.js → es-BE42B6uN.js} +23 -3
- package/dist/{extensions-pjO8VGkM.js → extensions-zwsZlWjH.js} +23 -23
- package/dist/{eye-Ddnz8nnm.js → eye-B1bua-ck.js} +1 -1
- package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-DlJFPDQR.js} +23 -3
- package/dist/{image-up-CM_HC0Dx.js → image-up-BqiO7KCO.js} +1 -1
- package/dist/index.d.ts +290 -35
- package/dist/{info-DXLmzoeY.js → info-x26nGOo2.js} +1 -1
- package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-CUT8gkNI.js} +23 -3
- package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
- package/dist/{link-Cel46wgo.js → link-CezhndyR.js} +1 -1
- package/dist/{list-Cl0GwiV9.js → list-DQqdptI0.js} +1 -1
- package/dist/{loader-circle-uAwpvfys.js → loader-circle-DCEeoYoi.js} +1 -1
- package/dist/{message-circle-DWU1pTM_.js → message-circle-BLGzfv_7.js} +1 -1
- package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-bXWqqRyS.js} +23 -3
- package/dist/{package-CbyG_yU_.js → package-D_kEQCMU.js} +1 -1
- package/dist/{pencil-BzoDcwKu.js → pencil-Dct8zGLy.js} +1 -1
- package/dist/{plus-8cDvoCjZ.js → plus-BDd0gTEm.js} +1 -1
- package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-CtKJecE-.js} +3 -3
- package/dist/{pt-BR-DibcXcmv.js → pt-BR-2_H4-wlb.js} +23 -1
- package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
- package/dist/{refresh-cw-9WinWixo.js → refresh-cw-tGMRDxr8.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
- package/dist/{search-CqgGq1gG.js → search-Bm2cCQpe.js} +1 -1
- package/dist/{send-Ceo3c9Db.js → send-sVLaKZ7f.js} +1 -1
- package/dist/{shield-check-uDAwur5D.js → shield-check-YhsbXfQc.js} +1 -1
- package/dist/{smartphone-CcLaCpGK.js → smartphone-B2W81p02.js} +1 -1
- package/dist/socialIcons-Bwv-49EB.js +2167 -0
- package/dist/{sparkles-Do9XjAuT.js → sparkles-a1qkBZ8X.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
- package/dist/templatical-editor.js +1409 -1156
- package/dist/{text-align-start-DvzC0HQA.js → text-align-start-CTuwQ5YW.js} +1 -1
- package/dist/timeouts-o5Y9BuqI.js +4 -0
- package/dist/{trash-vlINTx32.js → trash-I3D2peFQ.js} +1 -1
- package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CenxmLRE.js} +1 -1
- package/dist/{upload-CtNOI6J2.js → upload-uU2cK0Ce.js} +1 -1
- package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
- package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
- package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-DRbMRe8F.js} +806 -785
- package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
- package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
- package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-zcI6BWIf.js} +3 -3
- package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-C-iBLlp0.js} +5 -5
- package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
- package/dist/{useScrollToBlock-CXmcHQQN.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
- package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-D62njRLu.js} +1 -1
- package/dist/{x-Cd6SFw8r.js → x-KFQ4S-Kz.js} +1 -1
- package/package.json +12 -12
- package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
- package/dist/CollaboratorBar-5rfopCPx.js +0 -103
- package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
- package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
- package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
- package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
- package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
- package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
- package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
- package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
- package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
- package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
- package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
- package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
- package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
- package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
- package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
- package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
- package/dist/en-B0FUfNwz.js +0 -1
- package/dist/socialIcons-PTiwhLoC.js +0 -1359
- package/dist/timeouts-Cv2jvusx.js +0 -4
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { $ as e, A as t, At as n, B as r, D as i, E as a, F as o, J as s, K as c, M as l, N as u, O as d, R as f, S as p, V as m, W as h, Y as g, Z as _, _ as v, at as y, b, c as x, d as S, g as C, h as w, it as T, j as E, jt as D, k as O, kt as k, l as A, nt as j, r as M, rt as
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import { B as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { a as
|
|
7
|
-
import { $ as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { i as
|
|
11
|
-
import { r as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import "./useCloudI18n-
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
1
|
+
import { $ as e, A as t, At as n, B as r, D as i, E as a, F as o, J as s, K as c, M as l, N as u, O as d, R as f, S as p, V as m, W as h, Y as g, Z as _, _ as v, at as y, b, c as x, d as S, g as C, h as w, it as T, j as E, jt as D, k as O, kt as k, l as A, nt as j, r as M, rt as N, s as P, u as F, v as I, y as ee } from "./vue.runtime.esm-bundler-DV0Wx4r_.js";
|
|
2
|
+
import { c as L, o as te, s as ne } from "./runtime-dom.esm-bundler-DYn1z2Xf.js";
|
|
3
|
+
import { A as re, C as ie, Ct as ae, D as oe, F as se, H as ce, I as le, J as ue, L as de, M as fe, O as pe, P as me, Q as he, R as ge, S as _e, St as ve, T as ye, U as be, V as xe, Y as Se, Z as Ce, _t as we, a as Te, b as Ee, bt as De, d as Oe, dt as ke, et as Ae, ft as je, gt as Me, ht as Ne, j as Pe, k as Fe, l as Ie, lt as Le, m as Re, mt as ze, nt as Be, o as Ve, ot as He, p as Ue, pt as We, q as Ge, rt as Ke, s as qe, tt as Je, ut as Ye, vt as Xe, w as Ze, wt as Qe, xt as $e, yt as et } from "./dist-DBG3nh3k.js";
|
|
4
|
+
import { B as tt, D as nt, E as rt, L as it, M as at, N as ot, O as st, R as ct, S as lt, V as ut, _ as dt, a as ft, b as pt, g as mt, h as ht, l as gt, n as _t, p as vt, t as yt, u as bt, v as xt, w as St, x as Ct, y as wt } from "./socialIcons-Bwv-49EB.js";
|
|
5
|
+
import { _ as Tt, h as Et, v as Dt, y as Ot } from "./dist-Bv_GBr2l.js";
|
|
6
|
+
import { a as kt, c as At, i as jt } from "./dist-CCqn-RqE.js";
|
|
7
|
+
import { $ as Mt, A as Nt, B as Pt, C as Ft, D as It, E as Lt, F as Rt, G as zt, H as Bt, I as Vt, J as Ht, K as Ut, L as Wt, M as Gt, N as Kt, O as qt, P as Jt, Q as Yt, R as Xt, S as Zt, T as Qt, V as $t, X as en, Y as tn, Z as nn, _ as rn, a as an, b as on, c as sn, d as cn, f as ln, g as un, h as dn, j as fn, k as pn, l as mn, m as hn, n as gn, o as _n, p as vn, q as yn, r as bn, s as xn, v as Sn, w as Cn, x as wn, y as Tn, z as En } from "./keys-BymCnLHD.js";
|
|
8
|
+
import { t as Dn } from "./useI18n-CSh4gO5c.js";
|
|
9
|
+
import { t as On } from "./logger-BBlvSn6q.js";
|
|
10
|
+
import { i as kn, r as An, s as jn, t as Mn } from "./usePopoverPosition-CMcsMBtK.js";
|
|
11
|
+
import { r as Nn, t as Pn } from "./templateSettingsFields-YCFVBVYh.js";
|
|
12
|
+
import { t as Fn } from "./createLucideIcon-BcP1sjdp.js";
|
|
13
|
+
import { t as In } from "./copy-CUC43md_.js";
|
|
14
|
+
import { t as Ln } from "./message-circle-BLGzfv_7.js";
|
|
15
|
+
import { t as Rn } from "./trash-I3D2peFQ.js";
|
|
16
|
+
import { t as zn } from "./triangle-alert-CenxmLRE.js";
|
|
17
|
+
import { t as Bn } from "./LoadingTrack-BXOptf5g.js";
|
|
18
|
+
import { t as Vn } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
19
|
+
import { t as Hn } from "./useEditorRoot-BVm2-1N8.js";
|
|
20
|
+
import "./useCloudI18n-CGVEZV3o.js";
|
|
21
|
+
import { t as Un } from "./useMergeTag-C-iBLlp0.js";
|
|
22
|
+
import { t as Wn } from "./useLogicTag-zcI6BWIf.js";
|
|
23
|
+
import { t as Gn } from "./readableTextColor-f8Kykfnh.js";
|
|
23
24
|
//#region src/utils/activeEditorTracker.ts
|
|
24
25
|
var Kn = /* @__PURE__ */ new Set(), qn = 0, Jn = 0;
|
|
25
26
|
function Yn() {
|
|
@@ -52,13 +53,13 @@ function Zn(e) {
|
|
|
52
53
|
let o = ++a;
|
|
53
54
|
r.value = !0;
|
|
54
55
|
let s = {
|
|
55
|
-
content:
|
|
56
|
+
content: Me(e.getContent()),
|
|
56
57
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
57
58
|
};
|
|
58
59
|
try {
|
|
59
60
|
let e = await t(s);
|
|
60
61
|
if (o !== a) return;
|
|
61
|
-
if (!
|
|
62
|
+
if (!Ke(e)) {
|
|
62
63
|
i.value = !0;
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
@@ -81,11 +82,11 @@ function Zn(e) {
|
|
|
81
82
|
c(), a++;
|
|
82
83
|
}), {
|
|
83
84
|
isConfigured: t,
|
|
84
|
-
content:
|
|
85
|
+
content: P(() => n.value ?? e.getContent()),
|
|
85
86
|
isResolving: r,
|
|
86
|
-
isInitialResolve:
|
|
87
|
+
isInitialResolve: P(() => r.value && n.value === null),
|
|
87
88
|
hasFailed: i,
|
|
88
|
-
supersedesSamples:
|
|
89
|
+
supersedesSamples: P(() => t)
|
|
89
90
|
};
|
|
90
91
|
}
|
|
91
92
|
//#endregion
|
|
@@ -162,7 +163,7 @@ function tr(t) {
|
|
|
162
163
|
try {
|
|
163
164
|
let e = await import("@templatical/quality");
|
|
164
165
|
if (c) return;
|
|
165
|
-
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s =
|
|
166
|
+
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s = Ot(t.content, u, {
|
|
166
167
|
debounce: t.debounce ?? 500,
|
|
167
168
|
deep: !0
|
|
168
169
|
});
|
|
@@ -224,7 +225,7 @@ function nr(e, t, n = []) {
|
|
|
224
225
|
let i = o(r);
|
|
225
226
|
if (!i) return "";
|
|
226
227
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
227
|
-
return a ?
|
|
228
|
+
return a ? lt(a, t.t, n) : "";
|
|
228
229
|
}
|
|
229
230
|
function c(t, n) {
|
|
230
231
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -294,8 +295,8 @@ function nr(e, t, n = []) {
|
|
|
294
295
|
//#endregion
|
|
295
296
|
//#region src/composables/useUiTheme.ts
|
|
296
297
|
function rr(e) {
|
|
297
|
-
let t =
|
|
298
|
-
return { resolvedTheme:
|
|
298
|
+
let t = At("(prefers-color-scheme: dark)");
|
|
299
|
+
return { resolvedTheme: P(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
299
300
|
}
|
|
300
301
|
//#endregion
|
|
301
302
|
//#region src/composables/useThemeStyles.ts
|
|
@@ -324,7 +325,7 @@ var ir = {
|
|
|
324
325
|
canvasBg: "--tpl-canvas-bg"
|
|
325
326
|
};
|
|
326
327
|
function ar({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
327
|
-
return { themeStyles:
|
|
328
|
+
return { themeStyles: P(() => {
|
|
328
329
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
329
330
|
if (a) for (let [e, t] of Object.entries(ir)) {
|
|
330
331
|
let n = a[e];
|
|
@@ -343,7 +344,7 @@ function or() {
|
|
|
343
344
|
function r(e, n) {
|
|
344
345
|
let r = `custom:${e.type}`, i = {
|
|
345
346
|
component: n,
|
|
346
|
-
createBlock: () =>
|
|
347
|
+
createBlock: () => ye(e),
|
|
347
348
|
definition: e
|
|
348
349
|
};
|
|
349
350
|
t.value.set(r, i), T(t);
|
|
@@ -375,7 +376,7 @@ function or() {
|
|
|
375
376
|
strictFilters: !1
|
|
376
377
|
}).parseAndRender(t.template, e.fieldValues);
|
|
377
378
|
} catch (t) {
|
|
378
|
-
return
|
|
379
|
+
return On.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
379
380
|
}
|
|
380
381
|
}
|
|
381
382
|
function l(e) {
|
|
@@ -394,7 +395,7 @@ function or() {
|
|
|
394
395
|
//#endregion
|
|
395
396
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
396
397
|
function sr(e, t) {
|
|
397
|
-
return
|
|
398
|
+
return P(() => {
|
|
398
399
|
let n = cr(e.value.blocks);
|
|
399
400
|
if (n.size === 0) return [];
|
|
400
401
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
@@ -412,67 +413,67 @@ function cr(e) {
|
|
|
412
413
|
return lr(e, t), t;
|
|
413
414
|
}
|
|
414
415
|
function lr(e, t) {
|
|
415
|
-
for (let n of e) if (
|
|
416
|
+
for (let n of e) if (Ae(n)) t.add(n.customType);
|
|
416
417
|
else if (n.type === "section") {
|
|
417
418
|
let e = n.children;
|
|
418
419
|
if (!e) continue;
|
|
419
420
|
for (let n of e) lr(n, t);
|
|
420
|
-
} else
|
|
421
|
+
} else He(n) && lr(n.children, t);
|
|
421
422
|
}
|
|
422
423
|
//#endregion
|
|
423
424
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
424
425
|
var ur = [
|
|
425
426
|
{
|
|
426
427
|
type: "section",
|
|
427
|
-
createBlock:
|
|
428
|
+
createBlock: fe
|
|
428
429
|
},
|
|
429
430
|
{
|
|
430
431
|
type: "title",
|
|
431
|
-
createBlock:
|
|
432
|
+
createBlock: de
|
|
432
433
|
},
|
|
433
434
|
{
|
|
434
435
|
type: "paragraph",
|
|
435
|
-
createBlock:
|
|
436
|
+
createBlock: Pe
|
|
436
437
|
},
|
|
437
438
|
{
|
|
438
439
|
type: "image",
|
|
439
|
-
createBlock:
|
|
440
|
+
createBlock: Fe
|
|
440
441
|
},
|
|
441
442
|
{
|
|
442
443
|
type: "button",
|
|
443
|
-
createBlock:
|
|
444
|
+
createBlock: ie
|
|
444
445
|
},
|
|
445
446
|
{
|
|
446
447
|
type: "divider",
|
|
447
|
-
createBlock:
|
|
448
|
+
createBlock: oe
|
|
448
449
|
},
|
|
449
450
|
{
|
|
450
451
|
type: "video",
|
|
451
|
-
createBlock:
|
|
452
|
+
createBlock: ge
|
|
452
453
|
},
|
|
453
454
|
{
|
|
454
455
|
type: "social",
|
|
455
|
-
createBlock:
|
|
456
|
+
createBlock: me
|
|
456
457
|
},
|
|
457
458
|
{
|
|
458
459
|
type: "menu",
|
|
459
|
-
createBlock:
|
|
460
|
+
createBlock: re
|
|
460
461
|
},
|
|
461
462
|
{
|
|
462
463
|
type: "table",
|
|
463
|
-
createBlock:
|
|
464
|
+
createBlock: le
|
|
464
465
|
},
|
|
465
466
|
{
|
|
466
467
|
type: "spacer",
|
|
467
|
-
createBlock:
|
|
468
|
+
createBlock: se
|
|
468
469
|
},
|
|
469
470
|
{
|
|
470
471
|
type: "html",
|
|
471
|
-
createBlock:
|
|
472
|
+
createBlock: pe
|
|
472
473
|
},
|
|
473
474
|
{
|
|
474
475
|
type: "countdown",
|
|
475
|
-
createBlock:
|
|
476
|
+
createBlock: Ze
|
|
476
477
|
}
|
|
477
478
|
];
|
|
478
479
|
function dr(e, t) {
|
|
@@ -495,8 +496,8 @@ function pr(e) {
|
|
|
495
496
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
496
497
|
}
|
|
497
498
|
function mr(e, t, n) {
|
|
498
|
-
let r = new Set(e.map((e) =>
|
|
499
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
499
|
+
let r = new Set(e.map((e) => An(e))), i = [], a = (e, t) => {
|
|
500
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(An(o)) && i.push(`${t}.${n}: ${o}`) : pr(o) && a(o, `${t}.${n}`);
|
|
500
501
|
}, o = t;
|
|
501
502
|
for (let [e, t] of Object.entries(Te)) {
|
|
502
503
|
let n = o?.[e];
|
|
@@ -506,7 +507,7 @@ function mr(e, t, n) {
|
|
|
506
507
|
}, e);
|
|
507
508
|
}
|
|
508
509
|
return a({
|
|
509
|
-
...
|
|
510
|
+
...Ve,
|
|
510
511
|
...n ?? {}
|
|
511
512
|
}, "template"), i;
|
|
512
513
|
}
|
|
@@ -522,18 +523,18 @@ function hr(e) {
|
|
|
522
523
|
//#endregion
|
|
523
524
|
//#region src/i18n/index.ts
|
|
524
525
|
var gr = /* #__PURE__ */ Object.assign({
|
|
525
|
-
"./locales/ca.ts": () => import("./ca-
|
|
526
|
-
"./locales/de.ts": () => import("./de-
|
|
527
|
-
"./locales/en.ts": () => import("./en-
|
|
528
|
-
"./locales/es.ts": () => import("./es-
|
|
529
|
-
"./locales/fr.ts": () => import("./fr-
|
|
530
|
-
"./locales/ja.ts": () => import("./ja-
|
|
531
|
-
"./locales/nl.ts": () => import("./nl-
|
|
532
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
526
|
+
"./locales/ca.ts": () => import("./ca-DSJwJ5ov.js"),
|
|
527
|
+
"./locales/de.ts": () => import("./de-CBE6O79z.js"),
|
|
528
|
+
"./locales/en.ts": () => import("./en-CDexnk0p.js"),
|
|
529
|
+
"./locales/es.ts": () => import("./es-BE42B6uN.js"),
|
|
530
|
+
"./locales/fr.ts": () => import("./fr-DlJFPDQR.js"),
|
|
531
|
+
"./locales/ja.ts": () => import("./ja-CUT8gkNI.js"),
|
|
532
|
+
"./locales/nl.ts": () => import("./nl-bXWqqRyS.js"),
|
|
533
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-2_H4-wlb.js")
|
|
533
534
|
}), _r = /* #__PURE__ */ Object.assign({
|
|
534
|
-
"./locales/cloud/de.ts": () => import("./de-
|
|
535
|
-
"./locales/cloud/en.ts": () => import("./en-
|
|
536
|
-
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-
|
|
535
|
+
"./locales/cloud/de.ts": () => import("./de-D_atmUVB.js"),
|
|
536
|
+
"./locales/cloud/en.ts": () => import("./en-DhJLnaBx.js"),
|
|
537
|
+
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-BphMoUTw.js")
|
|
537
538
|
});
|
|
538
539
|
function vr(e) {
|
|
539
540
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
@@ -680,8 +681,8 @@ function Ir(e, t) {
|
|
|
680
681
|
id: s("allow-custom-ignored"),
|
|
681
682
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
682
683
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
683
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
684
|
-
e !== "" && !t.has(
|
|
684
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => An(e)));
|
|
685
|
+
e !== "" && !t.has(An(e)) && n.push({
|
|
685
686
|
id: s("off-palette-default"),
|
|
686
687
|
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.`
|
|
687
688
|
});
|
|
@@ -707,7 +708,7 @@ function Rr(e, t) {
|
|
|
707
708
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
708
709
|
else if (n && e.key.toLowerCase() === "z") {
|
|
709
710
|
if (Lr(e)) return;
|
|
710
|
-
e.preventDefault(), e.shiftKey ? t.history.redo() :
|
|
711
|
+
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
711
712
|
} else {
|
|
712
713
|
if (t.isPicking?.() && !Lr(e)) {
|
|
713
714
|
if (e.key === "Escape") {
|
|
@@ -742,9 +743,9 @@ function Br(e, t, n) {
|
|
|
742
743
|
var Vr = "--tpl-block-bg-layer", Hr = "tpl-has-bg-image";
|
|
743
744
|
function Ur(e, t) {
|
|
744
745
|
if (t === null) return {};
|
|
745
|
-
let n =
|
|
746
|
+
let n = Le(e);
|
|
746
747
|
if (n === null) return {};
|
|
747
|
-
let r = t?.trim(), i = r ?
|
|
748
|
+
let r = t?.trim(), i = r ? ce(r) : n.url;
|
|
748
749
|
return {
|
|
749
750
|
backgroundImage: `url("${i}")`,
|
|
750
751
|
backgroundSize: n.size,
|
|
@@ -780,10 +781,10 @@ function Jr(e, t = {}) {
|
|
|
780
781
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
781
782
|
backgroundColor: r || "transparent"
|
|
782
783
|
};
|
|
783
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
784
|
-
let n =
|
|
784
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ie.paragraphGap : Ie.paragraphGap}px`), e.type === "section") {
|
|
785
|
+
let n = Qe(e.borderRadius);
|
|
785
786
|
n !== null && (i.borderRadius = n);
|
|
786
|
-
let r =
|
|
787
|
+
let r = je(e);
|
|
787
788
|
r?.applied && e.backgroundImage ? (Object.assign(i, Kr(r, t.heroBoxWidth)), Object.assign(i, Ur({
|
|
788
789
|
...e.backgroundImage,
|
|
789
790
|
size: "cover",
|
|
@@ -794,20 +795,20 @@ function Jr(e, t = {}) {
|
|
|
794
795
|
}
|
|
795
796
|
function Yr(e, t, n, r) {
|
|
796
797
|
return e.type === "section" ? Jr(e, {
|
|
797
|
-
backgroundImageUrl:
|
|
798
|
+
backgroundImageUrl: rt(t, e.backgroundImage, n),
|
|
798
799
|
heroBoxWidth: r
|
|
799
800
|
}) : Jr(e);
|
|
800
801
|
}
|
|
801
802
|
function Xr(e) {
|
|
802
803
|
let t = {};
|
|
803
|
-
for (let [n, r] of Object.entries(
|
|
804
|
+
for (let [n, r] of Object.entries(ae(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
804
805
|
return t;
|
|
805
806
|
}
|
|
806
807
|
function Zr(e, t = {}) {
|
|
807
808
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
808
809
|
let n = e.wrapper, r = {};
|
|
809
810
|
n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && (r.padding = `${n.padding.top}px ${n.padding.right}px ${n.padding.bottom}px ${n.padding.left}px`);
|
|
810
|
-
let i =
|
|
811
|
+
let i = Qe(n.borderRadius);
|
|
811
812
|
return i !== null && (r.borderRadius = i), Object.assign(r, Ur(n.backgroundImage, t.backgroundImageUrl)), r;
|
|
812
813
|
}
|
|
813
814
|
function Qr(e, t = {}) {
|
|
@@ -830,18 +831,18 @@ function $r(e, t, n, r = !1) {
|
|
|
830
831
|
value: e.slice(o, s.index)
|
|
831
832
|
});
|
|
832
833
|
let i = s[0];
|
|
833
|
-
if (
|
|
834
|
-
let e = r ?
|
|
834
|
+
if (Be(i, n)) {
|
|
835
|
+
let e = r ? Se(i, t) : void 0;
|
|
835
836
|
a.push(e === void 0 ? {
|
|
836
837
|
type: "tag",
|
|
837
|
-
value:
|
|
838
|
+
value: ue(i, t)
|
|
838
839
|
} : {
|
|
839
840
|
type: "text",
|
|
840
841
|
value: e
|
|
841
842
|
});
|
|
842
|
-
} else
|
|
843
|
+
} else Je(i, n) ? a.push({
|
|
843
844
|
type: "tag",
|
|
844
|
-
value:
|
|
845
|
+
value: Ge(i, n)
|
|
845
846
|
}) : a.push({
|
|
846
847
|
type: "text",
|
|
847
848
|
value: i
|
|
@@ -855,27 +856,27 @@ function $r(e, t, n, r = !1) {
|
|
|
855
856
|
}
|
|
856
857
|
//#endregion
|
|
857
858
|
//#region src/components/MergeTagPreviewText.vue
|
|
858
|
-
var ei =
|
|
859
|
+
var ei = I({
|
|
859
860
|
name: "MergeTagPreviewText",
|
|
860
861
|
props: { text: {
|
|
861
862
|
type: String,
|
|
862
863
|
required: !0
|
|
863
864
|
} },
|
|
864
865
|
setup(e) {
|
|
865
|
-
let t = p(
|
|
866
|
+
let t = p(qt, Rt), n = p(Jt, Oe.liquid), r = p(Yt, null), i = P(() => $r(e.text, t.value, n, r?.value ?? !1));
|
|
866
867
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
867
868
|
key: t,
|
|
868
869
|
class: "tpl-merge-tag-label"
|
|
869
870
|
}, e.value) : e.value);
|
|
870
871
|
}
|
|
871
|
-
}), ti = ["href"], ni = /* @__PURE__ */
|
|
872
|
+
}), ti = ["href"], ni = /* @__PURE__ */ I({
|
|
872
873
|
__name: "ButtonBlock",
|
|
873
874
|
props: {
|
|
874
875
|
block: {},
|
|
875
876
|
viewport: {}
|
|
876
877
|
},
|
|
877
878
|
setup(e) {
|
|
878
|
-
let r = e, i =
|
|
879
|
+
let r = e, i = Mt(Sn, "ButtonBlock"), a = P(() => {
|
|
879
880
|
let e = {
|
|
880
881
|
display: "inline-block",
|
|
881
882
|
padding: `${r.block.buttonPadding.top}px ${r.block.buttonPadding.right}px ${r.block.buttonPadding.bottom}px ${r.block.buttonPadding.left}px`,
|
|
@@ -884,26 +885,26 @@ var ei = F({
|
|
|
884
885
|
fontSize: `${r.block.fontSize}px`,
|
|
885
886
|
fontWeight: "bold",
|
|
886
887
|
textDecoration: "none",
|
|
887
|
-
borderRadius: typeof r.block.borderRadius == "number" ? `${r.block.borderRadius}px` :
|
|
888
|
+
borderRadius: typeof r.block.borderRadius == "number" ? `${r.block.borderRadius}px` : Qe(r.block.borderRadius) ?? "0px",
|
|
888
889
|
textAlign: "center"
|
|
889
890
|
};
|
|
890
891
|
return Object.assign(e, Xr(r.block.border)), r.block.fontFamily && (e.fontFamily = i.resolveFontFamily(r.block.fontFamily)), r.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof r.block.width == "number" && (e.width = `${r.block.width}px`, e.boxSizing = "border-box"), e;
|
|
891
|
-
}), o =
|
|
892
|
+
}), o = P(() => ({ textAlign: r.block.align ?? "center" }));
|
|
892
893
|
return (r, i) => (t(), S("div", { style: n(o.value) }, [x("a", {
|
|
893
894
|
href: e.block.url || "#",
|
|
894
895
|
style: n(a.value),
|
|
895
896
|
class: "tpl:cursor-default",
|
|
896
|
-
onClick: i[0] ||=
|
|
897
|
+
onClick: i[0] ||= L(() => {}, ["prevent"])
|
|
897
898
|
}, [C(ei, { text: e.block.text }, null, 8, ["text"])], 12, ti)], 4));
|
|
898
899
|
}
|
|
899
|
-
}), ri =
|
|
900
|
+
}), ri = Fn({
|
|
900
901
|
name: "bookmark",
|
|
901
902
|
size: 24,
|
|
902
903
|
node: [["path", {
|
|
903
904
|
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",
|
|
904
905
|
key: "oz39mx"
|
|
905
906
|
}]]
|
|
906
|
-
}), ii =
|
|
907
|
+
}), ii = Fn({
|
|
907
908
|
name: "box",
|
|
908
909
|
size: 24,
|
|
909
910
|
node: [
|
|
@@ -920,7 +921,7 @@ var ei = F({
|
|
|
920
921
|
key: "d0xqtd"
|
|
921
922
|
}]
|
|
922
923
|
]
|
|
923
|
-
}), ai =
|
|
924
|
+
}), ai = Fn({
|
|
924
925
|
name: "eye-off",
|
|
925
926
|
size: 24,
|
|
926
927
|
node: [
|
|
@@ -941,7 +942,7 @@ var ei = F({
|
|
|
941
942
|
key: "1ooewy"
|
|
942
943
|
}]
|
|
943
944
|
]
|
|
944
|
-
}), oi =
|
|
945
|
+
}), oi = Fn({
|
|
945
946
|
name: "funnel",
|
|
946
947
|
size: 24,
|
|
947
948
|
node: [["path", {
|
|
@@ -949,7 +950,7 @@ var ei = F({
|
|
|
949
950
|
key: "sc7q7i"
|
|
950
951
|
}]],
|
|
951
952
|
aliases: ["filter"]
|
|
952
|
-
}), si =
|
|
953
|
+
}), si = Fn({
|
|
953
954
|
name: "grip-vertical",
|
|
954
955
|
size: 24,
|
|
955
956
|
node: [
|
|
@@ -990,14 +991,14 @@ var ei = F({
|
|
|
990
991
|
key: "f4zoj3"
|
|
991
992
|
}]
|
|
992
993
|
]
|
|
993
|
-
}), ci =
|
|
994
|
+
}), ci = Fn({
|
|
994
995
|
name: "puzzle",
|
|
995
996
|
size: 24,
|
|
996
997
|
node: [["path", {
|
|
997
998
|
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",
|
|
998
999
|
key: "w46dr5"
|
|
999
1000
|
}]]
|
|
1000
|
-
}), li =
|
|
1001
|
+
}), li = Fn({
|
|
1001
1002
|
name: "video",
|
|
1002
1003
|
size: 24,
|
|
1003
1004
|
node: [["path", {
|
|
@@ -1015,14 +1016,14 @@ var ei = F({
|
|
|
1015
1016
|
"src",
|
|
1016
1017
|
"width",
|
|
1017
1018
|
"height"
|
|
1018
|
-
], fi = /* @__PURE__ */
|
|
1019
|
+
], fi = /* @__PURE__ */ I({
|
|
1019
1020
|
__name: "CustomBlockIcon",
|
|
1020
1021
|
props: {
|
|
1021
1022
|
icon: {},
|
|
1022
1023
|
size: {}
|
|
1023
1024
|
},
|
|
1024
1025
|
setup(e) {
|
|
1025
|
-
let r = e, i =
|
|
1026
|
+
let r = e, i = P(() => r.size ?? 20), a = P(() => r.icon && (r.icon.trimStart().startsWith("<svg") || r.icon.trimStart().startsWith("<SVG"))), o = P(() => r.icon && !a.value && (r.icon.startsWith("http") || r.icon.startsWith("/")));
|
|
1026
1027
|
return (r, s) => a.value ? (t(), S("span", {
|
|
1027
1028
|
key: 0,
|
|
1028
1029
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1046,7 +1047,7 @@ var ei = F({
|
|
|
1046
1047
|
}
|
|
1047
1048
|
}), pi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1048
1049
|
function mi(e, t) {
|
|
1049
|
-
let n =
|
|
1050
|
+
let n = Hn(), r = null, i = null, a = null;
|
|
1050
1051
|
function o() {
|
|
1051
1052
|
return e.value ? Array.from(e.value.querySelectorAll(pi)).filter((e) => e.offsetParent !== null) : [];
|
|
1052
1053
|
}
|
|
@@ -1063,7 +1064,7 @@ function mi(e, t) {
|
|
|
1063
1064
|
a = null;
|
|
1064
1065
|
let t = o();
|
|
1065
1066
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1066
|
-
}), i =
|
|
1067
|
+
}), i = kt(e, "keydown", c);
|
|
1067
1068
|
}
|
|
1068
1069
|
function u(e = {}) {
|
|
1069
1070
|
let t = e.restoreFocus !== !1;
|
|
@@ -1079,7 +1080,7 @@ function mi(e, t) {
|
|
|
1079
1080
|
//#endregion
|
|
1080
1081
|
//#region src/composables/useEmoji.ts
|
|
1081
1082
|
function hi() {
|
|
1082
|
-
let [t, n] =
|
|
1083
|
+
let [t, n] = Dt(!1), r = e([]), i = !1;
|
|
1083
1084
|
s(() => {
|
|
1084
1085
|
i = !0;
|
|
1085
1086
|
}), f(t, async (e) => {
|
|
@@ -1140,12 +1141,12 @@ function vi(e) {
|
|
|
1140
1141
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1141
1142
|
for (let i of e) {
|
|
1142
1143
|
let e = i.toLowerCase(), a = gi.find((t) => t.value.toLowerCase() === e);
|
|
1143
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
1144
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), On.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${gi.map((e) => e.value).join(", ")}.`));
|
|
1144
1145
|
}
|
|
1145
1146
|
return t;
|
|
1146
1147
|
}
|
|
1147
1148
|
function yi(e) {
|
|
1148
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r = vi(e?.builtIns), i =
|
|
1149
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = vi(e?.builtIns), i = P(() => e?.defaultFallback ?? _i), a = P(() => {
|
|
1149
1150
|
let e = [...r], n = t.value.map((e) => ({
|
|
1150
1151
|
value: e.name,
|
|
1151
1152
|
label: e.name,
|
|
@@ -1157,7 +1158,7 @@ function yi(e) {
|
|
|
1157
1158
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1158
1159
|
}
|
|
1159
1160
|
let c = e?.defaultFont ?? _i.split(",")[0].trim();
|
|
1160
|
-
o(c) ||
|
|
1161
|
+
o(c) || On.warn(`config.fonts: new templates seed "${c}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
1161
1162
|
function l() {
|
|
1162
1163
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1163
1164
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
@@ -1165,9 +1166,9 @@ function yi(e) {
|
|
|
1165
1166
|
}
|
|
1166
1167
|
return _i;
|
|
1167
1168
|
}
|
|
1168
|
-
let u =
|
|
1169
|
+
let u = P(() => l());
|
|
1169
1170
|
function d(e) {
|
|
1170
|
-
return
|
|
1171
|
+
return ke(e, {
|
|
1171
1172
|
customFonts: t.value,
|
|
1172
1173
|
defaultFallback: i.value
|
|
1173
1174
|
});
|
|
@@ -1186,7 +1187,7 @@ function yi(e) {
|
|
|
1186
1187
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1187
1188
|
});
|
|
1188
1189
|
} catch (t) {
|
|
1189
|
-
|
|
1190
|
+
On.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1190
1191
|
}
|
|
1191
1192
|
});
|
|
1192
1193
|
await Promise.allSettled(e), !p && (n.value = !0);
|
|
@@ -1212,11 +1213,11 @@ function yi(e) {
|
|
|
1212
1213
|
//#endregion
|
|
1213
1214
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1214
1215
|
function bi(e, t, n) {
|
|
1215
|
-
return
|
|
1216
|
+
return Je(e, n) ? {
|
|
1216
1217
|
type: "logicMergeTagNode",
|
|
1217
1218
|
attrs: {
|
|
1218
1219
|
value: e,
|
|
1219
|
-
keyword:
|
|
1220
|
+
keyword: Ge(e, n)
|
|
1220
1221
|
}
|
|
1221
1222
|
} : {
|
|
1222
1223
|
type: "mergeTagNode",
|
|
@@ -1252,7 +1253,7 @@ function wi(e) {
|
|
|
1252
1253
|
...this.parent?.(),
|
|
1253
1254
|
color: {
|
|
1254
1255
|
default: null,
|
|
1255
|
-
parseHTML: (e) => Ci(
|
|
1256
|
+
parseHTML: (e) => Ci(kn(e.style.color)),
|
|
1256
1257
|
renderHTML: (e) => {
|
|
1257
1258
|
let t = Ci(e.color);
|
|
1258
1259
|
return t ? { style: `color: ${t}` } : {};
|
|
@@ -1263,7 +1264,7 @@ function wi(e) {
|
|
|
1263
1264
|
}
|
|
1264
1265
|
//#endregion
|
|
1265
1266
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1266
|
-
function Ti(e, t =
|
|
1267
|
+
function Ti(e, t = Oe.liquid) {
|
|
1267
1268
|
let n = _(!1), r = _(""), i = _(""), a = _(null);
|
|
1268
1269
|
mi(a, n);
|
|
1269
1270
|
function o() {
|
|
@@ -1327,14 +1328,14 @@ function Ti(e, t = Je.liquid) {
|
|
|
1327
1328
|
//#endregion
|
|
1328
1329
|
//#region src/composables/useRichTextEditor.ts
|
|
1329
1330
|
function Ei(t) {
|
|
1330
|
-
let n = p(
|
|
1331
|
+
let n = p(un, null), { mergeTags: r, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: l, autocomplete: u } = Un(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = Wn(), g = p(tn, null), v = (c(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = Ce(l), b = e(null), x = () => Ye(n?.content?.value?.settings ?? { locale: "en" });
|
|
1331
1332
|
f(x, (e) => {
|
|
1332
1333
|
let t = b.value?.view.dom;
|
|
1333
1334
|
t && t.setAttribute("dir", e);
|
|
1334
1335
|
});
|
|
1335
|
-
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } = Ti(b, l), { start: j, stop: M } =
|
|
1336
|
-
async function
|
|
1337
|
-
|
|
1336
|
+
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } = Ti(b, l), { start: j, stop: M } = Tt(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), N = e(null), P = _(!0), F = _(null), I = !1, ee = null;
|
|
1337
|
+
async function L() {
|
|
1338
|
+
F.value = null, P.value = !0;
|
|
1338
1339
|
try {
|
|
1339
1340
|
let { TiptapEditor: e, EC: i, extensions: a } = await t.loadExtensions({
|
|
1340
1341
|
mergeTags: r,
|
|
@@ -1343,8 +1344,8 @@ function Ei(t) {
|
|
|
1343
1344
|
autocompleteEnabled: u,
|
|
1344
1345
|
suggestionEmptyText: v
|
|
1345
1346
|
});
|
|
1346
|
-
if (
|
|
1347
|
-
|
|
1347
|
+
if (I) return;
|
|
1348
|
+
N.value = i;
|
|
1348
1349
|
let o = /* @__PURE__ */ new Map();
|
|
1349
1350
|
a.forEach((e, t) => o.set(e.name, t));
|
|
1350
1351
|
let s = new e({
|
|
@@ -1353,27 +1354,27 @@ function Ei(t) {
|
|
|
1353
1354
|
editable: !0,
|
|
1354
1355
|
editorProps: { attributes: { dir: x() } },
|
|
1355
1356
|
onUpdate: ({ editor: e }) => {
|
|
1356
|
-
|
|
1357
|
+
I || n && (ee = e.getHTML(), n.updateBlock(t.blockId(), { content: ee }));
|
|
1357
1358
|
}
|
|
1358
1359
|
});
|
|
1359
|
-
if (
|
|
1360
|
+
if (I) {
|
|
1360
1361
|
s.destroy();
|
|
1361
1362
|
return;
|
|
1362
1363
|
}
|
|
1363
|
-
b.value = s,
|
|
1364
|
+
b.value = s, P.value = !1, j();
|
|
1364
1365
|
} catch (e) {
|
|
1365
|
-
if (
|
|
1366
|
-
|
|
1366
|
+
if (I) return;
|
|
1367
|
+
On.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
1367
1368
|
}
|
|
1368
1369
|
}
|
|
1369
|
-
function
|
|
1370
|
-
b.value?.destroy(), b.value = null,
|
|
1370
|
+
function te() {
|
|
1371
|
+
b.value?.destroy(), b.value = null, L();
|
|
1371
1372
|
}
|
|
1372
|
-
|
|
1373
|
-
let
|
|
1374
|
-
b.value && e !==
|
|
1373
|
+
L();
|
|
1374
|
+
let ne = f(() => t.blockContent(), (e) => {
|
|
1375
|
+
b.value && e !== ee && (ee = e, b.value.getHTML() !== e && b.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
1375
1376
|
});
|
|
1376
|
-
function
|
|
1377
|
+
function re(e) {
|
|
1377
1378
|
if (o.value || m.value) return;
|
|
1378
1379
|
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
1379
1380
|
if (!r) return;
|
|
@@ -1381,26 +1382,26 @@ function Ei(t) {
|
|
|
1381
1382
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1382
1383
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
1383
1384
|
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1385
|
+
kt(document, "mousedown", re), i(() => {
|
|
1386
|
+
I = !0, ne(), M(), b.value?.destroy();
|
|
1386
1387
|
});
|
|
1387
|
-
async function
|
|
1388
|
+
async function ie() {
|
|
1388
1389
|
let e = await s();
|
|
1389
|
-
|
|
1390
|
+
I || (e && b.value ? b.value.chain().focus().insertMergeTag({
|
|
1390
1391
|
label: e.label,
|
|
1391
1392
|
value: e.value
|
|
1392
1393
|
}).run() : b.value?.commands.focus());
|
|
1393
1394
|
}
|
|
1394
|
-
async function
|
|
1395
|
+
async function ae() {
|
|
1395
1396
|
let e = await h();
|
|
1396
|
-
|
|
1397
|
+
I || (e && b.value ? Si(b.value, e, l) : b.value?.commands.focus());
|
|
1397
1398
|
}
|
|
1398
1399
|
return {
|
|
1399
1400
|
editor: b,
|
|
1400
|
-
EditorContent:
|
|
1401
|
-
isLoading:
|
|
1402
|
-
initError:
|
|
1403
|
-
retry:
|
|
1401
|
+
EditorContent: N,
|
|
1402
|
+
isLoading: P,
|
|
1403
|
+
initError: F,
|
|
1404
|
+
retry: te,
|
|
1404
1405
|
showLinkDialog: S,
|
|
1405
1406
|
linkUrl: C,
|
|
1406
1407
|
linkColor: w,
|
|
@@ -1416,18 +1417,18 @@ function Ei(t) {
|
|
|
1416
1417
|
removeLink: O,
|
|
1417
1418
|
closeLinkDialog: k,
|
|
1418
1419
|
handleLinkKeydown: A,
|
|
1419
|
-
handleAddMergeTag:
|
|
1420
|
-
handleAddLogicTag:
|
|
1420
|
+
handleAddMergeTag: ie,
|
|
1421
|
+
handleAddLogicTag: ae
|
|
1421
1422
|
};
|
|
1422
1423
|
}
|
|
1423
1424
|
//#endregion
|
|
1424
1425
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1425
1426
|
var Di = "(max-width: 767px)";
|
|
1426
1427
|
function Oi(e) {
|
|
1427
|
-
let t =
|
|
1428
|
+
let t = At(Di);
|
|
1428
1429
|
return {
|
|
1429
1430
|
isSmallScreen: t,
|
|
1430
|
-
showNotice:
|
|
1431
|
+
showNotice: P(() => (N(e) ?? !0) && t.value)
|
|
1431
1432
|
};
|
|
1432
1433
|
}
|
|
1433
1434
|
//#endregion
|
|
@@ -1445,7 +1446,7 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1445
1446
|
key: 0,
|
|
1446
1447
|
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]",
|
|
1447
1448
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1448
|
-
}, Li = /* @__PURE__ */
|
|
1449
|
+
}, Li = /* @__PURE__ */ I({
|
|
1449
1450
|
__name: "CustomBlock",
|
|
1450
1451
|
props: {
|
|
1451
1452
|
block: {},
|
|
@@ -1453,7 +1454,7 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1453
1454
|
},
|
|
1454
1455
|
emits: ["fetchData"],
|
|
1455
1456
|
setup(e, { emit: n }) {
|
|
1456
|
-
let r = e, i = n, { t: a } =
|
|
1457
|
+
let r = e, i = n, { t: a } = Dn(), o = p(xn, null), s = _(""), c = _(!1), l = P(() => o?.getDefinition(r.block.customType)), u = P(() => !!l.value), m = P(() => r.block), { isFetching: h, fetch: g, needsFetch: v, hasDataSource: b } = ct({
|
|
1457
1458
|
definition: l,
|
|
1458
1459
|
block: m,
|
|
1459
1460
|
onUpdate: (e, t) => {
|
|
@@ -1462,10 +1463,10 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1462
1463
|
dataSourceFetched: t
|
|
1463
1464
|
});
|
|
1464
1465
|
}
|
|
1465
|
-
}), T = p(
|
|
1466
|
+
}), T = p(qt, Rt), E = p(Yt, null), O = P(() => {
|
|
1466
1467
|
if (!E?.value) return r.block;
|
|
1467
1468
|
let e = {};
|
|
1468
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1469
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? $e(n, T.value) : n;
|
|
1469
1470
|
return {
|
|
1470
1471
|
...r.block,
|
|
1471
1472
|
fieldValues: e
|
|
@@ -1482,41 +1483,41 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1482
1483
|
}
|
|
1483
1484
|
}
|
|
1484
1485
|
}
|
|
1485
|
-
let j =
|
|
1486
|
+
let j = Et(k, 150);
|
|
1486
1487
|
return d(() => {
|
|
1487
1488
|
k();
|
|
1488
1489
|
}), f(() => r.block.fieldValues, () => {
|
|
1489
1490
|
j();
|
|
1490
1491
|
}, { deep: !0 }), f(() => E?.value, () => {
|
|
1491
1492
|
j();
|
|
1492
|
-
}), (e, n) => (t(), S("div", ki, [u.value ? c.value ? (t(), S("div", Mi, [C(y(
|
|
1493
|
+
}), (e, n) => (t(), S("div", ki, [u.value ? c.value ? (t(), S("div", Mi, [C(y(zn), {
|
|
1493
1494
|
size: 24,
|
|
1494
1495
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1495
|
-
}), x("span", Ni, D(y(a).customBlocks.renderError), 1)])) : (t(), S("div", Pi, [x("div", { innerHTML: s.value }, null, 8, Fi), y(b) && y(v) ? (t(), S("div", Ii, [y(h) ? (t(), A(
|
|
1496
|
+
}), x("span", Ni, D(y(a).customBlocks.renderError), 1)])) : (t(), S("div", Pi, [x("div", { innerHTML: s.value }, null, 8, Fi), y(b) && y(v) ? (t(), S("div", Ii, [y(h) ? (t(), A(Bn, {
|
|
1496
1497
|
key: 1,
|
|
1497
1498
|
class: "tpl:w-48"
|
|
1498
1499
|
})) : (t(), S("button", {
|
|
1499
1500
|
key: 0,
|
|
1500
1501
|
type: "button",
|
|
1501
1502
|
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)]",
|
|
1502
|
-
onClick: n[0] ||=
|
|
1503
|
+
onClick: n[0] ||= L((...e) => y(g) && y(g)(...e), ["stop"])
|
|
1503
1504
|
}, [l.value?.icon ? (t(), A(fi, {
|
|
1504
1505
|
key: 0,
|
|
1505
1506
|
icon: l.value.icon,
|
|
1506
1507
|
size: 16
|
|
1507
|
-
}, null, 8, ["icon"])) :
|
|
1508
|
+
}, null, 8, ["icon"])) : F("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : F("", !0)])) : (t(), S("div", Ai, [C(y(ci), {
|
|
1508
1509
|
size: 24,
|
|
1509
1510
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1510
1511
|
}), x("span", ji, D(y(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1511
1512
|
}
|
|
1512
|
-
}), Ri = { class: "tpl:w-full" }, zi = /* @__PURE__ */
|
|
1513
|
+
}), Ri = { class: "tpl:w-full" }, zi = /* @__PURE__ */ I({
|
|
1513
1514
|
__name: "DividerBlock",
|
|
1514
1515
|
props: {
|
|
1515
1516
|
block: {},
|
|
1516
1517
|
viewport: {}
|
|
1517
1518
|
},
|
|
1518
1519
|
setup(e) {
|
|
1519
|
-
let r = e, i =
|
|
1520
|
+
let r = e, i = P(() => ({
|
|
1520
1521
|
borderTop: `${r.block.thickness}px ${r.block.lineStyle} ${r.block.color}`,
|
|
1521
1522
|
width: r.block.width === "full" ? "100%" : typeof r.block.width == "number" ? `${r.block.width}px` : r.block.width,
|
|
1522
1523
|
margin: r.block.width === "full" ? "0" : "0 auto"
|
|
@@ -1535,14 +1536,14 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1535
1536
|
}, Wi = {
|
|
1536
1537
|
key: 1,
|
|
1537
1538
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1538
|
-
}, Gi = /* @__PURE__ */
|
|
1539
|
+
}, Gi = /* @__PURE__ */ I({
|
|
1539
1540
|
__name: "HtmlBlock",
|
|
1540
1541
|
props: {
|
|
1541
1542
|
block: {},
|
|
1542
1543
|
viewport: {}
|
|
1543
1544
|
},
|
|
1544
1545
|
setup(e) {
|
|
1545
|
-
let r = e, { t: a } =
|
|
1546
|
+
let r = e, { t: a } = Dn(), o = p(on, !1), s = P(() => r.block.content.trim().length > 0), c = P(() => o && s.value), l = p(qt, Rt), u = p(Yt, null), d = P(() => u?.value ? $e(r.block.content, l.value) : r.block.content), m = _(null), h = _(60), g = null;
|
|
1546
1547
|
function v() {
|
|
1547
1548
|
let e = m.value?.contentDocument;
|
|
1548
1549
|
e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1577,7 +1578,7 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1577
1578
|
}, Zi = ["href"], Qi = ["src", "alt"], $i = ["src", "alt"], ea = {
|
|
1578
1579
|
key: 4,
|
|
1579
1580
|
class: "tpl:flex tpl:box-border 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)]"
|
|
1580
|
-
}, ta = ["aria-label"], na = { key: 1 }, ra = /* @__PURE__ */
|
|
1581
|
+
}, ta = ["aria-label"], na = { key: 1 }, ra = /* @__PURE__ */ I({
|
|
1581
1582
|
__name: "ImageBlock",
|
|
1582
1583
|
props: {
|
|
1583
1584
|
block: {},
|
|
@@ -1585,7 +1586,7 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1585
1586
|
},
|
|
1586
1587
|
emits: ["update"],
|
|
1587
1588
|
setup(e, { emit: r }) {
|
|
1588
|
-
let i = e, a = r, { t: o } =
|
|
1589
|
+
let i = e, a = r, { t: o } = Dn(), { syntax: s } = Un(), c = P(() => Ee(i.block.src, s));
|
|
1589
1590
|
function l(e) {
|
|
1590
1591
|
let t = {
|
|
1591
1592
|
src: e.url,
|
|
@@ -1597,22 +1598,22 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1597
1598
|
target: u,
|
|
1598
1599
|
blocked: c,
|
|
1599
1600
|
apply: l
|
|
1600
|
-
}), g =
|
|
1601
|
-
let e = i.block.border, t = ["left", "right"].map((t) =>
|
|
1601
|
+
}), g = P(() => ({ textAlign: i.block.align })), v = P(() => {
|
|
1602
|
+
let e = i.block.border, t = ["left", "right"].map((t) => ve(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1602
1603
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1603
|
-
}), b =
|
|
1604
|
+
}), b = P(() => {
|
|
1604
1605
|
let e = i.block.align;
|
|
1605
1606
|
return {
|
|
1606
1607
|
maxWidth: "100%",
|
|
1607
1608
|
width: i.block.width === "full" ? v.value : `${i.block.width}px`,
|
|
1608
1609
|
height: i.block.height ? `${i.block.height}px` : void 0,
|
|
1609
|
-
borderRadius:
|
|
1610
|
+
borderRadius: Qe(i.block.borderRadius) ?? void 0,
|
|
1610
1611
|
...Xr(i.block.border),
|
|
1611
1612
|
display: "block",
|
|
1612
1613
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1613
1614
|
marginRight: e === "center" ? "auto" : void 0
|
|
1614
1615
|
};
|
|
1615
|
-
}), T =
|
|
1616
|
+
}), T = st(() => c.value ? void 0 : i.block.src), E = st(() => c.value ? i.block.placeholderUrl : void 0);
|
|
1616
1617
|
return (r, i) => (t(), S("div", {
|
|
1617
1618
|
ref_key: "dropZoneRef",
|
|
1618
1619
|
ref: u,
|
|
@@ -1624,12 +1625,12 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1624
1625
|
key: 0,
|
|
1625
1626
|
uploading: y(p),
|
|
1626
1627
|
size: "canvas"
|
|
1627
|
-
}, null, 8, ["uploading"])) :
|
|
1628
|
+
}, null, 8, ["uploading"])) : F("", !0), e.block.src && c.value && e.block.placeholderUrl ? (t(), S(M, { key: 1 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1628
1629
|
key: 0,
|
|
1629
1630
|
href: e.block.linkUrl,
|
|
1630
1631
|
target: "_blank",
|
|
1631
1632
|
rel: "noopener noreferrer",
|
|
1632
|
-
onClick: i[0] ||=
|
|
1633
|
+
onClick: i[0] ||= L(() => {}, ["prevent"])
|
|
1633
1634
|
}, [x("img", {
|
|
1634
1635
|
class: "tpl:border-0",
|
|
1635
1636
|
loading: "lazy",
|
|
@@ -1656,7 +1657,7 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1656
1657
|
href: e.block.linkUrl,
|
|
1657
1658
|
target: "_blank",
|
|
1658
1659
|
rel: "noopener noreferrer",
|
|
1659
|
-
onClick: i[1] ||=
|
|
1660
|
+
onClick: i[1] ||= L(() => {}, ["prevent"])
|
|
1660
1661
|
}, [x("img", {
|
|
1661
1662
|
class: "tpl:border-0",
|
|
1662
1663
|
loading: "lazy",
|
|
@@ -1673,7 +1674,7 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1673
1674
|
key: 0,
|
|
1674
1675
|
"aria-label": y(o).image.browseMedia,
|
|
1675
1676
|
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)]",
|
|
1676
|
-
onClick: i[2] ||=
|
|
1677
|
+
onClick: i[2] ||= L((...e) => y(h) && y(h)(...e), ["stop"])
|
|
1677
1678
|
}, [C(y(wt), {
|
|
1678
1679
|
size: 14,
|
|
1679
1680
|
"stroke-width": 1.5
|
|
@@ -1682,14 +1683,14 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1682
1683
|
}), ia = { class: "tpl:w-full" }, aa = ["href"], oa = {
|
|
1683
1684
|
key: 1,
|
|
1684
1685
|
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)]"
|
|
1685
|
-
}, sa = /* @__PURE__ */
|
|
1686
|
+
}, sa = /* @__PURE__ */ I({
|
|
1686
1687
|
__name: "MenuBlock",
|
|
1687
1688
|
props: {
|
|
1688
1689
|
block: {},
|
|
1689
1690
|
viewport: {}
|
|
1690
1691
|
},
|
|
1691
1692
|
setup(e) {
|
|
1692
|
-
let r = e, { t: i } =
|
|
1693
|
+
let r = e, { t: i } = Dn(), a = Mt(Sn, "MenuBlock"), o = P(() => ({
|
|
1693
1694
|
display: "flex",
|
|
1694
1695
|
flexWrap: "wrap",
|
|
1695
1696
|
gap: `0 ${r.block.spacing}px`,
|
|
@@ -1697,7 +1698,7 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1697
1698
|
fontSize: `${r.block.fontSize}px`,
|
|
1698
1699
|
fontFamily: r.block.fontFamily ? a.resolveFontFamily(r.block.fontFamily) : "inherit",
|
|
1699
1700
|
alignItems: "center"
|
|
1700
|
-
})), s =
|
|
1701
|
+
})), s = P(() => r.block.items.length > 0);
|
|
1701
1702
|
function c(e) {
|
|
1702
1703
|
return e || r.block.linkColor || r.block.color;
|
|
1703
1704
|
}
|
|
@@ -1712,14 +1713,14 @@ var ki = { class: "tpl:w-full" }, Ai = {
|
|
|
1712
1713
|
fontWeight: r.bold ? "bold" : "normal",
|
|
1713
1714
|
textDecoration: r.underline ? "underline" : "none"
|
|
1714
1715
|
}),
|
|
1715
|
-
onClick: a[0] ||=
|
|
1716
|
+
onClick: a[0] ||= L(() => {}, ["prevent"])
|
|
1716
1717
|
}, [C(ei, { text: r.text || "..." }, null, 8, ["text"])], 12, aa), i < e.block.items.length - 1 ? (t(), S("span", {
|
|
1717
1718
|
key: 0,
|
|
1718
1719
|
style: n({
|
|
1719
1720
|
color: e.block.separatorColor,
|
|
1720
1721
|
padding: `0 ${e.block.spacing}px`
|
|
1721
1722
|
})
|
|
1722
|
-
}, D(e.block.separator), 5)) :
|
|
1723
|
+
}, D(e.block.separator), 5)) : F("", !0)], 64))), 128))], 4)) : (t(), S("div", oa, [C(y(xt), { size: 16 }), x("span", null, D(y(i).menu.addLinks), 1)]))]));
|
|
1723
1724
|
}
|
|
1724
1725
|
}), ca = /* @__PURE__ */ new Set([
|
|
1725
1726
|
"http",
|
|
@@ -1781,7 +1782,7 @@ function pa(e) {
|
|
|
1781
1782
|
//#endregion
|
|
1782
1783
|
//#region src/composables/useEditableTextBlock.ts
|
|
1783
1784
|
function ma(e) {
|
|
1784
|
-
let t = p(
|
|
1785
|
+
let t = p(qt, Rt), n = p(Yt, null), { syntax: r } = Un(), i = P(() => n?.value ? De(e(), t.value) : ze(e(), t.value)), a = P(() => be(pa(We(i.value, r)))), o = _(!1), s = _(null), { top: c, left: l } = jt(s), { toLocal: u } = Mn(), d = P(() => u({
|
|
1785
1786
|
top: c.value - 8,
|
|
1786
1787
|
left: l.value
|
|
1787
1788
|
}));
|
|
@@ -1802,14 +1803,14 @@ function ma(e) {
|
|
|
1802
1803
|
}
|
|
1803
1804
|
//#endregion
|
|
1804
1805
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1805
|
-
var ha = ["innerHTML"], ga = /* @__PURE__ */
|
|
1806
|
+
var ha = ["innerHTML"], ga = /* @__PURE__ */ I({
|
|
1806
1807
|
__name: "ParagraphBlock",
|
|
1807
1808
|
props: {
|
|
1808
1809
|
block: {},
|
|
1809
1810
|
viewport: {}
|
|
1810
1811
|
},
|
|
1811
1812
|
setup(e) {
|
|
1812
|
-
let n = e, r = v(() => import("./ParagraphEditor-
|
|
1813
|
+
let n = e, r = v(() => import("./ParagraphEditor-zLV44z-R.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = ma(() => n.block.content);
|
|
1813
1814
|
return (n, u) => (t(), S("div", {
|
|
1814
1815
|
ref_key: "blockRef",
|
|
1815
1816
|
ref: a,
|
|
@@ -1834,20 +1835,20 @@ var ha = ["innerHTML"], ga = /* @__PURE__ */ F({
|
|
|
1834
1835
|
"data-block-id",
|
|
1835
1836
|
"data-block-type",
|
|
1836
1837
|
"data-tpl-picked"
|
|
1837
|
-
], va = ["aria-label"],
|
|
1838
|
+
], va = ["data-lock-holder"], ya = ["aria-label"], ba = [
|
|
1838
1839
|
"aria-label",
|
|
1839
1840
|
"aria-pressed",
|
|
1840
1841
|
"title"
|
|
1841
|
-
],
|
|
1842
|
-
key:
|
|
1842
|
+
], xa = ["aria-label", "title"], Sa = ["aria-label", "title"], Ca = ["aria-label", "title"], wa = {
|
|
1843
|
+
key: 3,
|
|
1843
1844
|
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"
|
|
1844
|
-
},
|
|
1845
|
-
key:
|
|
1845
|
+
}, Ta = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Ea = {
|
|
1846
|
+
key: 4,
|
|
1846
1847
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1847
|
-
},
|
|
1848
|
-
key:
|
|
1848
|
+
}, Da = ["aria-label", "title"], Oa = {
|
|
1849
|
+
key: 5,
|
|
1849
1850
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1850
|
-
},
|
|
1851
|
+
}, ka = ["aria-label"], Aa = /*#__PURE__*/ Vn(/* @__PURE__ */ I({
|
|
1851
1852
|
__name: "BlockWrapper",
|
|
1852
1853
|
props: {
|
|
1853
1854
|
block: {},
|
|
@@ -1859,36 +1860,36 @@ var ha = ["innerHTML"], ga = /* @__PURE__ */ F({
|
|
|
1859
1860
|
},
|
|
1860
1861
|
emits: ["select"],
|
|
1861
1862
|
setup(e, { emit: r }) {
|
|
1862
|
-
let i = v(() => import("./BlockIssueBadge-
|
|
1863
|
+
let i = v(() => import("./BlockIssueBadge-BdpJwim0.js")), o = e, s = r, { t: c, format: l } = Dn(), d = p(Zt, null), f = _(null), m = P(() => d?.liftedBlockId.value === o.block.id), h = P(() => m.value ? l(c.blockActions.dragLifted, { block: o.block.type }) : c.blockActions.drag);
|
|
1863
1864
|
async function g() {
|
|
1864
1865
|
await a(), f.value?.focus();
|
|
1865
1866
|
}
|
|
1866
1867
|
function b(e) {
|
|
1867
1868
|
d && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), m.value ? d.drop(o.block.id) : d.lift(o.block.id)) : m.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), d.cancel(), g()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), d.moveUp(o.block.id), g()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), d.moveDown(o.block.id), g())));
|
|
1868
1869
|
}
|
|
1869
|
-
let T =
|
|
1870
|
+
let T = P(() => !o.viewport || !o.block.visibility ? !1 : o.block.visibility[o.viewport] === !1), E = P(() => o.previewMode === !0 && T.value), O = P(() => o.viewport ? {
|
|
1870
1871
|
desktop: c.viewport.desktop,
|
|
1871
1872
|
mobile: c.viewport.mobile
|
|
1872
|
-
}[o.viewport] ?? o.viewport : ""), A =
|
|
1873
|
-
backgroundImageUrl:
|
|
1874
|
-
heroBoxWidth: ft(o.block,
|
|
1875
|
-
})),
|
|
1876
|
-
function
|
|
1873
|
+
}[o.viewport] ?? o.viewport : ""), A = P(() => !!o.block.displayCondition), j = p(an, null), M = p(ln, null), N = p(mn, {}), I = P(() => N.savedBlocks?.isPicking.value === !0), ee = P(() => !o.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), te = P(() => o.isSelected && !I.value), ne = P(() => N.comments?.getBlockCount(o.block.id) ?? 0), re = P(() => N.collaboration?.lockOf(o.block.id) ?? null), ie = P(() => re.value?.holder.type === "guest" ? c.collaboration.guest : re.value?.holder.name ?? ""), ae = P(() => N.collaboration?.agentHighlightOf(o.block.id) ?? null), oe = nt(() => o.block.type === "section" ? o.block.backgroundImage : void 0), se = nt(() => o.block.type === "section" ? o.block.wrapper?.backgroundImage : void 0), ce = p(un, null), le = p(Ft, void 0), ue = P(() => Jr(o.block, {
|
|
1874
|
+
backgroundImageUrl: oe.value,
|
|
1875
|
+
heroBoxWidth: ft(o.block, ce?.content.value, le)
|
|
1876
|
+
})), de = P(() => Zr(o.block, { backgroundImageUrl: se.value }));
|
|
1877
|
+
function fe(e) {
|
|
1877
1878
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
1878
1879
|
}
|
|
1879
|
-
function
|
|
1880
|
+
function pe() {
|
|
1880
1881
|
j?.deleteBlock(o.block.id);
|
|
1881
1882
|
}
|
|
1882
|
-
function
|
|
1883
|
+
function me() {
|
|
1883
1884
|
j?.duplicateBlock(o.block);
|
|
1884
1885
|
}
|
|
1885
|
-
function
|
|
1886
|
-
|
|
1886
|
+
function he() {
|
|
1887
|
+
N.savedBlocks?.startPicking(o.block.id);
|
|
1887
1888
|
}
|
|
1888
|
-
function
|
|
1889
|
+
function ge() {
|
|
1889
1890
|
M?.toggleBlock(o.block.id);
|
|
1890
1891
|
}
|
|
1891
|
-
return (r, a) => E.value ?
|
|
1892
|
+
return (r, a) => E.value ? F("", !0) : (t(), S("div", {
|
|
1892
1893
|
key: 0,
|
|
1893
1894
|
class: k(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
1894
1895
|
"tpl-block--selected": e.isSelected,
|
|
@@ -1899,11 +1900,33 @@ var ha = ["innerHTML"], ga = /* @__PURE__ */ F({
|
|
|
1899
1900
|
"data-block-id": e.block.id,
|
|
1900
1901
|
"data-block-type": e.block.type,
|
|
1901
1902
|
"data-tpl-picked": e.picked || void 0,
|
|
1902
|
-
onClick:
|
|
1903
|
+
onClick: fe
|
|
1903
1904
|
}, [
|
|
1904
1905
|
C(y(i), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1905
|
-
|
|
1906
|
+
re.value ? (t(), S("div", {
|
|
1906
1907
|
key: 0,
|
|
1908
|
+
"data-testid": "block-lock",
|
|
1909
|
+
"data-lock-holder": re.value.holder.sessionId,
|
|
1910
|
+
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
1911
|
+
style: n({
|
|
1912
|
+
outline: `2px solid ${re.value.holder.color}`,
|
|
1913
|
+
outlineOffset: "-1px"
|
|
1914
|
+
})
|
|
1915
|
+
}, [x("span", {
|
|
1916
|
+
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
1917
|
+
style: n({
|
|
1918
|
+
backgroundColor: re.value.holder.color,
|
|
1919
|
+
color: y(Gn)(re.value.holder.color)
|
|
1920
|
+
})
|
|
1921
|
+
}, D(y(l)(y(c).collaboration.editing, { name: ie.value })), 5)], 12, va)) : F("", !0),
|
|
1922
|
+
ae.value === null ? F("", !0) : (t(), S("div", {
|
|
1923
|
+
key: ae.value,
|
|
1924
|
+
"data-testid": "block-agent-highlight",
|
|
1925
|
+
"aria-hidden": "true",
|
|
1926
|
+
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
1927
|
+
})),
|
|
1928
|
+
te.value ? (t(), S("div", {
|
|
1929
|
+
key: 2,
|
|
1907
1930
|
role: "toolbar",
|
|
1908
1931
|
"aria-label": y(c).blockActions.drag,
|
|
1909
1932
|
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)]"
|
|
@@ -1920,97 +1943,97 @@ var ha = ["innerHTML"], ga = /* @__PURE__ */ F({
|
|
|
1920
1943
|
}, [C(y(si), {
|
|
1921
1944
|
size: 14,
|
|
1922
1945
|
"stroke-width": 1.5
|
|
1923
|
-
})], 40,
|
|
1946
|
+
})], 40, ba),
|
|
1924
1947
|
x("button", {
|
|
1925
1948
|
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",
|
|
1926
1949
|
"aria-label": y(c).blockActions.duplicate,
|
|
1927
1950
|
title: y(c).blockActions.duplicate,
|
|
1928
|
-
onClick:
|
|
1929
|
-
}, [C(y(
|
|
1951
|
+
onClick: L(me, ["stop"])
|
|
1952
|
+
}, [C(y(In), {
|
|
1930
1953
|
size: 14,
|
|
1931
1954
|
"stroke-width": 1.5
|
|
1932
|
-
})], 8,
|
|
1933
|
-
|
|
1955
|
+
})], 8, xa),
|
|
1956
|
+
ee.value ? (t(), S("button", {
|
|
1934
1957
|
key: 0,
|
|
1935
1958
|
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",
|
|
1936
1959
|
"aria-label": y(c).blockActions.saveAsBlock,
|
|
1937
1960
|
title: y(c).blockActions.saveAsBlock,
|
|
1938
|
-
onClick:
|
|
1961
|
+
onClick: L(he, ["stop"])
|
|
1939
1962
|
}, [C(y(ri), {
|
|
1940
1963
|
size: 14,
|
|
1941
1964
|
"stroke-width": 1.5
|
|
1942
|
-
})], 8,
|
|
1965
|
+
})], 8, Sa)) : F("", !0),
|
|
1943
1966
|
x("button", {
|
|
1944
1967
|
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",
|
|
1945
1968
|
"aria-label": y(c).blockActions.delete,
|
|
1946
1969
|
title: y(c).blockActions.delete,
|
|
1947
|
-
onClick:
|
|
1948
|
-
}, [C(y(
|
|
1970
|
+
onClick: L(pe, ["stop"])
|
|
1971
|
+
}, [C(y(Rn), {
|
|
1949
1972
|
size: 14,
|
|
1950
1973
|
"stroke-width": 1.5
|
|
1951
|
-
})], 8,
|
|
1952
|
-
], 8,
|
|
1953
|
-
T.value ? (t(), S("div",
|
|
1974
|
+
})], 8, Ca)
|
|
1975
|
+
], 8, ya)) : F("", !0),
|
|
1976
|
+
T.value ? (t(), S("div", wa, [x("span", Ta, [C(y(ai), {
|
|
1954
1977
|
size: 12,
|
|
1955
1978
|
"stroke-width": 1.5
|
|
1956
|
-
}), w(" " + D(y(l)(y(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) :
|
|
1957
|
-
A.value && !T.value ? (t(), S("div",
|
|
1979
|
+
}), w(" " + D(y(l)(y(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : F("", !0),
|
|
1980
|
+
A.value && !T.value ? (t(), S("div", Ea, [x("button", {
|
|
1958
1981
|
"data-testid": "condition-toggle",
|
|
1959
1982
|
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)]",
|
|
1960
1983
|
"aria-label": y(c).blockActions.conditionToggle,
|
|
1961
1984
|
title: e.block.displayCondition?.label,
|
|
1962
|
-
onClick:
|
|
1985
|
+
onClick: L(ge, ["stop"])
|
|
1963
1986
|
}, [C(y(oi), {
|
|
1964
1987
|
size: 12,
|
|
1965
1988
|
"stroke-width": 2
|
|
1966
|
-
})], 8,
|
|
1967
|
-
|
|
1989
|
+
})], 8, Da)])) : F("", !0),
|
|
1990
|
+
ne.value > 0 && !T.value ? (t(), S("div", Oa, [x("button", {
|
|
1968
1991
|
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)]",
|
|
1969
|
-
"aria-label": y(l)(y(c).blockActions.comments, { count: String(
|
|
1970
|
-
onClick: a[0] ||=
|
|
1971
|
-
}, [C(y(
|
|
1992
|
+
"aria-label": y(l)(y(c).blockActions.comments, { count: String(ne.value) }),
|
|
1993
|
+
onClick: a[0] ||= L((t) => y(N).comments?.openForBlock(e.block.id), ["stop"])
|
|
1994
|
+
}, [C(y(Ln), {
|
|
1972
1995
|
size: 12,
|
|
1973
1996
|
"stroke-width": 2.5
|
|
1974
|
-
}), w(" " + D(
|
|
1975
|
-
|
|
1976
|
-
key:
|
|
1977
|
-
class: k(["tpl-section-wrapper tpl-email-surface", y(Wr)(
|
|
1978
|
-
style: n(
|
|
1997
|
+
}), w(" " + D(ne.value), 1)], 8, ka)])) : F("", !0),
|
|
1998
|
+
de.value ? (t(), S("div", {
|
|
1999
|
+
key: 6,
|
|
2000
|
+
class: k(["tpl-section-wrapper tpl-email-surface", y(Wr)(de.value)]),
|
|
2001
|
+
style: n(de.value)
|
|
1979
2002
|
}, [x("div", {
|
|
1980
|
-
class: k(["tpl-block-content tpl-email-surface", y(Wr)(
|
|
1981
|
-
style: n(
|
|
2003
|
+
class: k(["tpl-block-content tpl-email-surface", y(Wr)(ue.value)]),
|
|
2004
|
+
style: n(ue.value)
|
|
1982
2005
|
}, [u(r.$slots, "default", {}, void 0, !0)], 6)], 6)) : (t(), S("div", {
|
|
1983
|
-
key:
|
|
1984
|
-
class: k(["tpl-block-content tpl-email-surface", y(Wr)(
|
|
1985
|
-
style: n(
|
|
2006
|
+
key: 7,
|
|
2007
|
+
class: k(["tpl-block-content tpl-email-surface", y(Wr)(ue.value)]),
|
|
2008
|
+
style: n(ue.value)
|
|
1986
2009
|
}, [u(r.$slots, "default", {}, void 0, !0)], 6))
|
|
1987
2010
|
], 10, _a));
|
|
1988
2011
|
}
|
|
1989
|
-
}), [["__scopeId", "data-v-
|
|
2012
|
+
}), [["__scopeId", "data-v-3c489db0"]]);
|
|
1990
2013
|
//#endregion
|
|
1991
2014
|
//#region src/utils/unwrapParagraph.ts
|
|
1992
|
-
function
|
|
2015
|
+
function ja(e) {
|
|
1993
2016
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1994
2017
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1995
2018
|
}
|
|
1996
2019
|
//#endregion
|
|
1997
2020
|
//#region src/components/blocks/TitleBlock.vue
|
|
1998
|
-
var
|
|
2021
|
+
var Ma = /* @__PURE__ */ I({
|
|
1999
2022
|
__name: "TitleBlock",
|
|
2000
2023
|
props: {
|
|
2001
2024
|
block: {},
|
|
2002
2025
|
viewport: {}
|
|
2003
2026
|
},
|
|
2004
2027
|
setup(e) {
|
|
2005
|
-
let r = e, i = v(() => import("./TitleEditor-
|
|
2028
|
+
let r = e, i = v(() => import("./TitleEditor-CvpNUoAp.js")), a = Mt(Sn, "TitleBlock"), { isEditing: s, blockRef: c, toolbarPosition: l, resolvedContent: u, handleDoubleClick: d, handleEditorDone: f } = ma(() => r.block.content), p = P(() => {
|
|
2006
2029
|
let e = {
|
|
2007
|
-
fontSize: `${
|
|
2008
|
-
lineHeight: String(
|
|
2030
|
+
fontSize: `${qe[r.block.level]}px`,
|
|
2031
|
+
lineHeight: String(Ue),
|
|
2009
2032
|
fontWeight: "700",
|
|
2010
2033
|
textAlign: r.block.textAlign
|
|
2011
2034
|
};
|
|
2012
2035
|
return r.block.color && (e.color = r.block.color), r.block.fontFamily && (e.fontFamily = a.resolveFontFamily(r.block.fontFamily)), e;
|
|
2013
|
-
}), m =
|
|
2036
|
+
}), m = P(() => `h${r.block.level}`), h = P(() => ja(u.value));
|
|
2014
2037
|
return (r, a) => (t(), S("div", {
|
|
2015
2038
|
ref_key: "blockRef",
|
|
2016
2039
|
ref: c,
|
|
@@ -2036,14 +2059,14 @@ var ja = /* @__PURE__ */ F({
|
|
|
2036
2059
|
innerHTML: h.value
|
|
2037
2060
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2038
2061
|
}
|
|
2039
|
-
}),
|
|
2040
|
-
function
|
|
2041
|
-
let n =
|
|
2042
|
-
n.color =
|
|
2043
|
-
let r =
|
|
2044
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2045
|
-
let i =
|
|
2046
|
-
return i.align = "center",
|
|
2062
|
+
}), Na = "hero", Pa = "#1f2937", Fa = "#ffffff";
|
|
2063
|
+
function Ia(e, t) {
|
|
2064
|
+
let n = _e("title", e);
|
|
2065
|
+
n.color = Fa, n.textAlign = "center";
|
|
2066
|
+
let r = _e("paragraph", e);
|
|
2067
|
+
r.content = `<p style="text-align: center"><span style="color: ${Fa}">${La(t)}</span></p>`;
|
|
2068
|
+
let i = _e("button", e);
|
|
2069
|
+
return i.align = "center", fe({
|
|
2047
2070
|
columns: "1",
|
|
2048
2071
|
children: [[
|
|
2049
2072
|
n,
|
|
@@ -2061,98 +2084,98 @@ function Fa(e, t) {
|
|
|
2061
2084
|
bottom: 48,
|
|
2062
2085
|
left: 24
|
|
2063
2086
|
},
|
|
2064
|
-
backgroundColor:
|
|
2087
|
+
backgroundColor: Pa
|
|
2065
2088
|
}
|
|
2066
2089
|
});
|
|
2067
2090
|
}
|
|
2068
|
-
function
|
|
2091
|
+
function La(e) {
|
|
2069
2092
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2070
2093
|
}
|
|
2071
2094
|
//#endregion
|
|
2072
2095
|
//#region src/utils/sectionColumnDrop.ts
|
|
2073
|
-
var
|
|
2074
|
-
function
|
|
2075
|
-
return e.dataset.blockType !== "section" && !
|
|
2096
|
+
var Ra = /* @__PURE__ */ new Set(["section", Na]);
|
|
2097
|
+
function za(e) {
|
|
2098
|
+
return e.dataset.blockType !== "section" && !Ra.has(e.dataset.paletteType ?? "");
|
|
2076
2099
|
}
|
|
2077
2100
|
//#endregion
|
|
2078
2101
|
//#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
|
|
2079
|
-
var
|
|
2102
|
+
var Ba = Object.defineProperty, Va = Object.getOwnPropertySymbols, Ha = Object.prototype.hasOwnProperty, Ua = Object.prototype.propertyIsEnumerable, Wa = (e, t, n) => t in e ? Ba(e, t, {
|
|
2080
2103
|
enumerable: !0,
|
|
2081
2104
|
configurable: !0,
|
|
2082
2105
|
writable: !0,
|
|
2083
2106
|
value: n
|
|
2084
|
-
}) : e[t] = n,
|
|
2085
|
-
for (var n in t ||= {})
|
|
2086
|
-
if (
|
|
2107
|
+
}) : e[t] = n, Ga = (e, t) => {
|
|
2108
|
+
for (var n in t ||= {}) Ha.call(t, n) && Wa(e, n, t[n]);
|
|
2109
|
+
if (Va) for (var n of Va(t)) Ua.call(t, n) && Wa(e, n, t[n]);
|
|
2087
2110
|
return e;
|
|
2088
|
-
},
|
|
2111
|
+
}, Ka = (e, t) => {
|
|
2089
2112
|
var n = {};
|
|
2090
|
-
for (var r in e)
|
|
2091
|
-
if (e != null &&
|
|
2113
|
+
for (var r in e) Ha.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2114
|
+
if (e != null && Va) for (var r of Va(e)) t.indexOf(r) < 0 && Ua.call(e, r) && (n[r] = e[r]);
|
|
2092
2115
|
return n;
|
|
2093
|
-
},
|
|
2094
|
-
function qa(e) {
|
|
2095
|
-
console.warn(Ka + e);
|
|
2096
|
-
}
|
|
2116
|
+
}, qa = "[vue-draggable-plus]: ";
|
|
2097
2117
|
function Ja(e) {
|
|
2098
|
-
console.
|
|
2118
|
+
console.warn(qa + e);
|
|
2099
2119
|
}
|
|
2100
|
-
function Ya(e
|
|
2120
|
+
function Ya(e) {
|
|
2121
|
+
console.error(qa + e);
|
|
2122
|
+
}
|
|
2123
|
+
function Xa(e, t, n) {
|
|
2101
2124
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2102
2125
|
}
|
|
2103
|
-
function
|
|
2126
|
+
function Za(e) {
|
|
2104
2127
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2105
2128
|
}
|
|
2106
|
-
function
|
|
2107
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2129
|
+
function Qa(e) {
|
|
2130
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Za(n)] = e[n]), t), {});
|
|
2108
2131
|
}
|
|
2109
|
-
function
|
|
2132
|
+
function $a(e, t) {
|
|
2110
2133
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2111
2134
|
}
|
|
2112
|
-
function
|
|
2135
|
+
function eo(e, t, n) {
|
|
2113
2136
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2114
2137
|
}
|
|
2115
|
-
function
|
|
2138
|
+
function to(e) {
|
|
2116
2139
|
return e === void 0;
|
|
2117
2140
|
}
|
|
2118
|
-
function
|
|
2141
|
+
function no(e) {
|
|
2119
2142
|
return typeof e == "string";
|
|
2120
2143
|
}
|
|
2121
|
-
function
|
|
2144
|
+
function ro(e, t, n) {
|
|
2122
2145
|
let r = e.children[n];
|
|
2123
2146
|
e.insertBefore(t, r);
|
|
2124
2147
|
}
|
|
2125
|
-
function
|
|
2148
|
+
function io(e) {
|
|
2126
2149
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2127
2150
|
}
|
|
2128
|
-
function
|
|
2151
|
+
function ao(e, t = document) {
|
|
2129
2152
|
let n = null;
|
|
2130
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2153
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Ja(`Element not found: ${e}`), n;
|
|
2131
2154
|
}
|
|
2132
|
-
function
|
|
2155
|
+
function oo(e, t, n = null) {
|
|
2133
2156
|
return function(...r) {
|
|
2134
2157
|
return e.apply(n, r), t.apply(n, r);
|
|
2135
2158
|
};
|
|
2136
2159
|
}
|
|
2137
|
-
function
|
|
2138
|
-
let n =
|
|
2160
|
+
function so(e, t) {
|
|
2161
|
+
let n = Ga({}, e);
|
|
2139
2162
|
return Object.keys(t).forEach((r) => {
|
|
2140
|
-
n[r] ? n[r] =
|
|
2163
|
+
n[r] ? n[r] = oo(e[r], t[r]) : n[r] = t[r];
|
|
2141
2164
|
}), n;
|
|
2142
2165
|
}
|
|
2143
|
-
function
|
|
2166
|
+
function co(e) {
|
|
2144
2167
|
return e instanceof HTMLElement;
|
|
2145
2168
|
}
|
|
2146
|
-
function
|
|
2169
|
+
function lo(e, t) {
|
|
2147
2170
|
Object.keys(e).forEach((n) => {
|
|
2148
2171
|
t(n, e[n]);
|
|
2149
2172
|
});
|
|
2150
2173
|
}
|
|
2151
|
-
function
|
|
2174
|
+
function uo(e) {
|
|
2152
2175
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2153
2176
|
}
|
|
2154
|
-
var
|
|
2155
|
-
function
|
|
2177
|
+
var fo = Object.assign;
|
|
2178
|
+
function po(e, t) {
|
|
2156
2179
|
var n = Object.keys(e);
|
|
2157
2180
|
if (Object.getOwnPropertySymbols) {
|
|
2158
2181
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2162,26 +2185,26 @@ function fo(e, t) {
|
|
|
2162
2185
|
}
|
|
2163
2186
|
return n;
|
|
2164
2187
|
}
|
|
2165
|
-
function
|
|
2188
|
+
function mo(e) {
|
|
2166
2189
|
for (var t = 1; t < arguments.length; t++) {
|
|
2167
2190
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2168
|
-
t % 2 ?
|
|
2169
|
-
|
|
2170
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2191
|
+
t % 2 ? po(Object(n), !0).forEach(function(t) {
|
|
2192
|
+
go(e, t, n[t]);
|
|
2193
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : po(Object(n)).forEach(function(t) {
|
|
2171
2194
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2172
2195
|
});
|
|
2173
2196
|
}
|
|
2174
2197
|
return e;
|
|
2175
2198
|
}
|
|
2176
|
-
function
|
|
2199
|
+
function ho(e) {
|
|
2177
2200
|
"@babel/helpers - typeof";
|
|
2178
|
-
return
|
|
2201
|
+
return ho = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2179
2202
|
return typeof e;
|
|
2180
2203
|
} : function(e) {
|
|
2181
2204
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2182
|
-
},
|
|
2205
|
+
}, ho(e);
|
|
2183
2206
|
}
|
|
2184
|
-
function
|
|
2207
|
+
function go(e, t, n) {
|
|
2185
2208
|
return t in e ? Object.defineProperty(e, t, {
|
|
2186
2209
|
value: n,
|
|
2187
2210
|
enumerable: !0,
|
|
@@ -2189,44 +2212,44 @@ function ho(e, t, n) {
|
|
|
2189
2212
|
writable: !0
|
|
2190
2213
|
}) : e[t] = n, e;
|
|
2191
2214
|
}
|
|
2192
|
-
function
|
|
2193
|
-
return
|
|
2215
|
+
function _o() {
|
|
2216
|
+
return _o = Object.assign || function(e) {
|
|
2194
2217
|
for (var t = 1; t < arguments.length; t++) {
|
|
2195
2218
|
var n = arguments[t];
|
|
2196
2219
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2197
2220
|
}
|
|
2198
2221
|
return e;
|
|
2199
|
-
},
|
|
2222
|
+
}, _o.apply(this, arguments);
|
|
2200
2223
|
}
|
|
2201
|
-
function
|
|
2224
|
+
function vo(e, t) {
|
|
2202
2225
|
if (e == null) return {};
|
|
2203
2226
|
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]);
|
|
2204
2227
|
return n;
|
|
2205
2228
|
}
|
|
2206
|
-
function
|
|
2229
|
+
function yo(e, t) {
|
|
2207
2230
|
if (e == null) return {};
|
|
2208
|
-
var n =
|
|
2231
|
+
var n = vo(e, t), r, i;
|
|
2209
2232
|
if (Object.getOwnPropertySymbols) {
|
|
2210
2233
|
var a = Object.getOwnPropertySymbols(e);
|
|
2211
2234
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2212
2235
|
}
|
|
2213
2236
|
return n;
|
|
2214
2237
|
}
|
|
2215
|
-
var
|
|
2216
|
-
function
|
|
2238
|
+
var bo = "1.15.2";
|
|
2239
|
+
function xo(e) {
|
|
2217
2240
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2218
2241
|
}
|
|
2219
|
-
var
|
|
2242
|
+
var So = xo(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Co = xo(/Edge/i), wo = xo(/firefox/i), To = xo(/safari/i) && !xo(/chrome/i) && !xo(/android/i), Eo = xo(/iP(ad|od|hone)/i), Do = xo(/chrome/i) && xo(/android/i), Oo = {
|
|
2220
2243
|
capture: !1,
|
|
2221
2244
|
passive: !1
|
|
2222
2245
|
};
|
|
2223
|
-
function L(e, t, n) {
|
|
2224
|
-
e.addEventListener(t, n, !xo && Do);
|
|
2225
|
-
}
|
|
2226
2246
|
function R(e, t, n) {
|
|
2227
|
-
e.
|
|
2247
|
+
e.addEventListener(t, n, !So && Oo);
|
|
2248
|
+
}
|
|
2249
|
+
function z(e, t, n) {
|
|
2250
|
+
e.removeEventListener(t, n, !So && Oo);
|
|
2228
2251
|
}
|
|
2229
|
-
function
|
|
2252
|
+
function ko(e, t) {
|
|
2230
2253
|
if (t) {
|
|
2231
2254
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2232
2255
|
if (e.matches) return e.matches(t);
|
|
@@ -2238,41 +2261,41 @@ function Oo(e, t) {
|
|
|
2238
2261
|
return !1;
|
|
2239
2262
|
}
|
|
2240
2263
|
}
|
|
2241
|
-
function
|
|
2264
|
+
function Ao(e) {
|
|
2242
2265
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2243
2266
|
}
|
|
2244
|
-
function
|
|
2267
|
+
function jo(e, t, n, r) {
|
|
2245
2268
|
if (e) {
|
|
2246
2269
|
n ||= document;
|
|
2247
2270
|
do {
|
|
2248
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2271
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && ko(e, t) : ko(e, t)) || r && e === n) return e;
|
|
2249
2272
|
if (e === n) break;
|
|
2250
|
-
} while (e =
|
|
2273
|
+
} while (e = Ao(e));
|
|
2251
2274
|
}
|
|
2252
2275
|
return null;
|
|
2253
2276
|
}
|
|
2254
|
-
var
|
|
2255
|
-
function z(e, t, n) {
|
|
2256
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(jo, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(jo, " "));
|
|
2257
|
-
}
|
|
2277
|
+
var Mo = /\s+/g;
|
|
2258
2278
|
function B(e, t, n) {
|
|
2279
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Mo, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Mo, " "));
|
|
2280
|
+
}
|
|
2281
|
+
function V(e, t, n) {
|
|
2259
2282
|
var r = e && e.style;
|
|
2260
2283
|
if (r) {
|
|
2261
2284
|
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];
|
|
2262
2285
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2263
2286
|
}
|
|
2264
2287
|
}
|
|
2265
|
-
function
|
|
2288
|
+
function No(e, t) {
|
|
2266
2289
|
var n = "";
|
|
2267
2290
|
if (typeof e == "string") n = e;
|
|
2268
2291
|
else do {
|
|
2269
|
-
var r =
|
|
2292
|
+
var r = V(e, "transform");
|
|
2270
2293
|
r && r !== "none" && (n = r + " " + n);
|
|
2271
2294
|
} while (!t && (e = e.parentNode));
|
|
2272
2295
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2273
2296
|
return i && new i(n);
|
|
2274
2297
|
}
|
|
2275
|
-
function
|
|
2298
|
+
function Po(e, t, n) {
|
|
2276
2299
|
if (e) {
|
|
2277
2300
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2278
2301
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2280,21 +2303,21 @@ function No(e, t, n) {
|
|
|
2280
2303
|
}
|
|
2281
2304
|
return [];
|
|
2282
2305
|
}
|
|
2283
|
-
function
|
|
2306
|
+
function Fo() {
|
|
2284
2307
|
return document.scrollingElement || document.documentElement;
|
|
2285
2308
|
}
|
|
2286
|
-
function
|
|
2309
|
+
function H(e, t, n, r, i) {
|
|
2287
2310
|
if (e.getBoundingClientRect || e === window) {
|
|
2288
2311
|
var a, o, s, c, l, u, d;
|
|
2289
|
-
if (e !== window && e.parentNode && e !==
|
|
2290
|
-
if (i && i.getBoundingClientRect && (
|
|
2312
|
+
if (e !== window && e.parentNode && e !== Fo() ? (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, !So)) do
|
|
2313
|
+
if (i && i.getBoundingClientRect && (V(i, "transform") !== "none" || n && V(i, "position") !== "static")) {
|
|
2291
2314
|
var f = i.getBoundingClientRect();
|
|
2292
|
-
o -= f.top + parseInt(
|
|
2315
|
+
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;
|
|
2293
2316
|
break;
|
|
2294
2317
|
}
|
|
2295
2318
|
while (i = i.parentNode);
|
|
2296
2319
|
if (r && e !== window) {
|
|
2297
|
-
var p =
|
|
2320
|
+
var p = No(i || e), m = p && p.a, h = p && p.d;
|
|
2298
2321
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2299
2322
|
}
|
|
2300
2323
|
return {
|
|
@@ -2307,18 +2330,18 @@ function V(e, t, n, r, i) {
|
|
|
2307
2330
|
};
|
|
2308
2331
|
}
|
|
2309
2332
|
}
|
|
2310
|
-
function
|
|
2311
|
-
for (var r =
|
|
2312
|
-
var a =
|
|
2333
|
+
function Io(e, t, n) {
|
|
2334
|
+
for (var r = Ho(e, !0), i = H(e)[t]; r;) {
|
|
2335
|
+
var a = H(r)[n], o = void 0;
|
|
2313
2336
|
if (o = i >= a, !o) return r;
|
|
2314
|
-
if (r ===
|
|
2315
|
-
r =
|
|
2337
|
+
if (r === Fo()) break;
|
|
2338
|
+
r = Ho(r, !1);
|
|
2316
2339
|
}
|
|
2317
2340
|
return !1;
|
|
2318
2341
|
}
|
|
2319
|
-
function
|
|
2342
|
+
function Lo(e, t, n, r) {
|
|
2320
2343
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2321
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2344
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && jo(o[a], n.draggable, e, !1)) {
|
|
2322
2345
|
if (i === t) return o[a];
|
|
2323
2346
|
i++;
|
|
2324
2347
|
}
|
|
@@ -2326,96 +2349,96 @@ function Io(e, t, n, r) {
|
|
|
2326
2349
|
}
|
|
2327
2350
|
return null;
|
|
2328
2351
|
}
|
|
2329
|
-
function
|
|
2330
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2352
|
+
function Ro(e, t) {
|
|
2353
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || V(n, "display") === "none" || t && !ko(n, t));) n = n.previousElementSibling;
|
|
2331
2354
|
return n || null;
|
|
2332
2355
|
}
|
|
2333
|
-
function
|
|
2356
|
+
function zo(e, t) {
|
|
2334
2357
|
var n = 0;
|
|
2335
2358
|
if (!e || !e.parentNode) return -1;
|
|
2336
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2359
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ko(e, t)) && n++;
|
|
2337
2360
|
return n;
|
|
2338
2361
|
}
|
|
2339
|
-
function
|
|
2340
|
-
var t = 0, n = 0, r =
|
|
2362
|
+
function Bo(e) {
|
|
2363
|
+
var t = 0, n = 0, r = Fo();
|
|
2341
2364
|
if (e) do {
|
|
2342
|
-
var i =
|
|
2365
|
+
var i = No(e), a = i.a, o = i.d;
|
|
2343
2366
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2344
2367
|
} while (e !== r && (e = e.parentNode));
|
|
2345
2368
|
return [t, n];
|
|
2346
2369
|
}
|
|
2347
|
-
function
|
|
2370
|
+
function Vo(e, t) {
|
|
2348
2371
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2349
2372
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2350
2373
|
}
|
|
2351
2374
|
return -1;
|
|
2352
2375
|
}
|
|
2353
|
-
function
|
|
2354
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2376
|
+
function Ho(e, t) {
|
|
2377
|
+
if (!e || !e.getBoundingClientRect) return Fo();
|
|
2355
2378
|
var n = e, r = !1;
|
|
2356
2379
|
do
|
|
2357
2380
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2358
|
-
var i =
|
|
2381
|
+
var i = V(n);
|
|
2359
2382
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2360
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2383
|
+
if (!n.getBoundingClientRect || n === document.body) return Fo();
|
|
2361
2384
|
if (r || t) return n;
|
|
2362
2385
|
r = !0;
|
|
2363
2386
|
}
|
|
2364
2387
|
}
|
|
2365
2388
|
while (n = n.parentNode);
|
|
2366
|
-
return
|
|
2389
|
+
return Fo();
|
|
2367
2390
|
}
|
|
2368
|
-
function
|
|
2391
|
+
function Uo(e, t) {
|
|
2369
2392
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2370
2393
|
return e;
|
|
2371
2394
|
}
|
|
2372
|
-
function
|
|
2395
|
+
function Wo(e, t) {
|
|
2373
2396
|
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);
|
|
2374
2397
|
}
|
|
2375
|
-
var
|
|
2376
|
-
function
|
|
2398
|
+
var Go;
|
|
2399
|
+
function Ko(e, t) {
|
|
2377
2400
|
return function() {
|
|
2378
|
-
if (!
|
|
2401
|
+
if (!Go) {
|
|
2379
2402
|
var n = arguments, r = this;
|
|
2380
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2381
|
-
|
|
2403
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Go = setTimeout(function() {
|
|
2404
|
+
Go = void 0;
|
|
2382
2405
|
}, t);
|
|
2383
2406
|
}
|
|
2384
2407
|
};
|
|
2385
2408
|
}
|
|
2386
|
-
function
|
|
2387
|
-
clearTimeout(
|
|
2409
|
+
function qo() {
|
|
2410
|
+
clearTimeout(Go), Go = void 0;
|
|
2388
2411
|
}
|
|
2389
|
-
function
|
|
2412
|
+
function Jo(e, t, n) {
|
|
2390
2413
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2391
2414
|
}
|
|
2392
|
-
function
|
|
2415
|
+
function Yo(e) {
|
|
2393
2416
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2394
2417
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2395
2418
|
}
|
|
2396
|
-
function
|
|
2419
|
+
function Xo(e, t, n) {
|
|
2397
2420
|
var r = {};
|
|
2398
2421
|
return Array.from(e.children).forEach(function(i) {
|
|
2399
|
-
if (
|
|
2400
|
-
var a =
|
|
2422
|
+
if (jo(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2423
|
+
var a = H(i);
|
|
2401
2424
|
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);
|
|
2402
2425
|
}
|
|
2403
2426
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2404
2427
|
}
|
|
2405
|
-
var
|
|
2406
|
-
function
|
|
2428
|
+
var Zo = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2429
|
+
function Qo() {
|
|
2407
2430
|
var e = [], t;
|
|
2408
2431
|
return {
|
|
2409
2432
|
captureAnimationState: function() {
|
|
2410
2433
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2411
|
-
if (
|
|
2434
|
+
if (V(t, "display") !== "none" && t !== Q.ghost) {
|
|
2412
2435
|
e.push({
|
|
2413
2436
|
target: t,
|
|
2414
|
-
rect:
|
|
2437
|
+
rect: H(t)
|
|
2415
2438
|
});
|
|
2416
|
-
var n =
|
|
2439
|
+
var n = mo({}, e[e.length - 1].rect);
|
|
2417
2440
|
if (t.thisAnimationDuration) {
|
|
2418
|
-
var r =
|
|
2441
|
+
var r = No(t, !0);
|
|
2419
2442
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2420
2443
|
}
|
|
2421
2444
|
t.fromRect = n;
|
|
@@ -2426,7 +2449,7 @@ function Xo() {
|
|
|
2426
2449
|
e.push(t);
|
|
2427
2450
|
},
|
|
2428
2451
|
removeAnimationState: function(t) {
|
|
2429
|
-
e.splice(
|
|
2452
|
+
e.splice(Vo(e, { target: t }), 1);
|
|
2430
2453
|
},
|
|
2431
2454
|
animateAll: function(n) {
|
|
2432
2455
|
var r = this;
|
|
@@ -2434,8 +2457,8 @@ function Xo() {
|
|
|
2434
2457
|
else {
|
|
2435
2458
|
var i = !1, a = 0;
|
|
2436
2459
|
e.forEach(function(e) {
|
|
2437
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2438
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2460
|
+
var t = 0, n = e.target, o = n.fromRect, s = H(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = No(n, !0);
|
|
2461
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Wo(c, s) && !Wo(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = es(u, c, l, r.options)), Wo(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() {
|
|
2439
2462
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2440
2463
|
}, t), n.thisAnimationDuration = t);
|
|
2441
2464
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2445,27 +2468,27 @@ function Xo() {
|
|
|
2445
2468
|
},
|
|
2446
2469
|
animate: function(e, t, n, r) {
|
|
2447
2470
|
if (r) {
|
|
2448
|
-
|
|
2449
|
-
var i =
|
|
2450
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2451
|
-
|
|
2471
|
+
V(e, "transition", ""), V(e, "transform", "");
|
|
2472
|
+
var i = No(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2473
|
+
e.animatingX = !!s, e.animatingY = !!c, V(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = $o(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() {
|
|
2474
|
+
V(e, "transition", ""), V(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2452
2475
|
}, r);
|
|
2453
2476
|
}
|
|
2454
2477
|
}
|
|
2455
2478
|
};
|
|
2456
2479
|
}
|
|
2457
|
-
function
|
|
2480
|
+
function $o(e) {
|
|
2458
2481
|
return e.offsetWidth;
|
|
2459
2482
|
}
|
|
2460
|
-
function
|
|
2483
|
+
function es(e, t, n, r) {
|
|
2461
2484
|
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;
|
|
2462
2485
|
}
|
|
2463
|
-
var
|
|
2486
|
+
var ts = [], ns = { initializeByDefault: !0 }, rs = {
|
|
2464
2487
|
mount: function(e) {
|
|
2465
|
-
for (var t in
|
|
2466
|
-
|
|
2488
|
+
for (var t in ns) ns.hasOwnProperty(t) && !(t in e) && (e[t] = ns[t]);
|
|
2489
|
+
ts.forEach(function(t) {
|
|
2467
2490
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2468
|
-
}),
|
|
2491
|
+
}), ts.push(e);
|
|
2469
2492
|
},
|
|
2470
2493
|
pluginEvent: function(e, t, n) {
|
|
2471
2494
|
var r = this;
|
|
@@ -2473,16 +2496,16 @@ var $o = [], es = { initializeByDefault: !0 }, ts = {
|
|
|
2473
2496
|
r.eventCanceled = !0;
|
|
2474
2497
|
};
|
|
2475
2498
|
var i = e + "Global";
|
|
2476
|
-
|
|
2477
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2499
|
+
ts.forEach(function(r) {
|
|
2500
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](mo({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](mo({ sortable: t }, n)));
|
|
2478
2501
|
});
|
|
2479
2502
|
},
|
|
2480
2503
|
initializePlugins: function(e, t, n, r) {
|
|
2481
|
-
for (var i in
|
|
2504
|
+
for (var i in ts.forEach(function(r) {
|
|
2482
2505
|
var i = r.pluginName;
|
|
2483
2506
|
if (e.options[i] || r.initializeByDefault) {
|
|
2484
2507
|
var a = new r(e, t, e.options);
|
|
2485
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2508
|
+
a.sortable = e, a.options = e.options, e[i] = a, _o(n, a.defaults);
|
|
2486
2509
|
}
|
|
2487
2510
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2488
2511
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2491,56 +2514,56 @@ var $o = [], es = { initializeByDefault: !0 }, ts = {
|
|
|
2491
2514
|
},
|
|
2492
2515
|
getEventProperties: function(e, t) {
|
|
2493
2516
|
var n = {};
|
|
2494
|
-
return
|
|
2495
|
-
typeof r.eventProperties == "function" &&
|
|
2517
|
+
return ts.forEach(function(r) {
|
|
2518
|
+
typeof r.eventProperties == "function" && _o(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2496
2519
|
}), n;
|
|
2497
2520
|
},
|
|
2498
2521
|
modifyOption: function(e, t, n) {
|
|
2499
2522
|
var r;
|
|
2500
|
-
return
|
|
2523
|
+
return ts.forEach(function(i) {
|
|
2501
2524
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2502
2525
|
}), r;
|
|
2503
2526
|
}
|
|
2504
2527
|
};
|
|
2505
|
-
function
|
|
2528
|
+
function is(e) {
|
|
2506
2529
|
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;
|
|
2507
|
-
if (t ||= n && n[
|
|
2530
|
+
if (t ||= n && n[Zo], t) {
|
|
2508
2531
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2509
|
-
window.CustomEvent && !
|
|
2532
|
+
window.CustomEvent && !So && !Co ? h = new CustomEvent(r, {
|
|
2510
2533
|
bubbles: !0,
|
|
2511
2534
|
cancelable: !0
|
|
2512
2535
|
}) : (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;
|
|
2513
|
-
var v =
|
|
2536
|
+
var v = mo(mo({}, m), rs.getEventProperties(r, t));
|
|
2514
2537
|
for (var y in v) h[y] = v[y];
|
|
2515
2538
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2516
2539
|
}
|
|
2517
2540
|
}
|
|
2518
|
-
var
|
|
2519
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2520
|
-
|
|
2541
|
+
var as = ["evt"], U = function(e, t) {
|
|
2542
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = yo(n, as);
|
|
2543
|
+
rs.pluginEvent.bind(Q)(e, t, mo({
|
|
2521
2544
|
dragEl: G,
|
|
2522
2545
|
parentEl: K,
|
|
2523
2546
|
ghostEl: q,
|
|
2524
2547
|
rootEl: J,
|
|
2525
|
-
nextEl:
|
|
2526
|
-
lastDownEl:
|
|
2548
|
+
nextEl: os,
|
|
2549
|
+
lastDownEl: ss,
|
|
2527
2550
|
cloneEl: Y,
|
|
2528
|
-
cloneHidden:
|
|
2529
|
-
dragStarted:
|
|
2551
|
+
cloneHidden: cs,
|
|
2552
|
+
dragStarted: Cs,
|
|
2530
2553
|
putSortable: X,
|
|
2531
2554
|
activeSortable: Q.active,
|
|
2532
2555
|
originalEvent: r,
|
|
2533
|
-
oldIndex:
|
|
2534
|
-
oldDraggableIndex:
|
|
2535
|
-
newIndex:
|
|
2536
|
-
newDraggableIndex:
|
|
2537
|
-
hideGhostForTarget:
|
|
2538
|
-
unhideGhostForTarget:
|
|
2556
|
+
oldIndex: ls,
|
|
2557
|
+
oldDraggableIndex: ds,
|
|
2558
|
+
newIndex: us,
|
|
2559
|
+
newDraggableIndex: fs,
|
|
2560
|
+
hideGhostForTarget: Vs,
|
|
2561
|
+
unhideGhostForTarget: Hs,
|
|
2539
2562
|
cloneNowHidden: function() {
|
|
2540
|
-
|
|
2563
|
+
cs = !0;
|
|
2541
2564
|
},
|
|
2542
2565
|
cloneNowShown: function() {
|
|
2543
|
-
|
|
2566
|
+
cs = !1;
|
|
2544
2567
|
},
|
|
2545
2568
|
dispatchSortableEvent: function(e) {
|
|
2546
2569
|
W({
|
|
@@ -2552,45 +2575,45 @@ var rs = ["evt"], U = function(e, t) {
|
|
|
2552
2575
|
}, i));
|
|
2553
2576
|
};
|
|
2554
2577
|
function W(e) {
|
|
2555
|
-
|
|
2578
|
+
is(mo({
|
|
2556
2579
|
putSortable: X,
|
|
2557
2580
|
cloneEl: Y,
|
|
2558
2581
|
targetEl: G,
|
|
2559
2582
|
rootEl: J,
|
|
2560
|
-
oldIndex:
|
|
2561
|
-
oldDraggableIndex:
|
|
2562
|
-
newIndex:
|
|
2563
|
-
newDraggableIndex:
|
|
2583
|
+
oldIndex: ls,
|
|
2584
|
+
oldDraggableIndex: ds,
|
|
2585
|
+
newIndex: us,
|
|
2586
|
+
newDraggableIndex: fs
|
|
2564
2587
|
}, e));
|
|
2565
2588
|
}
|
|
2566
|
-
var G, K, q, J,
|
|
2567
|
-
if (
|
|
2568
|
-
if (
|
|
2589
|
+
var G, K, q, J, os, ss, Y, cs, ls, us, ds, fs, ps, X, ms = !1, hs = !1, gs = [], _s, vs, ys, bs, xs, Ss, Cs, ws, Ts, Es = !1, Ds = !1, Os, Z, ks = [], As = !1, js = [], Ms = typeof document < "u", Ns = Eo, Ps = Co || So ? "cssFloat" : "float", Fs = Ms && !Do && !Eo && "draggable" in document.createElement("div"), Is = function() {
|
|
2590
|
+
if (Ms) {
|
|
2591
|
+
if (So) return !1;
|
|
2569
2592
|
var e = document.createElement("x");
|
|
2570
2593
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2571
2594
|
}
|
|
2572
|
-
}(),
|
|
2573
|
-
var n =
|
|
2595
|
+
}(), Ls = function(e, t) {
|
|
2596
|
+
var n = V(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Lo(e, 0, t), a = Lo(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;
|
|
2574
2597
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2575
2598
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2576
2599
|
if (i && o.float && o.float !== "none") {
|
|
2577
2600
|
var u = o.float === "left" ? "left" : "right";
|
|
2578
2601
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2579
2602
|
}
|
|
2580
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2581
|
-
},
|
|
2603
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Ps] === "none" || a && n[Ps] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2604
|
+
}, Rs = function(e, t, n) {
|
|
2582
2605
|
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;
|
|
2583
2606
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2584
|
-
},
|
|
2607
|
+
}, zs = function(e, t) {
|
|
2585
2608
|
var n;
|
|
2586
|
-
return
|
|
2587
|
-
var i = r[
|
|
2588
|
-
if (i && !
|
|
2589
|
-
var a =
|
|
2609
|
+
return gs.some(function(r) {
|
|
2610
|
+
var i = r[Zo].options.emptyInsertThreshold;
|
|
2611
|
+
if (i && !Ro(r)) {
|
|
2612
|
+
var a = H(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2590
2613
|
if (o && s) return n = r;
|
|
2591
2614
|
}
|
|
2592
2615
|
}), n;
|
|
2593
|
-
},
|
|
2616
|
+
}, Bs = function(e) {
|
|
2594
2617
|
function t(e, n) {
|
|
2595
2618
|
return function(r, i, a, o) {
|
|
2596
2619
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2603,31 +2626,31 @@ var G, K, q, J, is, as, Y, os, ss, cs, ls, us, ds, X, fs = !1, ps = !1, ms = [],
|
|
|
2603
2626
|
};
|
|
2604
2627
|
}
|
|
2605
2628
|
var n = {}, r = e.group;
|
|
2606
|
-
(!r ||
|
|
2607
|
-
},
|
|
2608
|
-
!
|
|
2609
|
-
},
|
|
2610
|
-
!
|
|
2629
|
+
(!r || ho(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;
|
|
2630
|
+
}, Vs = function() {
|
|
2631
|
+
!Is && q && V(q, "display", "none");
|
|
2632
|
+
}, Hs = function() {
|
|
2633
|
+
!Is && q && V(q, "display", "");
|
|
2611
2634
|
};
|
|
2612
|
-
|
|
2613
|
-
if (
|
|
2635
|
+
Ms && !Do && document.addEventListener("click", function(e) {
|
|
2636
|
+
if (hs) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), hs = !1, !1;
|
|
2614
2637
|
}, !0);
|
|
2615
|
-
var
|
|
2638
|
+
var Us = function(e) {
|
|
2616
2639
|
if (G) {
|
|
2617
2640
|
e = e.touches ? e.touches[0] : e;
|
|
2618
|
-
var t =
|
|
2641
|
+
var t = zs(e.clientX, e.clientY);
|
|
2619
2642
|
if (t) {
|
|
2620
2643
|
var n = {};
|
|
2621
2644
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2622
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
2645
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[Zo]._onDragOver(n);
|
|
2623
2646
|
}
|
|
2624
2647
|
}
|
|
2625
|
-
},
|
|
2626
|
-
G && G.parentNode[
|
|
2648
|
+
}, Ws = function(e) {
|
|
2649
|
+
G && G.parentNode[Zo]._isOutsideThisEl(e.target);
|
|
2627
2650
|
};
|
|
2628
2651
|
function Q(e, t) {
|
|
2629
2652
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2630
|
-
this.el = e, this.options = t =
|
|
2653
|
+
this.el = e, this.options = t = _o({}, t), e[Zo] = this;
|
|
2631
2654
|
var n = {
|
|
2632
2655
|
group: null,
|
|
2633
2656
|
sort: !0,
|
|
@@ -2640,7 +2663,7 @@ function Q(e, t) {
|
|
|
2640
2663
|
invertedSwapThreshold: null,
|
|
2641
2664
|
removeCloneOnHide: !0,
|
|
2642
2665
|
direction: function() {
|
|
2643
|
-
return
|
|
2666
|
+
return Ls(e, this.options);
|
|
2644
2667
|
},
|
|
2645
2668
|
ghostClass: "sortable-ghost",
|
|
2646
2669
|
chosenClass: "sortable-chosen",
|
|
@@ -2667,17 +2690,17 @@ function Q(e, t) {
|
|
|
2667
2690
|
x: 0,
|
|
2668
2691
|
y: 0
|
|
2669
2692
|
},
|
|
2670
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2693
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !To,
|
|
2671
2694
|
emptyInsertThreshold: 5
|
|
2672
2695
|
};
|
|
2673
|
-
for (var r in
|
|
2674
|
-
for (var i in
|
|
2675
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
2696
|
+
for (var r in rs.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2697
|
+
for (var i in Bs(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2698
|
+
this.nativeDraggable = !t.forceFallback && Fs, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? R(e, "pointerdown", this._onTapStart) : (R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart)), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), gs.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), _o(this, Qo());
|
|
2676
2699
|
}
|
|
2677
2700
|
Q.prototype = {
|
|
2678
2701
|
constructor: Q,
|
|
2679
2702
|
_isOutsideThisEl: function(e) {
|
|
2680
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2703
|
+
!this.el.contains(e) && e !== this.el && (ws = null);
|
|
2681
2704
|
},
|
|
2682
2705
|
_getDirection: function(e, t) {
|
|
2683
2706
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
@@ -2685,8 +2708,8 @@ Q.prototype = {
|
|
|
2685
2708
|
_onTapStart: function(e) {
|
|
2686
2709
|
if (e.cancelable) {
|
|
2687
2710
|
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;
|
|
2688
|
-
if (
|
|
2689
|
-
if (
|
|
2711
|
+
if (ec(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && To && s && s.tagName.toUpperCase() === "SELECT") && (s = jo(s, r.draggable, n, !1), !(s && s.animated) && ss !== s)) {
|
|
2712
|
+
if (ls = zo(s), ds = zo(s, r.draggable), typeof l == "function") {
|
|
2690
2713
|
if (l.call(this, e, s, this)) {
|
|
2691
2714
|
W({
|
|
2692
2715
|
sortable: t,
|
|
@@ -2699,7 +2722,7 @@ Q.prototype = {
|
|
|
2699
2722
|
return;
|
|
2700
2723
|
}
|
|
2701
2724
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2702
|
-
if (r =
|
|
2725
|
+
if (r = jo(c, r.trim(), n, !1), r) return W({
|
|
2703
2726
|
sortable: t,
|
|
2704
2727
|
rootEl: r,
|
|
2705
2728
|
name: "filter",
|
|
@@ -2711,32 +2734,32 @@ Q.prototype = {
|
|
|
2711
2734
|
i && e.cancelable && e.preventDefault();
|
|
2712
2735
|
return;
|
|
2713
2736
|
}
|
|
2714
|
-
r.handle && !
|
|
2737
|
+
r.handle && !jo(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2715
2738
|
}
|
|
2716
2739
|
}
|
|
2717
2740
|
},
|
|
2718
2741
|
_prepareDragStart: function(e, t, n) {
|
|
2719
2742
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2720
2743
|
if (n && !G && n.parentNode === i) {
|
|
2721
|
-
var c =
|
|
2722
|
-
if (J = i, G = n, K = G.parentNode,
|
|
2744
|
+
var c = H(n);
|
|
2745
|
+
if (J = i, G = n, K = G.parentNode, os = G.nextSibling, ss = n, ps = a.group, Q.dragged = G, _s = {
|
|
2723
2746
|
target: G,
|
|
2724
2747
|
clientX: (t || e).clientX,
|
|
2725
2748
|
clientY: (t || e).clientY
|
|
2726
|
-
},
|
|
2727
|
-
U("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !
|
|
2749
|
+
}, xs = _s.clientX - c.left, Ss = _s.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
2750
|
+
U("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !wo && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
2728
2751
|
sortable: r,
|
|
2729
2752
|
name: "choose",
|
|
2730
2753
|
originalEvent: e
|
|
2731
|
-
}),
|
|
2754
|
+
}), B(G, a.chosenClass, !0));
|
|
2732
2755
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2733
|
-
|
|
2734
|
-
}),
|
|
2756
|
+
Po(G, e.trim(), qs);
|
|
2757
|
+
}), R(o, "dragover", Us), R(o, "mousemove", Us), R(o, "touchmove", Us), R(o, "mouseup", r._onDrop), R(o, "touchend", r._onDrop), R(o, "touchcancel", r._onDrop), wo && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Co || So))) {
|
|
2735
2758
|
if (Q.eventCanceled) {
|
|
2736
2759
|
this._onDrop();
|
|
2737
2760
|
return;
|
|
2738
2761
|
}
|
|
2739
|
-
|
|
2762
|
+
R(o, "mouseup", r._disableDelayedDrag), R(o, "touchend", r._disableDelayedDrag), R(o, "touchcancel", r._disableDelayedDrag), R(o, "mousemove", r._delayedDragTouchMoveHandler), R(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && R(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
2740
2763
|
} else s();
|
|
2741
2764
|
}
|
|
2742
2765
|
},
|
|
@@ -2745,25 +2768,25 @@ Q.prototype = {
|
|
|
2745
2768
|
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();
|
|
2746
2769
|
},
|
|
2747
2770
|
_disableDelayedDrag: function() {
|
|
2748
|
-
G &&
|
|
2771
|
+
G && qs(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2749
2772
|
},
|
|
2750
2773
|
_disableDelayedDragEvents: function() {
|
|
2751
2774
|
var e = this.el.ownerDocument;
|
|
2752
|
-
|
|
2775
|
+
z(e, "mouseup", this._disableDelayedDrag), z(e, "touchend", this._disableDelayedDrag), z(e, "touchcancel", this._disableDelayedDrag), z(e, "mousemove", this._delayedDragTouchMoveHandler), z(e, "touchmove", this._delayedDragTouchMoveHandler), z(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2753
2776
|
},
|
|
2754
2777
|
_triggerDragStart: function(e, t) {
|
|
2755
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
2778
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? R(document, "pointermove", this._onTouchMove) : t ? R(document, "touchmove", this._onTouchMove) : R(document, "mousemove", this._onTouchMove) : (R(G, "dragend", this), R(J, "dragstart", this._onDragStart));
|
|
2756
2779
|
try {
|
|
2757
|
-
document.selection ?
|
|
2780
|
+
document.selection ? tc(function() {
|
|
2758
2781
|
document.selection.empty();
|
|
2759
2782
|
}) : window.getSelection().removeAllRanges();
|
|
2760
2783
|
} catch {}
|
|
2761
2784
|
},
|
|
2762
2785
|
_dragStarted: function(e, t) {
|
|
2763
|
-
if (
|
|
2764
|
-
U("dragStarted", this, { evt: t }), this.nativeDraggable &&
|
|
2786
|
+
if (ms = !1, J && G) {
|
|
2787
|
+
U("dragStarted", this, { evt: t }), this.nativeDraggable && R(document, "dragover", Ws);
|
|
2765
2788
|
var n = this.options;
|
|
2766
|
-
!e &&
|
|
2789
|
+
!e && B(G, n.dragClass, !1), B(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
2767
2790
|
sortable: this,
|
|
2768
2791
|
name: "start",
|
|
2769
2792
|
originalEvent: t
|
|
@@ -2771,33 +2794,33 @@ Q.prototype = {
|
|
|
2771
2794
|
} else this._nulling();
|
|
2772
2795
|
},
|
|
2773
2796
|
_emulateDragOver: function() {
|
|
2774
|
-
if (
|
|
2775
|
-
this._lastX =
|
|
2776
|
-
for (var e = document.elementFromPoint(
|
|
2777
|
-
if (G.parentNode[
|
|
2778
|
-
if (t[
|
|
2797
|
+
if (vs) {
|
|
2798
|
+
this._lastX = vs.clientX, this._lastY = vs.clientY, Vs();
|
|
2799
|
+
for (var e = document.elementFromPoint(vs.clientX, vs.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(vs.clientX, vs.clientY), e !== t);) t = e;
|
|
2800
|
+
if (G.parentNode[Zo]._isOutsideThisEl(e), t) do {
|
|
2801
|
+
if (t[Zo]) {
|
|
2779
2802
|
var n = void 0;
|
|
2780
|
-
if (n = t[
|
|
2781
|
-
clientX:
|
|
2782
|
-
clientY:
|
|
2803
|
+
if (n = t[Zo]._onDragOver({
|
|
2804
|
+
clientX: vs.clientX,
|
|
2805
|
+
clientY: vs.clientY,
|
|
2783
2806
|
target: e,
|
|
2784
2807
|
rootEl: t
|
|
2785
2808
|
}), n && !this.options.dragoverBubble) break;
|
|
2786
2809
|
}
|
|
2787
2810
|
e = t;
|
|
2788
2811
|
} while (t = t.parentNode);
|
|
2789
|
-
|
|
2812
|
+
Hs();
|
|
2790
2813
|
}
|
|
2791
2814
|
},
|
|
2792
2815
|
_onTouchMove: function(e) {
|
|
2793
|
-
if (
|
|
2794
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q &&
|
|
2795
|
-
if (!Q.active && !
|
|
2816
|
+
if (_s) {
|
|
2817
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && No(q, !0), o = q && a && a.a, s = q && a && a.d, c = Ns && Z && Bo(Z), l = (i.clientX - _s.clientX + r.x) / (o || 1) + (c ? c[0] - ks[0] : 0) / (o || 1), u = (i.clientY - _s.clientY + r.y) / (s || 1) + (c ? c[1] - ks[1] : 0) / (s || 1);
|
|
2818
|
+
if (!Q.active && !ms) {
|
|
2796
2819
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2797
2820
|
this._onDragStart(e, !0);
|
|
2798
2821
|
}
|
|
2799
2822
|
if (q) {
|
|
2800
|
-
a ? (a.e += l - (
|
|
2823
|
+
a ? (a.e += l - (ys || 0), a.f += u - (bs || 0)) : a = {
|
|
2801
2824
|
a: 1,
|
|
2802
2825
|
b: 0,
|
|
2803
2826
|
c: 0,
|
|
@@ -2806,35 +2829,35 @@ Q.prototype = {
|
|
|
2806
2829
|
f: u
|
|
2807
2830
|
};
|
|
2808
2831
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2809
|
-
|
|
2832
|
+
V(q, "webkitTransform", d), V(q, "mozTransform", d), V(q, "msTransform", d), V(q, "transform", d), ys = l, bs = u, vs = i;
|
|
2810
2833
|
}
|
|
2811
2834
|
e.cancelable && e.preventDefault();
|
|
2812
2835
|
}
|
|
2813
2836
|
},
|
|
2814
2837
|
_appendGhost: function() {
|
|
2815
2838
|
if (!q) {
|
|
2816
|
-
var e = this.options.fallbackOnBody ? document.body : J, t =
|
|
2817
|
-
if (
|
|
2818
|
-
for (Z = e;
|
|
2819
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2839
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = H(G, !0, Ns, !0, e), n = this.options;
|
|
2840
|
+
if (Ns) {
|
|
2841
|
+
for (Z = e; V(Z, "position") === "static" && V(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2842
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Fo()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Fo(), ks = Bo(Z);
|
|
2820
2843
|
}
|
|
2821
|
-
q = G.cloneNode(!0),
|
|
2844
|
+
q = G.cloneNode(!0), B(q, n.ghostClass, !1), B(q, n.fallbackClass, !0), B(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", Ns ? "absolute" : "fixed"), V(q, "zIndex", "100000"), V(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), V(q, "transform-origin", xs / parseInt(q.style.width) * 100 + "% " + Ss / parseInt(q.style.height) * 100 + "%");
|
|
2822
2845
|
}
|
|
2823
2846
|
},
|
|
2824
2847
|
_onDragStart: function(e, t) {
|
|
2825
2848
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
2826
|
-
U("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (U("setupClone", this), Q.eventCanceled || (Y =
|
|
2849
|
+
U("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (U("setupClone", this), Q.eventCanceled || (Y = Yo(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), B(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = tc(function() {
|
|
2827
2850
|
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
2828
2851
|
sortable: n,
|
|
2829
2852
|
name: "clone"
|
|
2830
2853
|
}));
|
|
2831
|
-
}), !t &&
|
|
2854
|
+
}), !t && B(G, i.dragClass, !0), t ? (hs = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (z(document, "mouseup", n._onDrop), z(document, "touchend", n._onDrop), z(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), R(document, "drop", n), V(G, "transform", "translateZ(0)")), ms = !0, n._dragStartId = tc(n._dragStarted.bind(n, t, e)), R(document, "selectstart", n), Cs = !0, To && V(document.body, "user-select", "none"));
|
|
2832
2855
|
},
|
|
2833
2856
|
_onDragOver: function(e) {
|
|
2834
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2835
|
-
if (
|
|
2857
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = ps === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2858
|
+
if (As) return;
|
|
2836
2859
|
function h(o, s) {
|
|
2837
|
-
U(o, p,
|
|
2860
|
+
U(o, p, mo({
|
|
2838
2861
|
evt: e,
|
|
2839
2862
|
isOwner: l,
|
|
2840
2863
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2846,7 +2869,7 @@ Q.prototype = {
|
|
|
2846
2869
|
target: n,
|
|
2847
2870
|
completed: _,
|
|
2848
2871
|
onMove: function(n, i) {
|
|
2849
|
-
return
|
|
2872
|
+
return Ks(J, t, G, r, n, H(n), e, i);
|
|
2850
2873
|
},
|
|
2851
2874
|
changed: v
|
|
2852
2875
|
}, s));
|
|
@@ -2855,50 +2878,50 @@ Q.prototype = {
|
|
|
2855
2878
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2856
2879
|
}
|
|
2857
2880
|
function _(r) {
|
|
2858
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2881
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (B(G, X ? X.options.ghostClass : c.options.ghostClass, !1), B(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() {
|
|
2859
2882
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2860
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (
|
|
2883
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (ws = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[Zo]._isOutsideThisEl(e.target), !r && Us(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2861
2884
|
}
|
|
2862
2885
|
function v() {
|
|
2863
|
-
|
|
2886
|
+
us = zo(G), fs = zo(G, o.draggable), W({
|
|
2864
2887
|
sortable: p,
|
|
2865
2888
|
name: "change",
|
|
2866
2889
|
toEl: t,
|
|
2867
|
-
newIndex:
|
|
2868
|
-
newDraggableIndex:
|
|
2890
|
+
newIndex: us,
|
|
2891
|
+
newDraggableIndex: fs,
|
|
2869
2892
|
originalEvent: e
|
|
2870
2893
|
});
|
|
2871
2894
|
}
|
|
2872
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2895
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = jo(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2873
2896
|
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2874
|
-
if (
|
|
2875
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
2876
|
-
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2877
|
-
var y =
|
|
2878
|
-
if (!y ||
|
|
2897
|
+
if (hs = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = ps.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
2898
|
+
if (f = this._getDirection(e, n) === "vertical", r = H(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2899
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (os ? J.insertBefore(G, os) : J.appendChild(G)), _(!0);
|
|
2900
|
+
var y = Ro(t, o.draggable);
|
|
2901
|
+
if (!y || Xs(e, f, this) && !y.animated) {
|
|
2879
2902
|
if (y === G) return _(!1);
|
|
2880
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2881
|
-
} else if (y &&
|
|
2882
|
-
var b =
|
|
2903
|
+
if (y && t === e.target && (n = y), n && (i = H(n)), Ks(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);
|
|
2904
|
+
} else if (y && Ys(e, f, this)) {
|
|
2905
|
+
var b = Lo(t, 0, o, !0);
|
|
2883
2906
|
if (b === G) return _(!1);
|
|
2884
|
-
if (n = b, i =
|
|
2907
|
+
if (n = b, i = H(n), Ks(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
2885
2908
|
} else if (n.parentNode === t) {
|
|
2886
|
-
i =
|
|
2887
|
-
var x = 0, S, C = G.parentNode !== t, w = !
|
|
2888
|
-
|
|
2909
|
+
i = H(n);
|
|
2910
|
+
var x = 0, S, C = G.parentNode !== t, w = !Rs(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Io(n, "top", "top") || Io(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
2911
|
+
ws !== n && (S = i[T], Es = !1, Ds = !w && o.invertSwap || C), x = Zs(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Ds, ws === n);
|
|
2889
2912
|
var O;
|
|
2890
2913
|
if (x !== 0) {
|
|
2891
|
-
var k =
|
|
2914
|
+
var k = zo(G);
|
|
2892
2915
|
do
|
|
2893
2916
|
k -= x, O = K.children[k];
|
|
2894
|
-
while (O && (
|
|
2917
|
+
while (O && (V(O, "display") === "none" || O === q));
|
|
2895
2918
|
}
|
|
2896
2919
|
if (x === 0 || O === n) return _(!1);
|
|
2897
|
-
|
|
2920
|
+
ws = n, Ts = x;
|
|
2898
2921
|
var A = n.nextElementSibling, j = !1;
|
|
2899
2922
|
j = x === 1;
|
|
2900
|
-
var M =
|
|
2901
|
-
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1),
|
|
2923
|
+
var M = Ks(J, t, G, r, n, i, e, j);
|
|
2924
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), As = !0, setTimeout(Js, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Jo(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !Ds && (Os = Math.abs(S - H(n)[T])), v(), _(!0);
|
|
2902
2925
|
}
|
|
2903
2926
|
if (t.contains(G)) return _(!1);
|
|
2904
2927
|
}
|
|
@@ -2906,22 +2929,22 @@ Q.prototype = {
|
|
|
2906
2929
|
},
|
|
2907
2930
|
_ignoreWhileAnimating: null,
|
|
2908
2931
|
_offMoveEvents: function() {
|
|
2909
|
-
|
|
2932
|
+
z(document, "mousemove", this._onTouchMove), z(document, "touchmove", this._onTouchMove), z(document, "pointermove", this._onTouchMove), z(document, "dragover", Us), z(document, "mousemove", Us), z(document, "touchmove", Us);
|
|
2910
2933
|
},
|
|
2911
2934
|
_offUpEvents: function() {
|
|
2912
2935
|
var e = this.el.ownerDocument;
|
|
2913
|
-
|
|
2936
|
+
z(e, "mouseup", this._onDrop), z(e, "touchend", this._onDrop), z(e, "pointerup", this._onDrop), z(e, "touchcancel", this._onDrop), z(document, "selectstart", this);
|
|
2914
2937
|
},
|
|
2915
2938
|
_onDrop: function(e) {
|
|
2916
2939
|
var t = this.el, n = this.options;
|
|
2917
|
-
|
|
2940
|
+
us = zo(G), fs = zo(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, us = zo(G), fs = zo(G, n.draggable), Q.eventCanceled || (ms = !1, Ds = !1, Es = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), nc(this.cloneId), nc(this._dragStartId), this.nativeDraggable && (z(document, "drop", this), z(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), To && V(document.body, "user-select", ""), V(G, "transform", ""), e && (Cs && (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 && z(G, "dragend", this), qs(G), G.style["will-change"] = "", Cs && !ms && B(G, X ? X.options.ghostClass : this.options.ghostClass, !1), B(G, this.options.chosenClass, !1), W({
|
|
2918
2941
|
sortable: this,
|
|
2919
2942
|
name: "unchoose",
|
|
2920
2943
|
toEl: K,
|
|
2921
2944
|
newIndex: null,
|
|
2922
2945
|
newDraggableIndex: null,
|
|
2923
2946
|
originalEvent: e
|
|
2924
|
-
}), J === K ?
|
|
2947
|
+
}), J === K ? us !== ls && us >= 0 && (W({
|
|
2925
2948
|
sortable: this,
|
|
2926
2949
|
name: "update",
|
|
2927
2950
|
toEl: K,
|
|
@@ -2931,7 +2954,7 @@ Q.prototype = {
|
|
|
2931
2954
|
name: "sort",
|
|
2932
2955
|
toEl: K,
|
|
2933
2956
|
originalEvent: e
|
|
2934
|
-
})) : (
|
|
2957
|
+
})) : (us >= 0 && (W({
|
|
2935
2958
|
rootEl: K,
|
|
2936
2959
|
name: "add",
|
|
2937
2960
|
toEl: K,
|
|
@@ -2953,7 +2976,7 @@ Q.prototype = {
|
|
|
2953
2976
|
name: "sort",
|
|
2954
2977
|
toEl: K,
|
|
2955
2978
|
originalEvent: e
|
|
2956
|
-
})), X && X.save()), Q.active && ((
|
|
2979
|
+
})), X && X.save()), Q.active && ((us == null || us === -1) && (us = ls, fs = ds), W({
|
|
2957
2980
|
sortable: this,
|
|
2958
2981
|
name: "end",
|
|
2959
2982
|
toEl: K,
|
|
@@ -2961,9 +2984,9 @@ Q.prototype = {
|
|
|
2961
2984
|
}), this.save())))), this._nulling();
|
|
2962
2985
|
},
|
|
2963
2986
|
_nulling: function() {
|
|
2964
|
-
U("nulling", this), J = G = K = q =
|
|
2987
|
+
U("nulling", this), J = G = K = q = os = Y = ss = cs = _s = vs = Cs = us = fs = ls = ds = ws = Ts = X = ps = Q.dragged = Q.ghost = Q.clone = Q.active = null, js.forEach(function(e) {
|
|
2965
2988
|
e.checked = !0;
|
|
2966
|
-
}),
|
|
2989
|
+
}), js.length = ys = bs = 0;
|
|
2967
2990
|
},
|
|
2968
2991
|
handleEvent: function(e) {
|
|
2969
2992
|
switch (e.type) {
|
|
@@ -2973,20 +2996,20 @@ Q.prototype = {
|
|
|
2973
2996
|
break;
|
|
2974
2997
|
case "dragenter":
|
|
2975
2998
|
case "dragover":
|
|
2976
|
-
G && (this._onDragOver(e),
|
|
2999
|
+
G && (this._onDragOver(e), Gs(e));
|
|
2977
3000
|
break;
|
|
2978
3001
|
case "selectstart": e.preventDefault();
|
|
2979
3002
|
}
|
|
2980
3003
|
},
|
|
2981
3004
|
toArray: function() {
|
|
2982
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3005
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], jo(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || $s(t));
|
|
2983
3006
|
return e;
|
|
2984
3007
|
},
|
|
2985
3008
|
sort: function(e, t) {
|
|
2986
3009
|
var n = {}, r = this.el;
|
|
2987
3010
|
this.toArray().forEach(function(e, t) {
|
|
2988
3011
|
var i = r.children[t];
|
|
2989
|
-
|
|
3012
|
+
jo(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2990
3013
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2991
3014
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2992
3015
|
}), t && this.animateAll();
|
|
@@ -2996,122 +3019,122 @@ Q.prototype = {
|
|
|
2996
3019
|
e && e.set && e.set(this);
|
|
2997
3020
|
},
|
|
2998
3021
|
closest: function(e, t) {
|
|
2999
|
-
return
|
|
3022
|
+
return jo(e, t || this.options.draggable, this.el, !1);
|
|
3000
3023
|
},
|
|
3001
3024
|
option: function(e, t) {
|
|
3002
3025
|
var n = this.options;
|
|
3003
3026
|
if (t === void 0) return n[e];
|
|
3004
|
-
var r =
|
|
3005
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3027
|
+
var r = rs.modifyOption(this, e, t);
|
|
3028
|
+
n[e] = r === void 0 ? t : r, e === "group" && Bs(n);
|
|
3006
3029
|
},
|
|
3007
3030
|
destroy: function() {
|
|
3008
3031
|
U("destroy", this);
|
|
3009
3032
|
var e = this.el;
|
|
3010
|
-
e[
|
|
3033
|
+
e[Zo] = null, z(e, "mousedown", this._onTapStart), z(e, "touchstart", this._onTapStart), z(e, "pointerdown", this._onTapStart), this.nativeDraggable && (z(e, "dragover", this), z(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3011
3034
|
e.removeAttribute("draggable");
|
|
3012
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3035
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), gs.splice(gs.indexOf(this.el), 1), this.el = e = null;
|
|
3013
3036
|
},
|
|
3014
3037
|
_hideClone: function() {
|
|
3015
|
-
if (!
|
|
3038
|
+
if (!cs) {
|
|
3016
3039
|
if (U("hideClone", this), Q.eventCanceled) return;
|
|
3017
|
-
|
|
3040
|
+
V(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), cs = !0;
|
|
3018
3041
|
}
|
|
3019
3042
|
},
|
|
3020
3043
|
_showClone: function(e) {
|
|
3021
3044
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3022
|
-
else if (
|
|
3045
|
+
else if (cs) {
|
|
3023
3046
|
if (U("showClone", this), Q.eventCanceled) return;
|
|
3024
|
-
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) :
|
|
3047
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : os ? J.insertBefore(Y, os) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), V(Y, "display", ""), cs = !1;
|
|
3025
3048
|
}
|
|
3026
3049
|
}
|
|
3027
3050
|
};
|
|
3028
|
-
function
|
|
3051
|
+
function Gs(e) {
|
|
3029
3052
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3030
3053
|
}
|
|
3031
|
-
function
|
|
3032
|
-
var c, l = e[
|
|
3033
|
-
return window.CustomEvent && !
|
|
3054
|
+
function Ks(e, t, n, r, i, a, o, s) {
|
|
3055
|
+
var c, l = e[Zo], u = l.options.onMove, d;
|
|
3056
|
+
return window.CustomEvent && !So && !Co ? c = new CustomEvent("move", {
|
|
3034
3057
|
bubbles: !0,
|
|
3035
3058
|
cancelable: !0
|
|
3036
|
-
}) : (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 ||
|
|
3059
|
+
}) : (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;
|
|
3037
3060
|
}
|
|
3038
|
-
function
|
|
3061
|
+
function qs(e) {
|
|
3039
3062
|
e.draggable = !1;
|
|
3040
3063
|
}
|
|
3041
|
-
function
|
|
3042
|
-
|
|
3064
|
+
function Js() {
|
|
3065
|
+
As = !1;
|
|
3043
3066
|
}
|
|
3044
|
-
function
|
|
3045
|
-
var r =
|
|
3067
|
+
function Ys(e, t, n) {
|
|
3068
|
+
var r = H(Lo(n.el, 0, n.options, !0)), i = Xo(n.el, n.options, q), a = 10;
|
|
3046
3069
|
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;
|
|
3047
3070
|
}
|
|
3048
|
-
function
|
|
3049
|
-
var r =
|
|
3071
|
+
function Xs(e, t, n) {
|
|
3072
|
+
var r = H(Ro(n.el, n.options.draggable)), i = Xo(n.el, n.options, q), a = 10;
|
|
3050
3073
|
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;
|
|
3051
3074
|
}
|
|
3052
|
-
function
|
|
3075
|
+
function Zs(e, t, n, r, i, a, o, s) {
|
|
3053
3076
|
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;
|
|
3054
3077
|
if (!o) {
|
|
3055
|
-
if (s &&
|
|
3056
|
-
if (!
|
|
3057
|
-
else if (
|
|
3058
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3078
|
+
if (s && Os < l * i) {
|
|
3079
|
+
if (!Es && (Ts === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Es = !0), Es) f = !0;
|
|
3080
|
+
else if (Ts === 1 ? c < u + Os : c > d - Os) return -Ts;
|
|
3081
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Qs(t);
|
|
3059
3082
|
}
|
|
3060
3083
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3061
3084
|
}
|
|
3062
|
-
function
|
|
3063
|
-
return
|
|
3085
|
+
function Qs(e) {
|
|
3086
|
+
return zo(G) < zo(e) ? 1 : -1;
|
|
3064
3087
|
}
|
|
3065
|
-
function
|
|
3088
|
+
function $s(e) {
|
|
3066
3089
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3067
3090
|
return r.toString(36);
|
|
3068
3091
|
}
|
|
3069
|
-
function
|
|
3070
|
-
|
|
3092
|
+
function ec(e) {
|
|
3093
|
+
js.length = 0;
|
|
3071
3094
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3072
3095
|
var r = t[n];
|
|
3073
|
-
r.checked &&
|
|
3096
|
+
r.checked && js.push(r);
|
|
3074
3097
|
}
|
|
3075
3098
|
}
|
|
3076
|
-
function
|
|
3099
|
+
function tc(e) {
|
|
3077
3100
|
return setTimeout(e, 0);
|
|
3078
3101
|
}
|
|
3079
|
-
function
|
|
3102
|
+
function nc(e) {
|
|
3080
3103
|
return clearTimeout(e);
|
|
3081
3104
|
}
|
|
3082
|
-
|
|
3083
|
-
(Q.active ||
|
|
3105
|
+
Ms && R(document, "touchmove", function(e) {
|
|
3106
|
+
(Q.active || ms) && e.cancelable && e.preventDefault();
|
|
3084
3107
|
}), Q.utils = {
|
|
3085
|
-
on:
|
|
3086
|
-
off:
|
|
3087
|
-
css:
|
|
3088
|
-
find:
|
|
3108
|
+
on: R,
|
|
3109
|
+
off: z,
|
|
3110
|
+
css: V,
|
|
3111
|
+
find: Po,
|
|
3089
3112
|
is: function(e, t) {
|
|
3090
|
-
return !!
|
|
3091
|
-
},
|
|
3092
|
-
extend:
|
|
3093
|
-
throttle:
|
|
3094
|
-
closest:
|
|
3095
|
-
toggleClass:
|
|
3096
|
-
clone:
|
|
3097
|
-
index:
|
|
3098
|
-
nextTick:
|
|
3099
|
-
cancelNextTick:
|
|
3100
|
-
detectDirection:
|
|
3101
|
-
getChild:
|
|
3113
|
+
return !!jo(e, t, e, !1);
|
|
3114
|
+
},
|
|
3115
|
+
extend: Uo,
|
|
3116
|
+
throttle: Ko,
|
|
3117
|
+
closest: jo,
|
|
3118
|
+
toggleClass: B,
|
|
3119
|
+
clone: Yo,
|
|
3120
|
+
index: zo,
|
|
3121
|
+
nextTick: tc,
|
|
3122
|
+
cancelNextTick: nc,
|
|
3123
|
+
detectDirection: Ls,
|
|
3124
|
+
getChild: Lo
|
|
3102
3125
|
}, Q.get = function(e) {
|
|
3103
|
-
return e[
|
|
3126
|
+
return e[Zo];
|
|
3104
3127
|
}, Q.mount = function() {
|
|
3105
3128
|
var e = [...arguments];
|
|
3106
3129
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3107
3130
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3108
|
-
e.utils && (Q.utils =
|
|
3131
|
+
e.utils && (Q.utils = mo(mo({}, Q.utils), e.utils)), rs.mount(e);
|
|
3109
3132
|
});
|
|
3110
3133
|
}, Q.create = function(e, t) {
|
|
3111
3134
|
return new Q(e, t);
|
|
3112
|
-
}, Q.version =
|
|
3113
|
-
var $ = [],
|
|
3114
|
-
function
|
|
3135
|
+
}, Q.version = bo;
|
|
3136
|
+
var $ = [], rc, ic, ac = !1, oc, sc, cc, lc;
|
|
3137
|
+
function uc() {
|
|
3115
3138
|
function e() {
|
|
3116
3139
|
for (var e in this.defaults = {
|
|
3117
3140
|
scroll: !0,
|
|
@@ -3124,70 +3147,70 @@ function cc() {
|
|
|
3124
3147
|
return e.prototype = {
|
|
3125
3148
|
dragStarted: function(e) {
|
|
3126
3149
|
var t = e.originalEvent;
|
|
3127
|
-
this.sortable.nativeDraggable ?
|
|
3150
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? R(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? R(document, "touchmove", this._handleFallbackAutoScroll) : R(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3128
3151
|
},
|
|
3129
3152
|
dragOverCompleted: function(e) {
|
|
3130
3153
|
var t = e.originalEvent;
|
|
3131
3154
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3132
3155
|
},
|
|
3133
3156
|
drop: function() {
|
|
3134
|
-
this.sortable.nativeDraggable ?
|
|
3157
|
+
this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : (z(document, "pointermove", this._handleFallbackAutoScroll), z(document, "touchmove", this._handleFallbackAutoScroll), z(document, "mousemove", this._handleFallbackAutoScroll)), fc(), dc(), qo();
|
|
3135
3158
|
},
|
|
3136
3159
|
nulling: function() {
|
|
3137
|
-
|
|
3160
|
+
cc = ic = rc = ac = lc = oc = sc = null, $.length = 0;
|
|
3138
3161
|
},
|
|
3139
3162
|
_handleFallbackAutoScroll: function(e) {
|
|
3140
3163
|
this._handleAutoScroll(e, !0);
|
|
3141
3164
|
},
|
|
3142
3165
|
_handleAutoScroll: function(e, t) {
|
|
3143
3166
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3144
|
-
if (
|
|
3145
|
-
|
|
3146
|
-
var o =
|
|
3147
|
-
|
|
3148
|
-
var a =
|
|
3149
|
-
a !== o && (o = a,
|
|
3150
|
-
}, 10),
|
|
3167
|
+
if (cc = e, t || this.options.forceAutoScrollFallback || Co || So || To) {
|
|
3168
|
+
pc(e, this.options, a, t);
|
|
3169
|
+
var o = Ho(a, !0);
|
|
3170
|
+
ac && (!lc || r !== oc || i !== sc) && (lc && fc(), lc = setInterval(function() {
|
|
3171
|
+
var a = Ho(document.elementFromPoint(r, i), !0);
|
|
3172
|
+
a !== o && (o = a, dc()), pc(e, n.options, a, t);
|
|
3173
|
+
}, 10), oc = r, sc = i);
|
|
3151
3174
|
} else {
|
|
3152
|
-
if (!this.options.bubbleScroll ||
|
|
3153
|
-
|
|
3175
|
+
if (!this.options.bubbleScroll || Ho(a, !0) === Fo()) {
|
|
3176
|
+
dc();
|
|
3154
3177
|
return;
|
|
3155
3178
|
}
|
|
3156
|
-
|
|
3179
|
+
pc(e, this.options, Ho(a, !1), !1);
|
|
3157
3180
|
}
|
|
3158
3181
|
}
|
|
3159
|
-
},
|
|
3182
|
+
}, _o(e, {
|
|
3160
3183
|
pluginName: "scroll",
|
|
3161
3184
|
initializeByDefault: !0
|
|
3162
3185
|
});
|
|
3163
3186
|
}
|
|
3164
|
-
function
|
|
3187
|
+
function dc() {
|
|
3165
3188
|
$.forEach(function(e) {
|
|
3166
3189
|
clearInterval(e.pid);
|
|
3167
3190
|
}), $ = [];
|
|
3168
3191
|
}
|
|
3169
|
-
function
|
|
3170
|
-
clearInterval(
|
|
3192
|
+
function fc() {
|
|
3193
|
+
clearInterval(lc);
|
|
3171
3194
|
}
|
|
3172
|
-
var
|
|
3195
|
+
var pc = Ko(function(e, t, n, r) {
|
|
3173
3196
|
if (t.scroll) {
|
|
3174
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3175
|
-
|
|
3176
|
-
var d = 0, f =
|
|
3197
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Fo(), l = !1, u;
|
|
3198
|
+
ic !== n && (ic = n, dc(), rc = t.scroll, u = t.scrollFn, rc === !0 && (rc = Ho(n, !0)));
|
|
3199
|
+
var d = 0, f = rc;
|
|
3177
3200
|
do {
|
|
3178
|
-
var p = f, m =
|
|
3201
|
+
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;
|
|
3179
3202
|
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"));
|
|
3180
3203
|
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);
|
|
3181
3204
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3182
3205
|
($[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() {
|
|
3183
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3206
|
+
r && this.layer === 0 && Q.active._onTouchMove(cc);
|
|
3184
3207
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3185
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3208
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[Zo], n, t, e, cc, $[this.layer].el) !== "continue" || Jo($[this.layer].el, n, t);
|
|
3186
3209
|
}.bind({ layer: d }), 24))), d++;
|
|
3187
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3188
|
-
|
|
3210
|
+
} while (t.bubbleScroll && f !== c && (f = Ho(f, !1)));
|
|
3211
|
+
ac = l;
|
|
3189
3212
|
}
|
|
3190
|
-
}, 30),
|
|
3213
|
+
}, 30), mc = function(e) {
|
|
3191
3214
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3192
3215
|
if (t) {
|
|
3193
3216
|
var c = n || i;
|
|
@@ -3199,8 +3222,8 @@ var dc = Go(function(e, t, n, r) {
|
|
|
3199
3222
|
}));
|
|
3200
3223
|
}
|
|
3201
3224
|
};
|
|
3202
|
-
function
|
|
3203
|
-
|
|
3225
|
+
function hc() {}
|
|
3226
|
+
hc.prototype = {
|
|
3204
3227
|
startIndex: null,
|
|
3205
3228
|
dragStart: function(e) {
|
|
3206
3229
|
var t = e.oldDraggableIndex;
|
|
@@ -3209,67 +3232,67 @@ pc.prototype = {
|
|
|
3209
3232
|
onSpill: function(e) {
|
|
3210
3233
|
var t = e.dragEl, n = e.putSortable;
|
|
3211
3234
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3212
|
-
var r =
|
|
3235
|
+
var r = Lo(this.sortable.el, this.startIndex, this.options);
|
|
3213
3236
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3214
3237
|
},
|
|
3215
|
-
drop:
|
|
3216
|
-
},
|
|
3217
|
-
function
|
|
3218
|
-
|
|
3238
|
+
drop: mc
|
|
3239
|
+
}, _o(hc, { pluginName: "revertOnSpill" });
|
|
3240
|
+
function gc() {}
|
|
3241
|
+
gc.prototype = {
|
|
3219
3242
|
onSpill: function(e) {
|
|
3220
3243
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3221
3244
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3222
3245
|
},
|
|
3223
|
-
drop:
|
|
3224
|
-
},
|
|
3225
|
-
function
|
|
3246
|
+
drop: mc
|
|
3247
|
+
}, _o(gc, { pluginName: "removeOnSpill" }), Q.mount(new uc()), Q.mount(gc, hc);
|
|
3248
|
+
function _c(e) {
|
|
3226
3249
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3227
3250
|
}
|
|
3228
|
-
function
|
|
3229
|
-
|
|
3251
|
+
function vc(e) {
|
|
3252
|
+
ee() && O(e);
|
|
3230
3253
|
}
|
|
3231
|
-
function
|
|
3232
|
-
|
|
3254
|
+
function yc(e) {
|
|
3255
|
+
ee() ? d(e) : a(e);
|
|
3233
3256
|
}
|
|
3234
|
-
var
|
|
3235
|
-
function
|
|
3236
|
-
|
|
3257
|
+
var bc = null, xc = null;
|
|
3258
|
+
function Sc(e = null, t = null) {
|
|
3259
|
+
bc = e, xc = t;
|
|
3237
3260
|
}
|
|
3238
|
-
function
|
|
3261
|
+
function Cc() {
|
|
3239
3262
|
return {
|
|
3240
|
-
data:
|
|
3241
|
-
clonedData:
|
|
3263
|
+
data: bc,
|
|
3264
|
+
clonedData: xc
|
|
3242
3265
|
};
|
|
3243
3266
|
}
|
|
3244
|
-
var
|
|
3245
|
-
function
|
|
3246
|
-
let t =
|
|
3267
|
+
var wc = Symbol("cloneElement");
|
|
3268
|
+
function Tc(...e) {
|
|
3269
|
+
let t = ee()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
3247
3270
|
Array.isArray(y(i)) || (o = i, i = null);
|
|
3248
|
-
let s = null, { immediate: l = !0, clone: u =
|
|
3271
|
+
let s = null, { immediate: l = !0, clone: u = _c, forceFallback: d, fallbackOnBody: p, customUpdate: m } = y(o) ?? {};
|
|
3249
3272
|
function h(e) {
|
|
3250
3273
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3251
3274
|
n = d && !p ? o.slice(0, -1) : o;
|
|
3252
3275
|
let s = y(y(i)?.[r]), c = u(s);
|
|
3253
|
-
|
|
3276
|
+
Sc(s, c), a[wc] = c;
|
|
3254
3277
|
}
|
|
3255
3278
|
function g(e) {
|
|
3256
|
-
let t = e.item[
|
|
3257
|
-
if (!
|
|
3258
|
-
if (
|
|
3279
|
+
let t = e.item[wc];
|
|
3280
|
+
if (!to(t)) {
|
|
3281
|
+
if (io(e.item), c(i)) {
|
|
3259
3282
|
let n = [...y(i)];
|
|
3260
|
-
i.value =
|
|
3283
|
+
i.value = eo(n, e.newDraggableIndex, t);
|
|
3261
3284
|
return;
|
|
3262
3285
|
}
|
|
3263
|
-
|
|
3286
|
+
eo(y(i), e.newDraggableIndex, t);
|
|
3264
3287
|
}
|
|
3265
3288
|
}
|
|
3266
3289
|
function _(e) {
|
|
3267
3290
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3268
|
-
if (
|
|
3291
|
+
if (ro(t, n, r), o === "clone") io(s);
|
|
3269
3292
|
else if (c(i)) {
|
|
3270
3293
|
let e = [...y(i)];
|
|
3271
|
-
i.value =
|
|
3272
|
-
} else
|
|
3294
|
+
i.value = $a(e, a);
|
|
3295
|
+
} else $a(y(i), a);
|
|
3273
3296
|
}
|
|
3274
3297
|
function v(e) {
|
|
3275
3298
|
if (m) {
|
|
@@ -3277,10 +3300,10 @@ function Cc(...e) {
|
|
|
3277
3300
|
return;
|
|
3278
3301
|
}
|
|
3279
3302
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3280
|
-
if (
|
|
3303
|
+
if (io(n), ro(t, n, r), c(i)) {
|
|
3281
3304
|
let e = [...y(i)];
|
|
3282
|
-
i.value =
|
|
3283
|
-
} else
|
|
3305
|
+
i.value = Xa(e, a, o);
|
|
3306
|
+
} else Xa(y(i), a, o);
|
|
3284
3307
|
}
|
|
3285
3308
|
function b(e) {
|
|
3286
3309
|
let { newIndex: t, oldIndex: r, from: i, to: o } = e, s = null, c = t === r && i === o;
|
|
@@ -3299,7 +3322,7 @@ function Cc(...e) {
|
|
|
3299
3322
|
n = null;
|
|
3300
3323
|
}
|
|
3301
3324
|
a(() => {
|
|
3302
|
-
if (
|
|
3325
|
+
if (Sc(), s) throw s;
|
|
3303
3326
|
});
|
|
3304
3327
|
}
|
|
3305
3328
|
let x = {
|
|
@@ -3311,19 +3334,19 @@ function Cc(...e) {
|
|
|
3311
3334
|
};
|
|
3312
3335
|
function S(e) {
|
|
3313
3336
|
let n = y(r);
|
|
3314
|
-
return e ||=
|
|
3337
|
+
return e ||= no(n) ? ao(n, t?.$el) : n, e && !co(e) && (e = e.$el), e || Ya("Root element not found"), e;
|
|
3315
3338
|
}
|
|
3316
3339
|
function C() {
|
|
3317
|
-
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3318
|
-
return
|
|
3319
|
-
|
|
3320
|
-
}),
|
|
3340
|
+
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r = Ka(e, ["immediate", "clone"]);
|
|
3341
|
+
return lo(r, (e, t) => {
|
|
3342
|
+
uo(e) && (r[e] = (e, ...n) => (fo(e, Cc()), t(e, ...n)));
|
|
3343
|
+
}), so(i === null ? {} : x, r);
|
|
3321
3344
|
}
|
|
3322
3345
|
let w = (e) => {
|
|
3323
3346
|
e = S(e), s && T.destroy(), s = new Q(e, C());
|
|
3324
3347
|
};
|
|
3325
3348
|
f(() => o, () => {
|
|
3326
|
-
s &&
|
|
3349
|
+
s && lo(C(), (e, t) => {
|
|
3327
3350
|
s?.option(e, t);
|
|
3328
3351
|
});
|
|
3329
3352
|
}, { deep: !0 });
|
|
@@ -3336,15 +3359,15 @@ function Cc(...e) {
|
|
|
3336
3359
|
toArray: () => s?.toArray(),
|
|
3337
3360
|
closest: (...e) => s?.closest(...e)
|
|
3338
3361
|
};
|
|
3339
|
-
return
|
|
3362
|
+
return yc(() => {
|
|
3340
3363
|
l && w();
|
|
3341
|
-
}),
|
|
3364
|
+
}), vc(T.destroy), Ga({
|
|
3342
3365
|
start: w,
|
|
3343
3366
|
pause: () => T?.option("disabled", !0),
|
|
3344
3367
|
resume: () => T?.option("disabled", !1)
|
|
3345
3368
|
}, T);
|
|
3346
3369
|
}
|
|
3347
|
-
var
|
|
3370
|
+
var Ec = [
|
|
3348
3371
|
"update",
|
|
3349
3372
|
"start",
|
|
3350
3373
|
"add",
|
|
@@ -3357,7 +3380,7 @@ var wc = [
|
|
|
3357
3380
|
"clone",
|
|
3358
3381
|
"move",
|
|
3359
3382
|
"change"
|
|
3360
|
-
],
|
|
3383
|
+
], Dc = [
|
|
3361
3384
|
"clone",
|
|
3362
3385
|
"animation",
|
|
3363
3386
|
"ghostClass",
|
|
@@ -3401,47 +3424,47 @@ var wc = [
|
|
|
3401
3424
|
"tag",
|
|
3402
3425
|
"target",
|
|
3403
3426
|
"customUpdate",
|
|
3404
|
-
...
|
|
3405
|
-
],
|
|
3427
|
+
...Ec.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3428
|
+
], Oc = I({
|
|
3406
3429
|
name: "VueDraggable",
|
|
3407
3430
|
model: {
|
|
3408
3431
|
prop: "modelValue",
|
|
3409
3432
|
event: "update:modelValue"
|
|
3410
3433
|
},
|
|
3411
|
-
props:
|
|
3412
|
-
emits: ["update:modelValue", ...
|
|
3434
|
+
props: Dc,
|
|
3435
|
+
emits: ["update:modelValue", ...Ec],
|
|
3413
3436
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3414
|
-
let a =
|
|
3437
|
+
let a = Ec.reduce((e, t) => {
|
|
3415
3438
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3416
3439
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3417
|
-
}, {}), o =
|
|
3418
|
-
let t = j(e), { modelValue: n } = t, r =
|
|
3440
|
+
}, {}), o = P(() => {
|
|
3441
|
+
let t = j(e), { modelValue: n } = t, r = Ka(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3419
3442
|
let r = y(n);
|
|
3420
3443
|
return r !== void 0 && (e[t] = r), e;
|
|
3421
3444
|
}, {});
|
|
3422
|
-
return
|
|
3423
|
-
}), s =
|
|
3445
|
+
return Ga(Ga({}, a), Qa(Ga(Ga({}, i), o)));
|
|
3446
|
+
}), s = P({
|
|
3424
3447
|
get: () => e.modelValue,
|
|
3425
3448
|
set: (e) => n("update:modelValue", e)
|
|
3426
|
-
}), c = _(), l = g(
|
|
3449
|
+
}), c = _(), l = g(Tc(e.target || c, s, o));
|
|
3427
3450
|
return r(l), () => b(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3428
3451
|
}
|
|
3429
|
-
}),
|
|
3452
|
+
}), kc = {
|
|
3430
3453
|
mounted: "mounted",
|
|
3431
3454
|
unmounted: "unmounted"
|
|
3432
3455
|
};
|
|
3433
|
-
|
|
3456
|
+
kc.mounted, kc.unmounted;
|
|
3434
3457
|
//#endregion
|
|
3435
3458
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3436
|
-
var
|
|
3459
|
+
var Ac = { class: "tpl:relative tpl:w-full" }, jc = {
|
|
3437
3460
|
key: 0,
|
|
3438
3461
|
"data-testid": "hero-image-hint",
|
|
3439
3462
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3440
|
-
},
|
|
3463
|
+
}, Mc = {
|
|
3441
3464
|
key: 0,
|
|
3442
3465
|
"data-testid": "section-drop-hint",
|
|
3443
3466
|
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)]"
|
|
3444
|
-
},
|
|
3467
|
+
}, Nc = /* @__PURE__ */ I({
|
|
3445
3468
|
__name: "SectionBlock",
|
|
3446
3469
|
props: {
|
|
3447
3470
|
block: {},
|
|
@@ -3449,18 +3472,18 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3449
3472
|
},
|
|
3450
3473
|
setup(e) {
|
|
3451
3474
|
let i = {
|
|
3452
|
-
title:
|
|
3475
|
+
title: Ma,
|
|
3453
3476
|
paragraph: ga,
|
|
3454
3477
|
image: ra,
|
|
3455
3478
|
button: ni,
|
|
3456
3479
|
divider: zi,
|
|
3457
3480
|
custom: Li
|
|
3458
|
-
}, a = e, { t: s } =
|
|
3481
|
+
}, a = e, { t: s } = Dn(), c = Mt(un, "SectionBlock"), u = p(ln, null), d = p(xn, null), f = p(mn, {}), h = p(bn, null);
|
|
3459
3482
|
function g(e) {
|
|
3460
3483
|
let t = f.savedBlocks;
|
|
3461
3484
|
t?.isPicking.value ? t.togglePick(a.block.id) : c.selectBlock(e);
|
|
3462
3485
|
}
|
|
3463
|
-
let v =
|
|
3486
|
+
let v = P(() => {
|
|
3464
3487
|
switch (a.block.columns) {
|
|
3465
3488
|
case "2": return ["50%", "50%"];
|
|
3466
3489
|
case "3": return [
|
|
@@ -3472,11 +3495,11 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3472
3495
|
case "2-1": return ["66.67%", "33.33%"];
|
|
3473
3496
|
default: return ["100%"];
|
|
3474
3497
|
}
|
|
3475
|
-
}), b =
|
|
3498
|
+
}), b = P(() => {
|
|
3476
3499
|
let e = v.value.length, t = [...a.block.children];
|
|
3477
3500
|
for (; t.length < e;) t.push([]);
|
|
3478
3501
|
return t.slice(0, e);
|
|
3479
|
-
}), w =
|
|
3502
|
+
}), w = P(() => a.viewport === "mobile" && a.block.stackOnMobile !== !1);
|
|
3480
3503
|
function T(e) {
|
|
3481
3504
|
return b.value[e] || [];
|
|
3482
3505
|
}
|
|
@@ -3487,44 +3510,44 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3487
3510
|
return !T(e).some((e) => E(e.id));
|
|
3488
3511
|
}
|
|
3489
3512
|
let j = _(null);
|
|
3490
|
-
function
|
|
3513
|
+
function N(e) {
|
|
3491
3514
|
return c.state.previewMode ? !1 : O(e) ? !0 : j.value === e && T(e).filter((e) => E(e.id)).length <= 1;
|
|
3492
3515
|
}
|
|
3493
|
-
let
|
|
3516
|
+
let I = P(() => {
|
|
3494
3517
|
if (c.state.previewMode) return !1;
|
|
3495
|
-
let e =
|
|
3518
|
+
let e = je(a.block);
|
|
3496
3519
|
return e !== null && !e.applied && e.reason === "image";
|
|
3497
3520
|
});
|
|
3498
|
-
function
|
|
3521
|
+
function ee(e) {
|
|
3499
3522
|
return T(e).length === 0 && !c.state.previewMode;
|
|
3500
3523
|
}
|
|
3501
|
-
function
|
|
3524
|
+
function L(e) {
|
|
3502
3525
|
return T(e).length === 0 && c.state.previewMode;
|
|
3503
3526
|
}
|
|
3504
|
-
function
|
|
3527
|
+
function ne(e, t) {
|
|
3505
3528
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
|
|
3506
3529
|
for (; r.length <= e;) r.push([]);
|
|
3507
3530
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
3508
3531
|
}
|
|
3509
|
-
function
|
|
3532
|
+
function re(e) {
|
|
3510
3533
|
return Br(e, d, i);
|
|
3511
3534
|
}
|
|
3512
|
-
function
|
|
3535
|
+
function ie(e, t) {
|
|
3513
3536
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
3514
3537
|
fieldValues: t.fieldValues,
|
|
3515
3538
|
dataSourceFetched: t.dataSourceFetched
|
|
3516
3539
|
});
|
|
3517
3540
|
}
|
|
3518
|
-
return (i, a) => (t(), S("div",
|
|
3541
|
+
return (i, a) => (t(), S("div", Ac, [I.value ? (t(), S("div", jc, [x("span", null, D(y(s).section.heroAddImage), 1)])) : F("", !0), x("div", { class: k(["tpl:flex tpl:gap-0", { "tpl:flex-col": w.value }]) }, [(t(!0), S(M, null, l(b.value, (i, u) => (t(), S("div", {
|
|
3519
3542
|
key: u,
|
|
3520
|
-
class: k(["tpl:relative tpl:flex tpl:flex-col tpl:rounded",
|
|
3543
|
+
class: k(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", ee(u) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3521
3544
|
style: n({ width: w.value ? "100%" : v.value[u] })
|
|
3522
|
-
}, [C(y(
|
|
3545
|
+
}, [C(y(Oc), {
|
|
3523
3546
|
"model-value": T(u),
|
|
3524
3547
|
group: {
|
|
3525
3548
|
name: "blocks",
|
|
3526
3549
|
pull: !0,
|
|
3527
|
-
put: (e, t, n) => y(
|
|
3550
|
+
put: (e, t, n) => y(za)(n)
|
|
3528
3551
|
},
|
|
3529
3552
|
animation: 150,
|
|
3530
3553
|
"ghost-class": "tpl-ghost",
|
|
@@ -3535,14 +3558,14 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3535
3558
|
"empty-insert-threshold": 20,
|
|
3536
3559
|
"force-fallback": !0,
|
|
3537
3560
|
class: k(["tpl:grow", {
|
|
3538
|
-
"tpl:min-h-[60px]":
|
|
3539
|
-
"tpl:min-h-[34px]":
|
|
3561
|
+
"tpl:min-h-[60px]": N(u),
|
|
3562
|
+
"tpl:min-h-[34px]": L(u)
|
|
3540
3563
|
}]),
|
|
3541
3564
|
onStart: (e) => j.value = u,
|
|
3542
3565
|
onEnd: a[0] ||= (e) => j.value = null,
|
|
3543
|
-
"onUpdate:modelValue": (e) =>
|
|
3566
|
+
"onUpdate:modelValue": (e) => ne(u, e)
|
|
3544
3567
|
}, {
|
|
3545
|
-
default: r(() => [(t(!0), S(M, null, l(T(u), (n) => m((t(), S("div", { key: n.id }, [C(
|
|
3568
|
+
default: r(() => [(t(!0), S(M, null, l(T(u), (n) => m((t(), S("div", { key: n.id }, [C(Aa, {
|
|
3546
3569
|
block: n,
|
|
3547
3570
|
"is-selected": y(c).state.selectedBlockId === n.id,
|
|
3548
3571
|
viewport: e.viewport,
|
|
@@ -3550,10 +3573,10 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3550
3573
|
nested: "",
|
|
3551
3574
|
onSelect: (e) => g(n.id)
|
|
3552
3575
|
}, {
|
|
3553
|
-
default: r(() => [(t(), A(o(
|
|
3576
|
+
default: r(() => [(t(), A(o(re(n)), {
|
|
3554
3577
|
block: n,
|
|
3555
3578
|
viewport: e.viewport,
|
|
3556
|
-
onFetchData: (e) =>
|
|
3579
|
+
onFetchData: (e) => ie(n, e),
|
|
3557
3580
|
onUpdate: (e) => y(c).updateBlock(n.id, e)
|
|
3558
3581
|
}, null, 40, [
|
|
3559
3582
|
"block",
|
|
@@ -3568,7 +3591,7 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3568
3591
|
"viewport",
|
|
3569
3592
|
"preview-mode",
|
|
3570
3593
|
"onSelect"
|
|
3571
|
-
])])), [[
|
|
3594
|
+
])])), [[te, E(n.id)]])), 128))]),
|
|
3572
3595
|
_: 2
|
|
3573
3596
|
}, 1032, [
|
|
3574
3597
|
"model-value",
|
|
@@ -3576,14 +3599,14 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3576
3599
|
"class",
|
|
3577
3600
|
"onStart",
|
|
3578
3601
|
"onUpdate:modelValue"
|
|
3579
|
-
]),
|
|
3602
|
+
]), ee(u) ? (t(), S("div", Mc, [x("span", null, D(y(s).section.dropHere), 1)])) : F("", !0)], 6))), 128))], 2)]));
|
|
3580
3603
|
}
|
|
3581
|
-
}),
|
|
3604
|
+
}), Pc = ["width", "height"], Fc = [
|
|
3582
3605
|
"d",
|
|
3583
3606
|
"stroke",
|
|
3584
3607
|
"stroke-opacity",
|
|
3585
3608
|
"stroke-width"
|
|
3586
|
-
],
|
|
3609
|
+
], Ic = ["d", "fill"], Lc = /* @__PURE__ */ I({
|
|
3587
3610
|
__name: "SocialIconSvg",
|
|
3588
3611
|
props: {
|
|
3589
3612
|
platform: {},
|
|
@@ -3592,7 +3615,7 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3592
3615
|
iconSize: {}
|
|
3593
3616
|
},
|
|
3594
3617
|
setup(e) {
|
|
3595
|
-
let r = e, i =
|
|
3618
|
+
let r = e, i = P(() => _t[r.platform]), a = P(() => yt[r.iconSize]), o = P(() => we(r.platform, r.iconTone)), s = P(() => et(r.iconStyle, r.iconTone)), c = P(() => {
|
|
3596
3619
|
let e = {
|
|
3597
3620
|
display: "inline-flex",
|
|
3598
3621
|
alignItems: "center",
|
|
@@ -3630,12 +3653,12 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3630
3653
|
};
|
|
3631
3654
|
default: return e;
|
|
3632
3655
|
}
|
|
3633
|
-
}), l =
|
|
3656
|
+
}), l = P(() => Xe(r.iconStyle)), u = P(() => Math.floor(a.value * l.value));
|
|
3634
3657
|
function d(e) {
|
|
3635
3658
|
let t = `${e.width / 2 * a.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), r = `${e.color}${n}`;
|
|
3636
3659
|
return `0 0 0 ${t} ${r}, inset 0 0 0 ${t} ${r}`;
|
|
3637
3660
|
}
|
|
3638
|
-
let f =
|
|
3661
|
+
let f = P(() => r.iconStyle === "outlined" || r.iconStyle === "plain" ? o.value.fill : o.value.onFill);
|
|
3639
3662
|
return (e, r) => (t(), S("span", { style: n(c.value) }, [(t(), S("svg", {
|
|
3640
3663
|
width: u.value,
|
|
3641
3664
|
height: u.value,
|
|
@@ -3651,36 +3674,36 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3651
3674
|
"stroke-opacity": s.value.opacity,
|
|
3652
3675
|
"stroke-width": s.value.width / l.value,
|
|
3653
3676
|
"stroke-linejoin": "round"
|
|
3654
|
-
}, null, 8,
|
|
3677
|
+
}, null, 8, Fc)) : F("", !0), x("path", {
|
|
3655
3678
|
d: i.value.path,
|
|
3656
3679
|
fill: f.value
|
|
3657
|
-
}, null, 8,
|
|
3680
|
+
}, null, 8, Ic)], 8, Pc))], 4));
|
|
3658
3681
|
}
|
|
3659
|
-
}),
|
|
3682
|
+
}), Rc = { class: "tpl:w-full" }, zc = ["href"], Bc = {
|
|
3660
3683
|
key: 1,
|
|
3661
3684
|
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)]"
|
|
3662
|
-
},
|
|
3685
|
+
}, Vc = /* @__PURE__ */ I({
|
|
3663
3686
|
__name: "SocialIconsBlock",
|
|
3664
3687
|
props: {
|
|
3665
3688
|
block: {},
|
|
3666
3689
|
viewport: {}
|
|
3667
3690
|
},
|
|
3668
3691
|
setup(e) {
|
|
3669
|
-
let r = e, { t: i } =
|
|
3692
|
+
let r = e, { t: i } = Dn(), a = P(() => ({
|
|
3670
3693
|
display: "flex",
|
|
3671
3694
|
flexWrap: "wrap",
|
|
3672
3695
|
gap: `${r.block.spacing}px`,
|
|
3673
3696
|
justifyContent: r.block.align === "left" ? "flex-start" : r.block.align === "right" ? "flex-end" : "center"
|
|
3674
|
-
})), o =
|
|
3675
|
-
return (r, s) => (t(), S("div",
|
|
3697
|
+
})), o = P(() => r.block.icons.length > 0);
|
|
3698
|
+
return (r, s) => (t(), S("div", Rc, [o.value ? (t(), S("div", {
|
|
3676
3699
|
key: 0,
|
|
3677
3700
|
style: n(a.value)
|
|
3678
3701
|
}, [(t(!0), S(M, null, l(e.block.icons, (n) => (t(), S("a", {
|
|
3679
3702
|
key: n.id,
|
|
3680
3703
|
href: n.url || "#",
|
|
3681
3704
|
class: "tpl:cursor-default",
|
|
3682
|
-
onClick: s[0] ||=
|
|
3683
|
-
}, [C(
|
|
3705
|
+
onClick: s[0] ||= L(() => {}, ["prevent"])
|
|
3706
|
+
}, [C(Lc, {
|
|
3684
3707
|
platform: n.platform,
|
|
3685
3708
|
"icon-style": e.block.iconStyle,
|
|
3686
3709
|
"icon-tone": e.block.iconTone,
|
|
@@ -3690,44 +3713,44 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3690
3713
|
"icon-style",
|
|
3691
3714
|
"icon-tone",
|
|
3692
3715
|
"icon-size"
|
|
3693
|
-
])], 8,
|
|
3716
|
+
])], 8, zc))), 128))], 4)) : (t(), S("div", Bc, [C(y(dt), { size: 16 }), x("span", null, D(y(i).social.addIcons), 1)]))]));
|
|
3694
3717
|
}
|
|
3695
|
-
}),
|
|
3718
|
+
}), Hc = { class: "tpl:w-full" }, Uc = {
|
|
3696
3719
|
key: 0,
|
|
3697
3720
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3698
3721
|
style: {
|
|
3699
3722
|
"background-color": "var(--tpl-bg-hover)",
|
|
3700
3723
|
color: "var(--tpl-text-dim)"
|
|
3701
3724
|
}
|
|
3702
|
-
},
|
|
3725
|
+
}, Wc = /* @__PURE__ */ I({
|
|
3703
3726
|
__name: "SpacerBlock",
|
|
3704
3727
|
props: {
|
|
3705
3728
|
block: {},
|
|
3706
3729
|
viewport: {}
|
|
3707
3730
|
},
|
|
3708
3731
|
setup(e) {
|
|
3709
|
-
let r = e, i =
|
|
3732
|
+
let r = e, i = Mt(un, "SpacerBlock"), a = P(() => ({
|
|
3710
3733
|
height: `${r.block.height}px`,
|
|
3711
3734
|
minHeight: `${r.block.height}px`,
|
|
3712
3735
|
...i.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3713
3736
|
}));
|
|
3714
|
-
return (r, o) => (t(), S("div",
|
|
3737
|
+
return (r, o) => (t(), S("div", Hc, [x("div", {
|
|
3715
3738
|
style: n(a.value),
|
|
3716
3739
|
class: k(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !y(i).state.previewMode }])
|
|
3717
|
-
}, [y(i).state.previewMode ?
|
|
3740
|
+
}, [y(i).state.previewMode ? F("", !0) : (t(), S("span", Uc, D(e.block.height) + "px ", 1))], 6)]));
|
|
3718
3741
|
}
|
|
3719
|
-
}),
|
|
3742
|
+
}), Gc = { class: "tpl:w-full" }, Kc = { key: 0 }, qc = [
|
|
3720
3743
|
"aria-label",
|
|
3721
3744
|
"data-placeholder",
|
|
3722
3745
|
"onBlur"
|
|
3723
|
-
],
|
|
3746
|
+
], Jc = [
|
|
3724
3747
|
"aria-label",
|
|
3725
3748
|
"data-placeholder",
|
|
3726
3749
|
"onBlur"
|
|
3727
|
-
],
|
|
3750
|
+
], Yc = {
|
|
3728
3751
|
key: 1,
|
|
3729
3752
|
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)]"
|
|
3730
|
-
},
|
|
3753
|
+
}, Xc = /*#__PURE__*/ Vn(/* @__PURE__ */ I({
|
|
3731
3754
|
__name: "TableBlock",
|
|
3732
3755
|
props: {
|
|
3733
3756
|
block: {},
|
|
@@ -3741,7 +3764,7 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3741
3764
|
updated(e, t) {
|
|
3742
3765
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3743
3766
|
}
|
|
3744
|
-
}, i = e, { t: a } =
|
|
3767
|
+
}, i = e, { t: a } = Dn(), o = Mt(un, "TableBlock"), s = Mt(Sn, "TableBlock"), c = P(() => i.block.rows.length > 0), u = P(() => {
|
|
3745
3768
|
let e = {
|
|
3746
3769
|
width: "100%",
|
|
3747
3770
|
borderCollapse: "collapse",
|
|
@@ -3750,15 +3773,15 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3750
3773
|
fontFamily: i.block.fontFamily ? s.resolveFontFamily(i.block.fontFamily) : "inherit"
|
|
3751
3774
|
};
|
|
3752
3775
|
return i.block.color && (e.color = i.block.color), e;
|
|
3753
|
-
}), d =
|
|
3776
|
+
}), d = P(() => ({
|
|
3754
3777
|
border: `${i.block.borderWidth}px solid ${i.block.borderColor}`,
|
|
3755
3778
|
padding: `${i.block.cellPadding}px`,
|
|
3756
3779
|
textAlign: i.block.textAlign
|
|
3757
|
-
})), f =
|
|
3780
|
+
})), f = P(() => ({
|
|
3758
3781
|
...d.value,
|
|
3759
3782
|
fontWeight: "bold",
|
|
3760
3783
|
backgroundColor: i.block.headerBackgroundColor || "transparent"
|
|
3761
|
-
})), p =
|
|
3784
|
+
})), p = P(() => i.block.hasHeaderRow && i.block.rows.length > 0 ? i.block.rows[0] : null), h = P(() => i.block.hasHeaderRow ? i.block.rows.slice(1) : i.block.rows);
|
|
3762
3785
|
function g() {
|
|
3763
3786
|
o.selectBlock(i.block.id);
|
|
3764
3787
|
}
|
|
@@ -3772,31 +3795,31 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3772
3795
|
} : n);
|
|
3773
3796
|
o.updateBlock(i.block.id, { rows: a });
|
|
3774
3797
|
}
|
|
3775
|
-
return (e, i) => (t(), S("div",
|
|
3798
|
+
return (e, i) => (t(), S("div", Gc, [c.value ? (t(), S("table", {
|
|
3776
3799
|
key: 0,
|
|
3777
3800
|
style: n(u.value),
|
|
3778
3801
|
class: "tpl-table-editable"
|
|
3779
|
-
}, [p.value ? (t(), S("thead",
|
|
3802
|
+
}, [p.value ? (t(), S("thead", Kc, [x("tr", null, [(t(!0), S(M, null, l(p.value.cells, (e) => m((t(), S("th", {
|
|
3780
3803
|
key: e.id,
|
|
3781
3804
|
style: n(f.value),
|
|
3782
3805
|
"aria-label": y(a).table.cellPlaceholder,
|
|
3783
3806
|
contenteditable: "true",
|
|
3784
3807
|
"data-placeholder": y(a).table.cellPlaceholder,
|
|
3785
3808
|
onBlur: (t) => _(p.value.id, e.id, t),
|
|
3786
|
-
onKeydown: i[0] ||=
|
|
3787
|
-
onClick:
|
|
3788
|
-
}, null, 44,
|
|
3809
|
+
onKeydown: i[0] ||= ne(L((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3810
|
+
onClick: L(g, ["stop"])
|
|
3811
|
+
}, null, 44, qc)), [[r, e.content]])), 128))])])) : F("", !0), x("tbody", null, [(t(!0), S(M, null, l(h.value, (e) => (t(), S("tr", { key: e.id }, [(t(!0), S(M, null, l(e.cells, (o) => m((t(), S("td", {
|
|
3789
3812
|
key: o.id,
|
|
3790
3813
|
style: n(d.value),
|
|
3791
3814
|
"aria-label": y(a).table.cellPlaceholder,
|
|
3792
3815
|
contenteditable: "true",
|
|
3793
3816
|
"data-placeholder": y(a).table.cellPlaceholder,
|
|
3794
3817
|
onBlur: (t) => _(e.id, o.id, t),
|
|
3795
|
-
onKeydown: i[1] ||=
|
|
3796
|
-
onClick:
|
|
3797
|
-
}, null, 44,
|
|
3818
|
+
onKeydown: i[1] ||= ne(L((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3819
|
+
onClick: L(g, ["stop"])
|
|
3820
|
+
}, null, 44, Jc)), [[r, o.content]])), 128))]))), 128))])], 4)) : (t(), S("div", Yc, [C(y(mt), { size: 16 }), x("span", null, D(y(a).table.empty), 1)]))]));
|
|
3798
3821
|
}
|
|
3799
|
-
}), [["__scopeId", "data-v-6751d456"]]),
|
|
3822
|
+
}), [["__scopeId", "data-v-6751d456"]]), Zc = /* @__PURE__ */ I({
|
|
3800
3823
|
__name: "VideoPlayButton",
|
|
3801
3824
|
props: { hoverEffect: {
|
|
3802
3825
|
type: Boolean,
|
|
@@ -3814,7 +3837,7 @@ var Oc = { class: "tpl:relative tpl:w-full" }, kc = {
|
|
|
3814
3837
|
});
|
|
3815
3838
|
//#endregion
|
|
3816
3839
|
//#region src/utils/videoThumbnail.ts
|
|
3817
|
-
function
|
|
3840
|
+
function Qc(e) {
|
|
3818
3841
|
if (!e) return {
|
|
3819
3842
|
platform: "unknown",
|
|
3820
3843
|
videoId: null,
|
|
@@ -3846,25 +3869,25 @@ function Xc(e) {
|
|
|
3846
3869
|
thumbnailUrl: null
|
|
3847
3870
|
};
|
|
3848
3871
|
}
|
|
3849
|
-
function
|
|
3850
|
-
return t ||
|
|
3872
|
+
function $c(e, t) {
|
|
3873
|
+
return t || Qc(e).thumbnailUrl;
|
|
3851
3874
|
}
|
|
3852
3875
|
//#endregion
|
|
3853
3876
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3854
|
-
var
|
|
3877
|
+
var el = ["src", "alt"], tl = {
|
|
3855
3878
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3856
3879
|
style: { opacity: "0.7" }
|
|
3857
|
-
},
|
|
3880
|
+
}, nl = ["href"], rl = ["src", "alt"], il = ["src", "alt"], al = {
|
|
3858
3881
|
key: 3,
|
|
3859
3882
|
class: "tpl:flex tpl:box-border 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)]"
|
|
3860
|
-
},
|
|
3883
|
+
}, ol = /* @__PURE__ */ I({
|
|
3861
3884
|
__name: "VideoBlock",
|
|
3862
3885
|
props: {
|
|
3863
3886
|
block: {},
|
|
3864
3887
|
viewport: {}
|
|
3865
3888
|
},
|
|
3866
3889
|
setup(e) {
|
|
3867
|
-
let r = e, { t: i } =
|
|
3890
|
+
let r = e, { t: i } = Dn(), { syntax: a } = Un(), o = P(() => Ee(r.block.url, a) || Ee(r.block.thumbnailUrl, a)), s = st(() => o.value ? void 0 : r.block.thumbnailUrl || void 0), c = st(() => o.value ? r.block.placeholderUrl : void 0), l = P(() => o.value ? null : r.block.thumbnailUrl ? s.value ?? null : $c(r.block.url)), u = P(() => ({ textAlign: r.block.align })), d = P(() => {
|
|
3868
3891
|
let e = r.block.align;
|
|
3869
3892
|
return {
|
|
3870
3893
|
maxWidth: "100%",
|
|
@@ -3874,7 +3897,7 @@ var Qc = ["src", "alt"], $c = {
|
|
|
3874
3897
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3875
3898
|
marginRight: e === "center" ? "auto" : void 0
|
|
3876
3899
|
};
|
|
3877
|
-
}), f =
|
|
3900
|
+
}), f = P(() => ({ height: r.block.height ? `${r.block.height}px` : void 0 })), p = P(() => Ee(r.block.url, a) ? r.block.url : r.block.thumbnailUrl);
|
|
3878
3901
|
return (r, a) => (t(), S("div", {
|
|
3879
3902
|
class: "tpl:w-full",
|
|
3880
3903
|
style: n(u.value)
|
|
@@ -3887,7 +3910,7 @@ var Qc = ["src", "alt"], $c = {
|
|
|
3887
3910
|
src: y(c),
|
|
3888
3911
|
alt: e.block.alt,
|
|
3889
3912
|
style: n(f.value)
|
|
3890
|
-
}, null, 12,
|
|
3913
|
+
}, null, 12, el), C(Zc)], 4)) : o.value ? (t(), S("div", {
|
|
3891
3914
|
key: 1,
|
|
3892
3915
|
class: "tpl:relative tpl:!flex tpl:box-border 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)]",
|
|
3893
3916
|
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
@@ -3896,20 +3919,20 @@ var Qc = ["src", "alt"], $c = {
|
|
|
3896
3919
|
"stroke-width": 1.5,
|
|
3897
3920
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3898
3921
|
style: { opacity: "0.5" }
|
|
3899
|
-
}), x("span",
|
|
3922
|
+
}), x("span", tl, [C(ei, { text: p.value }, null, 8, ["text"])])], 4)) : l.value ? (t(), S(M, { key: 2 }, [e.block.url ? (t(), S("a", {
|
|
3900
3923
|
key: 0,
|
|
3901
3924
|
href: e.block.url,
|
|
3902
3925
|
target: "_blank",
|
|
3903
3926
|
rel: "noopener noreferrer",
|
|
3904
3927
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
3905
3928
|
style: n(d.value),
|
|
3906
|
-
onClick: a[0] ||=
|
|
3929
|
+
onClick: a[0] ||= L(() => {}, ["prevent"])
|
|
3907
3930
|
}, [x("img", {
|
|
3908
3931
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3909
3932
|
src: l.value,
|
|
3910
3933
|
alt: e.block.alt,
|
|
3911
3934
|
style: n(f.value)
|
|
3912
|
-
}, null, 12,
|
|
3935
|
+
}, null, 12, rl), C(Zc, { "hover-effect": "" })], 12, nl)) : (t(), S("div", {
|
|
3913
3936
|
key: 1,
|
|
3914
3937
|
class: "tpl:relative tpl:inline-block",
|
|
3915
3938
|
style: n(d.value)
|
|
@@ -3918,54 +3941,53 @@ var Qc = ["src", "alt"], $c = {
|
|
|
3918
3941
|
src: l.value,
|
|
3919
3942
|
alt: e.block.alt,
|
|
3920
3943
|
style: n(f.value)
|
|
3921
|
-
}, null, 12,
|
|
3944
|
+
}, null, 12, il), C(Zc)], 4))], 64)) : (t(), S("div", al, [C(y(li), {
|
|
3922
3945
|
size: 40,
|
|
3923
3946
|
"stroke-width": 1.5,
|
|
3924
3947
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3925
3948
|
}), x("span", null, D(y(i).video.addVideo), 1)]))], 4));
|
|
3926
3949
|
}
|
|
3927
|
-
}),
|
|
3928
|
-
section:
|
|
3929
|
-
title:
|
|
3950
|
+
}), sl = {
|
|
3951
|
+
section: Nc,
|
|
3952
|
+
title: Ma,
|
|
3930
3953
|
paragraph: ga,
|
|
3931
3954
|
image: ra,
|
|
3932
3955
|
button: ni,
|
|
3933
3956
|
divider: zi,
|
|
3934
|
-
video:
|
|
3935
|
-
social:
|
|
3957
|
+
video: ol,
|
|
3958
|
+
social: Vc,
|
|
3936
3959
|
menu: sa,
|
|
3937
|
-
table:
|
|
3938
|
-
spacer:
|
|
3960
|
+
table: Xc,
|
|
3961
|
+
spacer: Wc,
|
|
3939
3962
|
html: Gi,
|
|
3940
|
-
countdown: v(() => import("./CountdownBlock-
|
|
3963
|
+
countdown: v(() => import("./CountdownBlock-DPQXWRvU.js"))
|
|
3941
3964
|
};
|
|
3942
|
-
function
|
|
3943
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
3965
|
+
function cl(t) {
|
|
3966
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = Dn(i), l = P(() => xe(xe(xe(hr(i), Fr(n.content.value.settings?.locale)), Ye(n.content.value.settings) === "rtl" ? {
|
|
3944
3967
|
title: { textAlign: "right" },
|
|
3945
3968
|
table: { textAlign: "right" }
|
|
3946
3969
|
} : {}), r.blockDefaults ?? {}));
|
|
3947
3970
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
3948
|
-
let { resolvedTheme: u } = rr(
|
|
3971
|
+
let { resolvedTheme: u } = rr(P(() => n.state.uiTheme)), d = _(r.theme ?? {}), { themeStyles: p } = ar({
|
|
3949
3972
|
themeOverrides: d,
|
|
3950
3973
|
resolvedTheme: u,
|
|
3951
3974
|
extraStyles: () => ({
|
|
3952
3975
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
3953
3976
|
...t.themeExtraStyles?.()
|
|
3954
3977
|
})
|
|
3955
|
-
}), m =
|
|
3978
|
+
}), m = t.history ?? tt({
|
|
3956
3979
|
content: n.content,
|
|
3957
|
-
setContent: (e, t) => n.setContent(e, t)
|
|
3958
|
-
...t.historyOptions
|
|
3980
|
+
setContent: (e, t) => n.setContent(e, t)
|
|
3959
3981
|
});
|
|
3960
|
-
|
|
3961
|
-
let g =
|
|
3982
|
+
t.history || ut(n, m);
|
|
3983
|
+
let g = ot({
|
|
3962
3984
|
addBlock: n.addBlock,
|
|
3963
3985
|
removeBlock: n.removeBlock,
|
|
3964
3986
|
updateBlock: n.updateBlock,
|
|
3965
3987
|
selectBlock: n.selectBlock,
|
|
3966
3988
|
findBlockLocation: n.findBlockLocation,
|
|
3967
3989
|
blockDefaults: () => l.value
|
|
3968
|
-
}), v =
|
|
3990
|
+
}), v = it(n), y = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? at({
|
|
3969
3991
|
content: n.content,
|
|
3970
3992
|
isDirty: () => n.state.isDirty,
|
|
3971
3993
|
...t.autoSaveOptions
|
|
@@ -3976,27 +3998,27 @@ function ol(t) {
|
|
|
3976
3998
|
let x = nr(n, {
|
|
3977
3999
|
t: o,
|
|
3978
4000
|
format: c
|
|
3979
|
-
}, r.customBlocks ?? []), S =
|
|
3980
|
-
if (S.allowCustomIgnored &&
|
|
4001
|
+
}, r.customBlocks ?? []), S = jn(r.colors);
|
|
4002
|
+
if (S.allowCustomIgnored && On.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), S.invalidPresets.length > 0 && On.warn(`config.colors.presets skipped invalid entries: ${S.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), S.allowCustom === !1) {
|
|
3981
4003
|
let e = mr(S.presets, r.blockDefaults, r.templateDefaults);
|
|
3982
|
-
e.length > 0 &&
|
|
4004
|
+
e.length > 0 && On.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.`);
|
|
3983
4005
|
}
|
|
3984
|
-
let C =
|
|
3985
|
-
for (let e of C.unknown)
|
|
4006
|
+
let C = Nn(r.templateSettings);
|
|
4007
|
+
for (let e of C.unknown) On.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Pn.join(", ")}) — skipping it.`);
|
|
3986
4008
|
let w = or();
|
|
3987
|
-
dr(w,
|
|
4009
|
+
dr(w, sl);
|
|
3988
4010
|
let T = /* @__PURE__ */ new Set();
|
|
3989
4011
|
function D(e) {
|
|
3990
4012
|
for (let t of e) {
|
|
3991
4013
|
w.registerCustom(t, Li);
|
|
3992
|
-
for (let e of Ir(t, S)) T.has(e.id) || (T.add(e.id),
|
|
4014
|
+
for (let e of Ir(t, S)) T.has(e.id) || (T.add(e.id), On.warn(e.message));
|
|
3993
4015
|
}
|
|
3994
4016
|
}
|
|
3995
4017
|
r.customBlocks?.length && D(r.customBlocks);
|
|
3996
4018
|
let O = Yn();
|
|
3997
4019
|
if (h() && s(O.dispose), t.containerEl) {
|
|
3998
4020
|
let e = t.containerEl;
|
|
3999
|
-
|
|
4021
|
+
kt(document, "pointerdown", (t) => {
|
|
4000
4022
|
let n = e.value;
|
|
4001
4023
|
n && (t.composedPath?.() ?? []).includes(n) && O.claim();
|
|
4002
4024
|
}, { capture: !0 });
|
|
@@ -4012,45 +4034,44 @@ function ol(t) {
|
|
|
4012
4034
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
4013
4035
|
removeBlock: (e) => n.removeBlock(e),
|
|
4014
4036
|
onSave: k,
|
|
4015
|
-
onBeforeUndo: t.keyboardOptions?.onBeforeUndo,
|
|
4016
4037
|
isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
4017
4038
|
onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
|
|
4018
4039
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4019
4040
|
});
|
|
4020
4041
|
}
|
|
4021
|
-
|
|
4042
|
+
kt(document, "keydown", A);
|
|
4022
4043
|
let j = _(null), M = t.editorRoot ?? document;
|
|
4023
|
-
E(
|
|
4024
|
-
let
|
|
4025
|
-
function
|
|
4026
|
-
Array.isArray(e) ?
|
|
4027
|
-
}
|
|
4028
|
-
E(
|
|
4029
|
-
let
|
|
4030
|
-
E(
|
|
4031
|
-
let
|
|
4044
|
+
E(rn, M), E(Pt, j), E(tn, i), E(un, n), E(Tn, m), E(an, g), E(ln, v), E(Sn, a), E(Ht, p), E(nn, u), E(_n, l), E(en, r.locale), E(xn, w), E(vn, r.customBlocks ?? []), E(En, r.paletteBlocks), E(on, fr(r.htmlBlockPreview)), E(Ft, r.layout), E(zt, r.sectionWrapper), E(cn, S), E(yn, C.fields), E(hn, sr(n.content, w));
|
|
4045
|
+
let N = Ne(r.mergeTags?.syntax), F = e(r.mergeTags?.tags ?? []);
|
|
4046
|
+
function I(e) {
|
|
4047
|
+
Array.isArray(e) ? F.value = e : On.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4048
|
+
}
|
|
4049
|
+
E(qt, F), E(Jt, N), E(Xt, r.mergeTags?.onRequest ?? null), E(pn, r.mergeTags?.autocomplete !== !1), E(Kt, r.mergeTags?.showRawValue !== !1);
|
|
4050
|
+
let ee = _(he(r.mergeTags?.tags ?? []));
|
|
4051
|
+
E(Gt, ee);
|
|
4052
|
+
let L = Zn({
|
|
4032
4053
|
resolvePreview: r.resolvePreview,
|
|
4033
4054
|
getContent: () => {
|
|
4034
4055
|
let e = n.content.value;
|
|
4035
|
-
return r.layout && n.state.previewMode ?
|
|
4056
|
+
return r.layout && n.state.previewMode ? Re(r.layout, e) : e;
|
|
4036
4057
|
},
|
|
4037
4058
|
isActive: () => n.state.previewMode
|
|
4038
4059
|
});
|
|
4039
|
-
E(
|
|
4040
|
-
let
|
|
4041
|
-
E(
|
|
4042
|
-
let
|
|
4043
|
-
E(
|
|
4044
|
-
let
|
|
4060
|
+
E($t, L), E(Bt, r.resolvePreview);
|
|
4061
|
+
let te = P(() => !(n.state.previewMode && L.isConfigured));
|
|
4062
|
+
E(bn, te);
|
|
4063
|
+
let ne = Qn();
|
|
4064
|
+
E(Nt, ne), E(fn, _(!1)), E(It, _(!1)), E(Qt, r.logicTags?.tags ?? []), E(Cn, r.logicTags?.pairs ?? []), E(Vt, r.logicTags?.onRequest ?? null), E(Lt, $n()), E(Wt, r.onRequestMedia ?? null), E(sn, r.canDropMedia ?? null), E(wn, r.resolveImageUrl ? St(r.resolveImageUrl) : null), E(dn, r.displayConditions?.conditions ?? []), E(gn, r.displayConditions?.allowCustom ?? !1), E(mn, t.capabilities ?? {}), E(Zt, x);
|
|
4065
|
+
let re = er(r.lint) ? null : tr({
|
|
4045
4066
|
content: n.content,
|
|
4046
4067
|
options: r.lint ?? {},
|
|
4047
4068
|
updateBlock: n.updateBlock,
|
|
4048
4069
|
updateSettings: n.updateSettings,
|
|
4049
4070
|
removeBlock: n.removeBlock
|
|
4050
4071
|
});
|
|
4051
|
-
E(
|
|
4052
|
-
function
|
|
4053
|
-
b?.(),
|
|
4072
|
+
E(Ut, re);
|
|
4073
|
+
function ie() {
|
|
4074
|
+
b?.(), re?.destroy(), y?.destroy(), m.destroy();
|
|
4054
4075
|
}
|
|
4055
4076
|
return {
|
|
4056
4077
|
t: o,
|
|
@@ -4065,15 +4086,15 @@ function ol(t) {
|
|
|
4065
4086
|
themeOverrides: d,
|
|
4066
4087
|
registry: w,
|
|
4067
4088
|
keyboardReorder: x,
|
|
4068
|
-
templateLint:
|
|
4089
|
+
templateLint: re,
|
|
4069
4090
|
popoverRoot: j,
|
|
4070
|
-
mergeTagSampleMode:
|
|
4071
|
-
previewResolution:
|
|
4072
|
-
appliesConditionFilter:
|
|
4091
|
+
mergeTagSampleMode: ee,
|
|
4092
|
+
previewResolution: L,
|
|
4093
|
+
appliesConditionFilter: te,
|
|
4073
4094
|
registerCustomBlocks: D,
|
|
4074
|
-
setMergeTags:
|
|
4075
|
-
destroy:
|
|
4095
|
+
setMergeTags: I,
|
|
4096
|
+
destroy: ie
|
|
4076
4097
|
};
|
|
4077
4098
|
}
|
|
4078
4099
|
//#endregion
|
|
4079
|
-
export { Jr as A, Dr as B, mi as C, ri as D, ai as E, Cr as F, Zn as H, jr as I, Ar as L, zr as M, Qr as N, ni as O, Br as P, kr as R, hi as S, si as T, Er as V, Li as _,
|
|
4100
|
+
export { Jr as A, Dr as B, mi as C, ri as D, ai as E, Cr as F, Zn as H, jr as I, Ar as L, zr as M, Qr as N, ni as O, Br as P, kr as R, hi as S, si as T, Er as V, Li as _, Vc as a, wi as b, Na as c, Aa as d, ga as f, zi as g, Gi as h, Wc as i, Yr as j, Wr as k, Ia as l, ra as m, ol as n, Nc as o, sa as p, Xc as r, Oc as s, cl as t, Ma as u, Oi as v, fi as w, yi as x, Ei as y, Or as z };
|