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