@templatical/editor 0.0.3 → 0.0.5
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-busJk9hm.js → AiChatSidebar-DwME3f-a.js} +84 -70
- package/dist/{AiFeatureMenu-DLGv_-pj.js → AiFeatureMenu-DJvWL1GZ.js} +23 -23
- package/dist/CloudEditor-Fe0ssRgi.js +1082 -0
- package/dist/{CollaboratorBar-Dv3l52vC.js → CollaboratorBar-DTT0EkZn.js} +25 -21
- package/dist/{CommentsSidebar-4tjp0VU5.js → CommentsSidebar-DrJhQRXK.js} +131 -131
- package/dist/{DesignReferenceSidebar-CmwXvltV.js → DesignReferenceSidebar-DdOht5zn.js} +49 -49
- package/dist/ModuleBrowserModal-CiV_jOEM.js +205 -0
- package/dist/{ModulePreviewCanvas-BcBJLnwL.js → ModulePreviewCanvas-Bmy6Y1WE.js} +2 -2
- package/dist/ParagraphEditor-CoQ3NlS7.js +688 -0
- package/dist/{RichTextEditorContent-CQqodi7p.js → RichTextEditorContent-CHJlh7HJ.js} +8 -4
- package/dist/{SaveModuleDialog-Bmzi72td.js → SaveModuleDialog-CD2ZYq1o.js} +25 -25
- package/dist/{SnapshotHistory-AEgi9Xsn.js → SnapshotHistory-DltsKvhP.js} +2 -2
- package/dist/TemplateScoringPanel-DmnmUE3y.js +254 -0
- package/dist/{TestEmailModal-Dpq1is9S.js → TestEmailModal-Dl633j9o.js} +3 -3
- package/dist/{TitleEditor-CLcDdcWI.js → TitleEditor-C7fds2Nc.js} +7 -7
- package/dist/{TplModal-CGzRjR96.js → TplModal-C5_CF-qn.js} +2 -2
- package/dist/{blockTypeIcons-BpPTqcok.js → blockTypeIcons-BrKZB10B.js} +1 -1
- package/dist/cdn/chunks/AiChatSidebar-X_Bv3Qys.js +2 -0
- package/dist/cdn/chunks/AiFeatureMenu-C5UQmEgV.js +59 -0
- package/dist/cdn/chunks/AiFeatureMenu-C5UQmEgV.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js +1056 -0
- package/dist/cdn/chunks/CloudEditor-DeTolKnf.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-DO1nxSrr.js +51 -0
- package/dist/cdn/chunks/CollaboratorBar-DO1nxSrr.js.map +1 -0
- package/dist/cdn/chunks/CommentsSidebar-4MTw_hue.js +2 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Bswh4Yx4.js +2 -0
- package/dist/{ModuleBrowserModal-lrk3Fr0H.js → cdn/chunks/ModuleBrowserModal-ChBr3aXj.js} +52 -62
- package/dist/cdn/chunks/ModuleBrowserModal-ChBr3aXj.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-DkSvri9H.js +107 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-DkSvri9H.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js +539 -0
- package/dist/cdn/chunks/ParagraphEditor-DU3oUKA7.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-BrsW1p9s.js +106 -0
- package/dist/cdn/chunks/RichTextEditorContent-BrsW1p9s.js.map +1 -0
- package/dist/cdn/chunks/SaveModuleDialog-CjqKkTEc.js +119 -0
- package/dist/cdn/chunks/SaveModuleDialog-CjqKkTEc.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-KME4xmn_.js +2 -0
- package/dist/cdn/chunks/TemplateScoringPanel-DgB3xDN6.js +2 -0
- package/dist/cdn/chunks/TestEmailModal-DdpvRbYf.js +2 -0
- package/dist/cdn/chunks/TitleEditor-C8FYbadT.js +166 -0
- package/dist/cdn/chunks/TitleEditor-C8FYbadT.js.map +1 -0
- package/dist/cdn/chunks/_rolldown_dynamic_import_helper-DMEI4TQ3.js +9 -0
- package/dist/cdn/chunks/blockTypeIcons-5QwYklNq.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-5QwYklNq.js.map +1 -0
- package/dist/cdn/chunks/de-BB3dgVOc.js +700 -0
- package/dist/cdn/chunks/de-BB3dgVOc.js.map +1 -0
- package/dist/cdn/chunks/de-BvYD17KT.js +89 -0
- package/dist/cdn/chunks/de-BvYD17KT.js.map +1 -0
- package/dist/cdn/chunks/dist-BF5c3Dr-.js +2 -0
- package/dist/cdn/chunks/dist-BGzvIxcJ.js +2 -0
- package/dist/cdn/chunks/dist-CFemF8rI.js +2 -0
- package/dist/cdn/chunks/dist-Co6uFhFK.js +2 -0
- package/dist/cdn/chunks/dist-DCikBY9K.js +2 -0
- package/dist/cdn/chunks/dist-DUILafAC.js +2 -0
- package/dist/cdn/chunks/dist-DghiKH0A.js +2 -0
- package/dist/cdn/chunks/dist-Dw8ckvfK.js +2 -0
- package/dist/cdn/chunks/dist-H07p0KAw.js +2 -0
- package/dist/cdn/chunks/dist-KYv9v_1z2.js +457 -0
- package/dist/cdn/chunks/dist-KYv9v_1z2.js.map +1 -0
- package/dist/cdn/chunks/dist-MjnKIc0W.js +2 -0
- package/dist/cdn/chunks/dist-odp0vGRv.js +2 -0
- package/dist/cdn/chunks/draggable-BQNU47zu.js +11544 -0
- package/dist/cdn/chunks/{draggable-ClUwYCFL.js.map → draggable-BQNU47zu.js.map} +1 -1
- package/dist/cdn/chunks/emojiData-BVEJHcNH.js +19 -0
- package/dist/cdn/chunks/{emojiData-6fVLNqeH.js.map → emojiData-BVEJHcNH.js.map} +1 -1
- package/dist/cdn/chunks/en-CpotcOPr.js +89 -0
- package/dist/cdn/chunks/en-CpotcOPr.js.map +1 -0
- package/dist/cdn/chunks/en-DeDcpnoS.js +700 -0
- package/dist/cdn/chunks/en-DeDcpnoS.js.map +1 -0
- package/dist/cdn/chunks/extensions-Bj7USRLr.js +419 -0
- package/dist/cdn/chunks/{extensions-ea_ewKUl.js.map → extensions-Bj7USRLr.js.map} +1 -1
- package/dist/cdn/chunks/features-Ds0XUfte.js +6737 -0
- package/dist/cdn/chunks/features-Ds0XUfte.js.map +1 -0
- package/dist/cdn/chunks/icons-fWsuSvgd.js +653 -0
- package/dist/cdn/chunks/icons-fWsuSvgd.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js +3272 -0
- package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +1 -0
- package/dist/cdn/chunks/media-library-BGQm_OyC.js +6005 -0
- package/dist/cdn/chunks/media-library-BGQm_OyC.js.map +1 -0
- package/dist/cdn/chunks/pusher-DJPhQnE8.js +2505 -0
- package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js +32 -0
- package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-DPITmOBR.js +20 -0
- package/dist/cdn/chunks/src-3i8rPuqd.js +494 -0
- package/dist/cdn/chunks/src-3i8rPuqd.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-DFe3I4Op.js +57 -0
- package/dist/cdn/chunks/{styleConstants-CNejCb-L.js.map → styleConstants-DFe3I4Op.js.map} +1 -1
- package/dist/cdn/chunks/styles-Dgijy53u.js +3350 -0
- package/dist/cdn/chunks/styles-Dgijy53u.js.map +1 -0
- package/dist/cdn/chunks/tiptap-BhxaWR8R.js +14208 -0
- package/dist/cdn/chunks/{tiptap-Cya4P9CN.js.map → tiptap-BhxaWR8R.js.map} +1 -1
- package/dist/cdn/editor.css +2 -1
- package/dist/cdn/editor.js +231 -1
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{de-B4Ob4vCo.js → de-D7TLGIPA.js} +20 -4
- package/dist/{dist-DmpMJbmZ.js → dist-Ci5lFuUy.js} +1 -1
- package/dist/{en-YXsspZJG.js → en-DvtiEMwP.js} +20 -4
- package/dist/{extensions-CKM99njP.js → extensions-DWx_jj8v.js} +3 -3
- package/dist/{keys-Dwa2PmdD.js → keys-C0MQRs8d.js} +3 -3
- package/dist/readableTextColor-LDlmVEUv.js +30 -0
- package/dist/{styleConstants-D4SOZGBV.js → styleConstants-Cxw88naD.js} +5 -5
- package/dist/styles-fdXNRqI3.js +3556 -0
- package/dist/templatical-editor.css +1 -1
- package/dist/templatical-editor.js +122 -128
- package/dist/templatical-editor.umd.cjs +62 -71
- package/dist/{useEditorCore-Cc4RCwWq.js → useEditorCore-DUGD6pq_.js} +1247 -1088
- package/dist/{useI18n-DUirdXEX.js → useI18n-D6m7ZUgY.js} +1 -1
- package/dist/{useMergeTag-DVnlvPYJ.js → useMergeTag-BZ3X0bNr.js} +1 -1
- package/package.json +4 -2
- package/dist/CloudEditor-BDnHd6Um.js +0 -919
- package/dist/ParagraphEditor-DH8cSC6m.js +0 -625
- package/dist/TemplateScoringPanel-CTgMtc0-.js +0 -249
- package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js +0 -3
- package/dist/cdn/chunks/ParagraphEditor-CCtWbGDv.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js +0 -2
- package/dist/cdn/chunks/RichTextEditorContent-BUD9veXd.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js +0 -3
- package/dist/cdn/chunks/TitleEditor-e_UTyxjd.js.map +0 -1
- package/dist/cdn/chunks/dist-0UheN8rK.js +0 -1
- package/dist/cdn/chunks/dist-55mmbGQ9.js +0 -1
- package/dist/cdn/chunks/dist-B31mxKyP.js +0 -1
- package/dist/cdn/chunks/dist-B5JI9nIg.js +0 -1
- package/dist/cdn/chunks/dist-B93vLKhU.js +0 -1
- package/dist/cdn/chunks/dist-BDt3FJvj.js +0 -1
- package/dist/cdn/chunks/dist-BJRuFHmi.js +0 -1
- package/dist/cdn/chunks/dist-BKSzrf0L.js +0 -1
- package/dist/cdn/chunks/dist-BL8c5gYQ.js +0 -1
- package/dist/cdn/chunks/dist-CYThWMP5.js +0 -1
- package/dist/cdn/chunks/dist-DxZbPJYt.js +0 -1
- package/dist/cdn/chunks/draggable-ClUwYCFL.js +0 -17
- package/dist/cdn/chunks/emojiData-6fVLNqeH.js +0 -2
- package/dist/cdn/chunks/extensions-ea_ewKUl.js +0 -2
- package/dist/cdn/chunks/icons-vmLJTaJk.js +0 -2
- package/dist/cdn/chunks/icons-vmLJTaJk.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +0 -1
- package/dist/cdn/chunks/styleConstants-CNejCb-L.js +0 -2
- package/dist/cdn/chunks/tiptap-Cya4P9CN.js +0 -145
- package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js +0 -2
- package/dist/cdn/chunks/useEditorCore-CwuxQuvh.js.map +0 -1
- package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js +0 -2
- package/dist/cdn/chunks/useMergeTag-DVOz1v9p.js.map +0 -1
- package/dist/i18n-CJsFtdbZ.js +0 -23
- package/dist/styles-DSw1VNU3.js +0 -3406
|
@@ -1,45 +1,146 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o } from "./dist-CG-vEqSU.js";
|
|
2
|
-
import { C as s, S as c,
|
|
3
|
-
import { t as E } from "./useI18n-
|
|
4
|
-
import { n as D, t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { useAutoSave as
|
|
12
|
-
import { HEADING_LEVEL_FONT_SIZE as
|
|
2
|
+
import { C as s, S as c, T as l, _ as u, a as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, s as S, u as C, v as ee, w, y as T } from "./keys-C0MQRs8d.js";
|
|
3
|
+
import { t as E } from "./useI18n-D6m7ZUgY.js";
|
|
4
|
+
import { n as D, t as te } from "./_plugin-vue_export-helper-B1-bu7yR.js";
|
|
5
|
+
import { t as ne } from "./message-circle-Blgm6V_h.js";
|
|
6
|
+
import { t as O } from "./trash-2-OwjZ-guZ.js";
|
|
7
|
+
import { t as re } from "./triangle-alert-DOSRIUYZ.js";
|
|
8
|
+
import { t as ie } from "./LoadingTrack-vK8W2PJf.js";
|
|
9
|
+
import { t as ae } from "./useMergeTag-BZ3X0bNr.js";
|
|
10
|
+
import { Fragment as oe, computed as k, createBlock as se, createCommentVNode as A, createElementBlock as j, createElementVNode as M, createTextVNode as ce, createVNode as N, defineAsyncComponent as le, defineComponent as ue, getCurrentScope as de, inject as P, nextTick as fe, normalizeClass as pe, normalizeStyle as F, onBeforeUnmount as me, onMounted as he, onScopeDispose as ge, openBlock as I, provide as L, ref as R, renderList as _e, renderSlot as ve, resolveDynamicComponent as ye, shallowRef as be, toDisplayString as z, triggerRef as xe, unref as B, vShow as Se, watch as Ce, withCtx as we, withDirectives as Te, withKeys as Ee, withModifiers as De } from "vue";
|
|
11
|
+
import { useAutoSave as Oe, useBlockActions as ke, useConditionPreview as Ae, useDataSourceFetch as je, useHistory as Me, useHistoryInterceptor as Ne } from "@templatical/core";
|
|
12
|
+
import { HEADING_LEVEL_FONT_SIZE as Pe, containsMergeTag as Fe, createButtonBlock as Ie, createCountdownBlock as Le, createCustomBlock as Re, createDividerBlock as ze, createHtmlBlock as Be, createImageBlock as Ve, createMenuBlock as He, createParagraphBlock as Ue, createSectionBlock as We, createSocialIconsBlock as Ge, createSpacerBlock as Ke, createTableBlock as qe, createTitleBlock as Je, createVideoBlock as Ye, resolveHtmlLogicMergeTagLabels as Xe, resolveHtmlMergeTagLabels as Ze, resolveSyntax as Qe } from "@templatical/types";
|
|
13
13
|
//#region \0rolldown/runtime.js
|
|
14
|
-
var
|
|
14
|
+
var $e = Object.create, et = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, nt = Object.getOwnPropertyNames, rt = Object.getPrototypeOf, it = Object.prototype.hasOwnProperty, at = (e, t) => () => (e && (t = e(e = 0)), t), ot = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), st = (e, t) => {
|
|
15
15
|
let n = {};
|
|
16
|
-
for (var r in e)
|
|
16
|
+
for (var r in e) et(n, r, {
|
|
17
17
|
get: e[r],
|
|
18
18
|
enumerable: !0
|
|
19
19
|
});
|
|
20
|
-
return t ||
|
|
21
|
-
},
|
|
22
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
20
|
+
return t || et(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
21
|
+
}, ct = (e, t, n, r) => {
|
|
22
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = nt(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !it.call(e, s) && s !== n && et(e, s, {
|
|
23
23
|
get: ((e) => t[e]).bind(null, s),
|
|
24
|
-
enumerable: !(r =
|
|
24
|
+
enumerable: !(r = tt(t, s)) || r.enumerable
|
|
25
25
|
});
|
|
26
26
|
return e;
|
|
27
|
-
},
|
|
27
|
+
}, lt = (e, t, n) => (n = e == null ? {} : $e(rt(e)), ct(t || !e || !e.__esModule ? et(n, "default", {
|
|
28
28
|
value: e,
|
|
29
29
|
enumerable: !0
|
|
30
|
-
}) : n, e)),
|
|
30
|
+
}) : n, e)), ut = (e) => it.call(e, "module.exports") ? e["module.exports"] : ct(et({}, "__esModule", { value: !0 }), e), dt = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
31
31
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
32
32
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
33
33
|
});
|
|
34
34
|
//#endregion
|
|
35
|
+
//#region src/utils/blockTypeLabels.ts
|
|
36
|
+
function ft(e, t) {
|
|
37
|
+
return t.blocks[e] ?? e;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/composables/useKeyboardReorder.ts
|
|
41
|
+
function pt(e, t) {
|
|
42
|
+
let n = R(null), r = R(""), i = null;
|
|
43
|
+
function a(t) {
|
|
44
|
+
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
45
|
+
if (r !== -1) return {
|
|
46
|
+
index: r,
|
|
47
|
+
total: n.length
|
|
48
|
+
};
|
|
49
|
+
for (let e of n) {
|
|
50
|
+
if (e.type !== "section") continue;
|
|
51
|
+
let n = e;
|
|
52
|
+
for (let e = 0; e < n.children.length; e++) {
|
|
53
|
+
let r = n.children[e], i = r.findIndex((e) => e.id === t);
|
|
54
|
+
if (i !== -1) return {
|
|
55
|
+
index: i,
|
|
56
|
+
total: r.length,
|
|
57
|
+
sectionId: n.id,
|
|
58
|
+
columnIndex: e
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
function o(n) {
|
|
65
|
+
let r = a(n);
|
|
66
|
+
if (!r) return "";
|
|
67
|
+
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
68
|
+
return i ? ft(i.type, t.t) : "";
|
|
69
|
+
}
|
|
70
|
+
function s(t, n) {
|
|
71
|
+
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
72
|
+
}
|
|
73
|
+
function c(e) {
|
|
74
|
+
r.value = "", queueMicrotask(() => {
|
|
75
|
+
r.value = e;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function l(e) {
|
|
79
|
+
return n.value === e;
|
|
80
|
+
}
|
|
81
|
+
function u(e) {
|
|
82
|
+
let r = a(e);
|
|
83
|
+
r && (n.value = e, i = r, c(t.format(t.t.blockActions.lifted, {
|
|
84
|
+
block: o(e),
|
|
85
|
+
position: String(r.index + 1),
|
|
86
|
+
total: String(r.total)
|
|
87
|
+
})));
|
|
88
|
+
}
|
|
89
|
+
function d(n, r) {
|
|
90
|
+
let i = a(n);
|
|
91
|
+
if (!i) return;
|
|
92
|
+
let s = i.index + r;
|
|
93
|
+
s < 0 || s >= i.total || (e.moveBlock(n, s, i.sectionId, i.columnIndex), c(t.format(t.t.blockActions.moved, {
|
|
94
|
+
block: o(n),
|
|
95
|
+
position: String(s + 1),
|
|
96
|
+
total: String(i.total)
|
|
97
|
+
})));
|
|
98
|
+
}
|
|
99
|
+
function f(e) {
|
|
100
|
+
d(e, -1);
|
|
101
|
+
}
|
|
102
|
+
function p(e) {
|
|
103
|
+
d(e, 1);
|
|
104
|
+
}
|
|
105
|
+
function m(e) {
|
|
106
|
+
let r = a(e);
|
|
107
|
+
r && c(t.format(t.t.blockActions.dropped, {
|
|
108
|
+
block: o(e),
|
|
109
|
+
position: String(r.index + 1),
|
|
110
|
+
total: String(r.total)
|
|
111
|
+
})), n.value = null, i = null;
|
|
112
|
+
}
|
|
113
|
+
function h() {
|
|
114
|
+
let r = n.value;
|
|
115
|
+
if (r && i) {
|
|
116
|
+
let n = a(r);
|
|
117
|
+
n && n.index !== i.index && e.moveBlock(r, i.index, i.sectionId, i.columnIndex), c(t.format(t.t.blockActions.cancelled, {
|
|
118
|
+
block: o(r),
|
|
119
|
+
position: String(i.index + 1)
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
n.value = null, i = null;
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
liftedBlockId: n,
|
|
126
|
+
announcement: r,
|
|
127
|
+
isLifted: l,
|
|
128
|
+
lift: u,
|
|
129
|
+
cancel: h,
|
|
130
|
+
moveUp: f,
|
|
131
|
+
moveDown: p,
|
|
132
|
+
drop: m
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
35
136
|
//#region src/composables/useUiTheme.ts
|
|
36
|
-
function
|
|
137
|
+
function mt(e) {
|
|
37
138
|
let t = n("(prefers-color-scheme: dark)");
|
|
38
|
-
return { resolvedTheme:
|
|
139
|
+
return { resolvedTheme: k(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
39
140
|
}
|
|
40
141
|
//#endregion
|
|
41
142
|
//#region src/composables/useThemeStyles.ts
|
|
42
|
-
var
|
|
143
|
+
var ht = {
|
|
43
144
|
bg: "--tpl-bg",
|
|
44
145
|
bgElevated: "--tpl-bg-elevated",
|
|
45
146
|
bgHover: "--tpl-bg-hover",
|
|
@@ -63,10 +164,10 @@ var ft = {
|
|
|
63
164
|
dangerLight: "--tpl-danger-light",
|
|
64
165
|
canvasBg: "--tpl-canvas-bg"
|
|
65
166
|
};
|
|
66
|
-
function
|
|
67
|
-
return { themeStyles:
|
|
167
|
+
function gt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
168
|
+
return { themeStyles: k(() => {
|
|
68
169
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
69
|
-
if (a) for (let [e, t] of Object.entries(
|
|
170
|
+
if (a) for (let [e, t] of Object.entries(ht)) {
|
|
70
171
|
let n = a[e];
|
|
71
172
|
n && (r[t] = n);
|
|
72
173
|
}
|
|
@@ -74,16 +175,36 @@ function pt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
74
175
|
}) };
|
|
75
176
|
}
|
|
76
177
|
//#endregion
|
|
178
|
+
//#region src/utils/logger.ts
|
|
179
|
+
var _t = "[Templatical]";
|
|
180
|
+
function vt() {
|
|
181
|
+
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
182
|
+
}
|
|
183
|
+
var yt = {
|
|
184
|
+
warn(...e) {
|
|
185
|
+
console.warn(_t, ...e);
|
|
186
|
+
},
|
|
187
|
+
error(...e) {
|
|
188
|
+
console.error(_t, ...e);
|
|
189
|
+
},
|
|
190
|
+
debug(...e) {
|
|
191
|
+
vt() || console.debug(_t, ...e);
|
|
192
|
+
},
|
|
193
|
+
info(...e) {
|
|
194
|
+
vt() || console.info(_t, ...e);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
//#endregion
|
|
77
198
|
//#region src/composables/useBlockRegistry.ts
|
|
78
|
-
function
|
|
79
|
-
let e =
|
|
199
|
+
function bt() {
|
|
200
|
+
let e = be(/* @__PURE__ */ new Map());
|
|
80
201
|
function t(t, n) {
|
|
81
|
-
e.value.set(t, n),
|
|
202
|
+
e.value.set(t, n), xe(e);
|
|
82
203
|
}
|
|
83
204
|
function n(t, n) {
|
|
84
205
|
let r = `custom:${t.type}`, i = {
|
|
85
206
|
component: n,
|
|
86
|
-
createBlock: () =>
|
|
207
|
+
createBlock: () => Re(t),
|
|
87
208
|
sidebarItem: {
|
|
88
209
|
type: r,
|
|
89
210
|
label: t.name,
|
|
@@ -93,7 +214,7 @@ function mt() {
|
|
|
93
214
|
},
|
|
94
215
|
definition: t
|
|
95
216
|
};
|
|
96
|
-
e.value.set(r, i),
|
|
217
|
+
e.value.set(r, i), xe(e);
|
|
97
218
|
}
|
|
98
219
|
function r(t) {
|
|
99
220
|
if (t.type === "custom") {
|
|
@@ -127,7 +248,7 @@ function mt() {
|
|
|
127
248
|
strictFilters: !1
|
|
128
249
|
}).parseAndRender(t.template, e.fieldValues);
|
|
129
250
|
} catch (t) {
|
|
130
|
-
return
|
|
251
|
+
return yt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
131
252
|
}
|
|
132
253
|
}
|
|
133
254
|
function l(t) {
|
|
@@ -146,75 +267,75 @@ function mt() {
|
|
|
146
267
|
}
|
|
147
268
|
//#endregion
|
|
148
269
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
149
|
-
var
|
|
270
|
+
var xt = [
|
|
150
271
|
{
|
|
151
272
|
type: "section",
|
|
152
273
|
label: "Section",
|
|
153
|
-
createBlock:
|
|
274
|
+
createBlock: We
|
|
154
275
|
},
|
|
155
276
|
{
|
|
156
277
|
type: "title",
|
|
157
278
|
label: "Title",
|
|
158
|
-
createBlock:
|
|
279
|
+
createBlock: Je
|
|
159
280
|
},
|
|
160
281
|
{
|
|
161
282
|
type: "paragraph",
|
|
162
283
|
label: "Paragraph",
|
|
163
|
-
createBlock:
|
|
284
|
+
createBlock: Ue
|
|
164
285
|
},
|
|
165
286
|
{
|
|
166
287
|
type: "image",
|
|
167
288
|
label: "Image",
|
|
168
|
-
createBlock:
|
|
289
|
+
createBlock: Ve
|
|
169
290
|
},
|
|
170
291
|
{
|
|
171
292
|
type: "button",
|
|
172
293
|
label: "Button",
|
|
173
|
-
createBlock:
|
|
294
|
+
createBlock: Ie
|
|
174
295
|
},
|
|
175
296
|
{
|
|
176
297
|
type: "divider",
|
|
177
298
|
label: "Divider",
|
|
178
|
-
createBlock:
|
|
299
|
+
createBlock: ze
|
|
179
300
|
},
|
|
180
301
|
{
|
|
181
302
|
type: "video",
|
|
182
303
|
label: "Video",
|
|
183
|
-
createBlock:
|
|
304
|
+
createBlock: Ye
|
|
184
305
|
},
|
|
185
306
|
{
|
|
186
307
|
type: "social",
|
|
187
308
|
label: "Social",
|
|
188
|
-
createBlock:
|
|
309
|
+
createBlock: Ge
|
|
189
310
|
},
|
|
190
311
|
{
|
|
191
312
|
type: "menu",
|
|
192
313
|
label: "Menu",
|
|
193
|
-
createBlock:
|
|
314
|
+
createBlock: He
|
|
194
315
|
},
|
|
195
316
|
{
|
|
196
317
|
type: "table",
|
|
197
318
|
label: "Table",
|
|
198
|
-
createBlock:
|
|
319
|
+
createBlock: qe
|
|
199
320
|
},
|
|
200
321
|
{
|
|
201
322
|
type: "spacer",
|
|
202
323
|
label: "Spacer",
|
|
203
|
-
createBlock:
|
|
324
|
+
createBlock: Ke
|
|
204
325
|
},
|
|
205
326
|
{
|
|
206
327
|
type: "html",
|
|
207
328
|
label: "HTML",
|
|
208
|
-
createBlock:
|
|
329
|
+
createBlock: Be
|
|
209
330
|
},
|
|
210
331
|
{
|
|
211
332
|
type: "countdown",
|
|
212
333
|
label: "Countdown",
|
|
213
|
-
createBlock:
|
|
334
|
+
createBlock: Le
|
|
214
335
|
}
|
|
215
336
|
];
|
|
216
|
-
function
|
|
217
|
-
for (let n of
|
|
337
|
+
function St(e, t) {
|
|
338
|
+
for (let n of xt) {
|
|
218
339
|
let r = t[n.type];
|
|
219
340
|
r && e.registerBuiltIn(n.type, {
|
|
220
341
|
component: r,
|
|
@@ -229,18 +350,18 @@ function gt(e, t) {
|
|
|
229
350
|
}
|
|
230
351
|
//#endregion
|
|
231
352
|
//#region src/utils/keyboardShortcuts.ts
|
|
232
|
-
function
|
|
353
|
+
function Ct(e) {
|
|
233
354
|
let t = e.target;
|
|
234
355
|
return t.isContentEditable || t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.tagName === "SELECT";
|
|
235
356
|
}
|
|
236
|
-
function
|
|
357
|
+
function wt(e, t) {
|
|
237
358
|
let n = e.metaKey || e.ctrlKey;
|
|
238
359
|
if (n && e.key === "s") {
|
|
239
360
|
e.preventDefault(), t.onSave?.();
|
|
240
361
|
return;
|
|
241
362
|
}
|
|
242
363
|
if (n && e.key.toLowerCase() === "z") {
|
|
243
|
-
if (
|
|
364
|
+
if (Ct(e)) return;
|
|
244
365
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
245
366
|
return;
|
|
246
367
|
}
|
|
@@ -248,18 +369,18 @@ function vt(e, t) {
|
|
|
248
369
|
t.selectBlock(null);
|
|
249
370
|
return;
|
|
250
371
|
}
|
|
251
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
372
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ct(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
252
373
|
}
|
|
253
374
|
//#endregion
|
|
254
375
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
255
|
-
var
|
|
376
|
+
var Tt = { class: "tpl:text-center" }, Et = ["href"], Dt = /* @__PURE__ */ ue({
|
|
256
377
|
__name: "ButtonBlock",
|
|
257
378
|
props: {
|
|
258
379
|
block: {},
|
|
259
380
|
viewport: {}
|
|
260
381
|
},
|
|
261
382
|
setup(e) {
|
|
262
|
-
let t = e, n =
|
|
383
|
+
let t = e, n = k(() => {
|
|
263
384
|
let e = {
|
|
264
385
|
display: "inline-block",
|
|
265
386
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -273,35 +394,35 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
273
394
|
};
|
|
274
395
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
275
396
|
});
|
|
276
|
-
return (t, r) => (
|
|
397
|
+
return (t, r) => (I(), j("div", Tt, [M("a", {
|
|
277
398
|
href: e.block.url || "#",
|
|
278
|
-
style:
|
|
399
|
+
style: F(n.value),
|
|
279
400
|
class: "tpl:cursor-default",
|
|
280
|
-
onClick: r[0] ||=
|
|
281
|
-
},
|
|
401
|
+
onClick: r[0] ||= De(() => {}, ["prevent"])
|
|
402
|
+
}, z(e.block.text), 13, Et)]));
|
|
282
403
|
}
|
|
283
|
-
}),
|
|
404
|
+
}), Ot = {
|
|
284
405
|
key: 0,
|
|
285
406
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8 tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
286
|
-
},
|
|
407
|
+
}, kt = {
|
|
287
408
|
key: 1,
|
|
288
409
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-4 tpl:text-xs tpl:text-[var(--tpl-text-dim)] tpl:opacity-50"
|
|
289
|
-
},
|
|
410
|
+
}, At = { class: "tpl:text-center" }, jt = /* @__PURE__ */ ue({
|
|
290
411
|
__name: "CountdownBlock",
|
|
291
412
|
props: {
|
|
292
413
|
block: {},
|
|
293
414
|
viewport: {}
|
|
294
415
|
},
|
|
295
416
|
setup(e) {
|
|
296
|
-
let t = e, { t: n } = E(), r =
|
|
417
|
+
let t = e, { t: n } = E(), r = R(Date.now());
|
|
297
418
|
i(() => {
|
|
298
419
|
r.value = Date.now();
|
|
299
420
|
}, 1e3);
|
|
300
|
-
let a =
|
|
421
|
+
let a = k(() => {
|
|
301
422
|
if (!t.block.targetDate) return null;
|
|
302
423
|
let e = new Date(t.block.targetDate);
|
|
303
424
|
return isNaN(e.getTime()) ? null : e.getTime();
|
|
304
|
-
}), o =
|
|
425
|
+
}), o = k(() => a.value ? r.value >= a.value : !1), s = k(() => {
|
|
305
426
|
if (!a.value || o.value) return {
|
|
306
427
|
days: 0,
|
|
307
428
|
hours: 0,
|
|
@@ -315,7 +436,7 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
315
436
|
minutes: Math.floor(t % 3600 / 60),
|
|
316
437
|
seconds: t % 60
|
|
317
438
|
};
|
|
318
|
-
}), c =
|
|
439
|
+
}), c = k(() => {
|
|
319
440
|
let e = [];
|
|
320
441
|
return t.block.showDays && e.push({
|
|
321
442
|
value: String(s.value.days).padStart(2, "0"),
|
|
@@ -330,44 +451,44 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
330
451
|
value: String(s.value.seconds).padStart(2, "0"),
|
|
331
452
|
label: t.block.labelSeconds
|
|
332
453
|
}), e;
|
|
333
|
-
}), l =
|
|
454
|
+
}), l = k(() => ({
|
|
334
455
|
backgroundColor: t.block.backgroundColor,
|
|
335
456
|
fontFamily: t.block.fontFamily || "inherit"
|
|
336
|
-
})), u =
|
|
457
|
+
})), u = k(() => ({
|
|
337
458
|
fontSize: `${t.block.digitFontSize}px`,
|
|
338
459
|
fontWeight: "bold",
|
|
339
460
|
color: t.block.digitColor,
|
|
340
461
|
lineHeight: "1.2"
|
|
341
|
-
})), d =
|
|
462
|
+
})), d = k(() => ({
|
|
342
463
|
fontSize: `${t.block.labelFontSize}px`,
|
|
343
464
|
color: t.block.labelColor,
|
|
344
465
|
marginTop: "4px"
|
|
345
|
-
})), f =
|
|
466
|
+
})), f = k(() => ({
|
|
346
467
|
fontSize: `${t.block.digitFontSize}px`,
|
|
347
468
|
color: t.block.digitColor,
|
|
348
469
|
fontFamily: t.block.fontFamily || "inherit"
|
|
349
470
|
}));
|
|
350
|
-
return (t, r) => e.block.targetDate ? o.value && e.block.hideOnExpiry ? (
|
|
471
|
+
return (t, r) => e.block.targetDate ? o.value && e.block.hideOnExpiry ? (I(), j("div", kt, z(B(n).countdown.hidden), 1)) : o.value ? (I(), j("div", {
|
|
351
472
|
key: 2,
|
|
352
|
-
style:
|
|
473
|
+
style: F(l.value),
|
|
353
474
|
class: "tpl:py-4 tpl:text-center"
|
|
354
|
-
}, [M("span", { style:
|
|
475
|
+
}, [M("span", { style: F({
|
|
355
476
|
fontSize: `${e.block.digitFontSize}px`,
|
|
356
477
|
color: e.block.digitColor
|
|
357
|
-
}) },
|
|
478
|
+
}) }, z(e.block.expiredMessage), 5)], 4)) : (I(), j("div", {
|
|
358
479
|
key: 3,
|
|
359
|
-
style:
|
|
480
|
+
style: F(l.value),
|
|
360
481
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:py-4"
|
|
361
|
-
}, [(
|
|
482
|
+
}, [(I(!0), j(oe, null, _e(c.value, (t, n) => (I(), j(oe, { key: t.label }, [n > 0 ? (I(), j("span", {
|
|
362
483
|
key: 0,
|
|
363
|
-
style:
|
|
484
|
+
style: F(f.value),
|
|
364
485
|
class: "tpl:self-start"
|
|
365
|
-
},
|
|
486
|
+
}, z(e.block.separator), 5)) : A("", !0), M("div", At, [M("div", { style: F(u.value) }, z(t.value), 5), M("div", { style: F(d.value) }, z(t.label), 5)])], 64))), 128))], 4)) : (I(), j("div", Ot, z(B(n).countdown.setDate), 1));
|
|
366
487
|
}
|
|
367
|
-
}),
|
|
488
|
+
}), Mt = D("bookmark", [["path", {
|
|
368
489
|
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",
|
|
369
490
|
key: "oz39mx"
|
|
370
|
-
}]]),
|
|
491
|
+
}]]), Nt = D("box", [
|
|
371
492
|
["path", {
|
|
372
493
|
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",
|
|
373
494
|
key: "hh9hay"
|
|
@@ -380,13 +501,13 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
380
501
|
d: "M12 22V12",
|
|
381
502
|
key: "d0xqtd"
|
|
382
503
|
}]
|
|
383
|
-
]),
|
|
504
|
+
]), Pt = D("code", [["path", {
|
|
384
505
|
d: "m16 18 6-6-6-6",
|
|
385
506
|
key: "eg8j8"
|
|
386
507
|
}], ["path", {
|
|
387
508
|
d: "m8 6-6 6 6 6",
|
|
388
509
|
key: "ppft3o"
|
|
389
|
-
}]]),
|
|
510
|
+
}]]), Ft = D("copy", [["rect", {
|
|
390
511
|
width: "14",
|
|
391
512
|
height: "14",
|
|
392
513
|
x: "8",
|
|
@@ -397,7 +518,7 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
397
518
|
}], ["path", {
|
|
398
519
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
399
520
|
key: "zix9uf"
|
|
400
|
-
}]]),
|
|
521
|
+
}]]), It = D("eye-off", [
|
|
401
522
|
["path", {
|
|
402
523
|
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",
|
|
403
524
|
key: "ct8e1f"
|
|
@@ -414,10 +535,10 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
414
535
|
d: "m2 2 20 20",
|
|
415
536
|
key: "1ooewy"
|
|
416
537
|
}]
|
|
417
|
-
]),
|
|
538
|
+
]), Lt = D("funnel", [["path", {
|
|
418
539
|
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",
|
|
419
540
|
key: "sc7q7i"
|
|
420
|
-
}]]),
|
|
541
|
+
}]]), Rt = D("grip-vertical", [
|
|
421
542
|
["circle", {
|
|
422
543
|
cx: "9",
|
|
423
544
|
cy: "12",
|
|
@@ -454,7 +575,7 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
454
575
|
r: "1",
|
|
455
576
|
key: "f4zoj3"
|
|
456
577
|
}]
|
|
457
|
-
]),
|
|
578
|
+
]), zt = D("image", [
|
|
458
579
|
["rect", {
|
|
459
580
|
width: "18",
|
|
460
581
|
height: "18",
|
|
@@ -474,13 +595,13 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
474
595
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
475
596
|
key: "1xmnt7"
|
|
476
597
|
}]
|
|
477
|
-
]),
|
|
598
|
+
]), Bt = D("navigation", [["polygon", {
|
|
478
599
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
479
600
|
key: "1ltx0t"
|
|
480
|
-
}]]),
|
|
601
|
+
}]]), Vt = D("puzzle", [["path", {
|
|
481
602
|
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",
|
|
482
603
|
key: "w46dr5"
|
|
483
|
-
}]]),
|
|
604
|
+
}]]), Ht = D("share-2", [
|
|
484
605
|
["circle", {
|
|
485
606
|
cx: "18",
|
|
486
607
|
cy: "5",
|
|
@@ -513,7 +634,7 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
513
634
|
y2: "10.49",
|
|
514
635
|
key: "1n3mei"
|
|
515
636
|
}]
|
|
516
|
-
]),
|
|
637
|
+
]), Ut = D("table", [
|
|
517
638
|
["path", {
|
|
518
639
|
d: "M12 3v18",
|
|
519
640
|
key: "108xh3"
|
|
@@ -534,7 +655,7 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
534
655
|
d: "M3 15h18",
|
|
535
656
|
key: "5xshup"
|
|
536
657
|
}]
|
|
537
|
-
]),
|
|
658
|
+
]), Wt = D("video", [["path", {
|
|
538
659
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
539
660
|
key: "ftymec"
|
|
540
661
|
}], ["rect", {
|
|
@@ -544,44 +665,44 @@ var yt = { class: "tpl:text-center" }, bt = ["href"], xt = /* @__PURE__ */ le({
|
|
|
544
665
|
height: "12",
|
|
545
666
|
rx: "2",
|
|
546
667
|
key: "158x01"
|
|
547
|
-
}]]),
|
|
668
|
+
}]]), Gt = ["innerHTML"], Kt = [
|
|
548
669
|
"src",
|
|
549
670
|
"width",
|
|
550
671
|
"height"
|
|
551
|
-
],
|
|
672
|
+
], qt = /* @__PURE__ */ ue({
|
|
552
673
|
__name: "CustomBlockIcon",
|
|
553
674
|
props: {
|
|
554
675
|
icon: {},
|
|
555
676
|
size: {}
|
|
556
677
|
},
|
|
557
678
|
setup(e) {
|
|
558
|
-
let t = e, n =
|
|
559
|
-
return (t, a) => r.value ? (
|
|
679
|
+
let t = e, n = k(() => t.size ?? 20), r = k(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = k(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
680
|
+
return (t, a) => r.value ? (I(), j("span", {
|
|
560
681
|
key: 0,
|
|
561
682
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
562
|
-
style:
|
|
683
|
+
style: F({
|
|
563
684
|
width: `${n.value}px`,
|
|
564
685
|
height: `${n.value}px`
|
|
565
686
|
}),
|
|
566
687
|
innerHTML: e.icon
|
|
567
|
-
}, null, 12,
|
|
688
|
+
}, null, 12, Gt)) : i.value ? (I(), j("img", {
|
|
568
689
|
key: 1,
|
|
569
690
|
src: e.icon,
|
|
570
691
|
width: n.value,
|
|
571
692
|
height: n.value,
|
|
572
693
|
class: "tpl:inline-block",
|
|
573
694
|
alt: ""
|
|
574
|
-
}, null, 8,
|
|
695
|
+
}, null, 8, Kt)) : (I(), se(B(Nt), {
|
|
575
696
|
key: 2,
|
|
576
697
|
size: n.value,
|
|
577
698
|
"stroke-width": 1.5
|
|
578
699
|
}, null, 8, ["size"]));
|
|
579
700
|
}
|
|
580
|
-
}),
|
|
581
|
-
function
|
|
701
|
+
}), Jt = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
702
|
+
function Yt(e, t) {
|
|
582
703
|
let n = null, r = null;
|
|
583
704
|
function i() {
|
|
584
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
705
|
+
return e.value ? Array.from(e.value.querySelectorAll(Jt)).filter((e) => e.offsetParent !== null) : [];
|
|
585
706
|
}
|
|
586
707
|
function o(e) {
|
|
587
708
|
if (e.key !== "Tab") return;
|
|
@@ -599,18 +720,18 @@ function Ut(e, t) {
|
|
|
599
720
|
function c() {
|
|
600
721
|
r?.(), r = null, n && n.focus && (n.focus(), n = null);
|
|
601
722
|
}
|
|
602
|
-
let l =
|
|
723
|
+
let l = Ce([t, e], ([e, t]) => {
|
|
603
724
|
e && t ? s() : c();
|
|
604
725
|
}, { flush: "post" });
|
|
605
|
-
|
|
726
|
+
ge(() => {
|
|
606
727
|
l(), c();
|
|
607
728
|
});
|
|
608
729
|
}
|
|
609
730
|
//#endregion
|
|
610
731
|
//#region src/composables/useEmoji.ts
|
|
611
|
-
function
|
|
612
|
-
let [e, n] = t(!1), r =
|
|
613
|
-
|
|
732
|
+
function Xt() {
|
|
733
|
+
let [e, n] = t(!1), r = be([]);
|
|
734
|
+
Ce(e, async (e) => {
|
|
614
735
|
if (e && r.value.length === 0) {
|
|
615
736
|
let { emojiCategories: e } = await import("./emojiData-BfWQS72m.js");
|
|
616
737
|
r.value = e;
|
|
@@ -631,8 +752,8 @@ function Wt() {
|
|
|
631
752
|
}
|
|
632
753
|
//#endregion
|
|
633
754
|
//#region src/composables/useDragDrop.ts
|
|
634
|
-
function
|
|
635
|
-
let { onBlockMove: t, onBlockAdd: n } = e, r =
|
|
755
|
+
function Zt(e) {
|
|
756
|
+
let { onBlockMove: t, onBlockAdd: n } = e, r = R(!1), i = R(null), a = R(null);
|
|
636
757
|
function o(e) {
|
|
637
758
|
r.value = !0, i.value = e;
|
|
638
759
|
}
|
|
@@ -681,7 +802,7 @@ function Gt(e) {
|
|
|
681
802
|
}
|
|
682
803
|
//#endregion
|
|
683
804
|
//#region src/composables/useFonts.ts
|
|
684
|
-
var
|
|
805
|
+
var Qt = [
|
|
685
806
|
{
|
|
686
807
|
value: "Arial",
|
|
687
808
|
label: "Arial"
|
|
@@ -710,7 +831,7 @@ var Kt = [
|
|
|
710
831
|
value: "Courier New",
|
|
711
832
|
label: "Courier New"
|
|
712
833
|
}
|
|
713
|
-
],
|
|
834
|
+
], $t = {
|
|
714
835
|
arial: "Arial, sans-serif",
|
|
715
836
|
helvetica: "Helvetica, sans-serif",
|
|
716
837
|
georgia: "Georgia, serif",
|
|
@@ -718,14 +839,14 @@ var Kt = [
|
|
|
718
839
|
verdana: "Verdana, sans-serif",
|
|
719
840
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
720
841
|
"courier new": "'Courier New', monospace"
|
|
721
|
-
},
|
|
722
|
-
function
|
|
723
|
-
let t =
|
|
842
|
+
}, en = "Arial, sans-serif";
|
|
843
|
+
function tn(e) {
|
|
844
|
+
let t = R(e?.customFonts ?? []), n = R(!0), r = R(!1), i = k(() => e?.defaultFallback ?? en);
|
|
724
845
|
function a(e) {
|
|
725
846
|
n.value = e;
|
|
726
847
|
}
|
|
727
|
-
let o =
|
|
728
|
-
let e = [...
|
|
848
|
+
let o = k(() => {
|
|
849
|
+
let e = [...Qt];
|
|
729
850
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
730
851
|
let r = t.value.map((e) => ({
|
|
731
852
|
value: e.name,
|
|
@@ -738,19 +859,19 @@ function Yt(e) {
|
|
|
738
859
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
739
860
|
}
|
|
740
861
|
function c(e) {
|
|
741
|
-
return
|
|
862
|
+
return Qt.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
742
863
|
}
|
|
743
864
|
function l() {
|
|
744
865
|
if (e?.defaultFont) {
|
|
745
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
866
|
+
if (!n.value && !c(e.defaultFont)) return en;
|
|
746
867
|
if (s(e.defaultFont)) {
|
|
747
868
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
748
869
|
if (t) return t.value;
|
|
749
870
|
}
|
|
750
871
|
}
|
|
751
|
-
return
|
|
872
|
+
return en;
|
|
752
873
|
}
|
|
753
|
-
let u =
|
|
874
|
+
let u = k(() => l());
|
|
754
875
|
function d(e) {
|
|
755
876
|
if (!e) return i.value;
|
|
756
877
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
@@ -758,7 +879,7 @@ function Yt(e) {
|
|
|
758
879
|
let e = n.fallback ?? i.value;
|
|
759
880
|
return `'${n.name}', ${e}`;
|
|
760
881
|
}
|
|
761
|
-
return
|
|
882
|
+
return $t[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
762
883
|
}
|
|
763
884
|
let f = [];
|
|
764
885
|
async function p() {
|
|
@@ -774,7 +895,7 @@ function Yt(e) {
|
|
|
774
895
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
775
896
|
}), f.push(t);
|
|
776
897
|
} catch (t) {
|
|
777
|
-
|
|
898
|
+
yt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
778
899
|
}
|
|
779
900
|
});
|
|
780
901
|
await Promise.allSettled(e), r.value = !0;
|
|
@@ -783,7 +904,7 @@ function Yt(e) {
|
|
|
783
904
|
for (let e of f) e.remove();
|
|
784
905
|
f.length = 0;
|
|
785
906
|
}
|
|
786
|
-
return
|
|
907
|
+
return de() && ge(m), {
|
|
787
908
|
fonts: o,
|
|
788
909
|
defaultFont: u,
|
|
789
910
|
defaultFallback: i,
|
|
@@ -799,9 +920,9 @@ function Yt(e) {
|
|
|
799
920
|
}
|
|
800
921
|
//#endregion
|
|
801
922
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
802
|
-
function
|
|
803
|
-
let t =
|
|
804
|
-
|
|
923
|
+
function nn(e) {
|
|
924
|
+
let t = R(!1), n = R(""), r = R(null);
|
|
925
|
+
Yt(r, t);
|
|
805
926
|
function i() {
|
|
806
927
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
807
928
|
}
|
|
@@ -834,9 +955,9 @@ function Xt(e) {
|
|
|
834
955
|
}
|
|
835
956
|
//#endregion
|
|
836
957
|
//#region src/composables/useRichTextEditor.ts
|
|
837
|
-
function
|
|
838
|
-
let t =
|
|
839
|
-
async function
|
|
958
|
+
function rn(e) {
|
|
959
|
+
let t = P(p, null), { mergeTags: n, isEnabled: r, isRequesting: i, requestMergeTag: s, syntax: c } = ae(), l = be(null), { showLinkDialog: u, linkUrl: d, linkDialogRef: f, openLinkDialog: m, insertLink: h, removeLink: g, closeLinkDialog: _, handleLinkKeydown: v } = nn(l), { start: y, stop: b } = o(() => l.value?.commands.focus("end"), 0, { immediate: !1 }), x = be(null), S = R(!0), C = R(null);
|
|
960
|
+
async function ee() {
|
|
840
961
|
C.value = null, S.value = !0;
|
|
841
962
|
try {
|
|
842
963
|
let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
|
|
@@ -854,25 +975,25 @@ function Zt(e) {
|
|
|
854
975
|
}
|
|
855
976
|
}), S.value = !1, y();
|
|
856
977
|
} catch (t) {
|
|
857
|
-
|
|
978
|
+
yt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), C.value = t instanceof Error ? t.message : "Failed to load editor", S.value = !1;
|
|
858
979
|
}
|
|
859
980
|
}
|
|
860
|
-
function
|
|
861
|
-
l.value?.destroy(), l.value = null,
|
|
981
|
+
function w() {
|
|
982
|
+
l.value?.destroy(), l.value = null, ee();
|
|
862
983
|
}
|
|
863
|
-
|
|
864
|
-
let
|
|
984
|
+
ee();
|
|
985
|
+
let T = Ce(() => e.blockContent(), (e) => {
|
|
865
986
|
l.value && l.value.getHTML() !== e && l.value.commands.setContent(e, { emitUpdate: !1 });
|
|
866
987
|
});
|
|
867
|
-
function
|
|
988
|
+
function E(t) {
|
|
868
989
|
if (i.value) return;
|
|
869
990
|
let n = t.target;
|
|
870
991
|
e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone();
|
|
871
992
|
}
|
|
872
|
-
a(document, "mousedown",
|
|
873
|
-
|
|
993
|
+
a(document, "mousedown", E), me(() => {
|
|
994
|
+
T(), b(), l.value?.destroy();
|
|
874
995
|
});
|
|
875
|
-
async function
|
|
996
|
+
async function D() {
|
|
876
997
|
let e = await s();
|
|
877
998
|
e && l.value ? l.value.chain().focus().insertMergeTag({
|
|
878
999
|
label: e.label,
|
|
@@ -884,10 +1005,10 @@ function Zt(e) {
|
|
|
884
1005
|
EditorContent: x,
|
|
885
1006
|
isLoading: S,
|
|
886
1007
|
initError: C,
|
|
887
|
-
retry:
|
|
1008
|
+
retry: w,
|
|
888
1009
|
showLinkDialog: u,
|
|
889
1010
|
linkUrl: d,
|
|
890
|
-
linkDialogRef:
|
|
1011
|
+
linkDialogRef: f,
|
|
891
1012
|
mergeTags: n,
|
|
892
1013
|
mergeTagEnabled: r,
|
|
893
1014
|
isRequestingMergeTag: i,
|
|
@@ -897,25 +1018,25 @@ function Zt(e) {
|
|
|
897
1018
|
removeLink: g,
|
|
898
1019
|
closeLinkDialog: _,
|
|
899
1020
|
handleLinkKeydown: v,
|
|
900
|
-
handleAddMergeTag:
|
|
1021
|
+
handleAddMergeTag: D
|
|
901
1022
|
};
|
|
902
1023
|
}
|
|
903
1024
|
//#endregion
|
|
904
1025
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
905
|
-
var
|
|
1026
|
+
var an = { class: "tpl:w-full" }, on = {
|
|
906
1027
|
key: 0,
|
|
907
1028
|
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)]"
|
|
908
|
-
},
|
|
1029
|
+
}, sn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, cn = {
|
|
909
1030
|
key: 1,
|
|
910
1031
|
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)]"
|
|
911
|
-
},
|
|
1032
|
+
}, ln = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, un = {
|
|
912
1033
|
key: 2,
|
|
913
1034
|
class: "tpl:relative"
|
|
914
|
-
},
|
|
1035
|
+
}, dn = ["innerHTML"], fn = {
|
|
915
1036
|
key: 0,
|
|
916
1037
|
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]",
|
|
917
1038
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
918
|
-
},
|
|
1039
|
+
}, pn = /* @__PURE__ */ ue({
|
|
919
1040
|
__name: "CustomBlock",
|
|
920
1041
|
props: {
|
|
921
1042
|
block: {},
|
|
@@ -923,9 +1044,9 @@ var Qt = { class: "tpl:w-full" }, $t = {
|
|
|
923
1044
|
},
|
|
924
1045
|
emits: ["fetchData"],
|
|
925
1046
|
setup(t, { emit: n }) {
|
|
926
|
-
let r = t, i = n, { t: a } = E(), o =
|
|
1047
|
+
let r = t, i = n, { t: a } = E(), o = P(b, null), s = R(""), c = R(!1), l = k(() => o?.getDefinition(r.block.customType)), u = k(() => !!l.value), { isFetching: d, fetch: f, needsFetch: p, hasDataSource: m } = je({
|
|
927
1048
|
definition: l,
|
|
928
|
-
block:
|
|
1049
|
+
block: k(() => r.block),
|
|
929
1050
|
onUpdate: (e, t) => {
|
|
930
1051
|
i("fetchData", {
|
|
931
1052
|
fieldValues: e,
|
|
@@ -945,73 +1066,73 @@ var Qt = { class: "tpl:w-full" }, $t = {
|
|
|
945
1066
|
}
|
|
946
1067
|
}
|
|
947
1068
|
let g = e(h, 150);
|
|
948
|
-
return
|
|
1069
|
+
return he(() => {
|
|
949
1070
|
h();
|
|
950
|
-
}),
|
|
1071
|
+
}), Ce(() => r.block.fieldValues, () => {
|
|
951
1072
|
g();
|
|
952
|
-
}, { deep: !0 }), (e, t) => (
|
|
1073
|
+
}, { deep: !0 }), (e, t) => (I(), j("div", an, [u.value ? c.value ? (I(), j("div", cn, [N(B(re), {
|
|
953
1074
|
size: 24,
|
|
954
1075
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
955
|
-
}), M("span",
|
|
1076
|
+
}), M("span", ln, z(B(a).customBlocks.renderError), 1)])) : (I(), j("div", un, [M("div", { innerHTML: s.value }, null, 8, dn), B(m) && B(p) ? (I(), j("div", fn, [B(d) ? (I(), se(ie, {
|
|
956
1077
|
key: 1,
|
|
957
1078
|
class: "tpl:w-48"
|
|
958
|
-
})) : (
|
|
1079
|
+
})) : (I(), j("button", {
|
|
959
1080
|
key: 0,
|
|
960
1081
|
type: "button",
|
|
961
1082
|
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-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
962
|
-
onClick: t[0] ||=
|
|
963
|
-
}, [l.value?.icon ? (
|
|
1083
|
+
onClick: t[0] ||= De((...e) => B(f) && B(f)(...e), ["stop"])
|
|
1084
|
+
}, [l.value?.icon ? (I(), se(qt, {
|
|
964
1085
|
key: 0,
|
|
965
1086
|
icon: l.value.icon,
|
|
966
1087
|
size: 16
|
|
967
|
-
}, null, 8, ["icon"])) :
|
|
1088
|
+
}, null, 8, ["icon"])) : A("", !0), ce(" " + z(l.value?.dataSource?.label || B(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (I(), j("div", on, [N(B(Vt), {
|
|
968
1089
|
size: 24,
|
|
969
1090
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
970
|
-
}), M("span",
|
|
1091
|
+
}), M("span", sn, z(B(a).customBlocks.definitionNotFound), 1)]))]));
|
|
971
1092
|
}
|
|
972
|
-
}),
|
|
1093
|
+
}), mn = { class: "tpl:w-full" }, hn = /* @__PURE__ */ ue({
|
|
973
1094
|
__name: "DividerBlock",
|
|
974
1095
|
props: {
|
|
975
1096
|
block: {},
|
|
976
1097
|
viewport: {}
|
|
977
1098
|
},
|
|
978
1099
|
setup(e) {
|
|
979
|
-
let t = e, n =
|
|
1100
|
+
let t = e, n = k(() => ({
|
|
980
1101
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
981
1102
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
982
1103
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
983
1104
|
}));
|
|
984
|
-
return (e, t) => (
|
|
1105
|
+
return (e, t) => (I(), j("div", mn, [M("hr", {
|
|
985
1106
|
class: "tpl:m-0 tpl:border-none",
|
|
986
|
-
style:
|
|
1107
|
+
style: F(n.value)
|
|
987
1108
|
}, null, 4)]));
|
|
988
1109
|
}
|
|
989
|
-
}),
|
|
1110
|
+
}), gn = { class: "tpl:w-full" }, _n = { 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)]" }, vn = {
|
|
990
1111
|
key: 0,
|
|
991
1112
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
992
|
-
},
|
|
1113
|
+
}, yn = {
|
|
993
1114
|
key: 1,
|
|
994
1115
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
995
|
-
},
|
|
1116
|
+
}, bn = /* @__PURE__ */ ue({
|
|
996
1117
|
__name: "HtmlBlock",
|
|
997
1118
|
props: {
|
|
998
1119
|
block: {},
|
|
999
1120
|
viewport: {}
|
|
1000
1121
|
},
|
|
1001
1122
|
setup(e) {
|
|
1002
|
-
let t = e, { t: n } = E(), r =
|
|
1003
|
-
return (e, t) => (
|
|
1123
|
+
let t = e, { t: n } = E(), r = k(() => t.block.content.trim().length > 0);
|
|
1124
|
+
return (e, t) => (I(), j("div", gn, [M("div", _n, [N(B(Pt), {
|
|
1004
1125
|
size: 24,
|
|
1005
1126
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1006
|
-
}), r.value ? (
|
|
1127
|
+
}), r.value ? (I(), j("span", vn, z(B(n).html.preview), 1)) : (I(), j("span", yn, z(B(n).html.empty), 1))])]));
|
|
1007
1128
|
}
|
|
1008
|
-
}),
|
|
1129
|
+
}), xn = ["href"], Sn = ["src", "alt"], Cn = ["src", "alt"], wn = {
|
|
1009
1130
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1010
1131
|
style: { opacity: "0.7" }
|
|
1011
|
-
},
|
|
1132
|
+
}, Tn = ["href"], En = ["src", "alt"], Dn = ["src", "alt"], On = {
|
|
1012
1133
|
key: 3,
|
|
1013
1134
|
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)]"
|
|
1014
|
-
},
|
|
1135
|
+
}, kn = ["aria-label"], An = { key: 1 }, jn = /* @__PURE__ */ ue({
|
|
1015
1136
|
__name: "ImageBlock",
|
|
1016
1137
|
props: {
|
|
1017
1138
|
block: {},
|
|
@@ -1019,7 +1140,7 @@ var Qt = { class: "tpl:w-full" }, $t = {
|
|
|
1019
1140
|
},
|
|
1020
1141
|
emits: ["update"],
|
|
1021
1142
|
setup(e, { emit: t }) {
|
|
1022
|
-
let n = e, r = t, { t: i } = E(), { syntax: a } =
|
|
1143
|
+
let n = e, r = t, { t: i } = E(), { syntax: a } = ae(), o = P(ee, null), s = k(() => !!o);
|
|
1023
1144
|
async function c() {
|
|
1024
1145
|
let e = await o?.({ accept: ["images"] });
|
|
1025
1146
|
if (e) {
|
|
@@ -1027,82 +1148,82 @@ var Qt = { class: "tpl:w-full" }, $t = {
|
|
|
1027
1148
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1028
1149
|
}
|
|
1029
1150
|
}
|
|
1030
|
-
let
|
|
1151
|
+
let l = k(() => ({ textAlign: n.block.align })), u = k(() => ({
|
|
1031
1152
|
maxWidth: "100%",
|
|
1032
1153
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1033
1154
|
display: "block",
|
|
1034
1155
|
margin: n.block.align === "center" ? "0 auto" : void 0,
|
|
1035
1156
|
marginLeft: n.block.align === "right" ? "auto" : void 0
|
|
1036
|
-
})),
|
|
1037
|
-
return (t, n) => (
|
|
1157
|
+
})), d = k(() => Fe(n.block.src, a));
|
|
1158
|
+
return (t, n) => (I(), j("div", {
|
|
1038
1159
|
class: "tpl:w-full",
|
|
1039
|
-
style:
|
|
1040
|
-
}, [e.block.src &&
|
|
1160
|
+
style: F(l.value)
|
|
1161
|
+
}, [e.block.src && d.value && e.block.placeholderUrl ? (I(), j(oe, { key: 0 }, [e.block.linkUrl ? (I(), j("a", {
|
|
1041
1162
|
key: 0,
|
|
1042
1163
|
href: e.block.linkUrl,
|
|
1043
1164
|
target: "_blank",
|
|
1044
1165
|
rel: "noopener noreferrer",
|
|
1045
|
-
onClick: n[0] ||=
|
|
1166
|
+
onClick: n[0] ||= De(() => {}, ["prevent"])
|
|
1046
1167
|
}, [M("img", {
|
|
1047
1168
|
class: "tpl:border-0",
|
|
1048
1169
|
loading: "lazy",
|
|
1049
1170
|
src: e.block.placeholderUrl,
|
|
1050
|
-
alt: e.block.alt ||
|
|
1051
|
-
style:
|
|
1052
|
-
}, null, 12,
|
|
1171
|
+
alt: e.block.alt || B(i).image.altTextPlaceholder,
|
|
1172
|
+
style: F(u.value)
|
|
1173
|
+
}, null, 12, Sn)], 8, xn)) : (I(), j("img", {
|
|
1053
1174
|
key: 1,
|
|
1054
1175
|
class: "tpl:border-0",
|
|
1055
1176
|
src: e.block.placeholderUrl,
|
|
1056
1177
|
alt: e.block.alt,
|
|
1057
|
-
style:
|
|
1058
|
-
}, null, 12,
|
|
1178
|
+
style: F(u.value)
|
|
1179
|
+
}, null, 12, Cn))], 64)) : e.block.src && d.value ? (I(), j("div", {
|
|
1059
1180
|
key: 1,
|
|
1060
1181
|
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)]",
|
|
1061
|
-
style:
|
|
1062
|
-
}, [N(
|
|
1182
|
+
style: F([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
1183
|
+
}, [N(B(zt), {
|
|
1063
1184
|
size: 32,
|
|
1064
1185
|
"stroke-width": 1.5,
|
|
1065
1186
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1066
1187
|
style: { opacity: "0.5" }
|
|
1067
|
-
}), M("span",
|
|
1188
|
+
}), M("span", wn, z(e.block.src), 1)], 4)) : e.block.src ? (I(), j(oe, { key: 2 }, [e.block.linkUrl ? (I(), j("a", {
|
|
1068
1189
|
key: 0,
|
|
1069
1190
|
href: e.block.linkUrl,
|
|
1070
1191
|
target: "_blank",
|
|
1071
1192
|
rel: "noopener noreferrer",
|
|
1072
|
-
onClick: n[1] ||=
|
|
1193
|
+
onClick: n[1] ||= De(() => {}, ["prevent"])
|
|
1073
1194
|
}, [M("img", {
|
|
1074
1195
|
class: "tpl:border-0",
|
|
1075
1196
|
loading: "lazy",
|
|
1076
1197
|
src: e.block.src,
|
|
1077
|
-
alt: e.block.alt ||
|
|
1078
|
-
style:
|
|
1079
|
-
}, null, 12,
|
|
1198
|
+
alt: e.block.alt || B(i).image.altTextPlaceholder,
|
|
1199
|
+
style: F(u.value)
|
|
1200
|
+
}, null, 12, En)], 8, Tn)) : (I(), j("img", {
|
|
1080
1201
|
key: 1,
|
|
1081
1202
|
class: "tpl:border-0",
|
|
1082
1203
|
src: e.block.src,
|
|
1083
1204
|
alt: e.block.alt,
|
|
1084
|
-
style:
|
|
1085
|
-
}, null, 12,
|
|
1205
|
+
style: F(u.value)
|
|
1206
|
+
}, null, 12, Dn))], 64)) : (I(), j("div", On, [s.value ? (I(), j("button", {
|
|
1086
1207
|
key: 0,
|
|
1087
|
-
"aria-label":
|
|
1208
|
+
"aria-label": B(i).image.browseMedia,
|
|
1088
1209
|
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:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1089
|
-
onClick:
|
|
1090
|
-
}, [N(
|
|
1210
|
+
onClick: De(c, ["stop"])
|
|
1211
|
+
}, [N(B(zt), {
|
|
1091
1212
|
size: 14,
|
|
1092
1213
|
"stroke-width": 1.5
|
|
1093
|
-
}),
|
|
1214
|
+
}), ce(" " + z(B(i).image.browseMedia), 1)], 8, kn)) : (I(), j("span", An, z(B(i).image.clickToAdd), 1))]))], 4));
|
|
1094
1215
|
}
|
|
1095
|
-
}),
|
|
1216
|
+
}), Mn = { class: "tpl:w-full" }, Nn = ["href"], Pn = {
|
|
1096
1217
|
key: 1,
|
|
1097
1218
|
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)]"
|
|
1098
|
-
},
|
|
1219
|
+
}, Fn = /* @__PURE__ */ ue({
|
|
1099
1220
|
__name: "MenuBlock",
|
|
1100
1221
|
props: {
|
|
1101
1222
|
block: {},
|
|
1102
1223
|
viewport: {}
|
|
1103
1224
|
},
|
|
1104
1225
|
setup(e) {
|
|
1105
|
-
let t = e, { t: n } = E(), r =
|
|
1226
|
+
let t = e, { t: n } = E(), r = k(() => ({
|
|
1106
1227
|
display: "flex",
|
|
1107
1228
|
flexWrap: "wrap",
|
|
1108
1229
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1110,35 +1231,35 @@ var Qt = { class: "tpl:w-full" }, $t = {
|
|
|
1110
1231
|
fontSize: `${t.block.fontSize}px`,
|
|
1111
1232
|
fontFamily: t.block.fontFamily || "inherit",
|
|
1112
1233
|
alignItems: "center"
|
|
1113
|
-
})), i =
|
|
1234
|
+
})), i = k(() => t.block.items.length > 0);
|
|
1114
1235
|
function a(e) {
|
|
1115
1236
|
return e || t.block.linkColor || t.block.color;
|
|
1116
1237
|
}
|
|
1117
|
-
return (t, o) => (
|
|
1238
|
+
return (t, o) => (I(), j("div", Mn, [i.value ? (I(), j("div", {
|
|
1118
1239
|
key: 0,
|
|
1119
|
-
style:
|
|
1120
|
-
}, [(
|
|
1240
|
+
style: F(r.value)
|
|
1241
|
+
}, [(I(!0), j(oe, null, _e(e.block.items, (t, n) => (I(), j(oe, { key: t.id }, [M("a", {
|
|
1121
1242
|
href: t.url || "#",
|
|
1122
1243
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1123
|
-
style:
|
|
1244
|
+
style: F({
|
|
1124
1245
|
color: a(t.color),
|
|
1125
1246
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1126
1247
|
textDecoration: t.underline ? "underline" : "none"
|
|
1127
1248
|
}),
|
|
1128
|
-
onClick: o[0] ||=
|
|
1129
|
-
},
|
|
1249
|
+
onClick: o[0] ||= De(() => {}, ["prevent"])
|
|
1250
|
+
}, z(t.text || "..."), 13, Nn), n < e.block.items.length - 1 ? (I(), j("span", {
|
|
1130
1251
|
key: 0,
|
|
1131
|
-
style:
|
|
1252
|
+
style: F({
|
|
1132
1253
|
color: e.block.separatorColor,
|
|
1133
1254
|
padding: `0 ${e.block.spacing}px`
|
|
1134
1255
|
})
|
|
1135
|
-
},
|
|
1256
|
+
}, z(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (I(), j("div", Pn, [N(B(Bt), { size: 16 }), M("span", null, z(B(n).menu.addLinks), 1)]))]));
|
|
1136
1257
|
}
|
|
1137
1258
|
});
|
|
1138
1259
|
//#endregion
|
|
1139
1260
|
//#region src/composables/useEditableTextBlock.ts
|
|
1140
|
-
function
|
|
1141
|
-
let t =
|
|
1261
|
+
function In(e) {
|
|
1262
|
+
let t = P(m, []), { syntax: n } = ae(), i = k(() => Xe(Ze(e(), t), n)), a = R(!1), o = R(null), { top: s, left: c } = r(o), l = k(() => ({
|
|
1142
1263
|
top: s.value - 8,
|
|
1143
1264
|
left: c.value
|
|
1144
1265
|
}));
|
|
@@ -1159,45 +1280,45 @@ function An(e) {
|
|
|
1159
1280
|
}
|
|
1160
1281
|
//#endregion
|
|
1161
1282
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1162
|
-
var
|
|
1283
|
+
var Ln = ["innerHTML"], Rn = /* @__PURE__ */ ue({
|
|
1163
1284
|
__name: "ParagraphBlock",
|
|
1164
1285
|
props: {
|
|
1165
1286
|
block: {},
|
|
1166
1287
|
viewport: {}
|
|
1167
1288
|
},
|
|
1168
1289
|
setup(e) {
|
|
1169
|
-
let t = e, n =
|
|
1170
|
-
return (t, l) => (
|
|
1290
|
+
let t = e, n = le(() => import("./ParagraphEditor-CoQ3NlS7.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = In(() => t.block.content);
|
|
1291
|
+
return (t, l) => (I(), j("div", {
|
|
1171
1292
|
ref_key: "blockRef",
|
|
1172
1293
|
ref: i,
|
|
1173
1294
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1174
|
-
onDblclick: l[0] ||= (...e) =>
|
|
1175
|
-
}, [
|
|
1295
|
+
onDblclick: l[0] ||= (...e) => B(s) && B(s)(...e)
|
|
1296
|
+
}, [B(r) ? (I(), se(B(n), {
|
|
1176
1297
|
key: 0,
|
|
1177
1298
|
block: e.block,
|
|
1178
|
-
"toolbar-position":
|
|
1179
|
-
onDone:
|
|
1299
|
+
"toolbar-position": B(a),
|
|
1300
|
+
onDone: B(c)
|
|
1180
1301
|
}, null, 8, [
|
|
1181
1302
|
"block",
|
|
1182
1303
|
"toolbar-position",
|
|
1183
1304
|
"onDone"
|
|
1184
|
-
])) : (
|
|
1305
|
+
])) : (I(), j("div", {
|
|
1185
1306
|
key: 1,
|
|
1186
1307
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
1187
|
-
innerHTML:
|
|
1188
|
-
}, null, 8,
|
|
1308
|
+
innerHTML: B(o)
|
|
1309
|
+
}, null, 8, Ln))], 544));
|
|
1189
1310
|
}
|
|
1190
1311
|
});
|
|
1191
1312
|
//#endregion
|
|
1192
1313
|
//#region src/utils/blockComponentResolver.ts
|
|
1193
|
-
function
|
|
1314
|
+
function zn(e, t, n) {
|
|
1194
1315
|
if (t) {
|
|
1195
1316
|
let n = t.getComponent(e);
|
|
1196
1317
|
if (n) return n;
|
|
1197
1318
|
}
|
|
1198
1319
|
return n[e.type] ?? null;
|
|
1199
1320
|
}
|
|
1200
|
-
function
|
|
1321
|
+
function Bn(e) {
|
|
1201
1322
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
1202
1323
|
return {
|
|
1203
1324
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -1207,16 +1328,20 @@ function Pn(e) {
|
|
|
1207
1328
|
}
|
|
1208
1329
|
//#endregion
|
|
1209
1330
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1210
|
-
var
|
|
1331
|
+
var Vn = ["data-block-id", "data-block-type"], Hn = ["aria-label"], Un = [
|
|
1332
|
+
"aria-label",
|
|
1333
|
+
"aria-pressed",
|
|
1334
|
+
"title"
|
|
1335
|
+
], Wn = ["aria-label", "title"], Gn = ["aria-label", "title"], Kn = ["aria-label", "title"], qn = {
|
|
1211
1336
|
key: 1,
|
|
1212
1337
|
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"
|
|
1213
|
-
},
|
|
1338
|
+
}, Jn = { 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-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Yn = {
|
|
1214
1339
|
key: 2,
|
|
1215
1340
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1216
|
-
},
|
|
1341
|
+
}, Xn = ["aria-label", "title"], Zn = {
|
|
1217
1342
|
key: 3,
|
|
1218
1343
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1219
|
-
},
|
|
1344
|
+
}, Qn = ["aria-label"], $n = /* @__PURE__ */ te(/* @__PURE__ */ ue({
|
|
1220
1345
|
__name: "BlockWrapper",
|
|
1221
1346
|
props: {
|
|
1222
1347
|
block: {},
|
|
@@ -1226,147 +1351,176 @@ var Fn = ["data-block-id", "data-block-type"], In = ["aria-label"], Ln = ["aria-
|
|
|
1226
1351
|
},
|
|
1227
1352
|
emits: ["select"],
|
|
1228
1353
|
setup(e, { emit: t }) {
|
|
1229
|
-
let n = e, r = t, { t: i, format: a } = E(), o =
|
|
1354
|
+
let n = e, r = t, { t: i, format: a } = E(), o = P(h, null), s = R(null), c = k(() => o?.liftedBlockId.value === n.block.id), l = k(() => c.value ? a(i.blockActions.dragLifted, { block: n.block.type }) : i.blockActions.drag);
|
|
1355
|
+
async function u() {
|
|
1356
|
+
await fe(), s.value?.focus();
|
|
1357
|
+
}
|
|
1358
|
+
function d(e) {
|
|
1359
|
+
if (o) {
|
|
1360
|
+
if (e.key === " " || e.key === "Enter") {
|
|
1361
|
+
e.preventDefault(), e.stopPropagation(), c.value ? o.drop(n.block.id) : o.lift(n.block.id);
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
if (c.value) {
|
|
1365
|
+
if (e.key === "Escape") {
|
|
1366
|
+
e.preventDefault(), e.stopPropagation(), o.cancel(), u();
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
1369
|
+
if (e.key === "ArrowUp") {
|
|
1370
|
+
e.preventDefault(), e.stopPropagation(), o.moveUp(n.block.id), u();
|
|
1371
|
+
return;
|
|
1372
|
+
}
|
|
1373
|
+
e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), o.moveDown(n.block.id), u());
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
let f = k(() => !n.viewport || !n.block.visibility ? !1 : n.block.visibility[n.viewport] === !1), p = k(() => n.viewport ? {
|
|
1230
1378
|
desktop: i.viewport.desktop,
|
|
1231
1379
|
tablet: i.viewport.tablet,
|
|
1232
1380
|
mobile: i.viewport.mobile
|
|
1233
|
-
}[n.viewport] ?? n.viewport : ""),
|
|
1234
|
-
function
|
|
1381
|
+
}[n.viewport] ?? n.viewport : ""), m = k(() => !!n.block.displayCondition), v = P(g, null), y = P(_, null), b = P(S, {}), x = k(() => !!b.savedModules), C = k(() => b.comments?.getBlockCount(n.block.id) ?? 0), ee = k(() => Bn(n.block));
|
|
1382
|
+
function w(e) {
|
|
1235
1383
|
n.previewMode || (e.stopPropagation(), r("select"));
|
|
1236
1384
|
}
|
|
1237
|
-
function
|
|
1238
|
-
|
|
1385
|
+
function T() {
|
|
1386
|
+
v?.deleteBlock(n.block.id);
|
|
1239
1387
|
}
|
|
1240
|
-
function
|
|
1241
|
-
|
|
1388
|
+
function D() {
|
|
1389
|
+
v?.duplicateBlock(n.block);
|
|
1242
1390
|
}
|
|
1243
|
-
function
|
|
1244
|
-
|
|
1391
|
+
function te() {
|
|
1392
|
+
b.savedModules?.openSaveDialog(n.block.id);
|
|
1245
1393
|
}
|
|
1246
|
-
function
|
|
1247
|
-
|
|
1394
|
+
function re() {
|
|
1395
|
+
y?.toggleBlock(n.block.id);
|
|
1248
1396
|
}
|
|
1249
|
-
return (t, n) => (
|
|
1250
|
-
class:
|
|
1397
|
+
return (t, n) => (I(), j("div", {
|
|
1398
|
+
class: pe(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
1251
1399
|
"tpl-block--selected": e.isSelected,
|
|
1252
|
-
"tpl-block--idle": !e.isSelected
|
|
1400
|
+
"tpl-block--idle": !e.isSelected,
|
|
1401
|
+
"tpl-block--lifted": c.value
|
|
1253
1402
|
}]),
|
|
1254
|
-
style:
|
|
1403
|
+
style: F(ee.value),
|
|
1255
1404
|
"data-block-id": e.block.id,
|
|
1256
1405
|
"data-block-type": e.block.type,
|
|
1257
1406
|
draggable: "false",
|
|
1258
|
-
onClick:
|
|
1407
|
+
onClick: w
|
|
1259
1408
|
}, [
|
|
1260
|
-
e.isSelected ? (
|
|
1409
|
+
e.isSelected ? (I(), j("div", {
|
|
1261
1410
|
key: 0,
|
|
1262
1411
|
role: "toolbar",
|
|
1263
|
-
"aria-label":
|
|
1412
|
+
"aria-label": B(i).blockActions.drag,
|
|
1264
1413
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
1265
1414
|
}, [
|
|
1266
1415
|
M("button", {
|
|
1416
|
+
ref_key: "dragButtonRef",
|
|
1417
|
+
ref: s,
|
|
1267
1418
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150 tpl:active:cursor-grabbing",
|
|
1268
|
-
"aria-label":
|
|
1269
|
-
|
|
1270
|
-
|
|
1419
|
+
"aria-label": l.value,
|
|
1420
|
+
"aria-pressed": c.value,
|
|
1421
|
+
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1422
|
+
title: B(i).blockActions.drag,
|
|
1423
|
+
onKeydown: d
|
|
1424
|
+
}, [N(B(Rt), {
|
|
1271
1425
|
size: 14,
|
|
1272
1426
|
"stroke-width": 1.5
|
|
1273
|
-
})],
|
|
1427
|
+
})], 40, Un),
|
|
1274
1428
|
M("button", {
|
|
1275
1429
|
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 tpl:duration-150",
|
|
1276
|
-
"aria-label":
|
|
1277
|
-
title:
|
|
1278
|
-
onClick:
|
|
1279
|
-
}, [N(
|
|
1430
|
+
"aria-label": B(i).blockActions.duplicate,
|
|
1431
|
+
title: B(i).blockActions.duplicate,
|
|
1432
|
+
onClick: De(D, ["stop"])
|
|
1433
|
+
}, [N(B(Ft), {
|
|
1280
1434
|
size: 14,
|
|
1281
1435
|
"stroke-width": 1.5
|
|
1282
|
-
})], 8,
|
|
1283
|
-
|
|
1436
|
+
})], 8, Wn),
|
|
1437
|
+
x.value ? (I(), j("button", {
|
|
1284
1438
|
key: 0,
|
|
1285
1439
|
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 tpl:duration-150",
|
|
1286
|
-
"aria-label":
|
|
1287
|
-
title:
|
|
1288
|
-
onClick:
|
|
1289
|
-
}, [N(
|
|
1440
|
+
"aria-label": B(i).blockActions.saveAsModule,
|
|
1441
|
+
title: B(i).blockActions.saveAsModule,
|
|
1442
|
+
onClick: De(te, ["stop"])
|
|
1443
|
+
}, [N(B(Mt), {
|
|
1290
1444
|
size: 14,
|
|
1291
1445
|
"stroke-width": 1.5
|
|
1292
|
-
})], 8,
|
|
1446
|
+
})], 8, Gn)) : A("", !0),
|
|
1293
1447
|
M("button", {
|
|
1294
1448
|
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 tpl:duration-150",
|
|
1295
|
-
"aria-label":
|
|
1296
|
-
title:
|
|
1297
|
-
onClick:
|
|
1298
|
-
}, [N(
|
|
1449
|
+
"aria-label": B(i).blockActions.delete,
|
|
1450
|
+
title: B(i).blockActions.delete,
|
|
1451
|
+
onClick: De(T, ["stop"])
|
|
1452
|
+
}, [N(B(O), {
|
|
1299
1453
|
size: 14,
|
|
1300
1454
|
"stroke-width": 1.5
|
|
1301
|
-
})], 8,
|
|
1302
|
-
], 8,
|
|
1303
|
-
|
|
1455
|
+
})], 8, Kn)
|
|
1456
|
+
], 8, Hn)) : A("", !0),
|
|
1457
|
+
f.value ? (I(), j("div", qn, [M("span", Jn, [N(B(It), {
|
|
1304
1458
|
size: 12,
|
|
1305
1459
|
"stroke-width": 1.5
|
|
1306
|
-
}),
|
|
1307
|
-
|
|
1460
|
+
}), ce(" " + z(B(a)(B(i).blockActions.hiddenOnViewport, { viewport: p.value })), 1)])])) : A("", !0),
|
|
1461
|
+
m.value && !f.value ? (I(), j("div", Yn, [M("button", {
|
|
1308
1462
|
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:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
1309
|
-
"aria-label":
|
|
1463
|
+
"aria-label": B(i).blockActions.conditionToggle,
|
|
1310
1464
|
title: e.block.displayCondition?.label,
|
|
1311
|
-
onClick:
|
|
1312
|
-
}, [N(
|
|
1465
|
+
onClick: De(re, ["stop"])
|
|
1466
|
+
}, [N(B(Lt), {
|
|
1313
1467
|
size: 12,
|
|
1314
1468
|
"stroke-width": 2
|
|
1315
|
-
})], 8,
|
|
1316
|
-
|
|
1317
|
-
class: "tpl-comment-indicator tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-
|
|
1318
|
-
"aria-label":
|
|
1319
|
-
onClick: n[0] ||=
|
|
1320
|
-
}, [N(
|
|
1321
|
-
size:
|
|
1469
|
+
})], 8, Xn)])) : A("", !0),
|
|
1470
|
+
C.value > 0 && !f.value ? (I(), j("div", Zn, [M("button", {
|
|
1471
|
+
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:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
1472
|
+
"aria-label": B(a)(B(i).blockActions.comments, { count: String(C.value) }),
|
|
1473
|
+
onClick: n[0] ||= De((t) => B(b).comments?.openForBlock(e.block.id), ["stop"])
|
|
1474
|
+
}, [N(B(ne), {
|
|
1475
|
+
size: 12,
|
|
1322
1476
|
"stroke-width": 2.5
|
|
1323
|
-
}),
|
|
1324
|
-
|
|
1325
|
-
], 14,
|
|
1477
|
+
}), ce(" " + z(C.value), 1)], 8, Qn)])) : A("", !0),
|
|
1478
|
+
ve(t.$slots, "default", {}, void 0, !0)
|
|
1479
|
+
], 14, Vn));
|
|
1326
1480
|
}
|
|
1327
|
-
}), [["__scopeId", "data-v-
|
|
1481
|
+
}), [["__scopeId", "data-v-8d0416c4"]]), er = ["innerHTML"], tr = /* @__PURE__ */ ue({
|
|
1328
1482
|
__name: "TitleBlock",
|
|
1329
1483
|
props: {
|
|
1330
1484
|
block: {},
|
|
1331
1485
|
viewport: {}
|
|
1332
1486
|
},
|
|
1333
1487
|
setup(e) {
|
|
1334
|
-
let t = e, n =
|
|
1488
|
+
let t = e, n = le(() => import("./TitleEditor-C7fds2Nc.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = In(() => t.block.content), l = k(() => {
|
|
1335
1489
|
let e = {
|
|
1336
|
-
fontSize: `${
|
|
1490
|
+
fontSize: `${Pe[t.block.level]}px`,
|
|
1337
1491
|
color: t.block.color,
|
|
1338
1492
|
textAlign: t.block.textAlign
|
|
1339
1493
|
};
|
|
1340
1494
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1341
1495
|
});
|
|
1342
|
-
return (t, u) => (
|
|
1496
|
+
return (t, u) => (I(), j("div", {
|
|
1343
1497
|
ref_key: "blockRef",
|
|
1344
1498
|
ref: i,
|
|
1345
1499
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1346
|
-
style:
|
|
1347
|
-
onDblclick: u[0] ||= (...e) =>
|
|
1348
|
-
}, [
|
|
1500
|
+
style: F(l.value),
|
|
1501
|
+
onDblclick: u[0] ||= (...e) => B(s) && B(s)(...e)
|
|
1502
|
+
}, [B(r) ? (I(), se(B(n), {
|
|
1349
1503
|
key: 0,
|
|
1350
1504
|
block: e.block,
|
|
1351
|
-
"toolbar-position":
|
|
1352
|
-
onDone:
|
|
1505
|
+
"toolbar-position": B(a),
|
|
1506
|
+
onDone: B(c)
|
|
1353
1507
|
}, null, 8, [
|
|
1354
1508
|
"block",
|
|
1355
1509
|
"toolbar-position",
|
|
1356
1510
|
"onDone"
|
|
1357
|
-
])) : (
|
|
1511
|
+
])) : (I(), j("div", {
|
|
1358
1512
|
key: 1,
|
|
1359
1513
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
|
|
1360
|
-
innerHTML:
|
|
1361
|
-
}, null, 8,
|
|
1514
|
+
innerHTML: B(o)
|
|
1515
|
+
}, null, 8, er))], 36));
|
|
1362
1516
|
}
|
|
1363
|
-
}),
|
|
1364
|
-
MultiDrag: () =>
|
|
1365
|
-
Sortable: () =>
|
|
1366
|
-
Swap: () =>
|
|
1367
|
-
default: () =>
|
|
1517
|
+
}), nr = /* @__PURE__ */ st({
|
|
1518
|
+
MultiDrag: () => si,
|
|
1519
|
+
Sortable: () => q,
|
|
1520
|
+
Swap: () => ai,
|
|
1521
|
+
default: () => q
|
|
1368
1522
|
});
|
|
1369
|
-
function
|
|
1523
|
+
function rr(e, t) {
|
|
1370
1524
|
var n = Object.keys(e);
|
|
1371
1525
|
if (Object.getOwnPropertySymbols) {
|
|
1372
1526
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1376,26 +1530,26 @@ function Zn(e, t) {
|
|
|
1376
1530
|
}
|
|
1377
1531
|
return n;
|
|
1378
1532
|
}
|
|
1379
|
-
function
|
|
1533
|
+
function ir(e) {
|
|
1380
1534
|
for (var t = 1; t < arguments.length; t++) {
|
|
1381
1535
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
1382
|
-
t % 2 ?
|
|
1383
|
-
|
|
1384
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1536
|
+
t % 2 ? rr(Object(n), !0).forEach(function(t) {
|
|
1537
|
+
or(e, t, n[t]);
|
|
1538
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : rr(Object(n)).forEach(function(t) {
|
|
1385
1539
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1386
1540
|
});
|
|
1387
1541
|
}
|
|
1388
1542
|
return e;
|
|
1389
1543
|
}
|
|
1390
|
-
function
|
|
1544
|
+
function ar(e) {
|
|
1391
1545
|
"@babel/helpers - typeof";
|
|
1392
|
-
return
|
|
1546
|
+
return ar = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1393
1547
|
return typeof e;
|
|
1394
1548
|
} : function(e) {
|
|
1395
1549
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1396
|
-
},
|
|
1550
|
+
}, ar(e);
|
|
1397
1551
|
}
|
|
1398
|
-
function
|
|
1552
|
+
function or(e, t, n) {
|
|
1399
1553
|
return t in e ? Object.defineProperty(e, t, {
|
|
1400
1554
|
value: n,
|
|
1401
1555
|
enumerable: !0,
|
|
@@ -1403,65 +1557,65 @@ function er(e, t, n) {
|
|
|
1403
1557
|
writable: !0
|
|
1404
1558
|
}) : e[t] = n, e;
|
|
1405
1559
|
}
|
|
1406
|
-
function
|
|
1407
|
-
return
|
|
1560
|
+
function sr() {
|
|
1561
|
+
return sr = Object.assign || function(e) {
|
|
1408
1562
|
for (var t = 1; t < arguments.length; t++) {
|
|
1409
1563
|
var n = arguments[t];
|
|
1410
1564
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1411
1565
|
}
|
|
1412
1566
|
return e;
|
|
1413
|
-
},
|
|
1567
|
+
}, sr.apply(this, arguments);
|
|
1414
1568
|
}
|
|
1415
|
-
function
|
|
1569
|
+
function cr(e, t) {
|
|
1416
1570
|
if (e == null) return {};
|
|
1417
1571
|
var n = {}, r = Object.keys(e), i, a;
|
|
1418
1572
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
1419
1573
|
return n;
|
|
1420
1574
|
}
|
|
1421
|
-
function
|
|
1575
|
+
function lr(e, t) {
|
|
1422
1576
|
if (e == null) return {};
|
|
1423
|
-
var n =
|
|
1577
|
+
var n = cr(e, t), r, i;
|
|
1424
1578
|
if (Object.getOwnPropertySymbols) {
|
|
1425
1579
|
var a = Object.getOwnPropertySymbols(e);
|
|
1426
1580
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
1427
1581
|
}
|
|
1428
1582
|
return n;
|
|
1429
1583
|
}
|
|
1430
|
-
function
|
|
1431
|
-
return
|
|
1584
|
+
function ur(e) {
|
|
1585
|
+
return dr(e) || fr(e) || pr(e) || hr();
|
|
1432
1586
|
}
|
|
1433
|
-
function
|
|
1434
|
-
if (Array.isArray(e)) return
|
|
1587
|
+
function dr(e) {
|
|
1588
|
+
if (Array.isArray(e)) return mr(e);
|
|
1435
1589
|
}
|
|
1436
|
-
function
|
|
1590
|
+
function fr(e) {
|
|
1437
1591
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1438
1592
|
}
|
|
1439
|
-
function
|
|
1593
|
+
function pr(e, t) {
|
|
1440
1594
|
if (e) {
|
|
1441
|
-
if (typeof e == "string") return
|
|
1595
|
+
if (typeof e == "string") return mr(e, t);
|
|
1442
1596
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
1443
1597
|
if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
|
|
1444
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return
|
|
1598
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return mr(e, t);
|
|
1445
1599
|
}
|
|
1446
1600
|
}
|
|
1447
|
-
function
|
|
1601
|
+
function mr(e, t) {
|
|
1448
1602
|
(t == null || t > e.length) && (t = e.length);
|
|
1449
1603
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
1450
1604
|
return r;
|
|
1451
1605
|
}
|
|
1452
|
-
function
|
|
1606
|
+
function hr() {
|
|
1453
1607
|
throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1454
1608
|
}
|
|
1455
|
-
function
|
|
1609
|
+
function gr(e) {
|
|
1456
1610
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1457
1611
|
}
|
|
1458
|
-
function B(e, t, n) {
|
|
1459
|
-
e.addEventListener(t, n, !oi && fi);
|
|
1460
|
-
}
|
|
1461
1612
|
function V(e, t, n) {
|
|
1462
|
-
e.
|
|
1613
|
+
e.addEventListener(t, n, !fi && vi);
|
|
1463
1614
|
}
|
|
1464
|
-
function
|
|
1615
|
+
function H(e, t, n) {
|
|
1616
|
+
e.removeEventListener(t, n, !fi && vi);
|
|
1617
|
+
}
|
|
1618
|
+
function _r(e, t) {
|
|
1465
1619
|
if (t) {
|
|
1466
1620
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
1467
1621
|
if (e.matches) return e.matches(t);
|
|
@@ -1473,40 +1627,40 @@ function dr(e, t) {
|
|
|
1473
1627
|
return !1;
|
|
1474
1628
|
}
|
|
1475
1629
|
}
|
|
1476
|
-
function
|
|
1630
|
+
function vr(e) {
|
|
1477
1631
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
1478
1632
|
}
|
|
1479
|
-
function
|
|
1633
|
+
function yr(e, t, n, r) {
|
|
1480
1634
|
if (e) {
|
|
1481
1635
|
n ||= document;
|
|
1482
1636
|
do {
|
|
1483
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
1637
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && _r(e, t) : _r(e, t)) || r && e === n) return e;
|
|
1484
1638
|
if (e === n) break;
|
|
1485
|
-
} while (e =
|
|
1639
|
+
} while (e = vr(e));
|
|
1486
1640
|
}
|
|
1487
1641
|
return null;
|
|
1488
1642
|
}
|
|
1489
|
-
function H(e, t, n) {
|
|
1490
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(pi, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(pi, " "));
|
|
1491
|
-
}
|
|
1492
1643
|
function U(e, t, n) {
|
|
1644
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(yi, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(yi, " "));
|
|
1645
|
+
}
|
|
1646
|
+
function W(e, t, n) {
|
|
1493
1647
|
var r = e && e.style;
|
|
1494
1648
|
if (r) {
|
|
1495
1649
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
1496
1650
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
1497
1651
|
}
|
|
1498
1652
|
}
|
|
1499
|
-
function
|
|
1653
|
+
function br(e, t) {
|
|
1500
1654
|
var n = "";
|
|
1501
1655
|
if (typeof e == "string") n = e;
|
|
1502
1656
|
else do {
|
|
1503
|
-
var r =
|
|
1657
|
+
var r = W(e, "transform");
|
|
1504
1658
|
r && r !== "none" && (n = r + " " + n);
|
|
1505
1659
|
} while (!t && (e = e.parentNode));
|
|
1506
1660
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
1507
1661
|
return i && new i(n);
|
|
1508
1662
|
}
|
|
1509
|
-
function
|
|
1663
|
+
function xr(e, t, n) {
|
|
1510
1664
|
if (e) {
|
|
1511
1665
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
1512
1666
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -1514,21 +1668,21 @@ function hr(e, t, n) {
|
|
|
1514
1668
|
}
|
|
1515
1669
|
return [];
|
|
1516
1670
|
}
|
|
1517
|
-
function
|
|
1671
|
+
function Sr() {
|
|
1518
1672
|
return document.scrollingElement || document.documentElement;
|
|
1519
1673
|
}
|
|
1520
|
-
function
|
|
1674
|
+
function G(e, t, n, r, i) {
|
|
1521
1675
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
1522
1676
|
var a, o, s, c, l, u, d;
|
|
1523
|
-
if (e !== window && e.parentNode && e !==
|
|
1524
|
-
if (i && i.getBoundingClientRect && (
|
|
1677
|
+
if (e !== window && e.parentNode && e !== Sr() ? (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, !fi)) do
|
|
1678
|
+
if (i && i.getBoundingClientRect && (W(i, "transform") !== "none" || n && W(i, "position") !== "static")) {
|
|
1525
1679
|
var f = i.getBoundingClientRect();
|
|
1526
|
-
o -= f.top + parseInt(
|
|
1680
|
+
o -= f.top + parseInt(W(i, "border-top-width")), s -= f.left + parseInt(W(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
1527
1681
|
break;
|
|
1528
1682
|
}
|
|
1529
1683
|
while (i = i.parentNode);
|
|
1530
1684
|
if (r && e !== window) {
|
|
1531
|
-
var p =
|
|
1685
|
+
var p = br(i || e), m = p && p.a, h = p && p.d;
|
|
1532
1686
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
1533
1687
|
}
|
|
1534
1688
|
return {
|
|
@@ -1541,18 +1695,18 @@ function W(e, t, n, r, i) {
|
|
|
1541
1695
|
};
|
|
1542
1696
|
}
|
|
1543
1697
|
}
|
|
1544
|
-
function
|
|
1545
|
-
for (var r =
|
|
1546
|
-
var a =
|
|
1698
|
+
function Cr(e, t, n) {
|
|
1699
|
+
for (var r = Or(e, !0), i = G(e)[t]; r;) {
|
|
1700
|
+
var a = G(r)[n], o = void 0;
|
|
1547
1701
|
if (o = n === "top" || n === "left" ? i >= a : i <= a, !o) return r;
|
|
1548
|
-
if (r ===
|
|
1549
|
-
r =
|
|
1702
|
+
if (r === Sr()) break;
|
|
1703
|
+
r = Or(r, !1);
|
|
1550
1704
|
}
|
|
1551
1705
|
return !1;
|
|
1552
1706
|
}
|
|
1553
|
-
function
|
|
1707
|
+
function wr(e, t, n, r) {
|
|
1554
1708
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
1555
|
-
if (o[a].style.display !== "none" && o[a] !==
|
|
1709
|
+
if (o[a].style.display !== "none" && o[a] !== q.ghost && (r || o[a] !== q.dragged) && yr(o[a], n.draggable, e, !1)) {
|
|
1556
1710
|
if (i === t) return o[a];
|
|
1557
1711
|
i++;
|
|
1558
1712
|
}
|
|
@@ -1560,91 +1714,91 @@ function vr(e, t, n, r) {
|
|
|
1560
1714
|
}
|
|
1561
1715
|
return null;
|
|
1562
1716
|
}
|
|
1563
|
-
function
|
|
1564
|
-
for (var n = e.lastElementChild; n && (n ===
|
|
1717
|
+
function Tr(e, t) {
|
|
1718
|
+
for (var n = e.lastElementChild; n && (n === q.ghost || W(n, "display") === "none" || t && !_r(n, t));) n = n.previousElementSibling;
|
|
1565
1719
|
return n || null;
|
|
1566
1720
|
}
|
|
1567
|
-
function
|
|
1721
|
+
function K(e, t) {
|
|
1568
1722
|
var n = 0;
|
|
1569
1723
|
if (!e || !e.parentNode) return -1;
|
|
1570
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !==
|
|
1724
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== q.clone && (!t || _r(e, t)) && n++;
|
|
1571
1725
|
return n;
|
|
1572
1726
|
}
|
|
1573
|
-
function
|
|
1574
|
-
var t = 0, n = 0, r =
|
|
1727
|
+
function Er(e) {
|
|
1728
|
+
var t = 0, n = 0, r = Sr();
|
|
1575
1729
|
if (e) do {
|
|
1576
|
-
var i =
|
|
1730
|
+
var i = br(e), a = i.a, o = i.d;
|
|
1577
1731
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
1578
1732
|
} while (e !== r && (e = e.parentNode));
|
|
1579
1733
|
return [t, n];
|
|
1580
1734
|
}
|
|
1581
|
-
function
|
|
1735
|
+
function Dr(e, t) {
|
|
1582
1736
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
1583
1737
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
1584
1738
|
}
|
|
1585
1739
|
return -1;
|
|
1586
1740
|
}
|
|
1587
|
-
function
|
|
1588
|
-
if (!e || !e.getBoundingClientRect) return
|
|
1741
|
+
function Or(e, t) {
|
|
1742
|
+
if (!e || !e.getBoundingClientRect) return Sr();
|
|
1589
1743
|
var n = e, r = !1;
|
|
1590
1744
|
do
|
|
1591
1745
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
1592
|
-
var i =
|
|
1746
|
+
var i = W(n);
|
|
1593
1747
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
1594
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
1748
|
+
if (!n.getBoundingClientRect || n === document.body) return Sr();
|
|
1595
1749
|
if (r || t) return n;
|
|
1596
1750
|
r = !0;
|
|
1597
1751
|
}
|
|
1598
1752
|
}
|
|
1599
1753
|
while (n = n.parentNode);
|
|
1600
|
-
return
|
|
1754
|
+
return Sr();
|
|
1601
1755
|
}
|
|
1602
|
-
function
|
|
1756
|
+
function kr(e, t) {
|
|
1603
1757
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1604
1758
|
return e;
|
|
1605
1759
|
}
|
|
1606
|
-
function
|
|
1760
|
+
function Ar(e, t) {
|
|
1607
1761
|
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);
|
|
1608
1762
|
}
|
|
1609
|
-
function
|
|
1763
|
+
function jr(e, t) {
|
|
1610
1764
|
return function() {
|
|
1611
|
-
if (!
|
|
1765
|
+
if (!bi) {
|
|
1612
1766
|
var n = arguments, r = this;
|
|
1613
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
1614
|
-
|
|
1767
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), bi = setTimeout(function() {
|
|
1768
|
+
bi = void 0;
|
|
1615
1769
|
}, t);
|
|
1616
1770
|
}
|
|
1617
1771
|
};
|
|
1618
1772
|
}
|
|
1619
|
-
function
|
|
1620
|
-
clearTimeout(
|
|
1773
|
+
function Mr() {
|
|
1774
|
+
clearTimeout(bi), bi = void 0;
|
|
1621
1775
|
}
|
|
1622
|
-
function
|
|
1776
|
+
function Nr(e, t, n) {
|
|
1623
1777
|
e.scrollLeft += t, e.scrollTop += n;
|
|
1624
1778
|
}
|
|
1625
|
-
function
|
|
1779
|
+
function Pr(e) {
|
|
1626
1780
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
1627
1781
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
1628
1782
|
}
|
|
1629
|
-
function
|
|
1630
|
-
|
|
1783
|
+
function Fr(e, t) {
|
|
1784
|
+
W(e, "position", "absolute"), W(e, "top", t.top), W(e, "left", t.left), W(e, "width", t.width), W(e, "height", t.height);
|
|
1631
1785
|
}
|
|
1632
|
-
function
|
|
1633
|
-
|
|
1786
|
+
function Ir(e) {
|
|
1787
|
+
W(e, "position", ""), W(e, "top", ""), W(e, "left", ""), W(e, "width", ""), W(e, "height", "");
|
|
1634
1788
|
}
|
|
1635
|
-
function
|
|
1789
|
+
function Lr() {
|
|
1636
1790
|
var e = [], t;
|
|
1637
1791
|
return {
|
|
1638
1792
|
captureAnimationState: function() {
|
|
1639
1793
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
1640
|
-
if (!(
|
|
1794
|
+
if (!(W(t, "display") === "none" || t === q.ghost)) {
|
|
1641
1795
|
e.push({
|
|
1642
1796
|
target: t,
|
|
1643
|
-
rect:
|
|
1797
|
+
rect: G(t)
|
|
1644
1798
|
});
|
|
1645
|
-
var n =
|
|
1799
|
+
var n = ir({}, e[e.length - 1].rect);
|
|
1646
1800
|
if (t.thisAnimationDuration) {
|
|
1647
|
-
var r =
|
|
1801
|
+
var r = br(t, !0);
|
|
1648
1802
|
r && (n.top -= r.f, n.left -= r.e);
|
|
1649
1803
|
}
|
|
1650
1804
|
t.fromRect = n;
|
|
@@ -1655,7 +1809,7 @@ function jr() {
|
|
|
1655
1809
|
e.push(t);
|
|
1656
1810
|
},
|
|
1657
1811
|
removeAnimationState: function(t) {
|
|
1658
|
-
e.splice(
|
|
1812
|
+
e.splice(Dr(e, { target: t }), 1);
|
|
1659
1813
|
},
|
|
1660
1814
|
animateAll: function(n) {
|
|
1661
1815
|
var r = this;
|
|
@@ -1665,8 +1819,8 @@ function jr() {
|
|
|
1665
1819
|
}
|
|
1666
1820
|
var i = !1, a = 0;
|
|
1667
1821
|
e.forEach(function(e) {
|
|
1668
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
1669
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
1822
|
+
var t = 0, n = e.target, o = n.fromRect, s = G(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = br(n, !0);
|
|
1823
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Ar(c, s) && !Ar(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = zr(u, c, l, r.options)), Ar(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() {
|
|
1670
1824
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
1671
1825
|
}, t), n.thisAnimationDuration = t);
|
|
1672
1826
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -1675,49 +1829,49 @@ function jr() {
|
|
|
1675
1829
|
},
|
|
1676
1830
|
animate: function(e, t, n, r) {
|
|
1677
1831
|
if (r) {
|
|
1678
|
-
|
|
1679
|
-
var i =
|
|
1680
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
1681
|
-
|
|
1832
|
+
W(e, "transition", ""), W(e, "transform", "");
|
|
1833
|
+
var i = br(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
1834
|
+
e.animatingX = !!s, e.animatingY = !!c, W(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Rr(e), W(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), W(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
1835
|
+
W(e, "transition", ""), W(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
1682
1836
|
}, r);
|
|
1683
1837
|
}
|
|
1684
1838
|
}
|
|
1685
1839
|
};
|
|
1686
1840
|
}
|
|
1687
|
-
function
|
|
1841
|
+
function Rr(e) {
|
|
1688
1842
|
return e.offsetWidth;
|
|
1689
1843
|
}
|
|
1690
|
-
function
|
|
1844
|
+
function zr(e, t, n, r) {
|
|
1691
1845
|
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;
|
|
1692
1846
|
}
|
|
1693
|
-
function
|
|
1847
|
+
function Br(e) {
|
|
1694
1848
|
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;
|
|
1695
|
-
if (t ||= n && n[
|
|
1849
|
+
if (t ||= n && n[xi], t) {
|
|
1696
1850
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
1697
|
-
window.CustomEvent && !
|
|
1851
|
+
window.CustomEvent && !fi && !pi ? h = new CustomEvent(r, {
|
|
1698
1852
|
bubbles: !0,
|
|
1699
1853
|
cancelable: !0
|
|
1700
1854
|
}) : (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;
|
|
1701
|
-
var v =
|
|
1855
|
+
var v = ir(ir({}, m), wi.getEventProperties(r, t));
|
|
1702
1856
|
for (var y in v) h[y] = v[y];
|
|
1703
1857
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
1704
1858
|
}
|
|
1705
1859
|
}
|
|
1706
|
-
function
|
|
1707
|
-
|
|
1708
|
-
putSortable:
|
|
1709
|
-
cloneEl:
|
|
1710
|
-
targetEl:
|
|
1711
|
-
rootEl:
|
|
1712
|
-
oldIndex:
|
|
1713
|
-
oldDraggableIndex:
|
|
1714
|
-
newIndex:
|
|
1715
|
-
newDraggableIndex:
|
|
1860
|
+
function Vr(e) {
|
|
1861
|
+
Br(ir({
|
|
1862
|
+
putSortable: Ii,
|
|
1863
|
+
cloneEl: ki,
|
|
1864
|
+
targetEl: J,
|
|
1865
|
+
rootEl: Z,
|
|
1866
|
+
oldIndex: ji,
|
|
1867
|
+
oldDraggableIndex: Ni,
|
|
1868
|
+
newIndex: Mi,
|
|
1869
|
+
newDraggableIndex: Pi
|
|
1716
1870
|
}, e));
|
|
1717
1871
|
}
|
|
1718
|
-
function
|
|
1872
|
+
function q(e, t) {
|
|
1719
1873
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
1720
|
-
this.el = e, this.options = t =
|
|
1874
|
+
this.el = e, this.options = t = sr({}, t), e[xi] = this;
|
|
1721
1875
|
var n = {
|
|
1722
1876
|
group: null,
|
|
1723
1877
|
sort: !0,
|
|
@@ -1730,7 +1884,7 @@ function K(e, t) {
|
|
|
1730
1884
|
invertedSwapThreshold: null,
|
|
1731
1885
|
removeCloneOnHide: !0,
|
|
1732
1886
|
direction: function() {
|
|
1733
|
-
return
|
|
1887
|
+
return sa(e, this.options);
|
|
1734
1888
|
},
|
|
1735
1889
|
ghostClass: "sortable-ghost",
|
|
1736
1890
|
chosenClass: "sortable-chosen",
|
|
@@ -1757,68 +1911,68 @@ function K(e, t) {
|
|
|
1757
1911
|
x: 0,
|
|
1758
1912
|
y: 0
|
|
1759
1913
|
},
|
|
1760
|
-
supportPointer:
|
|
1914
|
+
supportPointer: q.supportPointer !== !1 && "PointerEvent" in window && !hi,
|
|
1761
1915
|
emptyInsertThreshold: 5
|
|
1762
1916
|
};
|
|
1763
|
-
for (var r in
|
|
1764
|
-
for (var i in
|
|
1765
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1917
|
+
for (var r in wi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
1918
|
+
for (var i in ua(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
1919
|
+
this.nativeDraggable = t.forceFallback ? !1 : aa, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? V(e, "pointerdown", this._onTapStart) : (V(e, "mousedown", this._onTapStart), V(e, "touchstart", this._onTapStart)), this.nativeDraggable && (V(e, "dragover", this), V(e, "dragenter", this)), zi.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), sr(this, Lr());
|
|
1766
1920
|
}
|
|
1767
|
-
function
|
|
1921
|
+
function Hr(e) {
|
|
1768
1922
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
1769
1923
|
}
|
|
1770
|
-
function
|
|
1771
|
-
var c, l = e[
|
|
1772
|
-
return window.CustomEvent && !
|
|
1924
|
+
function Ur(e, t, n, r, i, a, o, s) {
|
|
1925
|
+
var c, l = e[xi], u = l.options.onMove, d;
|
|
1926
|
+
return window.CustomEvent && !fi && !pi ? c = new CustomEvent("move", {
|
|
1773
1927
|
bubbles: !0,
|
|
1774
1928
|
cancelable: !0
|
|
1775
|
-
}) : (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 ||
|
|
1929
|
+
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || G(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
1776
1930
|
}
|
|
1777
|
-
function
|
|
1931
|
+
function Wr(e) {
|
|
1778
1932
|
e.draggable = !1;
|
|
1779
1933
|
}
|
|
1780
|
-
function
|
|
1781
|
-
|
|
1934
|
+
function Gr() {
|
|
1935
|
+
ea = !1;
|
|
1782
1936
|
}
|
|
1783
|
-
function
|
|
1784
|
-
var r =
|
|
1937
|
+
function Kr(e, t, n) {
|
|
1938
|
+
var r = G(wr(n.el, 0, n.options, !0)), i = 10;
|
|
1785
1939
|
return t ? e.clientX < r.left - i || e.clientY < r.top && e.clientX < r.right : e.clientY < r.top - i || e.clientY < r.bottom && e.clientX < r.left;
|
|
1786
1940
|
}
|
|
1787
|
-
function
|
|
1788
|
-
var r =
|
|
1941
|
+
function qr(e, t, n) {
|
|
1942
|
+
var r = G(Tr(n.el, n.options.draggable)), i = 10;
|
|
1789
1943
|
return t ? e.clientX > r.right + i || e.clientX <= r.right && e.clientY > r.bottom && e.clientX >= r.left : e.clientX > r.right && e.clientY > r.top || e.clientX <= r.right && e.clientY > r.bottom + i;
|
|
1790
1944
|
}
|
|
1791
|
-
function
|
|
1945
|
+
function Jr(e, t, n, r, i, a, o, s) {
|
|
1792
1946
|
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;
|
|
1793
1947
|
if (!o) {
|
|
1794
|
-
if (s &&
|
|
1795
|
-
if (!
|
|
1796
|
-
else if (
|
|
1797
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
1948
|
+
if (s && Zi < l * i) {
|
|
1949
|
+
if (!Yi && (Ji === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Yi = !0), Yi) f = !0;
|
|
1950
|
+
else if (Ji === 1 ? c < u + Zi : c > d - Zi) return -Ji;
|
|
1951
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Yr(t);
|
|
1798
1952
|
}
|
|
1799
1953
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
1800
1954
|
}
|
|
1801
|
-
function
|
|
1802
|
-
return
|
|
1955
|
+
function Yr(e) {
|
|
1956
|
+
return K(J) < K(e) ? 1 : -1;
|
|
1803
1957
|
}
|
|
1804
|
-
function
|
|
1958
|
+
function Xr(e) {
|
|
1805
1959
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
1806
1960
|
return r.toString(36);
|
|
1807
1961
|
}
|
|
1808
|
-
function
|
|
1809
|
-
|
|
1962
|
+
function Zr(e) {
|
|
1963
|
+
ta.length = 0;
|
|
1810
1964
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
1811
1965
|
var r = t[n];
|
|
1812
|
-
r.checked &&
|
|
1966
|
+
r.checked && ta.push(r);
|
|
1813
1967
|
}
|
|
1814
1968
|
}
|
|
1815
|
-
function
|
|
1969
|
+
function Qr(e) {
|
|
1816
1970
|
return setTimeout(e, 0);
|
|
1817
1971
|
}
|
|
1818
|
-
function
|
|
1972
|
+
function $r(e) {
|
|
1819
1973
|
return clearTimeout(e);
|
|
1820
1974
|
}
|
|
1821
|
-
function
|
|
1975
|
+
function ei() {
|
|
1822
1976
|
function e() {
|
|
1823
1977
|
for (var e in this.defaults = {
|
|
1824
1978
|
scroll: !0,
|
|
@@ -1831,99 +1985,99 @@ function Jr() {
|
|
|
1831
1985
|
return e.prototype = {
|
|
1832
1986
|
dragStarted: function(e) {
|
|
1833
1987
|
var t = e.originalEvent;
|
|
1834
|
-
this.sortable.nativeDraggable ?
|
|
1988
|
+
this.sortable.nativeDraggable ? V(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? V(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? V(document, "touchmove", this._handleFallbackAutoScroll) : V(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1835
1989
|
},
|
|
1836
1990
|
dragOverCompleted: function(e) {
|
|
1837
1991
|
var t = e.originalEvent;
|
|
1838
1992
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1839
1993
|
},
|
|
1840
1994
|
drop: function() {
|
|
1841
|
-
this.sortable.nativeDraggable ?
|
|
1995
|
+
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : (H(document, "pointermove", this._handleFallbackAutoScroll), H(document, "touchmove", this._handleFallbackAutoScroll), H(document, "mousemove", this._handleFallbackAutoScroll)), ni(), ti(), Mr();
|
|
1842
1996
|
},
|
|
1843
1997
|
nulling: function() {
|
|
1844
|
-
|
|
1998
|
+
xa = _a = ga = va = Sa = ya = ba = null, ha.length = 0;
|
|
1845
1999
|
},
|
|
1846
2000
|
_handleFallbackAutoScroll: function(e) {
|
|
1847
2001
|
this._handleAutoScroll(e, !0);
|
|
1848
2002
|
},
|
|
1849
2003
|
_handleAutoScroll: function(e, t) {
|
|
1850
2004
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
1851
|
-
if (
|
|
1852
|
-
|
|
1853
|
-
var o =
|
|
1854
|
-
|
|
1855
|
-
var a =
|
|
1856
|
-
a !== o && (o = a,
|
|
1857
|
-
}, 10),
|
|
2005
|
+
if (xa = e, t || this.options.forceAutoScrollFallback || pi || fi || hi) {
|
|
2006
|
+
Ca(e, this.options, a, t);
|
|
2007
|
+
var o = Or(a, !0);
|
|
2008
|
+
va && (!Sa || r !== ya || i !== ba) && (Sa && ni(), Sa = setInterval(function() {
|
|
2009
|
+
var a = Or(document.elementFromPoint(r, i), !0);
|
|
2010
|
+
a !== o && (o = a, ti()), Ca(e, n.options, a, t);
|
|
2011
|
+
}, 10), ya = r, ba = i);
|
|
1858
2012
|
} else {
|
|
1859
|
-
if (!this.options.bubbleScroll ||
|
|
1860
|
-
|
|
2013
|
+
if (!this.options.bubbleScroll || Or(a, !0) === Sr()) {
|
|
2014
|
+
ti();
|
|
1861
2015
|
return;
|
|
1862
2016
|
}
|
|
1863
|
-
|
|
2017
|
+
Ca(e, this.options, Or(a, !1), !1);
|
|
1864
2018
|
}
|
|
1865
2019
|
}
|
|
1866
|
-
},
|
|
2020
|
+
}, sr(e, {
|
|
1867
2021
|
pluginName: "scroll",
|
|
1868
2022
|
initializeByDefault: !0
|
|
1869
2023
|
});
|
|
1870
2024
|
}
|
|
1871
|
-
function
|
|
1872
|
-
|
|
2025
|
+
function ti() {
|
|
2026
|
+
ha.forEach(function(e) {
|
|
1873
2027
|
clearInterval(e.pid);
|
|
1874
|
-
}),
|
|
2028
|
+
}), ha = [];
|
|
1875
2029
|
}
|
|
1876
|
-
function
|
|
1877
|
-
clearInterval(
|
|
2030
|
+
function ni() {
|
|
2031
|
+
clearInterval(Sa);
|
|
1878
2032
|
}
|
|
1879
|
-
function
|
|
1880
|
-
function
|
|
1881
|
-
function
|
|
2033
|
+
function ri() {}
|
|
2034
|
+
function ii() {}
|
|
2035
|
+
function ai() {
|
|
1882
2036
|
function e() {
|
|
1883
2037
|
this.defaults = { swapClass: "sortable-swap-highlight" };
|
|
1884
2038
|
}
|
|
1885
2039
|
return e.prototype = {
|
|
1886
2040
|
dragStart: function(e) {
|
|
1887
|
-
|
|
2041
|
+
Ta = e.dragEl;
|
|
1888
2042
|
},
|
|
1889
2043
|
dragOverValid: function(e) {
|
|
1890
2044
|
var t = e.completed, n = e.target, r = e.onMove, i = e.activeSortable, a = e.changed, o = e.cancel;
|
|
1891
2045
|
if (i.options.swap) {
|
|
1892
2046
|
var s = this.sortable.el, c = this.options;
|
|
1893
2047
|
if (n && n !== s) {
|
|
1894
|
-
var l =
|
|
1895
|
-
r(n) === !1 ?
|
|
2048
|
+
var l = Ta;
|
|
2049
|
+
r(n) === !1 ? Ta = null : (U(n, c.swapClass, !0), Ta = n), l && l !== Ta && U(l, c.swapClass, !1);
|
|
1896
2050
|
}
|
|
1897
2051
|
a(), t(!0), o();
|
|
1898
2052
|
}
|
|
1899
2053
|
},
|
|
1900
2054
|
drop: function(e) {
|
|
1901
2055
|
var t = e.activeSortable, n = e.putSortable, r = e.dragEl, i = n || this.sortable, a = this.options;
|
|
1902
|
-
|
|
2056
|
+
Ta && U(Ta, a.swapClass, !1), Ta && (a.swap || n && n.options.swap) && r !== Ta && (i.captureAnimationState(), i !== t && t.captureAnimationState(), oi(r, Ta), i.animateAll(), i !== t && t.animateAll());
|
|
1903
2057
|
},
|
|
1904
2058
|
nulling: function() {
|
|
1905
|
-
|
|
2059
|
+
Ta = null;
|
|
1906
2060
|
}
|
|
1907
|
-
},
|
|
2061
|
+
}, sr(e, {
|
|
1908
2062
|
pluginName: "swap",
|
|
1909
2063
|
eventProperties: function() {
|
|
1910
|
-
return { swapItem:
|
|
2064
|
+
return { swapItem: Ta };
|
|
1911
2065
|
}
|
|
1912
2066
|
});
|
|
1913
2067
|
}
|
|
1914
|
-
function
|
|
2068
|
+
function oi(e, t) {
|
|
1915
2069
|
var n = e.parentNode, r = t.parentNode, i, a;
|
|
1916
|
-
!n || !r || n.isEqualNode(t) || r.isEqualNode(e) || (i =
|
|
2070
|
+
!n || !r || n.isEqualNode(t) || r.isEqualNode(e) || (i = K(e), a = K(t), n.isEqualNode(r) && i < a && a++, n.insertBefore(t, n.children[i]), r.insertBefore(e, r.children[a]));
|
|
1917
2071
|
}
|
|
1918
|
-
function
|
|
2072
|
+
function si() {
|
|
1919
2073
|
function e(e) {
|
|
1920
2074
|
for (var t in this) t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
1921
|
-
e.options.supportPointer ?
|
|
2075
|
+
e.options.supportPointer ? V(document, "pointerup", this._deselectMultiDrag) : (V(document, "mouseup", this._deselectMultiDrag), V(document, "touchend", this._deselectMultiDrag)), V(document, "keydown", this._checkKeyDown), V(document, "keyup", this._checkKeyUp), this.defaults = {
|
|
1922
2076
|
selectedClass: "sortable-selected",
|
|
1923
2077
|
multiDragKey: null,
|
|
1924
2078
|
setData: function(t, n) {
|
|
1925
2079
|
var r = "";
|
|
1926
|
-
Q.length &&
|
|
2080
|
+
Q.length && Oa === e ? Q.forEach(function(e, t) {
|
|
1927
2081
|
r += (t ? ", " : "") + e.textContent;
|
|
1928
2082
|
}) : r = n.textContent, t.setData("Text", r);
|
|
1929
2083
|
}
|
|
@@ -1941,83 +2095,83 @@ function ti() {
|
|
|
1941
2095
|
setupClone: function(e) {
|
|
1942
2096
|
var t = e.sortable, n = e.cancel;
|
|
1943
2097
|
if (this.isMultiDrag) {
|
|
1944
|
-
for (var r = 0; r < Q.length; r++)
|
|
2098
|
+
for (var r = 0; r < Q.length; r++) Ea.push(Pr(Q[r])), Ea[r].sortableIndex = Q[r].sortableIndex, Ea[r].draggable = !1, Ea[r].style["will-change"] = "", U(Ea[r], this.options.selectedClass, !1), Q[r] === $ && U(Ea[r], this.options.chosenClass, !1);
|
|
1945
2099
|
t._hideClone(), n();
|
|
1946
2100
|
}
|
|
1947
2101
|
},
|
|
1948
2102
|
clone: function(e) {
|
|
1949
2103
|
var t = e.sortable, n = e.rootEl, r = e.dispatchSortableEvent, i = e.cancel;
|
|
1950
|
-
this.isMultiDrag && (this.options.removeCloneOnHide || Q.length &&
|
|
2104
|
+
this.isMultiDrag && (this.options.removeCloneOnHide || Q.length && Oa === t && (li(!0, n), r("clone"), i()));
|
|
1951
2105
|
},
|
|
1952
2106
|
showClone: function(e) {
|
|
1953
2107
|
var t = e.cloneNowShown, n = e.rootEl, r = e.cancel;
|
|
1954
|
-
this.isMultiDrag && (
|
|
1955
|
-
|
|
1956
|
-
}), t(),
|
|
2108
|
+
this.isMultiDrag && (li(!1, n), Ea.forEach(function(e) {
|
|
2109
|
+
W(e, "display", "");
|
|
2110
|
+
}), t(), Na = !1, r());
|
|
1957
2111
|
},
|
|
1958
2112
|
hideClone: function(e) {
|
|
1959
2113
|
var t = this;
|
|
1960
2114
|
e.sortable;
|
|
1961
2115
|
var n = e.cloneNowHidden, r = e.cancel;
|
|
1962
|
-
this.isMultiDrag && (
|
|
1963
|
-
|
|
1964
|
-
}), n(),
|
|
2116
|
+
this.isMultiDrag && (Ea.forEach(function(e) {
|
|
2117
|
+
W(e, "display", "none"), t.options.removeCloneOnHide && e.parentNode && e.parentNode.removeChild(e);
|
|
2118
|
+
}), n(), Na = !0, r());
|
|
1965
2119
|
},
|
|
1966
2120
|
dragStartGlobal: function(e) {
|
|
1967
|
-
e.sortable, !this.isMultiDrag &&
|
|
1968
|
-
e.sortableIndex =
|
|
2121
|
+
e.sortable, !this.isMultiDrag && Oa && Oa.multiDrag._deselectMultiDrag(), Q.forEach(function(e) {
|
|
2122
|
+
e.sortableIndex = K(e);
|
|
1969
2123
|
}), Q = Q.sort(function(e, t) {
|
|
1970
2124
|
return e.sortableIndex - t.sortableIndex;
|
|
1971
|
-
}),
|
|
2125
|
+
}), ja = !0;
|
|
1972
2126
|
},
|
|
1973
2127
|
dragStarted: function(e) {
|
|
1974
2128
|
var t = this, n = e.sortable;
|
|
1975
2129
|
if (this.isMultiDrag) {
|
|
1976
2130
|
if (this.options.sort && (n.captureAnimationState(), this.options.animation)) {
|
|
1977
2131
|
Q.forEach(function(e) {
|
|
1978
|
-
e !== $ &&
|
|
2132
|
+
e !== $ && W(e, "position", "absolute");
|
|
1979
2133
|
});
|
|
1980
|
-
var r =
|
|
2134
|
+
var r = G($, !1, !0, !0);
|
|
1981
2135
|
Q.forEach(function(e) {
|
|
1982
|
-
e !== $ &&
|
|
1983
|
-
}),
|
|
2136
|
+
e !== $ && Fr(e, r);
|
|
2137
|
+
}), Aa = !0, ka = !0;
|
|
1984
2138
|
}
|
|
1985
2139
|
n.animateAll(function() {
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
}), t.options.sort &&
|
|
2140
|
+
Aa = !1, ka = !1, t.options.animation && Q.forEach(function(e) {
|
|
2141
|
+
Ir(e);
|
|
2142
|
+
}), t.options.sort && ui();
|
|
1989
2143
|
});
|
|
1990
2144
|
}
|
|
1991
2145
|
},
|
|
1992
2146
|
dragOver: function(e) {
|
|
1993
2147
|
var t = e.target, n = e.completed, r = e.cancel;
|
|
1994
|
-
|
|
2148
|
+
Aa && ~Q.indexOf(t) && (n(!1), r());
|
|
1995
2149
|
},
|
|
1996
2150
|
revert: function(e) {
|
|
1997
2151
|
var t = e.fromSortable, n = e.rootEl, r = e.sortable, i = e.dragRect;
|
|
1998
2152
|
Q.length > 1 && (Q.forEach(function(e) {
|
|
1999
2153
|
r.addAnimationState({
|
|
2000
2154
|
target: e,
|
|
2001
|
-
rect:
|
|
2002
|
-
}),
|
|
2003
|
-
}),
|
|
2155
|
+
rect: Aa ? G(e) : i
|
|
2156
|
+
}), Ir(e), e.fromRect = i, t.removeAnimationState(e);
|
|
2157
|
+
}), Aa = !1, ci(!this.options.removeCloneOnHide, n));
|
|
2004
2158
|
},
|
|
2005
2159
|
dragOverCompleted: function(e) {
|
|
2006
2160
|
var t = e.sortable, n = e.isOwner, r = e.insertion, i = e.activeSortable, a = e.parentEl, o = e.putSortable, s = this.options;
|
|
2007
2161
|
if (r) {
|
|
2008
|
-
if (n && i._hideClone(),
|
|
2009
|
-
var c =
|
|
2162
|
+
if (n && i._hideClone(), ka = !1, s.animation && Q.length > 1 && (Aa || !n && !i.options.sort && !o)) {
|
|
2163
|
+
var c = G($, !1, !0, !0);
|
|
2010
2164
|
Q.forEach(function(e) {
|
|
2011
|
-
e !== $ && (
|
|
2012
|
-
}),
|
|
2165
|
+
e !== $ && (Fr(e, c), a.appendChild(e));
|
|
2166
|
+
}), Aa = !0;
|
|
2013
2167
|
}
|
|
2014
|
-
if (!n) if (
|
|
2015
|
-
var l =
|
|
2016
|
-
i._showClone(t), i.options.animation && !
|
|
2168
|
+
if (!n) if (Aa || ui(), Q.length > 1) {
|
|
2169
|
+
var l = Na;
|
|
2170
|
+
i._showClone(t), i.options.animation && !Na && l && Ea.forEach(function(e) {
|
|
2017
2171
|
i.addAnimationState({
|
|
2018
2172
|
target: e,
|
|
2019
|
-
rect:
|
|
2020
|
-
}), e.fromRect =
|
|
2173
|
+
rect: Ma
|
|
2174
|
+
}), e.fromRect = Ma, e.thisAnimationDuration = null;
|
|
2021
2175
|
});
|
|
2022
2176
|
} else i._showClone(t);
|
|
2023
2177
|
}
|
|
@@ -2027,19 +2181,19 @@ function ti() {
|
|
|
2027
2181
|
if (Q.forEach(function(e) {
|
|
2028
2182
|
e.thisAnimationDuration = null;
|
|
2029
2183
|
}), r.options.animation && !n && r.multiDrag.isMultiDrag) {
|
|
2030
|
-
|
|
2031
|
-
var i =
|
|
2032
|
-
|
|
2184
|
+
Ma = sr({}, t);
|
|
2185
|
+
var i = br($, !0);
|
|
2186
|
+
Ma.top -= i.f, Ma.left -= i.e;
|
|
2033
2187
|
}
|
|
2034
2188
|
},
|
|
2035
2189
|
dragOverAnimationComplete: function() {
|
|
2036
|
-
|
|
2190
|
+
Aa && (Aa = !1, ui());
|
|
2037
2191
|
},
|
|
2038
2192
|
drop: function(e) {
|
|
2039
2193
|
var t = e.originalEvent, n = e.rootEl, r = e.parentEl, i = e.sortable, a = e.dispatchSortableEvent, o = e.oldIndex, s = e.putSortable, c = s || this.sortable;
|
|
2040
2194
|
if (t) {
|
|
2041
2195
|
var l = this.options, u = r.children;
|
|
2042
|
-
if (!
|
|
2196
|
+
if (!ja) if (l.multiDragKey && !this.multiDragKeyDown && this._deselectMultiDrag(), U($, l.selectedClass, !~Q.indexOf($)), ~Q.indexOf($)) Q.splice(Q.indexOf($), 1), Da = null, Br({
|
|
2043
2197
|
sortable: i,
|
|
2044
2198
|
rootEl: n,
|
|
2045
2199
|
name: "deselect",
|
|
@@ -2047,17 +2201,17 @@ function ti() {
|
|
|
2047
2201
|
originalEvt: t
|
|
2048
2202
|
});
|
|
2049
2203
|
else {
|
|
2050
|
-
if (Q.push($),
|
|
2204
|
+
if (Q.push($), Br({
|
|
2051
2205
|
sortable: i,
|
|
2052
2206
|
rootEl: n,
|
|
2053
2207
|
name: "select",
|
|
2054
2208
|
targetEl: $,
|
|
2055
2209
|
originalEvt: t
|
|
2056
|
-
}), t.shiftKey &&
|
|
2057
|
-
var d =
|
|
2210
|
+
}), t.shiftKey && Da && i.el.contains(Da)) {
|
|
2211
|
+
var d = K(Da), f = K($);
|
|
2058
2212
|
if (~d && ~f && d !== f) {
|
|
2059
2213
|
var p, m;
|
|
2060
|
-
for (f > d ? (m = d, p = f) : (m = f, p = d + 1); m < p; m++) ~Q.indexOf(u[m]) || (
|
|
2214
|
+
for (f > d ? (m = d, p = f) : (m = f, p = d + 1); m < p; m++) ~Q.indexOf(u[m]) || (U(u[m], l.selectedClass, !0), Q.push(u[m]), Br({
|
|
2061
2215
|
sortable: i,
|
|
2062
2216
|
rootEl: n,
|
|
2063
2217
|
name: "select",
|
|
@@ -2065,52 +2219,52 @@ function ti() {
|
|
|
2065
2219
|
originalEvt: t
|
|
2066
2220
|
}));
|
|
2067
2221
|
}
|
|
2068
|
-
} else
|
|
2069
|
-
|
|
2222
|
+
} else Da = $;
|
|
2223
|
+
Oa = c;
|
|
2070
2224
|
}
|
|
2071
|
-
if (
|
|
2072
|
-
if (
|
|
2073
|
-
var h =
|
|
2074
|
-
if (!
|
|
2225
|
+
if (ja && this.isMultiDrag) {
|
|
2226
|
+
if (Aa = !1, (r[xi].options.sort || r !== n) && Q.length > 1) {
|
|
2227
|
+
var h = G($), g = K($, ":not(." + this.options.selectedClass + ")");
|
|
2228
|
+
if (!ka && l.animation && ($.thisAnimationDuration = null), c.captureAnimationState(), !ka && (l.animation && ($.fromRect = h, Q.forEach(function(e) {
|
|
2075
2229
|
if (e.thisAnimationDuration = null, e !== $) {
|
|
2076
|
-
var t =
|
|
2230
|
+
var t = Aa ? G(e) : h;
|
|
2077
2231
|
e.fromRect = t, c.addAnimationState({
|
|
2078
2232
|
target: e,
|
|
2079
2233
|
rect: t
|
|
2080
2234
|
});
|
|
2081
2235
|
}
|
|
2082
|
-
})),
|
|
2236
|
+
})), ui(), Q.forEach(function(e) {
|
|
2083
2237
|
u[g] ? r.insertBefore(e, u[g]) : r.appendChild(e), g++;
|
|
2084
|
-
}), o ===
|
|
2238
|
+
}), o === K($))) {
|
|
2085
2239
|
var _ = !1;
|
|
2086
2240
|
Q.forEach(function(e) {
|
|
2087
|
-
if (e.sortableIndex !==
|
|
2241
|
+
if (e.sortableIndex !== K(e)) {
|
|
2088
2242
|
_ = !0;
|
|
2089
2243
|
return;
|
|
2090
2244
|
}
|
|
2091
2245
|
}), _ && a("update");
|
|
2092
2246
|
}
|
|
2093
2247
|
Q.forEach(function(e) {
|
|
2094
|
-
|
|
2248
|
+
Ir(e);
|
|
2095
2249
|
}), c.animateAll();
|
|
2096
2250
|
}
|
|
2097
|
-
|
|
2251
|
+
Oa = c;
|
|
2098
2252
|
}
|
|
2099
|
-
(n === r || s && s.lastPutMode !== "clone") &&
|
|
2253
|
+
(n === r || s && s.lastPutMode !== "clone") && Ea.forEach(function(e) {
|
|
2100
2254
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2101
2255
|
});
|
|
2102
2256
|
}
|
|
2103
2257
|
},
|
|
2104
2258
|
nullingGlobal: function() {
|
|
2105
|
-
this.isMultiDrag =
|
|
2259
|
+
this.isMultiDrag = ja = !1, Ea.length = 0;
|
|
2106
2260
|
},
|
|
2107
2261
|
destroyGlobal: function() {
|
|
2108
|
-
this._deselectMultiDrag(),
|
|
2262
|
+
this._deselectMultiDrag(), H(document, "pointerup", this._deselectMultiDrag), H(document, "mouseup", this._deselectMultiDrag), H(document, "touchend", this._deselectMultiDrag), H(document, "keydown", this._checkKeyDown), H(document, "keyup", this._checkKeyUp);
|
|
2109
2263
|
},
|
|
2110
2264
|
_deselectMultiDrag: function(e) {
|
|
2111
|
-
if (!(
|
|
2265
|
+
if (!(ja !== void 0 && ja) && Oa === this.sortable && !(e && yr(e.target, this.options.draggable, this.sortable.el, !1)) && !(e && e.button !== 0)) for (; Q.length;) {
|
|
2112
2266
|
var t = Q[0];
|
|
2113
|
-
|
|
2267
|
+
U(t, this.options.selectedClass, !1), Q.shift(), Br({
|
|
2114
2268
|
sortable: this.sortable,
|
|
2115
2269
|
rootEl: this.sortable.el,
|
|
2116
2270
|
name: "deselect",
|
|
@@ -2125,16 +2279,16 @@ function ti() {
|
|
|
2125
2279
|
_checkKeyUp: function(e) {
|
|
2126
2280
|
e.key === this.options.multiDragKey && (this.multiDragKeyDown = !1);
|
|
2127
2281
|
}
|
|
2128
|
-
},
|
|
2282
|
+
}, sr(e, {
|
|
2129
2283
|
pluginName: "multiDrag",
|
|
2130
2284
|
utils: {
|
|
2131
2285
|
select: function(e) {
|
|
2132
|
-
var t = e.parentNode[
|
|
2133
|
-
!t || !t.options.multiDrag || ~Q.indexOf(e) || (
|
|
2286
|
+
var t = e.parentNode[xi];
|
|
2287
|
+
!t || !t.options.multiDrag || ~Q.indexOf(e) || (Oa && Oa !== t && (Oa.multiDrag._deselectMultiDrag(), Oa = t), U(e, t.options.selectedClass, !0), Q.push(e));
|
|
2134
2288
|
},
|
|
2135
2289
|
deselect: function(e) {
|
|
2136
|
-
var t = e.parentNode[
|
|
2137
|
-
!t || !t.options.multiDrag || !~n || (
|
|
2290
|
+
var t = e.parentNode[xi], n = Q.indexOf(e);
|
|
2291
|
+
!t || !t.options.multiDrag || !~n || (U(e, t.options.selectedClass, !1), Q.splice(n, 1));
|
|
2138
2292
|
}
|
|
2139
2293
|
},
|
|
2140
2294
|
eventProperties: function() {
|
|
@@ -2144,14 +2298,14 @@ function ti() {
|
|
|
2144
2298
|
multiDragElement: r,
|
|
2145
2299
|
index: r.sortableIndex
|
|
2146
2300
|
});
|
|
2147
|
-
var i =
|
|
2301
|
+
var i = Aa && r !== $ ? -1 : Aa ? K(r, ":not(." + e.options.selectedClass + ")") : K(r);
|
|
2148
2302
|
n.push({
|
|
2149
2303
|
multiDragElement: r,
|
|
2150
2304
|
index: i
|
|
2151
2305
|
});
|
|
2152
2306
|
}), {
|
|
2153
|
-
items:
|
|
2154
|
-
clones: [].concat(
|
|
2307
|
+
items: ur(Q),
|
|
2308
|
+
clones: [].concat(Ea),
|
|
2155
2309
|
oldIndicies: t,
|
|
2156
2310
|
newIndicies: n
|
|
2157
2311
|
};
|
|
@@ -2161,33 +2315,33 @@ function ti() {
|
|
|
2161
2315
|
} }
|
|
2162
2316
|
});
|
|
2163
2317
|
}
|
|
2164
|
-
function
|
|
2318
|
+
function ci(e, t) {
|
|
2165
2319
|
Q.forEach(function(n, r) {
|
|
2166
2320
|
var i = t.children[n.sortableIndex + (e ? Number(r) : 0)];
|
|
2167
2321
|
i ? t.insertBefore(n, i) : t.appendChild(n);
|
|
2168
2322
|
});
|
|
2169
2323
|
}
|
|
2170
|
-
function
|
|
2171
|
-
|
|
2324
|
+
function li(e, t) {
|
|
2325
|
+
Ea.forEach(function(n, r) {
|
|
2172
2326
|
var i = t.children[n.sortableIndex + (e ? Number(r) : 0)];
|
|
2173
2327
|
i ? t.insertBefore(n, i) : t.appendChild(n);
|
|
2174
2328
|
});
|
|
2175
2329
|
}
|
|
2176
|
-
function
|
|
2330
|
+
function ui() {
|
|
2177
2331
|
Q.forEach(function(e) {
|
|
2178
2332
|
e !== $ && e.parentNode && e.parentNode.removeChild(e);
|
|
2179
2333
|
});
|
|
2180
2334
|
}
|
|
2181
|
-
var
|
|
2182
|
-
|
|
2335
|
+
var di, fi, pi, mi, hi, gi, _i, vi, yi, bi, xi, Si, Ci, wi, Ti, Ei, J, Y, X, Z, Di, Oi, ki, Ai, ji, Mi, Ni, Pi, Fi, Ii, Li, Ri, zi, Bi, Vi, Hi, Ui, Wi, Gi, Ki, qi, Ji, Yi, Xi, Zi, Qi, $i, ea, ta, na, ra, ia, aa, oa, sa, ca, la, ua, da, fa, pa, ma, ha, ga, _a, va, ya, ba, xa, Sa, Ca, wa, Ta, Q, Ea, Da, Oa, ka, Aa, ja, $, Ma, Na, Pa = at((() => {
|
|
2336
|
+
di = "1.14.0", fi = gr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), pi = gr(/Edge/i), mi = gr(/firefox/i), hi = gr(/safari/i) && !gr(/chrome/i) && !gr(/android/i), gi = gr(/iP(ad|od|hone)/i), _i = gr(/chrome/i) && gr(/android/i), vi = {
|
|
2183
2337
|
capture: !1,
|
|
2184
2338
|
passive: !1
|
|
2185
|
-
},
|
|
2339
|
+
}, yi = /\s+/g, xi = "Sortable" + (/* @__PURE__ */ new Date()).getTime(), Si = [], Ci = { initializeByDefault: !0 }, wi = {
|
|
2186
2340
|
mount: function(e) {
|
|
2187
|
-
for (var t in
|
|
2188
|
-
|
|
2341
|
+
for (var t in Ci) Ci.hasOwnProperty(t) && !(t in e) && (e[t] = Ci[t]);
|
|
2342
|
+
Si.forEach(function(t) {
|
|
2189
2343
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2190
|
-
}),
|
|
2344
|
+
}), Si.push(e);
|
|
2191
2345
|
},
|
|
2192
2346
|
pluginEvent: function(e, t, n) {
|
|
2193
2347
|
var r = this;
|
|
@@ -2195,16 +2349,16 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2195
2349
|
r.eventCanceled = !0;
|
|
2196
2350
|
};
|
|
2197
2351
|
var i = e + "Global";
|
|
2198
|
-
|
|
2199
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2352
|
+
Si.forEach(function(r) {
|
|
2353
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ir({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ir({ sortable: t }, n)));
|
|
2200
2354
|
});
|
|
2201
2355
|
},
|
|
2202
2356
|
initializePlugins: function(e, t, n, r) {
|
|
2203
|
-
for (var i in
|
|
2357
|
+
for (var i in Si.forEach(function(r) {
|
|
2204
2358
|
var i = r.pluginName;
|
|
2205
2359
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2206
2360
|
var a = new r(e, t, e.options);
|
|
2207
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2361
|
+
a.sortable = e, a.options = e.options, e[i] = a, sr(n, a.defaults);
|
|
2208
2362
|
}
|
|
2209
2363
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2210
2364
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2213,79 +2367,79 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2213
2367
|
},
|
|
2214
2368
|
getEventProperties: function(e, t) {
|
|
2215
2369
|
var n = {};
|
|
2216
|
-
return
|
|
2217
|
-
typeof r.eventProperties == "function" &&
|
|
2370
|
+
return Si.forEach(function(r) {
|
|
2371
|
+
typeof r.eventProperties == "function" && sr(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2218
2372
|
}), n;
|
|
2219
2373
|
},
|
|
2220
2374
|
modifyOption: function(e, t, n) {
|
|
2221
2375
|
var r;
|
|
2222
|
-
return
|
|
2376
|
+
return Si.forEach(function(i) {
|
|
2223
2377
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2224
2378
|
}), r;
|
|
2225
2379
|
}
|
|
2226
|
-
},
|
|
2227
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2228
|
-
|
|
2229
|
-
dragEl:
|
|
2230
|
-
parentEl:
|
|
2231
|
-
ghostEl:
|
|
2232
|
-
rootEl:
|
|
2233
|
-
nextEl:
|
|
2234
|
-
lastDownEl:
|
|
2235
|
-
cloneEl:
|
|
2236
|
-
cloneHidden:
|
|
2237
|
-
dragStarted:
|
|
2238
|
-
putSortable:
|
|
2239
|
-
activeSortable:
|
|
2380
|
+
}, Ti = ["evt"], Ei = function(e, t) {
|
|
2381
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = lr(n, Ti);
|
|
2382
|
+
wi.pluginEvent.bind(q)(e, t, ir({
|
|
2383
|
+
dragEl: J,
|
|
2384
|
+
parentEl: Y,
|
|
2385
|
+
ghostEl: X,
|
|
2386
|
+
rootEl: Z,
|
|
2387
|
+
nextEl: Di,
|
|
2388
|
+
lastDownEl: Oi,
|
|
2389
|
+
cloneEl: ki,
|
|
2390
|
+
cloneHidden: Ai,
|
|
2391
|
+
dragStarted: Ki,
|
|
2392
|
+
putSortable: Ii,
|
|
2393
|
+
activeSortable: q.active,
|
|
2240
2394
|
originalEvent: r,
|
|
2241
|
-
oldIndex:
|
|
2242
|
-
oldDraggableIndex:
|
|
2243
|
-
newIndex:
|
|
2244
|
-
newDraggableIndex:
|
|
2245
|
-
hideGhostForTarget:
|
|
2246
|
-
unhideGhostForTarget:
|
|
2395
|
+
oldIndex: ji,
|
|
2396
|
+
oldDraggableIndex: Ni,
|
|
2397
|
+
newIndex: Mi,
|
|
2398
|
+
newDraggableIndex: Pi,
|
|
2399
|
+
hideGhostForTarget: da,
|
|
2400
|
+
unhideGhostForTarget: fa,
|
|
2247
2401
|
cloneNowHidden: function() {
|
|
2248
|
-
|
|
2402
|
+
Ai = !0;
|
|
2249
2403
|
},
|
|
2250
2404
|
cloneNowShown: function() {
|
|
2251
|
-
|
|
2405
|
+
Ai = !1;
|
|
2252
2406
|
},
|
|
2253
2407
|
dispatchSortableEvent: function(e) {
|
|
2254
|
-
|
|
2408
|
+
Vr({
|
|
2255
2409
|
sortable: t,
|
|
2256
2410
|
name: e,
|
|
2257
2411
|
originalEvent: r
|
|
2258
2412
|
});
|
|
2259
2413
|
}
|
|
2260
2414
|
}, i));
|
|
2261
|
-
},
|
|
2262
|
-
if (
|
|
2263
|
-
if (
|
|
2415
|
+
}, Li = !1, Ri = !1, zi = [], Yi = !1, Xi = !1, $i = [], ea = !1, ta = [], na = typeof document < "u", ra = gi, ia = pi || fi ? "cssFloat" : "float", aa = na && !_i && !gi && "draggable" in document.createElement("div"), oa = function() {
|
|
2416
|
+
if (na) {
|
|
2417
|
+
if (fi) return !1;
|
|
2264
2418
|
var e = document.createElement("x");
|
|
2265
2419
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2266
2420
|
}
|
|
2267
|
-
}(),
|
|
2268
|
-
var n =
|
|
2421
|
+
}(), sa = function(e, t) {
|
|
2422
|
+
var n = W(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = wr(e, 0, t), a = wr(e, 1, t), o = i && W(i), s = a && W(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + G(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + G(a).width;
|
|
2269
2423
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2270
2424
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2271
2425
|
if (i && o.float && o.float !== "none") {
|
|
2272
2426
|
var u = o.float === "left" ? "left" : "right";
|
|
2273
2427
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2274
2428
|
}
|
|
2275
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2276
|
-
},
|
|
2429
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ia] === "none" || a && n[ia] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2430
|
+
}, ca = function(e, t, n) {
|
|
2277
2431
|
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;
|
|
2278
2432
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2279
|
-
},
|
|
2433
|
+
}, la = function(e, t) {
|
|
2280
2434
|
var n;
|
|
2281
|
-
return
|
|
2282
|
-
var i = r[
|
|
2283
|
-
if (!(!i ||
|
|
2284
|
-
var a =
|
|
2435
|
+
return zi.some(function(r) {
|
|
2436
|
+
var i = r[xi].options.emptyInsertThreshold;
|
|
2437
|
+
if (!(!i || Tr(r))) {
|
|
2438
|
+
var a = G(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2285
2439
|
if (o && s) return n = r;
|
|
2286
2440
|
}
|
|
2287
2441
|
}), n;
|
|
2288
|
-
},
|
|
2442
|
+
}, ua = function(e) {
|
|
2289
2443
|
function t(e, n) {
|
|
2290
2444
|
return function(r, i, a, o) {
|
|
2291
2445
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2298,92 +2452,92 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2298
2452
|
};
|
|
2299
2453
|
}
|
|
2300
2454
|
var n = {}, r = e.group;
|
|
2301
|
-
(!r ||
|
|
2302
|
-
},
|
|
2303
|
-
|
|
2304
|
-
},
|
|
2305
|
-
|
|
2306
|
-
},
|
|
2307
|
-
if (
|
|
2308
|
-
}, !0),
|
|
2309
|
-
if (
|
|
2455
|
+
(!r || ar(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;
|
|
2456
|
+
}, da = function() {
|
|
2457
|
+
!oa && X && W(X, "display", "none");
|
|
2458
|
+
}, fa = function() {
|
|
2459
|
+
!oa && X && W(X, "display", "");
|
|
2460
|
+
}, na && document.addEventListener("click", function(e) {
|
|
2461
|
+
if (Ri) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ri = !1, !1;
|
|
2462
|
+
}, !0), pa = function(e) {
|
|
2463
|
+
if (J) {
|
|
2310
2464
|
e = e.touches ? e.touches[0] : e;
|
|
2311
|
-
var t =
|
|
2465
|
+
var t = la(e.clientX, e.clientY);
|
|
2312
2466
|
if (t) {
|
|
2313
2467
|
var n = {};
|
|
2314
2468
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2315
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
2469
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[xi]._onDragOver(n);
|
|
2316
2470
|
}
|
|
2317
2471
|
}
|
|
2318
|
-
},
|
|
2319
|
-
|
|
2320
|
-
},
|
|
2321
|
-
constructor:
|
|
2472
|
+
}, ma = function(e) {
|
|
2473
|
+
J && J.parentNode[xi]._isOutsideThisEl(e.target);
|
|
2474
|
+
}, q.prototype = {
|
|
2475
|
+
constructor: q,
|
|
2322
2476
|
_isOutsideThisEl: function(e) {
|
|
2323
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2477
|
+
!this.el.contains(e) && e !== this.el && (qi = null);
|
|
2324
2478
|
},
|
|
2325
2479
|
_getDirection: function(e, t) {
|
|
2326
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
2480
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, J) : this.options.direction;
|
|
2327
2481
|
},
|
|
2328
2482
|
_onTapStart: function(e) {
|
|
2329
2483
|
if (e.cancelable) {
|
|
2330
2484
|
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;
|
|
2331
|
-
if (
|
|
2332
|
-
if (
|
|
2485
|
+
if (Zr(n), !J && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && hi && s && s.tagName.toUpperCase() === "SELECT") && (s = yr(s, r.draggable, n, !1), !(s && s.animated) && Oi !== s)) {
|
|
2486
|
+
if (ji = K(s), Ni = K(s, r.draggable), typeof l == "function") {
|
|
2333
2487
|
if (l.call(this, e, s, this)) {
|
|
2334
|
-
|
|
2488
|
+
Vr({
|
|
2335
2489
|
sortable: t,
|
|
2336
2490
|
rootEl: c,
|
|
2337
2491
|
name: "filter",
|
|
2338
2492
|
targetEl: s,
|
|
2339
2493
|
toEl: n,
|
|
2340
2494
|
fromEl: n
|
|
2341
|
-
}),
|
|
2495
|
+
}), Ei("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
2342
2496
|
return;
|
|
2343
2497
|
}
|
|
2344
2498
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2345
|
-
if (r =
|
|
2499
|
+
if (r = yr(c, r.trim(), n, !1), r) return Vr({
|
|
2346
2500
|
sortable: t,
|
|
2347
2501
|
rootEl: r,
|
|
2348
2502
|
name: "filter",
|
|
2349
2503
|
targetEl: s,
|
|
2350
2504
|
fromEl: n,
|
|
2351
2505
|
toEl: n
|
|
2352
|
-
}),
|
|
2506
|
+
}), Ei("filter", t, { evt: e }), !0;
|
|
2353
2507
|
}), l)) {
|
|
2354
2508
|
i && e.cancelable && e.preventDefault();
|
|
2355
2509
|
return;
|
|
2356
2510
|
}
|
|
2357
|
-
r.handle && !
|
|
2511
|
+
r.handle && !yr(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2358
2512
|
}
|
|
2359
2513
|
}
|
|
2360
2514
|
},
|
|
2361
2515
|
_prepareDragStart: function(e, t, n) {
|
|
2362
2516
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2363
|
-
if (n && !
|
|
2364
|
-
var c =
|
|
2365
|
-
if (
|
|
2366
|
-
target:
|
|
2517
|
+
if (n && !J && n.parentNode === i) {
|
|
2518
|
+
var c = G(n);
|
|
2519
|
+
if (Z = i, J = n, Y = J.parentNode, Di = J.nextSibling, Oi = n, Fi = a.group, q.dragged = J, Bi = {
|
|
2520
|
+
target: J,
|
|
2367
2521
|
clientX: (t || e).clientX,
|
|
2368
2522
|
clientY: (t || e).clientY
|
|
2369
|
-
},
|
|
2370
|
-
if (
|
|
2523
|
+
}, Wi = Bi.clientX - c.left, Gi = Bi.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, J.style["will-change"] = "all", s = function() {
|
|
2524
|
+
if (Ei("delayEnded", r, { evt: e }), q.eventCanceled) {
|
|
2371
2525
|
r._onDrop();
|
|
2372
2526
|
return;
|
|
2373
2527
|
}
|
|
2374
|
-
r._disableDelayedDragEvents(), !
|
|
2528
|
+
r._disableDelayedDragEvents(), !mi && r.nativeDraggable && (J.draggable = !0), r._triggerDragStart(e, t), Vr({
|
|
2375
2529
|
sortable: r,
|
|
2376
2530
|
name: "choose",
|
|
2377
2531
|
originalEvent: e
|
|
2378
|
-
}),
|
|
2532
|
+
}), U(J, a.chosenClass, !0);
|
|
2379
2533
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2380
|
-
|
|
2381
|
-
}),
|
|
2382
|
-
if (
|
|
2534
|
+
xr(J, e.trim(), Wr);
|
|
2535
|
+
}), V(o, "dragover", pa), V(o, "mousemove", pa), V(o, "touchmove", pa), V(o, "mouseup", r._onDrop), V(o, "touchend", r._onDrop), V(o, "touchcancel", r._onDrop), mi && this.nativeDraggable && (this.options.touchStartThreshold = 4, J.draggable = !0), Ei("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(pi || fi))) {
|
|
2536
|
+
if (q.eventCanceled) {
|
|
2383
2537
|
this._onDrop();
|
|
2384
2538
|
return;
|
|
2385
2539
|
}
|
|
2386
|
-
|
|
2540
|
+
V(o, "mouseup", r._disableDelayedDrag), V(o, "touchend", r._disableDelayedDrag), V(o, "touchcancel", r._disableDelayedDrag), V(o, "mousemove", r._delayedDragTouchMoveHandler), V(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && V(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
2387
2541
|
} else s();
|
|
2388
2542
|
}
|
|
2389
2543
|
},
|
|
@@ -2392,25 +2546,25 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2392
2546
|
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();
|
|
2393
2547
|
},
|
|
2394
2548
|
_disableDelayedDrag: function() {
|
|
2395
|
-
|
|
2549
|
+
J && Wr(J), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2396
2550
|
},
|
|
2397
2551
|
_disableDelayedDragEvents: function() {
|
|
2398
2552
|
var e = this.el.ownerDocument;
|
|
2399
|
-
|
|
2553
|
+
H(e, "mouseup", this._disableDelayedDrag), H(e, "touchend", this._disableDelayedDrag), H(e, "touchcancel", this._disableDelayedDrag), H(e, "mousemove", this._delayedDragTouchMoveHandler), H(e, "touchmove", this._delayedDragTouchMoveHandler), H(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2400
2554
|
},
|
|
2401
2555
|
_triggerDragStart: function(e, t) {
|
|
2402
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
2556
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? V(document, "pointermove", this._onTouchMove) : t ? V(document, "touchmove", this._onTouchMove) : V(document, "mousemove", this._onTouchMove) : (V(J, "dragend", this), V(Z, "dragstart", this._onDragStart));
|
|
2403
2557
|
try {
|
|
2404
|
-
document.selection ?
|
|
2558
|
+
document.selection ? Qr(function() {
|
|
2405
2559
|
document.selection.empty();
|
|
2406
2560
|
}) : window.getSelection().removeAllRanges();
|
|
2407
2561
|
} catch {}
|
|
2408
2562
|
},
|
|
2409
2563
|
_dragStarted: function(e, t) {
|
|
2410
|
-
if (
|
|
2411
|
-
|
|
2564
|
+
if (Li = !1, Z && J) {
|
|
2565
|
+
Ei("dragStarted", this, { evt: t }), this.nativeDraggable && V(document, "dragover", ma);
|
|
2412
2566
|
var n = this.options;
|
|
2413
|
-
!e &&
|
|
2567
|
+
!e && U(J, n.dragClass, !1), U(J, n.ghostClass, !0), q.active = this, e && this._appendGhost(), Vr({
|
|
2414
2568
|
sortable: this,
|
|
2415
2569
|
name: "start",
|
|
2416
2570
|
originalEvent: t
|
|
@@ -2418,33 +2572,33 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2418
2572
|
} else this._nulling();
|
|
2419
2573
|
},
|
|
2420
2574
|
_emulateDragOver: function() {
|
|
2421
|
-
if (
|
|
2422
|
-
this._lastX =
|
|
2423
|
-
for (var e = document.elementFromPoint(
|
|
2424
|
-
if (
|
|
2425
|
-
if (t[
|
|
2575
|
+
if (Vi) {
|
|
2576
|
+
this._lastX = Vi.clientX, this._lastY = Vi.clientY, da();
|
|
2577
|
+
for (var e = document.elementFromPoint(Vi.clientX, Vi.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Vi.clientX, Vi.clientY), e !== t);) t = e;
|
|
2578
|
+
if (J.parentNode[xi]._isOutsideThisEl(e), t) do {
|
|
2579
|
+
if (t[xi]) {
|
|
2426
2580
|
var n = void 0;
|
|
2427
|
-
if (n = t[
|
|
2428
|
-
clientX:
|
|
2429
|
-
clientY:
|
|
2581
|
+
if (n = t[xi]._onDragOver({
|
|
2582
|
+
clientX: Vi.clientX,
|
|
2583
|
+
clientY: Vi.clientY,
|
|
2430
2584
|
target: e,
|
|
2431
2585
|
rootEl: t
|
|
2432
2586
|
}), n && !this.options.dragoverBubble) break;
|
|
2433
2587
|
}
|
|
2434
2588
|
e = t;
|
|
2435
2589
|
} while (t = t.parentNode);
|
|
2436
|
-
|
|
2590
|
+
fa();
|
|
2437
2591
|
}
|
|
2438
2592
|
},
|
|
2439
2593
|
_onTouchMove: function(e) {
|
|
2440
|
-
if (
|
|
2441
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
2442
|
-
if (!
|
|
2594
|
+
if (Bi) {
|
|
2595
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = X && br(X, !0), o = X && a && a.a, s = X && a && a.d, c = ra && Qi && Er(Qi), l = (i.clientX - Bi.clientX + r.x) / (o || 1) + (c ? c[0] - $i[0] : 0) / (o || 1), u = (i.clientY - Bi.clientY + r.y) / (s || 1) + (c ? c[1] - $i[1] : 0) / (s || 1);
|
|
2596
|
+
if (!q.active && !Li) {
|
|
2443
2597
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2444
2598
|
this._onDragStart(e, !0);
|
|
2445
2599
|
}
|
|
2446
|
-
if (
|
|
2447
|
-
a ? (a.e += l - (
|
|
2600
|
+
if (X) {
|
|
2601
|
+
a ? (a.e += l - (Hi || 0), a.f += u - (Ui || 0)) : a = {
|
|
2448
2602
|
a: 1,
|
|
2449
2603
|
b: 0,
|
|
2450
2604
|
c: 0,
|
|
@@ -2453,39 +2607,39 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2453
2607
|
f: u
|
|
2454
2608
|
};
|
|
2455
2609
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2456
|
-
|
|
2610
|
+
W(X, "webkitTransform", d), W(X, "mozTransform", d), W(X, "msTransform", d), W(X, "transform", d), Hi = l, Ui = u, Vi = i;
|
|
2457
2611
|
}
|
|
2458
2612
|
e.cancelable && e.preventDefault();
|
|
2459
2613
|
}
|
|
2460
2614
|
},
|
|
2461
2615
|
_appendGhost: function() {
|
|
2462
|
-
if (!
|
|
2463
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
2464
|
-
if (
|
|
2465
|
-
for (
|
|
2466
|
-
|
|
2616
|
+
if (!X) {
|
|
2617
|
+
var e = this.options.fallbackOnBody ? document.body : Z, t = G(J, !0, ra, !0, e), n = this.options;
|
|
2618
|
+
if (ra) {
|
|
2619
|
+
for (Qi = e; W(Qi, "position") === "static" && W(Qi, "transform") === "none" && Qi !== document;) Qi = Qi.parentNode;
|
|
2620
|
+
Qi !== document.body && Qi !== document.documentElement ? (Qi === document && (Qi = Sr()), t.top += Qi.scrollTop, t.left += Qi.scrollLeft) : Qi = Sr(), $i = Er(Qi);
|
|
2467
2621
|
}
|
|
2468
|
-
|
|
2622
|
+
X = J.cloneNode(!0), U(X, n.ghostClass, !1), U(X, n.fallbackClass, !0), U(X, n.dragClass, !0), W(X, "transition", ""), W(X, "transform", ""), W(X, "box-sizing", "border-box"), W(X, "margin", 0), W(X, "top", t.top), W(X, "left", t.left), W(X, "width", t.width), W(X, "height", t.height), W(X, "opacity", "0.8"), W(X, "position", ra ? "absolute" : "fixed"), W(X, "zIndex", "100000"), W(X, "pointerEvents", "none"), q.ghost = X, e.appendChild(X), W(X, "transform-origin", Wi / parseInt(X.style.width) * 100 + "% " + Gi / parseInt(X.style.height) * 100 + "%");
|
|
2469
2623
|
}
|
|
2470
2624
|
},
|
|
2471
2625
|
_onDragStart: function(e, t) {
|
|
2472
2626
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
2473
|
-
if (
|
|
2627
|
+
if (Ei("dragStart", this, { evt: e }), q.eventCanceled) {
|
|
2474
2628
|
this._onDrop();
|
|
2475
2629
|
return;
|
|
2476
2630
|
}
|
|
2477
|
-
|
|
2478
|
-
|
|
2631
|
+
Ei("setupClone", this), q.eventCanceled || (ki = Pr(J), ki.draggable = !1, ki.style["will-change"] = "", this._hideClone(), U(ki, this.options.chosenClass, !1), q.clone = ki), n.cloneId = Qr(function() {
|
|
2632
|
+
Ei("clone", n), !q.eventCanceled && (n.options.removeCloneOnHide || Z.insertBefore(ki, J), n._hideClone(), Vr({
|
|
2479
2633
|
sortable: n,
|
|
2480
2634
|
name: "clone"
|
|
2481
2635
|
}));
|
|
2482
|
-
}), !t &&
|
|
2636
|
+
}), !t && U(J, i.dragClass, !0), t ? (Ri = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (H(document, "mouseup", n._onDrop), H(document, "touchend", n._onDrop), H(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, J)), V(document, "drop", n), W(J, "transform", "translateZ(0)")), Li = !0, n._dragStartId = Qr(n._dragStarted.bind(n, t, e)), V(document, "selectstart", n), Ki = !0, hi && W(document.body, "user-select", "none");
|
|
2483
2637
|
},
|
|
2484
2638
|
_onDragOver: function(e) {
|
|
2485
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c =
|
|
2486
|
-
if (
|
|
2639
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = q.active, l = Fi === s, u = o.sort, d = Ii || c, f, p = this, m = !1;
|
|
2640
|
+
if (ea) return;
|
|
2487
2641
|
function h(o, s) {
|
|
2488
|
-
|
|
2642
|
+
Ei(o, p, ir({
|
|
2489
2643
|
evt: e,
|
|
2490
2644
|
isOwner: l,
|
|
2491
2645
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2497,7 +2651,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2497
2651
|
target: n,
|
|
2498
2652
|
completed: _,
|
|
2499
2653
|
onMove: function(n, i) {
|
|
2500
|
-
return
|
|
2654
|
+
return Ur(Z, t, J, r, n, G(n), e, i);
|
|
2501
2655
|
},
|
|
2502
2656
|
changed: v
|
|
2503
2657
|
}, s));
|
|
@@ -2506,119 +2660,119 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2506
2660
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2507
2661
|
}
|
|
2508
2662
|
function _(r) {
|
|
2509
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2663
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (U(J, Ii ? Ii.options.ghostClass : c.options.ghostClass, !1), U(J, o.ghostClass, !0)), Ii !== p && p !== q.active ? Ii = p : p === q.active && Ii && (Ii = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
2510
2664
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2511
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
2665
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === J && !J.animated || n === t && !n.animated) && (qi = null), !o.dragoverBubble && !e.rootEl && n !== document && (J.parentNode[xi]._isOutsideThisEl(e.target), !r && pa(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2512
2666
|
}
|
|
2513
2667
|
function v() {
|
|
2514
|
-
|
|
2668
|
+
Mi = K(J), Pi = K(J, o.draggable), Vr({
|
|
2515
2669
|
sortable: p,
|
|
2516
2670
|
name: "change",
|
|
2517
2671
|
toEl: t,
|
|
2518
|
-
newIndex:
|
|
2519
|
-
newDraggableIndex:
|
|
2672
|
+
newIndex: Mi,
|
|
2673
|
+
newDraggableIndex: Pi,
|
|
2520
2674
|
originalEvent: e
|
|
2521
2675
|
});
|
|
2522
2676
|
}
|
|
2523
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2524
|
-
if (
|
|
2525
|
-
if (
|
|
2526
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
2527
|
-
if (a) return
|
|
2528
|
-
var y =
|
|
2529
|
-
if (!y ||
|
|
2530
|
-
if (y ===
|
|
2531
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2532
|
-
} else if (y &&
|
|
2533
|
-
var b =
|
|
2534
|
-
if (b ===
|
|
2535
|
-
if (n = b, i =
|
|
2677
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = yr(n, o.draggable, t, !0), h("dragOver"), q.eventCanceled) return m;
|
|
2678
|
+
if (J.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2679
|
+
if (Ri = !1, c && !o.disabled && (l ? u || (a = Y !== Z) : Ii === this || (this.lastPutMode = Fi.checkPull(this, c, J, e)) && s.checkPut(this, c, J, e))) {
|
|
2680
|
+
if (f = this._getDirection(e, n) === "vertical", r = G(J), h("dragOverValid"), q.eventCanceled) return m;
|
|
2681
|
+
if (a) return Y = Z, g(), this._hideClone(), h("revert"), q.eventCanceled || (Di ? Z.insertBefore(J, Di) : Z.appendChild(J)), _(!0);
|
|
2682
|
+
var y = Tr(t, o.draggable);
|
|
2683
|
+
if (!y || qr(e, f, this) && !y.animated) {
|
|
2684
|
+
if (y === J) return _(!1);
|
|
2685
|
+
if (y && t === e.target && (n = y), n && (i = G(n)), Ur(Z, t, J, r, n, i, e, !!n) !== !1) return g(), t.appendChild(J), Y = t, v(), _(!0);
|
|
2686
|
+
} else if (y && Kr(e, f, this)) {
|
|
2687
|
+
var b = wr(t, 0, o, !0);
|
|
2688
|
+
if (b === J) return _(!1);
|
|
2689
|
+
if (n = b, i = G(n), Ur(Z, t, J, r, n, i, e, !1) !== !1) return g(), t.insertBefore(J, b), Y = t, v(), _(!0);
|
|
2536
2690
|
} else if (n.parentNode === t) {
|
|
2537
|
-
i =
|
|
2538
|
-
var x = 0, S, C =
|
|
2539
|
-
|
|
2540
|
-
var
|
|
2691
|
+
i = G(n);
|
|
2692
|
+
var x = 0, S, C = J.parentNode !== t, ee = !ca(J.animated && J.toRect || r, n.animated && n.toRect || i, f), w = f ? "top" : "left", T = Cr(n, "top", "top") || Cr(J, "top", "top"), E = T ? T.scrollTop : void 0;
|
|
2693
|
+
qi !== n && (S = i[w], Yi = !1, Xi = !ee && o.invertSwap || C), x = Jr(e, n, i, f, ee ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Xi, qi === n);
|
|
2694
|
+
var D;
|
|
2541
2695
|
if (x !== 0) {
|
|
2542
|
-
var
|
|
2696
|
+
var te = K(J);
|
|
2543
2697
|
do
|
|
2544
|
-
|
|
2545
|
-
while (
|
|
2698
|
+
te -= x, D = Y.children[te];
|
|
2699
|
+
while (D && (W(D, "display") === "none" || D === X));
|
|
2546
2700
|
}
|
|
2547
|
-
if (x === 0 ||
|
|
2548
|
-
|
|
2549
|
-
var
|
|
2550
|
-
|
|
2551
|
-
var
|
|
2552
|
-
if (
|
|
2701
|
+
if (x === 0 || D === n) return _(!1);
|
|
2702
|
+
qi = n, Ji = x;
|
|
2703
|
+
var ne = n.nextElementSibling, O = !1;
|
|
2704
|
+
O = x === 1;
|
|
2705
|
+
var re = Ur(Z, t, J, r, n, i, e, O);
|
|
2706
|
+
if (re !== !1) return (re === 1 || re === -1) && (O = re === 1), ea = !0, setTimeout(Gr, 30), g(), O && !ne ? t.appendChild(J) : n.parentNode.insertBefore(J, O ? ne : n), T && Nr(T, 0, E - T.scrollTop), Y = J.parentNode, S !== void 0 && !Xi && (Zi = Math.abs(S - G(n)[w])), v(), _(!0);
|
|
2553
2707
|
}
|
|
2554
|
-
if (t.contains(
|
|
2708
|
+
if (t.contains(J)) return _(!1);
|
|
2555
2709
|
}
|
|
2556
2710
|
return !1;
|
|
2557
2711
|
},
|
|
2558
2712
|
_ignoreWhileAnimating: null,
|
|
2559
2713
|
_offMoveEvents: function() {
|
|
2560
|
-
|
|
2714
|
+
H(document, "mousemove", this._onTouchMove), H(document, "touchmove", this._onTouchMove), H(document, "pointermove", this._onTouchMove), H(document, "dragover", pa), H(document, "mousemove", pa), H(document, "touchmove", pa);
|
|
2561
2715
|
},
|
|
2562
2716
|
_offUpEvents: function() {
|
|
2563
2717
|
var e = this.el.ownerDocument;
|
|
2564
|
-
|
|
2718
|
+
H(e, "mouseup", this._onDrop), H(e, "touchend", this._onDrop), H(e, "pointerup", this._onDrop), H(e, "touchcancel", this._onDrop), H(document, "selectstart", this);
|
|
2565
2719
|
},
|
|
2566
2720
|
_onDrop: function(e) {
|
|
2567
2721
|
var t = this.el, n = this.options;
|
|
2568
|
-
if (
|
|
2722
|
+
if (Mi = K(J), Pi = K(J, n.draggable), Ei("drop", this, { evt: e }), Y = J && J.parentNode, Mi = K(J), Pi = K(J, n.draggable), q.eventCanceled) {
|
|
2569
2723
|
this._nulling();
|
|
2570
2724
|
return;
|
|
2571
2725
|
}
|
|
2572
|
-
|
|
2726
|
+
Li = !1, Xi = !1, Yi = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), $r(this.cloneId), $r(this._dragStartId), this.nativeDraggable && (H(document, "drop", this), H(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), hi && W(document.body, "user-select", ""), W(J, "transform", ""), e && (Ki && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), X && X.parentNode && X.parentNode.removeChild(X), (Z === Y || Ii && Ii.lastPutMode !== "clone") && ki && ki.parentNode && ki.parentNode.removeChild(ki), J && (this.nativeDraggable && H(J, "dragend", this), Wr(J), J.style["will-change"] = "", Ki && !Li && U(J, Ii ? Ii.options.ghostClass : this.options.ghostClass, !1), U(J, this.options.chosenClass, !1), Vr({
|
|
2573
2727
|
sortable: this,
|
|
2574
2728
|
name: "unchoose",
|
|
2575
|
-
toEl:
|
|
2729
|
+
toEl: Y,
|
|
2576
2730
|
newIndex: null,
|
|
2577
2731
|
newDraggableIndex: null,
|
|
2578
2732
|
originalEvent: e
|
|
2579
|
-
}),
|
|
2733
|
+
}), Z === Y ? Mi !== ji && Mi >= 0 && (Vr({
|
|
2580
2734
|
sortable: this,
|
|
2581
2735
|
name: "update",
|
|
2582
|
-
toEl:
|
|
2736
|
+
toEl: Y,
|
|
2583
2737
|
originalEvent: e
|
|
2584
|
-
}),
|
|
2738
|
+
}), Vr({
|
|
2585
2739
|
sortable: this,
|
|
2586
2740
|
name: "sort",
|
|
2587
|
-
toEl:
|
|
2741
|
+
toEl: Y,
|
|
2588
2742
|
originalEvent: e
|
|
2589
|
-
})) : (
|
|
2590
|
-
rootEl:
|
|
2743
|
+
})) : (Mi >= 0 && (Vr({
|
|
2744
|
+
rootEl: Y,
|
|
2591
2745
|
name: "add",
|
|
2592
|
-
toEl:
|
|
2593
|
-
fromEl:
|
|
2746
|
+
toEl: Y,
|
|
2747
|
+
fromEl: Z,
|
|
2594
2748
|
originalEvent: e
|
|
2595
|
-
}),
|
|
2749
|
+
}), Vr({
|
|
2596
2750
|
sortable: this,
|
|
2597
2751
|
name: "remove",
|
|
2598
|
-
toEl:
|
|
2752
|
+
toEl: Y,
|
|
2599
2753
|
originalEvent: e
|
|
2600
|
-
}),
|
|
2601
|
-
rootEl:
|
|
2754
|
+
}), Vr({
|
|
2755
|
+
rootEl: Y,
|
|
2602
2756
|
name: "sort",
|
|
2603
|
-
toEl:
|
|
2604
|
-
fromEl:
|
|
2757
|
+
toEl: Y,
|
|
2758
|
+
fromEl: Z,
|
|
2605
2759
|
originalEvent: e
|
|
2606
|
-
}),
|
|
2760
|
+
}), Vr({
|
|
2607
2761
|
sortable: this,
|
|
2608
2762
|
name: "sort",
|
|
2609
|
-
toEl:
|
|
2763
|
+
toEl: Y,
|
|
2610
2764
|
originalEvent: e
|
|
2611
|
-
})),
|
|
2765
|
+
})), Ii && Ii.save()), q.active && ((Mi == null || Mi === -1) && (Mi = ji, Pi = Ni), Vr({
|
|
2612
2766
|
sortable: this,
|
|
2613
2767
|
name: "end",
|
|
2614
|
-
toEl:
|
|
2768
|
+
toEl: Y,
|
|
2615
2769
|
originalEvent: e
|
|
2616
2770
|
}), this.save()))), this._nulling();
|
|
2617
2771
|
},
|
|
2618
2772
|
_nulling: function() {
|
|
2619
|
-
|
|
2773
|
+
Ei("nulling", this), Z = J = Y = X = Di = ki = Oi = Ai = Bi = Vi = Ki = Mi = Pi = ji = Ni = qi = Ji = Ii = Fi = q.dragged = q.ghost = q.clone = q.active = null, ta.forEach(function(e) {
|
|
2620
2774
|
e.checked = !0;
|
|
2621
|
-
}),
|
|
2775
|
+
}), ta.length = Hi = Ui = 0;
|
|
2622
2776
|
},
|
|
2623
2777
|
handleEvent: function(e) {
|
|
2624
2778
|
switch (e.type) {
|
|
@@ -2628,7 +2782,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2628
2782
|
break;
|
|
2629
2783
|
case "dragenter":
|
|
2630
2784
|
case "dragover":
|
|
2631
|
-
|
|
2785
|
+
J && (this._onDragOver(e), Hr(e));
|
|
2632
2786
|
break;
|
|
2633
2787
|
case "selectstart":
|
|
2634
2788
|
e.preventDefault();
|
|
@@ -2636,14 +2790,14 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2636
2790
|
}
|
|
2637
2791
|
},
|
|
2638
2792
|
toArray: function() {
|
|
2639
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2793
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], yr(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Xr(t));
|
|
2640
2794
|
return e;
|
|
2641
2795
|
},
|
|
2642
2796
|
sort: function(e, t) {
|
|
2643
2797
|
var n = {}, r = this.el;
|
|
2644
2798
|
this.toArray().forEach(function(e, t) {
|
|
2645
2799
|
var i = r.children[t];
|
|
2646
|
-
|
|
2800
|
+
yr(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2647
2801
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2648
2802
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2649
2803
|
}), t && this.animateAll();
|
|
@@ -2653,25 +2807,25 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2653
2807
|
e && e.set && e.set(this);
|
|
2654
2808
|
},
|
|
2655
2809
|
closest: function(e, t) {
|
|
2656
|
-
return
|
|
2810
|
+
return yr(e, t || this.options.draggable, this.el, !1);
|
|
2657
2811
|
},
|
|
2658
2812
|
option: function(e, t) {
|
|
2659
2813
|
var n = this.options;
|
|
2660
2814
|
if (t === void 0) return n[e];
|
|
2661
|
-
var r =
|
|
2662
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2815
|
+
var r = wi.modifyOption(this, e, t);
|
|
2816
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && ua(n);
|
|
2663
2817
|
},
|
|
2664
2818
|
destroy: function() {
|
|
2665
|
-
|
|
2819
|
+
Ei("destroy", this);
|
|
2666
2820
|
var e = this.el;
|
|
2667
|
-
e[
|
|
2821
|
+
e[xi] = null, H(e, "mousedown", this._onTapStart), H(e, "touchstart", this._onTapStart), H(e, "pointerdown", this._onTapStart), this.nativeDraggable && (H(e, "dragover", this), H(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
2668
2822
|
e.removeAttribute("draggable");
|
|
2669
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2823
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), zi.splice(zi.indexOf(this.el), 1), this.el = e = null;
|
|
2670
2824
|
},
|
|
2671
2825
|
_hideClone: function() {
|
|
2672
|
-
if (!
|
|
2673
|
-
if (
|
|
2674
|
-
|
|
2826
|
+
if (!Ai) {
|
|
2827
|
+
if (Ei("hideClone", this), q.eventCanceled) return;
|
|
2828
|
+
W(ki, "display", "none"), this.options.removeCloneOnHide && ki.parentNode && ki.parentNode.removeChild(ki), Ai = !0;
|
|
2675
2829
|
}
|
|
2676
2830
|
},
|
|
2677
2831
|
_showClone: function(e) {
|
|
@@ -2679,60 +2833,60 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2679
2833
|
this._hideClone();
|
|
2680
2834
|
return;
|
|
2681
2835
|
}
|
|
2682
|
-
if (
|
|
2683
|
-
if (
|
|
2684
|
-
|
|
2836
|
+
if (Ai) {
|
|
2837
|
+
if (Ei("showClone", this), q.eventCanceled) return;
|
|
2838
|
+
J.parentNode == Z && !this.options.group.revertClone ? Z.insertBefore(ki, J) : Di ? Z.insertBefore(ki, Di) : Z.appendChild(ki), this.options.group.revertClone && this.animate(J, ki), W(ki, "display", ""), Ai = !1;
|
|
2685
2839
|
}
|
|
2686
2840
|
}
|
|
2687
|
-
},
|
|
2688
|
-
(
|
|
2689
|
-
}),
|
|
2690
|
-
on:
|
|
2691
|
-
off:
|
|
2692
|
-
css:
|
|
2693
|
-
find:
|
|
2841
|
+
}, na && V(document, "touchmove", function(e) {
|
|
2842
|
+
(q.active || Li) && e.cancelable && e.preventDefault();
|
|
2843
|
+
}), q.utils = {
|
|
2844
|
+
on: V,
|
|
2845
|
+
off: H,
|
|
2846
|
+
css: W,
|
|
2847
|
+
find: xr,
|
|
2694
2848
|
is: function(e, t) {
|
|
2695
|
-
return !!
|
|
2849
|
+
return !!yr(e, t, e, !1);
|
|
2696
2850
|
},
|
|
2697
|
-
extend:
|
|
2698
|
-
throttle:
|
|
2699
|
-
closest:
|
|
2700
|
-
toggleClass:
|
|
2701
|
-
clone:
|
|
2702
|
-
index:
|
|
2703
|
-
nextTick:
|
|
2704
|
-
cancelNextTick:
|
|
2705
|
-
detectDirection:
|
|
2706
|
-
getChild:
|
|
2707
|
-
},
|
|
2708
|
-
return e[
|
|
2709
|
-
},
|
|
2851
|
+
extend: kr,
|
|
2852
|
+
throttle: jr,
|
|
2853
|
+
closest: yr,
|
|
2854
|
+
toggleClass: U,
|
|
2855
|
+
clone: Pr,
|
|
2856
|
+
index: K,
|
|
2857
|
+
nextTick: Qr,
|
|
2858
|
+
cancelNextTick: $r,
|
|
2859
|
+
detectDirection: sa,
|
|
2860
|
+
getChild: wr
|
|
2861
|
+
}, q.get = function(e) {
|
|
2862
|
+
return e[xi];
|
|
2863
|
+
}, q.mount = function() {
|
|
2710
2864
|
var e = [...arguments];
|
|
2711
2865
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
2712
2866
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
2713
|
-
e.utils && (
|
|
2867
|
+
e.utils && (q.utils = ir(ir({}, q.utils), e.utils)), wi.mount(e);
|
|
2714
2868
|
});
|
|
2715
|
-
},
|
|
2716
|
-
return new
|
|
2717
|
-
},
|
|
2869
|
+
}, q.create = function(e, t) {
|
|
2870
|
+
return new q(e, t);
|
|
2871
|
+
}, q.version = di, ha = [], va = !1, Ca = jr(function(e, t, n, r) {
|
|
2718
2872
|
if (t.scroll) {
|
|
2719
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
2720
|
-
|
|
2721
|
-
var d = 0, f =
|
|
2873
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Sr(), l = !1, u;
|
|
2874
|
+
_a !== n && (_a = n, ti(), ga = t.scroll, u = t.scrollFn, ga === !0 && (ga = Or(n, !0)));
|
|
2875
|
+
var d = 0, f = ga;
|
|
2722
2876
|
do {
|
|
2723
|
-
var p = f, m =
|
|
2724
|
-
p === c ? (x = y < C && (
|
|
2725
|
-
var
|
|
2726
|
-
if (!
|
|
2727
|
-
(
|
|
2728
|
-
r && this.layer === 0 &&
|
|
2729
|
-
var t =
|
|
2730
|
-
typeof u == "function" && u.call(
|
|
2877
|
+
var p = f, m = G(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, ee = p.scrollHeight, w = W(p), T = p.scrollLeft, E = p.scrollTop;
|
|
2878
|
+
p === c ? (x = y < C && (w.overflowX === "auto" || w.overflowX === "scroll" || w.overflowX === "visible"), S = b < ee && (w.overflowY === "auto" || w.overflowY === "scroll" || w.overflowY === "visible")) : (x = y < C && (w.overflowX === "auto" || w.overflowX === "scroll"), S = b < ee && (w.overflowY === "auto" || w.overflowY === "scroll"));
|
|
2879
|
+
var D = x && (Math.abs(v - i) <= o && T + y < C) - (Math.abs(_ - i) <= o && !!T), te = S && (Math.abs(g - a) <= o && E + b < ee) - (Math.abs(h - a) <= o && !!E);
|
|
2880
|
+
if (!ha[d]) for (var ne = 0; ne <= d; ne++) ha[ne] || (ha[ne] = {});
|
|
2881
|
+
(ha[d].vx != D || ha[d].vy != te || ha[d].el !== p) && (ha[d].el = p, ha[d].vx = D, ha[d].vy = te, clearInterval(ha[d].pid), (D != 0 || te != 0) && (l = !0, ha[d].pid = setInterval(function() {
|
|
2882
|
+
r && this.layer === 0 && q.active._onTouchMove(xa);
|
|
2883
|
+
var t = ha[this.layer].vy ? ha[this.layer].vy * s : 0, n = ha[this.layer].vx ? ha[this.layer].vx * s : 0;
|
|
2884
|
+
typeof u == "function" && u.call(q.dragged.parentNode[xi], n, t, e, xa, ha[this.layer].el) !== "continue" || Nr(ha[this.layer].el, n, t);
|
|
2731
2885
|
}.bind({ layer: d }), 24))), d++;
|
|
2732
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
2733
|
-
|
|
2886
|
+
} while (t.bubbleScroll && f !== c && (f = Or(f, !1)));
|
|
2887
|
+
va = l;
|
|
2734
2888
|
}
|
|
2735
|
-
}, 30),
|
|
2889
|
+
}, 30), wa = function(e) {
|
|
2736
2890
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
2737
2891
|
if (t) {
|
|
2738
2892
|
var c = n || i;
|
|
@@ -2743,7 +2897,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2743
2897
|
putSortable: n
|
|
2744
2898
|
}));
|
|
2745
2899
|
}
|
|
2746
|
-
},
|
|
2900
|
+
}, ri.prototype = {
|
|
2747
2901
|
startIndex: null,
|
|
2748
2902
|
dragStart: function(e) {
|
|
2749
2903
|
this.startIndex = e.oldDraggableIndex;
|
|
@@ -2751,20 +2905,20 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
2751
2905
|
onSpill: function(e) {
|
|
2752
2906
|
var t = e.dragEl, n = e.putSortable;
|
|
2753
2907
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
2754
|
-
var r =
|
|
2908
|
+
var r = wr(this.sortable.el, this.startIndex, this.options);
|
|
2755
2909
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
2756
2910
|
},
|
|
2757
|
-
drop:
|
|
2758
|
-
},
|
|
2911
|
+
drop: wa
|
|
2912
|
+
}, sr(ri, { pluginName: "revertOnSpill" }), ii.prototype = {
|
|
2759
2913
|
onSpill: function(e) {
|
|
2760
2914
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
2761
2915
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
2762
2916
|
},
|
|
2763
|
-
drop:
|
|
2764
|
-
},
|
|
2765
|
-
})),
|
|
2917
|
+
drop: wa
|
|
2918
|
+
}, sr(ii, { pluginName: "removeOnSpill" }), Q = [], Ea = [], ka = !1, Aa = !1, ja = !1, q.mount(new ei()), q.mount(ii, ri);
|
|
2919
|
+
})), Fa = /* @__PURE__ */ ot(((e, t) => {
|
|
2766
2920
|
(function(n, r) {
|
|
2767
|
-
typeof e == "object" && typeof t == "object" ? t.exports = r(
|
|
2921
|
+
typeof e == "object" && typeof t == "object" ? t.exports = r(dt("vue"), (Pa(), ut(nr))) : typeof define == "function" && define.amd ? define([, "sortablejs"], r) : typeof e == "object" ? e.vuedraggable = r(dt("vue"), (Pa(), ut(nr))) : n.vuedraggable = r(n.Vue, n.Sortable);
|
|
2768
2922
|
})(typeof self < "u" ? self : e, function(e, t) {
|
|
2769
2923
|
return (function(e) {
|
|
2770
2924
|
var t = {};
|
|
@@ -3184,18 +3338,18 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
3184
3338
|
if (C === null || (S.push(C), !h)) break;
|
|
3185
3339
|
String(C[0]) === "" && (c.lastIndex = l(p, o(c.lastIndex), x));
|
|
3186
3340
|
}
|
|
3187
|
-
for (var
|
|
3188
|
-
C = S[
|
|
3189
|
-
for (var
|
|
3190
|
-
var
|
|
3341
|
+
for (var ee = "", w = 0, T = 0; T < S.length; T++) {
|
|
3342
|
+
C = S[T];
|
|
3343
|
+
for (var E = String(C[0]), D = d(f(s(C.index), p.length), 0), te = [], ne = 1; ne < C.length; ne++) te.push(g(C[ne]));
|
|
3344
|
+
var O = C.groups;
|
|
3191
3345
|
if (m) {
|
|
3192
|
-
var
|
|
3193
|
-
|
|
3194
|
-
var
|
|
3195
|
-
} else
|
|
3196
|
-
|
|
3346
|
+
var re = [E].concat(te, D, p);
|
|
3347
|
+
O !== void 0 && re.push(O);
|
|
3348
|
+
var ie = String(r.apply(void 0, re));
|
|
3349
|
+
} else ie = b(E, p, D, te, O, r);
|
|
3350
|
+
D >= w && (ee += p.slice(w, D) + ie, w = D + E.length);
|
|
3197
3351
|
}
|
|
3198
|
-
return
|
|
3352
|
+
return ee + p.slice(w);
|
|
3199
3353
|
}];
|
|
3200
3354
|
function b(e, n, r, i, o, s) {
|
|
3201
3355
|
var c = r + e.length, l = i.length, u = h;
|
|
@@ -3408,8 +3562,8 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
3408
3562
|
e.exports = function(e, t, n, u, p, x, S) {
|
|
3409
3563
|
i(n, t, u);
|
|
3410
3564
|
var C = function(e) {
|
|
3411
|
-
if (e === p &&
|
|
3412
|
-
if (!h && e in
|
|
3565
|
+
if (e === p && D) return D;
|
|
3566
|
+
if (!h && e in T) return T[e];
|
|
3413
3567
|
switch (e) {
|
|
3414
3568
|
case _: return function() {
|
|
3415
3569
|
return new n(this, e);
|
|
@@ -3424,20 +3578,20 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
3424
3578
|
return function() {
|
|
3425
3579
|
return new n(this);
|
|
3426
3580
|
};
|
|
3427
|
-
},
|
|
3428
|
-
if (
|
|
3429
|
-
return
|
|
3430
|
-
}), (!d || S) &&
|
|
3581
|
+
}, ee = t + " Iterator", w = !1, T = e.prototype, E = T[g] || T["@@iterator"] || p && T[p], D = !h && E || C(p), te = t == "Array" && T.entries || E, ne, O, re;
|
|
3582
|
+
if (te && (ne = a(te.call(new e())), m !== Object.prototype && ne.next && (!d && a(ne) !== m && (o ? o(ne, m) : typeof ne[g] != "function" && c(ne, g, b)), s(ne, ee, !0, !0), d && (f[ee] = b))), p == v && E && E.name !== v && (w = !0, D = function() {
|
|
3583
|
+
return E.call(this);
|
|
3584
|
+
}), (!d || S) && T[g] !== D && c(T, g, D), f[t] = D, p) if (O = {
|
|
3431
3585
|
values: C(v),
|
|
3432
|
-
keys: x ?
|
|
3586
|
+
keys: x ? D : C(_),
|
|
3433
3587
|
entries: C(y)
|
|
3434
|
-
}, S) for (
|
|
3588
|
+
}, S) for (re in O) (h || w || !(re in T)) && l(T, re, O[re]);
|
|
3435
3589
|
else r({
|
|
3436
3590
|
target: t,
|
|
3437
3591
|
proto: !0,
|
|
3438
|
-
forced: h ||
|
|
3439
|
-
},
|
|
3440
|
-
return
|
|
3592
|
+
forced: h || w
|
|
3593
|
+
}, O);
|
|
3594
|
+
return O;
|
|
3441
3595
|
};
|
|
3442
3596
|
}),
|
|
3443
3597
|
"7f9a": (function(e, t, n) {
|
|
@@ -3651,103 +3805,103 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
3651
3805
|
} });
|
|
3652
3806
|
}),
|
|
3653
3807
|
a4d3: (function(e, t, n) {
|
|
3654
|
-
var r = n("23e7"), i = n("da84"), a = n("d066"), o = n("c430"), s = n("83ab"), c = n("4930"), l = n("fdbf"), u = n("d039"), d = n("5135"), f = n("e8b5"), p = n("861d"), m = n("825a"), h = n("7b0b"), g = n("fc6a"), _ = n("c04e"), v = n("5c6c"), y = n("7c73"), b = n("df75"), x = n("241c"), S = n("057f"), C = n("7418"),
|
|
3655
|
-
return y(
|
|
3656
|
-
return
|
|
3808
|
+
var r = n("23e7"), i = n("da84"), a = n("d066"), o = n("c430"), s = n("83ab"), c = n("4930"), l = n("fdbf"), u = n("d039"), d = n("5135"), f = n("e8b5"), p = n("861d"), m = n("825a"), h = n("7b0b"), g = n("fc6a"), _ = n("c04e"), v = n("5c6c"), y = n("7c73"), b = n("df75"), x = n("241c"), S = n("057f"), C = n("7418"), ee = n("06cf"), w = n("9bf2"), T = n("d1e7"), E = n("9112"), D = n("6eeb"), te = n("5692"), ne = n("f772"), O = n("d012"), re = n("90e3"), ie = n("b622"), ae = n("e538"), oe = n("746f"), k = n("d44e"), se = n("69f3"), A = n("b727").forEach, j = ne("hidden"), M = "Symbol", ce = "prototype", N = ie("toPrimitive"), le = se.set, ue = se.getterFor(M), de = Object[ce], P = i.Symbol, fe = a("JSON", "stringify"), pe = ee.f, F = w.f, me = S.f, he = T.f, ge = te("symbols"), I = te("op-symbols"), L = te("string-to-symbol-registry"), R = te("symbol-to-string-registry"), _e = te("wks"), ve = i.QObject, ye = !ve || !ve[ce] || !ve[ce].findChild, be = s && u(function() {
|
|
3809
|
+
return y(F({}, "a", { get: function() {
|
|
3810
|
+
return F(this, "a", { value: 7 }).a;
|
|
3657
3811
|
} })).a != 7;
|
|
3658
3812
|
}) ? function(e, t, n) {
|
|
3659
3813
|
var r = pe(de, t);
|
|
3660
|
-
r && delete de[t],
|
|
3661
|
-
} :
|
|
3662
|
-
var n =
|
|
3814
|
+
r && delete de[t], F(e, t, n), r && e !== de && F(de, t, r);
|
|
3815
|
+
} : F, z = function(e, t) {
|
|
3816
|
+
var n = ge[e] = y(P[ce]);
|
|
3663
3817
|
return le(n, {
|
|
3664
|
-
type:
|
|
3818
|
+
type: M,
|
|
3665
3819
|
tag: e,
|
|
3666
3820
|
description: t
|
|
3667
3821
|
}), s || (n.description = t), n;
|
|
3668
3822
|
}, xe = l ? function(e) {
|
|
3669
3823
|
return typeof e == "symbol";
|
|
3670
3824
|
} : function(e) {
|
|
3671
|
-
return Object(e) instanceof
|
|
3672
|
-
},
|
|
3673
|
-
e === de &&
|
|
3825
|
+
return Object(e) instanceof P;
|
|
3826
|
+
}, B = function(e, t, n) {
|
|
3827
|
+
e === de && B(I, t, n), m(e);
|
|
3674
3828
|
var r = _(t, !0);
|
|
3675
|
-
return m(n), d(
|
|
3676
|
-
},
|
|
3829
|
+
return m(n), d(ge, r) ? (n.enumerable ? (d(e, j) && e[j][r] && (e[j][r] = !1), n = y(n, { enumerable: v(0, !1) })) : (d(e, j) || F(e, j, v(1, {})), e[j][r] = !0), be(e, r, n)) : F(e, r, n);
|
|
3830
|
+
}, Se = function(e, t) {
|
|
3677
3831
|
m(e);
|
|
3678
3832
|
var n = g(t);
|
|
3679
|
-
return
|
|
3680
|
-
(!s ||
|
|
3833
|
+
return A(b(n).concat(De(n)), function(t) {
|
|
3834
|
+
(!s || we.call(n, t)) && B(e, t, n[t]);
|
|
3681
3835
|
}), e;
|
|
3682
|
-
},
|
|
3683
|
-
return t === void 0 ? y(e) :
|
|
3684
|
-
},
|
|
3685
|
-
var t = _(e, !0), n =
|
|
3686
|
-
return this === de && d(
|
|
3687
|
-
},
|
|
3836
|
+
}, Ce = function(e, t) {
|
|
3837
|
+
return t === void 0 ? y(e) : Se(y(e), t);
|
|
3838
|
+
}, we = function(e) {
|
|
3839
|
+
var t = _(e, !0), n = he.call(this, t);
|
|
3840
|
+
return this === de && d(ge, t) && !d(I, t) ? !1 : n || !d(this, t) || !d(ge, t) || d(this, j) && this[j][t] ? n : !0;
|
|
3841
|
+
}, Te = function(e, t) {
|
|
3688
3842
|
var n = g(e), r = _(t, !0);
|
|
3689
|
-
if (!(n === de && d(
|
|
3843
|
+
if (!(n === de && d(ge, r) && !d(I, r))) {
|
|
3690
3844
|
var i = pe(n, r);
|
|
3691
|
-
return i && d(
|
|
3845
|
+
return i && d(ge, r) && !(d(n, j) && n[j][r]) && (i.enumerable = !0), i;
|
|
3692
3846
|
}
|
|
3693
|
-
},
|
|
3694
|
-
var t =
|
|
3695
|
-
return
|
|
3696
|
-
!d(
|
|
3847
|
+
}, Ee = function(e) {
|
|
3848
|
+
var t = me(g(e)), n = [];
|
|
3849
|
+
return A(t, function(e) {
|
|
3850
|
+
!d(ge, e) && !d(O, e) && n.push(e);
|
|
3697
3851
|
}), n;
|
|
3698
|
-
},
|
|
3699
|
-
var t = e === de, n =
|
|
3700
|
-
return
|
|
3701
|
-
d(
|
|
3852
|
+
}, De = function(e) {
|
|
3853
|
+
var t = e === de, n = me(t ? I : g(e)), r = [];
|
|
3854
|
+
return A(n, function(e) {
|
|
3855
|
+
d(ge, e) && (!t || d(de, e)) && r.push(ge[e]);
|
|
3702
3856
|
}), r;
|
|
3703
3857
|
};
|
|
3704
|
-
c || (
|
|
3705
|
-
if (this instanceof
|
|
3706
|
-
var e = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), t =
|
|
3707
|
-
this === de && n.call(
|
|
3858
|
+
c || (P = function() {
|
|
3859
|
+
if (this instanceof P) throw TypeError("Symbol is not a constructor");
|
|
3860
|
+
var e = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), t = re(e), n = function(e) {
|
|
3861
|
+
this === de && n.call(I, e), d(this, j) && d(this[j], t) && (this[j][t] = !1), be(this, t, v(1, e));
|
|
3708
3862
|
};
|
|
3709
|
-
return s &&
|
|
3863
|
+
return s && ye && be(de, t, {
|
|
3710
3864
|
configurable: !0,
|
|
3711
3865
|
set: n
|
|
3712
3866
|
}), z(t, e);
|
|
3713
|
-
},
|
|
3867
|
+
}, D(P[ce], "toString", function() {
|
|
3714
3868
|
return ue(this).tag;
|
|
3715
|
-
}),
|
|
3716
|
-
return z(ne(e), e);
|
|
3717
|
-
}), E.f = Te, T.f = Se, w.f = Ee, x.f = S.f = De, C.f = Oe, ie.f = function(e) {
|
|
3869
|
+
}), D(P, "withoutSetter", function(e) {
|
|
3718
3870
|
return z(re(e), e);
|
|
3719
|
-
},
|
|
3871
|
+
}), T.f = we, w.f = B, ee.f = Te, x.f = S.f = Ee, C.f = De, ae.f = function(e) {
|
|
3872
|
+
return z(ie(e), e);
|
|
3873
|
+
}, s && (F(P[ce], "description", {
|
|
3720
3874
|
configurable: !0,
|
|
3721
3875
|
get: function() {
|
|
3722
3876
|
return ue(this).description;
|
|
3723
3877
|
}
|
|
3724
|
-
}), o ||
|
|
3878
|
+
}), o || D(de, "propertyIsEnumerable", we, { unsafe: !0 }))), r({
|
|
3725
3879
|
global: !0,
|
|
3726
3880
|
wrap: !0,
|
|
3727
3881
|
forced: !c,
|
|
3728
3882
|
sham: !c
|
|
3729
|
-
}, { Symbol:
|
|
3730
|
-
|
|
3883
|
+
}, { Symbol: P }), A(b(_e), function(e) {
|
|
3884
|
+
oe(e);
|
|
3731
3885
|
}), r({
|
|
3732
|
-
target:
|
|
3886
|
+
target: M,
|
|
3733
3887
|
stat: !0,
|
|
3734
3888
|
forced: !c
|
|
3735
3889
|
}, {
|
|
3736
3890
|
for: function(e) {
|
|
3737
3891
|
var t = String(e);
|
|
3738
|
-
if (d(
|
|
3739
|
-
var n =
|
|
3740
|
-
return
|
|
3892
|
+
if (d(L, t)) return L[t];
|
|
3893
|
+
var n = P(t);
|
|
3894
|
+
return L[t] = n, R[n] = t, n;
|
|
3741
3895
|
},
|
|
3742
3896
|
keyFor: function(e) {
|
|
3743
3897
|
if (!xe(e)) throw TypeError(e + " is not a symbol");
|
|
3744
|
-
if (d(
|
|
3898
|
+
if (d(R, e)) return R[e];
|
|
3745
3899
|
},
|
|
3746
3900
|
useSetter: function() {
|
|
3747
|
-
|
|
3901
|
+
ye = !0;
|
|
3748
3902
|
},
|
|
3749
3903
|
useSimple: function() {
|
|
3750
|
-
|
|
3904
|
+
ye = !1;
|
|
3751
3905
|
}
|
|
3752
3906
|
}), r({
|
|
3753
3907
|
target: "Object",
|
|
@@ -3755,17 +3909,17 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
3755
3909
|
forced: !c,
|
|
3756
3910
|
sham: !s
|
|
3757
3911
|
}, {
|
|
3758
|
-
create:
|
|
3759
|
-
defineProperty:
|
|
3760
|
-
defineProperties:
|
|
3761
|
-
getOwnPropertyDescriptor:
|
|
3912
|
+
create: Ce,
|
|
3913
|
+
defineProperty: B,
|
|
3914
|
+
defineProperties: Se,
|
|
3915
|
+
getOwnPropertyDescriptor: Te
|
|
3762
3916
|
}), r({
|
|
3763
3917
|
target: "Object",
|
|
3764
3918
|
stat: !0,
|
|
3765
3919
|
forced: !c
|
|
3766
3920
|
}, {
|
|
3767
|
-
getOwnPropertyNames:
|
|
3768
|
-
getOwnPropertySymbols:
|
|
3921
|
+
getOwnPropertyNames: Ee,
|
|
3922
|
+
getOwnPropertySymbols: De
|
|
3769
3923
|
}), r({
|
|
3770
3924
|
target: "Object",
|
|
3771
3925
|
stat: !0,
|
|
@@ -3774,19 +3928,19 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
3774
3928
|
})
|
|
3775
3929
|
}, { getOwnPropertySymbols: function(e) {
|
|
3776
3930
|
return C.f(h(e));
|
|
3777
|
-
} }),
|
|
3931
|
+
} }), fe && r({
|
|
3778
3932
|
target: "JSON",
|
|
3779
3933
|
stat: !0,
|
|
3780
3934
|
forced: !c || u(function() {
|
|
3781
|
-
var e =
|
|
3782
|
-
return
|
|
3935
|
+
var e = P();
|
|
3936
|
+
return fe([e]) != "[null]" || fe({ a: e }) != "{}" || fe(Object(e)) != "{}";
|
|
3783
3937
|
})
|
|
3784
3938
|
}, { stringify: function(e, t, n) {
|
|
3785
3939
|
for (var r = [e], i = 1, a; arguments.length > i;) r.push(arguments[i++]);
|
|
3786
3940
|
if (a = t, !(!p(t) && e === void 0 || xe(e))) return f(t) || (t = function(e, t) {
|
|
3787
3941
|
if (typeof a == "function" && (t = a.call(this, e, t)), !xe(t)) return t;
|
|
3788
|
-
}), r[1] = t,
|
|
3789
|
-
} }),
|
|
3942
|
+
}), r[1] = t, fe.apply(null, r);
|
|
3943
|
+
} }), P[ce][N] || E(P[ce], N, P[ce].valueOf), k(P, M), O[j] = !0;
|
|
3790
3944
|
}),
|
|
3791
3945
|
a630: (function(e, t, n) {
|
|
3792
3946
|
var r = n("23e7"), i = n("4df4");
|
|
@@ -3912,13 +4066,13 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
3912
4066
|
var r = n("0366"), i = n("44ad"), a = n("7b0b"), o = n("50c4"), s = n("65f0"), c = [].push, l = function(e) {
|
|
3913
4067
|
var t = e == 1, n = e == 2, l = e == 3, u = e == 4, d = e == 6, f = e == 5 || d;
|
|
3914
4068
|
return function(p, m, h, g) {
|
|
3915
|
-
for (var _ = a(p), v = i(_), y = r(m, h, 3), b = o(v.length), x = 0, S = g || s, C = t ? S(p, b) : n ? S(p, 0) : void 0,
|
|
3916
|
-
if (t) C[x] =
|
|
3917
|
-
else if (
|
|
4069
|
+
for (var _ = a(p), v = i(_), y = r(m, h, 3), b = o(v.length), x = 0, S = g || s, C = t ? S(p, b) : n ? S(p, 0) : void 0, ee, w; b > x; x++) if ((f || x in v) && (ee = v[x], w = y(ee, x, _), e)) {
|
|
4070
|
+
if (t) C[x] = w;
|
|
4071
|
+
else if (w) switch (e) {
|
|
3918
4072
|
case 3: return !0;
|
|
3919
|
-
case 5: return
|
|
4073
|
+
case 5: return ee;
|
|
3920
4074
|
case 6: return x;
|
|
3921
|
-
case 2: c.call(C,
|
|
4075
|
+
case 2: c.call(C, ee);
|
|
3922
4076
|
}
|
|
3923
4077
|
else if (u) return !1;
|
|
3924
4078
|
}
|
|
@@ -4449,55 +4603,55 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4449
4603
|
}
|
|
4450
4604
|
var C = n("dbf1");
|
|
4451
4605
|
n("13d5"), n("4fad"), n("ac1f"), n("5319");
|
|
4452
|
-
function
|
|
4606
|
+
function ee(e) {
|
|
4453
4607
|
var t = Object.create(null);
|
|
4454
4608
|
return function(n) {
|
|
4455
4609
|
return t[n] || (t[n] = e(n));
|
|
4456
4610
|
};
|
|
4457
4611
|
}
|
|
4458
|
-
var
|
|
4459
|
-
return e.replace(
|
|
4612
|
+
var w = /-(\w)/g, T = ee(function(e) {
|
|
4613
|
+
return e.replace(w, function(e, t) {
|
|
4460
4614
|
return t.toUpperCase();
|
|
4461
4615
|
});
|
|
4462
4616
|
});
|
|
4463
4617
|
n("5db7"), n("73d9");
|
|
4464
|
-
var
|
|
4618
|
+
var E = [
|
|
4465
4619
|
"Start",
|
|
4466
4620
|
"Add",
|
|
4467
4621
|
"Remove",
|
|
4468
4622
|
"Update",
|
|
4469
4623
|
"End"
|
|
4470
|
-
],
|
|
4624
|
+
], D = [
|
|
4471
4625
|
"Choose",
|
|
4472
4626
|
"Unchoose",
|
|
4473
4627
|
"Sort",
|
|
4474
4628
|
"Filter",
|
|
4475
4629
|
"Clone"
|
|
4476
|
-
],
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4630
|
+
], te = ["Move"], ne = [
|
|
4631
|
+
te,
|
|
4632
|
+
E,
|
|
4633
|
+
D
|
|
4480
4634
|
].flatMap(function(e) {
|
|
4481
4635
|
return e;
|
|
4482
4636
|
}).map(function(e) {
|
|
4483
4637
|
return `on${e}`;
|
|
4484
|
-
}),
|
|
4485
|
-
manage:
|
|
4486
|
-
manageAndEmit:
|
|
4487
|
-
emit:
|
|
4638
|
+
}), O = {
|
|
4639
|
+
manage: te,
|
|
4640
|
+
manageAndEmit: E,
|
|
4641
|
+
emit: D
|
|
4488
4642
|
};
|
|
4489
|
-
function
|
|
4490
|
-
return
|
|
4643
|
+
function re(e) {
|
|
4644
|
+
return ne.indexOf(e) !== -1;
|
|
4491
4645
|
}
|
|
4492
4646
|
n("caad"), n("2ca0");
|
|
4493
|
-
var
|
|
4494
|
-
function
|
|
4495
|
-
return
|
|
4647
|
+
var ie = /* @__PURE__ */ "a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.link.main.map.mark.math.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.section.select.slot.small.source.span.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr".split(".");
|
|
4648
|
+
function ae(e) {
|
|
4649
|
+
return ie.includes(e);
|
|
4496
4650
|
}
|
|
4497
|
-
function
|
|
4651
|
+
function oe(e) {
|
|
4498
4652
|
return ["transition-group", "TransitionGroup"].includes(e);
|
|
4499
4653
|
}
|
|
4500
|
-
function
|
|
4654
|
+
function k(e) {
|
|
4501
4655
|
return [
|
|
4502
4656
|
"id",
|
|
4503
4657
|
"class",
|
|
@@ -4505,65 +4659,65 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4505
4659
|
"style"
|
|
4506
4660
|
].includes(e) || e.startsWith("data-") || e.startsWith("aria-") || e.startsWith("on");
|
|
4507
4661
|
}
|
|
4508
|
-
function
|
|
4662
|
+
function se(e) {
|
|
4509
4663
|
return e.reduce(function(e, t) {
|
|
4510
4664
|
var n = m(t, 2), r = n[0];
|
|
4511
4665
|
return e[r] = n[1], e;
|
|
4512
4666
|
}, {});
|
|
4513
4667
|
}
|
|
4514
|
-
function
|
|
4668
|
+
function A(e) {
|
|
4515
4669
|
var t = e.$attrs, n = e.componentData, r = n === void 0 ? {} : n;
|
|
4516
|
-
return c(c({},
|
|
4670
|
+
return c(c({}, se(Object.entries(t).filter(function(e) {
|
|
4517
4671
|
var t = m(e, 2), n = t[0];
|
|
4518
|
-
return t[1],
|
|
4672
|
+
return t[1], k(n);
|
|
4519
4673
|
}))), r);
|
|
4520
4674
|
}
|
|
4521
|
-
function
|
|
4522
|
-
var t = e.$attrs, n = e.callBackBuilder, r =
|
|
4675
|
+
function j(e) {
|
|
4676
|
+
var t = e.$attrs, n = e.callBackBuilder, r = se(M(t));
|
|
4523
4677
|
Object.entries(n).forEach(function(e) {
|
|
4524
4678
|
var t = m(e, 2), n = t[0], i = t[1];
|
|
4525
|
-
|
|
4679
|
+
O[n].forEach(function(e) {
|
|
4526
4680
|
r[`on${e}`] = i(e);
|
|
4527
4681
|
});
|
|
4528
4682
|
});
|
|
4529
4683
|
var i = `[data-draggable]${r.draggable || ""}`;
|
|
4530
4684
|
return c(c({}, r), {}, { draggable: i });
|
|
4531
4685
|
}
|
|
4532
|
-
function
|
|
4686
|
+
function M(e) {
|
|
4533
4687
|
return Object.entries(e).filter(function(e) {
|
|
4534
4688
|
var t = m(e, 2), n = t[0];
|
|
4535
|
-
return t[1], !
|
|
4689
|
+
return t[1], !k(n);
|
|
4536
4690
|
}).map(function(e) {
|
|
4537
4691
|
var t = m(e, 2), n = t[0], r = t[1];
|
|
4538
|
-
return [
|
|
4692
|
+
return [T(n), r];
|
|
4539
4693
|
}).filter(function(e) {
|
|
4540
4694
|
var t = m(e, 2), n = t[0];
|
|
4541
|
-
return t[1], !
|
|
4695
|
+
return t[1], !re(n);
|
|
4542
4696
|
});
|
|
4543
4697
|
}
|
|
4544
4698
|
n("c740");
|
|
4545
|
-
function
|
|
4699
|
+
function ce(e, t) {
|
|
4546
4700
|
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
4547
4701
|
}
|
|
4548
|
-
function
|
|
4702
|
+
function N(e, t) {
|
|
4549
4703
|
for (var n = 0; n < t.length; n++) {
|
|
4550
4704
|
var r = t[n];
|
|
4551
4705
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
|
4552
4706
|
}
|
|
4553
4707
|
}
|
|
4554
4708
|
function le(e, t, n) {
|
|
4555
|
-
return t &&
|
|
4709
|
+
return t && N(e.prototype, t), n && N(e, n), e;
|
|
4556
4710
|
}
|
|
4557
4711
|
var ue = function(e) {
|
|
4558
4712
|
return e.el;
|
|
4559
4713
|
}, de = function(e, t) {
|
|
4560
4714
|
return e.__draggable_context = t;
|
|
4561
|
-
},
|
|
4715
|
+
}, P = function(e) {
|
|
4562
4716
|
return e.__draggable_context;
|
|
4563
|
-
},
|
|
4717
|
+
}, fe = /* @__PURE__ */ function() {
|
|
4564
4718
|
function e(t) {
|
|
4565
4719
|
var n = t.nodes, r = n.header, i = n.default, a = n.footer, o = t.root, s = t.realList;
|
|
4566
|
-
|
|
4720
|
+
ce(this, e), this.defaultNodes = i, this.children = [].concat(v(r), v(i), v(a)), this.externalComponent = o.externalComponent, this.rootTransition = o.transition, this.tag = o.tag, this.realList = s;
|
|
4567
4721
|
}
|
|
4568
4722
|
return le(e, [
|
|
4569
4723
|
{
|
|
@@ -4590,7 +4744,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4590
4744
|
{
|
|
4591
4745
|
key: "getUnderlyingVm",
|
|
4592
4746
|
value: function(e) {
|
|
4593
|
-
return
|
|
4747
|
+
return P(e);
|
|
4594
4748
|
}
|
|
4595
4749
|
},
|
|
4596
4750
|
{
|
|
@@ -4598,7 +4752,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4598
4752
|
value: function(e, t) {
|
|
4599
4753
|
var n = this.defaultNodes, r = n.length, i = t.children, a = i.item(e);
|
|
4600
4754
|
if (a === null) return r;
|
|
4601
|
-
var o =
|
|
4755
|
+
var o = P(a);
|
|
4602
4756
|
if (o) return o.index;
|
|
4603
4757
|
if (r === 0) return 0;
|
|
4604
4758
|
var s = ue(n[0]);
|
|
@@ -4615,13 +4769,13 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4615
4769
|
}
|
|
4616
4770
|
]), e;
|
|
4617
4771
|
}(), pe = n("8bbf");
|
|
4618
|
-
function
|
|
4772
|
+
function F(e, t) {
|
|
4619
4773
|
var n = e[t];
|
|
4620
4774
|
return n ? n() : [];
|
|
4621
4775
|
}
|
|
4622
|
-
function
|
|
4776
|
+
function me(e) {
|
|
4623
4777
|
var t = e.$slots, n = e.realList, r = e.getKey, i = n || [], a = m(["header", "footer"].map(function(e) {
|
|
4624
|
-
return
|
|
4778
|
+
return F(t, e);
|
|
4625
4779
|
}), 2), o = a[0], s = a[1], l = t.item;
|
|
4626
4780
|
if (!l) throw Error("draggable element must have an item slot");
|
|
4627
4781
|
var u = i.flatMap(function(e, t) {
|
|
@@ -4639,45 +4793,45 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4639
4793
|
default: u
|
|
4640
4794
|
};
|
|
4641
4795
|
}
|
|
4642
|
-
function
|
|
4643
|
-
var t =
|
|
4796
|
+
function he(e) {
|
|
4797
|
+
var t = oe(e), n = !ae(e) && !t;
|
|
4644
4798
|
return {
|
|
4645
4799
|
transition: t,
|
|
4646
4800
|
externalComponent: n,
|
|
4647
4801
|
tag: n ? (0, pe.resolveComponent)(e) : t ? pe.TransitionGroup : e
|
|
4648
4802
|
};
|
|
4649
4803
|
}
|
|
4650
|
-
function
|
|
4804
|
+
function ge(e) {
|
|
4651
4805
|
var t = e.$slots, n = e.tag, r = e.realList, i = e.getKey;
|
|
4652
|
-
return new
|
|
4653
|
-
nodes:
|
|
4806
|
+
return new fe({
|
|
4807
|
+
nodes: me({
|
|
4654
4808
|
$slots: t,
|
|
4655
4809
|
realList: r,
|
|
4656
4810
|
getKey: i
|
|
4657
4811
|
}),
|
|
4658
|
-
root:
|
|
4812
|
+
root: he(n),
|
|
4659
4813
|
realList: r
|
|
4660
4814
|
});
|
|
4661
4815
|
}
|
|
4662
|
-
function
|
|
4816
|
+
function I(e, t) {
|
|
4663
4817
|
var n = this;
|
|
4664
4818
|
(0, pe.nextTick)(function() {
|
|
4665
4819
|
return n.$emit(e.toLowerCase(), t);
|
|
4666
4820
|
});
|
|
4667
4821
|
}
|
|
4668
|
-
function
|
|
4822
|
+
function L(e) {
|
|
4669
4823
|
var t = this;
|
|
4670
4824
|
return function(n, r) {
|
|
4671
4825
|
if (t.realList !== null) return t[`onDrag${e}`](n, r);
|
|
4672
4826
|
};
|
|
4673
4827
|
}
|
|
4674
|
-
function
|
|
4675
|
-
var t = this, n =
|
|
4828
|
+
function R(e) {
|
|
4829
|
+
var t = this, n = L.call(this, e);
|
|
4676
4830
|
return function(r, i) {
|
|
4677
|
-
n.call(t, r, i),
|
|
4831
|
+
n.call(t, r, i), I.call(t, e, r);
|
|
4678
4832
|
};
|
|
4679
4833
|
}
|
|
4680
|
-
var
|
|
4834
|
+
var _e = null, ve = {
|
|
4681
4835
|
list: {
|
|
4682
4836
|
type: Array,
|
|
4683
4837
|
required: !1,
|
|
@@ -4711,28 +4865,28 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4711
4865
|
required: !1,
|
|
4712
4866
|
default: null
|
|
4713
4867
|
}
|
|
4714
|
-
},
|
|
4868
|
+
}, ye = ["update:modelValue", "change"].concat(v([].concat(v(O.manageAndEmit), v(O.emit)).map(function(e) {
|
|
4715
4869
|
return e.toLowerCase();
|
|
4716
4870
|
})));
|
|
4717
4871
|
t.default = (0, pe.defineComponent)({
|
|
4718
4872
|
name: "draggable",
|
|
4719
4873
|
inheritAttrs: !1,
|
|
4720
|
-
props:
|
|
4721
|
-
emits:
|
|
4874
|
+
props: ve,
|
|
4875
|
+
emits: ye,
|
|
4722
4876
|
data: function() {
|
|
4723
4877
|
return { error: !1 };
|
|
4724
4878
|
},
|
|
4725
4879
|
render: function() {
|
|
4726
4880
|
try {
|
|
4727
4881
|
this.error = !1;
|
|
4728
|
-
var e = this.$slots, t = this.$attrs, n = this.tag, r = this.componentData, i = this.realList, a = this.getKey, o =
|
|
4882
|
+
var e = this.$slots, t = this.$attrs, n = this.tag, r = this.componentData, i = this.realList, a = this.getKey, o = ge({
|
|
4729
4883
|
$slots: e,
|
|
4730
4884
|
tag: n,
|
|
4731
4885
|
realList: i,
|
|
4732
4886
|
getKey: a
|
|
4733
4887
|
});
|
|
4734
4888
|
this.componentStructure = o;
|
|
4735
|
-
var s =
|
|
4889
|
+
var s = A({
|
|
4736
4890
|
$attrs: t,
|
|
4737
4891
|
componentData: r
|
|
4738
4892
|
});
|
|
@@ -4749,17 +4903,17 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4749
4903
|
if (!this.error) {
|
|
4750
4904
|
var t = this.$attrs, n = this.$el;
|
|
4751
4905
|
this.componentStructure.updated();
|
|
4752
|
-
var r =
|
|
4906
|
+
var r = j({
|
|
4753
4907
|
$attrs: t,
|
|
4754
4908
|
callBackBuilder: {
|
|
4755
4909
|
manageAndEmit: function(t) {
|
|
4756
|
-
return
|
|
4910
|
+
return R.call(e, t);
|
|
4757
4911
|
},
|
|
4758
4912
|
emit: function(t) {
|
|
4759
|
-
return
|
|
4913
|
+
return I.bind(e, t);
|
|
4760
4914
|
},
|
|
4761
4915
|
manage: function(t) {
|
|
4762
|
-
return
|
|
4916
|
+
return L.call(e, t);
|
|
4763
4917
|
}
|
|
4764
4918
|
}
|
|
4765
4919
|
}), i = n.nodeType === 1 ? n : n.parentElement;
|
|
@@ -4786,7 +4940,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4786
4940
|
watch: { $attrs: {
|
|
4787
4941
|
handler: function(e) {
|
|
4788
4942
|
var t = this._sortable;
|
|
4789
|
-
t &&
|
|
4943
|
+
t && M(e).forEach(function(e) {
|
|
4790
4944
|
var n = m(e, 2), r = n[0], i = n[1];
|
|
4791
4945
|
t.option(r, i);
|
|
4792
4946
|
});
|
|
@@ -4838,7 +4992,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4838
4992
|
return this.componentStructure.getVmIndexFromDomIndex(e, this.targetDomElement);
|
|
4839
4993
|
},
|
|
4840
4994
|
onDragStart: function(e) {
|
|
4841
|
-
this.context = this.getUnderlyingVm(e.item), e.item._underlying_vm_ = this.clone(this.context.element),
|
|
4995
|
+
this.context = this.getUnderlyingVm(e.item), e.item._underlying_vm_ = this.clone(this.context.element), _e = e.item;
|
|
4842
4996
|
},
|
|
4843
4997
|
onDragAdd: function(e) {
|
|
4844
4998
|
var t = e.item._underlying_vm_;
|
|
@@ -4882,7 +5036,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4882
5036
|
var n = v(t.to.children).filter(function(e) {
|
|
4883
5037
|
return e.style.display !== "none";
|
|
4884
5038
|
}), r = n.indexOf(t.related), i = e.component.getVmIndexFromDomIndex(r);
|
|
4885
|
-
return n.indexOf(
|
|
5039
|
+
return n.indexOf(_e) !== -1 || !t.willInsertAfter ? i : i + 1;
|
|
4886
5040
|
},
|
|
4887
5041
|
onDragMove: function(e, t) {
|
|
4888
5042
|
var n = this.move, r = this.realList;
|
|
@@ -4894,7 +5048,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4894
5048
|
}), t);
|
|
4895
5049
|
},
|
|
4896
5050
|
onDragEnd: function() {
|
|
4897
|
-
|
|
5051
|
+
_e = null;
|
|
4898
5052
|
}
|
|
4899
5053
|
}
|
|
4900
5054
|
});
|
|
@@ -4962,10 +5116,11 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4962
5116
|
})
|
|
4963
5117
|
}).default;
|
|
4964
5118
|
});
|
|
4965
|
-
})),
|
|
5119
|
+
})), Ia = /* @__PURE__ */ lt(Fa(), 1), La = { class: "tpl:w-full" }, Ra = { class: "tpl:flex tpl:gap-0" }, za = {
|
|
4966
5120
|
key: 0,
|
|
5121
|
+
"data-testid": "section-drop-hint",
|
|
4967
5122
|
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-text-dim)]"
|
|
4968
|
-
},
|
|
5123
|
+
}, Ba = /* @__PURE__ */ ue({
|
|
4969
5124
|
__name: "SectionBlock",
|
|
4970
5125
|
props: {
|
|
4971
5126
|
block: {},
|
|
@@ -4973,13 +5128,13 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4973
5128
|
},
|
|
4974
5129
|
setup(e) {
|
|
4975
5130
|
let t = {
|
|
4976
|
-
title:
|
|
4977
|
-
paragraph:
|
|
4978
|
-
image:
|
|
4979
|
-
button:
|
|
4980
|
-
divider:
|
|
4981
|
-
custom:
|
|
4982
|
-
}, n = e, { t: r } = E(), i =
|
|
5131
|
+
title: tr,
|
|
5132
|
+
paragraph: Rn,
|
|
5133
|
+
image: jn,
|
|
5134
|
+
button: Dt,
|
|
5135
|
+
divider: hn,
|
|
5136
|
+
custom: pn
|
|
5137
|
+
}, n = e, { t: r } = E(), i = l(p, "SectionBlock"), a = P(_, null), o = P(b, null), s = k(() => {
|
|
4983
5138
|
switch (n.block.columns) {
|
|
4984
5139
|
case "2": return ["50%", "50%"];
|
|
4985
5140
|
case "3": return [
|
|
@@ -4991,34 +5146,34 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
4991
5146
|
case "2-1": return ["66.67%", "33.33%"];
|
|
4992
5147
|
default: return ["100%"];
|
|
4993
5148
|
}
|
|
4994
|
-
}), c =
|
|
5149
|
+
}), c = k(() => {
|
|
4995
5150
|
let e = s.value.length, t = [...n.block.children];
|
|
4996
5151
|
for (; t.length < e;) t.push([]);
|
|
4997
5152
|
return t.slice(0, e);
|
|
4998
5153
|
});
|
|
4999
|
-
function
|
|
5154
|
+
function u(e) {
|
|
5000
5155
|
return c.value[e] || [];
|
|
5001
5156
|
}
|
|
5002
|
-
function
|
|
5157
|
+
function d(e, t) {
|
|
5003
5158
|
let r = [...n.block.children];
|
|
5004
5159
|
for (; r.length <= e;) r.push([]);
|
|
5005
5160
|
r[e] = t, i.updateBlock(n.block.id, { children: r });
|
|
5006
5161
|
}
|
|
5007
|
-
function
|
|
5008
|
-
return
|
|
5162
|
+
function f(e) {
|
|
5163
|
+
return zn(e, o, t);
|
|
5009
5164
|
}
|
|
5010
|
-
function
|
|
5165
|
+
function m(e, t) {
|
|
5011
5166
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
5012
5167
|
fieldValues: t.fieldValues,
|
|
5013
5168
|
dataSourceFetched: t.dataSourceFetched
|
|
5014
5169
|
});
|
|
5015
5170
|
}
|
|
5016
|
-
return (t, n) => (
|
|
5171
|
+
return (t, n) => (I(), j("div", La, [M("div", Ra, [(I(!0), j(oe, null, _e(c.value, (t, n) => (I(), j("div", {
|
|
5017
5172
|
key: n,
|
|
5018
|
-
class:
|
|
5019
|
-
style:
|
|
5020
|
-
}, [N(
|
|
5021
|
-
"model-value":
|
|
5173
|
+
class: pe(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
5174
|
+
style: F({ width: s.value[n] })
|
|
5175
|
+
}, [N(B(Ia.default), {
|
|
5176
|
+
"model-value": u(n),
|
|
5022
5177
|
group: {
|
|
5023
5178
|
name: "blocks",
|
|
5024
5179
|
pull: !0,
|
|
@@ -5029,18 +5184,18 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5029
5184
|
"ghost-class": "tpl-ghost",
|
|
5030
5185
|
"empty-insert-threshold": 20,
|
|
5031
5186
|
class: "tpl:min-h-[60px]",
|
|
5032
|
-
"onUpdate:modelValue": (e) =>
|
|
5187
|
+
"onUpdate:modelValue": (e) => d(n, e)
|
|
5033
5188
|
}, {
|
|
5034
|
-
item:
|
|
5189
|
+
item: we(({ element: t }) => [Te(M("div", null, [N($n, {
|
|
5035
5190
|
block: t,
|
|
5036
|
-
"is-selected":
|
|
5191
|
+
"is-selected": B(i).state.selectedBlockId === t.id,
|
|
5037
5192
|
viewport: e.viewport,
|
|
5038
|
-
onSelect: (e) =>
|
|
5193
|
+
onSelect: (e) => B(i).selectBlock(t.id)
|
|
5039
5194
|
}, {
|
|
5040
|
-
default:
|
|
5195
|
+
default: we(() => [(I(), se(ye(f(t)), {
|
|
5041
5196
|
block: t,
|
|
5042
5197
|
viewport: e.viewport,
|
|
5043
|
-
onFetchData: (e) =>
|
|
5198
|
+
onFetchData: (e) => m(t, e)
|
|
5044
5199
|
}, null, 40, [
|
|
5045
5200
|
"block",
|
|
5046
5201
|
"viewport",
|
|
@@ -5052,15 +5207,15 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5052
5207
|
"is-selected",
|
|
5053
5208
|
"viewport",
|
|
5054
5209
|
"onSelect"
|
|
5055
|
-
])], 512), [[
|
|
5210
|
+
])], 512), [[Se, !B(a)?.isHidden(t.id)]])]),
|
|
5056
5211
|
_: 1
|
|
5057
5212
|
}, 8, [
|
|
5058
5213
|
"model-value",
|
|
5059
5214
|
"group",
|
|
5060
5215
|
"onUpdate:modelValue"
|
|
5061
|
-
]),
|
|
5216
|
+
]), u(n).length === 0 ? (I(), j("div", za, [M("span", null, z(B(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
|
|
5062
5217
|
}
|
|
5063
|
-
}),
|
|
5218
|
+
}), Va = {
|
|
5064
5219
|
facebook: {
|
|
5065
5220
|
name: "Facebook",
|
|
5066
5221
|
color: "#1877F2",
|
|
@@ -5141,11 +5296,11 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5141
5296
|
color: "#1769FF",
|
|
5142
5297
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
5143
5298
|
}
|
|
5144
|
-
},
|
|
5299
|
+
}, Ha = {
|
|
5145
5300
|
small: 24,
|
|
5146
5301
|
medium: 32,
|
|
5147
5302
|
large: 48
|
|
5148
|
-
},
|
|
5303
|
+
}, Ua = [
|
|
5149
5304
|
"facebook",
|
|
5150
5305
|
"twitter",
|
|
5151
5306
|
"instagram",
|
|
@@ -5162,11 +5317,11 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5162
5317
|
"github",
|
|
5163
5318
|
"dribbble",
|
|
5164
5319
|
"behance"
|
|
5165
|
-
],
|
|
5320
|
+
], Wa = [
|
|
5166
5321
|
"width",
|
|
5167
5322
|
"height",
|
|
5168
5323
|
"fill"
|
|
5169
|
-
],
|
|
5324
|
+
], Ga = ["d"], Ka = /* @__PURE__ */ ue({
|
|
5170
5325
|
__name: "SocialIconSvg",
|
|
5171
5326
|
props: {
|
|
5172
5327
|
platform: {},
|
|
@@ -5174,7 +5329,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5174
5329
|
iconSize: {}
|
|
5175
5330
|
},
|
|
5176
5331
|
setup(e) {
|
|
5177
|
-
let t = e, n =
|
|
5332
|
+
let t = e, n = k(() => Va[t.platform]), r = k(() => Ha[t.iconSize]), i = k(() => {
|
|
5178
5333
|
let e = {
|
|
5179
5334
|
display: "inline-flex",
|
|
5180
5335
|
alignItems: "center",
|
|
@@ -5211,40 +5366,40 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5211
5366
|
};
|
|
5212
5367
|
default: return e;
|
|
5213
5368
|
}
|
|
5214
|
-
}), a =
|
|
5215
|
-
return (e, t) => (
|
|
5369
|
+
}), a = k(() => Math.floor(r.value * .6)), o = k(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
5370
|
+
return (e, t) => (I(), j("span", { style: F(i.value) }, [(I(), j("svg", {
|
|
5216
5371
|
width: a.value,
|
|
5217
5372
|
height: a.value,
|
|
5218
5373
|
viewBox: "0 0 24 24",
|
|
5219
5374
|
fill: o.value,
|
|
5220
5375
|
xmlns: "http://www.w3.org/2000/svg"
|
|
5221
|
-
}, [M("path", { d: n.value.path }, null, 8,
|
|
5376
|
+
}, [M("path", { d: n.value.path }, null, 8, Ga)], 8, Wa))], 4));
|
|
5222
5377
|
}
|
|
5223
|
-
}),
|
|
5378
|
+
}), qa = { class: "tpl:w-full" }, Ja = ["href"], Ya = {
|
|
5224
5379
|
key: 1,
|
|
5225
5380
|
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)]"
|
|
5226
|
-
},
|
|
5381
|
+
}, Xa = /* @__PURE__ */ ue({
|
|
5227
5382
|
__name: "SocialIconsBlock",
|
|
5228
5383
|
props: {
|
|
5229
5384
|
block: {},
|
|
5230
5385
|
viewport: {}
|
|
5231
5386
|
},
|
|
5232
5387
|
setup(e) {
|
|
5233
|
-
let t = e, { t: n } = E(), r =
|
|
5388
|
+
let t = e, { t: n } = E(), r = k(() => ({
|
|
5234
5389
|
display: "flex",
|
|
5235
5390
|
flexWrap: "wrap",
|
|
5236
5391
|
gap: `${t.block.spacing}px`,
|
|
5237
5392
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
5238
|
-
})), i =
|
|
5239
|
-
return (t, a) => (
|
|
5393
|
+
})), i = k(() => t.block.icons.length > 0);
|
|
5394
|
+
return (t, a) => (I(), j("div", qa, [i.value ? (I(), j("div", {
|
|
5240
5395
|
key: 0,
|
|
5241
|
-
style:
|
|
5242
|
-
}, [(
|
|
5396
|
+
style: F(r.value)
|
|
5397
|
+
}, [(I(!0), j(oe, null, _e(e.block.icons, (t) => (I(), j("a", {
|
|
5243
5398
|
key: t.id,
|
|
5244
5399
|
href: t.url || "#",
|
|
5245
5400
|
class: "tpl:cursor-default",
|
|
5246
|
-
onClick: a[0] ||=
|
|
5247
|
-
}, [N(
|
|
5401
|
+
onClick: a[0] ||= De(() => {}, ["prevent"])
|
|
5402
|
+
}, [N(Ka, {
|
|
5248
5403
|
platform: t.platform,
|
|
5249
5404
|
"icon-style": e.block.iconStyle,
|
|
5250
5405
|
"icon-size": e.block.iconSize
|
|
@@ -5252,72 +5407,72 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5252
5407
|
"platform",
|
|
5253
5408
|
"icon-style",
|
|
5254
5409
|
"icon-size"
|
|
5255
|
-
])], 8,
|
|
5410
|
+
])], 8, Ja))), 128))], 4)) : (I(), j("div", Ya, [N(B(Ht), { size: 16 }), M("span", null, z(B(n).social.addIcons), 1)]))]));
|
|
5256
5411
|
}
|
|
5257
|
-
}),
|
|
5412
|
+
}), Za = { class: "tpl:w-full" }, Qa = {
|
|
5258
5413
|
key: 0,
|
|
5259
5414
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
5260
5415
|
style: {
|
|
5261
5416
|
"background-color": "var(--tpl-bg-hover)",
|
|
5262
5417
|
color: "var(--tpl-text-dim)"
|
|
5263
5418
|
}
|
|
5264
|
-
},
|
|
5419
|
+
}, $a = /* @__PURE__ */ ue({
|
|
5265
5420
|
__name: "SpacerBlock",
|
|
5266
5421
|
props: {
|
|
5267
5422
|
block: {},
|
|
5268
5423
|
viewport: {}
|
|
5269
5424
|
},
|
|
5270
5425
|
setup(e) {
|
|
5271
|
-
let t = e, n =
|
|
5426
|
+
let t = e, n = l(p, "SpacerBlock"), r = k(() => ({
|
|
5272
5427
|
height: `${t.block.height}px`,
|
|
5273
5428
|
minHeight: `${t.block.height}px`,
|
|
5274
5429
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
5275
5430
|
}));
|
|
5276
|
-
return (t, i) => (
|
|
5277
|
-
style:
|
|
5278
|
-
class:
|
|
5279
|
-
}, [
|
|
5431
|
+
return (t, i) => (I(), j("div", Za, [M("div", {
|
|
5432
|
+
style: F(r.value),
|
|
5433
|
+
class: pe(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !B(n).state.previewMode }])
|
|
5434
|
+
}, [B(n).state.previewMode ? A("", !0) : (I(), j("span", Qa, z(e.block.height) + "px ", 1))], 6)]));
|
|
5280
5435
|
}
|
|
5281
|
-
}),
|
|
5436
|
+
}), eo = { class: "tpl:w-full" }, to = { key: 0 }, no = [
|
|
5282
5437
|
"aria-label",
|
|
5283
5438
|
"data-placeholder",
|
|
5284
5439
|
"onBlur",
|
|
5285
5440
|
"textContent"
|
|
5286
|
-
],
|
|
5441
|
+
], ro = [
|
|
5287
5442
|
"aria-label",
|
|
5288
5443
|
"data-placeholder",
|
|
5289
5444
|
"onBlur",
|
|
5290
5445
|
"textContent"
|
|
5291
|
-
],
|
|
5446
|
+
], io = {
|
|
5292
5447
|
key: 1,
|
|
5293
5448
|
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)]"
|
|
5294
|
-
},
|
|
5449
|
+
}, ao = /* @__PURE__ */ te(/* @__PURE__ */ ue({
|
|
5295
5450
|
__name: "TableBlock",
|
|
5296
5451
|
props: {
|
|
5297
5452
|
block: {},
|
|
5298
5453
|
viewport: {}
|
|
5299
5454
|
},
|
|
5300
5455
|
setup(e) {
|
|
5301
|
-
let t = e, { t: n } = E(), r =
|
|
5456
|
+
let t = e, { t: n } = E(), r = l(p, "TableBlock"), i = k(() => t.block.rows.length > 0), a = k(() => ({
|
|
5302
5457
|
width: "100%",
|
|
5303
5458
|
borderCollapse: "collapse",
|
|
5304
5459
|
fontSize: `${t.block.fontSize}px`,
|
|
5305
5460
|
color: t.block.color,
|
|
5306
5461
|
textAlign: t.block.textAlign,
|
|
5307
5462
|
fontFamily: t.block.fontFamily || "inherit"
|
|
5308
|
-
})), o =
|
|
5463
|
+
})), o = k(() => ({
|
|
5309
5464
|
border: `${t.block.borderWidth}px solid ${t.block.borderColor}`,
|
|
5310
5465
|
padding: `${t.block.cellPadding}px`,
|
|
5311
5466
|
textAlign: t.block.textAlign
|
|
5312
|
-
})), s =
|
|
5467
|
+
})), s = k(() => ({
|
|
5313
5468
|
...o.value,
|
|
5314
5469
|
fontWeight: "bold",
|
|
5315
5470
|
backgroundColor: t.block.headerBackgroundColor || "transparent"
|
|
5316
|
-
})), c =
|
|
5317
|
-
function
|
|
5471
|
+
})), c = k(() => t.block.hasHeaderRow && t.block.rows.length > 0 ? t.block.rows[0] : null), u = k(() => t.block.hasHeaderRow ? t.block.rows.slice(1) : t.block.rows);
|
|
5472
|
+
function d() {
|
|
5318
5473
|
r.selectBlock(t.block.id);
|
|
5319
5474
|
}
|
|
5320
|
-
function
|
|
5475
|
+
function f(e, n, i) {
|
|
5321
5476
|
let a = i.target.innerText.trim(), o = t.block.rows.map((t) => t.id === e ? {
|
|
5322
5477
|
...t,
|
|
5323
5478
|
cells: t.cells.map((e) => e.id === n ? {
|
|
@@ -5327,40 +5482,40 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5327
5482
|
} : t);
|
|
5328
5483
|
r.updateBlock(t.block.id, { rows: o });
|
|
5329
5484
|
}
|
|
5330
|
-
return (e, t) => (
|
|
5485
|
+
return (e, t) => (I(), j("div", eo, [i.value ? (I(), j("table", {
|
|
5331
5486
|
key: 0,
|
|
5332
|
-
style:
|
|
5487
|
+
style: F(a.value),
|
|
5333
5488
|
class: "tpl-table-editable"
|
|
5334
|
-
}, [c.value ? (
|
|
5489
|
+
}, [c.value ? (I(), j("thead", to, [M("tr", null, [(I(!0), j(oe, null, _e(c.value.cells, (e) => (I(), j("th", {
|
|
5335
5490
|
key: e.id,
|
|
5336
|
-
style:
|
|
5337
|
-
"aria-label":
|
|
5491
|
+
style: F(s.value),
|
|
5492
|
+
"aria-label": B(n).table.cellPlaceholder,
|
|
5338
5493
|
contenteditable: "true",
|
|
5339
|
-
"data-placeholder":
|
|
5340
|
-
onBlur: (t) =>
|
|
5341
|
-
onKeydown: t[0] ||=
|
|
5342
|
-
onClick:
|
|
5343
|
-
textContent:
|
|
5344
|
-
}, null, 44,
|
|
5494
|
+
"data-placeholder": B(n).table.cellPlaceholder,
|
|
5495
|
+
onBlur: (t) => f(c.value.id, e.id, t),
|
|
5496
|
+
onKeydown: t[0] ||= Ee(De((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
5497
|
+
onClick: De(d, ["stop"]),
|
|
5498
|
+
textContent: z(e.content)
|
|
5499
|
+
}, null, 44, no))), 128))])])) : A("", !0), M("tbody", null, [(I(!0), j(oe, null, _e(u.value, (e) => (I(), j("tr", { key: e.id }, [(I(!0), j(oe, null, _e(e.cells, (r) => (I(), j("td", {
|
|
5345
5500
|
key: r.id,
|
|
5346
|
-
style:
|
|
5347
|
-
"aria-label":
|
|
5501
|
+
style: F(o.value),
|
|
5502
|
+
"aria-label": B(n).table.cellPlaceholder,
|
|
5348
5503
|
contenteditable: "true",
|
|
5349
|
-
"data-placeholder":
|
|
5350
|
-
onBlur: (t) =>
|
|
5351
|
-
onKeydown: t[1] ||=
|
|
5352
|
-
onClick:
|
|
5353
|
-
textContent:
|
|
5354
|
-
}, null, 44,
|
|
5504
|
+
"data-placeholder": B(n).table.cellPlaceholder,
|
|
5505
|
+
onBlur: (t) => f(e.id, r.id, t),
|
|
5506
|
+
onKeydown: t[1] ||= Ee(De((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
5507
|
+
onClick: De(d, ["stop"]),
|
|
5508
|
+
textContent: z(r.content)
|
|
5509
|
+
}, null, 44, ro))), 128))]))), 128))])], 4)) : (I(), j("div", io, [N(B(Ut), { size: 16 }), M("span", null, z(B(n).table.empty), 1)]))]));
|
|
5355
5510
|
}
|
|
5356
|
-
}), [["__scopeId", "data-v-dfc60174"]]),
|
|
5511
|
+
}), [["__scopeId", "data-v-dfc60174"]]), oo = /* @__PURE__ */ ue({
|
|
5357
5512
|
__name: "VideoPlayButton",
|
|
5358
5513
|
props: { hoverEffect: {
|
|
5359
5514
|
type: Boolean,
|
|
5360
5515
|
default: !1
|
|
5361
5516
|
} },
|
|
5362
5517
|
setup(e) {
|
|
5363
|
-
return (t, n) => (
|
|
5518
|
+
return (t, n) => (I(), j("div", { class: pe(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [M("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-white/90 tpl:shadow-lg" }, [M("svg", {
|
|
5364
5519
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
5365
5520
|
width: "28",
|
|
5366
5521
|
height: "28",
|
|
@@ -5371,7 +5526,7 @@ var ai, oi, si, ci, li, ui, di, fi, pi, mi, hi, gi, _i, vi, yi, bi, q, J, Y, X,
|
|
|
5371
5526
|
});
|
|
5372
5527
|
//#endregion
|
|
5373
5528
|
//#region src/utils/videoThumbnail.ts
|
|
5374
|
-
function
|
|
5529
|
+
function so(e) {
|
|
5375
5530
|
if (!e) return {
|
|
5376
5531
|
platform: "unknown",
|
|
5377
5532
|
videoId: null,
|
|
@@ -5403,127 +5558,130 @@ function eo(e) {
|
|
|
5403
5558
|
thumbnailUrl: null
|
|
5404
5559
|
};
|
|
5405
5560
|
}
|
|
5406
|
-
function
|
|
5407
|
-
return t ||
|
|
5561
|
+
function co(e, t) {
|
|
5562
|
+
return t || so(e).thumbnailUrl;
|
|
5408
5563
|
}
|
|
5409
5564
|
//#endregion
|
|
5410
5565
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
5411
|
-
var
|
|
5566
|
+
var lo = ["src", "alt"], uo = {
|
|
5412
5567
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
5413
5568
|
style: { opacity: "0.7" }
|
|
5414
|
-
},
|
|
5569
|
+
}, fo = ["href"], po = ["src", "alt"], mo = ["src", "alt"], ho = {
|
|
5415
5570
|
key: 3,
|
|
5416
5571
|
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)]"
|
|
5417
|
-
},
|
|
5572
|
+
}, go = /* @__PURE__ */ ue({
|
|
5418
5573
|
__name: "VideoBlock",
|
|
5419
5574
|
props: {
|
|
5420
5575
|
block: {},
|
|
5421
5576
|
viewport: {}
|
|
5422
5577
|
},
|
|
5423
5578
|
setup(e) {
|
|
5424
|
-
let t = e, { t: n } = E(), { syntax: r } =
|
|
5579
|
+
let t = e, { t: n } = E(), { syntax: r } = ae(), i = k(() => Fe(t.block.url, r) || Fe(t.block.thumbnailUrl, r)), a = k(() => i.value ? null : co(t.block.url, t.block.thumbnailUrl)), o = k(() => ({ textAlign: t.block.align })), s = k(() => ({
|
|
5425
5580
|
maxWidth: "100%",
|
|
5426
5581
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
5427
5582
|
display: "block",
|
|
5428
5583
|
margin: t.block.align === "center" ? "0 auto" : void 0,
|
|
5429
5584
|
marginLeft: t.block.align === "right" ? "auto" : void 0
|
|
5430
|
-
})), c =
|
|
5431
|
-
return (t, r) => (
|
|
5585
|
+
})), c = k(() => Fe(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
5586
|
+
return (t, r) => (I(), j("div", {
|
|
5432
5587
|
class: "tpl:w-full",
|
|
5433
|
-
style:
|
|
5434
|
-
}, [i.value && e.block.placeholderUrl ? (
|
|
5588
|
+
style: F(o.value)
|
|
5589
|
+
}, [i.value && e.block.placeholderUrl ? (I(), j("div", {
|
|
5435
5590
|
key: 0,
|
|
5436
5591
|
class: "tpl:relative tpl:inline-block",
|
|
5437
|
-
style:
|
|
5592
|
+
style: F(s.value)
|
|
5438
5593
|
}, [M("img", {
|
|
5439
5594
|
class: "tpl:w-full tpl:border-0",
|
|
5440
5595
|
src: e.block.placeholderUrl,
|
|
5441
5596
|
alt: e.block.alt
|
|
5442
|
-
}, null, 8,
|
|
5597
|
+
}, null, 8, lo), N(oo)], 4)) : i.value ? (I(), j("div", {
|
|
5443
5598
|
key: 1,
|
|
5444
5599
|
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)]",
|
|
5445
|
-
style:
|
|
5446
|
-
}, [N(
|
|
5600
|
+
style: F([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
5601
|
+
}, [N(B(Wt), {
|
|
5447
5602
|
size: 36,
|
|
5448
5603
|
"stroke-width": 1.5,
|
|
5449
5604
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
5450
5605
|
style: { opacity: "0.5" }
|
|
5451
|
-
}), M("span",
|
|
5606
|
+
}), M("span", uo, z(c.value), 1)], 4)) : a.value ? (I(), j(oe, { key: 2 }, [e.block.url ? (I(), j("a", {
|
|
5452
5607
|
key: 0,
|
|
5453
5608
|
href: e.block.url,
|
|
5454
5609
|
target: "_blank",
|
|
5455
5610
|
rel: "noopener noreferrer",
|
|
5456
5611
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
5457
|
-
style:
|
|
5458
|
-
onClick: r[0] ||=
|
|
5612
|
+
style: F(s.value),
|
|
5613
|
+
onClick: r[0] ||= De(() => {}, ["prevent"])
|
|
5459
5614
|
}, [M("img", {
|
|
5460
5615
|
class: "tpl:w-full tpl:border-0",
|
|
5461
5616
|
src: a.value,
|
|
5462
5617
|
alt: e.block.alt
|
|
5463
|
-
}, null, 8,
|
|
5618
|
+
}, null, 8, po), N(oo, { "hover-effect": "" })], 12, fo)) : (I(), j("div", {
|
|
5464
5619
|
key: 1,
|
|
5465
5620
|
class: "tpl:relative tpl:inline-block",
|
|
5466
|
-
style:
|
|
5621
|
+
style: F(s.value)
|
|
5467
5622
|
}, [M("img", {
|
|
5468
5623
|
class: "tpl:w-full tpl:border-0",
|
|
5469
5624
|
src: a.value,
|
|
5470
5625
|
alt: e.block.alt
|
|
5471
|
-
}, null, 8,
|
|
5626
|
+
}, null, 8, mo), N(oo)], 4))], 64)) : (I(), j("div", ho, [N(B(Wt), {
|
|
5472
5627
|
size: 40,
|
|
5473
5628
|
"stroke-width": 1.5,
|
|
5474
5629
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
5475
|
-
}), M("span", null,
|
|
5630
|
+
}), M("span", null, z(B(n).video.addVideo), 1)]))], 4));
|
|
5476
5631
|
}
|
|
5477
|
-
}),
|
|
5478
|
-
section:
|
|
5479
|
-
title:
|
|
5480
|
-
paragraph:
|
|
5481
|
-
image:
|
|
5482
|
-
button:
|
|
5483
|
-
divider:
|
|
5484
|
-
video:
|
|
5485
|
-
social:
|
|
5486
|
-
menu:
|
|
5487
|
-
table:
|
|
5488
|
-
spacer:
|
|
5489
|
-
html:
|
|
5490
|
-
countdown:
|
|
5632
|
+
}), _o = {
|
|
5633
|
+
section: Ba,
|
|
5634
|
+
title: tr,
|
|
5635
|
+
paragraph: Rn,
|
|
5636
|
+
image: jn,
|
|
5637
|
+
button: Dt,
|
|
5638
|
+
divider: hn,
|
|
5639
|
+
video: go,
|
|
5640
|
+
social: Xa,
|
|
5641
|
+
menu: Fn,
|
|
5642
|
+
table: ao,
|
|
5643
|
+
spacer: $a,
|
|
5644
|
+
html: bn,
|
|
5645
|
+
countdown: jt
|
|
5491
5646
|
};
|
|
5492
|
-
function
|
|
5493
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: o, format:
|
|
5647
|
+
function vo(e) {
|
|
5648
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: o, format: l } = E(r);
|
|
5494
5649
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
5495
|
-
let { resolvedTheme: D } =
|
|
5496
|
-
themeOverrides:
|
|
5650
|
+
let { resolvedTheme: D } = mt(k(() => t.state.uiTheme)), te = R(n.theme ?? {}), { themeStyles: ne } = gt({
|
|
5651
|
+
themeOverrides: te,
|
|
5497
5652
|
resolvedTheme: D,
|
|
5498
5653
|
extraStyles: e.themeExtraStyles
|
|
5499
|
-
}),
|
|
5654
|
+
}), O = Me({
|
|
5500
5655
|
content: t.content,
|
|
5501
5656
|
setContent: (e, n) => t.setContent(e, n),
|
|
5502
5657
|
...e.historyOptions
|
|
5503
5658
|
});
|
|
5504
|
-
|
|
5505
|
-
let
|
|
5659
|
+
Ne(t, O);
|
|
5660
|
+
let re = ke({
|
|
5506
5661
|
addBlock: t.addBlock,
|
|
5507
5662
|
removeBlock: t.removeBlock,
|
|
5508
5663
|
updateBlock: t.updateBlock,
|
|
5509
5664
|
selectBlock: t.selectBlock,
|
|
5510
5665
|
blockDefaults: n.blockDefaults
|
|
5511
|
-
}),
|
|
5666
|
+
}), ie = Ae(t), ae = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Oe({
|
|
5512
5667
|
content: t.content,
|
|
5513
5668
|
isDirty: () => t.state.isDirty,
|
|
5514
5669
|
...e.autoSaveOptions
|
|
5515
|
-
}) : null,
|
|
5516
|
-
|
|
5517
|
-
e ?
|
|
5670
|
+
}) : null, oe = null;
|
|
5671
|
+
ae && (oe = Ce(O.isNavigating, (e) => {
|
|
5672
|
+
e ? ae.pause() : ae.resume();
|
|
5518
5673
|
}));
|
|
5519
|
-
let
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5674
|
+
let se = pt(t, {
|
|
5675
|
+
t: o,
|
|
5676
|
+
format: l
|
|
5677
|
+
}), A = bt();
|
|
5678
|
+
if (St(A, _o), n.customBlocks?.length) for (let e of n.customBlocks) A.registerCustom(e, pn);
|
|
5679
|
+
function j(e) {
|
|
5680
|
+
for (let t of e) A.registerCustom(t, pn);
|
|
5523
5681
|
}
|
|
5524
|
-
function
|
|
5525
|
-
|
|
5526
|
-
history:
|
|
5682
|
+
function M(r) {
|
|
5683
|
+
wt(r, {
|
|
5684
|
+
history: O,
|
|
5527
5685
|
selectBlock: (e) => t.selectBlock(e),
|
|
5528
5686
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
5529
5687
|
removeBlock: (e) => t.removeBlock(e),
|
|
@@ -5531,26 +5689,27 @@ function uo(e) {
|
|
|
5531
5689
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
5532
5690
|
});
|
|
5533
5691
|
}
|
|
5534
|
-
a(document, "keydown",
|
|
5535
|
-
let
|
|
5536
|
-
|
|
5537
|
-
function
|
|
5538
|
-
|
|
5692
|
+
a(document, "keydown", M), L(s, r), L(p, t), L(v, O), L(g, re), L(_, ie), L(x, i), L(c, ne), L(w, D), L(d, n.blockDefaults), L(b, A), L(C, n.customBlocks ?? []);
|
|
5693
|
+
let ce = Qe(n.mergeTags?.syntax);
|
|
5694
|
+
L(m, n.mergeTags?.tags ?? []), L(u, ce), L(T, n.mergeTags?.onRequest ?? null), L(ee, n.onRequestMedia ?? null), L(f, n.displayConditions?.conditions ?? []), L(y, n.displayConditions?.allowCustom ?? !1), L(S, e.capabilities ?? {}), L(h, se);
|
|
5695
|
+
function N() {
|
|
5696
|
+
oe?.(), ae?.destroy(), O.destroy();
|
|
5539
5697
|
}
|
|
5540
5698
|
return {
|
|
5541
5699
|
t: o,
|
|
5542
|
-
format:
|
|
5543
|
-
history:
|
|
5544
|
-
blockActions:
|
|
5545
|
-
conditionPreview:
|
|
5546
|
-
autoSave:
|
|
5700
|
+
format: l,
|
|
5701
|
+
history: O,
|
|
5702
|
+
blockActions: re,
|
|
5703
|
+
conditionPreview: ie,
|
|
5704
|
+
autoSave: ae,
|
|
5547
5705
|
resolvedTheme: D,
|
|
5548
|
-
themeStyles:
|
|
5549
|
-
themeOverrides:
|
|
5550
|
-
registry:
|
|
5551
|
-
|
|
5552
|
-
|
|
5706
|
+
themeStyles: ne,
|
|
5707
|
+
themeOverrides: te,
|
|
5708
|
+
registry: A,
|
|
5709
|
+
keyboardReorder: se,
|
|
5710
|
+
registerCustomBlocks: j,
|
|
5711
|
+
destroy: N
|
|
5553
5712
|
};
|
|
5554
5713
|
}
|
|
5555
5714
|
//#endregion
|
|
5556
|
-
export {
|
|
5715
|
+
export { It as A, Xt as C, Ht as D, Ut as E, yt as F, ft as I, st as L, Pt as M, jt as N, Bt as O, Dt as P, lt as R, Zt as S, qt as T, bn as _, Xa as a, rn as b, Ba as c, $n as d, Bn as f, jn as g, Fn as h, $a as i, Ft as j, zt as k, Fa as l, Rn as m, go as n, Va as o, zn as p, ao as r, Ua as s, vo as t, tr as u, hn as v, Yt as w, tn as x, pn as y };
|