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