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