@templatical/editor 0.58.0 → 0.59.1
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-B4cg0jQG.js → AiAltTextPopover-CwyKz_9U.js} +3 -3
- package/dist/{AiAltTextReview-Dni8I9eV.js → AiAltTextReview-DNFnR1PN.js} +2 -2
- package/dist/{AiChatPanel-QWqGhy2s.js → AiChatPanel-DWWVvJIP.js} +3 -3
- package/dist/{AiPanels-DE2ysIV1.js → AiPanels-CESbBB63.js} +1 -1
- package/dist/{AiRewriteMenu-B25gpnip.js → AiRewriteMenu-DH6j1jOA.js} +5 -5
- package/dist/{BlockIssueBadge-Ri7dQhuz.js → BlockIssueBadge-3k568_Od.js} +2 -2
- package/dist/{BlockPreviewCanvas-yr5MmQql.js → BlockPreviewCanvas-BLJxLwTT.js} +6 -6
- package/dist/{CloudHeaderExtras-CJsXi4Ku.js → CloudHeaderExtras-xrHubAHL.js} +1 -1
- package/dist/{CloudPanels-ZOR9By8W.js → CloudPanels-qW-MObRD.js} +3 -3
- package/dist/{CollaborationNotices-COS_YvTq.js → CollaborationNotices-D9GQ477K.js} +1 -1
- package/dist/{CollaboratorBar-jq6HH0fb.js → CollaboratorBar-DsRjAaqd.js} +1 -1
- package/dist/{CommentsPanel-B0_Ob2vO.js → CommentsPanel-lb-IFzjl.js} +1 -1
- package/dist/{CommentsSidebar-DFoLon5D.js → CommentsSidebar-CVVTCWBH.js} +3 -3
- package/dist/{CountdownBlock-BrR2uqM3.js → CountdownBlock-CSEq79Nc.js} +2 -2
- package/dist/{CountdownToolbar-BtP0n0yZ.js → CountdownToolbar-BV9yQi9k.js} +5 -5
- package/dist/{IssuesPanel-CarJYQFu.js → IssuesPanel-pxcWAQJM.js} +5 -5
- package/dist/{LanguageMenu-confz89v.js → LanguageMenu-D_xbvq3D.js} +5 -5
- package/dist/{LocaleNotices-D8aE167E.js → LocaleNotices-j4aMFfmc.js} +2 -2
- package/dist/{LogicTagInsertButton-DFL3kvGK.js → LogicTagInsertButton-BDIsyl3C.js} +96 -96
- package/dist/{MergeTagInput-BuGJeeyA.js → MergeTagInput-De1yWoc2.js} +2 -2
- package/dist/{MergeTagModeToggle-D7482NZf.js → MergeTagModeToggle-CL96pI1E.js} +2 -2
- package/dist/{MergeTagTextarea-Qt9_NeY4.js → MergeTagTextarea-DDyV8U44.js} +4 -4
- package/dist/{ParagraphEditor-Cd-CBE_l.js → ParagraphEditor-DpOsnnai.js} +9 -9
- package/dist/{RestoreVersionDialog-Clh4l0Bn.js → RestoreVersionDialog-JQEkVIh5.js} +3 -3
- package/dist/{RichTextEditorContent-Dw_Z9zhi.js → RichTextEditorContent-C2Yj1-ZA.js} +5 -5
- package/dist/{SaveBlockDialog-kboYvk_a.js → SaveBlockDialog-BPf6tDhg.js} +11 -11
- package/dist/{SavedBlocksBrowserModal-wVGMC6My.js → SavedBlocksBrowserModal-DnDCfwSv.js} +7 -7
- package/dist/{SavedBlocksPanels-C9AHYfYR.js → SavedBlocksPanels-D5YaVCem.js} +1 -1
- package/dist/{SavedBlocksPickBar-CVbV5MVL.js → SavedBlocksPickBar-OQ7ey3MD.js} +3 -3
- package/dist/{TemplateSettings-ChCm5_2b.js → TemplateSettings-CBCaybvd.js} +5 -5
- package/dist/TestEmailModal-BDp85wIp.js +241 -0
- package/dist/{TestEmailPanel-7Ua54CYL.js → TestEmailPanel-DkJx0Ptk.js} +1 -1
- package/dist/{TitleEditor-DXMOgW-9.js → TitleEditor-wzknZqu_.js} +7 -7
- package/dist/{Toolbar-CVHJl6i4.js → Toolbar-FIYSw3Us.js} +438 -438
- package/dist/{TplModal-BErE8I3p.js → TplModal-C57J-uF0.js} +3 -3
- package/dist/{VersionHistoryMenu-P3P00KqQ.js → VersionHistoryMenu-6jMve6By.js} +2 -2
- package/dist/{VersionHistoryPanels-DES1b1Pq.js → VersionHistoryPanels-BZ0GT52h.js} +1 -1
- package/dist/{VersionPreviewBanner-D2TtR9I5.js → VersionPreviewBanner-Bq8z1SUc.js} +2 -2
- package/dist/{WrapperBlock-B1zI7POT.js → WrapperBlock-C4XrJkx5.js} +3 -3
- package/dist/{blockTypeIcons-Dp540i74.js → blockTypeIcons-VX_8UQ21.js} +1 -1
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-BJn8lcJx.js → ca-YfIxwO1G.js} +1 -0
- package/dist/cdn/chunks/{AiAltTextPopover-sx3bmRiV.js → AiAltTextPopover-Dj-VLU88.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-sx3bmRiV.js.map → AiAltTextPopover-Dj-VLU88.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-Cj3PKInZ.js → AiAltTextReview-tVkJPOk6.js} +3 -3
- package/dist/cdn/chunks/{AiAltTextReview-Cj3PKInZ.js.map → AiAltTextReview-tVkJPOk6.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-DibkqrqY.js → AiChatPanel-CYPvHQGQ.js} +4 -4
- package/dist/cdn/chunks/{AiChatPanel-DibkqrqY.js.map → AiChatPanel-CYPvHQGQ.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-DVs4r8sY.js → AiPanels-ChTLCmMS.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-DVs4r8sY.js.map → AiPanels-ChTLCmMS.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BbZ9NRoe.js → AiRewriteMenu-B23ozFnP.js} +6 -6
- package/dist/cdn/chunks/{AiRewriteMenu-BbZ9NRoe.js.map → AiRewriteMenu-B23ozFnP.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BWIth1y6.js → BlockIssueBadge-BKO4Mr8f.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-BWIth1y6.js.map → BlockIssueBadge-BKO4Mr8f.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-BDZ6pMHq.js → BlockPreviewCanvas-CaRneMZ8.js} +7 -7
- package/dist/cdn/chunks/{BlockPreviewCanvas-BDZ6pMHq.js.map → BlockPreviewCanvas-CaRneMZ8.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-CazfMn6A.js → CloudHeaderExtras-O_K3jmgO.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-CazfMn6A.js.map → CloudHeaderExtras-O_K3jmgO.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BI_hJwcJ.js → CloudPanels-xAEirqNC.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-BI_hJwcJ.js.map → CloudPanels-xAEirqNC.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-yKOt4o7B.js → CollaborationNotices-CwAoa-73.js} +2 -2
- package/dist/cdn/chunks/{CollaborationNotices-yKOt4o7B.js.map → CollaborationNotices-CwAoa-73.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-D5fycyLP.js → CollaboratorBar-DdQQwtwd.js} +2 -2
- package/dist/cdn/chunks/{CollaboratorBar-D5fycyLP.js.map → CollaboratorBar-DdQQwtwd.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-BPoa1lBK.js → CommentsPanel-C8AKtxiG.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-BPoa1lBK.js.map → CommentsPanel-C8AKtxiG.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-DLn9qWtv.js → CommentsSidebar-FxY0RHSq.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-DLn9qWtv.js.map → CommentsSidebar-FxY0RHSq.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Do6oItNW.js → CountdownBlock-DGgnPUlu.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-Do6oItNW.js.map → CountdownBlock-DGgnPUlu.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-D5_QBuhO.js → CountdownToolbar-9PtYUgCW.js} +6 -6
- package/dist/cdn/chunks/{CountdownToolbar-D5_QBuhO.js.map → CountdownToolbar-9PtYUgCW.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BzVpxRkq.js → IssuesPanel-Co-ffgWa.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-BzVpxRkq.js.map → IssuesPanel-Co-ffgWa.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-GEbUX5Oe.js → LanguageMenu-Cl0ajnXZ.js} +6 -6
- package/dist/cdn/chunks/{LanguageMenu-GEbUX5Oe.js.map → LanguageMenu-Cl0ajnXZ.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-CWRS_G-4.js → LocaleNotices-BVDJ7kyj.js} +3 -3
- package/dist/cdn/chunks/{LocaleNotices-CWRS_G-4.js.map → LocaleNotices-BVDJ7kyj.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CrkAz1t_.js → LogicTagInsertButton-DPYA8LJW.js} +9 -9
- package/dist/cdn/chunks/{LogicTagInsertButton-CrkAz1t_.js.map → LogicTagInsertButton-DPYA8LJW.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-DkCATtfE.js → MergeTagInput-Cxfjq3tx.js} +3 -3
- package/dist/cdn/chunks/{MergeTagInput-DkCATtfE.js.map → MergeTagInput-Cxfjq3tx.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DYAFxyoB.js → MergeTagModeToggle-BmNGV3yc.js} +3 -3
- package/dist/cdn/chunks/{MergeTagModeToggle-DYAFxyoB.js.map → MergeTagModeToggle-BmNGV3yc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DRS6pXSE.js → MergeTagTextarea-DmwrPAss.js} +5 -5
- package/dist/cdn/chunks/{MergeTagTextarea-DRS6pXSE.js.map → MergeTagTextarea-DmwrPAss.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-rEdKBett.js → ParagraphEditor-BoGELRr-.js} +10 -10
- package/dist/cdn/chunks/{ParagraphEditor-rEdKBett.js.map → ParagraphEditor-BoGELRr-.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-B7eTijWD.js → RestoreVersionDialog-CaKiSq-9.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-B7eTijWD.js.map → RestoreVersionDialog-CaKiSq-9.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-EtUIYzHB.js → RichTextEditorContent-Dq4TROOg.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-EtUIYzHB.js.map → RichTextEditorContent-Dq4TROOg.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BquE_Brz.js → SaveBlockDialog-BAR0G4UO.js} +12 -12
- package/dist/cdn/chunks/{SaveBlockDialog-BquE_Brz.js.map → SaveBlockDialog-BAR0G4UO.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--fNlId5y.js → SavedBlocksBrowserModal-C-KYaLkQ.js} +7 -7
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--fNlId5y.js.map → SavedBlocksBrowserModal-C-KYaLkQ.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-0Z0dELDm.js → SavedBlocksPanels-C3OF0EeB.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-0Z0dELDm.js.map → SavedBlocksPanels-C3OF0EeB.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-yezZxZeP.js → SavedBlocksPickBar-BnyPXw5W.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-yezZxZeP.js.map → SavedBlocksPickBar-BnyPXw5W.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-DFetnT9P.js → TemplateSettings-uoiUkd2l.js} +6 -6
- package/dist/cdn/chunks/{TemplateSettings-DFetnT9P.js.map → TemplateSettings-uoiUkd2l.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailModal-B9d3ZsH7.js +240 -0
- package/dist/cdn/chunks/TestEmailModal-B9d3ZsH7.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-C2dxmmoW.js → TestEmailPanel--fPi6QjN.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-C2dxmmoW.js.map → TestEmailPanel--fPi6QjN.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Bq62I2SC.js → TitleEditor-Cn4fnSpa.js} +7 -7
- package/dist/cdn/chunks/{TitleEditor-Bq62I2SC.js.map → TitleEditor-Cn4fnSpa.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-CwmW8wAI.js → Toolbar-BzAuH2G4.js} +19 -19
- package/dist/cdn/chunks/{Toolbar-CwmW8wAI.js.map → Toolbar-BzAuH2G4.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DE6BniBg.js → TplModal-jMfK19PC.js} +4 -4
- package/dist/cdn/chunks/{TplModal-DE6BniBg.js.map → TplModal-jMfK19PC.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BBYU71Ua.js → VersionHistoryMenu-DDqYMqC2.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-BBYU71Ua.js.map → VersionHistoryMenu-DDqYMqC2.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-mMMqnf3O.js → VersionHistoryPanels-DJpySkvq.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-mMMqnf3O.js.map → VersionHistoryPanels-DJpySkvq.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-tBz-3lGg.js → VersionPreviewBanner-CYT5QUoc.js} +3 -3
- package/dist/cdn/chunks/{VersionPreviewBanner-tBz-3lGg.js.map → VersionPreviewBanner-CYT5QUoc.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-B9XxtFql.js → WrapperBlock-Bi9XgDmX.js} +4 -4
- package/dist/cdn/chunks/{WrapperBlock-B9XxtFql.js.map → WrapperBlock-Bi9XgDmX.js.map} +1 -1
- package/dist/cdn/chunks/{ca-BJn8lcJx.js → ca-YfIxwO1G.js} +2 -1
- package/dist/cdn/chunks/{ca-BJn8lcJx.js.map → ca-YfIxwO1G.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CkthyXi9.js → composables-Cp6gZ7qV.js} +468 -451
- package/dist/cdn/chunks/composables-Cp6gZ7qV.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-k12jYbXP.js → createCloudRuntime-D8zeR9D2.js} +2 -2
- package/dist/cdn/chunks/{createCloudRuntime-k12jYbXP.js.map → createCloudRuntime-D8zeR9D2.js.map} +1 -1
- package/dist/cdn/chunks/{da-qQzj0QGy.js → da-CM6DCvRG.js} +2 -1
- package/dist/cdn/chunks/{da-qQzj0QGy.js.map → da-CM6DCvRG.js.map} +1 -1
- package/dist/cdn/chunks/{de-BLFp3nWx.js → de-Dugz1zXC.js} +2 -1
- package/dist/cdn/chunks/{de-BLFp3nWx.js.map → de-Dugz1zXC.js.map} +1 -1
- package/dist/cdn/chunks/{en-DGGQJGbm.js → en-BykoFuFY.js} +2 -1
- package/dist/cdn/chunks/{en-DGGQJGbm.js.map → en-BykoFuFY.js.map} +1 -1
- package/dist/cdn/chunks/{es-DTY9qgLv.js → es-DaWsTkpj.js} +2 -1
- package/dist/cdn/chunks/{es-DTY9qgLv.js.map → es-DaWsTkpj.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-Djyg5slk.js → extensions-BYJPv1sA.js} +4 -4
- package/dist/cdn/chunks/{extensions-Djyg5slk.js.map → extensions-BYJPv1sA.js.map} +1 -1
- package/dist/cdn/chunks/{fr-L4FqO9Gp.js → fr-DqwQHtJo.js} +2 -1
- package/dist/cdn/chunks/{fr-L4FqO9Gp.js.map → fr-DqwQHtJo.js.map} +1 -1
- package/dist/cdn/chunks/{ja-6uOXkh4v.js → ja-BH4MS1Ye.js} +2 -1
- package/dist/cdn/chunks/{ja-6uOXkh4v.js.map → ja-BH4MS1Ye.js.map} +1 -1
- package/dist/cdn/chunks/{keys-BQqbBUag.js → keys-DNv3xXxI.js} +4 -4
- package/dist/cdn/chunks/keys-DNv3xXxI.js.map +1 -0
- package/dist/cdn/chunks/{nl-DCxuxwNq.js → nl-BQl1_UHv.js} +2 -1
- package/dist/cdn/chunks/{nl-DCxuxwNq.js.map → nl-BQl1_UHv.js.map} +1 -1
- package/dist/{pt-BR-CBkcrebr.js → cdn/chunks/pt-BR-eyzmU9Vs.js} +3 -0
- package/dist/cdn/chunks/{pt-BR-CBkcrebr.js.map → pt-BR-eyzmU9Vs.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-CkgQUpim.js → socialIcons-bvQ57o1m.js} +484 -467
- package/dist/cdn/chunks/socialIcons-bvQ57o1m.js.map +1 -0
- package/dist/cdn/chunks/src-CVHGPKSW.js.map +1 -1
- package/dist/cdn/chunks/{src-CymzjJYe.js → src-aFRxbwqP.js} +2 -2
- package/dist/cdn/chunks/{src-CymzjJYe.js.map → src-aFRxbwqP.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-CgiNKdnc.js → styleConstants-Br6CIRoS.js} +6 -6
- package/dist/cdn/chunks/styleConstants-Br6CIRoS.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-Dr4S2TRW.js → useCloudI18n-CWgySYuJ.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-Dr4S2TRW.js.map → useCloudI18n-CWgySYuJ.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-B_kf_k-g.js → useEditorRoot-BA4vV7sK.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-B_kf_k-g.js.map → useEditorRoot-BA4vV7sK.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-CSf-ZpcM.js → useI18n-JsIdvX-i.js} +2 -2
- package/dist/cdn/chunks/{useI18n-CSf-ZpcM.js.map → useI18n-JsIdvX-i.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-YXRBcfgG.js → useLogicTag-C10Wef7d.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-YXRBcfgG.js.map → useLogicTag-C10Wef7d.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-lb-Wrw-B.js → useMergeTag-Dd26TcvH.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-lb-Wrw-B.js.map → useMergeTag-Dd26TcvH.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BJFFi8x6.js → usePopoverPosition-DWRQRT2P.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-BJFFi8x6.js.map → usePopoverPosition-DWRQRT2P.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-MI4PP5lk.js → useScrollToBlock-CArjwH-u.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-MI4PP5lk.js.map → useScrollToBlock-CArjwH-u.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +709 -617
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-BrzGZQkd.js → composables-jTnTSqdm.js} +633 -616
- package/dist/{createCloudRuntime-DgQfMi22.js → createCloudRuntime-DiUnYjKr.js} +1 -1
- package/dist/{da-qQzj0QGy.js → da-CM6DCvRG.js} +1 -0
- package/dist/{de-BLFp3nWx.js → de-Dugz1zXC.js} +1 -0
- package/dist/{en-DGGQJGbm.js → en-BykoFuFY.js} +1 -0
- package/dist/{es-DTY9qgLv.js → es-DaWsTkpj.js} +1 -0
- package/dist/{extensions-Cyp2x7cD.js → extensions-CAuXwpbI.js} +3 -3
- package/dist/{fr-L4FqO9Gp.js → fr-DqwQHtJo.js} +1 -0
- package/dist/index.d.ts +90 -9
- package/dist/{ja-6uOXkh4v.js → ja-BH4MS1Ye.js} +1 -0
- package/dist/{keys-D9oKZN1h.js → keys-BeQy64On.js} +3 -3
- package/dist/{nl-DCxuxwNq.js → nl-BQl1_UHv.js} +1 -0
- package/dist/{cdn/chunks/pt-BR-CBkcrebr.js → pt-BR-eyzmU9Vs.js} +1 -2
- package/dist/{socialIcons-ZfH8PyV2.js → socialIcons-RKdTgJip.js} +376 -359
- package/dist/style.css +1 -1
- package/dist/{styleConstants-CgiNKdnc.js → styleConstants-Br6CIRoS.js} +5 -5
- package/dist/templatical-editor.js +761 -668
- package/dist/{useCloudI18n-HhCZYRV6.js → useCloudI18n-nMZ9f_4b.js} +1 -1
- package/dist/{useEditorRoot-B0Njczhx.js → useEditorRoot-DpssP9rX.js} +1 -1
- package/dist/{useI18n-CM9vKbYc.js → useI18n-C2p-qHeb.js} +1 -1
- package/dist/{useLogicTag-BTCtn-uG.js → useLogicTag-59fmujI7.js} +1 -1
- package/dist/{useMergeTag-QlXUjCWT.js → useMergeTag-M1vauWet.js} +1 -1
- package/dist/{usePopoverPosition-CVRzzLkC.js → usePopoverPosition-L9MOHBM-.js} +1 -1
- package/dist/{useScrollToBlock-DruzlN2h.js → useScrollToBlock-BMF0Dt5l.js} +1 -1
- package/package.json +7 -7
- package/dist/TestEmailModal-CYq9Ec7x.js +0 -212
- package/dist/cdn/chunks/TestEmailModal-DJpwpEZs.js +0 -212
- package/dist/cdn/chunks/TestEmailModal-DJpwpEZs.js.map +0 -1
- package/dist/cdn/chunks/composables-CkthyXi9.js.map +0 -1
- package/dist/cdn/chunks/keys-BQqbBUag.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CkgQUpim.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-CgiNKdnc.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, l as r } from "./dist-B6ptxfPo.js";
|
|
2
2
|
import { c as i, o as a, s as o } from "./runtime-dom.esm-bundler-nN-jsqr1.js";
|
|
3
|
-
import { A as s, B as c, D as l, F as u, Ft as d, H as f, L as p, M as m, Mt as h, N as g, O as _, P as v, Pt as y, Q as b, S as x, U as S, W as C, Y as w, Z as T, _ as E, a as ee, at as D, b as O, c as k, ct as A, d as j, et as M, f as N, g as te, j as ne, k as re, l as P, nt as ie, ot as F, q as I, r as L, st as ae, u as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import "./useCloudI18n-
|
|
7
|
-
import { t as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { $ as
|
|
10
|
-
import { t as
|
|
11
|
-
import { a as
|
|
12
|
-
import { n as
|
|
13
|
-
import { A as Ft, B as It, C as Lt, D as Rt, F as zt, G as Bt, H as Vt, I as Ht, J as Ut, K as Wt, L as Gt, M as Kt, N as qt, O as Jt, P as Yt,
|
|
14
|
-
import { t as Ln } from "./useLogicTag-
|
|
15
|
-
import { B as Rn, C as zn, D as Bn, E as Vn, F as Hn, H as Un, O as Wn, P as Gn, T as Kn, U as qn, _ as Jn, a as Yn, f as Xn, h as Zn, k as Qn, n as $n, o as er, t as tr, u as nr, v as rr, w as ir, x as ar, y as or, z as sr } from "./socialIcons-
|
|
3
|
+
import { A as s, B as c, D as l, F as u, Ft as d, H as f, L as p, M as m, Mt as h, N as g, O as _, P as v, Pt as y, Q as b, S as x, U as S, W as C, Y as w, Z as T, _ as E, a as ee, at as D, b as O, c as k, ct as A, d as j, et as M, f as N, g as te, j as ne, k as re, l as P, nt as ie, ot as F, q as I, r as L, st as ae, u as R, v as oe, w as z, y as B } from "./vue.runtime.esm-bundler-BE5V8ADU.js";
|
|
4
|
+
import { t as se } from "./useEditorRoot-DpssP9rX.js";
|
|
5
|
+
import { t as ce } from "./useI18n-C2p-qHeb.js";
|
|
6
|
+
import "./useCloudI18n-nMZ9f_4b.js";
|
|
7
|
+
import { t as V } from "./useMergeTag-M1vauWet.js";
|
|
8
|
+
import { _ as le, h as ue, v as de, y as fe } from "./dist-A328tG0Z.js";
|
|
9
|
+
import { $ as pe, $t as me, At as he, B as ge, Bt as _e, Ct as ve, F as ye, Gt as be, H as xe, Ht as Se, I as Ce, J as we, Jt as Te, Kt as Ee, L as De, Mt as Oe, N as ke, P as Ae, Pt as je, Qt as Me, S as Ne, St as Pe, U as Fe, Ut as Ie, V as Le, Vt as Re, W as ze, Wt as Be, X as Ve, Xt as He, Y as Ue, Yt as We, Z as Ge, Zt as Ke, _ as qe, a as Je, an as Ye, at as Xe, b as Ze, c as Qe, dt as $e, en as et, ft as tt, gt as nt, ht as rt, in as it, it as at, j as ot, l as st, lt as ct, m as lt, nn as ut, on as dt, ot as ft, p as pt, pt as mt, q as ht, qt as gt, rn as _t, s as vt, st as yt, tt as bt, xt, y as St, yt as Ct, z as wt, zt as Tt } from "./dist-BTjObRcv.js";
|
|
10
|
+
import { t as Et } from "./logger-BOu7oEtk.js";
|
|
11
|
+
import { a as Dt, c as Ot, i as kt, n as At, o as jt, t as Mt } from "./usePopoverPosition-L9MOHBM-.js";
|
|
12
|
+
import { n as Nt } from "./useLocalizedDisplay-9RqT2y_Y.js";
|
|
13
|
+
import { $ as Pt, A as Ft, B as It, C as Lt, D as Rt, F as zt, G as Bt, H as Vt, I as Ht, J as Ut, K as Wt, L as Gt, M as Kt, N as qt, O as Jt, P as Yt, R as Xt, S as Zt, T as Qt, U as $t, V as en, W as tn, X as nn, Y as rn, Z as an, _ as on, a as sn, at as cn, b as ln, c as un, ct as dn, d as fn, g as pn, h as mn, i as hn, it as gn, j as _n, k as vn, l as yn, lt as bn, m as xn, nt as Sn, ot as Cn, p as wn, q as Tn, r as En, rt as Dn, s as On, st as kn, tt as An, u as jn, v as Mn, w as Nn, x as Pn, y as Fn, z as In } from "./keys-BeQy64On.js";
|
|
14
|
+
import { t as Ln } from "./useLogicTag-59fmujI7.js";
|
|
15
|
+
import { B as Rn, C as zn, D as Bn, E as Vn, F as Hn, H as Un, O as Wn, P as Gn, T as Kn, U as qn, _ as Jn, a as Yn, f as Xn, h as Zn, k as Qn, n as $n, o as er, t as tr, u as nr, v as rr, w as ir, x as ar, y as or, z as sr } from "./socialIcons-RKdTgJip.js";
|
|
16
16
|
import { r as cr, t as lr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
17
17
|
import { i as ur, r as dr, t as fr } from "./sanitizeHtml-D2wueiEe.js";
|
|
18
18
|
import { t as pr } from "./createLucideIcon-CssArtUe.js";
|
|
@@ -23,7 +23,7 @@ import { t as _r } from "./clock-tnC1IvZk.js";
|
|
|
23
23
|
import { t as vr } from "./pencil-BNdkJyfY.js";
|
|
24
24
|
import { t as yr } from "./languageName-DEEOhDWI.js";
|
|
25
25
|
import { t as br } from "./plural-CyxrJXL1.js";
|
|
26
|
-
import { m as xr, w as Sr, x as Cr } from "./styleConstants-
|
|
26
|
+
import { m as xr, w as Sr, x as Cr } from "./styleConstants-Br6CIRoS.js";
|
|
27
27
|
import { t as wr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
28
28
|
import { n as Tr } from "./upload-BWYXWYHb.js";
|
|
29
29
|
import { t as Er } from "./message-circle-D_TpvAJh.js";
|
|
@@ -146,7 +146,7 @@ var kr = pr({
|
|
|
146
146
|
}]]
|
|
147
147
|
}), Ir = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
148
148
|
function Lr(t, n) {
|
|
149
|
-
let r =
|
|
149
|
+
let r = se(), i = null, a = null, o = null;
|
|
150
150
|
function s() {
|
|
151
151
|
return t.value ? Array.from(t.value.querySelectorAll(Ir)).filter((e) => e.offsetParent !== null) : [];
|
|
152
152
|
}
|
|
@@ -178,7 +178,7 @@ function Lr(t, n) {
|
|
|
178
178
|
}
|
|
179
179
|
// src/composables/useEmoji.ts
|
|
180
180
|
function Rr() {
|
|
181
|
-
let [e, t] =
|
|
181
|
+
let [e, t] = de(!1), n = ie([]), r = !1;
|
|
182
182
|
T(() => {
|
|
183
183
|
r = !0;
|
|
184
184
|
}), c(e, async (e) => {
|
|
@@ -210,7 +210,7 @@ function zr() {
|
|
|
210
210
|
function n(t, n) {
|
|
211
211
|
let r = `custom:${t.type}`, i = {
|
|
212
212
|
component: n,
|
|
213
|
-
createBlock: () =>
|
|
213
|
+
createBlock: () => Ce(t),
|
|
214
214
|
definition: t
|
|
215
215
|
};
|
|
216
216
|
e.value.set(r, i), ae(e);
|
|
@@ -236,9 +236,9 @@ function zr() {
|
|
|
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 De(await import("./liquid.browser-DUXEekoN.js")).parseAndRender(t.template, e.fieldValues);
|
|
240
240
|
} catch (t) {
|
|
241
|
-
return
|
|
241
|
+
return Et.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function c(t) {
|
|
@@ -291,7 +291,7 @@ function Hr(e) {
|
|
|
291
291
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
292
292
|
for (let i of e) {
|
|
293
293
|
let e = i.toLowerCase(), a = Br.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),
|
|
294
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), Et.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Br.map((e) => e.value).join(", ")}.`));
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}
|
|
@@ -308,7 +308,7 @@ function Ur(e) {
|
|
|
308
308
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
309
309
|
}
|
|
310
310
|
let s = e?.defaultFont ?? Vr.split(",")[0].trim();
|
|
311
|
-
o(s) ||
|
|
311
|
+
o(s) || Et.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()));
|
|
@@ -318,7 +318,7 @@ function Ur(e) {
|
|
|
318
318
|
}
|
|
319
319
|
let l = k(() => c());
|
|
320
320
|
function u(e) {
|
|
321
|
-
return
|
|
321
|
+
return Ie(e, {
|
|
322
322
|
customFonts: t.value,
|
|
323
323
|
defaultFallback: i.value
|
|
324
324
|
});
|
|
@@ -337,7 +337,7 @@ function Ur(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
|
+
Et.warn(`Failed to load custom font "${e.name}":`, t);
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
await Promise.allSettled(e), f || (n.value = !0);
|
|
@@ -397,11 +397,11 @@ function Gr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
397
397
|
}
|
|
398
398
|
// src/utils/mergeTagNodeSpec.ts
|
|
399
399
|
function Kr(e, t, n) {
|
|
400
|
-
return
|
|
400
|
+
return xt(e, n) ? {
|
|
401
401
|
type: "logicMergeTagNode",
|
|
402
402
|
attrs: {
|
|
403
403
|
value: e,
|
|
404
|
-
keyword:
|
|
404
|
+
keyword: $e(e, n)
|
|
405
405
|
}
|
|
406
406
|
} : {
|
|
407
407
|
type: "mergeTagNode",
|
|
@@ -435,7 +435,7 @@ function Xr(e) {
|
|
|
435
435
|
...this.parent?.(),
|
|
436
436
|
color: {
|
|
437
437
|
default: null,
|
|
438
|
-
parseHTML: (e) => Yr(
|
|
438
|
+
parseHTML: (e) => Yr(jt(e.style.color)),
|
|
439
439
|
renderHTML: (e) => {
|
|
440
440
|
let t = Yr(e.color);
|
|
441
441
|
return t ? { style: `color: ${t}` } : {};
|
|
@@ -445,7 +445,7 @@ function Xr(e) {
|
|
|
445
445
|
} });
|
|
446
446
|
}
|
|
447
447
|
// src/composables/useRichTextLinkDialog.ts
|
|
448
|
-
function Zr(e, t =
|
|
448
|
+
function Zr(e, t = qe.liquid, n = () => !0) {
|
|
449
449
|
let r = M(!1), i = M(""), a = M(""), o = M(null);
|
|
450
450
|
Lr(o, r);
|
|
451
451
|
function s() {
|
|
@@ -475,8 +475,8 @@ function Zr(e, t = Je.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 =
|
|
479
|
-
return n ?
|
|
478
|
+
let n = Xe(t);
|
|
479
|
+
return n ? lt.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
480
480
|
}
|
|
481
481
|
function f() {
|
|
482
482
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -501,7 +501,7 @@ function Zr(e, t = Je.liquid, n = () => !0) {
|
|
|
501
501
|
}
|
|
502
502
|
// src/composables/useRichTextEditor.ts
|
|
503
503
|
function Qr(t) {
|
|
504
|
-
let n =
|
|
504
|
+
let n = z(Mn, null), r = Ot(), i = z(rn, null), a = k(() => r.value && !i?.value), { mergeTags: o, canRequestMergeTag: s, isRequesting: l, requestMergeTag: u, syntax: d, autocomplete: f } = V(), { canInsertLogicTag: p, isRequesting: m, requestLogicTag: h } = Ln(), g = z(gn, null), _ = (w(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = rt(d), y = ie(null), b = n?.content ? Nt(n) : null, x = () => Se(b?.settings.value ?? { locale: "en" });
|
|
505
505
|
c(x, (e) => {
|
|
506
506
|
let t = y.value?.view.dom;
|
|
507
507
|
t && t.setAttribute("dir", e);
|
|
@@ -514,7 +514,7 @@ function Qr(t) {
|
|
|
514
514
|
e && e.view.dispatch(e.state.tr);
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
|
-
let { start: N, stop: te } =
|
|
517
|
+
let { start: N, stop: te } = le(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), ne = ie(null), P = M(!0), F = M(null), I = !1, L = null;
|
|
518
518
|
async function ae() {
|
|
519
519
|
F.value = null, P.value = !0;
|
|
520
520
|
try {
|
|
@@ -545,17 +545,17 @@ function Qr(t) {
|
|
|
545
545
|
y.value = c, P.value = !1, N();
|
|
546
546
|
} catch (e) {
|
|
547
547
|
if (I) return;
|
|
548
|
-
|
|
548
|
+
Et.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function R() {
|
|
552
552
|
y.value?.destroy(), y.value = null, ae();
|
|
553
553
|
}
|
|
554
554
|
ae();
|
|
555
|
-
let
|
|
555
|
+
let oe = c(() => t.blockContent(), (e) => {
|
|
556
556
|
y.value && e !== L && (L = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
557
557
|
});
|
|
558
|
-
function
|
|
558
|
+
function B(e) {
|
|
559
559
|
if (l.value || m.value) return;
|
|
560
560
|
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
561
561
|
if (!r) return;
|
|
@@ -563,10 +563,10 @@ function Qr(t) {
|
|
|
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 || t.onDone();
|
|
565
565
|
}
|
|
566
|
-
e(document, "mousedown",
|
|
567
|
-
I = !0,
|
|
566
|
+
e(document, "mousedown", B), re(() => {
|
|
567
|
+
I = !0, oe(), te(), y.value?.destroy();
|
|
568
568
|
});
|
|
569
|
-
async function
|
|
569
|
+
async function se() {
|
|
570
570
|
if (!a.value) return;
|
|
571
571
|
let e = await u();
|
|
572
572
|
!I && a.value && (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
@@ -574,7 +574,7 @@ function Qr(t) {
|
|
|
574
574
|
value: e.value
|
|
575
575
|
}).run() : y.value?.commands.focus());
|
|
576
576
|
}
|
|
577
|
-
async function
|
|
577
|
+
async function ce() {
|
|
578
578
|
if (!a.value) return;
|
|
579
579
|
let e = await h();
|
|
580
580
|
!I && a.value && (e && y.value ? Jr(y.value, e, d) : y.value?.commands.focus());
|
|
@@ -585,7 +585,7 @@ function Qr(t) {
|
|
|
585
585
|
isLoading: P,
|
|
586
586
|
isEditable: a,
|
|
587
587
|
initError: F,
|
|
588
|
-
retry:
|
|
588
|
+
retry: R,
|
|
589
589
|
showLinkDialog: S,
|
|
590
590
|
linkUrl: C,
|
|
591
591
|
linkColor: T,
|
|
@@ -601,8 +601,8 @@ function Qr(t) {
|
|
|
601
601
|
removeLink: O,
|
|
602
602
|
closeLinkDialog: A,
|
|
603
603
|
handleLinkKeydown: j,
|
|
604
|
-
handleAddMergeTag:
|
|
605
|
-
handleAddLogicTag:
|
|
604
|
+
handleAddMergeTag: se,
|
|
605
|
+
handleAddLogicTag: ce
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
// src/utils/activeEditorTracker.ts
|
|
@@ -635,57 +635,68 @@ function ri(e) {
|
|
|
635
635
|
// src/composables/usePreviewResolution.ts
|
|
636
636
|
var ii = 500;
|
|
637
637
|
function ai(e) {
|
|
638
|
-
let t = typeof e.resolvePreview == "function", n = M(null), r = M(!1), i = M(!1), a =
|
|
639
|
-
function
|
|
640
|
-
|
|
641
|
-
}
|
|
642
|
-
async function
|
|
643
|
-
let
|
|
644
|
-
if (!
|
|
645
|
-
let
|
|
638
|
+
let t = typeof e.resolvePreview == "function", n = M(null), r = M(!1), i = M(!1), a = M(!1), o = 0, s = null;
|
|
639
|
+
function l() {
|
|
640
|
+
s !== null && (clearTimeout(s), s = null);
|
|
641
|
+
}
|
|
642
|
+
async function u(t) {
|
|
643
|
+
let s = e.resolvePreview;
|
|
644
|
+
if (!s) return;
|
|
645
|
+
let c = ++o;
|
|
646
646
|
r.value = !0;
|
|
647
|
-
let
|
|
648
|
-
content:
|
|
647
|
+
let l = {
|
|
648
|
+
content: We(e.getContent()),
|
|
649
|
+
surface: e.surface,
|
|
650
|
+
trigger: t,
|
|
649
651
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
650
652
|
};
|
|
651
653
|
try {
|
|
652
|
-
let e = await
|
|
653
|
-
if (
|
|
654
|
-
if (!
|
|
655
|
-
i.value = !0;
|
|
654
|
+
let e = await s(l);
|
|
655
|
+
if (c !== o) return;
|
|
656
|
+
if (!ve(e)) {
|
|
657
|
+
i.value = !0, n.value = null;
|
|
656
658
|
return;
|
|
657
659
|
}
|
|
658
660
|
n.value = e, i.value = !1;
|
|
659
661
|
} catch {
|
|
660
|
-
if (
|
|
661
|
-
i.value = !0;
|
|
662
|
+
if (c !== o) return;
|
|
663
|
+
i.value = !0, n.value = null;
|
|
662
664
|
} finally {
|
|
663
|
-
|
|
665
|
+
c === o && (a.value = !0, r.value = !1);
|
|
664
666
|
}
|
|
665
667
|
}
|
|
666
|
-
function
|
|
667
|
-
t && (
|
|
668
|
-
|
|
668
|
+
function d(e) {
|
|
669
|
+
t && (l(), !a.value && e !== "recipient" ? u(e) : s = setTimeout(() => {
|
|
670
|
+
s = null, u(e);
|
|
669
671
|
}, ii));
|
|
670
672
|
}
|
|
673
|
+
function f() {
|
|
674
|
+
t && e.isActive() && (l(), u("refresh"));
|
|
675
|
+
}
|
|
671
676
|
return c(() => [
|
|
672
677
|
e.isActive(),
|
|
673
678
|
e.getRecipient?.(),
|
|
674
679
|
e.getLocale?.()
|
|
675
|
-
], ([e, ,
|
|
676
|
-
|
|
680
|
+
], ([e, t, s], c) => {
|
|
681
|
+
if (c && s !== c[2] && (l(), o++, n.value = null, r.value = !1, i.value = !1, a.value = !1), !e) {
|
|
682
|
+
l(), o++, r.value = !1, n.value = null, i.value = !1, a.value = !1;
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
let u = !c || !c[0] ? "open" : s === c[2] ? t === c[1] ? null : "recipient" : "locale";
|
|
686
|
+
u !== null && d(u);
|
|
677
687
|
}, {
|
|
678
688
|
immediate: !0,
|
|
679
689
|
flush: "sync"
|
|
680
690
|
}), T(() => {
|
|
681
|
-
|
|
691
|
+
l(), o++;
|
|
682
692
|
}), {
|
|
683
693
|
isConfigured: t,
|
|
684
694
|
content: k(() => n.value ?? e.getContent()),
|
|
685
695
|
isResolving: r,
|
|
686
|
-
isInitialResolve: k(() => r.value &&
|
|
696
|
+
isInitialResolve: k(() => r.value && !a.value),
|
|
687
697
|
hasFailed: i,
|
|
688
|
-
supersedesSamples: k(() => t)
|
|
698
|
+
supersedesSamples: k(() => t),
|
|
699
|
+
refresh: f
|
|
689
700
|
};
|
|
690
701
|
}
|
|
691
702
|
// src/composables/useMergeTagPicker.ts
|
|
@@ -762,10 +773,10 @@ function ui(e) {
|
|
|
762
773
|
try {
|
|
763
774
|
let t = await import("@templatical/quality");
|
|
764
775
|
if (d) return;
|
|
765
|
-
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u =
|
|
776
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u = fe(n, p, { debounce: e.debounce ?? 500 });
|
|
766
777
|
} catch {
|
|
767
778
|
if (d) return;
|
|
768
|
-
o.value = !0, li || (li = !0,
|
|
779
|
+
o.value = !0, li || (li = !0, Et.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
780
|
}
|
|
770
781
|
}
|
|
771
782
|
function p() {
|
|
@@ -923,66 +934,66 @@ function mi(e) {
|
|
|
923
934
|
return hi(e, t), t;
|
|
924
935
|
}
|
|
925
936
|
function hi(e, t) {
|
|
926
|
-
for (let n of e) if (
|
|
937
|
+
for (let n of e) if (Ct(n)) t.add(n.customType);
|
|
927
938
|
else if (n.type === "section") {
|
|
928
939
|
let e = n.children;
|
|
929
940
|
if (!e) continue;
|
|
930
941
|
for (let n of e) hi(n, t);
|
|
931
|
-
} else
|
|
942
|
+
} else he(n) && hi(n.children, t);
|
|
932
943
|
}
|
|
933
944
|
// src/utils/registerBuiltInBlocks.ts
|
|
934
945
|
var gi = [
|
|
935
946
|
{
|
|
936
947
|
type: "section",
|
|
937
|
-
createBlock:
|
|
948
|
+
createBlock: ze
|
|
938
949
|
},
|
|
939
950
|
{
|
|
940
951
|
type: "title",
|
|
941
|
-
createBlock:
|
|
952
|
+
createBlock: Ve
|
|
942
953
|
},
|
|
943
954
|
{
|
|
944
955
|
type: "paragraph",
|
|
945
|
-
createBlock:
|
|
956
|
+
createBlock: Fe
|
|
946
957
|
},
|
|
947
958
|
{
|
|
948
959
|
type: "image",
|
|
949
|
-
createBlock:
|
|
960
|
+
createBlock: Le
|
|
950
961
|
},
|
|
951
962
|
{
|
|
952
963
|
type: "button",
|
|
953
|
-
createBlock:
|
|
964
|
+
createBlock: Ae
|
|
954
965
|
},
|
|
955
966
|
{
|
|
956
967
|
type: "divider",
|
|
957
|
-
createBlock:
|
|
968
|
+
createBlock: wt
|
|
958
969
|
},
|
|
959
970
|
{
|
|
960
971
|
type: "video",
|
|
961
|
-
createBlock:
|
|
972
|
+
createBlock: Ge
|
|
962
973
|
},
|
|
963
974
|
{
|
|
964
975
|
type: "social",
|
|
965
|
-
createBlock:
|
|
976
|
+
createBlock: ht
|
|
966
977
|
},
|
|
967
978
|
{
|
|
968
979
|
type: "menu",
|
|
969
|
-
createBlock:
|
|
980
|
+
createBlock: xe
|
|
970
981
|
},
|
|
971
982
|
{
|
|
972
983
|
type: "table",
|
|
973
|
-
createBlock:
|
|
984
|
+
createBlock: Ue
|
|
974
985
|
},
|
|
975
986
|
{
|
|
976
987
|
type: "spacer",
|
|
977
|
-
createBlock:
|
|
988
|
+
createBlock: we
|
|
978
989
|
},
|
|
979
990
|
{
|
|
980
991
|
type: "html",
|
|
981
|
-
createBlock:
|
|
992
|
+
createBlock: ge
|
|
982
993
|
},
|
|
983
994
|
{
|
|
984
995
|
type: "countdown",
|
|
985
|
-
createBlock:
|
|
996
|
+
createBlock: ye
|
|
986
997
|
}
|
|
987
998
|
];
|
|
988
999
|
function _i(e, t) {
|
|
@@ -1003,10 +1014,10 @@ function yi(e) {
|
|
|
1003
1014
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1004
1015
|
}
|
|
1005
1016
|
function bi(e, t, n) {
|
|
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(
|
|
1017
|
+
let r = new Set(e.map((e) => Dt(e))), i = [], a = (e, t) => {
|
|
1018
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Dt(o)) && i.push(`${t}.${n}: ${o}`) : yi(o) && a(o, `${t}.${n}`);
|
|
1008
1019
|
}, o = t;
|
|
1009
|
-
for (let [e, t] of Object.entries(
|
|
1020
|
+
for (let [e, t] of Object.entries(vt)) {
|
|
1010
1021
|
let n = o?.[e];
|
|
1011
1022
|
a({
|
|
1012
1023
|
...t,
|
|
@@ -1014,7 +1025,7 @@ function bi(e, t, n) {
|
|
|
1014
1025
|
}, e);
|
|
1015
1026
|
}
|
|
1016
1027
|
return a({
|
|
1017
|
-
|
|
1028
|
+
...Qe,
|
|
1018
1029
|
...n ?? {}
|
|
1019
1030
|
}, "template"), i;
|
|
1020
1031
|
}
|
|
@@ -1028,15 +1039,15 @@ function xi(e) {
|
|
|
1028
1039
|
}
|
|
1029
1040
|
// src/i18n/index.ts
|
|
1030
1041
|
var Si = /* #__PURE__ */ Object.assign({
|
|
1031
|
-
"./locales/ca.ts": () => import("./ca-
|
|
1032
|
-
"./locales/da.ts": () => import("./da-
|
|
1033
|
-
"./locales/de.ts": () => import("./de-
|
|
1034
|
-
"./locales/en.ts": () => import("./en-
|
|
1035
|
-
"./locales/es.ts": () => import("./es-
|
|
1036
|
-
"./locales/fr.ts": () => import("./fr-
|
|
1037
|
-
"./locales/ja.ts": () => import("./ja-
|
|
1038
|
-
"./locales/nl.ts": () => import("./nl-
|
|
1039
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
1042
|
+
"./locales/ca.ts": () => import("./ca-YfIxwO1G.js"),
|
|
1043
|
+
"./locales/da.ts": () => import("./da-CM6DCvRG.js"),
|
|
1044
|
+
"./locales/de.ts": () => import("./de-Dugz1zXC.js"),
|
|
1045
|
+
"./locales/en.ts": () => import("./en-BykoFuFY.js"),
|
|
1046
|
+
"./locales/es.ts": () => import("./es-DaWsTkpj.js"),
|
|
1047
|
+
"./locales/fr.ts": () => import("./fr-DqwQHtJo.js"),
|
|
1048
|
+
"./locales/ja.ts": () => import("./ja-BH4MS1Ye.js"),
|
|
1049
|
+
"./locales/nl.ts": () => import("./nl-BQl1_UHv.js"),
|
|
1050
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-eyzmU9Vs.js")
|
|
1040
1051
|
}), Ci = /* #__PURE__ */ Object.assign({
|
|
1041
1052
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
1042
1053
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
@@ -1193,8 +1204,8 @@ function Hi(e, t) {
|
|
|
1193
1204
|
id: s("allow-custom-ignored"),
|
|
1194
1205
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1195
1206
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1196
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1197
|
-
e !== "" && !t.has(
|
|
1207
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Dt(e)));
|
|
1208
|
+
e !== "" && !t.has(Dt(e)) && n.push({
|
|
1198
1209
|
id: s("off-palette-default"),
|
|
1199
1210
|
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.`
|
|
1200
1211
|
});
|
|
@@ -1253,9 +1264,9 @@ function Ki(e, t, n) {
|
|
|
1253
1264
|
var qi = "--tpl-block-bg-layer", Ji = "--tpl-email-frame-width", Yi = "tpl-has-bg-image";
|
|
1254
1265
|
function Xi(e, t) {
|
|
1255
1266
|
if (t === null) return {};
|
|
1256
|
-
let n =
|
|
1267
|
+
let n = Re(e);
|
|
1257
1268
|
if (n === null) return {};
|
|
1258
|
-
let r = t?.trim(), i = r ?
|
|
1269
|
+
let r = t?.trim(), i = r ? at(r) : n.url;
|
|
1259
1270
|
return {
|
|
1260
1271
|
backgroundImage: `url("${i}")`,
|
|
1261
1272
|
backgroundSize: n.size,
|
|
@@ -1291,10 +1302,10 @@ function ta(e, t = {}) {
|
|
|
1291
1302
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1292
1303
|
backgroundColor: r || "transparent"
|
|
1293
1304
|
};
|
|
1294
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1295
|
-
let n =
|
|
1305
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? pt.paragraphGap : pt.paragraphGap}px`), e.type === "section") {
|
|
1306
|
+
let n = dt(e.borderRadius);
|
|
1296
1307
|
n !== null && (i.borderRadius = n);
|
|
1297
|
-
let r =
|
|
1308
|
+
let r = Be(e);
|
|
1298
1309
|
r?.applied && e.backgroundImage ? (Object.assign(i, $i(r, t.heroBoxWidth)), Object.assign(i, Xi({
|
|
1299
1310
|
...e.backgroundImage,
|
|
1300
1311
|
size: "cover",
|
|
@@ -1311,7 +1322,7 @@ function na(e, t, n, r) {
|
|
|
1311
1322
|
}
|
|
1312
1323
|
function ra(e) {
|
|
1313
1324
|
let t = {};
|
|
1314
|
-
for (let [n, r] of Object.entries(
|
|
1325
|
+
for (let [n, r] of Object.entries(Ye(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1315
1326
|
return t;
|
|
1316
1327
|
}
|
|
1317
1328
|
var ia = {
|
|
@@ -1336,7 +1347,7 @@ function sa(e, t = {}) {
|
|
|
1336
1347
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1337
1348
|
let n = e.wrapper, r = {};
|
|
1338
1349
|
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = aa(n.padding)), !n.fullWidth) {
|
|
1339
|
-
let e =
|
|
1350
|
+
let e = dt(n.borderRadius);
|
|
1340
1351
|
e !== null && (r.borderRadius = e);
|
|
1341
1352
|
}
|
|
1342
1353
|
return Object.assign(r, Xi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, ia), r;
|
|
@@ -1350,24 +1361,24 @@ function ca(e, t = {}) {
|
|
|
1350
1361
|
function la(e, t, n, r = !1) {
|
|
1351
1362
|
if (!e) return [];
|
|
1352
1363
|
let i = [], a = 0;
|
|
1353
|
-
for (let o of
|
|
1364
|
+
for (let o of He(e, n)) {
|
|
1354
1365
|
o.index > a && i.push({
|
|
1355
1366
|
type: "text",
|
|
1356
1367
|
value: e.slice(a, o.index)
|
|
1357
1368
|
});
|
|
1358
1369
|
let s = o.value;
|
|
1359
|
-
if (
|
|
1360
|
-
let e = r ?
|
|
1370
|
+
if (Pe(s, n)) {
|
|
1371
|
+
let e = r ? mt(s, t) : void 0;
|
|
1361
1372
|
i.push(e === void 0 ? {
|
|
1362
1373
|
type: "tag",
|
|
1363
|
-
value:
|
|
1374
|
+
value: tt(s, t)
|
|
1364
1375
|
} : {
|
|
1365
1376
|
type: "text",
|
|
1366
1377
|
value: e
|
|
1367
1378
|
});
|
|
1368
|
-
} else
|
|
1379
|
+
} else xt(s, n) ? i.push({
|
|
1369
1380
|
type: "tag",
|
|
1370
|
-
value:
|
|
1381
|
+
value: $e(s, n)
|
|
1371
1382
|
}) : i.push({
|
|
1372
1383
|
type: "text",
|
|
1373
1384
|
value: s
|
|
@@ -1380,27 +1391,27 @@ function la(e, t, n, r = !1) {
|
|
|
1380
1391
|
}), i;
|
|
1381
1392
|
}
|
|
1382
1393
|
// src/components/MergeTagPreviewText.vue
|
|
1383
|
-
var ua =
|
|
1394
|
+
var ua = B({
|
|
1384
1395
|
name: "MergeTagPreviewText",
|
|
1385
1396
|
props: { text: {
|
|
1386
1397
|
type: String,
|
|
1387
1398
|
required: !0
|
|
1388
1399
|
} },
|
|
1389
1400
|
setup(e) {
|
|
1390
|
-
let t =
|
|
1401
|
+
let t = z(Yt, en), n = z(It, qe.liquid), r = z(dn, null), i = k(() => la(e.text, t.value, n, r?.value ?? !1));
|
|
1391
1402
|
return () => i.value.map((e, t) => e.type === "tag" ? x("span", {
|
|
1392
1403
|
key: t,
|
|
1393
1404
|
class: "tpl-merge-tag-label"
|
|
1394
1405
|
}, e.value) : e.value);
|
|
1395
1406
|
}
|
|
1396
|
-
}), da = ["href"], fa = /* @__PURE__ */
|
|
1407
|
+
}), da = ["href"], fa = /* @__PURE__ */ B({
|
|
1397
1408
|
__name: "ButtonBlock",
|
|
1398
1409
|
props: {
|
|
1399
1410
|
block: {},
|
|
1400
1411
|
viewport: {}
|
|
1401
1412
|
},
|
|
1402
1413
|
setup(e) {
|
|
1403
|
-
let t = e, n =
|
|
1414
|
+
let t = e, n = bn(ln, "ButtonBlock");
|
|
1404
1415
|
function r(e) {
|
|
1405
1416
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1406
1417
|
}
|
|
@@ -1411,10 +1422,10 @@ var ua = z({
|
|
|
1411
1422
|
backgroundColor: t.block.backgroundColor,
|
|
1412
1423
|
color: t.block.textColor,
|
|
1413
1424
|
fontSize: `${t.block.fontSize}px`,
|
|
1414
|
-
lineHeight: String(
|
|
1425
|
+
lineHeight: String(Je),
|
|
1415
1426
|
fontWeight: r(t.block.fontWeight),
|
|
1416
1427
|
textDecoration: "none",
|
|
1417
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1428
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : dt(t.block.borderRadius) ?? "0px",
|
|
1418
1429
|
textAlign: "center"
|
|
1419
1430
|
};
|
|
1420
1431
|
return Object.assign(e, ra(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;
|
|
@@ -1430,7 +1441,7 @@ var ua = z({
|
|
|
1430
1441
|
"src",
|
|
1431
1442
|
"width",
|
|
1432
1443
|
"height"
|
|
1433
|
-
], ha = /* @__PURE__ */
|
|
1444
|
+
], ha = /* @__PURE__ */ B({
|
|
1434
1445
|
__name: "CustomBlockIcon",
|
|
1435
1446
|
props: {
|
|
1436
1447
|
icon: {},
|
|
@@ -1453,7 +1464,7 @@ var ua = z({
|
|
|
1453
1464
|
height: n.value,
|
|
1454
1465
|
class: "tpl:inline-block",
|
|
1455
1466
|
alt: ""
|
|
1456
|
-
}, null, 8, ma)) : (m(),
|
|
1467
|
+
}, null, 8, ma)) : (m(), R(A(Ar), {
|
|
1457
1468
|
key: 2,
|
|
1458
1469
|
size: n.value,
|
|
1459
1470
|
"stroke-width": 1.5
|
|
@@ -1472,7 +1483,7 @@ var ua = z({
|
|
|
1472
1483
|
key: 0,
|
|
1473
1484
|
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]",
|
|
1474
1485
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1475
|
-
}, wa = /* @__PURE__ */
|
|
1486
|
+
}, wa = /* @__PURE__ */ B({
|
|
1476
1487
|
__name: "CustomBlock",
|
|
1477
1488
|
props: {
|
|
1478
1489
|
block: {},
|
|
@@ -1480,7 +1491,7 @@ var ua = z({
|
|
|
1480
1491
|
},
|
|
1481
1492
|
emits: ["fetchData"],
|
|
1482
1493
|
setup(e, { emit: t }) {
|
|
1483
|
-
let n = e, r = t, { t: a } =
|
|
1494
|
+
let n = e, r = t, { t: a } = ce(), o = z(yn, null), l = M(""), u = k(() => fr(l.value)), f = M(!1), p = k(() => o?.getDefinition(n.block.customType)), h = k(() => !!p.value), g = k(() => n.block), { isFetching: _, fetch: v, needsFetch: y, hasDataSource: b } = Rn({
|
|
1484
1495
|
definition: p,
|
|
1485
1496
|
block: g,
|
|
1486
1497
|
onUpdate: (e, t) => {
|
|
@@ -1489,10 +1500,10 @@ var ua = z({
|
|
|
1489
1500
|
dataSourceFetched: t
|
|
1490
1501
|
});
|
|
1491
1502
|
}
|
|
1492
|
-
}), x =
|
|
1503
|
+
}), x = z(Yt, en), S = z(dn, null), C = k(() => {
|
|
1493
1504
|
if (!S?.value) return n.block;
|
|
1494
1505
|
let e = {};
|
|
1495
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1506
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? _t(r, x.value) : r;
|
|
1496
1507
|
return {
|
|
1497
1508
|
...n.block,
|
|
1498
1509
|
fieldValues: e
|
|
@@ -1509,7 +1520,7 @@ var ua = z({
|
|
|
1509
1520
|
}
|
|
1510
1521
|
}
|
|
1511
1522
|
}
|
|
1512
|
-
let T =
|
|
1523
|
+
let T = ue(w, 150);
|
|
1513
1524
|
return s(() => {
|
|
1514
1525
|
w();
|
|
1515
1526
|
}), c(() => n.block.fieldValues, () => {
|
|
@@ -1519,7 +1530,7 @@ var ua = z({
|
|
|
1519
1530
|
}), (e, t) => (m(), N("div", ga, [h.value ? f.value ? (m(), N("div", ya, [E(A(hr), {
|
|
1520
1531
|
size: 24,
|
|
1521
1532
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1522
|
-
}), P("span", ba, d(A(a).customBlocks.renderError), 1)])) : (m(), N("div", xa, [P("div", { innerHTML: u.value }, null, 8, Sa), A(b) && A(y) ? (m(), N("div", Ca, [A(_) ? (m(),
|
|
1533
|
+
}), P("span", ba, d(A(a).customBlocks.renderError), 1)])) : (m(), N("div", xa, [P("div", { innerHTML: u.value }, null, 8, Sa), A(b) && A(y) ? (m(), N("div", Ca, [A(_) ? (m(), R(mr, {
|
|
1523
1534
|
key: 1,
|
|
1524
1535
|
class: "tpl:w-48"
|
|
1525
1536
|
})) : (m(), N("button", {
|
|
@@ -1527,7 +1538,7 @@ var ua = z({
|
|
|
1527
1538
|
type: "button",
|
|
1528
1539
|
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)]",
|
|
1529
1540
|
onClick: t[0] ||= i((...e) => A(v) && A(v)(...e), ["stop"])
|
|
1530
|
-
}, [p.value?.icon ? (m(),
|
|
1541
|
+
}, [p.value?.icon ? (m(), R(ha, {
|
|
1531
1542
|
key: 0,
|
|
1532
1543
|
icon: p.value.icon,
|
|
1533
1544
|
size: 16
|
|
@@ -1536,7 +1547,7 @@ var ua = z({
|
|
|
1536
1547
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1537
1548
|
}), P("span", va, d(A(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1538
1549
|
}
|
|
1539
|
-
}), Ta = { class: "tpl:w-full" }, Ea = /* @__PURE__ */
|
|
1550
|
+
}), Ta = { class: "tpl:w-full" }, Ea = /* @__PURE__ */ B({
|
|
1540
1551
|
__name: "DividerBlock",
|
|
1541
1552
|
props: {
|
|
1542
1553
|
block: {},
|
|
@@ -1562,14 +1573,14 @@ var ua = z({
|
|
|
1562
1573
|
}, ja = {
|
|
1563
1574
|
key: 1,
|
|
1564
1575
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1565
|
-
}, Ma = /* @__PURE__ */
|
|
1576
|
+
}, Ma = /* @__PURE__ */ B({
|
|
1566
1577
|
__name: "HtmlBlock",
|
|
1567
1578
|
props: {
|
|
1568
1579
|
block: {},
|
|
1569
1580
|
viewport: {}
|
|
1570
1581
|
},
|
|
1571
1582
|
setup(e) {
|
|
1572
|
-
let t = e, { t: n } =
|
|
1583
|
+
let t = e, { t: n } = ce(), r = z(Zt, !1), i = k(() => t.block.content.trim().length > 0), a = k(() => r && i.value), o = z(Yt, en), s = z(dn, null), l = k(() => s?.value ? _t(t.block.content, o.value) : t.block.content), u = M(null), f = M(60), p = null;
|
|
1573
1584
|
function h() {
|
|
1574
1585
|
let e = u.value?.contentDocument;
|
|
1575
1586
|
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1604,7 +1615,7 @@ var ua = z({
|
|
|
1604
1615
|
}, Ra = ["href"], za = ["src", "alt"], Ba = ["src", "alt"], Va = {
|
|
1605
1616
|
key: 4,
|
|
1606
1617
|
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)]"
|
|
1607
|
-
}, Ha = ["aria-label"], Ua = { key: 1 }, Wa = /* @__PURE__ */
|
|
1618
|
+
}, Ha = ["aria-label"], Ua = { key: 1 }, Wa = /* @__PURE__ */ B({
|
|
1608
1619
|
__name: "ImageBlock",
|
|
1609
1620
|
props: {
|
|
1610
1621
|
block: {},
|
|
@@ -1612,7 +1623,7 @@ var ua = z({
|
|
|
1612
1623
|
},
|
|
1613
1624
|
emits: ["update"],
|
|
1614
1625
|
setup(e, { emit: t }) {
|
|
1615
|
-
let n = e, r = t, { t: a } =
|
|
1626
|
+
let n = e, r = t, { t: a } = ce(), { syntax: o } = V(), s = k(() => ot(n.block.src, o));
|
|
1616
1627
|
function c(e) {
|
|
1617
1628
|
let t = {
|
|
1618
1629
|
src: e.url,
|
|
@@ -1625,7 +1636,7 @@ var ua = z({
|
|
|
1625
1636
|
blocked: s,
|
|
1626
1637
|
apply: c
|
|
1627
1638
|
}), _ = k(() => ({ textAlign: n.block.align })), v = k(() => {
|
|
1628
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1639
|
+
let e = n.block.border, t = ["left", "right"].map((t) => it(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1629
1640
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1630
1641
|
}), b = k(() => {
|
|
1631
1642
|
let e = n.block.align;
|
|
@@ -1633,7 +1644,7 @@ var ua = z({
|
|
|
1633
1644
|
maxWidth: "100%",
|
|
1634
1645
|
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1635
1646
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1636
|
-
borderRadius:
|
|
1647
|
+
borderRadius: dt(n.block.borderRadius) ?? void 0,
|
|
1637
1648
|
...ra(n.block.border),
|
|
1638
1649
|
display: "block",
|
|
1639
1650
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
@@ -1647,7 +1658,7 @@ var ua = z({
|
|
|
1647
1658
|
"data-drop-enabled": A(f),
|
|
1648
1659
|
class: "tpl:relative tpl:w-full",
|
|
1649
1660
|
style: y(_.value)
|
|
1650
|
-
}, [A(h) ? (m(),
|
|
1661
|
+
}, [A(h) ? (m(), R(Xn, {
|
|
1651
1662
|
key: 0,
|
|
1652
1663
|
uploading: A(p),
|
|
1653
1664
|
size: "canvas"
|
|
@@ -1709,14 +1720,14 @@ var ua = z({
|
|
|
1709
1720
|
}), Ga = { class: "tpl:w-full" }, Ka = ["href"], qa = {
|
|
1710
1721
|
key: 1,
|
|
1711
1722
|
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)]"
|
|
1712
|
-
}, Ja = /* @__PURE__ */
|
|
1723
|
+
}, Ja = /* @__PURE__ */ B({
|
|
1713
1724
|
__name: "MenuBlock",
|
|
1714
1725
|
props: {
|
|
1715
1726
|
block: {},
|
|
1716
1727
|
viewport: {}
|
|
1717
1728
|
},
|
|
1718
1729
|
setup(e) {
|
|
1719
|
-
let t = e, { t: n } =
|
|
1730
|
+
let t = e, { t: n } = ce(), r = bn(ln, "MenuBlock"), a = k(() => ({
|
|
1720
1731
|
display: "flex",
|
|
1721
1732
|
flexWrap: "wrap",
|
|
1722
1733
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1751,11 +1762,11 @@ var ua = z({
|
|
|
1751
1762
|
});
|
|
1752
1763
|
// src/composables/useEditableTextBlock.ts
|
|
1753
1764
|
function Ya(e) {
|
|
1754
|
-
let t =
|
|
1765
|
+
let t = z(Yt, en), r = z(dn, null), i = z(rn, null), { syntax: a } = V(), o = k(() => r?.value ? ut(e(), t.value) : Ee(e(), t.value)), s = k(() => ft(fr(be(o.value, a)))), l = M(!1);
|
|
1755
1766
|
c(() => i?.value, (e) => {
|
|
1756
1767
|
e && (l.value = !1);
|
|
1757
1768
|
});
|
|
1758
|
-
let u = M(null), { top: d, left: f } = n(u), { toLocal: p } =
|
|
1769
|
+
let u = M(null), { top: d, left: f } = n(u), { toLocal: p } = Mt(), m = k(() => p({
|
|
1759
1770
|
top: d.value - 8,
|
|
1760
1771
|
left: f.value
|
|
1761
1772
|
}));
|
|
@@ -1775,20 +1786,20 @@ function Ya(e) {
|
|
|
1775
1786
|
};
|
|
1776
1787
|
}
|
|
1777
1788
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1778
|
-
var Xa = ["innerHTML"], Za = /* @__PURE__ */
|
|
1789
|
+
var Xa = ["innerHTML"], Za = /* @__PURE__ */ B({
|
|
1779
1790
|
__name: "ParagraphBlock",
|
|
1780
1791
|
props: {
|
|
1781
1792
|
block: {},
|
|
1782
1793
|
viewport: {}
|
|
1783
1794
|
},
|
|
1784
1795
|
setup(e) {
|
|
1785
|
-
let t = e, n =
|
|
1796
|
+
let t = e, n = oe(() => import("./ParagraphEditor-DpOsnnai.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ya(() => t.block.content);
|
|
1786
1797
|
return (t, l) => (m(), N("div", {
|
|
1787
1798
|
ref_key: "blockRef",
|
|
1788
1799
|
ref: i,
|
|
1789
1800
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1790
1801
|
onDblclick: l[0] ||= (...e) => A(s) && A(s)(...e)
|
|
1791
|
-
}, [A(r) ? (m(),
|
|
1802
|
+
}, [A(r) ? (m(), R(A(n), {
|
|
1792
1803
|
key: 0,
|
|
1793
1804
|
block: e.block,
|
|
1794
1805
|
"toolbar-position": A(a),
|
|
@@ -1821,16 +1832,16 @@ function Qa(e, t, n, r = 0, i) {
|
|
|
1821
1832
|
function $a(e, t, n) {
|
|
1822
1833
|
let r = [], i = "\0MT";
|
|
1823
1834
|
for (; e.includes(i);) i += "_";
|
|
1824
|
-
let a = n === "html" ?
|
|
1835
|
+
let a = n === "html" ? _e(e, (e) => {
|
|
1825
1836
|
let t = r.push(e) - 1;
|
|
1826
1837
|
return `${i}${t}\u0000`;
|
|
1827
1838
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1828
1839
|
start: e.index,
|
|
1829
1840
|
end: e.index + e[0].length
|
|
1830
|
-
})), s = [], c =
|
|
1841
|
+
})), s = [], c = Ke(a, t, "logic"), l = [], u = 0;
|
|
1831
1842
|
for (let e of ["logic", "value"]) {
|
|
1832
1843
|
let r = 0;
|
|
1833
|
-
for (let i of e === "logic" ? c :
|
|
1844
|
+
for (let i of e === "logic" ? c : Ke(a, t, "value")) {
|
|
1834
1845
|
let t = i.index, a = t + i.value.length;
|
|
1835
1846
|
for (; o[r]?.end <= t;) r++;
|
|
1836
1847
|
let c = o[r];
|
|
@@ -1846,7 +1857,7 @@ function $a(e, t, n) {
|
|
|
1846
1857
|
}), s.push({
|
|
1847
1858
|
start: t,
|
|
1848
1859
|
end: a,
|
|
1849
|
-
value: n === "html" ?
|
|
1860
|
+
value: n === "html" ? pe(i.value) : i.value
|
|
1850
1861
|
});
|
|
1851
1862
|
}
|
|
1852
1863
|
}
|
|
@@ -1890,7 +1901,7 @@ var to = [
|
|
|
1890
1901
|
}, go = ["onClick"], _o = {
|
|
1891
1902
|
key: 7,
|
|
1892
1903
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1893
|
-
}, vo = ["data-testid", "disabled"], yo = /*#__PURE__*/ wr(/* @__PURE__ */
|
|
1904
|
+
}, vo = ["data-testid", "disabled"], yo = /*#__PURE__*/ wr(/* @__PURE__ */ B({
|
|
1894
1905
|
__name: "LocaleStatusChip",
|
|
1895
1906
|
props: {
|
|
1896
1907
|
blockId: {},
|
|
@@ -1910,14 +1921,14 @@ var to = [
|
|
|
1910
1921
|
},
|
|
1911
1922
|
emits: ["target"],
|
|
1912
1923
|
setup(e, { emit: t }) {
|
|
1913
|
-
let n = e, r = t, a =
|
|
1924
|
+
let n = e, r = t, a = z(Mn, null), s = z(cn, null), l = z(Rt, null), u = z(Cn, "en") ?? "en", { t: f, format: g } = ce(), b = se(), x = At(), { toLocal: S } = Mt(), C = M(null), w = M(null), T = M(!1), E = M(!1), D = M(null), O = M(null), te = null, re = M({
|
|
1914
1925
|
top: 0,
|
|
1915
1926
|
left: 0
|
|
1916
1927
|
}), ie = M({
|
|
1917
1928
|
maxHeight: 0,
|
|
1918
1929
|
maxWidth: 0
|
|
1919
|
-
}), F = `tpl-locale-popover-${
|
|
1920
|
-
function
|
|
1930
|
+
}), F = `tpl-locale-popover-${ct()}`, I = k(() => yr(a?.activeLocale?.value ?? "")), ae = k(() => yr(a?.content.value.settings.locale ?? "en"));
|
|
1931
|
+
function oe(e, t) {
|
|
1921
1932
|
switch (e) {
|
|
1922
1933
|
case "tags-differ": return f.localization.tagsDiffer;
|
|
1923
1934
|
case "hidden": return g(f.localization.hidden, { language: I.value });
|
|
@@ -1927,15 +1938,15 @@ var to = [
|
|
|
1927
1938
|
default: return t === 1 ? f.localization.outOfDate : br(f.localization.staleCount, t, u);
|
|
1928
1939
|
}
|
|
1929
1940
|
}
|
|
1930
|
-
let
|
|
1931
|
-
function
|
|
1941
|
+
let B = k(() => oe(n.state, n.count)), V = k(() => n.popoverState ?? n.state), le = k(() => n.popoverCount ?? n.count), ue = k(() => oe(V.value, le.value)), de = k(() => n.state === "hidden" ? jr : n.state === "changed" ? vr : n.state === "default-stale" ? ur : n.state === "stale" ? _r : hr), fe = k(() => V.value === "default-stale" || (V.value === "missing" || V.value === "stale") && le.value > 1), pe = k(() => n.editable && n.eligibleGaps && s?.isAvailable.value);
|
|
1942
|
+
function me(e = !1) {
|
|
1932
1943
|
T.value = !1, E.value = !1, te = null, e && C.value?.focus({ preventScroll: !0 });
|
|
1933
1944
|
}
|
|
1934
|
-
async function
|
|
1935
|
-
if (T.value) return
|
|
1936
|
-
x.value && (T.value = !0, await
|
|
1945
|
+
async function he() {
|
|
1946
|
+
if (T.value) return me();
|
|
1947
|
+
x.value && (T.value = !0, await ge());
|
|
1937
1948
|
}
|
|
1938
|
-
async function
|
|
1949
|
+
async function ge() {
|
|
1939
1950
|
let e = x.value;
|
|
1940
1951
|
if (!e || !T.value) return;
|
|
1941
1952
|
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
|
|
@@ -1955,65 +1966,65 @@ var to = [
|
|
|
1955
1966
|
}), await _(), T.value && (E.value ? O.value : w.value)?.focus({ preventScroll: !0 });
|
|
1956
1967
|
}
|
|
1957
1968
|
c(E, async () => {
|
|
1958
|
-
T.value && (await
|
|
1969
|
+
T.value && (await ge(), T.value && !E.value && D.value?.focus({ preventScroll: !0 }));
|
|
1959
1970
|
});
|
|
1960
|
-
function
|
|
1971
|
+
function _e(e) {
|
|
1961
1972
|
let t = e.composedPath();
|
|
1962
|
-
!t.includes(C.value) && !t.includes(w.value) &&
|
|
1973
|
+
!t.includes(C.value) && !t.includes(w.value) && me();
|
|
1963
1974
|
}
|
|
1964
|
-
function
|
|
1975
|
+
function ve(e) {
|
|
1965
1976
|
if (e.composedPath().includes(w.value)) return;
|
|
1966
1977
|
let t = C.value?.getBoundingClientRect();
|
|
1967
|
-
t && te && t.top === te.top && t.right === te.right ||
|
|
1978
|
+
t && te && t.top === te.top && t.right === te.right || me();
|
|
1968
1979
|
}
|
|
1969
|
-
function
|
|
1970
|
-
b.removeEventListener("click",
|
|
1980
|
+
function ye() {
|
|
1981
|
+
b.removeEventListener("click", _e, !0), b.removeEventListener("scroll", ve, !0);
|
|
1971
1982
|
}
|
|
1972
1983
|
c(T, (e) => {
|
|
1973
|
-
|
|
1974
|
-
}, { flush: "sync" }), c(
|
|
1975
|
-
E.value = !1, T.value &&
|
|
1984
|
+
ye(), e ? (b.addEventListener("click", _e, !0), b.addEventListener("scroll", ve, !0)) : r("target", null);
|
|
1985
|
+
}, { flush: "sync" }), c(V, () => {
|
|
1986
|
+
E.value = !1, T.value && ge();
|
|
1976
1987
|
}), c([
|
|
1977
1988
|
() => n.blockId,
|
|
1978
1989
|
() => n.state,
|
|
1979
1990
|
() => a?.activeLocale?.value,
|
|
1980
1991
|
() => a?.state.template?.id,
|
|
1981
1992
|
() => a?.loadVersion?.value
|
|
1982
|
-
], () =>
|
|
1983
|
-
let
|
|
1984
|
-
(T.value || x.value) && (r("target", e ?? null), T.value ||
|
|
1993
|
+
], () => me()), ne(ye);
|
|
1994
|
+
let be = (e) => {
|
|
1995
|
+
(T.value || x.value) && (r("target", e ?? null), T.value || he());
|
|
1985
1996
|
};
|
|
1986
1997
|
c(() => n.blockId, (e, t) => {
|
|
1987
|
-
t && l?.get(t) ===
|
|
1998
|
+
t && l?.get(t) === be && l.delete(t), l?.set(e, be);
|
|
1988
1999
|
}, { immediate: !0 }), ne(() => {
|
|
1989
|
-
l?.get(n.blockId) ===
|
|
2000
|
+
l?.get(n.blockId) === be && l.delete(n.blockId);
|
|
1990
2001
|
});
|
|
1991
|
-
function
|
|
1992
|
-
a?.keepTranslations?.(n.blockId, n.stale),
|
|
2002
|
+
function xe() {
|
|
2003
|
+
a?.keepTranslations?.(n.blockId, n.stale), me(!0);
|
|
1993
2004
|
}
|
|
1994
|
-
function
|
|
1995
|
-
a?.resetLocaleFields?.(n.blockId, e),
|
|
2005
|
+
function Se(e) {
|
|
2006
|
+
a?.resetLocaleFields?.(n.blockId, e), me(!0);
|
|
1996
2007
|
}
|
|
1997
|
-
function
|
|
1998
|
-
a?.setBlockHidden?.(n.blockId, !1),
|
|
2008
|
+
function Ce() {
|
|
2009
|
+
a?.setBlockHidden?.(n.blockId, !1), me(!0);
|
|
1999
2010
|
}
|
|
2000
|
-
function
|
|
2001
|
-
a?.setActiveLocale?.(e),
|
|
2011
|
+
function we(e) {
|
|
2012
|
+
a?.setActiveLocale?.(e), me();
|
|
2002
2013
|
}
|
|
2003
|
-
function
|
|
2004
|
-
|
|
2005
|
-
only:
|
|
2014
|
+
function Te() {
|
|
2015
|
+
pe.value && !s?.running.value && (V.value === "tags-differ" && n.replacesCurrent ? E.value = !0 : s?.translate({
|
|
2016
|
+
only: V.value === "tags-differ" ? "all" : "gaps",
|
|
2006
2017
|
blockId: n.blockId
|
|
2007
2018
|
}));
|
|
2008
2019
|
}
|
|
2009
|
-
function
|
|
2020
|
+
function Ee() {
|
|
2010
2021
|
E.value = !1;
|
|
2011
2022
|
}
|
|
2012
|
-
function
|
|
2013
|
-
E.value ?
|
|
2023
|
+
function De() {
|
|
2024
|
+
E.value ? Ee() : me(!0);
|
|
2014
2025
|
}
|
|
2015
|
-
function
|
|
2016
|
-
|
|
2026
|
+
function Oe() {
|
|
2027
|
+
pe.value && !s?.running.value && n.translationCount && (E.value = !1, s?.translate({
|
|
2017
2028
|
only: "all",
|
|
2018
2029
|
blockId: n.blockId
|
|
2019
2030
|
}));
|
|
@@ -2024,19 +2035,19 @@ var to = [
|
|
|
2024
2035
|
type: "button",
|
|
2025
2036
|
"data-testid": "locale-chip",
|
|
2026
2037
|
"data-state": e.state,
|
|
2027
|
-
"aria-label":
|
|
2028
|
-
title:
|
|
2038
|
+
"aria-label": B.value,
|
|
2039
|
+
title: B.value,
|
|
2029
2040
|
"aria-expanded": T.value,
|
|
2030
2041
|
"aria-controls": T.value ? F : void 0,
|
|
2031
2042
|
"aria-haspopup": "dialog",
|
|
2032
2043
|
class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
|
|
2033
|
-
onClick: i(
|
|
2034
|
-
onKeydown: [o(i(
|
|
2035
|
-
}, [(m(),
|
|
2044
|
+
onClick: i(he, ["stop"]),
|
|
2045
|
+
onKeydown: [o(i(he, ["stop", "prevent"]), ["enter"]), o(i(De, ["stop", "prevent"]), ["esc"])]
|
|
2046
|
+
}, [(m(), R(p(de.value), {
|
|
2036
2047
|
size: 12,
|
|
2037
2048
|
"stroke-width": 2,
|
|
2038
2049
|
"aria-hidden": "true"
|
|
2039
|
-
}))], 40, to), A(x) && T.value ? (m(),
|
|
2050
|
+
}))], 40, to), A(x) && T.value ? (m(), R(ee, {
|
|
2040
2051
|
key: 0,
|
|
2041
2052
|
to: A(x)
|
|
2042
2053
|
}, [P("div", {
|
|
@@ -2044,7 +2055,7 @@ var to = [
|
|
|
2044
2055
|
ref_key: "popover",
|
|
2045
2056
|
ref: w,
|
|
2046
2057
|
role: "dialog",
|
|
2047
|
-
"aria-label": E.value ? void 0 :
|
|
2058
|
+
"aria-label": E.value ? void 0 : ue.value,
|
|
2048
2059
|
"aria-labelledby": E.value ? `${F}-question` : void 0,
|
|
2049
2060
|
"aria-describedby": E.value ? `${F}-warning` : void 0,
|
|
2050
2061
|
tabindex: "-1",
|
|
@@ -2057,7 +2068,7 @@ var to = [
|
|
|
2057
2068
|
maxWidth: `${ie.value.maxWidth}px`
|
|
2058
2069
|
}),
|
|
2059
2070
|
onClick: n[2] ||= i(() => {}, ["stop"]),
|
|
2060
|
-
onKeydown: o(i(
|
|
2071
|
+
onKeydown: o(i(De, ["stop", "prevent"]), ["esc"])
|
|
2061
2072
|
}, [E.value ? (m(), N(L, { key: 0 }, [
|
|
2062
2073
|
P("h3", {
|
|
2063
2074
|
id: `${F}-question`,
|
|
@@ -2073,69 +2084,69 @@ var to = [
|
|
|
2073
2084
|
type: "button",
|
|
2074
2085
|
"data-testid": "translation-confirm-cancel",
|
|
2075
2086
|
class: h(A(Sr)),
|
|
2076
|
-
onClick:
|
|
2087
|
+
onClick: Ee
|
|
2077
2088
|
}, d(A(f).localization.cancel), 3), P("button", {
|
|
2078
2089
|
type: "button",
|
|
2079
2090
|
"data-testid": "translation-confirm",
|
|
2080
2091
|
class: h(A(Cr)),
|
|
2081
|
-
disabled: !
|
|
2082
|
-
onClick:
|
|
2092
|
+
disabled: !pe.value || !!A(s)?.running.value || !e.translationCount,
|
|
2093
|
+
onClick: Oe
|
|
2083
2094
|
}, d(A(br)(A(f).localization.translateAllFields, e.translationCount ?? 0, A(u))), 11, oo)])
|
|
2084
2095
|
], 64)) : (m(), N(L, { key: 1 }, [
|
|
2085
|
-
|
|
2086
|
-
|
|
2096
|
+
fe.value ? (m(), N("p", so, d(ue.value), 1)) : j("", !0),
|
|
2097
|
+
V.value === "missing" ? (m(), N("p", co, d(A(g)(A(f).localization.missingExplanation, { default: ae.value })), 1)) : V.value === "stale" ? (m(), N(L, { key: 2 }, [P("p", lo, d(A(g)(A(f).localization.staleExplanation, { default: ae.value })), 1), P("p", uo, d(A(g)(A(f).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : V.value === "tags-differ" ? (m(), N("p", fo, d(A(g)(A(f).localization.tagsDifferExplanation, { default: ae.value })), 1)) : V.value === "changed" ? (m(), N("p", po, d(A(br)(A(f).localization.changedProperties, le.value, A(u), { default: ae.value })), 1)) : V.value === "hidden" ? (m(), N("p", mo, d(A(g)(A(f).localization.hiddenExplanation, { language: I.value })), 1)) : (m(), N("ul", ho, [(m(!0), N(L, null, v(e.staleLocales, (e) => (m(), N("li", {
|
|
2087
2098
|
key: e,
|
|
2088
2099
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
2089
2100
|
}, [P("span", null, d(A(yr)(e)), 1), P("button", {
|
|
2090
2101
|
type: "button",
|
|
2091
2102
|
class: h(A(xr)),
|
|
2092
|
-
onClick: (t) =>
|
|
2103
|
+
onClick: (t) => we(e)
|
|
2093
2104
|
}, d(A(f).localization.open), 11, go)]))), 128))])),
|
|
2094
|
-
e.editable &&
|
|
2095
|
-
|
|
2105
|
+
e.editable && V.value !== "default-stale" ? (m(), N("div", _o, [
|
|
2106
|
+
pe.value && (V.value === "missing" || V.value === "stale" || V.value === "tags-differ") ? (m(), N("button", {
|
|
2096
2107
|
key: 0,
|
|
2097
2108
|
type: "button",
|
|
2098
2109
|
ref_key: "retranslate",
|
|
2099
2110
|
ref: D,
|
|
2100
|
-
"data-testid":
|
|
2111
|
+
"data-testid": V.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
2101
2112
|
class: h(A(Sr)),
|
|
2102
2113
|
disabled: !!A(s)?.running.value,
|
|
2103
|
-
onClick:
|
|
2104
|
-
}, d(
|
|
2105
|
-
|
|
2114
|
+
onClick: Te
|
|
2115
|
+
}, d(V.value === "missing" ? A(f).localization.translate : A(f).localization.retranslate), 11, vo)) : j("", !0),
|
|
2116
|
+
V.value === "stale" || V.value === "tags-differ" ? (m(), N(L, { key: 1 }, [V.value === "stale" ? (m(), N("button", {
|
|
2106
2117
|
key: 0,
|
|
2107
2118
|
type: "button",
|
|
2108
2119
|
"data-testid": "locale-keep",
|
|
2109
|
-
class: h(
|
|
2110
|
-
onClick:
|
|
2120
|
+
class: h(pe.value ? A(xr) : A(Sr)),
|
|
2121
|
+
onClick: xe
|
|
2111
2122
|
}, d(A(f).localization.keep), 3)) : j("", !0), P("button", {
|
|
2112
2123
|
type: "button",
|
|
2113
2124
|
"data-testid": "locale-use-default",
|
|
2114
|
-
class: h(
|
|
2115
|
-
onClick: n[0] ||= (t) =>
|
|
2125
|
+
class: h(V.value === "tags-differ" && !pe.value ? A(Sr) : A(xr)),
|
|
2126
|
+
onClick: n[0] ||= (t) => Se(V.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2116
2127
|
}, d(A(g)(A(f).localization.useDefaultLanguage, { default: ae.value })), 3)], 64)) : j("", !0),
|
|
2117
|
-
|
|
2128
|
+
V.value === "changed" ? (m(), N("button", {
|
|
2118
2129
|
key: 2,
|
|
2119
2130
|
type: "button",
|
|
2120
2131
|
"data-testid": "locale-reset",
|
|
2121
2132
|
class: h(A(Sr)),
|
|
2122
|
-
onClick: n[1] ||= (t) =>
|
|
2133
|
+
onClick: n[1] ||= (t) => Se(e.setPaths)
|
|
2123
2134
|
}, d(A(f).localization.resetChanges), 3)) : j("", !0),
|
|
2124
|
-
|
|
2135
|
+
V.value === "hidden" ? (m(), N("button", {
|
|
2125
2136
|
key: 3,
|
|
2126
2137
|
type: "button",
|
|
2127
2138
|
"data-testid": "locale-show",
|
|
2128
2139
|
class: h(A(Sr)),
|
|
2129
|
-
onClick:
|
|
2140
|
+
onClick: Ce
|
|
2130
2141
|
}, d(A(f).localization.show), 3)) : j("", !0)
|
|
2131
2142
|
])) : j("", !0)
|
|
2132
2143
|
], 64))], 44, no)], 8, ["to"])) : j("", !0)], 64));
|
|
2133
2144
|
}
|
|
2134
|
-
}), [["__scopeId", "data-v-3343ae7d"]]), bo = /* @__PURE__ */
|
|
2145
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), bo = /* @__PURE__ */ B({
|
|
2135
2146
|
__name: "LocaleMarkers",
|
|
2136
2147
|
props: { block: {} },
|
|
2137
2148
|
setup(e) {
|
|
2138
|
-
let t = e, n =
|
|
2149
|
+
let t = e, n = z(Mn, null), r = z(Jt, void 0), i = z(mn, []), a = z(It, qe.liquid), o = z(hn, k(() => /* @__PURE__ */ new Set())), s = k(() => n?.activeLocale?.value), l = k(() => s.value ? t.block.l10n?.[s.value] : void 0), u = k(() => ({
|
|
2139
2150
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2140
2151
|
...t.block,
|
|
2141
2152
|
children: []
|
|
@@ -2144,14 +2155,14 @@ var to = [
|
|
|
2144
2155
|
locale: n.content.value.settings.locale,
|
|
2145
2156
|
locales: n.content.value.settings.locales
|
|
2146
2157
|
}
|
|
2147
|
-
})), d = k(() => n && s.value && !o.value.has(s.value) ?
|
|
2158
|
+
})), d = k(() => n && s.value && !o.value.has(s.value) ? Oe(u.value, s.value, i) : {
|
|
2148
2159
|
missing: [],
|
|
2149
2160
|
stale: [],
|
|
2150
2161
|
translated: []
|
|
2151
2162
|
}), f = k(() => d.value.stale.map((e) => e.slice(t.block.id.length + 1))), p = k(() => d.value.translated.flatMap((e) => {
|
|
2152
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2163
|
+
let n = e.slice(t.block.id.length + 1), r = Tt(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || Ze[t.block.type]?.includes(n) ? "html" : "text";
|
|
2153
2164
|
return typeof r == "string" && i !== void 0 && eo(r, i, a, o) ? [n] : [];
|
|
2154
|
-
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ?
|
|
2165
|
+
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ? je(u.value, s.value, {
|
|
2155
2166
|
syntax: a,
|
|
2156
2167
|
definitions: i,
|
|
2157
2168
|
doNotTranslate: r?.doNotTranslate,
|
|
@@ -2161,9 +2172,9 @@ var to = [
|
|
|
2161
2172
|
let n = e.slice(t.block.id.length + 1);
|
|
2162
2173
|
return d.value.translated.includes(e) && !p.value.includes(n);
|
|
2163
2174
|
})), v = k(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2164
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2165
|
-
return Array.isArray(i) ?
|
|
2166
|
-
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) &&
|
|
2175
|
+
let n = e.split("."), r = n.pop(), i = n.length ? Tt(t.block, n.join(".")) : t.block;
|
|
2176
|
+
return Array.isArray(i) ? Tt(i, r) !== void 0 : i !== void 0;
|
|
2177
|
+
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && Oe(u.value, e, i).stale.length > 0) : []), b = k(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : d.value.missing.length ? "missing" : f.value.length ? "stale" : p.value.length ? "tags-differ" : v.value.length ? "changed" : null : y.value.length ? "default-stale" : null);
|
|
2167
2178
|
function x(e) {
|
|
2168
2179
|
return e === "missing" ? d.value.missing.length : e === "stale" ? f.value.length : e === "tags-differ" ? p.value.length : e === "default-stale" ? y.value.length : v.value.length;
|
|
2169
2180
|
}
|
|
@@ -2172,12 +2183,12 @@ var to = [
|
|
|
2172
2183
|
h.value = null;
|
|
2173
2184
|
});
|
|
2174
2185
|
let T = k(() => {
|
|
2175
|
-
let e =
|
|
2186
|
+
let e = Tt(t.block, f.value[0] ?? "");
|
|
2176
2187
|
if (typeof e != "string") return "";
|
|
2177
2188
|
let n = e.split(/<[^>]*>/).join("");
|
|
2178
2189
|
return Array.from(n).slice(0, 60).join("");
|
|
2179
2190
|
});
|
|
2180
|
-
return (t, n) => A(r) && b.value ? (m(),
|
|
2191
|
+
return (t, n) => A(r) && b.value ? (m(), R(yo, {
|
|
2181
2192
|
key: 0,
|
|
2182
2193
|
"block-id": e.block.id,
|
|
2183
2194
|
state: b.value,
|
|
@@ -2225,7 +2236,7 @@ var to = [
|
|
|
2225
2236
|
}, Ao = { 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)]" }, jo = {
|
|
2226
2237
|
key: 4,
|
|
2227
2238
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2228
|
-
}, Mo = ["aria-label", "title"], No = /*#__PURE__*/ wr(/* @__PURE__ */
|
|
2239
|
+
}, Mo = ["aria-label", "title"], No = /*#__PURE__*/ wr(/* @__PURE__ */ B({
|
|
2229
2240
|
__name: "BlockWrapper",
|
|
2230
2241
|
props: {
|
|
2231
2242
|
block: {},
|
|
@@ -2238,33 +2249,33 @@ var to = [
|
|
|
2238
2249
|
},
|
|
2239
2250
|
emits: ["select"],
|
|
2240
2251
|
setup(t, { emit: n }) {
|
|
2241
|
-
let a =
|
|
2252
|
+
let a = oe(() => import("./BlockIssueBadge-3k568_Od.js")), o = t, s = k(() => o.displayBlock ?? o.block), l = n, { t: p, format: g } = ce(), v = z(Nn, null), b = M(null), x = k(() => v?.liftedBlockId.value === o.block.id), S = k(() => x.value ? g(p.blockActions.dragLifted, { block: o.block.type }) : p.blockActions.drag);
|
|
2242
2253
|
async function C() {
|
|
2243
2254
|
await _(), b.value?.focus();
|
|
2244
2255
|
}
|
|
2245
2256
|
function w(e) {
|
|
2246
2257
|
v && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), x.value ? v.drop(o.block.id) : v.lift(o.block.id)) : x.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), v.cancel(), C()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), v.moveUp(o.block.id), C()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), v.moveDown(o.block.id), C())));
|
|
2247
2258
|
}
|
|
2248
|
-
let T = k(() => !o.viewport || !s.value.visibility ? !1 : s.value.visibility[o.viewport] === !1), ee = k(() => !!(
|
|
2259
|
+
let T = k(() => !o.viewport || !s.value.visibility ? !1 : s.value.visibility[o.viewport] === !1), ee = k(() => !!(xe?.activeLocale?.value && o.block.l10n?.[xe.activeLocale.value]?.hidden)), D = k(() => o.previewMode === !0 && (T.value || ee.value)), O = k(() => o.viewport ? {
|
|
2249
2260
|
desktop: p.viewport.desktop,
|
|
2250
2261
|
mobile: p.viewport.mobile
|
|
2251
|
-
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re =
|
|
2262
|
+
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re = z(On, null), ie = z(xn, null), F = z(fn, {}), I = k(() => F.savedBlocks?.isPicking.value === !0), L = k(() => !o.nested && F.savedBlocks?.isAvailable.value === !0 && F.savedBlocks?.canCreate.value === !0), ae = k(() => o.isSelected && !I.value), B = k(() => F.comments?.getBlockCount(o.block.id) ?? 0), se = M(null), V = M(null), le = M(null), ue = M(null), de = M({
|
|
2252
2263
|
left: "calc(100% + 8px)",
|
|
2253
2264
|
top: "50%"
|
|
2254
|
-
}),
|
|
2255
|
-
function
|
|
2256
|
-
let e =
|
|
2265
|
+
}), fe = M(!1), pe = k(() => V.value ?? ue.value), me = k(() => pe.value?.closest(".tpl-body"));
|
|
2266
|
+
function he() {
|
|
2267
|
+
let e = fe.value, t = V.value, n = ue.value, r = se.value;
|
|
2257
2268
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2258
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2269
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = me.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2259
2270
|
if (n?.offsetWidth) {
|
|
2260
2271
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2261
2272
|
if (e === i) {
|
|
2262
|
-
|
|
2273
|
+
fe.value = !i, _(he);
|
|
2263
2274
|
return;
|
|
2264
2275
|
}
|
|
2265
2276
|
}
|
|
2266
2277
|
if (!t?.offsetWidth) return;
|
|
2267
|
-
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d =
|
|
2278
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = le.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
|
|
2268
2279
|
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2269
2280
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2270
2281
|
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
@@ -2276,46 +2287,46 @@ var to = [
|
|
|
2276
2287
|
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2277
2288
|
}
|
|
2278
2289
|
}
|
|
2279
|
-
(
|
|
2290
|
+
(de.value.left !== `${u}px` || de.value.top !== m) && (de.value = {
|
|
2280
2291
|
left: `${u}px`,
|
|
2281
2292
|
top: m
|
|
2282
2293
|
});
|
|
2283
2294
|
}
|
|
2284
|
-
f(
|
|
2285
|
-
|
|
2286
|
-
|
|
2295
|
+
f(he), r(k(() => pe.value ? [
|
|
2296
|
+
se.value,
|
|
2297
|
+
V.value,
|
|
2298
|
+
le.value,
|
|
2287
2299
|
ue.value,
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
})), Oe = k(() => sa(s.value, { backgroundImageUrl: xe.value })), ke = k(() => {
|
|
2300
|
+
me.value
|
|
2301
|
+
].filter((e) => !!e) : []), he), e(me, "scroll", he, { passive: !0 });
|
|
2302
|
+
let ge = k(() => F.collaboration?.lockOf(o.block.id) ?? null), _e = k(() => ge.value?.holder.type === "guest" ? p.collaboration.guest : ge.value?.holder.name ?? ""), ve = k(() => F.collaboration?.agentHighlightOf(o.block.id) ?? F.ai?.highlightOf(o.block.id) ?? null), ye = ir(() => s.value.type === "section" ? s.value.backgroundImage : void 0), be = ir(() => s.value.type === "section" ? s.value.wrapper?.backgroundImage : void 0), xe = z(Mn, null), Ce = xe ? Nt(xe) : null, we = z(vn, null) ?? Ce?.content ?? null;
|
|
2303
|
+
c([() => xe?.activeLocale?.value, () => Ce && Se(Ce.settings.value)], he, { flush: "post" });
|
|
2304
|
+
let Te = z(Qt, void 0), Ee = k(() => ta(s.value, {
|
|
2305
|
+
backgroundImageUrl: ye.value,
|
|
2306
|
+
heroBoxWidth: Yn(s.value) ? er(s.value, we?.value, Te) : void 0
|
|
2307
|
+
})), De = k(() => sa(s.value, { backgroundImageUrl: be.value })), Oe = k(() => {
|
|
2297
2308
|
let e = s.value;
|
|
2298
2309
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2299
|
-
}),
|
|
2300
|
-
function
|
|
2310
|
+
}), ke = k(() => oa(Oe.value?.wrapper?.padding));
|
|
2311
|
+
function Ae(e) {
|
|
2301
2312
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), l("select"));
|
|
2302
2313
|
}
|
|
2303
|
-
function
|
|
2314
|
+
function je() {
|
|
2304
2315
|
re?.deleteBlock(o.block.id);
|
|
2305
2316
|
}
|
|
2306
|
-
function
|
|
2317
|
+
function Me() {
|
|
2307
2318
|
re?.duplicateBlock(o.block);
|
|
2308
2319
|
}
|
|
2309
|
-
function
|
|
2320
|
+
function Ne() {
|
|
2310
2321
|
F.savedBlocks?.startPicking(o.block.id);
|
|
2311
2322
|
}
|
|
2312
|
-
function
|
|
2323
|
+
function Pe() {
|
|
2313
2324
|
ie?.toggleBlock(o.block.id);
|
|
2314
2325
|
}
|
|
2315
2326
|
return (e, n) => D.value ? j("", !0) : (m(), N("div", {
|
|
2316
2327
|
key: 0,
|
|
2317
2328
|
ref_key: "blockElement",
|
|
2318
|
-
ref:
|
|
2329
|
+
ref: se,
|
|
2319
2330
|
class: h(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2320
2331
|
"tpl-block--selected": t.isSelected,
|
|
2321
2332
|
"tpl-block--locale-hidden": ee.value,
|
|
@@ -2326,48 +2337,48 @@ var to = [
|
|
|
2326
2337
|
"data-block-id": t.block.id,
|
|
2327
2338
|
"data-block-type": t.block.type,
|
|
2328
2339
|
"data-tpl-picked": t.picked || void 0,
|
|
2329
|
-
onClick:
|
|
2340
|
+
onClick: Ae
|
|
2330
2341
|
}, [
|
|
2331
2342
|
P("div", {
|
|
2332
2343
|
ref_key: "badgesElement",
|
|
2333
|
-
ref:
|
|
2344
|
+
ref: le,
|
|
2334
2345
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2335
2346
|
}, [
|
|
2336
|
-
|
|
2347
|
+
B.value > 0 && !T.value ? (m(), N("button", {
|
|
2337
2348
|
key: 0,
|
|
2338
2349
|
ref_key: "commentElement",
|
|
2339
|
-
ref:
|
|
2340
|
-
class: h(["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)]",
|
|
2341
|
-
"aria-label": A(g)(A(p).blockActions.comments, { count: String(
|
|
2350
|
+
ref: ue,
|
|
2351
|
+
class: h(["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)]", fe.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2352
|
+
"aria-label": A(g)(A(p).blockActions.comments, { count: String(B.value) }),
|
|
2342
2353
|
onClick: n[0] ||= i((e) => A(F).comments?.openForBlock(t.block.id), ["stop"])
|
|
2343
2354
|
}, [E(A(Er), {
|
|
2344
2355
|
size: 12,
|
|
2345
2356
|
"stroke-width": 2.5
|
|
2346
|
-
}), te(" " + d(
|
|
2357
|
+
}), te(" " + d(B.value), 1)], 10, So)) : j("", !0),
|
|
2347
2358
|
E(A(a), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2348
|
-
t.previewMode ? j("", !0) : (m(),
|
|
2359
|
+
t.previewMode ? j("", !0) : (m(), R(bo, {
|
|
2349
2360
|
key: 1,
|
|
2350
2361
|
block: t.block
|
|
2351
2362
|
}, null, 8, ["block"]))
|
|
2352
2363
|
], 512),
|
|
2353
|
-
|
|
2364
|
+
ge.value ? (m(), N("div", {
|
|
2354
2365
|
key: 0,
|
|
2355
2366
|
"data-testid": "block-lock",
|
|
2356
|
-
"data-lock-holder":
|
|
2367
|
+
"data-lock-holder": ge.value.holder.sessionId,
|
|
2357
2368
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2358
2369
|
style: y({
|
|
2359
|
-
outline: `2px solid ${
|
|
2370
|
+
outline: `2px solid ${ge.value.holder.color}`,
|
|
2360
2371
|
outlineOffset: "-1px"
|
|
2361
2372
|
})
|
|
2362
2373
|
}, [P("span", {
|
|
2363
2374
|
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",
|
|
2364
2375
|
style: y({
|
|
2365
|
-
backgroundColor:
|
|
2366
|
-
color: A(Or)(
|
|
2376
|
+
backgroundColor: ge.value.holder.color,
|
|
2377
|
+
color: A(Or)(ge.value.holder.color)
|
|
2367
2378
|
})
|
|
2368
|
-
}, d(A(g)(A(p).collaboration.editing, { name:
|
|
2369
|
-
|
|
2370
|
-
key:
|
|
2379
|
+
}, d(A(g)(A(p).collaboration.editing, { name: _e.value })), 5)], 12, Co)) : j("", !0),
|
|
2380
|
+
ve.value === null ? j("", !0) : (m(), N("div", {
|
|
2381
|
+
key: ve.value,
|
|
2371
2382
|
"data-testid": "block-agent-highlight",
|
|
2372
2383
|
"aria-hidden": "true",
|
|
2373
2384
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
@@ -2375,8 +2386,8 @@ var to = [
|
|
|
2375
2386
|
ae.value ? (m(), N("div", {
|
|
2376
2387
|
key: 2,
|
|
2377
2388
|
ref_key: "actionsElement",
|
|
2378
|
-
ref:
|
|
2379
|
-
style: y(
|
|
2389
|
+
ref: V,
|
|
2390
|
+
style: y(de.value),
|
|
2380
2391
|
role: "toolbar",
|
|
2381
2392
|
"aria-label": A(p).blockActions.drag,
|
|
2382
2393
|
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)]"
|
|
@@ -2398,7 +2409,7 @@ var to = [
|
|
|
2398
2409
|
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",
|
|
2399
2410
|
"aria-label": A(p).blockActions.duplicate,
|
|
2400
2411
|
title: A(p).blockActions.duplicate,
|
|
2401
|
-
onClick: i(
|
|
2412
|
+
onClick: i(Me, ["stop"])
|
|
2402
2413
|
}, [E(A(Tr), {
|
|
2403
2414
|
size: 14,
|
|
2404
2415
|
"stroke-width": 1.5
|
|
@@ -2408,7 +2419,7 @@ var to = [
|
|
|
2408
2419
|
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",
|
|
2409
2420
|
"aria-label": A(p).blockActions.saveAsBlock,
|
|
2410
2421
|
title: A(p).blockActions.saveAsBlock,
|
|
2411
|
-
onClick: i(
|
|
2422
|
+
onClick: i(Ne, ["stop"])
|
|
2412
2423
|
}, [E(A(kr), {
|
|
2413
2424
|
size: 14,
|
|
2414
2425
|
"stroke-width": 1.5
|
|
@@ -2417,7 +2428,7 @@ var to = [
|
|
|
2417
2428
|
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",
|
|
2418
2429
|
"aria-label": A(p).blockActions.delete,
|
|
2419
2430
|
title: A(p).blockActions.delete,
|
|
2420
|
-
onClick: i(
|
|
2431
|
+
onClick: i(je, ["stop"])
|
|
2421
2432
|
}, [E(A(Dr), {
|
|
2422
2433
|
size: 14,
|
|
2423
2434
|
"stroke-width": 1.5
|
|
@@ -2432,30 +2443,30 @@ var to = [
|
|
|
2432
2443
|
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)]",
|
|
2433
2444
|
"aria-label": A(p).blockActions.conditionToggle,
|
|
2434
2445
|
title: t.block.displayCondition?.label,
|
|
2435
|
-
onClick: i(
|
|
2446
|
+
onClick: i(Pe, ["stop"])
|
|
2436
2447
|
}, [E(A(Mr), {
|
|
2437
2448
|
size: 12,
|
|
2438
2449
|
"stroke-width": 2
|
|
2439
2450
|
})], 8, Mo)])) : j("", !0),
|
|
2440
|
-
|
|
2451
|
+
De.value ? (m(), N("div", {
|
|
2441
2452
|
key: 5,
|
|
2442
|
-
class: h(["tpl-section-wrapper tpl-email-surface", A(Zi)(
|
|
2443
|
-
style: y(
|
|
2444
|
-
}, [
|
|
2453
|
+
class: h(["tpl-section-wrapper tpl-email-surface", A(Zi)(De.value)]),
|
|
2454
|
+
style: y(De.value)
|
|
2455
|
+
}, [Oe.value ? (m(), N("div", {
|
|
2445
2456
|
key: 0,
|
|
2446
2457
|
class: "tpl-band-frame",
|
|
2447
|
-
style: y(
|
|
2458
|
+
style: y(ke.value)
|
|
2448
2459
|
}, [P("div", {
|
|
2449
|
-
class: h(["tpl-block-content tpl-email-surface", A(Zi)(
|
|
2450
|
-
style: y(
|
|
2460
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(Ee.value)]),
|
|
2461
|
+
style: y(Ee.value)
|
|
2451
2462
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (m(), N("div", {
|
|
2452
2463
|
key: 1,
|
|
2453
|
-
class: h(["tpl-block-content tpl-email-surface", A(Zi)(
|
|
2454
|
-
style: y(
|
|
2464
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(Ee.value)]),
|
|
2465
|
+
style: y(Ee.value)
|
|
2455
2466
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (m(), N("div", {
|
|
2456
2467
|
key: 6,
|
|
2457
|
-
class: h(["tpl-block-content tpl-email-surface", A(Zi)(
|
|
2458
|
-
style: y(
|
|
2468
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(Ee.value)]),
|
|
2469
|
+
style: y(Ee.value)
|
|
2459
2470
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2460
2471
|
], 10, xo));
|
|
2461
2472
|
}
|
|
@@ -2464,7 +2475,7 @@ var to = [
|
|
|
2464
2475
|
function Po(e) {
|
|
2465
2476
|
let t = /^\s*<p\b/.exec(e);
|
|
2466
2477
|
if (!t) return e;
|
|
2467
|
-
let n =
|
|
2478
|
+
let n = yt(e, t[0].length);
|
|
2468
2479
|
if (n === -1) return e;
|
|
2469
2480
|
let r = /<\/p>\s*$/.exec(e);
|
|
2470
2481
|
if (!r || r.index <= n) return e;
|
|
@@ -2472,17 +2483,17 @@ function Po(e) {
|
|
|
2472
2483
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2473
2484
|
}
|
|
2474
2485
|
// src/components/blocks/TitleBlock.vue
|
|
2475
|
-
var Fo = /* @__PURE__ */
|
|
2486
|
+
var Fo = /* @__PURE__ */ B({
|
|
2476
2487
|
__name: "TitleBlock",
|
|
2477
2488
|
props: {
|
|
2478
2489
|
block: {},
|
|
2479
2490
|
viewport: {}
|
|
2480
2491
|
},
|
|
2481
2492
|
setup(e) {
|
|
2482
|
-
let t = e, n =
|
|
2493
|
+
let t = e, n = oe(() => import("./TitleEditor-wzknZqu_.js")), r = bn(ln, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Ya(() => t.block.content), u = k(() => {
|
|
2483
2494
|
let e = {
|
|
2484
|
-
fontSize: `${
|
|
2485
|
-
lineHeight: String(
|
|
2495
|
+
fontSize: `${st[t.block.level]}px`,
|
|
2496
|
+
lineHeight: String(St),
|
|
2486
2497
|
fontWeight: "700",
|
|
2487
2498
|
textAlign: t.block.textAlign
|
|
2488
2499
|
};
|
|
@@ -2494,7 +2505,7 @@ var Fo = /* @__PURE__ */ z({
|
|
|
2494
2505
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2495
2506
|
style: y(u.value),
|
|
2496
2507
|
onDblclick: r[0] ||= (...e) => A(c) && A(c)(...e)
|
|
2497
|
-
}, [A(i) ? (m(),
|
|
2508
|
+
}, [A(i) ? (m(), R(A(n), {
|
|
2498
2509
|
key: 0,
|
|
2499
2510
|
block: e.block,
|
|
2500
2511
|
"toolbar-position": A(o),
|
|
@@ -2503,7 +2514,7 @@ var Fo = /* @__PURE__ */ z({
|
|
|
2503
2514
|
"block",
|
|
2504
2515
|
"toolbar-position",
|
|
2505
2516
|
"onDone"
|
|
2506
|
-
])) : (m(),
|
|
2517
|
+
])) : (m(), R(p(d.value), {
|
|
2507
2518
|
key: 1,
|
|
2508
2519
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
2509
2520
|
style: {
|
|
@@ -2515,12 +2526,12 @@ var Fo = /* @__PURE__ */ z({
|
|
|
2515
2526
|
}
|
|
2516
2527
|
}), Io = "hero", Lo = "#1f2937", Ro = "#ffffff";
|
|
2517
2528
|
function zo(e, t) {
|
|
2518
|
-
let n =
|
|
2529
|
+
let n = ke("title", e);
|
|
2519
2530
|
n.color = Ro, n.textAlign = "center";
|
|
2520
|
-
let r =
|
|
2531
|
+
let r = ke("paragraph", e);
|
|
2521
2532
|
r.content = `<p style="text-align: center"><span style="color: ${Ro}">${Bo(t)}</span></p>`;
|
|
2522
|
-
let i =
|
|
2523
|
-
return i.align = "center",
|
|
2533
|
+
let i = ke("button", e);
|
|
2534
|
+
return i.align = "center", ze({
|
|
2524
2535
|
columns: "1",
|
|
2525
2536
|
children: [[
|
|
2526
2537
|
n,
|
|
@@ -2695,10 +2706,10 @@ var ws = Cs(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ts = Cs(/E
|
|
|
2695
2706
|
capture: !1,
|
|
2696
2707
|
passive: !1
|
|
2697
2708
|
};
|
|
2698
|
-
function
|
|
2709
|
+
function H(e, t, n) {
|
|
2699
2710
|
e.addEventListener(t, n, !ws && As);
|
|
2700
2711
|
}
|
|
2701
|
-
function
|
|
2712
|
+
function U(e, t, n) {
|
|
2702
2713
|
e.removeEventListener(t, n, !ws && As);
|
|
2703
2714
|
}
|
|
2704
2715
|
function js(e, t) {
|
|
@@ -2730,7 +2741,7 @@ var Ps = /\s+/g;
|
|
|
2730
2741
|
function Fs(e, t, n) {
|
|
2731
2742
|
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Ps, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Ps, " "));
|
|
2732
2743
|
}
|
|
2733
|
-
function
|
|
2744
|
+
function W(e, t, n) {
|
|
2734
2745
|
var r = e && e.style;
|
|
2735
2746
|
if (r) {
|
|
2736
2747
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
@@ -2741,7 +2752,7 @@ function Is(e, t) {
|
|
|
2741
2752
|
var n = "";
|
|
2742
2753
|
if (typeof e == "string") n = e;
|
|
2743
2754
|
else do {
|
|
2744
|
-
var r =
|
|
2755
|
+
var r = W(e, "transform");
|
|
2745
2756
|
r && r !== "none" && (n = r + " " + n);
|
|
2746
2757
|
} while (!t && (e = e.parentNode));
|
|
2747
2758
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
@@ -2758,13 +2769,13 @@ function Ls(e, t, n) {
|
|
|
2758
2769
|
function Rs() {
|
|
2759
2770
|
return document.scrollingElement || document.documentElement;
|
|
2760
2771
|
}
|
|
2761
|
-
function
|
|
2772
|
+
function G(e, t, n, r, i) {
|
|
2762
2773
|
if (e.getBoundingClientRect || e === window) {
|
|
2763
2774
|
var a, o, s, c, l, u, d;
|
|
2764
2775
|
if (e !== window && e.parentNode && e !== Rs() ? (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, !ws)) do
|
|
2765
|
-
if (i && i.getBoundingClientRect && (
|
|
2776
|
+
if (i && i.getBoundingClientRect && (W(i, "transform") !== "none" || n && W(i, "position") !== "static")) {
|
|
2766
2777
|
var f = i.getBoundingClientRect();
|
|
2767
|
-
o -= f.top + parseInt(
|
|
2778
|
+
o -= f.top + parseInt(W(i, "border-top-width")), s -= f.left + parseInt(W(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
2768
2779
|
break;
|
|
2769
2780
|
}
|
|
2770
2781
|
while (i = i.parentNode);
|
|
@@ -2783,8 +2794,8 @@ function W(e, t, n, r, i) {
|
|
|
2783
2794
|
}
|
|
2784
2795
|
}
|
|
2785
2796
|
function zs(e, t, n) {
|
|
2786
|
-
for (var r = Gs(e, !0), i =
|
|
2787
|
-
var a =
|
|
2797
|
+
for (var r = Gs(e, !0), i = G(e)[t]; r;) {
|
|
2798
|
+
var a = G(r)[n], o = void 0;
|
|
2788
2799
|
if (o = i >= a, !o) return r;
|
|
2789
2800
|
if (r === Rs()) break;
|
|
2790
2801
|
r = Gs(r, !1);
|
|
@@ -2802,7 +2813,7 @@ function Bs(e, t, n, r) {
|
|
|
2802
2813
|
return null;
|
|
2803
2814
|
}
|
|
2804
2815
|
function Vs(e, t) {
|
|
2805
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2816
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || W(n, "display") === "none" || t && !js(n, t));) n = n.previousElementSibling;
|
|
2806
2817
|
return n || null;
|
|
2807
2818
|
}
|
|
2808
2819
|
function Hs(e, t) {
|
|
@@ -2830,7 +2841,7 @@ function Gs(e, t) {
|
|
|
2830
2841
|
var n = e, r = !1;
|
|
2831
2842
|
do
|
|
2832
2843
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2833
|
-
var i =
|
|
2844
|
+
var i = W(n);
|
|
2834
2845
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2835
2846
|
if (!n.getBoundingClientRect || n === document.body) return Rs();
|
|
2836
2847
|
if (r || t) return n;
|
|
@@ -2872,7 +2883,7 @@ function $s(e, t, n) {
|
|
|
2872
2883
|
var r = {};
|
|
2873
2884
|
return Array.from(e.children).forEach(function(i) {
|
|
2874
2885
|
if (Ns(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2875
|
-
var a =
|
|
2886
|
+
var a = G(i);
|
|
2876
2887
|
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);
|
|
2877
2888
|
}
|
|
2878
2889
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
@@ -2883,10 +2894,10 @@ function tc() {
|
|
|
2883
2894
|
return {
|
|
2884
2895
|
captureAnimationState: function() {
|
|
2885
2896
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2886
|
-
if (
|
|
2897
|
+
if (W(t, "display") !== "none" && t !== Q.ghost) {
|
|
2887
2898
|
e.push({
|
|
2888
2899
|
target: t,
|
|
2889
|
-
rect:
|
|
2900
|
+
rect: G(t)
|
|
2890
2901
|
});
|
|
2891
2902
|
var n = gs({}, e[e.length - 1].rect);
|
|
2892
2903
|
if (t.thisAnimationDuration) {
|
|
@@ -2909,7 +2920,7 @@ function tc() {
|
|
|
2909
2920
|
else {
|
|
2910
2921
|
var i = !1, a = 0;
|
|
2911
2922
|
e.forEach(function(e) {
|
|
2912
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2923
|
+
var t = 0, n = e.target, o = n.fromRect, s = G(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Is(n, !0);
|
|
2913
2924
|
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && qs(c, s) && !qs(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = rc(u, c, l, r.options)), qs(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() {
|
|
2914
2925
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2915
2926
|
}, t), n.thisAnimationDuration = t);
|
|
@@ -2920,10 +2931,10 @@ function tc() {
|
|
|
2920
2931
|
},
|
|
2921
2932
|
animate: function(e, t, n, r) {
|
|
2922
2933
|
if (r) {
|
|
2923
|
-
|
|
2934
|
+
W(e, "transition", ""), W(e, "transform", "");
|
|
2924
2935
|
var i = Is(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2925
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2926
|
-
|
|
2936
|
+
e.animatingX = !!s, e.animatingY = !!c, W(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = nc(e), W(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), W(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2937
|
+
W(e, "transition", ""), W(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2927
2938
|
}, r);
|
|
2928
2939
|
}
|
|
2929
2940
|
}
|
|
@@ -2993,24 +3004,24 @@ function sc(e) {
|
|
|
2993
3004
|
var cc = ["evt"], lc = function(e, t) {
|
|
2994
3005
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = xs(n, cc);
|
|
2995
3006
|
oc.pluginEvent.bind(Q)(e, t, gs({
|
|
2996
|
-
dragEl:
|
|
2997
|
-
parentEl:
|
|
2998
|
-
ghostEl:
|
|
2999
|
-
rootEl:
|
|
3007
|
+
dragEl: K,
|
|
3008
|
+
parentEl: q,
|
|
3009
|
+
ghostEl: J,
|
|
3010
|
+
rootEl: Y,
|
|
3000
3011
|
nextEl: dc,
|
|
3001
3012
|
lastDownEl: fc,
|
|
3002
|
-
cloneEl:
|
|
3013
|
+
cloneEl: X,
|
|
3003
3014
|
cloneHidden: pc,
|
|
3004
3015
|
dragStarted: Oc,
|
|
3005
|
-
putSortable:
|
|
3016
|
+
putSortable: Z,
|
|
3006
3017
|
activeSortable: Q.active,
|
|
3007
3018
|
originalEvent: r,
|
|
3008
3019
|
oldIndex: mc,
|
|
3009
3020
|
oldDraggableIndex: gc,
|
|
3010
3021
|
newIndex: hc,
|
|
3011
3022
|
newDraggableIndex: _c,
|
|
3012
|
-
hideGhostForTarget:
|
|
3013
|
-
unhideGhostForTarget:
|
|
3023
|
+
hideGhostForTarget: qc,
|
|
3024
|
+
unhideGhostForTarget: Jc,
|
|
3014
3025
|
cloneNowHidden: function() {
|
|
3015
3026
|
pc = !0;
|
|
3016
3027
|
},
|
|
@@ -3028,44 +3039,44 @@ var cc = ["evt"], lc = function(e, t) {
|
|
|
3028
3039
|
};
|
|
3029
3040
|
function uc(e) {
|
|
3030
3041
|
sc(gs({
|
|
3031
|
-
putSortable:
|
|
3032
|
-
cloneEl:
|
|
3033
|
-
targetEl:
|
|
3034
|
-
rootEl:
|
|
3042
|
+
putSortable: Z,
|
|
3043
|
+
cloneEl: X,
|
|
3044
|
+
targetEl: K,
|
|
3045
|
+
rootEl: Y,
|
|
3035
3046
|
oldIndex: mc,
|
|
3036
3047
|
oldDraggableIndex: gc,
|
|
3037
3048
|
newIndex: hc,
|
|
3038
3049
|
newDraggableIndex: _c
|
|
3039
3050
|
}, e));
|
|
3040
3051
|
}
|
|
3041
|
-
var
|
|
3042
|
-
if (
|
|
3052
|
+
var K, q, J, Y, dc, fc, X, pc, mc, hc, gc, _c, vc, Z, yc = !1, bc = !1, xc = [], Sc, Cc, wc, Tc, Ec, Dc, Oc, kc, Ac, jc = !1, Mc = !1, Nc, Pc, Fc = [], Ic = !1, Lc = [], Rc = typeof document < "u", zc = Os, Bc = Ts || ws ? "cssFloat" : "float", Vc = Rc && !ks && !Os && "draggable" in document.createElement("div"), Hc = function() {
|
|
3053
|
+
if (Rc) {
|
|
3043
3054
|
if (ws) return !1;
|
|
3044
3055
|
var e = document.createElement("x");
|
|
3045
3056
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3046
3057
|
}
|
|
3047
|
-
}(),
|
|
3048
|
-
var n =
|
|
3058
|
+
}(), Uc = function(e, t) {
|
|
3059
|
+
var n = W(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Bs(e, 0, t), a = Bs(e, 1, t), o = i && W(i), s = a && W(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + G(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + G(a).width;
|
|
3049
3060
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3050
3061
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3051
3062
|
if (i && o.float && o.float !== "none") {
|
|
3052
3063
|
var u = o.float === "left" ? "left" : "right";
|
|
3053
3064
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3054
3065
|
}
|
|
3055
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3056
|
-
},
|
|
3066
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Bc] === "none" || a && n[Bc] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3067
|
+
}, Wc = function(e, t, n) {
|
|
3057
3068
|
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;
|
|
3058
3069
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3059
|
-
},
|
|
3070
|
+
}, Gc = function(e, t) {
|
|
3060
3071
|
var n;
|
|
3061
3072
|
return xc.some(function(r) {
|
|
3062
3073
|
var i = r[ec].options.emptyInsertThreshold;
|
|
3063
3074
|
if (i && !Vs(r)) {
|
|
3064
|
-
var a =
|
|
3075
|
+
var a = G(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3065
3076
|
if (o && s) return n = r;
|
|
3066
3077
|
}
|
|
3067
3078
|
}), n;
|
|
3068
|
-
},
|
|
3079
|
+
}, Kc = function(e) {
|
|
3069
3080
|
function t(e, n) {
|
|
3070
3081
|
return function(r, i, a, o) {
|
|
3071
3082
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3079,26 +3090,26 @@ var G, K, q, J, dc, fc, Y, pc, mc, hc, gc, _c, vc, X, yc = !1, bc = !1, xc = [],
|
|
|
3079
3090
|
}
|
|
3080
3091
|
var n = {}, r = e.group;
|
|
3081
3092
|
r && _s(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;
|
|
3082
|
-
}, Kc = function() {
|
|
3083
|
-
!Vc && q && U(q, "display", "none");
|
|
3084
3093
|
}, qc = function() {
|
|
3085
|
-
!
|
|
3094
|
+
!Hc && J && W(J, "display", "none");
|
|
3095
|
+
}, Jc = function() {
|
|
3096
|
+
!Hc && J && W(J, "display", "");
|
|
3086
3097
|
};
|
|
3087
|
-
|
|
3098
|
+
Rc && !ks && document.addEventListener("click", function(e) {
|
|
3088
3099
|
if (bc) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), bc = !1, !1;
|
|
3089
3100
|
}, !0);
|
|
3090
|
-
var
|
|
3091
|
-
if (
|
|
3101
|
+
var Yc = function(e) {
|
|
3102
|
+
if (K) {
|
|
3092
3103
|
e = e.touches ? e.touches[0] : e;
|
|
3093
|
-
var t =
|
|
3104
|
+
var t = Gc(e.clientX, e.clientY);
|
|
3094
3105
|
if (t) {
|
|
3095
3106
|
var n = {};
|
|
3096
3107
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3097
3108
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[ec]._onDragOver(n);
|
|
3098
3109
|
}
|
|
3099
3110
|
}
|
|
3100
|
-
},
|
|
3101
|
-
|
|
3111
|
+
}, Xc = function(e) {
|
|
3112
|
+
K && K.parentNode[ec]._isOutsideThisEl(e.target);
|
|
3102
3113
|
};
|
|
3103
3114
|
function Q(e, t) {
|
|
3104
3115
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
@@ -3115,7 +3126,7 @@ function Q(e, t) {
|
|
|
3115
3126
|
invertedSwapThreshold: null,
|
|
3116
3127
|
removeCloneOnHide: !0,
|
|
3117
3128
|
direction: function() {
|
|
3118
|
-
return
|
|
3129
|
+
return Uc(e, this.options);
|
|
3119
3130
|
},
|
|
3120
3131
|
ghostClass: "sortable-ghost",
|
|
3121
3132
|
chosenClass: "sortable-chosen",
|
|
@@ -3146,8 +3157,8 @@ function Q(e, t) {
|
|
|
3146
3157
|
emptyInsertThreshold: 5
|
|
3147
3158
|
};
|
|
3148
3159
|
for (var r in oc.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3149
|
-
for (var i in
|
|
3150
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3160
|
+
for (var i in Kc(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3161
|
+
this.nativeDraggable = !t.forceFallback && Vc, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? H(e, "pointerdown", this._onTapStart) : (H(e, "mousedown", this._onTapStart), H(e, "touchstart", this._onTapStart)), this.nativeDraggable && (H(e, "dragover", this), H(e, "dragenter", this)), xc.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ys(this, tc());
|
|
3151
3162
|
}
|
|
3152
3163
|
Q.prototype = {
|
|
3153
3164
|
constructor: Q,
|
|
@@ -3155,12 +3166,12 @@ Q.prototype = {
|
|
|
3155
3166
|
!this.el.contains(e) && e !== this.el && (kc = null);
|
|
3156
3167
|
},
|
|
3157
3168
|
_getDirection: function(e, t) {
|
|
3158
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
3169
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, K) : this.options.direction;
|
|
3159
3170
|
},
|
|
3160
3171
|
_onTapStart: function(e) {
|
|
3161
3172
|
if (e.cancelable) {
|
|
3162
3173
|
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;
|
|
3163
|
-
if (
|
|
3174
|
+
if (ol(n), !K && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ds && s && s.tagName.toUpperCase() === "SELECT") && (s = Ns(s, r.draggable, n, !1), !(s && s.animated) && fc !== s)) {
|
|
3164
3175
|
if (mc = Hs(s), gc = Hs(s, r.draggable), typeof l == "function") {
|
|
3165
3176
|
if (l.call(this, e, s, this)) {
|
|
3166
3177
|
uc({
|
|
@@ -3192,26 +3203,26 @@ Q.prototype = {
|
|
|
3192
3203
|
},
|
|
3193
3204
|
_prepareDragStart: function(e, t, n) {
|
|
3194
3205
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3195
|
-
if (n && !
|
|
3196
|
-
var c =
|
|
3197
|
-
if (
|
|
3198
|
-
target:
|
|
3206
|
+
if (n && !K && n.parentNode === i) {
|
|
3207
|
+
var c = G(n);
|
|
3208
|
+
if (Y = i, K = n, q = K.parentNode, dc = K.nextSibling, fc = n, vc = a.group, Q.dragged = K, Sc = {
|
|
3209
|
+
target: K,
|
|
3199
3210
|
clientX: (t || e).clientX,
|
|
3200
3211
|
clientY: (t || e).clientY
|
|
3201
|
-
}, Ec = Sc.clientX - c.left, Dc = Sc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY,
|
|
3202
|
-
lc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Es && r.nativeDraggable && (
|
|
3212
|
+
}, Ec = Sc.clientX - c.left, Dc = Sc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, K.style["will-change"] = "all", s = function() {
|
|
3213
|
+
lc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Es && r.nativeDraggable && (K.draggable = !0), r._triggerDragStart(e, t), uc({
|
|
3203
3214
|
sortable: r,
|
|
3204
3215
|
name: "choose",
|
|
3205
3216
|
originalEvent: e
|
|
3206
|
-
}), Fs(
|
|
3217
|
+
}), Fs(K, a.chosenClass, !0));
|
|
3207
3218
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3208
|
-
Ls(
|
|
3209
|
-
}),
|
|
3219
|
+
Ls(K, e.trim(), $c);
|
|
3220
|
+
}), H(o, "dragover", Yc), H(o, "mousemove", Yc), H(o, "touchmove", Yc), H(o, "mouseup", r._onDrop), H(o, "touchend", r._onDrop), H(o, "touchcancel", r._onDrop), Es && this.nativeDraggable && (this.options.touchStartThreshold = 4, K.draggable = !0), lc("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ts || ws))) {
|
|
3210
3221
|
if (Q.eventCanceled) {
|
|
3211
3222
|
this._onDrop();
|
|
3212
3223
|
return;
|
|
3213
3224
|
}
|
|
3214
|
-
|
|
3225
|
+
H(o, "mouseup", r._disableDelayedDrag), H(o, "touchend", r._disableDelayedDrag), H(o, "touchcancel", r._disableDelayedDrag), H(o, "mousemove", r._delayedDragTouchMoveHandler), H(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && H(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
3215
3226
|
} else s();
|
|
3216
3227
|
}
|
|
3217
3228
|
},
|
|
@@ -3220,25 +3231,25 @@ Q.prototype = {
|
|
|
3220
3231
|
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();
|
|
3221
3232
|
},
|
|
3222
3233
|
_disableDelayedDrag: function() {
|
|
3223
|
-
|
|
3234
|
+
K && $c(K), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3224
3235
|
},
|
|
3225
3236
|
_disableDelayedDragEvents: function() {
|
|
3226
3237
|
var e = this.el.ownerDocument;
|
|
3227
|
-
|
|
3238
|
+
U(e, "mouseup", this._disableDelayedDrag), U(e, "touchend", this._disableDelayedDrag), U(e, "touchcancel", this._disableDelayedDrag), U(e, "mousemove", this._delayedDragTouchMoveHandler), U(e, "touchmove", this._delayedDragTouchMoveHandler), U(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3228
3239
|
},
|
|
3229
3240
|
_triggerDragStart: function(e, t) {
|
|
3230
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
3241
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? H(document, "pointermove", this._onTouchMove) : t ? H(document, "touchmove", this._onTouchMove) : H(document, "mousemove", this._onTouchMove) : (H(K, "dragend", this), H(Y, "dragstart", this._onDragStart));
|
|
3231
3242
|
try {
|
|
3232
|
-
document.selection ?
|
|
3243
|
+
document.selection ? sl(function() {
|
|
3233
3244
|
document.selection.empty();
|
|
3234
3245
|
}) : window.getSelection().removeAllRanges();
|
|
3235
3246
|
} catch {}
|
|
3236
3247
|
},
|
|
3237
3248
|
_dragStarted: function(e, t) {
|
|
3238
|
-
if (yc = !1,
|
|
3239
|
-
lc("dragStarted", this, { evt: t }), this.nativeDraggable &&
|
|
3249
|
+
if (yc = !1, Y && K) {
|
|
3250
|
+
lc("dragStarted", this, { evt: t }), this.nativeDraggable && H(document, "dragover", Xc);
|
|
3240
3251
|
var n = this.options;
|
|
3241
|
-
!e && Fs(
|
|
3252
|
+
!e && Fs(K, n.dragClass, !1), Fs(K, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), uc({
|
|
3242
3253
|
sortable: this,
|
|
3243
3254
|
name: "start",
|
|
3244
3255
|
originalEvent: t
|
|
@@ -3247,9 +3258,9 @@ Q.prototype = {
|
|
|
3247
3258
|
},
|
|
3248
3259
|
_emulateDragOver: function() {
|
|
3249
3260
|
if (Cc) {
|
|
3250
|
-
this._lastX = Cc.clientX, this._lastY = Cc.clientY,
|
|
3261
|
+
this._lastX = Cc.clientX, this._lastY = Cc.clientY, qc();
|
|
3251
3262
|
for (var e = document.elementFromPoint(Cc.clientX, Cc.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Cc.clientX, Cc.clientY), e !== t);) t = e;
|
|
3252
|
-
if (
|
|
3263
|
+
if (K.parentNode[ec]._isOutsideThisEl(e), t) do {
|
|
3253
3264
|
if (t[ec]) {
|
|
3254
3265
|
var n = void 0;
|
|
3255
3266
|
if (n = t[ec]._onDragOver({
|
|
@@ -3261,17 +3272,17 @@ Q.prototype = {
|
|
|
3261
3272
|
}
|
|
3262
3273
|
e = t;
|
|
3263
3274
|
} while (t = t.parentNode);
|
|
3264
|
-
|
|
3275
|
+
Jc();
|
|
3265
3276
|
}
|
|
3266
3277
|
},
|
|
3267
3278
|
_onTouchMove: function(e) {
|
|
3268
3279
|
if (Sc) {
|
|
3269
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
3280
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = J && Is(J, !0), o = J && a && a.a, s = J && a && a.d, c = zc && Pc && Us(Pc), l = (i.clientX - Sc.clientX + r.x) / (o || 1) + (c ? c[0] - Fc[0] : 0) / (o || 1), u = (i.clientY - Sc.clientY + r.y) / (s || 1) + (c ? c[1] - Fc[1] : 0) / (s || 1);
|
|
3270
3281
|
if (!Q.active && !yc) {
|
|
3271
3282
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3272
3283
|
this._onDragStart(e, !0);
|
|
3273
3284
|
}
|
|
3274
|
-
if (
|
|
3285
|
+
if (J) {
|
|
3275
3286
|
a ? (a.e += l - (wc || 0), a.f += u - (Tc || 0)) : a = {
|
|
3276
3287
|
a: 1,
|
|
3277
3288
|
b: 0,
|
|
@@ -3281,33 +3292,33 @@ Q.prototype = {
|
|
|
3281
3292
|
f: u
|
|
3282
3293
|
};
|
|
3283
3294
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3284
|
-
|
|
3295
|
+
W(J, "webkitTransform", d), W(J, "mozTransform", d), W(J, "msTransform", d), W(J, "transform", d), wc = l, Tc = u, Cc = i;
|
|
3285
3296
|
}
|
|
3286
3297
|
e.cancelable && e.preventDefault();
|
|
3287
3298
|
}
|
|
3288
3299
|
},
|
|
3289
3300
|
_appendGhost: function() {
|
|
3290
|
-
if (!
|
|
3291
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
3292
|
-
if (
|
|
3293
|
-
for (
|
|
3294
|
-
|
|
3301
|
+
if (!J) {
|
|
3302
|
+
var e = this.options.fallbackOnBody ? document.body : Y, t = G(K, !0, zc, !0, e), n = this.options;
|
|
3303
|
+
if (zc) {
|
|
3304
|
+
for (Pc = e; W(Pc, "position") === "static" && W(Pc, "transform") === "none" && Pc !== document;) Pc = Pc.parentNode;
|
|
3305
|
+
Pc !== document.body && Pc !== document.documentElement ? (Pc === document && (Pc = Rs()), t.top += Pc.scrollTop, t.left += Pc.scrollLeft) : Pc = Rs(), Fc = Us(Pc);
|
|
3295
3306
|
}
|
|
3296
|
-
|
|
3307
|
+
J = K.cloneNode(!0), Fs(J, n.ghostClass, !1), Fs(J, n.fallbackClass, !0), Fs(J, n.dragClass, !0), W(J, "transition", ""), W(J, "transform", ""), W(J, "box-sizing", "border-box"), W(J, "margin", 0), W(J, "top", t.top), W(J, "left", t.left), W(J, "width", t.width), W(J, "height", t.height), W(J, "opacity", "0.8"), W(J, "position", zc ? "absolute" : "fixed"), W(J, "zIndex", "100000"), W(J, "pointerEvents", "none"), Q.ghost = J, e.appendChild(J), W(J, "transform-origin", Ec / parseInt(J.style.width) * 100 + "% " + Dc / parseInt(J.style.height) * 100 + "%");
|
|
3297
3308
|
}
|
|
3298
3309
|
},
|
|
3299
3310
|
_onDragStart: function(e, t) {
|
|
3300
3311
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3301
|
-
lc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (lc("setupClone", this), Q.eventCanceled || (
|
|
3302
|
-
lc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide ||
|
|
3312
|
+
lc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (lc("setupClone", this), Q.eventCanceled || (X = Qs(K), X.removeAttribute("id"), X.draggable = !1, X.style["will-change"] = "", this._hideClone(), Fs(X, this.options.chosenClass, !1), Q.clone = X), n.cloneId = sl(function() {
|
|
3313
|
+
lc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || Y.insertBefore(X, K), n._hideClone(), uc({
|
|
3303
3314
|
sortable: n,
|
|
3304
3315
|
name: "clone"
|
|
3305
3316
|
}));
|
|
3306
|
-
}), !t && Fs(
|
|
3317
|
+
}), !t && Fs(K, i.dragClass, !0), t ? (bc = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (U(document, "mouseup", n._onDrop), U(document, "touchend", n._onDrop), U(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, K)), H(document, "drop", n), W(K, "transform", "translateZ(0)")), yc = !0, n._dragStartId = sl(n._dragStarted.bind(n, t, e)), H(document, "selectstart", n), Oc = !0, Ds && W(document.body, "user-select", "none"));
|
|
3307
3318
|
},
|
|
3308
3319
|
_onDragOver: function(e) {
|
|
3309
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = vc === s, u = o.sort, d =
|
|
3310
|
-
if (
|
|
3320
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = vc === s, u = o.sort, d = Z || c, f, p = this, m = !1;
|
|
3321
|
+
if (Ic) return;
|
|
3311
3322
|
function h(o, s) {
|
|
3312
3323
|
lc(o, p, gs({
|
|
3313
3324
|
evt: e,
|
|
@@ -3321,7 +3332,7 @@ Q.prototype = {
|
|
|
3321
3332
|
target: n,
|
|
3322
3333
|
completed: _,
|
|
3323
3334
|
onMove: function(n, i) {
|
|
3324
|
-
return
|
|
3335
|
+
return Qc(Y, t, K, r, n, G(n), e, i);
|
|
3325
3336
|
},
|
|
3326
3337
|
changed: v
|
|
3327
3338
|
}, s));
|
|
@@ -3330,12 +3341,12 @@ Q.prototype = {
|
|
|
3330
3341
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3331
3342
|
}
|
|
3332
3343
|
function _(r) {
|
|
3333
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Fs(
|
|
3344
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Fs(K, Z ? Z.options.ghostClass : c.options.ghostClass, !1), Fs(K, o.ghostClass, !0)), Z !== p && p !== Q.active ? Z = p : p === Q.active && Z && (Z = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3334
3345
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3335
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
3346
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === K && !K.animated || n === t && !n.animated) && (kc = null), !o.dragoverBubble && !e.rootEl && n !== document && (K.parentNode[ec]._isOutsideThisEl(e.target), !r && Yc(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3336
3347
|
}
|
|
3337
3348
|
function v() {
|
|
3338
|
-
hc = Hs(
|
|
3349
|
+
hc = Hs(K), _c = Hs(K, o.draggable), uc({
|
|
3339
3350
|
sortable: p,
|
|
3340
3351
|
name: "change",
|
|
3341
3352
|
toEl: t,
|
|
@@ -3345,100 +3356,100 @@ Q.prototype = {
|
|
|
3345
3356
|
});
|
|
3346
3357
|
}
|
|
3347
3358
|
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ns(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3348
|
-
if (
|
|
3349
|
-
if (bc = !1, c && !o.disabled && (l ? u || (a =
|
|
3350
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
3351
|
-
if (a) return
|
|
3359
|
+
if (K.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3360
|
+
if (bc = !1, c && !o.disabled && (l ? u || (a = q !== Y) : Z === this || (this.lastPutMode = vc.checkPull(this, c, K, e)) && s.checkPut(this, c, K, e))) {
|
|
3361
|
+
if (f = this._getDirection(e, n) === "vertical", r = G(K), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3362
|
+
if (a) return q = Y, g(), this._hideClone(), h("revert"), Q.eventCanceled || (dc ? Y.insertBefore(K, dc) : Y.appendChild(K)), _(!0);
|
|
3352
3363
|
var y = Vs(t, o.draggable);
|
|
3353
|
-
if (!y ||
|
|
3354
|
-
if (y ===
|
|
3355
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
3356
|
-
} else if (y &&
|
|
3364
|
+
if (!y || nl(e, f, this) && !y.animated) {
|
|
3365
|
+
if (y === K) return _(!1);
|
|
3366
|
+
if (y && t === e.target && (n = y), n && (i = G(n)), Qc(Y, t, K, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(K, y.nextSibling) : t.appendChild(K), q = t, v(), _(!0);
|
|
3367
|
+
} else if (y && tl(e, f, this)) {
|
|
3357
3368
|
var b = Bs(t, 0, o, !0);
|
|
3358
|
-
if (b ===
|
|
3359
|
-
if (n = b, i =
|
|
3369
|
+
if (b === K) return _(!1);
|
|
3370
|
+
if (n = b, i = G(n), Qc(Y, t, K, r, n, i, e, !1) !== !1) return g(), t.insertBefore(K, b), q = t, v(), _(!0);
|
|
3360
3371
|
} else if (n.parentNode === t) {
|
|
3361
|
-
i =
|
|
3362
|
-
var x = 0, S, C =
|
|
3363
|
-
kc !== n && (S = i[T], jc = !1, Mc = !w && o.invertSwap || C), x =
|
|
3372
|
+
i = G(n);
|
|
3373
|
+
var x = 0, S, C = K.parentNode !== t, w = !Wc(K.animated && K.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = zs(n, "top", "top") || zs(K, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
3374
|
+
kc !== n && (S = i[T], jc = !1, Mc = !w && o.invertSwap || C), x = rl(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Mc, kc === n);
|
|
3364
3375
|
var D;
|
|
3365
3376
|
if (x !== 0) {
|
|
3366
|
-
var O = Hs(
|
|
3377
|
+
var O = Hs(K);
|
|
3367
3378
|
do
|
|
3368
|
-
O -= x, D =
|
|
3369
|
-
while (D && (
|
|
3379
|
+
O -= x, D = q.children[O];
|
|
3380
|
+
while (D && (W(D, "display") === "none" || D === J));
|
|
3370
3381
|
}
|
|
3371
3382
|
if (x === 0 || D === n) return _(!1);
|
|
3372
3383
|
kc = n, Ac = x;
|
|
3373
3384
|
var k = n.nextElementSibling, A = !1;
|
|
3374
3385
|
A = x === 1;
|
|
3375
|
-
var j =
|
|
3376
|
-
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1),
|
|
3386
|
+
var j = Qc(Y, t, K, r, n, i, e, A);
|
|
3387
|
+
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1), Ic = !0, setTimeout(el, 30), g(), A && !k ? t.appendChild(K) : n.parentNode.insertBefore(K, A ? k : n), E && Zs(E, 0, ee - E.scrollTop), q = K.parentNode, S !== void 0 && !Mc && (Nc = Math.abs(S - G(n)[T])), v(), _(!0);
|
|
3377
3388
|
}
|
|
3378
|
-
if (t.contains(
|
|
3389
|
+
if (t.contains(K)) return _(!1);
|
|
3379
3390
|
}
|
|
3380
3391
|
return !1;
|
|
3381
3392
|
},
|
|
3382
3393
|
_ignoreWhileAnimating: null,
|
|
3383
3394
|
_offMoveEvents: function() {
|
|
3384
|
-
|
|
3395
|
+
U(document, "mousemove", this._onTouchMove), U(document, "touchmove", this._onTouchMove), U(document, "pointermove", this._onTouchMove), U(document, "dragover", Yc), U(document, "mousemove", Yc), U(document, "touchmove", Yc);
|
|
3385
3396
|
},
|
|
3386
3397
|
_offUpEvents: function() {
|
|
3387
3398
|
var e = this.el.ownerDocument;
|
|
3388
|
-
|
|
3399
|
+
U(e, "mouseup", this._onDrop), U(e, "touchend", this._onDrop), U(e, "pointerup", this._onDrop), U(e, "touchcancel", this._onDrop), U(document, "selectstart", this);
|
|
3389
3400
|
},
|
|
3390
3401
|
_onDrop: function(e) {
|
|
3391
3402
|
var t = this.el, n = this.options;
|
|
3392
|
-
hc = Hs(
|
|
3403
|
+
hc = Hs(K), _c = Hs(K, n.draggable), lc("drop", this, { evt: e }), q = K && K.parentNode, hc = Hs(K), _c = Hs(K, n.draggable), Q.eventCanceled || (yc = !1, Mc = !1, jc = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), cl(this.cloneId), cl(this._dragStartId), this.nativeDraggable && (U(document, "drop", this), U(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ds && W(document.body, "user-select", ""), W(K, "transform", ""), e && (Oc && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), J && J.parentNode && J.parentNode.removeChild(J), (Y === q || Z && Z.lastPutMode !== "clone") && X && X.parentNode && X.parentNode.removeChild(X), K && (this.nativeDraggable && U(K, "dragend", this), $c(K), K.style["will-change"] = "", Oc && !yc && Fs(K, Z ? Z.options.ghostClass : this.options.ghostClass, !1), Fs(K, this.options.chosenClass, !1), uc({
|
|
3393
3404
|
sortable: this,
|
|
3394
3405
|
name: "unchoose",
|
|
3395
|
-
toEl:
|
|
3406
|
+
toEl: q,
|
|
3396
3407
|
newIndex: null,
|
|
3397
3408
|
newDraggableIndex: null,
|
|
3398
3409
|
originalEvent: e
|
|
3399
|
-
}),
|
|
3410
|
+
}), Y === q ? hc !== mc && hc >= 0 && (uc({
|
|
3400
3411
|
sortable: this,
|
|
3401
3412
|
name: "update",
|
|
3402
|
-
toEl:
|
|
3413
|
+
toEl: q,
|
|
3403
3414
|
originalEvent: e
|
|
3404
3415
|
}), uc({
|
|
3405
3416
|
sortable: this,
|
|
3406
3417
|
name: "sort",
|
|
3407
|
-
toEl:
|
|
3418
|
+
toEl: q,
|
|
3408
3419
|
originalEvent: e
|
|
3409
3420
|
})) : (hc >= 0 && (uc({
|
|
3410
|
-
rootEl:
|
|
3421
|
+
rootEl: q,
|
|
3411
3422
|
name: "add",
|
|
3412
|
-
toEl:
|
|
3413
|
-
fromEl:
|
|
3423
|
+
toEl: q,
|
|
3424
|
+
fromEl: Y,
|
|
3414
3425
|
originalEvent: e
|
|
3415
3426
|
}), uc({
|
|
3416
3427
|
sortable: this,
|
|
3417
3428
|
name: "remove",
|
|
3418
|
-
toEl:
|
|
3429
|
+
toEl: q,
|
|
3419
3430
|
originalEvent: e
|
|
3420
3431
|
}), uc({
|
|
3421
|
-
rootEl:
|
|
3432
|
+
rootEl: q,
|
|
3422
3433
|
name: "sort",
|
|
3423
|
-
toEl:
|
|
3424
|
-
fromEl:
|
|
3434
|
+
toEl: q,
|
|
3435
|
+
fromEl: Y,
|
|
3425
3436
|
originalEvent: e
|
|
3426
3437
|
}), uc({
|
|
3427
3438
|
sortable: this,
|
|
3428
3439
|
name: "sort",
|
|
3429
|
-
toEl:
|
|
3440
|
+
toEl: q,
|
|
3430
3441
|
originalEvent: e
|
|
3431
|
-
})),
|
|
3442
|
+
})), Z && Z.save()), Q.active && ((hc == null || hc === -1) && (hc = mc, _c = gc), uc({
|
|
3432
3443
|
sortable: this,
|
|
3433
3444
|
name: "end",
|
|
3434
|
-
toEl:
|
|
3445
|
+
toEl: q,
|
|
3435
3446
|
originalEvent: e
|
|
3436
3447
|
}), this.save())))), this._nulling();
|
|
3437
3448
|
},
|
|
3438
3449
|
_nulling: function() {
|
|
3439
|
-
lc("nulling", this),
|
|
3450
|
+
lc("nulling", this), Y = K = q = J = dc = X = fc = pc = Sc = Cc = Oc = hc = _c = mc = gc = kc = Ac = Z = vc = Q.dragged = Q.ghost = Q.clone = Q.active = null, Lc.forEach(function(e) {
|
|
3440
3451
|
e.checked = !0;
|
|
3441
|
-
}),
|
|
3452
|
+
}), Lc.length = wc = Tc = 0;
|
|
3442
3453
|
},
|
|
3443
3454
|
handleEvent: function(e) {
|
|
3444
3455
|
switch (e.type) {
|
|
@@ -3448,13 +3459,13 @@ Q.prototype = {
|
|
|
3448
3459
|
break;
|
|
3449
3460
|
case "dragenter":
|
|
3450
3461
|
case "dragover":
|
|
3451
|
-
|
|
3462
|
+
K && (this._onDragOver(e), Zc(e));
|
|
3452
3463
|
break;
|
|
3453
3464
|
case "selectstart": e.preventDefault();
|
|
3454
3465
|
}
|
|
3455
3466
|
},
|
|
3456
3467
|
toArray: function() {
|
|
3457
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ns(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) ||
|
|
3468
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ns(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || al(t));
|
|
3458
3469
|
return e;
|
|
3459
3470
|
},
|
|
3460
3471
|
sort: function(e, t) {
|
|
@@ -3477,89 +3488,89 @@ Q.prototype = {
|
|
|
3477
3488
|
var n = this.options;
|
|
3478
3489
|
if (t === void 0) return n[e];
|
|
3479
3490
|
var r = oc.modifyOption(this, e, t);
|
|
3480
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3491
|
+
n[e] = r === void 0 ? t : r, e === "group" && Kc(n);
|
|
3481
3492
|
},
|
|
3482
3493
|
destroy: function() {
|
|
3483
3494
|
lc("destroy", this);
|
|
3484
3495
|
var e = this.el;
|
|
3485
|
-
e[ec] = null,
|
|
3496
|
+
e[ec] = null, U(e, "mousedown", this._onTapStart), U(e, "touchstart", this._onTapStart), U(e, "pointerdown", this._onTapStart), this.nativeDraggable && (U(e, "dragover", this), U(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3486
3497
|
e.removeAttribute("draggable");
|
|
3487
3498
|
}), this._onDrop(), this._disableDelayedDragEvents(), xc.splice(xc.indexOf(this.el), 1), this.el = e = null;
|
|
3488
3499
|
},
|
|
3489
3500
|
_hideClone: function() {
|
|
3490
3501
|
if (!pc) {
|
|
3491
3502
|
if (lc("hideClone", this), Q.eventCanceled) return;
|
|
3492
|
-
|
|
3503
|
+
W(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X), pc = !0;
|
|
3493
3504
|
}
|
|
3494
3505
|
},
|
|
3495
3506
|
_showClone: function(e) {
|
|
3496
3507
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3497
3508
|
else if (pc) {
|
|
3498
3509
|
if (lc("showClone", this), Q.eventCanceled) return;
|
|
3499
|
-
|
|
3510
|
+
K.parentNode == Y && !this.options.group.revertClone ? Y.insertBefore(X, K) : dc ? Y.insertBefore(X, dc) : Y.appendChild(X), this.options.group.revertClone && this.animate(K, X), W(X, "display", ""), pc = !1;
|
|
3500
3511
|
}
|
|
3501
3512
|
}
|
|
3502
3513
|
};
|
|
3503
|
-
function
|
|
3514
|
+
function Zc(e) {
|
|
3504
3515
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3505
3516
|
}
|
|
3506
|
-
function
|
|
3517
|
+
function Qc(e, t, n, r, i, a, o, s) {
|
|
3507
3518
|
var c, l = e[ec], u = l.options.onMove, d;
|
|
3508
3519
|
return window.CustomEvent && !ws && !Ts ? c = new CustomEvent("move", {
|
|
3509
3520
|
bubbles: !0,
|
|
3510
3521
|
cancelable: !0
|
|
3511
|
-
}) : (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 ||
|
|
3522
|
+
}) : (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 || G(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3512
3523
|
}
|
|
3513
|
-
function
|
|
3524
|
+
function $c(e) {
|
|
3514
3525
|
e.draggable = !1;
|
|
3515
3526
|
}
|
|
3516
|
-
function
|
|
3517
|
-
|
|
3527
|
+
function el() {
|
|
3528
|
+
Ic = !1;
|
|
3518
3529
|
}
|
|
3519
|
-
function
|
|
3520
|
-
var r =
|
|
3530
|
+
function tl(e, t, n) {
|
|
3531
|
+
var r = G(Bs(n.el, 0, n.options, !0)), i = $s(n.el, n.options, J), a = 10;
|
|
3521
3532
|
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;
|
|
3522
3533
|
}
|
|
3523
|
-
function
|
|
3524
|
-
var r =
|
|
3534
|
+
function nl(e, t, n) {
|
|
3535
|
+
var r = G(Vs(n.el, n.options.draggable)), i = $s(n.el, n.options, J), a = 10;
|
|
3525
3536
|
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;
|
|
3526
3537
|
}
|
|
3527
|
-
function
|
|
3538
|
+
function rl(e, t, n, r, i, a, o, s) {
|
|
3528
3539
|
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;
|
|
3529
3540
|
if (!o) {
|
|
3530
3541
|
if (s && Nc < l * i) {
|
|
3531
3542
|
if (!jc && (Ac === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (jc = !0), jc) f = !0;
|
|
3532
3543
|
else if (Ac === 1 ? c < u + Nc : c > d - Nc) return -Ac;
|
|
3533
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3544
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return il(t);
|
|
3534
3545
|
}
|
|
3535
3546
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3536
3547
|
}
|
|
3537
|
-
function rl(e) {
|
|
3538
|
-
return Hs(G) < Hs(e) ? 1 : -1;
|
|
3539
|
-
}
|
|
3540
3548
|
function il(e) {
|
|
3549
|
+
return Hs(K) < Hs(e) ? 1 : -1;
|
|
3550
|
+
}
|
|
3551
|
+
function al(e) {
|
|
3541
3552
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3542
3553
|
return r.toString(36);
|
|
3543
3554
|
}
|
|
3544
|
-
function
|
|
3545
|
-
|
|
3555
|
+
function ol(e) {
|
|
3556
|
+
Lc.length = 0;
|
|
3546
3557
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3547
3558
|
var r = t[n];
|
|
3548
|
-
r.checked &&
|
|
3559
|
+
r.checked && Lc.push(r);
|
|
3549
3560
|
}
|
|
3550
3561
|
}
|
|
3551
|
-
function
|
|
3562
|
+
function sl(e) {
|
|
3552
3563
|
return setTimeout(e, 0);
|
|
3553
3564
|
}
|
|
3554
|
-
function
|
|
3565
|
+
function cl(e) {
|
|
3555
3566
|
return clearTimeout(e);
|
|
3556
3567
|
}
|
|
3557
|
-
|
|
3568
|
+
Rc && H(document, "touchmove", function(e) {
|
|
3558
3569
|
(Q.active || yc) && e.cancelable && e.preventDefault();
|
|
3559
3570
|
}), Q.utils = {
|
|
3560
|
-
on:
|
|
3561
|
-
off:
|
|
3562
|
-
css:
|
|
3571
|
+
on: H,
|
|
3572
|
+
off: U,
|
|
3573
|
+
css: W,
|
|
3563
3574
|
find: Ls,
|
|
3564
3575
|
is: function(e, t) {
|
|
3565
3576
|
return !!Ns(e, t, e, !1);
|
|
@@ -3570,9 +3581,9 @@ Lc && V(document, "touchmove", function(e) {
|
|
|
3570
3581
|
toggleClass: Fs,
|
|
3571
3582
|
clone: Qs,
|
|
3572
3583
|
index: Hs,
|
|
3573
|
-
nextTick:
|
|
3574
|
-
cancelNextTick:
|
|
3575
|
-
detectDirection:
|
|
3584
|
+
nextTick: sl,
|
|
3585
|
+
cancelNextTick: cl,
|
|
3586
|
+
detectDirection: Uc,
|
|
3576
3587
|
getChild: Bs
|
|
3577
3588
|
}, Q.get = function(e) {
|
|
3578
3589
|
return e[ec];
|
|
@@ -3585,8 +3596,8 @@ Lc && V(document, "touchmove", function(e) {
|
|
|
3585
3596
|
}, Q.create = function(e, t) {
|
|
3586
3597
|
return new Q(e, t);
|
|
3587
3598
|
}, Q.version = Ss;
|
|
3588
|
-
var $ = [],
|
|
3589
|
-
function
|
|
3599
|
+
var $ = [], ll, ul, dl = !1, fl, pl, ml, hl;
|
|
3600
|
+
function gl() {
|
|
3590
3601
|
function e() {
|
|
3591
3602
|
for (var e in this.defaults = {
|
|
3592
3603
|
scroll: !0,
|
|
@@ -3599,36 +3610,36 @@ function hl() {
|
|
|
3599
3610
|
return e.prototype = {
|
|
3600
3611
|
dragStarted: function(e) {
|
|
3601
3612
|
var t = e.originalEvent;
|
|
3602
|
-
this.sortable.nativeDraggable ?
|
|
3613
|
+
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? H(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? H(document, "touchmove", this._handleFallbackAutoScroll) : H(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3603
3614
|
},
|
|
3604
3615
|
dragOverCompleted: function(e) {
|
|
3605
3616
|
var t = e.originalEvent;
|
|
3606
3617
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3607
3618
|
},
|
|
3608
3619
|
drop: function() {
|
|
3609
|
-
this.sortable.nativeDraggable ?
|
|
3620
|
+
this.sortable.nativeDraggable ? U(document, "dragover", this._handleAutoScroll) : (U(document, "pointermove", this._handleFallbackAutoScroll), U(document, "touchmove", this._handleFallbackAutoScroll), U(document, "mousemove", this._handleFallbackAutoScroll)), vl(), _l(), Xs();
|
|
3610
3621
|
},
|
|
3611
3622
|
nulling: function() {
|
|
3612
|
-
|
|
3623
|
+
ml = ul = ll = dl = hl = fl = pl = null, $.length = 0;
|
|
3613
3624
|
},
|
|
3614
3625
|
_handleFallbackAutoScroll: function(e) {
|
|
3615
3626
|
this._handleAutoScroll(e, !0);
|
|
3616
3627
|
},
|
|
3617
3628
|
_handleAutoScroll: function(e, t) {
|
|
3618
3629
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3619
|
-
if (
|
|
3620
|
-
|
|
3630
|
+
if (ml = e, t || this.options.forceAutoScrollFallback || Ts || ws || Ds) {
|
|
3631
|
+
yl(e, this.options, a, t);
|
|
3621
3632
|
var o = Gs(a, !0);
|
|
3622
|
-
|
|
3633
|
+
dl && (!hl || r !== fl || i !== pl) && (hl && vl(), hl = setInterval(function() {
|
|
3623
3634
|
var a = Gs(document.elementFromPoint(r, i), !0);
|
|
3624
|
-
a !== o && (o = a,
|
|
3625
|
-
}, 10),
|
|
3635
|
+
a !== o && (o = a, _l()), yl(e, n.options, a, t);
|
|
3636
|
+
}, 10), fl = r, pl = i);
|
|
3626
3637
|
} else {
|
|
3627
3638
|
if (!this.options.bubbleScroll || Gs(a, !0) === Rs()) {
|
|
3628
|
-
|
|
3639
|
+
_l();
|
|
3629
3640
|
return;
|
|
3630
3641
|
}
|
|
3631
|
-
|
|
3642
|
+
yl(e, this.options, Gs(a, !1), !1);
|
|
3632
3643
|
}
|
|
3633
3644
|
}
|
|
3634
3645
|
}, ys(e, {
|
|
@@ -3636,33 +3647,33 @@ function hl() {
|
|
|
3636
3647
|
initializeByDefault: !0
|
|
3637
3648
|
});
|
|
3638
3649
|
}
|
|
3639
|
-
function
|
|
3650
|
+
function _l() {
|
|
3640
3651
|
$.forEach(function(e) {
|
|
3641
3652
|
clearInterval(e.pid);
|
|
3642
3653
|
}), $ = [];
|
|
3643
3654
|
}
|
|
3644
|
-
function
|
|
3645
|
-
clearInterval(
|
|
3655
|
+
function vl() {
|
|
3656
|
+
clearInterval(hl);
|
|
3646
3657
|
}
|
|
3647
|
-
var
|
|
3658
|
+
var yl = Ys(function(e, t, n, r) {
|
|
3648
3659
|
if (t.scroll) {
|
|
3649
3660
|
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Rs(), l = !1, u;
|
|
3650
|
-
|
|
3651
|
-
var d = 0, f =
|
|
3661
|
+
ul !== n && (ul = n, _l(), ll = t.scroll, u = t.scrollFn, ll === !0 && (ll = Gs(n, !0)));
|
|
3662
|
+
var d = 0, f = ll;
|
|
3652
3663
|
do {
|
|
3653
|
-
var p = f, m =
|
|
3664
|
+
var p = f, m = G(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 = W(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
3654
3665
|
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"));
|
|
3655
3666
|
var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
|
|
3656
3667
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3657
3668
|
($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3658
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3669
|
+
r && this.layer === 0 && Q.active._onTouchMove(ml);
|
|
3659
3670
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3660
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[ec], n, t, e,
|
|
3671
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[ec], n, t, e, ml, $[this.layer].el) !== "continue" || Zs($[this.layer].el, n, t);
|
|
3661
3672
|
}.bind({ layer: d }), 24))), d++;
|
|
3662
3673
|
} while (t.bubbleScroll && f !== c && (f = Gs(f, !1)));
|
|
3663
|
-
|
|
3674
|
+
dl = l;
|
|
3664
3675
|
}
|
|
3665
|
-
}, 30),
|
|
3676
|
+
}, 30), bl = function(e) {
|
|
3666
3677
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3667
3678
|
if (t) {
|
|
3668
3679
|
var c = n || i;
|
|
@@ -3674,8 +3685,8 @@ var vl = Ys(function(e, t, n, r) {
|
|
|
3674
3685
|
}));
|
|
3675
3686
|
}
|
|
3676
3687
|
};
|
|
3677
|
-
function
|
|
3678
|
-
|
|
3688
|
+
function xl() {}
|
|
3689
|
+
xl.prototype = {
|
|
3679
3690
|
startIndex: null,
|
|
3680
3691
|
dragStart: function(e) {
|
|
3681
3692
|
var t = e.oldDraggableIndex;
|
|
@@ -3687,48 +3698,48 @@ bl.prototype = {
|
|
|
3687
3698
|
var r = Bs(this.sortable.el, this.startIndex, this.options);
|
|
3688
3699
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3689
3700
|
},
|
|
3690
|
-
drop:
|
|
3691
|
-
}, ys(
|
|
3692
|
-
function
|
|
3693
|
-
|
|
3701
|
+
drop: bl
|
|
3702
|
+
}, ys(xl, { pluginName: "revertOnSpill" });
|
|
3703
|
+
function Sl() {}
|
|
3704
|
+
Sl.prototype = {
|
|
3694
3705
|
onSpill: function(e) {
|
|
3695
3706
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3696
3707
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3697
3708
|
},
|
|
3698
|
-
drop:
|
|
3699
|
-
}, ys(
|
|
3700
|
-
function
|
|
3709
|
+
drop: bl
|
|
3710
|
+
}, ys(Sl, { pluginName: "removeOnSpill" }), Q.mount(new gl()), Q.mount(Sl, xl);
|
|
3711
|
+
function Cl(e) {
|
|
3701
3712
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3702
3713
|
}
|
|
3703
|
-
function
|
|
3714
|
+
function wl(e) {
|
|
3704
3715
|
O() && ne(e);
|
|
3705
3716
|
}
|
|
3706
|
-
function
|
|
3717
|
+
function Tl(e) {
|
|
3707
3718
|
O() ? s(e) : _(e);
|
|
3708
3719
|
}
|
|
3709
|
-
var
|
|
3710
|
-
function
|
|
3711
|
-
|
|
3720
|
+
var El = null, Dl = null;
|
|
3721
|
+
function Ol(e = null, t = null) {
|
|
3722
|
+
El = e, Dl = t;
|
|
3712
3723
|
}
|
|
3713
|
-
function
|
|
3724
|
+
function kl() {
|
|
3714
3725
|
return {
|
|
3715
|
-
data:
|
|
3716
|
-
clonedData:
|
|
3726
|
+
data: El,
|
|
3727
|
+
clonedData: Dl
|
|
3717
3728
|
};
|
|
3718
3729
|
}
|
|
3719
|
-
var
|
|
3720
|
-
function
|
|
3730
|
+
var Al = Symbol("cloneElement");
|
|
3731
|
+
function jl(...e) {
|
|
3721
3732
|
let t = O()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3722
3733
|
Array.isArray(A(i)) || (a = i, i = null);
|
|
3723
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3734
|
+
let o = null, { immediate: s = !0, clone: l = Cl, forceFallback: u, fallbackOnBody: d, customUpdate: f } = A(a) ?? {};
|
|
3724
3735
|
function p(e) {
|
|
3725
3736
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3726
3737
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3727
3738
|
let s = A(A(i)?.[r]), c = l(s);
|
|
3728
|
-
|
|
3739
|
+
Ol(s, c), a[Al] = c;
|
|
3729
3740
|
}
|
|
3730
3741
|
function m(e) {
|
|
3731
|
-
let t = e.item[
|
|
3742
|
+
let t = e.item[Al];
|
|
3732
3743
|
if (!is(t)) {
|
|
3733
3744
|
if (ss(e.item), w(i)) {
|
|
3734
3745
|
let n = [...A(i)];
|
|
@@ -3774,7 +3785,7 @@ function Al(...e) {
|
|
|
3774
3785
|
n = null;
|
|
3775
3786
|
}
|
|
3776
3787
|
_(() => {
|
|
3777
|
-
if (
|
|
3788
|
+
if (Ol(), o) throw o;
|
|
3778
3789
|
});
|
|
3779
3790
|
}
|
|
3780
3791
|
let y = {
|
|
@@ -3791,7 +3802,7 @@ function Al(...e) {
|
|
|
3791
3802
|
function x() {
|
|
3792
3803
|
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r = Yo(e, ["immediate", "clone"]);
|
|
3793
3804
|
return fs(r, (e, t) => {
|
|
3794
|
-
ps(e) && (r[e] = (e, ...n) => (ms(e,
|
|
3805
|
+
ps(e) && (r[e] = (e, ...n) => (ms(e, kl()), t(e, ...n)));
|
|
3795
3806
|
}), us(i === null ? {} : y, r);
|
|
3796
3807
|
}
|
|
3797
3808
|
let S = (e) => {
|
|
@@ -3811,15 +3822,15 @@ function Al(...e) {
|
|
|
3811
3822
|
toArray: () => o?.toArray(),
|
|
3812
3823
|
closest: (...e) => o?.closest(...e)
|
|
3813
3824
|
};
|
|
3814
|
-
return
|
|
3825
|
+
return Tl(() => {
|
|
3815
3826
|
s && S();
|
|
3816
|
-
}),
|
|
3827
|
+
}), wl(C.destroy), Jo({
|
|
3817
3828
|
start: S,
|
|
3818
3829
|
pause: () => C?.option("disabled", !0),
|
|
3819
3830
|
resume: () => C?.option("disabled", !1)
|
|
3820
3831
|
}, C);
|
|
3821
3832
|
}
|
|
3822
|
-
var
|
|
3833
|
+
var Ml = [
|
|
3823
3834
|
"update",
|
|
3824
3835
|
"start",
|
|
3825
3836
|
"add",
|
|
@@ -3832,7 +3843,7 @@ var jl = [
|
|
|
3832
3843
|
"clone",
|
|
3833
3844
|
"move",
|
|
3834
3845
|
"change"
|
|
3835
|
-
],
|
|
3846
|
+
], Nl = [
|
|
3836
3847
|
"clone",
|
|
3837
3848
|
"animation",
|
|
3838
3849
|
"ghostClass",
|
|
@@ -3876,17 +3887,17 @@ var jl = [
|
|
|
3876
3887
|
"tag",
|
|
3877
3888
|
"target",
|
|
3878
3889
|
"customUpdate",
|
|
3879
|
-
...
|
|
3880
|
-
],
|
|
3890
|
+
...Ml.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3891
|
+
], Pl = B({
|
|
3881
3892
|
name: "VueDraggable",
|
|
3882
3893
|
model: {
|
|
3883
3894
|
prop: "modelValue",
|
|
3884
3895
|
event: "update:modelValue"
|
|
3885
3896
|
},
|
|
3886
|
-
props:
|
|
3887
|
-
emits: ["update:modelValue", ...
|
|
3897
|
+
props: Nl,
|
|
3898
|
+
emits: ["update:modelValue", ...Ml],
|
|
3888
3899
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3889
|
-
let a =
|
|
3900
|
+
let a = Ml.reduce((e, t) => {
|
|
3890
3901
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3891
3902
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3892
3903
|
}, {}), o = k(() => {
|
|
@@ -3898,24 +3909,24 @@ var jl = [
|
|
|
3898
3909
|
}), s = k({
|
|
3899
3910
|
get: () => e.modelValue,
|
|
3900
3911
|
set: (e) => n("update:modelValue", e)
|
|
3901
|
-
}), c = M(), l = b(
|
|
3912
|
+
}), c = M(), l = b(jl(e.target || c, s, o));
|
|
3902
3913
|
return r(l), () => x(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3903
3914
|
}
|
|
3904
|
-
}),
|
|
3915
|
+
}), Fl = {
|
|
3905
3916
|
mounted: "mounted",
|
|
3906
3917
|
unmounted: "unmounted"
|
|
3907
3918
|
};
|
|
3908
|
-
|
|
3919
|
+
Fl.mounted, Fl.unmounted;
|
|
3909
3920
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3910
|
-
var
|
|
3921
|
+
var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
3911
3922
|
key: 0,
|
|
3912
3923
|
"data-testid": "hero-image-hint",
|
|
3913
3924
|
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)]"
|
|
3914
|
-
},
|
|
3925
|
+
}, Rl = {
|
|
3915
3926
|
key: 0,
|
|
3916
3927
|
"data-testid": "section-drop-hint",
|
|
3917
3928
|
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)]"
|
|
3918
|
-
},
|
|
3929
|
+
}, zl = /* @__PURE__ */ B({
|
|
3919
3930
|
__name: "SectionBlock",
|
|
3920
3931
|
props: {
|
|
3921
3932
|
block: {},
|
|
@@ -3930,9 +3941,9 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
3930
3941
|
button: fa,
|
|
3931
3942
|
divider: Ea,
|
|
3932
3943
|
custom: wa
|
|
3933
|
-
}, n = e, { t: r } =
|
|
3934
|
-
g(
|
|
3935
|
-
let u =
|
|
3944
|
+
}, n = e, { t: r } = ce(), i = bn(Mn, "SectionBlock"), { displayBlock: o } = Nt(i), s = k(() => n.sourceBlock ?? n.block), c = z(hn, k(() => /* @__PURE__ */ new Set()));
|
|
3945
|
+
g(hn, k(() => /* @__PURE__ */ new Set([...c.value, ...Object.entries(s.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
3946
|
+
let u = z(xn, null), f = z(yn, null), _ = z(fn, {}), b = z(rn, null), x = z(sn, null);
|
|
3936
3947
|
function w(e) {
|
|
3937
3948
|
if (b?.value) return;
|
|
3938
3949
|
let t = _.savedBlocks;
|
|
@@ -3983,7 +3994,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
3983
3994
|
}
|
|
3984
3995
|
let F = k(() => {
|
|
3985
3996
|
if (i.state.previewMode) return !1;
|
|
3986
|
-
let e =
|
|
3997
|
+
let e = Be(n.block);
|
|
3987
3998
|
return e !== null && !e.applied && e.reason === "image";
|
|
3988
3999
|
});
|
|
3989
4000
|
function I(e) {
|
|
@@ -3992,23 +4003,23 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
3992
4003
|
function ae(e) {
|
|
3993
4004
|
return O(e).length === 0 && i.state.previewMode;
|
|
3994
4005
|
}
|
|
3995
|
-
function
|
|
4006
|
+
function oe(e, t) {
|
|
3996
4007
|
b?.value || Qa(i, t, n.block.id, e);
|
|
3997
4008
|
}
|
|
3998
|
-
function
|
|
4009
|
+
function B(e) {
|
|
3999
4010
|
return Ki(e, f, t);
|
|
4000
4011
|
}
|
|
4001
|
-
function
|
|
4012
|
+
function se(e, t) {
|
|
4002
4013
|
b?.value || e.type !== "custom" || i.updateBlock(e.id, {
|
|
4003
4014
|
fieldValues: t.fieldValues,
|
|
4004
4015
|
dataSourceFetched: t.dataSourceFetched
|
|
4005
4016
|
});
|
|
4006
4017
|
}
|
|
4007
|
-
return (t, s) => (m(), N("div",
|
|
4018
|
+
return (t, s) => (m(), N("div", Il, [F.value ? (m(), N("div", Ll, [P("span", null, d(A(r).section.heroAddImage), 1)])) : j("", !0), P("div", { class: h(["tpl:flex tpl:gap-0", { "tpl:flex-col": D.value }]) }, [(m(!0), N(L, null, v(ee.value, (t, c) => (m(), N("div", {
|
|
4008
4019
|
key: c,
|
|
4009
4020
|
class: h(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", I(c) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4010
4021
|
style: y({ width: D.value ? "100%" : T.value[c] })
|
|
4011
|
-
}, [E(A(
|
|
4022
|
+
}, [E(A(Pl), {
|
|
4012
4023
|
disabled: A(b) ?? !1,
|
|
4013
4024
|
"model-value": O(c),
|
|
4014
4025
|
group: {
|
|
@@ -4031,7 +4042,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4031
4042
|
onUpdate: (e) => !A(b) && A(Qa)(A(i), O(c), n.block.id, c, e),
|
|
4032
4043
|
onStart: (e) => re.value = c,
|
|
4033
4044
|
onEnd: s[0] ||= (e) => re.value = null,
|
|
4034
|
-
"onUpdate:modelValue": (e) =>
|
|
4045
|
+
"onUpdate:modelValue": (e) => oe(c, e)
|
|
4035
4046
|
}, {
|
|
4036
4047
|
default: S(() => [(m(!0), N(L, null, v(O(c), (t) => C((m(), N("div", { key: t.id }, [E(No, {
|
|
4037
4048
|
block: t,
|
|
@@ -4042,9 +4053,9 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4042
4053
|
nested: "",
|
|
4043
4054
|
onSelect: (e) => w(t.id)
|
|
4044
4055
|
}, {
|
|
4045
|
-
default: S(() => [(m(),
|
|
4056
|
+
default: S(() => [(m(), R(p(B(t)), l({ block: A(o)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
|
|
4046
4057
|
viewport: e.viewport,
|
|
4047
|
-
onFetchData: (e) =>
|
|
4058
|
+
onFetchData: (e) => se(t, e),
|
|
4048
4059
|
onUpdate: (e) => !A(b) && A(i).updateBlock(t.id, e)
|
|
4049
4060
|
}), null, 16, [
|
|
4050
4061
|
"block",
|
|
@@ -4070,14 +4081,14 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4070
4081
|
"onUpdate",
|
|
4071
4082
|
"onStart",
|
|
4072
4083
|
"onUpdate:modelValue"
|
|
4073
|
-
]), I(c) ? (m(), N("div",
|
|
4084
|
+
]), I(c) ? (m(), N("div", Rl, [P("span", null, d(A(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))], 2)]));
|
|
4074
4085
|
}
|
|
4075
|
-
}),
|
|
4086
|
+
}), Bl = ["width", "height"], Vl = [
|
|
4076
4087
|
"d",
|
|
4077
4088
|
"stroke",
|
|
4078
4089
|
"stroke-opacity",
|
|
4079
4090
|
"stroke-width"
|
|
4080
|
-
],
|
|
4091
|
+
], Hl = ["d", "fill"], Ul = /* @__PURE__ */ B({
|
|
4081
4092
|
__name: "SocialIconSvg",
|
|
4082
4093
|
props: {
|
|
4083
4094
|
platform: {},
|
|
@@ -4086,7 +4097,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4086
4097
|
iconSize: {}
|
|
4087
4098
|
},
|
|
4088
4099
|
setup(e) {
|
|
4089
|
-
let t = e, n = k(() => $n[t.platform]), r = k(() => tr[t.iconSize]), i = k(() =>
|
|
4100
|
+
let t = e, n = k(() => $n[t.platform]), r = k(() => tr[t.iconSize]), i = k(() => Me(t.platform, t.iconTone)), a = k(() => et(t.iconStyle, t.iconTone)), o = k(() => {
|
|
4090
4101
|
let e = {
|
|
4091
4102
|
display: "inline-flex",
|
|
4092
4103
|
alignItems: "center",
|
|
@@ -4124,7 +4135,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4124
4135
|
};
|
|
4125
4136
|
default: return e;
|
|
4126
4137
|
}
|
|
4127
|
-
}), s = k(() =>
|
|
4138
|
+
}), s = k(() => me(t.iconStyle)), c = k(() => Math.floor(r.value * s.value));
|
|
4128
4139
|
function l(e) {
|
|
4129
4140
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
4130
4141
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -4145,28 +4156,28 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4145
4156
|
"stroke-opacity": a.value.opacity,
|
|
4146
4157
|
"stroke-width": a.value.width / s.value,
|
|
4147
4158
|
"stroke-linejoin": "round"
|
|
4148
|
-
}, null, 8,
|
|
4159
|
+
}, null, 8, Vl)) : j("", !0), P("path", {
|
|
4149
4160
|
d: n.value.path,
|
|
4150
4161
|
fill: u.value
|
|
4151
|
-
}, null, 8,
|
|
4162
|
+
}, null, 8, Hl)], 8, Bl))], 4));
|
|
4152
4163
|
}
|
|
4153
|
-
}),
|
|
4164
|
+
}), Wl = { class: "tpl:w-full" }, Gl = ["href"], Kl = {
|
|
4154
4165
|
key: 1,
|
|
4155
4166
|
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)]"
|
|
4156
|
-
},
|
|
4167
|
+
}, ql = /* @__PURE__ */ B({
|
|
4157
4168
|
__name: "SocialIconsBlock",
|
|
4158
4169
|
props: {
|
|
4159
4170
|
block: {},
|
|
4160
4171
|
viewport: {}
|
|
4161
4172
|
},
|
|
4162
4173
|
setup(e) {
|
|
4163
|
-
let t = e, { t: n } =
|
|
4174
|
+
let t = e, { t: n } = ce(), r = k(() => ({
|
|
4164
4175
|
display: "flex",
|
|
4165
4176
|
flexWrap: "wrap",
|
|
4166
4177
|
gap: `${t.block.spacing}px`,
|
|
4167
4178
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4168
4179
|
})), a = k(() => t.block.icons.length > 0);
|
|
4169
|
-
return (t, o) => (m(), N("div",
|
|
4180
|
+
return (t, o) => (m(), N("div", Wl, [a.value ? (m(), N("div", {
|
|
4170
4181
|
key: 0,
|
|
4171
4182
|
style: y(r.value)
|
|
4172
4183
|
}, [(m(!0), N(L, null, v(e.block.icons, (t) => (m(), N("a", {
|
|
@@ -4174,7 +4185,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4174
4185
|
href: t.url || "#",
|
|
4175
4186
|
class: "tpl:cursor-default",
|
|
4176
4187
|
onClick: o[0] ||= i(() => {}, ["prevent"])
|
|
4177
|
-
}, [E(
|
|
4188
|
+
}, [E(Ul, {
|
|
4178
4189
|
platform: t.platform,
|
|
4179
4190
|
"icon-style": e.block.iconStyle,
|
|
4180
4191
|
"icon-tone": e.block.iconTone,
|
|
@@ -4184,46 +4195,46 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4184
4195
|
"icon-style",
|
|
4185
4196
|
"icon-tone",
|
|
4186
4197
|
"icon-size"
|
|
4187
|
-
])], 8,
|
|
4198
|
+
])], 8, Gl))), 128))], 4)) : (m(), N("div", Kl, [E(A(Bn), { size: 16 }), P("span", null, d(A(n).social.addIcons), 1)]))]));
|
|
4188
4199
|
}
|
|
4189
|
-
}),
|
|
4200
|
+
}), Jl = { class: "tpl:w-full" }, Yl = {
|
|
4190
4201
|
key: 0,
|
|
4191
4202
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4192
4203
|
style: {
|
|
4193
4204
|
"background-color": "var(--tpl-bg-hover)",
|
|
4194
4205
|
color: "var(--tpl-text-dim)"
|
|
4195
4206
|
}
|
|
4196
|
-
},
|
|
4207
|
+
}, Xl = /* @__PURE__ */ B({
|
|
4197
4208
|
__name: "SpacerBlock",
|
|
4198
4209
|
props: {
|
|
4199
4210
|
block: {},
|
|
4200
4211
|
viewport: {}
|
|
4201
4212
|
},
|
|
4202
4213
|
setup(e) {
|
|
4203
|
-
let t = e, n =
|
|
4214
|
+
let t = e, n = bn(Mn, "SpacerBlock"), r = k(() => ({
|
|
4204
4215
|
height: `${t.block.height}px`,
|
|
4205
4216
|
minHeight: `${t.block.height}px`,
|
|
4206
4217
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4207
4218
|
}));
|
|
4208
|
-
return (t, i) => (m(), N("div",
|
|
4219
|
+
return (t, i) => (m(), N("div", Jl, [P("div", {
|
|
4209
4220
|
style: y(r.value),
|
|
4210
4221
|
class: h(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !A(n).state.previewMode }])
|
|
4211
|
-
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span",
|
|
4222
|
+
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span", Yl, d(e.block.height) + "px ", 1))], 6)]));
|
|
4212
4223
|
}
|
|
4213
|
-
}),
|
|
4224
|
+
}), Zl = { class: "tpl:w-full" }, Ql = { key: 0 }, $l = [
|
|
4214
4225
|
"aria-label",
|
|
4215
4226
|
"contenteditable",
|
|
4216
4227
|
"data-placeholder",
|
|
4217
4228
|
"onBlur"
|
|
4218
|
-
],
|
|
4229
|
+
], eu = [
|
|
4219
4230
|
"aria-label",
|
|
4220
4231
|
"contenteditable",
|
|
4221
4232
|
"data-placeholder",
|
|
4222
4233
|
"onBlur"
|
|
4223
|
-
],
|
|
4234
|
+
], tu = {
|
|
4224
4235
|
key: 1,
|
|
4225
4236
|
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)]"
|
|
4226
|
-
},
|
|
4237
|
+
}, nu = /*#__PURE__*/ wr(/* @__PURE__ */ B({
|
|
4227
4238
|
__name: "TableBlock",
|
|
4228
4239
|
props: {
|
|
4229
4240
|
block: {},
|
|
@@ -4237,7 +4248,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4237
4248
|
updated(e, t) {
|
|
4238
4249
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4239
4250
|
}
|
|
4240
|
-
}, n = e, { t: r } =
|
|
4251
|
+
}, n = e, { t: r } = ce(), a = bn(Mn, "TableBlock"), s = bn(ln, "TableBlock"), c = z(rn, null), l = k(() => n.block.rows.length > 0), u = k(() => {
|
|
4241
4252
|
let e = {
|
|
4242
4253
|
width: "100%",
|
|
4243
4254
|
borderCollapse: "collapse",
|
|
@@ -4269,11 +4280,11 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4269
4280
|
} : n);
|
|
4270
4281
|
a.updateBlock(n.block.id, { rows: o });
|
|
4271
4282
|
}
|
|
4272
|
-
return (e, n) => (m(), N("div",
|
|
4283
|
+
return (e, n) => (m(), N("div", Zl, [l.value ? (m(), N("table", {
|
|
4273
4284
|
key: 0,
|
|
4274
4285
|
style: y(u.value),
|
|
4275
4286
|
class: "tpl-table-editable"
|
|
4276
|
-
}, [h.value ? (m(), N("thead",
|
|
4287
|
+
}, [h.value ? (m(), N("thead", Ql, [P("tr", null, [(m(!0), N(L, null, v(h.value.cells, (e) => C((m(), N("th", {
|
|
4277
4288
|
key: e.id,
|
|
4278
4289
|
style: y(p.value),
|
|
4279
4290
|
"aria-label": A(r).table.cellPlaceholder,
|
|
@@ -4282,7 +4293,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4282
4293
|
onBlur: (t) => b(h.value.id, e.id, t),
|
|
4283
4294
|
onKeydown: n[0] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4284
4295
|
onClick: i(_, ["stop"])
|
|
4285
|
-
}, null, 44,
|
|
4296
|
+
}, null, 44, $l)), [[t, e.content]])), 128))])])) : j("", !0), P("tbody", null, [(m(!0), N(L, null, v(g.value, (e) => (m(), N("tr", { key: e.id }, [(m(!0), N(L, null, v(e.cells, (a) => C((m(), N("td", {
|
|
4286
4297
|
key: a.id,
|
|
4287
4298
|
style: y(f.value),
|
|
4288
4299
|
"aria-label": A(r).table.cellPlaceholder,
|
|
@@ -4291,9 +4302,9 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4291
4302
|
onBlur: (t) => b(e.id, a.id, t),
|
|
4292
4303
|
onKeydown: n[1] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4293
4304
|
onClick: i(_, ["stop"])
|
|
4294
|
-
}, null, 44,
|
|
4305
|
+
}, null, 44, eu)), [[t, a.content]])), 128))]))), 128))])], 4)) : (m(), N("div", tu, [E(A(Vn), { size: 16 }), P("span", null, d(A(r).table.empty), 1)]))]));
|
|
4295
4306
|
}
|
|
4296
|
-
}), [["__scopeId", "data-v-73b9f5e5"]]),
|
|
4307
|
+
}), [["__scopeId", "data-v-73b9f5e5"]]), ru = /* @__PURE__ */ B({
|
|
4297
4308
|
__name: "VideoPlayButton",
|
|
4298
4309
|
props: { hoverEffect: {
|
|
4299
4310
|
type: Boolean,
|
|
@@ -4310,7 +4321,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4310
4321
|
}
|
|
4311
4322
|
});
|
|
4312
4323
|
// src/utils/videoThumbnail.ts
|
|
4313
|
-
function
|
|
4324
|
+
function iu(e) {
|
|
4314
4325
|
if (!e) return {
|
|
4315
4326
|
platform: "unknown",
|
|
4316
4327
|
videoId: null,
|
|
@@ -4342,24 +4353,24 @@ function ru(e) {
|
|
|
4342
4353
|
thumbnailUrl: null
|
|
4343
4354
|
};
|
|
4344
4355
|
}
|
|
4345
|
-
function
|
|
4346
|
-
return t ||
|
|
4356
|
+
function au(e, t) {
|
|
4357
|
+
return t || iu(e).thumbnailUrl;
|
|
4347
4358
|
}
|
|
4348
4359
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4349
|
-
var
|
|
4360
|
+
var ou = ["src", "alt"], su = {
|
|
4350
4361
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4351
4362
|
style: { opacity: "0.7" }
|
|
4352
|
-
},
|
|
4363
|
+
}, cu = ["href"], lu = ["src", "alt"], uu = ["src", "alt"], du = {
|
|
4353
4364
|
key: 3,
|
|
4354
4365
|
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)]"
|
|
4355
|
-
},
|
|
4366
|
+
}, fu = /* @__PURE__ */ B({
|
|
4356
4367
|
__name: "VideoBlock",
|
|
4357
4368
|
props: {
|
|
4358
4369
|
block: {},
|
|
4359
4370
|
viewport: {}
|
|
4360
4371
|
},
|
|
4361
4372
|
setup(e) {
|
|
4362
|
-
let t = e, { t: n } =
|
|
4373
|
+
let t = e, { t: n } = ce(), { syntax: r } = V(), a = k(() => ot(t.block.url, r) || ot(t.block.thumbnailUrl, r)), o = Kn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = Kn(() => a.value ? t.block.placeholderUrl : void 0), c = k(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : au(t.block.url)), l = k(() => ({ textAlign: t.block.align })), u = k(() => {
|
|
4363
4374
|
let e = t.block.align;
|
|
4364
4375
|
return {
|
|
4365
4376
|
maxWidth: "100%",
|
|
@@ -4369,7 +4380,7 @@ var au = ["src", "alt"], ou = {
|
|
|
4369
4380
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4370
4381
|
marginRight: e === "center" ? "auto" : void 0
|
|
4371
4382
|
};
|
|
4372
|
-
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() =>
|
|
4383
|
+
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() => ot(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4373
4384
|
return (t, r) => (m(), N("div", {
|
|
4374
4385
|
class: "tpl:w-full",
|
|
4375
4386
|
style: y(l.value)
|
|
@@ -4382,7 +4393,7 @@ var au = ["src", "alt"], ou = {
|
|
|
4382
4393
|
src: A(s),
|
|
4383
4394
|
alt: e.block.alt,
|
|
4384
4395
|
style: y(f.value)
|
|
4385
|
-
}, null, 12,
|
|
4396
|
+
}, null, 12, ou), E(ru)], 4)) : a.value ? (m(), N("div", {
|
|
4386
4397
|
key: 1,
|
|
4387
4398
|
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)]",
|
|
4388
4399
|
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
@@ -4391,7 +4402,7 @@ var au = ["src", "alt"], ou = {
|
|
|
4391
4402
|
"stroke-width": 1.5,
|
|
4392
4403
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4393
4404
|
style: { opacity: "0.5" }
|
|
4394
|
-
}), P("span",
|
|
4405
|
+
}), P("span", su, [E(ua, { text: p.value }, null, 8, ["text"])])], 4)) : c.value ? (m(), N(L, { key: 2 }, [e.block.url ? (m(), N("a", {
|
|
4395
4406
|
key: 0,
|
|
4396
4407
|
href: e.block.url,
|
|
4397
4408
|
target: "_blank",
|
|
@@ -4404,7 +4415,7 @@ var au = ["src", "alt"], ou = {
|
|
|
4404
4415
|
src: c.value,
|
|
4405
4416
|
alt: e.block.alt,
|
|
4406
4417
|
style: y(f.value)
|
|
4407
|
-
}, null, 12,
|
|
4418
|
+
}, null, 12, lu), E(ru, { "hover-effect": "" })], 12, cu)) : (m(), N("div", {
|
|
4408
4419
|
key: 1,
|
|
4409
4420
|
class: "tpl:relative tpl:inline-block",
|
|
4410
4421
|
style: y(u.value)
|
|
@@ -4413,29 +4424,29 @@ var au = ["src", "alt"], ou = {
|
|
|
4413
4424
|
src: c.value,
|
|
4414
4425
|
alt: e.block.alt,
|
|
4415
4426
|
style: y(f.value)
|
|
4416
|
-
}, null, 12,
|
|
4427
|
+
}, null, 12, uu), E(ru)], 4))], 64)) : (m(), N("div", du, [E(A(Fr), {
|
|
4417
4428
|
size: 40,
|
|
4418
4429
|
"stroke-width": 1.5,
|
|
4419
4430
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4420
4431
|
}), P("span", null, d(A(n).video.addVideo), 1)]))], 4));
|
|
4421
4432
|
}
|
|
4422
|
-
}),
|
|
4423
|
-
section:
|
|
4433
|
+
}), pu = {
|
|
4434
|
+
section: zl,
|
|
4424
4435
|
title: Fo,
|
|
4425
4436
|
paragraph: Za,
|
|
4426
4437
|
image: Wa,
|
|
4427
4438
|
button: fa,
|
|
4428
4439
|
divider: Ea,
|
|
4429
|
-
video:
|
|
4430
|
-
social:
|
|
4440
|
+
video: fu,
|
|
4441
|
+
social: ql,
|
|
4431
4442
|
menu: Ja,
|
|
4432
|
-
table:
|
|
4433
|
-
spacer:
|
|
4443
|
+
table: nu,
|
|
4444
|
+
spacer: Xl,
|
|
4434
4445
|
html: Ma,
|
|
4435
|
-
countdown:
|
|
4446
|
+
countdown: oe(() => import("./CountdownBlock-CSEq79Nc.js"))
|
|
4436
4447
|
};
|
|
4437
|
-
function
|
|
4438
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } =
|
|
4448
|
+
function mu(t) {
|
|
4449
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = ce(i), l = k(() => bt(bt(bt(xi(i), Vi(n.content.value.settings?.locale)), Se(n.content.value.settings) === "rtl" ? {
|
|
4439
4450
|
title: { textAlign: "right" },
|
|
4440
4451
|
table: { textAlign: "right" }
|
|
4441
4452
|
} : {}), r.blockDefaults ?? {}));
|
|
@@ -4451,7 +4462,7 @@ function pu(t) {
|
|
|
4451
4462
|
content: n.content,
|
|
4452
4463
|
setContent: (e, t) => n.setContent(e, t)
|
|
4453
4464
|
});
|
|
4454
|
-
t.history
|
|
4465
|
+
t.history ? n.contentReplaced && c(n.contentReplaced, () => p.clear(), { flush: "sync" }) : qn(n, p);
|
|
4455
4466
|
let m = Hn({
|
|
4456
4467
|
addBlock: n.addBlock,
|
|
4457
4468
|
removeBlock: n.removeBlock,
|
|
@@ -4470,20 +4481,20 @@ function pu(t) {
|
|
|
4470
4481
|
let y = di(n, {
|
|
4471
4482
|
t: o,
|
|
4472
4483
|
format: s
|
|
4473
|
-
}, r.customBlocks ?? []), b =
|
|
4474
|
-
if (b.allowCustomIgnored &&
|
|
4484
|
+
}, r.customBlocks ?? []), b = kt(r.colors);
|
|
4485
|
+
if (b.allowCustomIgnored && Et.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 && Et.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4475
4486
|
let e = bi(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4476
|
-
e.length > 0 &&
|
|
4487
|
+
e.length > 0 && Et.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.`);
|
|
4477
4488
|
}
|
|
4478
4489
|
let x = cr(r.templateSettings);
|
|
4479
|
-
for (let e of x.unknown)
|
|
4490
|
+
for (let e of x.unknown) Et.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${lr.join(", ")}) — skipping it.`);
|
|
4480
4491
|
let S = zr();
|
|
4481
|
-
_i(S,
|
|
4492
|
+
_i(S, pu);
|
|
4482
4493
|
let C = /* @__PURE__ */ new Set();
|
|
4483
4494
|
function w(e) {
|
|
4484
4495
|
for (let t of e) {
|
|
4485
4496
|
S.registerCustom(t, wa);
|
|
4486
|
-
for (let e of Hi(t, b)) C.has(e.id) || (C.add(e.id),
|
|
4497
|
+
for (let e of Hi(t, b)) C.has(e.id) || (C.add(e.id), Et.warn(e.message));
|
|
4487
4498
|
}
|
|
4488
4499
|
}
|
|
4489
4500
|
r.customBlocks?.length && w(r.customBlocks);
|
|
@@ -4513,37 +4524,42 @@ function pu(t) {
|
|
|
4513
4524
|
}
|
|
4514
4525
|
e(document, "keydown", D);
|
|
4515
4526
|
let O = M(null), A = t.editorRoot ?? document;
|
|
4516
|
-
g(Fn, A), g(Tn, O), g(Rt, /* @__PURE__ */ new Map()), g(
|
|
4517
|
-
let j =
|
|
4527
|
+
g(Fn, A), g(Tn, O), g(Rt, /* @__PURE__ */ new Map()), g(gn, i), g(Mn, n), g(Pn, p), g(On, m), g(xn, h), g(ln, a), g(Dn, f), g(kn, u), g(un, l), g(Cn, r.locale), g(yn, S), g(mn, r.customBlocks ?? []), g(Wt, r.paletteBlocks), g(Zt, vi(r.htmlBlockPreview)), g(Qt, r.layout), g(Pt, r.sectionWrapper), g(wn, b), g(Sn, x.fields), g(pn, pi(n.content, S));
|
|
4528
|
+
let j = Te(r.mergeTags?.syntax);
|
|
4518
4529
|
for (let e of ["opener", "closer"]) {
|
|
4519
4530
|
let t = j[e];
|
|
4520
|
-
typeof t == "string" && t.trim() === "" &&
|
|
4531
|
+
typeof t == "string" && t.trim() === "" && Et.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
4521
4532
|
}
|
|
4522
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
4533
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && rt(j) === null && Et.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
4523
4534
|
let N = ie(r.mergeTags?.tags ?? []);
|
|
4524
4535
|
function te(e) {
|
|
4525
|
-
Array.isArray(e) ? N.value = e :
|
|
4536
|
+
Array.isArray(e) ? N.value = e : Et.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4526
4537
|
}
|
|
4527
4538
|
g(Yt, N), g(It, j), g(Bt, r.mergeTags?.onRequest ?? null), g(zt, r.mergeTags?.autocomplete !== !1), g(In, r.mergeTags?.showRawValue !== !1);
|
|
4528
|
-
let ne = M(
|
|
4529
|
-
g(
|
|
4539
|
+
let ne = M(nt(r.mergeTags?.tags ?? []));
|
|
4540
|
+
g(Xt, ne);
|
|
4530
4541
|
let re = ai({
|
|
4531
4542
|
resolvePreview: r.resolvePreview,
|
|
4543
|
+
surface: "preview",
|
|
4532
4544
|
getContent: () => {
|
|
4533
4545
|
let e = n.content.value;
|
|
4534
4546
|
if (!n.state.previewMode) return e;
|
|
4535
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
4536
|
-
return r.layout ?
|
|
4547
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = gt(e, t);
|
|
4548
|
+
return r.layout ? Ne(gt(r.layout, t, { missing: "default" }), i) : i;
|
|
4537
4549
|
},
|
|
4538
4550
|
isActive: () => n.state.previewMode,
|
|
4539
4551
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
4540
4552
|
});
|
|
4541
|
-
g(Ut, re), g(
|
|
4542
|
-
let P =
|
|
4543
|
-
g(
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
let
|
|
4553
|
+
g(Ut, re), g(an, r.resolvePreview);
|
|
4554
|
+
let P = null;
|
|
4555
|
+
g(nn, (e) => (P = e, () => {
|
|
4556
|
+
P === e && (P = null);
|
|
4557
|
+
}));
|
|
4558
|
+
let F = () => (P ?? re.refresh)(), L = k(() => !(n.state.previewMode && re.isConfigured));
|
|
4559
|
+
g(sn, L);
|
|
4560
|
+
let ae = oi();
|
|
4561
|
+
g(Ht, ae), g(Gt, M(!1)), g(qt, M(!1)), g(_n, r.logicTags?.tags ?? []), g(Ft, r.logicTags?.pairs ?? []), g($t, r.logicTags?.onRequest ?? null), g(Kt, si()), g(tn, r.onRequestMedia ?? null), g(jn, r.canDropMedia ?? null), g(Lt, r.resolveImageUrl ? ar(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && Et.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), g(on, r.displayConditions?.conditions ?? []), g(En, r.displayConditions?.allowCustom ?? !1), g(Vt, r.displayConditions?.onRequest ?? null), g(fn, t.capabilities ?? {}), g(Nn, y);
|
|
4562
|
+
let R = ci(r.lint) ? null : ui({
|
|
4547
4563
|
content: n.content,
|
|
4548
4564
|
get options() {
|
|
4549
4565
|
return ri({
|
|
@@ -4558,9 +4574,9 @@ function pu(t) {
|
|
|
4558
4574
|
updateSettings: n.updateSettings,
|
|
4559
4575
|
removeBlock: n.removeBlock
|
|
4560
4576
|
});
|
|
4561
|
-
g(
|
|
4562
|
-
function
|
|
4563
|
-
v?.(),
|
|
4577
|
+
g(An, R);
|
|
4578
|
+
function oe() {
|
|
4579
|
+
v?.(), R?.destroy(), _?.destroy(), p.destroy();
|
|
4564
4580
|
}
|
|
4565
4581
|
return {
|
|
4566
4582
|
t: o,
|
|
@@ -4575,25 +4591,26 @@ function pu(t) {
|
|
|
4575
4591
|
themeOverrides: d,
|
|
4576
4592
|
registry: S,
|
|
4577
4593
|
keyboardReorder: y,
|
|
4578
|
-
templateLint:
|
|
4594
|
+
templateLint: R,
|
|
4579
4595
|
popoverRoot: O,
|
|
4580
4596
|
mergeTagSampleMode: ne,
|
|
4581
4597
|
previewResolution: re,
|
|
4582
|
-
|
|
4598
|
+
refreshPreview: F,
|
|
4599
|
+
appliesConditionFilter: L,
|
|
4583
4600
|
registerCustomBlocks: w,
|
|
4584
4601
|
setMergeTags: te,
|
|
4585
4602
|
mergeTags: N,
|
|
4586
4603
|
mergeTagSyntax: j,
|
|
4587
|
-
destroy:
|
|
4604
|
+
destroy: oe
|
|
4588
4605
|
};
|
|
4589
4606
|
}
|
|
4590
4607
|
// src/composables/useSmallScreenNotice.ts
|
|
4591
|
-
var
|
|
4592
|
-
function
|
|
4593
|
-
let n = t(
|
|
4608
|
+
var hu = "(max-width: 767px)";
|
|
4609
|
+
function gu(e) {
|
|
4610
|
+
let n = t(hu);
|
|
4594
4611
|
return {
|
|
4595
4612
|
isSmallScreen: n,
|
|
4596
4613
|
showNotice: k(() => (F(e) ?? !0) && n.value)
|
|
4597
4614
|
};
|
|
4598
4615
|
}
|
|
4599
|
-
export { ki as A, Xr as B, Zi as C, Gi as D, na as E, Ni as F, jr as G, Rr as H, Mi as I, kr as K, ai as L, Ii as M, Fi as N, ca as O, Pi as P, ri as R, Ji as S, ta as T, Lr as U, Ur as V, Nr as W, Ma as _,
|
|
4616
|
+
export { ki as A, Xr as B, Zi as C, Gi as D, na as E, Ni as F, jr as G, Rr as H, Mi as I, kr as K, ai as L, Ii as M, Fi as N, ca as O, Pi as P, ri as R, Ji as S, ta as T, Lr as U, Ur as V, Nr as W, Ma as _, Xl as a, ha as b, Pl as c, Fo as d, No as f, Wa as g, Ja as h, nu as i, Li as j, Ki as k, Io as l, Za as m, mu as n, ql as o, Qa as p, fu as r, zl as s, gu as t, zo as u, Ea as v, oa as w, fa as x, wa as y, Qr as z };
|