@templatical/editor 0.55.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-D5QosKvB.js → AiAltTextPopover-DdsvhE78.js} +4 -4
- package/dist/{AiAltTextReview-D1W_lrI_.js → AiAltTextReview-P6to1_0t.js} +3 -3
- package/dist/{AiChatPanel-C8SeEJRP.js → AiChatPanel-BSlmzMRC.js} +10 -10
- package/dist/{AiPanels-CR6zphjP.js → AiPanels-DAsnX-a3.js} +1 -1
- package/dist/{AiRewriteMenu-BwztoMov.js → AiRewriteMenu-DIISOR6U.js} +11 -11
- package/dist/{BlockIssueBadge-DaPTq1RE.js → BlockIssueBadge-Bmtc50BQ.js} +4 -4
- package/dist/BlockPreviewCanvas-BYIzNn-9.js +154 -0
- package/dist/{CloudHeaderExtras-XpjJjn3o.js → CloudHeaderExtras-Cqhw-jMz.js} +1 -1
- package/dist/{CloudPanels-Baoaj6Xf.js → CloudPanels-w34W8_BP.js} +4 -4
- package/dist/{CollaborationNotices-Cnx0XHzZ.js → CollaborationNotices-HTbCebjV.js} +2 -2
- package/dist/{CollaboratorBar-BaBoNhwB.js → CollaboratorBar-CLQjksX-.js} +2 -2
- package/dist/{CommentsPanel-Ck3QmqiC.js → CommentsPanel-C5qG17Ki.js} +1 -1
- package/dist/{CommentsSidebar-CHknhOar.js → CommentsSidebar-C7CWcUYZ.js} +12 -12
- package/dist/{CountdownBlock-BMezkFbJ.js → CountdownBlock-BTXcCvjZ.js} +2 -2
- package/dist/{CountdownToolbar-CA_gDIdZ.js → CountdownToolbar-CP-pkntQ.js} +5 -5
- package/dist/{IssuesPanel-nmFhWG1p.js → IssuesPanel-CiiNBzH0.js} +12 -12
- package/dist/{LanguageMenu-DcABUYop.js → LanguageMenu-B981Av-6.js} +15 -15
- package/dist/{LocaleNotices-WzsYtBRs.js → LocaleNotices-CTCZ7BYv.js} +4 -4
- package/dist/{LogicTagInsertButton-qZ82VMFx.js → LogicTagInsertButton-DEOPc4RC.js} +23 -23
- package/dist/{MediaEditModal-C3U9Mi31.js → MediaEditModal-DJsPLTwP.js} +1 -1
- package/dist/{MediaPanels-CGmk9ufe.js → MediaPanels-D2WD2aE2.js} +1 -1
- package/dist/{MergeTagInput-JJeZbFkD.js → MergeTagInput-C9icdxw7.js} +1 -1
- package/dist/{MergeTagModeToggle-DDucd1eC.js → MergeTagModeToggle-DXvb80OE.js} +6 -6
- package/dist/{MergeTagTextarea-dQ2LRrNB.js → MergeTagTextarea-CrAcmT3A.js} +5 -5
- package/dist/{ParagraphEditor-VXYwGoz_.js → ParagraphEditor-BWBQ3jKz.js} +55 -55
- package/dist/{RestoreVersionDialog-BibNvAaJ.js → RestoreVersionDialog-CqAp16yQ.js} +4 -4
- package/dist/{RichTextEditorContent-CU5EOlM_.js → RichTextEditorContent-xbBjVPVQ.js} +8 -8
- package/dist/{SaveBlockDialog-S9aFi0cy.js → SaveBlockDialog-pebNJBTc.js} +9 -9
- package/dist/{SavedBlocksBrowserModal-DIdn6B0J.js → SavedBlocksBrowserModal-CvagMcv7.js} +11 -11
- package/dist/{SavedBlocksPanels-Cme2M6u8.js → SavedBlocksPanels-B9AAVBDm.js} +1 -1
- package/dist/{SavedBlocksPickBar-BDmA7r3m.js → SavedBlocksPickBar-BIANWe3i.js} +3 -3
- package/dist/{TemplateSettings-C_LHLm5M.js → TemplateSettings-ORq4PbCN.js} +12 -12
- package/dist/{TestEmailModal-CLIRn7eL.js → TestEmailModal-DRjCpcPl.js} +11 -11
- package/dist/{TestEmailPanel-frdtjC8h.js → TestEmailPanel-H0v8El__.js} +1 -1
- package/dist/{TitleEditor-D5kC56Jl.js → TitleEditor-CEGbJXeU.js} +11 -11
- package/dist/{Toolbar-D904Yw_R.js → Toolbar-XT-uGA9J.js} +937 -703
- package/dist/{TplModal-BBdotDf1.js → TplModal-7NQq5-VW.js} +4 -4
- package/dist/{VersionHistoryMenu-BnP0EyLl.js → VersionHistoryMenu-C8BE3Pr-.js} +7 -7
- package/dist/{VersionHistoryPanels-DhagEgOk.js → VersionHistoryPanels-CuKuOSJG.js} +1 -1
- package/dist/{VersionPreviewBanner-BPP939cD.js → VersionPreviewBanner-BVFBkveR.js} +2 -2
- package/dist/WrapperBlock-Bdw-072t.js +56 -0
- package/dist/{blockTypeIcons-CoRQV_hP.js → blockTypeIcons-CGplGmmr.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-DIkMxYCN.js → ca-BJn8lcJx.js} +8 -0
- package/dist/cdn/chunks/{AiAltTextPopover-CUGOPuRo.js → AiAltTextPopover-x999Gimz.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextPopover-CUGOPuRo.js.map → AiAltTextPopover-x999Gimz.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-B9vm_L-8.js → AiAltTextReview-DjnFz1wO.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextReview-B9vm_L-8.js.map → AiAltTextReview-DjnFz1wO.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js → AiChatPanel-DKDu9cs7.js} +4 -4
- package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js.map → AiChatPanel-DKDu9cs7.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-BblCSkQy.js → AiPanels-jMLVaiKx.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-BblCSkQy.js.map → AiPanels-jMLVaiKx.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BvV_7tNZ.js → AiRewriteMenu-s79rmHFy.js} +9 -9
- package/dist/cdn/chunks/{AiRewriteMenu-BvV_7tNZ.js.map → AiRewriteMenu-s79rmHFy.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js → BlockIssueBadge-Bnmq_M4G.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js.map → BlockIssueBadge-Bnmq_M4G.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-Dr-xGq6v.js → BlockPreviewCanvas-B3HkuENF.js} +46 -32
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js → CloudHeaderExtras-uUJYJFJ6.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js.map → CloudHeaderExtras-uUJYJFJ6.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-CQ0vNgsH.js → CloudPanels-DQnlH_YJ.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-CQ0vNgsH.js.map → CloudPanels-DQnlH_YJ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js → CollaborationNotices-CHqUGhOZ.js} +3 -3
- package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js.map → CollaborationNotices-CHqUGhOZ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js → CollaboratorBar-C1ZI2xwa.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js.map → CollaboratorBar-C1ZI2xwa.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js → CommentsPanel-EtdTzTmq.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js.map → CommentsPanel-EtdTzTmq.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js → CommentsSidebar-Qmj049QX.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js.map → CommentsSidebar-Qmj049QX.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js → CountdownBlock-DyGsh92b.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js.map → CountdownBlock-DyGsh92b.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BxW-J7DX.js → CountdownToolbar-Ddj2erNm.js} +6 -6
- package/dist/cdn/chunks/{CountdownToolbar-BxW-J7DX.js.map → CountdownToolbar-Ddj2erNm.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BoHeIjvw.js → IssuesPanel-DnSnEh1X.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-BoHeIjvw.js.map → IssuesPanel-DnSnEh1X.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-BnYN5N1h.js → LanguageMenu-C2I_yTL5.js} +110 -110
- package/dist/cdn/chunks/{LanguageMenu-BnYN5N1h.js.map → LanguageMenu-C2I_yTL5.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js → LocaleNotices-Dr9LRCAg.js} +4 -4
- package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js.map → LocaleNotices-Dr9LRCAg.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-Bt2PXbQ0.js → LogicTagInsertButton-BdzE9-l7.js} +29 -29
- package/dist/cdn/chunks/LogicTagInsertButton-BdzE9-l7.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js → MediaEditModal-CMJFXu_o.js} +2 -2
- package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js.map → MediaEditModal-CMJFXu_o.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js → MediaPanels-C790ZXuY.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js.map → MediaPanels-C790ZXuY.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-BELdMRni.js → MergeTagInput-CmrX8Md6.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-BELdMRni.js.map → MergeTagInput-CmrX8Md6.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DKfMDIEF.js → MergeTagModeToggle-D7maMGIM.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-DKfMDIEF.js.map → MergeTagModeToggle-D7maMGIM.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-w6xen3Xh.js → MergeTagTextarea-KOnd2teB.js} +6 -6
- package/dist/cdn/chunks/{MergeTagTextarea-w6xen3Xh.js.map → MergeTagTextarea-KOnd2teB.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-Cal9hY3U.js → ParagraphEditor-I9lbKaPk.js} +19 -19
- package/dist/cdn/chunks/{ParagraphEditor-Cal9hY3U.js.map → ParagraphEditor-I9lbKaPk.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-f_ulmASY.js → RestoreVersionDialog-DqbULAbc.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-f_ulmASY.js.map → RestoreVersionDialog-DqbULAbc.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C_v0kS4A.js → RichTextEditorContent-_O22z0pn.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-C_v0kS4A.js.map → RichTextEditorContent-_O22z0pn.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-C6N9RFls.js → SaveBlockDialog-CClRLXgF.js} +8 -8
- package/dist/cdn/chunks/{SaveBlockDialog-C6N9RFls.js.map → SaveBlockDialog-CClRLXgF.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-Bl2sl09D.js → SavedBlocksBrowserModal-BIaxaxw9.js} +8 -8
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-Bl2sl09D.js.map → SavedBlocksBrowserModal-BIaxaxw9.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DqVcmEUK.js → SavedBlocksPanels-Dfu9N6YW.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DqVcmEUK.js.map → SavedBlocksPanels-Dfu9N6YW.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DE-J1JVL.js → SavedBlocksPickBar-DiMW_dbJ.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-DE-J1JVL.js.map → SavedBlocksPickBar-DiMW_dbJ.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-CpoKZ8oV.js → TemplateSettings-JMUo0LIV.js} +10 -10
- package/dist/cdn/chunks/{TemplateSettings-CpoKZ8oV.js.map → TemplateSettings-JMUo0LIV.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DI3z__Bd.js → TestEmailModal-D52VtwBZ.js} +11 -11
- package/dist/cdn/chunks/{TestEmailModal-DI3z__Bd.js.map → TestEmailModal-D52VtwBZ.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-Cp5d2YGn.js → TestEmailPanel-D9ezVDHd.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-Cp5d2YGn.js.map → TestEmailPanel-D9ezVDHd.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C2syRLdZ.js → TitleEditor-D04vvbUc.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-C2syRLdZ.js.map → TitleEditor-D04vvbUc.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-NEE8qxYh.js → Toolbar-C_Hfsher.js} +1173 -939
- package/dist/cdn/chunks/Toolbar-C_Hfsher.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-B1MgvtX8.js → TplModal-d6fEZGJ5.js} +5 -5
- package/dist/cdn/chunks/{TplModal-B1MgvtX8.js.map → TplModal-d6fEZGJ5.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js → VersionHistoryMenu-C8ucm43v.js} +7 -7
- package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js.map → VersionHistoryMenu-C8ucm43v.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Cefd8i_e.js → VersionHistoryPanels-BAdzmhvH.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-Cefd8i_e.js.map → VersionHistoryPanels-BAdzmhvH.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js → VersionPreviewBanner-BWuovbFc.js} +3 -3
- package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js.map → VersionPreviewBanner-BWuovbFc.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js +58 -0
- package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js → blockTypeIcons-CzYA5DF9.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js.map → blockTypeIcons-CzYA5DF9.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DIkMxYCN.js → ca-BJn8lcJx.js} +9 -1
- package/dist/cdn/chunks/ca-BJn8lcJx.js.map +1 -0
- package/dist/cdn/chunks/{composables-nyxwrM27.js → composables-CsfQlmcf.js} +543 -503
- package/dist/cdn/chunks/composables-CsfQlmcf.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-DJkDGKQ_.js → createCloudRuntime-PpIFCDfj.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-DJkDGKQ_.js.map → createCloudRuntime-PpIFCDfj.js.map} +1 -1
- package/dist/{de-Cc6Ue0UD.js → cdn/chunks/de-BLFp3nWx.js} +10 -0
- package/dist/cdn/chunks/de-BLFp3nWx.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-erQEOHZN.js → editor-modal-B8UE9V8B.js} +90 -90
- package/dist/cdn/chunks/{editor-modal-erQEOHZN.js.map → editor-modal-B8UE9V8B.js.map} +1 -1
- package/dist/cdn/chunks/en-CVxNoHww.js +1 -0
- package/dist/cdn/chunks/{en-BX4FujAQ.js → en-DGGQJGbm.js} +9 -1
- package/dist/cdn/chunks/en-DGGQJGbm.js.map +1 -0
- package/dist/cdn/chunks/{es-Do5b-MKU.js → es-DTY9qgLv.js} +9 -1
- package/dist/cdn/chunks/es-DTY9qgLv.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BcwkOjVq.js → extensions-BM6ZSnsQ.js} +70 -70
- package/dist/cdn/chunks/extensions-BM6ZSnsQ.js.map +1 -0
- package/dist/{fr-S1n2Ebzp.js → cdn/chunks/fr-L4FqO9Gp.js} +10 -0
- package/dist/cdn/chunks/{fr-S1n2Ebzp.js.map → fr-L4FqO9Gp.js.map} +1 -1
- package/dist/cdn/chunks/{icons-Da9GKjPx.js → icons-DHExFLlT.js} +43 -43
- package/dist/cdn/chunks/{icons-Da9GKjPx.js.map → icons-DHExFLlT.js.map} +1 -1
- package/dist/cdn/chunks/{ja-DLwcq4bA.js → ja-6uOXkh4v.js} +9 -1
- package/dist/cdn/chunks/ja-6uOXkh4v.js.map +1 -0
- package/dist/cdn/chunks/{keys-CoQtCqNv.js → keys-BUmIvYy3.js} +4 -4
- package/dist/cdn/chunks/keys-BUmIvYy3.js.map +1 -0
- package/dist/{nl-0JSWaZpT.js → cdn/chunks/nl-DCxuxwNq.js} +10 -0
- package/dist/cdn/chunks/nl-DCxuxwNq.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-BrGw5jxk.js → normalizeMergeTagMarkup-aWjkotui.js} +67 -67
- package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-Cj0XYwuh.js → preRenderCustomBlocks-Dn6dFUwx.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-Cj0XYwuh.js.map → preRenderCustomBlocks-Dn6dFUwx.js.map} +1 -1
- package/dist/{pt-BR-D3VlIMDZ.js → cdn/chunks/pt-BR-CBkcrebr.js} +10 -0
- package/dist/cdn/chunks/pt-BR-CBkcrebr.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-GxJCxKcP.js → sanitizeHtml-DJI7vvET.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-GxJCxKcP.js.map → sanitizeHtml-DJI7vvET.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-B5zrrV8-.js → socialIcons-Qw9rHc8C.js} +354 -341
- package/dist/cdn/chunks/{socialIcons-B5zrrV8-.js.map → socialIcons-Qw9rHc8C.js.map} +1 -1
- package/dist/cdn/chunks/src-Bfj1jHnn.js +710 -0
- package/dist/cdn/chunks/src-Bfj1jHnn.js.map +1 -0
- package/dist/cdn/chunks/{src-Diw9SLIe.js → src-C9JWWxAk.js} +419 -423
- package/dist/cdn/chunks/src-C9JWWxAk.js.map +1 -0
- package/dist/cdn/chunks/{src-v47QHNmB.js → src-mXG-Of9A.js} +669 -662
- package/dist/cdn/chunks/src-mXG-Of9A.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js → useCloudI18n-Xsih9yRH.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js.map → useCloudI18n-Xsih9yRH.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js → useEditorRoot-Beau2Z_T.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js.map → useEditorRoot-Beau2Z_T.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-BnJYydPv.js → useI18n-D8s7HtTn.js} +2 -2
- package/dist/cdn/chunks/{useI18n-BnJYydPv.js.map → useI18n-D8s7HtTn.js.map} +1 -1
- package/dist/cdn/chunks/{useLocalizedDisplay-DekV8qar.js → useLocalizedDisplay-Bgg4qpev.js} +6 -6
- package/dist/cdn/chunks/{useLocalizedDisplay-DekV8qar.js.map → useLocalizedDisplay-Bgg4qpev.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-Cbp3I7UN.js → useLogicTag-DLvWzWsp.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-Cbp3I7UN.js.map → useLogicTag-DLvWzWsp.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-1lrpNyR5.js → useMergeTag-B4FHCGGm.js} +5 -5
- package/dist/cdn/chunks/{useMergeTag-1lrpNyR5.js.map → useMergeTag-B4FHCGGm.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js → usePopoverPosition-esO6wjvU.js} +5 -5
- package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js.map → usePopoverPosition-esO6wjvU.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js → useScrollToBlock-CJuUu7Xj.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js.map → useScrollToBlock-CJuUu7Xj.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DZfmiv8V.js → withCurrentFont-QqBilClC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-DZfmiv8V.js.map → withCurrentFont-QqBilClC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +793 -796
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-XMnOOIEC.js → check-CcuCoJDh.js} +1 -1
- package/dist/{chevron-down-DmamTEWQ.js → chevron-down-BfYIbFbC.js} +1 -1
- package/dist/{chevron-right-BEFXOH27.js → chevron-right-DyjFqY35.js} +1 -1
- package/dist/{chevron-up-Dw7woXj8.js → chevron-up-BHEIxuS-.js} +1 -1
- package/dist/{circle-alert-BTKC9vkq.js → circle-alert-Tq7kAh9S.js} +1 -1
- package/dist/{clock-BVT5u2uG.js → clock-Df0ZiXwQ.js} +1 -1
- package/dist/{composables-DPgNn9GZ.js → composables-CRX6rncm.js} +978 -938
- package/dist/{createCloudRuntime-Bw8TLmQ8.js → createCloudRuntime-DplyIlsy.js} +3 -3
- package/dist/{createLucideIcon-CgDE3xAR.js → createLucideIcon-CfBdtoUw.js} +5 -5
- package/dist/{cdn/chunks/de-Cc6Ue0UD.js → de-BLFp3nWx.js} +8 -2
- package/dist/{dist-CBdk1Vcb.js → dist-BMUUt3zJ.js} +284 -277
- package/dist/{editor-modal-BeX6otLk.js → editor-modal-D9HT9bD6.js} +15 -15
- package/dist/{en-BX4FujAQ.js → en-DGGQJGbm.js} +8 -0
- package/dist/en-De3uAutQ.js +1 -0
- package/dist/{es-Do5b-MKU.js → es-DTY9qgLv.js} +8 -0
- package/dist/{extensions-QFAARrjF.js → extensions-Cm6K4SRX.js} +285 -285
- package/dist/{eye-ByMgHeA_.js → eye-B3psrAqd.js} +1 -1
- package/dist/{cdn/chunks/fr-S1n2Ebzp.js → fr-L4FqO9Gp.js} +8 -2
- package/dist/{image-Ch8tR35K.js → image-C3yuPDxx.js} +1 -1
- package/dist/index.d.ts +60 -12
- package/dist/{info-DzSD-Wpk.js → info-DKja7A68.js} +1 -1
- package/dist/{ja-DLwcq4bA.js → ja-6uOXkh4v.js} +8 -0
- package/dist/{keys-BCqskl51.js → keys-w_VRjoMu.js} +3 -3
- package/dist/{link-oDn9AR2w.js → link-DhzPI4Hn.js} +1 -1
- package/dist/{list-C5t07dp8.js → list-DVGn7Ik2.js} +1 -1
- package/dist/{loader-circle-k6xvKgUB.js → loader-circle-DqKWsMHO.js} +1 -1
- package/dist/{message-circle-C23R6OJR.js → message-circle-C4TonoBs.js} +1 -1
- package/dist/{cdn/chunks/nl-0JSWaZpT.js → nl-DCxuxwNq.js} +8 -2
- package/dist/{normalizeMergeTagMarkup-BS0nRvhq.js → normalizeMergeTagMarkup-Da9JAgx7.js} +75 -75
- package/dist/{package-C90eQ7NU.js → package-9OkiEO4S.js} +1 -1
- package/dist/{pencil-BK7GrQuA.js → pencil-M9vkOB7C.js} +1 -1
- package/dist/{plus-Cr0Mis63.js → plus-DxZiv9YC.js} +1 -1
- package/dist/{preRenderCustomBlocks-CiKvKd8V.js → preRenderCustomBlocks-CdqSp2P7.js} +4 -4
- package/dist/{cdn/chunks/pt-BR-D3VlIMDZ.js → pt-BR-CBkcrebr.js} +8 -2
- package/dist/{refresh-cw-_ZLOIEvA.js → refresh-cw-UY8_sdFG.js} +1 -1
- package/dist/{rotate-ccw-CB5wsHwv.js → rotate-ccw-BFTGCpHn.js} +1 -1
- package/dist/{sanitizeHtml-USjTyALR.js → sanitizeHtml-wBibnBF4.js} +6 -6
- package/dist/{search-BmrQNox8.js → search-RuGJnMEn.js} +1 -1
- package/dist/{send-blAsIBBg.js → send-DGB1ar02.js} +1 -1
- package/dist/{smartphone-BPpWYrwV.js → smartphone-CVA29CU_.js} +1 -1
- package/dist/{socialIcons-NvIg5ahU.js → socialIcons-CJD6OsI7.js} +427 -414
- package/dist/{sparkles-OqIxrNp-.js → sparkles-IHfEwEcd.js} +1 -1
- package/dist/{square-BP-V7iT-.js → square-_Cl44UU6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +851 -854
- package/dist/{text-align-start-4mwX2o-F.js → text-align-start-Dqk2Xt_Q.js} +13 -13
- package/dist/{trash-B99WixTA.js → trash-Cr7rD5Hh.js} +1 -1
- package/dist/{triangle-alert-CHMiDkHa.js → triangle-alert-CKcpwtUj.js} +1 -1
- package/dist/{upload-Cp8o-hrN.js → upload-DR9pqVON.js} +1 -1
- package/dist/{useCloudI18n-Dh2iydo1.js → useCloudI18n-BczJoFf4.js} +1 -1
- package/dist/{useEditorRoot-DY3mgcHm.js → useEditorRoot-BcXKhM_8.js} +1 -1
- package/dist/{useI18n-CgtvtF4C.js → useI18n-zeWYtWSv.js} +1 -1
- package/dist/useLocalizedDisplay-Cbhx208c.js +31 -0
- package/dist/{useLogicTag-D8zgkXfb.js → useLogicTag-DLkYos2Q.js} +3 -3
- package/dist/{useMergeTag-k7Kr0nMd.js → useMergeTag-IoWOO679.js} +5 -5
- package/dist/{usePopoverPosition-VDQjyX_A.js → usePopoverPosition-Br3zt_MQ.js} +4 -4
- package/dist/{useScrollToBlock-B35ObCGK.js → useScrollToBlock-BfOzc1Z6.js} +2 -2
- package/dist/{withCurrentFont-Bzeg_gfH.js → withCurrentFont-m_PHcOD0.js} +1 -1
- package/dist/{x-BIBStNMS.js → x-DZSFHafL.js} +1 -1
- package/package.json +10 -10
- package/dist/BlockPreviewCanvas-C23A6FRm.js +0 -140
- package/dist/WrapperBlock-BAT3T0Cz.js +0 -44
- package/dist/cdn/chunks/BlockPreviewCanvas-Dr-xGq6v.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-Bt2PXbQ0.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-NEE8qxYh.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-DFY-7YSs.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-DFY-7YSs.js.map +0 -1
- package/dist/cdn/chunks/ca-DIkMxYCN.js.map +0 -1
- package/dist/cdn/chunks/composables-nyxwrM27.js.map +0 -1
- package/dist/cdn/chunks/de-Cc6Ue0UD.js.map +0 -1
- package/dist/cdn/chunks/en-B6tLGRHq.js +0 -1
- package/dist/cdn/chunks/en-BX4FujAQ.js.map +0 -1
- package/dist/cdn/chunks/es-Do5b-MKU.js.map +0 -1
- package/dist/cdn/chunks/extensions-BcwkOjVq.js.map +0 -1
- package/dist/cdn/chunks/ja-DLwcq4bA.js.map +0 -1
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +0 -1
- package/dist/cdn/chunks/nl-0JSWaZpT.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-BrGw5jxk.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-D3VlIMDZ.js.map +0 -1
- package/dist/cdn/chunks/src-Diw9SLIe.js.map +0 -1
- package/dist/cdn/chunks/src-UR3AQocX.js +0 -683
- package/dist/cdn/chunks/src-UR3AQocX.js.map +0 -1
- package/dist/cdn/chunks/src-v47QHNmB.js.map +0 -1
- package/dist/en-Do0SU6tR.js +0 -1
- package/dist/useLocalizedDisplay-LdjosX4w.js +0 -31
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { A as e, B as t, D as n, F as r, Ft as i, H as a, L as o, M as s, Mt as c, N as l, O as u, P as d, Pt as f, Q as p, S as m, U as h, W as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, ct as w, d as T, et as E, f as D, g as O, j as k, k as A, l as j, nt as M, ot as N, q as ee, r as P, st as te, u as F, v as I, w as L, y as R } from "./vue.runtime.esm-bundler-BJXc_Mri.js";
|
|
2
2
|
import { c as z, o as ne, s as re } from "./runtime-dom.esm-bundler-DlHp8xgy.js";
|
|
3
|
-
import { $
|
|
4
|
-
import { B as ht, C as gt, D as _t, E as vt, F as yt, H as bt, O as xt, P as St, T as Ct, U as wt, _ as Tt, a as Et, f as Dt, h as Ot, k as kt, n as At, o as jt, t as Mt, u as Nt, v as Pt, w as Ft, x as It, y as Lt, z as Rt } from "./socialIcons-
|
|
3
|
+
import { $ as ie, At as ae, B as oe, Bt as se, F as B, G as ce, Gt as le, H as ue, Ht as de, J as fe, Jt as pe, K as me, Kt as he, L as ge, Lt as _e, M as ve, Mt as ye, N as be, Ot as xe, P as Se, Qt as Ce, R as we, Rt as Te, Ut as Ee, V as De, Vt as Oe, Wt as ke, Xt as Ae, Y as je, Yt as Me, Z as Ne, Zt as Pe, _t as Fe, at as Ie, bt as Le, c as Re, dt as ze, en as Be, f as Ve, g as He, in as Ue, it as We, j as Ge, k as Ke, lt as qe, mt as Je, nn as Ye, nt as Xe, o as Ze, p as Qe, pt as $e, q as et, qt as tt, rn as nt, rt, s as it, st as at, tn as ot, ut as st, v as ct, x as lt, xt as ut, y as dt, yt as ft, z as pt, zt as mt } from "./dist-BMUUt3zJ.js";
|
|
4
|
+
import { B as ht, C as gt, D as _t, E as vt, F as yt, H as bt, O as xt, P as St, T as Ct, U as wt, _ as Tt, a as Et, f as Dt, h as Ot, k as kt, n as At, o as jt, t as Mt, u as Nt, v as Pt, w as Ft, x as It, y as Lt, z as Rt } from "./socialIcons-CJD6OsI7.js";
|
|
5
5
|
import { t as zt } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
6
|
-
import { t as Bt } from "./createLucideIcon-
|
|
7
|
-
import { t as Vt } from "./clock-
|
|
8
|
-
import { n as Ht } from "./upload-
|
|
9
|
-
import { t as Ut } from "./image-
|
|
10
|
-
import { n as Wt, r as Gt, t as Kt } from "./sanitizeHtml-
|
|
11
|
-
import { t as qt } from "./message-circle-
|
|
12
|
-
import { t as Jt } from "./pencil-
|
|
13
|
-
import { t as Yt } from "./trash-
|
|
14
|
-
import { t as Xt } from "./triangle-alert-
|
|
15
|
-
import { $ as Zt, A as Qt, B as $t, C as en, D as tn, F as nn, G as rn, H as an, I as on, J as sn, K as cn, L as ln, M as un, N as dn, O as fn, P as pn,
|
|
16
|
-
import { t as
|
|
17
|
-
import { n as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { m as
|
|
21
|
-
import { _ as
|
|
22
|
-
import { a as
|
|
23
|
-
import { t as
|
|
24
|
-
import "./useCloudI18n-
|
|
25
|
-
import { t as
|
|
26
|
-
import { t as
|
|
27
|
-
import { a as
|
|
28
|
-
import { t as
|
|
29
|
-
import { r as
|
|
30
|
-
import { t as
|
|
31
|
-
import { t as
|
|
32
|
-
var
|
|
6
|
+
import { t as Bt } from "./createLucideIcon-CfBdtoUw.js";
|
|
7
|
+
import { t as Vt } from "./clock-Df0ZiXwQ.js";
|
|
8
|
+
import { n as Ht } from "./upload-DR9pqVON.js";
|
|
9
|
+
import { t as Ut } from "./image-C3yuPDxx.js";
|
|
10
|
+
import { n as Wt, r as Gt, t as Kt } from "./sanitizeHtml-wBibnBF4.js";
|
|
11
|
+
import { t as qt } from "./message-circle-C4TonoBs.js";
|
|
12
|
+
import { t as Jt } from "./pencil-M9vkOB7C.js";
|
|
13
|
+
import { t as Yt } from "./trash-Cr7rD5Hh.js";
|
|
14
|
+
import { t as Xt } from "./triangle-alert-CKcpwtUj.js";
|
|
15
|
+
import { $ as Zt, A as Qt, B as $t, C as en, D as tn, F as nn, G as rn, H as an, I as on, J as sn, K as cn, L as ln, M as un, N as dn, O as fn, P as pn, R as mn, S as hn, T as gn, U as _n, V as vn, W as yn, Y as bn, Z as xn, _ as Sn, a as Cn, at as wn, b as Tn, c as En, d as Dn, et as On, g as kn, h as An, i as jn, it as Mn, j as Nn, k as Pn, l as Fn, m as In, nt as Ln, ot as Rn, p as zn, q as Bn, r as Vn, rt as Hn, s as Un, st as Wn, tt as Gn, u as Kn, v as qn, w as Jn, x as Yn, y as Xn, z as Zn } from "./keys-w_VRjoMu.js";
|
|
16
|
+
import { t as Qn } from "./useI18n-zeWYtWSv.js";
|
|
17
|
+
import { n as $n } from "./useLocalizedDisplay-Cbhx208c.js";
|
|
18
|
+
import { t as er } from "./plural-CyxrJXL1.js";
|
|
19
|
+
import { t as tr } from "./languageName-DEEOhDWI.js";
|
|
20
|
+
import { m as nr, w as rr, x as ir } from "./styleConstants-CgiNKdnc.js";
|
|
21
|
+
import { _ as ar, h as or, v as sr, y as cr } from "./dist-CX7skkvG.js";
|
|
22
|
+
import { a as lr, c as ur, i as dr, l as fr } from "./dist-0alKVRc_.js";
|
|
23
|
+
import { t as pr } from "./useEditorRoot-BcXKhM_8.js";
|
|
24
|
+
import "./useCloudI18n-BczJoFf4.js";
|
|
25
|
+
import { t as mr } from "./useMergeTag-IoWOO679.js";
|
|
26
|
+
import { t as hr } from "./logger-BOu7oEtk.js";
|
|
27
|
+
import { a as gr, c as _r, i as vr, n as yr, o as br, t as xr } from "./usePopoverPosition-Br3zt_MQ.js";
|
|
28
|
+
import { t as Sr } from "./useLogicTag-DLkYos2Q.js";
|
|
29
|
+
import { r as Cr, t as wr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
30
|
+
import { t as Tr } from "./LoadingTrack-BG8cg9xi.js";
|
|
31
|
+
import { t as Er } from "./readableTextColor-BfZUGnVj.js";
|
|
32
|
+
var Dr = Bt({
|
|
33
33
|
name: "bookmark",
|
|
34
34
|
size: 24,
|
|
35
35
|
node: [["path", {
|
|
36
36
|
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",
|
|
37
37
|
key: "oz39mx"
|
|
38
38
|
}]]
|
|
39
|
-
}),
|
|
39
|
+
}), Or = Bt({
|
|
40
40
|
name: "box",
|
|
41
41
|
size: 24,
|
|
42
42
|
node: [
|
|
@@ -53,7 +53,7 @@ var Er = Bt({
|
|
|
53
53
|
key: "d0xqtd"
|
|
54
54
|
}]
|
|
55
55
|
]
|
|
56
|
-
}),
|
|
56
|
+
}), kr = Bt({
|
|
57
57
|
name: "eye-off",
|
|
58
58
|
size: 24,
|
|
59
59
|
node: [
|
|
@@ -74,7 +74,7 @@ var Er = Bt({
|
|
|
74
74
|
key: "1ooewy"
|
|
75
75
|
}]
|
|
76
76
|
]
|
|
77
|
-
}),
|
|
77
|
+
}), Ar = Bt({
|
|
78
78
|
name: "funnel",
|
|
79
79
|
size: 24,
|
|
80
80
|
node: [["path", {
|
|
@@ -82,7 +82,7 @@ var Er = Bt({
|
|
|
82
82
|
key: "sc7q7i"
|
|
83
83
|
}]],
|
|
84
84
|
aliases: ["filter"]
|
|
85
|
-
}),
|
|
85
|
+
}), jr = Bt({
|
|
86
86
|
name: "grip-vertical",
|
|
87
87
|
size: 24,
|
|
88
88
|
node: [
|
|
@@ -123,14 +123,14 @@ var Er = Bt({
|
|
|
123
123
|
key: "f4zoj3"
|
|
124
124
|
}]
|
|
125
125
|
]
|
|
126
|
-
}),
|
|
126
|
+
}), Mr = Bt({
|
|
127
127
|
name: "puzzle",
|
|
128
128
|
size: 24,
|
|
129
129
|
node: [["path", {
|
|
130
130
|
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",
|
|
131
131
|
key: "w46dr5"
|
|
132
132
|
}]]
|
|
133
|
-
}),
|
|
133
|
+
}), Nr = Bt({
|
|
134
134
|
name: "video",
|
|
135
135
|
size: 24,
|
|
136
136
|
node: [["path", {
|
|
@@ -144,11 +144,11 @@ var Er = Bt({
|
|
|
144
144
|
rx: "2",
|
|
145
145
|
key: "158x01"
|
|
146
146
|
}]]
|
|
147
|
-
}),
|
|
148
|
-
function
|
|
149
|
-
let r =
|
|
147
|
+
}), Pr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
148
|
+
function Fr(e, n) {
|
|
149
|
+
let r = pr(), i = null, a = null, o = null;
|
|
150
150
|
function s() {
|
|
151
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
151
|
+
return e.value ? Array.from(e.value.querySelectorAll(Pr)).filter((e) => e.offsetParent !== null) : [];
|
|
152
152
|
}
|
|
153
153
|
function c(e) {
|
|
154
154
|
if (e.key !== "Tab") return;
|
|
@@ -163,7 +163,7 @@ function Pr(e, n) {
|
|
|
163
163
|
o = null;
|
|
164
164
|
let t = s();
|
|
165
165
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
166
|
-
}), a =
|
|
166
|
+
}), a = lr(e, "keydown", c);
|
|
167
167
|
}
|
|
168
168
|
function u(e = {}) {
|
|
169
169
|
let t = e.restoreFocus !== !1;
|
|
@@ -177,8 +177,8 @@ function Pr(e, n) {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
// src/composables/useEmoji.ts
|
|
180
|
-
function
|
|
181
|
-
let [e, n] =
|
|
180
|
+
function Ir() {
|
|
181
|
+
let [e, n] = sr(!1), r = M([]), i = !1;
|
|
182
182
|
v(() => {
|
|
183
183
|
i = !0;
|
|
184
184
|
}), t(e, async (e) => {
|
|
@@ -202,7 +202,7 @@ function Fr() {
|
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
204
|
// src/composables/useBlockRegistry.ts
|
|
205
|
-
function
|
|
205
|
+
function Lr() {
|
|
206
206
|
let e = M(/* @__PURE__ */ new Map());
|
|
207
207
|
function t(t, n) {
|
|
208
208
|
e.value.set(t, n), te(e);
|
|
@@ -210,7 +210,7 @@ function Ir() {
|
|
|
210
210
|
function n(t, n) {
|
|
211
211
|
let r = `custom:${t.type}`, i = {
|
|
212
212
|
component: n,
|
|
213
|
-
createBlock: () =>
|
|
213
|
+
createBlock: () => Se(t),
|
|
214
214
|
definition: t
|
|
215
215
|
};
|
|
216
216
|
e.value.set(r, i), te(e);
|
|
@@ -236,9 +236,9 @@ function Ir() {
|
|
|
236
236
|
let t = a(e.customType);
|
|
237
237
|
if (!t) return o("Block definition not found");
|
|
238
238
|
try {
|
|
239
|
-
return await
|
|
239
|
+
return await B(await import("./liquid.browser-DUXEekoN.js")).parseAndRender(t.template, e.fieldValues);
|
|
240
240
|
} catch (t) {
|
|
241
|
-
return
|
|
241
|
+
return hr.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function c(t) {
|
|
@@ -255,7 +255,7 @@ function Ir() {
|
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
257
|
// src/composables/useFonts.ts
|
|
258
|
-
var
|
|
258
|
+
var Rr = [
|
|
259
259
|
{
|
|
260
260
|
value: "Arial",
|
|
261
261
|
label: "Arial"
|
|
@@ -284,19 +284,19 @@ var Lr = [
|
|
|
284
284
|
value: "Courier New",
|
|
285
285
|
label: "Courier New"
|
|
286
286
|
}
|
|
287
|
-
],
|
|
288
|
-
function
|
|
289
|
-
if (e === void 0 || e === !0) return [...
|
|
287
|
+
], zr = "Arial, sans-serif";
|
|
288
|
+
function Br(e) {
|
|
289
|
+
if (e === void 0 || e === !0) return [...Rr];
|
|
290
290
|
if (e === !1) return [];
|
|
291
291
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
292
292
|
for (let i of e) {
|
|
293
|
-
let e = i.toLowerCase(), a =
|
|
294
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
293
|
+
let e = i.toLowerCase(), a = Rr.find((t) => t.value.toLowerCase() === e);
|
|
294
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), hr.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Rr.map((e) => e.value).join(", ")}.`));
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
let t = E(e?.customFonts ?? []), n = E(!1), r =
|
|
298
|
+
function Vr(e) {
|
|
299
|
+
let t = E(e?.customFonts ?? []), n = E(!1), r = Br(e?.builtIns), i = C(() => e?.defaultFallback ?? zr), a = C(() => {
|
|
300
300
|
let e = [...r], n = t.value.map((e) => ({
|
|
301
301
|
value: e.name,
|
|
302
302
|
label: e.name,
|
|
@@ -307,18 +307,18 @@ function Br(e) {
|
|
|
307
307
|
function o(e) {
|
|
308
308
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
309
309
|
}
|
|
310
|
-
let s = e?.defaultFont ??
|
|
311
|
-
o(s) ||
|
|
310
|
+
let s = e?.defaultFont ?? zr.split(",")[0].trim();
|
|
311
|
+
o(s) || hr.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
312
312
|
function c() {
|
|
313
313
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
314
314
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
315
315
|
if (t) return t.value;
|
|
316
316
|
}
|
|
317
|
-
return
|
|
317
|
+
return zr;
|
|
318
318
|
}
|
|
319
319
|
let l = C(() => c());
|
|
320
320
|
function u(e) {
|
|
321
|
-
return
|
|
321
|
+
return Oe(e, {
|
|
322
322
|
customFonts: t.value,
|
|
323
323
|
defaultFallback: i.value
|
|
324
324
|
});
|
|
@@ -337,7 +337,7 @@ function Br(e) {
|
|
|
337
337
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
338
338
|
});
|
|
339
339
|
} catch (t) {
|
|
340
|
-
|
|
340
|
+
hr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
await Promise.allSettled(e), !f && (n.value = !0);
|
|
@@ -361,7 +361,7 @@ function Br(e) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
// src/composables/useThemeStyles.ts
|
|
364
|
-
var
|
|
364
|
+
var Hr = {
|
|
365
365
|
bg: "--tpl-bg",
|
|
366
366
|
bgElevated: "--tpl-bg-elevated",
|
|
367
367
|
bgHover: "--tpl-bg-hover",
|
|
@@ -385,10 +385,10 @@ var Vr = {
|
|
|
385
385
|
dangerLight: "--tpl-danger-light",
|
|
386
386
|
canvasBg: "--tpl-canvas-bg"
|
|
387
387
|
};
|
|
388
|
-
function
|
|
388
|
+
function Ur({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
389
389
|
return { themeStyles: C(() => {
|
|
390
390
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
391
|
-
if (a) for (let [e, t] of Object.entries(
|
|
391
|
+
if (a) for (let [e, t] of Object.entries(Hr)) {
|
|
392
392
|
let n = a[e];
|
|
393
393
|
n && (r[t] = n);
|
|
394
394
|
}
|
|
@@ -396,12 +396,12 @@ function Hr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
396
396
|
}) };
|
|
397
397
|
}
|
|
398
398
|
// src/utils/mergeTagNodeSpec.ts
|
|
399
|
-
function
|
|
400
|
-
return
|
|
399
|
+
function Wr(e, t, n) {
|
|
400
|
+
return ft(e, n) ? {
|
|
401
401
|
type: "logicMergeTagNode",
|
|
402
402
|
attrs: {
|
|
403
403
|
value: e,
|
|
404
|
-
keyword:
|
|
404
|
+
keyword: qe(e, n)
|
|
405
405
|
}
|
|
406
406
|
} : {
|
|
407
407
|
type: "mergeTagNode",
|
|
@@ -412,32 +412,32 @@ function Ur(e, t, n) {
|
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
// src/utils/insertLogicTag.ts
|
|
415
|
-
function
|
|
415
|
+
function Gr(e) {
|
|
416
416
|
return "before" in e && "after" in e;
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
if (!
|
|
420
|
-
e.chain().focus().insertContent(
|
|
418
|
+
function Kr(e, t, n) {
|
|
419
|
+
if (!Gr(t)) {
|
|
420
|
+
e.chain().focus().insertContent(Wr(t.value, t.label, n)).run();
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
let r =
|
|
423
|
+
let r = Wr(t.before, t.label, n), i = Wr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
424
424
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
425
425
|
}
|
|
426
426
|
// src/utils/linkColorExtension.ts
|
|
427
|
-
function
|
|
427
|
+
function qr(e) {
|
|
428
428
|
if (!e) return null;
|
|
429
429
|
let t = e.trim();
|
|
430
430
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function Jr(e) {
|
|
433
433
|
return e.extend({ addAttributes() {
|
|
434
434
|
return {
|
|
435
435
|
...this.parent?.(),
|
|
436
436
|
color: {
|
|
437
437
|
default: null,
|
|
438
|
-
parseHTML: (e) =>
|
|
438
|
+
parseHTML: (e) => qr(br(e.style.color)),
|
|
439
439
|
renderHTML: (e) => {
|
|
440
|
-
let t =
|
|
440
|
+
let t = qr(e.color);
|
|
441
441
|
return t ? { style: `color: ${t}` } : {};
|
|
442
442
|
}
|
|
443
443
|
}
|
|
@@ -445,9 +445,9 @@ function qr(e) {
|
|
|
445
445
|
} });
|
|
446
446
|
}
|
|
447
447
|
// src/composables/useRichTextLinkDialog.ts
|
|
448
|
-
function
|
|
448
|
+
function Yr(e, t = He.liquid, n = () => !0) {
|
|
449
449
|
let r = E(!1), i = E(""), a = E(""), o = E(null);
|
|
450
|
-
|
|
450
|
+
Fr(o, r);
|
|
451
451
|
function s() {
|
|
452
452
|
if (!n()) return;
|
|
453
453
|
let t = e.value?.getAttributes("link") ?? {};
|
|
@@ -458,7 +458,7 @@ function Jr(e, t = Ve.liquid, n = () => !0) {
|
|
|
458
458
|
if (i.value) {
|
|
459
459
|
let t = d(i.value);
|
|
460
460
|
if (t !== null) {
|
|
461
|
-
let n =
|
|
461
|
+
let n = qr(a.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
462
462
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
463
463
|
}
|
|
464
464
|
}
|
|
@@ -475,7 +475,7 @@ function Jr(e, t = Ve.liquid, n = () => !0) {
|
|
|
475
475
|
if (t.startsWith("#")) return t;
|
|
476
476
|
if (t.startsWith("//")) return `https:${t}`;
|
|
477
477
|
if (l.test(t)) return t;
|
|
478
|
-
let n =
|
|
478
|
+
let n = rt(t);
|
|
479
479
|
return n ? Qe.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
480
480
|
}
|
|
481
481
|
function f() {
|
|
@@ -500,13 +500,13 @@ function Jr(e, t = Ve.liquid, n = () => !0) {
|
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
502
|
// src/composables/useRichTextEditor.ts
|
|
503
|
-
function
|
|
504
|
-
let n = L(
|
|
503
|
+
function Xr(e) {
|
|
504
|
+
let n = L(qn, null), r = _r(), { mergeTags: i, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: c, autocomplete: l } = mr(), { canInsertLogicTag: u, isRequesting: d, requestLogicTag: f } = Sr(), p = L(Ln, null), m = (_(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = $e(c), g = M(null), v = n?.content ? $n(n) : null, y = () => se(v?.settings.value ?? { locale: "en" });
|
|
505
505
|
t(y, (e) => {
|
|
506
506
|
let t = g.value?.view.dom;
|
|
507
507
|
t && t.setAttribute("dir", e);
|
|
508
508
|
});
|
|
509
|
-
let { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } =
|
|
509
|
+
let { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Yr(g, c, () => r.value);
|
|
510
510
|
t(r, (e) => {
|
|
511
511
|
if (g.value?.setEditable(e, !1), !e) {
|
|
512
512
|
O();
|
|
@@ -514,7 +514,7 @@ function Yr(e) {
|
|
|
514
514
|
e && e.view.dispatch(e.state.tr);
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
|
-
let { start: j, stop: N } =
|
|
517
|
+
let { start: j, stop: N } = ar(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = M(null), P = E(!0), te = E(null), F = !1, I = null;
|
|
518
518
|
async function R() {
|
|
519
519
|
te.value = null, P.value = !0;
|
|
520
520
|
try {
|
|
@@ -545,7 +545,7 @@ function Yr(e) {
|
|
|
545
545
|
g.value = u, P.value = !1, j();
|
|
546
546
|
} catch (t) {
|
|
547
547
|
if (F) return;
|
|
548
|
-
|
|
548
|
+
hr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), te.value = t instanceof Error ? t.message : "Failed to load editor", P.value = !1;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
function z() {
|
|
@@ -563,7 +563,7 @@ function Yr(e) {
|
|
|
563
563
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
564
564
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
565
565
|
}
|
|
566
|
-
|
|
566
|
+
lr(document, "mousedown", re), A(() => {
|
|
567
567
|
F = !0, ne(), N(), g.value?.destroy();
|
|
568
568
|
});
|
|
569
569
|
async function ie() {
|
|
@@ -577,7 +577,7 @@ function Yr(e) {
|
|
|
577
577
|
async function ae() {
|
|
578
578
|
if (!r.value) return;
|
|
579
579
|
let e = await f();
|
|
580
|
-
!F && r.value && (e && g.value ?
|
|
580
|
+
!F && r.value && (e && g.value ? Kr(g.value, e, c) : g.value?.commands.focus());
|
|
581
581
|
}
|
|
582
582
|
return {
|
|
583
583
|
editor: g,
|
|
@@ -606,25 +606,25 @@ function Yr(e) {
|
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
// src/utils/activeEditorTracker.ts
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
let e =
|
|
612
|
-
return
|
|
609
|
+
var Zr = /* @__PURE__ */ new Set(), Qr = 0, $r = 0;
|
|
610
|
+
function ei() {
|
|
611
|
+
let e = ++$r;
|
|
612
|
+
return Zr.add(e), Qr === 0 && (Qr = e), {
|
|
613
613
|
id: e,
|
|
614
|
-
isActive: () =>
|
|
614
|
+
isActive: () => Zr.size <= 1 || Qr === e,
|
|
615
615
|
claim: () => {
|
|
616
|
-
|
|
616
|
+
Qr = e;
|
|
617
617
|
},
|
|
618
618
|
dispose: () => {
|
|
619
|
-
if (
|
|
620
|
-
let e = Array.from(
|
|
621
|
-
|
|
619
|
+
if (Zr.delete(e), Qr === e) {
|
|
620
|
+
let e = Array.from(Zr);
|
|
621
|
+
Qr = e[e.length - 1] ?? 0;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
// src/utils/resolveLintOptions.ts
|
|
627
|
-
function
|
|
627
|
+
function ti(e) {
|
|
628
628
|
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
629
629
|
return {
|
|
630
630
|
...e.lint,
|
|
@@ -633,8 +633,8 @@ function ei(e) {
|
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
// src/composables/usePreviewResolution.ts
|
|
636
|
-
var
|
|
637
|
-
function
|
|
636
|
+
var ni = 500;
|
|
637
|
+
function ri(e) {
|
|
638
638
|
let n = typeof e.resolvePreview == "function", r = E(null), i = E(!1), a = E(!1), o = 0, s = null;
|
|
639
639
|
function c() {
|
|
640
640
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -645,13 +645,13 @@ function ni(e) {
|
|
|
645
645
|
let n = ++o;
|
|
646
646
|
i.value = !0;
|
|
647
647
|
let s = {
|
|
648
|
-
content:
|
|
648
|
+
content: tt(e.getContent()),
|
|
649
649
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
650
650
|
};
|
|
651
651
|
try {
|
|
652
652
|
let e = await t(s);
|
|
653
653
|
if (n !== o) return;
|
|
654
|
-
if (!
|
|
654
|
+
if (!ut(e)) {
|
|
655
655
|
a.value = !0;
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
@@ -666,7 +666,7 @@ function ni(e) {
|
|
|
666
666
|
function u() {
|
|
667
667
|
n && (c(), r.value === null ? l() : s = setTimeout(() => {
|
|
668
668
|
s = null, l();
|
|
669
|
-
},
|
|
669
|
+
}, ni));
|
|
670
670
|
}
|
|
671
671
|
return t(() => [
|
|
672
672
|
e.isActive(),
|
|
@@ -689,7 +689,7 @@ function ni(e) {
|
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
691
|
// src/composables/useMergeTagPicker.ts
|
|
692
|
-
function
|
|
692
|
+
function ii() {
|
|
693
693
|
let e = E(!1), t = E([]), n = E(null), r = null;
|
|
694
694
|
function i(i, a) {
|
|
695
695
|
if (r) {
|
|
@@ -719,7 +719,7 @@ function ri() {
|
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
// src/composables/useLogicTagPicker.ts
|
|
722
|
-
function
|
|
722
|
+
function ai() {
|
|
723
723
|
let e = E(!1), t = E([]), n = E([]), r = null;
|
|
724
724
|
function i(i, a) {
|
|
725
725
|
if (r) {
|
|
@@ -749,23 +749,23 @@ function ii() {
|
|
|
749
749
|
};
|
|
750
750
|
}
|
|
751
751
|
// src/composables/useTemplateLint.ts
|
|
752
|
-
function
|
|
752
|
+
function oi(e) {
|
|
753
753
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
754
754
|
}
|
|
755
|
-
var
|
|
756
|
-
function
|
|
755
|
+
var si = !1;
|
|
756
|
+
function ci(e) {
|
|
757
757
|
let n = E([]), r = E(0), i = E(-1), a = t(e.content, () => {
|
|
758
758
|
r.value++;
|
|
759
|
-
}, { deep: !0 }), o = E(!1), s = E(!1), c = M(null), l =
|
|
759
|
+
}, { deep: !0 }), o = E(!1), s = E(!1), c = M(null), l = oi(e.options), u = null, d = !1;
|
|
760
760
|
l || f();
|
|
761
761
|
async function f() {
|
|
762
762
|
try {
|
|
763
763
|
let t = await import("@templatical/quality");
|
|
764
764
|
if (d) return;
|
|
765
|
-
c.value = { lintTemplate: t.lintTemplate }, o.value = !0, p(), u =
|
|
765
|
+
c.value = { lintTemplate: t.lintTemplate }, o.value = !0, p(), u = cr(r, p, { debounce: e.debounce ?? 500 });
|
|
766
766
|
} catch {
|
|
767
767
|
if (d) return;
|
|
768
|
-
s.value = !0,
|
|
768
|
+
s.value = !0, si || (si = !0, hr.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
771
|
function p() {
|
|
@@ -804,7 +804,7 @@ function si(e) {
|
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
// src/composables/useKeyboardReorder.ts
|
|
807
|
-
function
|
|
807
|
+
function li(e, t, n = []) {
|
|
808
808
|
let r = E(null), i = E(""), a = null;
|
|
809
809
|
function o(t) {
|
|
810
810
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -899,14 +899,14 @@ function ci(e, t, n = []) {
|
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
901
|
// src/composables/useUiTheme.ts
|
|
902
|
-
function
|
|
903
|
-
let t =
|
|
902
|
+
function ui(e) {
|
|
903
|
+
let t = ur("(prefers-color-scheme: dark)");
|
|
904
904
|
return { resolvedTheme: C(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
905
905
|
}
|
|
906
906
|
// src/composables/useCustomBlockStylesheets.ts
|
|
907
|
-
function
|
|
907
|
+
function di(e, t) {
|
|
908
908
|
return C(() => {
|
|
909
|
-
let n =
|
|
909
|
+
let n = fi(e.value.blocks);
|
|
910
910
|
if (n.size === 0) return [];
|
|
911
911
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
912
912
|
for (let e of n) {
|
|
@@ -918,75 +918,75 @@ function ui(e, t) {
|
|
|
918
918
|
return i;
|
|
919
919
|
});
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function fi(e) {
|
|
922
922
|
let t = /* @__PURE__ */ new Set();
|
|
923
|
-
return
|
|
923
|
+
return pi(e, t), t;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
for (let n of e) if (
|
|
925
|
+
function pi(e, t) {
|
|
926
|
+
for (let n of e) if (Fe(n)) t.add(n.customType);
|
|
927
927
|
else if (n.type === "section") {
|
|
928
928
|
let e = n.children;
|
|
929
929
|
if (!e) continue;
|
|
930
|
-
for (let n of e)
|
|
931
|
-
} else
|
|
930
|
+
for (let n of e) pi(n, t);
|
|
931
|
+
} else xe(n) && pi(n.children, t);
|
|
932
932
|
}
|
|
933
933
|
// src/utils/registerBuiltInBlocks.ts
|
|
934
|
-
var
|
|
934
|
+
var mi = [
|
|
935
935
|
{
|
|
936
936
|
type: "section",
|
|
937
|
-
createBlock:
|
|
937
|
+
createBlock: ue
|
|
938
938
|
},
|
|
939
939
|
{
|
|
940
940
|
type: "title",
|
|
941
|
-
createBlock:
|
|
941
|
+
createBlock: fe
|
|
942
942
|
},
|
|
943
943
|
{
|
|
944
944
|
type: "paragraph",
|
|
945
|
-
createBlock:
|
|
945
|
+
createBlock: De
|
|
946
946
|
},
|
|
947
947
|
{
|
|
948
948
|
type: "image",
|
|
949
|
-
createBlock:
|
|
949
|
+
createBlock: pt
|
|
950
950
|
},
|
|
951
951
|
{
|
|
952
952
|
type: "button",
|
|
953
|
-
createBlock:
|
|
953
|
+
createBlock: ve
|
|
954
954
|
},
|
|
955
955
|
{
|
|
956
956
|
type: "divider",
|
|
957
|
-
createBlock:
|
|
957
|
+
createBlock: ge
|
|
958
958
|
},
|
|
959
959
|
{
|
|
960
960
|
type: "video",
|
|
961
|
-
createBlock:
|
|
961
|
+
createBlock: je
|
|
962
962
|
},
|
|
963
963
|
{
|
|
964
964
|
type: "social",
|
|
965
|
-
createBlock:
|
|
965
|
+
createBlock: ce
|
|
966
966
|
},
|
|
967
967
|
{
|
|
968
968
|
type: "menu",
|
|
969
|
-
createBlock:
|
|
969
|
+
createBlock: oe
|
|
970
970
|
},
|
|
971
971
|
{
|
|
972
972
|
type: "table",
|
|
973
|
-
createBlock:
|
|
973
|
+
createBlock: et
|
|
974
974
|
},
|
|
975
975
|
{
|
|
976
976
|
type: "spacer",
|
|
977
|
-
createBlock:
|
|
977
|
+
createBlock: me
|
|
978
978
|
},
|
|
979
979
|
{
|
|
980
980
|
type: "html",
|
|
981
|
-
createBlock:
|
|
981
|
+
createBlock: we
|
|
982
982
|
},
|
|
983
983
|
{
|
|
984
984
|
type: "countdown",
|
|
985
|
-
createBlock:
|
|
985
|
+
createBlock: be
|
|
986
986
|
}
|
|
987
987
|
];
|
|
988
|
-
function
|
|
989
|
-
for (let n of
|
|
988
|
+
function hi(e, t) {
|
|
989
|
+
for (let n of mi) {
|
|
990
990
|
let r = t[n.type];
|
|
991
991
|
r && e.registerBuiltIn(n.type, {
|
|
992
992
|
component: r,
|
|
@@ -995,22 +995,22 @@ function mi(e, t) {
|
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
// src/utils/resolveHtmlBlockPreview.ts
|
|
998
|
-
function
|
|
998
|
+
function gi(e) {
|
|
999
999
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1000
1000
|
}
|
|
1001
1001
|
// src/utils/collectOffPaletteDefaults.ts
|
|
1002
|
-
function
|
|
1002
|
+
function _i(e) {
|
|
1003
1003
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
let r = new Set(e.map((e) =>
|
|
1007
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1005
|
+
function vi(e, t, n) {
|
|
1006
|
+
let r = new Set(e.map((e) => gr(e))), i = [], a = (e, t) => {
|
|
1007
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(gr(o)) && i.push(`${t}.${n}: ${o}`) : _i(o) && a(o, `${t}.${n}`);
|
|
1008
1008
|
}, o = t;
|
|
1009
|
-
for (let [e, t] of Object.entries(
|
|
1009
|
+
for (let [e, t] of Object.entries(Ze)) {
|
|
1010
1010
|
let n = o?.[e];
|
|
1011
1011
|
a({
|
|
1012
1012
|
...t,
|
|
1013
|
-
...
|
|
1013
|
+
..._i(n) ? n : {}
|
|
1014
1014
|
}, e);
|
|
1015
1015
|
}
|
|
1016
1016
|
return a({
|
|
@@ -1019,7 +1019,7 @@ function _i(e, t, n) {
|
|
|
1019
1019
|
}, "template"), i;
|
|
1020
1020
|
}
|
|
1021
1021
|
// src/utils/localizedBlockDefaults.ts
|
|
1022
|
-
function
|
|
1022
|
+
function yi(e) {
|
|
1023
1023
|
return {
|
|
1024
1024
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1025
1025
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -1027,62 +1027,62 @@ function vi(e) {
|
|
|
1027
1027
|
};
|
|
1028
1028
|
}
|
|
1029
1029
|
// src/i18n/index.ts
|
|
1030
|
-
var
|
|
1031
|
-
"./locales/ca.ts": () => import("./ca-
|
|
1032
|
-
"./locales/de.ts": () => import("./de-
|
|
1033
|
-
"./locales/en.ts": () => import("./en-
|
|
1034
|
-
"./locales/es.ts": () => import("./es-
|
|
1035
|
-
"./locales/fr.ts": () => import("./fr-
|
|
1036
|
-
"./locales/ja.ts": () => import("./ja-
|
|
1037
|
-
"./locales/nl.ts": () => import("./nl-
|
|
1038
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
1039
|
-
}),
|
|
1030
|
+
var bi = /* #__PURE__ */ Object.assign({
|
|
1031
|
+
"./locales/ca.ts": () => import("./ca-BJn8lcJx.js"),
|
|
1032
|
+
"./locales/de.ts": () => import("./de-BLFp3nWx.js"),
|
|
1033
|
+
"./locales/en.ts": () => import("./en-DGGQJGbm.js"),
|
|
1034
|
+
"./locales/es.ts": () => import("./es-DTY9qgLv.js"),
|
|
1035
|
+
"./locales/fr.ts": () => import("./fr-L4FqO9Gp.js"),
|
|
1036
|
+
"./locales/ja.ts": () => import("./ja-6uOXkh4v.js"),
|
|
1037
|
+
"./locales/nl.ts": () => import("./nl-DCxuxwNq.js"),
|
|
1038
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-CBkcrebr.js")
|
|
1039
|
+
}), xi = /* #__PURE__ */ Object.assign({
|
|
1040
1040
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
1041
1041
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
1042
1042
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
1043
1043
|
});
|
|
1044
|
-
function
|
|
1044
|
+
function Si(e) {
|
|
1045
1045
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1046
1046
|
}
|
|
1047
|
-
var
|
|
1048
|
-
function
|
|
1047
|
+
var Ci = Si(bi), wi = Si(xi);
|
|
1048
|
+
function Ti(e) {
|
|
1049
1049
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1052
|
-
let n =
|
|
1053
|
-
return t.find((e) =>
|
|
1051
|
+
function Ei(e, t) {
|
|
1052
|
+
let n = Ti(e);
|
|
1053
|
+
return t.find((e) => Ti(e) === n);
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return
|
|
1057
|
-
}
|
|
1058
|
-
function Di(e, t) {
|
|
1059
|
-
return Ti(e, t) ?? Ti(Ei(e), t);
|
|
1055
|
+
function Di(e) {
|
|
1056
|
+
return Ti(e).split("-")[0];
|
|
1060
1057
|
}
|
|
1061
1058
|
function Oi(e, t) {
|
|
1062
|
-
return
|
|
1059
|
+
return Ei(e, t) ?? Ei(Di(e), t);
|
|
1063
1060
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
return (await t()).default;
|
|
1061
|
+
function ki(e, t) {
|
|
1062
|
+
return Oi(e, t) ?? "en";
|
|
1067
1063
|
}
|
|
1068
1064
|
async function Ai(e) {
|
|
1069
|
-
let t = bi[`./locales
|
|
1065
|
+
let t = bi[`./locales/${ki(e, Ci)}.ts`];
|
|
1070
1066
|
return (await t()).default;
|
|
1071
1067
|
}
|
|
1072
|
-
function ji(e) {
|
|
1073
|
-
|
|
1068
|
+
async function ji(e) {
|
|
1069
|
+
let t = xi[`./locales/cloud/${ki(e, wi)}.ts`];
|
|
1070
|
+
return (await t()).default;
|
|
1074
1071
|
}
|
|
1075
1072
|
function Mi(e) {
|
|
1076
|
-
return
|
|
1073
|
+
return Oi(e, Ci) !== void 0;
|
|
1077
1074
|
}
|
|
1078
|
-
function Ni() {
|
|
1079
|
-
return
|
|
1075
|
+
function Ni(e) {
|
|
1076
|
+
return Oi(e, wi) !== void 0;
|
|
1080
1077
|
}
|
|
1081
1078
|
function Pi() {
|
|
1082
1079
|
return [...Ci];
|
|
1083
1080
|
}
|
|
1081
|
+
function Fi() {
|
|
1082
|
+
return [...wi];
|
|
1083
|
+
}
|
|
1084
1084
|
// src/i18n/contentDefaults.ts
|
|
1085
|
-
var
|
|
1085
|
+
var Ii = {
|
|
1086
1086
|
en: {
|
|
1087
1087
|
video: "Video",
|
|
1088
1088
|
days: "Days",
|
|
@@ -1148,17 +1148,17 @@ var Fi = {
|
|
|
1148
1148
|
expired: "このオファーは終了しました"
|
|
1149
1149
|
}
|
|
1150
1150
|
};
|
|
1151
|
-
Object.keys(
|
|
1152
|
-
var
|
|
1153
|
-
function Li(e) {
|
|
1154
|
-
if (!e) return Fi.en;
|
|
1155
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Ii.get(t);
|
|
1156
|
-
if (n) return Fi[n];
|
|
1157
|
-
let r = Ii.get(Ei(t));
|
|
1158
|
-
return r ? Fi[r] : Fi.en;
|
|
1159
|
-
}
|
|
1151
|
+
Object.keys(Ii);
|
|
1152
|
+
var Li = new Map(Object.keys(Ii).map((e) => [e.toLowerCase(), e]));
|
|
1160
1153
|
function Ri(e) {
|
|
1161
|
-
|
|
1154
|
+
if (!e) return Ii.en;
|
|
1155
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Li.get(t);
|
|
1156
|
+
if (n) return Ii[n];
|
|
1157
|
+
let r = Li.get(Di(t));
|
|
1158
|
+
return r ? Ii[r] : Ii.en;
|
|
1159
|
+
}
|
|
1160
|
+
function zi(e) {
|
|
1161
|
+
let t = Ri(e);
|
|
1162
1162
|
return {
|
|
1163
1163
|
video: { alt: t.video },
|
|
1164
1164
|
countdown: {
|
|
@@ -1171,7 +1171,7 @@ function Ri(e) {
|
|
|
1171
1171
|
};
|
|
1172
1172
|
}
|
|
1173
1173
|
// src/utils/collectColorFieldIssues.ts
|
|
1174
|
-
function
|
|
1174
|
+
function Bi(e, t) {
|
|
1175
1175
|
let n = [], r = (r, i) => {
|
|
1176
1176
|
let a = Pt(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1177
1177
|
if (a.invalidPresets.length > 0 && n.push({
|
|
@@ -1184,8 +1184,8 @@ function zi(e, t) {
|
|
|
1184
1184
|
id: s("allow-custom-ignored"),
|
|
1185
1185
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1186
1186
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1187
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1188
|
-
e !== "" && !t.has(
|
|
1187
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => gr(e)));
|
|
1188
|
+
e !== "" && !t.has(gr(e)) && n.push({
|
|
1189
1189
|
id: s("off-palette-default"),
|
|
1190
1190
|
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.`
|
|
1191
1191
|
});
|
|
@@ -1196,7 +1196,7 @@ function zi(e, t) {
|
|
|
1196
1196
|
return n;
|
|
1197
1197
|
}
|
|
1198
1198
|
// src/utils/keyboardShortcuts.ts
|
|
1199
|
-
function
|
|
1199
|
+
function Vi(e) {
|
|
1200
1200
|
for (let t of e.composedPath()) {
|
|
1201
1201
|
if (!(t instanceof HTMLElement)) continue;
|
|
1202
1202
|
if (t.isContentEditable) return !0;
|
|
@@ -1205,14 +1205,14 @@ function Bi(e) {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
return !1;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1208
|
+
function Hi(e, t) {
|
|
1209
1209
|
let n = e.metaKey || e.ctrlKey;
|
|
1210
1210
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1211
1211
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1212
|
-
if (
|
|
1212
|
+
if (Vi(e)) return;
|
|
1213
1213
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1214
1214
|
} else {
|
|
1215
|
-
if (t.isPicking?.() && !
|
|
1215
|
+
if (t.isPicking?.() && !Vi(e)) {
|
|
1216
1216
|
if (e.key === "Escape") {
|
|
1217
1217
|
e.preventDefault(), t.onCancelPick?.();
|
|
1218
1218
|
return;
|
|
@@ -1226,123 +1226,139 @@ function Vi(e, t) {
|
|
|
1226
1226
|
return;
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1229
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Vi(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1230
1230
|
}
|
|
1231
1231
|
}
|
|
1232
1232
|
// src/utils/blockComponentResolver.ts
|
|
1233
|
-
function
|
|
1233
|
+
function Ui(e, t) {
|
|
1234
1234
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1235
1235
|
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Wi(e, t, n) {
|
|
1238
1238
|
if (t) {
|
|
1239
1239
|
let n = t.getComponent(e);
|
|
1240
1240
|
if (n) return n;
|
|
1241
1241
|
}
|
|
1242
1242
|
return n[e.type] ?? null;
|
|
1243
1243
|
}
|
|
1244
|
-
var
|
|
1245
|
-
function
|
|
1244
|
+
var Gi = "--tpl-block-bg-layer", Ki = "--tpl-email-frame-width", qi = "tpl-has-bg-image";
|
|
1245
|
+
function Ji(e, t) {
|
|
1246
1246
|
if (t === null) return {};
|
|
1247
|
-
let n =
|
|
1247
|
+
let n = mt(e);
|
|
1248
1248
|
if (n === null) return {};
|
|
1249
|
-
let r = t?.trim(), i = r ?
|
|
1249
|
+
let r = t?.trim(), i = r ? Xe(r) : n.url;
|
|
1250
1250
|
return {
|
|
1251
1251
|
backgroundImage: `url("${i}")`,
|
|
1252
1252
|
backgroundSize: n.size,
|
|
1253
1253
|
backgroundPosition: n.position,
|
|
1254
1254
|
backgroundRepeat: n.repeat,
|
|
1255
|
-
[
|
|
1255
|
+
[Gi]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1256
1256
|
};
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return e &&
|
|
1258
|
+
function Yi(e) {
|
|
1259
|
+
return e && Gi in e ? qi : void 0;
|
|
1260
1260
|
}
|
|
1261
|
-
var
|
|
1261
|
+
var Xi = {
|
|
1262
1262
|
top: "flex-start",
|
|
1263
1263
|
middle: "center",
|
|
1264
1264
|
bottom: "flex-end"
|
|
1265
1265
|
};
|
|
1266
|
-
function
|
|
1267
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1266
|
+
function Zi(e, t) {
|
|
1267
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Qi(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1268
1268
|
return {
|
|
1269
1269
|
display: "flex",
|
|
1270
1270
|
flexDirection: "column",
|
|
1271
|
-
justifyContent:
|
|
1271
|
+
justifyContent: Xi[e.verticalAlign],
|
|
1272
1272
|
boxSizing: "border-box",
|
|
1273
1273
|
...n
|
|
1274
1274
|
};
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function Qi(e, t) {
|
|
1277
1277
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function $i(e, t = {}) {
|
|
1280
1280
|
if (e.type === "wrapper") return {};
|
|
1281
1281
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1282
1282
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1283
1283
|
backgroundColor: r || "transparent"
|
|
1284
1284
|
};
|
|
1285
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1286
|
-
let n =
|
|
1285
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ve.paragraphGap : Ve.paragraphGap}px`), e.type === "section") {
|
|
1286
|
+
let n = Ue(e.borderRadius);
|
|
1287
1287
|
n !== null && (i.borderRadius = n);
|
|
1288
|
-
let r =
|
|
1289
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1288
|
+
let r = de(e);
|
|
1289
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Zi(r, t.heroBoxWidth)), Object.assign(i, Ji({
|
|
1290
1290
|
...e.backgroundImage,
|
|
1291
1291
|
size: "cover",
|
|
1292
1292
|
repeat: !1
|
|
1293
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1293
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, ta(e.border)), Object.assign(i, Ji(e.backgroundImage, t.backgroundImageUrl)));
|
|
1294
1294
|
}
|
|
1295
1295
|
return i;
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1298
|
-
return e.type === "section" ?
|
|
1297
|
+
function ea(e, t, n, r) {
|
|
1298
|
+
return e.type === "section" ? $i(e, {
|
|
1299
1299
|
backgroundImageUrl: gt(t, e.backgroundImage, n),
|
|
1300
1300
|
heroBoxWidth: r
|
|
1301
|
-
}) :
|
|
1301
|
+
}) : $i(e);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1303
|
+
function ta(e) {
|
|
1304
1304
|
let t = {};
|
|
1305
|
-
for (let [n, r] of Object.entries(
|
|
1305
|
+
for (let [n, r] of Object.entries(nt(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1306
1306
|
return t;
|
|
1307
1307
|
}
|
|
1308
|
-
|
|
1308
|
+
var na = {
|
|
1309
|
+
width: "100cqw",
|
|
1310
|
+
maxWidth: "none",
|
|
1311
|
+
marginInline: "calc(50% - 50cqw)",
|
|
1312
|
+
boxSizing: "border-box"
|
|
1313
|
+
};
|
|
1314
|
+
function ra(e) {
|
|
1315
|
+
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1316
|
+
}
|
|
1317
|
+
function ia(e) {
|
|
1318
|
+
let t = {
|
|
1319
|
+
width: "var(--tpl-email-frame-width)",
|
|
1320
|
+
maxWidth: "100%",
|
|
1321
|
+
marginInline: "auto",
|
|
1322
|
+
boxSizing: "border-box"
|
|
1323
|
+
};
|
|
1324
|
+
return e && (t.padding = ra(e)), t;
|
|
1325
|
+
}
|
|
1326
|
+
function aa(e, t = {}) {
|
|
1309
1327
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1310
1328
|
let n = e.wrapper, r = {};
|
|
1311
|
-
n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && (r.padding =
|
|
1312
|
-
|
|
1313
|
-
|
|
1329
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = ra(n.padding)), !n.fullWidth) {
|
|
1330
|
+
let e = Ue(n.borderRadius);
|
|
1331
|
+
e !== null && (r.borderRadius = e);
|
|
1332
|
+
}
|
|
1333
|
+
return Object.assign(r, Ji(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, na), r;
|
|
1314
1334
|
}
|
|
1315
|
-
function
|
|
1335
|
+
function oa(e, t = {}) {
|
|
1316
1336
|
if (e.type !== "wrapper") return null;
|
|
1317
1337
|
let n = {};
|
|
1318
|
-
|
|
1319
|
-
let t = e.styles.padding;
|
|
1320
|
-
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
1321
|
-
}
|
|
1322
|
-
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Ki(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
1338
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = ra(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Ji(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, na), n;
|
|
1323
1339
|
}
|
|
1324
1340
|
// src/utils/mergeTagLabelSegments.ts
|
|
1325
|
-
function
|
|
1341
|
+
function sa(e, t, n, r = !1) {
|
|
1326
1342
|
if (!e) return [];
|
|
1327
1343
|
let i = [], a = 0;
|
|
1328
|
-
for (let o of
|
|
1344
|
+
for (let o of pe(e, n)) {
|
|
1329
1345
|
o.index > a && i.push({
|
|
1330
1346
|
type: "text",
|
|
1331
1347
|
value: e.slice(a, o.index)
|
|
1332
1348
|
});
|
|
1333
1349
|
let s = o.value;
|
|
1334
|
-
if (
|
|
1335
|
-
let e = r ?
|
|
1350
|
+
if (Le(s, n)) {
|
|
1351
|
+
let e = r ? ze(s, t) : void 0;
|
|
1336
1352
|
i.push(e === void 0 ? {
|
|
1337
1353
|
type: "tag",
|
|
1338
|
-
value:
|
|
1354
|
+
value: st(s, t)
|
|
1339
1355
|
} : {
|
|
1340
1356
|
type: "text",
|
|
1341
1357
|
value: e
|
|
1342
1358
|
});
|
|
1343
|
-
} else
|
|
1359
|
+
} else ft(s, n) ? i.push({
|
|
1344
1360
|
type: "tag",
|
|
1345
|
-
value:
|
|
1361
|
+
value: qe(s, n)
|
|
1346
1362
|
}) : i.push({
|
|
1347
1363
|
type: "text",
|
|
1348
1364
|
value: s
|
|
@@ -1355,27 +1371,27 @@ function na(e, t, n, r = !1) {
|
|
|
1355
1371
|
}), i;
|
|
1356
1372
|
}
|
|
1357
1373
|
// src/components/MergeTagPreviewText.vue
|
|
1358
|
-
var
|
|
1374
|
+
var ca = R({
|
|
1359
1375
|
name: "MergeTagPreviewText",
|
|
1360
1376
|
props: { text: {
|
|
1361
1377
|
type: String,
|
|
1362
1378
|
required: !0
|
|
1363
1379
|
} },
|
|
1364
1380
|
setup(e) {
|
|
1365
|
-
let t = L(pn,
|
|
1381
|
+
let t = L(pn, vn), n = L($t, He.liquid), r = L(Rn, null), i = C(() => sa(e.text, t.value, n, r?.value ?? !1));
|
|
1366
1382
|
return () => i.value.map((e, t) => e.type === "tag" ? m("span", {
|
|
1367
1383
|
key: t,
|
|
1368
1384
|
class: "tpl-merge-tag-label"
|
|
1369
1385
|
}, e.value) : e.value);
|
|
1370
1386
|
}
|
|
1371
|
-
}),
|
|
1387
|
+
}), la = ["href"], ua = /* @__PURE__ */ R({
|
|
1372
1388
|
__name: "ButtonBlock",
|
|
1373
1389
|
props: {
|
|
1374
1390
|
block: {},
|
|
1375
1391
|
viewport: {}
|
|
1376
1392
|
},
|
|
1377
1393
|
setup(e) {
|
|
1378
|
-
let t = e, n =
|
|
1394
|
+
let t = e, n = Wn(Tn, "ButtonBlock");
|
|
1379
1395
|
function r(e) {
|
|
1380
1396
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1381
1397
|
}
|
|
@@ -1388,23 +1404,23 @@ var ra = R({
|
|
|
1388
1404
|
fontSize: `${t.block.fontSize}px`,
|
|
1389
1405
|
fontWeight: r(t.block.fontWeight),
|
|
1390
1406
|
textDecoration: "none",
|
|
1391
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1407
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : Ue(t.block.borderRadius) ?? "0px",
|
|
1392
1408
|
textAlign: "center"
|
|
1393
1409
|
};
|
|
1394
|
-
return Object.assign(e,
|
|
1410
|
+
return Object.assign(e, ta(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1395
1411
|
}), a = C(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1396
1412
|
return (t, n) => (s(), D("div", { style: f(a.value) }, [j("a", {
|
|
1397
1413
|
href: e.block.url || "#",
|
|
1398
1414
|
style: f(i.value),
|
|
1399
1415
|
class: "tpl:cursor-default",
|
|
1400
1416
|
onClick: n[0] ||= z(() => {}, ["prevent"])
|
|
1401
|
-
}, [y(
|
|
1417
|
+
}, [y(ca, { text: e.block.text }, null, 8, ["text"])], 12, la)], 4));
|
|
1402
1418
|
}
|
|
1403
|
-
}),
|
|
1419
|
+
}), da = ["innerHTML"], fa = [
|
|
1404
1420
|
"src",
|
|
1405
1421
|
"width",
|
|
1406
1422
|
"height"
|
|
1407
|
-
],
|
|
1423
|
+
], pa = /* @__PURE__ */ R({
|
|
1408
1424
|
__name: "CustomBlockIcon",
|
|
1409
1425
|
props: {
|
|
1410
1426
|
icon: {},
|
|
@@ -1420,33 +1436,33 @@ var ra = R({
|
|
|
1420
1436
|
height: `${n.value}px`
|
|
1421
1437
|
}),
|
|
1422
1438
|
innerHTML: a.value
|
|
1423
|
-
}, null, 12,
|
|
1439
|
+
}, null, 12, da)) : i.value ? (s(), D("img", {
|
|
1424
1440
|
key: 1,
|
|
1425
1441
|
src: e.icon,
|
|
1426
1442
|
width: n.value,
|
|
1427
1443
|
height: n.value,
|
|
1428
1444
|
class: "tpl:inline-block",
|
|
1429
1445
|
alt: ""
|
|
1430
|
-
}, null, 8,
|
|
1446
|
+
}, null, 8, fa)) : (s(), F(w(Or), {
|
|
1431
1447
|
key: 2,
|
|
1432
1448
|
size: n.value,
|
|
1433
1449
|
"stroke-width": 1.5
|
|
1434
1450
|
}, null, 8, ["size"]));
|
|
1435
1451
|
}
|
|
1436
|
-
}),
|
|
1452
|
+
}), ma = { class: "tpl:w-full" }, ha = {
|
|
1437
1453
|
key: 0,
|
|
1438
1454
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1439
|
-
},
|
|
1455
|
+
}, ga = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, _a = {
|
|
1440
1456
|
key: 1,
|
|
1441
1457
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1442
|
-
},
|
|
1458
|
+
}, va = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ya = {
|
|
1443
1459
|
key: 2,
|
|
1444
1460
|
class: "tpl:relative"
|
|
1445
|
-
},
|
|
1461
|
+
}, ba = ["innerHTML"], xa = {
|
|
1446
1462
|
key: 0,
|
|
1447
1463
|
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]",
|
|
1448
1464
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1449
|
-
},
|
|
1465
|
+
}, Sa = /* @__PURE__ */ R({
|
|
1450
1466
|
__name: "CustomBlock",
|
|
1451
1467
|
props: {
|
|
1452
1468
|
block: {},
|
|
@@ -1454,7 +1470,7 @@ var ra = R({
|
|
|
1454
1470
|
},
|
|
1455
1471
|
emits: ["fetchData"],
|
|
1456
1472
|
setup(n, { emit: r }) {
|
|
1457
|
-
let a = n, o = r, { t: c } =
|
|
1473
|
+
let a = n, o = r, { t: c } = Qn(), l = L(Fn, null), u = E(""), d = C(() => Kt(u.value)), f = E(!1), p = C(() => l?.getDefinition(a.block.customType)), m = C(() => !!p.value), h = C(() => a.block), { isFetching: g, fetch: _, needsFetch: v, hasDataSource: b } = ht({
|
|
1458
1474
|
definition: p,
|
|
1459
1475
|
block: h,
|
|
1460
1476
|
onUpdate: (e, t) => {
|
|
@@ -1463,10 +1479,10 @@ var ra = R({
|
|
|
1463
1479
|
dataSourceFetched: t
|
|
1464
1480
|
});
|
|
1465
1481
|
}
|
|
1466
|
-
}), x = L(pn,
|
|
1482
|
+
}), x = L(pn, vn), S = L(Rn, null), k = C(() => {
|
|
1467
1483
|
if (!S?.value) return a.block;
|
|
1468
1484
|
let e = {};
|
|
1469
|
-
for (let [t, n] of Object.entries(a.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1485
|
+
for (let [t, n] of Object.entries(a.block.fieldValues)) e[t] = typeof n == "string" ? ot(n, x.value) : n;
|
|
1470
1486
|
return {
|
|
1471
1487
|
...a.block,
|
|
1472
1488
|
fieldValues: e
|
|
@@ -1483,17 +1499,17 @@ var ra = R({
|
|
|
1483
1499
|
}
|
|
1484
1500
|
}
|
|
1485
1501
|
}
|
|
1486
|
-
let M =
|
|
1502
|
+
let M = or(A, 150);
|
|
1487
1503
|
return e(() => {
|
|
1488
1504
|
A();
|
|
1489
1505
|
}), t(() => a.block.fieldValues, () => {
|
|
1490
1506
|
M();
|
|
1491
1507
|
}, { deep: !0 }), t(() => S?.value, () => {
|
|
1492
1508
|
M();
|
|
1493
|
-
}), (e, t) => (s(), D("div",
|
|
1509
|
+
}), (e, t) => (s(), D("div", ma, [m.value ? f.value ? (s(), D("div", _a, [y(w(Xt), {
|
|
1494
1510
|
size: 24,
|
|
1495
1511
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1496
|
-
}), j("span",
|
|
1512
|
+
}), j("span", va, i(w(c).customBlocks.renderError), 1)])) : (s(), D("div", ya, [j("div", { innerHTML: d.value }, null, 8, ba), w(b) && w(v) ? (s(), D("div", xa, [w(g) ? (s(), F(Tr, {
|
|
1497
1513
|
key: 1,
|
|
1498
1514
|
class: "tpl:w-48"
|
|
1499
1515
|
})) : (s(), D("button", {
|
|
@@ -1501,16 +1517,16 @@ var ra = R({
|
|
|
1501
1517
|
type: "button",
|
|
1502
1518
|
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)]",
|
|
1503
1519
|
onClick: t[0] ||= z((...e) => w(_) && w(_)(...e), ["stop"])
|
|
1504
|
-
}, [p.value?.icon ? (s(), F(
|
|
1520
|
+
}, [p.value?.icon ? (s(), F(pa, {
|
|
1505
1521
|
key: 0,
|
|
1506
1522
|
icon: p.value.icon,
|
|
1507
1523
|
size: 16
|
|
1508
|
-
}, null, 8, ["icon"])) : T("", !0), O(" " + i(p.value?.dataSource?.label || w(c).customBlocks.dataSource.fetchButton), 1)]))])) : T("", !0)])) : (s(), D("div",
|
|
1524
|
+
}, null, 8, ["icon"])) : T("", !0), O(" " + i(p.value?.dataSource?.label || w(c).customBlocks.dataSource.fetchButton), 1)]))])) : T("", !0)])) : (s(), D("div", ha, [y(w(Mr), {
|
|
1509
1525
|
size: 24,
|
|
1510
1526
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1511
|
-
}), j("span",
|
|
1527
|
+
}), j("span", ga, i(w(c).customBlocks.definitionNotFound), 1)]))]));
|
|
1512
1528
|
}
|
|
1513
|
-
}),
|
|
1529
|
+
}), Ca = { class: "tpl:w-full" }, wa = /* @__PURE__ */ R({
|
|
1514
1530
|
__name: "DividerBlock",
|
|
1515
1531
|
props: {
|
|
1516
1532
|
block: {},
|
|
@@ -1522,28 +1538,28 @@ var ra = R({
|
|
|
1522
1538
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1523
1539
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1524
1540
|
}));
|
|
1525
|
-
return (e, t) => (s(), D("div",
|
|
1541
|
+
return (e, t) => (s(), D("div", Ca, [j("hr", {
|
|
1526
1542
|
class: "tpl:m-0 tpl:border-none",
|
|
1527
1543
|
style: f(n.value)
|
|
1528
1544
|
}, null, 4)]));
|
|
1529
1545
|
}
|
|
1530
|
-
}),
|
|
1546
|
+
}), Ta = { class: "tpl:w-full" }, Ea = ["srcdoc", "title"], Da = {
|
|
1531
1547
|
key: 1,
|
|
1532
1548
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
1533
|
-
},
|
|
1549
|
+
}, Oa = {
|
|
1534
1550
|
key: 0,
|
|
1535
1551
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1536
|
-
},
|
|
1552
|
+
}, ka = {
|
|
1537
1553
|
key: 1,
|
|
1538
1554
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1539
|
-
},
|
|
1555
|
+
}, Aa = /* @__PURE__ */ R({
|
|
1540
1556
|
__name: "HtmlBlock",
|
|
1541
1557
|
props: {
|
|
1542
1558
|
block: {},
|
|
1543
1559
|
viewport: {}
|
|
1544
1560
|
},
|
|
1545
1561
|
setup(e) {
|
|
1546
|
-
let n = e, { t: r } =
|
|
1562
|
+
let n = e, { t: r } = Qn(), a = L(hn, !1), o = C(() => n.block.content.trim().length > 0), c = C(() => a && o.value), l = L(pn, vn), u = L(Rn, null), d = C(() => u?.value ? ot(n.block.content, l.value) : n.block.content), p = E(null), m = E(60), h = null;
|
|
1547
1563
|
function g() {
|
|
1548
1564
|
let e = p.value?.contentDocument;
|
|
1549
1565
|
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1557,7 +1573,7 @@ var ra = R({
|
|
|
1557
1573
|
e || (h?.disconnect(), h = null);
|
|
1558
1574
|
}), A(() => {
|
|
1559
1575
|
h?.disconnect(), h = null;
|
|
1560
|
-
}), (e, t) => (s(), D("div",
|
|
1576
|
+
}), (e, t) => (s(), D("div", Ta, [c.value ? (s(), D("iframe", {
|
|
1561
1577
|
key: 0,
|
|
1562
1578
|
ref_key: "iframeRef",
|
|
1563
1579
|
ref: p,
|
|
@@ -1567,18 +1583,18 @@ var ra = R({
|
|
|
1567
1583
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1568
1584
|
style: f({ height: `${m.value}px` }),
|
|
1569
1585
|
onLoad: _
|
|
1570
|
-
}, null, 44,
|
|
1586
|
+
}, null, 44, Ea)) : (s(), D("div", Da, [y(w(kt), {
|
|
1571
1587
|
size: 24,
|
|
1572
1588
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1573
|
-
}), o.value ? (s(), D("span",
|
|
1589
|
+
}), o.value ? (s(), D("span", Oa, i(w(r).html.preview), 1)) : (s(), D("span", ka, i(w(r).html.empty), 1))]))]));
|
|
1574
1590
|
}
|
|
1575
|
-
}),
|
|
1591
|
+
}), ja = ["data-drop-enabled"], Ma = ["href"], Na = ["src", "alt"], Pa = ["src", "alt"], Fa = {
|
|
1576
1592
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1577
1593
|
style: { opacity: "0.7" }
|
|
1578
|
-
},
|
|
1594
|
+
}, Ia = ["href"], La = ["src", "alt"], Ra = ["src", "alt"], za = {
|
|
1579
1595
|
key: 4,
|
|
1580
1596
|
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)]"
|
|
1581
|
-
},
|
|
1597
|
+
}, Ba = ["aria-label"], Va = { key: 1 }, Ha = /* @__PURE__ */ R({
|
|
1582
1598
|
__name: "ImageBlock",
|
|
1583
1599
|
props: {
|
|
1584
1600
|
block: {},
|
|
@@ -1586,7 +1602,7 @@ var ra = R({
|
|
|
1586
1602
|
},
|
|
1587
1603
|
emits: ["update"],
|
|
1588
1604
|
setup(e, { emit: t }) {
|
|
1589
|
-
let n = e, r = t, { t: a } =
|
|
1605
|
+
let n = e, r = t, { t: a } = Qn(), { syntax: o } = mr(), c = C(() => Ke(n.block.src, o));
|
|
1590
1606
|
function l(e) {
|
|
1591
1607
|
let t = {
|
|
1592
1608
|
src: e.url,
|
|
@@ -1599,7 +1615,7 @@ var ra = R({
|
|
|
1599
1615
|
blocked: c,
|
|
1600
1616
|
apply: l
|
|
1601
1617
|
}), _ = C(() => ({ textAlign: n.block.align })), v = C(() => {
|
|
1602
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1618
|
+
let e = n.block.border, t = ["left", "right"].map((t) => Ye(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1603
1619
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1604
1620
|
}), b = C(() => {
|
|
1605
1621
|
let e = n.block.align;
|
|
@@ -1607,8 +1623,8 @@ var ra = R({
|
|
|
1607
1623
|
maxWidth: "100%",
|
|
1608
1624
|
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1609
1625
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1610
|
-
borderRadius:
|
|
1611
|
-
|
|
1626
|
+
borderRadius: Ue(n.block.borderRadius) ?? void 0,
|
|
1627
|
+
...ta(n.block.border),
|
|
1612
1628
|
display: "block",
|
|
1613
1629
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1614
1630
|
marginRight: e === "center" ? "auto" : void 0
|
|
@@ -1637,13 +1653,13 @@ var ra = R({
|
|
|
1637
1653
|
src: w(S),
|
|
1638
1654
|
alt: e.block.alt || w(a).image.altTextPlaceholder,
|
|
1639
1655
|
style: f(b.value)
|
|
1640
|
-
}, null, 12,
|
|
1656
|
+
}, null, 12, Na)], 8, Ma)) : (s(), D("img", {
|
|
1641
1657
|
key: 1,
|
|
1642
1658
|
class: "tpl:border-0",
|
|
1643
1659
|
src: w(S),
|
|
1644
1660
|
alt: e.block.alt,
|
|
1645
1661
|
style: f(b.value)
|
|
1646
|
-
}, null, 12,
|
|
1662
|
+
}, null, 12, Pa))], 64)) : e.block.src && c.value ? (s(), D("div", {
|
|
1647
1663
|
key: 2,
|
|
1648
1664
|
class: "tpl:!flex tpl:box-border tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1649
1665
|
style: f([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, b.value])
|
|
@@ -1652,7 +1668,7 @@ var ra = R({
|
|
|
1652
1668
|
"stroke-width": 1.5,
|
|
1653
1669
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1654
1670
|
style: { opacity: "0.5" }
|
|
1655
|
-
}), j("span",
|
|
1671
|
+
}), j("span", Fa, [y(ca, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), D(P, { key: 3 }, [e.block.linkUrl ? (s(), D("a", {
|
|
1656
1672
|
key: 0,
|
|
1657
1673
|
href: e.block.linkUrl,
|
|
1658
1674
|
target: "_blank",
|
|
@@ -1664,13 +1680,13 @@ var ra = R({
|
|
|
1664
1680
|
src: w(x),
|
|
1665
1681
|
alt: e.block.alt || w(a).image.altTextPlaceholder,
|
|
1666
1682
|
style: f(b.value)
|
|
1667
|
-
}, null, 12,
|
|
1683
|
+
}, null, 12, La)], 8, Ia)) : (s(), D("img", {
|
|
1668
1684
|
key: 1,
|
|
1669
1685
|
class: "tpl:border-0",
|
|
1670
1686
|
src: w(x),
|
|
1671
1687
|
alt: e.block.alt,
|
|
1672
1688
|
style: f(b.value)
|
|
1673
|
-
}, null, 12,
|
|
1689
|
+
}, null, 12, Ra))], 64)) : (s(), D("div", za, [w(d) ? (s(), D("button", {
|
|
1674
1690
|
key: 0,
|
|
1675
1691
|
"aria-label": w(a).image.browseMedia,
|
|
1676
1692
|
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)]",
|
|
@@ -1678,19 +1694,19 @@ var ra = R({
|
|
|
1678
1694
|
}, [y(w(Ut), {
|
|
1679
1695
|
size: 14,
|
|
1680
1696
|
"stroke-width": 1.5
|
|
1681
|
-
}), O(" " + i(w(a).image.browseMedia), 1)], 8,
|
|
1697
|
+
}), O(" " + i(w(a).image.browseMedia), 1)], 8, Ba)) : (s(), D("span", Va, i(w(a).image.clickToAdd), 1))]))], 12, ja));
|
|
1682
1698
|
}
|
|
1683
|
-
}),
|
|
1699
|
+
}), Ua = { class: "tpl:w-full" }, Wa = ["href"], Ga = {
|
|
1684
1700
|
key: 1,
|
|
1685
1701
|
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)]"
|
|
1686
|
-
},
|
|
1702
|
+
}, Ka = /* @__PURE__ */ R({
|
|
1687
1703
|
__name: "MenuBlock",
|
|
1688
1704
|
props: {
|
|
1689
1705
|
block: {},
|
|
1690
1706
|
viewport: {}
|
|
1691
1707
|
},
|
|
1692
1708
|
setup(e) {
|
|
1693
|
-
let t = e, { t: n } =
|
|
1709
|
+
let t = e, { t: n } = Qn(), r = Wn(Tn, "MenuBlock"), a = C(() => ({
|
|
1694
1710
|
display: "flex",
|
|
1695
1711
|
flexWrap: "wrap",
|
|
1696
1712
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1702,7 +1718,7 @@ var ra = R({
|
|
|
1702
1718
|
function c(e) {
|
|
1703
1719
|
return e || t.block.linkColor || t.block.color;
|
|
1704
1720
|
}
|
|
1705
|
-
return (t, r) => (s(), D("div",
|
|
1721
|
+
return (t, r) => (s(), D("div", Ua, [o.value ? (s(), D("div", {
|
|
1706
1722
|
key: 0,
|
|
1707
1723
|
style: f(a.value)
|
|
1708
1724
|
}, [(s(!0), D(P, null, d(e.block.items, (t, n) => (s(), D(P, { key: t.id }, [j("a", {
|
|
@@ -1714,18 +1730,18 @@ var ra = R({
|
|
|
1714
1730
|
textDecoration: t.underline ? "underline" : "none"
|
|
1715
1731
|
}),
|
|
1716
1732
|
onClick: r[0] ||= z(() => {}, ["prevent"])
|
|
1717
|
-
}, [y(
|
|
1733
|
+
}, [y(ca, { text: t.text || "..." }, null, 8, ["text"])], 12, Wa), n < e.block.items.length - 1 ? (s(), D("span", {
|
|
1718
1734
|
key: 0,
|
|
1719
1735
|
style: f({
|
|
1720
1736
|
color: e.block.separatorColor,
|
|
1721
1737
|
padding: `0 ${e.block.spacing}px`
|
|
1722
1738
|
})
|
|
1723
|
-
}, i(e.block.separator), 5)) : T("", !0)], 64))), 128))], 4)) : (s(), D("div",
|
|
1739
|
+
}, i(e.block.separator), 5)) : T("", !0)], 64))), 128))], 4)) : (s(), D("div", Ga, [y(w(xt), { size: 16 }), j("span", null, i(w(n).menu.addLinks), 1)]))]));
|
|
1724
1740
|
}
|
|
1725
1741
|
});
|
|
1726
1742
|
// src/composables/useEditableTextBlock.ts
|
|
1727
|
-
function
|
|
1728
|
-
let t = L(pn,
|
|
1743
|
+
function qa(e) {
|
|
1744
|
+
let t = L(pn, vn), n = L(Rn, null), { syntax: r } = mr(), i = C(() => n?.value ? Be(e(), t.value) : ke(e(), t.value)), a = C(() => We(Kt(Ee(i.value, r)))), o = E(!1), s = E(null), { top: c, left: l } = dr(s), { toLocal: u } = xr(), d = C(() => u({
|
|
1729
1745
|
top: c.value - 8,
|
|
1730
1746
|
left: l.value
|
|
1731
1747
|
}));
|
|
@@ -1745,14 +1761,14 @@ function Ha(e) {
|
|
|
1745
1761
|
};
|
|
1746
1762
|
}
|
|
1747
1763
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1748
|
-
var
|
|
1764
|
+
var Ja = ["innerHTML"], Ya = /* @__PURE__ */ R({
|
|
1749
1765
|
__name: "ParagraphBlock",
|
|
1750
1766
|
props: {
|
|
1751
1767
|
block: {},
|
|
1752
1768
|
viewport: {}
|
|
1753
1769
|
},
|
|
1754
1770
|
setup(e) {
|
|
1755
|
-
let t = e, n = I(() => import("./ParagraphEditor-
|
|
1771
|
+
let t = e, n = I(() => import("./ParagraphEditor-BWBQ3jKz.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = qa(() => t.block.content);
|
|
1756
1772
|
return (t, u) => (s(), D("div", {
|
|
1757
1773
|
ref_key: "blockRef",
|
|
1758
1774
|
ref: i,
|
|
@@ -1771,11 +1787,11 @@ var Ua = ["innerHTML"], Wa = /* @__PURE__ */ R({
|
|
|
1771
1787
|
key: 1,
|
|
1772
1788
|
class: "tpl-text-content tpl:outline-none",
|
|
1773
1789
|
innerHTML: w(o)
|
|
1774
|
-
}, null, 8,
|
|
1790
|
+
}, null, 8, Ja))], 544));
|
|
1775
1791
|
}
|
|
1776
1792
|
});
|
|
1777
1793
|
// src/utils/updateBlockList.ts
|
|
1778
|
-
function
|
|
1794
|
+
function Xa(e, t, n, r = 0, i) {
|
|
1779
1795
|
let a = n ? e.content.value.blocks.find((e) => e.id === n) : void 0, o = n ? a?.type === "section" ? a.children[r] ?? [] : [] : e.content.value.blocks, s = t.map((e) => e.id);
|
|
1780
1796
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1781
1797
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1788,19 +1804,19 @@ function Ga(e, t, n, r = 0, i) {
|
|
|
1788
1804
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1789
1805
|
}
|
|
1790
1806
|
// src/utils/mergeTagTokens.ts
|
|
1791
|
-
function
|
|
1807
|
+
function Za(e, t, n) {
|
|
1792
1808
|
let r = [], i = "\0MT";
|
|
1793
1809
|
for (; e.includes(i);) i += "_";
|
|
1794
|
-
let a = n === "html" ?
|
|
1810
|
+
let a = n === "html" ? Te(e, (e) => {
|
|
1795
1811
|
let t = r.push(e) - 1;
|
|
1796
1812
|
return `${i}${t}\u0000`;
|
|
1797
1813
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1798
1814
|
start: e.index,
|
|
1799
1815
|
end: e.index + e[0].length
|
|
1800
|
-
})), s = [], c =
|
|
1816
|
+
})), s = [], c = Me(a, t, "logic"), l = [], u = 0;
|
|
1801
1817
|
for (let e of ["logic", "value"]) {
|
|
1802
1818
|
let r = 0;
|
|
1803
|
-
for (let i of e === "logic" ? c :
|
|
1819
|
+
for (let i of e === "logic" ? c : Me(a, t, "value")) {
|
|
1804
1820
|
let t = i.index, a = t + i.value.length;
|
|
1805
1821
|
for (; o[r]?.end <= t;) r++;
|
|
1806
1822
|
let c = o[r];
|
|
@@ -1816,51 +1832,51 @@ function Ka(e, t, n) {
|
|
|
1816
1832
|
}), s.push({
|
|
1817
1833
|
start: t,
|
|
1818
1834
|
end: a,
|
|
1819
|
-
value: n === "html" ?
|
|
1835
|
+
value: n === "html" ? Ne(i.value) : i.value
|
|
1820
1836
|
});
|
|
1821
1837
|
}
|
|
1822
1838
|
}
|
|
1823
1839
|
}
|
|
1824
1840
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1825
1841
|
}
|
|
1826
|
-
function
|
|
1827
|
-
return JSON.stringify(
|
|
1842
|
+
function Qa(e, t, n, r) {
|
|
1843
|
+
return JSON.stringify(Za(e, n, r)) !== JSON.stringify(Za(t, n, r));
|
|
1828
1844
|
}
|
|
1829
1845
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1830
|
-
var
|
|
1846
|
+
var $a = [
|
|
1831
1847
|
"data-state",
|
|
1832
1848
|
"aria-label",
|
|
1833
1849
|
"title",
|
|
1834
1850
|
"aria-expanded",
|
|
1835
1851
|
"aria-controls",
|
|
1836
1852
|
"onKeydown"
|
|
1837
|
-
],
|
|
1853
|
+
], eo = [
|
|
1838
1854
|
"aria-label",
|
|
1839
1855
|
"aria-labelledby",
|
|
1840
1856
|
"aria-describedby",
|
|
1841
1857
|
"onKeydown"
|
|
1842
|
-
],
|
|
1858
|
+
], to = ["id"], no = ["id"], ro = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, io = ["disabled"], ao = {
|
|
1843
1859
|
key: 0,
|
|
1844
1860
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1845
|
-
},
|
|
1861
|
+
}, oo = {
|
|
1846
1862
|
key: 1,
|
|
1847
1863
|
class: "tpl:m-0"
|
|
1848
|
-
},
|
|
1864
|
+
}, so = { class: "tpl:m-0" }, co = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, lo = {
|
|
1849
1865
|
key: 3,
|
|
1850
1866
|
class: "tpl:m-0"
|
|
1851
|
-
},
|
|
1867
|
+
}, uo = {
|
|
1852
1868
|
key: 4,
|
|
1853
1869
|
class: "tpl:m-0"
|
|
1854
|
-
},
|
|
1870
|
+
}, fo = {
|
|
1855
1871
|
key: 5,
|
|
1856
1872
|
class: "tpl:m-0"
|
|
1857
|
-
},
|
|
1873
|
+
}, po = {
|
|
1858
1874
|
key: 6,
|
|
1859
1875
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1860
|
-
},
|
|
1876
|
+
}, mo = ["onClick"], ho = {
|
|
1861
1877
|
key: 7,
|
|
1862
1878
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1863
|
-
},
|
|
1879
|
+
}, go = ["data-testid", "disabled"], _o = /*#__PURE__*/ zt(/* @__PURE__ */ R({
|
|
1864
1880
|
__name: "LocaleStatusChip",
|
|
1865
1881
|
props: {
|
|
1866
1882
|
blockId: {},
|
|
@@ -1880,24 +1896,24 @@ var Ja = [
|
|
|
1880
1896
|
},
|
|
1881
1897
|
emits: ["target"],
|
|
1882
1898
|
setup(e, { emit: n }) {
|
|
1883
|
-
let r = e, a = n, l = L(
|
|
1899
|
+
let r = e, a = n, l = L(qn, null), p = L(Hn, null), m = L(tn, null), h = L(Mn, "en") ?? "en", { t: g, format: _ } = Qn(), v = pr(), y = yr(), { toLocal: x } = xr(), S = E(null), O = E(null), A = E(!1), M = E(!1), N = E(null), ee = E(null), te = null, I = E({
|
|
1884
1900
|
top: 0,
|
|
1885
1901
|
left: 0
|
|
1886
1902
|
}), R = E({
|
|
1887
1903
|
maxHeight: 0,
|
|
1888
1904
|
maxWidth: 0
|
|
1889
|
-
}), ne = `tpl-locale-popover-${
|
|
1905
|
+
}), ne = `tpl-locale-popover-${at()}`, ie = C(() => tr(l?.activeLocale?.value ?? "")), ae = C(() => tr(l?.content.value.settings.locale ?? "en"));
|
|
1890
1906
|
function oe(e, t) {
|
|
1891
1907
|
switch (e) {
|
|
1892
1908
|
case "tags-differ": return g.localization.tagsDiffer;
|
|
1893
1909
|
case "hidden": return _(g.localization.hidden, { language: ie.value });
|
|
1894
1910
|
case "changed": return _(g.localization.changed, { language: ie.value });
|
|
1895
|
-
case "default-stale": return
|
|
1896
|
-
case "missing": return t === 1 ? g.localization.notTranslated :
|
|
1897
|
-
default: return t === 1 ? g.localization.outOfDate :
|
|
1911
|
+
case "default-stale": return er(g.localization.staleLanguages, t, h);
|
|
1912
|
+
case "missing": return t === 1 ? g.localization.notTranslated : er(g.localization.notTranslatedCount, t, h);
|
|
1913
|
+
default: return t === 1 ? g.localization.outOfDate : er(g.localization.staleCount, t, h);
|
|
1898
1914
|
}
|
|
1899
1915
|
}
|
|
1900
|
-
let se = C(() => oe(r.state, r.count)), B = C(() => r.popoverState ?? r.state), ce = C(() => r.popoverCount ?? r.count), le = C(() => oe(B.value, ce.value)), ue = C(() => r.state === "hidden" ?
|
|
1916
|
+
let se = C(() => oe(r.state, r.count)), B = C(() => r.popoverState ?? r.state), ce = C(() => r.popoverCount ?? r.count), le = C(() => oe(B.value, ce.value)), ue = C(() => r.state === "hidden" ? kr : r.state === "changed" ? Jt : r.state === "default-stale" ? Gt : r.state === "stale" ? Vt : Xt), de = C(() => B.value === "default-stale" || (B.value === "missing" || B.value === "stale") && ce.value > 1), fe = C(() => r.editable && r.eligibleGaps && p?.isAvailable.value);
|
|
1901
1917
|
function pe(e = !1) {
|
|
1902
1918
|
A.value = !1, M.value = !1, te = null, e && S.value?.focus({ preventScroll: !0 });
|
|
1903
1919
|
}
|
|
@@ -2006,7 +2022,7 @@ var Ja = [
|
|
|
2006
2022
|
size: 12,
|
|
2007
2023
|
"stroke-width": 2,
|
|
2008
2024
|
"aria-hidden": "true"
|
|
2009
|
-
}))], 40,
|
|
2025
|
+
}))], 40, $a), w(y) && A.value ? (s(), F(b, {
|
|
2010
2026
|
key: 0,
|
|
2011
2027
|
to: w(y)
|
|
2012
2028
|
}, [j("div", {
|
|
@@ -2032,80 +2048,80 @@ var Ja = [
|
|
|
2032
2048
|
j("h3", {
|
|
2033
2049
|
id: `${ne}-question`,
|
|
2034
2050
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
2035
|
-
}, i(w(
|
|
2051
|
+
}, i(w(er)(w(g).localization.translationConfirmation, e.translationCount ?? 0, w(h))), 9, to),
|
|
2036
2052
|
j("p", {
|
|
2037
2053
|
id: `${ne}-warning`,
|
|
2038
2054
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
2039
|
-
}, i(w(_)(w(g).localization.translationDescription, { language: ie.value })), 9,
|
|
2040
|
-
j("div",
|
|
2055
|
+
}, i(w(_)(w(g).localization.translationDescription, { language: ie.value })), 9, no),
|
|
2056
|
+
j("div", ro, [j("button", {
|
|
2041
2057
|
ref_key: "confirmationCancel",
|
|
2042
2058
|
ref: ee,
|
|
2043
2059
|
type: "button",
|
|
2044
2060
|
"data-testid": "translation-confirm-cancel",
|
|
2045
|
-
class: c(w(
|
|
2061
|
+
class: c(w(rr)),
|
|
2046
2062
|
onClick: Te
|
|
2047
2063
|
}, i(w(g).localization.cancel), 3), j("button", {
|
|
2048
2064
|
type: "button",
|
|
2049
2065
|
"data-testid": "translation-confirm",
|
|
2050
|
-
class: c(w(
|
|
2066
|
+
class: c(w(ir)),
|
|
2051
2067
|
disabled: !fe.value || !!w(p)?.running.value || !e.translationCount,
|
|
2052
2068
|
onClick: De
|
|
2053
|
-
}, i(w(
|
|
2069
|
+
}, i(w(er)(w(g).localization.translateAllFields, e.translationCount ?? 0, w(h))), 11, io)])
|
|
2054
2070
|
], 64)) : (s(), D(P, { key: 1 }, [
|
|
2055
|
-
de.value ? (s(), D("p",
|
|
2056
|
-
B.value === "missing" ? (s(), D("p",
|
|
2071
|
+
de.value ? (s(), D("p", ao, i(le.value), 1)) : T("", !0),
|
|
2072
|
+
B.value === "missing" ? (s(), D("p", oo, i(w(_)(w(g).localization.missingExplanation, { default: ae.value })), 1)) : B.value === "stale" ? (s(), D(P, { key: 2 }, [j("p", so, i(w(_)(w(g).localization.staleExplanation, { default: ae.value })), 1), j("p", co, i(w(_)(w(g).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : B.value === "tags-differ" ? (s(), D("p", lo, i(w(_)(w(g).localization.tagsDifferExplanation, { default: ae.value })), 1)) : B.value === "changed" ? (s(), D("p", uo, i(w(er)(w(g).localization.changedProperties, ce.value, w(h), { default: ae.value })), 1)) : B.value === "hidden" ? (s(), D("p", fo, i(w(_)(w(g).localization.hiddenExplanation, { language: ie.value })), 1)) : (s(), D("ul", po, [(s(!0), D(P, null, d(e.staleLocales, (e) => (s(), D("li", {
|
|
2057
2073
|
key: e,
|
|
2058
2074
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
2059
|
-
}, [j("span", null, i(w(
|
|
2075
|
+
}, [j("span", null, i(w(tr)(e)), 1), j("button", {
|
|
2060
2076
|
type: "button",
|
|
2061
|
-
class: c(w(
|
|
2077
|
+
class: c(w(nr)),
|
|
2062
2078
|
onClick: (t) => Ce(e)
|
|
2063
|
-
}, i(w(g).localization.open), 11,
|
|
2064
|
-
e.editable && B.value !== "default-stale" ? (s(), D("div",
|
|
2079
|
+
}, i(w(g).localization.open), 11, mo)]))), 128))])),
|
|
2080
|
+
e.editable && B.value !== "default-stale" ? (s(), D("div", ho, [
|
|
2065
2081
|
fe.value && (B.value === "missing" || B.value === "stale" || B.value === "tags-differ") ? (s(), D("button", {
|
|
2066
2082
|
key: 0,
|
|
2067
2083
|
type: "button",
|
|
2068
2084
|
ref_key: "retranslate",
|
|
2069
2085
|
ref: N,
|
|
2070
2086
|
"data-testid": B.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
2071
|
-
class: c(w(
|
|
2087
|
+
class: c(w(rr)),
|
|
2072
2088
|
disabled: !!w(p)?.running.value,
|
|
2073
2089
|
onClick: we
|
|
2074
|
-
}, i(B.value === "missing" ? w(g).localization.translate : w(g).localization.retranslate), 11,
|
|
2090
|
+
}, i(B.value === "missing" ? w(g).localization.translate : w(g).localization.retranslate), 11, go)) : T("", !0),
|
|
2075
2091
|
B.value === "stale" || B.value === "tags-differ" ? (s(), D(P, { key: 1 }, [B.value === "stale" ? (s(), D("button", {
|
|
2076
2092
|
key: 0,
|
|
2077
2093
|
type: "button",
|
|
2078
2094
|
"data-testid": "locale-keep",
|
|
2079
|
-
class: c(fe.value ? w(
|
|
2095
|
+
class: c(fe.value ? w(nr) : w(rr)),
|
|
2080
2096
|
onClick: be
|
|
2081
2097
|
}, i(w(g).localization.keep), 3)) : T("", !0), j("button", {
|
|
2082
2098
|
type: "button",
|
|
2083
2099
|
"data-testid": "locale-use-default",
|
|
2084
|
-
class: c(B.value === "tags-differ" && !fe.value ? w(
|
|
2100
|
+
class: c(B.value === "tags-differ" && !fe.value ? w(rr) : w(nr)),
|
|
2085
2101
|
onClick: n[0] ||= (t) => xe(B.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2086
2102
|
}, i(w(_)(w(g).localization.useDefaultLanguage, { default: ae.value })), 3)], 64)) : T("", !0),
|
|
2087
2103
|
B.value === "changed" ? (s(), D("button", {
|
|
2088
2104
|
key: 2,
|
|
2089
2105
|
type: "button",
|
|
2090
2106
|
"data-testid": "locale-reset",
|
|
2091
|
-
class: c(w(
|
|
2107
|
+
class: c(w(rr)),
|
|
2092
2108
|
onClick: n[1] ||= (t) => xe(e.setPaths)
|
|
2093
2109
|
}, i(w(g).localization.resetChanges), 3)) : T("", !0),
|
|
2094
2110
|
B.value === "hidden" ? (s(), D("button", {
|
|
2095
2111
|
key: 3,
|
|
2096
2112
|
type: "button",
|
|
2097
2113
|
"data-testid": "locale-show",
|
|
2098
|
-
class: c(w(
|
|
2114
|
+
class: c(w(rr)),
|
|
2099
2115
|
onClick: Se
|
|
2100
2116
|
}, i(w(g).localization.show), 3)) : T("", !0)
|
|
2101
2117
|
])) : T("", !0)
|
|
2102
|
-
], 64))], 44,
|
|
2118
|
+
], 64))], 44, eo)], 8, ["to"])) : T("", !0)], 64));
|
|
2103
2119
|
}
|
|
2104
|
-
}), [["__scopeId", "data-v-3343ae7d"]]),
|
|
2120
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), vo = /* @__PURE__ */ R({
|
|
2105
2121
|
__name: "LocaleMarkers",
|
|
2106
2122
|
props: { block: {} },
|
|
2107
2123
|
setup(e) {
|
|
2108
|
-
let n = e, r = L(
|
|
2124
|
+
let n = e, r = L(qn, null), i = L(fn, void 0), a = L(An, []), o = L($t, He.liquid), c = L(jn, C(() => /* @__PURE__ */ new Set())), l = C(() => r?.activeLocale?.value), u = C(() => l.value ? n.block.l10n?.[l.value] : void 0), d = C(() => ({
|
|
2109
2125
|
blocks: [n.block.type === "section" || n.block.type === "wrapper" ? {
|
|
2110
2126
|
...n.block,
|
|
2111
2127
|
children: []
|
|
@@ -2114,14 +2130,14 @@ var Ja = [
|
|
|
2114
2130
|
locale: r.content.value.settings.locale,
|
|
2115
2131
|
locales: r.content.value.settings.locales
|
|
2116
2132
|
}
|
|
2117
|
-
})), f = C(() => r && l.value && !c.value.has(l.value) ?
|
|
2133
|
+
})), f = C(() => r && l.value && !c.value.has(l.value) ? ae(d.value, l.value, a) : {
|
|
2118
2134
|
missing: [],
|
|
2119
2135
|
stale: [],
|
|
2120
2136
|
translated: []
|
|
2121
2137
|
}), p = C(() => f.value.stale.map((e) => e.slice(n.block.id.length + 1))), m = C(() => f.value.translated.flatMap((e) => {
|
|
2122
|
-
let t = e.slice(n.block.id.length + 1), r =
|
|
2123
|
-
return typeof r == "string" && i !== void 0 &&
|
|
2124
|
-
})), h = E(null), g = C(() => r && l.value && !c.value.has(l.value) ?
|
|
2138
|
+
let t = e.slice(n.block.id.length + 1), r = _e(n.block, t), i = u.value?.text?.[t]?.value, a = n.block.type === "html" || dt[n.block.type]?.includes(t) ? "html" : "text";
|
|
2139
|
+
return typeof r == "string" && i !== void 0 && Qa(r, i, o, a) ? [t] : [];
|
|
2140
|
+
})), h = E(null), g = C(() => r && l.value && !c.value.has(l.value) ? ye(d.value, l.value, {
|
|
2125
2141
|
syntax: o,
|
|
2126
2142
|
definitions: a,
|
|
2127
2143
|
doNotTranslate: i?.doNotTranslate,
|
|
@@ -2131,9 +2147,9 @@ var Ja = [
|
|
|
2131
2147
|
let t = e.slice(n.block.id.length + 1);
|
|
2132
2148
|
return f.value.translated.includes(e) && !m.value.includes(t);
|
|
2133
2149
|
})), v = C(() => Object.keys(u.value?.set ?? {}).filter((e) => {
|
|
2134
|
-
let t = e.split("."), r = t.pop(), i = t.length ?
|
|
2135
|
-
return Array.isArray(i) ?
|
|
2136
|
-
})), y = C(() => !l.value && r ? (r.content.value.settings.locales ?? []).filter((e) => !c.value.has(e) &&
|
|
2150
|
+
let t = e.split("."), r = t.pop(), i = t.length ? _e(n.block, t.join(".")) : n.block;
|
|
2151
|
+
return Array.isArray(i) ? _e(i, r) !== void 0 : i !== void 0;
|
|
2152
|
+
})), y = C(() => !l.value && r ? (r.content.value.settings.locales ?? []).filter((e) => !c.value.has(e) && ae(d.value, e, a).stale.length > 0) : []), b = C(() => l.value ? c.value.has(l.value) ? null : u.value?.hidden ? "hidden" : f.value.missing.length ? "missing" : p.value.length ? "stale" : m.value.length ? "tags-differ" : v.value.length ? "changed" : null : y.value.length ? "default-stale" : null);
|
|
2137
2153
|
function x(e) {
|
|
2138
2154
|
return e === "missing" ? f.value.missing.length : e === "stale" ? p.value.length : e === "tags-differ" ? m.value.length : e === "default-stale" ? y.value.length : v.value.length;
|
|
2139
2155
|
}
|
|
@@ -2142,12 +2158,12 @@ var Ja = [
|
|
|
2142
2158
|
h.value = null;
|
|
2143
2159
|
});
|
|
2144
2160
|
let k = C(() => {
|
|
2145
|
-
let e =
|
|
2161
|
+
let e = _e(n.block, p.value[0] ?? "");
|
|
2146
2162
|
if (typeof e != "string") return "";
|
|
2147
2163
|
let t = e.split(/<[^>]*>/).join("");
|
|
2148
2164
|
return Array.from(t).slice(0, 60).join("");
|
|
2149
2165
|
});
|
|
2150
|
-
return (t, n) => w(i) && b.value ? (s(), F(
|
|
2166
|
+
return (t, n) => w(i) && b.value ? (s(), F(_o, {
|
|
2151
2167
|
key: 0,
|
|
2152
2168
|
"block-id": e.block.id,
|
|
2153
2169
|
state: b.value,
|
|
@@ -2181,21 +2197,21 @@ var Ja = [
|
|
|
2181
2197
|
"editable"
|
|
2182
2198
|
])) : T("", !0);
|
|
2183
2199
|
}
|
|
2184
|
-
}),
|
|
2200
|
+
}), yo = [
|
|
2185
2201
|
"data-block-id",
|
|
2186
2202
|
"data-block-type",
|
|
2187
2203
|
"data-tpl-picked"
|
|
2188
|
-
],
|
|
2204
|
+
], bo = ["aria-label"], xo = ["data-lock-holder"], So = ["aria-label"], Co = [
|
|
2189
2205
|
"aria-label",
|
|
2190
2206
|
"aria-pressed",
|
|
2191
2207
|
"title"
|
|
2192
|
-
],
|
|
2208
|
+
], wo = ["aria-label", "title"], To = ["aria-label", "title"], Eo = ["aria-label", "title"], Do = {
|
|
2193
2209
|
key: 3,
|
|
2194
2210
|
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"
|
|
2195
|
-
},
|
|
2211
|
+
}, Oo = { 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)]" }, ko = {
|
|
2196
2212
|
key: 4,
|
|
2197
2213
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2198
|
-
},
|
|
2214
|
+
}, Ao = ["aria-label", "title"], jo = /*#__PURE__*/ zt(/* @__PURE__ */ R({
|
|
2199
2215
|
__name: "BlockWrapper",
|
|
2200
2216
|
props: {
|
|
2201
2217
|
block: {},
|
|
@@ -2208,33 +2224,33 @@ var Ja = [
|
|
|
2208
2224
|
},
|
|
2209
2225
|
emits: ["select"],
|
|
2210
2226
|
setup(e, { emit: n }) {
|
|
2211
|
-
let o = I(() => import("./BlockIssueBadge-
|
|
2227
|
+
let o = I(() => import("./BlockIssueBadge-Bmtc50BQ.js")), l = e, d = C(() => l.displayBlock ?? l.block), p = n, { t: m, format: h } = Qn(), g = L(Jn, null), _ = E(null), v = C(() => g?.liftedBlockId.value === l.block.id), b = C(() => v.value ? h(m.blockActions.dragLifted, { block: l.block.type }) : m.blockActions.drag);
|
|
2212
2228
|
async function x() {
|
|
2213
2229
|
await u(), _.value?.focus();
|
|
2214
2230
|
}
|
|
2215
2231
|
function S(e) {
|
|
2216
2232
|
g && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), v.value ? g.drop(l.block.id) : g.lift(l.block.id)) : v.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), g.cancel(), x()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), g.moveUp(l.block.id), x()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), g.moveDown(l.block.id), x())));
|
|
2217
2233
|
}
|
|
2218
|
-
let k = C(() => !l.viewport || !d.value.visibility ? !1 : d.value.visibility[l.viewport] === !1), A = C(() => !!(
|
|
2234
|
+
let k = C(() => !l.viewport || !d.value.visibility ? !1 : d.value.visibility[l.viewport] === !1), A = C(() => !!(be?.activeLocale?.value && l.block.l10n?.[be.activeLocale.value]?.hidden)), M = C(() => l.previewMode === !0 && (k.value || A.value)), N = C(() => l.viewport ? {
|
|
2219
2235
|
desktop: m.viewport.desktop,
|
|
2220
2236
|
mobile: m.viewport.mobile
|
|
2221
|
-
}[l.viewport] ?? l.viewport : ""), ee = C(() => !!d.value.displayCondition), P = L(Un, null), te = L(In, null), R = L(Dn, {}), ne = C(() => R.savedBlocks?.isPicking.value === !0), re = C(() => !l.nested && R.savedBlocks?.isAvailable.value === !0 && R.savedBlocks?.canCreate.value === !0), ie = C(() => l.isSelected && !ne.value), ae = C(() => R.comments?.getBlockCount(l.block.id) ?? 0), oe = E(null),
|
|
2237
|
+
}[l.viewport] ?? l.viewport : ""), ee = C(() => !!d.value.displayCondition), P = L(Un, null), te = L(In, null), R = L(Dn, {}), ne = C(() => R.savedBlocks?.isPicking.value === !0), re = C(() => !l.nested && R.savedBlocks?.isAvailable.value === !0 && R.savedBlocks?.canCreate.value === !0), ie = C(() => l.isSelected && !ne.value), ae = C(() => R.comments?.getBlockCount(l.block.id) ?? 0), oe = E(null), B = E(null), ce = E(null), le = E(null), ue = E({
|
|
2222
2238
|
left: "calc(100% + 8px)",
|
|
2223
2239
|
top: "50%"
|
|
2224
|
-
}),
|
|
2225
|
-
function
|
|
2226
|
-
let e =
|
|
2240
|
+
}), de = E(!1), fe = C(() => B.value ?? le.value), pe = C(() => fe.value?.closest(".tpl-body"));
|
|
2241
|
+
function me() {
|
|
2242
|
+
let e = de.value, t = B.value, n = le.value, r = oe.value;
|
|
2227
2243
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2228
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2244
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = pe.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2229
2245
|
if (n?.offsetWidth) {
|
|
2230
2246
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2231
2247
|
if (e === i) {
|
|
2232
|
-
|
|
2248
|
+
de.value = !i, u(me);
|
|
2233
2249
|
return;
|
|
2234
2250
|
}
|
|
2235
2251
|
}
|
|
2236
2252
|
if (!t?.offsetWidth) return;
|
|
2237
|
-
let d = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), f =
|
|
2253
|
+
let d = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), f = ce.value, p = Math.max(28, f?.offsetHeight ? f.offsetTop + f.offsetHeight + 4 : 0), m = Math.max(p + t.offsetHeight / 2, r.offsetHeight / 2), h = d < r.offsetWidth && m + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${m}px` : "50%";
|
|
2238
2254
|
if (d >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2239
2255
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2240
2256
|
e > r.offsetHeight / 2 && (h = `${e}px`);
|
|
@@ -2246,37 +2262,40 @@ var Ja = [
|
|
|
2246
2262
|
d = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2247
2263
|
}
|
|
2248
2264
|
}
|
|
2249
|
-
(
|
|
2265
|
+
(ue.value.left !== `${d}px` || ue.value.top !== h) && (ue.value = {
|
|
2250
2266
|
left: `${d}px`,
|
|
2251
2267
|
top: h
|
|
2252
2268
|
});
|
|
2253
2269
|
}
|
|
2254
|
-
a(
|
|
2270
|
+
a(me), fr(C(() => fe.value ? [
|
|
2255
2271
|
oe.value,
|
|
2256
|
-
se.value,
|
|
2257
2272
|
B.value,
|
|
2258
2273
|
ce.value,
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2274
|
+
le.value,
|
|
2275
|
+
pe.value
|
|
2276
|
+
].filter((e) => !!e) : []), me), lr(pe, "scroll", me, { passive: !0 });
|
|
2277
|
+
let he = C(() => R.collaboration?.lockOf(l.block.id) ?? null), ge = C(() => he.value?.holder.type === "guest" ? m.collaboration.guest : he.value?.holder.name ?? ""), _e = C(() => R.collaboration?.agentHighlightOf(l.block.id) ?? R.ai?.highlightOf(l.block.id) ?? null), ve = Ft(() => d.value.type === "section" ? d.value.backgroundImage : void 0), ye = Ft(() => d.value.type === "section" ? d.value.wrapper?.backgroundImage : void 0), be = L(qn, null), xe = be ? $n(be) : null, Se = L(Pn, null) ?? xe?.content ?? null;
|
|
2278
|
+
t([() => be?.activeLocale?.value, () => xe && se(xe.settings.value)], me, { flush: "post" });
|
|
2279
|
+
let Ce = L(gn, void 0), we = C(() => $i(d.value, {
|
|
2280
|
+
backgroundImageUrl: ve.value,
|
|
2281
|
+
heroBoxWidth: Et(d.value) ? jt(d.value, Se?.value, Ce) : void 0
|
|
2282
|
+
})), Te = C(() => aa(d.value, { backgroundImageUrl: ye.value })), Ee = C(() => {
|
|
2283
|
+
let e = d.value;
|
|
2284
|
+
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2285
|
+
}), De = C(() => ia(Ee.value?.wrapper?.padding));
|
|
2286
|
+
function Oe(e) {
|
|
2268
2287
|
l.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), p("select"));
|
|
2269
2288
|
}
|
|
2270
|
-
function
|
|
2289
|
+
function ke() {
|
|
2271
2290
|
P?.deleteBlock(l.block.id);
|
|
2272
2291
|
}
|
|
2273
|
-
function
|
|
2292
|
+
function Ae() {
|
|
2274
2293
|
P?.duplicateBlock(l.block);
|
|
2275
2294
|
}
|
|
2276
|
-
function
|
|
2295
|
+
function je() {
|
|
2277
2296
|
R.savedBlocks?.startPicking(l.block.id);
|
|
2278
2297
|
}
|
|
2279
|
-
function
|
|
2298
|
+
function Me() {
|
|
2280
2299
|
te?.toggleBlock(l.block.id);
|
|
2281
2300
|
}
|
|
2282
2301
|
return (t, n) => M.value ? T("", !0) : (s(), D("div", {
|
|
@@ -2293,48 +2312,48 @@ var Ja = [
|
|
|
2293
2312
|
"data-block-id": e.block.id,
|
|
2294
2313
|
"data-block-type": e.block.type,
|
|
2295
2314
|
"data-tpl-picked": e.picked || void 0,
|
|
2296
|
-
onClick:
|
|
2315
|
+
onClick: Oe
|
|
2297
2316
|
}, [
|
|
2298
2317
|
j("div", {
|
|
2299
2318
|
ref_key: "badgesElement",
|
|
2300
|
-
ref:
|
|
2319
|
+
ref: ce,
|
|
2301
2320
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2302
2321
|
}, [
|
|
2303
2322
|
ae.value > 0 && !k.value ? (s(), D("button", {
|
|
2304
2323
|
key: 0,
|
|
2305
2324
|
ref_key: "commentElement",
|
|
2306
|
-
ref:
|
|
2307
|
-
class: c(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 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)]",
|
|
2325
|
+
ref: le,
|
|
2326
|
+
class: c(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 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)]", de.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2308
2327
|
"aria-label": w(h)(w(m).blockActions.comments, { count: String(ae.value) }),
|
|
2309
2328
|
onClick: n[0] ||= z((t) => w(R).comments?.openForBlock(e.block.id), ["stop"])
|
|
2310
2329
|
}, [y(w(qt), {
|
|
2311
2330
|
size: 12,
|
|
2312
2331
|
"stroke-width": 2.5
|
|
2313
|
-
}), O(" " + i(ae.value), 1)], 10,
|
|
2332
|
+
}), O(" " + i(ae.value), 1)], 10, bo)) : T("", !0),
|
|
2314
2333
|
y(w(o), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2315
|
-
e.previewMode ? T("", !0) : (s(), F(
|
|
2334
|
+
e.previewMode ? T("", !0) : (s(), F(vo, {
|
|
2316
2335
|
key: 1,
|
|
2317
2336
|
block: e.block
|
|
2318
2337
|
}, null, 8, ["block"]))
|
|
2319
2338
|
], 512),
|
|
2320
|
-
|
|
2339
|
+
he.value ? (s(), D("div", {
|
|
2321
2340
|
key: 0,
|
|
2322
2341
|
"data-testid": "block-lock",
|
|
2323
|
-
"data-lock-holder":
|
|
2342
|
+
"data-lock-holder": he.value.holder.sessionId,
|
|
2324
2343
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2325
2344
|
style: f({
|
|
2326
|
-
outline: `2px solid ${
|
|
2345
|
+
outline: `2px solid ${he.value.holder.color}`,
|
|
2327
2346
|
outlineOffset: "-1px"
|
|
2328
2347
|
})
|
|
2329
2348
|
}, [j("span", {
|
|
2330
2349
|
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",
|
|
2331
2350
|
style: f({
|
|
2332
|
-
backgroundColor:
|
|
2333
|
-
color: w(
|
|
2351
|
+
backgroundColor: he.value.holder.color,
|
|
2352
|
+
color: w(Er)(he.value.holder.color)
|
|
2334
2353
|
})
|
|
2335
|
-
}, i(w(h)(w(m).collaboration.editing, { name:
|
|
2336
|
-
|
|
2337
|
-
key:
|
|
2354
|
+
}, i(w(h)(w(m).collaboration.editing, { name: ge.value })), 5)], 12, xo)) : T("", !0),
|
|
2355
|
+
_e.value === null ? T("", !0) : (s(), D("div", {
|
|
2356
|
+
key: _e.value,
|
|
2338
2357
|
"data-testid": "block-agent-highlight",
|
|
2339
2358
|
"aria-hidden": "true",
|
|
2340
2359
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
@@ -2342,8 +2361,8 @@ var Ja = [
|
|
|
2342
2361
|
ie.value ? (s(), D("div", {
|
|
2343
2362
|
key: 2,
|
|
2344
2363
|
ref_key: "actionsElement",
|
|
2345
|
-
ref:
|
|
2346
|
-
style: f(
|
|
2364
|
+
ref: B,
|
|
2365
|
+
style: f(ue.value),
|
|
2347
2366
|
role: "toolbar",
|
|
2348
2367
|
"aria-label": w(m).blockActions.drag,
|
|
2349
2368
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 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)]"
|
|
@@ -2357,73 +2376,81 @@ var Ja = [
|
|
|
2357
2376
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2358
2377
|
title: w(m).blockActions.drag,
|
|
2359
2378
|
onKeydown: S
|
|
2360
|
-
}, [y(w(
|
|
2379
|
+
}, [y(w(jr), {
|
|
2361
2380
|
size: 14,
|
|
2362
2381
|
"stroke-width": 1.5
|
|
2363
|
-
})], 40,
|
|
2382
|
+
})], 40, Co),
|
|
2364
2383
|
j("button", {
|
|
2365
2384
|
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",
|
|
2366
2385
|
"aria-label": w(m).blockActions.duplicate,
|
|
2367
2386
|
title: w(m).blockActions.duplicate,
|
|
2368
|
-
onClick: z(
|
|
2387
|
+
onClick: z(Ae, ["stop"])
|
|
2369
2388
|
}, [y(w(Ht), {
|
|
2370
2389
|
size: 14,
|
|
2371
2390
|
"stroke-width": 1.5
|
|
2372
|
-
})], 8,
|
|
2391
|
+
})], 8, wo),
|
|
2373
2392
|
re.value ? (s(), D("button", {
|
|
2374
2393
|
key: 0,
|
|
2375
2394
|
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",
|
|
2376
2395
|
"aria-label": w(m).blockActions.saveAsBlock,
|
|
2377
2396
|
title: w(m).blockActions.saveAsBlock,
|
|
2378
|
-
onClick: z(
|
|
2379
|
-
}, [y(w(
|
|
2397
|
+
onClick: z(je, ["stop"])
|
|
2398
|
+
}, [y(w(Dr), {
|
|
2380
2399
|
size: 14,
|
|
2381
2400
|
"stroke-width": 1.5
|
|
2382
|
-
})], 8,
|
|
2401
|
+
})], 8, To)) : T("", !0),
|
|
2383
2402
|
j("button", {
|
|
2384
2403
|
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",
|
|
2385
2404
|
"aria-label": w(m).blockActions.delete,
|
|
2386
2405
|
title: w(m).blockActions.delete,
|
|
2387
|
-
onClick: z(
|
|
2406
|
+
onClick: z(ke, ["stop"])
|
|
2388
2407
|
}, [y(w(Yt), {
|
|
2389
2408
|
size: 14,
|
|
2390
2409
|
"stroke-width": 1.5
|
|
2391
|
-
})], 8,
|
|
2392
|
-
], 12,
|
|
2393
|
-
k.value ? (s(), D("div",
|
|
2410
|
+
})], 8, Eo)
|
|
2411
|
+
], 12, So)) : T("", !0),
|
|
2412
|
+
k.value ? (s(), D("div", Do, [j("span", Oo, [y(w(kr), {
|
|
2394
2413
|
size: 12,
|
|
2395
2414
|
"stroke-width": 1.5
|
|
2396
2415
|
}), O(" " + i(w(h)(w(m).blockActions.hiddenOnViewport, { viewport: N.value })), 1)])])) : T("", !0),
|
|
2397
|
-
ee.value && !k.value ? (s(), D("div",
|
|
2416
|
+
ee.value && !k.value ? (s(), D("div", ko, [j("button", {
|
|
2398
2417
|
"data-testid": "condition-toggle",
|
|
2399
2418
|
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)]",
|
|
2400
2419
|
"aria-label": w(m).blockActions.conditionToggle,
|
|
2401
2420
|
title: e.block.displayCondition?.label,
|
|
2402
|
-
onClick: z(
|
|
2403
|
-
}, [y(w(
|
|
2421
|
+
onClick: z(Me, ["stop"])
|
|
2422
|
+
}, [y(w(Ar), {
|
|
2404
2423
|
size: 12,
|
|
2405
2424
|
"stroke-width": 2
|
|
2406
|
-
})], 8,
|
|
2407
|
-
|
|
2425
|
+
})], 8, Ao)])) : T("", !0),
|
|
2426
|
+
Te.value ? (s(), D("div", {
|
|
2408
2427
|
key: 5,
|
|
2409
|
-
class: c(["tpl-section-wrapper tpl-email-surface", w(
|
|
2410
|
-
style: f(
|
|
2428
|
+
class: c(["tpl-section-wrapper tpl-email-surface", w(Yi)(Te.value)]),
|
|
2429
|
+
style: f(Te.value)
|
|
2430
|
+
}, [Ee.value ? (s(), D("div", {
|
|
2431
|
+
key: 0,
|
|
2432
|
+
class: "tpl-band-frame",
|
|
2433
|
+
style: f(De.value)
|
|
2411
2434
|
}, [j("div", {
|
|
2412
|
-
class: c(["tpl-block-content tpl-email-surface", w(
|
|
2413
|
-
style: f(
|
|
2414
|
-
}, [r(t.$slots, "default", {}, void 0, !0)], 6)],
|
|
2435
|
+
class: c(["tpl-block-content tpl-email-surface", w(Yi)(we.value)]),
|
|
2436
|
+
style: f(we.value)
|
|
2437
|
+
}, [r(t.$slots, "default", {}, void 0, !0)], 6)], 4)) : (s(), D("div", {
|
|
2438
|
+
key: 1,
|
|
2439
|
+
class: c(["tpl-block-content tpl-email-surface", w(Yi)(we.value)]),
|
|
2440
|
+
style: f(we.value)
|
|
2441
|
+
}, [r(t.$slots, "default", {}, void 0, !0)], 6))], 6)) : (s(), D("div", {
|
|
2415
2442
|
key: 6,
|
|
2416
|
-
class: c(["tpl-block-content tpl-email-surface", w(
|
|
2417
|
-
style: f(
|
|
2443
|
+
class: c(["tpl-block-content tpl-email-surface", w(Yi)(we.value)]),
|
|
2444
|
+
style: f(we.value)
|
|
2418
2445
|
}, [r(t.$slots, "default", {}, void 0, !0)], 6))
|
|
2419
|
-
], 10,
|
|
2446
|
+
], 10, yo));
|
|
2420
2447
|
}
|
|
2421
|
-
}), [["__scopeId", "data-v-
|
|
2448
|
+
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2422
2449
|
// src/utils/unwrapParagraph.ts
|
|
2423
|
-
function
|
|
2450
|
+
function Mo(e) {
|
|
2424
2451
|
let t = /^\s*<p\b/.exec(e);
|
|
2425
2452
|
if (!t) return e;
|
|
2426
|
-
let n =
|
|
2453
|
+
let n = Ie(e, t[0].length);
|
|
2427
2454
|
if (n === -1) return e;
|
|
2428
2455
|
let r = /<\/p>\s*$/.exec(e);
|
|
2429
2456
|
if (!r || r.index <= n) return e;
|
|
@@ -2431,22 +2458,22 @@ function Do(e) {
|
|
|
2431
2458
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2432
2459
|
}
|
|
2433
2460
|
// src/components/blocks/TitleBlock.vue
|
|
2434
|
-
var
|
|
2461
|
+
var No = /* @__PURE__ */ R({
|
|
2435
2462
|
__name: "TitleBlock",
|
|
2436
2463
|
props: {
|
|
2437
2464
|
block: {},
|
|
2438
2465
|
viewport: {}
|
|
2439
2466
|
},
|
|
2440
2467
|
setup(e) {
|
|
2441
|
-
let t = e, n = I(() => import("./TitleEditor-
|
|
2468
|
+
let t = e, n = I(() => import("./TitleEditor-CEGbJXeU.js")), r = Wn(Tn, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: c, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = qa(() => t.block.content), p = C(() => {
|
|
2442
2469
|
let e = {
|
|
2443
|
-
fontSize: `${
|
|
2470
|
+
fontSize: `${Re[t.block.level]}px`,
|
|
2444
2471
|
lineHeight: String(ct),
|
|
2445
2472
|
fontWeight: "700",
|
|
2446
2473
|
textAlign: t.block.textAlign
|
|
2447
2474
|
};
|
|
2448
2475
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2449
|
-
}), m = C(() => `h${t.block.level}`), h = C(() => Kt(
|
|
2476
|
+
}), m = C(() => `h${t.block.level}`), h = C(() => Kt(Mo(l.value)));
|
|
2450
2477
|
return (t, r) => (s(), D("div", {
|
|
2451
2478
|
ref_key: "blockRef",
|
|
2452
2479
|
ref: a,
|
|
@@ -2472,14 +2499,14 @@ var Oo = /* @__PURE__ */ R({
|
|
|
2472
2499
|
innerHTML: h.value
|
|
2473
2500
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2474
2501
|
}
|
|
2475
|
-
}),
|
|
2476
|
-
function
|
|
2477
|
-
let n =
|
|
2478
|
-
n.color =
|
|
2479
|
-
let r =
|
|
2480
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2481
|
-
let i =
|
|
2482
|
-
return i.align = "center",
|
|
2502
|
+
}), Po = "hero", Fo = "#1f2937", Io = "#ffffff";
|
|
2503
|
+
function Lo(e, t) {
|
|
2504
|
+
let n = Ge("title", e);
|
|
2505
|
+
n.color = Io, n.textAlign = "center";
|
|
2506
|
+
let r = Ge("paragraph", e);
|
|
2507
|
+
r.content = `<p style="text-align: center"><span style="color: ${Io}">${Ro(t)}</span></p>`;
|
|
2508
|
+
let i = Ge("button", e);
|
|
2509
|
+
return i.align = "center", ue({
|
|
2483
2510
|
columns: "1",
|
|
2484
2511
|
children: [[
|
|
2485
2512
|
n,
|
|
@@ -2497,96 +2524,96 @@ function Mo(e, t) {
|
|
|
2497
2524
|
bottom: 48,
|
|
2498
2525
|
left: 24
|
|
2499
2526
|
},
|
|
2500
|
-
backgroundColor:
|
|
2527
|
+
backgroundColor: Fo
|
|
2501
2528
|
}
|
|
2502
2529
|
});
|
|
2503
2530
|
}
|
|
2504
|
-
function
|
|
2531
|
+
function Ro(e) {
|
|
2505
2532
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2506
2533
|
}
|
|
2507
2534
|
// src/utils/sectionColumnDrop.ts
|
|
2508
|
-
var
|
|
2509
|
-
function
|
|
2510
|
-
return e.dataset.blockType !== "section" && !
|
|
2535
|
+
var zo = /* @__PURE__ */ new Set(["section", Po]);
|
|
2536
|
+
function Bo(e) {
|
|
2537
|
+
return e.dataset.blockType !== "section" && !zo.has(e.dataset.paletteType ?? "");
|
|
2511
2538
|
}
|
|
2512
2539
|
// ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2513
|
-
var
|
|
2540
|
+
var Vo = Object.defineProperty, Ho = Object.getOwnPropertySymbols, Uo = Object.prototype.hasOwnProperty, Wo = Object.prototype.propertyIsEnumerable, Go = (e, t, n) => t in e ? Vo(e, t, {
|
|
2514
2541
|
enumerable: !0,
|
|
2515
2542
|
configurable: !0,
|
|
2516
2543
|
writable: !0,
|
|
2517
2544
|
value: n
|
|
2518
|
-
}) : e[t] = n,
|
|
2519
|
-
for (var n in t ||= {})
|
|
2520
|
-
if (
|
|
2545
|
+
}) : e[t] = n, Ko = (e, t) => {
|
|
2546
|
+
for (var n in t ||= {}) Uo.call(t, n) && Go(e, n, t[n]);
|
|
2547
|
+
if (Ho) for (var n of Ho(t)) Wo.call(t, n) && Go(e, n, t[n]);
|
|
2521
2548
|
return e;
|
|
2522
|
-
},
|
|
2549
|
+
}, qo = (e, t) => {
|
|
2523
2550
|
var n = {};
|
|
2524
|
-
for (var r in e)
|
|
2525
|
-
if (e != null &&
|
|
2551
|
+
for (var r in e) Uo.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2552
|
+
if (e != null && Ho) for (var r of Ho(e)) t.indexOf(r) < 0 && Wo.call(e, r) && (n[r] = e[r]);
|
|
2526
2553
|
return n;
|
|
2527
|
-
},
|
|
2528
|
-
function
|
|
2529
|
-
console.warn(
|
|
2554
|
+
}, Jo = "[vue-draggable-plus]: ";
|
|
2555
|
+
function Yo(e) {
|
|
2556
|
+
console.warn(Jo + e);
|
|
2530
2557
|
}
|
|
2531
|
-
function
|
|
2532
|
-
console.error(
|
|
2558
|
+
function Xo(e) {
|
|
2559
|
+
console.error(Jo + e);
|
|
2533
2560
|
}
|
|
2534
|
-
function
|
|
2561
|
+
function Zo(e, t, n) {
|
|
2535
2562
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2536
2563
|
}
|
|
2537
|
-
function
|
|
2564
|
+
function Qo(e) {
|
|
2538
2565
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2539
2566
|
}
|
|
2540
|
-
function
|
|
2541
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2567
|
+
function $o(e) {
|
|
2568
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Qo(n)] = e[n]), t), {});
|
|
2542
2569
|
}
|
|
2543
|
-
function
|
|
2570
|
+
function es(e, t) {
|
|
2544
2571
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2545
2572
|
}
|
|
2546
|
-
function
|
|
2573
|
+
function ts(e, t, n) {
|
|
2547
2574
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2548
2575
|
}
|
|
2549
|
-
function
|
|
2576
|
+
function ns(e) {
|
|
2550
2577
|
return e === void 0;
|
|
2551
2578
|
}
|
|
2552
|
-
function
|
|
2579
|
+
function rs(e) {
|
|
2553
2580
|
return typeof e == "string";
|
|
2554
2581
|
}
|
|
2555
|
-
function
|
|
2582
|
+
function is(e, t, n) {
|
|
2556
2583
|
let r = e.children[n];
|
|
2557
2584
|
e.insertBefore(t, r);
|
|
2558
2585
|
}
|
|
2559
|
-
function
|
|
2586
|
+
function as(e) {
|
|
2560
2587
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2561
2588
|
}
|
|
2562
|
-
function
|
|
2589
|
+
function os(e, t = document) {
|
|
2563
2590
|
let n = null;
|
|
2564
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2591
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Yo(`Element not found: ${e}`), n;
|
|
2565
2592
|
}
|
|
2566
|
-
function
|
|
2593
|
+
function ss(e, t, n = null) {
|
|
2567
2594
|
return function(...r) {
|
|
2568
2595
|
return e.apply(n, r), t.apply(n, r);
|
|
2569
2596
|
};
|
|
2570
2597
|
}
|
|
2571
|
-
function
|
|
2572
|
-
let n =
|
|
2598
|
+
function cs(e, t) {
|
|
2599
|
+
let n = Ko({}, e);
|
|
2573
2600
|
return Object.keys(t).forEach((r) => {
|
|
2574
|
-
n[r] ? n[r] =
|
|
2601
|
+
n[r] ? n[r] = ss(e[r], t[r]) : n[r] = t[r];
|
|
2575
2602
|
}), n;
|
|
2576
2603
|
}
|
|
2577
|
-
function
|
|
2604
|
+
function ls(e) {
|
|
2578
2605
|
return e instanceof HTMLElement;
|
|
2579
2606
|
}
|
|
2580
|
-
function
|
|
2607
|
+
function us(e, t) {
|
|
2581
2608
|
Object.keys(e).forEach((n) => {
|
|
2582
2609
|
t(n, e[n]);
|
|
2583
2610
|
});
|
|
2584
2611
|
}
|
|
2585
|
-
function
|
|
2612
|
+
function ds(e) {
|
|
2586
2613
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2587
2614
|
}
|
|
2588
|
-
var
|
|
2589
|
-
function
|
|
2615
|
+
var fs = Object.assign;
|
|
2616
|
+
function ps(e, t) {
|
|
2590
2617
|
var n = Object.keys(e);
|
|
2591
2618
|
if (Object.getOwnPropertySymbols) {
|
|
2592
2619
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2596,26 +2623,26 @@ function cs(e, t) {
|
|
|
2596
2623
|
}
|
|
2597
2624
|
return n;
|
|
2598
2625
|
}
|
|
2599
|
-
function
|
|
2626
|
+
function ms(e) {
|
|
2600
2627
|
for (var t = 1; t < arguments.length; t++) {
|
|
2601
2628
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2602
|
-
t % 2 ?
|
|
2603
|
-
|
|
2604
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2629
|
+
t % 2 ? ps(Object(n), !0).forEach(function(t) {
|
|
2630
|
+
gs(e, t, n[t]);
|
|
2631
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ps(Object(n)).forEach(function(t) {
|
|
2605
2632
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2606
2633
|
});
|
|
2607
2634
|
}
|
|
2608
2635
|
return e;
|
|
2609
2636
|
}
|
|
2610
|
-
function
|
|
2637
|
+
function hs(e) {
|
|
2611
2638
|
"@babel/helpers - typeof";
|
|
2612
|
-
return
|
|
2639
|
+
return hs = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2613
2640
|
return typeof e;
|
|
2614
2641
|
} : function(e) {
|
|
2615
2642
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2616
|
-
},
|
|
2643
|
+
}, hs(e);
|
|
2617
2644
|
}
|
|
2618
|
-
function
|
|
2645
|
+
function gs(e, t, n) {
|
|
2619
2646
|
return t in e ? Object.defineProperty(e, t, {
|
|
2620
2647
|
value: n,
|
|
2621
2648
|
enumerable: !0,
|
|
@@ -2623,44 +2650,44 @@ function ds(e, t, n) {
|
|
|
2623
2650
|
writable: !0
|
|
2624
2651
|
}) : e[t] = n, e;
|
|
2625
2652
|
}
|
|
2626
|
-
function
|
|
2627
|
-
return
|
|
2653
|
+
function _s() {
|
|
2654
|
+
return _s = Object.assign || function(e) {
|
|
2628
2655
|
for (var t = 1; t < arguments.length; t++) {
|
|
2629
2656
|
var n = arguments[t];
|
|
2630
2657
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2631
2658
|
}
|
|
2632
2659
|
return e;
|
|
2633
|
-
},
|
|
2660
|
+
}, _s.apply(this, arguments);
|
|
2634
2661
|
}
|
|
2635
|
-
function
|
|
2662
|
+
function vs(e, t) {
|
|
2636
2663
|
if (e == null) return {};
|
|
2637
2664
|
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]);
|
|
2638
2665
|
return n;
|
|
2639
2666
|
}
|
|
2640
|
-
function
|
|
2667
|
+
function ys(e, t) {
|
|
2641
2668
|
if (e == null) return {};
|
|
2642
|
-
var n =
|
|
2669
|
+
var n = vs(e, t), r, i;
|
|
2643
2670
|
if (Object.getOwnPropertySymbols) {
|
|
2644
2671
|
var a = Object.getOwnPropertySymbols(e);
|
|
2645
2672
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2646
2673
|
}
|
|
2647
2674
|
return n;
|
|
2648
2675
|
}
|
|
2649
|
-
var
|
|
2650
|
-
function
|
|
2676
|
+
var bs = "1.15.2";
|
|
2677
|
+
function xs(e) {
|
|
2651
2678
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2652
2679
|
}
|
|
2653
|
-
var
|
|
2680
|
+
var Ss = xs(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Cs = xs(/Edge/i), ws = xs(/firefox/i), Ts = xs(/safari/i) && !xs(/chrome/i) && !xs(/android/i), Es = xs(/iP(ad|od|hone)/i), Ds = xs(/chrome/i) && xs(/android/i), Os = {
|
|
2654
2681
|
capture: !1,
|
|
2655
2682
|
passive: !1
|
|
2656
2683
|
};
|
|
2657
2684
|
function V(e, t, n) {
|
|
2658
|
-
e.addEventListener(t, n, !
|
|
2685
|
+
e.addEventListener(t, n, !Ss && Os);
|
|
2659
2686
|
}
|
|
2660
2687
|
function H(e, t, n) {
|
|
2661
|
-
e.removeEventListener(t, n, !
|
|
2688
|
+
e.removeEventListener(t, n, !Ss && Os);
|
|
2662
2689
|
}
|
|
2663
|
-
function
|
|
2690
|
+
function ks(e, t) {
|
|
2664
2691
|
if (t) {
|
|
2665
2692
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2666
2693
|
if (e.matches) return e.matches(t);
|
|
@@ -2672,22 +2699,22 @@ function ws(e, t) {
|
|
|
2672
2699
|
return !1;
|
|
2673
2700
|
}
|
|
2674
2701
|
}
|
|
2675
|
-
function
|
|
2702
|
+
function As(e) {
|
|
2676
2703
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2677
2704
|
}
|
|
2678
|
-
function
|
|
2705
|
+
function js(e, t, n, r) {
|
|
2679
2706
|
if (e) {
|
|
2680
2707
|
n ||= document;
|
|
2681
2708
|
do {
|
|
2682
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2709
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && ks(e, t) : ks(e, t)) || r && e === n) return e;
|
|
2683
2710
|
if (e === n) break;
|
|
2684
|
-
} while (e =
|
|
2711
|
+
} while (e = As(e));
|
|
2685
2712
|
}
|
|
2686
2713
|
return null;
|
|
2687
2714
|
}
|
|
2688
|
-
var
|
|
2689
|
-
function
|
|
2690
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2715
|
+
var Ms = /\s+/g;
|
|
2716
|
+
function Ns(e, t, n) {
|
|
2717
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Ms, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Ms, " "));
|
|
2691
2718
|
}
|
|
2692
2719
|
function U(e, t, n) {
|
|
2693
2720
|
var r = e && e.style;
|
|
@@ -2696,7 +2723,7 @@ function U(e, t, n) {
|
|
|
2696
2723
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2697
2724
|
}
|
|
2698
2725
|
}
|
|
2699
|
-
function
|
|
2726
|
+
function Ps(e, t) {
|
|
2700
2727
|
var n = "";
|
|
2701
2728
|
if (typeof e == "string") n = e;
|
|
2702
2729
|
else do {
|
|
@@ -2706,7 +2733,7 @@ function ks(e, t) {
|
|
|
2706
2733
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2707
2734
|
return i && new i(n);
|
|
2708
2735
|
}
|
|
2709
|
-
function
|
|
2736
|
+
function Fs(e, t, n) {
|
|
2710
2737
|
if (e) {
|
|
2711
2738
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2712
2739
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2714,13 +2741,13 @@ function As(e, t, n) {
|
|
|
2714
2741
|
}
|
|
2715
2742
|
return [];
|
|
2716
2743
|
}
|
|
2717
|
-
function
|
|
2744
|
+
function Is() {
|
|
2718
2745
|
return document.scrollingElement || document.documentElement;
|
|
2719
2746
|
}
|
|
2720
2747
|
function W(e, t, n, r, i) {
|
|
2721
2748
|
if (e.getBoundingClientRect || e === window) {
|
|
2722
2749
|
var a, o, s, c, l, u, d;
|
|
2723
|
-
if (e !== window && e.parentNode && e !==
|
|
2750
|
+
if (e !== window && e.parentNode && e !== Is() ? (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, !Ss)) do
|
|
2724
2751
|
if (i && i.getBoundingClientRect && (U(i, "transform") !== "none" || n && U(i, "position") !== "static")) {
|
|
2725
2752
|
var f = i.getBoundingClientRect();
|
|
2726
2753
|
o -= f.top + parseInt(U(i, "border-top-width")), s -= f.left + parseInt(U(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2728,7 +2755,7 @@ function W(e, t, n, r, i) {
|
|
|
2728
2755
|
}
|
|
2729
2756
|
while (i = i.parentNode);
|
|
2730
2757
|
if (r && e !== window) {
|
|
2731
|
-
var p =
|
|
2758
|
+
var p = Ps(i || e), m = p && p.a, h = p && p.d;
|
|
2732
2759
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2733
2760
|
}
|
|
2734
2761
|
return {
|
|
@@ -2741,18 +2768,18 @@ function W(e, t, n, r, i) {
|
|
|
2741
2768
|
};
|
|
2742
2769
|
}
|
|
2743
2770
|
}
|
|
2744
|
-
function
|
|
2745
|
-
for (var r =
|
|
2771
|
+
function Ls(e, t, n) {
|
|
2772
|
+
for (var r = Us(e, !0), i = W(e)[t]; r;) {
|
|
2746
2773
|
var a = W(r)[n], o = void 0;
|
|
2747
2774
|
if (o = i >= a, !o) return r;
|
|
2748
|
-
if (r ===
|
|
2749
|
-
r =
|
|
2775
|
+
if (r === Is()) break;
|
|
2776
|
+
r = Us(r, !1);
|
|
2750
2777
|
}
|
|
2751
2778
|
return !1;
|
|
2752
2779
|
}
|
|
2753
|
-
function
|
|
2780
|
+
function Rs(e, t, n, r) {
|
|
2754
2781
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2755
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2782
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && js(o[a], n.draggable, e, !1)) {
|
|
2756
2783
|
if (i === t) return o[a];
|
|
2757
2784
|
i++;
|
|
2758
2785
|
}
|
|
@@ -2760,84 +2787,84 @@ function Ns(e, t, n, r) {
|
|
|
2760
2787
|
}
|
|
2761
2788
|
return null;
|
|
2762
2789
|
}
|
|
2763
|
-
function
|
|
2764
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || U(n, "display") === "none" || t && !
|
|
2790
|
+
function zs(e, t) {
|
|
2791
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || U(n, "display") === "none" || t && !ks(n, t));) n = n.previousElementSibling;
|
|
2765
2792
|
return n || null;
|
|
2766
2793
|
}
|
|
2767
|
-
function
|
|
2794
|
+
function Bs(e, t) {
|
|
2768
2795
|
var n = 0;
|
|
2769
2796
|
if (!e || !e.parentNode) return -1;
|
|
2770
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2797
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || ks(e, t)) && n++;
|
|
2771
2798
|
return n;
|
|
2772
2799
|
}
|
|
2773
|
-
function
|
|
2774
|
-
var t = 0, n = 0, r =
|
|
2800
|
+
function Vs(e) {
|
|
2801
|
+
var t = 0, n = 0, r = Is();
|
|
2775
2802
|
if (e) do {
|
|
2776
|
-
var i =
|
|
2803
|
+
var i = Ps(e), a = i.a, o = i.d;
|
|
2777
2804
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2778
2805
|
} while (e !== r && (e = e.parentNode));
|
|
2779
2806
|
return [t, n];
|
|
2780
2807
|
}
|
|
2781
|
-
function
|
|
2808
|
+
function Hs(e, t) {
|
|
2782
2809
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2783
2810
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2784
2811
|
}
|
|
2785
2812
|
return -1;
|
|
2786
2813
|
}
|
|
2787
|
-
function
|
|
2788
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2814
|
+
function Us(e, t) {
|
|
2815
|
+
if (!e || !e.getBoundingClientRect) return Is();
|
|
2789
2816
|
var n = e, r = !1;
|
|
2790
2817
|
do
|
|
2791
2818
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2792
2819
|
var i = U(n);
|
|
2793
2820
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2794
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2821
|
+
if (!n.getBoundingClientRect || n === document.body) return Is();
|
|
2795
2822
|
if (r || t) return n;
|
|
2796
2823
|
r = !0;
|
|
2797
2824
|
}
|
|
2798
2825
|
}
|
|
2799
2826
|
while (n = n.parentNode);
|
|
2800
|
-
return
|
|
2827
|
+
return Is();
|
|
2801
2828
|
}
|
|
2802
|
-
function
|
|
2829
|
+
function Ws(e, t) {
|
|
2803
2830
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2804
2831
|
return e;
|
|
2805
2832
|
}
|
|
2806
|
-
function
|
|
2833
|
+
function Gs(e, t) {
|
|
2807
2834
|
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);
|
|
2808
2835
|
}
|
|
2809
|
-
var
|
|
2810
|
-
function
|
|
2836
|
+
var Ks;
|
|
2837
|
+
function qs(e, t) {
|
|
2811
2838
|
return function() {
|
|
2812
|
-
if (!
|
|
2839
|
+
if (!Ks) {
|
|
2813
2840
|
var n = arguments, r = this;
|
|
2814
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2815
|
-
|
|
2841
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ks = setTimeout(function() {
|
|
2842
|
+
Ks = void 0;
|
|
2816
2843
|
}, t);
|
|
2817
2844
|
}
|
|
2818
2845
|
};
|
|
2819
2846
|
}
|
|
2820
|
-
function
|
|
2821
|
-
clearTimeout(
|
|
2847
|
+
function Js() {
|
|
2848
|
+
clearTimeout(Ks), Ks = void 0;
|
|
2822
2849
|
}
|
|
2823
|
-
function
|
|
2850
|
+
function Ys(e, t, n) {
|
|
2824
2851
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2825
2852
|
}
|
|
2826
|
-
function
|
|
2853
|
+
function Xs(e) {
|
|
2827
2854
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2828
2855
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2829
2856
|
}
|
|
2830
|
-
function
|
|
2857
|
+
function Zs(e, t, n) {
|
|
2831
2858
|
var r = {};
|
|
2832
2859
|
return Array.from(e.children).forEach(function(i) {
|
|
2833
|
-
if (
|
|
2860
|
+
if (js(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2834
2861
|
var a = W(i);
|
|
2835
2862
|
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);
|
|
2836
2863
|
}
|
|
2837
2864
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2838
2865
|
}
|
|
2839
|
-
var
|
|
2840
|
-
function
|
|
2866
|
+
var Qs = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2867
|
+
function $s() {
|
|
2841
2868
|
var e = [], t;
|
|
2842
2869
|
return {
|
|
2843
2870
|
captureAnimationState: function() {
|
|
@@ -2847,9 +2874,9 @@ function Js() {
|
|
|
2847
2874
|
target: t,
|
|
2848
2875
|
rect: W(t)
|
|
2849
2876
|
});
|
|
2850
|
-
var n =
|
|
2877
|
+
var n = ms({}, e[e.length - 1].rect);
|
|
2851
2878
|
if (t.thisAnimationDuration) {
|
|
2852
|
-
var r =
|
|
2879
|
+
var r = Ps(t, !0);
|
|
2853
2880
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2854
2881
|
}
|
|
2855
2882
|
t.fromRect = n;
|
|
@@ -2860,7 +2887,7 @@ function Js() {
|
|
|
2860
2887
|
e.push(t);
|
|
2861
2888
|
},
|
|
2862
2889
|
removeAnimationState: function(t) {
|
|
2863
|
-
e.splice(
|
|
2890
|
+
e.splice(Hs(e, { target: t }), 1);
|
|
2864
2891
|
},
|
|
2865
2892
|
animateAll: function(n) {
|
|
2866
2893
|
var r = this;
|
|
@@ -2868,8 +2895,8 @@ function Js() {
|
|
|
2868
2895
|
else {
|
|
2869
2896
|
var i = !1, a = 0;
|
|
2870
2897
|
e.forEach(function(e) {
|
|
2871
|
-
var t = 0, n = e.target, o = n.fromRect, s = W(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2872
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2898
|
+
var t = 0, n = e.target, o = n.fromRect, s = W(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Ps(n, !0);
|
|
2899
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Gs(c, s) && !Gs(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = tc(u, c, l, r.options)), Gs(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() {
|
|
2873
2900
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2874
2901
|
}, t), n.thisAnimationDuration = t);
|
|
2875
2902
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2880,26 +2907,26 @@ function Js() {
|
|
|
2880
2907
|
animate: function(e, t, n, r) {
|
|
2881
2908
|
if (r) {
|
|
2882
2909
|
U(e, "transition", ""), U(e, "transform", "");
|
|
2883
|
-
var i =
|
|
2884
|
-
e.animatingX = !!s, e.animatingY = !!c, U(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2910
|
+
var i = Ps(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2911
|
+
e.animatingX = !!s, e.animatingY = !!c, U(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = ec(e), U(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), U(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2885
2912
|
U(e, "transition", ""), U(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2886
2913
|
}, r);
|
|
2887
2914
|
}
|
|
2888
2915
|
}
|
|
2889
2916
|
};
|
|
2890
2917
|
}
|
|
2891
|
-
function
|
|
2918
|
+
function ec(e) {
|
|
2892
2919
|
return e.offsetWidth;
|
|
2893
2920
|
}
|
|
2894
|
-
function
|
|
2921
|
+
function tc(e, t, n, r) {
|
|
2895
2922
|
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;
|
|
2896
2923
|
}
|
|
2897
|
-
var
|
|
2924
|
+
var nc = [], rc = { initializeByDefault: !0 }, ic = {
|
|
2898
2925
|
mount: function(e) {
|
|
2899
|
-
for (var t in
|
|
2900
|
-
|
|
2926
|
+
for (var t in rc) rc.hasOwnProperty(t) && !(t in e) && (e[t] = rc[t]);
|
|
2927
|
+
nc.forEach(function(t) {
|
|
2901
2928
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2902
|
-
}),
|
|
2929
|
+
}), nc.push(e);
|
|
2903
2930
|
},
|
|
2904
2931
|
pluginEvent: function(e, t, n) {
|
|
2905
2932
|
var r = this;
|
|
@@ -2907,16 +2934,16 @@ var Zs = [], Qs = { initializeByDefault: !0 }, $s = {
|
|
|
2907
2934
|
r.eventCanceled = !0;
|
|
2908
2935
|
};
|
|
2909
2936
|
var i = e + "Global";
|
|
2910
|
-
|
|
2911
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2937
|
+
nc.forEach(function(r) {
|
|
2938
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ms({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ms({ sortable: t }, n)));
|
|
2912
2939
|
});
|
|
2913
2940
|
},
|
|
2914
2941
|
initializePlugins: function(e, t, n, r) {
|
|
2915
|
-
for (var i in
|
|
2942
|
+
for (var i in nc.forEach(function(r) {
|
|
2916
2943
|
var i = r.pluginName;
|
|
2917
2944
|
if (e.options[i] || r.initializeByDefault) {
|
|
2918
2945
|
var a = new r(e, t, e.options);
|
|
2919
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2946
|
+
a.sortable = e, a.options = e.options, e[i] = a, _s(n, a.defaults);
|
|
2920
2947
|
}
|
|
2921
2948
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2922
2949
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2925,59 +2952,59 @@ var Zs = [], Qs = { initializeByDefault: !0 }, $s = {
|
|
|
2925
2952
|
},
|
|
2926
2953
|
getEventProperties: function(e, t) {
|
|
2927
2954
|
var n = {};
|
|
2928
|
-
return
|
|
2929
|
-
typeof r.eventProperties == "function" &&
|
|
2955
|
+
return nc.forEach(function(r) {
|
|
2956
|
+
typeof r.eventProperties == "function" && _s(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2930
2957
|
}), n;
|
|
2931
2958
|
},
|
|
2932
2959
|
modifyOption: function(e, t, n) {
|
|
2933
2960
|
var r;
|
|
2934
|
-
return
|
|
2961
|
+
return nc.forEach(function(i) {
|
|
2935
2962
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2936
2963
|
}), r;
|
|
2937
2964
|
}
|
|
2938
2965
|
};
|
|
2939
|
-
function
|
|
2966
|
+
function ac(e) {
|
|
2940
2967
|
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;
|
|
2941
|
-
if (t ||= n && n[
|
|
2968
|
+
if (t ||= n && n[Qs], t) {
|
|
2942
2969
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2943
|
-
window.CustomEvent && !
|
|
2970
|
+
window.CustomEvent && !Ss && !Cs ? h = new CustomEvent(r, {
|
|
2944
2971
|
bubbles: !0,
|
|
2945
2972
|
cancelable: !0
|
|
2946
2973
|
}) : (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;
|
|
2947
|
-
var v =
|
|
2974
|
+
var v = ms(ms({}, m), ic.getEventProperties(r, t));
|
|
2948
2975
|
for (var y in v) h[y] = v[y];
|
|
2949
2976
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2950
2977
|
}
|
|
2951
2978
|
}
|
|
2952
|
-
var
|
|
2953
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2954
|
-
|
|
2979
|
+
var oc = ["evt"], sc = function(e, t) {
|
|
2980
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ys(n, oc);
|
|
2981
|
+
ic.pluginEvent.bind(Q)(e, t, ms({
|
|
2955
2982
|
dragEl: G,
|
|
2956
2983
|
parentEl: K,
|
|
2957
2984
|
ghostEl: q,
|
|
2958
2985
|
rootEl: J,
|
|
2959
|
-
nextEl:
|
|
2960
|
-
lastDownEl:
|
|
2986
|
+
nextEl: lc,
|
|
2987
|
+
lastDownEl: uc,
|
|
2961
2988
|
cloneEl: Y,
|
|
2962
|
-
cloneHidden:
|
|
2963
|
-
dragStarted:
|
|
2989
|
+
cloneHidden: dc,
|
|
2990
|
+
dragStarted: Ec,
|
|
2964
2991
|
putSortable: X,
|
|
2965
2992
|
activeSortable: Q.active,
|
|
2966
2993
|
originalEvent: r,
|
|
2967
|
-
oldIndex:
|
|
2968
|
-
oldDraggableIndex:
|
|
2969
|
-
newIndex:
|
|
2970
|
-
newDraggableIndex:
|
|
2971
|
-
hideGhostForTarget:
|
|
2972
|
-
unhideGhostForTarget:
|
|
2994
|
+
oldIndex: fc,
|
|
2995
|
+
oldDraggableIndex: mc,
|
|
2996
|
+
newIndex: pc,
|
|
2997
|
+
newDraggableIndex: hc,
|
|
2998
|
+
hideGhostForTarget: Wc,
|
|
2999
|
+
unhideGhostForTarget: Gc,
|
|
2973
3000
|
cloneNowHidden: function() {
|
|
2974
|
-
|
|
3001
|
+
dc = !0;
|
|
2975
3002
|
},
|
|
2976
3003
|
cloneNowShown: function() {
|
|
2977
|
-
|
|
3004
|
+
dc = !1;
|
|
2978
3005
|
},
|
|
2979
3006
|
dispatchSortableEvent: function(e) {
|
|
2980
|
-
|
|
3007
|
+
cc({
|
|
2981
3008
|
sortable: t,
|
|
2982
3009
|
name: e,
|
|
2983
3010
|
originalEvent: r
|
|
@@ -2985,46 +3012,46 @@ var tc = ["evt"], nc = function(e, t) {
|
|
|
2985
3012
|
}
|
|
2986
3013
|
}, i));
|
|
2987
3014
|
};
|
|
2988
|
-
function
|
|
2989
|
-
|
|
3015
|
+
function cc(e) {
|
|
3016
|
+
ac(ms({
|
|
2990
3017
|
putSortable: X,
|
|
2991
3018
|
cloneEl: Y,
|
|
2992
3019
|
targetEl: G,
|
|
2993
3020
|
rootEl: J,
|
|
2994
|
-
oldIndex:
|
|
2995
|
-
oldDraggableIndex:
|
|
2996
|
-
newIndex:
|
|
2997
|
-
newDraggableIndex:
|
|
3021
|
+
oldIndex: fc,
|
|
3022
|
+
oldDraggableIndex: mc,
|
|
3023
|
+
newIndex: pc,
|
|
3024
|
+
newDraggableIndex: hc
|
|
2998
3025
|
}, e));
|
|
2999
3026
|
}
|
|
3000
|
-
var G, K, q, J,
|
|
3001
|
-
if (
|
|
3002
|
-
if (
|
|
3027
|
+
var G, K, q, J, lc, uc, Y, dc, fc, pc, mc, hc, gc, X, _c = !1, vc = !1, yc = [], bc, xc, Sc, Cc, wc, Tc, Ec, Dc, Oc, kc = !1, Ac = !1, jc, Z, Mc = [], Nc = !1, Pc = [], Fc = typeof document < "u", Ic = Es, Lc = Cs || Ss ? "cssFloat" : "float", Rc = Fc && !Ds && !Es && "draggable" in document.createElement("div"), zc = function() {
|
|
3028
|
+
if (Fc) {
|
|
3029
|
+
if (Ss) return !1;
|
|
3003
3030
|
var e = document.createElement("x");
|
|
3004
3031
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3005
3032
|
}
|
|
3006
|
-
}(),
|
|
3007
|
-
var n = U(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
3033
|
+
}(), Bc = function(e, t) {
|
|
3034
|
+
var n = U(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Rs(e, 0, t), a = Rs(e, 1, t), o = i && U(i), s = a && U(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + W(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + W(a).width;
|
|
3008
3035
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3009
3036
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3010
3037
|
if (i && o.float && o.float !== "none") {
|
|
3011
3038
|
var u = o.float === "left" ? "left" : "right";
|
|
3012
3039
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3013
3040
|
}
|
|
3014
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3015
|
-
},
|
|
3041
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Lc] === "none" || a && n[Lc] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3042
|
+
}, Vc = function(e, t, n) {
|
|
3016
3043
|
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;
|
|
3017
3044
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3018
|
-
},
|
|
3045
|
+
}, Hc = function(e, t) {
|
|
3019
3046
|
var n;
|
|
3020
|
-
return
|
|
3021
|
-
var i = r[
|
|
3022
|
-
if (i && !
|
|
3047
|
+
return yc.some(function(r) {
|
|
3048
|
+
var i = r[Qs].options.emptyInsertThreshold;
|
|
3049
|
+
if (i && !zs(r)) {
|
|
3023
3050
|
var a = W(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3024
3051
|
if (o && s) return n = r;
|
|
3025
3052
|
}
|
|
3026
3053
|
}), n;
|
|
3027
|
-
},
|
|
3054
|
+
}, Uc = function(e) {
|
|
3028
3055
|
function t(e, n) {
|
|
3029
3056
|
return function(r, i, a, o) {
|
|
3030
3057
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3037,31 +3064,31 @@ var G, K, q, J, ic, ac, Y, oc, sc, cc, lc, uc, dc, X, fc = !1, pc = !1, mc = [],
|
|
|
3037
3064
|
};
|
|
3038
3065
|
}
|
|
3039
3066
|
var n = {}, r = e.group;
|
|
3040
|
-
r &&
|
|
3041
|
-
},
|
|
3042
|
-
!
|
|
3043
|
-
},
|
|
3044
|
-
!
|
|
3067
|
+
r && hs(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;
|
|
3068
|
+
}, Wc = function() {
|
|
3069
|
+
!zc && q && U(q, "display", "none");
|
|
3070
|
+
}, Gc = function() {
|
|
3071
|
+
!zc && q && U(q, "display", "");
|
|
3045
3072
|
};
|
|
3046
|
-
|
|
3047
|
-
if (
|
|
3073
|
+
Fc && !Ds && document.addEventListener("click", function(e) {
|
|
3074
|
+
if (vc) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), vc = !1, !1;
|
|
3048
3075
|
}, !0);
|
|
3049
|
-
var
|
|
3076
|
+
var Kc = function(e) {
|
|
3050
3077
|
if (G) {
|
|
3051
3078
|
e = e.touches ? e.touches[0] : e;
|
|
3052
|
-
var t =
|
|
3079
|
+
var t = Hc(e.clientX, e.clientY);
|
|
3053
3080
|
if (t) {
|
|
3054
3081
|
var n = {};
|
|
3055
3082
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3056
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3083
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[Qs]._onDragOver(n);
|
|
3057
3084
|
}
|
|
3058
3085
|
}
|
|
3059
|
-
},
|
|
3060
|
-
G && G.parentNode[
|
|
3086
|
+
}, qc = function(e) {
|
|
3087
|
+
G && G.parentNode[Qs]._isOutsideThisEl(e.target);
|
|
3061
3088
|
};
|
|
3062
3089
|
function Q(e, t) {
|
|
3063
3090
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3064
|
-
this.el = e, this.options = t =
|
|
3091
|
+
this.el = e, this.options = t = _s({}, t), e[Qs] = this;
|
|
3065
3092
|
var n = {
|
|
3066
3093
|
group: null,
|
|
3067
3094
|
sort: !0,
|
|
@@ -3074,7 +3101,7 @@ function Q(e, t) {
|
|
|
3074
3101
|
invertedSwapThreshold: null,
|
|
3075
3102
|
removeCloneOnHide: !0,
|
|
3076
3103
|
direction: function() {
|
|
3077
|
-
return
|
|
3104
|
+
return Bc(e, this.options);
|
|
3078
3105
|
},
|
|
3079
3106
|
ghostClass: "sortable-ghost",
|
|
3080
3107
|
chosenClass: "sortable-chosen",
|
|
@@ -3101,17 +3128,17 @@ function Q(e, t) {
|
|
|
3101
3128
|
x: 0,
|
|
3102
3129
|
y: 0
|
|
3103
3130
|
},
|
|
3104
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3131
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Ts,
|
|
3105
3132
|
emptyInsertThreshold: 5
|
|
3106
3133
|
};
|
|
3107
|
-
for (var r in
|
|
3108
|
-
for (var i in
|
|
3109
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3134
|
+
for (var r in ic.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3135
|
+
for (var i in Uc(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3136
|
+
this.nativeDraggable = !t.forceFallback && Rc, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? V(e, "pointerdown", this._onTapStart) : (V(e, "mousedown", this._onTapStart), V(e, "touchstart", this._onTapStart)), this.nativeDraggable && (V(e, "dragover", this), V(e, "dragenter", this)), yc.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), _s(this, $s());
|
|
3110
3137
|
}
|
|
3111
3138
|
Q.prototype = {
|
|
3112
3139
|
constructor: Q,
|
|
3113
3140
|
_isOutsideThisEl: function(e) {
|
|
3114
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3141
|
+
!this.el.contains(e) && e !== this.el && (Dc = null);
|
|
3115
3142
|
},
|
|
3116
3143
|
_getDirection: function(e, t) {
|
|
3117
3144
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
@@ -3119,33 +3146,33 @@ Q.prototype = {
|
|
|
3119
3146
|
_onTapStart: function(e) {
|
|
3120
3147
|
if (e.cancelable) {
|
|
3121
3148
|
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;
|
|
3122
|
-
if (
|
|
3123
|
-
if (
|
|
3149
|
+
if (rl(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ts && s && s.tagName.toUpperCase() === "SELECT") && (s = js(s, r.draggable, n, !1), !(s && s.animated) && uc !== s)) {
|
|
3150
|
+
if (fc = Bs(s), mc = Bs(s, r.draggable), typeof l == "function") {
|
|
3124
3151
|
if (l.call(this, e, s, this)) {
|
|
3125
|
-
|
|
3152
|
+
cc({
|
|
3126
3153
|
sortable: t,
|
|
3127
3154
|
rootEl: c,
|
|
3128
3155
|
name: "filter",
|
|
3129
3156
|
targetEl: s,
|
|
3130
3157
|
toEl: n,
|
|
3131
3158
|
fromEl: n
|
|
3132
|
-
}),
|
|
3159
|
+
}), sc("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3133
3160
|
return;
|
|
3134
3161
|
}
|
|
3135
3162
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3136
|
-
if (r =
|
|
3163
|
+
if (r = js(c, r.trim(), n, !1), r) return cc({
|
|
3137
3164
|
sortable: t,
|
|
3138
3165
|
rootEl: r,
|
|
3139
3166
|
name: "filter",
|
|
3140
3167
|
targetEl: s,
|
|
3141
3168
|
fromEl: n,
|
|
3142
3169
|
toEl: n
|
|
3143
|
-
}),
|
|
3170
|
+
}), sc("filter", t, { evt: e }), !0;
|
|
3144
3171
|
}), l)) {
|
|
3145
3172
|
i && e.cancelable && e.preventDefault();
|
|
3146
3173
|
return;
|
|
3147
3174
|
}
|
|
3148
|
-
r.handle && !
|
|
3175
|
+
r.handle && !js(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3149
3176
|
}
|
|
3150
3177
|
}
|
|
3151
3178
|
},
|
|
@@ -3153,19 +3180,19 @@ Q.prototype = {
|
|
|
3153
3180
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3154
3181
|
if (n && !G && n.parentNode === i) {
|
|
3155
3182
|
var c = W(n);
|
|
3156
|
-
if (J = i, G = n, K = G.parentNode,
|
|
3183
|
+
if (J = i, G = n, K = G.parentNode, lc = G.nextSibling, uc = n, gc = a.group, Q.dragged = G, bc = {
|
|
3157
3184
|
target: G,
|
|
3158
3185
|
clientX: (t || e).clientX,
|
|
3159
3186
|
clientY: (t || e).clientY
|
|
3160
|
-
},
|
|
3161
|
-
|
|
3187
|
+
}, wc = bc.clientX - c.left, Tc = bc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
3188
|
+
sc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !ws && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), cc({
|
|
3162
3189
|
sortable: r,
|
|
3163
3190
|
name: "choose",
|
|
3164
3191
|
originalEvent: e
|
|
3165
|
-
}),
|
|
3192
|
+
}), Ns(G, a.chosenClass, !0));
|
|
3166
3193
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3167
|
-
|
|
3168
|
-
}), V(o, "dragover",
|
|
3194
|
+
Fs(G, e.trim(), Xc);
|
|
3195
|
+
}), V(o, "dragover", Kc), V(o, "mousemove", Kc), V(o, "touchmove", Kc), V(o, "mouseup", r._onDrop), V(o, "touchend", r._onDrop), V(o, "touchcancel", r._onDrop), ws && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), sc("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Cs || Ss))) {
|
|
3169
3196
|
if (Q.eventCanceled) {
|
|
3170
3197
|
this._onDrop();
|
|
3171
3198
|
return;
|
|
@@ -3179,7 +3206,7 @@ Q.prototype = {
|
|
|
3179
3206
|
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();
|
|
3180
3207
|
},
|
|
3181
3208
|
_disableDelayedDrag: function() {
|
|
3182
|
-
G &&
|
|
3209
|
+
G && Xc(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3183
3210
|
},
|
|
3184
3211
|
_disableDelayedDragEvents: function() {
|
|
3185
3212
|
var e = this.el.ownerDocument;
|
|
@@ -3188,16 +3215,16 @@ Q.prototype = {
|
|
|
3188
3215
|
_triggerDragStart: function(e, t) {
|
|
3189
3216
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? V(document, "pointermove", this._onTouchMove) : t ? V(document, "touchmove", this._onTouchMove) : V(document, "mousemove", this._onTouchMove) : (V(G, "dragend", this), V(J, "dragstart", this._onDragStart));
|
|
3190
3217
|
try {
|
|
3191
|
-
document.selection ?
|
|
3218
|
+
document.selection ? il(function() {
|
|
3192
3219
|
document.selection.empty();
|
|
3193
3220
|
}) : window.getSelection().removeAllRanges();
|
|
3194
3221
|
} catch {}
|
|
3195
3222
|
},
|
|
3196
3223
|
_dragStarted: function(e, t) {
|
|
3197
|
-
if (
|
|
3198
|
-
|
|
3224
|
+
if (_c = !1, J && G) {
|
|
3225
|
+
sc("dragStarted", this, { evt: t }), this.nativeDraggable && V(document, "dragover", qc);
|
|
3199
3226
|
var n = this.options;
|
|
3200
|
-
!e &&
|
|
3227
|
+
!e && Ns(G, n.dragClass, !1), Ns(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), cc({
|
|
3201
3228
|
sortable: this,
|
|
3202
3229
|
name: "start",
|
|
3203
3230
|
originalEvent: t
|
|
@@ -3205,33 +3232,33 @@ Q.prototype = {
|
|
|
3205
3232
|
} else this._nulling();
|
|
3206
3233
|
},
|
|
3207
3234
|
_emulateDragOver: function() {
|
|
3208
|
-
if (
|
|
3209
|
-
this._lastX =
|
|
3210
|
-
for (var e = document.elementFromPoint(
|
|
3211
|
-
if (G.parentNode[
|
|
3212
|
-
if (t[
|
|
3235
|
+
if (xc) {
|
|
3236
|
+
this._lastX = xc.clientX, this._lastY = xc.clientY, Wc();
|
|
3237
|
+
for (var e = document.elementFromPoint(xc.clientX, xc.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(xc.clientX, xc.clientY), e !== t);) t = e;
|
|
3238
|
+
if (G.parentNode[Qs]._isOutsideThisEl(e), t) do {
|
|
3239
|
+
if (t[Qs]) {
|
|
3213
3240
|
var n = void 0;
|
|
3214
|
-
if (n = t[
|
|
3215
|
-
clientX:
|
|
3216
|
-
clientY:
|
|
3241
|
+
if (n = t[Qs]._onDragOver({
|
|
3242
|
+
clientX: xc.clientX,
|
|
3243
|
+
clientY: xc.clientY,
|
|
3217
3244
|
target: e,
|
|
3218
3245
|
rootEl: t
|
|
3219
3246
|
}), n && !this.options.dragoverBubble) break;
|
|
3220
3247
|
}
|
|
3221
3248
|
e = t;
|
|
3222
3249
|
} while (t = t.parentNode);
|
|
3223
|
-
|
|
3250
|
+
Gc();
|
|
3224
3251
|
}
|
|
3225
3252
|
},
|
|
3226
3253
|
_onTouchMove: function(e) {
|
|
3227
|
-
if (
|
|
3228
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q &&
|
|
3229
|
-
if (!Q.active && !
|
|
3254
|
+
if (bc) {
|
|
3255
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Ps(q, !0), o = q && a && a.a, s = q && a && a.d, c = Ic && Z && Vs(Z), l = (i.clientX - bc.clientX + r.x) / (o || 1) + (c ? c[0] - Mc[0] : 0) / (o || 1), u = (i.clientY - bc.clientY + r.y) / (s || 1) + (c ? c[1] - Mc[1] : 0) / (s || 1);
|
|
3256
|
+
if (!Q.active && !_c) {
|
|
3230
3257
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3231
3258
|
this._onDragStart(e, !0);
|
|
3232
3259
|
}
|
|
3233
3260
|
if (q) {
|
|
3234
|
-
a ? (a.e += l - (
|
|
3261
|
+
a ? (a.e += l - (Sc || 0), a.f += u - (Cc || 0)) : a = {
|
|
3235
3262
|
a: 1,
|
|
3236
3263
|
b: 0,
|
|
3237
3264
|
c: 0,
|
|
@@ -3240,35 +3267,35 @@ Q.prototype = {
|
|
|
3240
3267
|
f: u
|
|
3241
3268
|
};
|
|
3242
3269
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3243
|
-
U(q, "webkitTransform", d), U(q, "mozTransform", d), U(q, "msTransform", d), U(q, "transform", d),
|
|
3270
|
+
U(q, "webkitTransform", d), U(q, "mozTransform", d), U(q, "msTransform", d), U(q, "transform", d), Sc = l, Cc = u, xc = i;
|
|
3244
3271
|
}
|
|
3245
3272
|
e.cancelable && e.preventDefault();
|
|
3246
3273
|
}
|
|
3247
3274
|
},
|
|
3248
3275
|
_appendGhost: function() {
|
|
3249
3276
|
if (!q) {
|
|
3250
|
-
var e = this.options.fallbackOnBody ? document.body : J, t = W(G, !0,
|
|
3251
|
-
if (
|
|
3277
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = W(G, !0, Ic, !0, e), n = this.options;
|
|
3278
|
+
if (Ic) {
|
|
3252
3279
|
for (Z = e; U(Z, "position") === "static" && U(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3253
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3280
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Is()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Is(), Mc = Vs(Z);
|
|
3254
3281
|
}
|
|
3255
|
-
q = G.cloneNode(!0),
|
|
3282
|
+
q = G.cloneNode(!0), Ns(q, n.ghostClass, !1), Ns(q, n.fallbackClass, !0), Ns(q, n.dragClass, !0), U(q, "transition", ""), U(q, "transform", ""), U(q, "box-sizing", "border-box"), U(q, "margin", 0), U(q, "top", t.top), U(q, "left", t.left), U(q, "width", t.width), U(q, "height", t.height), U(q, "opacity", "0.8"), U(q, "position", Ic ? "absolute" : "fixed"), U(q, "zIndex", "100000"), U(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), U(q, "transform-origin", wc / parseInt(q.style.width) * 100 + "% " + Tc / parseInt(q.style.height) * 100 + "%");
|
|
3256
3283
|
}
|
|
3257
3284
|
},
|
|
3258
3285
|
_onDragStart: function(e, t) {
|
|
3259
3286
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3260
|
-
|
|
3261
|
-
|
|
3287
|
+
sc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (sc("setupClone", this), Q.eventCanceled || (Y = Xs(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), Ns(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = il(function() {
|
|
3288
|
+
sc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), cc({
|
|
3262
3289
|
sortable: n,
|
|
3263
3290
|
name: "clone"
|
|
3264
3291
|
}));
|
|
3265
|
-
}), !t &&
|
|
3292
|
+
}), !t && Ns(G, i.dragClass, !0), t ? (vc = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (H(document, "mouseup", n._onDrop), H(document, "touchend", n._onDrop), H(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), V(document, "drop", n), U(G, "transform", "translateZ(0)")), _c = !0, n._dragStartId = il(n._dragStarted.bind(n, t, e)), V(document, "selectstart", n), Ec = !0, Ts && U(document.body, "user-select", "none"));
|
|
3266
3293
|
},
|
|
3267
3294
|
_onDragOver: function(e) {
|
|
3268
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3269
|
-
if (
|
|
3295
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = gc === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3296
|
+
if (Nc) return;
|
|
3270
3297
|
function h(o, s) {
|
|
3271
|
-
|
|
3298
|
+
sc(o, p, ms({
|
|
3272
3299
|
evt: e,
|
|
3273
3300
|
isOwner: l,
|
|
3274
3301
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3280,7 +3307,7 @@ Q.prototype = {
|
|
|
3280
3307
|
target: n,
|
|
3281
3308
|
completed: _,
|
|
3282
3309
|
onMove: function(n, i) {
|
|
3283
|
-
return
|
|
3310
|
+
return Yc(J, t, G, r, n, W(n), e, i);
|
|
3284
3311
|
},
|
|
3285
3312
|
changed: v
|
|
3286
3313
|
}, s));
|
|
@@ -3289,50 +3316,50 @@ Q.prototype = {
|
|
|
3289
3316
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3290
3317
|
}
|
|
3291
3318
|
function _(r) {
|
|
3292
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3319
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Ns(G, X ? X.options.ghostClass : c.options.ghostClass, !1), Ns(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() {
|
|
3293
3320
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3294
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (
|
|
3321
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (Dc = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[Qs]._isOutsideThisEl(e.target), !r && Kc(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3295
3322
|
}
|
|
3296
3323
|
function v() {
|
|
3297
|
-
|
|
3324
|
+
pc = Bs(G), hc = Bs(G, o.draggable), cc({
|
|
3298
3325
|
sortable: p,
|
|
3299
3326
|
name: "change",
|
|
3300
3327
|
toEl: t,
|
|
3301
|
-
newIndex:
|
|
3302
|
-
newDraggableIndex:
|
|
3328
|
+
newIndex: pc,
|
|
3329
|
+
newDraggableIndex: hc,
|
|
3303
3330
|
originalEvent: e
|
|
3304
3331
|
});
|
|
3305
3332
|
}
|
|
3306
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3333
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = js(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3307
3334
|
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3308
|
-
if (
|
|
3335
|
+
if (vc = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = gc.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
3309
3336
|
if (f = this._getDirection(e, n) === "vertical", r = W(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3310
|
-
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3311
|
-
var y =
|
|
3312
|
-
if (!y ||
|
|
3337
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (lc ? J.insertBefore(G, lc) : J.appendChild(G)), _(!0);
|
|
3338
|
+
var y = zs(t, o.draggable);
|
|
3339
|
+
if (!y || $c(e, f, this) && !y.animated) {
|
|
3313
3340
|
if (y === G) return _(!1);
|
|
3314
|
-
if (y && t === e.target && (n = y), n && (i = W(n)),
|
|
3315
|
-
} else if (y &&
|
|
3316
|
-
var b =
|
|
3341
|
+
if (y && t === e.target && (n = y), n && (i = W(n)), Yc(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);
|
|
3342
|
+
} else if (y && Qc(e, f, this)) {
|
|
3343
|
+
var b = Rs(t, 0, o, !0);
|
|
3317
3344
|
if (b === G) return _(!1);
|
|
3318
|
-
if (n = b, i = W(n),
|
|
3345
|
+
if (n = b, i = W(n), Yc(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
3319
3346
|
} else if (n.parentNode === t) {
|
|
3320
3347
|
i = W(n);
|
|
3321
|
-
var x = 0, S, C = G.parentNode !== t, w = !
|
|
3322
|
-
|
|
3348
|
+
var x = 0, S, C = G.parentNode !== t, w = !Vc(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ls(n, "top", "top") || Ls(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3349
|
+
Dc !== n && (S = i[T], kc = !1, Ac = !w && o.invertSwap || C), x = el(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Ac, Dc === n);
|
|
3323
3350
|
var O;
|
|
3324
3351
|
if (x !== 0) {
|
|
3325
|
-
var k =
|
|
3352
|
+
var k = Bs(G);
|
|
3326
3353
|
do
|
|
3327
3354
|
k -= x, O = K.children[k];
|
|
3328
3355
|
while (O && (U(O, "display") === "none" || O === q));
|
|
3329
3356
|
}
|
|
3330
3357
|
if (x === 0 || O === n) return _(!1);
|
|
3331
|
-
|
|
3358
|
+
Dc = n, Oc = x;
|
|
3332
3359
|
var A = n.nextElementSibling, j = !1;
|
|
3333
3360
|
j = x === 1;
|
|
3334
|
-
var M =
|
|
3335
|
-
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1),
|
|
3361
|
+
var M = Yc(J, t, G, r, n, i, e, j);
|
|
3362
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), Nc = !0, setTimeout(Zc, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Ys(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !Ac && (jc = Math.abs(S - W(n)[T])), v(), _(!0);
|
|
3336
3363
|
}
|
|
3337
3364
|
if (t.contains(G)) return _(!1);
|
|
3338
3365
|
}
|
|
@@ -3340,7 +3367,7 @@ Q.prototype = {
|
|
|
3340
3367
|
},
|
|
3341
3368
|
_ignoreWhileAnimating: null,
|
|
3342
3369
|
_offMoveEvents: function() {
|
|
3343
|
-
H(document, "mousemove", this._onTouchMove), H(document, "touchmove", this._onTouchMove), H(document, "pointermove", this._onTouchMove), H(document, "dragover",
|
|
3370
|
+
H(document, "mousemove", this._onTouchMove), H(document, "touchmove", this._onTouchMove), H(document, "pointermove", this._onTouchMove), H(document, "dragover", Kc), H(document, "mousemove", Kc), H(document, "touchmove", Kc);
|
|
3344
3371
|
},
|
|
3345
3372
|
_offUpEvents: function() {
|
|
3346
3373
|
var e = this.el.ownerDocument;
|
|
@@ -3348,46 +3375,46 @@ Q.prototype = {
|
|
|
3348
3375
|
},
|
|
3349
3376
|
_onDrop: function(e) {
|
|
3350
3377
|
var t = this.el, n = this.options;
|
|
3351
|
-
|
|
3378
|
+
pc = Bs(G), hc = Bs(G, n.draggable), sc("drop", this, { evt: e }), K = G && G.parentNode, pc = Bs(G), hc = Bs(G, n.draggable), Q.eventCanceled || (_c = !1, Ac = !1, kc = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), al(this.cloneId), al(this._dragStartId), this.nativeDraggable && (H(document, "drop", this), H(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ts && U(document.body, "user-select", ""), U(G, "transform", ""), e && (Ec && (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 && H(G, "dragend", this), Xc(G), G.style["will-change"] = "", Ec && !_c && Ns(G, X ? X.options.ghostClass : this.options.ghostClass, !1), Ns(G, this.options.chosenClass, !1), cc({
|
|
3352
3379
|
sortable: this,
|
|
3353
3380
|
name: "unchoose",
|
|
3354
3381
|
toEl: K,
|
|
3355
3382
|
newIndex: null,
|
|
3356
3383
|
newDraggableIndex: null,
|
|
3357
3384
|
originalEvent: e
|
|
3358
|
-
}), J === K ?
|
|
3385
|
+
}), J === K ? pc !== fc && pc >= 0 && (cc({
|
|
3359
3386
|
sortable: this,
|
|
3360
3387
|
name: "update",
|
|
3361
3388
|
toEl: K,
|
|
3362
3389
|
originalEvent: e
|
|
3363
|
-
}),
|
|
3390
|
+
}), cc({
|
|
3364
3391
|
sortable: this,
|
|
3365
3392
|
name: "sort",
|
|
3366
3393
|
toEl: K,
|
|
3367
3394
|
originalEvent: e
|
|
3368
|
-
})) : (
|
|
3395
|
+
})) : (pc >= 0 && (cc({
|
|
3369
3396
|
rootEl: K,
|
|
3370
3397
|
name: "add",
|
|
3371
3398
|
toEl: K,
|
|
3372
3399
|
fromEl: J,
|
|
3373
3400
|
originalEvent: e
|
|
3374
|
-
}),
|
|
3401
|
+
}), cc({
|
|
3375
3402
|
sortable: this,
|
|
3376
3403
|
name: "remove",
|
|
3377
3404
|
toEl: K,
|
|
3378
3405
|
originalEvent: e
|
|
3379
|
-
}),
|
|
3406
|
+
}), cc({
|
|
3380
3407
|
rootEl: K,
|
|
3381
3408
|
name: "sort",
|
|
3382
3409
|
toEl: K,
|
|
3383
3410
|
fromEl: J,
|
|
3384
3411
|
originalEvent: e
|
|
3385
|
-
}),
|
|
3412
|
+
}), cc({
|
|
3386
3413
|
sortable: this,
|
|
3387
3414
|
name: "sort",
|
|
3388
3415
|
toEl: K,
|
|
3389
3416
|
originalEvent: e
|
|
3390
|
-
})), X && X.save()), Q.active && ((
|
|
3417
|
+
})), X && X.save()), Q.active && ((pc == null || pc === -1) && (pc = fc, hc = mc), cc({
|
|
3391
3418
|
sortable: this,
|
|
3392
3419
|
name: "end",
|
|
3393
3420
|
toEl: K,
|
|
@@ -3395,9 +3422,9 @@ Q.prototype = {
|
|
|
3395
3422
|
}), this.save())))), this._nulling();
|
|
3396
3423
|
},
|
|
3397
3424
|
_nulling: function() {
|
|
3398
|
-
|
|
3425
|
+
sc("nulling", this), J = G = K = q = lc = Y = uc = dc = bc = xc = Ec = pc = hc = fc = mc = Dc = Oc = X = gc = Q.dragged = Q.ghost = Q.clone = Q.active = null, Pc.forEach(function(e) {
|
|
3399
3426
|
e.checked = !0;
|
|
3400
|
-
}),
|
|
3427
|
+
}), Pc.length = Sc = Cc = 0;
|
|
3401
3428
|
},
|
|
3402
3429
|
handleEvent: function(e) {
|
|
3403
3430
|
switch (e.type) {
|
|
@@ -3407,20 +3434,20 @@ Q.prototype = {
|
|
|
3407
3434
|
break;
|
|
3408
3435
|
case "dragenter":
|
|
3409
3436
|
case "dragover":
|
|
3410
|
-
G && (this._onDragOver(e),
|
|
3437
|
+
G && (this._onDragOver(e), Jc(e));
|
|
3411
3438
|
break;
|
|
3412
3439
|
case "selectstart": e.preventDefault();
|
|
3413
3440
|
}
|
|
3414
3441
|
},
|
|
3415
3442
|
toArray: function() {
|
|
3416
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3443
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], js(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || nl(t));
|
|
3417
3444
|
return e;
|
|
3418
3445
|
},
|
|
3419
3446
|
sort: function(e, t) {
|
|
3420
3447
|
var n = {}, r = this.el;
|
|
3421
3448
|
this.toArray().forEach(function(e, t) {
|
|
3422
3449
|
var i = r.children[t];
|
|
3423
|
-
|
|
3450
|
+
js(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3424
3451
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3425
3452
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3426
3453
|
}), t && this.animateAll();
|
|
@@ -3430,122 +3457,122 @@ Q.prototype = {
|
|
|
3430
3457
|
e && e.set && e.set(this);
|
|
3431
3458
|
},
|
|
3432
3459
|
closest: function(e, t) {
|
|
3433
|
-
return
|
|
3460
|
+
return js(e, t || this.options.draggable, this.el, !1);
|
|
3434
3461
|
},
|
|
3435
3462
|
option: function(e, t) {
|
|
3436
3463
|
var n = this.options;
|
|
3437
3464
|
if (t === void 0) return n[e];
|
|
3438
|
-
var r =
|
|
3439
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3465
|
+
var r = ic.modifyOption(this, e, t);
|
|
3466
|
+
n[e] = r === void 0 ? t : r, e === "group" && Uc(n);
|
|
3440
3467
|
},
|
|
3441
3468
|
destroy: function() {
|
|
3442
|
-
|
|
3469
|
+
sc("destroy", this);
|
|
3443
3470
|
var e = this.el;
|
|
3444
|
-
e[
|
|
3471
|
+
e[Qs] = null, H(e, "mousedown", this._onTapStart), H(e, "touchstart", this._onTapStart), H(e, "pointerdown", this._onTapStart), this.nativeDraggable && (H(e, "dragover", this), H(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3445
3472
|
e.removeAttribute("draggable");
|
|
3446
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3473
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), yc.splice(yc.indexOf(this.el), 1), this.el = e = null;
|
|
3447
3474
|
},
|
|
3448
3475
|
_hideClone: function() {
|
|
3449
|
-
if (!
|
|
3450
|
-
if (
|
|
3451
|
-
U(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y),
|
|
3476
|
+
if (!dc) {
|
|
3477
|
+
if (sc("hideClone", this), Q.eventCanceled) return;
|
|
3478
|
+
U(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), dc = !0;
|
|
3452
3479
|
}
|
|
3453
3480
|
},
|
|
3454
3481
|
_showClone: function(e) {
|
|
3455
3482
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3456
|
-
else if (
|
|
3457
|
-
if (
|
|
3458
|
-
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) :
|
|
3483
|
+
else if (dc) {
|
|
3484
|
+
if (sc("showClone", this), Q.eventCanceled) return;
|
|
3485
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : lc ? J.insertBefore(Y, lc) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), U(Y, "display", ""), dc = !1;
|
|
3459
3486
|
}
|
|
3460
3487
|
}
|
|
3461
3488
|
};
|
|
3462
|
-
function
|
|
3489
|
+
function Jc(e) {
|
|
3463
3490
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3464
3491
|
}
|
|
3465
|
-
function
|
|
3466
|
-
var c, l = e[
|
|
3467
|
-
return window.CustomEvent && !
|
|
3492
|
+
function Yc(e, t, n, r, i, a, o, s) {
|
|
3493
|
+
var c, l = e[Qs], u = l.options.onMove, d;
|
|
3494
|
+
return window.CustomEvent && !Ss && !Cs ? c = new CustomEvent("move", {
|
|
3468
3495
|
bubbles: !0,
|
|
3469
3496
|
cancelable: !0
|
|
3470
3497
|
}) : (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 || W(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3471
3498
|
}
|
|
3472
|
-
function
|
|
3499
|
+
function Xc(e) {
|
|
3473
3500
|
e.draggable = !1;
|
|
3474
3501
|
}
|
|
3475
|
-
function
|
|
3476
|
-
|
|
3502
|
+
function Zc() {
|
|
3503
|
+
Nc = !1;
|
|
3477
3504
|
}
|
|
3478
|
-
function
|
|
3479
|
-
var r = W(
|
|
3505
|
+
function Qc(e, t, n) {
|
|
3506
|
+
var r = W(Rs(n.el, 0, n.options, !0)), i = Zs(n.el, n.options, q), a = 10;
|
|
3480
3507
|
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;
|
|
3481
3508
|
}
|
|
3482
|
-
function
|
|
3483
|
-
var r = W(
|
|
3509
|
+
function $c(e, t, n) {
|
|
3510
|
+
var r = W(zs(n.el, n.options.draggable)), i = Zs(n.el, n.options, q), a = 10;
|
|
3484
3511
|
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;
|
|
3485
3512
|
}
|
|
3486
|
-
function
|
|
3513
|
+
function el(e, t, n, r, i, a, o, s) {
|
|
3487
3514
|
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;
|
|
3488
3515
|
if (!o) {
|
|
3489
|
-
if (s &&
|
|
3490
|
-
if (!
|
|
3491
|
-
else if (
|
|
3492
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3516
|
+
if (s && jc < l * i) {
|
|
3517
|
+
if (!kc && (Oc === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (kc = !0), kc) f = !0;
|
|
3518
|
+
else if (Oc === 1 ? c < u + jc : c > d - jc) return -Oc;
|
|
3519
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return tl(t);
|
|
3493
3520
|
}
|
|
3494
3521
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3495
3522
|
}
|
|
3496
|
-
function
|
|
3497
|
-
return
|
|
3523
|
+
function tl(e) {
|
|
3524
|
+
return Bs(G) < Bs(e) ? 1 : -1;
|
|
3498
3525
|
}
|
|
3499
|
-
function
|
|
3526
|
+
function nl(e) {
|
|
3500
3527
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3501
3528
|
return r.toString(36);
|
|
3502
3529
|
}
|
|
3503
|
-
function
|
|
3504
|
-
|
|
3530
|
+
function rl(e) {
|
|
3531
|
+
Pc.length = 0;
|
|
3505
3532
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3506
3533
|
var r = t[n];
|
|
3507
|
-
r.checked &&
|
|
3534
|
+
r.checked && Pc.push(r);
|
|
3508
3535
|
}
|
|
3509
3536
|
}
|
|
3510
|
-
function
|
|
3537
|
+
function il(e) {
|
|
3511
3538
|
return setTimeout(e, 0);
|
|
3512
3539
|
}
|
|
3513
|
-
function
|
|
3540
|
+
function al(e) {
|
|
3514
3541
|
return clearTimeout(e);
|
|
3515
3542
|
}
|
|
3516
|
-
|
|
3517
|
-
(Q.active ||
|
|
3543
|
+
Fc && V(document, "touchmove", function(e) {
|
|
3544
|
+
(Q.active || _c) && e.cancelable && e.preventDefault();
|
|
3518
3545
|
}), Q.utils = {
|
|
3519
3546
|
on: V,
|
|
3520
3547
|
off: H,
|
|
3521
3548
|
css: U,
|
|
3522
|
-
find:
|
|
3549
|
+
find: Fs,
|
|
3523
3550
|
is: function(e, t) {
|
|
3524
|
-
return !!
|
|
3551
|
+
return !!js(e, t, e, !1);
|
|
3525
3552
|
},
|
|
3526
|
-
extend:
|
|
3527
|
-
throttle:
|
|
3528
|
-
closest:
|
|
3529
|
-
toggleClass:
|
|
3530
|
-
clone:
|
|
3531
|
-
index:
|
|
3532
|
-
nextTick:
|
|
3533
|
-
cancelNextTick:
|
|
3534
|
-
detectDirection:
|
|
3535
|
-
getChild:
|
|
3553
|
+
extend: Ws,
|
|
3554
|
+
throttle: qs,
|
|
3555
|
+
closest: js,
|
|
3556
|
+
toggleClass: Ns,
|
|
3557
|
+
clone: Xs,
|
|
3558
|
+
index: Bs,
|
|
3559
|
+
nextTick: il,
|
|
3560
|
+
cancelNextTick: al,
|
|
3561
|
+
detectDirection: Bc,
|
|
3562
|
+
getChild: Rs
|
|
3536
3563
|
}, Q.get = function(e) {
|
|
3537
|
-
return e[
|
|
3564
|
+
return e[Qs];
|
|
3538
3565
|
}, Q.mount = function() {
|
|
3539
3566
|
var e = [...arguments];
|
|
3540
3567
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3541
3568
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3542
|
-
e.utils && (Q.utils =
|
|
3569
|
+
e.utils && (Q.utils = ms(ms({}, Q.utils), e.utils)), ic.mount(e);
|
|
3543
3570
|
});
|
|
3544
3571
|
}, Q.create = function(e, t) {
|
|
3545
3572
|
return new Q(e, t);
|
|
3546
|
-
}, Q.version =
|
|
3547
|
-
var $ = [],
|
|
3548
|
-
function
|
|
3573
|
+
}, Q.version = bs;
|
|
3574
|
+
var $ = [], ol, sl, cl = !1, ll, ul, dl, fl;
|
|
3575
|
+
function pl() {
|
|
3549
3576
|
function e() {
|
|
3550
3577
|
for (var e in this.defaults = {
|
|
3551
3578
|
scroll: !0,
|
|
@@ -3565,63 +3592,63 @@ function cl() {
|
|
|
3565
3592
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3566
3593
|
},
|
|
3567
3594
|
drop: function() {
|
|
3568
|
-
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : (H(document, "pointermove", this._handleFallbackAutoScroll), H(document, "touchmove", this._handleFallbackAutoScroll), H(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3595
|
+
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : (H(document, "pointermove", this._handleFallbackAutoScroll), H(document, "touchmove", this._handleFallbackAutoScroll), H(document, "mousemove", this._handleFallbackAutoScroll)), hl(), ml(), Js();
|
|
3569
3596
|
},
|
|
3570
3597
|
nulling: function() {
|
|
3571
|
-
|
|
3598
|
+
dl = sl = ol = cl = fl = ll = ul = null, $.length = 0;
|
|
3572
3599
|
},
|
|
3573
3600
|
_handleFallbackAutoScroll: function(e) {
|
|
3574
3601
|
this._handleAutoScroll(e, !0);
|
|
3575
3602
|
},
|
|
3576
3603
|
_handleAutoScroll: function(e, t) {
|
|
3577
3604
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3578
|
-
if (
|
|
3579
|
-
|
|
3580
|
-
var o =
|
|
3581
|
-
|
|
3582
|
-
var a =
|
|
3583
|
-
a !== o && (o = a,
|
|
3584
|
-
}, 10),
|
|
3605
|
+
if (dl = e, t || this.options.forceAutoScrollFallback || Cs || Ss || Ts) {
|
|
3606
|
+
gl(e, this.options, a, t);
|
|
3607
|
+
var o = Us(a, !0);
|
|
3608
|
+
cl && (!fl || r !== ll || i !== ul) && (fl && hl(), fl = setInterval(function() {
|
|
3609
|
+
var a = Us(document.elementFromPoint(r, i), !0);
|
|
3610
|
+
a !== o && (o = a, ml()), gl(e, n.options, a, t);
|
|
3611
|
+
}, 10), ll = r, ul = i);
|
|
3585
3612
|
} else {
|
|
3586
|
-
if (!this.options.bubbleScroll ||
|
|
3587
|
-
|
|
3613
|
+
if (!this.options.bubbleScroll || Us(a, !0) === Is()) {
|
|
3614
|
+
ml();
|
|
3588
3615
|
return;
|
|
3589
3616
|
}
|
|
3590
|
-
|
|
3617
|
+
gl(e, this.options, Us(a, !1), !1);
|
|
3591
3618
|
}
|
|
3592
3619
|
}
|
|
3593
|
-
},
|
|
3620
|
+
}, _s(e, {
|
|
3594
3621
|
pluginName: "scroll",
|
|
3595
3622
|
initializeByDefault: !0
|
|
3596
3623
|
});
|
|
3597
3624
|
}
|
|
3598
|
-
function
|
|
3625
|
+
function ml() {
|
|
3599
3626
|
$.forEach(function(e) {
|
|
3600
3627
|
clearInterval(e.pid);
|
|
3601
3628
|
}), $ = [];
|
|
3602
3629
|
}
|
|
3603
|
-
function
|
|
3604
|
-
clearInterval(
|
|
3630
|
+
function hl() {
|
|
3631
|
+
clearInterval(fl);
|
|
3605
3632
|
}
|
|
3606
|
-
var
|
|
3633
|
+
var gl = qs(function(e, t, n, r) {
|
|
3607
3634
|
if (t.scroll) {
|
|
3608
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3609
|
-
|
|
3610
|
-
var d = 0, f =
|
|
3635
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Is(), l = !1, u;
|
|
3636
|
+
sl !== n && (sl = n, ml(), ol = t.scroll, u = t.scrollFn, ol === !0 && (ol = Us(n, !0)));
|
|
3637
|
+
var d = 0, f = ol;
|
|
3611
3638
|
do {
|
|
3612
3639
|
var p = f, m = W(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 = U(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3613
3640
|
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"));
|
|
3614
3641
|
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);
|
|
3615
3642
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3616
3643
|
($[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() {
|
|
3617
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3644
|
+
r && this.layer === 0 && Q.active._onTouchMove(dl);
|
|
3618
3645
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3619
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3646
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[Qs], n, t, e, dl, $[this.layer].el) !== "continue" || Ys($[this.layer].el, n, t);
|
|
3620
3647
|
}.bind({ layer: d }), 24))), d++;
|
|
3621
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3622
|
-
|
|
3648
|
+
} while (t.bubbleScroll && f !== c && (f = Us(f, !1)));
|
|
3649
|
+
cl = l;
|
|
3623
3650
|
}
|
|
3624
|
-
}, 30),
|
|
3651
|
+
}, 30), _l = function(e) {
|
|
3625
3652
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3626
3653
|
if (t) {
|
|
3627
3654
|
var c = n || i;
|
|
@@ -3633,8 +3660,8 @@ var dl = Hs(function(e, t, n, r) {
|
|
|
3633
3660
|
}));
|
|
3634
3661
|
}
|
|
3635
3662
|
};
|
|
3636
|
-
function
|
|
3637
|
-
|
|
3663
|
+
function vl() {}
|
|
3664
|
+
vl.prototype = {
|
|
3638
3665
|
startIndex: null,
|
|
3639
3666
|
dragStart: function(e) {
|
|
3640
3667
|
var t = e.oldDraggableIndex;
|
|
@@ -3643,67 +3670,67 @@ pl.prototype = {
|
|
|
3643
3670
|
onSpill: function(e) {
|
|
3644
3671
|
var t = e.dragEl, n = e.putSortable;
|
|
3645
3672
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3646
|
-
var r =
|
|
3673
|
+
var r = Rs(this.sortable.el, this.startIndex, this.options);
|
|
3647
3674
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3648
3675
|
},
|
|
3649
|
-
drop:
|
|
3650
|
-
},
|
|
3651
|
-
function
|
|
3652
|
-
|
|
3676
|
+
drop: _l
|
|
3677
|
+
}, _s(vl, { pluginName: "revertOnSpill" });
|
|
3678
|
+
function yl() {}
|
|
3679
|
+
yl.prototype = {
|
|
3653
3680
|
onSpill: function(e) {
|
|
3654
3681
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3655
3682
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3656
3683
|
},
|
|
3657
|
-
drop:
|
|
3658
|
-
},
|
|
3659
|
-
function
|
|
3684
|
+
drop: _l
|
|
3685
|
+
}, _s(yl, { pluginName: "removeOnSpill" }), Q.mount(new pl()), Q.mount(yl, vl);
|
|
3686
|
+
function bl(e) {
|
|
3660
3687
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3661
3688
|
}
|
|
3662
|
-
function
|
|
3689
|
+
function xl(e) {
|
|
3663
3690
|
S() && k(e);
|
|
3664
3691
|
}
|
|
3665
|
-
function
|
|
3692
|
+
function Sl(t) {
|
|
3666
3693
|
S() ? e(t) : u(t);
|
|
3667
3694
|
}
|
|
3668
|
-
var
|
|
3669
|
-
function
|
|
3670
|
-
|
|
3695
|
+
var Cl = null, wl = null;
|
|
3696
|
+
function Tl(e = null, t = null) {
|
|
3697
|
+
Cl = e, wl = t;
|
|
3671
3698
|
}
|
|
3672
|
-
function
|
|
3699
|
+
function El() {
|
|
3673
3700
|
return {
|
|
3674
|
-
data:
|
|
3675
|
-
clonedData:
|
|
3701
|
+
data: Cl,
|
|
3702
|
+
clonedData: wl
|
|
3676
3703
|
};
|
|
3677
3704
|
}
|
|
3678
|
-
var
|
|
3679
|
-
function
|
|
3705
|
+
var Dl = Symbol("cloneElement");
|
|
3706
|
+
function Ol(...e) {
|
|
3680
3707
|
let n = S()?.proxy, r = null, i = e[0], [, a, o] = e;
|
|
3681
3708
|
Array.isArray(w(a)) || (o = a, a = null);
|
|
3682
|
-
let s = null, { immediate: c = !0, clone: l =
|
|
3709
|
+
let s = null, { immediate: c = !0, clone: l = bl, forceFallback: d, fallbackOnBody: f, customUpdate: p } = w(o) ?? {};
|
|
3683
3710
|
function m(e) {
|
|
3684
3711
|
let { from: t, oldIndex: n, item: i } = e, o = Array.from(t.childNodes);
|
|
3685
3712
|
r = d && !f ? o.slice(0, -1) : o;
|
|
3686
3713
|
let s = w(w(a)?.[n]), c = l(s);
|
|
3687
|
-
|
|
3714
|
+
Tl(s, c), i[Dl] = c;
|
|
3688
3715
|
}
|
|
3689
3716
|
function h(e) {
|
|
3690
|
-
let t = e.item[
|
|
3691
|
-
if (!
|
|
3692
|
-
if (
|
|
3717
|
+
let t = e.item[Dl];
|
|
3718
|
+
if (!ns(t)) {
|
|
3719
|
+
if (as(e.item), _(a)) {
|
|
3693
3720
|
let n = [...w(a)];
|
|
3694
|
-
a.value =
|
|
3721
|
+
a.value = ts(n, e.newDraggableIndex, t);
|
|
3695
3722
|
return;
|
|
3696
3723
|
}
|
|
3697
|
-
|
|
3724
|
+
ts(w(a), e.newDraggableIndex, t);
|
|
3698
3725
|
}
|
|
3699
3726
|
}
|
|
3700
3727
|
function g(e) {
|
|
3701
3728
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: o, clone: s } = e;
|
|
3702
|
-
if (
|
|
3729
|
+
if (is(t, n, r), o === "clone") as(s);
|
|
3703
3730
|
else if (_(a)) {
|
|
3704
3731
|
let e = [...w(a)];
|
|
3705
|
-
a.value =
|
|
3706
|
-
} else
|
|
3732
|
+
a.value = es(e, i);
|
|
3733
|
+
} else es(w(a), i);
|
|
3707
3734
|
}
|
|
3708
3735
|
function v(e) {
|
|
3709
3736
|
if (p) {
|
|
@@ -3711,10 +3738,10 @@ function Cl(...e) {
|
|
|
3711
3738
|
return;
|
|
3712
3739
|
}
|
|
3713
3740
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: o } = e;
|
|
3714
|
-
if (
|
|
3741
|
+
if (as(n), is(t, n, r), _(a)) {
|
|
3715
3742
|
let e = [...w(a)];
|
|
3716
|
-
a.value =
|
|
3717
|
-
} else
|
|
3743
|
+
a.value = Zo(e, i, o);
|
|
3744
|
+
} else Zo(w(a), i, o);
|
|
3718
3745
|
}
|
|
3719
3746
|
function y(e) {
|
|
3720
3747
|
let { newIndex: t, oldIndex: n, from: i, to: a } = e, o = null, s = t === n && i === a;
|
|
@@ -3733,7 +3760,7 @@ function Cl(...e) {
|
|
|
3733
3760
|
r = null;
|
|
3734
3761
|
}
|
|
3735
3762
|
u(() => {
|
|
3736
|
-
if (
|
|
3763
|
+
if (Tl(), o) throw o;
|
|
3737
3764
|
});
|
|
3738
3765
|
}
|
|
3739
3766
|
let b = {
|
|
@@ -3745,19 +3772,19 @@ function Cl(...e) {
|
|
|
3745
3772
|
};
|
|
3746
3773
|
function x(e) {
|
|
3747
3774
|
let t = w(i);
|
|
3748
|
-
return e ||=
|
|
3775
|
+
return e ||= rs(t) ? os(t, n?.$el) : t, e && !ls(e) && (e = e.$el), e || Xo("Root element not found"), e;
|
|
3749
3776
|
}
|
|
3750
3777
|
function C() {
|
|
3751
|
-
let e = w(o) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3752
|
-
return
|
|
3753
|
-
|
|
3754
|
-
}),
|
|
3778
|
+
let e = w(o) ?? {}, { immediate: t, clone: n } = e, r = qo(e, ["immediate", "clone"]);
|
|
3779
|
+
return us(r, (e, t) => {
|
|
3780
|
+
ds(e) && (r[e] = (e, ...n) => (fs(e, El()), t(e, ...n)));
|
|
3781
|
+
}), cs(a === null ? {} : b, r);
|
|
3755
3782
|
}
|
|
3756
3783
|
let T = (e) => {
|
|
3757
3784
|
e = x(e), s && E.destroy(), s = new Q(e, C());
|
|
3758
3785
|
};
|
|
3759
3786
|
t(() => o, () => {
|
|
3760
|
-
s &&
|
|
3787
|
+
s && us(C(), (e, t) => {
|
|
3761
3788
|
s?.option(e, t);
|
|
3762
3789
|
});
|
|
3763
3790
|
}, { deep: !0 });
|
|
@@ -3770,15 +3797,15 @@ function Cl(...e) {
|
|
|
3770
3797
|
toArray: () => s?.toArray(),
|
|
3771
3798
|
closest: (...e) => s?.closest(...e)
|
|
3772
3799
|
};
|
|
3773
|
-
return
|
|
3800
|
+
return Sl(() => {
|
|
3774
3801
|
c && T();
|
|
3775
|
-
}),
|
|
3802
|
+
}), xl(E.destroy), Ko({
|
|
3776
3803
|
start: T,
|
|
3777
3804
|
pause: () => E?.option("disabled", !0),
|
|
3778
3805
|
resume: () => E?.option("disabled", !1)
|
|
3779
3806
|
}, E);
|
|
3780
3807
|
}
|
|
3781
|
-
var
|
|
3808
|
+
var kl = [
|
|
3782
3809
|
"update",
|
|
3783
3810
|
"start",
|
|
3784
3811
|
"add",
|
|
@@ -3791,7 +3818,7 @@ var wl = [
|
|
|
3791
3818
|
"clone",
|
|
3792
3819
|
"move",
|
|
3793
3820
|
"change"
|
|
3794
|
-
],
|
|
3821
|
+
], Al = [
|
|
3795
3822
|
"clone",
|
|
3796
3823
|
"animation",
|
|
3797
3824
|
"ghostClass",
|
|
@@ -3835,46 +3862,46 @@ var wl = [
|
|
|
3835
3862
|
"tag",
|
|
3836
3863
|
"target",
|
|
3837
3864
|
"customUpdate",
|
|
3838
|
-
...
|
|
3839
|
-
],
|
|
3865
|
+
...kl.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3866
|
+
], jl = R({
|
|
3840
3867
|
name: "VueDraggable",
|
|
3841
3868
|
model: {
|
|
3842
3869
|
prop: "modelValue",
|
|
3843
3870
|
event: "update:modelValue"
|
|
3844
3871
|
},
|
|
3845
|
-
props:
|
|
3846
|
-
emits: ["update:modelValue", ...
|
|
3872
|
+
props: Al,
|
|
3873
|
+
emits: ["update:modelValue", ...kl],
|
|
3847
3874
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3848
|
-
let a =
|
|
3875
|
+
let a = kl.reduce((e, t) => {
|
|
3849
3876
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3850
3877
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3851
3878
|
}, {}), o = C(() => {
|
|
3852
|
-
let t = x(e), { modelValue: n } = t, r =
|
|
3879
|
+
let t = x(e), { modelValue: n } = t, r = qo(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3853
3880
|
let r = w(n);
|
|
3854
3881
|
return r !== void 0 && (e[t] = r), e;
|
|
3855
3882
|
}, {});
|
|
3856
|
-
return
|
|
3883
|
+
return Ko(Ko({}, a), $o(Ko(Ko({}, i), o)));
|
|
3857
3884
|
}), s = C({
|
|
3858
3885
|
get: () => e.modelValue,
|
|
3859
3886
|
set: (e) => n("update:modelValue", e)
|
|
3860
|
-
}), c = E(), l = p(
|
|
3887
|
+
}), c = E(), l = p(Ol(e.target || c, s, o));
|
|
3861
3888
|
return r(l), () => m(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3862
3889
|
}
|
|
3863
|
-
}),
|
|
3890
|
+
}), Ml = {
|
|
3864
3891
|
mounted: "mounted",
|
|
3865
3892
|
unmounted: "unmounted"
|
|
3866
3893
|
};
|
|
3867
|
-
|
|
3894
|
+
Ml.mounted, Ml.unmounted;
|
|
3868
3895
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3869
|
-
var
|
|
3896
|
+
var Nl = { class: "tpl:relative tpl:w-full" }, Pl = {
|
|
3870
3897
|
key: 0,
|
|
3871
3898
|
"data-testid": "hero-image-hint",
|
|
3872
3899
|
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)]"
|
|
3873
|
-
},
|
|
3900
|
+
}, Fl = {
|
|
3874
3901
|
key: 0,
|
|
3875
3902
|
"data-testid": "section-drop-hint",
|
|
3876
3903
|
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)]"
|
|
3877
|
-
},
|
|
3904
|
+
}, Il = /* @__PURE__ */ R({
|
|
3878
3905
|
__name: "SectionBlock",
|
|
3879
3906
|
props: {
|
|
3880
3907
|
block: {},
|
|
@@ -3883,13 +3910,13 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
3883
3910
|
},
|
|
3884
3911
|
setup(e) {
|
|
3885
3912
|
let t = {
|
|
3886
|
-
title:
|
|
3887
|
-
paragraph:
|
|
3888
|
-
image:
|
|
3889
|
-
button:
|
|
3890
|
-
divider:
|
|
3891
|
-
custom:
|
|
3892
|
-
}, r = e, { t: a } =
|
|
3913
|
+
title: No,
|
|
3914
|
+
paragraph: Ya,
|
|
3915
|
+
image: Ha,
|
|
3916
|
+
button: ua,
|
|
3917
|
+
divider: wa,
|
|
3918
|
+
custom: Sa
|
|
3919
|
+
}, r = e, { t: a } = Qn(), u = Wn(qn, "SectionBlock"), { displayBlock: p } = $n(u), m = C(() => r.sourceBlock ?? r.block), _ = L(jn, C(() => /* @__PURE__ */ new Set()));
|
|
3893
3920
|
l(jn, C(() => /* @__PURE__ */ new Set([..._.value, ...Object.entries(m.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
3894
3921
|
let v = L(In, null), b = L(Fn, null), x = L(Dn, {}), S = L(Cn, null);
|
|
3895
3922
|
function O(e) {
|
|
@@ -3904,8 +3931,21 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
3904
3931
|
"33.33%",
|
|
3905
3932
|
"33.33%"
|
|
3906
3933
|
];
|
|
3934
|
+
case "4": return [
|
|
3935
|
+
"25%",
|
|
3936
|
+
"25%",
|
|
3937
|
+
"25%",
|
|
3938
|
+
"25%"
|
|
3939
|
+
];
|
|
3907
3940
|
case "1-2": return ["33.33%", "66.67%"];
|
|
3908
3941
|
case "2-1": return ["66.67%", "33.33%"];
|
|
3942
|
+
case "1-3": return ["25%", "75%"];
|
|
3943
|
+
case "3-1": return ["75%", "25%"];
|
|
3944
|
+
case "1-2-1": return [
|
|
3945
|
+
"25%",
|
|
3946
|
+
"50%",
|
|
3947
|
+
"25%"
|
|
3948
|
+
];
|
|
3909
3949
|
default: return ["100%"];
|
|
3910
3950
|
}
|
|
3911
3951
|
}), A = C(() => {
|
|
@@ -3928,7 +3968,7 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
3928
3968
|
}
|
|
3929
3969
|
let z = C(() => {
|
|
3930
3970
|
if (u.state.previewMode) return !1;
|
|
3931
|
-
let e =
|
|
3971
|
+
let e = de(r.block);
|
|
3932
3972
|
return e !== null && !e.applied && e.reason === "image";
|
|
3933
3973
|
});
|
|
3934
3974
|
function re(e) {
|
|
@@ -3938,10 +3978,10 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
3938
3978
|
return N(e).length === 0 && u.state.previewMode;
|
|
3939
3979
|
}
|
|
3940
3980
|
function ae(e, t) {
|
|
3941
|
-
|
|
3981
|
+
Xa(u, t, r.block.id, e);
|
|
3942
3982
|
}
|
|
3943
3983
|
function oe(e) {
|
|
3944
|
-
return
|
|
3984
|
+
return Wi(e, b, t);
|
|
3945
3985
|
}
|
|
3946
3986
|
function se(e, t) {
|
|
3947
3987
|
e.type === "custom" && u.updateBlock(e.id, {
|
|
@@ -3949,16 +3989,16 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
3949
3989
|
dataSourceFetched: t.dataSourceFetched
|
|
3950
3990
|
});
|
|
3951
3991
|
}
|
|
3952
|
-
return (t, l) => (s(), D("div",
|
|
3992
|
+
return (t, l) => (s(), D("div", Nl, [z.value ? (s(), D("div", Pl, [j("span", null, i(w(a).section.heroAddImage), 1)])) : T("", !0), j("div", { class: c(["tpl:flex tpl:gap-0", { "tpl:flex-col": M.value }]) }, [(s(!0), D(P, null, d(A.value, (t, m) => (s(), D("div", {
|
|
3953
3993
|
key: m,
|
|
3954
3994
|
class: c(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", re(m) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3955
3995
|
style: f({ width: M.value ? "100%" : k.value[m] })
|
|
3956
|
-
}, [y(w(
|
|
3996
|
+
}, [y(w(jl), {
|
|
3957
3997
|
"model-value": N(m),
|
|
3958
3998
|
group: {
|
|
3959
3999
|
name: "blocks",
|
|
3960
4000
|
pull: !0,
|
|
3961
|
-
put: (e, t, n) => w(
|
|
4001
|
+
put: (e, t, n) => w(Bo)(n)
|
|
3962
4002
|
},
|
|
3963
4003
|
animation: 150,
|
|
3964
4004
|
"ghost-class": "tpl-ghost",
|
|
@@ -3972,12 +4012,12 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
3972
4012
|
"tpl:min-h-[60px]": R(m),
|
|
3973
4013
|
"tpl:min-h-[34px]": ie(m)
|
|
3974
4014
|
}]),
|
|
3975
|
-
onUpdate: (e) => w(
|
|
4015
|
+
onUpdate: (e) => w(Xa)(w(u), N(m), r.block.id, m, e),
|
|
3976
4016
|
onStart: (e) => I.value = m,
|
|
3977
4017
|
onEnd: l[0] ||= (e) => I.value = null,
|
|
3978
4018
|
"onUpdate:modelValue": (e) => ae(m, e)
|
|
3979
4019
|
}, {
|
|
3980
|
-
default: h(() => [(s(!0), D(P, null, d(N(m), (t) => g((s(), D("div", { key: t.id }, [y(
|
|
4020
|
+
default: h(() => [(s(!0), D(P, null, d(N(m), (t) => g((s(), D("div", { key: t.id }, [y(jo, {
|
|
3981
4021
|
block: t,
|
|
3982
4022
|
"display-block": w(p)(t),
|
|
3983
4023
|
"is-selected": w(u).state.selectedBlockId === t.id,
|
|
@@ -4013,14 +4053,14 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4013
4053
|
"onUpdate",
|
|
4014
4054
|
"onStart",
|
|
4015
4055
|
"onUpdate:modelValue"
|
|
4016
|
-
]), re(m) ? (s(), D("div",
|
|
4056
|
+
]), re(m) ? (s(), D("div", Fl, [j("span", null, i(w(a).section.dropHere), 1)])) : T("", !0)], 6))), 128))], 2)]));
|
|
4017
4057
|
}
|
|
4018
|
-
}),
|
|
4058
|
+
}), Ll = ["width", "height"], Rl = [
|
|
4019
4059
|
"d",
|
|
4020
4060
|
"stroke",
|
|
4021
4061
|
"stroke-opacity",
|
|
4022
4062
|
"stroke-width"
|
|
4023
|
-
],
|
|
4063
|
+
], zl = ["d", "fill"], Bl = /* @__PURE__ */ R({
|
|
4024
4064
|
__name: "SocialIconSvg",
|
|
4025
4065
|
props: {
|
|
4026
4066
|
platform: {},
|
|
@@ -4029,7 +4069,7 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4029
4069
|
iconSize: {}
|
|
4030
4070
|
},
|
|
4031
4071
|
setup(e) {
|
|
4032
|
-
let t = e, n = C(() => At[t.platform]), r = C(() => Mt[t.iconSize]), i = C(() =>
|
|
4072
|
+
let t = e, n = C(() => At[t.platform]), r = C(() => Mt[t.iconSize]), i = C(() => Ae(t.platform, t.iconTone)), a = C(() => Ce(t.iconStyle, t.iconTone)), o = C(() => {
|
|
4033
4073
|
let e = {
|
|
4034
4074
|
display: "inline-flex",
|
|
4035
4075
|
alignItems: "center",
|
|
@@ -4067,7 +4107,7 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4067
4107
|
};
|
|
4068
4108
|
default: return e;
|
|
4069
4109
|
}
|
|
4070
|
-
}), c = C(() =>
|
|
4110
|
+
}), c = C(() => Pe(t.iconStyle)), l = C(() => Math.floor(r.value * c.value));
|
|
4071
4111
|
function u(e) {
|
|
4072
4112
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
4073
4113
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -4088,28 +4128,28 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4088
4128
|
"stroke-opacity": a.value.opacity,
|
|
4089
4129
|
"stroke-width": a.value.width / c.value,
|
|
4090
4130
|
"stroke-linejoin": "round"
|
|
4091
|
-
}, null, 8,
|
|
4131
|
+
}, null, 8, Rl)) : T("", !0), j("path", {
|
|
4092
4132
|
d: n.value.path,
|
|
4093
4133
|
fill: d.value
|
|
4094
|
-
}, null, 8,
|
|
4134
|
+
}, null, 8, zl)], 8, Ll))], 4));
|
|
4095
4135
|
}
|
|
4096
|
-
}),
|
|
4136
|
+
}), Vl = { class: "tpl:w-full" }, Hl = ["href"], Ul = {
|
|
4097
4137
|
key: 1,
|
|
4098
4138
|
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)]"
|
|
4099
|
-
},
|
|
4139
|
+
}, Wl = /* @__PURE__ */ R({
|
|
4100
4140
|
__name: "SocialIconsBlock",
|
|
4101
4141
|
props: {
|
|
4102
4142
|
block: {},
|
|
4103
4143
|
viewport: {}
|
|
4104
4144
|
},
|
|
4105
4145
|
setup(e) {
|
|
4106
|
-
let t = e, { t: n } =
|
|
4146
|
+
let t = e, { t: n } = Qn(), r = C(() => ({
|
|
4107
4147
|
display: "flex",
|
|
4108
4148
|
flexWrap: "wrap",
|
|
4109
4149
|
gap: `${t.block.spacing}px`,
|
|
4110
4150
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4111
4151
|
})), a = C(() => t.block.icons.length > 0);
|
|
4112
|
-
return (t, o) => (s(), D("div",
|
|
4152
|
+
return (t, o) => (s(), D("div", Vl, [a.value ? (s(), D("div", {
|
|
4113
4153
|
key: 0,
|
|
4114
4154
|
style: f(r.value)
|
|
4115
4155
|
}, [(s(!0), D(P, null, d(e.block.icons, (t) => (s(), D("a", {
|
|
@@ -4117,7 +4157,7 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4117
4157
|
href: t.url || "#",
|
|
4118
4158
|
class: "tpl:cursor-default",
|
|
4119
4159
|
onClick: o[0] ||= z(() => {}, ["prevent"])
|
|
4120
|
-
}, [y(
|
|
4160
|
+
}, [y(Bl, {
|
|
4121
4161
|
platform: t.platform,
|
|
4122
4162
|
"icon-style": e.block.iconStyle,
|
|
4123
4163
|
"icon-tone": e.block.iconTone,
|
|
@@ -4127,44 +4167,44 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4127
4167
|
"icon-style",
|
|
4128
4168
|
"icon-tone",
|
|
4129
4169
|
"icon-size"
|
|
4130
|
-
])], 8,
|
|
4170
|
+
])], 8, Hl))), 128))], 4)) : (s(), D("div", Ul, [y(w(_t), { size: 16 }), j("span", null, i(w(n).social.addIcons), 1)]))]));
|
|
4131
4171
|
}
|
|
4132
|
-
}),
|
|
4172
|
+
}), Gl = { class: "tpl:w-full" }, Kl = {
|
|
4133
4173
|
key: 0,
|
|
4134
4174
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4135
4175
|
style: {
|
|
4136
4176
|
"background-color": "var(--tpl-bg-hover)",
|
|
4137
4177
|
color: "var(--tpl-text-dim)"
|
|
4138
4178
|
}
|
|
4139
|
-
},
|
|
4179
|
+
}, ql = /* @__PURE__ */ R({
|
|
4140
4180
|
__name: "SpacerBlock",
|
|
4141
4181
|
props: {
|
|
4142
4182
|
block: {},
|
|
4143
4183
|
viewport: {}
|
|
4144
4184
|
},
|
|
4145
4185
|
setup(e) {
|
|
4146
|
-
let t = e, n =
|
|
4186
|
+
let t = e, n = Wn(qn, "SpacerBlock"), r = C(() => ({
|
|
4147
4187
|
height: `${t.block.height}px`,
|
|
4148
4188
|
minHeight: `${t.block.height}px`,
|
|
4149
4189
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4150
4190
|
}));
|
|
4151
|
-
return (t, a) => (s(), D("div",
|
|
4191
|
+
return (t, a) => (s(), D("div", Gl, [j("div", {
|
|
4152
4192
|
style: f(r.value),
|
|
4153
4193
|
class: c(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !w(n).state.previewMode }])
|
|
4154
|
-
}, [w(n).state.previewMode ? T("", !0) : (s(), D("span",
|
|
4194
|
+
}, [w(n).state.previewMode ? T("", !0) : (s(), D("span", Kl, i(e.block.height) + "px ", 1))], 6)]));
|
|
4155
4195
|
}
|
|
4156
|
-
}),
|
|
4196
|
+
}), Jl = { class: "tpl:w-full" }, Yl = { key: 0 }, Xl = [
|
|
4157
4197
|
"aria-label",
|
|
4158
4198
|
"data-placeholder",
|
|
4159
4199
|
"onBlur"
|
|
4160
|
-
],
|
|
4200
|
+
], Zl = [
|
|
4161
4201
|
"aria-label",
|
|
4162
4202
|
"data-placeholder",
|
|
4163
4203
|
"onBlur"
|
|
4164
|
-
],
|
|
4204
|
+
], Ql = {
|
|
4165
4205
|
key: 1,
|
|
4166
4206
|
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)]"
|
|
4167
|
-
},
|
|
4207
|
+
}, $l = /*#__PURE__*/ zt(/* @__PURE__ */ R({
|
|
4168
4208
|
__name: "TableBlock",
|
|
4169
4209
|
props: {
|
|
4170
4210
|
block: {},
|
|
@@ -4178,7 +4218,7 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4178
4218
|
updated(e, t) {
|
|
4179
4219
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4180
4220
|
}
|
|
4181
|
-
}, n = e, { t: r } =
|
|
4221
|
+
}, n = e, { t: r } = Qn(), a = Wn(qn, "TableBlock"), o = Wn(Tn, "TableBlock"), c = C(() => n.block.rows.length > 0), l = C(() => {
|
|
4182
4222
|
let e = {
|
|
4183
4223
|
width: "100%",
|
|
4184
4224
|
borderCollapse: "collapse",
|
|
@@ -4209,11 +4249,11 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4209
4249
|
} : n);
|
|
4210
4250
|
a.updateBlock(n.block.id, { rows: o });
|
|
4211
4251
|
}
|
|
4212
|
-
return (e, n) => (s(), D("div",
|
|
4252
|
+
return (e, n) => (s(), D("div", Jl, [c.value ? (s(), D("table", {
|
|
4213
4253
|
key: 0,
|
|
4214
4254
|
style: f(l.value),
|
|
4215
4255
|
class: "tpl-table-editable"
|
|
4216
|
-
}, [m.value ? (s(), D("thead",
|
|
4256
|
+
}, [m.value ? (s(), D("thead", Yl, [j("tr", null, [(s(!0), D(P, null, d(m.value.cells, (e) => g((s(), D("th", {
|
|
4217
4257
|
key: e.id,
|
|
4218
4258
|
style: f(p.value),
|
|
4219
4259
|
"aria-label": w(r).table.cellPlaceholder,
|
|
@@ -4222,7 +4262,7 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4222
4262
|
onBlur: (t) => v(m.value.id, e.id, t),
|
|
4223
4263
|
onKeydown: n[0] ||= re(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4224
4264
|
onClick: z(_, ["stop"])
|
|
4225
|
-
}, null, 44,
|
|
4265
|
+
}, null, 44, Xl)), [[t, e.content]])), 128))])])) : T("", !0), j("tbody", null, [(s(!0), D(P, null, d(h.value, (e) => (s(), D("tr", { key: e.id }, [(s(!0), D(P, null, d(e.cells, (i) => g((s(), D("td", {
|
|
4226
4266
|
key: i.id,
|
|
4227
4267
|
style: f(u.value),
|
|
4228
4268
|
"aria-label": w(r).table.cellPlaceholder,
|
|
@@ -4231,9 +4271,9 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4231
4271
|
onBlur: (t) => v(e.id, i.id, t),
|
|
4232
4272
|
onKeydown: n[1] ||= re(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4233
4273
|
onClick: z(_, ["stop"])
|
|
4234
|
-
}, null, 44,
|
|
4274
|
+
}, null, 44, Zl)), [[t, i.content]])), 128))]))), 128))])], 4)) : (s(), D("div", Ql, [y(w(vt), { size: 16 }), j("span", null, i(w(r).table.empty), 1)]))]));
|
|
4235
4275
|
}
|
|
4236
|
-
}), [["__scopeId", "data-v-6751d456"]]),
|
|
4276
|
+
}), [["__scopeId", "data-v-6751d456"]]), eu = /* @__PURE__ */ R({
|
|
4237
4277
|
__name: "VideoPlayButton",
|
|
4238
4278
|
props: { hoverEffect: {
|
|
4239
4279
|
type: Boolean,
|
|
@@ -4250,7 +4290,7 @@ var Ol = { class: "tpl:relative tpl:w-full" }, kl = {
|
|
|
4250
4290
|
}
|
|
4251
4291
|
});
|
|
4252
4292
|
// src/utils/videoThumbnail.ts
|
|
4253
|
-
function
|
|
4293
|
+
function tu(e) {
|
|
4254
4294
|
if (!e) return {
|
|
4255
4295
|
platform: "unknown",
|
|
4256
4296
|
videoId: null,
|
|
@@ -4282,24 +4322,24 @@ function Xl(e) {
|
|
|
4282
4322
|
thumbnailUrl: null
|
|
4283
4323
|
};
|
|
4284
4324
|
}
|
|
4285
|
-
function
|
|
4286
|
-
return t ||
|
|
4325
|
+
function nu(e, t) {
|
|
4326
|
+
return t || tu(e).thumbnailUrl;
|
|
4287
4327
|
}
|
|
4288
4328
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4289
|
-
var
|
|
4329
|
+
var ru = ["src", "alt"], iu = {
|
|
4290
4330
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4291
4331
|
style: { opacity: "0.7" }
|
|
4292
|
-
},
|
|
4332
|
+
}, au = ["href"], ou = ["src", "alt"], su = ["src", "alt"], cu = {
|
|
4293
4333
|
key: 3,
|
|
4294
4334
|
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)]"
|
|
4295
|
-
},
|
|
4335
|
+
}, lu = /* @__PURE__ */ R({
|
|
4296
4336
|
__name: "VideoBlock",
|
|
4297
4337
|
props: {
|
|
4298
4338
|
block: {},
|
|
4299
4339
|
viewport: {}
|
|
4300
4340
|
},
|
|
4301
4341
|
setup(e) {
|
|
4302
|
-
let t = e, { t: n } =
|
|
4342
|
+
let t = e, { t: n } = Qn(), { syntax: r } = mr(), a = C(() => Ke(t.block.url, r) || Ke(t.block.thumbnailUrl, r)), o = Ct(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), c = Ct(() => a.value ? t.block.placeholderUrl : void 0), l = C(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : nu(t.block.url)), u = C(() => ({ textAlign: t.block.align })), d = C(() => {
|
|
4303
4343
|
let e = t.block.align;
|
|
4304
4344
|
return {
|
|
4305
4345
|
maxWidth: "100%",
|
|
@@ -4309,7 +4349,7 @@ var Ql = ["src", "alt"], $l = {
|
|
|
4309
4349
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4310
4350
|
marginRight: e === "center" ? "auto" : void 0
|
|
4311
4351
|
};
|
|
4312
|
-
}), p = C(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), m = C(() =>
|
|
4352
|
+
}), p = C(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), m = C(() => Ke(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4313
4353
|
return (t, r) => (s(), D("div", {
|
|
4314
4354
|
class: "tpl:w-full",
|
|
4315
4355
|
style: f(u.value)
|
|
@@ -4322,16 +4362,16 @@ var Ql = ["src", "alt"], $l = {
|
|
|
4322
4362
|
src: w(c),
|
|
4323
4363
|
alt: e.block.alt,
|
|
4324
4364
|
style: f(p.value)
|
|
4325
|
-
}, null, 12,
|
|
4365
|
+
}, null, 12, ru), y(eu)], 4)) : a.value ? (s(), D("div", {
|
|
4326
4366
|
key: 1,
|
|
4327
4367
|
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)]",
|
|
4328
4368
|
style: f([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
4329
|
-
}, [y(w(
|
|
4369
|
+
}, [y(w(Nr), {
|
|
4330
4370
|
size: 36,
|
|
4331
4371
|
"stroke-width": 1.5,
|
|
4332
4372
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4333
4373
|
style: { opacity: "0.5" }
|
|
4334
|
-
}), j("span",
|
|
4374
|
+
}), j("span", iu, [y(ca, { text: m.value }, null, 8, ["text"])])], 4)) : l.value ? (s(), D(P, { key: 2 }, [e.block.url ? (s(), D("a", {
|
|
4335
4375
|
key: 0,
|
|
4336
4376
|
href: e.block.url,
|
|
4337
4377
|
target: "_blank",
|
|
@@ -4344,7 +4384,7 @@ var Ql = ["src", "alt"], $l = {
|
|
|
4344
4384
|
src: l.value,
|
|
4345
4385
|
alt: e.block.alt,
|
|
4346
4386
|
style: f(p.value)
|
|
4347
|
-
}, null, 12,
|
|
4387
|
+
}, null, 12, ou), y(eu, { "hover-effect": "" })], 12, au)) : (s(), D("div", {
|
|
4348
4388
|
key: 1,
|
|
4349
4389
|
class: "tpl:relative tpl:inline-block",
|
|
4350
4390
|
style: f(d.value)
|
|
@@ -4353,34 +4393,34 @@ var Ql = ["src", "alt"], $l = {
|
|
|
4353
4393
|
src: l.value,
|
|
4354
4394
|
alt: e.block.alt,
|
|
4355
4395
|
style: f(p.value)
|
|
4356
|
-
}, null, 12,
|
|
4396
|
+
}, null, 12, su), y(eu)], 4))], 64)) : (s(), D("div", cu, [y(w(Nr), {
|
|
4357
4397
|
size: 40,
|
|
4358
4398
|
"stroke-width": 1.5,
|
|
4359
4399
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4360
4400
|
}), j("span", null, i(w(n).video.addVideo), 1)]))], 4));
|
|
4361
4401
|
}
|
|
4362
|
-
}),
|
|
4363
|
-
section:
|
|
4364
|
-
title:
|
|
4365
|
-
paragraph:
|
|
4366
|
-
image:
|
|
4367
|
-
button:
|
|
4368
|
-
divider:
|
|
4369
|
-
video:
|
|
4370
|
-
social:
|
|
4371
|
-
menu:
|
|
4372
|
-
table:
|
|
4373
|
-
spacer:
|
|
4374
|
-
html:
|
|
4375
|
-
countdown: I(() => import("./CountdownBlock-
|
|
4402
|
+
}), uu = {
|
|
4403
|
+
section: Il,
|
|
4404
|
+
title: No,
|
|
4405
|
+
paragraph: Ya,
|
|
4406
|
+
image: Ha,
|
|
4407
|
+
button: ua,
|
|
4408
|
+
divider: wa,
|
|
4409
|
+
video: lu,
|
|
4410
|
+
social: Wl,
|
|
4411
|
+
menu: Ka,
|
|
4412
|
+
table: $l,
|
|
4413
|
+
spacer: ql,
|
|
4414
|
+
html: Aa,
|
|
4415
|
+
countdown: I(() => import("./CountdownBlock-BTXcCvjZ.js"))
|
|
4376
4416
|
};
|
|
4377
|
-
function
|
|
4378
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: o, format: s } =
|
|
4417
|
+
function du(e) {
|
|
4418
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: o, format: s } = Qn(i), c = C(() => ie(ie(ie(yi(i), zi(n.content.value.settings?.locale)), se(n.content.value.settings) === "rtl" ? {
|
|
4379
4419
|
title: { textAlign: "right" },
|
|
4380
4420
|
table: { textAlign: "right" }
|
|
4381
4421
|
} : {}), r.blockDefaults ?? {}));
|
|
4382
4422
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4383
|
-
let { resolvedTheme: u } =
|
|
4423
|
+
let { resolvedTheme: u } = ui(C(() => n.state.uiTheme)), d = E(r.theme ?? {}), { themeStyles: f } = Ur({
|
|
4384
4424
|
themeOverrides: d,
|
|
4385
4425
|
resolvedTheme: u,
|
|
4386
4426
|
extraStyles: () => ({
|
|
@@ -4407,30 +4447,30 @@ function ou(e) {
|
|
|
4407
4447
|
g && (_ = t(p.isNavigating, (e) => {
|
|
4408
4448
|
e ? g.pause() : g.resume();
|
|
4409
4449
|
}));
|
|
4410
|
-
let y =
|
|
4450
|
+
let y = li(n, {
|
|
4411
4451
|
t: o,
|
|
4412
4452
|
format: s
|
|
4413
|
-
}, r.customBlocks ?? []), b =
|
|
4414
|
-
if (b.allowCustomIgnored &&
|
|
4415
|
-
let e =
|
|
4416
|
-
e.length > 0 &&
|
|
4417
|
-
}
|
|
4418
|
-
let x =
|
|
4419
|
-
for (let e of x.unknown)
|
|
4420
|
-
let S =
|
|
4421
|
-
|
|
4453
|
+
}, r.customBlocks ?? []), b = vr(r.colors);
|
|
4454
|
+
if (b.allowCustomIgnored && hr.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && hr.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4455
|
+
let e = vi(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4456
|
+
e.length > 0 && hr.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.`);
|
|
4457
|
+
}
|
|
4458
|
+
let x = Cr(r.templateSettings);
|
|
4459
|
+
for (let e of x.unknown) hr.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${wr.join(", ")}) — skipping it.`);
|
|
4460
|
+
let S = Lr();
|
|
4461
|
+
hi(S, uu);
|
|
4422
4462
|
let w = /* @__PURE__ */ new Set();
|
|
4423
4463
|
function T(e) {
|
|
4424
4464
|
for (let t of e) {
|
|
4425
|
-
S.registerCustom(t,
|
|
4426
|
-
for (let e of
|
|
4465
|
+
S.registerCustom(t, Sa);
|
|
4466
|
+
for (let e of Bi(t, b)) w.has(e.id) || (w.add(e.id), hr.warn(e.message));
|
|
4427
4467
|
}
|
|
4428
4468
|
}
|
|
4429
4469
|
r.customBlocks?.length && T(r.customBlocks);
|
|
4430
|
-
let D =
|
|
4470
|
+
let D = ei();
|
|
4431
4471
|
if (ee() && v(D.dispose), e.containerEl) {
|
|
4432
4472
|
let t = e.containerEl;
|
|
4433
|
-
|
|
4473
|
+
lr(document, "pointerdown", (e) => {
|
|
4434
4474
|
let n = t.value;
|
|
4435
4475
|
n && (e.composedPath?.() ?? []).includes(n) && D.claim();
|
|
4436
4476
|
}, { capture: !0 });
|
|
@@ -4440,7 +4480,7 @@ function ou(e) {
|
|
|
4440
4480
|
t ? t.save() : g?.flush();
|
|
4441
4481
|
}
|
|
4442
4482
|
function k(t) {
|
|
4443
|
-
D.isActive() &&
|
|
4483
|
+
D.isActive() && Hi(t, {
|
|
4444
4484
|
history: p,
|
|
4445
4485
|
selectBlock: (e) => n.selectBlock(e),
|
|
4446
4486
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4451,42 +4491,42 @@ function ou(e) {
|
|
|
4451
4491
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
4452
4492
|
});
|
|
4453
4493
|
}
|
|
4454
|
-
|
|
4494
|
+
lr(document, "keydown", k);
|
|
4455
4495
|
let A = E(null), j = e.editorRoot ?? document;
|
|
4456
|
-
l(
|
|
4457
|
-
let N =
|
|
4496
|
+
l(Xn, j), l(Bn, A), l(tn, /* @__PURE__ */ new Map()), l(Ln, i), l(qn, n), l(Yn, p), l(Un, m), l(In, h), l(Tn, a), l(Gn, f), l(wn, u), l(En, c), l(Mn, r.locale), l(Fn, S), l(An, r.customBlocks ?? []), l(cn, r.paletteBlocks), l(hn, gi(r.htmlBlockPreview)), l(gn, r.layout), l(xn, r.sectionWrapper), l(zn, b), l(On, x.fields), l(kn, di(n.content, S));
|
|
4497
|
+
let N = he(r.mergeTags?.syntax);
|
|
4458
4498
|
for (let e of ["opener", "closer"]) {
|
|
4459
4499
|
let t = N[e];
|
|
4460
|
-
typeof t == "string" && t.trim() === "" &&
|
|
4500
|
+
typeof t == "string" && t.trim() === "" && hr.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
4461
4501
|
}
|
|
4462
|
-
typeof N.opener != "string" && typeof N.closer == "string" && N.closer.trim() !== "" &&
|
|
4502
|
+
typeof N.opener != "string" && typeof N.closer == "string" && N.closer.trim() !== "" && $e(N) === null && hr.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
4463
4503
|
let P = M(r.mergeTags?.tags ?? []);
|
|
4464
4504
|
function te(e) {
|
|
4465
|
-
Array.isArray(e) ? P.value = e :
|
|
4505
|
+
Array.isArray(e) ? P.value = e : hr.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4466
4506
|
}
|
|
4467
|
-
l(pn, P), l($t, N), l(
|
|
4468
|
-
let F = E(
|
|
4469
|
-
l(
|
|
4470
|
-
let I =
|
|
4507
|
+
l(pn, P), l($t, N), l(rn, r.mergeTags?.onRequest ?? null), l(nn, r.mergeTags?.autocomplete !== !1), l(Zn, r.mergeTags?.showRawValue !== !1);
|
|
4508
|
+
let F = E(Je(r.mergeTags?.tags ?? []));
|
|
4509
|
+
l(mn, F);
|
|
4510
|
+
let I = ri({
|
|
4471
4511
|
resolvePreview: r.resolvePreview,
|
|
4472
4512
|
getContent: () => {
|
|
4473
4513
|
let e = n.content.value;
|
|
4474
4514
|
if (!n.state.previewMode) return e;
|
|
4475
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
4476
|
-
return r.layout ?
|
|
4515
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = le(e, t);
|
|
4516
|
+
return r.layout ? lt(le(r.layout, t, { missing: "default" }), i) : i;
|
|
4477
4517
|
},
|
|
4478
4518
|
isActive: () => n.state.previewMode,
|
|
4479
4519
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
4480
4520
|
});
|
|
4481
|
-
l(
|
|
4521
|
+
l(sn, I), l(bn, r.resolvePreview);
|
|
4482
4522
|
let L = C(() => !(n.state.previewMode && I.isConfigured));
|
|
4483
4523
|
l(Cn, L);
|
|
4484
|
-
let R =
|
|
4485
|
-
l(on, R), l(ln, E(!1)), l(dn, E(!1)), l(Nn, r.logicTags?.tags ?? []), l(Qt, r.logicTags?.pairs ?? []), l(
|
|
4486
|
-
let z =
|
|
4524
|
+
let R = ii();
|
|
4525
|
+
l(on, R), l(ln, E(!1)), l(dn, E(!1)), l(Nn, r.logicTags?.tags ?? []), l(Qt, r.logicTags?.pairs ?? []), l(_n, r.logicTags?.onRequest ?? null), l(un, ai()), l(yn, r.onRequestMedia ?? null), l(Kn, r.canDropMedia ?? null), l(en, r.resolveImageUrl ? It(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && hr.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), l(Sn, r.displayConditions?.conditions ?? []), l(Vn, r.displayConditions?.allowCustom ?? !1), l(an, r.displayConditions?.onRequest ?? null), l(Dn, e.capabilities ?? {}), l(Jn, y);
|
|
4526
|
+
let z = oi(r.lint) ? null : ci({
|
|
4487
4527
|
content: n.content,
|
|
4488
4528
|
get options() {
|
|
4489
|
-
return
|
|
4529
|
+
return ti({
|
|
4490
4530
|
...r,
|
|
4491
4531
|
content: n.content.value,
|
|
4492
4532
|
contentLocale: n.activeLocale?.value ?? void 0
|
|
@@ -4498,7 +4538,7 @@ function ou(e) {
|
|
|
4498
4538
|
updateSettings: n.updateSettings,
|
|
4499
4539
|
removeBlock: n.removeBlock
|
|
4500
4540
|
});
|
|
4501
|
-
l(
|
|
4541
|
+
l(Zt, z);
|
|
4502
4542
|
function ne() {
|
|
4503
4543
|
_?.(), z?.destroy(), g?.destroy(), p.destroy();
|
|
4504
4544
|
}
|
|
@@ -4528,12 +4568,12 @@ function ou(e) {
|
|
|
4528
4568
|
};
|
|
4529
4569
|
}
|
|
4530
4570
|
// src/composables/useSmallScreenNotice.ts
|
|
4531
|
-
var
|
|
4532
|
-
function
|
|
4533
|
-
let t =
|
|
4571
|
+
var fu = "(max-width: 767px)";
|
|
4572
|
+
function pu(e) {
|
|
4573
|
+
let t = ur(fu);
|
|
4534
4574
|
return {
|
|
4535
4575
|
isSmallScreen: t,
|
|
4536
4576
|
showNotice: C(() => (N(e) ?? !0) && t.value)
|
|
4537
4577
|
};
|
|
4538
4578
|
}
|
|
4539
|
-
export {
|
|
4579
|
+
export { Di as A, Jr as B, Yi as C, Ui as D, ea as E, ji as F, kr as G, Ir as H, Ai as I, Dr as K, ri as L, Pi as M, Ni as N, oa as O, Mi as P, ti as R, Ki as S, $i as T, Fr as U, Vr as V, jr as W, Aa as _, ql as a, pa as b, jl as c, No as d, jo as f, Ha as g, Ka as h, $l as i, Fi as j, Wi as k, Po as l, Ya as m, du as n, Wl as o, Xa as p, lu as r, Il as s, pu as t, Lo as u, wa as v, ia as w, ua as x, Sa as y, Xr as z };
|