@templatical/editor 0.7.2 → 0.7.3
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-DWRONNm6.js → AiChatSidebar-H7SIsxeC.js} +49 -59
- package/dist/{AiFeatureMenu-U7b4Z8OV.js → AiFeatureMenu-CJGX-fP5.js} +1 -1
- package/dist/{CloudEditor-DgiUCNMn.js → CloudEditor-BBs3p-mW.js} +124 -120
- package/dist/{CollaboratorBar-BgeaMhrV.js → CollaboratorBar-CiEo25lb.js} +2 -2
- package/dist/{CommentsSidebar-BiRtaXYD.js → CommentsSidebar-DikjSLtH.js} +1 -1
- package/dist/{CountdownToolbar-CojjlZet.js → CountdownToolbar-Bn4RwJVN.js} +2 -2
- package/dist/{DesignReferenceSidebar-C1W02bYt.js → DesignReferenceSidebar-D08CLZPA.js} +1 -1
- package/dist/{ModuleBrowserModal-Bjh99_5c.js → ModuleBrowserModal-D6637s8j.js} +4 -4
- package/dist/{ModulePreviewCanvas-DDDQmUI_.js → ModulePreviewCanvas-DBFmwq-y.js} +1 -1
- package/dist/{NumberWithSuffix-CLTBb2Rj.js → NumberWithSuffix-CyFX9w1e.js} +1 -1
- package/dist/{ParagraphEditor-BSaEdasm.js → ParagraphEditor-DC2jOjNh.js} +16 -16
- package/dist/{RichTextEditorContent-C3QSg7gd.js → RichTextEditorContent-8NkjTIua.js} +1 -1
- package/dist/{SaveModuleDialog-9fX6oSxf.js → SaveModuleDialog-NKT7bWWs.js} +2 -2
- package/dist/{SnapshotHistory-gYW-IXkE.js → SnapshotHistory-XNqYxPBj.js} +2 -2
- package/dist/{TestEmailModal-B_Rmnngq.js → TestEmailModal-B_-Qo5Us.js} +2 -2
- package/dist/{TitleEditor-XbFuw1Vy.js → TitleEditor-DnH3yyTr.js} +7 -7
- package/dist/{TplModal-LY9rkDph.js → TplModal-BoEZFe3U.js} +2 -2
- package/dist/{blockTypeIcons-CLT2H0yU.js → blockTypeIcons-CUcYuWAO.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-DaqF4Xzy.js → AccessibilityPanel-CQt87OMk.js} +5 -5
- package/dist/cdn/chunks/{AccessibilityPanel-DaqF4Xzy.js.map → AccessibilityPanel-CQt87OMk.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-WhZ7G-Wr.js → AiFeatureMenu-SxIqfqA0.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-WhZ7G-Wr.js.map → AiFeatureMenu-SxIqfqA0.js.map} +1 -1
- package/dist/cdn/chunks/{BlockA11yBadge-BLKyO0lH.js → BlockA11yBadge-QqW6nomn.js} +3 -3
- package/dist/cdn/chunks/{BlockA11yBadge-BLKyO0lH.js.map → BlockA11yBadge-QqW6nomn.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BKEXPt3g.js → CloudEditor-ChWUIMw7.js} +165 -161
- package/dist/cdn/chunks/CloudEditor-ChWUIMw7.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-ASDiTitQ.js → CollaboratorBar-73LfbzqF.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-ASDiTitQ.js.map → CollaboratorBar-73LfbzqF.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-LAlYJYWL.js → CountdownBlock-WYz9b9Ex.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-LAlYJYWL.js.map → CountdownBlock-WYz9b9Ex.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CbIKGP7u.js → CountdownToolbar-B9fPfFqp.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-CbIKGP7u.js.map → CountdownToolbar-B9fPfFqp.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-BjmdleNq.js → ModuleBrowserModal-DfnJQBkM.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-BjmdleNq.js.map → ModuleBrowserModal-DfnJQBkM.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DsmACAdb.js → ModulePreviewCanvas-DE4_oHA_.js} +20 -20
- package/dist/cdn/chunks/{ModulePreviewCanvas-DsmACAdb.js.map → ModulePreviewCanvas-DE4_oHA_.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-EEDNj1my.js → NumberWithSuffix-BST0yRor.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-EEDNj1my.js.map → NumberWithSuffix-BST0yRor.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D6Dw5RtX.js → ParagraphEditor-CQfijF3i.js} +36 -36
- package/dist/cdn/chunks/{ParagraphEditor-D6Dw5RtX.js.map → ParagraphEditor-CQfijF3i.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C2yj_yPM.js → RichTextEditorContent-CBds8dnm.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-C2yj_yPM.js.map → RichTextEditorContent-CBds8dnm.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DCcvwYat.js → SaveModuleDialog-DXhuZgZ4.js} +13 -13
- package/dist/cdn/chunks/{SaveModuleDialog-DCcvwYat.js.map → SaveModuleDialog-DXhuZgZ4.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-isN_t0MJ.js → TitleEditor-BdQvH7eK.js} +7 -7
- package/dist/cdn/chunks/{TitleEditor-isN_t0MJ.js.map → TitleEditor-BdQvH7eK.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-Bgn69Q1-.js → blockTypeIcons-D3CGFW5P.js} +8 -8
- package/dist/cdn/chunks/{blockTypeIcons-Bgn69Q1-.js.map → blockTypeIcons-D3CGFW5P.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-BPsjY5N8.js → extensions-BE81zpqP.js} +50 -48
- package/dist/cdn/chunks/{extensions-BPsjY5N8.js.map → extensions-BE81zpqP.js.map} +1 -1
- package/dist/cdn/chunks/{features-BouLRfOO.js → features-CXF_YKlL.js} +1258 -1113
- package/dist/cdn/chunks/features-CXF_YKlL.js.map +1 -0
- package/dist/cdn/chunks/{icons-BBuZkqC3.js → icons-KbmhF7rg.js} +2 -2
- package/dist/cdn/chunks/{icons-BBuZkqC3.js.map → icons-KbmhF7rg.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-C-DcHE6w.js → media-library-BERe10wA.js} +103 -103
- package/dist/cdn/chunks/{media-library-C-DcHE6w.js.map → media-library-BERe10wA.js.map} +1 -1
- package/dist/cdn/chunks/{quality-ConWSEB6.js → quality-CmkY1kMU.js} +309 -309
- package/dist/cdn/chunks/{quality-ConWSEB6.js.map → quality-CmkY1kMU.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-F8cxEe3t.js → renderer-OttGEYkY.js} +50 -50
- package/dist/cdn/chunks/{renderer-F8cxEe3t.js.map → renderer-OttGEYkY.js.map} +1 -1
- package/dist/cdn/chunks/{src-C9rMok-R.js → src-C21GI0p6.js} +6 -6
- package/dist/cdn/chunks/{src-C9rMok-R.js.map → src-C21GI0p6.js.map} +1 -1
- package/dist/cdn/chunks/styles-Cy-My9zK.js +2976 -0
- package/dist/cdn/chunks/styles-Cy-My9zK.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +109 -106
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{dist-DDJIWTRY.js → dist-B2jcQhv8.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-BYt3jdCR.js} +1 -1
- package/dist/{dist-aRzjfSRN.js → dist-CISFttkF.js} +1 -1
- package/dist/{dist-D6uC2xhi.js → dist-CfQPBf15.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-DD-9hatO.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-DUvhjQ2-.js} +1 -1
- package/dist/{dist-BaQIYPsn.js → dist-DVwOAodp.js} +1 -1
- package/dist/{dist-Cp0zXPAD.js → dist-DxD1kSdH.js} +1 -1
- package/dist/{dist-Pk4MhWMP.js → dist-U5guDm2w.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-hfu7I2rO.js} +3 -3
- package/dist/{dist-us-RpCWN.js → dist-v8h02hhE.js} +1 -1
- package/dist/{extensions-D-J02CiP.js → extensions-p6UBqXfg.js} +30 -28
- package/dist/index.d.ts +8 -8
- package/dist/style.css +1 -1
- package/dist/{styles-j_3bu0Bo.js → styles-BP15QmP3.js} +1058 -1052
- package/dist/templatical-editor.js +108 -105
- package/dist/useAliveFlag-D8GoB4VE.js +10 -0
- package/dist/{useEditorCore-B1XrI6fY.js → useEditorCore-_rbu6iMu.js} +921 -778
- package/package.json +7 -7
- package/dist/cdn/chunks/CloudEditor-BKEXPt3g.js.map +0 -1
- package/dist/cdn/chunks/features-BouLRfOO.js.map +0 -1
- package/dist/cdn/chunks/styles-BRN0i_zg.js +0 -2971
- package/dist/cdn/chunks/styles-BRN0i_zg.js.map +0 -1
- /package/dist/{AccessibilityPanel-D-PqmHdH.js → AccessibilityPanel-BeUibrUb.js} +0 -0
- /package/dist/{BlockA11yBadge-BFIw0h1m.js → BlockA11yBadge-BhyoMZJ9.js} +0 -0
- /package/dist/{CountdownBlock-Cq8A8WrM.js → CountdownBlock-ByJ0_8Pk.js} +0 -0
- /package/dist/{TemplateScoringPanel-V79yrEPC.js → TemplateScoringPanel-kYOGtac3.js} +0 -0
- /package/dist/{cloud-CTmfCSqf.js → cloud-k0DgeCo2.js} +0 -0
- /package/dist/{de-BhIWu_bO.js → de-C9hp3n_a.js} +0 -0
- /package/dist/{de-Di4MEjjx.js → de-GOtR9DwW.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-CQQS9SRN.js} +0 -0
- /package/dist/{emojiData-DX3E0XT-.js → emojiData-DrBuvEoP.js} +0 -0
- /package/dist/{en-D7HRbYah.js → en-Dv776AqL.js} +0 -0
- /package/dist/{en-BSuzi-Pd.js → en-dFFQVzNn.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-bvx5sFh5.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-DX8ZHRdq.js} +0 -0
- /package/dist/{pt-BR-K32lt6YP.js → pt-BR-6n58Fl_q.js} +0 -0
- /package/dist/{pt-BR-CCVBRais.js → pt-BR-iOr79aDg.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-CXzrEnNb.js} +0 -0
- /package/dist/{styleConstants-fWzlIIwN.js → styleConstants-DkfOPzGu.js} +0 -0
- /package/dist/{usePopoverRoot-BxJrqnMD.js → usePopoverRoot-BwzFSPLy.js} +0 -0
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as
|
|
2
|
-
import { A as
|
|
3
|
-
import { a as
|
|
4
|
-
import { A as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
1
|
+
import { A as e, B as t, D as n, E as r, F as i, G as a, J as o, L as s, M as c, N as l, O as u, Q as d, S as f, U as p, V as m, X as h, Y as g, _, at as v, b as y, c as b, d as x, et as S, f as C, h as w, it as T, j as E, k as ee, l as D, m as O, nt as k, o as te, ot as A, p as ne, q as re, rt as j, s as ie, st as M, v as N, w as P, x as ae, y as oe, z as se } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
|
+
import { A as ce, S as le, T as ue, _ as de, a as fe, b as pe, c as me, d as he, f as ge, g as _e, h as ve, j as ye, k as be, l as xe, m as Se, o as Ce, p as we, s as Te, t as Ee, u as De, v as Oe, x as ke, y as Ae } from "./dist-DJmnUmW9.js";
|
|
3
|
+
import { a as je, c as Me, i as Ne, l as Pe, n as Fe, r as Ie, s as Le } from "./dist-BzRLLpfq.js";
|
|
4
|
+
import { A as Re, C as ze, D as Be, O as Ve, S as He, _ as Ue, a as We, b as Ge, c as Ke, d as qe, f as Je, g as Ye, h as Xe, k as Ze, m as Qe, o as $e, p as et, r as tt, s as nt, t as rt, v as it, w as at, x as ot, y as st } from "./keys-B5SJtPWf.js";
|
|
5
|
+
import { t as ct } from "./useI18n-PEB8ioi_.js";
|
|
6
|
+
import { t as F } from "./createLucideIcon-Di4mqmGn.js";
|
|
7
|
+
import { t as lt } from "./message-circle-gzy2ZGJ3.js";
|
|
8
|
+
import { t as ut } from "./trash-2-424iqbpN.js";
|
|
9
|
+
import { t as dt } from "./triangle-alert-DWQySIE2.js";
|
|
10
|
+
import { t as ft } from "./LoadingTrack-CFkDkjBb.js";
|
|
11
|
+
import { t as pt } from "./_plugin-vue_export-helper-B0hnzhyu.js";
|
|
12
12
|
import "./useCloudI18n-ByEMykjO.js";
|
|
13
|
-
import { t as
|
|
13
|
+
import { t as mt } from "./useMergeTag-C47xwU7X.js";
|
|
14
|
+
import { t as ht } from "./useAliveFlag-D8GoB4VE.js";
|
|
14
15
|
//#region ../core/dist/index.js
|
|
15
16
|
function gt(e) {
|
|
17
|
+
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
18
|
+
}
|
|
19
|
+
function _t(e) {
|
|
16
20
|
let t = o({
|
|
17
|
-
content: e.content ??
|
|
21
|
+
content: e.content ?? De(e.defaultFontFamily, e.templateDefaults),
|
|
18
22
|
selectedBlockId: null,
|
|
19
23
|
viewport: "desktop",
|
|
20
24
|
darkMode: !1,
|
|
@@ -37,12 +41,15 @@ function gt(e) {
|
|
|
37
41
|
}
|
|
38
42
|
return null;
|
|
39
43
|
}
|
|
40
|
-
function a(e, t
|
|
44
|
+
function a(e, t) {
|
|
45
|
+
if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) a(e, t);
|
|
46
|
+
}
|
|
47
|
+
function s(e, t, n = { blocks: e }) {
|
|
41
48
|
for (let r = 0; r < e.length; r++) {
|
|
42
49
|
let i = e[r];
|
|
43
50
|
if (i.id === t) return n;
|
|
44
51
|
if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
|
|
45
|
-
let n =
|
|
52
|
+
let n = s(i.children[e], t, {
|
|
46
53
|
blocks: i.children[e],
|
|
47
54
|
sectionId: i.id,
|
|
48
55
|
columnIndex: e
|
|
@@ -52,11 +59,11 @@ function gt(e) {
|
|
|
52
59
|
}
|
|
53
60
|
return null;
|
|
54
61
|
}
|
|
55
|
-
function
|
|
62
|
+
function c(t) {
|
|
56
63
|
return e.lockedBlocks?.value.has(t) ?? !1;
|
|
57
64
|
}
|
|
58
|
-
function
|
|
59
|
-
let n =
|
|
65
|
+
function l(e) {
|
|
66
|
+
let n = s(t.content.blocks, e);
|
|
60
67
|
if (!n) return null;
|
|
61
68
|
let r = n.blocks.findIndex((t) => t.id === e);
|
|
62
69
|
return r === -1 ? null : {
|
|
@@ -65,40 +72,41 @@ function gt(e) {
|
|
|
65
72
|
index: r
|
|
66
73
|
};
|
|
67
74
|
}
|
|
68
|
-
function
|
|
75
|
+
function u(e, n = !0) {
|
|
69
76
|
t.content = e, n && (t.isDirty = !0);
|
|
70
77
|
}
|
|
71
|
-
function u(e) {
|
|
72
|
-
e && s(e) || (t.selectedBlockId = e);
|
|
73
|
-
}
|
|
74
78
|
function d(e) {
|
|
75
|
-
t.
|
|
79
|
+
e && c(e) || (t.selectedBlockId = e);
|
|
76
80
|
}
|
|
77
81
|
function f(e) {
|
|
78
|
-
t.
|
|
82
|
+
t.viewport = e;
|
|
79
83
|
}
|
|
80
84
|
function p(e) {
|
|
81
|
-
t.
|
|
85
|
+
t.darkMode = e;
|
|
82
86
|
}
|
|
83
87
|
function h(e) {
|
|
88
|
+
t.uiTheme = e;
|
|
89
|
+
}
|
|
90
|
+
function _(e) {
|
|
84
91
|
t.previewMode = e, e && (t.selectedBlockId = null);
|
|
85
92
|
}
|
|
86
|
-
function
|
|
87
|
-
if (
|
|
93
|
+
function v(e, n) {
|
|
94
|
+
if (c(e)) return;
|
|
88
95
|
let r = i(t.content.blocks, e);
|
|
89
96
|
r && (Object.assign(r, n), t.isDirty = !0);
|
|
90
97
|
}
|
|
91
|
-
function
|
|
98
|
+
function y(e) {
|
|
92
99
|
t.content.settings = {
|
|
93
100
|
...t.content.settings,
|
|
94
101
|
...e
|
|
95
102
|
}, t.isDirty = !0;
|
|
96
103
|
}
|
|
97
|
-
function
|
|
104
|
+
function b(e, n, r = 0, a) {
|
|
98
105
|
if (n) {
|
|
99
|
-
if (
|
|
106
|
+
if (c(n)) return;
|
|
100
107
|
let o = i(t.content.blocks, n);
|
|
101
108
|
if (o && o.type === "section") {
|
|
109
|
+
if (r < 0 || r >= gt(o.columns)) return;
|
|
102
110
|
o.children[r] = o.children[r] || [];
|
|
103
111
|
let t = o.children[r];
|
|
104
112
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -106,55 +114,62 @@ function gt(e) {
|
|
|
106
114
|
} else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
|
|
107
115
|
t.isDirty = !0;
|
|
108
116
|
}
|
|
109
|
-
function
|
|
110
|
-
if (
|
|
111
|
-
let n =
|
|
117
|
+
function x(e) {
|
|
118
|
+
if (c(e)) return;
|
|
119
|
+
let n = s(t.content.blocks, e);
|
|
112
120
|
if (n) {
|
|
113
121
|
let r = n.blocks.findIndex((t) => t.id === e);
|
|
114
|
-
r !== -1
|
|
122
|
+
if (r !== -1) {
|
|
123
|
+
let [e] = n.blocks.splice(r, 1);
|
|
124
|
+
if (t.selectedBlockId) {
|
|
125
|
+
let n = /* @__PURE__ */ new Set();
|
|
126
|
+
a(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
|
|
127
|
+
}
|
|
128
|
+
t.isDirty = !0;
|
|
129
|
+
}
|
|
115
130
|
}
|
|
116
131
|
}
|
|
117
|
-
function
|
|
118
|
-
if (
|
|
119
|
-
let
|
|
120
|
-
if (!
|
|
121
|
-
let l =
|
|
132
|
+
function S(e, n, r, a = 0) {
|
|
133
|
+
if (c(e) || r && c(r)) return;
|
|
134
|
+
let o = s(t.content.blocks, e);
|
|
135
|
+
if (!o) return;
|
|
136
|
+
let l = o.blocks.findIndex((t) => t.id === e);
|
|
122
137
|
if (l === -1) return;
|
|
123
138
|
let u;
|
|
124
139
|
if (r) {
|
|
125
140
|
let e = i(t.content.blocks, r);
|
|
126
|
-
if (!e || e.type !== "section") return;
|
|
127
|
-
e.children[
|
|
141
|
+
if (!e || e.type !== "section" || a < 0 || a >= gt(e.columns)) return;
|
|
142
|
+
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
128
143
|
} else u = t.content.blocks;
|
|
129
|
-
let [d] =
|
|
144
|
+
let [d] = o.blocks.splice(l, 1);
|
|
130
145
|
u.splice(n, 0, d), t.isDirty = !0;
|
|
131
146
|
}
|
|
132
|
-
function
|
|
147
|
+
function C() {
|
|
133
148
|
t.isDirty = !0;
|
|
134
149
|
}
|
|
135
150
|
return {
|
|
136
151
|
state: g(t),
|
|
137
152
|
content: n,
|
|
138
153
|
selectedBlock: r,
|
|
139
|
-
isBlockLocked:
|
|
140
|
-
setContent:
|
|
141
|
-
selectBlock:
|
|
142
|
-
setViewport:
|
|
143
|
-
setDarkMode:
|
|
144
|
-
setUiTheme:
|
|
145
|
-
setPreviewMode:
|
|
146
|
-
updateBlock:
|
|
147
|
-
updateSettings:
|
|
148
|
-
addBlock:
|
|
149
|
-
removeBlock:
|
|
150
|
-
moveBlock:
|
|
151
|
-
markDirty:
|
|
152
|
-
findBlockLocation:
|
|
154
|
+
isBlockLocked: c,
|
|
155
|
+
setContent: u,
|
|
156
|
+
selectBlock: d,
|
|
157
|
+
setViewport: f,
|
|
158
|
+
setDarkMode: p,
|
|
159
|
+
setUiTheme: h,
|
|
160
|
+
setPreviewMode: _,
|
|
161
|
+
updateBlock: v,
|
|
162
|
+
updateSettings: y,
|
|
163
|
+
addBlock: b,
|
|
164
|
+
removeBlock: x,
|
|
165
|
+
moveBlock: S,
|
|
166
|
+
markDirty: C,
|
|
167
|
+
findBlockLocation: l
|
|
153
168
|
};
|
|
154
169
|
}
|
|
155
|
-
var
|
|
156
|
-
function
|
|
157
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
170
|
+
var vt = 50, yt = 300, bt = 1500;
|
|
171
|
+
function xt(e) {
|
|
172
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = vt } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
|
|
158
173
|
function f() {
|
|
159
174
|
let e = /* @__PURE__ */ new WeakSet();
|
|
160
175
|
return JSON.parse(JSON.stringify(t.value, (t, n) => {
|
|
@@ -179,21 +194,21 @@ function bt(e) {
|
|
|
179
194
|
if (l && l.blockId === e) {
|
|
180
195
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
181
196
|
l = null;
|
|
182
|
-
},
|
|
197
|
+
}, yt);
|
|
183
198
|
return;
|
|
184
199
|
}
|
|
185
200
|
g(), p(f()), o.value = [], l = {
|
|
186
201
|
blockId: e,
|
|
187
202
|
timeoutId: setTimeout(() => {
|
|
188
203
|
l = null;
|
|
189
|
-
},
|
|
204
|
+
}, yt)
|
|
190
205
|
};
|
|
191
206
|
}
|
|
192
207
|
}
|
|
193
208
|
function y() {
|
|
194
209
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
195
210
|
s.value = !1, c = null;
|
|
196
|
-
},
|
|
211
|
+
}, bt);
|
|
197
212
|
}
|
|
198
213
|
function b() {
|
|
199
214
|
if (a.value.length === 0) return;
|
|
@@ -225,17 +240,33 @@ function bt(e) {
|
|
|
225
240
|
destroy: C
|
|
226
241
|
};
|
|
227
242
|
}
|
|
228
|
-
function
|
|
243
|
+
function St(e) {
|
|
244
|
+
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
245
|
+
...e,
|
|
246
|
+
id: le(),
|
|
247
|
+
cells: e.cells.map((e) => ({
|
|
248
|
+
...e,
|
|
249
|
+
id: le()
|
|
250
|
+
}))
|
|
251
|
+
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
252
|
+
...e,
|
|
253
|
+
id: le()
|
|
254
|
+
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
255
|
+
...e,
|
|
256
|
+
id: le()
|
|
257
|
+
})));
|
|
258
|
+
}
|
|
259
|
+
function Ct(e) {
|
|
229
260
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
230
261
|
function o(n, r, a) {
|
|
231
|
-
let o =
|
|
262
|
+
let o = Ce(n, e.blockDefaults);
|
|
232
263
|
return t(o, r, a), i(o.id), o;
|
|
233
264
|
}
|
|
234
265
|
function s(e, n, r) {
|
|
235
266
|
let o = JSON.parse(JSON.stringify(e));
|
|
236
|
-
if (o.id =
|
|
267
|
+
if (o.id = le(), St(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
237
268
|
let t = JSON.parse(JSON.stringify(e));
|
|
238
|
-
return t.id =
|
|
269
|
+
return t.id = le(), St(t), t;
|
|
239
270
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
240
271
|
else {
|
|
241
272
|
let i = a?.(e.id) ?? null;
|
|
@@ -256,7 +287,7 @@ function xt(e) {
|
|
|
256
287
|
updateBlockProperty: l
|
|
257
288
|
};
|
|
258
289
|
}
|
|
259
|
-
function
|
|
290
|
+
function wt(e) {
|
|
260
291
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
261
292
|
function c() {
|
|
262
293
|
return typeof a == "function" ? a() : a;
|
|
@@ -292,7 +323,7 @@ function St(e) {
|
|
|
292
323
|
destroy: h
|
|
293
324
|
};
|
|
294
325
|
}
|
|
295
|
-
function
|
|
326
|
+
function Tt(e) {
|
|
296
327
|
let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
|
|
297
328
|
function r(e) {
|
|
298
329
|
return t.has(e);
|
|
@@ -310,7 +341,7 @@ function Ct(e) {
|
|
|
310
341
|
hasHiddenBlocks: n
|
|
311
342
|
};
|
|
312
343
|
}
|
|
313
|
-
function
|
|
344
|
+
function Et(e) {
|
|
314
345
|
let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
|
|
315
346
|
async function a() {
|
|
316
347
|
let r = e.definition.value;
|
|
@@ -340,7 +371,7 @@ function wt(e) {
|
|
|
340
371
|
needsFetch: i
|
|
341
372
|
};
|
|
342
373
|
}
|
|
343
|
-
function
|
|
374
|
+
function Dt(e, t) {
|
|
344
375
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
345
376
|
e.addBlock = (r, i, a, o) => {
|
|
346
377
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -355,15 +386,34 @@ function Tt(e, t) {
|
|
|
355
386
|
};
|
|
356
387
|
}
|
|
357
388
|
//#endregion
|
|
389
|
+
//#region src/utils/activeEditorTracker.ts
|
|
390
|
+
var Ot = /* @__PURE__ */ new Set(), kt = 0, At = 0;
|
|
391
|
+
function jt() {
|
|
392
|
+
let e = ++At;
|
|
393
|
+
return Ot.add(e), kt === 0 && (kt = e), {
|
|
394
|
+
id: e,
|
|
395
|
+
isActive: () => Ot.size <= 1 || kt === e,
|
|
396
|
+
claim: () => {
|
|
397
|
+
kt = e;
|
|
398
|
+
},
|
|
399
|
+
dispose: () => {
|
|
400
|
+
if (Ot.delete(e), kt === e) {
|
|
401
|
+
let e = Array.from(Ot);
|
|
402
|
+
kt = e[e.length - 1] ?? 0;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
//#endregion
|
|
358
408
|
//#region src/composables/useAccessibilityLint.ts
|
|
359
|
-
function
|
|
409
|
+
function Mt(e) {
|
|
360
410
|
let t = h([]), n = h(!1), r = h(!1), i = d(null), a = e.options.disabled === !0, o = null, c = !1;
|
|
361
411
|
a || l();
|
|
362
412
|
async function l() {
|
|
363
413
|
try {
|
|
364
414
|
let t = await import("@templatical/quality");
|
|
365
415
|
if (c) return;
|
|
366
|
-
i.value = t.lintAccessibility, n.value = !0, u(), o =
|
|
416
|
+
i.value = t.lintAccessibility, n.value = !0, u(), o = Pe(e.content, u, {
|
|
367
417
|
debounce: e.debounce ?? 500,
|
|
368
418
|
deep: !0
|
|
369
419
|
});
|
|
@@ -397,12 +447,12 @@ function Et(e) {
|
|
|
397
447
|
}
|
|
398
448
|
//#endregion
|
|
399
449
|
//#region src/utils/blockTypeLabels.ts
|
|
400
|
-
function
|
|
450
|
+
function Nt(e, t) {
|
|
401
451
|
return t.blocks[e] ?? e;
|
|
402
452
|
}
|
|
403
453
|
//#endregion
|
|
404
454
|
//#region src/composables/useKeyboardReorder.ts
|
|
405
|
-
function
|
|
455
|
+
function Pt(e, t) {
|
|
406
456
|
let n = h(null), r = h(""), i = null;
|
|
407
457
|
function a(t) {
|
|
408
458
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -429,7 +479,7 @@ function Ot(e, t) {
|
|
|
429
479
|
let r = a(n);
|
|
430
480
|
if (!r) return "";
|
|
431
481
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
432
|
-
return i ?
|
|
482
|
+
return i ? Nt(i.type, t.t) : "";
|
|
433
483
|
}
|
|
434
484
|
function s(t, n) {
|
|
435
485
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -498,13 +548,13 @@ function Ot(e, t) {
|
|
|
498
548
|
}
|
|
499
549
|
//#endregion
|
|
500
550
|
//#region src/composables/useUiTheme.ts
|
|
501
|
-
function
|
|
502
|
-
let t =
|
|
551
|
+
function Ft(e) {
|
|
552
|
+
let t = Ne("(prefers-color-scheme: dark)");
|
|
503
553
|
return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
504
554
|
}
|
|
505
555
|
//#endregion
|
|
506
556
|
//#region src/composables/useThemeStyles.ts
|
|
507
|
-
var
|
|
557
|
+
var It = {
|
|
508
558
|
bg: "--tpl-bg",
|
|
509
559
|
bgElevated: "--tpl-bg-elevated",
|
|
510
560
|
bgHover: "--tpl-bg-hover",
|
|
@@ -528,10 +578,10 @@ var At = {
|
|
|
528
578
|
dangerLight: "--tpl-danger-light",
|
|
529
579
|
canvasBg: "--tpl-canvas-bg"
|
|
530
580
|
};
|
|
531
|
-
function
|
|
581
|
+
function Lt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
532
582
|
return { themeStyles: x(() => {
|
|
533
583
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
534
|
-
if (a) for (let [e, t] of Object.entries(
|
|
584
|
+
if (a) for (let [e, t] of Object.entries(It)) {
|
|
535
585
|
let n = a[e];
|
|
536
586
|
n && (r[t] = n);
|
|
537
587
|
}
|
|
@@ -540,27 +590,27 @@ function jt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
540
590
|
}
|
|
541
591
|
//#endregion
|
|
542
592
|
//#region src/utils/logger.ts
|
|
543
|
-
var
|
|
544
|
-
function
|
|
593
|
+
var Rt = "[Templatical]";
|
|
594
|
+
function zt() {
|
|
545
595
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
546
596
|
}
|
|
547
|
-
var
|
|
597
|
+
var Bt = {
|
|
548
598
|
warn(...e) {
|
|
549
|
-
console.warn(
|
|
599
|
+
console.warn(Rt, ...e);
|
|
550
600
|
},
|
|
551
601
|
error(...e) {
|
|
552
|
-
console.error(
|
|
602
|
+
console.error(Rt, ...e);
|
|
553
603
|
},
|
|
554
604
|
debug(...e) {
|
|
555
|
-
|
|
605
|
+
zt() || console.debug(Rt, ...e);
|
|
556
606
|
},
|
|
557
607
|
info(...e) {
|
|
558
|
-
|
|
608
|
+
zt() || console.info(Rt, ...e);
|
|
559
609
|
}
|
|
560
610
|
};
|
|
561
611
|
//#endregion
|
|
562
612
|
//#region src/composables/useBlockRegistry.ts
|
|
563
|
-
function
|
|
613
|
+
function Vt() {
|
|
564
614
|
let e = d(/* @__PURE__ */ new Map());
|
|
565
615
|
function t(t, n) {
|
|
566
616
|
e.value.set(t, n), k(e);
|
|
@@ -568,7 +618,7 @@ function Ft() {
|
|
|
568
618
|
function n(t, n) {
|
|
569
619
|
let r = `custom:${t.type}`, i = {
|
|
570
620
|
component: n,
|
|
571
|
-
createBlock: () =>
|
|
621
|
+
createBlock: () => xe(t),
|
|
572
622
|
sidebarItem: {
|
|
573
623
|
type: r,
|
|
574
624
|
label: t.name,
|
|
@@ -606,13 +656,13 @@ function Ft() {
|
|
|
606
656
|
let t = o(e.customType);
|
|
607
657
|
if (!t) return s("Block definition not found");
|
|
608
658
|
try {
|
|
609
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
659
|
+
let { Liquid: n } = await import("./liquid.browser-DX8ZHRdq.js");
|
|
610
660
|
return await new n({
|
|
611
661
|
strictVariables: !1,
|
|
612
662
|
strictFilters: !1
|
|
613
663
|
}).parseAndRender(t.template, e.fieldValues);
|
|
614
664
|
} catch (t) {
|
|
615
|
-
return
|
|
665
|
+
return Bt.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
616
666
|
}
|
|
617
667
|
}
|
|
618
668
|
function l(t) {
|
|
@@ -631,75 +681,75 @@ function Ft() {
|
|
|
631
681
|
}
|
|
632
682
|
//#endregion
|
|
633
683
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
634
|
-
var
|
|
684
|
+
var Ht = [
|
|
635
685
|
{
|
|
636
686
|
type: "section",
|
|
637
687
|
label: "Section",
|
|
638
|
-
createBlock:
|
|
688
|
+
createBlock: _e
|
|
639
689
|
},
|
|
640
690
|
{
|
|
641
691
|
type: "title",
|
|
642
692
|
label: "Title",
|
|
643
|
-
createBlock:
|
|
693
|
+
createBlock: pe
|
|
644
694
|
},
|
|
645
695
|
{
|
|
646
696
|
type: "paragraph",
|
|
647
697
|
label: "Paragraph",
|
|
648
|
-
createBlock:
|
|
698
|
+
createBlock: ve
|
|
649
699
|
},
|
|
650
700
|
{
|
|
651
701
|
type: "image",
|
|
652
702
|
label: "Image",
|
|
653
|
-
createBlock:
|
|
703
|
+
createBlock: we
|
|
654
704
|
},
|
|
655
705
|
{
|
|
656
706
|
type: "button",
|
|
657
707
|
label: "Button",
|
|
658
|
-
createBlock:
|
|
708
|
+
createBlock: Te
|
|
659
709
|
},
|
|
660
710
|
{
|
|
661
711
|
type: "divider",
|
|
662
712
|
label: "Divider",
|
|
663
|
-
createBlock:
|
|
713
|
+
createBlock: he
|
|
664
714
|
},
|
|
665
715
|
{
|
|
666
716
|
type: "video",
|
|
667
717
|
label: "Video",
|
|
668
|
-
createBlock:
|
|
718
|
+
createBlock: ke
|
|
669
719
|
},
|
|
670
720
|
{
|
|
671
721
|
type: "social",
|
|
672
722
|
label: "Social",
|
|
673
|
-
createBlock:
|
|
723
|
+
createBlock: de
|
|
674
724
|
},
|
|
675
725
|
{
|
|
676
726
|
type: "menu",
|
|
677
727
|
label: "Menu",
|
|
678
|
-
createBlock:
|
|
728
|
+
createBlock: Se
|
|
679
729
|
},
|
|
680
730
|
{
|
|
681
731
|
type: "table",
|
|
682
732
|
label: "Table",
|
|
683
|
-
createBlock:
|
|
733
|
+
createBlock: Ae
|
|
684
734
|
},
|
|
685
735
|
{
|
|
686
736
|
type: "spacer",
|
|
687
737
|
label: "Spacer",
|
|
688
|
-
createBlock:
|
|
738
|
+
createBlock: Oe
|
|
689
739
|
},
|
|
690
740
|
{
|
|
691
741
|
type: "html",
|
|
692
742
|
label: "HTML",
|
|
693
|
-
createBlock:
|
|
743
|
+
createBlock: ge
|
|
694
744
|
},
|
|
695
745
|
{
|
|
696
746
|
type: "countdown",
|
|
697
747
|
label: "Countdown",
|
|
698
|
-
createBlock:
|
|
748
|
+
createBlock: me
|
|
699
749
|
}
|
|
700
750
|
];
|
|
701
|
-
function
|
|
702
|
-
for (let n of
|
|
751
|
+
function Ut(e, t) {
|
|
752
|
+
for (let n of Ht) {
|
|
703
753
|
let r = t[n.type];
|
|
704
754
|
r && e.registerBuiltIn(n.type, {
|
|
705
755
|
component: r,
|
|
@@ -714,7 +764,7 @@ function Lt(e, t) {
|
|
|
714
764
|
}
|
|
715
765
|
//#endregion
|
|
716
766
|
//#region src/utils/keyboardShortcuts.ts
|
|
717
|
-
function
|
|
767
|
+
function Wt(e) {
|
|
718
768
|
for (let t of e.composedPath()) {
|
|
719
769
|
if (!(t instanceof HTMLElement)) continue;
|
|
720
770
|
if (t.isContentEditable) return !0;
|
|
@@ -723,14 +773,14 @@ function Rt(e) {
|
|
|
723
773
|
}
|
|
724
774
|
return !1;
|
|
725
775
|
}
|
|
726
|
-
function
|
|
776
|
+
function Gt(e, t) {
|
|
727
777
|
let n = e.metaKey || e.ctrlKey;
|
|
728
778
|
if (n && e.key.toLowerCase() === "s") {
|
|
729
779
|
e.preventDefault(), t.onSave?.();
|
|
730
780
|
return;
|
|
731
781
|
}
|
|
732
782
|
if (n && e.key.toLowerCase() === "z") {
|
|
733
|
-
if (
|
|
783
|
+
if (Wt(e)) return;
|
|
734
784
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
735
785
|
return;
|
|
736
786
|
}
|
|
@@ -738,11 +788,11 @@ function zt(e, t) {
|
|
|
738
788
|
t.selectBlock(null);
|
|
739
789
|
return;
|
|
740
790
|
}
|
|
741
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
791
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Wt(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
742
792
|
}
|
|
743
793
|
//#endregion
|
|
744
794
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
745
|
-
var
|
|
795
|
+
var Kt = { class: "tpl:text-center" }, qt = ["href"], Jt = /* @__PURE__ */ y({
|
|
746
796
|
__name: "ButtonBlock",
|
|
747
797
|
props: {
|
|
748
798
|
block: {},
|
|
@@ -763,17 +813,17 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
763
813
|
};
|
|
764
814
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
765
815
|
});
|
|
766
|
-
return (n, i) => (e(), w("div",
|
|
816
|
+
return (n, i) => (e(), w("div", Kt, [C("a", {
|
|
767
817
|
href: t.block.url || "#",
|
|
768
818
|
style: A(r.value),
|
|
769
819
|
class: "tpl:cursor-default",
|
|
770
820
|
onClick: i[0] ||= b(() => {}, ["prevent"])
|
|
771
|
-
}, M(t.block.text), 13,
|
|
821
|
+
}, M(t.block.text), 13, qt)]));
|
|
772
822
|
}
|
|
773
|
-
}),
|
|
823
|
+
}), Yt = F("bookmark", [["path", {
|
|
774
824
|
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",
|
|
775
825
|
key: "oz39mx"
|
|
776
|
-
}]]),
|
|
826
|
+
}]]), Xt = F("box", [
|
|
777
827
|
["path", {
|
|
778
828
|
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",
|
|
779
829
|
key: "hh9hay"
|
|
@@ -786,13 +836,13 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
786
836
|
d: "M12 22V12",
|
|
787
837
|
key: "d0xqtd"
|
|
788
838
|
}]
|
|
789
|
-
]),
|
|
839
|
+
]), Zt = F("code", [["path", {
|
|
790
840
|
d: "m16 18 6-6-6-6",
|
|
791
841
|
key: "eg8j8"
|
|
792
842
|
}], ["path", {
|
|
793
843
|
d: "m8 6-6 6 6 6",
|
|
794
844
|
key: "ppft3o"
|
|
795
|
-
}]]),
|
|
845
|
+
}]]), Qt = F("copy", [["rect", {
|
|
796
846
|
width: "14",
|
|
797
847
|
height: "14",
|
|
798
848
|
x: "8",
|
|
@@ -803,7 +853,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
803
853
|
}], ["path", {
|
|
804
854
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
805
855
|
key: "zix9uf"
|
|
806
|
-
}]]),
|
|
856
|
+
}]]), $t = F("eye-off", [
|
|
807
857
|
["path", {
|
|
808
858
|
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",
|
|
809
859
|
key: "ct8e1f"
|
|
@@ -820,10 +870,10 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
820
870
|
d: "m2 2 20 20",
|
|
821
871
|
key: "1ooewy"
|
|
822
872
|
}]
|
|
823
|
-
]),
|
|
873
|
+
]), en = F("funnel", [["path", {
|
|
824
874
|
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",
|
|
825
875
|
key: "sc7q7i"
|
|
826
|
-
}]]),
|
|
876
|
+
}]]), tn = F("grip-vertical", [
|
|
827
877
|
["circle", {
|
|
828
878
|
cx: "9",
|
|
829
879
|
cy: "12",
|
|
@@ -860,7 +910,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
860
910
|
r: "1",
|
|
861
911
|
key: "f4zoj3"
|
|
862
912
|
}]
|
|
863
|
-
]),
|
|
913
|
+
]), nn = F("image", [
|
|
864
914
|
["rect", {
|
|
865
915
|
width: "18",
|
|
866
916
|
height: "18",
|
|
@@ -880,13 +930,13 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
880
930
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
881
931
|
key: "1xmnt7"
|
|
882
932
|
}]
|
|
883
|
-
]),
|
|
933
|
+
]), rn = F("navigation", [["polygon", {
|
|
884
934
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
885
935
|
key: "1ltx0t"
|
|
886
|
-
}]]),
|
|
936
|
+
}]]), an = F("puzzle", [["path", {
|
|
887
937
|
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",
|
|
888
938
|
key: "w46dr5"
|
|
889
|
-
}]]),
|
|
939
|
+
}]]), on = F("share-2", [
|
|
890
940
|
["circle", {
|
|
891
941
|
cx: "18",
|
|
892
942
|
cy: "5",
|
|
@@ -919,7 +969,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
919
969
|
y2: "10.49",
|
|
920
970
|
key: "1n3mei"
|
|
921
971
|
}]
|
|
922
|
-
]),
|
|
972
|
+
]), sn = F("table", [
|
|
923
973
|
["path", {
|
|
924
974
|
d: "M12 3v18",
|
|
925
975
|
key: "108xh3"
|
|
@@ -940,7 +990,7 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
940
990
|
d: "M3 15h18",
|
|
941
991
|
key: "5xshup"
|
|
942
992
|
}]
|
|
943
|
-
]),
|
|
993
|
+
]), cn = F("video", [["path", {
|
|
944
994
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
945
995
|
key: "ftymec"
|
|
946
996
|
}], ["rect", {
|
|
@@ -950,11 +1000,11 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
950
1000
|
height: "12",
|
|
951
1001
|
rx: "2",
|
|
952
1002
|
key: "158x01"
|
|
953
|
-
}]]),
|
|
1003
|
+
}]]), ln = ["innerHTML"], un = [
|
|
954
1004
|
"src",
|
|
955
1005
|
"width",
|
|
956
1006
|
"height"
|
|
957
|
-
],
|
|
1007
|
+
], dn = /* @__PURE__ */ y({
|
|
958
1008
|
__name: "CustomBlockIcon",
|
|
959
1009
|
props: {
|
|
960
1010
|
icon: {},
|
|
@@ -970,14 +1020,14 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
970
1020
|
height: `${r.value}px`
|
|
971
1021
|
}),
|
|
972
1022
|
innerHTML: t.icon
|
|
973
|
-
}, null, 12,
|
|
1023
|
+
}, null, 12, ln)) : a.value ? (e(), w("img", {
|
|
974
1024
|
key: 1,
|
|
975
1025
|
src: t.icon,
|
|
976
1026
|
width: r.value,
|
|
977
1027
|
height: r.value,
|
|
978
1028
|
class: "tpl:inline-block",
|
|
979
1029
|
alt: ""
|
|
980
|
-
}, null, 8,
|
|
1030
|
+
}, null, 8, un)) : (e(), ne(j(Xt), {
|
|
981
1031
|
key: 2,
|
|
982
1032
|
size: r.value,
|
|
983
1033
|
"stroke-width": 1.5
|
|
@@ -986,16 +1036,16 @@ var Bt = { class: "tpl:text-center" }, Vt = ["href"], Ht = /* @__PURE__ */ y({
|
|
|
986
1036
|
});
|
|
987
1037
|
//#endregion
|
|
988
1038
|
//#region src/composables/useEditorRoot.ts
|
|
989
|
-
function
|
|
990
|
-
return
|
|
1039
|
+
function fn() {
|
|
1040
|
+
return P(Xe, document) ?? document;
|
|
991
1041
|
}
|
|
992
1042
|
//#endregion
|
|
993
1043
|
//#region src/composables/useFocusTrap.ts
|
|
994
|
-
var
|
|
995
|
-
function
|
|
996
|
-
let n =
|
|
1044
|
+
var pn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1045
|
+
function mn(e, t) {
|
|
1046
|
+
let n = fn(), r = null, i = null, a = null;
|
|
997
1047
|
function o() {
|
|
998
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1048
|
+
return e.value ? Array.from(e.value.querySelectorAll(pn)).filter((e) => e.offsetParent !== null) : [];
|
|
999
1049
|
}
|
|
1000
1050
|
function c(e) {
|
|
1001
1051
|
if (e.key !== "Tab") return;
|
|
@@ -1010,7 +1060,7 @@ function cn(e, t) {
|
|
|
1010
1060
|
a = null;
|
|
1011
1061
|
let t = o();
|
|
1012
1062
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1013
|
-
}), i =
|
|
1063
|
+
}), i = Ie(e, "keydown", c);
|
|
1014
1064
|
}
|
|
1015
1065
|
function u(e = {}) {
|
|
1016
1066
|
let t = e.restoreFocus !== !1;
|
|
@@ -1025,13 +1075,13 @@ function cn(e, t) {
|
|
|
1025
1075
|
}
|
|
1026
1076
|
//#endregion
|
|
1027
1077
|
//#region src/composables/useEmoji.ts
|
|
1028
|
-
function
|
|
1029
|
-
let [e, t] =
|
|
1078
|
+
function hn() {
|
|
1079
|
+
let [e, t] = Me(!1), n = d([]), r = !1;
|
|
1030
1080
|
re(() => {
|
|
1031
1081
|
r = !0;
|
|
1032
1082
|
}), s(e, async (e) => {
|
|
1033
1083
|
if (e && n.value.length === 0) {
|
|
1034
|
-
let { emojiCategories: e } = await import("./emojiData-
|
|
1084
|
+
let { emojiCategories: e } = await import("./emojiData-DrBuvEoP.js");
|
|
1035
1085
|
if (r) return;
|
|
1036
1086
|
n.value = e;
|
|
1037
1087
|
}
|
|
@@ -1051,7 +1101,7 @@ function ln() {
|
|
|
1051
1101
|
}
|
|
1052
1102
|
//#endregion
|
|
1053
1103
|
//#region src/composables/useDragDrop.ts
|
|
1054
|
-
function
|
|
1104
|
+
function gn(e) {
|
|
1055
1105
|
let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
|
|
1056
1106
|
function o(e) {
|
|
1057
1107
|
r.value = !0, i.value = e;
|
|
@@ -1101,7 +1151,7 @@ function un(e) {
|
|
|
1101
1151
|
}
|
|
1102
1152
|
//#endregion
|
|
1103
1153
|
//#region src/composables/useFonts.ts
|
|
1104
|
-
var
|
|
1154
|
+
var _n = [
|
|
1105
1155
|
{
|
|
1106
1156
|
value: "Arial",
|
|
1107
1157
|
label: "Arial"
|
|
@@ -1130,7 +1180,7 @@ var dn = [
|
|
|
1130
1180
|
value: "Courier New",
|
|
1131
1181
|
label: "Courier New"
|
|
1132
1182
|
}
|
|
1133
|
-
],
|
|
1183
|
+
], vn = {
|
|
1134
1184
|
arial: "Arial, sans-serif",
|
|
1135
1185
|
helvetica: "Helvetica, sans-serif",
|
|
1136
1186
|
georgia: "Georgia, serif",
|
|
@@ -1138,14 +1188,14 @@ var dn = [
|
|
|
1138
1188
|
verdana: "Verdana, sans-serif",
|
|
1139
1189
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1140
1190
|
"courier new": "'Courier New', monospace"
|
|
1141
|
-
},
|
|
1142
|
-
function
|
|
1143
|
-
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ??
|
|
1191
|
+
}, yn = "Arial, sans-serif";
|
|
1192
|
+
function bn(e) {
|
|
1193
|
+
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? yn);
|
|
1144
1194
|
function a(e) {
|
|
1145
1195
|
n.value = e;
|
|
1146
1196
|
}
|
|
1147
1197
|
let o = x(() => {
|
|
1148
|
-
let e = [...
|
|
1198
|
+
let e = [..._n];
|
|
1149
1199
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1150
1200
|
let r = t.value.map((e) => ({
|
|
1151
1201
|
value: e.name,
|
|
@@ -1158,17 +1208,17 @@ function mn(e) {
|
|
|
1158
1208
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1159
1209
|
}
|
|
1160
1210
|
function c(e) {
|
|
1161
|
-
return
|
|
1211
|
+
return _n.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1162
1212
|
}
|
|
1163
1213
|
function l() {
|
|
1164
1214
|
if (e?.defaultFont) {
|
|
1165
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
1215
|
+
if (!n.value && !c(e.defaultFont)) return yn;
|
|
1166
1216
|
if (s(e.defaultFont)) {
|
|
1167
1217
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1168
1218
|
if (t) return t.value;
|
|
1169
1219
|
}
|
|
1170
1220
|
}
|
|
1171
|
-
return
|
|
1221
|
+
return yn;
|
|
1172
1222
|
}
|
|
1173
1223
|
let u = x(() => l());
|
|
1174
1224
|
function d(e) {
|
|
@@ -1178,12 +1228,12 @@ function mn(e) {
|
|
|
1178
1228
|
let e = n.fallback ?? i.value;
|
|
1179
1229
|
return `'${n.name}', ${e}`;
|
|
1180
1230
|
}
|
|
1181
|
-
return
|
|
1231
|
+
return vn[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1182
1232
|
}
|
|
1183
|
-
let f = [];
|
|
1184
|
-
async function
|
|
1233
|
+
let f = [], m = !1;
|
|
1234
|
+
async function g() {
|
|
1185
1235
|
if (t.value.length === 0) {
|
|
1186
|
-
r.value = !0;
|
|
1236
|
+
m || (r.value = !0);
|
|
1187
1237
|
return;
|
|
1188
1238
|
}
|
|
1189
1239
|
let e = t.value.map(async (e) => {
|
|
@@ -1194,16 +1244,18 @@ function mn(e) {
|
|
|
1194
1244
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1195
1245
|
});
|
|
1196
1246
|
} catch (t) {
|
|
1197
|
-
|
|
1247
|
+
Bt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1198
1248
|
}
|
|
1199
1249
|
});
|
|
1200
|
-
await Promise.allSettled(e), r.value = !0;
|
|
1250
|
+
await Promise.allSettled(e), !m && (r.value = !0);
|
|
1201
1251
|
}
|
|
1202
|
-
function
|
|
1252
|
+
function _() {
|
|
1203
1253
|
for (let e of f) e.remove();
|
|
1204
1254
|
f.length = 0;
|
|
1205
1255
|
}
|
|
1206
|
-
return p() && re(
|
|
1256
|
+
return p() && re(() => {
|
|
1257
|
+
m = !0, _();
|
|
1258
|
+
}), {
|
|
1207
1259
|
fonts: o,
|
|
1208
1260
|
defaultFont: u,
|
|
1209
1261
|
defaultFallback: i,
|
|
@@ -1211,38 +1263,53 @@ function mn(e) {
|
|
|
1211
1263
|
customFontsEnabled: n,
|
|
1212
1264
|
isLoaded: r,
|
|
1213
1265
|
setCustomFontsEnabled: a,
|
|
1214
|
-
loadCustomFonts:
|
|
1215
|
-
cleanupFontLinks:
|
|
1266
|
+
loadCustomFonts: g,
|
|
1267
|
+
cleanupFontLinks: _,
|
|
1216
1268
|
getFontWithFallback: d,
|
|
1217
1269
|
getDefaultFont: l
|
|
1218
1270
|
};
|
|
1219
1271
|
}
|
|
1220
1272
|
//#endregion
|
|
1221
1273
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1222
|
-
function
|
|
1274
|
+
function xn(e) {
|
|
1223
1275
|
let t = h(!1), n = h(""), r = h(null);
|
|
1224
|
-
|
|
1276
|
+
mn(r, t);
|
|
1225
1277
|
function i() {
|
|
1226
1278
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
1227
1279
|
}
|
|
1228
1280
|
function a() {
|
|
1229
1281
|
if (n.value) {
|
|
1230
|
-
let t =
|
|
1231
|
-
e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1282
|
+
let t = s(n.value);
|
|
1283
|
+
t !== null && e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).run();
|
|
1284
|
+
}
|
|
1285
|
+
l();
|
|
1286
|
+
}
|
|
1287
|
+
let o = new Set([
|
|
1288
|
+
"http",
|
|
1289
|
+
"https",
|
|
1290
|
+
"mailto",
|
|
1291
|
+
"tel",
|
|
1292
|
+
"ftp",
|
|
1293
|
+
"ftps",
|
|
1294
|
+
"sms",
|
|
1295
|
+
"xmpp",
|
|
1296
|
+
"cid"
|
|
1297
|
+
]);
|
|
1298
|
+
function s(e) {
|
|
1299
|
+
let t = e.trim();
|
|
1300
|
+
if (!t) return null;
|
|
1301
|
+
if (t.startsWith("#")) return t;
|
|
1302
|
+
let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
|
|
1303
|
+
return n ? o.has(n[1].toLowerCase()) ? t : null : `https://${t}`;
|
|
1240
1304
|
}
|
|
1241
1305
|
function c() {
|
|
1306
|
+
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), l();
|
|
1307
|
+
}
|
|
1308
|
+
function l() {
|
|
1242
1309
|
t.value = !1, n.value = "";
|
|
1243
1310
|
}
|
|
1244
|
-
function
|
|
1245
|
-
e.key === "Enter" ? (e.preventDefault(), a()) : e.key === "Escape" &&
|
|
1311
|
+
function u(e) {
|
|
1312
|
+
e.key === "Enter" ? (e.preventDefault(), a()) : e.key === "Escape" && l();
|
|
1246
1313
|
}
|
|
1247
1314
|
return {
|
|
1248
1315
|
showLinkDialog: t,
|
|
@@ -1250,15 +1317,15 @@ function hn(e) {
|
|
|
1250
1317
|
linkDialogRef: r,
|
|
1251
1318
|
openLinkDialog: i,
|
|
1252
1319
|
insertLink: a,
|
|
1253
|
-
removeLink:
|
|
1254
|
-
closeLinkDialog:
|
|
1255
|
-
handleLinkKeydown:
|
|
1320
|
+
removeLink: c,
|
|
1321
|
+
closeLinkDialog: l,
|
|
1322
|
+
handleLinkKeydown: u
|
|
1256
1323
|
};
|
|
1257
1324
|
}
|
|
1258
1325
|
//#endregion
|
|
1259
1326
|
//#region src/composables/useRichTextEditor.ts
|
|
1260
|
-
function
|
|
1261
|
-
let t =
|
|
1327
|
+
function Sn(e) {
|
|
1328
|
+
let t = P(Qe, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = mt(), f = P(Ve, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = ue(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = xn(g), { start: T, stop: E } = Le(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
|
|
1262
1329
|
async function te() {
|
|
1263
1330
|
O.value = null, D.value = !0;
|
|
1264
1331
|
try {
|
|
@@ -1288,7 +1355,7 @@ function gn(e) {
|
|
|
1288
1355
|
g.value = s, D.value = !1, T();
|
|
1289
1356
|
} catch (t) {
|
|
1290
1357
|
if (k) return;
|
|
1291
|
-
|
|
1358
|
+
Bt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
|
|
1292
1359
|
}
|
|
1293
1360
|
}
|
|
1294
1361
|
function A() {
|
|
@@ -1303,7 +1370,7 @@ function gn(e) {
|
|
|
1303
1370
|
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
1304
1371
|
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
1305
1372
|
}
|
|
1306
|
-
|
|
1373
|
+
Ie(document, "mousedown", re), n(() => {
|
|
1307
1374
|
k = !0, ne(), E(), g.value?.destroy();
|
|
1308
1375
|
});
|
|
1309
1376
|
async function j() {
|
|
@@ -1336,20 +1403,20 @@ function gn(e) {
|
|
|
1336
1403
|
}
|
|
1337
1404
|
//#endregion
|
|
1338
1405
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1339
|
-
var
|
|
1406
|
+
var Cn = { class: "tpl:w-full" }, wn = {
|
|
1340
1407
|
key: 0,
|
|
1341
1408
|
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)]"
|
|
1342
|
-
},
|
|
1409
|
+
}, Tn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, En = {
|
|
1343
1410
|
key: 1,
|
|
1344
1411
|
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)]"
|
|
1345
|
-
},
|
|
1412
|
+
}, Dn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, On = {
|
|
1346
1413
|
key: 2,
|
|
1347
1414
|
class: "tpl:relative"
|
|
1348
|
-
},
|
|
1415
|
+
}, kn = ["innerHTML"], An = {
|
|
1349
1416
|
key: 0,
|
|
1350
1417
|
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]",
|
|
1351
1418
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1352
|
-
},
|
|
1419
|
+
}, jn = /* @__PURE__ */ y({
|
|
1353
1420
|
__name: "CustomBlock",
|
|
1354
1421
|
props: {
|
|
1355
1422
|
block: {},
|
|
@@ -1357,7 +1424,7 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1357
1424
|
},
|
|
1358
1425
|
emits: ["fetchData"],
|
|
1359
1426
|
setup(t, { emit: n }) {
|
|
1360
|
-
let r = t, i = n, { t: a } =
|
|
1427
|
+
let r = t, i = n, { t: a } = ct(), o = P(nt, null), c = h(""), l = h(!1), d = x(() => o?.getDefinition(r.block.customType)), f = x(() => !!d.value), { isFetching: p, fetch: m, needsFetch: g, hasDataSource: v } = Et({
|
|
1361
1428
|
definition: d,
|
|
1362
1429
|
block: x(() => r.block),
|
|
1363
1430
|
onUpdate: (e, t) => {
|
|
@@ -1378,15 +1445,15 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1378
1445
|
}
|
|
1379
1446
|
}
|
|
1380
1447
|
}
|
|
1381
|
-
let S =
|
|
1448
|
+
let S = je(y, 150);
|
|
1382
1449
|
return u(() => {
|
|
1383
1450
|
y();
|
|
1384
1451
|
}), s(() => r.block.fieldValues, () => {
|
|
1385
1452
|
S();
|
|
1386
|
-
}, { deep: !0 }), (t, n) => (e(), w("div",
|
|
1453
|
+
}, { deep: !0 }), (t, n) => (e(), w("div", Cn, [f.value ? l.value ? (e(), w("div", En, [N(j(dt), {
|
|
1387
1454
|
size: 24,
|
|
1388
1455
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1389
|
-
}), C("span",
|
|
1456
|
+
}), C("span", Dn, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", On, [C("div", { innerHTML: c.value }, null, 8, kn), j(v) && j(g) ? (e(), w("div", An, [j(p) ? (e(), ne(ft, {
|
|
1390
1457
|
key: 1,
|
|
1391
1458
|
class: "tpl:w-48"
|
|
1392
1459
|
})) : (e(), w("button", {
|
|
@@ -1394,16 +1461,16 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1394
1461
|
type: "button",
|
|
1395
1462
|
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)]",
|
|
1396
1463
|
onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
|
|
1397
|
-
}, [d.value?.icon ? (e(), ne(
|
|
1464
|
+
}, [d.value?.icon ? (e(), ne(dn, {
|
|
1398
1465
|
key: 0,
|
|
1399
1466
|
icon: d.value.icon,
|
|
1400
1467
|
size: 16
|
|
1401
|
-
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div",
|
|
1468
|
+
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", wn, [N(j(an), {
|
|
1402
1469
|
size: 24,
|
|
1403
1470
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1404
|
-
}), C("span",
|
|
1471
|
+
}), C("span", Tn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1405
1472
|
}
|
|
1406
|
-
}),
|
|
1473
|
+
}), Mn = { class: "tpl:w-full" }, Nn = /* @__PURE__ */ y({
|
|
1407
1474
|
__name: "DividerBlock",
|
|
1408
1475
|
props: {
|
|
1409
1476
|
block: {},
|
|
@@ -1415,37 +1482,37 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1415
1482
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1416
1483
|
margin: n.block.width === "full" ? "0" : "0 auto"
|
|
1417
1484
|
}));
|
|
1418
|
-
return (t, n) => (e(), w("div",
|
|
1485
|
+
return (t, n) => (e(), w("div", Mn, [C("hr", {
|
|
1419
1486
|
class: "tpl:m-0 tpl:border-none",
|
|
1420
1487
|
style: A(r.value)
|
|
1421
1488
|
}, null, 4)]));
|
|
1422
1489
|
}
|
|
1423
|
-
}),
|
|
1490
|
+
}), Pn = { class: "tpl:w-full" }, Fn = { 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)]" }, In = {
|
|
1424
1491
|
key: 0,
|
|
1425
1492
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1426
|
-
},
|
|
1493
|
+
}, Ln = {
|
|
1427
1494
|
key: 1,
|
|
1428
1495
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1429
|
-
},
|
|
1496
|
+
}, Rn = /* @__PURE__ */ y({
|
|
1430
1497
|
__name: "HtmlBlock",
|
|
1431
1498
|
props: {
|
|
1432
1499
|
block: {},
|
|
1433
1500
|
viewport: {}
|
|
1434
1501
|
},
|
|
1435
1502
|
setup(t) {
|
|
1436
|
-
let n = t, { t: r } =
|
|
1437
|
-
return (t, n) => (e(), w("div",
|
|
1503
|
+
let n = t, { t: r } = ct(), i = x(() => n.block.content.trim().length > 0);
|
|
1504
|
+
return (t, n) => (e(), w("div", Pn, [C("div", Fn, [N(j(Zt), {
|
|
1438
1505
|
size: 24,
|
|
1439
1506
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1440
|
-
}), i.value ? (e(), w("span",
|
|
1507
|
+
}), i.value ? (e(), w("span", In, M(j(r).html.preview), 1)) : (e(), w("span", Ln, M(j(r).html.empty), 1))])]));
|
|
1441
1508
|
}
|
|
1442
|
-
}),
|
|
1509
|
+
}), zn = ["href"], Bn = ["src", "alt"], Vn = ["src", "alt"], Hn = {
|
|
1443
1510
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1444
1511
|
style: { opacity: "0.7" }
|
|
1445
|
-
},
|
|
1512
|
+
}, Un = ["href"], Wn = ["src", "alt"], Gn = ["src", "alt"], Kn = {
|
|
1446
1513
|
key: 3,
|
|
1447
1514
|
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)]"
|
|
1448
|
-
},
|
|
1515
|
+
}, qn = ["aria-label"], Jn = { key: 1 }, Yn = /* @__PURE__ */ y({
|
|
1449
1516
|
__name: "ImageBlock",
|
|
1450
1517
|
props: {
|
|
1451
1518
|
block: {},
|
|
@@ -1453,25 +1520,25 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1453
1520
|
},
|
|
1454
1521
|
emits: ["update"],
|
|
1455
1522
|
setup(t, { emit: n }) {
|
|
1456
|
-
let r = t, i = n, { t: a } =
|
|
1457
|
-
async function
|
|
1523
|
+
let r = t, i = n, { t: a } = ct(), { syntax: o } = mt(), s = P(He, null), c = x(() => !!s), l = ht();
|
|
1524
|
+
async function u() {
|
|
1458
1525
|
let e = await s?.({ accept: ["images"] });
|
|
1459
|
-
if (e) {
|
|
1526
|
+
if (l.alive && e) {
|
|
1460
1527
|
let t = { src: e.url };
|
|
1461
1528
|
e.alt && (t.alt = e.alt), i("update", t);
|
|
1462
1529
|
}
|
|
1463
1530
|
}
|
|
1464
|
-
let
|
|
1531
|
+
let d = x(() => ({ textAlign: r.block.align })), f = x(() => ({
|
|
1465
1532
|
maxWidth: "100%",
|
|
1466
1533
|
width: r.block.width === "full" ? "100%" : `${r.block.width}px`,
|
|
1467
1534
|
display: "block",
|
|
1468
1535
|
margin: r.block.align === "center" ? "0 auto" : void 0,
|
|
1469
1536
|
marginLeft: r.block.align === "right" ? "auto" : void 0
|
|
1470
|
-
})),
|
|
1537
|
+
})), p = x(() => fe(r.block.src, o));
|
|
1471
1538
|
return (n, r) => (e(), w("div", {
|
|
1472
1539
|
class: "tpl:w-full",
|
|
1473
|
-
style: A(
|
|
1474
|
-
}, [t.block.src &&
|
|
1540
|
+
style: A(d.value)
|
|
1541
|
+
}, [t.block.src && p.value && t.block.placeholderUrl ? (e(), w(D, { key: 0 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1475
1542
|
key: 0,
|
|
1476
1543
|
href: t.block.linkUrl,
|
|
1477
1544
|
target: "_blank",
|
|
@@ -1482,23 +1549,23 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1482
1549
|
loading: "lazy",
|
|
1483
1550
|
src: t.block.placeholderUrl,
|
|
1484
1551
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1485
|
-
style: A(
|
|
1486
|
-
}, null, 12,
|
|
1552
|
+
style: A(f.value)
|
|
1553
|
+
}, null, 12, Bn)], 8, zn)) : (e(), w("img", {
|
|
1487
1554
|
key: 1,
|
|
1488
1555
|
class: "tpl:border-0",
|
|
1489
1556
|
src: t.block.placeholderUrl,
|
|
1490
1557
|
alt: t.block.alt,
|
|
1491
|
-
style: A(
|
|
1492
|
-
}, null, 12,
|
|
1558
|
+
style: A(f.value)
|
|
1559
|
+
}, null, 12, Vn))], 64)) : t.block.src && p.value ? (e(), w("div", {
|
|
1493
1560
|
key: 1,
|
|
1494
1561
|
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)]",
|
|
1495
|
-
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" },
|
|
1496
|
-
}, [N(j(
|
|
1562
|
+
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, f.value])
|
|
1563
|
+
}, [N(j(nn), {
|
|
1497
1564
|
size: 32,
|
|
1498
1565
|
"stroke-width": 1.5,
|
|
1499
1566
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1500
1567
|
style: { opacity: "0.5" }
|
|
1501
|
-
}), C("span",
|
|
1568
|
+
}), C("span", Hn, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1502
1569
|
key: 0,
|
|
1503
1570
|
href: t.block.linkUrl,
|
|
1504
1571
|
target: "_blank",
|
|
@@ -1509,34 +1576,34 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1509
1576
|
loading: "lazy",
|
|
1510
1577
|
src: t.block.src,
|
|
1511
1578
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1512
|
-
style: A(
|
|
1513
|
-
}, null, 12,
|
|
1579
|
+
style: A(f.value)
|
|
1580
|
+
}, null, 12, Wn)], 8, Un)) : (e(), w("img", {
|
|
1514
1581
|
key: 1,
|
|
1515
1582
|
class: "tpl:border-0",
|
|
1516
1583
|
src: t.block.src,
|
|
1517
1584
|
alt: t.block.alt,
|
|
1518
|
-
style: A(
|
|
1519
|
-
}, null, 12,
|
|
1585
|
+
style: A(f.value)
|
|
1586
|
+
}, null, 12, Gn))], 64)) : (e(), w("div", Kn, [c.value ? (e(), w("button", {
|
|
1520
1587
|
key: 0,
|
|
1521
1588
|
"aria-label": j(a).image.browseMedia,
|
|
1522
1589
|
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)]",
|
|
1523
|
-
onClick: b(
|
|
1524
|
-
}, [N(j(
|
|
1590
|
+
onClick: b(u, ["stop"])
|
|
1591
|
+
}, [N(j(nn), {
|
|
1525
1592
|
size: 14,
|
|
1526
1593
|
"stroke-width": 1.5
|
|
1527
|
-
}), _(" " + M(j(a).image.browseMedia), 1)], 8,
|
|
1594
|
+
}), _(" " + M(j(a).image.browseMedia), 1)], 8, qn)) : (e(), w("span", Jn, M(j(a).image.clickToAdd), 1))]))], 4));
|
|
1528
1595
|
}
|
|
1529
|
-
}),
|
|
1596
|
+
}), Xn = { class: "tpl:w-full" }, Zn = ["href"], Qn = {
|
|
1530
1597
|
key: 1,
|
|
1531
1598
|
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)]"
|
|
1532
|
-
},
|
|
1599
|
+
}, $n = /* @__PURE__ */ y({
|
|
1533
1600
|
__name: "MenuBlock",
|
|
1534
1601
|
props: {
|
|
1535
1602
|
block: {},
|
|
1536
1603
|
viewport: {}
|
|
1537
1604
|
},
|
|
1538
1605
|
setup(t) {
|
|
1539
|
-
let n = t, { t: r } =
|
|
1606
|
+
let n = t, { t: r } = ct(), i = x(() => ({
|
|
1540
1607
|
display: "flex",
|
|
1541
1608
|
flexWrap: "wrap",
|
|
1542
1609
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1548,7 +1615,7 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1548
1615
|
function o(e) {
|
|
1549
1616
|
return e || n.block.linkColor || n.block.color;
|
|
1550
1617
|
}
|
|
1551
|
-
return (n, s) => (e(), w("div",
|
|
1618
|
+
return (n, s) => (e(), w("div", Xn, [a.value ? (e(), w("div", {
|
|
1552
1619
|
key: 0,
|
|
1553
1620
|
style: A(i.value)
|
|
1554
1621
|
}, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
|
|
@@ -1560,19 +1627,87 @@ var _n = { class: "tpl:w-full" }, vn = {
|
|
|
1560
1627
|
textDecoration: n.underline ? "underline" : "none"
|
|
1561
1628
|
}),
|
|
1562
1629
|
onClick: s[0] ||= b(() => {}, ["prevent"])
|
|
1563
|
-
}, M(n.text || "..."), 13,
|
|
1630
|
+
}, M(n.text || "..."), 13, Zn), r < t.block.items.length - 1 ? (e(), w("span", {
|
|
1564
1631
|
key: 0,
|
|
1565
1632
|
style: A({
|
|
1566
1633
|
color: t.block.separatorColor,
|
|
1567
1634
|
padding: `0 ${t.block.spacing}px`
|
|
1568
1635
|
})
|
|
1569
|
-
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div",
|
|
1636
|
+
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", Qn, [N(j(rn), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
|
|
1637
|
+
}
|
|
1638
|
+
}), er = new Set([
|
|
1639
|
+
"http",
|
|
1640
|
+
"https",
|
|
1641
|
+
"mailto",
|
|
1642
|
+
"tel",
|
|
1643
|
+
"ftp",
|
|
1644
|
+
"ftps",
|
|
1645
|
+
"sms",
|
|
1646
|
+
"xmpp",
|
|
1647
|
+
"cid"
|
|
1648
|
+
]), tr = new Set([
|
|
1649
|
+
"SCRIPT",
|
|
1650
|
+
"STYLE",
|
|
1651
|
+
"IFRAME",
|
|
1652
|
+
"OBJECT",
|
|
1653
|
+
"EMBED",
|
|
1654
|
+
"LINK",
|
|
1655
|
+
"META",
|
|
1656
|
+
"BASE",
|
|
1657
|
+
"FORM"
|
|
1658
|
+
]), nr = new Set([
|
|
1659
|
+
"href",
|
|
1660
|
+
"xlink:href",
|
|
1661
|
+
"formaction",
|
|
1662
|
+
"action",
|
|
1663
|
+
"ping",
|
|
1664
|
+
"background",
|
|
1665
|
+
"poster"
|
|
1666
|
+
]);
|
|
1667
|
+
function rr(e, t) {
|
|
1668
|
+
let n = e.trim();
|
|
1669
|
+
if (!n || n.startsWith("#")) return !0;
|
|
1670
|
+
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1671
|
+
if (!r) return !0;
|
|
1672
|
+
let i = r[1].toLowerCase();
|
|
1673
|
+
return er.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1674
|
+
}
|
|
1675
|
+
function ir(e) {
|
|
1676
|
+
if (tr.has(e.tagName)) {
|
|
1677
|
+
e.remove();
|
|
1678
|
+
return;
|
|
1570
1679
|
}
|
|
1571
|
-
|
|
1680
|
+
let t = [];
|
|
1681
|
+
for (let n = 0; n < e.attributes.length; n++) t.push(e.attributes[n].name);
|
|
1682
|
+
for (let n of t) {
|
|
1683
|
+
let t = n.toLowerCase();
|
|
1684
|
+
if (t.startsWith("on")) {
|
|
1685
|
+
e.removeAttribute(n);
|
|
1686
|
+
continue;
|
|
1687
|
+
}
|
|
1688
|
+
if (nr.has(t)) {
|
|
1689
|
+
rr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1690
|
+
continue;
|
|
1691
|
+
}
|
|
1692
|
+
if (t === "src") {
|
|
1693
|
+
rr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1694
|
+
continue;
|
|
1695
|
+
}
|
|
1696
|
+
t === "srcdoc" && e.removeAttribute(n);
|
|
1697
|
+
}
|
|
1698
|
+
let n = Array.from(e.children);
|
|
1699
|
+
for (let e of n) ir(e);
|
|
1700
|
+
}
|
|
1701
|
+
function ar(e) {
|
|
1702
|
+
if (typeof DOMParser > "u") return e;
|
|
1703
|
+
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1704
|
+
for (let e of n) ir(e);
|
|
1705
|
+
return t.innerHTML;
|
|
1706
|
+
}
|
|
1572
1707
|
//#endregion
|
|
1573
1708
|
//#region src/composables/useEditableTextBlock.ts
|
|
1574
|
-
function
|
|
1575
|
-
let t =
|
|
1709
|
+
function or(e) {
|
|
1710
|
+
let t = P(st, []), { syntax: n } = mt(), r = x(() => ar(be(ce(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = Fe(a), c = x(() => ({
|
|
1576
1711
|
top: o.value - 8,
|
|
1577
1712
|
left: s.value
|
|
1578
1713
|
}));
|
|
@@ -1593,14 +1728,14 @@ function Jn(e) {
|
|
|
1593
1728
|
}
|
|
1594
1729
|
//#endregion
|
|
1595
1730
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1596
|
-
var
|
|
1731
|
+
var sr = ["innerHTML"], cr = /* @__PURE__ */ y({
|
|
1597
1732
|
__name: "ParagraphBlock",
|
|
1598
1733
|
props: {
|
|
1599
1734
|
block: {},
|
|
1600
1735
|
viewport: {}
|
|
1601
1736
|
},
|
|
1602
1737
|
setup(t) {
|
|
1603
|
-
let n = t, r =
|
|
1738
|
+
let n = t, r = oe(() => import("./ParagraphEditor-DC2jOjNh.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = or(() => n.block.content);
|
|
1604
1739
|
return (n, u) => (e(), w("div", {
|
|
1605
1740
|
ref_key: "blockRef",
|
|
1606
1741
|
ref: a,
|
|
@@ -1619,19 +1754,19 @@ var Yn = ["innerHTML"], Xn = /* @__PURE__ */ y({
|
|
|
1619
1754
|
key: 1,
|
|
1620
1755
|
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",
|
|
1621
1756
|
innerHTML: j(s)
|
|
1622
|
-
}, null, 8,
|
|
1757
|
+
}, null, 8, sr))], 544));
|
|
1623
1758
|
}
|
|
1624
1759
|
});
|
|
1625
1760
|
//#endregion
|
|
1626
1761
|
//#region src/utils/blockComponentResolver.ts
|
|
1627
|
-
function
|
|
1762
|
+
function lr(e, t, n) {
|
|
1628
1763
|
if (t) {
|
|
1629
1764
|
let n = t.getComponent(e);
|
|
1630
1765
|
if (n) return n;
|
|
1631
1766
|
}
|
|
1632
1767
|
return n[e.type] ?? null;
|
|
1633
1768
|
}
|
|
1634
|
-
function
|
|
1769
|
+
function ur(e) {
|
|
1635
1770
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
1636
1771
|
return {
|
|
1637
1772
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -1641,20 +1776,20 @@ function Qn(e) {
|
|
|
1641
1776
|
}
|
|
1642
1777
|
//#endregion
|
|
1643
1778
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1644
|
-
var
|
|
1779
|
+
var dr = ["data-block-id", "data-block-type"], fr = ["aria-label"], pr = [
|
|
1645
1780
|
"aria-label",
|
|
1646
1781
|
"aria-pressed",
|
|
1647
1782
|
"title"
|
|
1648
|
-
],
|
|
1783
|
+
], mr = ["aria-label", "title"], hr = ["aria-label", "title"], gr = ["aria-label", "title"], _r = {
|
|
1649
1784
|
key: 1,
|
|
1650
1785
|
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"
|
|
1651
|
-
},
|
|
1786
|
+
}, vr = { 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)]" }, yr = {
|
|
1652
1787
|
key: 2,
|
|
1653
1788
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1654
|
-
},
|
|
1789
|
+
}, br = ["aria-label", "title"], xr = {
|
|
1655
1790
|
key: 3,
|
|
1656
1791
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1657
|
-
},
|
|
1792
|
+
}, Sr = ["aria-label"], Cr = /* @__PURE__ */ pt(/* @__PURE__ */ y({
|
|
1658
1793
|
__name: "BlockWrapper",
|
|
1659
1794
|
props: {
|
|
1660
1795
|
block: {},
|
|
@@ -1664,7 +1799,7 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
|
|
|
1664
1799
|
},
|
|
1665
1800
|
emits: ["select"],
|
|
1666
1801
|
setup(t, { emit: n }) {
|
|
1667
|
-
let i =
|
|
1802
|
+
let i = oe(() => import("./BlockA11yBadge-BhyoMZJ9.js")), a = t, o = n, { t: s, format: c } = ct(), u = P(it, null), d = h(null), f = x(() => u?.liftedBlockId.value === a.block.id), p = x(() => f.value ? c(s.blockActions.dragLifted, { block: a.block.type }) : s.blockActions.drag);
|
|
1668
1803
|
async function m() {
|
|
1669
1804
|
await r(), d.value?.focus();
|
|
1670
1805
|
}
|
|
@@ -1691,8 +1826,8 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
|
|
|
1691
1826
|
desktop: s.viewport.desktop,
|
|
1692
1827
|
tablet: s.viewport.tablet,
|
|
1693
1828
|
mobile: s.viewport.mobile
|
|
1694
|
-
}[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E =
|
|
1695
|
-
let e =
|
|
1829
|
+
}[a.viewport] ?? a.viewport : ""), T = x(() => !!a.block.displayCondition), E = P(We, null), ee = P(qe, null), D = P(Ke, {}), k = x(() => !!D.savedModules), te = x(() => D.comments?.getBlockCount(a.block.id) ?? 0), ne = x(() => ({ margin: ur(a.block).margin })), re = x(() => {
|
|
1830
|
+
let e = ur(a.block);
|
|
1696
1831
|
return {
|
|
1697
1832
|
padding: e.padding,
|
|
1698
1833
|
backgroundColor: e.backgroundColor
|
|
@@ -1701,16 +1836,16 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
|
|
|
1701
1836
|
function ie(e) {
|
|
1702
1837
|
a.previewMode || (e.stopPropagation(), o("select"));
|
|
1703
1838
|
}
|
|
1704
|
-
function
|
|
1839
|
+
function ae() {
|
|
1705
1840
|
E?.deleteBlock(a.block.id);
|
|
1706
1841
|
}
|
|
1707
|
-
function
|
|
1842
|
+
function se() {
|
|
1708
1843
|
E?.duplicateBlock(a.block);
|
|
1709
1844
|
}
|
|
1710
|
-
function
|
|
1845
|
+
function ce() {
|
|
1711
1846
|
D.savedModules?.openSaveDialog(a.block.id);
|
|
1712
1847
|
}
|
|
1713
|
-
function
|
|
1848
|
+
function le() {
|
|
1714
1849
|
ee?.toggleBlock(a.block.id);
|
|
1715
1850
|
}
|
|
1716
1851
|
return (n, r) => (e(), w("div", {
|
|
@@ -1740,90 +1875,90 @@ var $n = ["data-block-id", "data-block-type"], er = ["aria-label"], tr = [
|
|
|
1740
1875
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1741
1876
|
title: j(s).blockActions.drag,
|
|
1742
1877
|
onKeydown: g
|
|
1743
|
-
}, [N(j(
|
|
1878
|
+
}, [N(j(tn), {
|
|
1744
1879
|
size: 14,
|
|
1745
1880
|
"stroke-width": 1.5
|
|
1746
|
-
})], 40,
|
|
1881
|
+
})], 40, pr),
|
|
1747
1882
|
C("button", {
|
|
1748
1883
|
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",
|
|
1749
1884
|
"aria-label": j(s).blockActions.duplicate,
|
|
1750
1885
|
title: j(s).blockActions.duplicate,
|
|
1751
|
-
onClick: b(
|
|
1752
|
-
}, [N(j(
|
|
1886
|
+
onClick: b(se, ["stop"])
|
|
1887
|
+
}, [N(j(Qt), {
|
|
1753
1888
|
size: 14,
|
|
1754
1889
|
"stroke-width": 1.5
|
|
1755
|
-
})], 8,
|
|
1890
|
+
})], 8, mr),
|
|
1756
1891
|
k.value ? (e(), w("button", {
|
|
1757
1892
|
key: 0,
|
|
1758
1893
|
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",
|
|
1759
1894
|
"aria-label": j(s).blockActions.saveAsModule,
|
|
1760
1895
|
title: j(s).blockActions.saveAsModule,
|
|
1761
|
-
onClick: b(
|
|
1762
|
-
}, [N(j(
|
|
1896
|
+
onClick: b(ce, ["stop"])
|
|
1897
|
+
}, [N(j(Yt), {
|
|
1763
1898
|
size: 14,
|
|
1764
1899
|
"stroke-width": 1.5
|
|
1765
|
-
})], 8,
|
|
1900
|
+
})], 8, hr)) : O("", !0),
|
|
1766
1901
|
C("button", {
|
|
1767
1902
|
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",
|
|
1768
1903
|
"aria-label": j(s).blockActions.delete,
|
|
1769
1904
|
title: j(s).blockActions.delete,
|
|
1770
|
-
onClick: b(
|
|
1771
|
-
}, [N(j(
|
|
1905
|
+
onClick: b(ae, ["stop"])
|
|
1906
|
+
}, [N(j(ut), {
|
|
1772
1907
|
size: 14,
|
|
1773
1908
|
"stroke-width": 1.5
|
|
1774
|
-
})], 8,
|
|
1775
|
-
], 8,
|
|
1776
|
-
y.value ? (e(), w("div",
|
|
1909
|
+
})], 8, gr)
|
|
1910
|
+
], 8, fr)) : O("", !0),
|
|
1911
|
+
y.value ? (e(), w("div", _r, [C("span", vr, [N(j($t), {
|
|
1777
1912
|
size: 12,
|
|
1778
1913
|
"stroke-width": 1.5
|
|
1779
1914
|
}), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : O("", !0),
|
|
1780
|
-
T.value && !y.value ? (e(), w("div",
|
|
1915
|
+
T.value && !y.value ? (e(), w("div", yr, [C("button", {
|
|
1781
1916
|
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)]",
|
|
1782
1917
|
"aria-label": j(s).blockActions.conditionToggle,
|
|
1783
1918
|
title: t.block.displayCondition?.label,
|
|
1784
|
-
onClick: b(
|
|
1785
|
-
}, [N(j(
|
|
1919
|
+
onClick: b(le, ["stop"])
|
|
1920
|
+
}, [N(j(en), {
|
|
1786
1921
|
size: 12,
|
|
1787
1922
|
"stroke-width": 2
|
|
1788
|
-
})], 8,
|
|
1789
|
-
te.value > 0 && !y.value ? (e(), w("div",
|
|
1923
|
+
})], 8, br)])) : O("", !0),
|
|
1924
|
+
te.value > 0 && !y.value ? (e(), w("div", xr, [C("button", {
|
|
1790
1925
|
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)]",
|
|
1791
1926
|
"aria-label": j(c)(j(s).blockActions.comments, { count: String(te.value) }),
|
|
1792
1927
|
onClick: r[0] ||= b((e) => j(D).comments?.openForBlock(t.block.id), ["stop"])
|
|
1793
|
-
}, [N(j(
|
|
1928
|
+
}, [N(j(lt), {
|
|
1794
1929
|
size: 12,
|
|
1795
1930
|
"stroke-width": 2.5
|
|
1796
|
-
}), _(" " + M(te.value), 1)], 8,
|
|
1931
|
+
}), _(" " + M(te.value), 1)], 8, Sr)])) : O("", !0),
|
|
1797
1932
|
C("div", {
|
|
1798
1933
|
class: "tpl-block-content",
|
|
1799
1934
|
style: A(re.value)
|
|
1800
1935
|
}, [l(n.$slots, "default", {}, void 0, !0)], 4)
|
|
1801
|
-
], 14,
|
|
1936
|
+
], 14, dr));
|
|
1802
1937
|
}
|
|
1803
1938
|
}), [["__scopeId", "data-v-7333e8d7"]]);
|
|
1804
1939
|
//#endregion
|
|
1805
1940
|
//#region src/utils/unwrapParagraph.ts
|
|
1806
|
-
function
|
|
1941
|
+
function wr(e) {
|
|
1807
1942
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1808
1943
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1809
1944
|
}
|
|
1810
1945
|
//#endregion
|
|
1811
1946
|
//#region src/components/blocks/TitleBlock.vue
|
|
1812
|
-
var
|
|
1947
|
+
var Tr = /* @__PURE__ */ y({
|
|
1813
1948
|
__name: "TitleBlock",
|
|
1814
1949
|
props: {
|
|
1815
1950
|
block: {},
|
|
1816
1951
|
viewport: {}
|
|
1817
1952
|
},
|
|
1818
1953
|
setup(t) {
|
|
1819
|
-
let n = t, r =
|
|
1954
|
+
let n = t, r = oe(() => import("./TitleEditor-DnH3yyTr.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = or(() => n.block.content), d = x(() => {
|
|
1820
1955
|
let e = {
|
|
1821
|
-
fontSize: `${
|
|
1956
|
+
fontSize: `${Ee[n.block.level]}px`,
|
|
1822
1957
|
color: n.block.color,
|
|
1823
1958
|
textAlign: n.block.textAlign
|
|
1824
1959
|
};
|
|
1825
1960
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
1826
|
-
}), f = x(() => `h${n.block.level}`), p = x(() =>
|
|
1961
|
+
}), f = x(() => `h${n.block.level}`), p = x(() => wr(c.value));
|
|
1827
1962
|
return (n, c) => (e(), w("div", {
|
|
1828
1963
|
ref_key: "blockRef",
|
|
1829
1964
|
ref: o,
|
|
@@ -1846,83 +1981,83 @@ var pr = /* @__PURE__ */ y({
|
|
|
1846
1981
|
innerHTML: p.value
|
|
1847
1982
|
}, null, 8, ["innerHTML"]))], 36));
|
|
1848
1983
|
}
|
|
1849
|
-
}),
|
|
1984
|
+
}), Er = Object.defineProperty, Dr = Object.getOwnPropertySymbols, Or = Object.prototype.hasOwnProperty, kr = Object.prototype.propertyIsEnumerable, Ar = (e, t, n) => t in e ? Er(e, t, {
|
|
1850
1985
|
enumerable: !0,
|
|
1851
1986
|
configurable: !0,
|
|
1852
1987
|
writable: !0,
|
|
1853
1988
|
value: n
|
|
1854
|
-
}) : e[t] = n,
|
|
1855
|
-
for (var n in t ||= {})
|
|
1856
|
-
if (
|
|
1989
|
+
}) : e[t] = n, jr = (e, t) => {
|
|
1990
|
+
for (var n in t ||= {}) Or.call(t, n) && Ar(e, n, t[n]);
|
|
1991
|
+
if (Dr) for (var n of Dr(t)) kr.call(t, n) && Ar(e, n, t[n]);
|
|
1857
1992
|
return e;
|
|
1858
|
-
},
|
|
1993
|
+
}, Mr = (e, t) => {
|
|
1859
1994
|
var n = {};
|
|
1860
|
-
for (var r in e)
|
|
1861
|
-
if (e != null &&
|
|
1995
|
+
for (var r in e) Or.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
1996
|
+
if (e != null && Dr) for (var r of Dr(e)) t.indexOf(r) < 0 && kr.call(e, r) && (n[r] = e[r]);
|
|
1862
1997
|
return n;
|
|
1863
|
-
},
|
|
1864
|
-
function
|
|
1865
|
-
console.warn(
|
|
1998
|
+
}, Nr = "[vue-draggable-plus]: ";
|
|
1999
|
+
function Pr(e) {
|
|
2000
|
+
console.warn(Nr + e);
|
|
1866
2001
|
}
|
|
1867
|
-
function
|
|
1868
|
-
console.error(
|
|
2002
|
+
function Fr(e) {
|
|
2003
|
+
console.error(Nr + e);
|
|
1869
2004
|
}
|
|
1870
|
-
function
|
|
2005
|
+
function Ir(e, t, n) {
|
|
1871
2006
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
1872
2007
|
}
|
|
1873
|
-
function
|
|
2008
|
+
function Lr(e) {
|
|
1874
2009
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
1875
2010
|
}
|
|
1876
|
-
function
|
|
1877
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2011
|
+
function Rr(e) {
|
|
2012
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Lr(n)] = e[n]), t), {});
|
|
1878
2013
|
}
|
|
1879
|
-
function
|
|
2014
|
+
function zr(e, t) {
|
|
1880
2015
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
1881
2016
|
}
|
|
1882
|
-
function
|
|
2017
|
+
function Br(e, t, n) {
|
|
1883
2018
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
1884
2019
|
}
|
|
1885
|
-
function
|
|
2020
|
+
function Vr(e) {
|
|
1886
2021
|
return e === void 0;
|
|
1887
2022
|
}
|
|
1888
|
-
function
|
|
2023
|
+
function Hr(e) {
|
|
1889
2024
|
return typeof e == "string";
|
|
1890
2025
|
}
|
|
1891
|
-
function
|
|
2026
|
+
function Ur(e, t, n) {
|
|
1892
2027
|
let r = e.children[n];
|
|
1893
2028
|
e.insertBefore(t, r);
|
|
1894
2029
|
}
|
|
1895
|
-
function
|
|
2030
|
+
function Wr(e) {
|
|
1896
2031
|
e.parentNode && e.parentNode.removeChild(e);
|
|
1897
2032
|
}
|
|
1898
|
-
function
|
|
2033
|
+
function Gr(e, t = document) {
|
|
1899
2034
|
let n = null;
|
|
1900
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2035
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Pr(`Element not found: ${e}`), n;
|
|
1901
2036
|
}
|
|
1902
|
-
function
|
|
2037
|
+
function Kr(e, t, n = null) {
|
|
1903
2038
|
return function(...r) {
|
|
1904
2039
|
return e.apply(n, r), t.apply(n, r);
|
|
1905
2040
|
};
|
|
1906
2041
|
}
|
|
1907
|
-
function
|
|
1908
|
-
let n =
|
|
2042
|
+
function qr(e, t) {
|
|
2043
|
+
let n = jr({}, e);
|
|
1909
2044
|
return Object.keys(t).forEach((r) => {
|
|
1910
|
-
n[r] ? n[r] =
|
|
2045
|
+
n[r] ? n[r] = Kr(e[r], t[r]) : n[r] = t[r];
|
|
1911
2046
|
}), n;
|
|
1912
2047
|
}
|
|
1913
|
-
function
|
|
2048
|
+
function Jr(e) {
|
|
1914
2049
|
return e instanceof HTMLElement;
|
|
1915
2050
|
}
|
|
1916
|
-
function
|
|
2051
|
+
function Yr(e, t) {
|
|
1917
2052
|
Object.keys(e).forEach((n) => {
|
|
1918
2053
|
t(n, e[n]);
|
|
1919
2054
|
});
|
|
1920
2055
|
}
|
|
1921
|
-
function
|
|
2056
|
+
function Xr(e) {
|
|
1922
2057
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
1923
2058
|
}
|
|
1924
|
-
var
|
|
1925
|
-
function
|
|
2059
|
+
var Zr = Object.assign;
|
|
2060
|
+
function Qr(e, t) {
|
|
1926
2061
|
var n = Object.keys(e);
|
|
1927
2062
|
if (Object.getOwnPropertySymbols) {
|
|
1928
2063
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1932,26 +2067,26 @@ function Br(e, t) {
|
|
|
1932
2067
|
}
|
|
1933
2068
|
return n;
|
|
1934
2069
|
}
|
|
1935
|
-
function
|
|
2070
|
+
function $r(e) {
|
|
1936
2071
|
for (var t = 1; t < arguments.length; t++) {
|
|
1937
2072
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
1938
|
-
t % 2 ?
|
|
1939
|
-
|
|
1940
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2073
|
+
t % 2 ? Qr(Object(n), !0).forEach(function(t) {
|
|
2074
|
+
ti(e, t, n[t]);
|
|
2075
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qr(Object(n)).forEach(function(t) {
|
|
1941
2076
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
1942
2077
|
});
|
|
1943
2078
|
}
|
|
1944
2079
|
return e;
|
|
1945
2080
|
}
|
|
1946
|
-
function
|
|
2081
|
+
function ei(e) {
|
|
1947
2082
|
"@babel/helpers - typeof";
|
|
1948
|
-
return
|
|
2083
|
+
return ei = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1949
2084
|
return typeof e;
|
|
1950
2085
|
} : function(e) {
|
|
1951
2086
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1952
|
-
},
|
|
2087
|
+
}, ei(e);
|
|
1953
2088
|
}
|
|
1954
|
-
function
|
|
2089
|
+
function ti(e, t, n) {
|
|
1955
2090
|
return t in e ? Object.defineProperty(e, t, {
|
|
1956
2091
|
value: n,
|
|
1957
2092
|
enumerable: !0,
|
|
@@ -1959,45 +2094,45 @@ function Ur(e, t, n) {
|
|
|
1959
2094
|
writable: !0
|
|
1960
2095
|
}) : e[t] = n, e;
|
|
1961
2096
|
}
|
|
1962
|
-
function
|
|
1963
|
-
return
|
|
2097
|
+
function ni() {
|
|
2098
|
+
return ni = Object.assign || function(e) {
|
|
1964
2099
|
for (var t = 1; t < arguments.length; t++) {
|
|
1965
2100
|
var n = arguments[t];
|
|
1966
2101
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1967
2102
|
}
|
|
1968
2103
|
return e;
|
|
1969
|
-
},
|
|
2104
|
+
}, ni.apply(this, arguments);
|
|
1970
2105
|
}
|
|
1971
|
-
function
|
|
2106
|
+
function ri(e, t) {
|
|
1972
2107
|
if (e == null) return {};
|
|
1973
2108
|
var n = {}, r = Object.keys(e), i, a;
|
|
1974
2109
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
1975
2110
|
return n;
|
|
1976
2111
|
}
|
|
1977
|
-
function
|
|
2112
|
+
function ii(e, t) {
|
|
1978
2113
|
if (e == null) return {};
|
|
1979
|
-
var n =
|
|
2114
|
+
var n = ri(e, t), r, i;
|
|
1980
2115
|
if (Object.getOwnPropertySymbols) {
|
|
1981
2116
|
var a = Object.getOwnPropertySymbols(e);
|
|
1982
2117
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
1983
2118
|
}
|
|
1984
2119
|
return n;
|
|
1985
2120
|
}
|
|
1986
|
-
var
|
|
1987
|
-
function
|
|
2121
|
+
var ai = "1.15.2";
|
|
2122
|
+
function oi(e) {
|
|
1988
2123
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
1989
2124
|
}
|
|
1990
|
-
var
|
|
2125
|
+
var si = oi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ci = oi(/Edge/i), li = oi(/firefox/i), ui = oi(/safari/i) && !oi(/chrome/i) && !oi(/android/i), di = oi(/iP(ad|od|hone)/i), fi = oi(/chrome/i) && oi(/android/i), pi = {
|
|
1991
2126
|
capture: !1,
|
|
1992
2127
|
passive: !1
|
|
1993
2128
|
};
|
|
1994
|
-
function F(e, t, n) {
|
|
1995
|
-
e.addEventListener(t, n, !Yr && ti);
|
|
1996
|
-
}
|
|
1997
2129
|
function I(e, t, n) {
|
|
1998
|
-
e.
|
|
2130
|
+
e.addEventListener(t, n, !si && pi);
|
|
1999
2131
|
}
|
|
2000
|
-
function
|
|
2132
|
+
function L(e, t, n) {
|
|
2133
|
+
e.removeEventListener(t, n, !si && pi);
|
|
2134
|
+
}
|
|
2135
|
+
function mi(e, t) {
|
|
2001
2136
|
if (t) {
|
|
2002
2137
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2003
2138
|
if (e.matches) return e.matches(t);
|
|
@@ -2009,41 +2144,41 @@ function ni(e, t) {
|
|
|
2009
2144
|
return !1;
|
|
2010
2145
|
}
|
|
2011
2146
|
}
|
|
2012
|
-
function
|
|
2147
|
+
function hi(e) {
|
|
2013
2148
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2014
2149
|
}
|
|
2015
|
-
function
|
|
2150
|
+
function gi(e, t, n, r) {
|
|
2016
2151
|
if (e) {
|
|
2017
2152
|
n ||= document;
|
|
2018
2153
|
do {
|
|
2019
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2154
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && mi(e, t) : mi(e, t)) || r && e === n) return e;
|
|
2020
2155
|
if (e === n) break;
|
|
2021
|
-
} while (e =
|
|
2156
|
+
} while (e = hi(e));
|
|
2022
2157
|
}
|
|
2023
2158
|
return null;
|
|
2024
2159
|
}
|
|
2025
|
-
var
|
|
2026
|
-
function L(e, t, n) {
|
|
2027
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ai, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ai, " "));
|
|
2028
|
-
}
|
|
2160
|
+
var _i = /\s+/g;
|
|
2029
2161
|
function R(e, t, n) {
|
|
2162
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(_i, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(_i, " "));
|
|
2163
|
+
}
|
|
2164
|
+
function z(e, t, n) {
|
|
2030
2165
|
var r = e && e.style;
|
|
2031
2166
|
if (r) {
|
|
2032
2167
|
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];
|
|
2033
2168
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2034
2169
|
}
|
|
2035
2170
|
}
|
|
2036
|
-
function
|
|
2171
|
+
function vi(e, t) {
|
|
2037
2172
|
var n = "";
|
|
2038
2173
|
if (typeof e == "string") n = e;
|
|
2039
2174
|
else do {
|
|
2040
|
-
var r =
|
|
2175
|
+
var r = z(e, "transform");
|
|
2041
2176
|
r && r !== "none" && (n = r + " " + n);
|
|
2042
2177
|
} while (!t && (e = e.parentNode));
|
|
2043
2178
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2044
2179
|
return i && new i(n);
|
|
2045
2180
|
}
|
|
2046
|
-
function
|
|
2181
|
+
function yi(e, t, n) {
|
|
2047
2182
|
if (e) {
|
|
2048
2183
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2049
2184
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2051,21 +2186,21 @@ function si(e, t, n) {
|
|
|
2051
2186
|
}
|
|
2052
2187
|
return [];
|
|
2053
2188
|
}
|
|
2054
|
-
function
|
|
2189
|
+
function bi() {
|
|
2055
2190
|
return document.scrollingElement || document.documentElement;
|
|
2056
2191
|
}
|
|
2057
|
-
function
|
|
2192
|
+
function B(e, t, n, r, i) {
|
|
2058
2193
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2059
2194
|
var a, o, s, c, l, u, d;
|
|
2060
|
-
if (e !== window && e.parentNode && e !==
|
|
2061
|
-
if (i && i.getBoundingClientRect && (
|
|
2195
|
+
if (e !== window && e.parentNode && e !== bi() ? (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, !si)) do
|
|
2196
|
+
if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
|
|
2062
2197
|
var f = i.getBoundingClientRect();
|
|
2063
|
-
o -= f.top + parseInt(
|
|
2198
|
+
o -= f.top + parseInt(z(i, "border-top-width")), s -= f.left + parseInt(z(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
2064
2199
|
break;
|
|
2065
2200
|
}
|
|
2066
2201
|
while (i = i.parentNode);
|
|
2067
2202
|
if (r && e !== window) {
|
|
2068
|
-
var p =
|
|
2203
|
+
var p = vi(i || e), m = p && p.a, h = p && p.d;
|
|
2069
2204
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2070
2205
|
}
|
|
2071
2206
|
return {
|
|
@@ -2078,18 +2213,18 @@ function z(e, t, n, r, i) {
|
|
|
2078
2213
|
};
|
|
2079
2214
|
}
|
|
2080
2215
|
}
|
|
2081
|
-
function
|
|
2082
|
-
for (var r =
|
|
2083
|
-
var a =
|
|
2216
|
+
function xi(e, t, n) {
|
|
2217
|
+
for (var r = Di(e, !0), i = B(e)[t]; r;) {
|
|
2218
|
+
var a = B(r)[n], o = void 0;
|
|
2084
2219
|
if (o = i >= a, !o) return r;
|
|
2085
|
-
if (r ===
|
|
2086
|
-
r =
|
|
2220
|
+
if (r === bi()) break;
|
|
2221
|
+
r = Di(r, !1);
|
|
2087
2222
|
}
|
|
2088
2223
|
return !1;
|
|
2089
2224
|
}
|
|
2090
|
-
function
|
|
2225
|
+
function Si(e, t, n, r) {
|
|
2091
2226
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2092
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2227
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && gi(o[a], n.draggable, e, !1)) {
|
|
2093
2228
|
if (i === t) return o[a];
|
|
2094
2229
|
i++;
|
|
2095
2230
|
}
|
|
@@ -2097,96 +2232,96 @@ function ui(e, t, n, r) {
|
|
|
2097
2232
|
}
|
|
2098
2233
|
return null;
|
|
2099
2234
|
}
|
|
2100
|
-
function
|
|
2101
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2235
|
+
function Ci(e, t) {
|
|
2236
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !mi(n, t));) n = n.previousElementSibling;
|
|
2102
2237
|
return n || null;
|
|
2103
2238
|
}
|
|
2104
|
-
function
|
|
2239
|
+
function wi(e, t) {
|
|
2105
2240
|
var n = 0;
|
|
2106
2241
|
if (!e || !e.parentNode) return -1;
|
|
2107
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2242
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || mi(e, t)) && n++;
|
|
2108
2243
|
return n;
|
|
2109
2244
|
}
|
|
2110
|
-
function
|
|
2111
|
-
var t = 0, n = 0, r =
|
|
2245
|
+
function Ti(e) {
|
|
2246
|
+
var t = 0, n = 0, r = bi();
|
|
2112
2247
|
if (e) do {
|
|
2113
|
-
var i =
|
|
2248
|
+
var i = vi(e), a = i.a, o = i.d;
|
|
2114
2249
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2115
2250
|
} while (e !== r && (e = e.parentNode));
|
|
2116
2251
|
return [t, n];
|
|
2117
2252
|
}
|
|
2118
|
-
function
|
|
2253
|
+
function Ei(e, t) {
|
|
2119
2254
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2120
2255
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2121
2256
|
}
|
|
2122
2257
|
return -1;
|
|
2123
2258
|
}
|
|
2124
|
-
function
|
|
2125
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2259
|
+
function Di(e, t) {
|
|
2260
|
+
if (!e || !e.getBoundingClientRect) return bi();
|
|
2126
2261
|
var n = e, r = !1;
|
|
2127
2262
|
do
|
|
2128
2263
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2129
|
-
var i =
|
|
2264
|
+
var i = z(n);
|
|
2130
2265
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2131
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2266
|
+
if (!n.getBoundingClientRect || n === document.body) return bi();
|
|
2132
2267
|
if (r || t) return n;
|
|
2133
2268
|
r = !0;
|
|
2134
2269
|
}
|
|
2135
2270
|
}
|
|
2136
2271
|
while (n = n.parentNode);
|
|
2137
|
-
return
|
|
2272
|
+
return bi();
|
|
2138
2273
|
}
|
|
2139
|
-
function
|
|
2274
|
+
function Oi(e, t) {
|
|
2140
2275
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2141
2276
|
return e;
|
|
2142
2277
|
}
|
|
2143
|
-
function
|
|
2278
|
+
function ki(e, t) {
|
|
2144
2279
|
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);
|
|
2145
2280
|
}
|
|
2146
|
-
var
|
|
2147
|
-
function
|
|
2281
|
+
var Ai;
|
|
2282
|
+
function ji(e, t) {
|
|
2148
2283
|
return function() {
|
|
2149
|
-
if (!
|
|
2284
|
+
if (!Ai) {
|
|
2150
2285
|
var n = arguments, r = this;
|
|
2151
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2152
|
-
|
|
2286
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ai = setTimeout(function() {
|
|
2287
|
+
Ai = void 0;
|
|
2153
2288
|
}, t);
|
|
2154
2289
|
}
|
|
2155
2290
|
};
|
|
2156
2291
|
}
|
|
2157
|
-
function
|
|
2158
|
-
clearTimeout(
|
|
2292
|
+
function Mi() {
|
|
2293
|
+
clearTimeout(Ai), Ai = void 0;
|
|
2159
2294
|
}
|
|
2160
|
-
function
|
|
2295
|
+
function Ni(e, t, n) {
|
|
2161
2296
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2162
2297
|
}
|
|
2163
|
-
function
|
|
2298
|
+
function Pi(e) {
|
|
2164
2299
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2165
2300
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2166
2301
|
}
|
|
2167
|
-
function
|
|
2302
|
+
function Fi(e, t, n) {
|
|
2168
2303
|
var r = {};
|
|
2169
2304
|
return Array.from(e.children).forEach(function(i) {
|
|
2170
|
-
if (!(!
|
|
2171
|
-
var a =
|
|
2305
|
+
if (!(!gi(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2306
|
+
var a = B(i);
|
|
2172
2307
|
r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
|
|
2173
2308
|
}
|
|
2174
2309
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2175
2310
|
}
|
|
2176
2311
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2177
|
-
function
|
|
2312
|
+
function Ii() {
|
|
2178
2313
|
var e = [], t;
|
|
2179
2314
|
return {
|
|
2180
2315
|
captureAnimationState: function() {
|
|
2181
2316
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2182
|
-
if (!(
|
|
2317
|
+
if (!(z(t, "display") === "none" || t === Q.ghost)) {
|
|
2183
2318
|
e.push({
|
|
2184
2319
|
target: t,
|
|
2185
|
-
rect:
|
|
2320
|
+
rect: B(t)
|
|
2186
2321
|
});
|
|
2187
|
-
var n =
|
|
2322
|
+
var n = $r({}, e[e.length - 1].rect);
|
|
2188
2323
|
if (t.thisAnimationDuration) {
|
|
2189
|
-
var r =
|
|
2324
|
+
var r = vi(t, !0);
|
|
2190
2325
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2191
2326
|
}
|
|
2192
2327
|
t.fromRect = n;
|
|
@@ -2197,7 +2332,7 @@ function Ci() {
|
|
|
2197
2332
|
e.push(t);
|
|
2198
2333
|
},
|
|
2199
2334
|
removeAnimationState: function(t) {
|
|
2200
|
-
e.splice(
|
|
2335
|
+
e.splice(Ei(e, { target: t }), 1);
|
|
2201
2336
|
},
|
|
2202
2337
|
animateAll: function(n) {
|
|
2203
2338
|
var r = this;
|
|
@@ -2207,8 +2342,8 @@ function Ci() {
|
|
|
2207
2342
|
}
|
|
2208
2343
|
var i = !1, a = 0;
|
|
2209
2344
|
e.forEach(function(e) {
|
|
2210
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2211
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2345
|
+
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = vi(n, !0);
|
|
2346
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && ki(c, s) && !ki(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ri(u, c, l, r.options)), ki(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() {
|
|
2212
2347
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2213
2348
|
}, t), n.thisAnimationDuration = t);
|
|
2214
2349
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2217,27 +2352,27 @@ function Ci() {
|
|
|
2217
2352
|
},
|
|
2218
2353
|
animate: function(e, t, n, r) {
|
|
2219
2354
|
if (r) {
|
|
2220
|
-
|
|
2221
|
-
var i =
|
|
2222
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2223
|
-
|
|
2355
|
+
z(e, "transition", ""), z(e, "transform", "");
|
|
2356
|
+
var i = vi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2357
|
+
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Li(e), z(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), z(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2358
|
+
z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2224
2359
|
}, r);
|
|
2225
2360
|
}
|
|
2226
2361
|
}
|
|
2227
2362
|
};
|
|
2228
2363
|
}
|
|
2229
|
-
function
|
|
2364
|
+
function Li(e) {
|
|
2230
2365
|
return e.offsetWidth;
|
|
2231
2366
|
}
|
|
2232
|
-
function
|
|
2367
|
+
function Ri(e, t, n, r) {
|
|
2233
2368
|
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;
|
|
2234
2369
|
}
|
|
2235
|
-
var
|
|
2370
|
+
var zi = [], Bi = { initializeByDefault: !0 }, Vi = {
|
|
2236
2371
|
mount: function(e) {
|
|
2237
|
-
for (var t in
|
|
2238
|
-
|
|
2372
|
+
for (var t in Bi) Bi.hasOwnProperty(t) && !(t in e) && (e[t] = Bi[t]);
|
|
2373
|
+
zi.forEach(function(t) {
|
|
2239
2374
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2240
|
-
}),
|
|
2375
|
+
}), zi.push(e);
|
|
2241
2376
|
},
|
|
2242
2377
|
pluginEvent: function(e, t, n) {
|
|
2243
2378
|
var r = this;
|
|
@@ -2245,16 +2380,16 @@ var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
|
|
|
2245
2380
|
r.eventCanceled = !0;
|
|
2246
2381
|
};
|
|
2247
2382
|
var i = e + "Global";
|
|
2248
|
-
|
|
2249
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2383
|
+
zi.forEach(function(r) {
|
|
2384
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i]($r({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e]($r({ sortable: t }, n)));
|
|
2250
2385
|
});
|
|
2251
2386
|
},
|
|
2252
2387
|
initializePlugins: function(e, t, n, r) {
|
|
2253
|
-
for (var i in
|
|
2388
|
+
for (var i in zi.forEach(function(r) {
|
|
2254
2389
|
var i = r.pluginName;
|
|
2255
2390
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2256
2391
|
var a = new r(e, t, e.options);
|
|
2257
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2392
|
+
a.sortable = e, a.options = e.options, e[i] = a, ni(n, a.defaults);
|
|
2258
2393
|
}
|
|
2259
2394
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2260
2395
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2263,56 +2398,56 @@ var Ei = [], Di = { initializeByDefault: !0 }, Oi = {
|
|
|
2263
2398
|
},
|
|
2264
2399
|
getEventProperties: function(e, t) {
|
|
2265
2400
|
var n = {};
|
|
2266
|
-
return
|
|
2267
|
-
typeof r.eventProperties == "function" &&
|
|
2401
|
+
return zi.forEach(function(r) {
|
|
2402
|
+
typeof r.eventProperties == "function" && ni(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2268
2403
|
}), n;
|
|
2269
2404
|
},
|
|
2270
2405
|
modifyOption: function(e, t, n) {
|
|
2271
2406
|
var r;
|
|
2272
|
-
return
|
|
2407
|
+
return zi.forEach(function(i) {
|
|
2273
2408
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2274
2409
|
}), r;
|
|
2275
2410
|
}
|
|
2276
2411
|
};
|
|
2277
|
-
function
|
|
2412
|
+
function Hi(e) {
|
|
2278
2413
|
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;
|
|
2279
2414
|
if (t ||= n && n[V], t) {
|
|
2280
2415
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2281
|
-
window.CustomEvent && !
|
|
2416
|
+
window.CustomEvent && !si && !ci ? h = new CustomEvent(r, {
|
|
2282
2417
|
bubbles: !0,
|
|
2283
2418
|
cancelable: !0
|
|
2284
2419
|
}) : (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;
|
|
2285
|
-
var v =
|
|
2420
|
+
var v = $r($r({}, m), Vi.getEventProperties(r, t));
|
|
2286
2421
|
for (var y in v) h[y] = v[y];
|
|
2287
2422
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2288
2423
|
}
|
|
2289
2424
|
}
|
|
2290
|
-
var
|
|
2291
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2292
|
-
|
|
2425
|
+
var Ui = ["evt"], H = function(e, t) {
|
|
2426
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ii(n, Ui);
|
|
2427
|
+
Vi.pluginEvent.bind(Q)(e, t, $r({
|
|
2293
2428
|
dragEl: W,
|
|
2294
2429
|
parentEl: G,
|
|
2295
2430
|
ghostEl: K,
|
|
2296
2431
|
rootEl: q,
|
|
2297
|
-
nextEl:
|
|
2298
|
-
lastDownEl:
|
|
2432
|
+
nextEl: Wi,
|
|
2433
|
+
lastDownEl: Gi,
|
|
2299
2434
|
cloneEl: J,
|
|
2300
|
-
cloneHidden:
|
|
2301
|
-
dragStarted:
|
|
2435
|
+
cloneHidden: Ki,
|
|
2436
|
+
dragStarted: oa,
|
|
2302
2437
|
putSortable: X,
|
|
2303
2438
|
activeSortable: Q.active,
|
|
2304
2439
|
originalEvent: r,
|
|
2305
|
-
oldIndex:
|
|
2306
|
-
oldDraggableIndex:
|
|
2440
|
+
oldIndex: qi,
|
|
2441
|
+
oldDraggableIndex: Ji,
|
|
2307
2442
|
newIndex: Y,
|
|
2308
|
-
newDraggableIndex:
|
|
2309
|
-
hideGhostForTarget:
|
|
2310
|
-
unhideGhostForTarget:
|
|
2443
|
+
newDraggableIndex: Yi,
|
|
2444
|
+
hideGhostForTarget: wa,
|
|
2445
|
+
unhideGhostForTarget: Ta,
|
|
2311
2446
|
cloneNowHidden: function() {
|
|
2312
|
-
|
|
2447
|
+
Ki = !0;
|
|
2313
2448
|
},
|
|
2314
2449
|
cloneNowShown: function() {
|
|
2315
|
-
|
|
2450
|
+
Ki = !1;
|
|
2316
2451
|
},
|
|
2317
2452
|
dispatchSortableEvent: function(e) {
|
|
2318
2453
|
U({
|
|
@@ -2324,45 +2459,45 @@ var Ai = ["evt"], H = function(e, t) {
|
|
|
2324
2459
|
}, i));
|
|
2325
2460
|
};
|
|
2326
2461
|
function U(e) {
|
|
2327
|
-
|
|
2462
|
+
Hi($r({
|
|
2328
2463
|
putSortable: X,
|
|
2329
2464
|
cloneEl: J,
|
|
2330
2465
|
targetEl: W,
|
|
2331
2466
|
rootEl: q,
|
|
2332
|
-
oldIndex:
|
|
2333
|
-
oldDraggableIndex:
|
|
2467
|
+
oldIndex: qi,
|
|
2468
|
+
oldDraggableIndex: Ji,
|
|
2334
2469
|
newIndex: Y,
|
|
2335
|
-
newDraggableIndex:
|
|
2470
|
+
newDraggableIndex: Yi
|
|
2336
2471
|
}, e));
|
|
2337
2472
|
}
|
|
2338
|
-
var W, G, K, q,
|
|
2339
|
-
if (
|
|
2340
|
-
if (
|
|
2473
|
+
var W, G, K, q, Wi, Gi, J, Ki, qi, Y, Ji, Yi, Xi, X, Zi = !1, Qi = !1, $i = [], ea, ta, na, ra, ia, aa, oa, sa, ca, la = !1, ua = !1, da, Z, fa = [], pa = !1, ma = [], ha = typeof document < "u", ga = di, _a = ci || si ? "cssFloat" : "float", va = ha && !fi && !di && "draggable" in document.createElement("div"), ya = function() {
|
|
2474
|
+
if (ha) {
|
|
2475
|
+
if (si) return !1;
|
|
2341
2476
|
var e = document.createElement("x");
|
|
2342
2477
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2343
2478
|
}
|
|
2344
|
-
}(),
|
|
2345
|
-
var n =
|
|
2479
|
+
}(), ba = function(e, t) {
|
|
2480
|
+
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Si(e, 0, t), a = Si(e, 1, t), o = i && z(i), s = a && z(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + B(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + B(a).width;
|
|
2346
2481
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2347
2482
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2348
2483
|
if (i && o.float && o.float !== "none") {
|
|
2349
2484
|
var u = o.float === "left" ? "left" : "right";
|
|
2350
2485
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2351
2486
|
}
|
|
2352
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2353
|
-
},
|
|
2487
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[_a] === "none" || a && n[_a] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2488
|
+
}, xa = function(e, t, n) {
|
|
2354
2489
|
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;
|
|
2355
2490
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2356
|
-
},
|
|
2491
|
+
}, Sa = function(e, t) {
|
|
2357
2492
|
var n;
|
|
2358
|
-
return
|
|
2493
|
+
return $i.some(function(r) {
|
|
2359
2494
|
var i = r[V].options.emptyInsertThreshold;
|
|
2360
|
-
if (!(!i ||
|
|
2361
|
-
var a =
|
|
2495
|
+
if (!(!i || Ci(r))) {
|
|
2496
|
+
var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2362
2497
|
if (o && s) return n = r;
|
|
2363
2498
|
}
|
|
2364
2499
|
}), n;
|
|
2365
|
-
},
|
|
2500
|
+
}, Ca = function(e) {
|
|
2366
2501
|
function t(e, n) {
|
|
2367
2502
|
return function(r, i, a, o) {
|
|
2368
2503
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2375,31 +2510,31 @@ var W, G, K, q, ji, Mi, J, Ni, Pi, Y, Fi, Ii, Li, X, Ri = !1, zi = !1, Bi = [],
|
|
|
2375
2510
|
};
|
|
2376
2511
|
}
|
|
2377
2512
|
var n = {}, r = e.group;
|
|
2378
|
-
(!r ||
|
|
2379
|
-
},
|
|
2380
|
-
!
|
|
2381
|
-
},
|
|
2382
|
-
!
|
|
2513
|
+
(!r || ei(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;
|
|
2514
|
+
}, wa = function() {
|
|
2515
|
+
!ya && K && z(K, "display", "none");
|
|
2516
|
+
}, Ta = function() {
|
|
2517
|
+
!ya && K && z(K, "display", "");
|
|
2383
2518
|
};
|
|
2384
|
-
|
|
2385
|
-
if (
|
|
2519
|
+
ha && !fi && document.addEventListener("click", function(e) {
|
|
2520
|
+
if (Qi) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Qi = !1, !1;
|
|
2386
2521
|
}, !0);
|
|
2387
|
-
var
|
|
2522
|
+
var Ea = function(e) {
|
|
2388
2523
|
if (W) {
|
|
2389
2524
|
e = e.touches ? e.touches[0] : e;
|
|
2390
|
-
var t =
|
|
2525
|
+
var t = Sa(e.clientX, e.clientY);
|
|
2391
2526
|
if (t) {
|
|
2392
2527
|
var n = {};
|
|
2393
2528
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2394
2529
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2395
2530
|
}
|
|
2396
2531
|
}
|
|
2397
|
-
},
|
|
2532
|
+
}, Da = function(e) {
|
|
2398
2533
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2399
2534
|
};
|
|
2400
2535
|
function Q(e, t) {
|
|
2401
2536
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2402
|
-
this.el = e, this.options = t =
|
|
2537
|
+
this.el = e, this.options = t = ni({}, t), e[V] = this;
|
|
2403
2538
|
var n = {
|
|
2404
2539
|
group: null,
|
|
2405
2540
|
sort: !0,
|
|
@@ -2412,7 +2547,7 @@ function Q(e, t) {
|
|
|
2412
2547
|
invertedSwapThreshold: null,
|
|
2413
2548
|
removeCloneOnHide: !0,
|
|
2414
2549
|
direction: function() {
|
|
2415
|
-
return
|
|
2550
|
+
return ba(e, this.options);
|
|
2416
2551
|
},
|
|
2417
2552
|
ghostClass: "sortable-ghost",
|
|
2418
2553
|
chosenClass: "sortable-chosen",
|
|
@@ -2439,17 +2574,17 @@ function Q(e, t) {
|
|
|
2439
2574
|
x: 0,
|
|
2440
2575
|
y: 0
|
|
2441
2576
|
},
|
|
2442
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2577
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ui,
|
|
2443
2578
|
emptyInsertThreshold: 5
|
|
2444
2579
|
};
|
|
2445
|
-
for (var r in
|
|
2446
|
-
for (var i in
|
|
2447
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
2580
|
+
for (var r in Vi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2581
|
+
for (var i in Ca(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2582
|
+
this.nativeDraggable = t.forceFallback ? !1 : va, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? I(e, "pointerdown", this._onTapStart) : (I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart)), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), $i.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ni(this, Ii());
|
|
2448
2583
|
}
|
|
2449
2584
|
Q.prototype = {
|
|
2450
2585
|
constructor: Q,
|
|
2451
2586
|
_isOutsideThisEl: function(e) {
|
|
2452
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2587
|
+
!this.el.contains(e) && e !== this.el && (sa = null);
|
|
2453
2588
|
},
|
|
2454
2589
|
_getDirection: function(e, t) {
|
|
2455
2590
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2457,8 +2592,8 @@ Q.prototype = {
|
|
|
2457
2592
|
_onTapStart: function(e) {
|
|
2458
2593
|
if (e.cancelable) {
|
|
2459
2594
|
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;
|
|
2460
|
-
if (
|
|
2461
|
-
if (
|
|
2595
|
+
if (La(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ui && s && s.tagName.toUpperCase() === "SELECT") && (s = gi(s, r.draggable, n, !1), !(s && s.animated) && Gi !== s)) {
|
|
2596
|
+
if (qi = wi(s), Ji = wi(s, r.draggable), typeof l == "function") {
|
|
2462
2597
|
if (l.call(this, e, s, this)) {
|
|
2463
2598
|
U({
|
|
2464
2599
|
sortable: t,
|
|
@@ -2471,7 +2606,7 @@ Q.prototype = {
|
|
|
2471
2606
|
return;
|
|
2472
2607
|
}
|
|
2473
2608
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2474
|
-
if (r =
|
|
2609
|
+
if (r = gi(c, r.trim(), n, !1), r) return U({
|
|
2475
2610
|
sortable: t,
|
|
2476
2611
|
rootEl: r,
|
|
2477
2612
|
name: "filter",
|
|
@@ -2483,36 +2618,36 @@ Q.prototype = {
|
|
|
2483
2618
|
i && e.cancelable && e.preventDefault();
|
|
2484
2619
|
return;
|
|
2485
2620
|
}
|
|
2486
|
-
r.handle && !
|
|
2621
|
+
r.handle && !gi(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2487
2622
|
}
|
|
2488
2623
|
}
|
|
2489
2624
|
},
|
|
2490
2625
|
_prepareDragStart: function(e, t, n) {
|
|
2491
2626
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2492
2627
|
if (n && !W && n.parentNode === i) {
|
|
2493
|
-
var c =
|
|
2494
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2628
|
+
var c = B(n);
|
|
2629
|
+
if (q = i, W = n, G = W.parentNode, Wi = W.nextSibling, Gi = n, Xi = a.group, Q.dragged = W, ea = {
|
|
2495
2630
|
target: W,
|
|
2496
2631
|
clientX: (t || e).clientX,
|
|
2497
2632
|
clientY: (t || e).clientY
|
|
2498
|
-
},
|
|
2633
|
+
}, ia = ea.clientX - c.left, aa = ea.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2499
2634
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2500
2635
|
r._onDrop();
|
|
2501
2636
|
return;
|
|
2502
2637
|
}
|
|
2503
|
-
r._disableDelayedDragEvents(), !
|
|
2638
|
+
r._disableDelayedDragEvents(), !li && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2504
2639
|
sortable: r,
|
|
2505
2640
|
name: "choose",
|
|
2506
2641
|
originalEvent: e
|
|
2507
|
-
}),
|
|
2642
|
+
}), R(W, a.chosenClass, !0);
|
|
2508
2643
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2509
|
-
|
|
2510
|
-
}),
|
|
2644
|
+
yi(W, e.trim(), Aa);
|
|
2645
|
+
}), I(o, "dragover", Ea), I(o, "mousemove", Ea), I(o, "touchmove", Ea), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), li && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ci || si))) {
|
|
2511
2646
|
if (Q.eventCanceled) {
|
|
2512
2647
|
this._onDrop();
|
|
2513
2648
|
return;
|
|
2514
2649
|
}
|
|
2515
|
-
|
|
2650
|
+
I(o, "mouseup", r._disableDelayedDrag), I(o, "touchend", r._disableDelayedDrag), I(o, "touchcancel", r._disableDelayedDrag), I(o, "mousemove", r._delayedDragTouchMoveHandler), I(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && I(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
2516
2651
|
} else s();
|
|
2517
2652
|
}
|
|
2518
2653
|
},
|
|
@@ -2521,25 +2656,25 @@ Q.prototype = {
|
|
|
2521
2656
|
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();
|
|
2522
2657
|
},
|
|
2523
2658
|
_disableDelayedDrag: function() {
|
|
2524
|
-
W &&
|
|
2659
|
+
W && Aa(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2525
2660
|
},
|
|
2526
2661
|
_disableDelayedDragEvents: function() {
|
|
2527
2662
|
var e = this.el.ownerDocument;
|
|
2528
|
-
|
|
2663
|
+
L(e, "mouseup", this._disableDelayedDrag), L(e, "touchend", this._disableDelayedDrag), L(e, "touchcancel", this._disableDelayedDrag), L(e, "mousemove", this._delayedDragTouchMoveHandler), L(e, "touchmove", this._delayedDragTouchMoveHandler), L(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2529
2664
|
},
|
|
2530
2665
|
_triggerDragStart: function(e, t) {
|
|
2531
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
2666
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? I(document, "pointermove", this._onTouchMove) : t ? I(document, "touchmove", this._onTouchMove) : I(document, "mousemove", this._onTouchMove) : (I(W, "dragend", this), I(q, "dragstart", this._onDragStart));
|
|
2532
2667
|
try {
|
|
2533
|
-
document.selection ?
|
|
2668
|
+
document.selection ? Ra(function() {
|
|
2534
2669
|
document.selection.empty();
|
|
2535
2670
|
}) : window.getSelection().removeAllRanges();
|
|
2536
2671
|
} catch {}
|
|
2537
2672
|
},
|
|
2538
2673
|
_dragStarted: function(e, t) {
|
|
2539
|
-
if (
|
|
2540
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable &&
|
|
2674
|
+
if (Zi = !1, q && W) {
|
|
2675
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", Da);
|
|
2541
2676
|
var n = this.options;
|
|
2542
|
-
!e &&
|
|
2677
|
+
!e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2543
2678
|
sortable: this,
|
|
2544
2679
|
name: "start",
|
|
2545
2680
|
originalEvent: t
|
|
@@ -2547,33 +2682,33 @@ Q.prototype = {
|
|
|
2547
2682
|
} else this._nulling();
|
|
2548
2683
|
},
|
|
2549
2684
|
_emulateDragOver: function() {
|
|
2550
|
-
if (
|
|
2551
|
-
this._lastX =
|
|
2552
|
-
for (var e = document.elementFromPoint(
|
|
2685
|
+
if (ta) {
|
|
2686
|
+
this._lastX = ta.clientX, this._lastY = ta.clientY, wa();
|
|
2687
|
+
for (var e = document.elementFromPoint(ta.clientX, ta.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ta.clientX, ta.clientY), e !== t);) t = e;
|
|
2553
2688
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2554
2689
|
if (t[V]) {
|
|
2555
2690
|
var n = void 0;
|
|
2556
2691
|
if (n = t[V]._onDragOver({
|
|
2557
|
-
clientX:
|
|
2558
|
-
clientY:
|
|
2692
|
+
clientX: ta.clientX,
|
|
2693
|
+
clientY: ta.clientY,
|
|
2559
2694
|
target: e,
|
|
2560
2695
|
rootEl: t
|
|
2561
2696
|
}), n && !this.options.dragoverBubble) break;
|
|
2562
2697
|
}
|
|
2563
2698
|
e = t;
|
|
2564
2699
|
} while (t = t.parentNode);
|
|
2565
|
-
|
|
2700
|
+
Ta();
|
|
2566
2701
|
}
|
|
2567
2702
|
},
|
|
2568
2703
|
_onTouchMove: function(e) {
|
|
2569
|
-
if (
|
|
2570
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2571
|
-
if (!Q.active && !
|
|
2704
|
+
if (ea) {
|
|
2705
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && vi(K, !0), o = K && a && a.a, s = K && a && a.d, c = ga && Z && Ti(Z), l = (i.clientX - ea.clientX + r.x) / (o || 1) + (c ? c[0] - fa[0] : 0) / (o || 1), u = (i.clientY - ea.clientY + r.y) / (s || 1) + (c ? c[1] - fa[1] : 0) / (s || 1);
|
|
2706
|
+
if (!Q.active && !Zi) {
|
|
2572
2707
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2573
2708
|
this._onDragStart(e, !0);
|
|
2574
2709
|
}
|
|
2575
2710
|
if (K) {
|
|
2576
|
-
a ? (a.e += l - (
|
|
2711
|
+
a ? (a.e += l - (na || 0), a.f += u - (ra || 0)) : a = {
|
|
2577
2712
|
a: 1,
|
|
2578
2713
|
b: 0,
|
|
2579
2714
|
c: 0,
|
|
@@ -2582,19 +2717,19 @@ Q.prototype = {
|
|
|
2582
2717
|
f: u
|
|
2583
2718
|
};
|
|
2584
2719
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2585
|
-
|
|
2720
|
+
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), na = l, ra = u, ta = i;
|
|
2586
2721
|
}
|
|
2587
2722
|
e.cancelable && e.preventDefault();
|
|
2588
2723
|
}
|
|
2589
2724
|
},
|
|
2590
2725
|
_appendGhost: function() {
|
|
2591
2726
|
if (!K) {
|
|
2592
|
-
var e = this.options.fallbackOnBody ? document.body : q, t =
|
|
2593
|
-
if (
|
|
2594
|
-
for (Z = e;
|
|
2595
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2727
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, ga, !0, e), n = this.options;
|
|
2728
|
+
if (ga) {
|
|
2729
|
+
for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2730
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = bi()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = bi(), fa = Ti(Z);
|
|
2596
2731
|
}
|
|
2597
|
-
K = W.cloneNode(!0),
|
|
2732
|
+
K = W.cloneNode(!0), R(K, n.ghostClass, !1), R(K, n.fallbackClass, !0), R(K, n.dragClass, !0), z(K, "transition", ""), z(K, "transform", ""), z(K, "box-sizing", "border-box"), z(K, "margin", 0), z(K, "top", t.top), z(K, "left", t.left), z(K, "width", t.width), z(K, "height", t.height), z(K, "opacity", "0.8"), z(K, "position", ga ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", ia / parseInt(K.style.width) * 100 + "% " + aa / parseInt(K.style.height) * 100 + "%");
|
|
2598
2733
|
}
|
|
2599
2734
|
},
|
|
2600
2735
|
_onDragStart: function(e, t) {
|
|
@@ -2603,18 +2738,18 @@ Q.prototype = {
|
|
|
2603
2738
|
this._onDrop();
|
|
2604
2739
|
return;
|
|
2605
2740
|
}
|
|
2606
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
2741
|
+
H("setupClone", this), Q.eventCanceled || (J = Pi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ra(function() {
|
|
2607
2742
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
2608
2743
|
sortable: n,
|
|
2609
2744
|
name: "clone"
|
|
2610
2745
|
}));
|
|
2611
|
-
}), !t &&
|
|
2746
|
+
}), !t && R(W, i.dragClass, !0), t ? (Qi = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (L(document, "mouseup", n._onDrop), L(document, "touchend", n._onDrop), L(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, W)), I(document, "drop", n), z(W, "transform", "translateZ(0)")), Zi = !0, n._dragStartId = Ra(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), oa = !0, ui && z(document.body, "user-select", "none");
|
|
2612
2747
|
},
|
|
2613
2748
|
_onDragOver: function(e) {
|
|
2614
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2615
|
-
if (
|
|
2749
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Xi === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2750
|
+
if (pa) return;
|
|
2616
2751
|
function h(o, s) {
|
|
2617
|
-
H(o, p,
|
|
2752
|
+
H(o, p, $r({
|
|
2618
2753
|
evt: e,
|
|
2619
2754
|
isOwner: l,
|
|
2620
2755
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2626,7 +2761,7 @@ Q.prototype = {
|
|
|
2626
2761
|
target: n,
|
|
2627
2762
|
completed: _,
|
|
2628
2763
|
onMove: function(n, i) {
|
|
2629
|
-
return
|
|
2764
|
+
return ka(q, t, W, r, n, B(n), e, i);
|
|
2630
2765
|
},
|
|
2631
2766
|
changed: v
|
|
2632
2767
|
}, s));
|
|
@@ -2635,50 +2770,50 @@ Q.prototype = {
|
|
|
2635
2770
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2636
2771
|
}
|
|
2637
2772
|
function _(r) {
|
|
2638
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
2773
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (R(W, X ? X.options.ghostClass : c.options.ghostClass, !1), R(W, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
2639
2774
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2640
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
2775
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (sa = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && Ea(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2641
2776
|
}
|
|
2642
2777
|
function v() {
|
|
2643
|
-
Y =
|
|
2778
|
+
Y = wi(W), Yi = wi(W, o.draggable), U({
|
|
2644
2779
|
sortable: p,
|
|
2645
2780
|
name: "change",
|
|
2646
2781
|
toEl: t,
|
|
2647
2782
|
newIndex: Y,
|
|
2648
|
-
newDraggableIndex:
|
|
2783
|
+
newDraggableIndex: Yi,
|
|
2649
2784
|
originalEvent: e
|
|
2650
2785
|
});
|
|
2651
2786
|
}
|
|
2652
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2787
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = gi(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2653
2788
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2654
|
-
if (
|
|
2655
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
2656
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2657
|
-
var y =
|
|
2658
|
-
if (!y ||
|
|
2789
|
+
if (Qi = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = Xi.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
2790
|
+
if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2791
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (Wi ? q.insertBefore(W, Wi) : q.appendChild(W)), _(!0);
|
|
2792
|
+
var y = Ci(t, o.draggable);
|
|
2793
|
+
if (!y || Na(e, f, this) && !y.animated) {
|
|
2659
2794
|
if (y === W) return _(!1);
|
|
2660
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
2661
|
-
} else if (y &&
|
|
2662
|
-
var b =
|
|
2795
|
+
if (y && t === e.target && (n = y), n && (i = B(n)), ka(q, t, W, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(W, y.nextSibling) : t.appendChild(W), G = t, v(), _(!0);
|
|
2796
|
+
} else if (y && Ma(e, f, this)) {
|
|
2797
|
+
var b = Si(t, 0, o, !0);
|
|
2663
2798
|
if (b === W) return _(!1);
|
|
2664
|
-
if (n = b, i =
|
|
2799
|
+
if (n = b, i = B(n), ka(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
2665
2800
|
} else if (n.parentNode === t) {
|
|
2666
|
-
i =
|
|
2667
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
2668
|
-
|
|
2801
|
+
i = B(n);
|
|
2802
|
+
var x = 0, S, C = W.parentNode !== t, w = !xa(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = xi(n, "top", "top") || xi(W, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
2803
|
+
sa !== n && (S = i[T], la = !1, ua = !w && o.invertSwap || C), x = Pa(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, ua, sa === n);
|
|
2669
2804
|
var D;
|
|
2670
2805
|
if (x !== 0) {
|
|
2671
|
-
var O =
|
|
2806
|
+
var O = wi(W);
|
|
2672
2807
|
do
|
|
2673
2808
|
O -= x, D = G.children[O];
|
|
2674
|
-
while (D && (
|
|
2809
|
+
while (D && (z(D, "display") === "none" || D === K));
|
|
2675
2810
|
}
|
|
2676
2811
|
if (x === 0 || D === n) return _(!1);
|
|
2677
|
-
|
|
2812
|
+
sa = n, ca = x;
|
|
2678
2813
|
var k = n.nextElementSibling, te = !1;
|
|
2679
2814
|
te = x === 1;
|
|
2680
|
-
var A =
|
|
2681
|
-
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1),
|
|
2815
|
+
var A = ka(q, t, W, r, n, i, e, te);
|
|
2816
|
+
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), pa = !0, setTimeout(ja, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && Ni(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !ua && (da = Math.abs(S - B(n)[T])), v(), _(!0);
|
|
2682
2817
|
}
|
|
2683
2818
|
if (t.contains(W)) return _(!1);
|
|
2684
2819
|
}
|
|
@@ -2686,26 +2821,26 @@ Q.prototype = {
|
|
|
2686
2821
|
},
|
|
2687
2822
|
_ignoreWhileAnimating: null,
|
|
2688
2823
|
_offMoveEvents: function() {
|
|
2689
|
-
|
|
2824
|
+
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", Ea), L(document, "mousemove", Ea), L(document, "touchmove", Ea);
|
|
2690
2825
|
},
|
|
2691
2826
|
_offUpEvents: function() {
|
|
2692
2827
|
var e = this.el.ownerDocument;
|
|
2693
|
-
|
|
2828
|
+
L(e, "mouseup", this._onDrop), L(e, "touchend", this._onDrop), L(e, "pointerup", this._onDrop), L(e, "touchcancel", this._onDrop), L(document, "selectstart", this);
|
|
2694
2829
|
},
|
|
2695
2830
|
_onDrop: function(e) {
|
|
2696
2831
|
var t = this.el, n = this.options;
|
|
2697
|
-
if (Y =
|
|
2832
|
+
if (Y = wi(W), Yi = wi(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = wi(W), Yi = wi(W, n.draggable), Q.eventCanceled) {
|
|
2698
2833
|
this._nulling();
|
|
2699
2834
|
return;
|
|
2700
2835
|
}
|
|
2701
|
-
|
|
2836
|
+
Zi = !1, ua = !1, la = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), za(this.cloneId), za(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ui && z(document.body, "user-select", ""), z(W, "transform", ""), e && (oa && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (q === G || X && X.lastPutMode !== "clone") && J && J.parentNode && J.parentNode.removeChild(J), W && (this.nativeDraggable && L(W, "dragend", this), Aa(W), W.style["will-change"] = "", oa && !Zi && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
|
|
2702
2837
|
sortable: this,
|
|
2703
2838
|
name: "unchoose",
|
|
2704
2839
|
toEl: G,
|
|
2705
2840
|
newIndex: null,
|
|
2706
2841
|
newDraggableIndex: null,
|
|
2707
2842
|
originalEvent: e
|
|
2708
|
-
}), q === G ? Y !==
|
|
2843
|
+
}), q === G ? Y !== qi && Y >= 0 && (U({
|
|
2709
2844
|
sortable: this,
|
|
2710
2845
|
name: "update",
|
|
2711
2846
|
toEl: G,
|
|
@@ -2737,7 +2872,7 @@ Q.prototype = {
|
|
|
2737
2872
|
name: "sort",
|
|
2738
2873
|
toEl: G,
|
|
2739
2874
|
originalEvent: e
|
|
2740
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
2875
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = qi, Yi = Ji), U({
|
|
2741
2876
|
sortable: this,
|
|
2742
2877
|
name: "end",
|
|
2743
2878
|
toEl: G,
|
|
@@ -2745,9 +2880,9 @@ Q.prototype = {
|
|
|
2745
2880
|
}), this.save()))), this._nulling();
|
|
2746
2881
|
},
|
|
2747
2882
|
_nulling: function() {
|
|
2748
|
-
H("nulling", this), q = W = G = K =
|
|
2883
|
+
H("nulling", this), q = W = G = K = Wi = J = Gi = Ki = ea = ta = oa = Y = Yi = qi = Ji = sa = ca = X = Xi = Q.dragged = Q.ghost = Q.clone = Q.active = null, ma.forEach(function(e) {
|
|
2749
2884
|
e.checked = !0;
|
|
2750
|
-
}),
|
|
2885
|
+
}), ma.length = na = ra = 0;
|
|
2751
2886
|
},
|
|
2752
2887
|
handleEvent: function(e) {
|
|
2753
2888
|
switch (e.type) {
|
|
@@ -2757,7 +2892,7 @@ Q.prototype = {
|
|
|
2757
2892
|
break;
|
|
2758
2893
|
case "dragenter":
|
|
2759
2894
|
case "dragover":
|
|
2760
|
-
W && (this._onDragOver(e),
|
|
2895
|
+
W && (this._onDragOver(e), Oa(e));
|
|
2761
2896
|
break;
|
|
2762
2897
|
case "selectstart":
|
|
2763
2898
|
e.preventDefault();
|
|
@@ -2765,14 +2900,14 @@ Q.prototype = {
|
|
|
2765
2900
|
}
|
|
2766
2901
|
},
|
|
2767
2902
|
toArray: function() {
|
|
2768
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2903
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], gi(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ia(t));
|
|
2769
2904
|
return e;
|
|
2770
2905
|
},
|
|
2771
2906
|
sort: function(e, t) {
|
|
2772
2907
|
var n = {}, r = this.el;
|
|
2773
2908
|
this.toArray().forEach(function(e, t) {
|
|
2774
2909
|
var i = r.children[t];
|
|
2775
|
-
|
|
2910
|
+
gi(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2776
2911
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2777
2912
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2778
2913
|
}), t && this.animateAll();
|
|
@@ -2782,25 +2917,25 @@ Q.prototype = {
|
|
|
2782
2917
|
e && e.set && e.set(this);
|
|
2783
2918
|
},
|
|
2784
2919
|
closest: function(e, t) {
|
|
2785
|
-
return
|
|
2920
|
+
return gi(e, t || this.options.draggable, this.el, !1);
|
|
2786
2921
|
},
|
|
2787
2922
|
option: function(e, t) {
|
|
2788
2923
|
var n = this.options;
|
|
2789
2924
|
if (t === void 0) return n[e];
|
|
2790
|
-
var r =
|
|
2791
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2925
|
+
var r = Vi.modifyOption(this, e, t);
|
|
2926
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && Ca(n);
|
|
2792
2927
|
},
|
|
2793
2928
|
destroy: function() {
|
|
2794
2929
|
H("destroy", this);
|
|
2795
2930
|
var e = this.el;
|
|
2796
|
-
e[V] = null,
|
|
2931
|
+
e[V] = null, L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart), L(e, "pointerdown", this._onTapStart), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
2797
2932
|
e.removeAttribute("draggable");
|
|
2798
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2933
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), $i.splice($i.indexOf(this.el), 1), this.el = e = null;
|
|
2799
2934
|
},
|
|
2800
2935
|
_hideClone: function() {
|
|
2801
|
-
if (!
|
|
2936
|
+
if (!Ki) {
|
|
2802
2937
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
2803
|
-
|
|
2938
|
+
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), Ki = !0;
|
|
2804
2939
|
}
|
|
2805
2940
|
},
|
|
2806
2941
|
_showClone: function(e) {
|
|
@@ -2808,99 +2943,99 @@ Q.prototype = {
|
|
|
2808
2943
|
this._hideClone();
|
|
2809
2944
|
return;
|
|
2810
2945
|
}
|
|
2811
|
-
if (
|
|
2946
|
+
if (Ki) {
|
|
2812
2947
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
2813
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
2948
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : Wi ? q.insertBefore(J, Wi) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), Ki = !1;
|
|
2814
2949
|
}
|
|
2815
2950
|
}
|
|
2816
2951
|
};
|
|
2817
|
-
function
|
|
2952
|
+
function Oa(e) {
|
|
2818
2953
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2819
2954
|
}
|
|
2820
|
-
function
|
|
2955
|
+
function ka(e, t, n, r, i, a, o, s) {
|
|
2821
2956
|
var c, l = e[V], u = l.options.onMove, d;
|
|
2822
|
-
return window.CustomEvent && !
|
|
2957
|
+
return window.CustomEvent && !si && !ci ? c = new CustomEvent("move", {
|
|
2823
2958
|
bubbles: !0,
|
|
2824
2959
|
cancelable: !0
|
|
2825
|
-
}) : (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 ||
|
|
2960
|
+
}) : (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 || B(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
2826
2961
|
}
|
|
2827
|
-
function
|
|
2962
|
+
function Aa(e) {
|
|
2828
2963
|
e.draggable = !1;
|
|
2829
2964
|
}
|
|
2830
|
-
function
|
|
2831
|
-
|
|
2965
|
+
function ja() {
|
|
2966
|
+
pa = !1;
|
|
2832
2967
|
}
|
|
2833
|
-
function
|
|
2834
|
-
var r =
|
|
2968
|
+
function Ma(e, t, n) {
|
|
2969
|
+
var r = B(Si(n.el, 0, n.options, !0)), i = Fi(n.el, n.options, K), a = 10;
|
|
2835
2970
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
2836
2971
|
}
|
|
2837
|
-
function
|
|
2838
|
-
var r =
|
|
2972
|
+
function Na(e, t, n) {
|
|
2973
|
+
var r = B(Ci(n.el, n.options.draggable)), i = Fi(n.el, n.options, K), a = 10;
|
|
2839
2974
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
2840
2975
|
}
|
|
2841
|
-
function
|
|
2976
|
+
function Pa(e, t, n, r, i, a, o, s) {
|
|
2842
2977
|
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;
|
|
2843
2978
|
if (!o) {
|
|
2844
|
-
if (s &&
|
|
2845
|
-
if (!
|
|
2846
|
-
else if (
|
|
2847
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
2979
|
+
if (s && da < l * i) {
|
|
2980
|
+
if (!la && (ca === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (la = !0), la) f = !0;
|
|
2981
|
+
else if (ca === 1 ? c < u + da : c > d - da) return -ca;
|
|
2982
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Fa(t);
|
|
2848
2983
|
}
|
|
2849
2984
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
2850
2985
|
}
|
|
2851
|
-
function
|
|
2852
|
-
return
|
|
2986
|
+
function Fa(e) {
|
|
2987
|
+
return wi(W) < wi(e) ? 1 : -1;
|
|
2853
2988
|
}
|
|
2854
|
-
function
|
|
2989
|
+
function Ia(e) {
|
|
2855
2990
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
2856
2991
|
return r.toString(36);
|
|
2857
2992
|
}
|
|
2858
|
-
function
|
|
2859
|
-
|
|
2993
|
+
function La(e) {
|
|
2994
|
+
ma.length = 0;
|
|
2860
2995
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
2861
2996
|
var r = t[n];
|
|
2862
|
-
r.checked &&
|
|
2997
|
+
r.checked && ma.push(r);
|
|
2863
2998
|
}
|
|
2864
2999
|
}
|
|
2865
|
-
function
|
|
3000
|
+
function Ra(e) {
|
|
2866
3001
|
return setTimeout(e, 0);
|
|
2867
3002
|
}
|
|
2868
|
-
function
|
|
3003
|
+
function za(e) {
|
|
2869
3004
|
return clearTimeout(e);
|
|
2870
3005
|
}
|
|
2871
|
-
|
|
2872
|
-
(Q.active ||
|
|
3006
|
+
ha && I(document, "touchmove", function(e) {
|
|
3007
|
+
(Q.active || Zi) && e.cancelable && e.preventDefault();
|
|
2873
3008
|
}), Q.utils = {
|
|
2874
|
-
on:
|
|
2875
|
-
off:
|
|
2876
|
-
css:
|
|
2877
|
-
find:
|
|
3009
|
+
on: I,
|
|
3010
|
+
off: L,
|
|
3011
|
+
css: z,
|
|
3012
|
+
find: yi,
|
|
2878
3013
|
is: function(e, t) {
|
|
2879
|
-
return !!
|
|
2880
|
-
},
|
|
2881
|
-
extend:
|
|
2882
|
-
throttle:
|
|
2883
|
-
closest:
|
|
2884
|
-
toggleClass:
|
|
2885
|
-
clone:
|
|
2886
|
-
index:
|
|
2887
|
-
nextTick:
|
|
2888
|
-
cancelNextTick:
|
|
2889
|
-
detectDirection:
|
|
2890
|
-
getChild:
|
|
3014
|
+
return !!gi(e, t, e, !1);
|
|
3015
|
+
},
|
|
3016
|
+
extend: Oi,
|
|
3017
|
+
throttle: ji,
|
|
3018
|
+
closest: gi,
|
|
3019
|
+
toggleClass: R,
|
|
3020
|
+
clone: Pi,
|
|
3021
|
+
index: wi,
|
|
3022
|
+
nextTick: Ra,
|
|
3023
|
+
cancelNextTick: za,
|
|
3024
|
+
detectDirection: ba,
|
|
3025
|
+
getChild: Si
|
|
2891
3026
|
}, Q.get = function(e) {
|
|
2892
3027
|
return e[V];
|
|
2893
3028
|
}, Q.mount = function() {
|
|
2894
3029
|
var e = [...arguments];
|
|
2895
3030
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
2896
3031
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
2897
|
-
e.utils && (Q.utils =
|
|
3032
|
+
e.utils && (Q.utils = $r($r({}, Q.utils), e.utils)), Vi.mount(e);
|
|
2898
3033
|
});
|
|
2899
3034
|
}, Q.create = function(e, t) {
|
|
2900
3035
|
return new Q(e, t);
|
|
2901
|
-
}, Q.version =
|
|
2902
|
-
var $ = [],
|
|
2903
|
-
function
|
|
3036
|
+
}, Q.version = ai;
|
|
3037
|
+
var $ = [], Ba, Va, Ha = !1, Ua, Wa, Ga, Ka;
|
|
3038
|
+
function qa() {
|
|
2904
3039
|
function e() {
|
|
2905
3040
|
for (var e in this.defaults = {
|
|
2906
3041
|
scroll: !0,
|
|
@@ -2913,70 +3048,70 @@ function Pa() {
|
|
|
2913
3048
|
return e.prototype = {
|
|
2914
3049
|
dragStarted: function(e) {
|
|
2915
3050
|
var t = e.originalEvent;
|
|
2916
|
-
this.sortable.nativeDraggable ?
|
|
3051
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? I(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? I(document, "touchmove", this._handleFallbackAutoScroll) : I(document, "mousemove", this._handleFallbackAutoScroll);
|
|
2917
3052
|
},
|
|
2918
3053
|
dragOverCompleted: function(e) {
|
|
2919
3054
|
var t = e.originalEvent;
|
|
2920
3055
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
2921
3056
|
},
|
|
2922
3057
|
drop: function() {
|
|
2923
|
-
this.sortable.nativeDraggable ?
|
|
3058
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Ya(), Ja(), Mi();
|
|
2924
3059
|
},
|
|
2925
3060
|
nulling: function() {
|
|
2926
|
-
|
|
3061
|
+
Ga = Va = Ba = Ha = Ka = Ua = Wa = null, $.length = 0;
|
|
2927
3062
|
},
|
|
2928
3063
|
_handleFallbackAutoScroll: function(e) {
|
|
2929
3064
|
this._handleAutoScroll(e, !0);
|
|
2930
3065
|
},
|
|
2931
3066
|
_handleAutoScroll: function(e, t) {
|
|
2932
3067
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
2933
|
-
if (
|
|
2934
|
-
|
|
2935
|
-
var o =
|
|
2936
|
-
|
|
2937
|
-
var a =
|
|
2938
|
-
a !== o && (o = a,
|
|
2939
|
-
}, 10),
|
|
3068
|
+
if (Ga = e, t || this.options.forceAutoScrollFallback || ci || si || ui) {
|
|
3069
|
+
Xa(e, this.options, a, t);
|
|
3070
|
+
var o = Di(a, !0);
|
|
3071
|
+
Ha && (!Ka || r !== Ua || i !== Wa) && (Ka && Ya(), Ka = setInterval(function() {
|
|
3072
|
+
var a = Di(document.elementFromPoint(r, i), !0);
|
|
3073
|
+
a !== o && (o = a, Ja()), Xa(e, n.options, a, t);
|
|
3074
|
+
}, 10), Ua = r, Wa = i);
|
|
2940
3075
|
} else {
|
|
2941
|
-
if (!this.options.bubbleScroll ||
|
|
2942
|
-
|
|
3076
|
+
if (!this.options.bubbleScroll || Di(a, !0) === bi()) {
|
|
3077
|
+
Ja();
|
|
2943
3078
|
return;
|
|
2944
3079
|
}
|
|
2945
|
-
|
|
3080
|
+
Xa(e, this.options, Di(a, !1), !1);
|
|
2946
3081
|
}
|
|
2947
3082
|
}
|
|
2948
|
-
},
|
|
3083
|
+
}, ni(e, {
|
|
2949
3084
|
pluginName: "scroll",
|
|
2950
3085
|
initializeByDefault: !0
|
|
2951
3086
|
});
|
|
2952
3087
|
}
|
|
2953
|
-
function
|
|
3088
|
+
function Ja() {
|
|
2954
3089
|
$.forEach(function(e) {
|
|
2955
3090
|
clearInterval(e.pid);
|
|
2956
3091
|
}), $ = [];
|
|
2957
3092
|
}
|
|
2958
|
-
function
|
|
2959
|
-
clearInterval(
|
|
3093
|
+
function Ya() {
|
|
3094
|
+
clearInterval(Ka);
|
|
2960
3095
|
}
|
|
2961
|
-
var
|
|
3096
|
+
var Xa = ji(function(e, t, n, r) {
|
|
2962
3097
|
if (t.scroll) {
|
|
2963
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
2964
|
-
|
|
2965
|
-
var d = 0, f =
|
|
3098
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = bi(), l = !1, u;
|
|
3099
|
+
Va !== n && (Va = n, Ja(), Ba = t.scroll, u = t.scrollFn, Ba === !0 && (Ba = Di(n, !0)));
|
|
3100
|
+
var d = 0, f = Ba;
|
|
2966
3101
|
do {
|
|
2967
|
-
var p = f, m =
|
|
3102
|
+
var p = f, m = B(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = z(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
2968
3103
|
p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
|
|
2969
3104
|
var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
|
|
2970
3105
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
2971
3106
|
($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
2972
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3107
|
+
r && this.layer === 0 && Q.active._onTouchMove(Ga);
|
|
2973
3108
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
2974
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
3109
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, Ga, $[this.layer].el) !== "continue" || Ni($[this.layer].el, n, t);
|
|
2975
3110
|
}.bind({ layer: d }), 24))), d++;
|
|
2976
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
2977
|
-
|
|
3111
|
+
} while (t.bubbleScroll && f !== c && (f = Di(f, !1)));
|
|
3112
|
+
Ha = l;
|
|
2978
3113
|
}
|
|
2979
|
-
}, 30),
|
|
3114
|
+
}, 30), Za = function(e) {
|
|
2980
3115
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
2981
3116
|
if (t) {
|
|
2982
3117
|
var c = n || i;
|
|
@@ -2988,8 +3123,8 @@ var La = vi(function(e, t, n, r) {
|
|
|
2988
3123
|
}));
|
|
2989
3124
|
}
|
|
2990
3125
|
};
|
|
2991
|
-
function
|
|
2992
|
-
|
|
3126
|
+
function Qa() {}
|
|
3127
|
+
Qa.prototype = {
|
|
2993
3128
|
startIndex: null,
|
|
2994
3129
|
dragStart: function(e) {
|
|
2995
3130
|
var t = e.oldDraggableIndex;
|
|
@@ -2998,72 +3133,72 @@ za.prototype = {
|
|
|
2998
3133
|
onSpill: function(e) {
|
|
2999
3134
|
var t = e.dragEl, n = e.putSortable;
|
|
3000
3135
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3001
|
-
var r =
|
|
3136
|
+
var r = Si(this.sortable.el, this.startIndex, this.options);
|
|
3002
3137
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3003
3138
|
},
|
|
3004
|
-
drop:
|
|
3005
|
-
},
|
|
3006
|
-
function
|
|
3007
|
-
|
|
3139
|
+
drop: Za
|
|
3140
|
+
}, ni(Qa, { pluginName: "revertOnSpill" });
|
|
3141
|
+
function $a() {}
|
|
3142
|
+
$a.prototype = {
|
|
3008
3143
|
onSpill: function(e) {
|
|
3009
3144
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3010
3145
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3011
3146
|
},
|
|
3012
|
-
drop:
|
|
3013
|
-
},
|
|
3014
|
-
function
|
|
3147
|
+
drop: Za
|
|
3148
|
+
}, ni($a, { pluginName: "removeOnSpill" }), Q.mount(new qa()), Q.mount($a, Qa);
|
|
3149
|
+
function eo(e) {
|
|
3015
3150
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3016
3151
|
}
|
|
3017
|
-
function
|
|
3018
|
-
|
|
3152
|
+
function to(e) {
|
|
3153
|
+
ae() && ee(e);
|
|
3019
3154
|
}
|
|
3020
|
-
function
|
|
3021
|
-
|
|
3155
|
+
function no(e) {
|
|
3156
|
+
ae() ? u(e) : r(e);
|
|
3022
3157
|
}
|
|
3023
|
-
var
|
|
3024
|
-
function
|
|
3025
|
-
|
|
3158
|
+
var ro = null, io = null;
|
|
3159
|
+
function ao(e = null, t = null) {
|
|
3160
|
+
ro = e, io = t;
|
|
3026
3161
|
}
|
|
3027
|
-
function
|
|
3162
|
+
function oo() {
|
|
3028
3163
|
return {
|
|
3029
|
-
data:
|
|
3030
|
-
clonedData:
|
|
3164
|
+
data: ro,
|
|
3165
|
+
clonedData: io
|
|
3031
3166
|
};
|
|
3032
3167
|
}
|
|
3033
|
-
var
|
|
3034
|
-
function
|
|
3035
|
-
let t =
|
|
3168
|
+
var so = Symbol("cloneElement");
|
|
3169
|
+
function co(...e) {
|
|
3170
|
+
let t = ae()?.proxy, n = null, i = e[0], [, o, c] = e;
|
|
3036
3171
|
Array.isArray(j(o)) || (c = o, o = null);
|
|
3037
|
-
let l = null, { immediate: u = !0, clone: d =
|
|
3172
|
+
let l = null, { immediate: u = !0, clone: d = eo, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
|
|
3038
3173
|
function h(e) {
|
|
3039
3174
|
let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
|
|
3040
3175
|
n = f && !p ? a.slice(0, -1) : a;
|
|
3041
3176
|
let s = j(j(o)?.[r]), c = d(s);
|
|
3042
|
-
|
|
3177
|
+
ao(s, c), i[so] = c;
|
|
3043
3178
|
}
|
|
3044
3179
|
function g(e) {
|
|
3045
|
-
let t = e.item[
|
|
3046
|
-
if (!
|
|
3047
|
-
if (
|
|
3180
|
+
let t = e.item[so];
|
|
3181
|
+
if (!Vr(t)) {
|
|
3182
|
+
if (Wr(e.item), a(o)) {
|
|
3048
3183
|
let n = [...j(o)];
|
|
3049
|
-
o.value =
|
|
3184
|
+
o.value = Br(n, e.newDraggableIndex, t);
|
|
3050
3185
|
return;
|
|
3051
3186
|
}
|
|
3052
|
-
|
|
3187
|
+
Br(j(o), e.newDraggableIndex, t);
|
|
3053
3188
|
}
|
|
3054
3189
|
}
|
|
3055
3190
|
function _(e) {
|
|
3056
3191
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
|
|
3057
|
-
if (
|
|
3058
|
-
|
|
3192
|
+
if (Ur(t, n, r), s === "clone") {
|
|
3193
|
+
Wr(c);
|
|
3059
3194
|
return;
|
|
3060
3195
|
}
|
|
3061
3196
|
if (a(o)) {
|
|
3062
3197
|
let e = [...j(o)];
|
|
3063
|
-
o.value =
|
|
3198
|
+
o.value = zr(e, i);
|
|
3064
3199
|
return;
|
|
3065
3200
|
}
|
|
3066
|
-
|
|
3201
|
+
zr(j(o), i);
|
|
3067
3202
|
}
|
|
3068
3203
|
function v(e) {
|
|
3069
3204
|
if (m) {
|
|
@@ -3071,12 +3206,12 @@ function Ya(...e) {
|
|
|
3071
3206
|
return;
|
|
3072
3207
|
}
|
|
3073
3208
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
|
|
3074
|
-
if (
|
|
3209
|
+
if (Wr(n), Ur(t, n, r), a(o)) {
|
|
3075
3210
|
let e = [...j(o)];
|
|
3076
|
-
o.value =
|
|
3211
|
+
o.value = Ir(e, i, s);
|
|
3077
3212
|
return;
|
|
3078
3213
|
}
|
|
3079
|
-
|
|
3214
|
+
Ir(j(o), i, s);
|
|
3080
3215
|
}
|
|
3081
3216
|
function y(e) {
|
|
3082
3217
|
let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
|
|
@@ -3095,7 +3230,7 @@ function Ya(...e) {
|
|
|
3095
3230
|
n = null;
|
|
3096
3231
|
}
|
|
3097
3232
|
r(() => {
|
|
3098
|
-
if (
|
|
3233
|
+
if (ao(), s) throw s;
|
|
3099
3234
|
});
|
|
3100
3235
|
}
|
|
3101
3236
|
let b = {
|
|
@@ -3107,19 +3242,19 @@ function Ya(...e) {
|
|
|
3107
3242
|
};
|
|
3108
3243
|
function x(e) {
|
|
3109
3244
|
let n = j(i);
|
|
3110
|
-
return e ||=
|
|
3245
|
+
return e ||= Hr(n) ? Gr(n, t?.$el) : n, e && !Jr(e) && (e = e.$el), e || Fr("Root element not found"), e;
|
|
3111
3246
|
}
|
|
3112
3247
|
function S() {
|
|
3113
|
-
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3114
|
-
return
|
|
3115
|
-
|
|
3116
|
-
}),
|
|
3248
|
+
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = Mr(e, ["immediate", "clone"]);
|
|
3249
|
+
return Yr(r, (e, t) => {
|
|
3250
|
+
Xr(e) && (r[e] = (e, ...n) => (Zr(e, oo()), t(e, ...n)));
|
|
3251
|
+
}), qr(o === null ? {} : b, r);
|
|
3117
3252
|
}
|
|
3118
3253
|
let C = (e) => {
|
|
3119
3254
|
e = x(e), l && w.destroy(), l = new Q(e, S());
|
|
3120
3255
|
};
|
|
3121
3256
|
s(() => c, () => {
|
|
3122
|
-
l &&
|
|
3257
|
+
l && Yr(S(), (e, t) => {
|
|
3123
3258
|
l?.option(e, t);
|
|
3124
3259
|
});
|
|
3125
3260
|
}, { deep: !0 });
|
|
@@ -3132,15 +3267,15 @@ function Ya(...e) {
|
|
|
3132
3267
|
toArray: () => l?.toArray(),
|
|
3133
3268
|
closest: (...e) => l?.closest(...e)
|
|
3134
3269
|
};
|
|
3135
|
-
return
|
|
3270
|
+
return no(() => {
|
|
3136
3271
|
u && C();
|
|
3137
|
-
}),
|
|
3272
|
+
}), to(w.destroy), jr({
|
|
3138
3273
|
start: C,
|
|
3139
3274
|
pause: () => w?.option("disabled", !0),
|
|
3140
3275
|
resume: () => w?.option("disabled", !1)
|
|
3141
3276
|
}, w);
|
|
3142
3277
|
}
|
|
3143
|
-
var
|
|
3278
|
+
var lo = [
|
|
3144
3279
|
"update",
|
|
3145
3280
|
"start",
|
|
3146
3281
|
"add",
|
|
@@ -3153,7 +3288,7 @@ var Xa = [
|
|
|
3153
3288
|
"clone",
|
|
3154
3289
|
"move",
|
|
3155
3290
|
"change"
|
|
3156
|
-
],
|
|
3291
|
+
], uo = y({
|
|
3157
3292
|
name: "VueDraggable",
|
|
3158
3293
|
model: {
|
|
3159
3294
|
prop: "modelValue",
|
|
@@ -3203,37 +3338,37 @@ var Xa = [
|
|
|
3203
3338
|
"tag",
|
|
3204
3339
|
"target",
|
|
3205
3340
|
"customUpdate",
|
|
3206
|
-
...
|
|
3341
|
+
...lo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3207
3342
|
],
|
|
3208
|
-
emits: ["update:modelValue", ...
|
|
3343
|
+
emits: ["update:modelValue", ...lo],
|
|
3209
3344
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3210
|
-
let a =
|
|
3345
|
+
let a = lo.reduce((e, t) => {
|
|
3211
3346
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3212
3347
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3213
3348
|
}, {}), s = x(() => {
|
|
3214
|
-
let t = S(e), { modelValue: n } = t, r =
|
|
3349
|
+
let t = S(e), { modelValue: n } = t, r = Mr(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3215
3350
|
let r = j(n);
|
|
3216
3351
|
return r !== void 0 && (e[t] = r), e;
|
|
3217
3352
|
}, {});
|
|
3218
|
-
return
|
|
3353
|
+
return jr(jr({}, a), Rr(jr(jr({}, i), o)));
|
|
3219
3354
|
}), c = x({
|
|
3220
3355
|
get: () => e.modelValue,
|
|
3221
3356
|
set: (e) => n("update:modelValue", e)
|
|
3222
|
-
}), l = h(), u = o(
|
|
3357
|
+
}), l = h(), u = o(co(e.target || l, c, s));
|
|
3223
3358
|
return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
3224
3359
|
}
|
|
3225
|
-
}),
|
|
3360
|
+
}), fo = {
|
|
3226
3361
|
mounted: "mounted",
|
|
3227
3362
|
unmounted: "unmounted"
|
|
3228
3363
|
};
|
|
3229
|
-
|
|
3364
|
+
fo.mounted, fo.unmounted;
|
|
3230
3365
|
//#endregion
|
|
3231
3366
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3232
|
-
var
|
|
3367
|
+
var po = { class: "tpl:w-full" }, mo = { class: "tpl:flex tpl:gap-0" }, ho = {
|
|
3233
3368
|
key: 0,
|
|
3234
3369
|
"data-testid": "section-drop-hint",
|
|
3235
3370
|
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)]"
|
|
3236
|
-
},
|
|
3371
|
+
}, go = /* @__PURE__ */ y({
|
|
3237
3372
|
__name: "SectionBlock",
|
|
3238
3373
|
props: {
|
|
3239
3374
|
block: {},
|
|
@@ -3241,13 +3376,13 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3241
3376
|
},
|
|
3242
3377
|
setup(n) {
|
|
3243
3378
|
let r = {
|
|
3244
|
-
title:
|
|
3245
|
-
paragraph:
|
|
3246
|
-
image:
|
|
3247
|
-
button:
|
|
3248
|
-
divider:
|
|
3249
|
-
custom:
|
|
3250
|
-
}, a = n, { t: o } =
|
|
3379
|
+
title: Tr,
|
|
3380
|
+
paragraph: cr,
|
|
3381
|
+
image: Yn,
|
|
3382
|
+
button: Jt,
|
|
3383
|
+
divider: Nn,
|
|
3384
|
+
custom: jn
|
|
3385
|
+
}, a = n, { t: o } = ct(), s = Re(Qe, "SectionBlock"), l = P(qe, null), u = P(nt, null), d = x(() => {
|
|
3251
3386
|
switch (a.block.columns) {
|
|
3252
3387
|
case "2": return ["50%", "50%"];
|
|
3253
3388
|
case "3": return [
|
|
@@ -3273,7 +3408,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3273
3408
|
r[e] = n, s.updateBlock(a.block.id, { children: r });
|
|
3274
3409
|
}
|
|
3275
3410
|
function h(e) {
|
|
3276
|
-
return
|
|
3411
|
+
return lr(e, u, r);
|
|
3277
3412
|
}
|
|
3278
3413
|
function g(e, t) {
|
|
3279
3414
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3281,11 +3416,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3281
3416
|
dataSourceFetched: t.dataSourceFetched
|
|
3282
3417
|
});
|
|
3283
3418
|
}
|
|
3284
|
-
return (r, a) => (e(), w("div",
|
|
3419
|
+
return (r, a) => (e(), w("div", po, [C("div", mo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
|
|
3285
3420
|
key: a,
|
|
3286
3421
|
class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3287
3422
|
style: A({ width: d.value[a] })
|
|
3288
|
-
}, [N(j(
|
|
3423
|
+
}, [N(j(uo), {
|
|
3289
3424
|
"model-value": p(a),
|
|
3290
3425
|
group: {
|
|
3291
3426
|
name: "blocks",
|
|
@@ -3303,13 +3438,13 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3303
3438
|
class: "tpl:min-h-[60px]",
|
|
3304
3439
|
"onUpdate:modelValue": (e) => m(a, e)
|
|
3305
3440
|
}, {
|
|
3306
|
-
default:
|
|
3441
|
+
default: se(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(Cr, {
|
|
3307
3442
|
block: r,
|
|
3308
3443
|
"is-selected": j(s).state.selectedBlockId === r.id,
|
|
3309
3444
|
viewport: n.viewport,
|
|
3310
3445
|
onSelect: (e) => j(s).selectBlock(r.id)
|
|
3311
3446
|
}, {
|
|
3312
|
-
default:
|
|
3447
|
+
default: se(() => [(e(), ne(i(h(r)), {
|
|
3313
3448
|
block: r,
|
|
3314
3449
|
viewport: n.viewport,
|
|
3315
3450
|
onFetchData: (e) => g(r, e)
|
|
@@ -3330,9 +3465,9 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3330
3465
|
"model-value",
|
|
3331
3466
|
"group",
|
|
3332
3467
|
"onUpdate:modelValue"
|
|
3333
|
-
]), p(a).length === 0 ? (e(), w("div",
|
|
3468
|
+
]), p(a).length === 0 ? (e(), w("div", ho, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
|
|
3334
3469
|
}
|
|
3335
|
-
}),
|
|
3470
|
+
}), _o = {
|
|
3336
3471
|
facebook: {
|
|
3337
3472
|
name: "Facebook",
|
|
3338
3473
|
color: "#1877F2",
|
|
@@ -3413,11 +3548,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3413
3548
|
color: "#1769FF",
|
|
3414
3549
|
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"
|
|
3415
3550
|
}
|
|
3416
|
-
},
|
|
3551
|
+
}, vo = {
|
|
3417
3552
|
small: 24,
|
|
3418
3553
|
medium: 32,
|
|
3419
3554
|
large: 48
|
|
3420
|
-
},
|
|
3555
|
+
}, yo = [
|
|
3421
3556
|
"facebook",
|
|
3422
3557
|
"twitter",
|
|
3423
3558
|
"instagram",
|
|
@@ -3434,11 +3569,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3434
3569
|
"github",
|
|
3435
3570
|
"dribbble",
|
|
3436
3571
|
"behance"
|
|
3437
|
-
],
|
|
3572
|
+
], bo = [
|
|
3438
3573
|
"width",
|
|
3439
3574
|
"height",
|
|
3440
3575
|
"fill"
|
|
3441
|
-
],
|
|
3576
|
+
], xo = ["d"], So = /* @__PURE__ */ y({
|
|
3442
3577
|
__name: "SocialIconSvg",
|
|
3443
3578
|
props: {
|
|
3444
3579
|
platform: {},
|
|
@@ -3446,7 +3581,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3446
3581
|
iconSize: {}
|
|
3447
3582
|
},
|
|
3448
3583
|
setup(t) {
|
|
3449
|
-
let n = t, r = x(() =>
|
|
3584
|
+
let n = t, r = x(() => _o[n.platform]), i = x(() => vo[n.iconSize]), a = x(() => {
|
|
3450
3585
|
let e = {
|
|
3451
3586
|
display: "inline-flex",
|
|
3452
3587
|
alignItems: "center",
|
|
@@ -3490,25 +3625,25 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3490
3625
|
viewBox: "0 0 24 24",
|
|
3491
3626
|
fill: s.value,
|
|
3492
3627
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3493
|
-
}, [C("path", { d: r.value.path }, null, 8,
|
|
3628
|
+
}, [C("path", { d: r.value.path }, null, 8, xo)], 8, bo))], 4));
|
|
3494
3629
|
}
|
|
3495
|
-
}),
|
|
3630
|
+
}), Co = { class: "tpl:w-full" }, wo = ["href"], To = {
|
|
3496
3631
|
key: 1,
|
|
3497
3632
|
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)]"
|
|
3498
|
-
},
|
|
3633
|
+
}, Eo = /* @__PURE__ */ y({
|
|
3499
3634
|
__name: "SocialIconsBlock",
|
|
3500
3635
|
props: {
|
|
3501
3636
|
block: {},
|
|
3502
3637
|
viewport: {}
|
|
3503
3638
|
},
|
|
3504
3639
|
setup(t) {
|
|
3505
|
-
let n = t, { t: r } =
|
|
3640
|
+
let n = t, { t: r } = ct(), i = x(() => ({
|
|
3506
3641
|
display: "flex",
|
|
3507
3642
|
flexWrap: "wrap",
|
|
3508
3643
|
gap: `${n.block.spacing}px`,
|
|
3509
3644
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3510
3645
|
})), a = x(() => n.block.icons.length > 0);
|
|
3511
|
-
return (n, o) => (e(), w("div",
|
|
3646
|
+
return (n, o) => (e(), w("div", Co, [a.value ? (e(), w("div", {
|
|
3512
3647
|
key: 0,
|
|
3513
3648
|
style: A(i.value)
|
|
3514
3649
|
}, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
|
|
@@ -3516,7 +3651,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3516
3651
|
href: n.url || "#",
|
|
3517
3652
|
class: "tpl:cursor-default",
|
|
3518
3653
|
onClick: o[0] ||= b(() => {}, ["prevent"])
|
|
3519
|
-
}, [N(
|
|
3654
|
+
}, [N(So, {
|
|
3520
3655
|
platform: n.platform,
|
|
3521
3656
|
"icon-style": t.block.iconStyle,
|
|
3522
3657
|
"icon-size": t.block.iconSize
|
|
@@ -3524,44 +3659,44 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3524
3659
|
"platform",
|
|
3525
3660
|
"icon-style",
|
|
3526
3661
|
"icon-size"
|
|
3527
|
-
])], 8,
|
|
3662
|
+
])], 8, wo))), 128))], 4)) : (e(), w("div", To, [N(j(on), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
|
|
3528
3663
|
}
|
|
3529
|
-
}),
|
|
3664
|
+
}), Do = { class: "tpl:w-full" }, Oo = {
|
|
3530
3665
|
key: 0,
|
|
3531
3666
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3532
3667
|
style: {
|
|
3533
3668
|
"background-color": "var(--tpl-bg-hover)",
|
|
3534
3669
|
color: "var(--tpl-text-dim)"
|
|
3535
3670
|
}
|
|
3536
|
-
},
|
|
3671
|
+
}, ko = /* @__PURE__ */ y({
|
|
3537
3672
|
__name: "SpacerBlock",
|
|
3538
3673
|
props: {
|
|
3539
3674
|
block: {},
|
|
3540
3675
|
viewport: {}
|
|
3541
3676
|
},
|
|
3542
3677
|
setup(t) {
|
|
3543
|
-
let n = t, r =
|
|
3678
|
+
let n = t, r = Re(Qe, "SpacerBlock"), i = x(() => ({
|
|
3544
3679
|
height: `${n.block.height}px`,
|
|
3545
3680
|
minHeight: `${n.block.height}px`,
|
|
3546
3681
|
...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3547
3682
|
}));
|
|
3548
|
-
return (n, a) => (e(), w("div",
|
|
3683
|
+
return (n, a) => (e(), w("div", Do, [C("div", {
|
|
3549
3684
|
style: A(i.value),
|
|
3550
3685
|
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
|
|
3551
|
-
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span",
|
|
3686
|
+
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span", Oo, M(t.block.height) + "px ", 1))], 6)]));
|
|
3552
3687
|
}
|
|
3553
|
-
}),
|
|
3688
|
+
}), Ao = { class: "tpl:w-full" }, jo = { key: 0 }, Mo = [
|
|
3554
3689
|
"aria-label",
|
|
3555
3690
|
"data-placeholder",
|
|
3556
3691
|
"onBlur"
|
|
3557
|
-
],
|
|
3692
|
+
], No = [
|
|
3558
3693
|
"aria-label",
|
|
3559
3694
|
"data-placeholder",
|
|
3560
3695
|
"onBlur"
|
|
3561
|
-
],
|
|
3696
|
+
], Po = {
|
|
3562
3697
|
key: 1,
|
|
3563
3698
|
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)]"
|
|
3564
|
-
},
|
|
3699
|
+
}, Fo = /* @__PURE__ */ pt(/* @__PURE__ */ y({
|
|
3565
3700
|
__name: "TableBlock",
|
|
3566
3701
|
props: {
|
|
3567
3702
|
block: {},
|
|
@@ -3575,7 +3710,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3575
3710
|
updated(e, t) {
|
|
3576
3711
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3577
3712
|
}
|
|
3578
|
-
}, i = n, { t: a } =
|
|
3713
|
+
}, i = n, { t: a } = ct(), o = Re(Qe, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
|
|
3579
3714
|
width: "100%",
|
|
3580
3715
|
borderCollapse: "collapse",
|
|
3581
3716
|
fontSize: `${i.block.fontSize}px`,
|
|
@@ -3604,11 +3739,11 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3604
3739
|
} : n);
|
|
3605
3740
|
o.updateBlock(i.block.id, { rows: a });
|
|
3606
3741
|
}
|
|
3607
|
-
return (n, i) => (e(), w("div",
|
|
3742
|
+
return (n, i) => (e(), w("div", Ao, [s.value ? (e(), w("table", {
|
|
3608
3743
|
key: 0,
|
|
3609
3744
|
style: A(l.value),
|
|
3610
3745
|
class: "tpl-table-editable"
|
|
3611
|
-
}, [f.value ? (e(), w("thead",
|
|
3746
|
+
}, [f.value ? (e(), w("thead", jo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
|
|
3612
3747
|
key: n.id,
|
|
3613
3748
|
style: A(d.value),
|
|
3614
3749
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3617,7 +3752,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3617
3752
|
onBlur: (e) => h(f.value.id, n.id, e),
|
|
3618
3753
|
onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3619
3754
|
onClick: b(m, ["stop"])
|
|
3620
|
-
}, null, 44,
|
|
3755
|
+
}, null, 44, Mo)), [[r, n.content]])), 128))])])) : O("", !0), C("tbody", null, [(e(!0), w(D, null, c(p.value, (n) => (e(), w("tr", { key: n.id }, [(e(!0), w(D, null, c(n.cells, (o) => t((e(), w("td", {
|
|
3621
3756
|
key: o.id,
|
|
3622
3757
|
style: A(u.value),
|
|
3623
3758
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3626,9 +3761,9 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3626
3761
|
onBlur: (e) => h(n.id, o.id, e),
|
|
3627
3762
|
onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3628
3763
|
onClick: b(m, ["stop"])
|
|
3629
|
-
}, null, 44,
|
|
3764
|
+
}, null, 44, No)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", Po, [N(j(sn), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
|
|
3630
3765
|
}
|
|
3631
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3766
|
+
}), [["__scopeId", "data-v-4f49860b"]]), Io = /* @__PURE__ */ y({
|
|
3632
3767
|
__name: "VideoPlayButton",
|
|
3633
3768
|
props: { hoverEffect: {
|
|
3634
3769
|
type: Boolean,
|
|
@@ -3646,7 +3781,7 @@ var $a = { class: "tpl:w-full" }, eo = { class: "tpl:flex tpl:gap-0" }, to = {
|
|
|
3646
3781
|
});
|
|
3647
3782
|
//#endregion
|
|
3648
3783
|
//#region src/utils/videoThumbnail.ts
|
|
3649
|
-
function
|
|
3784
|
+
function Lo(e) {
|
|
3650
3785
|
if (!e) return {
|
|
3651
3786
|
platform: "unknown",
|
|
3652
3787
|
videoId: null,
|
|
@@ -3678,31 +3813,31 @@ function wo(e) {
|
|
|
3678
3813
|
thumbnailUrl: null
|
|
3679
3814
|
};
|
|
3680
3815
|
}
|
|
3681
|
-
function
|
|
3682
|
-
return t ||
|
|
3816
|
+
function Ro(e, t) {
|
|
3817
|
+
return t || Lo(e).thumbnailUrl;
|
|
3683
3818
|
}
|
|
3684
3819
|
//#endregion
|
|
3685
3820
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3686
|
-
var
|
|
3821
|
+
var zo = ["src", "alt"], Bo = {
|
|
3687
3822
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3688
3823
|
style: { opacity: "0.7" }
|
|
3689
|
-
},
|
|
3824
|
+
}, Vo = ["href"], Ho = ["src", "alt"], Uo = ["src", "alt"], Wo = {
|
|
3690
3825
|
key: 3,
|
|
3691
3826
|
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)]"
|
|
3692
|
-
},
|
|
3827
|
+
}, Go = /* @__PURE__ */ y({
|
|
3693
3828
|
__name: "VideoBlock",
|
|
3694
3829
|
props: {
|
|
3695
3830
|
block: {},
|
|
3696
3831
|
viewport: {}
|
|
3697
3832
|
},
|
|
3698
3833
|
setup(t) {
|
|
3699
|
-
let n = t, { t: r } =
|
|
3834
|
+
let n = t, { t: r } = ct(), { syntax: i } = mt(), a = x(() => fe(n.block.url, i) || fe(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : Ro(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => ({
|
|
3700
3835
|
maxWidth: "100%",
|
|
3701
3836
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
3702
3837
|
display: "block",
|
|
3703
3838
|
margin: n.block.align === "center" ? "0 auto" : void 0,
|
|
3704
3839
|
marginLeft: n.block.align === "right" ? "auto" : void 0
|
|
3705
|
-
})), l = x(() =>
|
|
3840
|
+
})), l = x(() => fe(n.block.url, i) ? n.block.url : n.block.thumbnailUrl);
|
|
3706
3841
|
return (n, i) => (e(), w("div", {
|
|
3707
3842
|
class: "tpl:w-full",
|
|
3708
3843
|
style: A(s.value)
|
|
@@ -3714,16 +3849,16 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3714
3849
|
class: "tpl:w-full tpl:border-0",
|
|
3715
3850
|
src: t.block.placeholderUrl,
|
|
3716
3851
|
alt: t.block.alt
|
|
3717
|
-
}, null, 8,
|
|
3852
|
+
}, null, 8, zo), N(Io)], 4)) : a.value ? (e(), w("div", {
|
|
3718
3853
|
key: 1,
|
|
3719
3854
|
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)]",
|
|
3720
3855
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
3721
|
-
}, [N(j(
|
|
3856
|
+
}, [N(j(cn), {
|
|
3722
3857
|
size: 36,
|
|
3723
3858
|
"stroke-width": 1.5,
|
|
3724
3859
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3725
3860
|
style: { opacity: "0.5" }
|
|
3726
|
-
}), C("span",
|
|
3861
|
+
}), C("span", Bo, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
|
|
3727
3862
|
key: 0,
|
|
3728
3863
|
href: t.block.url,
|
|
3729
3864
|
target: "_blank",
|
|
@@ -3735,7 +3870,7 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3735
3870
|
class: "tpl:w-full tpl:border-0",
|
|
3736
3871
|
src: o.value,
|
|
3737
3872
|
alt: t.block.alt
|
|
3738
|
-
}, null, 8,
|
|
3873
|
+
}, null, 8, Ho), N(Io, { "hover-effect": "" })], 12, Vo)) : (e(), w("div", {
|
|
3739
3874
|
key: 1,
|
|
3740
3875
|
class: "tpl:relative tpl:inline-block",
|
|
3741
3876
|
style: A(c.value)
|
|
@@ -3743,65 +3878,73 @@ var Eo = ["src", "alt"], Do = {
|
|
|
3743
3878
|
class: "tpl:w-full tpl:border-0",
|
|
3744
3879
|
src: o.value,
|
|
3745
3880
|
alt: t.block.alt
|
|
3746
|
-
}, null, 8,
|
|
3881
|
+
}, null, 8, Uo), N(Io)], 4))], 64)) : (e(), w("div", Wo, [N(j(cn), {
|
|
3747
3882
|
size: 40,
|
|
3748
3883
|
"stroke-width": 1.5,
|
|
3749
3884
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3750
3885
|
}), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
|
|
3751
3886
|
}
|
|
3752
|
-
}),
|
|
3753
|
-
section:
|
|
3754
|
-
title:
|
|
3755
|
-
paragraph:
|
|
3756
|
-
image:
|
|
3757
|
-
button:
|
|
3758
|
-
divider:
|
|
3759
|
-
video:
|
|
3760
|
-
social:
|
|
3761
|
-
menu:
|
|
3762
|
-
table:
|
|
3763
|
-
spacer:
|
|
3764
|
-
html:
|
|
3765
|
-
countdown:
|
|
3887
|
+
}), Ko = {
|
|
3888
|
+
section: go,
|
|
3889
|
+
title: Tr,
|
|
3890
|
+
paragraph: cr,
|
|
3891
|
+
image: Yn,
|
|
3892
|
+
button: Jt,
|
|
3893
|
+
divider: Nn,
|
|
3894
|
+
video: Go,
|
|
3895
|
+
social: Eo,
|
|
3896
|
+
menu: $n,
|
|
3897
|
+
table: Fo,
|
|
3898
|
+
spacer: ko,
|
|
3899
|
+
html: Rn,
|
|
3900
|
+
countdown: oe(() => import("./CountdownBlock-ByJ0_8Pk.js").then((e) => e.n))
|
|
3766
3901
|
};
|
|
3767
|
-
function
|
|
3768
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3902
|
+
function qo(e) {
|
|
3903
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = ct(r);
|
|
3769
3904
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3770
|
-
let { resolvedTheme: c } =
|
|
3905
|
+
let { resolvedTheme: c } = Ft(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = Lt({
|
|
3771
3906
|
themeOverrides: l,
|
|
3772
3907
|
resolvedTheme: c,
|
|
3773
3908
|
extraStyles: e.themeExtraStyles
|
|
3774
|
-
}), d =
|
|
3909
|
+
}), d = xt({
|
|
3775
3910
|
content: t.content,
|
|
3776
3911
|
setContent: (e, n) => t.setContent(e, n),
|
|
3777
3912
|
...e.historyOptions
|
|
3778
3913
|
});
|
|
3779
|
-
|
|
3780
|
-
let f =
|
|
3914
|
+
Dt(t, d);
|
|
3915
|
+
let f = Ct({
|
|
3781
3916
|
addBlock: t.addBlock,
|
|
3782
3917
|
removeBlock: t.removeBlock,
|
|
3783
3918
|
updateBlock: t.updateBlock,
|
|
3784
3919
|
selectBlock: t.selectBlock,
|
|
3785
3920
|
findBlockLocation: t.findBlockLocation,
|
|
3786
3921
|
blockDefaults: n.blockDefaults
|
|
3787
|
-
}),
|
|
3922
|
+
}), m = Tt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? wt({
|
|
3788
3923
|
content: t.content,
|
|
3789
3924
|
isDirty: () => t.state.isDirty,
|
|
3790
3925
|
...e.autoSaveOptions
|
|
3791
|
-
}) : null,
|
|
3792
|
-
|
|
3793
|
-
e ?
|
|
3926
|
+
}) : null, _ = null;
|
|
3927
|
+
g && (_ = s(d.isNavigating, (e) => {
|
|
3928
|
+
e ? g.pause() : g.resume();
|
|
3794
3929
|
}));
|
|
3795
|
-
let
|
|
3930
|
+
let v = Pt(t, {
|
|
3796
3931
|
t: a,
|
|
3797
3932
|
format: o
|
|
3798
|
-
}),
|
|
3799
|
-
if (
|
|
3800
|
-
function
|
|
3801
|
-
for (let t of e)
|
|
3802
|
-
}
|
|
3803
|
-
|
|
3804
|
-
|
|
3933
|
+
}), y = Vt();
|
|
3934
|
+
if (Ut(y, Ko), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, jn);
|
|
3935
|
+
function b(e) {
|
|
3936
|
+
for (let t of e) y.registerCustom(t, jn);
|
|
3937
|
+
}
|
|
3938
|
+
let S = jt();
|
|
3939
|
+
if (p() && re(S.dispose), e.containerEl) {
|
|
3940
|
+
let t = e.containerEl;
|
|
3941
|
+
Ie(document, "pointerdown", (e) => {
|
|
3942
|
+
let n = t.value;
|
|
3943
|
+
n && (e.composedPath?.() ?? []).includes(n) && S.claim();
|
|
3944
|
+
}, { capture: !0 });
|
|
3945
|
+
}
|
|
3946
|
+
function C(r) {
|
|
3947
|
+
S.isActive() && Gt(r, {
|
|
3805
3948
|
history: d,
|
|
3806
3949
|
selectBlock: (e) => t.selectBlock(e),
|
|
3807
3950
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3810,38 +3953,38 @@ function Po(e) {
|
|
|
3810
3953
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
3811
3954
|
});
|
|
3812
3955
|
}
|
|
3813
|
-
|
|
3814
|
-
let
|
|
3815
|
-
E(
|
|
3816
|
-
let
|
|
3817
|
-
E(
|
|
3818
|
-
let
|
|
3956
|
+
Ie(document, "keydown", C);
|
|
3957
|
+
let w = h(null);
|
|
3958
|
+
E(Xe, e.editorRoot ?? document), E(at, w), E(Ve, r), E(Qe, t), E(Ue, d), E(We, f), E(qe, m), E(Ye, i), E(Be, u), E(Ze, c), E($e, n.blockDefaults), E(nt, y), E(Je, n.customBlocks ?? []);
|
|
3959
|
+
let T = ye(n.mergeTags?.syntax);
|
|
3960
|
+
E(st, n.mergeTags?.tags ?? []), E(ot, T), E(ze, n.mergeTags?.onRequest ?? null), E(Ge, n.mergeTags?.autocomplete !== !1), E(He, n.onRequestMedia ?? null), E(et, n.displayConditions?.conditions ?? []), E(tt, n.displayConditions?.allowCustom ?? !1), E(Ke, e.capabilities ?? {}), E(it, v);
|
|
3961
|
+
let ee = n.accessibility?.disabled === !0 ? null : Mt({
|
|
3819
3962
|
content: t.content,
|
|
3820
3963
|
options: n.accessibility ?? {},
|
|
3821
3964
|
updateBlock: t.updateBlock,
|
|
3822
3965
|
updateSettings: t.updateSettings
|
|
3823
3966
|
});
|
|
3824
|
-
E(
|
|
3825
|
-
function
|
|
3826
|
-
|
|
3967
|
+
E(rt, ee);
|
|
3968
|
+
function D() {
|
|
3969
|
+
_?.(), ee?.destroy(), g?.destroy(), d.destroy();
|
|
3827
3970
|
}
|
|
3828
3971
|
return {
|
|
3829
3972
|
t: a,
|
|
3830
3973
|
format: o,
|
|
3831
3974
|
history: d,
|
|
3832
3975
|
blockActions: f,
|
|
3833
|
-
conditionPreview:
|
|
3834
|
-
autoSave:
|
|
3976
|
+
conditionPreview: m,
|
|
3977
|
+
autoSave: g,
|
|
3835
3978
|
resolvedTheme: c,
|
|
3836
3979
|
themeStyles: u,
|
|
3837
3980
|
themeOverrides: l,
|
|
3838
|
-
registry:
|
|
3839
|
-
keyboardReorder:
|
|
3840
|
-
accessibilityLint:
|
|
3841
|
-
popoverRoot:
|
|
3842
|
-
registerCustomBlocks:
|
|
3843
|
-
destroy:
|
|
3981
|
+
registry: y,
|
|
3982
|
+
keyboardReorder: v,
|
|
3983
|
+
accessibilityLint: ee,
|
|
3984
|
+
popoverRoot: w,
|
|
3985
|
+
registerCustomBlocks: b,
|
|
3986
|
+
destroy: D
|
|
3844
3987
|
};
|
|
3845
3988
|
}
|
|
3846
3989
|
//#endregion
|
|
3847
|
-
export {
|
|
3990
|
+
export { $t as A, hn as C, on as D, sn as E, Nt as F, Et as I, _t as L, Zt as M, Jt as N, rn as O, Bt as P, gn as S, dn as T, Rn as _, Eo as a, Sn as b, go as c, Cr as d, ur as f, Yn as g, $n as h, ko as i, Qt as j, nn as k, uo as l, cr as m, Go as n, _o as o, lr as p, Fo as r, yo as s, qo as t, Tr as u, Nn as v, mn as w, bn as x, jn as y };
|