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