@templatical/editor 0.10.4 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-Djjqrmoh.js → AiChatSidebar-Cm5RM5Qh.js} +8 -8
- package/dist/{AiFeatureMenu-DR56EYbL.js → AiFeatureMenu-D4D2Sqfk.js} +6 -6
- package/dist/{BlockIssueBadge-ySMhwDRR.js → BlockIssueBadge-BF4sdsr4.js} +4 -4
- package/dist/{CloudEditor-BLlRKq5D.js → CloudEditor-CLwyq3kf.js} +18 -17
- package/dist/{CollaboratorBar-BlXmZrIj.js → CollaboratorBar-DjX-o5Pi.js} +3 -3
- package/dist/{CommentsSidebar-XcYtqAn8.js → CommentsSidebar-BQJzyCc6.js} +11 -11
- package/dist/{CountdownBlock-sAAv3BHE.js → CountdownBlock-D_AsF4F3.js} +1 -1
- package/dist/{CountdownToolbar-CUvqPILZ.js → CountdownToolbar-BGTkFky9.js} +2 -2
- package/dist/{DesignReferenceSidebar-B0Upq2MY.js → DesignReferenceSidebar-O3epZMXD.js} +6 -6
- package/dist/{IssuesPanel-BvcqQ0ec.js → IssuesPanel-CPBbR8yp.js} +7 -7
- package/dist/{ModuleBrowserModal-BdOB1Lbt.js → ModuleBrowserModal-CVS4Sf7H.js} +9 -9
- package/dist/{ModulePreviewCanvas-BeglLfBF.js → ModulePreviewCanvas-C10YXsL_.js} +2 -2
- package/dist/{NumberWithSuffix-Cb7HI_yW.js → NumberWithSuffix-eI9pPDWT.js} +1 -1
- package/dist/{ParagraphEditor-4Wrd3nnB.js → ParagraphEditor-BKoqcKIt.js} +22 -22
- package/dist/{RichTextEditorContent-D-uKzBDa.js → RichTextEditorContent-Dvn4woIt.js} +6 -6
- package/dist/{SaveModuleDialog-ueFhCVWN.js → SaveModuleDialog-BMuIjxVn.js} +6 -6
- package/dist/{SnapshotHistory-DNuw_gCY.js → SnapshotHistory-DZ5_W7e4.js} +7 -7
- package/dist/{TemplateScoringPanel-bkIhEokb.js → TemplateScoringPanel-Bt5Rsgen.js} +12 -12
- package/dist/{TestEmailModal-Tg30-itu.js → TestEmailModal-EjpH-F-W.js} +4 -4
- package/dist/{TitleEditor-CY8QWbEw.js → TitleEditor-Rv1deuV7.js} +12 -12
- package/dist/{TplModal-D338Vv9U.js → TplModal-DSmCQIm4.js} +3 -3
- package/dist/{blockTypeIcons-CYoPwoH9.js → blockTypeIcons-OhEkQhYj.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-DRWRoPdh.js → AiFeatureMenu-Dm9CL3u0.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-DRWRoPdh.js.map → AiFeatureMenu-Dm9CL3u0.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D2ApLp61.js → BlockIssueBadge-DjnFAeWq.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D2ApLp61.js.map → BlockIssueBadge-DjnFAeWq.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-gvOOuXac.js → CloudEditor-XSmLmdgp.js} +157 -156
- package/dist/cdn/chunks/CloudEditor-XSmLmdgp.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BZK3R383.js → CollaboratorBar-BfoGJhns.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BZK3R383.js.map → CollaboratorBar-BfoGJhns.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DU5YmjFP.js → CountdownBlock-GRio55a1.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-DU5YmjFP.js.map → CountdownBlock-GRio55a1.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C1nlFm4e.js → CountdownToolbar-Cd1oEopw.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-C1nlFm4e.js.map → CountdownToolbar-Cd1oEopw.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-R3M60NTk.js → IssuesPanel-C-BiFQDQ.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-R3M60NTk.js.map → IssuesPanel-C-BiFQDQ.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DMithQu8.js → ModuleBrowserModal-Dj7gRT4Q.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-DMithQu8.js.map → ModuleBrowserModal-Dj7gRT4Q.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-BNKbV_c2.js → ModulePreviewCanvas-hwdveKb0.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-BNKbV_c2.js.map → ModulePreviewCanvas-hwdveKb0.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-C5zNn3Oc.js → NumberWithSuffix-bE_6cfiA.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-C5zNn3Oc.js.map → NumberWithSuffix-bE_6cfiA.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-H136qVNI.js → ParagraphEditor-y1kGJRBX.js} +48 -48
- package/dist/cdn/chunks/{ParagraphEditor-H136qVNI.js.map → ParagraphEditor-y1kGJRBX.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BxW6vSck.js → RichTextEditorContent-DPy9D4hc.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-BxW6vSck.js.map → RichTextEditorContent-DPy9D4hc.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BaiynUWb.js → SaveModuleDialog-CPu5e2VG.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-BaiynUWb.js.map → SaveModuleDialog-CPu5e2VG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BBsR46vE.js → TitleEditor-CMzzOPye.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-BBsR46vE.js.map → TitleEditor-CMzzOPye.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CX05RINM.js → blockTypeIcons-BC5qpvuV.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-CX05RINM.js.map → blockTypeIcons-BC5qpvuV.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-2LuW8PHB.js → extensions-DH7ESsaz.js} +22 -22
- package/dist/cdn/chunks/{extensions-2LuW8PHB.js.map → extensions-DH7ESsaz.js.map} +1 -1
- package/dist/cdn/chunks/{features-CxHQG9xr.js → features-DmUOSthI.js} +647 -678
- package/dist/cdn/chunks/features-DmUOSthI.js.map +1 -0
- package/dist/cdn/chunks/{icons-DrsFvnNP.js → icons-DguD4x_X.js} +2 -2
- package/dist/cdn/chunks/{icons-DrsFvnNP.js.map → icons-DguD4x_X.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CDXkfBa7.js → media-library-ClQUPxRM.js} +71 -71
- package/dist/cdn/chunks/{media-library-CDXkfBa7.js.map → media-library-ClQUPxRM.js.map} +1 -1
- package/dist/cdn/chunks/{quality-HR87TCZc.js → quality-CIw_7cXv.js} +479 -479
- package/dist/cdn/chunks/{quality-HR87TCZc.js.map → quality-CIw_7cXv.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Dh5WdraW.js → renderer-Bx8I7_Rb.js} +19 -19
- package/dist/cdn/chunks/{renderer-Dh5WdraW.js.map → renderer-Bx8I7_Rb.js.map} +1 -1
- package/dist/cdn/chunks/{src-fyYLC_tY.js → src-C-GlM149.js} +4 -4
- package/dist/cdn/chunks/{src-fyYLC_tY.js.map → src-C-GlM149.js.map} +1 -1
- package/dist/cdn/chunks/{styles-NhU45rEI.js → styles-CfqCvq0Z.js} +666 -635
- package/dist/cdn/chunks/styles-CfqCvq0Z.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CfnwT9a8.js → tiptap-BAwu9VcJ.js} +4454 -3328
- package/dist/cdn/chunks/tiptap-BAwu9VcJ.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +11 -10
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B4oiQEsJ.js → check-BsNM6BDs.js} +1 -1
- package/dist/{chevron-down-BrL7CDST.js → chevron-down-fcsZ5DU7.js} +1 -1
- package/dist/{circle-alert-Ddf06I0D.js → circle-alert-BZTbwc-B.js} +1 -1
- package/dist/{clock-CbIkIHL5.js → clock-B7iQRubC.js} +1 -1
- package/dist/{createLucideIcon-Bn5l6hkC.js → createLucideIcon-C_fetdGM.js} +2 -2
- package/dist/{dist-BRvZBY6r.js → dist-B4NkMBYc.js} +2 -2
- package/dist/{dist-DDB4TfTY.js → dist-BLcYl_de.js} +2 -2
- package/dist/{dist-DS9NXb20.js → dist-BOHAk4zI.js} +2 -2
- package/dist/dist-BsB4nPJD.js +5 -0
- package/dist/{dist-B6B8IO1W.js → dist-ByBVNmRN.js} +2 -2
- package/dist/dist-CD3wbUoR.js +5 -0
- package/dist/{dist-DbGsZrPu.js → dist-Cwl7XXr4.js} +806 -601
- package/dist/{dist-BShwEwPy.js → dist-Dem8ODLh.js} +1512 -1501
- package/dist/{dist-BdIM5Jt8.js → dist-Dhs3W2WW.js} +2 -2
- package/dist/{dist-ZiEahccA.js → dist-XdF11ZkX.js} +2 -2
- package/dist/{dist-BhZo8-eC.js → dist-c2sj5PQ5.js} +2 -2
- package/dist/{dist-Ctv43HTN.js → dist-eVlXvuKI.js} +3 -3
- package/dist/extensions-B2lSGCA8.js +1720 -0
- package/dist/{image-up-D3KvvHLf.js → image-up-1xrPPJYH.js} +1 -1
- package/dist/index.d.ts +29 -0
- package/dist/{info-RwcI2EUD.js → info-ByAFxArD.js} +1 -1
- package/dist/keys-DsRdOmg3.js +10 -0
- package/dist/{list-checks-ruqK9lCo.js → list-checks-CKUP4UZU.js} +1 -1
- package/dist/{loader-circle-D4SXJ8eQ.js → loader-circle-BuxX338d.js} +1 -1
- package/dist/{message-circle-p9UiFyS7.js → message-circle-nLwqegRi.js} +1 -1
- package/dist/{refresh-cw-C8HbO4hg.js → refresh-cw-DAkD6iDI.js} +1 -1
- package/dist/{scan-line-CmPIMm63.js → scan-line-DEELRJJ5.js} +1 -1
- package/dist/{send-DacXlri3.js → send-DCMgrNT4.js} +1 -1
- package/dist/{shield-check-BdrHnTnJ.js → shield-check-BFtVr_ov.js} +1 -1
- package/dist/{sparkles-tT7wcus5.js → sparkles-CeYIQ5RJ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-BmZWc8sc.js → styles-D_ztiOsh.js} +768 -737
- package/dist/templatical-editor.js +6 -5
- package/dist/{text-align-start-DaSSBZVi.js → text-align-start-BsmIoqLS.js} +1 -1
- package/dist/{trash-2-B0uIJOwX.js → trash-2-C2S4-CIH.js} +1 -1
- package/dist/{triangle-alert-FLQWRf-c.js → triangle-alert-DMdedF6W.js} +1 -1
- package/dist/{useCloudI18n-Lh0xWlQ4.js → useCloudI18n-BEuiZdzs.js} +1 -1
- package/dist/{useEditorCore-CMukR8kX.js → useEditorCore-tZGAVvNz.js} +649 -680
- package/dist/{useI18n-CNEz8RK7.js → useI18n-DNspT6uw.js} +1 -1
- package/dist/{useMergeTag-C54tabTK.js → useMergeTag-abutjUud.js} +1 -1
- package/dist/{usePopoverRoot-dvg2XFmj.js → usePopoverRoot-DG3mlvd1.js} +1 -1
- package/dist/{x-BROzFhGs.js → x-_9jw816B.js} +1 -1
- package/package.json +24 -24
- package/dist/cdn/chunks/CloudEditor-gvOOuXac.js.map +0 -1
- package/dist/cdn/chunks/features-CxHQG9xr.js.map +0 -1
- package/dist/cdn/chunks/styles-NhU45rEI.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CfnwT9a8.js.map +0 -1
- package/dist/dist-BVKpiz3S.js +0 -5
- package/dist/dist-BzeOnbU8.js +0 -5
- package/dist/extensions-CqrSpX_i.js +0 -806
- package/dist/keys-DSm2p8zn.js +0 -10
|
@@ -1,22 +1,22 @@
|
|
|
1
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-mPytWZFh.js";
|
|
2
2
|
import { A as ce, E as le, M as ue, S as de, T as fe, _ as pe, a as me, b as he, c as ge, d as _e, f as ve, g as ye, h as be, j as xe, k as Se, l as Ce, m as we, o as Te, p as Ee, s as De, t as Oe, u as ke, v as Ae, x as je, y as Me } from "./dist-D6L_WdRL.js";
|
|
3
3
|
import { c as Ne, i as Pe, l as Fe, n as Ie, o as Le, r as Re, u as ze } from "./dist-cT52Hh9L.js";
|
|
4
|
-
import { A as Be, C as Ve,
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as F } from "./createLucideIcon-
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import "./useCloudI18n-
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
4
|
+
import { A as Be, C as Ve, E as He, M as Ue, N as We, S as Ge, T as Ke, _ as qe, a as Je, b as Ye, d as Xe, f as Ze, g as Qe, h as $e, i as et, j as tt, k as nt, m as rt, n as it, o as at, p as ot, s as st, u as ct, v as lt, w as ut, x as dt, y as ft } from "./keys-DsRdOmg3.js";
|
|
5
|
+
import { t as pt } from "./useI18n-DNspT6uw.js";
|
|
6
|
+
import { t as F } from "./createLucideIcon-C_fetdGM.js";
|
|
7
|
+
import { t as mt } from "./message-circle-nLwqegRi.js";
|
|
8
|
+
import { t as ht } from "./trash-2-C2S4-CIH.js";
|
|
9
|
+
import { t as gt } from "./triangle-alert-DMdedF6W.js";
|
|
10
|
+
import { t as _t } from "./LoadingTrack-e67FA0NP.js";
|
|
11
|
+
import { t as vt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
12
|
+
import "./useCloudI18n-BEuiZdzs.js";
|
|
13
|
+
import { t as yt } from "./useMergeTag-abutjUud.js";
|
|
14
|
+
import { t as bt } from "./useAliveFlag-DlVvpZxc.js";
|
|
15
15
|
//#region ../core/dist/index.js
|
|
16
|
-
function
|
|
16
|
+
function xt(e) {
|
|
17
17
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function St(e) {
|
|
20
20
|
let t = o({
|
|
21
21
|
content: e.content ?? ke(e.defaultFontFamily, e.templateDefaults),
|
|
22
22
|
selectedBlockId: null,
|
|
@@ -106,7 +106,7 @@ function xt(e) {
|
|
|
106
106
|
if (c(n)) return;
|
|
107
107
|
let o = i(t.content.blocks, n);
|
|
108
108
|
if (o && o.type === "section") {
|
|
109
|
-
if (r < 0 || r >=
|
|
109
|
+
if (r < 0 || r >= xt(o.columns)) return;
|
|
110
110
|
o.children[r] = o.children[r] || [];
|
|
111
111
|
let t = o.children[r];
|
|
112
112
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -138,7 +138,7 @@ function xt(e) {
|
|
|
138
138
|
let u;
|
|
139
139
|
if (r) {
|
|
140
140
|
let e = i(t.content.blocks, r);
|
|
141
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
141
|
+
if (!e || e.type !== "section" || a < 0 || a >= xt(e.columns)) return;
|
|
142
142
|
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
143
143
|
} else u = t.content.blocks;
|
|
144
144
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -167,9 +167,9 @@ function xt(e) {
|
|
|
167
167
|
findBlockLocation: l
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
var
|
|
171
|
-
function
|
|
172
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
170
|
+
var Ct = 50, wt = 300, Tt = 1500;
|
|
171
|
+
function Et(e) {
|
|
172
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = Ct } = e, a = h([]), o = h([]), s = h(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
|
|
173
173
|
function f() {
|
|
174
174
|
return ue(t.value);
|
|
175
175
|
}
|
|
@@ -187,21 +187,21 @@ function Tt(e) {
|
|
|
187
187
|
if (l && l.blockId === e) {
|
|
188
188
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
189
189
|
l = null;
|
|
190
|
-
},
|
|
190
|
+
}, wt);
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
g(), p(f()), o.value = [], l = {
|
|
194
194
|
blockId: e,
|
|
195
195
|
timeoutId: setTimeout(() => {
|
|
196
196
|
l = null;
|
|
197
|
-
},
|
|
197
|
+
}, wt)
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
function y() {
|
|
202
202
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
203
203
|
s.value = !1, c = null;
|
|
204
|
-
},
|
|
204
|
+
}, Tt);
|
|
205
205
|
}
|
|
206
206
|
function b() {
|
|
207
207
|
if (a.value.length === 0) return;
|
|
@@ -233,7 +233,7 @@ function Tt(e) {
|
|
|
233
233
|
destroy: C
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function Dt(e) {
|
|
237
237
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
238
238
|
...e,
|
|
239
239
|
id: de(),
|
|
@@ -249,7 +249,7 @@ function Et(e) {
|
|
|
249
249
|
id: de()
|
|
250
250
|
})));
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function Ot(e) {
|
|
253
253
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
254
254
|
function o(n, r, a) {
|
|
255
255
|
let o = Te(n, e.blockDefaults);
|
|
@@ -257,9 +257,9 @@ function Dt(e) {
|
|
|
257
257
|
}
|
|
258
258
|
function s(e, n, r) {
|
|
259
259
|
let o = JSON.parse(JSON.stringify(e));
|
|
260
|
-
if (o.id = de(),
|
|
260
|
+
if (o.id = de(), Dt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
261
261
|
let t = JSON.parse(JSON.stringify(e));
|
|
262
|
-
return t.id = de(),
|
|
262
|
+
return t.id = de(), Dt(t), t;
|
|
263
263
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
264
264
|
else {
|
|
265
265
|
let i = a?.(e.id) ?? null;
|
|
@@ -280,7 +280,7 @@ function Dt(e) {
|
|
|
280
280
|
updateBlockProperty: l
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function kt(e) {
|
|
284
284
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
285
285
|
function c() {
|
|
286
286
|
return typeof a == "function" ? a() : a;
|
|
@@ -316,7 +316,7 @@ function Ot(e) {
|
|
|
316
316
|
destroy: h
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function At(e) {
|
|
320
320
|
let t = o(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
|
|
321
321
|
function r(e) {
|
|
322
322
|
return t.has(e);
|
|
@@ -334,7 +334,7 @@ function kt(e) {
|
|
|
334
334
|
hasHiddenBlocks: n
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function jt(e) {
|
|
338
338
|
let t = h(!1), n = h(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
|
|
339
339
|
async function a() {
|
|
340
340
|
let r = e.definition.value;
|
|
@@ -364,7 +364,7 @@ function At(e) {
|
|
|
364
364
|
needsFetch: i
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Mt(e, t) {
|
|
368
368
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
369
369
|
e.addBlock = (r, i, a, o) => {
|
|
370
370
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -380,26 +380,26 @@ function jt(e, t) {
|
|
|
380
380
|
}
|
|
381
381
|
//#endregion
|
|
382
382
|
//#region src/utils/activeEditorTracker.ts
|
|
383
|
-
var
|
|
384
|
-
function
|
|
385
|
-
let e = ++
|
|
386
|
-
return
|
|
383
|
+
var Nt = /* @__PURE__ */ new Set(), Pt = 0, Ft = 0;
|
|
384
|
+
function It() {
|
|
385
|
+
let e = ++Ft;
|
|
386
|
+
return Nt.add(e), Pt === 0 && (Pt = e), {
|
|
387
387
|
id: e,
|
|
388
|
-
isActive: () =>
|
|
388
|
+
isActive: () => Nt.size <= 1 || Pt === e,
|
|
389
389
|
claim: () => {
|
|
390
|
-
|
|
390
|
+
Pt = e;
|
|
391
391
|
},
|
|
392
392
|
dispose: () => {
|
|
393
|
-
if (
|
|
394
|
-
let e = Array.from(
|
|
395
|
-
|
|
393
|
+
if (Nt.delete(e), Pt === e) {
|
|
394
|
+
let e = Array.from(Nt);
|
|
395
|
+
Pt = e[e.length - 1] ?? 0;
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
399
|
}
|
|
400
400
|
//#endregion
|
|
401
401
|
//#region src/composables/useMergeTagPicker.ts
|
|
402
|
-
function
|
|
402
|
+
function Lt() {
|
|
403
403
|
let e = h(!1), t = h([]), n = null;
|
|
404
404
|
function r(r) {
|
|
405
405
|
if (n) {
|
|
@@ -429,11 +429,11 @@ function It() {
|
|
|
429
429
|
}
|
|
430
430
|
//#endregion
|
|
431
431
|
//#region src/composables/useTemplateLint.ts
|
|
432
|
-
function
|
|
432
|
+
function Rt(e) {
|
|
433
433
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
let t = h([]), n = h(!1), r = h(!1), i = d(null), a =
|
|
435
|
+
function zt(e) {
|
|
436
|
+
let t = h([]), n = h(!1), r = h(!1), i = d(null), a = Rt(e.options), o = null, c = !1;
|
|
437
437
|
a || l();
|
|
438
438
|
async function l() {
|
|
439
439
|
try {
|
|
@@ -474,12 +474,12 @@ function Rt(e) {
|
|
|
474
474
|
}
|
|
475
475
|
//#endregion
|
|
476
476
|
//#region src/utils/blockTypeLabels.ts
|
|
477
|
-
function
|
|
477
|
+
function Bt(e, t) {
|
|
478
478
|
return t.blocks[e] ?? e;
|
|
479
479
|
}
|
|
480
480
|
//#endregion
|
|
481
481
|
//#region src/composables/useKeyboardReorder.ts
|
|
482
|
-
function
|
|
482
|
+
function Vt(e, t) {
|
|
483
483
|
let n = h(null), r = h(""), i = null;
|
|
484
484
|
function a(t) {
|
|
485
485
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -506,7 +506,7 @@ function Bt(e, t) {
|
|
|
506
506
|
let r = a(n);
|
|
507
507
|
if (!r) return "";
|
|
508
508
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
509
|
-
return i ?
|
|
509
|
+
return i ? Bt(i.type, t.t) : "";
|
|
510
510
|
}
|
|
511
511
|
function s(t, n) {
|
|
512
512
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -575,13 +575,13 @@ function Bt(e, t) {
|
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region src/composables/useUiTheme.ts
|
|
578
|
-
function
|
|
578
|
+
function Ht(e) {
|
|
579
579
|
let t = Pe("(prefers-color-scheme: dark)");
|
|
580
580
|
return { resolvedTheme: x(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
581
581
|
}
|
|
582
582
|
//#endregion
|
|
583
583
|
//#region src/composables/useThemeStyles.ts
|
|
584
|
-
var
|
|
584
|
+
var Ut = {
|
|
585
585
|
bg: "--tpl-bg",
|
|
586
586
|
bgElevated: "--tpl-bg-elevated",
|
|
587
587
|
bgHover: "--tpl-bg-hover",
|
|
@@ -605,10 +605,10 @@ var Ht = {
|
|
|
605
605
|
dangerLight: "--tpl-danger-light",
|
|
606
606
|
canvasBg: "--tpl-canvas-bg"
|
|
607
607
|
};
|
|
608
|
-
function
|
|
608
|
+
function Wt({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
609
609
|
return { themeStyles: x(() => {
|
|
610
610
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
611
|
-
if (a) for (let [e, t] of Object.entries(
|
|
611
|
+
if (a) for (let [e, t] of Object.entries(Ut)) {
|
|
612
612
|
let n = a[e];
|
|
613
613
|
n && (r[t] = n);
|
|
614
614
|
}
|
|
@@ -617,27 +617,27 @@ function Ut({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
617
617
|
}
|
|
618
618
|
//#endregion
|
|
619
619
|
//#region src/utils/logger.ts
|
|
620
|
-
var
|
|
621
|
-
function
|
|
620
|
+
var Gt = "[Templatical]";
|
|
621
|
+
function Kt() {
|
|
622
622
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
623
623
|
}
|
|
624
|
-
var
|
|
624
|
+
var qt = {
|
|
625
625
|
warn(...e) {
|
|
626
|
-
console.warn(
|
|
626
|
+
console.warn(Gt, ...e);
|
|
627
627
|
},
|
|
628
628
|
error(...e) {
|
|
629
|
-
console.error(
|
|
629
|
+
console.error(Gt, ...e);
|
|
630
630
|
},
|
|
631
631
|
debug(...e) {
|
|
632
|
-
|
|
632
|
+
Kt() || console.debug(Gt, ...e);
|
|
633
633
|
},
|
|
634
634
|
info(...e) {
|
|
635
|
-
|
|
635
|
+
Kt() || console.info(Gt, ...e);
|
|
636
636
|
}
|
|
637
637
|
};
|
|
638
638
|
//#endregion
|
|
639
639
|
//#region src/composables/useBlockRegistry.ts
|
|
640
|
-
function
|
|
640
|
+
function Jt() {
|
|
641
641
|
let e = d(/* @__PURE__ */ new Map());
|
|
642
642
|
function t(t, n) {
|
|
643
643
|
e.value.set(t, n), k(e);
|
|
@@ -646,13 +646,6 @@ function qt() {
|
|
|
646
646
|
let r = `custom:${t.type}`, i = {
|
|
647
647
|
component: n,
|
|
648
648
|
createBlock: () => Ce(t),
|
|
649
|
-
sidebarItem: {
|
|
650
|
-
type: r,
|
|
651
|
-
label: t.name,
|
|
652
|
-
icon: t.icon,
|
|
653
|
-
description: t.description,
|
|
654
|
-
isCustom: !0
|
|
655
|
-
},
|
|
656
649
|
definition: t
|
|
657
650
|
};
|
|
658
651
|
e.value.set(r, i), k(e);
|
|
@@ -667,21 +660,16 @@ function qt() {
|
|
|
667
660
|
function i(t) {
|
|
668
661
|
return e.value.get(t)?.createBlock();
|
|
669
662
|
}
|
|
670
|
-
function a() {
|
|
671
|
-
let t = [], n = [];
|
|
672
|
-
for (let r of e.value.values()) r.sidebarItem.isCustom ? n.push(r.sidebarItem) : t.push(r.sidebarItem);
|
|
673
|
-
return [...t, ...n];
|
|
674
|
-
}
|
|
675
|
-
function o(t) {
|
|
663
|
+
function a(t) {
|
|
676
664
|
let n = `custom:${t}`;
|
|
677
665
|
return e.value.get(n)?.definition;
|
|
678
666
|
}
|
|
679
|
-
function
|
|
667
|
+
function o(e) {
|
|
680
668
|
return `<div style="color: var(--tpl-text-muted); padding: 16px; text-align: center; border: 1px dashed var(--tpl-border); border-radius: var(--tpl-radius-sm); font-family: var(--tpl-font-family); font-size: 14px;">${e}</div>`;
|
|
681
669
|
}
|
|
682
|
-
async function
|
|
683
|
-
let t =
|
|
684
|
-
if (!t) return
|
|
670
|
+
async function s(e) {
|
|
671
|
+
let t = a(e.customType);
|
|
672
|
+
if (!t) return o("Block definition not found");
|
|
685
673
|
try {
|
|
686
674
|
let { Liquid: n } = await import("./liquid.browser--qtl1Fqy.js");
|
|
687
675
|
return await new n({
|
|
@@ -689,10 +677,10 @@ function qt() {
|
|
|
689
677
|
strictFilters: !1
|
|
690
678
|
}).parseAndRender(t.template, e.fieldValues);
|
|
691
679
|
} catch (t) {
|
|
692
|
-
return
|
|
680
|
+
return qt.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
693
681
|
}
|
|
694
682
|
}
|
|
695
|
-
function
|
|
683
|
+
function c(t) {
|
|
696
684
|
return e.value.has(t);
|
|
697
685
|
}
|
|
698
686
|
return {
|
|
@@ -700,17 +688,16 @@ function qt() {
|
|
|
700
688
|
registerCustom: n,
|
|
701
689
|
getComponent: r,
|
|
702
690
|
createBlock: i,
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
isRegistered: l
|
|
691
|
+
getDefinition: a,
|
|
692
|
+
renderCustomBlock: s,
|
|
693
|
+
isRegistered: c
|
|
707
694
|
};
|
|
708
695
|
}
|
|
709
696
|
//#endregion
|
|
710
697
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
711
|
-
function
|
|
698
|
+
function Yt(e, t) {
|
|
712
699
|
return x(() => {
|
|
713
|
-
let n =
|
|
700
|
+
let n = Xt(e.value.blocks);
|
|
714
701
|
if (n.size === 0) return [];
|
|
715
702
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
716
703
|
for (let e of n) {
|
|
@@ -722,11 +709,11 @@ function Jt(e, t) {
|
|
|
722
709
|
return i;
|
|
723
710
|
});
|
|
724
711
|
}
|
|
725
|
-
function
|
|
712
|
+
function Xt(e) {
|
|
726
713
|
let t = /* @__PURE__ */ new Set();
|
|
727
|
-
return
|
|
714
|
+
return Zt(e, t), t;
|
|
728
715
|
}
|
|
729
|
-
function
|
|
716
|
+
function Zt(e, t) {
|
|
730
717
|
for (let n of e) {
|
|
731
718
|
if (le(n)) {
|
|
732
719
|
t.add(n.customType);
|
|
@@ -735,96 +722,78 @@ function Xt(e, t) {
|
|
|
735
722
|
if (n.type === "section") {
|
|
736
723
|
let e = n.children;
|
|
737
724
|
if (!e) continue;
|
|
738
|
-
for (let n of e)
|
|
725
|
+
for (let n of e) Zt(n, t);
|
|
739
726
|
}
|
|
740
727
|
}
|
|
741
728
|
}
|
|
742
729
|
//#endregion
|
|
743
730
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
744
|
-
var
|
|
731
|
+
var Qt = [
|
|
745
732
|
{
|
|
746
733
|
type: "section",
|
|
747
|
-
label: "Section",
|
|
748
734
|
createBlock: ye
|
|
749
735
|
},
|
|
750
736
|
{
|
|
751
737
|
type: "title",
|
|
752
|
-
label: "Title",
|
|
753
738
|
createBlock: he
|
|
754
739
|
},
|
|
755
740
|
{
|
|
756
741
|
type: "paragraph",
|
|
757
|
-
label: "Paragraph",
|
|
758
742
|
createBlock: be
|
|
759
743
|
},
|
|
760
744
|
{
|
|
761
745
|
type: "image",
|
|
762
|
-
label: "Image",
|
|
763
746
|
createBlock: Ee
|
|
764
747
|
},
|
|
765
748
|
{
|
|
766
749
|
type: "button",
|
|
767
|
-
label: "Button",
|
|
768
750
|
createBlock: De
|
|
769
751
|
},
|
|
770
752
|
{
|
|
771
753
|
type: "divider",
|
|
772
|
-
label: "Divider",
|
|
773
754
|
createBlock: _e
|
|
774
755
|
},
|
|
775
756
|
{
|
|
776
757
|
type: "video",
|
|
777
|
-
label: "Video",
|
|
778
758
|
createBlock: je
|
|
779
759
|
},
|
|
780
760
|
{
|
|
781
761
|
type: "social",
|
|
782
|
-
label: "Social",
|
|
783
762
|
createBlock: pe
|
|
784
763
|
},
|
|
785
764
|
{
|
|
786
765
|
type: "menu",
|
|
787
|
-
label: "Menu",
|
|
788
766
|
createBlock: we
|
|
789
767
|
},
|
|
790
768
|
{
|
|
791
769
|
type: "table",
|
|
792
|
-
label: "Table",
|
|
793
770
|
createBlock: Me
|
|
794
771
|
},
|
|
795
772
|
{
|
|
796
773
|
type: "spacer",
|
|
797
|
-
label: "Spacer",
|
|
798
774
|
createBlock: Ae
|
|
799
775
|
},
|
|
800
776
|
{
|
|
801
777
|
type: "html",
|
|
802
|
-
label: "HTML",
|
|
803
778
|
createBlock: ve
|
|
804
779
|
},
|
|
805
780
|
{
|
|
806
781
|
type: "countdown",
|
|
807
|
-
label: "Countdown",
|
|
808
782
|
createBlock: ge
|
|
809
783
|
}
|
|
810
784
|
];
|
|
811
|
-
function
|
|
812
|
-
for (let n of
|
|
785
|
+
function $t(e, t) {
|
|
786
|
+
for (let n of Qt) {
|
|
813
787
|
let r = t[n.type];
|
|
814
788
|
r && e.registerBuiltIn(n.type, {
|
|
815
789
|
component: r,
|
|
816
|
-
createBlock: n.createBlock
|
|
817
|
-
sidebarItem: {
|
|
818
|
-
type: n.type,
|
|
819
|
-
label: n.label,
|
|
820
|
-
isCustom: !1
|
|
821
|
-
}
|
|
790
|
+
createBlock: n.createBlock
|
|
822
791
|
});
|
|
823
792
|
}
|
|
824
793
|
}
|
|
825
794
|
//#endregion
|
|
826
795
|
//#region src/utils/keyboardShortcuts.ts
|
|
827
|
-
function
|
|
796
|
+
function en(e) {
|
|
828
797
|
for (let t of e.composedPath()) {
|
|
829
798
|
if (!(t instanceof HTMLElement)) continue;
|
|
830
799
|
if (t.isContentEditable) return !0;
|
|
@@ -833,14 +802,14 @@ function $t(e) {
|
|
|
833
802
|
}
|
|
834
803
|
return !1;
|
|
835
804
|
}
|
|
836
|
-
function
|
|
805
|
+
function tn(e, t) {
|
|
837
806
|
let n = e.metaKey || e.ctrlKey;
|
|
838
807
|
if (n && e.key.toLowerCase() === "s") {
|
|
839
808
|
e.preventDefault(), t.onSave?.();
|
|
840
809
|
return;
|
|
841
810
|
}
|
|
842
811
|
if (n && e.key.toLowerCase() === "z") {
|
|
843
|
-
if (
|
|
812
|
+
if (en(e)) return;
|
|
844
813
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
845
814
|
return;
|
|
846
815
|
}
|
|
@@ -848,11 +817,11 @@ function en(e, t) {
|
|
|
848
817
|
t.selectBlock(null);
|
|
849
818
|
return;
|
|
850
819
|
}
|
|
851
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() &&
|
|
820
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !en(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
852
821
|
}
|
|
853
822
|
//#endregion
|
|
854
823
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
855
|
-
var
|
|
824
|
+
var nn = { class: "tpl:text-center" }, rn = ["href"], an = /* @__PURE__ */ y({
|
|
856
825
|
__name: "ButtonBlock",
|
|
857
826
|
props: {
|
|
858
827
|
block: {},
|
|
@@ -873,17 +842,17 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
873
842
|
};
|
|
874
843
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
875
844
|
});
|
|
876
|
-
return (n, i) => (e(), w("div",
|
|
845
|
+
return (n, i) => (e(), w("div", nn, [C("a", {
|
|
877
846
|
href: t.block.url || "#",
|
|
878
847
|
style: A(r.value),
|
|
879
848
|
class: "tpl:cursor-default",
|
|
880
849
|
onClick: i[0] ||= b(() => {}, ["prevent"])
|
|
881
|
-
}, M(t.block.text), 13,
|
|
850
|
+
}, M(t.block.text), 13, rn)]));
|
|
882
851
|
}
|
|
883
|
-
}),
|
|
852
|
+
}), on = F("bookmark", [["path", {
|
|
884
853
|
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",
|
|
885
854
|
key: "oz39mx"
|
|
886
|
-
}]]),
|
|
855
|
+
}]]), sn = F("box", [
|
|
887
856
|
["path", {
|
|
888
857
|
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",
|
|
889
858
|
key: "hh9hay"
|
|
@@ -896,13 +865,13 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
896
865
|
d: "M12 22V12",
|
|
897
866
|
key: "d0xqtd"
|
|
898
867
|
}]
|
|
899
|
-
]),
|
|
868
|
+
]), cn = F("code", [["path", {
|
|
900
869
|
d: "m16 18 6-6-6-6",
|
|
901
870
|
key: "eg8j8"
|
|
902
871
|
}], ["path", {
|
|
903
872
|
d: "m8 6-6 6 6 6",
|
|
904
873
|
key: "ppft3o"
|
|
905
|
-
}]]),
|
|
874
|
+
}]]), ln = F("copy", [["rect", {
|
|
906
875
|
width: "14",
|
|
907
876
|
height: "14",
|
|
908
877
|
x: "8",
|
|
@@ -913,7 +882,7 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
913
882
|
}], ["path", {
|
|
914
883
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
915
884
|
key: "zix9uf"
|
|
916
|
-
}]]),
|
|
885
|
+
}]]), un = F("eye-off", [
|
|
917
886
|
["path", {
|
|
918
887
|
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",
|
|
919
888
|
key: "ct8e1f"
|
|
@@ -930,10 +899,10 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
930
899
|
d: "m2 2 20 20",
|
|
931
900
|
key: "1ooewy"
|
|
932
901
|
}]
|
|
933
|
-
]),
|
|
902
|
+
]), dn = F("funnel", [["path", {
|
|
934
903
|
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",
|
|
935
904
|
key: "sc7q7i"
|
|
936
|
-
}]]),
|
|
905
|
+
}]]), fn = F("grip-vertical", [
|
|
937
906
|
["circle", {
|
|
938
907
|
cx: "9",
|
|
939
908
|
cy: "12",
|
|
@@ -970,7 +939,7 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
970
939
|
r: "1",
|
|
971
940
|
key: "f4zoj3"
|
|
972
941
|
}]
|
|
973
|
-
]),
|
|
942
|
+
]), pn = F("image", [
|
|
974
943
|
["rect", {
|
|
975
944
|
width: "18",
|
|
976
945
|
height: "18",
|
|
@@ -990,13 +959,13 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
990
959
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
991
960
|
key: "1xmnt7"
|
|
992
961
|
}]
|
|
993
|
-
]),
|
|
962
|
+
]), mn = F("navigation", [["polygon", {
|
|
994
963
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
995
964
|
key: "1ltx0t"
|
|
996
|
-
}]]),
|
|
965
|
+
}]]), hn = F("puzzle", [["path", {
|
|
997
966
|
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",
|
|
998
967
|
key: "w46dr5"
|
|
999
|
-
}]]),
|
|
968
|
+
}]]), gn = F("share-2", [
|
|
1000
969
|
["circle", {
|
|
1001
970
|
cx: "18",
|
|
1002
971
|
cy: "5",
|
|
@@ -1029,7 +998,7 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
1029
998
|
y2: "10.49",
|
|
1030
999
|
key: "1n3mei"
|
|
1031
1000
|
}]
|
|
1032
|
-
]),
|
|
1001
|
+
]), _n = F("table", [
|
|
1033
1002
|
["path", {
|
|
1034
1003
|
d: "M12 3v18",
|
|
1035
1004
|
key: "108xh3"
|
|
@@ -1050,7 +1019,7 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
1050
1019
|
d: "M3 15h18",
|
|
1051
1020
|
key: "5xshup"
|
|
1052
1021
|
}]
|
|
1053
|
-
]),
|
|
1022
|
+
]), vn = F("video", [["path", {
|
|
1054
1023
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1055
1024
|
key: "ftymec"
|
|
1056
1025
|
}], ["rect", {
|
|
@@ -1060,11 +1029,11 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
1060
1029
|
height: "12",
|
|
1061
1030
|
rx: "2",
|
|
1062
1031
|
key: "158x01"
|
|
1063
|
-
}]]),
|
|
1032
|
+
}]]), yn = ["innerHTML"], bn = [
|
|
1064
1033
|
"src",
|
|
1065
1034
|
"width",
|
|
1066
1035
|
"height"
|
|
1067
|
-
],
|
|
1036
|
+
], xn = /* @__PURE__ */ y({
|
|
1068
1037
|
__name: "CustomBlockIcon",
|
|
1069
1038
|
props: {
|
|
1070
1039
|
icon: {},
|
|
@@ -1080,14 +1049,14 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
1080
1049
|
height: `${r.value}px`
|
|
1081
1050
|
}),
|
|
1082
1051
|
innerHTML: t.icon
|
|
1083
|
-
}, null, 12,
|
|
1052
|
+
}, null, 12, yn)) : a.value ? (e(), w("img", {
|
|
1084
1053
|
key: 1,
|
|
1085
1054
|
src: t.icon,
|
|
1086
1055
|
width: r.value,
|
|
1087
1056
|
height: r.value,
|
|
1088
1057
|
class: "tpl:inline-block",
|
|
1089
1058
|
alt: ""
|
|
1090
|
-
}, null, 8,
|
|
1059
|
+
}, null, 8, bn)) : (e(), ne(j(sn), {
|
|
1091
1060
|
key: 2,
|
|
1092
1061
|
size: r.value,
|
|
1093
1062
|
"stroke-width": 1.5
|
|
@@ -1096,16 +1065,16 @@ var tn = { class: "tpl:text-center" }, nn = ["href"], rn = /* @__PURE__ */ y({
|
|
|
1096
1065
|
});
|
|
1097
1066
|
//#endregion
|
|
1098
1067
|
//#region src/composables/useEditorRoot.ts
|
|
1099
|
-
function
|
|
1100
|
-
return P(
|
|
1068
|
+
function Sn() {
|
|
1069
|
+
return P($e, document) ?? document;
|
|
1101
1070
|
}
|
|
1102
1071
|
//#endregion
|
|
1103
1072
|
//#region src/composables/useFocusTrap.ts
|
|
1104
|
-
var
|
|
1105
|
-
function
|
|
1106
|
-
let n =
|
|
1073
|
+
var Cn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1074
|
+
function wn(e, t) {
|
|
1075
|
+
let n = Sn(), r = null, i = null, a = null;
|
|
1107
1076
|
function o() {
|
|
1108
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1077
|
+
return e.value ? Array.from(e.value.querySelectorAll(Cn)).filter((e) => e.offsetParent !== null) : [];
|
|
1109
1078
|
}
|
|
1110
1079
|
function c(e) {
|
|
1111
1080
|
if (e.key !== "Tab") return;
|
|
@@ -1135,7 +1104,7 @@ function Cn(e, t) {
|
|
|
1135
1104
|
}
|
|
1136
1105
|
//#endregion
|
|
1137
1106
|
//#region src/composables/useEmoji.ts
|
|
1138
|
-
function
|
|
1107
|
+
function Tn() {
|
|
1139
1108
|
let [e, t] = Fe(!1), n = d([]), r = !1;
|
|
1140
1109
|
re(() => {
|
|
1141
1110
|
r = !0;
|
|
@@ -1161,7 +1130,7 @@ function wn() {
|
|
|
1161
1130
|
}
|
|
1162
1131
|
//#endregion
|
|
1163
1132
|
//#region src/composables/useDragDrop.ts
|
|
1164
|
-
function
|
|
1133
|
+
function En(e) {
|
|
1165
1134
|
let { onBlockMove: t, onBlockAdd: n } = e, r = h(!1), i = h(null), a = h(null);
|
|
1166
1135
|
function o(e) {
|
|
1167
1136
|
r.value = !0, i.value = e;
|
|
@@ -1211,7 +1180,7 @@ function Tn(e) {
|
|
|
1211
1180
|
}
|
|
1212
1181
|
//#endregion
|
|
1213
1182
|
//#region src/composables/useFonts.ts
|
|
1214
|
-
var
|
|
1183
|
+
var Dn = [
|
|
1215
1184
|
{
|
|
1216
1185
|
value: "Arial",
|
|
1217
1186
|
label: "Arial"
|
|
@@ -1240,7 +1209,7 @@ var En = [
|
|
|
1240
1209
|
value: "Courier New",
|
|
1241
1210
|
label: "Courier New"
|
|
1242
1211
|
}
|
|
1243
|
-
],
|
|
1212
|
+
], On = {
|
|
1244
1213
|
arial: "Arial, sans-serif",
|
|
1245
1214
|
helvetica: "Helvetica, sans-serif",
|
|
1246
1215
|
georgia: "Georgia, serif",
|
|
@@ -1248,14 +1217,14 @@ var En = [
|
|
|
1248
1217
|
verdana: "Verdana, sans-serif",
|
|
1249
1218
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1250
1219
|
"courier new": "'Courier New', monospace"
|
|
1251
|
-
},
|
|
1252
|
-
function
|
|
1253
|
-
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ??
|
|
1220
|
+
}, kn = "Arial, sans-serif";
|
|
1221
|
+
function An(e) {
|
|
1222
|
+
let t = h(e?.customFonts ?? []), n = h(!0), r = h(!1), i = x(() => e?.defaultFallback ?? kn);
|
|
1254
1223
|
function a(e) {
|
|
1255
1224
|
n.value = e;
|
|
1256
1225
|
}
|
|
1257
1226
|
let o = x(() => {
|
|
1258
|
-
let e = [...
|
|
1227
|
+
let e = [...Dn];
|
|
1259
1228
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
1260
1229
|
let r = t.value.map((e) => ({
|
|
1261
1230
|
value: e.name,
|
|
@@ -1268,17 +1237,17 @@ function kn(e) {
|
|
|
1268
1237
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1269
1238
|
}
|
|
1270
1239
|
function c(e) {
|
|
1271
|
-
return
|
|
1240
|
+
return Dn.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1272
1241
|
}
|
|
1273
1242
|
function l() {
|
|
1274
1243
|
if (e?.defaultFont) {
|
|
1275
|
-
if (!n.value && !c(e.defaultFont)) return
|
|
1244
|
+
if (!n.value && !c(e.defaultFont)) return kn;
|
|
1276
1245
|
if (s(e.defaultFont)) {
|
|
1277
1246
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1278
1247
|
if (t) return t.value;
|
|
1279
1248
|
}
|
|
1280
1249
|
}
|
|
1281
|
-
return
|
|
1250
|
+
return kn;
|
|
1282
1251
|
}
|
|
1283
1252
|
let u = x(() => l());
|
|
1284
1253
|
function d(e) {
|
|
@@ -1288,7 +1257,7 @@ function kn(e) {
|
|
|
1288
1257
|
let e = n.fallback ?? i.value;
|
|
1289
1258
|
return `'${n.name}', ${e}`;
|
|
1290
1259
|
}
|
|
1291
|
-
return
|
|
1260
|
+
return On[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1292
1261
|
}
|
|
1293
1262
|
let f = [], m = !1;
|
|
1294
1263
|
async function g() {
|
|
@@ -1304,7 +1273,7 @@ function kn(e) {
|
|
|
1304
1273
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1305
1274
|
});
|
|
1306
1275
|
} catch (t) {
|
|
1307
|
-
|
|
1276
|
+
qt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1308
1277
|
}
|
|
1309
1278
|
});
|
|
1310
1279
|
await Promise.allSettled(e), !m && (r.value = !0);
|
|
@@ -1331,9 +1300,9 @@ function kn(e) {
|
|
|
1331
1300
|
}
|
|
1332
1301
|
//#endregion
|
|
1333
1302
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1334
|
-
function
|
|
1303
|
+
function jn(e) {
|
|
1335
1304
|
let t = h(!1), n = h(""), r = h(null);
|
|
1336
|
-
|
|
1305
|
+
wn(r, t);
|
|
1337
1306
|
function i() {
|
|
1338
1307
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
1339
1308
|
}
|
|
@@ -1384,8 +1353,8 @@ function An(e) {
|
|
|
1384
1353
|
}
|
|
1385
1354
|
//#endregion
|
|
1386
1355
|
//#region src/composables/useRichTextEditor.ts
|
|
1387
|
-
function
|
|
1388
|
-
let t = P(
|
|
1356
|
+
function Mn(e) {
|
|
1357
|
+
let t = P(rt, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = yt(), f = P(tt, null), p = (a(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = fe(l), g = d(null), { showLinkDialog: _, linkUrl: v, linkDialogRef: y, openLinkDialog: b, insertLink: x, removeLink: S, closeLinkDialog: C, handleLinkKeydown: w } = jn(g), { start: T, stop: E } = Ne(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ee = d(null), D = h(!0), O = h(null), k = !1;
|
|
1389
1358
|
async function te() {
|
|
1390
1359
|
O.value = null, D.value = !0;
|
|
1391
1360
|
try {
|
|
@@ -1415,7 +1384,7 @@ function jn(e) {
|
|
|
1415
1384
|
g.value = s, D.value = !1, T();
|
|
1416
1385
|
} catch (t) {
|
|
1417
1386
|
if (k) return;
|
|
1418
|
-
|
|
1387
|
+
qt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
|
|
1419
1388
|
}
|
|
1420
1389
|
}
|
|
1421
1390
|
function A() {
|
|
@@ -1463,20 +1432,20 @@ function jn(e) {
|
|
|
1463
1432
|
}
|
|
1464
1433
|
//#endregion
|
|
1465
1434
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1466
|
-
var
|
|
1435
|
+
var Nn = { class: "tpl:w-full" }, Pn = {
|
|
1467
1436
|
key: 0,
|
|
1468
1437
|
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)]"
|
|
1469
|
-
},
|
|
1438
|
+
}, Fn = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, In = {
|
|
1470
1439
|
key: 1,
|
|
1471
1440
|
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)]"
|
|
1472
|
-
},
|
|
1441
|
+
}, Ln = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Rn = {
|
|
1473
1442
|
key: 2,
|
|
1474
1443
|
class: "tpl:relative"
|
|
1475
|
-
},
|
|
1444
|
+
}, zn = ["innerHTML"], Bn = {
|
|
1476
1445
|
key: 0,
|
|
1477
1446
|
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]",
|
|
1478
1447
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1479
|
-
},
|
|
1448
|
+
}, Vn = /* @__PURE__ */ y({
|
|
1480
1449
|
__name: "CustomBlock",
|
|
1481
1450
|
props: {
|
|
1482
1451
|
block: {},
|
|
@@ -1484,7 +1453,7 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1484
1453
|
},
|
|
1485
1454
|
emits: ["fetchData"],
|
|
1486
1455
|
setup(t, { emit: n }) {
|
|
1487
|
-
let r = t, i = n, { t: a } =
|
|
1456
|
+
let r = t, i = n, { t: a } = pt(), o = P(at, 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 } = jt({
|
|
1488
1457
|
definition: d,
|
|
1489
1458
|
block: x(() => r.block),
|
|
1490
1459
|
onUpdate: (e, t) => {
|
|
@@ -1510,10 +1479,10 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1510
1479
|
y();
|
|
1511
1480
|
}), s(() => r.block.fieldValues, () => {
|
|
1512
1481
|
S();
|
|
1513
|
-
}, { deep: !0 }), (t, n) => (e(), w("div",
|
|
1482
|
+
}, { deep: !0 }), (t, n) => (e(), w("div", Nn, [f.value ? l.value ? (e(), w("div", In, [N(j(gt), {
|
|
1514
1483
|
size: 24,
|
|
1515
1484
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1516
|
-
}), C("span",
|
|
1485
|
+
}), C("span", Ln, M(j(a).customBlocks.renderError), 1)])) : (e(), w("div", Rn, [C("div", { innerHTML: c.value }, null, 8, zn), j(v) && j(g) ? (e(), w("div", Bn, [j(p) ? (e(), ne(_t, {
|
|
1517
1486
|
key: 1,
|
|
1518
1487
|
class: "tpl:w-48"
|
|
1519
1488
|
})) : (e(), w("button", {
|
|
@@ -1521,16 +1490,16 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1521
1490
|
type: "button",
|
|
1522
1491
|
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)]",
|
|
1523
1492
|
onClick: n[0] ||= b((...e) => j(m) && j(m)(...e), ["stop"])
|
|
1524
|
-
}, [d.value?.icon ? (e(), ne(
|
|
1493
|
+
}, [d.value?.icon ? (e(), ne(xn, {
|
|
1525
1494
|
key: 0,
|
|
1526
1495
|
icon: d.value.icon,
|
|
1527
1496
|
size: 16
|
|
1528
|
-
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div",
|
|
1497
|
+
}, null, 8, ["icon"])) : O("", !0), _(" " + M(d.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : O("", !0)])) : (e(), w("div", Pn, [N(j(hn), {
|
|
1529
1498
|
size: 24,
|
|
1530
1499
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1531
|
-
}), C("span",
|
|
1500
|
+
}), C("span", Fn, M(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1532
1501
|
}
|
|
1533
|
-
}),
|
|
1502
|
+
}), Hn = { class: "tpl:w-full" }, Un = /* @__PURE__ */ y({
|
|
1534
1503
|
__name: "DividerBlock",
|
|
1535
1504
|
props: {
|
|
1536
1505
|
block: {},
|
|
@@ -1542,37 +1511,37 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1542
1511
|
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
1543
1512
|
margin: n.block.width === "full" ? "0" : "0 auto"
|
|
1544
1513
|
}));
|
|
1545
|
-
return (t, n) => (e(), w("div",
|
|
1514
|
+
return (t, n) => (e(), w("div", Hn, [C("hr", {
|
|
1546
1515
|
class: "tpl:m-0 tpl:border-none",
|
|
1547
1516
|
style: A(r.value)
|
|
1548
1517
|
}, null, 4)]));
|
|
1549
1518
|
}
|
|
1550
|
-
}),
|
|
1519
|
+
}), Wn = { class: "tpl:w-full" }, Gn = { 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)]" }, Kn = {
|
|
1551
1520
|
key: 0,
|
|
1552
1521
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1553
|
-
},
|
|
1522
|
+
}, qn = {
|
|
1554
1523
|
key: 1,
|
|
1555
1524
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1556
|
-
},
|
|
1525
|
+
}, Jn = /* @__PURE__ */ y({
|
|
1557
1526
|
__name: "HtmlBlock",
|
|
1558
1527
|
props: {
|
|
1559
1528
|
block: {},
|
|
1560
1529
|
viewport: {}
|
|
1561
1530
|
},
|
|
1562
1531
|
setup(t) {
|
|
1563
|
-
let n = t, { t: r } =
|
|
1564
|
-
return (t, n) => (e(), w("div",
|
|
1532
|
+
let n = t, { t: r } = pt(), i = x(() => n.block.content.trim().length > 0);
|
|
1533
|
+
return (t, n) => (e(), w("div", Wn, [C("div", Gn, [N(j(cn), {
|
|
1565
1534
|
size: 24,
|
|
1566
1535
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1567
|
-
}), i.value ? (e(), w("span",
|
|
1536
|
+
}), i.value ? (e(), w("span", Kn, M(j(r).html.preview), 1)) : (e(), w("span", qn, M(j(r).html.empty), 1))])]));
|
|
1568
1537
|
}
|
|
1569
|
-
}),
|
|
1538
|
+
}), Yn = ["href"], Xn = ["src", "alt"], Zn = ["src", "alt"], Qn = {
|
|
1570
1539
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1571
1540
|
style: { opacity: "0.7" }
|
|
1572
|
-
},
|
|
1541
|
+
}, $n = ["href"], er = ["src", "alt"], tr = ["src", "alt"], nr = {
|
|
1573
1542
|
key: 3,
|
|
1574
1543
|
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)]"
|
|
1575
|
-
},
|
|
1544
|
+
}, rr = ["aria-label"], ir = { key: 1 }, ar = /* @__PURE__ */ y({
|
|
1576
1545
|
__name: "ImageBlock",
|
|
1577
1546
|
props: {
|
|
1578
1547
|
block: {},
|
|
@@ -1580,7 +1549,7 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1580
1549
|
},
|
|
1581
1550
|
emits: ["update"],
|
|
1582
1551
|
setup(t, { emit: n }) {
|
|
1583
|
-
let r = t, i = n, { t: a } =
|
|
1552
|
+
let r = t, i = n, { t: a } = pt(), { syntax: o } = yt(), s = P(Ve, null), c = x(() => !!s), l = bt();
|
|
1584
1553
|
async function u() {
|
|
1585
1554
|
let e = await s?.({ accept: ["images"] });
|
|
1586
1555
|
if (l.alive && e) {
|
|
@@ -1613,22 +1582,22 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1613
1582
|
src: t.block.placeholderUrl,
|
|
1614
1583
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1615
1584
|
style: A(f.value)
|
|
1616
|
-
}, null, 12,
|
|
1585
|
+
}, null, 12, Xn)], 8, Yn)) : (e(), w("img", {
|
|
1617
1586
|
key: 1,
|
|
1618
1587
|
class: "tpl:border-0",
|
|
1619
1588
|
src: t.block.placeholderUrl,
|
|
1620
1589
|
alt: t.block.alt,
|
|
1621
1590
|
style: A(f.value)
|
|
1622
|
-
}, null, 12,
|
|
1591
|
+
}, null, 12, Zn))], 64)) : t.block.src && p.value ? (e(), w("div", {
|
|
1623
1592
|
key: 1,
|
|
1624
1593
|
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)]",
|
|
1625
1594
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, f.value])
|
|
1626
|
-
}, [N(j(
|
|
1595
|
+
}, [N(j(pn), {
|
|
1627
1596
|
size: 32,
|
|
1628
1597
|
"stroke-width": 1.5,
|
|
1629
1598
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1630
1599
|
style: { opacity: "0.5" }
|
|
1631
|
-
}), C("span",
|
|
1600
|
+
}), C("span", Qn, M(t.block.src), 1)], 4)) : t.block.src ? (e(), w(D, { key: 2 }, [t.block.linkUrl ? (e(), w("a", {
|
|
1632
1601
|
key: 0,
|
|
1633
1602
|
href: t.block.linkUrl,
|
|
1634
1603
|
target: "_blank",
|
|
@@ -1640,33 +1609,33 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1640
1609
|
src: t.block.src,
|
|
1641
1610
|
alt: t.block.alt || j(a).image.altTextPlaceholder,
|
|
1642
1611
|
style: A(f.value)
|
|
1643
|
-
}, null, 12,
|
|
1612
|
+
}, null, 12, er)], 8, $n)) : (e(), w("img", {
|
|
1644
1613
|
key: 1,
|
|
1645
1614
|
class: "tpl:border-0",
|
|
1646
1615
|
src: t.block.src,
|
|
1647
1616
|
alt: t.block.alt,
|
|
1648
1617
|
style: A(f.value)
|
|
1649
|
-
}, null, 12,
|
|
1618
|
+
}, null, 12, tr))], 64)) : (e(), w("div", nr, [c.value ? (e(), w("button", {
|
|
1650
1619
|
key: 0,
|
|
1651
1620
|
"aria-label": j(a).image.browseMedia,
|
|
1652
1621
|
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)]",
|
|
1653
1622
|
onClick: b(u, ["stop"])
|
|
1654
|
-
}, [N(j(
|
|
1623
|
+
}, [N(j(pn), {
|
|
1655
1624
|
size: 14,
|
|
1656
1625
|
"stroke-width": 1.5
|
|
1657
|
-
}), _(" " + M(j(a).image.browseMedia), 1)], 8,
|
|
1626
|
+
}), _(" " + M(j(a).image.browseMedia), 1)], 8, rr)) : (e(), w("span", ir, M(j(a).image.clickToAdd), 1))]))], 4));
|
|
1658
1627
|
}
|
|
1659
|
-
}),
|
|
1628
|
+
}), or = { class: "tpl:w-full" }, sr = ["href"], cr = {
|
|
1660
1629
|
key: 1,
|
|
1661
1630
|
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)]"
|
|
1662
|
-
},
|
|
1631
|
+
}, lr = /* @__PURE__ */ y({
|
|
1663
1632
|
__name: "MenuBlock",
|
|
1664
1633
|
props: {
|
|
1665
1634
|
block: {},
|
|
1666
1635
|
viewport: {}
|
|
1667
1636
|
},
|
|
1668
1637
|
setup(t) {
|
|
1669
|
-
let n = t, { t: r } =
|
|
1638
|
+
let n = t, { t: r } = pt(), i = x(() => ({
|
|
1670
1639
|
display: "flex",
|
|
1671
1640
|
flexWrap: "wrap",
|
|
1672
1641
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -1678,7 +1647,7 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1678
1647
|
function o(e) {
|
|
1679
1648
|
return e || n.block.linkColor || n.block.color;
|
|
1680
1649
|
}
|
|
1681
|
-
return (n, s) => (e(), w("div",
|
|
1650
|
+
return (n, s) => (e(), w("div", or, [a.value ? (e(), w("div", {
|
|
1682
1651
|
key: 0,
|
|
1683
1652
|
style: A(i.value)
|
|
1684
1653
|
}, [(e(!0), w(D, null, c(t.block.items, (n, r) => (e(), w(D, { key: n.id }, [C("a", {
|
|
@@ -1690,15 +1659,15 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1690
1659
|
textDecoration: n.underline ? "underline" : "none"
|
|
1691
1660
|
}),
|
|
1692
1661
|
onClick: s[0] ||= b(() => {}, ["prevent"])
|
|
1693
|
-
}, M(n.text || "..."), 13,
|
|
1662
|
+
}, M(n.text || "..."), 13, sr), r < t.block.items.length - 1 ? (e(), w("span", {
|
|
1694
1663
|
key: 0,
|
|
1695
1664
|
style: A({
|
|
1696
1665
|
color: t.block.separatorColor,
|
|
1697
1666
|
padding: `0 ${t.block.spacing}px`
|
|
1698
1667
|
})
|
|
1699
|
-
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div",
|
|
1668
|
+
}, M(t.block.separator), 5)) : O("", !0)], 64))), 128))], 4)) : (e(), w("div", cr, [N(j(mn), { size: 16 }), C("span", null, M(j(r).menu.addLinks), 1)]))]));
|
|
1700
1669
|
}
|
|
1701
|
-
}),
|
|
1670
|
+
}), ur = new Set([
|
|
1702
1671
|
"http",
|
|
1703
1672
|
"https",
|
|
1704
1673
|
"mailto",
|
|
@@ -1708,7 +1677,7 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1708
1677
|
"sms",
|
|
1709
1678
|
"xmpp",
|
|
1710
1679
|
"cid"
|
|
1711
|
-
]),
|
|
1680
|
+
]), dr = new Set([
|
|
1712
1681
|
"SCRIPT",
|
|
1713
1682
|
"STYLE",
|
|
1714
1683
|
"IFRAME",
|
|
@@ -1718,7 +1687,7 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1718
1687
|
"META",
|
|
1719
1688
|
"BASE",
|
|
1720
1689
|
"FORM"
|
|
1721
|
-
]),
|
|
1690
|
+
]), fr = new Set([
|
|
1722
1691
|
"href",
|
|
1723
1692
|
"xlink:href",
|
|
1724
1693
|
"formaction",
|
|
@@ -1727,16 +1696,16 @@ var Mn = { class: "tpl:w-full" }, Nn = {
|
|
|
1727
1696
|
"background",
|
|
1728
1697
|
"poster"
|
|
1729
1698
|
]);
|
|
1730
|
-
function
|
|
1699
|
+
function pr(e, t) {
|
|
1731
1700
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1732
1701
|
if (!n || n.startsWith("#")) return !0;
|
|
1733
1702
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1734
1703
|
if (!r) return !0;
|
|
1735
1704
|
let i = r[1].toLowerCase();
|
|
1736
|
-
return
|
|
1705
|
+
return ur.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1737
1706
|
}
|
|
1738
|
-
function
|
|
1739
|
-
if (
|
|
1707
|
+
function mr(e) {
|
|
1708
|
+
if (dr.has(e.tagName)) {
|
|
1740
1709
|
e.remove();
|
|
1741
1710
|
return;
|
|
1742
1711
|
}
|
|
@@ -1748,29 +1717,29 @@ function pr(e) {
|
|
|
1748
1717
|
e.removeAttribute(n);
|
|
1749
1718
|
continue;
|
|
1750
1719
|
}
|
|
1751
|
-
if (
|
|
1752
|
-
|
|
1720
|
+
if (fr.has(t)) {
|
|
1721
|
+
pr(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1753
1722
|
continue;
|
|
1754
1723
|
}
|
|
1755
1724
|
if (t === "src") {
|
|
1756
|
-
|
|
1725
|
+
pr(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1757
1726
|
continue;
|
|
1758
1727
|
}
|
|
1759
1728
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1760
1729
|
}
|
|
1761
1730
|
let n = Array.from(e.children);
|
|
1762
|
-
for (let e of n)
|
|
1731
|
+
for (let e of n) mr(e);
|
|
1763
1732
|
}
|
|
1764
|
-
function
|
|
1733
|
+
function hr(e) {
|
|
1765
1734
|
if (typeof DOMParser > "u") return e;
|
|
1766
1735
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1767
|
-
for (let e of n)
|
|
1736
|
+
for (let e of n) mr(e);
|
|
1768
1737
|
return t.innerHTML;
|
|
1769
1738
|
}
|
|
1770
1739
|
//#endregion
|
|
1771
1740
|
//#region src/composables/useEditableTextBlock.ts
|
|
1772
|
-
function
|
|
1773
|
-
let t = P(
|
|
1741
|
+
function gr(e) {
|
|
1742
|
+
let t = P(ft, []), { syntax: n } = yt(), r = x(() => hr(Se(ce(e(), t), n))), i = h(!1), a = h(null), { top: o, left: s } = Ie(a), c = x(() => ({
|
|
1774
1743
|
top: o.value - 8,
|
|
1775
1744
|
left: s.value
|
|
1776
1745
|
}));
|
|
@@ -1791,14 +1760,14 @@ function hr(e) {
|
|
|
1791
1760
|
}
|
|
1792
1761
|
//#endregion
|
|
1793
1762
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1794
|
-
var
|
|
1763
|
+
var _r = ["innerHTML"], vr = /* @__PURE__ */ y({
|
|
1795
1764
|
__name: "ParagraphBlock",
|
|
1796
1765
|
props: {
|
|
1797
1766
|
block: {},
|
|
1798
1767
|
viewport: {}
|
|
1799
1768
|
},
|
|
1800
1769
|
setup(t) {
|
|
1801
|
-
let n = t, r = oe(() => import("./ParagraphEditor-
|
|
1770
|
+
let n = t, r = oe(() => import("./ParagraphEditor-BKoqcKIt.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = gr(() => n.block.content);
|
|
1802
1771
|
return (n, u) => (e(), w("div", {
|
|
1803
1772
|
ref_key: "blockRef",
|
|
1804
1773
|
ref: a,
|
|
@@ -1817,19 +1786,19 @@ var gr = ["innerHTML"], _r = /* @__PURE__ */ y({
|
|
|
1817
1786
|
key: 1,
|
|
1818
1787
|
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",
|
|
1819
1788
|
innerHTML: j(s)
|
|
1820
|
-
}, null, 8,
|
|
1789
|
+
}, null, 8, _r))], 544));
|
|
1821
1790
|
}
|
|
1822
1791
|
});
|
|
1823
1792
|
//#endregion
|
|
1824
1793
|
//#region src/utils/blockComponentResolver.ts
|
|
1825
|
-
function
|
|
1794
|
+
function yr(e, t, n) {
|
|
1826
1795
|
if (t) {
|
|
1827
1796
|
let n = t.getComponent(e);
|
|
1828
1797
|
if (n) return n;
|
|
1829
1798
|
}
|
|
1830
1799
|
return n[e.type] ?? null;
|
|
1831
1800
|
}
|
|
1832
|
-
function
|
|
1801
|
+
function br(e) {
|
|
1833
1802
|
let { padding: t, backgroundColor: n } = e.styles;
|
|
1834
1803
|
return {
|
|
1835
1804
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -1838,20 +1807,20 @@ function yr(e) {
|
|
|
1838
1807
|
}
|
|
1839
1808
|
//#endregion
|
|
1840
1809
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1841
|
-
var
|
|
1810
|
+
var xr = ["data-block-id", "data-block-type"], Sr = ["aria-label"], Cr = [
|
|
1842
1811
|
"aria-label",
|
|
1843
1812
|
"aria-pressed",
|
|
1844
1813
|
"title"
|
|
1845
|
-
],
|
|
1814
|
+
], wr = ["aria-label", "title"], Tr = ["aria-label", "title"], Er = ["aria-label", "title"], Dr = {
|
|
1846
1815
|
key: 1,
|
|
1847
1816
|
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"
|
|
1848
|
-
},
|
|
1817
|
+
}, Or = { 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)]" }, kr = {
|
|
1849
1818
|
key: 2,
|
|
1850
1819
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1851
|
-
},
|
|
1820
|
+
}, Ar = ["aria-label", "title"], jr = {
|
|
1852
1821
|
key: 3,
|
|
1853
1822
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1854
|
-
},
|
|
1823
|
+
}, Mr = ["aria-label"], Nr = /*#__PURE__*/ vt(/* @__PURE__ */ y({
|
|
1855
1824
|
__name: "BlockWrapper",
|
|
1856
1825
|
props: {
|
|
1857
1826
|
block: {},
|
|
@@ -1861,7 +1830,7 @@ var br = ["data-block-id", "data-block-type"], xr = ["aria-label"], Sr = [
|
|
|
1861
1830
|
},
|
|
1862
1831
|
emits: ["select"],
|
|
1863
1832
|
setup(t, { emit: n }) {
|
|
1864
|
-
let i = oe(() => import("./BlockIssueBadge-
|
|
1833
|
+
let i = oe(() => import("./BlockIssueBadge-BF4sdsr4.js")), a = t, o = n, { t: s, format: c } = pt(), u = P(lt, 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);
|
|
1865
1834
|
async function m() {
|
|
1866
1835
|
await r(), d.value?.focus();
|
|
1867
1836
|
}
|
|
@@ -1887,8 +1856,8 @@ var br = ["data-block-id", "data-block-type"], xr = ["aria-label"], Sr = [
|
|
|
1887
1856
|
let y = x(() => !a.viewport || !a.block.visibility ? !1 : a.block.visibility[a.viewport] === !1), S = x(() => a.previewMode === !0 && y.value), T = x(() => a.viewport ? {
|
|
1888
1857
|
desktop: s.viewport.desktop,
|
|
1889
1858
|
mobile: s.viewport.mobile
|
|
1890
|
-
}[a.viewport] ?? a.viewport : ""), E = x(() => !!a.block.displayCondition), ee = P(
|
|
1891
|
-
let e =
|
|
1859
|
+
}[a.viewport] ?? a.viewport : ""), E = x(() => !!a.block.displayCondition), ee = P(et, null), D = P(ct, null), k = P(st, {}), te = x(() => !!k.savedModules), ne = x(() => k.comments?.getBlockCount(a.block.id) ?? 0), re = x(() => {
|
|
1860
|
+
let e = br(a.block);
|
|
1892
1861
|
return {
|
|
1893
1862
|
padding: e.padding,
|
|
1894
1863
|
backgroundColor: e.backgroundColor
|
|
@@ -1936,90 +1905,90 @@ var br = ["data-block-id", "data-block-type"], xr = ["aria-label"], Sr = [
|
|
|
1936
1905
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1937
1906
|
title: j(s).blockActions.drag,
|
|
1938
1907
|
onKeydown: g
|
|
1939
|
-
}, [N(j(
|
|
1908
|
+
}, [N(j(fn), {
|
|
1940
1909
|
size: 14,
|
|
1941
1910
|
"stroke-width": 1.5
|
|
1942
|
-
})], 40,
|
|
1911
|
+
})], 40, Cr),
|
|
1943
1912
|
C("button", {
|
|
1944
1913
|
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",
|
|
1945
1914
|
"aria-label": j(s).blockActions.duplicate,
|
|
1946
1915
|
title: j(s).blockActions.duplicate,
|
|
1947
1916
|
onClick: b(se, ["stop"])
|
|
1948
|
-
}, [N(j(
|
|
1917
|
+
}, [N(j(ln), {
|
|
1949
1918
|
size: 14,
|
|
1950
1919
|
"stroke-width": 1.5
|
|
1951
|
-
})], 8,
|
|
1920
|
+
})], 8, wr),
|
|
1952
1921
|
te.value ? (e(), w("button", {
|
|
1953
1922
|
key: 0,
|
|
1954
1923
|
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",
|
|
1955
1924
|
"aria-label": j(s).blockActions.saveAsModule,
|
|
1956
1925
|
title: j(s).blockActions.saveAsModule,
|
|
1957
1926
|
onClick: b(ce, ["stop"])
|
|
1958
|
-
}, [N(j(
|
|
1927
|
+
}, [N(j(on), {
|
|
1959
1928
|
size: 14,
|
|
1960
1929
|
"stroke-width": 1.5
|
|
1961
|
-
})], 8,
|
|
1930
|
+
})], 8, Tr)) : O("", !0),
|
|
1962
1931
|
C("button", {
|
|
1963
1932
|
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",
|
|
1964
1933
|
"aria-label": j(s).blockActions.delete,
|
|
1965
1934
|
title: j(s).blockActions.delete,
|
|
1966
1935
|
onClick: b(ae, ["stop"])
|
|
1967
|
-
}, [N(j(
|
|
1936
|
+
}, [N(j(ht), {
|
|
1968
1937
|
size: 14,
|
|
1969
1938
|
"stroke-width": 1.5
|
|
1970
|
-
})], 8,
|
|
1971
|
-
], 8,
|
|
1972
|
-
y.value ? (e(), w("div",
|
|
1939
|
+
})], 8, Er)
|
|
1940
|
+
], 8, Sr)) : O("", !0),
|
|
1941
|
+
y.value ? (e(), w("div", Dr, [C("span", Or, [N(j(un), {
|
|
1973
1942
|
size: 12,
|
|
1974
1943
|
"stroke-width": 1.5
|
|
1975
1944
|
}), _(" " + M(j(c)(j(s).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : O("", !0),
|
|
1976
|
-
E.value && !y.value ? (e(), w("div",
|
|
1945
|
+
E.value && !y.value ? (e(), w("div", kr, [C("button", {
|
|
1977
1946
|
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)]",
|
|
1978
1947
|
"aria-label": j(s).blockActions.conditionToggle,
|
|
1979
1948
|
title: t.block.displayCondition?.label,
|
|
1980
1949
|
onClick: b(le, ["stop"])
|
|
1981
|
-
}, [N(j(
|
|
1950
|
+
}, [N(j(dn), {
|
|
1982
1951
|
size: 12,
|
|
1983
1952
|
"stroke-width": 2
|
|
1984
|
-
})], 8,
|
|
1985
|
-
ne.value > 0 && !y.value ? (e(), w("div",
|
|
1953
|
+
})], 8, Ar)])) : O("", !0),
|
|
1954
|
+
ne.value > 0 && !y.value ? (e(), w("div", jr, [C("button", {
|
|
1986
1955
|
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)]",
|
|
1987
1956
|
"aria-label": j(c)(j(s).blockActions.comments, { count: String(ne.value) }),
|
|
1988
1957
|
onClick: r[0] ||= b((e) => j(k).comments?.openForBlock(t.block.id), ["stop"])
|
|
1989
|
-
}, [N(j(
|
|
1958
|
+
}, [N(j(mt), {
|
|
1990
1959
|
size: 12,
|
|
1991
1960
|
"stroke-width": 2.5
|
|
1992
|
-
}), _(" " + M(ne.value), 1)], 8,
|
|
1961
|
+
}), _(" " + M(ne.value), 1)], 8, Mr)])) : O("", !0),
|
|
1993
1962
|
C("div", {
|
|
1994
1963
|
class: "tpl-block-content",
|
|
1995
1964
|
style: A(re.value)
|
|
1996
1965
|
}, [l(n.$slots, "default", {}, void 0, !0)], 4)
|
|
1997
|
-
], 10,
|
|
1966
|
+
], 10, xr));
|
|
1998
1967
|
}
|
|
1999
1968
|
}), [["__scopeId", "data-v-4a48371d"]]);
|
|
2000
1969
|
//#endregion
|
|
2001
1970
|
//#region src/utils/unwrapParagraph.ts
|
|
2002
|
-
function
|
|
1971
|
+
function Pr(e) {
|
|
2003
1972
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2004
1973
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2005
1974
|
}
|
|
2006
1975
|
//#endregion
|
|
2007
1976
|
//#region src/components/blocks/TitleBlock.vue
|
|
2008
|
-
var
|
|
1977
|
+
var Fr = /* @__PURE__ */ y({
|
|
2009
1978
|
__name: "TitleBlock",
|
|
2010
1979
|
props: {
|
|
2011
1980
|
block: {},
|
|
2012
1981
|
viewport: {}
|
|
2013
1982
|
},
|
|
2014
1983
|
setup(t) {
|
|
2015
|
-
let n = t, r = oe(() => import("./TitleEditor-
|
|
1984
|
+
let n = t, r = oe(() => import("./TitleEditor-Rv1deuV7.js")), { isEditing: a, blockRef: o, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = gr(() => n.block.content), d = x(() => {
|
|
2016
1985
|
let e = {
|
|
2017
1986
|
fontSize: `${Oe[n.block.level]}px`,
|
|
2018
1987
|
color: n.block.color,
|
|
2019
1988
|
textAlign: n.block.textAlign
|
|
2020
1989
|
};
|
|
2021
1990
|
return n.block.fontFamily && (e.fontFamily = n.block.fontFamily), e;
|
|
2022
|
-
}), f = x(() => `h${n.block.level}`), p = x(() =>
|
|
1991
|
+
}), f = x(() => `h${n.block.level}`), p = x(() => Pr(c.value));
|
|
2023
1992
|
return (n, c) => (e(), w("div", {
|
|
2024
1993
|
ref_key: "blockRef",
|
|
2025
1994
|
ref: o,
|
|
@@ -2042,83 +2011,83 @@ var Pr = /* @__PURE__ */ y({
|
|
|
2042
2011
|
innerHTML: p.value
|
|
2043
2012
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2044
2013
|
}
|
|
2045
|
-
}),
|
|
2014
|
+
}), Ir = Object.defineProperty, Lr = Object.getOwnPropertySymbols, Rr = Object.prototype.hasOwnProperty, zr = Object.prototype.propertyIsEnumerable, Br = (e, t, n) => t in e ? Ir(e, t, {
|
|
2046
2015
|
enumerable: !0,
|
|
2047
2016
|
configurable: !0,
|
|
2048
2017
|
writable: !0,
|
|
2049
2018
|
value: n
|
|
2050
|
-
}) : e[t] = n,
|
|
2051
|
-
for (var n in t ||= {})
|
|
2052
|
-
if (
|
|
2019
|
+
}) : e[t] = n, Vr = (e, t) => {
|
|
2020
|
+
for (var n in t ||= {}) Rr.call(t, n) && Br(e, n, t[n]);
|
|
2021
|
+
if (Lr) for (var n of Lr(t)) zr.call(t, n) && Br(e, n, t[n]);
|
|
2053
2022
|
return e;
|
|
2054
|
-
},
|
|
2023
|
+
}, Hr = (e, t) => {
|
|
2055
2024
|
var n = {};
|
|
2056
|
-
for (var r in e)
|
|
2057
|
-
if (e != null &&
|
|
2025
|
+
for (var r in e) Rr.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2026
|
+
if (e != null && Lr) for (var r of Lr(e)) t.indexOf(r) < 0 && zr.call(e, r) && (n[r] = e[r]);
|
|
2058
2027
|
return n;
|
|
2059
|
-
},
|
|
2060
|
-
function Ur(e) {
|
|
2061
|
-
console.warn(Hr + e);
|
|
2062
|
-
}
|
|
2028
|
+
}, Ur = "[vue-draggable-plus]: ";
|
|
2063
2029
|
function Wr(e) {
|
|
2064
|
-
console.
|
|
2030
|
+
console.warn(Ur + e);
|
|
2065
2031
|
}
|
|
2066
|
-
function Gr(e
|
|
2032
|
+
function Gr(e) {
|
|
2033
|
+
console.error(Ur + e);
|
|
2034
|
+
}
|
|
2035
|
+
function Kr(e, t, n) {
|
|
2067
2036
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2068
2037
|
}
|
|
2069
|
-
function
|
|
2038
|
+
function qr(e) {
|
|
2070
2039
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2071
2040
|
}
|
|
2072
|
-
function
|
|
2073
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2041
|
+
function Jr(e) {
|
|
2042
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[qr(n)] = e[n]), t), {});
|
|
2074
2043
|
}
|
|
2075
|
-
function
|
|
2044
|
+
function Yr(e, t) {
|
|
2076
2045
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2077
2046
|
}
|
|
2078
|
-
function
|
|
2047
|
+
function Xr(e, t, n) {
|
|
2079
2048
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2080
2049
|
}
|
|
2081
|
-
function
|
|
2050
|
+
function Zr(e) {
|
|
2082
2051
|
return e === void 0;
|
|
2083
2052
|
}
|
|
2084
|
-
function
|
|
2053
|
+
function Qr(e) {
|
|
2085
2054
|
return typeof e == "string";
|
|
2086
2055
|
}
|
|
2087
|
-
function
|
|
2056
|
+
function $r(e, t, n) {
|
|
2088
2057
|
let r = e.children[n];
|
|
2089
2058
|
e.insertBefore(t, r);
|
|
2090
2059
|
}
|
|
2091
|
-
function
|
|
2060
|
+
function ei(e) {
|
|
2092
2061
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2093
2062
|
}
|
|
2094
|
-
function
|
|
2063
|
+
function ti(e, t = document) {
|
|
2095
2064
|
let n = null;
|
|
2096
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2065
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Wr(`Element not found: ${e}`), n;
|
|
2097
2066
|
}
|
|
2098
|
-
function
|
|
2067
|
+
function ni(e, t, n = null) {
|
|
2099
2068
|
return function(...r) {
|
|
2100
2069
|
return e.apply(n, r), t.apply(n, r);
|
|
2101
2070
|
};
|
|
2102
2071
|
}
|
|
2103
|
-
function
|
|
2104
|
-
let n =
|
|
2072
|
+
function ri(e, t) {
|
|
2073
|
+
let n = Vr({}, e);
|
|
2105
2074
|
return Object.keys(t).forEach((r) => {
|
|
2106
|
-
n[r] ? n[r] =
|
|
2075
|
+
n[r] ? n[r] = ni(e[r], t[r]) : n[r] = t[r];
|
|
2107
2076
|
}), n;
|
|
2108
2077
|
}
|
|
2109
|
-
function
|
|
2078
|
+
function ii(e) {
|
|
2110
2079
|
return e instanceof HTMLElement;
|
|
2111
2080
|
}
|
|
2112
|
-
function
|
|
2081
|
+
function ai(e, t) {
|
|
2113
2082
|
Object.keys(e).forEach((n) => {
|
|
2114
2083
|
t(n, e[n]);
|
|
2115
2084
|
});
|
|
2116
2085
|
}
|
|
2117
|
-
function
|
|
2086
|
+
function oi(e) {
|
|
2118
2087
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2119
2088
|
}
|
|
2120
|
-
var
|
|
2121
|
-
function
|
|
2089
|
+
var si = Object.assign;
|
|
2090
|
+
function ci(e, t) {
|
|
2122
2091
|
var n = Object.keys(e);
|
|
2123
2092
|
if (Object.getOwnPropertySymbols) {
|
|
2124
2093
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2128,26 +2097,26 @@ function si(e, t) {
|
|
|
2128
2097
|
}
|
|
2129
2098
|
return n;
|
|
2130
2099
|
}
|
|
2131
|
-
function
|
|
2100
|
+
function li(e) {
|
|
2132
2101
|
for (var t = 1; t < arguments.length; t++) {
|
|
2133
2102
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2134
|
-
t % 2 ?
|
|
2135
|
-
|
|
2136
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2103
|
+
t % 2 ? ci(Object(n), !0).forEach(function(t) {
|
|
2104
|
+
di(e, t, n[t]);
|
|
2105
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ci(Object(n)).forEach(function(t) {
|
|
2137
2106
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2138
2107
|
});
|
|
2139
2108
|
}
|
|
2140
2109
|
return e;
|
|
2141
2110
|
}
|
|
2142
|
-
function
|
|
2111
|
+
function ui(e) {
|
|
2143
2112
|
"@babel/helpers - typeof";
|
|
2144
|
-
return
|
|
2113
|
+
return ui = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2145
2114
|
return typeof e;
|
|
2146
2115
|
} : function(e) {
|
|
2147
2116
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2148
|
-
},
|
|
2117
|
+
}, ui(e);
|
|
2149
2118
|
}
|
|
2150
|
-
function
|
|
2119
|
+
function di(e, t, n) {
|
|
2151
2120
|
return t in e ? Object.defineProperty(e, t, {
|
|
2152
2121
|
value: n,
|
|
2153
2122
|
enumerable: !0,
|
|
@@ -2155,45 +2124,45 @@ function ui(e, t, n) {
|
|
|
2155
2124
|
writable: !0
|
|
2156
2125
|
}) : e[t] = n, e;
|
|
2157
2126
|
}
|
|
2158
|
-
function
|
|
2159
|
-
return
|
|
2127
|
+
function fi() {
|
|
2128
|
+
return fi = Object.assign || function(e) {
|
|
2160
2129
|
for (var t = 1; t < arguments.length; t++) {
|
|
2161
2130
|
var n = arguments[t];
|
|
2162
2131
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2163
2132
|
}
|
|
2164
2133
|
return e;
|
|
2165
|
-
},
|
|
2134
|
+
}, fi.apply(this, arguments);
|
|
2166
2135
|
}
|
|
2167
|
-
function
|
|
2136
|
+
function pi(e, t) {
|
|
2168
2137
|
if (e == null) return {};
|
|
2169
2138
|
var n = {}, r = Object.keys(e), i, a;
|
|
2170
2139
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2171
2140
|
return n;
|
|
2172
2141
|
}
|
|
2173
|
-
function
|
|
2142
|
+
function mi(e, t) {
|
|
2174
2143
|
if (e == null) return {};
|
|
2175
|
-
var n =
|
|
2144
|
+
var n = pi(e, t), r, i;
|
|
2176
2145
|
if (Object.getOwnPropertySymbols) {
|
|
2177
2146
|
var a = Object.getOwnPropertySymbols(e);
|
|
2178
2147
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2179
2148
|
}
|
|
2180
2149
|
return n;
|
|
2181
2150
|
}
|
|
2182
|
-
var
|
|
2183
|
-
function
|
|
2151
|
+
var hi = "1.15.2";
|
|
2152
|
+
function gi(e) {
|
|
2184
2153
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2185
2154
|
}
|
|
2186
|
-
var
|
|
2155
|
+
var _i = gi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), vi = gi(/Edge/i), yi = gi(/firefox/i), bi = gi(/safari/i) && !gi(/chrome/i) && !gi(/android/i), xi = gi(/iP(ad|od|hone)/i), Si = gi(/chrome/i) && gi(/android/i), Ci = {
|
|
2187
2156
|
capture: !1,
|
|
2188
2157
|
passive: !1
|
|
2189
2158
|
};
|
|
2190
2159
|
function I(e, t, n) {
|
|
2191
|
-
e.addEventListener(t, n, !
|
|
2160
|
+
e.addEventListener(t, n, !_i && Ci);
|
|
2192
2161
|
}
|
|
2193
2162
|
function L(e, t, n) {
|
|
2194
|
-
e.removeEventListener(t, n, !
|
|
2163
|
+
e.removeEventListener(t, n, !_i && Ci);
|
|
2195
2164
|
}
|
|
2196
|
-
function
|
|
2165
|
+
function wi(e, t) {
|
|
2197
2166
|
if (t) {
|
|
2198
2167
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2199
2168
|
if (e.matches) return e.matches(t);
|
|
@@ -2205,22 +2174,22 @@ function Ci(e, t) {
|
|
|
2205
2174
|
return !1;
|
|
2206
2175
|
}
|
|
2207
2176
|
}
|
|
2208
|
-
function
|
|
2177
|
+
function Ti(e) {
|
|
2209
2178
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2210
2179
|
}
|
|
2211
|
-
function
|
|
2180
|
+
function Ei(e, t, n, r) {
|
|
2212
2181
|
if (e) {
|
|
2213
2182
|
n ||= document;
|
|
2214
2183
|
do {
|
|
2215
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2184
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && wi(e, t) : wi(e, t)) || r && e === n) return e;
|
|
2216
2185
|
if (e === n) break;
|
|
2217
|
-
} while (e =
|
|
2186
|
+
} while (e = Ti(e));
|
|
2218
2187
|
}
|
|
2219
2188
|
return null;
|
|
2220
2189
|
}
|
|
2221
|
-
var
|
|
2190
|
+
var Di = /\s+/g;
|
|
2222
2191
|
function R(e, t, n) {
|
|
2223
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2192
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Di, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Di, " "));
|
|
2224
2193
|
}
|
|
2225
2194
|
function z(e, t, n) {
|
|
2226
2195
|
var r = e && e.style;
|
|
@@ -2229,7 +2198,7 @@ function z(e, t, n) {
|
|
|
2229
2198
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2230
2199
|
}
|
|
2231
2200
|
}
|
|
2232
|
-
function
|
|
2201
|
+
function Oi(e, t) {
|
|
2233
2202
|
var n = "";
|
|
2234
2203
|
if (typeof e == "string") n = e;
|
|
2235
2204
|
else do {
|
|
@@ -2239,7 +2208,7 @@ function Di(e, t) {
|
|
|
2239
2208
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2240
2209
|
return i && new i(n);
|
|
2241
2210
|
}
|
|
2242
|
-
function
|
|
2211
|
+
function ki(e, t, n) {
|
|
2243
2212
|
if (e) {
|
|
2244
2213
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2245
2214
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2247,13 +2216,13 @@ function Oi(e, t, n) {
|
|
|
2247
2216
|
}
|
|
2248
2217
|
return [];
|
|
2249
2218
|
}
|
|
2250
|
-
function
|
|
2219
|
+
function Ai() {
|
|
2251
2220
|
return document.scrollingElement || document.documentElement;
|
|
2252
2221
|
}
|
|
2253
2222
|
function B(e, t, n, r, i) {
|
|
2254
2223
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2255
2224
|
var a, o, s, c, l, u, d;
|
|
2256
|
-
if (e !== window && e.parentNode && e !==
|
|
2225
|
+
if (e !== window && e.parentNode && e !== Ai() ? (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, !_i)) do
|
|
2257
2226
|
if (i && i.getBoundingClientRect && (z(i, "transform") !== "none" || n && z(i, "position") !== "static")) {
|
|
2258
2227
|
var f = i.getBoundingClientRect();
|
|
2259
2228
|
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;
|
|
@@ -2261,7 +2230,7 @@ function B(e, t, n, r, i) {
|
|
|
2261
2230
|
}
|
|
2262
2231
|
while (i = i.parentNode);
|
|
2263
2232
|
if (r && e !== window) {
|
|
2264
|
-
var p =
|
|
2233
|
+
var p = Oi(i || e), m = p && p.a, h = p && p.d;
|
|
2265
2234
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2266
2235
|
}
|
|
2267
2236
|
return {
|
|
@@ -2274,18 +2243,18 @@ function B(e, t, n, r, i) {
|
|
|
2274
2243
|
};
|
|
2275
2244
|
}
|
|
2276
2245
|
}
|
|
2277
|
-
function
|
|
2278
|
-
for (var r =
|
|
2246
|
+
function ji(e, t, n) {
|
|
2247
|
+
for (var r = Li(e, !0), i = B(e)[t]; r;) {
|
|
2279
2248
|
var a = B(r)[n], o = void 0;
|
|
2280
2249
|
if (o = i >= a, !o) return r;
|
|
2281
|
-
if (r ===
|
|
2282
|
-
r =
|
|
2250
|
+
if (r === Ai()) break;
|
|
2251
|
+
r = Li(r, !1);
|
|
2283
2252
|
}
|
|
2284
2253
|
return !1;
|
|
2285
2254
|
}
|
|
2286
|
-
function
|
|
2255
|
+
function Mi(e, t, n, r) {
|
|
2287
2256
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2288
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2257
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ei(o[a], n.draggable, e, !1)) {
|
|
2289
2258
|
if (i === t) return o[a];
|
|
2290
2259
|
i++;
|
|
2291
2260
|
}
|
|
@@ -2293,84 +2262,84 @@ function ji(e, t, n, r) {
|
|
|
2293
2262
|
}
|
|
2294
2263
|
return null;
|
|
2295
2264
|
}
|
|
2296
|
-
function
|
|
2297
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !
|
|
2265
|
+
function Ni(e, t) {
|
|
2266
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || z(n, "display") === "none" || t && !wi(n, t));) n = n.previousElementSibling;
|
|
2298
2267
|
return n || null;
|
|
2299
2268
|
}
|
|
2300
|
-
function
|
|
2269
|
+
function Pi(e, t) {
|
|
2301
2270
|
var n = 0;
|
|
2302
2271
|
if (!e || !e.parentNode) return -1;
|
|
2303
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2272
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || wi(e, t)) && n++;
|
|
2304
2273
|
return n;
|
|
2305
2274
|
}
|
|
2306
|
-
function
|
|
2307
|
-
var t = 0, n = 0, r =
|
|
2275
|
+
function Fi(e) {
|
|
2276
|
+
var t = 0, n = 0, r = Ai();
|
|
2308
2277
|
if (e) do {
|
|
2309
|
-
var i =
|
|
2278
|
+
var i = Oi(e), a = i.a, o = i.d;
|
|
2310
2279
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2311
2280
|
} while (e !== r && (e = e.parentNode));
|
|
2312
2281
|
return [t, n];
|
|
2313
2282
|
}
|
|
2314
|
-
function
|
|
2283
|
+
function Ii(e, t) {
|
|
2315
2284
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2316
2285
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2317
2286
|
}
|
|
2318
2287
|
return -1;
|
|
2319
2288
|
}
|
|
2320
|
-
function
|
|
2321
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2289
|
+
function Li(e, t) {
|
|
2290
|
+
if (!e || !e.getBoundingClientRect) return Ai();
|
|
2322
2291
|
var n = e, r = !1;
|
|
2323
2292
|
do
|
|
2324
2293
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2325
2294
|
var i = z(n);
|
|
2326
2295
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2327
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2296
|
+
if (!n.getBoundingClientRect || n === document.body) return Ai();
|
|
2328
2297
|
if (r || t) return n;
|
|
2329
2298
|
r = !0;
|
|
2330
2299
|
}
|
|
2331
2300
|
}
|
|
2332
2301
|
while (n = n.parentNode);
|
|
2333
|
-
return
|
|
2302
|
+
return Ai();
|
|
2334
2303
|
}
|
|
2335
|
-
function
|
|
2304
|
+
function Ri(e, t) {
|
|
2336
2305
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2337
2306
|
return e;
|
|
2338
2307
|
}
|
|
2339
|
-
function
|
|
2308
|
+
function zi(e, t) {
|
|
2340
2309
|
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);
|
|
2341
2310
|
}
|
|
2342
|
-
var
|
|
2343
|
-
function
|
|
2311
|
+
var Bi;
|
|
2312
|
+
function Vi(e, t) {
|
|
2344
2313
|
return function() {
|
|
2345
|
-
if (!
|
|
2314
|
+
if (!Bi) {
|
|
2346
2315
|
var n = arguments, r = this;
|
|
2347
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2348
|
-
|
|
2316
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Bi = setTimeout(function() {
|
|
2317
|
+
Bi = void 0;
|
|
2349
2318
|
}, t);
|
|
2350
2319
|
}
|
|
2351
2320
|
};
|
|
2352
2321
|
}
|
|
2353
|
-
function
|
|
2354
|
-
clearTimeout(
|
|
2322
|
+
function Hi() {
|
|
2323
|
+
clearTimeout(Bi), Bi = void 0;
|
|
2355
2324
|
}
|
|
2356
|
-
function
|
|
2325
|
+
function Ui(e, t, n) {
|
|
2357
2326
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2358
2327
|
}
|
|
2359
|
-
function
|
|
2328
|
+
function Wi(e) {
|
|
2360
2329
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2361
2330
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2362
2331
|
}
|
|
2363
|
-
function
|
|
2332
|
+
function Gi(e, t, n) {
|
|
2364
2333
|
var r = {};
|
|
2365
2334
|
return Array.from(e.children).forEach(function(i) {
|
|
2366
|
-
if (!(!
|
|
2335
|
+
if (!(!Ei(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2367
2336
|
var a = B(i);
|
|
2368
2337
|
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);
|
|
2369
2338
|
}
|
|
2370
2339
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2371
2340
|
}
|
|
2372
2341
|
var V = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2373
|
-
function
|
|
2342
|
+
function Ki() {
|
|
2374
2343
|
var e = [], t;
|
|
2375
2344
|
return {
|
|
2376
2345
|
captureAnimationState: function() {
|
|
@@ -2380,9 +2349,9 @@ function Gi() {
|
|
|
2380
2349
|
target: t,
|
|
2381
2350
|
rect: B(t)
|
|
2382
2351
|
});
|
|
2383
|
-
var n =
|
|
2352
|
+
var n = li({}, e[e.length - 1].rect);
|
|
2384
2353
|
if (t.thisAnimationDuration) {
|
|
2385
|
-
var r =
|
|
2354
|
+
var r = Oi(t, !0);
|
|
2386
2355
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2387
2356
|
}
|
|
2388
2357
|
t.fromRect = n;
|
|
@@ -2393,7 +2362,7 @@ function Gi() {
|
|
|
2393
2362
|
e.push(t);
|
|
2394
2363
|
},
|
|
2395
2364
|
removeAnimationState: function(t) {
|
|
2396
|
-
e.splice(
|
|
2365
|
+
e.splice(Ii(e, { target: t }), 1);
|
|
2397
2366
|
},
|
|
2398
2367
|
animateAll: function(n) {
|
|
2399
2368
|
var r = this;
|
|
@@ -2403,8 +2372,8 @@ function Gi() {
|
|
|
2403
2372
|
}
|
|
2404
2373
|
var i = !1, a = 0;
|
|
2405
2374
|
e.forEach(function(e) {
|
|
2406
|
-
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2407
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2375
|
+
var t = 0, n = e.target, o = n.fromRect, s = B(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Oi(n, !0);
|
|
2376
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && zi(c, s) && !zi(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ji(u, c, l, r.options)), zi(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() {
|
|
2408
2377
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2409
2378
|
}, t), n.thisAnimationDuration = t);
|
|
2410
2379
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2414,26 +2383,26 @@ function Gi() {
|
|
|
2414
2383
|
animate: function(e, t, n, r) {
|
|
2415
2384
|
if (r) {
|
|
2416
2385
|
z(e, "transition", ""), z(e, "transform", "");
|
|
2417
|
-
var i =
|
|
2418
|
-
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2386
|
+
var i = Oi(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2387
|
+
e.animatingX = !!s, e.animatingY = !!c, z(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = qi(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() {
|
|
2419
2388
|
z(e, "transition", ""), z(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2420
2389
|
}, r);
|
|
2421
2390
|
}
|
|
2422
2391
|
}
|
|
2423
2392
|
};
|
|
2424
2393
|
}
|
|
2425
|
-
function
|
|
2394
|
+
function qi(e) {
|
|
2426
2395
|
return e.offsetWidth;
|
|
2427
2396
|
}
|
|
2428
|
-
function
|
|
2397
|
+
function Ji(e, t, n, r) {
|
|
2429
2398
|
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;
|
|
2430
2399
|
}
|
|
2431
|
-
var
|
|
2400
|
+
var Yi = [], Xi = { initializeByDefault: !0 }, Zi = {
|
|
2432
2401
|
mount: function(e) {
|
|
2433
|
-
for (var t in
|
|
2434
|
-
|
|
2402
|
+
for (var t in Xi) Xi.hasOwnProperty(t) && !(t in e) && (e[t] = Xi[t]);
|
|
2403
|
+
Yi.forEach(function(t) {
|
|
2435
2404
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2436
|
-
}),
|
|
2405
|
+
}), Yi.push(e);
|
|
2437
2406
|
},
|
|
2438
2407
|
pluginEvent: function(e, t, n) {
|
|
2439
2408
|
var r = this;
|
|
@@ -2441,16 +2410,16 @@ var Ji = [], Yi = { initializeByDefault: !0 }, Xi = {
|
|
|
2441
2410
|
r.eventCanceled = !0;
|
|
2442
2411
|
};
|
|
2443
2412
|
var i = e + "Global";
|
|
2444
|
-
|
|
2445
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2413
|
+
Yi.forEach(function(r) {
|
|
2414
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](li({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](li({ sortable: t }, n)));
|
|
2446
2415
|
});
|
|
2447
2416
|
},
|
|
2448
2417
|
initializePlugins: function(e, t, n, r) {
|
|
2449
|
-
for (var i in
|
|
2418
|
+
for (var i in Yi.forEach(function(r) {
|
|
2450
2419
|
var i = r.pluginName;
|
|
2451
2420
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2452
2421
|
var a = new r(e, t, e.options);
|
|
2453
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2422
|
+
a.sortable = e, a.options = e.options, e[i] = a, fi(n, a.defaults);
|
|
2454
2423
|
}
|
|
2455
2424
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2456
2425
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2459,56 +2428,56 @@ var Ji = [], Yi = { initializeByDefault: !0 }, Xi = {
|
|
|
2459
2428
|
},
|
|
2460
2429
|
getEventProperties: function(e, t) {
|
|
2461
2430
|
var n = {};
|
|
2462
|
-
return
|
|
2463
|
-
typeof r.eventProperties == "function" &&
|
|
2431
|
+
return Yi.forEach(function(r) {
|
|
2432
|
+
typeof r.eventProperties == "function" && fi(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2464
2433
|
}), n;
|
|
2465
2434
|
},
|
|
2466
2435
|
modifyOption: function(e, t, n) {
|
|
2467
2436
|
var r;
|
|
2468
|
-
return
|
|
2437
|
+
return Yi.forEach(function(i) {
|
|
2469
2438
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2470
2439
|
}), r;
|
|
2471
2440
|
}
|
|
2472
2441
|
};
|
|
2473
|
-
function
|
|
2442
|
+
function Qi(e) {
|
|
2474
2443
|
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;
|
|
2475
2444
|
if (t ||= n && n[V], t) {
|
|
2476
2445
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2477
|
-
window.CustomEvent && !
|
|
2446
|
+
window.CustomEvent && !_i && !vi ? h = new CustomEvent(r, {
|
|
2478
2447
|
bubbles: !0,
|
|
2479
2448
|
cancelable: !0
|
|
2480
2449
|
}) : (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;
|
|
2481
|
-
var v =
|
|
2450
|
+
var v = li(li({}, m), Zi.getEventProperties(r, t));
|
|
2482
2451
|
for (var y in v) h[y] = v[y];
|
|
2483
2452
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2484
2453
|
}
|
|
2485
2454
|
}
|
|
2486
|
-
var
|
|
2487
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2488
|
-
|
|
2455
|
+
var $i = ["evt"], H = function(e, t) {
|
|
2456
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = mi(n, $i);
|
|
2457
|
+
Zi.pluginEvent.bind(Q)(e, t, li({
|
|
2489
2458
|
dragEl: W,
|
|
2490
2459
|
parentEl: G,
|
|
2491
2460
|
ghostEl: K,
|
|
2492
2461
|
rootEl: q,
|
|
2493
|
-
nextEl:
|
|
2494
|
-
lastDownEl:
|
|
2462
|
+
nextEl: ea,
|
|
2463
|
+
lastDownEl: ta,
|
|
2495
2464
|
cloneEl: J,
|
|
2496
|
-
cloneHidden:
|
|
2497
|
-
dragStarted:
|
|
2465
|
+
cloneHidden: na,
|
|
2466
|
+
dragStarted: ga,
|
|
2498
2467
|
putSortable: X,
|
|
2499
2468
|
activeSortable: Q.active,
|
|
2500
2469
|
originalEvent: r,
|
|
2501
|
-
oldIndex:
|
|
2502
|
-
oldDraggableIndex:
|
|
2470
|
+
oldIndex: ra,
|
|
2471
|
+
oldDraggableIndex: ia,
|
|
2503
2472
|
newIndex: Y,
|
|
2504
|
-
newDraggableIndex:
|
|
2505
|
-
hideGhostForTarget:
|
|
2506
|
-
unhideGhostForTarget:
|
|
2473
|
+
newDraggableIndex: aa,
|
|
2474
|
+
hideGhostForTarget: Pa,
|
|
2475
|
+
unhideGhostForTarget: Fa,
|
|
2507
2476
|
cloneNowHidden: function() {
|
|
2508
|
-
|
|
2477
|
+
na = !0;
|
|
2509
2478
|
},
|
|
2510
2479
|
cloneNowShown: function() {
|
|
2511
|
-
|
|
2480
|
+
na = !1;
|
|
2512
2481
|
},
|
|
2513
2482
|
dispatchSortableEvent: function(e) {
|
|
2514
2483
|
U({
|
|
@@ -2520,45 +2489,45 @@ var Qi = ["evt"], H = function(e, t) {
|
|
|
2520
2489
|
}, i));
|
|
2521
2490
|
};
|
|
2522
2491
|
function U(e) {
|
|
2523
|
-
|
|
2492
|
+
Qi(li({
|
|
2524
2493
|
putSortable: X,
|
|
2525
2494
|
cloneEl: J,
|
|
2526
2495
|
targetEl: W,
|
|
2527
2496
|
rootEl: q,
|
|
2528
|
-
oldIndex:
|
|
2529
|
-
oldDraggableIndex:
|
|
2497
|
+
oldIndex: ra,
|
|
2498
|
+
oldDraggableIndex: ia,
|
|
2530
2499
|
newIndex: Y,
|
|
2531
|
-
newDraggableIndex:
|
|
2500
|
+
newDraggableIndex: aa
|
|
2532
2501
|
}, e));
|
|
2533
2502
|
}
|
|
2534
|
-
var W, G, K, q,
|
|
2535
|
-
if (
|
|
2536
|
-
if (
|
|
2503
|
+
var W, G, K, q, ea, ta, J, na, ra, Y, ia, aa, oa, X, sa = !1, ca = !1, la = [], ua, da, fa, pa, ma, ha, ga, _a, va, ya = !1, ba = !1, xa, Z, Sa = [], Ca = !1, wa = [], Ta = typeof document < "u", Ea = xi, Da = vi || _i ? "cssFloat" : "float", Oa = Ta && !Si && !xi && "draggable" in document.createElement("div"), ka = function() {
|
|
2504
|
+
if (Ta) {
|
|
2505
|
+
if (_i) return !1;
|
|
2537
2506
|
var e = document.createElement("x");
|
|
2538
2507
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2539
2508
|
}
|
|
2540
|
-
}(),
|
|
2541
|
-
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2509
|
+
}(), Aa = function(e, t) {
|
|
2510
|
+
var n = z(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Mi(e, 0, t), a = Mi(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;
|
|
2542
2511
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2543
2512
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2544
2513
|
if (i && o.float && o.float !== "none") {
|
|
2545
2514
|
var u = o.float === "left" ? "left" : "right";
|
|
2546
2515
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2547
2516
|
}
|
|
2548
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2549
|
-
},
|
|
2517
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Da] === "none" || a && n[Da] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2518
|
+
}, ja = function(e, t, n) {
|
|
2550
2519
|
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;
|
|
2551
2520
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2552
|
-
},
|
|
2521
|
+
}, Ma = function(e, t) {
|
|
2553
2522
|
var n;
|
|
2554
|
-
return
|
|
2523
|
+
return la.some(function(r) {
|
|
2555
2524
|
var i = r[V].options.emptyInsertThreshold;
|
|
2556
|
-
if (!(!i ||
|
|
2525
|
+
if (!(!i || Ni(r))) {
|
|
2557
2526
|
var a = B(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2558
2527
|
if (o && s) return n = r;
|
|
2559
2528
|
}
|
|
2560
2529
|
}), n;
|
|
2561
|
-
},
|
|
2530
|
+
}, Na = function(e) {
|
|
2562
2531
|
function t(e, n) {
|
|
2563
2532
|
return function(r, i, a, o) {
|
|
2564
2533
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2571,31 +2540,31 @@ var W, G, K, q, $i, ea, J, ta, na, Y, ra, ia, aa, X, oa = !1, sa = !1, ca = [],
|
|
|
2571
2540
|
};
|
|
2572
2541
|
}
|
|
2573
2542
|
var n = {}, r = e.group;
|
|
2574
|
-
(!r ||
|
|
2575
|
-
}, Na = function() {
|
|
2576
|
-
!Oa && K && z(K, "display", "none");
|
|
2543
|
+
(!r || ui(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;
|
|
2577
2544
|
}, Pa = function() {
|
|
2578
|
-
!
|
|
2545
|
+
!ka && K && z(K, "display", "none");
|
|
2546
|
+
}, Fa = function() {
|
|
2547
|
+
!ka && K && z(K, "display", "");
|
|
2579
2548
|
};
|
|
2580
|
-
|
|
2581
|
-
if (
|
|
2549
|
+
Ta && !Si && document.addEventListener("click", function(e) {
|
|
2550
|
+
if (ca) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), ca = !1, !1;
|
|
2582
2551
|
}, !0);
|
|
2583
|
-
var
|
|
2552
|
+
var Ia = function(e) {
|
|
2584
2553
|
if (W) {
|
|
2585
2554
|
e = e.touches ? e.touches[0] : e;
|
|
2586
|
-
var t =
|
|
2555
|
+
var t = Ma(e.clientX, e.clientY);
|
|
2587
2556
|
if (t) {
|
|
2588
2557
|
var n = {};
|
|
2589
2558
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2590
2559
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[V]._onDragOver(n);
|
|
2591
2560
|
}
|
|
2592
2561
|
}
|
|
2593
|
-
},
|
|
2562
|
+
}, La = function(e) {
|
|
2594
2563
|
W && W.parentNode[V]._isOutsideThisEl(e.target);
|
|
2595
2564
|
};
|
|
2596
2565
|
function Q(e, t) {
|
|
2597
2566
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2598
|
-
this.el = e, this.options = t =
|
|
2567
|
+
this.el = e, this.options = t = fi({}, t), e[V] = this;
|
|
2599
2568
|
var n = {
|
|
2600
2569
|
group: null,
|
|
2601
2570
|
sort: !0,
|
|
@@ -2608,7 +2577,7 @@ function Q(e, t) {
|
|
|
2608
2577
|
invertedSwapThreshold: null,
|
|
2609
2578
|
removeCloneOnHide: !0,
|
|
2610
2579
|
direction: function() {
|
|
2611
|
-
return
|
|
2580
|
+
return Aa(e, this.options);
|
|
2612
2581
|
},
|
|
2613
2582
|
ghostClass: "sortable-ghost",
|
|
2614
2583
|
chosenClass: "sortable-chosen",
|
|
@@ -2635,17 +2604,17 @@ function Q(e, t) {
|
|
|
2635
2604
|
x: 0,
|
|
2636
2605
|
y: 0
|
|
2637
2606
|
},
|
|
2638
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2607
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !bi,
|
|
2639
2608
|
emptyInsertThreshold: 5
|
|
2640
2609
|
};
|
|
2641
|
-
for (var r in
|
|
2642
|
-
for (var i in
|
|
2643
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
2610
|
+
for (var r in Zi.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2611
|
+
for (var i in Na(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2612
|
+
this.nativeDraggable = t.forceFallback ? !1 : Oa, 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)), la.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), fi(this, Ki());
|
|
2644
2613
|
}
|
|
2645
2614
|
Q.prototype = {
|
|
2646
2615
|
constructor: Q,
|
|
2647
2616
|
_isOutsideThisEl: function(e) {
|
|
2648
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2617
|
+
!this.el.contains(e) && e !== this.el && (_a = null);
|
|
2649
2618
|
},
|
|
2650
2619
|
_getDirection: function(e, t) {
|
|
2651
2620
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, W) : this.options.direction;
|
|
@@ -2653,8 +2622,8 @@ Q.prototype = {
|
|
|
2653
2622
|
_onTapStart: function(e) {
|
|
2654
2623
|
if (e.cancelable) {
|
|
2655
2624
|
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;
|
|
2656
|
-
if (
|
|
2657
|
-
if (
|
|
2625
|
+
if (qa(n), !W && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && bi && s && s.tagName.toUpperCase() === "SELECT") && (s = Ei(s, r.draggable, n, !1), !(s && s.animated) && ta !== s)) {
|
|
2626
|
+
if (ra = Pi(s), ia = Pi(s, r.draggable), typeof l == "function") {
|
|
2658
2627
|
if (l.call(this, e, s, this)) {
|
|
2659
2628
|
U({
|
|
2660
2629
|
sortable: t,
|
|
@@ -2667,7 +2636,7 @@ Q.prototype = {
|
|
|
2667
2636
|
return;
|
|
2668
2637
|
}
|
|
2669
2638
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2670
|
-
if (r =
|
|
2639
|
+
if (r = Ei(c, r.trim(), n, !1), r) return U({
|
|
2671
2640
|
sortable: t,
|
|
2672
2641
|
rootEl: r,
|
|
2673
2642
|
name: "filter",
|
|
@@ -2679,7 +2648,7 @@ Q.prototype = {
|
|
|
2679
2648
|
i && e.cancelable && e.preventDefault();
|
|
2680
2649
|
return;
|
|
2681
2650
|
}
|
|
2682
|
-
r.handle && !
|
|
2651
|
+
r.handle && !Ei(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2683
2652
|
}
|
|
2684
2653
|
}
|
|
2685
2654
|
},
|
|
@@ -2687,23 +2656,23 @@ Q.prototype = {
|
|
|
2687
2656
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2688
2657
|
if (n && !W && n.parentNode === i) {
|
|
2689
2658
|
var c = B(n);
|
|
2690
|
-
if (q = i, W = n, G = W.parentNode,
|
|
2659
|
+
if (q = i, W = n, G = W.parentNode, ea = W.nextSibling, ta = n, oa = a.group, Q.dragged = W, ua = {
|
|
2691
2660
|
target: W,
|
|
2692
2661
|
clientX: (t || e).clientX,
|
|
2693
2662
|
clientY: (t || e).clientY
|
|
2694
|
-
},
|
|
2663
|
+
}, ma = ua.clientX - c.left, ha = ua.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, W.style["will-change"] = "all", s = function() {
|
|
2695
2664
|
if (H("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2696
2665
|
r._onDrop();
|
|
2697
2666
|
return;
|
|
2698
2667
|
}
|
|
2699
|
-
r._disableDelayedDragEvents(), !
|
|
2668
|
+
r._disableDelayedDragEvents(), !yi && r.nativeDraggable && (W.draggable = !0), r._triggerDragStart(e, t), U({
|
|
2700
2669
|
sortable: r,
|
|
2701
2670
|
name: "choose",
|
|
2702
2671
|
originalEvent: e
|
|
2703
2672
|
}), R(W, a.chosenClass, !0);
|
|
2704
2673
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2705
|
-
|
|
2706
|
-
}), I(o, "dragover",
|
|
2674
|
+
ki(W, e.trim(), Ba);
|
|
2675
|
+
}), I(o, "dragover", Ia), I(o, "mousemove", Ia), I(o, "touchmove", Ia), I(o, "mouseup", r._onDrop), I(o, "touchend", r._onDrop), I(o, "touchcancel", r._onDrop), yi && this.nativeDraggable && (this.options.touchStartThreshold = 4, W.draggable = !0), H("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(vi || _i))) {
|
|
2707
2676
|
if (Q.eventCanceled) {
|
|
2708
2677
|
this._onDrop();
|
|
2709
2678
|
return;
|
|
@@ -2717,7 +2686,7 @@ Q.prototype = {
|
|
|
2717
2686
|
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();
|
|
2718
2687
|
},
|
|
2719
2688
|
_disableDelayedDrag: function() {
|
|
2720
|
-
W &&
|
|
2689
|
+
W && Ba(W), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2721
2690
|
},
|
|
2722
2691
|
_disableDelayedDragEvents: function() {
|
|
2723
2692
|
var e = this.el.ownerDocument;
|
|
@@ -2726,14 +2695,14 @@ Q.prototype = {
|
|
|
2726
2695
|
_triggerDragStart: function(e, t) {
|
|
2727
2696
|
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));
|
|
2728
2697
|
try {
|
|
2729
|
-
document.selection ?
|
|
2698
|
+
document.selection ? Ja(function() {
|
|
2730
2699
|
document.selection.empty();
|
|
2731
2700
|
}) : window.getSelection().removeAllRanges();
|
|
2732
2701
|
} catch {}
|
|
2733
2702
|
},
|
|
2734
2703
|
_dragStarted: function(e, t) {
|
|
2735
|
-
if (
|
|
2736
|
-
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover",
|
|
2704
|
+
if (sa = !1, q && W) {
|
|
2705
|
+
H("dragStarted", this, { evt: t }), this.nativeDraggable && I(document, "dragover", La);
|
|
2737
2706
|
var n = this.options;
|
|
2738
2707
|
!e && R(W, n.dragClass, !1), R(W, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), U({
|
|
2739
2708
|
sortable: this,
|
|
@@ -2743,33 +2712,33 @@ Q.prototype = {
|
|
|
2743
2712
|
} else this._nulling();
|
|
2744
2713
|
},
|
|
2745
2714
|
_emulateDragOver: function() {
|
|
2746
|
-
if (
|
|
2747
|
-
this._lastX =
|
|
2748
|
-
for (var e = document.elementFromPoint(
|
|
2715
|
+
if (da) {
|
|
2716
|
+
this._lastX = da.clientX, this._lastY = da.clientY, Pa();
|
|
2717
|
+
for (var e = document.elementFromPoint(da.clientX, da.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(da.clientX, da.clientY), e !== t);) t = e;
|
|
2749
2718
|
if (W.parentNode[V]._isOutsideThisEl(e), t) do {
|
|
2750
2719
|
if (t[V]) {
|
|
2751
2720
|
var n = void 0;
|
|
2752
2721
|
if (n = t[V]._onDragOver({
|
|
2753
|
-
clientX:
|
|
2754
|
-
clientY:
|
|
2722
|
+
clientX: da.clientX,
|
|
2723
|
+
clientY: da.clientY,
|
|
2755
2724
|
target: e,
|
|
2756
2725
|
rootEl: t
|
|
2757
2726
|
}), n && !this.options.dragoverBubble) break;
|
|
2758
2727
|
}
|
|
2759
2728
|
e = t;
|
|
2760
2729
|
} while (t = t.parentNode);
|
|
2761
|
-
|
|
2730
|
+
Fa();
|
|
2762
2731
|
}
|
|
2763
2732
|
},
|
|
2764
2733
|
_onTouchMove: function(e) {
|
|
2765
|
-
if (
|
|
2766
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K &&
|
|
2767
|
-
if (!Q.active && !
|
|
2734
|
+
if (ua) {
|
|
2735
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = K && Oi(K, !0), o = K && a && a.a, s = K && a && a.d, c = Ea && Z && Fi(Z), l = (i.clientX - ua.clientX + r.x) / (o || 1) + (c ? c[0] - Sa[0] : 0) / (o || 1), u = (i.clientY - ua.clientY + r.y) / (s || 1) + (c ? c[1] - Sa[1] : 0) / (s || 1);
|
|
2736
|
+
if (!Q.active && !sa) {
|
|
2768
2737
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2769
2738
|
this._onDragStart(e, !0);
|
|
2770
2739
|
}
|
|
2771
2740
|
if (K) {
|
|
2772
|
-
a ? (a.e += l - (
|
|
2741
|
+
a ? (a.e += l - (fa || 0), a.f += u - (pa || 0)) : a = {
|
|
2773
2742
|
a: 1,
|
|
2774
2743
|
b: 0,
|
|
2775
2744
|
c: 0,
|
|
@@ -2778,19 +2747,19 @@ Q.prototype = {
|
|
|
2778
2747
|
f: u
|
|
2779
2748
|
};
|
|
2780
2749
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2781
|
-
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d),
|
|
2750
|
+
z(K, "webkitTransform", d), z(K, "mozTransform", d), z(K, "msTransform", d), z(K, "transform", d), fa = l, pa = u, da = i;
|
|
2782
2751
|
}
|
|
2783
2752
|
e.cancelable && e.preventDefault();
|
|
2784
2753
|
}
|
|
2785
2754
|
},
|
|
2786
2755
|
_appendGhost: function() {
|
|
2787
2756
|
if (!K) {
|
|
2788
|
-
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0,
|
|
2789
|
-
if (
|
|
2757
|
+
var e = this.options.fallbackOnBody ? document.body : q, t = B(W, !0, Ea, !0, e), n = this.options;
|
|
2758
|
+
if (Ea) {
|
|
2790
2759
|
for (Z = e; z(Z, "position") === "static" && z(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2791
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2760
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Ai()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Ai(), Sa = Fi(Z);
|
|
2792
2761
|
}
|
|
2793
|
-
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",
|
|
2762
|
+
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", Ea ? "absolute" : "fixed"), z(K, "zIndex", "100000"), z(K, "pointerEvents", "none"), Q.ghost = K, e.appendChild(K), z(K, "transform-origin", ma / parseInt(K.style.width) * 100 + "% " + ha / parseInt(K.style.height) * 100 + "%");
|
|
2794
2763
|
}
|
|
2795
2764
|
},
|
|
2796
2765
|
_onDragStart: function(e, t) {
|
|
@@ -2799,18 +2768,18 @@ Q.prototype = {
|
|
|
2799
2768
|
this._onDrop();
|
|
2800
2769
|
return;
|
|
2801
2770
|
}
|
|
2802
|
-
H("setupClone", this), Q.eventCanceled || (J =
|
|
2771
|
+
H("setupClone", this), Q.eventCanceled || (J = Wi(W), J.removeAttribute("id"), J.draggable = !1, J.style["will-change"] = "", this._hideClone(), R(J, this.options.chosenClass, !1), Q.clone = J), n.cloneId = Ja(function() {
|
|
2803
2772
|
H("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || q.insertBefore(J, W), n._hideClone(), U({
|
|
2804
2773
|
sortable: n,
|
|
2805
2774
|
name: "clone"
|
|
2806
2775
|
}));
|
|
2807
|
-
}), !t && R(W, i.dragClass, !0), t ? (
|
|
2776
|
+
}), !t && R(W, i.dragClass, !0), t ? (ca = !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)")), sa = !0, n._dragStartId = Ja(n._dragStarted.bind(n, t, e)), I(document, "selectstart", n), ga = !0, bi && z(document.body, "user-select", "none");
|
|
2808
2777
|
},
|
|
2809
2778
|
_onDragOver: function(e) {
|
|
2810
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2811
|
-
if (
|
|
2779
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = oa === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2780
|
+
if (Ca) return;
|
|
2812
2781
|
function h(o, s) {
|
|
2813
|
-
H(o, p,
|
|
2782
|
+
H(o, p, li({
|
|
2814
2783
|
evt: e,
|
|
2815
2784
|
isOwner: l,
|
|
2816
2785
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2822,7 +2791,7 @@ Q.prototype = {
|
|
|
2822
2791
|
target: n,
|
|
2823
2792
|
completed: _,
|
|
2824
2793
|
onMove: function(n, i) {
|
|
2825
|
-
return
|
|
2794
|
+
return za(q, t, W, r, n, B(n), e, i);
|
|
2826
2795
|
},
|
|
2827
2796
|
changed: v
|
|
2828
2797
|
}, s));
|
|
@@ -2833,48 +2802,48 @@ Q.prototype = {
|
|
|
2833
2802
|
function _(r) {
|
|
2834
2803
|
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() {
|
|
2835
2804
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2836
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (
|
|
2805
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === W && !W.animated || n === t && !n.animated) && (_a = null), !o.dragoverBubble && !e.rootEl && n !== document && (W.parentNode[V]._isOutsideThisEl(e.target), !r && Ia(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2837
2806
|
}
|
|
2838
2807
|
function v() {
|
|
2839
|
-
Y =
|
|
2808
|
+
Y = Pi(W), aa = Pi(W, o.draggable), U({
|
|
2840
2809
|
sortable: p,
|
|
2841
2810
|
name: "change",
|
|
2842
2811
|
toEl: t,
|
|
2843
2812
|
newIndex: Y,
|
|
2844
|
-
newDraggableIndex:
|
|
2813
|
+
newDraggableIndex: aa,
|
|
2845
2814
|
originalEvent: e
|
|
2846
2815
|
});
|
|
2847
2816
|
}
|
|
2848
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2817
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ei(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2849
2818
|
if (W.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2850
|
-
if (
|
|
2819
|
+
if (ca = !1, c && !o.disabled && (l ? u || (a = G !== q) : X === this || (this.lastPutMode = oa.checkPull(this, c, W, e)) && s.checkPut(this, c, W, e))) {
|
|
2851
2820
|
if (f = this._getDirection(e, n) === "vertical", r = B(W), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2852
|
-
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
2853
|
-
var y =
|
|
2854
|
-
if (!y ||
|
|
2821
|
+
if (a) return G = q, g(), this._hideClone(), h("revert"), Q.eventCanceled || (ea ? q.insertBefore(W, ea) : q.appendChild(W)), _(!0);
|
|
2822
|
+
var y = Ni(t, o.draggable);
|
|
2823
|
+
if (!y || Ua(e, f, this) && !y.animated) {
|
|
2855
2824
|
if (y === W) return _(!1);
|
|
2856
|
-
if (y && t === e.target && (n = y), n && (i = B(n)),
|
|
2857
|
-
} else if (y &&
|
|
2858
|
-
var b =
|
|
2825
|
+
if (y && t === e.target && (n = y), n && (i = B(n)), za(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);
|
|
2826
|
+
} else if (y && Ha(e, f, this)) {
|
|
2827
|
+
var b = Mi(t, 0, o, !0);
|
|
2859
2828
|
if (b === W) return _(!1);
|
|
2860
|
-
if (n = b, i = B(n),
|
|
2829
|
+
if (n = b, i = B(n), za(q, t, W, r, n, i, e, !1) !== !1) return g(), t.insertBefore(W, b), G = t, v(), _(!0);
|
|
2861
2830
|
} else if (n.parentNode === t) {
|
|
2862
2831
|
i = B(n);
|
|
2863
|
-
var x = 0, S, C = W.parentNode !== t, w = !
|
|
2864
|
-
|
|
2832
|
+
var x = 0, S, C = W.parentNode !== t, w = !ja(W.animated && W.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ji(n, "top", "top") || ji(W, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
2833
|
+
_a !== n && (S = i[T], ya = !1, ba = !w && o.invertSwap || C), x = Wa(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, ba, _a === n);
|
|
2865
2834
|
var D;
|
|
2866
2835
|
if (x !== 0) {
|
|
2867
|
-
var O =
|
|
2836
|
+
var O = Pi(W);
|
|
2868
2837
|
do
|
|
2869
2838
|
O -= x, D = G.children[O];
|
|
2870
2839
|
while (D && (z(D, "display") === "none" || D === K));
|
|
2871
2840
|
}
|
|
2872
2841
|
if (x === 0 || D === n) return _(!1);
|
|
2873
|
-
|
|
2842
|
+
_a = n, va = x;
|
|
2874
2843
|
var k = n.nextElementSibling, te = !1;
|
|
2875
2844
|
te = x === 1;
|
|
2876
|
-
var A =
|
|
2877
|
-
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1),
|
|
2845
|
+
var A = za(q, t, W, r, n, i, e, te);
|
|
2846
|
+
if (A !== !1) return (A === 1 || A === -1) && (te = A === 1), Ca = !0, setTimeout(Va, 30), g(), te && !k ? t.appendChild(W) : n.parentNode.insertBefore(W, te ? k : n), E && Ui(E, 0, ee - E.scrollTop), G = W.parentNode, S !== void 0 && !ba && (xa = Math.abs(S - B(n)[T])), v(), _(!0);
|
|
2878
2847
|
}
|
|
2879
2848
|
if (t.contains(W)) return _(!1);
|
|
2880
2849
|
}
|
|
@@ -2882,7 +2851,7 @@ Q.prototype = {
|
|
|
2882
2851
|
},
|
|
2883
2852
|
_ignoreWhileAnimating: null,
|
|
2884
2853
|
_offMoveEvents: function() {
|
|
2885
|
-
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover",
|
|
2854
|
+
L(document, "mousemove", this._onTouchMove), L(document, "touchmove", this._onTouchMove), L(document, "pointermove", this._onTouchMove), L(document, "dragover", Ia), L(document, "mousemove", Ia), L(document, "touchmove", Ia);
|
|
2886
2855
|
},
|
|
2887
2856
|
_offUpEvents: function() {
|
|
2888
2857
|
var e = this.el.ownerDocument;
|
|
@@ -2890,18 +2859,18 @@ Q.prototype = {
|
|
|
2890
2859
|
},
|
|
2891
2860
|
_onDrop: function(e) {
|
|
2892
2861
|
var t = this.el, n = this.options;
|
|
2893
|
-
if (Y =
|
|
2862
|
+
if (Y = Pi(W), aa = Pi(W, n.draggable), H("drop", this, { evt: e }), G = W && W.parentNode, Y = Pi(W), aa = Pi(W, n.draggable), Q.eventCanceled) {
|
|
2894
2863
|
this._nulling();
|
|
2895
2864
|
return;
|
|
2896
2865
|
}
|
|
2897
|
-
|
|
2866
|
+
sa = !1, ba = !1, ya = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ya(this.cloneId), Ya(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), bi && z(document.body, "user-select", ""), z(W, "transform", ""), e && (ga && (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), Ba(W), W.style["will-change"] = "", ga && !sa && R(W, X ? X.options.ghostClass : this.options.ghostClass, !1), R(W, this.options.chosenClass, !1), U({
|
|
2898
2867
|
sortable: this,
|
|
2899
2868
|
name: "unchoose",
|
|
2900
2869
|
toEl: G,
|
|
2901
2870
|
newIndex: null,
|
|
2902
2871
|
newDraggableIndex: null,
|
|
2903
2872
|
originalEvent: e
|
|
2904
|
-
}), q === G ? Y !==
|
|
2873
|
+
}), q === G ? Y !== ra && Y >= 0 && (U({
|
|
2905
2874
|
sortable: this,
|
|
2906
2875
|
name: "update",
|
|
2907
2876
|
toEl: G,
|
|
@@ -2933,7 +2902,7 @@ Q.prototype = {
|
|
|
2933
2902
|
name: "sort",
|
|
2934
2903
|
toEl: G,
|
|
2935
2904
|
originalEvent: e
|
|
2936
|
-
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y =
|
|
2905
|
+
})), X && X.save()), Q.active && ((Y == null || Y === -1) && (Y = ra, aa = ia), U({
|
|
2937
2906
|
sortable: this,
|
|
2938
2907
|
name: "end",
|
|
2939
2908
|
toEl: G,
|
|
@@ -2941,9 +2910,9 @@ Q.prototype = {
|
|
|
2941
2910
|
}), this.save()))), this._nulling();
|
|
2942
2911
|
},
|
|
2943
2912
|
_nulling: function() {
|
|
2944
|
-
H("nulling", this), q = W = G = K =
|
|
2913
|
+
H("nulling", this), q = W = G = K = ea = J = ta = na = ua = da = ga = Y = aa = ra = ia = _a = va = X = oa = Q.dragged = Q.ghost = Q.clone = Q.active = null, wa.forEach(function(e) {
|
|
2945
2914
|
e.checked = !0;
|
|
2946
|
-
}),
|
|
2915
|
+
}), wa.length = fa = pa = 0;
|
|
2947
2916
|
},
|
|
2948
2917
|
handleEvent: function(e) {
|
|
2949
2918
|
switch (e.type) {
|
|
@@ -2953,7 +2922,7 @@ Q.prototype = {
|
|
|
2953
2922
|
break;
|
|
2954
2923
|
case "dragenter":
|
|
2955
2924
|
case "dragover":
|
|
2956
|
-
W && (this._onDragOver(e),
|
|
2925
|
+
W && (this._onDragOver(e), Ra(e));
|
|
2957
2926
|
break;
|
|
2958
2927
|
case "selectstart":
|
|
2959
2928
|
e.preventDefault();
|
|
@@ -2961,14 +2930,14 @@ Q.prototype = {
|
|
|
2961
2930
|
}
|
|
2962
2931
|
},
|
|
2963
2932
|
toArray: function() {
|
|
2964
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
2933
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ei(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ka(t));
|
|
2965
2934
|
return e;
|
|
2966
2935
|
},
|
|
2967
2936
|
sort: function(e, t) {
|
|
2968
2937
|
var n = {}, r = this.el;
|
|
2969
2938
|
this.toArray().forEach(function(e, t) {
|
|
2970
2939
|
var i = r.children[t];
|
|
2971
|
-
|
|
2940
|
+
Ei(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2972
2941
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2973
2942
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2974
2943
|
}), t && this.animateAll();
|
|
@@ -2978,25 +2947,25 @@ Q.prototype = {
|
|
|
2978
2947
|
e && e.set && e.set(this);
|
|
2979
2948
|
},
|
|
2980
2949
|
closest: function(e, t) {
|
|
2981
|
-
return
|
|
2950
|
+
return Ei(e, t || this.options.draggable, this.el, !1);
|
|
2982
2951
|
},
|
|
2983
2952
|
option: function(e, t) {
|
|
2984
2953
|
var n = this.options;
|
|
2985
2954
|
if (t === void 0) return n[e];
|
|
2986
|
-
var r =
|
|
2987
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
2955
|
+
var r = Zi.modifyOption(this, e, t);
|
|
2956
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && Na(n);
|
|
2988
2957
|
},
|
|
2989
2958
|
destroy: function() {
|
|
2990
2959
|
H("destroy", this);
|
|
2991
2960
|
var e = this.el;
|
|
2992
2961
|
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) {
|
|
2993
2962
|
e.removeAttribute("draggable");
|
|
2994
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
2963
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), la.splice(la.indexOf(this.el), 1), this.el = e = null;
|
|
2995
2964
|
},
|
|
2996
2965
|
_hideClone: function() {
|
|
2997
|
-
if (!
|
|
2966
|
+
if (!na) {
|
|
2998
2967
|
if (H("hideClone", this), Q.eventCanceled) return;
|
|
2999
|
-
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J),
|
|
2968
|
+
z(J, "display", "none"), this.options.removeCloneOnHide && J.parentNode && J.parentNode.removeChild(J), na = !0;
|
|
3000
2969
|
}
|
|
3001
2970
|
},
|
|
3002
2971
|
_showClone: function(e) {
|
|
@@ -3004,99 +2973,99 @@ Q.prototype = {
|
|
|
3004
2973
|
this._hideClone();
|
|
3005
2974
|
return;
|
|
3006
2975
|
}
|
|
3007
|
-
if (
|
|
2976
|
+
if (na) {
|
|
3008
2977
|
if (H("showClone", this), Q.eventCanceled) return;
|
|
3009
|
-
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) :
|
|
2978
|
+
W.parentNode == q && !this.options.group.revertClone ? q.insertBefore(J, W) : ea ? q.insertBefore(J, ea) : q.appendChild(J), this.options.group.revertClone && this.animate(W, J), z(J, "display", ""), na = !1;
|
|
3010
2979
|
}
|
|
3011
2980
|
}
|
|
3012
2981
|
};
|
|
3013
|
-
function
|
|
2982
|
+
function Ra(e) {
|
|
3014
2983
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3015
2984
|
}
|
|
3016
|
-
function
|
|
2985
|
+
function za(e, t, n, r, i, a, o, s) {
|
|
3017
2986
|
var c, l = e[V], u = l.options.onMove, d;
|
|
3018
|
-
return window.CustomEvent && !
|
|
2987
|
+
return window.CustomEvent && !_i && !vi ? c = new CustomEvent("move", {
|
|
3019
2988
|
bubbles: !0,
|
|
3020
2989
|
cancelable: !0
|
|
3021
2990
|
}) : (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;
|
|
3022
2991
|
}
|
|
3023
|
-
function
|
|
2992
|
+
function Ba(e) {
|
|
3024
2993
|
e.draggable = !1;
|
|
3025
2994
|
}
|
|
3026
|
-
function
|
|
3027
|
-
|
|
2995
|
+
function Va() {
|
|
2996
|
+
Ca = !1;
|
|
3028
2997
|
}
|
|
3029
|
-
function
|
|
3030
|
-
var r = B(
|
|
2998
|
+
function Ha(e, t, n) {
|
|
2999
|
+
var r = B(Mi(n.el, 0, n.options, !0)), i = Gi(n.el, n.options, K), a = 10;
|
|
3031
3000
|
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;
|
|
3032
3001
|
}
|
|
3033
|
-
function
|
|
3034
|
-
var r = B(
|
|
3002
|
+
function Ua(e, t, n) {
|
|
3003
|
+
var r = B(Ni(n.el, n.options.draggable)), i = Gi(n.el, n.options, K), a = 10;
|
|
3035
3004
|
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;
|
|
3036
3005
|
}
|
|
3037
|
-
function
|
|
3006
|
+
function Wa(e, t, n, r, i, a, o, s) {
|
|
3038
3007
|
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;
|
|
3039
3008
|
if (!o) {
|
|
3040
|
-
if (s &&
|
|
3041
|
-
if (!
|
|
3042
|
-
else if (
|
|
3043
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3009
|
+
if (s && xa < l * i) {
|
|
3010
|
+
if (!ya && (va === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (ya = !0), ya) f = !0;
|
|
3011
|
+
else if (va === 1 ? c < u + xa : c > d - xa) return -va;
|
|
3012
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Ga(t);
|
|
3044
3013
|
}
|
|
3045
3014
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3046
3015
|
}
|
|
3047
|
-
function Wa(e) {
|
|
3048
|
-
return Ni(W) < Ni(e) ? 1 : -1;
|
|
3049
|
-
}
|
|
3050
3016
|
function Ga(e) {
|
|
3017
|
+
return Pi(W) < Pi(e) ? 1 : -1;
|
|
3018
|
+
}
|
|
3019
|
+
function Ka(e) {
|
|
3051
3020
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3052
3021
|
return r.toString(36);
|
|
3053
3022
|
}
|
|
3054
|
-
function
|
|
3055
|
-
|
|
3023
|
+
function qa(e) {
|
|
3024
|
+
wa.length = 0;
|
|
3056
3025
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3057
3026
|
var r = t[n];
|
|
3058
|
-
r.checked &&
|
|
3027
|
+
r.checked && wa.push(r);
|
|
3059
3028
|
}
|
|
3060
3029
|
}
|
|
3061
|
-
function
|
|
3030
|
+
function Ja(e) {
|
|
3062
3031
|
return setTimeout(e, 0);
|
|
3063
3032
|
}
|
|
3064
|
-
function
|
|
3033
|
+
function Ya(e) {
|
|
3065
3034
|
return clearTimeout(e);
|
|
3066
3035
|
}
|
|
3067
|
-
|
|
3068
|
-
(Q.active ||
|
|
3036
|
+
Ta && I(document, "touchmove", function(e) {
|
|
3037
|
+
(Q.active || sa) && e.cancelable && e.preventDefault();
|
|
3069
3038
|
}), Q.utils = {
|
|
3070
3039
|
on: I,
|
|
3071
3040
|
off: L,
|
|
3072
3041
|
css: z,
|
|
3073
|
-
find:
|
|
3042
|
+
find: ki,
|
|
3074
3043
|
is: function(e, t) {
|
|
3075
|
-
return !!
|
|
3044
|
+
return !!Ei(e, t, e, !1);
|
|
3076
3045
|
},
|
|
3077
|
-
extend:
|
|
3078
|
-
throttle:
|
|
3079
|
-
closest:
|
|
3046
|
+
extend: Ri,
|
|
3047
|
+
throttle: Vi,
|
|
3048
|
+
closest: Ei,
|
|
3080
3049
|
toggleClass: R,
|
|
3081
|
-
clone:
|
|
3082
|
-
index:
|
|
3083
|
-
nextTick:
|
|
3084
|
-
cancelNextTick:
|
|
3085
|
-
detectDirection:
|
|
3086
|
-
getChild:
|
|
3050
|
+
clone: Wi,
|
|
3051
|
+
index: Pi,
|
|
3052
|
+
nextTick: Ja,
|
|
3053
|
+
cancelNextTick: Ya,
|
|
3054
|
+
detectDirection: Aa,
|
|
3055
|
+
getChild: Mi
|
|
3087
3056
|
}, Q.get = function(e) {
|
|
3088
3057
|
return e[V];
|
|
3089
3058
|
}, Q.mount = function() {
|
|
3090
3059
|
var e = [...arguments];
|
|
3091
3060
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3092
3061
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3093
|
-
e.utils && (Q.utils =
|
|
3062
|
+
e.utils && (Q.utils = li(li({}, Q.utils), e.utils)), Zi.mount(e);
|
|
3094
3063
|
});
|
|
3095
3064
|
}, Q.create = function(e, t) {
|
|
3096
3065
|
return new Q(e, t);
|
|
3097
|
-
}, Q.version =
|
|
3098
|
-
var $ = [],
|
|
3099
|
-
function
|
|
3066
|
+
}, Q.version = hi;
|
|
3067
|
+
var $ = [], Xa, Za, Qa = !1, $a, eo, to, no;
|
|
3068
|
+
function ro() {
|
|
3100
3069
|
function e() {
|
|
3101
3070
|
for (var e in this.defaults = {
|
|
3102
3071
|
scroll: !0,
|
|
@@ -3116,63 +3085,63 @@ function no() {
|
|
|
3116
3085
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3117
3086
|
},
|
|
3118
3087
|
drop: function() {
|
|
3119
|
-
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3088
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), ao(), io(), Hi();
|
|
3120
3089
|
},
|
|
3121
3090
|
nulling: function() {
|
|
3122
|
-
|
|
3091
|
+
to = Za = Xa = Qa = no = $a = eo = null, $.length = 0;
|
|
3123
3092
|
},
|
|
3124
3093
|
_handleFallbackAutoScroll: function(e) {
|
|
3125
3094
|
this._handleAutoScroll(e, !0);
|
|
3126
3095
|
},
|
|
3127
3096
|
_handleAutoScroll: function(e, t) {
|
|
3128
3097
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3129
|
-
if (
|
|
3130
|
-
|
|
3131
|
-
var o =
|
|
3132
|
-
|
|
3133
|
-
var a =
|
|
3134
|
-
a !== o && (o = a,
|
|
3135
|
-
}, 10),
|
|
3098
|
+
if (to = e, t || this.options.forceAutoScrollFallback || vi || _i || bi) {
|
|
3099
|
+
oo(e, this.options, a, t);
|
|
3100
|
+
var o = Li(a, !0);
|
|
3101
|
+
Qa && (!no || r !== $a || i !== eo) && (no && ao(), no = setInterval(function() {
|
|
3102
|
+
var a = Li(document.elementFromPoint(r, i), !0);
|
|
3103
|
+
a !== o && (o = a, io()), oo(e, n.options, a, t);
|
|
3104
|
+
}, 10), $a = r, eo = i);
|
|
3136
3105
|
} else {
|
|
3137
|
-
if (!this.options.bubbleScroll ||
|
|
3138
|
-
|
|
3106
|
+
if (!this.options.bubbleScroll || Li(a, !0) === Ai()) {
|
|
3107
|
+
io();
|
|
3139
3108
|
return;
|
|
3140
3109
|
}
|
|
3141
|
-
|
|
3110
|
+
oo(e, this.options, Li(a, !1), !1);
|
|
3142
3111
|
}
|
|
3143
3112
|
}
|
|
3144
|
-
},
|
|
3113
|
+
}, fi(e, {
|
|
3145
3114
|
pluginName: "scroll",
|
|
3146
3115
|
initializeByDefault: !0
|
|
3147
3116
|
});
|
|
3148
3117
|
}
|
|
3149
|
-
function
|
|
3118
|
+
function io() {
|
|
3150
3119
|
$.forEach(function(e) {
|
|
3151
3120
|
clearInterval(e.pid);
|
|
3152
3121
|
}), $ = [];
|
|
3153
3122
|
}
|
|
3154
|
-
function
|
|
3155
|
-
clearInterval(
|
|
3123
|
+
function ao() {
|
|
3124
|
+
clearInterval(no);
|
|
3156
3125
|
}
|
|
3157
|
-
var
|
|
3126
|
+
var oo = Vi(function(e, t, n, r) {
|
|
3158
3127
|
if (t.scroll) {
|
|
3159
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3160
|
-
|
|
3161
|
-
var d = 0, f =
|
|
3128
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Ai(), l = !1, u;
|
|
3129
|
+
Za !== n && (Za = n, io(), Xa = t.scroll, u = t.scrollFn, Xa === !0 && (Xa = Li(n, !0)));
|
|
3130
|
+
var d = 0, f = Xa;
|
|
3162
3131
|
do {
|
|
3163
3132
|
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;
|
|
3164
3133
|
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"));
|
|
3165
3134
|
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);
|
|
3166
3135
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3167
3136
|
($[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() {
|
|
3168
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3137
|
+
r && this.layer === 0 && Q.active._onTouchMove(to);
|
|
3169
3138
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3170
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e,
|
|
3139
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[V], n, t, e, to, $[this.layer].el) !== "continue" || Ui($[this.layer].el, n, t);
|
|
3171
3140
|
}.bind({ layer: d }), 24))), d++;
|
|
3172
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3173
|
-
|
|
3141
|
+
} while (t.bubbleScroll && f !== c && (f = Li(f, !1)));
|
|
3142
|
+
Qa = l;
|
|
3174
3143
|
}
|
|
3175
|
-
}, 30),
|
|
3144
|
+
}, 30), so = function(e) {
|
|
3176
3145
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3177
3146
|
if (t) {
|
|
3178
3147
|
var c = n || i;
|
|
@@ -3184,8 +3153,8 @@ var ao = Bi(function(e, t, n, r) {
|
|
|
3184
3153
|
}));
|
|
3185
3154
|
}
|
|
3186
3155
|
};
|
|
3187
|
-
function
|
|
3188
|
-
|
|
3156
|
+
function co() {}
|
|
3157
|
+
co.prototype = {
|
|
3189
3158
|
startIndex: null,
|
|
3190
3159
|
dragStart: function(e) {
|
|
3191
3160
|
var t = e.oldDraggableIndex;
|
|
@@ -3194,72 +3163,72 @@ so.prototype = {
|
|
|
3194
3163
|
onSpill: function(e) {
|
|
3195
3164
|
var t = e.dragEl, n = e.putSortable;
|
|
3196
3165
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3197
|
-
var r =
|
|
3166
|
+
var r = Mi(this.sortable.el, this.startIndex, this.options);
|
|
3198
3167
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3199
3168
|
},
|
|
3200
|
-
drop:
|
|
3201
|
-
},
|
|
3202
|
-
function
|
|
3203
|
-
|
|
3169
|
+
drop: so
|
|
3170
|
+
}, fi(co, { pluginName: "revertOnSpill" });
|
|
3171
|
+
function lo() {}
|
|
3172
|
+
lo.prototype = {
|
|
3204
3173
|
onSpill: function(e) {
|
|
3205
3174
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3206
3175
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3207
3176
|
},
|
|
3208
|
-
drop:
|
|
3209
|
-
},
|
|
3210
|
-
function
|
|
3177
|
+
drop: so
|
|
3178
|
+
}, fi(lo, { pluginName: "removeOnSpill" }), Q.mount(new ro()), Q.mount(lo, co);
|
|
3179
|
+
function uo(e) {
|
|
3211
3180
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3212
3181
|
}
|
|
3213
|
-
function
|
|
3182
|
+
function fo(e) {
|
|
3214
3183
|
ae() && ee(e);
|
|
3215
3184
|
}
|
|
3216
|
-
function
|
|
3185
|
+
function po(e) {
|
|
3217
3186
|
ae() ? u(e) : r(e);
|
|
3218
3187
|
}
|
|
3219
|
-
var
|
|
3220
|
-
function
|
|
3221
|
-
|
|
3188
|
+
var mo = null, ho = null;
|
|
3189
|
+
function go(e = null, t = null) {
|
|
3190
|
+
mo = e, ho = t;
|
|
3222
3191
|
}
|
|
3223
|
-
function
|
|
3192
|
+
function _o() {
|
|
3224
3193
|
return {
|
|
3225
|
-
data:
|
|
3226
|
-
clonedData:
|
|
3194
|
+
data: mo,
|
|
3195
|
+
clonedData: ho
|
|
3227
3196
|
};
|
|
3228
3197
|
}
|
|
3229
|
-
var
|
|
3230
|
-
function
|
|
3198
|
+
var vo = Symbol("cloneElement");
|
|
3199
|
+
function yo(...e) {
|
|
3231
3200
|
let t = ae()?.proxy, n = null, i = e[0], [, o, c] = e;
|
|
3232
3201
|
Array.isArray(j(o)) || (c = o, o = null);
|
|
3233
|
-
let l = null, { immediate: u = !0, clone: d =
|
|
3202
|
+
let l = null, { immediate: u = !0, clone: d = uo, forceFallback: f, fallbackOnBody: p, customUpdate: m } = j(c) ?? {};
|
|
3234
3203
|
function h(e) {
|
|
3235
3204
|
let { from: t, oldIndex: r, item: i } = e, a = Array.from(t.childNodes);
|
|
3236
3205
|
n = f && !p ? a.slice(0, -1) : a;
|
|
3237
3206
|
let s = j(j(o)?.[r]), c = d(s);
|
|
3238
|
-
|
|
3207
|
+
go(s, c), i[vo] = c;
|
|
3239
3208
|
}
|
|
3240
3209
|
function g(e) {
|
|
3241
|
-
let t = e.item[
|
|
3242
|
-
if (!
|
|
3243
|
-
if (
|
|
3210
|
+
let t = e.item[vo];
|
|
3211
|
+
if (!Zr(t)) {
|
|
3212
|
+
if (ei(e.item), a(o)) {
|
|
3244
3213
|
let n = [...j(o)];
|
|
3245
|
-
o.value =
|
|
3214
|
+
o.value = Xr(n, e.newDraggableIndex, t);
|
|
3246
3215
|
return;
|
|
3247
3216
|
}
|
|
3248
|
-
|
|
3217
|
+
Xr(j(o), e.newDraggableIndex, t);
|
|
3249
3218
|
}
|
|
3250
3219
|
}
|
|
3251
3220
|
function _(e) {
|
|
3252
3221
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: s, clone: c } = e;
|
|
3253
|
-
if (
|
|
3254
|
-
|
|
3222
|
+
if ($r(t, n, r), s === "clone") {
|
|
3223
|
+
ei(c);
|
|
3255
3224
|
return;
|
|
3256
3225
|
}
|
|
3257
3226
|
if (a(o)) {
|
|
3258
3227
|
let e = [...j(o)];
|
|
3259
|
-
o.value =
|
|
3228
|
+
o.value = Yr(e, i);
|
|
3260
3229
|
return;
|
|
3261
3230
|
}
|
|
3262
|
-
|
|
3231
|
+
Yr(j(o), i);
|
|
3263
3232
|
}
|
|
3264
3233
|
function v(e) {
|
|
3265
3234
|
if (m) {
|
|
@@ -3267,12 +3236,12 @@ function vo(...e) {
|
|
|
3267
3236
|
return;
|
|
3268
3237
|
}
|
|
3269
3238
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: s } = e;
|
|
3270
|
-
if (
|
|
3239
|
+
if (ei(n), $r(t, n, r), a(o)) {
|
|
3271
3240
|
let e = [...j(o)];
|
|
3272
|
-
o.value =
|
|
3241
|
+
o.value = Kr(e, i, s);
|
|
3273
3242
|
return;
|
|
3274
3243
|
}
|
|
3275
|
-
|
|
3244
|
+
Kr(j(o), i, s);
|
|
3276
3245
|
}
|
|
3277
3246
|
function y(e) {
|
|
3278
3247
|
let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
|
|
@@ -3291,7 +3260,7 @@ function vo(...e) {
|
|
|
3291
3260
|
n = null;
|
|
3292
3261
|
}
|
|
3293
3262
|
r(() => {
|
|
3294
|
-
if (
|
|
3263
|
+
if (go(), s) throw s;
|
|
3295
3264
|
});
|
|
3296
3265
|
}
|
|
3297
3266
|
let b = {
|
|
@@ -3303,19 +3272,19 @@ function vo(...e) {
|
|
|
3303
3272
|
};
|
|
3304
3273
|
function x(e) {
|
|
3305
3274
|
let n = j(i);
|
|
3306
|
-
return e ||=
|
|
3275
|
+
return e ||= Qr(n) ? ti(n, t?.$el) : n, e && !ii(e) && (e = e.$el), e || Gr("Root element not found"), e;
|
|
3307
3276
|
}
|
|
3308
3277
|
function S() {
|
|
3309
|
-
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3310
|
-
return
|
|
3311
|
-
|
|
3312
|
-
}),
|
|
3278
|
+
let e = j(c) ?? {}, { immediate: t, clone: n } = e, r = Hr(e, ["immediate", "clone"]);
|
|
3279
|
+
return ai(r, (e, t) => {
|
|
3280
|
+
oi(e) && (r[e] = (e, ...n) => (si(e, _o()), t(e, ...n)));
|
|
3281
|
+
}), ri(o === null ? {} : b, r);
|
|
3313
3282
|
}
|
|
3314
3283
|
let C = (e) => {
|
|
3315
3284
|
e = x(e), l && w.destroy(), l = new Q(e, S());
|
|
3316
3285
|
};
|
|
3317
3286
|
s(() => c, () => {
|
|
3318
|
-
l &&
|
|
3287
|
+
l && ai(S(), (e, t) => {
|
|
3319
3288
|
l?.option(e, t);
|
|
3320
3289
|
});
|
|
3321
3290
|
}, { deep: !0 });
|
|
@@ -3328,15 +3297,15 @@ function vo(...e) {
|
|
|
3328
3297
|
toArray: () => l?.toArray(),
|
|
3329
3298
|
closest: (...e) => l?.closest(...e)
|
|
3330
3299
|
};
|
|
3331
|
-
return
|
|
3300
|
+
return po(() => {
|
|
3332
3301
|
u && C();
|
|
3333
|
-
}),
|
|
3302
|
+
}), fo(w.destroy), Vr({
|
|
3334
3303
|
start: C,
|
|
3335
3304
|
pause: () => w?.option("disabled", !0),
|
|
3336
3305
|
resume: () => w?.option("disabled", !1)
|
|
3337
3306
|
}, w);
|
|
3338
3307
|
}
|
|
3339
|
-
var
|
|
3308
|
+
var bo = [
|
|
3340
3309
|
"update",
|
|
3341
3310
|
"start",
|
|
3342
3311
|
"add",
|
|
@@ -3349,7 +3318,7 @@ var yo = [
|
|
|
3349
3318
|
"clone",
|
|
3350
3319
|
"move",
|
|
3351
3320
|
"change"
|
|
3352
|
-
],
|
|
3321
|
+
], xo = y({
|
|
3353
3322
|
name: "VueDraggable",
|
|
3354
3323
|
model: {
|
|
3355
3324
|
prop: "modelValue",
|
|
@@ -3399,37 +3368,37 @@ var yo = [
|
|
|
3399
3368
|
"tag",
|
|
3400
3369
|
"target",
|
|
3401
3370
|
"customUpdate",
|
|
3402
|
-
...
|
|
3371
|
+
...bo.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3403
3372
|
],
|
|
3404
|
-
emits: ["update:modelValue", ...
|
|
3373
|
+
emits: ["update:modelValue", ...bo],
|
|
3405
3374
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3406
|
-
let a =
|
|
3375
|
+
let a = bo.reduce((e, t) => {
|
|
3407
3376
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3408
3377
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3409
3378
|
}, {}), s = x(() => {
|
|
3410
|
-
let t = S(e), { modelValue: n } = t, r =
|
|
3379
|
+
let t = S(e), { modelValue: n } = t, r = Hr(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3411
3380
|
let r = j(n);
|
|
3412
3381
|
return r !== void 0 && (e[t] = r), e;
|
|
3413
3382
|
}, {});
|
|
3414
|
-
return
|
|
3383
|
+
return Vr(Vr({}, a), Jr(Vr(Vr({}, i), o)));
|
|
3415
3384
|
}), c = x({
|
|
3416
3385
|
get: () => e.modelValue,
|
|
3417
3386
|
set: (e) => n("update:modelValue", e)
|
|
3418
|
-
}), l = h(), u = o(
|
|
3387
|
+
}), l = h(), u = o(yo(e.target || l, c, s));
|
|
3419
3388
|
return r(u), () => f(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
3420
3389
|
}
|
|
3421
|
-
}),
|
|
3390
|
+
}), So = {
|
|
3422
3391
|
mounted: "mounted",
|
|
3423
3392
|
unmounted: "unmounted"
|
|
3424
3393
|
};
|
|
3425
|
-
|
|
3394
|
+
So.mounted, So.unmounted;
|
|
3426
3395
|
//#endregion
|
|
3427
3396
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3428
|
-
var
|
|
3397
|
+
var Co = { class: "tpl:w-full" }, wo = { class: "tpl:flex tpl:gap-0" }, To = {
|
|
3429
3398
|
key: 0,
|
|
3430
3399
|
"data-testid": "section-drop-hint",
|
|
3431
3400
|
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)]"
|
|
3432
|
-
},
|
|
3401
|
+
}, Eo = /* @__PURE__ */ y({
|
|
3433
3402
|
__name: "SectionBlock",
|
|
3434
3403
|
props: {
|
|
3435
3404
|
block: {},
|
|
@@ -3437,13 +3406,13 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3437
3406
|
},
|
|
3438
3407
|
setup(n) {
|
|
3439
3408
|
let r = {
|
|
3440
|
-
title:
|
|
3441
|
-
paragraph:
|
|
3442
|
-
image:
|
|
3443
|
-
button:
|
|
3444
|
-
divider:
|
|
3445
|
-
custom:
|
|
3446
|
-
}, a = n, { t: o } =
|
|
3409
|
+
title: Fr,
|
|
3410
|
+
paragraph: vr,
|
|
3411
|
+
image: ar,
|
|
3412
|
+
button: an,
|
|
3413
|
+
divider: Un,
|
|
3414
|
+
custom: Vn
|
|
3415
|
+
}, a = n, { t: o } = pt(), s = We(rt, "SectionBlock"), l = P(ct, null), u = P(at, null), d = x(() => {
|
|
3447
3416
|
switch (a.block.columns) {
|
|
3448
3417
|
case "2": return ["50%", "50%"];
|
|
3449
3418
|
case "3": return [
|
|
@@ -3469,7 +3438,7 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3469
3438
|
r[e] = n, s.updateBlock(a.block.id, { children: r });
|
|
3470
3439
|
}
|
|
3471
3440
|
function h(e) {
|
|
3472
|
-
return
|
|
3441
|
+
return yr(e, u, r);
|
|
3473
3442
|
}
|
|
3474
3443
|
function g(e, t) {
|
|
3475
3444
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
@@ -3477,11 +3446,11 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3477
3446
|
dataSourceFetched: t.dataSourceFetched
|
|
3478
3447
|
});
|
|
3479
3448
|
}
|
|
3480
|
-
return (r, a) => (e(), w("div",
|
|
3449
|
+
return (r, a) => (e(), w("div", Co, [C("div", wo, [(e(!0), w(D, null, c(f.value, (r, a) => (e(), w("div", {
|
|
3481
3450
|
key: a,
|
|
3482
3451
|
class: v(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3483
3452
|
style: A({ width: d.value[a] })
|
|
3484
|
-
}, [N(j(
|
|
3453
|
+
}, [N(j(xo), {
|
|
3485
3454
|
"model-value": p(a),
|
|
3486
3455
|
group: {
|
|
3487
3456
|
name: "blocks",
|
|
@@ -3499,7 +3468,7 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3499
3468
|
class: "tpl:min-h-[60px]",
|
|
3500
3469
|
"onUpdate:modelValue": (e) => m(a, e)
|
|
3501
3470
|
}, {
|
|
3502
|
-
default: se(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(
|
|
3471
|
+
default: se(() => [(e(!0), w(D, null, c(p(a), (r) => t((e(), w("div", { key: r.id }, [N(Nr, {
|
|
3503
3472
|
block: r,
|
|
3504
3473
|
"is-selected": j(s).state.selectedBlockId === r.id,
|
|
3505
3474
|
viewport: n.viewport,
|
|
@@ -3530,9 +3499,9 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3530
3499
|
"model-value",
|
|
3531
3500
|
"group",
|
|
3532
3501
|
"onUpdate:modelValue"
|
|
3533
|
-
]), p(a).length === 0 ? (e(), w("div",
|
|
3502
|
+
]), p(a).length === 0 ? (e(), w("div", To, [C("span", null, M(j(o).section.dropHere), 1)])) : O("", !0)], 6))), 128))])]));
|
|
3534
3503
|
}
|
|
3535
|
-
}),
|
|
3504
|
+
}), Do = {
|
|
3536
3505
|
facebook: {
|
|
3537
3506
|
name: "Facebook",
|
|
3538
3507
|
color: "#1877F2",
|
|
@@ -3613,11 +3582,11 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3613
3582
|
color: "#1769FF",
|
|
3614
3583
|
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"
|
|
3615
3584
|
}
|
|
3616
|
-
},
|
|
3585
|
+
}, Oo = {
|
|
3617
3586
|
small: 24,
|
|
3618
3587
|
medium: 32,
|
|
3619
3588
|
large: 48
|
|
3620
|
-
},
|
|
3589
|
+
}, ko = [
|
|
3621
3590
|
"facebook",
|
|
3622
3591
|
"twitter",
|
|
3623
3592
|
"instagram",
|
|
@@ -3634,11 +3603,11 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3634
3603
|
"github",
|
|
3635
3604
|
"dribbble",
|
|
3636
3605
|
"behance"
|
|
3637
|
-
],
|
|
3606
|
+
], Ao = [
|
|
3638
3607
|
"width",
|
|
3639
3608
|
"height",
|
|
3640
3609
|
"fill"
|
|
3641
|
-
],
|
|
3610
|
+
], jo = ["d"], Mo = /* @__PURE__ */ y({
|
|
3642
3611
|
__name: "SocialIconSvg",
|
|
3643
3612
|
props: {
|
|
3644
3613
|
platform: {},
|
|
@@ -3646,7 +3615,7 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3646
3615
|
iconSize: {}
|
|
3647
3616
|
},
|
|
3648
3617
|
setup(t) {
|
|
3649
|
-
let n = t, r = x(() =>
|
|
3618
|
+
let n = t, r = x(() => Do[n.platform]), i = x(() => Oo[n.iconSize]), a = x(() => {
|
|
3650
3619
|
let e = {
|
|
3651
3620
|
display: "inline-flex",
|
|
3652
3621
|
alignItems: "center",
|
|
@@ -3690,25 +3659,25 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3690
3659
|
viewBox: "0 0 24 24",
|
|
3691
3660
|
fill: s.value,
|
|
3692
3661
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3693
|
-
}, [C("path", { d: r.value.path }, null, 8,
|
|
3662
|
+
}, [C("path", { d: r.value.path }, null, 8, jo)], 8, Ao))], 4));
|
|
3694
3663
|
}
|
|
3695
|
-
}),
|
|
3664
|
+
}), No = { class: "tpl:w-full" }, Po = ["href"], Fo = {
|
|
3696
3665
|
key: 1,
|
|
3697
3666
|
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)]"
|
|
3698
|
-
},
|
|
3667
|
+
}, Io = /* @__PURE__ */ y({
|
|
3699
3668
|
__name: "SocialIconsBlock",
|
|
3700
3669
|
props: {
|
|
3701
3670
|
block: {},
|
|
3702
3671
|
viewport: {}
|
|
3703
3672
|
},
|
|
3704
3673
|
setup(t) {
|
|
3705
|
-
let n = t, { t: r } =
|
|
3674
|
+
let n = t, { t: r } = pt(), i = x(() => ({
|
|
3706
3675
|
display: "flex",
|
|
3707
3676
|
flexWrap: "wrap",
|
|
3708
3677
|
gap: `${n.block.spacing}px`,
|
|
3709
3678
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3710
3679
|
})), a = x(() => n.block.icons.length > 0);
|
|
3711
|
-
return (n, o) => (e(), w("div",
|
|
3680
|
+
return (n, o) => (e(), w("div", No, [a.value ? (e(), w("div", {
|
|
3712
3681
|
key: 0,
|
|
3713
3682
|
style: A(i.value)
|
|
3714
3683
|
}, [(e(!0), w(D, null, c(t.block.icons, (n) => (e(), w("a", {
|
|
@@ -3716,7 +3685,7 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3716
3685
|
href: n.url || "#",
|
|
3717
3686
|
class: "tpl:cursor-default",
|
|
3718
3687
|
onClick: o[0] ||= b(() => {}, ["prevent"])
|
|
3719
|
-
}, [N(
|
|
3688
|
+
}, [N(Mo, {
|
|
3720
3689
|
platform: n.platform,
|
|
3721
3690
|
"icon-style": t.block.iconStyle,
|
|
3722
3691
|
"icon-size": t.block.iconSize
|
|
@@ -3724,44 +3693,44 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3724
3693
|
"platform",
|
|
3725
3694
|
"icon-style",
|
|
3726
3695
|
"icon-size"
|
|
3727
|
-
])], 8,
|
|
3696
|
+
])], 8, Po))), 128))], 4)) : (e(), w("div", Fo, [N(j(gn), { size: 16 }), C("span", null, M(j(r).social.addIcons), 1)]))]));
|
|
3728
3697
|
}
|
|
3729
|
-
}),
|
|
3698
|
+
}), Lo = { class: "tpl:w-full" }, Ro = {
|
|
3730
3699
|
key: 0,
|
|
3731
3700
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3732
3701
|
style: {
|
|
3733
3702
|
"background-color": "var(--tpl-bg-hover)",
|
|
3734
3703
|
color: "var(--tpl-text-dim)"
|
|
3735
3704
|
}
|
|
3736
|
-
},
|
|
3705
|
+
}, zo = /* @__PURE__ */ y({
|
|
3737
3706
|
__name: "SpacerBlock",
|
|
3738
3707
|
props: {
|
|
3739
3708
|
block: {},
|
|
3740
3709
|
viewport: {}
|
|
3741
3710
|
},
|
|
3742
3711
|
setup(t) {
|
|
3743
|
-
let n = t, r =
|
|
3712
|
+
let n = t, r = We(rt, "SpacerBlock"), i = x(() => ({
|
|
3744
3713
|
height: `${n.block.height}px`,
|
|
3745
3714
|
minHeight: `${n.block.height}px`,
|
|
3746
3715
|
...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3747
3716
|
}));
|
|
3748
|
-
return (n, a) => (e(), w("div",
|
|
3717
|
+
return (n, a) => (e(), w("div", Lo, [C("div", {
|
|
3749
3718
|
style: A(i.value),
|
|
3750
3719
|
class: v(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(r).state.previewMode }])
|
|
3751
|
-
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span",
|
|
3720
|
+
}, [j(r).state.previewMode ? O("", !0) : (e(), w("span", Ro, M(t.block.height) + "px ", 1))], 6)]));
|
|
3752
3721
|
}
|
|
3753
|
-
}),
|
|
3722
|
+
}), Bo = { class: "tpl:w-full" }, Vo = { key: 0 }, Ho = [
|
|
3754
3723
|
"aria-label",
|
|
3755
3724
|
"data-placeholder",
|
|
3756
3725
|
"onBlur"
|
|
3757
|
-
],
|
|
3726
|
+
], Uo = [
|
|
3758
3727
|
"aria-label",
|
|
3759
3728
|
"data-placeholder",
|
|
3760
3729
|
"onBlur"
|
|
3761
|
-
],
|
|
3730
|
+
], Wo = {
|
|
3762
3731
|
key: 1,
|
|
3763
3732
|
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)]"
|
|
3764
|
-
},
|
|
3733
|
+
}, Go = /*#__PURE__*/ vt(/* @__PURE__ */ y({
|
|
3765
3734
|
__name: "TableBlock",
|
|
3766
3735
|
props: {
|
|
3767
3736
|
block: {},
|
|
@@ -3775,7 +3744,7 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3775
3744
|
updated(e, t) {
|
|
3776
3745
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3777
3746
|
}
|
|
3778
|
-
}, i = n, { t: a } =
|
|
3747
|
+
}, i = n, { t: a } = pt(), o = We(rt, "TableBlock"), s = x(() => i.block.rows.length > 0), l = x(() => ({
|
|
3779
3748
|
width: "100%",
|
|
3780
3749
|
borderCollapse: "collapse",
|
|
3781
3750
|
fontSize: `${i.block.fontSize}px`,
|
|
@@ -3804,11 +3773,11 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3804
3773
|
} : n);
|
|
3805
3774
|
o.updateBlock(i.block.id, { rows: a });
|
|
3806
3775
|
}
|
|
3807
|
-
return (n, i) => (e(), w("div",
|
|
3776
|
+
return (n, i) => (e(), w("div", Bo, [s.value ? (e(), w("table", {
|
|
3808
3777
|
key: 0,
|
|
3809
3778
|
style: A(l.value),
|
|
3810
3779
|
class: "tpl-table-editable"
|
|
3811
|
-
}, [f.value ? (e(), w("thead",
|
|
3780
|
+
}, [f.value ? (e(), w("thead", Vo, [C("tr", null, [(e(!0), w(D, null, c(f.value.cells, (n) => t((e(), w("th", {
|
|
3812
3781
|
key: n.id,
|
|
3813
3782
|
style: A(d.value),
|
|
3814
3783
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3817,7 +3786,7 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3817
3786
|
onBlur: (e) => h(f.value.id, n.id, e),
|
|
3818
3787
|
onKeydown: i[0] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3819
3788
|
onClick: b(m, ["stop"])
|
|
3820
|
-
}, null, 44,
|
|
3789
|
+
}, null, 44, Ho)), [[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", {
|
|
3821
3790
|
key: o.id,
|
|
3822
3791
|
style: A(u.value),
|
|
3823
3792
|
"aria-label": j(a).table.cellPlaceholder,
|
|
@@ -3826,9 +3795,9 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3826
3795
|
onBlur: (e) => h(n.id, o.id, e),
|
|
3827
3796
|
onKeydown: i[1] ||= ie(b((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3828
3797
|
onClick: b(m, ["stop"])
|
|
3829
|
-
}, null, 44,
|
|
3798
|
+
}, null, 44, Uo)), [[r, o.content]])), 128))]))), 128))])], 4)) : (e(), w("div", Wo, [N(j(_n), { size: 16 }), C("span", null, M(j(a).table.empty), 1)]))]));
|
|
3830
3799
|
}
|
|
3831
|
-
}), [["__scopeId", "data-v-de1a7c76"]]),
|
|
3800
|
+
}), [["__scopeId", "data-v-de1a7c76"]]), Ko = /* @__PURE__ */ y({
|
|
3832
3801
|
__name: "VideoPlayButton",
|
|
3833
3802
|
props: { hoverEffect: {
|
|
3834
3803
|
type: Boolean,
|
|
@@ -3846,7 +3815,7 @@ var So = { class: "tpl:w-full" }, Co = { class: "tpl:flex tpl:gap-0" }, wo = {
|
|
|
3846
3815
|
});
|
|
3847
3816
|
//#endregion
|
|
3848
3817
|
//#region src/utils/videoThumbnail.ts
|
|
3849
|
-
function
|
|
3818
|
+
function qo(e) {
|
|
3850
3819
|
if (!e) return {
|
|
3851
3820
|
platform: "unknown",
|
|
3852
3821
|
videoId: null,
|
|
@@ -3878,25 +3847,25 @@ function Ko(e) {
|
|
|
3878
3847
|
thumbnailUrl: null
|
|
3879
3848
|
};
|
|
3880
3849
|
}
|
|
3881
|
-
function
|
|
3882
|
-
return t ||
|
|
3850
|
+
function Jo(e, t) {
|
|
3851
|
+
return t || qo(e).thumbnailUrl;
|
|
3883
3852
|
}
|
|
3884
3853
|
//#endregion
|
|
3885
3854
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3886
|
-
var
|
|
3855
|
+
var Yo = ["src", "alt"], Xo = {
|
|
3887
3856
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3888
3857
|
style: { opacity: "0.7" }
|
|
3889
|
-
},
|
|
3858
|
+
}, Zo = ["href"], Qo = ["src", "alt"], $o = ["src", "alt"], es = {
|
|
3890
3859
|
key: 3,
|
|
3891
3860
|
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)]"
|
|
3892
|
-
},
|
|
3861
|
+
}, ts = /* @__PURE__ */ y({
|
|
3893
3862
|
__name: "VideoBlock",
|
|
3894
3863
|
props: {
|
|
3895
3864
|
block: {},
|
|
3896
3865
|
viewport: {}
|
|
3897
3866
|
},
|
|
3898
3867
|
setup(t) {
|
|
3899
|
-
let n = t, { t: r } =
|
|
3868
|
+
let n = t, { t: r } = pt(), { syntax: i } = yt(), a = x(() => me(n.block.url, i) || me(n.block.thumbnailUrl, i)), o = x(() => a.value ? null : Jo(n.block.url, n.block.thumbnailUrl)), s = x(() => ({ textAlign: n.block.align })), c = x(() => {
|
|
3900
3869
|
let e = n.block.align;
|
|
3901
3870
|
return {
|
|
3902
3871
|
maxWidth: "100%",
|
|
@@ -3917,16 +3886,16 @@ var Jo = ["src", "alt"], Yo = {
|
|
|
3917
3886
|
class: "tpl:w-full tpl:border-0",
|
|
3918
3887
|
src: t.block.placeholderUrl,
|
|
3919
3888
|
alt: t.block.alt
|
|
3920
|
-
}, null, 8,
|
|
3889
|
+
}, null, 8, Yo), N(Ko)], 4)) : a.value ? (e(), w("div", {
|
|
3921
3890
|
key: 1,
|
|
3922
3891
|
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)]",
|
|
3923
3892
|
style: A([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
3924
|
-
}, [N(j(
|
|
3893
|
+
}, [N(j(vn), {
|
|
3925
3894
|
size: 36,
|
|
3926
3895
|
"stroke-width": 1.5,
|
|
3927
3896
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3928
3897
|
style: { opacity: "0.5" }
|
|
3929
|
-
}), C("span",
|
|
3898
|
+
}), C("span", Xo, M(l.value), 1)], 4)) : o.value ? (e(), w(D, { key: 2 }, [t.block.url ? (e(), w("a", {
|
|
3930
3899
|
key: 0,
|
|
3931
3900
|
href: t.block.url,
|
|
3932
3901
|
target: "_blank",
|
|
@@ -3938,7 +3907,7 @@ var Jo = ["src", "alt"], Yo = {
|
|
|
3938
3907
|
class: "tpl:w-full tpl:border-0",
|
|
3939
3908
|
src: o.value,
|
|
3940
3909
|
alt: t.block.alt
|
|
3941
|
-
}, null, 8,
|
|
3910
|
+
}, null, 8, Qo), N(Ko, { "hover-effect": "" })], 12, Zo)) : (e(), w("div", {
|
|
3942
3911
|
key: 1,
|
|
3943
3912
|
class: "tpl:relative tpl:inline-block",
|
|
3944
3913
|
style: A(c.value)
|
|
@@ -3946,48 +3915,48 @@ var Jo = ["src", "alt"], Yo = {
|
|
|
3946
3915
|
class: "tpl:w-full tpl:border-0",
|
|
3947
3916
|
src: o.value,
|
|
3948
3917
|
alt: t.block.alt
|
|
3949
|
-
}, null, 8,
|
|
3918
|
+
}, null, 8, $o), N(Ko)], 4))], 64)) : (e(), w("div", es, [N(j(vn), {
|
|
3950
3919
|
size: 40,
|
|
3951
3920
|
"stroke-width": 1.5,
|
|
3952
3921
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3953
3922
|
}), C("span", null, M(j(r).video.addVideo), 1)]))], 4));
|
|
3954
3923
|
}
|
|
3955
|
-
}),
|
|
3956
|
-
section:
|
|
3957
|
-
title:
|
|
3958
|
-
paragraph:
|
|
3959
|
-
image:
|
|
3960
|
-
button:
|
|
3961
|
-
divider:
|
|
3962
|
-
video:
|
|
3963
|
-
social:
|
|
3964
|
-
menu:
|
|
3965
|
-
table:
|
|
3966
|
-
spacer:
|
|
3967
|
-
html:
|
|
3968
|
-
countdown: oe(() => import("./CountdownBlock-
|
|
3924
|
+
}), ns = {
|
|
3925
|
+
section: Eo,
|
|
3926
|
+
title: Fr,
|
|
3927
|
+
paragraph: vr,
|
|
3928
|
+
image: ar,
|
|
3929
|
+
button: an,
|
|
3930
|
+
divider: Un,
|
|
3931
|
+
video: ts,
|
|
3932
|
+
social: Io,
|
|
3933
|
+
menu: lr,
|
|
3934
|
+
table: Go,
|
|
3935
|
+
spacer: zo,
|
|
3936
|
+
html: Jn,
|
|
3937
|
+
countdown: oe(() => import("./CountdownBlock-D_AsF4F3.js").then((e) => e.n))
|
|
3969
3938
|
};
|
|
3970
|
-
function
|
|
3971
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3939
|
+
function rs(e) {
|
|
3940
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = pt(r);
|
|
3972
3941
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3973
|
-
let { resolvedTheme: c } =
|
|
3942
|
+
let { resolvedTheme: c } = Ht(x(() => t.state.uiTheme)), l = h(n.theme ?? {}), { themeStyles: u } = Wt({
|
|
3974
3943
|
themeOverrides: l,
|
|
3975
3944
|
resolvedTheme: c,
|
|
3976
3945
|
extraStyles: e.themeExtraStyles
|
|
3977
|
-
}), d =
|
|
3946
|
+
}), d = Et({
|
|
3978
3947
|
content: t.content,
|
|
3979
3948
|
setContent: (e, n) => t.setContent(e, n),
|
|
3980
3949
|
...e.historyOptions
|
|
3981
3950
|
});
|
|
3982
|
-
|
|
3983
|
-
let f =
|
|
3951
|
+
Mt(t, d);
|
|
3952
|
+
let f = Ot({
|
|
3984
3953
|
addBlock: t.addBlock,
|
|
3985
3954
|
removeBlock: t.removeBlock,
|
|
3986
3955
|
updateBlock: t.updateBlock,
|
|
3987
3956
|
selectBlock: t.selectBlock,
|
|
3988
3957
|
findBlockLocation: t.findBlockLocation,
|
|
3989
3958
|
blockDefaults: n.blockDefaults
|
|
3990
|
-
}), m =
|
|
3959
|
+
}), m = At(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? kt({
|
|
3991
3960
|
content: t.content,
|
|
3992
3961
|
isDirty: () => t.state.isDirty,
|
|
3993
3962
|
...e.autoSaveOptions
|
|
@@ -3995,15 +3964,15 @@ function ns(e) {
|
|
|
3995
3964
|
g && (_ = s(d.isNavigating, (e) => {
|
|
3996
3965
|
e ? g.pause() : g.resume();
|
|
3997
3966
|
}));
|
|
3998
|
-
let v =
|
|
3967
|
+
let v = Vt(t, {
|
|
3999
3968
|
t: a,
|
|
4000
3969
|
format: o
|
|
4001
|
-
}), y =
|
|
4002
|
-
if (
|
|
3970
|
+
}), y = Jt();
|
|
3971
|
+
if ($t(y, ns), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Vn);
|
|
4003
3972
|
function b(e) {
|
|
4004
|
-
for (let t of e) y.registerCustom(t,
|
|
3973
|
+
for (let t of e) y.registerCustom(t, Vn);
|
|
4005
3974
|
}
|
|
4006
|
-
let S =
|
|
3975
|
+
let S = It();
|
|
4007
3976
|
if (p() && re(S.dispose), e.containerEl) {
|
|
4008
3977
|
let t = e.containerEl;
|
|
4009
3978
|
Re(document, "pointerdown", (e) => {
|
|
@@ -4012,7 +3981,7 @@ function ns(e) {
|
|
|
4012
3981
|
}, { capture: !0 });
|
|
4013
3982
|
}
|
|
4014
3983
|
function C(r) {
|
|
4015
|
-
S.isActive() &&
|
|
3984
|
+
S.isActive() && tn(r, {
|
|
4016
3985
|
history: d,
|
|
4017
3986
|
selectBlock: (e) => t.selectBlock(e),
|
|
4018
3987
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4023,17 +3992,17 @@ function ns(e) {
|
|
|
4023
3992
|
}
|
|
4024
3993
|
Re(document, "keydown", C);
|
|
4025
3994
|
let w = h(null);
|
|
4026
|
-
E(
|
|
3995
|
+
E($e, e.editorRoot ?? document), E(He, w), E(tt, r), E(rt, t), E(qe, d), E(et, f), E(ct, m), E(Qe, i), E(Be, u), E(Ue, c), E(Je, n.blockDefaults), E(at, y), E(Xe, n.customBlocks ?? []), E(Ke, n.paletteBlocks), E(Ze, Yt(t.content, y));
|
|
4027
3996
|
let T = xe(n.mergeTags?.syntax);
|
|
4028
|
-
E(
|
|
4029
|
-
let ee =
|
|
3997
|
+
E(ft, n.mergeTags?.tags ?? []), E(Ge, T), E(ut, n.mergeTags?.onRequest ?? null), E(Ye, n.mergeTags?.autocomplete !== !1), E(dt, Lt()), E(Ve, n.onRequestMedia ?? null), E(ot, n.displayConditions?.conditions ?? []), E(it, n.displayConditions?.allowCustom ?? !1), E(st, e.capabilities ?? {}), E(lt, v);
|
|
3998
|
+
let ee = Rt(n.lint) ? null : zt({
|
|
4030
3999
|
content: t.content,
|
|
4031
4000
|
options: n.lint ?? {},
|
|
4032
4001
|
updateBlock: t.updateBlock,
|
|
4033
4002
|
updateSettings: t.updateSettings,
|
|
4034
4003
|
removeBlock: t.removeBlock
|
|
4035
4004
|
});
|
|
4036
|
-
E(
|
|
4005
|
+
E(nt, ee);
|
|
4037
4006
|
function D() {
|
|
4038
4007
|
_?.(), ee?.destroy(), g?.destroy(), d.destroy();
|
|
4039
4008
|
}
|
|
@@ -4056,4 +4025,4 @@ function ns(e) {
|
|
|
4056
4025
|
};
|
|
4057
4026
|
}
|
|
4058
4027
|
//#endregion
|
|
4059
|
-
export {
|
|
4028
|
+
export { un as A, Tn as C, gn as D, _n as E, Bt as F, jt as I, St as L, cn as M, an as N, mn as O, qt as P, En as S, xn as T, Jn as _, Io as a, Mn as b, Eo as c, Nr as d, br as f, ar as g, lr as h, zo as i, ln as j, pn as k, xo as l, vr as m, ts as n, Do as o, yr as p, Go as r, ko as s, rs as t, Fr as u, Un as v, wn as w, An as x, Vn as y };
|