@templatical/editor 0.59.1 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-CwyKz_9U.js → AiAltTextPopover-DiIaqDtB.js} +3 -3
- package/dist/{AiAltTextReview-DNFnR1PN.js → AiAltTextReview-DIe0WBbj.js} +3 -3
- package/dist/{AiChatPanel-DWWVvJIP.js → AiChatPanel-aj2TPO9F.js} +10 -10
- package/dist/{AiPanels-CESbBB63.js → AiPanels-CRM3jf82.js} +1 -1
- package/dist/{AiRewriteMenu-DH6j1jOA.js → AiRewriteMenu-F3GyXBsk.js} +11 -11
- package/dist/{BlockIssueBadge-3k568_Od.js → BlockIssueBadge-DlhA_I6J.js} +4 -4
- package/dist/{BlockPreviewCanvas-BLJxLwTT.js → BlockPreviewCanvas-DYspUXMO.js} +29 -50
- package/dist/{CloudHeaderExtras-xrHubAHL.js → CloudHeaderExtras-DC_oNrxz.js} +1 -1
- package/dist/{CloudPanels-qW-MObRD.js → CloudPanels-CAMn545-.js} +4 -4
- package/dist/{CollaborationNotices-D9GQ477K.js → CollaborationNotices-CnfS8BQy.js} +2 -2
- package/dist/{CollaboratorBar-DsRjAaqd.js → CollaboratorBar-DufLdLQP.js} +2 -2
- package/dist/{CommentsPanel-lb-IFzjl.js → CommentsPanel-C2hFFs0o.js} +1 -1
- package/dist/{CommentsSidebar-CVVTCWBH.js → CommentsSidebar-CgEwxt2T.js} +12 -12
- package/dist/{CountdownBlock-CSEq79Nc.js → CountdownBlock-AYPypmcX.js} +2 -2
- package/dist/{CountdownToolbar-BV9yQi9k.js → CountdownToolbar-CNqYDevp.js} +5 -5
- package/dist/{IssuesPanel-pxcWAQJM.js → IssuesPanel-cPKhimE9.js} +12 -12
- package/dist/{LanguageMenu-D_xbvq3D.js → LanguageMenu-zxlpmw2x.js} +14 -14
- package/dist/{LocaleNotices-j4aMFfmc.js → LocaleNotices-PIfpvCCI.js} +4 -4
- package/dist/{LogicTagInsertButton-BDIsyl3C.js → LogicTagInsertButton-DqTkGJSR.js} +21 -21
- package/dist/{MediaEditModal-BWOqjEZN.js → MediaEditModal-C2Bn8WGb.js} +1 -1
- package/dist/{MediaPanels-C-XrldMu.js → MediaPanels-BAZByHRA.js} +1 -1
- package/dist/{MergeTagInput-De1yWoc2.js → MergeTagInput-Jly1Pw0v.js} +1 -1
- package/dist/{MergeTagModeToggle-CL96pI1E.js → MergeTagModeToggle-5kaFLRAm.js} +6 -6
- package/dist/{MergeTagTextarea-DDyV8U44.js → MergeTagTextarea-CCfirhcR.js} +7 -7
- package/dist/{ParagraphEditor-DpOsnnai.js → ParagraphEditor-DTdnxgDZ.js} +46 -46
- package/dist/{RestoreVersionDialog-JQEkVIh5.js → RestoreVersionDialog-cUYu3Xqs.js} +4 -4
- package/dist/{RichTextEditorContent-C2Yj1-ZA.js → RichTextEditorContent-Aub9tOHF.js} +8 -8
- package/dist/{SaveBlockDialog-BPf6tDhg.js → SaveBlockDialog-D_ie3uIF.js} +9 -9
- package/dist/{SavedBlocksBrowserModal-DnDCfwSv.js → SavedBlocksBrowserModal-fhSnYT1l.js} +11 -11
- package/dist/{SavedBlocksPanels-D5YaVCem.js → SavedBlocksPanels-Lklqy4XI.js} +1 -1
- package/dist/{SavedBlocksPickBar-OQ7ey3MD.js → SavedBlocksPickBar-CpWkCa8G.js} +3 -3
- package/dist/{TemplateSettings-CBCaybvd.js → TemplateSettings-BJ4a8RBr.js} +12 -12
- package/dist/{TestEmailModal-BDp85wIp.js → TestEmailModal-BEoapoDc.js} +14 -12
- package/dist/{TestEmailPanel-DkJx0Ptk.js → TestEmailPanel-DgyzokCf.js} +1 -1
- package/dist/{TitleEditor-wzknZqu_.js → TitleEditor-BQoSPgOi.js} +13 -13
- package/dist/{Toolbar-FIYSw3Us.js → Toolbar-KhPpWyX1.js} +857 -756
- package/dist/{TplModal-C57J-uF0.js → TplModal-F_kA7luG.js} +4 -4
- package/dist/{VersionHistoryMenu-6jMve6By.js → VersionHistoryMenu-Bz4G8cNm.js} +7 -7
- package/dist/{VersionHistoryPanels-BZ0GT52h.js → VersionHistoryPanels-DmVRyWv9.js} +1 -1
- package/dist/{VersionPreviewBanner-Bq8z1SUc.js → VersionPreviewBanner-BeppXZyn.js} +2 -2
- package/dist/{WrapperBlock-C4XrJkx5.js → WrapperBlock-Ds7yfbhg.js} +4 -4
- package/dist/{blockTypeIcons-VX_8UQ21.js → blockTypeIcons-Do1QqDjg.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-YfIxwO1G.js → ca-Ce3NmK9v.js} +6 -1
- package/dist/cdn/chunks/{AiAltTextPopover-Dj-VLU88.js → AiAltTextPopover-CUzIaLRK.js} +4 -4
- package/dist/cdn/chunks/AiAltTextPopover-CUzIaLRK.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-tVkJPOk6.js → AiAltTextReview-BXBlE71X.js} +4 -4
- package/dist/cdn/chunks/AiAltTextReview-BXBlE71X.js.map +1 -0
- package/dist/cdn/chunks/{AiChatPanel-CYPvHQGQ.js → AiChatPanel-BKydciDQ.js} +4 -4
- package/dist/cdn/chunks/AiChatPanel-BKydciDQ.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-ChTLCmMS.js → AiPanels-De-cIZ4p.js} +2 -2
- package/dist/cdn/chunks/AiPanels-De-cIZ4p.js.map +1 -0
- package/dist/cdn/chunks/{AiRewriteMenu-B23ozFnP.js → AiRewriteMenu-C9vBUTIB.js} +9 -9
- package/dist/cdn/chunks/AiRewriteMenu-C9vBUTIB.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-BKO4Mr8f.js → BlockIssueBadge-B3CTTvgw.js} +4 -4
- package/dist/cdn/chunks/BlockIssueBadge-B3CTTvgw.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-CaRneMZ8.js → BlockPreviewCanvas-B4Bj--kc.js} +30 -51
- package/dist/cdn/chunks/BlockPreviewCanvas-B4Bj--kc.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-O_K3jmgO.js → CloudHeaderExtras-Cd-ePldd.js} +2 -2
- package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-xAEirqNC.js → CloudPanels-CQ75I3hQ.js} +4 -4
- package/dist/cdn/chunks/CloudPanels-CQ75I3hQ.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-CwAoa-73.js → CollaborationNotices-CgLea-hu.js} +3 -3
- package/dist/cdn/chunks/CollaborationNotices-CgLea-hu.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DdQQwtwd.js → CollaboratorBar-CjRcbebT.js} +3 -3
- package/dist/cdn/chunks/CollaboratorBar-CjRcbebT.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-C8AKtxiG.js → CommentsPanel-D_ud9GMN.js} +2 -2
- package/dist/cdn/chunks/CommentsPanel-D_ud9GMN.js.map +1 -0
- package/dist/cdn/chunks/{CommentsSidebar-FxY0RHSq.js → CommentsSidebar-CXn1EGAI.js} +4 -4
- package/dist/cdn/chunks/CommentsSidebar-CXn1EGAI.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-DGgnPUlu.js → CountdownBlock--hlKE2aj.js} +3 -3
- package/dist/cdn/chunks/CountdownBlock--hlKE2aj.js.map +1 -0
- package/dist/cdn/chunks/{CountdownToolbar-9PtYUgCW.js → CountdownToolbar-BOyk_4k7.js} +6 -6
- package/dist/cdn/chunks/CountdownToolbar-BOyk_4k7.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-Co-ffgWa.js → IssuesPanel-DOC94ZsH.js} +8 -8
- package/dist/cdn/chunks/IssuesPanel-DOC94ZsH.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-Cl0ajnXZ.js → LanguageMenu-DktneIpL.js} +100 -100
- package/dist/cdn/chunks/LanguageMenu-DktneIpL.js.map +1 -0
- package/dist/cdn/chunks/{LocaleNotices-BVDJ7kyj.js → LocaleNotices-B2NgnHoP.js} +4 -4
- package/dist/cdn/chunks/LocaleNotices-B2NgnHoP.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-DPYA8LJW.js → LogicTagInsertButton-CQ8RiOou.js} +10 -10
- package/dist/cdn/chunks/LogicTagInsertButton-CQ8RiOou.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CfgN7Jyi.js → MediaEditModal-Cs7_Om7e.js} +2 -2
- package/dist/cdn/chunks/MediaEditModal-Cs7_Om7e.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-Cb5vsgb-.js → MediaPanels-BeekGmql.js} +2 -2
- package/dist/cdn/chunks/MediaPanels-BeekGmql.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-Cxfjq3tx.js → MergeTagInput-D7FZ0ca0.js} +2 -2
- package/dist/cdn/chunks/MergeTagInput-D7FZ0ca0.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-BmNGV3yc.js → MergeTagModeToggle-CySCCEDs.js} +5 -5
- package/dist/cdn/chunks/MergeTagModeToggle-CySCCEDs.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagTextarea-DmwrPAss.js → MergeTagTextarea-DJbWTYVH.js} +6 -6
- package/dist/cdn/chunks/MergeTagTextarea-DJbWTYVH.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-BoGELRr-.js → ParagraphEditor-DAQUWqQJ.js} +26 -26
- package/dist/cdn/chunks/ParagraphEditor-DAQUWqQJ.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CaKiSq-9.js → RestoreVersionDialog-COTRe_rM.js} +4 -4
- package/dist/cdn/chunks/RestoreVersionDialog-COTRe_rM.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-Dq4TROOg.js → RichTextEditorContent-DeWPMd9V.js} +8 -8
- package/dist/cdn/chunks/RichTextEditorContent-DeWPMd9V.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-BAR0G4UO.js → SaveBlockDialog-adQMbKR1.js} +8 -8
- package/dist/cdn/chunks/SaveBlockDialog-adQMbKR1.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C-KYaLkQ.js → SavedBlocksBrowserModal-CGIFCRAx.js} +8 -8
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CGIFCRAx.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-C3OF0EeB.js → SavedBlocksPanels-Du0RYlEf.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksPanels-Du0RYlEf.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPickBar-BnyPXw5W.js → SavedBlocksPickBar-DmleyUrn.js} +4 -4
- package/dist/cdn/chunks/SavedBlocksPickBar-DmleyUrn.js.map +1 -0
- package/dist/cdn/chunks/{TemplateSettings-uoiUkd2l.js → TemplateSettings-Csjef99q.js} +10 -10
- package/dist/cdn/chunks/TemplateSettings-Csjef99q.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-B9d3ZsH7.js → TestEmailModal-ClkexOtF.js} +13 -11
- package/dist/cdn/chunks/TestEmailModal-ClkexOtF.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel--fPi6QjN.js → TestEmailPanel-DYEYzhU2.js} +2 -2
- package/dist/cdn/chunks/TestEmailPanel-DYEYzhU2.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-Cn4fnSpa.js → TitleEditor-opvaIgVr.js} +12 -12
- package/dist/cdn/chunks/TitleEditor-opvaIgVr.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-C0w0srN_.js.map +1 -1
- package/dist/cdn/chunks/{Toolbar-BzAuH2G4.js → Toolbar-DbqkKRXy.js} +825 -724
- package/dist/cdn/chunks/Toolbar-DbqkKRXy.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-jMfK19PC.js → TplModal-DLV5OeMD.js} +5 -5
- package/dist/cdn/chunks/TplModal-DLV5OeMD.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-DDqYMqC2.js → VersionHistoryMenu-DBd0zwjE.js} +4 -4
- package/dist/cdn/chunks/VersionHistoryMenu-DBd0zwjE.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DJpySkvq.js → VersionHistoryPanels-hy_Ybxie.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryPanels-hy_Ybxie.js.map +1 -0
- package/dist/cdn/chunks/{VersionPreviewBanner-CYT5QUoc.js → VersionPreviewBanner-D-yHxWWY.js} +3 -3
- package/dist/cdn/chunks/VersionPreviewBanner-D-yHxWWY.js.map +1 -0
- package/dist/cdn/chunks/{WrapperBlock-Bi9XgDmX.js → WrapperBlock-Ce_k8m_x.js} +5 -5
- package/dist/cdn/chunks/WrapperBlock-Ce_k8m_x.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js → blockTypeIcons-DBoP1HkR.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js.map → blockTypeIcons-DBoP1HkR.js.map} +1 -1
- package/dist/cdn/chunks/{ca-YfIxwO1G.js → ca-Ce3NmK9v.js} +7 -2
- package/dist/cdn/chunks/ca-Ce3NmK9v.js.map +1 -0
- package/dist/cdn/chunks/{composables-Cp6gZ7qV.js → composables-Brr4m0Sg.js} +526 -550
- package/dist/cdn/chunks/composables-Brr4m0Sg.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js → createCloudRuntime-QPeg45XL.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js.map → createCloudRuntime-QPeg45XL.js.map} +1 -1
- package/dist/cdn/chunks/{da-CM6DCvRG.js → da-4YwDAuEr.js} +7 -2
- package/dist/cdn/chunks/da-4YwDAuEr.js.map +1 -0
- package/dist/{de-Dugz1zXC.js → cdn/chunks/de-BlQ0vdZJ.js} +8 -1
- package/dist/cdn/chunks/de-BlQ0vdZJ.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CXSSZplR.js → editor-modal-BCcbvIxc.js} +4 -4
- package/dist/cdn/chunks/editor-modal-BCcbvIxc.js.map +1 -0
- package/dist/cdn/chunks/en-DkulseE1.js +1 -0
- package/dist/{en-BykoFuFY.js → cdn/chunks/en-MlNeQVSG.js} +8 -1
- package/dist/cdn/chunks/en-MlNeQVSG.js.map +1 -0
- package/dist/{es-DaWsTkpj.js → cdn/chunks/es-2s8x4OM2.js} +8 -1
- package/dist/cdn/chunks/es-2s8x4OM2.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BYJPv1sA.js → extensions-BpuyqKVY.js} +6 -6
- package/dist/cdn/chunks/extensions-BpuyqKVY.js.map +1 -0
- package/dist/cdn/chunks/{fr-DqwQHtJo.js → fr-D3MjrsgQ.js} +7 -2
- package/dist/cdn/chunks/fr-D3MjrsgQ.js.map +1 -0
- package/dist/cdn/chunks/{icons-C7vjUBLn.js → icons-BJ6AtVgu.js} +23 -23
- package/dist/cdn/chunks/{icons-C7vjUBLn.js.map → icons-BJ6AtVgu.js.map} +1 -1
- package/dist/{ja-BH4MS1Ye.js → cdn/chunks/ja-B4Kx7uBX.js} +8 -1
- package/dist/cdn/chunks/ja-B4Kx7uBX.js.map +1 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.js +11 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.js.map +1 -0
- package/dist/{nl-BQl1_UHv.js → cdn/chunks/nl-U65iX7wN.js} +8 -1
- package/dist/cdn/chunks/nl-U65iX7wN.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js → normalizeMergeTagMarkup-B81BAWKT.js} +61 -61
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js.map → normalizeMergeTagMarkup-B81BAWKT.js.map} +1 -1
- package/dist/{preRenderCustomBlocks-CgPtlLGL.js → cdn/chunks/preRenderCustomBlocks-CQuaMxuv.js} +3 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-CxwYcAQe.js.map → preRenderCustomBlocks-CQuaMxuv.js.map} +1 -1
- package/dist/{pt-BR-eyzmU9Vs.js → cdn/chunks/pt-BR-_jsX1xLv.js} +8 -1
- package/dist/cdn/chunks/pt-BR-_jsX1xLv.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js → sanitizeHtml-BdAjvU9I.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js.map → sanitizeHtml-BdAjvU9I.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-bvQ57o1m.js → socialIcons-Df9dNe7I.js} +463 -485
- package/dist/cdn/chunks/socialIcons-Df9dNe7I.js.map +1 -0
- package/dist/cdn/chunks/{src-BRyzUujm.js → src-B3v_3j9b.js} +586 -554
- package/dist/cdn/chunks/src-B3v_3j9b.js.map +1 -0
- package/dist/{dist-BTjObRcv.js → cdn/chunks/src-BHgVGOTi.js} +872 -700
- package/dist/cdn/chunks/src-BHgVGOTi.js.map +1 -0
- package/dist/cdn/chunks/src-C5V_yzAU.js +673 -0
- package/dist/cdn/chunks/src-C5V_yzAU.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-B7gxx0aJ.js → tiptap-D9amDW4u.js} +1030 -1027
- package/dist/cdn/chunks/tiptap-D9amDW4u.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js → useCloudI18n-BTV9uu3c.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js.map → useCloudI18n-BTV9uu3c.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js → useEditorRoot-D0Lp2x4_.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js.map → useEditorRoot-D0Lp2x4_.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js → useI18n-DPg6rPbu.js} +2 -2
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js.map → useI18n-DPg6rPbu.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-C3lIetmX.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-7iwZ1UhB.js.map → useLocalizedDisplay-C3lIetmX.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js → useLogicTag-DOIlsGk8.js} +3 -3
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js.map → useLogicTag-DOIlsGk8.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js → useMergeTag-DUNl364g.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js.map → useMergeTag-DUNl364g.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js → usePopoverPosition-CBp9uwjV.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js.map → usePopoverPosition-CBp9uwjV.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js → useScrollToBlock-32EnuMwu.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js.map → useScrollToBlock-32EnuMwu.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js → withCurrentFont-ufGLu2Vt.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js.map → withCurrentFont-ufGLu2Vt.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +573 -573
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ErKdPXG6.js → check-CWq6Nfjj.js} +1 -1
- package/dist/{chevron-down-C_vv5fZE.js → chevron-down-B9t0SK_-.js} +1 -1
- package/dist/{chevron-right-Cw4GpjFA.js → chevron-right-B_qslOCS.js} +1 -1
- package/dist/{chevron-up-uijYZoph.js → chevron-up-CxZ2teV2.js} +1 -1
- package/dist/{circle-exclamation-point-CIYHx5Tw.js → circle-exclamation-point-B1tbhkNb.js} +1 -1
- package/dist/{clock-tnC1IvZk.js → clock-Rw4btQn-.js} +1 -1
- package/dist/{composables-jTnTSqdm.js → composables-5KJV0O9T.js} +933 -957
- package/dist/{createCloudRuntime-DiUnYjKr.js → createCloudRuntime-BdoKeYJi.js} +3 -3
- package/dist/{createLucideIcon-CssArtUe.js → createLucideIcon-B6Zkn9r0.js} +5 -5
- package/dist/{da-CM6DCvRG.js → da-4YwDAuEr.js} +6 -1
- package/dist/{cdn/chunks/de-Dugz1zXC.js → de-BlQ0vdZJ.js} +6 -3
- package/dist/dist-AyAOL8Bj.js +4 -0
- package/dist/{dist-BTUMr4Pb.js → dist-BNrGwgev.js} +2 -2
- package/dist/{dist-CsplpC_6.js → dist-BPVNNdTv.js} +2 -2
- package/dist/{dist-bWIkrMkM.js → dist-C7YLw60i.js} +2 -2
- package/dist/{dist-Clfx1JeL.js → dist-CBnAqr27.js} +2 -2
- package/dist/{dist-CkHJRChP.js → dist-COvAA64n.js} +2 -2
- package/dist/{dist-C-NRkFsp.js → dist-CuRjmtWu.js} +5 -5
- package/dist/{dist-HKEDfp__.js → dist-DG_AWt8v.js} +2 -2
- package/dist/{dist-DY3WbyCO.js → dist-DYtuc3jc.js} +2 -2
- package/dist/dist-DkPTWQuO.js +4 -0
- package/dist/{dist-DwpKFWF4.js → dist-DoWk1r7z.js} +77 -74
- package/dist/{cdn/chunks/src-CVHGPKSW.js → dist-DsA7NeIy.js} +691 -649
- package/dist/{dist-BlrlMP8f.js → dist-fDsB6dCL.js} +2 -2
- package/dist/{editor-modal-BWvxfSj8.js → editor-modal-_ylhrf4g.js} +15 -15
- package/dist/en-DwxgN_-Y.js +1 -0
- package/dist/{cdn/chunks/en-BykoFuFY.js → en-MlNeQVSG.js} +6 -3
- package/dist/{cdn/chunks/es-DaWsTkpj.js → es-2s8x4OM2.js} +6 -3
- package/dist/{extensions-CAuXwpbI.js → extensions-DCJGAZ9z.js} +74 -74
- package/dist/{eye-DK4--qHk.js → eye-BE-DeEqG.js} +1 -1
- package/dist/{fr-DqwQHtJo.js → fr-D3MjrsgQ.js} +6 -1
- package/dist/{image-B5pJOw5Q.js → image-DfRxUmUh.js} +1 -1
- package/dist/index.d.ts +37 -7
- package/dist/{info-DKM0_thN.js → info-D1PS-81D.js} +1 -1
- package/dist/{cdn/chunks/ja-BH4MS1Ye.js → ja-B4Kx7uBX.js} +6 -3
- package/dist/keys-B4DimcgX.js +9 -0
- package/dist/{link-BNgTZ_Sw.js → link-DLaACaIz.js} +1 -1
- package/dist/{list-Bqynqm7o.js → list-CvtzVlvM.js} +1 -1
- package/dist/{loader-circle-BMc3fVpa.js → loader-circle-DCkSXApP.js} +1 -1
- package/dist/{message-circle-D_TpvAJh.js → message-circle-Bj4F9bBO.js} +1 -1
- package/dist/{cdn/chunks/nl-BQl1_UHv.js → nl-U65iX7wN.js} +6 -3
- package/dist/{normalizeMergeTagMarkup-fgoVMKAc.js → normalizeMergeTagMarkup-B7n_-4Dz.js} +45 -45
- package/dist/{package-D2fov5PU.js → package-By1au8Wi.js} +1 -1
- package/dist/{pencil-BNdkJyfY.js → pencil-T4qqyRLl.js} +1 -1
- package/dist/{plus-CWmBmMx-.js → plus-3Zry-1gs.js} +1 -1
- package/dist/{cdn/chunks/preRenderCustomBlocks-CxwYcAQe.js → preRenderCustomBlocks-D3GzENVB.js} +1 -3
- package/dist/{cdn/chunks/pt-BR-eyzmU9Vs.js → pt-BR-_jsX1xLv.js} +6 -3
- package/dist/{refresh-cw-Ryg1j66N.js → refresh-cw-BwaO0ioc.js} +1 -1
- package/dist/{rotate-ccw-D8j7gXXv.js → rotate-ccw-C3E0W5q-.js} +1 -1
- package/dist/{sanitizeHtml-D2wueiEe.js → sanitizeHtml-BcbjlypU.js} +6 -6
- package/dist/{search-CX2JkSHz.js → search-DfExisVv.js} +1 -1
- package/dist/{send-BLR1b-p5.js → send-FRC7Giap.js} +1 -1
- package/dist/{smartphone-Co8m0LLg.js → smartphone-BlYU_z_x.js} +1 -1
- package/dist/{socialIcons-RKdTgJip.js → socialIcons-By2LPWOQ.js} +563 -585
- package/dist/{sparkles-Dc3Undp5.js → sparkles-DSi61skE.js} +1 -1
- package/dist/{square-CPw_cyX8.js → square-DEE8tT2w.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +640 -640
- package/dist/{text-align-start-2VZGhCiK.js → text-align-start-DGdrmKcG.js} +1 -1
- package/dist/{trash-t6XXliVc.js → trash-YZPJMZc7.js} +1 -1
- package/dist/{triangle-exclamation-point-_YYWE2ZH.js → triangle-exclamation-point-BR-W6pQm.js} +1 -1
- package/dist/{upload-BWYXWYHb.js → upload-B_Eoqj-4.js} +1 -1
- package/dist/{useCloudI18n-nMZ9f_4b.js → useCloudI18n-BnuOL1YS.js} +1 -1
- package/dist/{useEditorRoot-DpssP9rX.js → useEditorRoot-DWfC2CVC.js} +1 -1
- package/dist/{useI18n-C2p-qHeb.js → useI18n-Cx9W7OWb.js} +1 -1
- package/dist/useLocalizedDisplay-_P6-hXaO.js +31 -0
- package/dist/{useLogicTag-59fmujI7.js → useLogicTag-f0SJ1Cd2.js} +2 -2
- package/dist/{useMergeTag-M1vauWet.js → useMergeTag-0-EudwkV.js} +4 -4
- package/dist/{usePopoverPosition-L9MOHBM-.js → usePopoverPosition-DF0ZYH7g.js} +1 -1
- package/dist/{useScrollToBlock-BMF0Dt5l.js → useScrollToBlock-CtM_ydOS.js} +2 -2
- package/dist/withCurrentFont-BOg3jmCT.js +18 -0
- package/dist/{x-CTKOxIyZ.js → x-C0X5MoK3.js} +1 -1
- package/package.json +22 -22
- package/dist/cdn/chunks/AiAltTextPopover-Dj-VLU88.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-tVkJPOk6.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-CYPvHQGQ.js.map +0 -1
- package/dist/cdn/chunks/AiPanels-ChTLCmMS.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-B23ozFnP.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-BKO4Mr8f.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CaRneMZ8.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-O_K3jmgO.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-xAEirqNC.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-CwAoa-73.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-DdQQwtwd.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-C8AKtxiG.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-FxY0RHSq.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-DGgnPUlu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-9PtYUgCW.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-Co-ffgWa.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-Cl0ajnXZ.js.map +0 -1
- package/dist/cdn/chunks/LocaleNotices-BVDJ7kyj.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-DPYA8LJW.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-CfgN7Jyi.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-Cb5vsgb-.js.map +0 -1
- package/dist/cdn/chunks/MergeTagInput-Cxfjq3tx.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-BmNGV3yc.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-DmwrPAss.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-BoGELRr-.js.map +0 -1
- package/dist/cdn/chunks/RestoreVersionDialog-CaKiSq-9.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-Dq4TROOg.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-BAR0G4UO.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-C-KYaLkQ.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-C3OF0EeB.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-BnyPXw5W.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-uoiUkd2l.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-B9d3ZsH7.js.map +0 -1
- package/dist/cdn/chunks/TestEmailPanel--fPi6QjN.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-Cn4fnSpa.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-BzAuH2G4.js.map +0 -1
- package/dist/cdn/chunks/TplModal-jMfK19PC.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-DDqYMqC2.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DJpySkvq.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-CYT5QUoc.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-Bi9XgDmX.js.map +0 -1
- package/dist/cdn/chunks/ca-YfIxwO1G.js.map +0 -1
- package/dist/cdn/chunks/composables-Cp6gZ7qV.js.map +0 -1
- package/dist/cdn/chunks/da-CM6DCvRG.js.map +0 -1
- package/dist/cdn/chunks/de-Dugz1zXC.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-CXSSZplR.js.map +0 -1
- package/dist/cdn/chunks/en-BykoFuFY.js.map +0 -1
- package/dist/cdn/chunks/en-DYMYt1TN.js +0 -1
- package/dist/cdn/chunks/es-DaWsTkpj.js.map +0 -1
- package/dist/cdn/chunks/extensions-BYJPv1sA.js.map +0 -1
- package/dist/cdn/chunks/fr-DqwQHtJo.js.map +0 -1
- package/dist/cdn/chunks/ja-BH4MS1Ye.js.map +0 -1
- package/dist/cdn/chunks/keys-DNv3xXxI.js +0 -11
- package/dist/cdn/chunks/keys-DNv3xXxI.js.map +0 -1
- package/dist/cdn/chunks/nl-BQl1_UHv.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-eyzmU9Vs.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-bvQ57o1m.js.map +0 -1
- package/dist/cdn/chunks/src-BRyzUujm.js.map +0 -1
- package/dist/cdn/chunks/src-CVHGPKSW.js.map +0 -1
- package/dist/cdn/chunks/src-aFRxbwqP.js +0 -707
- package/dist/cdn/chunks/src-aFRxbwqP.js.map +0 -1
- package/dist/cdn/chunks/tiptap-B7gxx0aJ.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-7iwZ1UhB.js +0 -33
- package/dist/dist-CkIeJEsa.js +0 -4
- package/dist/dist-eAgG-nCb.js +0 -4
- package/dist/en-DvCaYqiR.js +0 -1
- package/dist/keys-BeQy64On.js +0 -9
- package/dist/useLocalizedDisplay-9RqT2y_Y.js +0 -31
- package/dist/withCurrentFont-BXZ7g-K6.js +0 -18
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../types/
|
|
1
|
+
// ../types/src/blocks.ts
|
|
2
2
|
var e = [
|
|
3
3
|
"top",
|
|
4
4
|
"right",
|
|
@@ -37,7 +37,7 @@ function a(e) {
|
|
|
37
37
|
}
|
|
38
38
|
function o(e) {
|
|
39
39
|
if (e == null) return null;
|
|
40
|
-
let t = typeof e == "number" ?
|
|
40
|
+
let t = i.map(typeof e == "number" ? () => a(e) : (t) => a(e[t]));
|
|
41
41
|
return t.every((e) => e === 0) ? null : t.every((e) => e === t[0]) ? `${t[0]}px` : t.map((e) => `${e}px`).join(" ");
|
|
42
42
|
}
|
|
43
43
|
var s = {
|
|
@@ -45,188 +45,37 @@ var s = {
|
|
|
45
45
|
2: 28,
|
|
46
46
|
3: 22,
|
|
47
47
|
4: 18
|
|
48
|
-
}, c = 1.3, l = 1.2
|
|
48
|
+
}, c = 1.3, l = 1.2;
|
|
49
|
+
function u(e) {
|
|
50
|
+
let t = e.lineHeight;
|
|
51
|
+
return typeof t == "number" && Number.isFinite(t) && t > 0 ? t : l;
|
|
52
|
+
}
|
|
53
|
+
var d = {
|
|
49
54
|
paragraphGap: 8,
|
|
50
55
|
listMarginY: 8,
|
|
51
56
|
listPaddingLeft: 24,
|
|
52
57
|
listItemMarginY: 4
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"left",
|
|
59
|
-
"center",
|
|
60
|
-
"right"
|
|
61
|
-
], p = [
|
|
62
|
-
"top",
|
|
63
|
-
"center",
|
|
64
|
-
"bottom"
|
|
65
|
-
];
|
|
66
|
-
function ee(e) {
|
|
67
|
-
return {
|
|
68
|
-
url: e,
|
|
69
|
-
size: "cover",
|
|
70
|
-
position: {
|
|
71
|
-
x: "center",
|
|
72
|
-
y: "center"
|
|
73
|
-
},
|
|
74
|
-
repeat: !1
|
|
75
|
-
};
|
|
58
|
+
}, f = /^(?:100(?:\.0+)?|\d{1,2}(?:\.\d+)?)%$/;
|
|
59
|
+
function p(e) {
|
|
60
|
+
if (typeof e != "string" || !f.test(e)) return null;
|
|
61
|
+
let t = Number(e.slice(0, -1));
|
|
62
|
+
return t > 0 && t <= 100 ? t : null;
|
|
76
63
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
function ee(e) {
|
|
65
|
+
if (!Number.isFinite(e)) return e;
|
|
66
|
+
let t = te(e, 2);
|
|
67
|
+
return Number.isFinite(t) ? te(Math.round(t), -2) : e;
|
|
68
|
+
}
|
|
69
|
+
function te(e, t) {
|
|
70
|
+
let n = String(e), r = /^(-?\d+(?:\.\d+)?)e([+-]?\d+)$/i.exec(n);
|
|
71
|
+
if (r) {
|
|
72
|
+
let e = Number(r[2]) + t;
|
|
73
|
+
return Number(`${r[1]}e${e}`);
|
|
82
74
|
}
|
|
83
|
-
return t;
|
|
75
|
+
return Number(`${n}e${t}`);
|
|
84
76
|
}
|
|
77
|
+
// ../types/src/element-ids.ts
|
|
85
78
|
function ne(e) {
|
|
86
|
-
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
87
|
-
if (!e || !t) return null;
|
|
88
|
-
let n = d.includes(e.size) ? e.size : "cover", r = e.position, i = r && f.includes(r.x) ? r.x : "center", a = r && p.includes(r.y) ? r.y : "center";
|
|
89
|
-
return {
|
|
90
|
-
url: te(t),
|
|
91
|
-
size: n,
|
|
92
|
-
position: `${i} ${a}`,
|
|
93
|
-
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
var re = [
|
|
97
|
-
"top",
|
|
98
|
-
"middle",
|
|
99
|
-
"bottom"
|
|
100
|
-
];
|
|
101
|
-
function ie(e) {
|
|
102
|
-
let t = e.hero;
|
|
103
|
-
if (!t || typeof t != "object") return null;
|
|
104
|
-
if (e.columns !== "1") return {
|
|
105
|
-
applied: !1,
|
|
106
|
-
reason: "columns"
|
|
107
|
-
};
|
|
108
|
-
let n = ne(e.backgroundImage);
|
|
109
|
-
if (n === null) return {
|
|
110
|
-
applied: !1,
|
|
111
|
-
reason: "image"
|
|
112
|
-
};
|
|
113
|
-
let r = oe(e.backgroundImage), i = ae(t.height) ? Math.round(t.height) : "image";
|
|
114
|
-
return i === "image" && r === null ? {
|
|
115
|
-
applied: !1,
|
|
116
|
-
reason: "size"
|
|
117
|
-
} : {
|
|
118
|
-
applied: !0,
|
|
119
|
-
image: n,
|
|
120
|
-
height: i,
|
|
121
|
-
verticalAlign: re.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
122
|
-
aspectRatio: r
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function ae(e) {
|
|
126
|
-
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
127
|
-
}
|
|
128
|
-
function oe(e) {
|
|
129
|
-
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
130
|
-
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
131
|
-
}
|
|
132
|
-
var se = {
|
|
133
|
-
facebook: {
|
|
134
|
-
color: "#1877F2",
|
|
135
|
-
path: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"
|
|
136
|
-
},
|
|
137
|
-
twitter: {
|
|
138
|
-
color: "#000000",
|
|
139
|
-
path: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
|
|
140
|
-
},
|
|
141
|
-
instagram: {
|
|
142
|
-
color: "#E4405F",
|
|
143
|
-
path: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"
|
|
144
|
-
},
|
|
145
|
-
linkedin: {
|
|
146
|
-
color: "#0A66C2",
|
|
147
|
-
path: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
|
|
148
|
-
},
|
|
149
|
-
xing: {
|
|
150
|
-
color: "#006567",
|
|
151
|
-
path: "M18.188 0c-.517 0-.741.325-.927.66c0 0-7.455 13.224-7.702 13.657c.015.024 4.919 9.023 4.919 9.023c.17.308.436.66.967.66h3.454c.211 0 .375-.078.463-.22c.089-.151.089-.346-.009-.536l-4.879-8.916a.02.02 0 0 1 0-.022L22.139.756c.095-.191.097-.387.006-.535C22.056.078 21.894 0 21.686 0zM3.648 4.74c-.211 0-.385.074-.473.216c-.09.149-.078.339.02.531l2.34 4.05q.006.014 0 .021L1.86 16.051a.52.52 0 0 0 0 .529c.085.142.239.234.45.234h3.461c.518 0 .766-.348.945-.667l3.734-6.609l-2.378-4.155c-.172-.315-.434-.659-.962-.659H3.648z"
|
|
152
|
-
},
|
|
153
|
-
youtube: {
|
|
154
|
-
color: "#FF0000",
|
|
155
|
-
path: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
|
|
156
|
-
},
|
|
157
|
-
tiktok: {
|
|
158
|
-
color: "#000000",
|
|
159
|
-
path: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"
|
|
160
|
-
},
|
|
161
|
-
pinterest: {
|
|
162
|
-
color: "#BD081C",
|
|
163
|
-
path: "M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738.098.119.112.224.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z"
|
|
164
|
-
},
|
|
165
|
-
email: {
|
|
166
|
-
color: "#6B7280",
|
|
167
|
-
path: "M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"
|
|
168
|
-
},
|
|
169
|
-
website: {
|
|
170
|
-
color: "#6B7280",
|
|
171
|
-
path: "M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"
|
|
172
|
-
},
|
|
173
|
-
whatsapp: {
|
|
174
|
-
color: "#25D366",
|
|
175
|
-
path: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"
|
|
176
|
-
},
|
|
177
|
-
telegram: {
|
|
178
|
-
color: "#26A5E4",
|
|
179
|
-
path: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
|
|
180
|
-
},
|
|
181
|
-
discord: {
|
|
182
|
-
color: "#5865F2",
|
|
183
|
-
path: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z"
|
|
184
|
-
},
|
|
185
|
-
snapchat: {
|
|
186
|
-
color: "#FFFC00",
|
|
187
|
-
path: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146 1.124.347 2.317.535 3.554.535 6.627 0 12.017-5.373 12.017-12.001C24.034 5.367 18.644 0 12.017 0z"
|
|
188
|
-
},
|
|
189
|
-
reddit: {
|
|
190
|
-
color: "#FF4500",
|
|
191
|
-
path: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"
|
|
192
|
-
},
|
|
193
|
-
github: {
|
|
194
|
-
color: "#181717",
|
|
195
|
-
path: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
|
|
196
|
-
},
|
|
197
|
-
dribbble: {
|
|
198
|
-
color: "#EA4C89",
|
|
199
|
-
path: "M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.392-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.43 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z"
|
|
200
|
-
},
|
|
201
|
-
behance: {
|
|
202
|
-
color: "#1769FF",
|
|
203
|
-
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
204
|
-
}
|
|
205
|
-
}, ce = {
|
|
206
|
-
dark: "#1f1f1f",
|
|
207
|
-
light: "#ffffff"
|
|
208
|
-
};
|
|
209
|
-
function le(e) {
|
|
210
|
-
return e === "dark" || e === "light" ? e : void 0;
|
|
211
|
-
}
|
|
212
|
-
function ue(e, t) {
|
|
213
|
-
let n = le(t);
|
|
214
|
-
return {
|
|
215
|
-
fill: n ? ce[n] : se[e].color,
|
|
216
|
-
onFill: n === "light" ? ce.dark : "#ffffff"
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
function de(e, t) {
|
|
220
|
-
if (le(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
221
|
-
color: ce.light,
|
|
222
|
-
opacity: .6,
|
|
223
|
-
width: 1.4
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
function fe(e) {
|
|
227
|
-
return e === "plain" ? .84 : .6;
|
|
228
|
-
}
|
|
229
|
-
function pe(e) {
|
|
230
79
|
let t = [], n = (e, n) => {
|
|
231
80
|
typeof e == "string" && /[./]/.test(e) && t.push({
|
|
232
81
|
path: n,
|
|
@@ -244,6 +93,7 @@ function pe(e) {
|
|
|
244
93
|
};
|
|
245
94
|
return r(e.blocks, "blocks"), t;
|
|
246
95
|
}
|
|
96
|
+
// ../types/src/clone.ts
|
|
247
97
|
function m(e) {
|
|
248
98
|
let t = [];
|
|
249
99
|
return JSON.parse(JSON.stringify(e, function(e, n) {
|
|
@@ -252,21 +102,23 @@ function m(e) {
|
|
|
252
102
|
if (!t.includes(n)) return t.push(n), n;
|
|
253
103
|
}));
|
|
254
104
|
}
|
|
255
|
-
|
|
105
|
+
// ../types/src/deep-equal.ts
|
|
106
|
+
function re(e) {
|
|
256
107
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
257
108
|
}
|
|
258
109
|
function h(e, t) {
|
|
259
110
|
if (e === t) return !0;
|
|
260
111
|
if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => h(e, t[n]));
|
|
261
|
-
if (
|
|
262
|
-
if (!
|
|
112
|
+
if (re(e)) {
|
|
113
|
+
if (!re(t)) return !1;
|
|
263
114
|
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
264
115
|
for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !h(e[r], t[r])) return !1;
|
|
265
116
|
return !0;
|
|
266
117
|
}
|
|
267
118
|
return !1;
|
|
268
119
|
}
|
|
269
|
-
|
|
120
|
+
// ../types/src/config.ts
|
|
121
|
+
var ie = class extends Error {
|
|
270
122
|
statusCode;
|
|
271
123
|
code;
|
|
272
124
|
constructor(e, t, n, r) {
|
|
@@ -281,7 +133,7 @@ var he = class extends Error {
|
|
|
281
133
|
get isServerError() {
|
|
282
134
|
return this.statusCode !== void 0 && this.statusCode >= 500;
|
|
283
135
|
}
|
|
284
|
-
},
|
|
136
|
+
}, ae = {
|
|
285
137
|
title: ["content"],
|
|
286
138
|
paragraph: ["content"],
|
|
287
139
|
html: ["content"],
|
|
@@ -299,27 +151,27 @@ var he = class extends Error {
|
|
|
299
151
|
],
|
|
300
152
|
custom: ["fieldValues.*"]
|
|
301
153
|
}, g = ["preheaderText"];
|
|
302
|
-
function
|
|
154
|
+
function oe(e) {
|
|
303
155
|
return typeof e == "string" && /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(e);
|
|
304
156
|
}
|
|
305
157
|
function _(e) {
|
|
306
158
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
307
159
|
}
|
|
308
|
-
var
|
|
160
|
+
var se = /* @__PURE__ */ new Set([
|
|
309
161
|
"__proto__",
|
|
310
162
|
"constructor",
|
|
311
163
|
"prototype"
|
|
312
164
|
]);
|
|
313
165
|
function v(e) {
|
|
314
|
-
return e.split(".").every((e) => e !== "" && !
|
|
166
|
+
return e.split(".").every((e) => e !== "" && !se.has(e));
|
|
315
167
|
}
|
|
316
|
-
function
|
|
317
|
-
if (!
|
|
168
|
+
function ce(e, t) {
|
|
169
|
+
if (!se.has(t)) return Array.isArray(e) ? e.find((e) => _(e) && e.id === t) : _(e) && Object.hasOwn(e, t) ? e[t] : void 0;
|
|
318
170
|
}
|
|
319
171
|
function y(e, t) {
|
|
320
|
-
return t.split(".").reduce(
|
|
172
|
+
return t.split(".").reduce(ce, e);
|
|
321
173
|
}
|
|
322
|
-
function
|
|
174
|
+
function le(e) {
|
|
323
175
|
let t = m(e);
|
|
324
176
|
for (let [n, r] of Object.entries(t.l10n ?? {})) {
|
|
325
177
|
for (let t of ["text", "set"]) {
|
|
@@ -333,23 +185,23 @@ function be(e) {
|
|
|
333
185
|
}
|
|
334
186
|
return t.l10n && !Object.keys(t.l10n).length && delete t.l10n, h(t, e) ? e : t;
|
|
335
187
|
}
|
|
336
|
-
function
|
|
337
|
-
let t =
|
|
188
|
+
function ue(e) {
|
|
189
|
+
let t = le(e);
|
|
338
190
|
if (t.type === "wrapper") {
|
|
339
|
-
let e = t.children.map(
|
|
191
|
+
let e = t.children.map(ue);
|
|
340
192
|
return e.some((e, n) => e !== t.children[n]) ? {
|
|
341
193
|
...t,
|
|
342
194
|
children: e
|
|
343
195
|
} : t;
|
|
344
196
|
}
|
|
345
197
|
if (t.type !== "section") return t;
|
|
346
|
-
let n = t.children.map((e) => e.map(
|
|
198
|
+
let n = t.children.map((e) => e.map(ue));
|
|
347
199
|
return n.some((e, n) => e.some((e, r) => e !== t.children[n][r])) ? {
|
|
348
200
|
...t,
|
|
349
201
|
children: n
|
|
350
202
|
} : t;
|
|
351
203
|
}
|
|
352
|
-
function
|
|
204
|
+
function de(e, t, n) {
|
|
353
205
|
if (e.type === "custom") return !1;
|
|
354
206
|
if (e.type === "section") return t === "columns";
|
|
355
207
|
let r = e.type === "menu" ? "items" : e.type === "social" ? "icons" : e.type === "table" ? "rows" : null;
|
|
@@ -370,30 +222,30 @@ function Se(e, t, n) {
|
|
|
370
222
|
}
|
|
371
223
|
return !1;
|
|
372
224
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
225
|
+
function fe(e) {
|
|
226
|
+
return le(e);
|
|
375
227
|
}
|
|
376
228
|
function b(e, t, n) {
|
|
377
229
|
if (!v(t)) return !1;
|
|
378
|
-
let r = t.split("."), i = r.pop(), a = r.reduce(
|
|
230
|
+
let r = t.split("."), i = r.pop(), a = r.reduce(ce, e);
|
|
379
231
|
if (Array.isArray(a)) {
|
|
380
232
|
let e = a.findIndex((e) => _(e) && e.id === i);
|
|
381
233
|
return e < 0 ? !1 : (a[e] = m(n), !0);
|
|
382
234
|
}
|
|
383
235
|
return _(a) ? (n === null ? delete a[i] : a[i] = m(n), !0) : !1;
|
|
384
236
|
}
|
|
385
|
-
function
|
|
237
|
+
function pe(e, t) {
|
|
386
238
|
let [n, ...r] = t.split(".");
|
|
387
239
|
if (n === void 0) return [""];
|
|
388
240
|
let i = [];
|
|
389
241
|
if (n === "*") {
|
|
390
242
|
let t = Array.isArray(e) ? e : [];
|
|
391
|
-
for (let e of t) if (_(e) && typeof e.id == "string") for (let t of r.length ?
|
|
243
|
+
for (let e of t) if (_(e) && typeof e.id == "string") for (let t of r.length ? pe(e, r.join(".")) : [""]) i.push(t ? `${e.id}.${t}` : e.id);
|
|
392
244
|
return i;
|
|
393
245
|
}
|
|
394
246
|
let a = _(e) ? e[n] : void 0;
|
|
395
247
|
if (r.length === 0) return a === void 0 ? [] : [n];
|
|
396
|
-
for (let e of
|
|
248
|
+
for (let e of pe(a, r.join("."))) i.push(`${n}.${e}`);
|
|
397
249
|
return i;
|
|
398
250
|
}
|
|
399
251
|
function x(e, t = []) {
|
|
@@ -411,10 +263,10 @@ function x(e, t = []) {
|
|
|
411
263
|
cells: e.cells.filter(n)
|
|
412
264
|
}))
|
|
413
265
|
} : e;
|
|
414
|
-
return (
|
|
266
|
+
return (ae[e.type] ?? []).flatMap((e) => pe(r, e));
|
|
415
267
|
}
|
|
416
|
-
function
|
|
417
|
-
return (
|
|
268
|
+
function me(e, t) {
|
|
269
|
+
return (ae[e] ?? []).some((e) => {
|
|
418
270
|
let n = e.split("."), r = t.split(".");
|
|
419
271
|
return n.length === r.length && n.every((e, t) => e === "*" || e === r[t]);
|
|
420
272
|
});
|
|
@@ -424,62 +276,62 @@ function S(e) {
|
|
|
424
276
|
for (let n of new TextEncoder().encode(e)) t ^= n, t = Math.imul(t, 16777619) >>> 0;
|
|
425
277
|
return t.toString(16).padStart(8, "0");
|
|
426
278
|
}
|
|
427
|
-
function
|
|
279
|
+
function he(e) {
|
|
428
280
|
let { l10n: t, ...n } = e;
|
|
429
281
|
return n;
|
|
430
282
|
}
|
|
431
|
-
function
|
|
283
|
+
function ge(e = {}) {
|
|
432
284
|
return Object.entries(e).sort(([e], [t]) => e.split(".").length - t.split(".").length);
|
|
433
285
|
}
|
|
434
|
-
function
|
|
435
|
-
return
|
|
286
|
+
function _e(e, t, n) {
|
|
287
|
+
return ve(e, m(he(e)), t, n);
|
|
436
288
|
}
|
|
437
|
-
function
|
|
289
|
+
function ve(e, t, n, r) {
|
|
438
290
|
let i = e;
|
|
439
291
|
if (n === r) return t;
|
|
440
292
|
let a = i.l10n?.[n];
|
|
441
293
|
if (!a) return t;
|
|
442
|
-
for (let [e, n] of
|
|
294
|
+
for (let [e, n] of ge(a.set)) b(t, e, n);
|
|
443
295
|
for (let [n, r] of Object.entries(a.text ?? {})) y(e, n) !== void 0 && b(t, n, r.value);
|
|
444
296
|
return e.type === "custom" && (Object.keys(a.text ?? {}).length > 0 || Object.keys(a.set ?? {}).length > 0) && delete t.renderedHtml, t;
|
|
445
297
|
}
|
|
446
|
-
function
|
|
298
|
+
function ye(e, t, n) {
|
|
447
299
|
let r = e;
|
|
448
|
-
if (r.type !== "section" && r.type !== "wrapper" || !Array.isArray(r.children)) return
|
|
449
|
-
let { children: i, ...a } =
|
|
450
|
-
return o.children = i,
|
|
300
|
+
if (r.type !== "section" && r.type !== "wrapper" || !Array.isArray(r.children)) return _e(e, t, n);
|
|
301
|
+
let { children: i, ...a } = he(r), o = m(a);
|
|
302
|
+
return o.children = i, ve(e, o, t, n);
|
|
451
303
|
}
|
|
452
|
-
function
|
|
304
|
+
function be(e, t) {
|
|
453
305
|
return e.l10n?.[t]?.hidden === !0;
|
|
454
306
|
}
|
|
455
|
-
function
|
|
307
|
+
function xe(e) {
|
|
456
308
|
let { locales: t, l10n: n, ...r } = e;
|
|
457
309
|
return r;
|
|
458
310
|
}
|
|
459
311
|
function C(e) {
|
|
460
312
|
return e.settings?.locale ?? "en";
|
|
461
313
|
}
|
|
462
|
-
function
|
|
463
|
-
let r = C(e)
|
|
464
|
-
if (t !== r && !
|
|
314
|
+
function Se(e, t, n) {
|
|
315
|
+
let r = C(e);
|
|
316
|
+
if (t !== r && !(e.settings?.locales ?? []).includes(t)) {
|
|
465
317
|
if (n?.missing === "default") t = r;
|
|
466
|
-
else throw new
|
|
467
|
-
}
|
|
468
|
-
let
|
|
469
|
-
if (t !== r &&
|
|
470
|
-
let n = e.l10n?.[t],
|
|
471
|
-
return
|
|
472
|
-
}),
|
|
473
|
-
if (t !== r &&
|
|
474
|
-
for (let [e, t] of
|
|
475
|
-
for (let [t, n] of Object.entries(
|
|
476
|
-
}
|
|
477
|
-
return
|
|
478
|
-
blocks:
|
|
479
|
-
settings:
|
|
318
|
+
else throw new ie(`This template has no "${t}" version.`, void 0, "unknown_locale");
|
|
319
|
+
}
|
|
320
|
+
let i = (e) => e.flatMap((e) => {
|
|
321
|
+
if (t !== r && be(e, t)) return [];
|
|
322
|
+
let n = e.l10n?.[t], a = [...Object.keys(n?.set ?? {}), ...Object.keys(n?.text ?? {})].some((e) => e.startsWith("children.")) ? _e(e, t, r) : ye(e, t, r);
|
|
323
|
+
return a.type === "section" && Array.isArray(a.children) ? a.children = a.children.map((e) => i(e)) : a.type === "wrapper" && Array.isArray(a.children) && (a.children = i(a.children)), [a];
|
|
324
|
+
}), a = m(xe(e.settings)), o = e.settings?.l10n?.[t];
|
|
325
|
+
if (t !== r && o) {
|
|
326
|
+
for (let [e, t] of ge(o.set)) b(a, e, t);
|
|
327
|
+
for (let [t, n] of Object.entries(o.text ?? {})) y(e.settings, t) !== void 0 && b(a, t, n.value);
|
|
328
|
+
}
|
|
329
|
+
return a.locale = t, {
|
|
330
|
+
blocks: i(e.blocks),
|
|
331
|
+
settings: a
|
|
480
332
|
};
|
|
481
333
|
}
|
|
482
|
-
function
|
|
334
|
+
function Ce(e, t, n = []) {
|
|
483
335
|
let r = {
|
|
484
336
|
translated: [],
|
|
485
337
|
missing: [],
|
|
@@ -493,7 +345,7 @@ function Pe(e, t, n = []) {
|
|
|
493
345
|
}
|
|
494
346
|
}, a = (e) => {
|
|
495
347
|
for (let r of e) {
|
|
496
|
-
if (
|
|
348
|
+
if (be(r, t)) continue;
|
|
497
349
|
let e = r.l10n?.[t];
|
|
498
350
|
i(r.id, r, x(r, n), e?.text);
|
|
499
351
|
let o = r.children;
|
|
@@ -503,34 +355,34 @@ function Pe(e, t, n = []) {
|
|
|
503
355
|
};
|
|
504
356
|
return a(e.blocks), i("settings", e.settings, [...g], e.settings?.l10n?.[t]?.text), r;
|
|
505
357
|
}
|
|
506
|
-
function
|
|
358
|
+
function we(e, t) {
|
|
507
359
|
if (t === C(e) || !e.settings.locales?.includes(t)) return [];
|
|
508
360
|
let n = [], r = (e) => {
|
|
509
|
-
for (let i of e)
|
|
361
|
+
for (let i of e) be(i, t) && n.push(i.id), i.type === "section" ? i.children.forEach(r) : i.type === "wrapper" && r(i.children);
|
|
510
362
|
};
|
|
511
363
|
return r(e.blocks), n;
|
|
512
364
|
}
|
|
513
|
-
function
|
|
365
|
+
function Te(e, t, n = []) {
|
|
514
366
|
if (t === C(e) || !e.settings.locales?.includes(t)) return [];
|
|
515
367
|
let r = [], i = (e, n, i) => {
|
|
516
|
-
r.push(...
|
|
368
|
+
r.push(...Ee(n, t, i).map((t) => `${e}/${t}`));
|
|
517
369
|
}, a = (e) => {
|
|
518
370
|
for (let t of e) i(t.id, t, x(t, n)), t.type === "section" ? t.children.forEach(a) : t.type === "wrapper" && a(t.children);
|
|
519
371
|
};
|
|
520
372
|
return a(e.blocks), i("settings", e.settings, g), r;
|
|
521
373
|
}
|
|
522
|
-
function
|
|
374
|
+
function Ee(e, t, n) {
|
|
523
375
|
let r = e.l10n?.[t];
|
|
524
376
|
return n.filter((t) => {
|
|
525
377
|
let n = y(e, t);
|
|
526
378
|
return typeof n != "string" || n === "" || r?.text?.[t] ? !1 : !Object.keys(r?.set ?? {}).some((n) => (t === n || t.startsWith(`${n}.`)) && (!n.includes(".") || y(e, n.slice(0, n.lastIndexOf("."))) !== void 0));
|
|
527
379
|
});
|
|
528
380
|
}
|
|
529
|
-
function
|
|
381
|
+
function De(e, t, n = {}) {
|
|
530
382
|
let r = C(e), i = (e, n, i) => {
|
|
531
|
-
let a =
|
|
383
|
+
let a = Ee(e, t, i), o = m(e.l10n ?? {}), s = o[t] ?? {}, c = m(e);
|
|
532
384
|
delete c.l10n;
|
|
533
|
-
for (let [e, t] of
|
|
385
|
+
for (let [e, t] of ge(s.set)) b(c, e, t);
|
|
534
386
|
for (let [t, n] of Object.entries(s.text ?? {})) y(e, t) !== void 0 && b(c, t, n.value);
|
|
535
387
|
delete o[t];
|
|
536
388
|
let l = {}, u = /* @__PURE__ */ new Set([
|
|
@@ -569,7 +421,7 @@ function Re(e, t, n = {}) {
|
|
|
569
421
|
};
|
|
570
422
|
for (let t of Object.values(o)) {
|
|
571
423
|
let n = m(e);
|
|
572
|
-
for (let [e, r] of
|
|
424
|
+
for (let [e, r] of ge(t.set)) b(n, e, r);
|
|
573
425
|
for (let [r, i] of Object.entries(t.text ?? {})) y(e, r) !== void 0 && b(n, r, i.value);
|
|
574
426
|
for (let [n, r] of Object.entries(t.text ?? {})) {
|
|
575
427
|
let i = y(c, n);
|
|
@@ -583,7 +435,7 @@ function Re(e, t, n = {}) {
|
|
|
583
435
|
}
|
|
584
436
|
return Object.keys(l).length && (d(l, e), o[r] = l), Object.keys(o).length && (c.l10n = o), c;
|
|
585
437
|
}, a = (e) => e.map((e) => {
|
|
586
|
-
let t = e.type === "custom" ? [.../* @__PURE__ */ new Set([...Object.hasOwn(n, e.id) ? n[e.id] : [], ...Object.values(e.l10n ?? {}).flatMap((e) => Object.keys(e.text ?? {}))])] : x(e), r = i(e, (n) => e.type === "custom" ? t.includes(n) :
|
|
438
|
+
let t = e.type === "custom" ? [.../* @__PURE__ */ new Set([...Object.hasOwn(n, e.id) ? n[e.id] : [], ...Object.values(e.l10n ?? {}).flatMap((e) => Object.keys(e.text ?? {}))])] : x(e), r = i(e, (n) => e.type === "custom" ? t.includes(n) : me(e.type, n), t);
|
|
587
439
|
return e.type === "custom" && r.type === "custom" && !h(e.fieldValues, r.fieldValues) && delete r.renderedHtml, r.type === "section" ? r.children = r.children.map(a) : r.type === "wrapper" && (r.children = a(r.children)), r;
|
|
588
440
|
}), o = i(e.settings, (e) => g.includes(e), g);
|
|
589
441
|
return o.locale = t, o.locales = e.settings.locales.map((e) => e === t ? r : e), {
|
|
@@ -591,12 +443,13 @@ function Re(e, t, n = {}) {
|
|
|
591
443
|
settings: o
|
|
592
444
|
};
|
|
593
445
|
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
446
|
+
// ../types/src/operations.ts
|
|
447
|
+
var Oe = "Sections with a wrapper cannot be placed inside wrappers.";
|
|
448
|
+
function ke(e, t, n = []) {
|
|
449
|
+
let r = Object.fromEntries(P(e.blocks).flatMap((e) => {
|
|
597
450
|
if (e.type !== "custom") return [];
|
|
598
451
|
let t = x(e, n).filter((t) => typeof y(e, t) == "string");
|
|
599
|
-
return t.length &&
|
|
452
|
+
return t.length && Fe.has(e.id) && E("invalid_operation", 0, Ie), t.length ? [[e.id, t]] : [];
|
|
600
453
|
}));
|
|
601
454
|
return {
|
|
602
455
|
op: "setDefaultLocale",
|
|
@@ -612,10 +465,10 @@ var w = class extends Error {
|
|
|
612
465
|
super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
|
|
613
466
|
}
|
|
614
467
|
};
|
|
615
|
-
function
|
|
468
|
+
function Ae(e) {
|
|
616
469
|
return e === "1" ? 1 : e === "3" || e === "1-2-1" ? 3 : e === "4" ? 4 : 2;
|
|
617
470
|
}
|
|
618
|
-
function
|
|
471
|
+
function je(e, t, n = {}) {
|
|
619
472
|
let r = m(e);
|
|
620
473
|
return T(r, t, n), r;
|
|
621
474
|
}
|
|
@@ -624,22 +477,22 @@ function T(e, t, n = {}) {
|
|
|
624
477
|
locks: n.locks ?? [],
|
|
625
478
|
session: n.session ?? null
|
|
626
479
|
};
|
|
627
|
-
t.forEach((t, n) =>
|
|
480
|
+
t.forEach((t, n) => et(e, t, n, r));
|
|
628
481
|
}
|
|
629
|
-
var
|
|
482
|
+
var Me = /* @__PURE__ */ new Set([
|
|
630
483
|
"id",
|
|
631
484
|
"type",
|
|
632
485
|
"children",
|
|
633
486
|
"l10n"
|
|
634
|
-
]),
|
|
487
|
+
]), Ne = /* @__PURE__ */ new Set(["locales", "l10n"]), Pe = /* @__PURE__ */ new Set([
|
|
635
488
|
"locale",
|
|
636
489
|
"locales",
|
|
637
490
|
"l10n"
|
|
638
|
-
]),
|
|
491
|
+
]), Fe = /* @__PURE__ */ new Set([
|
|
639
492
|
"__proto__",
|
|
640
493
|
"constructor",
|
|
641
494
|
"prototype"
|
|
642
|
-
]),
|
|
495
|
+
]), Ie = "customTextFields must map existing custom block ids to lists of string fieldValues paths.";
|
|
643
496
|
function E(e, t, n, r) {
|
|
644
497
|
throw new w(e, t, n, r);
|
|
645
498
|
}
|
|
@@ -649,14 +502,14 @@ function D(e) {
|
|
|
649
502
|
function O(e) {
|
|
650
503
|
return e.type === "section";
|
|
651
504
|
}
|
|
652
|
-
function
|
|
505
|
+
function Le(e) {
|
|
653
506
|
return Array.isArray(e.blocks) ? e.blocks : [];
|
|
654
507
|
}
|
|
655
|
-
function
|
|
508
|
+
function Re(e) {
|
|
656
509
|
let t = e.children;
|
|
657
510
|
return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
|
|
658
511
|
}
|
|
659
|
-
function*
|
|
512
|
+
function* ze(e, t) {
|
|
660
513
|
for (let n = 0; n < e.length; n++) {
|
|
661
514
|
let r = e[n];
|
|
662
515
|
if (D(r) && (yield {
|
|
@@ -665,47 +518,47 @@ function* Ye(e, t) {
|
|
|
665
518
|
index: n,
|
|
666
519
|
parent: t
|
|
667
520
|
}, typeof r.id == "string")) {
|
|
668
|
-
if (O(r)) for (let [e, t] of
|
|
521
|
+
if (O(r)) for (let [e, t] of Re(r).entries()) yield* ze(t, {
|
|
669
522
|
sectionId: r.id,
|
|
670
523
|
column: e
|
|
671
524
|
});
|
|
672
|
-
else r.type === "wrapper" && Array.isArray(r.children) && (yield*
|
|
525
|
+
else r.type === "wrapper" && Array.isArray(r.children) && (yield* ze(r.children, { wrapperId: r.id }));
|
|
673
526
|
}
|
|
674
527
|
}
|
|
675
528
|
}
|
|
676
|
-
function
|
|
677
|
-
for (let n of
|
|
529
|
+
function k(e, t) {
|
|
530
|
+
for (let n of ze(Le(e), null)) if (n.block.id === t) return n;
|
|
678
531
|
return null;
|
|
679
532
|
}
|
|
680
|
-
function
|
|
533
|
+
function A(e) {
|
|
681
534
|
if (!D(e)) return [];
|
|
682
535
|
let t = typeof e.id == "string" ? [e.id] : [];
|
|
683
|
-
if (O(e)) for (let n of
|
|
684
|
-
else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of
|
|
536
|
+
if (O(e)) for (let n of Re(e)) for (let e of Be(n)) t.push(e);
|
|
537
|
+
else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of Be(e.children)) t.push(n);
|
|
685
538
|
return t;
|
|
686
539
|
}
|
|
687
|
-
function
|
|
688
|
-
return e.flatMap(
|
|
540
|
+
function Be(e) {
|
|
541
|
+
return e.flatMap(A);
|
|
689
542
|
}
|
|
690
|
-
function
|
|
543
|
+
function j(e, t) {
|
|
691
544
|
return typeof e.blockId != "string" || e.blockId === "" ? E("invalid_operation", t, "blockId must be a block id.") : e.blockId;
|
|
692
545
|
}
|
|
693
|
-
function
|
|
546
|
+
function Ve(e, t) {
|
|
694
547
|
let n = e.parent;
|
|
695
548
|
return n === null ? null : D(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
|
|
696
549
|
sectionId: n.sectionId,
|
|
697
550
|
column: n.column
|
|
698
551
|
} : D(n) && typeof n.wrapperId == "string" && n.wrapperId !== "" && !Object.hasOwn(n, "sectionId") && !Object.hasOwn(n, "column") ? { wrapperId: n.wrapperId } : E("invalid_operation", t, "parent must be null, { \"sectionId\", \"column\" }, or { \"wrapperId\" }.");
|
|
699
552
|
}
|
|
700
|
-
function
|
|
553
|
+
function He(e, t) {
|
|
701
554
|
let n = e.after;
|
|
702
555
|
return n === null ? null : typeof n == "string" && n !== "" ? n : E("invalid_operation", t, "after must be null or a block id.");
|
|
703
556
|
}
|
|
704
|
-
function
|
|
557
|
+
function M(e, t) {
|
|
705
558
|
let n = e.expect;
|
|
706
559
|
return n == null ? null : D(n) ? n : E("invalid_operation", t, "expect must be an object.");
|
|
707
560
|
}
|
|
708
|
-
function
|
|
561
|
+
function Ue(e, t, n) {
|
|
709
562
|
let r = e.set ?? null, i = e.unset ?? [];
|
|
710
563
|
(r === null || D(r)) && Array.isArray(i) && i.every((e) => typeof e == "string") || E("invalid_operation", t, "set must be an object and unset a list of keys.");
|
|
711
564
|
let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
|
|
@@ -717,50 +570,50 @@ function $e(e, t, n) {
|
|
|
717
570
|
unset: i
|
|
718
571
|
};
|
|
719
572
|
}
|
|
720
|
-
function
|
|
573
|
+
function We(e, t, n) {
|
|
721
574
|
if (D(e) && typeof e.id == "string" && e.id !== "" && typeof e.type == "string" || E("invalid_operation", t, "A block needs a non-empty string id and a string type."), e.type === "wrapper") {
|
|
722
575
|
n !== "root" && E("invalid_operation", t, n === "column" ? "Wrappers can only be placed at the top level." : "Wrappers cannot be placed inside wrappers."), Array.isArray(e.children) || E("invalid_operation", t, "A wrapper needs children: a list of blocks.");
|
|
723
|
-
for (let n of e.children)
|
|
576
|
+
for (let n of e.children) We(n, t, "wrapper");
|
|
724
577
|
return;
|
|
725
578
|
}
|
|
726
579
|
if (!O(e)) return;
|
|
727
|
-
n === "column" && E("invalid_operation", t, "Sections can only be placed at the top level."), n === "wrapper" && e.wrapper && E("invalid_operation", t,
|
|
580
|
+
n === "column" && E("invalid_operation", t, "Sections can only be placed at the top level."), n === "wrapper" && e.wrapper && E("invalid_operation", t, Oe);
|
|
728
581
|
let r = e.children;
|
|
729
582
|
Array.isArray(r) && r.every((e) => Array.isArray(e)) || E("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
|
|
730
|
-
for (let e of r) for (let n of e)
|
|
583
|
+
for (let e of r) for (let n of e) We(n, t, "column");
|
|
731
584
|
}
|
|
732
|
-
function
|
|
585
|
+
function N(e, t) {
|
|
733
586
|
return e.session === null || t.sessionId !== e.session;
|
|
734
587
|
}
|
|
735
|
-
function
|
|
736
|
-
let r = e.locks.find((n) => t.includes(n.blockId) &&
|
|
588
|
+
function Ge(e, t, n) {
|
|
589
|
+
let r = e.locks.find((n) => t.includes(n.blockId) && N(e, n));
|
|
737
590
|
r && E("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
|
|
738
591
|
}
|
|
739
|
-
function
|
|
740
|
-
e.locks.find((r) =>
|
|
592
|
+
function Ke(e, t, n, r) {
|
|
593
|
+
e.locks.find((r) => N(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && E("lock_held", r, `Block "${t}" is being edited in another session.`, t);
|
|
741
594
|
}
|
|
742
|
-
function
|
|
595
|
+
function qe(e, t, n, r) {
|
|
743
596
|
for (let [i, a] of Object.entries(t)) a !== void 0 && (h(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || E("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
|
|
744
597
|
}
|
|
745
|
-
function
|
|
598
|
+
function Je(e, t, n) {
|
|
746
599
|
if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
|
|
747
600
|
if ("wrapperId" in t) {
|
|
748
|
-
let r =
|
|
601
|
+
let r = k(e, t.wrapperId);
|
|
749
602
|
return r ? r.block.type === "wrapper" ? Array.isArray(r.block.children) ? r.block.children : E("invalid_operation", n, `Wrapper "${t.wrapperId}" has no children list.`) : E("invalid_operation", n, `Block "${t.wrapperId}" isn't a wrapper.`) : E("block_missing", n, `No wrapper with id "${t.wrapperId}".`, t.wrapperId);
|
|
750
603
|
}
|
|
751
|
-
let r =
|
|
604
|
+
let r = k(e, t.sectionId);
|
|
752
605
|
if (!r) return E("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
|
|
753
606
|
if (!O(r.block)) return E("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
|
|
754
607
|
let i = r.block.children;
|
|
755
608
|
return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? E("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
|
|
756
609
|
}
|
|
757
|
-
function
|
|
610
|
+
function Ye(e, t, n) {
|
|
758
611
|
if (t === null) return 0;
|
|
759
612
|
let r = e.findIndex((e) => D(e) && e.id === t);
|
|
760
613
|
return r === -1 ? E("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
|
|
761
614
|
}
|
|
762
|
-
function
|
|
763
|
-
let i =
|
|
615
|
+
function Xe(e, t, n, r) {
|
|
616
|
+
let i = Ae(t), a = Array.isArray(e.children) ? e.children : [];
|
|
764
617
|
for (let e = i; e < a.length; e++) {
|
|
765
618
|
let t = a[e];
|
|
766
619
|
Array.isArray(t) && t.length > 0 && E("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
|
|
@@ -769,7 +622,7 @@ function ot(e, t, n, r) {
|
|
|
769
622
|
for (; o.length < i;) o.push([]);
|
|
770
623
|
e.children = o;
|
|
771
624
|
}
|
|
772
|
-
function
|
|
625
|
+
function Ze(e, t, n) {
|
|
773
626
|
for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
|
|
774
627
|
value: m(r),
|
|
775
628
|
writable: !0,
|
|
@@ -778,8 +631,8 @@ function st(e, t, n) {
|
|
|
778
631
|
}) : e[n] = m(r);
|
|
779
632
|
for (let t of n) delete e[t];
|
|
780
633
|
}
|
|
781
|
-
function
|
|
782
|
-
return
|
|
634
|
+
function Qe(e) {
|
|
635
|
+
return ne(e).map((t) => {
|
|
783
636
|
let n = t.path.replace(/\.(items|icons|rows)\[.*$/, "").replace(/\[(\d+)\]/g, ".$1").split(".").reduce((e, t) => e[t], e);
|
|
784
637
|
return {
|
|
785
638
|
id: t.id,
|
|
@@ -787,113 +640,113 @@ function ct(e) {
|
|
|
787
640
|
};
|
|
788
641
|
});
|
|
789
642
|
}
|
|
790
|
-
function
|
|
791
|
-
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ?
|
|
643
|
+
function $e(e, t, n) {
|
|
644
|
+
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ? Qe(n).map(r) : []), a = Qe(e).find((e) => !i.has(r(e)));
|
|
792
645
|
a && E("invalid_operation", t, `Element id "${a.id}" must not contain "." or "/".`, a.blockId);
|
|
793
646
|
}
|
|
794
|
-
function
|
|
647
|
+
function et(e, t, n, r) {
|
|
795
648
|
let i = t;
|
|
796
649
|
switch (D(i) && typeof i.op == "string" || E("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
|
|
797
|
-
case "addBlock": return
|
|
798
|
-
case "moveBlock": return
|
|
799
|
-
case "deleteBlock": return
|
|
800
|
-
case "updateBlock": return
|
|
801
|
-
case "updateSettings": return
|
|
802
|
-
case "setContent": return
|
|
803
|
-
case "setDefaultLocale": return
|
|
804
|
-
case "addLocale": return
|
|
805
|
-
case "removeLocale": return
|
|
806
|
-
case "updateBlockLocale": return
|
|
807
|
-
case "updateSettingsLocale": return
|
|
650
|
+
case "addBlock": return tt(e, i, n);
|
|
651
|
+
case "moveBlock": return nt(e, i, n, r);
|
|
652
|
+
case "deleteBlock": return rt(e, i, n, r);
|
|
653
|
+
case "updateBlock": return it(e, i, n, r);
|
|
654
|
+
case "updateSettings": return at(e, i, n);
|
|
655
|
+
case "setContent": return bt(e, i, n, r);
|
|
656
|
+
case "setDefaultLocale": return xt(e, i, n, r);
|
|
657
|
+
case "addLocale": return ct(e, i, n);
|
|
658
|
+
case "removeLocale": return ut(e, i, n);
|
|
659
|
+
case "updateBlockLocale": return vt(e, i, n, r);
|
|
660
|
+
case "updateSettingsLocale": return yt(e, i, n);
|
|
808
661
|
default: E("invalid_operation", n, `Unknown operation "${i.op}".`);
|
|
809
662
|
}
|
|
810
663
|
}
|
|
811
|
-
function
|
|
812
|
-
let r =
|
|
813
|
-
|
|
664
|
+
function tt(e, t, n) {
|
|
665
|
+
let r = Ve(t, n), i = He(t, n), a = t.block;
|
|
666
|
+
We(a, n, r === null ? "root" : "wrapperId" in r ? "wrapper" : "column"), $e({
|
|
814
667
|
blocks: [a],
|
|
815
668
|
settings: e.settings
|
|
816
669
|
}, n);
|
|
817
|
-
let o = new Set(
|
|
818
|
-
for (let e of
|
|
819
|
-
let c =
|
|
820
|
-
|
|
670
|
+
let o = new Set(Be(Le(e))), s = /* @__PURE__ */ new Set();
|
|
671
|
+
for (let e of A(a)) (o.has(e) || s.has(e)) && E("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
|
|
672
|
+
let c = Je(e, r, n), l = Ye(c, i, n);
|
|
673
|
+
_t(e, a, r, n, !0), c.splice(l, 0, m(a));
|
|
821
674
|
}
|
|
822
|
-
function
|
|
823
|
-
let i =
|
|
675
|
+
function nt(e, t, n, r) {
|
|
676
|
+
let i = j(t, n), a = Ve(t, n), o = He(t, n), s = M(t, n), c = s && s.parent !== void 0 ? Ve({ parent: s.parent }, n) : null, l = k(e, i);
|
|
824
677
|
if (!l) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
825
|
-
if (
|
|
678
|
+
if (Ge(r, A(l.block), n), s) {
|
|
826
679
|
let e = l.index > 0 ? l.list[l.index - 1] : null, t = D(e) ? e.id ?? null : null;
|
|
827
680
|
h(l.parent, c) && h(t, s.after ?? null) || E("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
828
681
|
}
|
|
829
|
-
a !== null && ("wrapperId" in a ? a.wrapperId : a.sectionId) === i && E("invalid_operation", n, "A block cannot be moved into itself or its descendants."), a !== null &&
|
|
830
|
-
let u =
|
|
831
|
-
|
|
682
|
+
a !== null && ("wrapperId" in a ? a.wrapperId : a.sectionId) === i && E("invalid_operation", n, "A block cannot be moved into itself or its descendants."), a !== null && A(l.block).includes("wrapperId" in a ? a.wrapperId : a.sectionId) && E("invalid_operation", n, "A block cannot be moved into itself or its descendants."), O(l.block) && a !== null && "sectionId" in a && E("invalid_operation", n, "Sections can only be placed at the top level."), O(l.block) && l.block.wrapper && a !== null && "wrapperId" in a && E("invalid_operation", n, Oe), l.block.type === "wrapper" && a !== null && E("invalid_operation", n, "wrapperId" in a ? "Wrappers cannot be placed inside wrappers." : "Wrappers can only be placed at the top level."), o === i && E("invalid_operation", n, "A block can't be placed after itself.");
|
|
683
|
+
let u = Je(e, a, n);
|
|
684
|
+
Ye(u.filter((e) => e !== l.block), o, n), _t(e, l.block, a, n, !1), l.list.splice(l.index, 1), u.splice(Ye(u, o, n), 0, l.block);
|
|
832
685
|
}
|
|
833
|
-
function
|
|
834
|
-
let i =
|
|
686
|
+
function rt(e, t, n, r) {
|
|
687
|
+
let i = j(t, n), a = M(t, n), o = k(e, i);
|
|
835
688
|
if (!o) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
836
|
-
|
|
689
|
+
Ge(r, A(o.block), n), a && !h(o.block, a.block ?? null) && E("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
|
|
837
690
|
}
|
|
838
|
-
function
|
|
839
|
-
let i =
|
|
691
|
+
function it(e, t, n, r) {
|
|
692
|
+
let i = j(t, n), { set: a, unset: o } = Ue(t, n, Me), s = M(t, n), c = k(e, i);
|
|
840
693
|
if (!c) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
841
694
|
let l = c.block, u = O(l);
|
|
842
|
-
u && o.includes("columns") && E("invalid_operation", n, "A section's columns can't be unset; set another layout instead."),
|
|
695
|
+
u && o.includes("columns") && E("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), Ge(r, [i], n), s && qe(l, s, n, i), u && c.parent !== null && "wrapperId" in c.parent && a.wrapper && E("invalid_operation", n, Oe);
|
|
843
696
|
let d = { ...l };
|
|
844
|
-
|
|
697
|
+
Ze(d, a, o), $e({
|
|
845
698
|
blocks: [d],
|
|
846
699
|
settings: e.settings
|
|
847
700
|
}, n, {
|
|
848
701
|
blocks: [l],
|
|
849
702
|
settings: e.settings
|
|
850
|
-
}), u && Object.hasOwn(a, "columns") &&
|
|
851
|
-
let f =
|
|
703
|
+
}), u && Object.hasOwn(a, "columns") && Xe(l, a.columns, n, i), Ze(l, a, o);
|
|
704
|
+
let f = ue(l);
|
|
852
705
|
h(l.l10n, f.l10n) || (f.l10n ? l.l10n = f.l10n : delete l.l10n), (u || l.type === "wrapper") && !h(l.children, f.children) && (l.children = f.children);
|
|
853
706
|
}
|
|
854
|
-
function
|
|
855
|
-
let { set: r, unset: i } =
|
|
707
|
+
function at(e, t, n) {
|
|
708
|
+
let { set: r, unset: i } = Ue(t, n, Ne), a = M(t, n);
|
|
856
709
|
e.settings?.locales?.length && (Object.hasOwn(r, "locale") || i.includes("locale")) && E("invalid_operation", n, "The default locale can't change while language versions exist."), D(e.settings) || (e.settings = {});
|
|
857
710
|
let o = e.settings;
|
|
858
|
-
a &&
|
|
859
|
-
let s =
|
|
711
|
+
a && qe(o, a, n), Ze(o, r, i);
|
|
712
|
+
let s = fe(e.settings);
|
|
860
713
|
h(o.l10n, s.l10n) || (s.l10n ? o.l10n = s.l10n : delete o.l10n);
|
|
861
714
|
}
|
|
862
|
-
function
|
|
715
|
+
function ot(e, t) {
|
|
863
716
|
let n = e.locale;
|
|
864
|
-
return
|
|
717
|
+
return oe(n) && n !== "__proto__" && n !== "constructor" && n !== "prototype" || E("invalid_operation", t, "locale must be a language tag."), n;
|
|
865
718
|
}
|
|
866
|
-
function
|
|
867
|
-
let r =
|
|
719
|
+
function st(e, t, n) {
|
|
720
|
+
let r = ot(t, n);
|
|
868
721
|
return e.settings.locales?.includes(r) || E("invalid_operation", n, `Locale "${r}" isn't in settings.locales.`), r;
|
|
869
722
|
}
|
|
870
|
-
function
|
|
871
|
-
let r =
|
|
723
|
+
function ct(e, t, n) {
|
|
724
|
+
let r = ot(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
|
|
872
725
|
(C(e).toLowerCase() === a || i.some((e) => e.toLowerCase() === a) || typeof o != "number" || !Number.isInteger(o) || o < 0 || o > i.length) && E("invalid_operation", n, "The locale already exists or its insertion position is invalid."), e.settings.locales || (e.settings.locales = []), e.settings.locales.splice(o, 0, r);
|
|
873
726
|
}
|
|
874
|
-
function
|
|
875
|
-
return e.flatMap((e) => D(e) ? [e, ...O(e) ?
|
|
727
|
+
function P(e) {
|
|
728
|
+
return e.flatMap((e) => D(e) ? [e, ...O(e) ? Re(e).flatMap(P) : e.type === "wrapper" && Array.isArray(e.children) ? P(e.children) : []] : []);
|
|
876
729
|
}
|
|
877
|
-
function
|
|
730
|
+
function lt(e, t) {
|
|
878
731
|
let n = e.l10n;
|
|
879
732
|
return D(n) && D(n[t]) ? n[t] : {};
|
|
880
733
|
}
|
|
881
|
-
function
|
|
882
|
-
let r =
|
|
734
|
+
function ut(e, t, n) {
|
|
735
|
+
let r = st(e, t, n), i = M(t, n);
|
|
883
736
|
i && (!D(i.blocks) || i.settings !== void 0 && !D(i.settings)) && E("invalid_operation", n, "expect needs a blocks object and an optional settings layer.");
|
|
884
|
-
let a = e.settings, o =
|
|
737
|
+
let a = e.settings, o = P(Le(e)), s = Object.fromEntries(o.flatMap((e) => D(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
|
|
885
738
|
!i || h(s, i.blocks) && h(D(a.l10n) ? a.l10n[r] : void 0, i.settings) || E("precondition_failed", n, `Locale "${r}" has changed since.`);
|
|
886
739
|
for (let e of [...o, a]) D(e.l10n) && (delete e.l10n[r], Object.keys(e.l10n).length === 0 && delete e.l10n);
|
|
887
740
|
e.settings.locales.splice(e.settings.locales.indexOf(r), 1), e.settings.locales.length === 0 && delete e.settings.locales;
|
|
888
741
|
}
|
|
889
|
-
function
|
|
742
|
+
function dt(e, t, n) {
|
|
890
743
|
(e.text === void 0 || ((e) => D(e) && Object.values(e).every((e) => D(e) && typeof e.value == "string" && typeof e.sourceHash == "string"))(e.text)) && (e.set === void 0 || D(e.set) && !Object.values(e.set).some((e) => e === void 0)) && (e.unset === void 0 || Array.isArray(e.unset) && e.unset.every((e) => typeof e == "string" && e !== "" && v(e))) && (e.hidden === void 0 || !n && typeof e.hidden == "boolean") && [
|
|
891
744
|
"text",
|
|
892
745
|
"set",
|
|
893
746
|
"unset",
|
|
894
747
|
...n ? [] : ["hidden"]
|
|
895
748
|
].some((t) => e[t] !== void 0) || E("invalid_operation", t, "A locale update needs text, set, unset or a block's boolean hidden.");
|
|
896
|
-
let r =
|
|
749
|
+
let r = M(e, t);
|
|
897
750
|
return r && (r.text !== void 0 && !D(r.text) || r.set !== void 0 && !D(r.set) || r.hidden !== void 0 && (n || typeof r.hidden != "boolean")) && E("invalid_operation", t, "The locale layer expect is malformed."), {
|
|
898
751
|
text: e.text ?? {},
|
|
899
752
|
set: e.set ?? {},
|
|
@@ -902,20 +755,20 @@ function xt(e, t, n) {
|
|
|
902
755
|
expect: r
|
|
903
756
|
};
|
|
904
757
|
}
|
|
905
|
-
function
|
|
906
|
-
for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) :
|
|
758
|
+
function ft(e, t, n, r) {
|
|
759
|
+
for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) : me(String(e.type), i)) && y(e, i) !== void 0 || E("invalid_operation", n, `Text path "${i}" isn't translatable or doesn't resolve.`);
|
|
907
760
|
for (let i of Object.keys(t.set)) {
|
|
908
|
-
let a = i.split("."), o = r ?
|
|
909
|
-
(!v(i) || o.has(a[0]) || !r &&
|
|
761
|
+
let a = i.split("."), o = r ? Pe : Me, s = a.length === 1 ? e : y(e, a.slice(0, -1).join("."));
|
|
762
|
+
(!v(i) || o.has(a[0]) || !r && de(e, i, t.set[i]) || y(e, i) === void 0 && !D(s)) && E("invalid_operation", n, `Override path "${i}" is immutable or doesn't resolve.`);
|
|
910
763
|
}
|
|
911
764
|
}
|
|
912
|
-
function
|
|
765
|
+
function pt(e, t, n, r) {
|
|
913
766
|
if (t) {
|
|
914
767
|
for (let i of ["text", "set"]) for (let [a, o] of Object.entries(t[i] ?? {})) h(e[i]?.[a] ?? null, o) || E("precondition_failed", n, `Locale path "${a}" has changed since.`, r);
|
|
915
768
|
t.hidden !== void 0 && !h(e.hidden === !0, t.hidden) && E("precondition_failed", n, "The locale's hidden state has changed since.", r);
|
|
916
769
|
}
|
|
917
770
|
}
|
|
918
|
-
function
|
|
771
|
+
function mt(e, t, n) {
|
|
919
772
|
D(e.l10n) || (e.l10n = {});
|
|
920
773
|
let r = e.l10n, i = Object.prototype.hasOwnProperty.call(r, t) ? r[t] : void 0, a = D(i) ? i : {};
|
|
921
774
|
a !== i && (r[t] = a);
|
|
@@ -924,64 +777,327 @@ function wt(e, t, n) {
|
|
|
924
777
|
for (let [e, t] of Object.entries(n.set)) a.set ||= {}, a.set[e] = m(t), a.text && delete a.text[e];
|
|
925
778
|
n.hidden === !0 ? a.hidden = !0 : n.hidden === !1 && delete a.hidden, a.text && Object.keys(a.text).length === 0 && delete a.text, a.set && Object.keys(a.set).length === 0 && delete a.set, Object.keys(a).length === 0 && delete r[t], Object.keys(r).length === 0 && delete e.l10n;
|
|
926
779
|
}
|
|
927
|
-
function
|
|
928
|
-
return D(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(
|
|
780
|
+
function F(e) {
|
|
781
|
+
return D(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(F) : F(e)) : !1;
|
|
929
782
|
}
|
|
930
|
-
function
|
|
783
|
+
function ht(e) {
|
|
931
784
|
return D(e) && D(e.l10n) && Object.values(e.l10n).some((e) => D(e) && e.hidden === !0);
|
|
932
785
|
}
|
|
933
|
-
function
|
|
934
|
-
return !D(e) || !
|
|
786
|
+
function gt(e) {
|
|
787
|
+
return !D(e) || !F(e) ? !1 : ht(e) ? !0 : Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(gt) : gt(e));
|
|
935
788
|
}
|
|
936
|
-
function
|
|
937
|
-
if (!
|
|
789
|
+
function _t(e, t, n, r, i) {
|
|
790
|
+
if (!F(t)) return;
|
|
938
791
|
let a = n, o = !1;
|
|
939
792
|
for (; a !== null;) {
|
|
940
|
-
let t =
|
|
793
|
+
let t = k(e, "wrapperId" in a ? a.wrapperId : a.sectionId);
|
|
941
794
|
if (!t) break;
|
|
942
|
-
|
|
795
|
+
ht(t.block) && (o = !0), a = t.parent;
|
|
943
796
|
}
|
|
944
|
-
(o || i &&
|
|
797
|
+
(o || i && gt(t)) && E("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", D(t) && typeof t.id == "string" ? t.id : void 0);
|
|
945
798
|
}
|
|
946
|
-
function
|
|
947
|
-
let i =
|
|
948
|
-
s || E("block_missing", n, `No block with id "${a}".`, a),
|
|
799
|
+
function vt(e, t, n, r) {
|
|
800
|
+
let i = st(e, t, n), a = j(t, n), o = dt(t, n, !1), s = P(Le(e)).find((e) => e.id === a);
|
|
801
|
+
s || E("block_missing", n, `No block with id "${a}".`, a), ft(s, o, n, !1), Ke(r, a, i, n), pt(lt(s, i), o.expect, n, a), o.hidden === !0 && F(s) && E("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), mt(s, i, o);
|
|
949
802
|
}
|
|
950
|
-
function
|
|
951
|
-
let r =
|
|
952
|
-
|
|
803
|
+
function yt(e, t, n) {
|
|
804
|
+
let r = st(e, t, n), i = dt(t, n, !0), a = e.settings;
|
|
805
|
+
ft(a, i, n, !0), pt(lt(a, r), i.expect, n), mt(a, r, i);
|
|
953
806
|
}
|
|
954
|
-
function
|
|
807
|
+
function bt(e, t, n, r) {
|
|
955
808
|
let i = t.content;
|
|
956
809
|
if (!D(i) || !Array.isArray(i.blocks) || !D(i.settings)) return E("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
|
|
957
|
-
|
|
958
|
-
let a = r.locks.find((e) =>
|
|
810
|
+
$e(i, n, e);
|
|
811
|
+
let a = r.locks.find((e) => N(r, e));
|
|
959
812
|
a && E("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = m(i.blocks), e.settings = m(i.settings);
|
|
960
813
|
}
|
|
961
|
-
function
|
|
962
|
-
let i =
|
|
814
|
+
function xt(e, t, n, r) {
|
|
815
|
+
let i = ot(t, n);
|
|
963
816
|
e.settings.locales?.includes(i) || E("invalid_operation", n, `"${i}" is not a language version of this template.`);
|
|
964
|
-
let a =
|
|
817
|
+
let a = we(e, i);
|
|
965
818
|
a.length && E("invalid_operation", n, a.length === 1 ? `1 block is hidden in "${i}". Show it before making it the default.` : `${a.length} blocks are hidden in "${i}". Show them before making it the default.`, a[0]);
|
|
966
|
-
let o = r.locks.find((e) =>
|
|
819
|
+
let o = r.locks.find((e) => N(r, e));
|
|
967
820
|
o && E("locked_by_others", n, "Other sessions hold locks on this template.", o.blockId);
|
|
968
821
|
let s = t.customTextFields;
|
|
969
822
|
if (s !== void 0) {
|
|
970
|
-
let t =
|
|
823
|
+
let t = P(e.blocks);
|
|
971
824
|
(!D(s) || Object.getOwnPropertyNames(s).some((e) => {
|
|
972
|
-
if (
|
|
825
|
+
if (Fe.has(e)) return !0;
|
|
973
826
|
let n = s[e], r = t.find((t) => t.id === e);
|
|
974
|
-
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !v(e) || !
|
|
975
|
-
})) && E("invalid_operation", n,
|
|
827
|
+
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !v(e) || !me("custom", e) || typeof y(r, e) != "string");
|
|
828
|
+
})) && E("invalid_operation", n, Ie);
|
|
976
829
|
}
|
|
977
|
-
let c =
|
|
830
|
+
let c = De(e, i, t.customTextFields);
|
|
978
831
|
e.blocks = c.blocks, e.settings = c.settings;
|
|
979
832
|
}
|
|
980
|
-
|
|
833
|
+
// ../types/src/columns.ts
|
|
834
|
+
var St = {
|
|
835
|
+
1: [100],
|
|
836
|
+
2: [50, 50],
|
|
837
|
+
3: [
|
|
838
|
+
33.33,
|
|
839
|
+
33.33,
|
|
840
|
+
33.34
|
|
841
|
+
],
|
|
842
|
+
4: [
|
|
843
|
+
25,
|
|
844
|
+
25,
|
|
845
|
+
25,
|
|
846
|
+
25
|
|
847
|
+
],
|
|
848
|
+
"1-2": [33.33, 66.67],
|
|
849
|
+
"2-1": [66.67, 33.33],
|
|
850
|
+
"1-3": [25, 75],
|
|
851
|
+
"3-1": [75, 25],
|
|
852
|
+
"1-2-1": [
|
|
853
|
+
25,
|
|
854
|
+
50,
|
|
855
|
+
25
|
|
856
|
+
]
|
|
857
|
+
};
|
|
858
|
+
function Ct(e) {
|
|
859
|
+
return Object.hasOwn(St, e) ? St[e] : [100];
|
|
860
|
+
}
|
|
861
|
+
function wt(e) {
|
|
862
|
+
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
863
|
+
}
|
|
864
|
+
function Tt(e) {
|
|
865
|
+
let t = e.columnWidths;
|
|
866
|
+
if (t === void 0) return null;
|
|
867
|
+
if (!Array.isArray(t)) return "value";
|
|
868
|
+
if (t.length !== Ae(e.columns)) return "count";
|
|
869
|
+
for (let e = 0; e < t.length; e++) if (!wt(t[e])) return "value";
|
|
870
|
+
return null;
|
|
871
|
+
}
|
|
872
|
+
var Et = 0xe8d4a51000, Dt = 1e4;
|
|
873
|
+
function Ot(e) {
|
|
874
|
+
let t = e.length, n = 0;
|
|
875
|
+
for (let r = 0; r < t; r++) {
|
|
876
|
+
let t = e[r];
|
|
877
|
+
t > n && (n = t);
|
|
878
|
+
}
|
|
879
|
+
let r = [], i = 0n;
|
|
880
|
+
for (let a = 0; a < t; a++) {
|
|
881
|
+
let t = BigInt(Math.round(e[a] / n * Et));
|
|
882
|
+
r.push(t), i += t;
|
|
883
|
+
}
|
|
884
|
+
let a = [], o = [], s = BigInt(Dt);
|
|
885
|
+
for (let e = 0; e < t; e++) {
|
|
886
|
+
let t = r[e] * s;
|
|
887
|
+
a.push(Number(t / i)), o.push(t % i);
|
|
888
|
+
}
|
|
889
|
+
for (let e = 0; e < t; e++) a[e] < 1 && (a[e] = 1);
|
|
890
|
+
let c = 0;
|
|
891
|
+
for (let e = 0; e < t; e++) c += a[e];
|
|
892
|
+
let l = Dt - c, u = Array.from({ length: t }, (e, t) => t);
|
|
893
|
+
if (l > 0) {
|
|
894
|
+
u.sort((e, t) => o[e] === o[t] ? e - t : o[e] > o[t] ? -1 : 1);
|
|
895
|
+
for (let e = 0; e < l; e++) a[u[e]] += 1;
|
|
896
|
+
} else if (l < 0) {
|
|
897
|
+
u.sort((e, t) => o[e] === o[t] ? t - e : o[e] < o[t] ? -1 : 1);
|
|
898
|
+
let e = -l;
|
|
899
|
+
for (let t of u) {
|
|
900
|
+
if (e === 0) break;
|
|
901
|
+
let n = a[t] - 1;
|
|
902
|
+
if (n <= 0) continue;
|
|
903
|
+
let r = Math.min(n, e);
|
|
904
|
+
a[t] = a[t] - r, e -= r;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
return a.map((e) => e / 100);
|
|
908
|
+
}
|
|
909
|
+
function kt(e) {
|
|
910
|
+
return e.columnWidths !== void 0 && Tt(e) === null ? Ot(e.columnWidths) : [...Ct(e.columns)];
|
|
911
|
+
}
|
|
912
|
+
// ../types/src/background-image.ts
|
|
913
|
+
var At = [
|
|
914
|
+
"cover",
|
|
915
|
+
"contain",
|
|
916
|
+
"auto"
|
|
917
|
+
], jt = [
|
|
918
|
+
"left",
|
|
919
|
+
"center",
|
|
920
|
+
"right"
|
|
921
|
+
], Mt = [
|
|
922
|
+
"top",
|
|
923
|
+
"center",
|
|
924
|
+
"bottom"
|
|
925
|
+
];
|
|
926
|
+
function Nt(e) {
|
|
927
|
+
return {
|
|
928
|
+
url: e,
|
|
929
|
+
size: "cover",
|
|
930
|
+
position: {
|
|
931
|
+
x: "center",
|
|
932
|
+
y: "center"
|
|
933
|
+
},
|
|
934
|
+
repeat: !1
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
function Pt(e) {
|
|
938
|
+
let t = "";
|
|
939
|
+
for (let n of e) {
|
|
940
|
+
let e = n.charCodeAt(0);
|
|
941
|
+
t += e < 32 || e === 127 || n === "'" || n === "\"" || n === "\\" ? `%${e.toString(16).toUpperCase().padStart(2, "0")}` : n;
|
|
942
|
+
}
|
|
943
|
+
return t;
|
|
944
|
+
}
|
|
945
|
+
function Ft(e) {
|
|
946
|
+
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
947
|
+
if (!e || !t) return null;
|
|
948
|
+
let n = At.includes(e.size) ? e.size : "cover", r = e.position, i = r && jt.includes(r.x) ? r.x : "center", a = r && Mt.includes(r.y) ? r.y : "center";
|
|
949
|
+
return {
|
|
950
|
+
url: Pt(t),
|
|
951
|
+
size: n,
|
|
952
|
+
position: `${i} ${a}`,
|
|
953
|
+
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
// ../types/src/hero.ts
|
|
957
|
+
var It = [
|
|
958
|
+
"top",
|
|
959
|
+
"middle",
|
|
960
|
+
"bottom"
|
|
961
|
+
];
|
|
962
|
+
function Lt(e) {
|
|
963
|
+
let t = e.hero;
|
|
964
|
+
if (!t || typeof t != "object") return null;
|
|
965
|
+
if (e.columns !== "1") return {
|
|
966
|
+
applied: !1,
|
|
967
|
+
reason: "columns"
|
|
968
|
+
};
|
|
969
|
+
let n = Ft(e.backgroundImage);
|
|
970
|
+
if (n === null) return {
|
|
971
|
+
applied: !1,
|
|
972
|
+
reason: "image"
|
|
973
|
+
};
|
|
974
|
+
let r = zt(e.backgroundImage), i = Rt(t.height) ? Math.round(t.height) : "image";
|
|
975
|
+
return i === "image" && r === null ? {
|
|
976
|
+
applied: !1,
|
|
977
|
+
reason: "size"
|
|
978
|
+
} : {
|
|
979
|
+
applied: !0,
|
|
980
|
+
image: n,
|
|
981
|
+
height: i,
|
|
982
|
+
verticalAlign: It.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
983
|
+
aspectRatio: r
|
|
984
|
+
};
|
|
985
|
+
}
|
|
986
|
+
function Rt(e) {
|
|
987
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
988
|
+
}
|
|
989
|
+
function zt(e) {
|
|
990
|
+
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
991
|
+
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
992
|
+
}
|
|
993
|
+
// ../types/src/social.ts
|
|
994
|
+
var Bt = {
|
|
995
|
+
facebook: {
|
|
996
|
+
color: "#1877F2",
|
|
997
|
+
path: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"
|
|
998
|
+
},
|
|
999
|
+
twitter: {
|
|
1000
|
+
color: "#000000",
|
|
1001
|
+
path: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
|
|
1002
|
+
},
|
|
1003
|
+
instagram: {
|
|
1004
|
+
color: "#E4405F",
|
|
1005
|
+
path: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"
|
|
1006
|
+
},
|
|
1007
|
+
linkedin: {
|
|
1008
|
+
color: "#0A66C2",
|
|
1009
|
+
path: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
|
|
1010
|
+
},
|
|
1011
|
+
xing: {
|
|
1012
|
+
color: "#006567",
|
|
1013
|
+
path: "M18.188 0c-.517 0-.741.325-.927.66c0 0-7.455 13.224-7.702 13.657c.015.024 4.919 9.023 4.919 9.023c.17.308.436.66.967.66h3.454c.211 0 .375-.078.463-.22c.089-.151.089-.346-.009-.536l-4.879-8.916a.02.02 0 0 1 0-.022L22.139.756c.095-.191.097-.387.006-.535C22.056.078 21.894 0 21.686 0zM3.648 4.74c-.211 0-.385.074-.473.216c-.09.149-.078.339.02.531l2.34 4.05q.006.014 0 .021L1.86 16.051a.52.52 0 0 0 0 .529c.085.142.239.234.45.234h3.461c.518 0 .766-.348.945-.667l3.734-6.609l-2.378-4.155c-.172-.315-.434-.659-.962-.659H3.648z"
|
|
1014
|
+
},
|
|
1015
|
+
youtube: {
|
|
1016
|
+
color: "#FF0000",
|
|
1017
|
+
path: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
|
|
1018
|
+
},
|
|
1019
|
+
tiktok: {
|
|
1020
|
+
color: "#000000",
|
|
1021
|
+
path: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"
|
|
1022
|
+
},
|
|
1023
|
+
pinterest: {
|
|
1024
|
+
color: "#BD081C",
|
|
1025
|
+
path: "M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738.098.119.112.224.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z"
|
|
1026
|
+
},
|
|
1027
|
+
email: {
|
|
1028
|
+
color: "#6B7280",
|
|
1029
|
+
path: "M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"
|
|
1030
|
+
},
|
|
1031
|
+
website: {
|
|
1032
|
+
color: "#6B7280",
|
|
1033
|
+
path: "M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"
|
|
1034
|
+
},
|
|
1035
|
+
whatsapp: {
|
|
1036
|
+
color: "#25D366",
|
|
1037
|
+
path: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"
|
|
1038
|
+
},
|
|
1039
|
+
telegram: {
|
|
1040
|
+
color: "#26A5E4",
|
|
1041
|
+
path: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
|
|
1042
|
+
},
|
|
1043
|
+
discord: {
|
|
1044
|
+
color: "#5865F2",
|
|
1045
|
+
path: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z"
|
|
1046
|
+
},
|
|
1047
|
+
snapchat: {
|
|
1048
|
+
color: "#FFFC00",
|
|
1049
|
+
path: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146 1.124.347 2.317.535 3.554.535 6.627 0 12.017-5.373 12.017-12.001C24.034 5.367 18.644 0 12.017 0z"
|
|
1050
|
+
},
|
|
1051
|
+
reddit: {
|
|
1052
|
+
color: "#FF4500",
|
|
1053
|
+
path: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"
|
|
1054
|
+
},
|
|
1055
|
+
github: {
|
|
1056
|
+
color: "#181717",
|
|
1057
|
+
path: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
|
|
1058
|
+
},
|
|
1059
|
+
dribbble: {
|
|
1060
|
+
color: "#EA4C89",
|
|
1061
|
+
path: "M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.392-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.43 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z"
|
|
1062
|
+
},
|
|
1063
|
+
behance: {
|
|
1064
|
+
color: "#1769FF",
|
|
1065
|
+
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
1066
|
+
}
|
|
1067
|
+
}, Vt = {
|
|
1068
|
+
dark: "#1f1f1f",
|
|
1069
|
+
light: "#ffffff"
|
|
1070
|
+
};
|
|
1071
|
+
function Ht(e) {
|
|
1072
|
+
return e === "dark" || e === "light" ? e : void 0;
|
|
1073
|
+
}
|
|
1074
|
+
function Ut(e, t) {
|
|
1075
|
+
let n = Ht(t);
|
|
1076
|
+
return {
|
|
1077
|
+
fill: n ? Vt[n] : Bt[e].color,
|
|
1078
|
+
onFill: n === "light" ? Vt.dark : "#ffffff"
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
function Wt(e, t) {
|
|
1082
|
+
let n = Ht(t);
|
|
1083
|
+
return n ? `${e}-${n}` : e;
|
|
1084
|
+
}
|
|
1085
|
+
function Gt(e, t) {
|
|
1086
|
+
if (Ht(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
1087
|
+
color: Vt.light,
|
|
1088
|
+
opacity: .6,
|
|
1089
|
+
width: 1.4
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
function Kt(e) {
|
|
1093
|
+
return e === "plain" ? .84 : .6;
|
|
1094
|
+
}
|
|
1095
|
+
// ../types/src/invert-operations.ts
|
|
1096
|
+
function qt(e) {
|
|
981
1097
|
let t = e.children;
|
|
982
1098
|
return e.type === "section" && Array.isArray(t) ? t : [];
|
|
983
1099
|
}
|
|
984
|
-
function
|
|
1100
|
+
function Jt(e, t, n = null) {
|
|
985
1101
|
for (let r = 0; r < e.length; r++) {
|
|
986
1102
|
let i = e[r];
|
|
987
1103
|
if (i.id === t) return {
|
|
@@ -989,28 +1105,28 @@ function Nt(e, t, n = null) {
|
|
|
989
1105
|
parent: n,
|
|
990
1106
|
after: r > 0 ? e[r - 1].id : null
|
|
991
1107
|
};
|
|
992
|
-
let a =
|
|
1108
|
+
let a = qt(i);
|
|
993
1109
|
for (let e = 0; e < a.length; e++) {
|
|
994
1110
|
if (!Array.isArray(a[e])) continue;
|
|
995
|
-
let n =
|
|
1111
|
+
let n = Jt(a[e], t, {
|
|
996
1112
|
sectionId: i.id,
|
|
997
1113
|
column: e
|
|
998
1114
|
});
|
|
999
1115
|
if (n) return n;
|
|
1000
1116
|
}
|
|
1001
1117
|
if (i.type === "wrapper" && Array.isArray(i.children)) {
|
|
1002
|
-
let e =
|
|
1118
|
+
let e = Jt(i.children, t, { wrapperId: i.id });
|
|
1003
1119
|
if (e) return e;
|
|
1004
1120
|
}
|
|
1005
1121
|
}
|
|
1006
1122
|
return null;
|
|
1007
1123
|
}
|
|
1008
|
-
function
|
|
1009
|
-
let r =
|
|
1124
|
+
function Yt(e, t, n) {
|
|
1125
|
+
let r = Jt(e.blocks, t);
|
|
1010
1126
|
if (!r) throw new w("block_missing", n, `No block with id "${t}".`, t);
|
|
1011
1127
|
return r;
|
|
1012
1128
|
}
|
|
1013
|
-
function
|
|
1129
|
+
function Xt(e, t, n) {
|
|
1014
1130
|
let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
|
|
1015
1131
|
for (let n of o) {
|
|
1016
1132
|
let o = e[n];
|
|
@@ -1024,10 +1140,10 @@ function Ft(e, t, n) {
|
|
|
1024
1140
|
expect: a
|
|
1025
1141
|
};
|
|
1026
1142
|
}
|
|
1027
|
-
function
|
|
1143
|
+
function I(e, t) {
|
|
1028
1144
|
return e.l10n?.[t] ?? {};
|
|
1029
1145
|
}
|
|
1030
|
-
function
|
|
1146
|
+
function L(e, t, n, r) {
|
|
1031
1147
|
let i = {}, a = {}, o = {};
|
|
1032
1148
|
n.length && (o.text = {}, o.set = {});
|
|
1033
1149
|
for (let r of n) e.text?.[r] !== void 0 && (i[r] = m(e.text[r])), e.set && Object.hasOwn(e.set, r) && (a[r] = m(e.set[r])), o.text[r] = m(t.text?.[r] ?? null), o.set[r] = m(t.set?.[r] ?? null);
|
|
@@ -1039,21 +1155,21 @@ function R(e, t, n, r) {
|
|
|
1039
1155
|
expect: o
|
|
1040
1156
|
};
|
|
1041
1157
|
}
|
|
1042
|
-
function
|
|
1043
|
-
let { unset: t, ...n } =
|
|
1158
|
+
function Zt(e) {
|
|
1159
|
+
let { unset: t, ...n } = L(e, {}, [.../* @__PURE__ */ new Set([...Object.keys(e.text ?? {}), ...Object.keys(e.set ?? {})])], e.hidden === !0);
|
|
1044
1160
|
return n;
|
|
1045
1161
|
}
|
|
1046
|
-
function
|
|
1047
|
-
return e.flatMap((e) => [e, ...e.type === "wrapper" ?
|
|
1162
|
+
function R(e) {
|
|
1163
|
+
return e.flatMap((e) => [e, ...e.type === "wrapper" ? R(e.children) : qt(e).flatMap(R)]);
|
|
1048
1164
|
}
|
|
1049
|
-
function
|
|
1165
|
+
function Qt(e, t) {
|
|
1050
1166
|
let n = m(e);
|
|
1051
1167
|
T(n, [t]);
|
|
1052
1168
|
let r = [], i = (e, t, n) => {
|
|
1053
1169
|
for (let [i, a] of Object.entries(e.l10n ?? {})) {
|
|
1054
1170
|
let e = t.l10n?.[i] ?? {}, o = [.../* @__PURE__ */ new Set([...Object.keys(a.text ?? {}).filter((t) => !Object.hasOwn(e.text ?? {}, t)), ...Object.keys(a.set ?? {}).filter((t) => !Object.hasOwn(e.set ?? {}, t))])];
|
|
1055
1171
|
if (!o.length) continue;
|
|
1056
|
-
let s =
|
|
1172
|
+
let s = L(a, e, o, !1);
|
|
1057
1173
|
r.push(n === void 0 ? {
|
|
1058
1174
|
op: "updateSettingsLocale",
|
|
1059
1175
|
locale: i,
|
|
@@ -1068,15 +1184,15 @@ function Lt(e, t) {
|
|
|
1068
1184
|
};
|
|
1069
1185
|
if (t.op === "updateSettings") i(e.settings, n.settings);
|
|
1070
1186
|
else {
|
|
1071
|
-
let t = new Map(
|
|
1072
|
-
for (let n of
|
|
1187
|
+
let t = new Map(R(n.blocks).map((e) => [e.id, e]));
|
|
1188
|
+
for (let n of R(e.blocks)) {
|
|
1073
1189
|
let e = t.get(n.id);
|
|
1074
1190
|
e && i(n, e, n.id);
|
|
1075
1191
|
}
|
|
1076
1192
|
}
|
|
1077
1193
|
return r;
|
|
1078
1194
|
}
|
|
1079
|
-
function
|
|
1195
|
+
function $t(e, t, n) {
|
|
1080
1196
|
switch (t.op) {
|
|
1081
1197
|
case "addBlock": return {
|
|
1082
1198
|
op: "deleteBlock",
|
|
@@ -1084,7 +1200,7 @@ function Rt(e, t, n) {
|
|
|
1084
1200
|
expect: { block: m(t.block) }
|
|
1085
1201
|
};
|
|
1086
1202
|
case "deleteBlock": {
|
|
1087
|
-
let r =
|
|
1203
|
+
let r = Yt(e, t.blockId, n);
|
|
1088
1204
|
return {
|
|
1089
1205
|
op: "addBlock",
|
|
1090
1206
|
block: m(r.block),
|
|
@@ -1093,7 +1209,7 @@ function Rt(e, t, n) {
|
|
|
1093
1209
|
};
|
|
1094
1210
|
}
|
|
1095
1211
|
case "moveBlock": {
|
|
1096
|
-
let r =
|
|
1212
|
+
let r = Yt(e, t.blockId, n);
|
|
1097
1213
|
return {
|
|
1098
1214
|
op: "moveBlock",
|
|
1099
1215
|
blockId: t.blockId,
|
|
@@ -1106,23 +1222,23 @@ function Rt(e, t, n) {
|
|
|
1106
1222
|
};
|
|
1107
1223
|
}
|
|
1108
1224
|
case "updateBlock": {
|
|
1109
|
-
let r =
|
|
1225
|
+
let r = Yt(e, t.blockId, n).block, { set: i, unset: a, expect: o } = Xt(r, t.set, t.unset);
|
|
1110
1226
|
return [{
|
|
1111
1227
|
op: "updateBlock",
|
|
1112
1228
|
blockId: t.blockId,
|
|
1113
1229
|
...Object.keys(i).length > 0 ? { set: i } : {},
|
|
1114
1230
|
...a.length > 0 ? { unset: a } : {},
|
|
1115
1231
|
expect: o
|
|
1116
|
-
}, ...
|
|
1232
|
+
}, ...Qt(e, t)];
|
|
1117
1233
|
}
|
|
1118
1234
|
case "updateSettings": {
|
|
1119
|
-
let { set: n, unset: r, expect: i } =
|
|
1235
|
+
let { set: n, unset: r, expect: i } = Xt(e.settings, t.set, t.unset);
|
|
1120
1236
|
return [{
|
|
1121
1237
|
op: "updateSettings",
|
|
1122
1238
|
...Object.keys(n).length > 0 ? { set: n } : {},
|
|
1123
1239
|
...r.length > 0 ? { unset: r } : {},
|
|
1124
1240
|
expect: i
|
|
1125
|
-
}, ...
|
|
1241
|
+
}, ...Qt(e, t)];
|
|
1126
1242
|
}
|
|
1127
1243
|
case "addLocale": return {
|
|
1128
1244
|
op: "removeLocale",
|
|
@@ -1135,18 +1251,18 @@ function Rt(e, t, n) {
|
|
|
1135
1251
|
locale: t.locale,
|
|
1136
1252
|
position: e.settings.locales?.indexOf(t.locale)
|
|
1137
1253
|
}];
|
|
1138
|
-
for (let r of
|
|
1254
|
+
for (let r of R(e.blocks)) {
|
|
1139
1255
|
let e = r.l10n?.[t.locale];
|
|
1140
1256
|
e && n.push({
|
|
1141
1257
|
op: "updateBlockLocale",
|
|
1142
1258
|
blockId: r.id,
|
|
1143
1259
|
locale: t.locale,
|
|
1144
|
-
...
|
|
1260
|
+
...Zt(e)
|
|
1145
1261
|
});
|
|
1146
1262
|
}
|
|
1147
1263
|
let r = e.settings.l10n?.[t.locale];
|
|
1148
1264
|
if (r) {
|
|
1149
|
-
let { hidden: e, ...i } =
|
|
1265
|
+
let { hidden: e, ...i } = Zt(r);
|
|
1150
1266
|
n.push({
|
|
1151
1267
|
op: "updateSettingsLocale",
|
|
1152
1268
|
locale: t.locale,
|
|
@@ -1165,15 +1281,15 @@ function Rt(e, t, n) {
|
|
|
1165
1281
|
...t.unset ?? []
|
|
1166
1282
|
])];
|
|
1167
1283
|
if (t.op === "updateBlockLocale") {
|
|
1168
|
-
let i =
|
|
1284
|
+
let i = R(e.blocks).find((e) => e.id === t.blockId), a = R(n.blocks).find((e) => e.id === t.blockId);
|
|
1169
1285
|
return {
|
|
1170
1286
|
op: "updateBlockLocale",
|
|
1171
1287
|
blockId: t.blockId,
|
|
1172
1288
|
locale: t.locale,
|
|
1173
|
-
...
|
|
1289
|
+
...L(I(i, t.locale), I(a, t.locale), r, t.hidden !== void 0)
|
|
1174
1290
|
};
|
|
1175
1291
|
}
|
|
1176
|
-
let { hidden: i, ...a } =
|
|
1292
|
+
let { hidden: i, ...a } = L(I(e.settings, t.locale), I(n.settings, t.locale), r, !1);
|
|
1177
1293
|
return {
|
|
1178
1294
|
op: "updateSettingsLocale",
|
|
1179
1295
|
locale: t.locale,
|
|
@@ -1190,50 +1306,89 @@ function Rt(e, t, n) {
|
|
|
1190
1306
|
};
|
|
1191
1307
|
}
|
|
1192
1308
|
}
|
|
1193
|
-
function
|
|
1309
|
+
function en(e, t) {
|
|
1194
1310
|
let n = m(e), r = [];
|
|
1195
1311
|
return t.forEach((e, t) => {
|
|
1196
1312
|
try {
|
|
1197
|
-
let i =
|
|
1313
|
+
let i = $t(n, e, t);
|
|
1198
1314
|
r.push(...Array.isArray(i) ? [...i].reverse() : [i]), T(n, [e]);
|
|
1199
1315
|
} catch (e) {
|
|
1200
1316
|
throw e instanceof w ? new w(e.code, t, e.message, e.blockId) : e;
|
|
1201
1317
|
}
|
|
1202
1318
|
}), r.reverse();
|
|
1203
1319
|
}
|
|
1204
|
-
|
|
1320
|
+
// ../types/src/collaboration.ts
|
|
1321
|
+
function tn(e) {
|
|
1205
1322
|
return e === "invalid_operation" ? 422 : e === "content_too_large" ? 413 : 409;
|
|
1206
1323
|
}
|
|
1207
|
-
var
|
|
1324
|
+
var nn = class extends ie {
|
|
1208
1325
|
opIndex;
|
|
1209
1326
|
holder;
|
|
1210
1327
|
holders;
|
|
1211
1328
|
constructor(e, t) {
|
|
1212
|
-
super(e, t.status ??
|
|
1329
|
+
super(e, t.status ?? tn(t.code), t.code), this.name = "CollaborationConflict", t.opIndex !== void 0 && (this.opIndex = t.opIndex), t.holder !== void 0 && (this.holder = t.holder), t.holders !== void 0 && (this.holders = t.holders);
|
|
1213
1330
|
}
|
|
1214
1331
|
};
|
|
1215
|
-
|
|
1332
|
+
// ../types/src/guards.ts
|
|
1333
|
+
function z(e) {
|
|
1216
1334
|
return e.type === "section";
|
|
1217
1335
|
}
|
|
1218
|
-
function
|
|
1336
|
+
function rn(e) {
|
|
1337
|
+
return e.type === "title";
|
|
1338
|
+
}
|
|
1339
|
+
function an(e) {
|
|
1340
|
+
return e.type === "paragraph";
|
|
1341
|
+
}
|
|
1342
|
+
function on(e) {
|
|
1343
|
+
return e.type === "image";
|
|
1344
|
+
}
|
|
1345
|
+
function sn(e) {
|
|
1346
|
+
return e.type === "button";
|
|
1347
|
+
}
|
|
1348
|
+
function cn(e) {
|
|
1349
|
+
return e.type === "divider";
|
|
1350
|
+
}
|
|
1351
|
+
function ln(e) {
|
|
1352
|
+
return e.type === "video";
|
|
1353
|
+
}
|
|
1354
|
+
function un(e) {
|
|
1355
|
+
return e.type === "social";
|
|
1356
|
+
}
|
|
1357
|
+
function dn(e) {
|
|
1358
|
+
return e.type === "spacer";
|
|
1359
|
+
}
|
|
1360
|
+
function fn(e) {
|
|
1361
|
+
return e.type === "html";
|
|
1362
|
+
}
|
|
1363
|
+
function pn(e) {
|
|
1364
|
+
return e.type === "menu";
|
|
1365
|
+
}
|
|
1366
|
+
function mn(e) {
|
|
1367
|
+
return e.type === "table";
|
|
1368
|
+
}
|
|
1369
|
+
function hn(e) {
|
|
1370
|
+
return e.type === "countdown";
|
|
1371
|
+
}
|
|
1372
|
+
function gn(e) {
|
|
1219
1373
|
return e.type === "custom";
|
|
1220
1374
|
}
|
|
1221
|
-
function
|
|
1375
|
+
function B(e) {
|
|
1222
1376
|
return e.type === "slot";
|
|
1223
1377
|
}
|
|
1224
|
-
function
|
|
1378
|
+
function V(e) {
|
|
1225
1379
|
return e.type === "wrapper";
|
|
1226
1380
|
}
|
|
1227
|
-
|
|
1381
|
+
// ../types/src/defaults.ts
|
|
1382
|
+
var _n = {
|
|
1228
1383
|
content: "<p>Enter your title</p>",
|
|
1229
1384
|
level: 2,
|
|
1230
1385
|
textAlign: "left"
|
|
1231
|
-
},
|
|
1386
|
+
}, vn = { content: "<p>Enter your text here</p>" }, yn = {
|
|
1232
1387
|
src: "",
|
|
1233
1388
|
alt: "",
|
|
1234
1389
|
width: "full",
|
|
1235
1390
|
align: "center"
|
|
1236
|
-
},
|
|
1391
|
+
}, bn = {
|
|
1237
1392
|
text: "Click Here",
|
|
1238
1393
|
url: "",
|
|
1239
1394
|
backgroundColor: "#333333",
|
|
@@ -1247,36 +1402,36 @@ var Ut = {
|
|
|
1247
1402
|
left: 24
|
|
1248
1403
|
},
|
|
1249
1404
|
align: "center"
|
|
1250
|
-
},
|
|
1405
|
+
}, xn = {
|
|
1251
1406
|
lineStyle: "solid",
|
|
1252
1407
|
color: "#e0e0e0",
|
|
1253
1408
|
thickness: 1,
|
|
1254
1409
|
width: "full"
|
|
1255
|
-
},
|
|
1410
|
+
}, Sn = { columns: "1" }, Cn = {
|
|
1256
1411
|
url: "",
|
|
1257
1412
|
thumbnailUrl: "",
|
|
1258
1413
|
alt: "Video",
|
|
1259
1414
|
width: "full",
|
|
1260
1415
|
align: "center"
|
|
1261
|
-
},
|
|
1416
|
+
}, wn = {
|
|
1262
1417
|
iconStyle: "solid",
|
|
1263
1418
|
iconSize: "medium",
|
|
1264
1419
|
spacing: 10,
|
|
1265
1420
|
align: "center"
|
|
1266
|
-
},
|
|
1421
|
+
}, Tn = { height: 24 }, En = { content: "" }, Dn = {
|
|
1267
1422
|
fontSize: 15,
|
|
1268
1423
|
textAlign: "center",
|
|
1269
1424
|
separator: "|",
|
|
1270
1425
|
separatorColor: "#e0e0e0",
|
|
1271
1426
|
spacing: 10
|
|
1272
|
-
},
|
|
1427
|
+
}, On = {
|
|
1273
1428
|
hasHeaderRow: !0,
|
|
1274
1429
|
borderColor: "#e0e0e0",
|
|
1275
1430
|
borderWidth: 1,
|
|
1276
1431
|
cellPadding: 8,
|
|
1277
1432
|
fontSize: 15,
|
|
1278
1433
|
textAlign: "left"
|
|
1279
|
-
},
|
|
1434
|
+
}, kn = {
|
|
1280
1435
|
targetDate: "",
|
|
1281
1436
|
timezone: "UTC",
|
|
1282
1437
|
showDays: !0,
|
|
@@ -1296,21 +1451,21 @@ var Ut = {
|
|
|
1296
1451
|
expiredMessage: "This offer has expired",
|
|
1297
1452
|
expiredImageUrl: "",
|
|
1298
1453
|
hideOnExpiry: !1
|
|
1299
|
-
},
|
|
1300
|
-
title:
|
|
1301
|
-
paragraph:
|
|
1302
|
-
image:
|
|
1303
|
-
button:
|
|
1304
|
-
divider:
|
|
1305
|
-
section:
|
|
1306
|
-
video:
|
|
1307
|
-
social:
|
|
1308
|
-
spacer:
|
|
1309
|
-
html:
|
|
1310
|
-
menu:
|
|
1311
|
-
table:
|
|
1312
|
-
countdown:
|
|
1313
|
-
},
|
|
1454
|
+
}, An = {
|
|
1455
|
+
title: _n,
|
|
1456
|
+
paragraph: vn,
|
|
1457
|
+
image: yn,
|
|
1458
|
+
button: bn,
|
|
1459
|
+
divider: xn,
|
|
1460
|
+
section: Sn,
|
|
1461
|
+
video: Cn,
|
|
1462
|
+
social: wn,
|
|
1463
|
+
spacer: Tn,
|
|
1464
|
+
html: En,
|
|
1465
|
+
menu: Dn,
|
|
1466
|
+
table: On,
|
|
1467
|
+
countdown: kn
|
|
1468
|
+
}, jn = {
|
|
1314
1469
|
width: 600,
|
|
1315
1470
|
backgroundColor: "#ffffff",
|
|
1316
1471
|
textColor: "#1a1a1a",
|
|
@@ -1318,28 +1473,30 @@ var Ut = {
|
|
|
1318
1473
|
fontFamily: "Arial",
|
|
1319
1474
|
locale: "en"
|
|
1320
1475
|
};
|
|
1321
|
-
function
|
|
1476
|
+
function Mn(e) {
|
|
1322
1477
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
1323
1478
|
}
|
|
1324
|
-
function
|
|
1479
|
+
function Nn(e, t) {
|
|
1325
1480
|
let n = { ...e };
|
|
1326
1481
|
for (let r of Object.keys(t)) {
|
|
1327
1482
|
let i = e[r], a = t[r];
|
|
1328
|
-
a !== void 0 && (n[r] =
|
|
1483
|
+
a !== void 0 && (n[r] = Mn(i) && Mn(a) ? Nn(i, a) : a);
|
|
1329
1484
|
}
|
|
1330
1485
|
return n;
|
|
1331
1486
|
}
|
|
1332
|
-
|
|
1487
|
+
// ../types/src/template.ts
|
|
1488
|
+
function Pn(e = "Arial", t) {
|
|
1333
1489
|
return {
|
|
1334
1490
|
blocks: [],
|
|
1335
1491
|
settings: {
|
|
1336
|
-
...
|
|
1492
|
+
...jn,
|
|
1337
1493
|
fontFamily: e,
|
|
1338
1494
|
...t
|
|
1339
1495
|
}
|
|
1340
1496
|
};
|
|
1341
1497
|
}
|
|
1342
|
-
|
|
1498
|
+
// ../types/src/direction.ts
|
|
1499
|
+
var Fn = [
|
|
1343
1500
|
"ar",
|
|
1344
1501
|
"he",
|
|
1345
1502
|
"iw",
|
|
@@ -1353,23 +1510,24 @@ var cn = [
|
|
|
1353
1510
|
"ckb",
|
|
1354
1511
|
"ks"
|
|
1355
1512
|
];
|
|
1356
|
-
function
|
|
1513
|
+
function In(e) {
|
|
1357
1514
|
let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
|
|
1358
|
-
return !!t &&
|
|
1515
|
+
return !!t && Fn.includes(t);
|
|
1359
1516
|
}
|
|
1360
|
-
function
|
|
1361
|
-
return e.direction === "ltr" || e.direction === "rtl" ? e.direction :
|
|
1517
|
+
function Ln(e) {
|
|
1518
|
+
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : In(e.locale) ? "rtl" : "ltr";
|
|
1362
1519
|
}
|
|
1363
|
-
|
|
1364
|
-
|
|
1520
|
+
// ../types/src/translation.ts
|
|
1521
|
+
var Rn = 2e4, zn = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
1522
|
+
function Bn(e, t) {
|
|
1365
1523
|
let n = null, r = "tag";
|
|
1366
1524
|
for (let i = t; i < e.length; i++) {
|
|
1367
1525
|
let t = e[i];
|
|
1368
1526
|
if (n !== null) t === n && (n = null);
|
|
1369
1527
|
else {
|
|
1370
1528
|
if (r === "beforeValue") {
|
|
1371
|
-
if (
|
|
1372
|
-
if (
|
|
1529
|
+
if (H(t)) continue;
|
|
1530
|
+
if (zn.has(t)) {
|
|
1373
1531
|
n = t, r = "tag";
|
|
1374
1532
|
continue;
|
|
1375
1533
|
}
|
|
@@ -1377,19 +1535,19 @@ function pn(e, t) {
|
|
|
1377
1535
|
}
|
|
1378
1536
|
if (r === "unquotedValue") {
|
|
1379
1537
|
if (t === ">") return i;
|
|
1380
|
-
|
|
1538
|
+
H(t) && (r = "tag");
|
|
1381
1539
|
} else if (t === "=") r = "beforeValue";
|
|
1382
1540
|
else if (t === ">") return i;
|
|
1383
1541
|
}
|
|
1384
1542
|
}
|
|
1385
1543
|
return -1;
|
|
1386
1544
|
}
|
|
1387
|
-
function
|
|
1545
|
+
function Vn(e, t) {
|
|
1388
1546
|
let n = null;
|
|
1389
1547
|
for (let r = t; r < e.length; r++) {
|
|
1390
1548
|
let t = e[r];
|
|
1391
1549
|
if (n !== null) t === n && (n = null);
|
|
1392
|
-
else if (
|
|
1550
|
+
else if (zn.has(t)) n = t;
|
|
1393
1551
|
else if (t === ">") return {
|
|
1394
1552
|
end: r,
|
|
1395
1553
|
nextSpan: -1
|
|
@@ -1404,13 +1562,13 @@ function mn(e, t) {
|
|
|
1404
1562
|
nextSpan: -1
|
|
1405
1563
|
};
|
|
1406
1564
|
}
|
|
1407
|
-
function
|
|
1565
|
+
function Hn(e) {
|
|
1408
1566
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
1409
1567
|
}
|
|
1410
|
-
function
|
|
1568
|
+
function H(e) {
|
|
1411
1569
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
1412
1570
|
}
|
|
1413
|
-
var
|
|
1571
|
+
var Un = {
|
|
1414
1572
|
AMP: "&",
|
|
1415
1573
|
COPY: "©",
|
|
1416
1574
|
GT: ">",
|
|
@@ -1671,50 +1829,54 @@ var gn = {
|
|
|
1671
1829
|
zwj: "",
|
|
1672
1830
|
zwnj: ""
|
|
1673
1831
|
};
|
|
1674
|
-
function
|
|
1832
|
+
function U(e) {
|
|
1675
1833
|
return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
|
|
1676
1834
|
if (t[0] === "#") {
|
|
1677
1835
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
1678
1836
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
1679
1837
|
}
|
|
1680
|
-
return Object.hasOwn(
|
|
1838
|
+
return Object.hasOwn(Un, t) ? Un[t] : e;
|
|
1681
1839
|
}) : e;
|
|
1682
1840
|
}
|
|
1683
|
-
function
|
|
1841
|
+
function Wn(e, t) {
|
|
1684
1842
|
let n = t.toLowerCase(), r = 0;
|
|
1685
1843
|
for (; r < e.length;) {
|
|
1686
|
-
for (; r < e.length && (
|
|
1844
|
+
for (; r < e.length && (H(e[r]) || e[r] === "/");) r++;
|
|
1687
1845
|
if (r >= e.length) break;
|
|
1688
1846
|
let t = r;
|
|
1689
|
-
for (; r < e.length &&
|
|
1847
|
+
for (; r < e.length && Hn(e[r]);) r++;
|
|
1690
1848
|
let i = e.substring(t, r).toLowerCase();
|
|
1691
1849
|
if (i === "") {
|
|
1692
1850
|
r++;
|
|
1693
1851
|
continue;
|
|
1694
1852
|
}
|
|
1695
|
-
for (; r < e.length &&
|
|
1853
|
+
for (; r < e.length && H(e[r]);) r++;
|
|
1696
1854
|
if (e[r] !== "=") continue;
|
|
1697
|
-
for (r++; r < e.length &&
|
|
1855
|
+
for (r++; r < e.length && H(e[r]);) r++;
|
|
1698
1856
|
let a = e[r];
|
|
1699
|
-
if (
|
|
1857
|
+
if (zn.has(a)) {
|
|
1700
1858
|
let t = r + 1, o = e.indexOf(a, t);
|
|
1701
1859
|
if (o === -1) return null;
|
|
1702
|
-
if (i === n) return
|
|
1860
|
+
if (i === n) return U(e.substring(t, o));
|
|
1703
1861
|
r = o + 1;
|
|
1704
1862
|
continue;
|
|
1705
1863
|
}
|
|
1706
1864
|
let o = r;
|
|
1707
|
-
for (; r < e.length && !
|
|
1708
|
-
if (i === n) return
|
|
1865
|
+
for (; r < e.length && !H(e[r]) && e[r] !== ">";) r++;
|
|
1866
|
+
if (i === n) return U(e.substring(o, r));
|
|
1709
1867
|
}
|
|
1710
1868
|
return null;
|
|
1711
1869
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1870
|
+
// ../types/src/merge-tag-html.ts
|
|
1871
|
+
function Gn(e) {
|
|
1872
|
+
return Jn(e, (e) => e, !1);
|
|
1873
|
+
}
|
|
1874
|
+
function Kn(e, t) {
|
|
1875
|
+
return Jn(e, t, !0);
|
|
1714
1876
|
}
|
|
1715
|
-
function
|
|
1877
|
+
function qn(e) {
|
|
1716
1878
|
let t = [];
|
|
1717
|
-
return
|
|
1879
|
+
return Jn(e, (n, r, i) => {
|
|
1718
1880
|
let a = e.slice(r, i);
|
|
1719
1881
|
return t.push({
|
|
1720
1882
|
start: r,
|
|
@@ -1723,7 +1885,7 @@ function yn(e) {
|
|
|
1723
1885
|
}), a;
|
|
1724
1886
|
}, !0), t;
|
|
1725
1887
|
}
|
|
1726
|
-
function
|
|
1888
|
+
function Jn(e, t, n) {
|
|
1727
1889
|
let r = "", i = 0;
|
|
1728
1890
|
for (; i < e.length;) {
|
|
1729
1891
|
let a = e.indexOf("<span", i);
|
|
@@ -1736,7 +1898,7 @@ function bn(e, t, n) {
|
|
|
1736
1898
|
r += e.substring(i, a + 5), i = a + 5;
|
|
1737
1899
|
continue;
|
|
1738
1900
|
}
|
|
1739
|
-
let { end: s, nextSpan: c } =
|
|
1901
|
+
let { end: s, nextSpan: c } = Vn(e, a + 5);
|
|
1740
1902
|
if (c !== -1) {
|
|
1741
1903
|
r += e.substring(i, c), i = c;
|
|
1742
1904
|
continue;
|
|
@@ -1745,12 +1907,12 @@ function bn(e, t, n) {
|
|
|
1745
1907
|
r += e.substring(i);
|
|
1746
1908
|
break;
|
|
1747
1909
|
}
|
|
1748
|
-
let l = e.substring(a + 5, s), u =
|
|
1910
|
+
let l = e.substring(a + 5, s), u = Xn(l, "data-merge-tag") ?? Xn(l, "data-logic-merge-tag");
|
|
1749
1911
|
if (u === null) {
|
|
1750
1912
|
r += e.substring(i, s + 1), i = s + 1;
|
|
1751
1913
|
continue;
|
|
1752
1914
|
}
|
|
1753
|
-
let d =
|
|
1915
|
+
let d = Yn(e, s + 1, n);
|
|
1754
1916
|
if (d === -1) {
|
|
1755
1917
|
r += e.substring(i);
|
|
1756
1918
|
break;
|
|
@@ -1759,7 +1921,7 @@ function bn(e, t, n) {
|
|
|
1759
1921
|
}
|
|
1760
1922
|
return r;
|
|
1761
1923
|
}
|
|
1762
|
-
function
|
|
1924
|
+
function Yn(e, t, n) {
|
|
1763
1925
|
if (!n) {
|
|
1764
1926
|
let n = e.indexOf("</span>", t);
|
|
1765
1927
|
return n === -1 ? -1 : n + 7;
|
|
@@ -1768,7 +1930,7 @@ function xn(e, t, n) {
|
|
|
1768
1930
|
for (; i < e.length;) {
|
|
1769
1931
|
let t = e.indexOf("<", i);
|
|
1770
1932
|
if (t === -1) return -1;
|
|
1771
|
-
let n =
|
|
1933
|
+
let n = Bn(e, t + 1);
|
|
1772
1934
|
if (n === -1) return -1;
|
|
1773
1935
|
let a = e.startsWith("</span", t), o = e.startsWith("<span", t), s = e[t + (a ? 6 : 5)];
|
|
1774
1936
|
if ((o || a) && (s === ">" || s === "/" || /\s/.test(s)) && (r += a ? -1 : 1, r === 0)) return n + 1;
|
|
@@ -1776,10 +1938,11 @@ function xn(e, t, n) {
|
|
|
1776
1938
|
}
|
|
1777
1939
|
return -1;
|
|
1778
1940
|
}
|
|
1779
|
-
function
|
|
1780
|
-
return
|
|
1941
|
+
function Xn(e, t) {
|
|
1942
|
+
return Wn(e, t);
|
|
1781
1943
|
}
|
|
1782
|
-
|
|
1944
|
+
// ../types/src/merge-tags.ts
|
|
1945
|
+
var W = {
|
|
1783
1946
|
liquid: {
|
|
1784
1947
|
value: /\{\{.+?\}\}/g,
|
|
1785
1948
|
logic: /\{%-?\s*(\w+).*?-?%\}/g,
|
|
@@ -1805,13 +1968,13 @@ var G = {
|
|
|
1805
1968
|
closer: "=%%"
|
|
1806
1969
|
}
|
|
1807
1970
|
};
|
|
1808
|
-
function
|
|
1809
|
-
return Object.keys(
|
|
1810
|
-
let n =
|
|
1971
|
+
function G(e) {
|
|
1972
|
+
return Object.keys(W).find((t) => {
|
|
1973
|
+
let n = W[t];
|
|
1811
1974
|
return (e.value === n.value || e.value.source === n.value.source && e.value.flags.replace(/[gy]/g, "") === n.value.flags.replace(/[gy]/g, "")) && (e.logic === n.logic || e.logic.source === n.logic.source && e.logic.flags.replace(/[gy]/g, "") === n.logic.flags.replace(/[gy]/g, ""));
|
|
1812
1975
|
});
|
|
1813
1976
|
}
|
|
1814
|
-
function
|
|
1977
|
+
function Zn(e, t, n) {
|
|
1815
1978
|
for (let r = n; r < e.length; r++) {
|
|
1816
1979
|
let n = e.charCodeAt(r);
|
|
1817
1980
|
if (n === 10 || n === 13 || n === 8232 || n === 8233) return {
|
|
@@ -1828,8 +1991,8 @@ function Cn(e, t, n) {
|
|
|
1828
1991
|
lineBreak: -1
|
|
1829
1992
|
};
|
|
1830
1993
|
}
|
|
1831
|
-
function
|
|
1832
|
-
let a =
|
|
1994
|
+
function K(e, t, n, r = 0, i = Infinity) {
|
|
1995
|
+
let a = G(t);
|
|
1833
1996
|
if (!a) {
|
|
1834
1997
|
let a = t[n], o = new RegExp(a.source, a.flags.replace(/[gy]/g, "") + "g");
|
|
1835
1998
|
return o.lastIndex = r, [...e.matchAll(o)].slice(0, i).map((e) => ({
|
|
@@ -1853,7 +2016,7 @@ function q(e, t, n, r = 0, i = Infinity) {
|
|
|
1853
2016
|
let r = u?.lastIndex ?? t + s.length, i = a === "mailchimp" && n === "value" ? {
|
|
1854
2017
|
close: e.startsWith(c, r) ? r : -1,
|
|
1855
2018
|
lineBreak: -1
|
|
1856
|
-
} :
|
|
2019
|
+
} : Zn(e, c, Math.max(r, t + s.length + +(n === "value")));
|
|
1857
2020
|
if (i.lineBreak >= 0) {
|
|
1858
2021
|
let r = i.lineBreak, o = n === "logic" && (a === "liquid" || a === "ampscript") ? e.lastIndexOf(s, r) : -1;
|
|
1859
2022
|
p = o > t ? o : r + 1;
|
|
@@ -1875,8 +2038,8 @@ function q(e, t, n, r = 0, i = Infinity) {
|
|
|
1875
2038
|
}
|
|
1876
2039
|
return f;
|
|
1877
2040
|
}
|
|
1878
|
-
function
|
|
1879
|
-
let n =
|
|
2041
|
+
function Qn(e, t) {
|
|
2042
|
+
let n = G(t);
|
|
1880
2043
|
if (!n) {
|
|
1881
2044
|
let n = RegExp(`(${t.value.source}|${t.logic.source})`, "g");
|
|
1882
2045
|
return [...e.matchAll(n)].map((e) => ({
|
|
@@ -1884,7 +2047,7 @@ function wn(e, t) {
|
|
|
1884
2047
|
value: e[0]
|
|
1885
2048
|
}));
|
|
1886
2049
|
}
|
|
1887
|
-
if (n === "handlebars") return
|
|
2050
|
+
if (n === "handlebars") return K(e, t, "value");
|
|
1888
2051
|
if (n === "mailchimp") {
|
|
1889
2052
|
let n = [], r = new RegExp(t.value.source, "y"), i = new RegExp(t.logic.source, "y"), a = /\*\|\w+[:|]/y, o = 0;
|
|
1890
2053
|
for (; o < e.length;) {
|
|
@@ -1903,7 +2066,7 @@ function wn(e, t) {
|
|
|
1903
2066
|
o = t + 2;
|
|
1904
2067
|
continue;
|
|
1905
2068
|
}
|
|
1906
|
-
let c =
|
|
2069
|
+
let c = Zn(e, "|*", a.lastIndex);
|
|
1907
2070
|
if (c.lineBreak >= 0) {
|
|
1908
2071
|
o = c.lineBreak + 1;
|
|
1909
2072
|
continue;
|
|
@@ -1918,78 +2081,82 @@ function wn(e, t) {
|
|
|
1918
2081
|
}
|
|
1919
2082
|
return n;
|
|
1920
2083
|
}
|
|
1921
|
-
let r = [], i = 0, a =
|
|
2084
|
+
let r = [], i = 0, a = K(e, t, "value", i, 1)[0], o = K(e, t, "logic", i, 1)[0];
|
|
1922
2085
|
for (; a || o;) {
|
|
1923
2086
|
let n = !o || a && a.index <= o.index ? a : o;
|
|
1924
|
-
r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a =
|
|
2087
|
+
r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a = K(e, t, "value", i, 1)[0]), (n === o || o && o.index < i) && (o = K(e, t, "logic", i, 1)[0]);
|
|
1925
2088
|
}
|
|
1926
2089
|
return r;
|
|
1927
2090
|
}
|
|
1928
|
-
function
|
|
2091
|
+
function $n(e) {
|
|
1929
2092
|
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1930
2093
|
}
|
|
1931
|
-
function
|
|
1932
|
-
return Object.values(
|
|
2094
|
+
function er(e) {
|
|
2095
|
+
return Object.values(W).find((t) => t.value.source === e.value.source) ?? null;
|
|
1933
2096
|
}
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
2097
|
+
function tr(e) {
|
|
2098
|
+
return $n(e.opener) ?? er(e)?.opener ?? null;
|
|
1936
2099
|
}
|
|
1937
|
-
function
|
|
1938
|
-
return
|
|
2100
|
+
function nr(e) {
|
|
2101
|
+
return $n(e.closer) ?? er(e)?.closer ?? null;
|
|
1939
2102
|
}
|
|
1940
|
-
function
|
|
1941
|
-
return e ? typeof e == "string" ?
|
|
2103
|
+
function rr(e) {
|
|
2104
|
+
return e ? typeof e == "string" ? W[e] ?? W.liquid : e : W.liquid;
|
|
1942
2105
|
}
|
|
1943
|
-
function
|
|
2106
|
+
function ir(e) {
|
|
1944
2107
|
let t = e.source, n = e.flags.replace("g", "");
|
|
1945
2108
|
return RegExp(`^${t}$`, n);
|
|
1946
2109
|
}
|
|
1947
|
-
function
|
|
2110
|
+
function ar(e, t) {
|
|
1948
2111
|
let n = e?.trim() || "";
|
|
1949
|
-
return !
|
|
2112
|
+
return !ir(t.logic).test(n) && ir(t.value).test(n);
|
|
1950
2113
|
}
|
|
1951
|
-
function
|
|
2114
|
+
function or(e, t) {
|
|
1952
2115
|
let n = t.find((t) => t.value === e);
|
|
1953
2116
|
return n ? n.label : e;
|
|
1954
2117
|
}
|
|
1955
|
-
function
|
|
1956
|
-
return
|
|
2118
|
+
function sr(e, t) {
|
|
2119
|
+
return q(e, "data-merge-tag", (e) => or(e, t));
|
|
1957
2120
|
}
|
|
1958
|
-
function
|
|
2121
|
+
function cr(e, t) {
|
|
1959
2122
|
return t.find((t) => t.value === e)?.sample;
|
|
1960
2123
|
}
|
|
1961
|
-
function
|
|
1962
|
-
return
|
|
2124
|
+
function lr(e, t) {
|
|
2125
|
+
return q(e, "data-merge-tag", (e) => pr(cr(e, t) ?? or(e, t)), { unwrap: (e) => cr(e, t) !== void 0 });
|
|
1963
2126
|
}
|
|
1964
|
-
function
|
|
2127
|
+
function ur(e, t, n) {
|
|
2128
|
+
let r = (e) => t.some((t) => t.value === e) || ar(e, n), i = (e) => hr(e, n);
|
|
2129
|
+
return q(q(e, "data-merge-tag", (e) => r(e) ? or(e, t) : pr(e), { unwrap: (e) => !r(e) }), "data-logic-merge-tag", (e) => i(e) ? gr(e, n) : pr(e), { unwrap: (e) => !i(e) });
|
|
2130
|
+
}
|
|
2131
|
+
function dr(e) {
|
|
1965
2132
|
return e.some((e) => e.sample !== void 0);
|
|
1966
2133
|
}
|
|
1967
|
-
function
|
|
2134
|
+
function fr(e, t) {
|
|
1968
2135
|
if (!e) return e;
|
|
1969
2136
|
let n = e;
|
|
1970
2137
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
1971
2138
|
return n;
|
|
1972
2139
|
}
|
|
1973
|
-
function
|
|
2140
|
+
function pr(e) {
|
|
1974
2141
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1975
2142
|
}
|
|
1976
|
-
function
|
|
2143
|
+
function mr(e, t) {
|
|
1977
2144
|
if (!e) return !1;
|
|
1978
|
-
if (
|
|
2145
|
+
if (G(t)) return K(e, t, "value", 0, 1).length > 0 || K(e, t, "logic", 0, 1).length > 0;
|
|
1979
2146
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
1980
2147
|
return n.test(e) || r.test(e);
|
|
1981
2148
|
}
|
|
1982
|
-
function
|
|
1983
|
-
return
|
|
2149
|
+
function hr(e, t) {
|
|
2150
|
+
return ir(t.logic).test(e?.trim() || "");
|
|
1984
2151
|
}
|
|
1985
|
-
function
|
|
2152
|
+
function gr(e, t) {
|
|
1986
2153
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
1987
2154
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
1988
2155
|
}
|
|
1989
|
-
function
|
|
1990
|
-
return
|
|
2156
|
+
function _r(e, t) {
|
|
2157
|
+
return q(e, "data-logic-merge-tag", (e) => gr(e, t));
|
|
1991
2158
|
}
|
|
1992
|
-
function
|
|
2159
|
+
function q(e, t, n, r) {
|
|
1993
2160
|
let i = "", a = 0;
|
|
1994
2161
|
for (; a < e.length;) {
|
|
1995
2162
|
let o = e.indexOf("<span", a);
|
|
@@ -2002,7 +2169,7 @@ function Un(e, t, n, r) {
|
|
|
2002
2169
|
i += e.substring(a, o + 5), a = o + 5;
|
|
2003
2170
|
continue;
|
|
2004
2171
|
}
|
|
2005
|
-
let { end: c, nextSpan: l } =
|
|
2172
|
+
let { end: c, nextSpan: l } = Vn(e, o + 5);
|
|
2006
2173
|
if (l !== -1) {
|
|
2007
2174
|
i += e.substring(a, l), a = l;
|
|
2008
2175
|
continue;
|
|
@@ -2011,7 +2178,7 @@ function Un(e, t, n, r) {
|
|
|
2011
2178
|
i += e.substring(a);
|
|
2012
2179
|
break;
|
|
2013
2180
|
}
|
|
2014
|
-
let u =
|
|
2181
|
+
let u = Wn(e.substring(o + 5, c), t);
|
|
2015
2182
|
if (u === null) {
|
|
2016
2183
|
i += e.substring(a, c + 1), a = c + 1;
|
|
2017
2184
|
continue;
|
|
@@ -2026,14 +2193,15 @@ function Un(e, t, n, r) {
|
|
|
2026
2193
|
}
|
|
2027
2194
|
return i;
|
|
2028
2195
|
}
|
|
2029
|
-
|
|
2196
|
+
// ../types/src/locale-strings.ts
|
|
2197
|
+
var vr = {
|
|
2030
2198
|
title: ["content"],
|
|
2031
2199
|
paragraph: ["content"]
|
|
2032
2200
|
};
|
|
2033
|
-
function
|
|
2201
|
+
function yr(e) {
|
|
2034
2202
|
let t = [], n = /<[a-z][\w:-]*\b/gi;
|
|
2035
2203
|
for (; n.exec(e);) {
|
|
2036
|
-
let r =
|
|
2204
|
+
let r = Bn(e, n.lastIndex);
|
|
2037
2205
|
if (r < 0) break;
|
|
2038
2206
|
let i = n.lastIndex, a = e.slice(i, r), o = /[^\s"'<>/=]+\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
|
|
2039
2207
|
for (let e; e = o.exec(a);) {
|
|
@@ -2047,12 +2215,12 @@ function Gn(e) {
|
|
|
2047
2215
|
}
|
|
2048
2216
|
return t;
|
|
2049
2217
|
}
|
|
2050
|
-
function
|
|
2051
|
-
let r = n === "html" ?
|
|
2218
|
+
function br(e, t, n) {
|
|
2219
|
+
let r = n === "html" ? qn(e) : [], i = n === "html" ? yr(e) : [], a = r.map((e) => ({
|
|
2052
2220
|
...e,
|
|
2053
2221
|
attribute: !1
|
|
2054
|
-
})), o = 0, s =
|
|
2055
|
-
let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) =>
|
|
2222
|
+
})), o = 0, s = G(t) !== void 0, c = (n, r) => {
|
|
2223
|
+
let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) => K(c, t, e, 0, 1)[0]) : [void 0, void 0], d = s ? null : [t.logic, t.value].map((e) => new RegExp(e.source, e.flags.replace(/[gy]/g, "") + "g")), f = 0;
|
|
2056
2224
|
for (; f < c.length;) {
|
|
2057
2225
|
let e = s ? u.flatMap((e) => e ? [e] : []) : d.flatMap((e, t) => {
|
|
2058
2226
|
let n = u[t];
|
|
@@ -2077,20 +2245,20 @@ function Kn(e, t, n) {
|
|
|
2077
2245
|
end: ee,
|
|
2078
2246
|
markup: r.value,
|
|
2079
2247
|
attribute: i[o] !== void 0 && p >= i[o].start && ee <= i[o].end
|
|
2080
|
-
}), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] =
|
|
2248
|
+
}), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] = K(c, t, l[e], f, 1)[0]);
|
|
2081
2249
|
}
|
|
2082
2250
|
}, l = 0;
|
|
2083
2251
|
for (let e of r) c(l, e.start), l = e.end;
|
|
2084
2252
|
return c(l, e.length), a.sort((e, t) => e.start - t.start);
|
|
2085
2253
|
}
|
|
2086
|
-
function
|
|
2254
|
+
function xr(e) {
|
|
2087
2255
|
if (!e.includes("&")) return { text: e };
|
|
2088
2256
|
let t = "", n = [0], r = 0, i = (i) => {
|
|
2089
2257
|
for (t += e.slice(r, i); r < i;) n.push(++r);
|
|
2090
2258
|
};
|
|
2091
2259
|
for (let a of e.matchAll(/&(?:#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g)) {
|
|
2092
2260
|
i(a.index);
|
|
2093
|
-
let e =
|
|
2261
|
+
let e = U(a[0]);
|
|
2094
2262
|
t += e;
|
|
2095
2263
|
for (let t = 1; t < e.length; t++) n.push(-1);
|
|
2096
2264
|
r = a.index + a[0].length, n.push(r);
|
|
@@ -2100,17 +2268,17 @@ function qn(e) {
|
|
|
2100
2268
|
offsets: n
|
|
2101
2269
|
};
|
|
2102
2270
|
}
|
|
2103
|
-
var J = /* @__PURE__ */ new Map(),
|
|
2104
|
-
function
|
|
2271
|
+
var J = /* @__PURE__ */ new Map(), Sr = 32;
|
|
2272
|
+
function Cr(e) {
|
|
2105
2273
|
let t = JSON.stringify(e), n = J.get(t);
|
|
2106
2274
|
if (n === void 0) {
|
|
2107
2275
|
let r = e.map((e) => e.trim()).filter(Boolean).sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
2108
|
-
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, J.size >=
|
|
2276
|
+
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, J.size >= Sr && J.delete(J.keys().next().value), J.set(t, n);
|
|
2109
2277
|
}
|
|
2110
2278
|
return n;
|
|
2111
2279
|
}
|
|
2112
|
-
function
|
|
2113
|
-
let r = n.length ?
|
|
2280
|
+
function wr(e, t, n) {
|
|
2281
|
+
let r = n.length ? Cr(n) : null;
|
|
2114
2282
|
if (!r) return [];
|
|
2115
2283
|
let i = [];
|
|
2116
2284
|
if (t === "text") i.push({
|
|
@@ -2119,7 +2287,7 @@ function Xn(e, t, n) {
|
|
|
2119
2287
|
attribute: !1
|
|
2120
2288
|
});
|
|
2121
2289
|
else {
|
|
2122
|
-
i.push(...
|
|
2290
|
+
i.push(...yr(e).map((e) => ({
|
|
2123
2291
|
...e,
|
|
2124
2292
|
attribute: !0
|
|
2125
2293
|
})));
|
|
@@ -2130,7 +2298,7 @@ function Xn(e, t, n) {
|
|
|
2130
2298
|
end: r.index,
|
|
2131
2299
|
attribute: !1
|
|
2132
2300
|
});
|
|
2133
|
-
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) :
|
|
2301
|
+
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : Bn(e, t.lastIndex);
|
|
2134
2302
|
if (a < 0) return [];
|
|
2135
2303
|
n = a + (r[0] === "<!--" ? 3 : 1), t.lastIndex = n;
|
|
2136
2304
|
}
|
|
@@ -2143,7 +2311,7 @@ function Xn(e, t, n) {
|
|
|
2143
2311
|
let a = [];
|
|
2144
2312
|
for (let n of i) {
|
|
2145
2313
|
r.lastIndex = 0;
|
|
2146
|
-
let i = e.slice(n.start, n.end), o = t === "html" ?
|
|
2314
|
+
let i = e.slice(n.start, n.end), o = t === "html" ? xr(i) : {
|
|
2147
2315
|
text: i,
|
|
2148
2316
|
offsets: void 0
|
|
2149
2317
|
};
|
|
@@ -2162,53 +2330,51 @@ function Xn(e, t, n) {
|
|
|
2162
2330
|
}
|
|
2163
2331
|
return a;
|
|
2164
2332
|
}
|
|
2165
|
-
function
|
|
2166
|
-
let i =
|
|
2333
|
+
function Tr(e, t, n, r) {
|
|
2334
|
+
let i = br(e, t, n), a = wr(e, n, r?.doNotTranslate ?? []).filter((e) => !i.some((t) => e.start < t.end && e.end > t.start));
|
|
2167
2335
|
return [...i, ...a].sort((e, t) => e.start - t.start);
|
|
2168
2336
|
}
|
|
2169
|
-
function
|
|
2337
|
+
function Er(e, t, n) {
|
|
2170
2338
|
let r = "", i = 0;
|
|
2171
2339
|
return t.forEach((t, a) => {
|
|
2172
2340
|
r += e.slice(i, t.start), r += t.attribute ? `__x${n[a]}__` : `<x id="${n[a]}"/>`, i = t.end;
|
|
2173
2341
|
}), r + e.slice(i);
|
|
2174
2342
|
}
|
|
2175
|
-
function
|
|
2176
|
-
let i =
|
|
2343
|
+
function Dr(e, t, n, r) {
|
|
2344
|
+
let i = Tr(e, t, n, r);
|
|
2177
2345
|
return {
|
|
2178
|
-
text:
|
|
2346
|
+
text: Er(e, i, i.map((e, t) => t + 1)),
|
|
2179
2347
|
tokens: i.map((e) => e.markup)
|
|
2180
2348
|
};
|
|
2181
2349
|
}
|
|
2182
|
-
function
|
|
2350
|
+
function Or(e, t) {
|
|
2183
2351
|
let n = /* @__PURE__ */ new Set(), r = !0, i = e.replace(/<x id="(\d+)"\s*\/>|<x id="(\d+)"><\/x>|__x(\d+)__/g, (e, i, a, o) => {
|
|
2184
2352
|
let s = Number(i ?? a ?? o);
|
|
2185
2353
|
return (s < 1 || s > t.length || n.has(s)) && (r = !1), n.add(s), t[s - 1] ?? "";
|
|
2186
2354
|
});
|
|
2187
2355
|
return r && n.size === t.length ? i : null;
|
|
2188
2356
|
}
|
|
2189
|
-
function
|
|
2190
|
-
let a =
|
|
2357
|
+
function kr(e, t, n, r, i) {
|
|
2358
|
+
let a = Tr(e, n, r, i), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
2191
2359
|
let n = t.findIndex((t, n) => !o.has(n) && e(t));
|
|
2192
2360
|
return n >= 0 && o.add(n), n;
|
|
2193
2361
|
}, c = a.map((e) => s((t) => t === e.markup));
|
|
2194
2362
|
return a.forEach((e, t) => {
|
|
2195
|
-
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) =>
|
|
2196
|
-
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null :
|
|
2363
|
+
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) => U(t) === e.term));
|
|
2364
|
+
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null : Er(e, a.filter((e, t) => c[t] >= 0), c.filter((e) => e >= 0).map((e) => e + 1));
|
|
2197
2365
|
}
|
|
2198
|
-
function
|
|
2366
|
+
function Ar(e, t, n = []) {
|
|
2199
2367
|
let r = /* @__PURE__ */ new Map();
|
|
2200
2368
|
if (t === C(e) || !e.settings.locales?.includes(t)) return r;
|
|
2201
2369
|
let i = (e, n, i, a) => {
|
|
2202
2370
|
let o = n.l10n?.[t];
|
|
2203
2371
|
for (let t of i) {
|
|
2204
2372
|
let i = y(n, t);
|
|
2205
|
-
|
|
2206
|
-
let s = e.kind === "block" ? e.blockId : "settings";
|
|
2207
|
-
r.set(`${s}/${t}`, {
|
|
2373
|
+
typeof i != "string" || i === "" || Object.keys(o?.set ?? {}).some((e) => e === t || t.startsWith(`${e}.`)) || r.set(`${e.kind === "block" ? e.blockId : "settings"}/${t}`, {
|
|
2208
2374
|
target: e,
|
|
2209
2375
|
path: t,
|
|
2210
2376
|
source: i,
|
|
2211
|
-
format: a &&
|
|
2377
|
+
format: a && vr[a]?.includes(t) ? "html" : "text",
|
|
2212
2378
|
text: o?.text?.[t]
|
|
2213
2379
|
});
|
|
2214
2380
|
}
|
|
@@ -2223,11 +2389,11 @@ function nr(e, t, n = []) {
|
|
|
2223
2389
|
};
|
|
2224
2390
|
return a(e.blocks), i({ kind: "settings" }, e.settings, g), r;
|
|
2225
2391
|
}
|
|
2226
|
-
function
|
|
2227
|
-
let r = n.only === "all" ? null :
|
|
2228
|
-
for (let [r, s] of
|
|
2392
|
+
function jr(e, t, n) {
|
|
2393
|
+
let r = n.only === "all" ? null : Ce(e, t, n.definitions), i = r && /* @__PURE__ */ new Set([...r.missing, ...r.stale]), a = [], o = {};
|
|
2394
|
+
for (let [r, s] of Ar(e, t, n.definitions)) {
|
|
2229
2395
|
if (i && !i.has(r) || n.blockId !== void 0 && (s.target.kind !== "block" || s.target.blockId !== n.blockId)) continue;
|
|
2230
|
-
let e =
|
|
2396
|
+
let e = Dr(s.source, n.syntax, s.format, n), t = s.text ? kr(s.text.value, e.tokens, n.syntax, s.format, n) : void 0;
|
|
2231
2397
|
a.push({
|
|
2232
2398
|
id: r,
|
|
2233
2399
|
format: s.format,
|
|
@@ -2241,8 +2407,8 @@ function rr(e, t, n) {
|
|
|
2241
2407
|
tokens: o
|
|
2242
2408
|
};
|
|
2243
2409
|
}
|
|
2244
|
-
function
|
|
2245
|
-
let i =
|
|
2410
|
+
function Mr(e, t, n, r) {
|
|
2411
|
+
let i = Ar(e, t, r.definitions), a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
2246
2412
|
for (let t of e) if (a.set(t.id, t), t.type === "section") for (let e of t.children) o(e);
|
|
2247
2413
|
else t.type === "wrapper" && o(t.children);
|
|
2248
2414
|
};
|
|
@@ -2258,8 +2424,8 @@ function ir(e, t, n, r) {
|
|
|
2258
2424
|
});
|
|
2259
2425
|
continue;
|
|
2260
2426
|
}
|
|
2261
|
-
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ?
|
|
2262
|
-
if (!o || u === null ||
|
|
2427
|
+
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ? Or(t.text, o) : null;
|
|
2428
|
+
if (!o || u === null || kr(u, o, r.syntax, n.format, r) === null) {
|
|
2263
2429
|
l.push({
|
|
2264
2430
|
id: t.id,
|
|
2265
2431
|
reason: "tags_changed"
|
|
@@ -2288,20 +2454,22 @@ function ir(e, t, n, r) {
|
|
|
2288
2454
|
rejected: l
|
|
2289
2455
|
};
|
|
2290
2456
|
}
|
|
2291
|
-
|
|
2292
|
-
|
|
2457
|
+
// ../types/src/custom-block-liquid.ts
|
|
2458
|
+
var Nr = 1e7, Pr = 2e3;
|
|
2459
|
+
function Fr(e) {
|
|
2293
2460
|
return new e.Liquid({
|
|
2294
2461
|
strictVariables: !1,
|
|
2295
2462
|
strictFilters: !1,
|
|
2296
2463
|
outputEscape: "escape",
|
|
2297
|
-
memoryLimit:
|
|
2298
|
-
renderLimit:
|
|
2464
|
+
memoryLimit: Nr,
|
|
2465
|
+
renderLimit: Pr,
|
|
2299
2466
|
templates: {}
|
|
2300
2467
|
});
|
|
2301
2468
|
}
|
|
2469
|
+
// ../types/src/factory.ts
|
|
2302
2470
|
function Y(e, t) {
|
|
2303
2471
|
let n = m(e);
|
|
2304
|
-
return !t || Object.keys(t).length === 0 ? n :
|
|
2472
|
+
return !t || Object.keys(t).length === 0 ? n : Nn(n, t);
|
|
2305
2473
|
}
|
|
2306
2474
|
function X(e) {
|
|
2307
2475
|
return e === void 0 ? void 0 : m(e);
|
|
@@ -2309,7 +2477,7 @@ function X(e) {
|
|
|
2309
2477
|
function Z() {
|
|
2310
2478
|
return crypto.randomUUID();
|
|
2311
2479
|
}
|
|
2312
|
-
function
|
|
2480
|
+
function Ir(e = 0) {
|
|
2313
2481
|
return {
|
|
2314
2482
|
top: e,
|
|
2315
2483
|
right: e,
|
|
@@ -2318,100 +2486,100 @@ function cr(e = 0) {
|
|
|
2318
2486
|
};
|
|
2319
2487
|
}
|
|
2320
2488
|
function Q(e = 10) {
|
|
2321
|
-
return { padding:
|
|
2489
|
+
return { padding: Ir(e) };
|
|
2322
2490
|
}
|
|
2323
|
-
function
|
|
2491
|
+
function Lr(e = {}) {
|
|
2324
2492
|
return Y({
|
|
2325
2493
|
id: Z(),
|
|
2326
2494
|
type: "title",
|
|
2327
|
-
...
|
|
2495
|
+
..._n,
|
|
2328
2496
|
styles: Q()
|
|
2329
2497
|
}, e);
|
|
2330
2498
|
}
|
|
2331
|
-
function
|
|
2499
|
+
function Rr(e = {}) {
|
|
2332
2500
|
return Y({
|
|
2333
2501
|
id: Z(),
|
|
2334
2502
|
type: "paragraph",
|
|
2335
|
-
...
|
|
2503
|
+
...vn,
|
|
2336
2504
|
styles: Q()
|
|
2337
2505
|
}, e);
|
|
2338
2506
|
}
|
|
2339
|
-
function
|
|
2507
|
+
function zr(e = {}) {
|
|
2340
2508
|
return Y({
|
|
2341
2509
|
id: Z(),
|
|
2342
2510
|
type: "image",
|
|
2343
|
-
...
|
|
2511
|
+
...yn,
|
|
2344
2512
|
styles: Q()
|
|
2345
2513
|
}, e);
|
|
2346
2514
|
}
|
|
2347
|
-
function
|
|
2515
|
+
function Br(e = {}) {
|
|
2348
2516
|
return Y({
|
|
2349
2517
|
id: Z(),
|
|
2350
2518
|
type: "button",
|
|
2351
|
-
...
|
|
2519
|
+
...bn,
|
|
2352
2520
|
styles: Q()
|
|
2353
2521
|
}, e);
|
|
2354
2522
|
}
|
|
2355
|
-
function
|
|
2523
|
+
function Vr(e = {}) {
|
|
2356
2524
|
return Y({
|
|
2357
2525
|
id: Z(),
|
|
2358
2526
|
type: "divider",
|
|
2359
|
-
...
|
|
2527
|
+
...xn,
|
|
2360
2528
|
styles: Q(20)
|
|
2361
2529
|
}, e);
|
|
2362
2530
|
}
|
|
2363
|
-
function
|
|
2531
|
+
function Hr(e = {}) {
|
|
2364
2532
|
return Y({
|
|
2365
2533
|
id: Z(),
|
|
2366
2534
|
type: "section",
|
|
2367
|
-
...
|
|
2535
|
+
...Sn,
|
|
2368
2536
|
children: [[]],
|
|
2369
2537
|
styles: Q(20)
|
|
2370
2538
|
}, e);
|
|
2371
2539
|
}
|
|
2372
|
-
function
|
|
2540
|
+
function Ur(e = {}) {
|
|
2373
2541
|
return Y({
|
|
2374
2542
|
id: Z(),
|
|
2375
2543
|
type: "video",
|
|
2376
|
-
...
|
|
2544
|
+
...Cn,
|
|
2377
2545
|
styles: Q()
|
|
2378
2546
|
}, e);
|
|
2379
2547
|
}
|
|
2380
|
-
function
|
|
2548
|
+
function Wr(e = {}) {
|
|
2381
2549
|
return Y({
|
|
2382
2550
|
id: Z(),
|
|
2383
2551
|
type: "social",
|
|
2384
2552
|
icons: [],
|
|
2385
|
-
...
|
|
2553
|
+
...wn,
|
|
2386
2554
|
styles: Q()
|
|
2387
2555
|
}, e);
|
|
2388
2556
|
}
|
|
2389
|
-
function
|
|
2557
|
+
function Gr(e = {}) {
|
|
2390
2558
|
return Y({
|
|
2391
2559
|
id: Z(),
|
|
2392
2560
|
type: "spacer",
|
|
2393
|
-
...
|
|
2561
|
+
...Tn,
|
|
2394
2562
|
styles: Q(0)
|
|
2395
2563
|
}, e);
|
|
2396
2564
|
}
|
|
2397
|
-
function
|
|
2565
|
+
function Kr(e = {}) {
|
|
2398
2566
|
return Y({
|
|
2399
2567
|
id: Z(),
|
|
2400
2568
|
type: "html",
|
|
2401
|
-
...
|
|
2569
|
+
...En,
|
|
2402
2570
|
styles: Q()
|
|
2403
2571
|
}, e);
|
|
2404
2572
|
}
|
|
2405
|
-
function
|
|
2573
|
+
function qr(e = {}) {
|
|
2406
2574
|
return Y({
|
|
2407
2575
|
id: Z(),
|
|
2408
2576
|
type: "menu",
|
|
2409
2577
|
items: [],
|
|
2410
|
-
|
|
2578
|
+
...Dn,
|
|
2411
2579
|
styles: Q()
|
|
2412
2580
|
}, e);
|
|
2413
2581
|
}
|
|
2414
|
-
function
|
|
2582
|
+
function Jr(e, t) {
|
|
2415
2583
|
return Array.from({ length: t }, () => ({
|
|
2416
2584
|
id: Z(),
|
|
2417
2585
|
cells: Array.from({ length: e }, () => ({
|
|
@@ -2420,29 +2588,29 @@ function br(e, t) {
|
|
|
2420
2588
|
}))
|
|
2421
2589
|
}));
|
|
2422
2590
|
}
|
|
2423
|
-
function
|
|
2591
|
+
function Yr(e = {}) {
|
|
2424
2592
|
return Y({
|
|
2425
2593
|
id: Z(),
|
|
2426
2594
|
type: "table",
|
|
2427
|
-
rows:
|
|
2428
|
-
...
|
|
2595
|
+
rows: Jr(3, 3),
|
|
2596
|
+
...On,
|
|
2429
2597
|
styles: Q()
|
|
2430
2598
|
}, e);
|
|
2431
2599
|
}
|
|
2432
|
-
function
|
|
2600
|
+
function Xr(e = {}) {
|
|
2433
2601
|
return Y({
|
|
2434
2602
|
id: Z(),
|
|
2435
2603
|
type: "countdown",
|
|
2436
|
-
...
|
|
2604
|
+
...kn,
|
|
2437
2605
|
styles: Q()
|
|
2438
2606
|
}, e);
|
|
2439
2607
|
}
|
|
2440
|
-
function
|
|
2608
|
+
function Zr(e) {
|
|
2441
2609
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
2442
2610
|
}
|
|
2443
|
-
function
|
|
2611
|
+
function Qr(e) {
|
|
2444
2612
|
let t = {};
|
|
2445
|
-
for (let n of e.fields) t[n.key] = X(
|
|
2613
|
+
for (let n of e.fields) t[n.key] = X(Zr(n));
|
|
2446
2614
|
let n = Y(Q(), X(e.defaultStyles));
|
|
2447
2615
|
return {
|
|
2448
2616
|
id: Z(),
|
|
@@ -2453,14 +2621,14 @@ function wr(e) {
|
|
|
2453
2621
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
2454
2622
|
};
|
|
2455
2623
|
}
|
|
2456
|
-
function
|
|
2624
|
+
function $r() {
|
|
2457
2625
|
return {
|
|
2458
2626
|
id: Z(),
|
|
2459
2627
|
type: "slot",
|
|
2460
2628
|
styles: Q(0)
|
|
2461
2629
|
};
|
|
2462
2630
|
}
|
|
2463
|
-
function
|
|
2631
|
+
function ei(e = {}) {
|
|
2464
2632
|
return Y({
|
|
2465
2633
|
id: Z(),
|
|
2466
2634
|
type: "wrapper",
|
|
@@ -2468,27 +2636,27 @@ function Er(e = {}) {
|
|
|
2468
2636
|
styles: Q(0)
|
|
2469
2637
|
}, e);
|
|
2470
2638
|
}
|
|
2471
|
-
function
|
|
2639
|
+
function ti(e, t) {
|
|
2472
2640
|
switch (e) {
|
|
2473
|
-
case "section": return
|
|
2474
|
-
case "title": return
|
|
2475
|
-
case "paragraph": return
|
|
2476
|
-
case "image": return
|
|
2477
|
-
case "button": return
|
|
2478
|
-
case "divider": return
|
|
2479
|
-
case "video": return
|
|
2480
|
-
case "social": return
|
|
2481
|
-
case "spacer": return
|
|
2482
|
-
case "html": return
|
|
2483
|
-
case "menu": return
|
|
2484
|
-
case "table": return
|
|
2485
|
-
case "countdown": return
|
|
2641
|
+
case "section": return Hr(X(t?.section));
|
|
2642
|
+
case "title": return Lr(X(t?.title));
|
|
2643
|
+
case "paragraph": return Rr(X(t?.paragraph));
|
|
2644
|
+
case "image": return zr(X(t?.image));
|
|
2645
|
+
case "button": return Br(X(t?.button));
|
|
2646
|
+
case "divider": return Vr(X(t?.divider));
|
|
2647
|
+
case "video": return Ur(X(t?.video));
|
|
2648
|
+
case "social": return Wr(X(t?.social));
|
|
2649
|
+
case "spacer": return Gr(X(t?.spacer));
|
|
2650
|
+
case "html": return Kr(X(t?.html));
|
|
2651
|
+
case "menu": return qr(X(t?.menu));
|
|
2652
|
+
case "table": return Yr(X(t?.table));
|
|
2653
|
+
case "countdown": return Xr(X(t?.countdown));
|
|
2486
2654
|
case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
|
|
2487
2655
|
case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
|
|
2488
2656
|
default: throw Error(`Unknown block type: ${e}`);
|
|
2489
2657
|
}
|
|
2490
2658
|
}
|
|
2491
|
-
function
|
|
2659
|
+
function ni(e, t) {
|
|
2492
2660
|
let n = e.l10n;
|
|
2493
2661
|
if (!n || t.size === 0) return;
|
|
2494
2662
|
let r = (n) => {
|
|
@@ -2503,7 +2671,7 @@ function Or(e, t) {
|
|
|
2503
2671
|
n && (e[t] = Object.fromEntries(Object.entries(n).map(([e, t]) => [r(e), t])));
|
|
2504
2672
|
}
|
|
2505
2673
|
}
|
|
2506
|
-
function
|
|
2674
|
+
function ri(e) {
|
|
2507
2675
|
let t = JSON.parse(JSON.stringify(e)), n = (e) => {
|
|
2508
2676
|
e.id = Z();
|
|
2509
2677
|
let t = /* @__PURE__ */ new Map(), r = (e, n) => {
|
|
@@ -2520,78 +2688,79 @@ function kr(e) {
|
|
|
2520
2688
|
if (e.type === "social") for (let t of e.icons) r(t, "icons");
|
|
2521
2689
|
if (e.type === "section") for (let t of e.children) for (let e of t) n(e);
|
|
2522
2690
|
if (e.type === "wrapper") for (let t of e.children) n(t);
|
|
2523
|
-
|
|
2691
|
+
ni(e, t);
|
|
2524
2692
|
};
|
|
2525
2693
|
return n(t), t;
|
|
2526
2694
|
}
|
|
2527
|
-
|
|
2695
|
+
// ../types/src/layout.ts
|
|
2696
|
+
var ii = "[Templatical] layout: must contain exactly one slot block", ai = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", oi = "[Templatical] layout: a wrapper cannot contain a wrapper", si = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", ci = "[Templatical] slot is not a valid content block", li = "[Templatical] layout: a wrapper cannot contain a section with its own wrapper (section.wrapper)", ui = "[Templatical] wrapper is not a valid content block";
|
|
2528
2697
|
function $(e, t, n = null, r = !1, i = !1) {
|
|
2529
|
-
for (let a of e) if (t(a, n, r, i),
|
|
2530
|
-
else
|
|
2698
|
+
for (let a of e) if (t(a, n, r, i), z(a)) for (let e of a.children) $(e, t, a, !0, i);
|
|
2699
|
+
else V(a) && $(a.children, t, a, r, !0);
|
|
2531
2700
|
}
|
|
2532
|
-
function
|
|
2701
|
+
function di(e) {
|
|
2533
2702
|
let t = 0;
|
|
2534
2703
|
if ($(e.blocks, (e, n, r, i) => {
|
|
2535
|
-
if (i &&
|
|
2536
|
-
if (
|
|
2537
|
-
if (
|
|
2538
|
-
if (r) throw Error(
|
|
2539
|
-
if (e.children.some(
|
|
2704
|
+
if (i && z(e) && e.wrapper) throw Error(li);
|
|
2705
|
+
if (B(e) && (t += 1, r)) throw Error(ai);
|
|
2706
|
+
if (V(e)) {
|
|
2707
|
+
if (r) throw Error(ai);
|
|
2708
|
+
if (e.children.some(V)) throw Error(oi);
|
|
2540
2709
|
}
|
|
2541
|
-
}), t !== 1) throw Error(
|
|
2710
|
+
}), t !== 1) throw Error(ii);
|
|
2542
2711
|
}
|
|
2543
|
-
function
|
|
2712
|
+
function fi(e) {
|
|
2544
2713
|
$(e.blocks, (e) => {
|
|
2545
|
-
if (
|
|
2714
|
+
if (B(e)) throw Error(ci);
|
|
2546
2715
|
});
|
|
2547
2716
|
}
|
|
2548
|
-
function
|
|
2717
|
+
function pi(e) {
|
|
2549
2718
|
$(e.blocks, (e) => {
|
|
2550
|
-
if (
|
|
2719
|
+
if (V(e)) throw Error(ui);
|
|
2551
2720
|
});
|
|
2552
2721
|
}
|
|
2553
|
-
function
|
|
2722
|
+
function mi(e) {
|
|
2554
2723
|
let t = !1;
|
|
2555
2724
|
return $(e.blocks, (e, n) => {
|
|
2556
|
-
|
|
2725
|
+
B(e) && n !== null && V(n) && (t = !0);
|
|
2557
2726
|
}), t;
|
|
2558
2727
|
}
|
|
2559
|
-
function
|
|
2560
|
-
if (
|
|
2561
|
-
if (
|
|
2562
|
-
let t =
|
|
2728
|
+
function hi(e) {
|
|
2729
|
+
if (B(e)) return e;
|
|
2730
|
+
if (V(e)) {
|
|
2731
|
+
let t = ri({
|
|
2563
2732
|
...e,
|
|
2564
2733
|
children: []
|
|
2565
2734
|
});
|
|
2566
|
-
return t.children = e.children.map(
|
|
2735
|
+
return t.children = e.children.map(hi), t;
|
|
2567
2736
|
}
|
|
2568
|
-
return
|
|
2737
|
+
return ri(e);
|
|
2569
2738
|
}
|
|
2570
|
-
function
|
|
2739
|
+
function gi(e) {
|
|
2571
2740
|
for (let t = 0; t < e.length; t++) {
|
|
2572
2741
|
let n = e[t];
|
|
2573
|
-
if (
|
|
2742
|
+
if (B(n)) return {
|
|
2574
2743
|
parent: e,
|
|
2575
2744
|
index: t
|
|
2576
2745
|
};
|
|
2577
|
-
if (
|
|
2578
|
-
let e =
|
|
2746
|
+
if (V(n)) {
|
|
2747
|
+
let e = gi(n.children);
|
|
2579
2748
|
if (e) return e;
|
|
2580
2749
|
}
|
|
2581
2750
|
}
|
|
2582
2751
|
return null;
|
|
2583
2752
|
}
|
|
2584
|
-
function
|
|
2585
|
-
for (let t of e) if (
|
|
2753
|
+
function _i(e) {
|
|
2754
|
+
for (let t of e) if (z(t)) {
|
|
2586
2755
|
if (t.wrapper) return !0;
|
|
2587
|
-
for (let e of t.children) if (
|
|
2756
|
+
for (let e of t.children) if (_i(e)) return !0;
|
|
2588
2757
|
}
|
|
2589
2758
|
return !1;
|
|
2590
2759
|
}
|
|
2591
|
-
function
|
|
2592
|
-
if (
|
|
2593
|
-
let n = e.blocks.map(
|
|
2594
|
-
if (!r) throw Error(
|
|
2760
|
+
function vi(e, t) {
|
|
2761
|
+
if (di(e), fi(t), pi(t), mi(e) && _i(t.blocks)) throw Error(si);
|
|
2762
|
+
let n = e.blocks.map(hi), r = gi(n);
|
|
2763
|
+
if (!r) throw Error(ii);
|
|
2595
2764
|
return r.parent.splice(r.index, 1, ...m(t.blocks)), {
|
|
2596
2765
|
blocks: n,
|
|
2597
2766
|
settings: {
|
|
@@ -2600,7 +2769,8 @@ function Wr(e, t) {
|
|
|
2600
2769
|
}
|
|
2601
2770
|
};
|
|
2602
2771
|
}
|
|
2603
|
-
|
|
2772
|
+
// ../types/src/url-policy.ts
|
|
2773
|
+
var yi = Object.freeze([
|
|
2604
2774
|
"http",
|
|
2605
2775
|
"https",
|
|
2606
2776
|
"mailto",
|
|
@@ -2610,43 +2780,44 @@ var Gr = Object.freeze([
|
|
|
2610
2780
|
"sms",
|
|
2611
2781
|
"xmpp",
|
|
2612
2782
|
"cid"
|
|
2613
|
-
])
|
|
2614
|
-
Object.freeze([
|
|
2783
|
+
]), bi = Object.freeze([
|
|
2615
2784
|
"javascript",
|
|
2616
2785
|
"data",
|
|
2617
2786
|
"vbscript"
|
|
2618
2787
|
]);
|
|
2619
|
-
function
|
|
2788
|
+
function xi(e) {
|
|
2620
2789
|
return e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2621
2790
|
}
|
|
2622
|
-
function
|
|
2623
|
-
let t = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
2791
|
+
function Si(e) {
|
|
2792
|
+
let t = /^([a-z][a-z0-9+.-]*):/i.exec(xi(e));
|
|
2624
2793
|
return t ? t[1].toLowerCase() : null;
|
|
2625
2794
|
}
|
|
2626
|
-
var
|
|
2795
|
+
var Ci = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, wi = Object.freeze([
|
|
2627
2796
|
"href",
|
|
2628
2797
|
"xlink:href",
|
|
2629
2798
|
"background",
|
|
2630
2799
|
"poster",
|
|
2631
2800
|
"src"
|
|
2632
|
-
]),
|
|
2801
|
+
]), Ti = Object.freeze([
|
|
2633
2802
|
"srcdoc",
|
|
2634
2803
|
"ping",
|
|
2635
2804
|
"formaction",
|
|
2636
2805
|
"action"
|
|
2637
2806
|
]);
|
|
2638
|
-
function
|
|
2639
|
-
let n =
|
|
2640
|
-
return r === null ||
|
|
2807
|
+
function Ei(e, t) {
|
|
2808
|
+
let n = xi(e), r = Si(n);
|
|
2809
|
+
return r === null || yi.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && Ci.test(n);
|
|
2641
2810
|
}
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2811
|
+
// ../types/src/rich-text.ts
|
|
2812
|
+
var Di = /<\/?p\b[^<>]*>/gi, Oi = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
2813
|
+
function ki(e) {
|
|
2814
|
+
return e.replace(Di, "").trim() === "";
|
|
2645
2815
|
}
|
|
2646
|
-
function
|
|
2647
|
-
return
|
|
2816
|
+
function Ai(e) {
|
|
2817
|
+
return ki(e) ? e : e.replace(Oi, "<p$1> </p>");
|
|
2648
2818
|
}
|
|
2649
|
-
|
|
2819
|
+
// ../types/src/fonts.ts
|
|
2820
|
+
var ji = {
|
|
2650
2821
|
arial: "Arial, sans-serif",
|
|
2651
2822
|
helvetica: "Helvetica, sans-serif",
|
|
2652
2823
|
georgia: "Georgia, serif",
|
|
@@ -2655,13 +2826,13 @@ var ni = {
|
|
|
2655
2826
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2656
2827
|
"courier new": "'Courier New', monospace",
|
|
2657
2828
|
tahoma: "Tahoma, sans-serif"
|
|
2658
|
-
},
|
|
2829
|
+
}, Mi = /* @__PURE__ */ new Set([
|
|
2659
2830
|
"inherit",
|
|
2660
2831
|
"initial",
|
|
2661
2832
|
"unset",
|
|
2662
2833
|
"revert",
|
|
2663
2834
|
"revert-layer"
|
|
2664
|
-
]),
|
|
2835
|
+
]), Ni = /* @__PURE__ */ new Set([
|
|
2665
2836
|
"serif",
|
|
2666
2837
|
"sans-serif",
|
|
2667
2838
|
"monospace",
|
|
@@ -2676,14 +2847,14 @@ var ni = {
|
|
|
2676
2847
|
"math",
|
|
2677
2848
|
"fangsong"
|
|
2678
2849
|
]);
|
|
2679
|
-
function
|
|
2850
|
+
function Pi(e) {
|
|
2680
2851
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
2681
2852
|
}
|
|
2682
|
-
function
|
|
2853
|
+
function Fi(e) {
|
|
2683
2854
|
if (typeof e != "string") return [];
|
|
2684
2855
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
2685
2856
|
for (;;) {
|
|
2686
|
-
for (; r < t.length &&
|
|
2857
|
+
for (; r < t.length && Pi(t[r]);) r++;
|
|
2687
2858
|
if (r >= t.length) return [];
|
|
2688
2859
|
let e = t[r];
|
|
2689
2860
|
if (e === "\"" || e === "'") {
|
|
@@ -2700,7 +2871,7 @@ function oi(e) {
|
|
|
2700
2871
|
}
|
|
2701
2872
|
}
|
|
2702
2873
|
if (!o) return [];
|
|
2703
|
-
for (; a < t.length &&
|
|
2874
|
+
for (; a < t.length && Pi(t[a]);) a++;
|
|
2704
2875
|
if (a < t.length && t[a] !== ",") return [];
|
|
2705
2876
|
n.push({
|
|
2706
2877
|
name: i,
|
|
@@ -2708,7 +2879,7 @@ function oi(e) {
|
|
|
2708
2879
|
}), r = a;
|
|
2709
2880
|
} else {
|
|
2710
2881
|
let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
|
|
2711
|
-
if (a === "" || a.includes("\"") || a.includes("'") ||
|
|
2882
|
+
if (a === "" || a.includes("\"") || a.includes("'") || Mi.has(a.toLowerCase())) return [];
|
|
2712
2883
|
n.push({
|
|
2713
2884
|
name: a,
|
|
2714
2885
|
quoted: !1
|
|
@@ -2718,26 +2889,27 @@ function oi(e) {
|
|
|
2718
2889
|
r++;
|
|
2719
2890
|
}
|
|
2720
2891
|
}
|
|
2721
|
-
function
|
|
2892
|
+
function Ii(e) {
|
|
2722
2893
|
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2723
2894
|
}
|
|
2724
|
-
function
|
|
2725
|
-
return !e.quoted &&
|
|
2895
|
+
function Li(e) {
|
|
2896
|
+
return !e.quoted && Ni.has(e.name.toLowerCase());
|
|
2726
2897
|
}
|
|
2727
|
-
function
|
|
2728
|
-
return
|
|
2898
|
+
function Ri(e) {
|
|
2899
|
+
return Fi(e)[0]?.name ?? "";
|
|
2729
2900
|
}
|
|
2730
|
-
function
|
|
2731
|
-
let n = (e) => `${
|
|
2901
|
+
function zi(e, t) {
|
|
2902
|
+
let n = (e) => `${Ii(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
|
|
2732
2903
|
if (i) return n(i);
|
|
2733
|
-
let a =
|
|
2904
|
+
let a = Fi(e);
|
|
2734
2905
|
if (a.length !== 1) return e;
|
|
2735
2906
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
2736
|
-
return c ? n(c) :
|
|
2907
|
+
return c ? n(c) : ji[s] || (Li(o) ? e : `${Ii(o.name)}, ${t.defaultFallback}`);
|
|
2737
2908
|
}
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
return Array.isArray(t.blocks);
|
|
2909
|
+
// ../types/src/preview-resolution.ts
|
|
2910
|
+
function Bi(e) {
|
|
2911
|
+
return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
|
|
2742
2912
|
}
|
|
2743
|
-
export {
|
|
2913
|
+
export { _r as $, A as $t, Wr as A, n as An, rn as At, jr as B, zt as Bt, Vr as C, i as Cn, pn as Ct, Rr as D, d as Dn, un as Dt, qr as E, s as En, B as Et, ei as F, Bt as Ft, gr as G, Pt as Gt, W as H, jt as Ht, Z as I, Wt as It, nr as J, Tt as Jt, or as K, Ft as Kt, Fr as L, Ut as Lt, Yr as M, o as Mn, V as Mt, Lr as N, t as Nn, nn as Nt, Hr as O, c as On, dn as Ot, Ur as P, en as Pt, ar as Q, T as Qt, vr as R, Kt as Rt, Qr as S, ee as Sn, on as St, zr as T, l as Tn, z as Tt, G as U, Mt as Ut, Or as V, Lt as Vt, mr as W, Nt as Wt, dr as X, w as Xt, tr as Y, kt as Yt, hr as Z, je as Zt, di as _, x as _n, sn as _t, Ai as a, oe as an, fr as at, Br as b, m as bn, cn as bt, Ti as c, me as cn, Kn as ct, Si as d, _e as dn, Rn as dt, ke as en, sr as et, Ei as f, ue as fn, Ln as ft, mi as g, S as gn, Nn as gt, pi as h, Se as hn, jn as ht, zi as i, C as in, lr as it, Gr as j, r as jn, ln as jt, $r as k, u as kn, mn as kt, wi as l, Ce as ln, U as lt, fi as m, y as mn, An as mt, Ri as n, g as nn, Qn as nt, ki as o, v as on, ur as ot, vi as p, fe as pn, Pn as pt, cr as q, St as qt, Fi as r, Te as rn, K as rt, bi as s, de as sn, Gn as st, Bi as t, Ae as tn, rr as tt, yi as u, we as un, Bn as ut, ri as v, ie as vn, hn as vt, Kr as w, e as wn, an as wt, Xr as x, p as xn, fn as xt, ti as y, h as yn, gn as yt, Mr as z, Gt as zt };
|
|
2914
|
+
|
|
2915
|
+
//# sourceMappingURL=src-BHgVGOTi.js.map
|